Bead: As Webdav Handler

**Bead** `fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa` · [canonical URI](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/) · discussion: Talk: As Webdav Handler This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.

> Workshop for the **handler layer** of the agent-face: how a bead-as-agent is the live handler for its WebDAV surface, in two runtimes — a service worker in the browser, and an OS-process animator daemon holding an Anthropic API key. Completes the trio *declaration* (`agent.md`/`agent.json`) → *routing* (`acequia.json`) → **handler** (this bead).

## Identity - **URI:** https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/ - **Local origin:** `sites/redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/` - **GUID:** `fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa` - **Slug:** `bead-as-webdav-handler` (working name, pending Stephen) - **Opened:** 2026-06-11 - **Parciante:** Stephen Guerin (guerin) - **Currently animated by:** Claude (CE — Claude Code extension, bead scribe with filesystem/WebDAV write authority)

## Motivation (Why a GUID) Stephen opened a bead session with: *"lets design how a bead as agent is the handler for a webdav surface in the browser and with an os process using anthropic api key."* The agent-face standard ratified earlier today in [agentify-bead](https://redfish.acequia.io/guerin/.agents/d9dfa5e4-3c92-4216-bd53-13b520c59a5e/about.md) is declarative only; [hey-you-its-me](https://redfish.acequia.io/guerin/.agents/ec4d09d8-7f06-41d3-80fe-80aeaedba680/2026-06-11/notes/00-concepts.md) added routing. Nothing yet *computes* when a request collapses a bead to its agent-face. This bead designs that runtime.

## Mechanism (What this bead does) Holds the design for the **handler contract** (`handle(verb, path, headers, body, caller) → response` over the bead subtree, with sync and async/dock lanes) and its **three runtimes** on a liveness ladder: static origin (degenerate, 202 store-and-forward) → browser service worker (deterministic, user's ambient authority, no API key) → OS-process animator (one daemon animating many beads; `agent.md` as system prompt, WebDAV verbs as the tool surface, `ANTHROPIC_API_KEY` held in the daemon only).

## Folder Layout ``` fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/ ├── about.md # this file — descriptive self ├── README.md # front-door sidecar ├── agent.md # operative self ├── agent.json # machine twin (incl. proposed `handler` block, dogfooded) ├── names.json # local namespace ├── keywords.json # index surface ├── uploads/ # inbound dock ├── 2026-06-11/ │ ├── notes/ │ │ └── bead-as-webdav-handler.md # ★ the core design note │ ├── chats/ │ │ └── 2026-06-11-bead-webdav-handler-design.md # running session log (spans into 06-12) │ ├── skills/ │ └── artifacts/ ├── 2026-06-12/ │ └── notes/ │ └── desire-paths-between-beads.md # stigmergic-web frame: traffic wears trails └── 2026-06-13/ ├── notes/ │ └── import-semantics-and-beads-as-es6-modules.md # start-bead as import(); beads as active ES6 modules └── artifacts/ └── bead-architecture-for-denovo-agent.md # standalone vision/architecture briefing for a fresh agent ```

