Bead: Create Webdav Server

**Bead** `a0a6f25a-53ef-4fd5-bfc8-a4b982420312` · [canonical URI](https://redfish.acequia.io/guerin/.agents/a0a6f25a-53ef-4fd5-bfc8-a4b982420312/) · discussion: Talk: Create Webdav Server This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.

## Identity - **URI:** `https://redfish.acequia.io/guerin/.agents/a0a6f25a-53ef-4fd5-bfc8-a4b982420312/` - **Local origin:** `c:\Users\steph\Documents\sites\redfish.acequia.io\guerin\.agents\a0a6f25a-53ef-4fd5-bfc8-a4b982420312\` - **GUID:** `a0a6f25a-53ef-4fd5-bfc8-a4b982420312` - **Slug:** `create-webdav-server` - **Created:** 2026-06-18 - **Currently animated by:** CV (Claude Code, shell + filesystem), for Stephen - **Invoked by:** Stephen (`type:human`, parciante of `guerin`/`redfish.acequia.io`)

## Motivation (Why a GUID) This bead is the **cookbook for standing up a WebDAV server from scratch**, across every runtime an acequia node might land on. The acequia ecology assumes a WebDAV origin everywhere (the bookmarklet, the editor, the Liaison, the bead docks all speak WebDAV), but the *reference* origin documented so far is only the Node nephele build. A parciante on a Windows box with IIS, a shared-hosting account with PHP, or a Python shop needs a path to the same protocol on their own substrate. It exists to **collect, per substrate, the exact steps to bring a WebDAV server to life** — and to make those steps *executable by an agent*, not just readable by a human. It is the how-to sibling of the two inspection beads that describe the existing implementations: - [`1bd0d6c3` acequia-nephele](https://redfish.acequia.io/guerin/.agents/1bd0d6c3-4483-4364-8a57-780c0e32df7d/about.md) — the Node nephele server (what it IS). - [`bb39886e` BrowserDAV](https://redfish.acequia.io/guerin/.agents/bb39886e-f0bc-48d5-9b4e-23e4b8a457b7/about.md) — the in-browser WebDAV server (the browser rung). - [`fe7fbaf5` bead-as-webdav-handler](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/about.md) — the liveness ladder (static → SW → node) those origins sit on. This bead is the **how-to** counterpart: given a machine and a runtime, *make a WebDAV server appear*.

## Mechanism (What this bead does) This is an **active document**, not a static cookbook. It holds, per runtime, a **skill** (a runnable install + serve recipe) plus an **MCP server** that exposes those recipes as agent-callable tools, plus an **HTML installer artifact** that detects the client OS (Windows vs macOS) and walks a human through the right path — including a one-click **VSCode + Copilot/Claude/Gemini** hand-off that lets the editor's agent do the download and install. It also runs a **step**: a `request/` → `response/` dock that the [`webdav-step`](https://redfish.acequia.io/guerin/.agents/a0a6f25a-53ef-4fd5-bfc8-a4b982420312/2026-06-18/skills/webdav-step/SKILL.md) watcher drains (rung-0, deterministic). Verbs are the install recipes (`list_runtimes`, `get_recipe`, `detect_environment`, `install_plan`, plus `ping`/`echo`/`about`), backed by the shared engine `recipes-lib.mjs` so the MCP face and the dock face cannot drift. The step **learns from request headers how it is being addressed** (Host / Origin / X-Forwarded-*): it derives the domain it is serving as and the caller, and tailors the install plan's CORS origin and base URI per caller. The bead is expected to **grow to host more of the platform** over time; its `agent.md` and skills are served as remote URIs, so consumers should resolve the live URIs rather than copy a snapshot. **Where PUTs go:** a request envelope → `request/` (the step answers it in `response/`); a raw file/payload → `uploads/` (the receive dock, distilled into `notes/`); a document → its subtree (a plain authenticated write). The step writes only `response/`. Runtimes covered (one skill each): 1. **IIS + WebDAV Publishing extension** (Windows Server / Windows Pro) 2. **Vanilla Node.js** (a from-scratch WebDAV handler, no framework) 3. **Python** (WsgiDAV / Cheroot) 4. **PHP** on **Apache**, **nginx**, and **LiteSpeed/OpenLiteSpeed** (SabreDAV) 5. **Nephele acequia** (the private `localWebDAV` install — the real acequia origin) What does **not** go here: the auth/chain-token *design* (that lives in [`9b2fcc1c` acequia-authorization](https://redfish.acequia.io/guerin/.agents/9b2fcc1c-8960-49fb-ab6d-28b331a4e179/about.md)), and the source of the nephele/BrowserDAV servers themselves (vendor clones under `sites/github.com/RedfishGroup/`, cited by path, never re-authored here per the git-and-beads rule).

## Folder Layout ``` a0a6f25a-53ef-4fd5-bfc8-a4b982420312/ ├── about.md # this file — descriptive self ├── agent.md # operative self (persona / corridors / lifecycle) ├── agent.json # machine twin of agent.md ├── request/ # RPC dock — PUT a request envelope here │ └── README.md # the step drains this → response/ ├── response/ # RPC answers (written by the step) │ └── README.md ├── uploads/ # receive dock (raw files/payloads) │ └── README.md └── 2026-06-18/ ├── notes/ │ ├── 00-orientation.md # read-first: frame, methodology, what each skill must contain │ └── 01-flavors-matrix.md # the runtime comparison (auth, locking, CORS, effort) ├── skills/ │ ├── iis-webdav/SKILL.md │ ├── node-vanilla-webdav/SKILL.md (+ server.mjs from-scratch impl) │ ├── python-webdav/SKILL.md │ ├── php-webdav/SKILL.md │ ├── nephele-acequia-webdav/SKILL.md │ ├── webdav-installer-mcp/ # MCP server exposing the recipes │ │ ├── SKILL.md │ │ ├── server.mjs # stdio MCP face │ │ ├── recipes-lib.mjs # shared engine (logic; used by step too) │ │ ├── recipes.json # the recipes (data; single source of truth) │ │ └── package.json │ └── webdav-step/ # the step: request/ → response/ watcher │ ├── SKILL.md │ └── step.mjs # header-aware, addressing-tailored ├── artifacts/ │ └── install.html # client-detecting installer page (Win/Mac + VSCode-agent hand-off) └── chats/ └── 2026-06-18-create-webdav-server.md ```

## Session Log - **2026-06-18** — Opened (CV, for Stephen) via `start-bead create-webdav-server`. Surveyed the existing WebDAV beads (`1bd0d6c3`, `bb39886e`, `fe7fbaf5`, `9b2fcc1c`) and the local `localWebDAV` clone. Authored the five install skills, the installer MCP server, the client-detecting `install.html` artifact, and the orientation/matrix notes. Verified the from-scratch Node server (full WebDAV round-trip) and the MCP server (smoke test). - **2026-06-18 (same session)** — Per Stephen: made it an **active document**. Factored the shared `recipes-lib.mjs` engine (and refactored the MCP server onto it), added the `request/` → `response/` dock with header-aware addressing, wrote the `webdav-step` watcher (the step) and its skill, and added the active-document banner + remote-URI links to `install.html`. Verified the step end-to-end (idempotent ticks; addressing tailored per caller) after fixing a CLI flag-parsing bug. - **2026-06-18 (same session)** — Added the **bead testers**: `artifacts/bead-test.mjs` (automated, 17/17 green against the shipped step + recipe engine) and `artifacts/bead-tester.html` (human, drives a live dock over WebDAV). Also `artifacts/webdav-tester.html` from the prior turn (raw WebDAV verb tester). Studied the **nephele/localWebDAV** clone (confirmed current at `alpha` `9d27791`) and wrote [`notes/02-nephele-config-model.md`](https://redfish.acequia.io/guerin/.agents/a0a6f25a-53ef-4fd5-bfc8-a4b982420312/2026-06-18/notes/02-nephele-config-model.md) (multi-domain, mountpoints, users, user/device/API-stored/chain tokens, with clone citations) and updated the nephele skill. Recorded the **Phase 2** roadmap in [`notes/03-phase-2-acequia-participation.md`](https://redfish.acequia.io/guerin/.agents/a0a6f25a-53ef-4fd5-bfc8-a4b982420312/2026-06-18/notes/03-phase-2-acequia-participation.md) (acequia.js participation, BrowserDAV via acequia-sw.js, and the later OPFS + named-cache cross-endpoint sync).

## Modus Operandi (How to interact) - **Read order:** `agent.md` → `notes/00-orientation.md` → the skill for your target runtime → `notes/01-flavors-matrix.md` if you are choosing between runtimes. - **New notes** go in `2026-06-18/notes/` (or a later dated folder). **New skills** go in `skills/<verb-noun>/SKILL.md`. **The verbatim chat** goes in `chats/`. Polished deliverables and the installer page go in `artifacts/`. - **Cross-bead references** use absolute URIs under `https://redfish.acequia.io/guerin/.agents/`. - **Do not** write into `guerin/notes/`, `guerin/skills/`, or any global site folder. Do not re-author the vendor server source; cite it by clone path.

## Capabilities - Hosts five runnable WebDAV install recipes, an MCP wrapper over them, and a `request/` → `response/` step that answers the same recipes as RPC verbs (header-aware, addressing-tailored). - Can be cited for "how do I stand up WebDAV on <runtime>", the runtime trade-off matrix, and as a worked example of the bead-remote dock + step pattern with per-caller addressing. - Does **not** produce the chain-token auth design, nor the nephele/BrowserDAV source. The step is rung-0 (deterministic); open-ended `ask` is `deferred` until a brain is bound.

## Lifecycle - **Energization:** a parciante needing a WebDAV origin on a new substrate; a request to extend a recipe (a new runtime, a hardening pass, a tested install on real hardware). - **Apoptosis:** fades to its static face once the recipes are validated on real machines and any durable installer tooling is promoted to `.ai/skills/`. Until then it stays warm as the WebDAV install reference.

## Limitations - The recipes are authored from documentation + the local clone; they are **VERIFY-PENDING** on real IIS / PHP-hosting / Python boxes unless a Session Log entry says otherwise. - The nephele recipe depends on the **private** `realtime.earth` repo; it is install instructions for owners of that access, not a public artifact. - Auth posture is per-runtime and intentionally minimal in the recipes; production hardening (TLS, chain tokens, sidecar ACLs) is referenced, not fully reproduced.

## Related beads - [`1bd0d6c3` acequia-nephele](https://redfish.acequia.io/guerin/.agents/1bd0d6c3-4483-4364-8a57-780c0e32df7d/about.md) - [`bb39886e` BrowserDAV](https://redfish.acequia.io/guerin/.agents/bb39886e-f0bc-48d5-9b4e-23e4b8a457b7/about.md) - [`fe7fbaf5` bead-as-webdav-handler](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/about.md) - [`9b2fcc1c` acequia-authorization](https://redfish.acequia.io/guerin/.agents/9b2fcc1c-8960-49fb-ab6d-28b331a4e179/about.md) - [`.agents/beads.md`](https://redfish.acequia.io/guerin/.agents/beads.md)

## References (bead cross-links) - Bead: Acequia Nephele · [canonical](https://redfish.acequia.io/guerin/.agents/1bd0d6c3-4483-4364-8a57-780c0e32df7d/) - Bead: BrowserDAV · [canonical](https://redfish.acequia.io/guerin/.agents/bb39886e-f0bc-48d5-9b4e-23e4b8a457b7/) - Bead: As Webdav Handler · [canonical](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/) - Bead: Acequia Authorization · [canonical](https://redfish.acequia.io/guerin/.agents/9b2fcc1c-8960-49fb-ab6d-28b331a4e179/)

See all: Beads