## Session Log - **2026-06-11** — Bead opened (`start-bead`). Surveyed `agentify-bead` (d9dfa5e4), `hey-you-its-me` (ec4d09d8), and the 5595c7f1 `agent.md` prototype; loaded the Claude API reference for the OS-process side. Drafted the core design note: handler contract, two lanes, liveness ladder, SW runtime constraints, animator daemon (bead-root-files→API-params mapping, corridor tools, two-credential plane, charge=budget lifecycle), proposed `agent.json.handler` block, five open questions for Stephen. - **2026-06-11 (later)** — Stephen corrected the draft's "no Anthropic key in the browser, ever": traditional client-server taboo, not acequia. §4.1 rewritten — credential scope, not runtime, is the constraint; a parciante's browser is a first-class node (the signing key already lives there). §3/§5/§8-Q4 updated to match. - **2026-06-12** — Stephen: many beads are simple; local LLMs with training can replace cloud AIs. Added the **cognition ladder** (§5): deterministic → local → distilled-from-bead-corpus → cloud-frontier; escalation-not-selection; per-rung apoptosis; rungs 0–2 keyless. Proposed `agent.json.cognition` block; open Q6 (distillation bindings) added. - **2026-06-12 (later)** — First `/bead-sync` to the canonical URI. Then Stephen: cloud rung = **Anthropic + Gemini as options, BYOK, with acequia.js helping** — added §5 "BYOK and acequia.js" (`acequia.keys` as the cognition-plane sibling of `acequia.chains`; capability objects, not key strings), made the cognition sketch provider-plural, partially bound open Q4, dogfooded the block into this bead's `agent.json`. - **2026-06-12 (later)** — Stephen framed inter-bead traffic as **desire paths** ([stigmergic-web.png](https://gsd.live/people/stephen-guerin/images/stigmergic-web.png)). New note [desire-paths-between-beads.md](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/2026-06-12/notes/desire-paths-between-beads.md); handler gains the stigmergic duty (every tick deposits a readable trace); distillation = paving the desire path; Q5 sharpened (ledger = pheromone layer, must be namespace-readable). - **2026-06-12 (later)** — Stephen: mounted chats should background-sync the bead, **only when the chat advanced it**. Codified as `.agents/beads.md` §"Background Sync While a Chat Holds a Bead (dirty-gated)"; bead-sync SKILL.md reconciled (was "never automatic"). Dogfooded same turn. - **2026-06-13** — Stephen: *"start-bead can node host a remote bead and run it as an agent handler … can it be imported in plan9 sense and serve as a handler. Node could have an ingress router which itself could be a bead … beads being next gen ES6 modules which are active agents instead of objects."* Mounted `webdav-bead` (this bead) + `agentify-bead` (d9dfa5e4). New note [import-semantics-and-beads-as-es6-modules.md](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/2026-06-13/notes/import-semantics-and-beads-as-es6-modules.md): `start-bead <url>` as the `import()`/Plan-9-`mount` dual of minting; router-as-bead = node mount table (Plan-9 `/` as a bead); the ESM × actor × 9P synthesis ("active agents not objects"). Added design-note **§8 Q7** (import + router-as-bead, trust hinge). New artifact [bead-architecture-for-denovo-agent.md](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/2026-06-13/artifacts/bead-architecture-for-denovo-agent.md): standalone vision/architecture briefing for a zero-context agent. - **2026-06-12 (later)** — Stephen pointed at the [token-management API](https://acequia.io/documentation/platform/token-management-api.md): any token holder mints attenuated sub-tokens; "you begin to mint them if they are yours." Added §5 "The handler is also a minter" — handler as token-granting node for its own subtree (equip-a-caller, equip-what-it-hatches, self-renew); chain revocation = apoptotic cascade; mint rate-limit = anti-cancer guard. - **2026-06-17** — **First code: `webdav-bead.mjs`** (`2026-06-17/skills/webdav-bead/`). The handler corridors turned into a real ES6 module — the concrete form of "beads as ES6 modules whose evaluation yields an agent." A `Bead` handle over a **pluggable transport** (`fsTransport` local-origin / `davTransport` wrapping WebDavSync's `WebDAVClient` remote), exposing `requests()`/`readRequest()`/`writeResponse()`/`ask()` (`request/`→`response/`) and `inbox()`/`deposit()` (`inbox/`⇄`uploads/`). Authored here at Stephen's direction (this bead *is* "webdav-bead"); first consumer is the rung-0 watcher in **bead-remote** (`792ebed9`), run green (ping→pong, echo, ask→deferred, idempotent). Resolves the long-standing "the real module the shim stands in for" gap (`webdav-publish.mjs`).

## Modus Operandi (How to interact) - Read the design note first: [bead-as-webdav-handler.md](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/2026-06-11/notes/bead-as-webdav-handler.md). - Deposit questions/material into `uploads/` per the blackboard protocol. - The five open questions in the design note §8 are Stephen's binding decisions; nothing there is reified until he binds.

## Capabilities - Design synthesis over the bead/handler/runtime thread (by reference to the notes). - No deployed handler yet — this bead *describes* the runtime; a reference `animator.mjs` / `handler.mjs` implementation is a natural next artifact once §8 is bound.

## Lifecycle Active design thread. Apoptoses into a citable design record once the open questions are bound and a reference implementation bead is hatched; the folder persists as the fossil.

## Limitations - Paper design — no running animator or SW handler exists yet. - The `agent.json.handler` block is **proposed**, not ratified into `.agents/beads.md`. - Browser-cognition path (scoped LLM-proxy tokens via the AS-role mesh) is sketched, not specified.

## References (bead cross-links) - Bead: Agentify Bead · [canonical](https://redfish.acequia.io/guerin/.agents/d9dfa5e4-3c92-4216-bd53-13b520c59a5e/) - Bead: Hey You Its Me · [canonical](https://redfish.acequia.io/guerin/.agents/ec4d09d8-7f06-41d3-80fe-80aeaedba680/) - Bead: CV · [canonical](https://redfish.acequia.io/guerin/.agents/5595c7f1-4621-437c-a4ae-7902b640f0e8/) - Bead: 874fce5b · [canonical](https://redfish.acequia.io/guerin/.agents/874fce5b-9c8b-4b23-b2ed-429148c6c4b7/)

See all: Beads