@feedzy/mcp 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +547 -2
  3. package/dist/index.js +19720 -0
  4. package/package.json +53 -4
package/README.md CHANGED
@@ -1,3 +1,548 @@
1
- # Temporary Holding Version
1
+ # @feedzy/mcp — local MCP server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Let your AI agent (**Cursor**, **Claude Code**, **Claude Desktop**, …) **pull your
4
+ [Feedzy.ai](https://feedzy.ai) visual feedback and write resolutions back** —
5
+ closing the loop between "I saw a bug on the page" and "the agent fixed it".
6
+
7
+ **Local-first & zero-knowledge by construction:** the server reads _your own_
8
+ Feedzy folder-sync directory and decrypts it **on your machine** with your
9
+ recovery phrase. Nothing is uploaded; no account, no server.
10
+
11
+ ---
12
+
13
+ ## What the agent gets
14
+
15
+ | Tool | What it does |
16
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
17
+ | `feedzy_list_feedback` | List the feedback queue (filter by `status` / `project` / text `query`). Start with `awaiting: "agent"`: the threads where the human spoke last — a new report, a reply after your comment, or the answer to a decision you asked. Items with decision sheets carry `decisions: {open, answered, read}` (counts only; listing never marks anything read). |
18
+ | `feedzy_get_feedback` | Full context of one item: body, status/priority/tags/project/url, the conversation, a summary of the captured references (picked element + CSS, console/network errors, screenshots), plus **`contexte`** — the cascaded Markdown context of its Dossier + parent Dossiers (general → specific: stack, conventions, constraints). Each entry carries a `hash`; pass `knownContexte` (scope→hash) on repeat reads to skip unchanged docs, `rappel:true` to force full. A decision sheet comes back as `fiche` (questions, state, answers); **reading an answered sheet of yours marks it read** (`sealed`). |
19
+ | `feedzy_get_screenshot` | View the screenshot(s) attached to an item (returned as images). |
20
+ | `feedzy_plan` | Publish your steps BEFORE you start, then call it again with `done` flipped as you go: a checklist in the thread and a "⏳ 3/7" badge on the card. It edits your plan instead of posting one message per step. A step can carry a `role` (`research`, `build`, `review` — `chercher`, `faire`, `relire` until 10/10/2026, still read in plans already written) and a `model` (`haiku`, `sonnet`, `opus`, `fable`, `inherit`); without a model Feedzy suggests the role’s (research → haiku, build → sonnet, review → opus) and the human can change it from the plan bubble — `feedzy_get_feedback` returns each step’s `model` and `modelFrom` (`human`, `agent`, `feedzy`). With the Feedzy plugin for Claude Code, hand each step to its subagent (`subagent_type: "feedzy:<role>"`) on that model. |
21
+ | `feedzy_view` | Show the human **live, structured data** instead of describing it in a comment — the open merge requests and their CI (a `table`), several sub-agents and their tasks (a `tree`), `metrics`, a `timeline`, `text`, `links`. Send data, Feedzy draws it: a bubble in the thread, a "📊 title · summary" badge on the card, the full view in the viewer. Call it **again with the same `key`** to update it in place (one bubble per key; an identical view writes nothing). States are a closed list (`done`, `in_progress`, `waiting`, `blocked`, `error`, `ok`, `failed`, `info`), shown as a word. No HTML, no Markdown: text, numbers, http(s) links. Bounded (12 blocks, 12 × 200 table, 200-node tree, 64 KiB); what was cut is listed in `truncated`. Bridge mode needs an extension that announces the `vues` capability. Refused on a Feed from a public form (`feed_widget`). A view that declares a read-only **`source`** (`forge`: github or gitlab, `repo`, `what`: mr or ci) is a label — where the data comes from, shown under the view; Feedzy never re-reads the forge: the agent reads it again and sends the view again (same `key`) each time it ticks a step of its `feedzy_plan`, and only the view's author can update it. **Leave `id` out** to show it on the Feed linked to this Claude Code conversation (the one it last worked on, or the one the human linked by hand) — refused `no_linked_feed` when there is none, never a guessed Feed: that is how the Feedzy plugin for Claude Code shows your sub-agents and their tasks, by itself, as the view `agents`. |
22
+ | `feedzy_propose_link` | Propose a link for a project: **a system the project really uses** (its payment console, its CI), never a page you happened to meet in a Feed. It waits in the project sheet, silently, until the human says yes; you cannot link it yourself. `url` is https:// only; `name` (80) and `reason` (200) are required, a longer one is refused. Returns `status`: `proposed`, `already_linked`, `already_proposed` or `refused` (they said no: do not propose it again). |
23
+ | `feedzy_set_project_section` | Write **one section** of a project’s context (`## <section>` and its body, 2 000 characters at most): the rest of the context, the human’s own text, is never touched; an empty `md` removes the section. For a list that is yours to keep, such as the projects a project uses. Local server only (the hosted relay cannot read the context). |
24
+ | `feedzy_move_feedback` | Move **an existing item** under a node of the tree — a space, a project or a sub-project, by id or by name. The same gate as the side panel’s "Move" (the human can undo it). Refused: an unknown node, a read-only item or node, moving an item out of a shared project (that is the human’s gesture). Returns `moved` (with `from`), `unchanged` (already there) or, in bridge mode, `queued`. The hosted relay moves it only inside the project shared with it that holds it (FZ-316). |
25
+ | `feedzy_create_space` | Create **a space** (the root of the tree) and, if you want, write its context. `name` (one line, ≤ 80), `code` (2 to 6 letters or digits, a letter first — the prefix of its numbers, « AT-1 »; drawn from the initials of the name if absent), `context` (≤ 4000 characters). Refused: a name or a code already taken, a space that existed (even deleted). The space is born **without an artifact** (its board and its tasks live on its Feeds). Returns `created` or, in bridge mode, `queued` (the open side panel makes the root; the context lands once it exists). Not on the hosted relay. |
26
+ | `feedzy_ask` | When the human must **decide**, ask here instead of in your chat: up to 10 questions (single / multiple / yes_no / open / scale, 8 options each, "Other…" always offered), your `recommended` option and `why`. It becomes a form in the Feed's thread. A choice can carry an `image` (a drawing to choose between: a PNG, JPEG or WebP file of this computer), shown next to it, full size on hover and in the viewer. Returns the sheet id (`fiche`) and the final question ids; long texts are cut and listed in `truncated`. Refused on a Feed from a public form (`feed_widget`). |
27
+ | `feedzy_await_answers` | Wait for that sheet's answers: at most **50 s per call** (call again while `pending`), **300 s of waiting in total** per sheet — a fully answered sheet returns its answers even after that. Answers are returned once unchanged for 10 s, and the sheet is then marked **read by the agent**. Also: `replied_in_text` (they wrote instead of ticking), `budget_exhausted`, `dismissed`, `replaced`, `feed_closed`, `not_posted` / `extension_unreachable` (bridge mode). Reading does not end your turn: act, then `feedzy_comment`. |
28
+ | `feedzy_resolve` | Set a status (`shipped` once fixed; `accepted`/`rejected` for triage). Pass `change` when you modified code — `commit`, `branch`, `files`, `url` (a PR link), and `ci: { etat, url? }` (`etat` is `verte`, `rouge` or `en_cours`; http/https links only) for what CI says. It shows on the card; long lists are truncated and the remainder counted. |
29
+ | `feedzy_comment` | Post your resolution back — shows up as an **AI bubble** in the human's thread. To SHOW something (captures, drawings, a before/after), pass `images`: up to 6 PNG, JPEG or WebP files of this computer, read by this server, captioned, shown side by side under your message and full size in the viewer — never an artifact for that, unless the human asks for one. Sending the human to a page to answer (an artifact, a doc)? Say it is **private until they share it**, and why their answer matters — or better, ask with `feedzy_ask`: the form lives in the thread everyone on the Feed can see. |
30
+ | `feedzy_create_feedback` | File a **new** item yourself — a bug you hit while working, a broken invariant, a follow-up you cannot do now. It lands in the human's list with a status and a thread, instead of being buried in a chat reply. Give `dossierId` (the **id**, never the name — two Dossiers can share one) to file it under a Dossier. With `task` (FZ-155), the Feed IS a task of a space: what it waits for (`after`), its advice, its rank — filing it twice makes one Feed, and it is not linked to your conversation. Without a `number` (FZ-253), it gets the next one of its space, above the highest the `mes-espaces` recipe gave (read from `~/.feedzy/numeros/<space>.json`; `FEEDZY_NUMEROS_DIR` overrides the folder). |
31
+
32
+ **Citing a piece of a Feed.** `feedzy_get_feedback` gives the Feed its `lien` and each reference a `libelle`
33
+ (`📷 #2.3 · …`, the numbering the prompt uses). Inside Feedzy, cite a reference by its number: `[#2.3]` in a
34
+ `feedzy_comment`, a `feedzy_plan` step or a `feedzy_ask` text, `chip: "2.3"` in a `feedzy_view` table cell, list or
35
+ timeline item, or tree node (`feed` for a reference of another Feed) — Feedzy shows that reference's chip right there;
36
+ a number that matches none stays plain text. Outside Feedzy (a PR, an artifact, a doc), put a link: the Feed's `lien`,
37
+ or for a reference `<lien>/<number>~<id>` — its number, `~`, and the `id` of the reference (the Feed's own `refs`) or
38
+ of the comment that carries it, then — when that reference has an `id` of its own (`comments[].refs[].id`) — `~` and
39
+ that `id`, e.g. `https://app.feedzy.ai/l/#dem-42/3.2~cmt-7f3a~k2m9x4p0q1r7`. It targets the piece by its id: deleting
40
+ a comment, or removing a reference from it, does not make it point elsewhere. It opens in the Feedzy extension of a
41
+ browser that has the Feed — and, with Max Cloud, in the web dashboard too, on any device, for every teammate who can read
42
+ the Feed (decrypted in their browser; the server is never told which Feed).
43
+
44
+ **Your Feeds in the `@` menu (MCP resources).** The server also serves each Feed as a **resource**,
45
+ `feedzy://feed/<id>`, named by its title: type `@` in Claude Code (or any client that lists MCP resources) and pick one —
46
+ it is attached to your message. The menu lists the **50 latest, open ones first** (anything not `shipped` or `rejected`),
47
+ in both modes; the content is what `feedzy_get_feedback` returns, as JSON, through the **same mask and the same "data, not
48
+ instructions" guard**. Reading a resource **writes nothing**: no answered sheet is marked read, the Feed is not linked to the
49
+ conversation (the resource says so in its `resource` field — call `feedzy_get_feedback` before acting on it). When the queue
50
+ changes (a Feed added, removed, renamed or with a new status), the server sends `notifications/resources/list_changed` —
51
+ it re-reads the queue every 5 s in bridge mode (in memory), every 30 s in folder mode (`FEEDZY_RESOURCES_POLL_MS` sets
52
+ it for tests). Before the extension has pushed anything, the menu is empty. The hosted relay (`mcp.feedzy.ai`, for agents
53
+ online) serves the same resources by the same rule — same list, same order, read without writing — but, being stateless
54
+ (one request per call, no stream back to the client), it never sends `list_changed`: it announces `listChanged: false`,
55
+ and a client re-reads the list when it wants.
56
+
57
+ The agent reads, fixes, then **writes the resolution back into the same folder**
58
+ as a new event — conflict-free (append-only, deduped by event id), picked up by
59
+ the extension on its next sync.
60
+
61
+ ### Three servers from one package — Capture, Ask, Pilote (FZ-246)
62
+
63
+ | Entry | Start it with | Tools | Plan |
64
+ | -------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------- |
65
+ | Feedzy Capture | `npx @feedzy/mcp capture` | the base tools: list, get, screenshot, plan, ask, await answers, comment, resolve, create, move, project section | Free |
66
+ | Feedzy Ask | `npx @feedzy/mcp ask` | create a Feed, ask, await answers, comment, publish in the Fil | Max Cloud |
67
+ | Feedzy Pilote | `npx @feedzy/mcp` | every tool (the Claude Code plugin starts this one) | Max Cloud |
68
+
69
+ `FEEDZY_ENTREE=capture|ask|pilote` does the same as the argument. The plan is read from the signed plan token the extension
70
+ pushes to the bridge — never from a setting; no token, the Free plan. On the Free plan a Max Cloud tool does its free part
71
+ (`feedzy_view` keeps the view, `feedzy_propose_link` files the proposal; `feedzy_publier` publishes nothing and says so on
72
+ every call with `status: "max_cloud"`), then adds one sentence — at most once a day per tool — saying what Max Cloud would
73
+ have done, the free way out, and the 30-day trial while it is available. The last verified token is kept in
74
+ `~/.feedzy/offre/` (`FEEDZY_OFFRE_DIR`) for folder mode and the commands below; it is re-verified on every read.
75
+
76
+ ---
77
+
78
+ ## Requirements
79
+
80
+ - **Node ≥ 20**
81
+ - A Feedzy **folder-sync** directory (free tier: Settings → _Ton propre dossier_).
82
+ Note its absolute path, and your **recovery phrase** if the folder is encrypted.
83
+
84
+ ## Configure your AI client
85
+
86
+ Two env vars: `FEEDZY_FOLDER` (absolute path, **required**) and
87
+ `FEEDZY_RECOVERY_PHRASE` (only if the folder is encrypted).
88
+
89
+ ### Cursor — `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project)
90
+
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "feedzy": {
95
+ "command": "npx",
96
+ "args": ["-y", "@feedzy/mcp"],
97
+ "env": {
98
+ "FEEDZY_FOLDER": "C:/Users/you/Feedzy",
99
+ "FEEDZY_RECOVERY_PHRASE": "abcd-efgh-…"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ ### Claude Desktop — `claude_desktop_config.json`
107
+
108
+ (`%APPDATA%/Claude/claude_desktop_config.json` on Windows · `~/Library/Application Support/Claude/…` on macOS) — same `mcpServers` block as above.
109
+
110
+ ### Claude Code (CLI)
111
+
112
+ ```bash
113
+ claude mcp add feedzy \
114
+ --env FEEDZY_FOLDER=/path/to/Feedzy \
115
+ --env FEEDZY_RECOVERY_PHRASE=abcd-efgh-… \
116
+ -- npx -y @feedzy/mcp
117
+ ```
118
+
119
+ > **With the Feedzy plugin for Claude Code** (`claude-plugin/` in the extension's repository), you do not type this: the
120
+ > plugin declares the server itself (bridge mode by default — the bridge token is a plugin option,
121
+ > `bridge_token`, passed as `FEEDZY_PLUGIN_BRIDGE_TOKEN` and read **first**, before `FEEDZY_BRIDGE_TOKEN` from Claude
122
+ > Code's environment, which keeps working). Folder mode is two more plugin options, `folder` and `recovery_phrase` (secret: Claude Code keeps it in
123
+ > its credential store); the plugin passes them as `FEEDZY_PLUGIN_FOLDER` / `FEEDZY_PLUGIN_RECOVERY_PHRASE`, which this
124
+ > server reads **first** — a folder there means folder mode — before `FEEDZY_FOLDER` / `FEEDZY_RECOVERY_PHRASE` (with
125
+ > `FEEDZY_BRIDGE=0`) from Claude Code's environment, which keep working. Until this package is on npm, the plugin starts
126
+ > THIS server from the repository, next to it (`node ${CLAUDE_PLUGIN_ROOT}/../mcp/src/index.js` — run
127
+ > `cd mcp && npm install` once); that only works for a plugin loaded in place (`--plugin-dir`, or a local marketplace
128
+ > with a relative source), not one copied into a marketplace cache. Give the plugin the bridge token first (the token in
129
+ > the `env` of a server you added by hand belongs to that server only), then **remove the server you added by hand**
130
+ > (`claude mcp remove feedzy`), or every conversation starts two Feedzy servers. Check it in the extension (Settings →
131
+ > MCP lists the conversation among the connected ones), not in `/mcp`: a server without the token shows « Connected »
132
+ > there too. See the plugin's README.
133
+
134
+ Restart the client; the `feedzy_*` tools appear. Try: _"List my open Feedzy
135
+ feedback, show me the first bug's screenshot, fix it, then mark it shipped and
136
+ comment what you changed."_
137
+
138
+ > **Running a version that is not on npm (yet)?** Run it from a tarball or the checkout —
139
+ > same `env`, different `command`/`args`:
140
+ >
141
+ > - tarball: `cd mcp && npm pack` → `"command": "npx", "args": ["-y", "/abs/path/feedzy-mcp-<version>.tgz"]`
142
+ > - checkout: `cd mcp && npm install` → `"command": "node", "args": ["/abs/path/mcp/src/index.js"]`
143
+
144
+ ---
145
+
146
+ ## How it works (and why it's safe)
147
+
148
+ - The folder holds append-only `events-*.jsonl` (AES-256-GCM if you set a phrase).
149
+ - The server derives the key **exactly** like the extension —
150
+ `PBKDF2(phrase, "folder:" + salt)` from `meta.json` — replays the events through
151
+ the real reducer, and serves the materialized feedback.
152
+ - **Decryption never leaves your machine.** No network, no key upload. Lose the
153
+ phrase → the folder stays unreadable (by design).
154
+ - Write-back appends a new event as a distinct "device" (`events-mcp-<id>.jsonl`);
155
+ the extension merges it on next poll. Conflict-free by event-id dedup.
156
+ - The Dossier tree ({name, parentId}) is client-side state, not event-sourced, so
157
+ the extension snapshots it into an encrypted `groups.json` (same folder key).
158
+ The server reads it to resolve a Feed's Dossier **ancestry** for the `contexte`
159
+ cascade. No snapshot yet → `contexte` gracefully degrades to the Feed's own
160
+ Dossier doc (never an error).
161
+ - **Contexte versioning (opt-in, saves tokens).** Each `contexte` entry has a
162
+ content `hash`. On a repeat read, pass `knownContexte` (a `{scope: hash}` map of
163
+ what you already cached): the returned `contexte` is the **authoritative** cascade
164
+ — unchanged scopes come back `{unchanged:true}` (no text, keep your copy), changed
165
+ or new ones include `md`, and a cached scope that no longer applies to the Feed
166
+ comes back `{removed:true}` (evict it). `rappel:true` forces the full text. The
167
+ hash is FNV-1a change-detection (≈2⁻³² false-unchanged, recoverable via `rappel`),
168
+ **not** integrity/security.
169
+
170
+ ## Bridge mode — free, no account
171
+
172
+ Set `FEEDZY_BRIDGE=1` (instead of `FEEDZY_FOLDER`) to run as a **live bridge**: the
173
+ server opens a loopback port (127.0.0.1:51483-51512), your **running extension** pushes
174
+ its _already-decrypted_ queue to it, and the same tools serve that, plus `feedzy_publier` (bridge only). No sign-in,
175
+ no cloud: the queue an extension holds is the queue it pushes — solo and local by
176
+ default, team-wide once you sign in. **The decryption stays in the extension** —
177
+ there is no HTTP endpoint that returns plaintext (the agent reads over stdio), so
178
+ there's no read-exfiltration hole. The push/poll endpoints are gated by an `Origin`
179
+ (`chrome-extension://*`) check + the shared `FEEDZY_BRIDGE_TOKEN`.
180
+
181
+ > **This used to say "team mode (v1 — paid)", and the extension believed it.** Its
182
+ > tick refused to discover a bridge without a live cloud session, while the module
183
+ > registry tagged the bridge free and Settings called it "Local bridge — free". A solo
184
+ > user ticked the box, pasted the token, and nothing ever arrived — the bridge just
185
+ > kept saying "waiting for the extension", which is what it says when the browser is
186
+ > closed. The gate is gone; the token is not.
187
+
188
+ ```json
189
+ {
190
+ "mcpServers": {
191
+ "feedzy": {
192
+ "command": "npx",
193
+ "args": ["-y", "@feedzy/mcp"],
194
+ "env": { "FEEDZY_BRIDGE": "1", "FEEDZY_BRIDGE_TOKEN": "paste-the-token-from-Settings" }
195
+ }
196
+ }
197
+ }
198
+ ```
199
+
200
+ > **`FEEDZY_BRIDGE_TOKEN` is required.** Loopback is not a trust boundary — any
201
+ > local process can squat a free port in that range and answer `/ping`. The extension
202
+ > only trusts a bridge that **proves knowledge of the token** (HMAC challenge/response),
203
+ > and the bridge now **rejects every authenticated route without one** (403). Copy the
204
+ > token from the extension's Settings → MCP.
205
+ >
206
+ > This paragraph used to say the token was "not optional in practice", because a
207
+ > tokenless bridge is never _discovered_. That was true of the extension and false of
208
+ > everyone else: `authOk` returned `true` when no token was set, leaving only the
209
+ > `Origin` header — which any local program writes in one line. And `/snapshot` is a
210
+ > **write**: a program on the machine could deposit a fabricated feedback corpus that
211
+ > the coding agent then reads as genuine. That is an injection into the agent, not a
212
+ > leak. A tokenless bridge now really does sit there, silent.
213
+
214
+ ### Snapshot wire format
215
+
216
+ The extension pushes the **reducer state** (`demandes` keyed by id with `project` /
217
+ `status` / `refs` map / `comments`, plus the `dossiers` tree and its `projectDocs`),
218
+ stamped with a format version. Both sources therefore hand the exact same shape to
219
+ `folder.js` — the one that materializes, summarizes and cascades Contexte. A snapshot
220
+ that does not carry the expected version is **rejected with 409**, and the next tool
221
+ call says so: reading such a payload half-way is what silently emptied Dossiers,
222
+ statuses and threads before.
223
+
224
+ Two more fields ride along, outside the format version (bumping it would make an older bridge refuse the
225
+ whole snapshot): `caps` — what the extension can apply (`decisions`: it posts and seals decision sheets;
226
+ `feedzy_ask` refuses up front without it, rather than queueing a question nobody will see) — and `appareil`,
227
+ the extension's device id: the author of the sheets it posts for the agent, hence the only one allowed to
228
+ mark them read. The mutation queue has no acknowledgement, so a question or a seal is re-queued (12 times at
229
+ most) until the next snapshots show it — never while it is still queued.
230
+
231
+ **One bridge per conversation.** Claude Code starts one MCP server per conversation, so several bridges can run at
232
+ once (each on the first free port of 51483-51512) — and the extension serves **all** of them, not only the first one
233
+ that answers. Each bridge tells the extension which conversation it belongs to, in its **authenticated** reply to
234
+ `POST /snapshot` (`{ ok, count, session }`), never on the open `/ping`: `session = { id, dossier, client, editeur,
235
+ depot, branche, depuis }` — the conversation id (`CLAUDE_CODE_SESSION_ID`), the working folder
236
+ (`CLAUDE_PROJECT_DIR`, else the server's cwd), the client (`CLAUDE_CODE_ENTRYPOINT`), the editor (guessed from where
237
+ Claude Code's binary lives: `vscode`, `cursor`, `windsurf`, `vscodium`), the git repository (`owner/name`, from
238
+ `git remote get-url origin` — never the credentials a remote URL may carry) and branch, and when the server started.
239
+ Git is read with a 1-second timeout, at most every 30 s, never blocking; anything unknown is `''`. Beside the session
240
+ (never inside it: the session is written to the Feeds it touches), the reply carries `etat`: `occupee` (busy) or
241
+ `repos` (idle), read from the file Claude Code keeps for the conversation (`~/.claude/sessions/<pid>.json`, or under
242
+ `CLAUDE_CONFIG_DIR`; only its `status`, re-read when its date changes), `''` when unknown. Two more booleans travel
243
+ with it. `vierge`: the conversation has no transcript yet (`~/.claude/projects/<project folder>/<id>.jsonl` does not
244
+ exist — checked, never read; `src/vierge.js`), the only kind of conversation the extension takes for a NEW one it has
245
+ just opened — with `viergeInconnue` when the server cannot tell (no `projects` folder, an unreadable one, more than
246
+ 256 folders). `accuse`: the Feedzy.ai plugin of this conversation declared, in its heartbeat (`accuse: 1`), that it
247
+ acknowledges every launch it submits — without it the extension says "received by its server, without confirmation"
248
+ instead of waiting for an acknowledgement that never comes. A `POST /lancer` marked `neuve` is accepted only while the
249
+ conversation has no transcript (`pas_vierge`; `inverifiable` when the server cannot tell) and has received nothing yet —
250
+ decided under the launcher's lock, on disk: another launch waiting in `<conversation>.json`, or a non-empty
251
+ `<conversation>.lus.json`, gives `neuve_prise`, whatever server process receives it. A `POST /lancer` carrying
252
+ `annuler: true` withdraws a launch that the plugin has not taken yet (the server takes it in the plugin's place,
253
+ `<conversation>.<id>.pris`, and removes its text): `{ ok: true, annule: true | false }`. The extension
254
+ lists these conversations in Settings → MCP ("Connected conversations"). Outside Claude Code (Cursor's own agent,
255
+ Claude Desktop…) there is no conversation id: the line shows the folder and the editor only.
256
+
257
+ **Thirty ports, one conversation too many.** When 51483-51512 are all taken (thirty conversations already hold a
258
+ bridge, or the OS reserves the range), the server still starts — it used to exit, and that conversation lost every
259
+ feedzy tool. Its tools then answer `bridge unavailable: all the bridge ports are taken by other conversations — close
260
+ one you no longer need; this server takes the freed port by itself`, with the exact cause from the port scan. It
261
+ retries every 15 s and becomes a real bridge as soon as a port frees up, with no `/mcp` and no lost tool; stderr then
262
+ says `team bridge on 127.0.0.1:<port>`.
263
+
264
+ **How old is what the bridge serves.** The extension pushes every 5 s while its side panel is open. Once it closes,
265
+ its background worker takes over: every 30 s while a conversation is open (once a minute otherwise, so a conversation
266
+ opened with the panel closed may wait up to a minute for its first snapshot), as long as the “MCP · AI agents” module
267
+ is on and a token is paired. It declares that pace in each snapshot (`rythmeMs`) and the bridge judges silence by it:
268
+ 15 s after the panel, 65 s after the worker. Past that, every answer says so, rather than serving an hour-old queue as
269
+ if it were live: `feedzy_list_feedback` and `feedzy_get_feedback` carry `stale: true, silentFor: <seconds>`, and each
270
+ write (`feedzy_resolve`, `feedzy_comment`, `feedzy_plan`, `feedzy_create_feedback`, `feedzy_view`, `feedzy_propose_link`, `feedzy_set_project_section`, `feedzy_move_feedback`, `feedzy_create_space`, `feedzy_ask`) is
271
+ still queued but says "the extension hasn't pushed anything for N s (browser closed, or Feedzy's bridge switched off?):
272
+ applied when it comes back" — a sentence on the text answers, `stale` / `silentFor` / `note` on the JSON ones. Nothing
273
+ is added while the extension is pushing. **To cut an agent off, switch the module off: closing the panel no longer
274
+ does.** A conversation started before this version keeps its older server, which judges silence at 15 s, until it restarts.
275
+
276
+ **Screenshots with the panel closed.** The side panel holds every capture in memory and pushes them all; the worker does
277
+ not. It joins only the captures of the Feeds linked to that conversation (the link the bridge records when the agent
278
+ reads a Feed), newest link first, at most 32 MB per pass, the rest on the next pass. The bridge keeps what it received
279
+ from one snapshot to the next and lists it in its `/snapshot` answer, so none travels twice. `feedzy_get_feedback` says
280
+ `hasImage: true` even when the bytes are not here yet, and `feedzy_get_screenshot` waits up to 35 s for them, then says
281
+ to open the side panel. A Feed pinned to another conversation is not covered: same sentence, no wait.
282
+
283
+ **One token, one browser.** Each browser generates its own token, and Settings only copy or regenerate it; it is neither
284
+ synced nor exported. To serve two browsers on one machine, run one server per browser, each with that browser's token: a
285
+ server signed with another token does not exist for a browser. Do not copy one token into a second browser by hand: both
286
+ would push to the same server, each snapshot replacing the other, and a write queued on a Feed of one browser would be
287
+ taken, and dropped, by the other one (measured: 42 writes out of 43, each acknowledged as `queued`).
288
+
289
+ **The conversation that works on a Feed links itself to it — in both modes.** Every tool that takes a Feed id
290
+ (`feedzy_get_feedback`, `feedzy_get_screenshot`, `feedzy_plan`, `feedzy_view`, `feedzy_ask`, `feedzy_await_answers`,
291
+ `feedzy_comment`, `feedzy_resolve`) — and `feedzy_create_feedback` on the Feed it creates — records the calling
292
+ Claude Code conversation on that Feed — the same `session`
293
+ shape, as an `agent` field of a `demande.meta_set` event (no new event type): queued to the extension in bridge
294
+ mode, written to the folder (under the MCP identity, behind the folder's write lock) in folder mode. Once per Feed and
295
+ conversation per process, and never when the Feed is already linked to this conversation — another conversation
296
+ replaces the link, **unless the human chose the conversation by hand** in the extension (the link is then _pinned_,
297
+ `epingle: true`): no tool call replaces a pinned link; only the human changes it (another choice, or « Unlink »). A
298
+ call refused because of a pin is not remembered as « tried »: once the human unlinks, the next tool call of that
299
+ process links it. A conversation id that is not a plain identifier (letters, digits, `-`, `_`) links nothing: it
300
+ ends up in a command the human pastes into a terminal. The extension shows the link on the card and reopens the
301
+ conversation (`vscode://anthropic.claude-code/open?session=<id>` in the editor that ran it, or `claude --resume <id>`
302
+ copied for a terminal), and "Send to Claude Code" opens that same conversation with a short brief pre-filled. It never
303
+ makes a tool fail. Like the rest of the Feed, it is encrypted and travels to whoever receives the Feed — **with the full
304
+ path of the working folder** (it may contain your system user name): it tells the other devices and teammates WHERE
305
+ the conversation works. The extension shows only the folder's name, the full path on hover.
306
+
307
+ **What the human sent you — `sent`, bridge mode only.** When the human hands you a Feed from the extension ("Hand to
308
+ the agent" through the IDE companion, "Send to Claude Code", or a paste into the IDE's chat or terminal through the
309
+ companion — the most recent wins), the extension keeps, at that moment, the exact text its
310
+ _Ce qui part_ tab shows for that Feed (or, for « Cursor » sent as a file through the companion, exactly the text written
311
+ to that file) — their hand edits ("Modifier ce prompt") included, captures as their
312
+ description — and pushes it with its snapshot (`envois`, outside the format version: an older bridge drops it).
313
+ `feedzy_get_feedback` then returns `sent: { prompt, at }`: exactly what they reviewed and sent, to follow. One hour of
314
+ life, 20 sends, 200 000 characters each (cut beyond, and said: `truncated: true`, `length`), 1 000 000 in all per
315
+ snapshot. **Folder mode has no `sent`**: nothing pushes it there — the agent reads the Feed's fields, as before.
316
+
317
+ **Your Claude subscription quota.** The same authenticated reply also carries `quota` — the last reading the Feedzy
318
+ plugin for Claude Code (`claude-plugin/` in the extension's repository) wrote to `~/.feedzy/claude-quota.json`
319
+ (`FEEDZY_QUOTA_FILE` overrides the path — the plugin reads the same variable; the home folder is Node's
320
+ `os.homedir()`): `{ v: 1, at, fenetres: [{ kind, percentUsed, resetsAt }], source, version }`, `at` being when Claude
321
+ Code **read** it. The bridge re-reads the file only when its date changes, ignores a half-written one (the plugin's
322
+ write is not atomic) without forgetting the previous reading, never reads a file over 64 KiB, and drops every field it
323
+ does not know. `null` without a plugin or off a subscription. The extension keeps the most recent reading of all its
324
+ bridges and shows it at the bottom of its side panel, with its age. It is never on the open `/ping`.
325
+
326
+ **The summary of your artifacts.** The same reply carries `espaces` — the summary Claude Code writes to
327
+ `~/.feedzy/espaces.json` (`FEEDZY_ESPACES_FILE` overrides the path) when you ask it to (the `mes-espaces` recipe):
328
+ `{ v: 1, at, accueil: { nom, url }, espaces: [{ id, nom, code, url, aToi, aTrancher, projets: [{ id, nom }] }],
329
+ questions: [{ id, titre, url, espace, genre, at }] }`. Same rules as the quota: re-read only when its date changes, a
330
+ half-written file keeps the previous summary, never over 256 KiB, every unknown field dropped — and an address is kept
331
+ only if it is a claude.ai ARTIFACT address. The extension keeps the most recent one of all its bridges and shows your
332
+ spaces, their projects and the questions waiting for you on the home of its side panel. Never on the open `/ping`.
333
+
334
+ **A space you open writes its own piece** (`POST /espace`). When one of your spaces is open at its own address, the
335
+ extension checks the page is that space and hands its piece — `{ id, nom, code, url, aToi, aTrancher, projets,
336
+ questions, conversations, at }`, the shape the recipe writes to `~/.feedzy/espaces.d/<id>.json` — to the bridge, which
337
+ writes it next to the summary and rebuilds `espaces.json` exactly as the recipe does (every piece, then the spaces of the
338
+ previous summary that have no piece, its `accueil`, 64 questions, one title per conversation). The proof is the one of
339
+ `/lancer` under its own prefix (`feedzy-espace:` + nonce + port + timestamp + sha256 of the exact body; a nonce is
340
+ accepted once); the body is read only after it, 256 KiB at most. The bridge never creates a space: an id that neither the
341
+ pieces nor the summary know, or another address under that id, is `inconnu` (409). The space's `depots` stay those the
342
+ recipe wrote. A piece older than the one on disk is `perime` (409), the same date writes nothing (`deja`), a summary
343
+ that would exceed 256 KiB is `trop_grand` (413) and nothing is written, and a piece of a space whose piece was written
344
+ less than a second ago is `garde` (429 — the extension keeps it for its next pass). A pushed piece speaks only for its
345
+ space: no date in it is later than its own, a conversation another piece already names and a question id another piece
346
+ already has are dropped, and in the rebuilt summary the other spaces' questions and conversations keep their places
347
+ first. `/lancer` and `/espace` each keep their own memory of seen nonces, so a burst on one never evicts the other's.
348
+
349
+ ### Publishing in the Fil — three local paths (FZ-160)
350
+
351
+ A script, a watcher or an agent can put an entry in the human's Fil — the stream of what each source has to say — without a
352
+ Feed of its own. One strict shape for all three paths ([`shared/core/entree-forme.js`](../shared/core/entree-forme.js)):
353
+
354
+ ```json
355
+ {
356
+ "source": "Release watch",
357
+ "kind": "to_know",
358
+ "title": "Node 24.2 is out",
359
+ "text": "…",
360
+ "link": "https://…",
361
+ "key": "node"
362
+ }
363
+ ```
364
+
365
+ `kind` is `for_you` (asks the human for a gesture), `in_progress` or `to_know`; `at` and `expires` take milliseconds or an ISO
366
+ date; the same `key` updates the entry in place. Unknown fields are refused, lengths are cut (`truncated`), every text goes
367
+ through the same guard as the rest (data, never instructions). Bridge mode only.
368
+
369
+ - **`feedzy_publier`** — the MCP tool, for an agent.
370
+ - **`POST /publier`** — for a script. The token is `~/.feedzy/entrees/.jeton` (created when the server starts, the same for
371
+ every server on this machine; it is not the extension's token), sent as `Authorization: Bearer <token>`. A request with an
372
+ `Origin` header is refused: a web page cannot publish. Find a port by scanning 51490-51499, then 51483-51489 and
373
+ 51500-51512, for a `GET /ping` that answers `"publier": true`; a `503` means that server's extension is away — try the next.
374
+ - **A JSON file in `~/.feedzy/entrees/`** — no token, no port. A server whose extension is there takes it within 5 s (once,
375
+ even with several servers); a refused file leaves `<name>.refus` with the reason. 16 KiB at most.
376
+
377
+ The first entry of a new source waits in the extension until the human accepts it, once (`status: "pending"`); 100 entries a
378
+ day per source; a source the human cut is refused (`source_cut`, `403`). The extension decides all three.
379
+
380
+ **One line from a script (FZ-219)** — the package does the three paths for you, bridge first, the folder as fallback:
381
+
382
+ ```bash
383
+ npx @feedzy/mcp publier --source "Release watch" --kind to_know --title "Node 24.2 is out" --link https://nodejs.org --key node
384
+ echo '{"source":"Release watch","kind":"to_know","title":"Node 24.2 is out"}' | npx @feedzy/mcp publier
385
+ ```
386
+
387
+ Flags: `--source --kind --title --text --link --at --expires --key`; `--json` reads the entry from standard input (also the
388
+ default when no flag is given), flags win over it. The command checks the shape first, finds a bridge that answers
389
+ `"publier": true`, skips a `503`, and, when no bridge can take the entry, leaves it in `~/.feedzy/entrees/` (it says so, and
390
+ where the `.refus` would be). stdout is one JSON line (`{ ok, via: "pont" | "dossier", id, status }`), stderr the reason in
391
+ plain words. Exit code: `0` delivered (or left in the folder) · `1` bad usage or shape · `2` refused by Feedzy (source cut,
392
+ token) · `3` nothing could be delivered · `4` a Max Cloud feature: on the Free plan nothing is published.
393
+
394
+ ### The six routines (FZ-162, FZ-293)
395
+
396
+ Work that comes back on its own and publishes in your Fil through the same door, as a source like any other: your extension
397
+ asks you once to accept it, and you can cut it at any time.
398
+
399
+ | Routine | When | AI | What it publishes |
400
+ | ---------- | ----- | --- | --------------------------------------------------------------------------------------------- |
401
+ | `matin` | 08:00 | yes | your day: what to decide first, what is ready to go — and at most ONE « for you » |
402
+ | `veille` | 08:00 | no | a new Node LTS or Claude Code release (once per version) — `nodejs.org`, `registry.npmjs.org` |
403
+ | `services` | 08:00 | no | one line per service from the command you give it, and a « for you » per alert |
404
+ | `point` | 13:00 | yes | where each project stands |
405
+ | `actus` | 13:00 | yes | the tools spotted in the AI news you chose (`actus.sources`), added to the tool candidates |
406
+ | `soir` | 18:00 | yes | what got done today (task queue and today's commits), what is left |
407
+
408
+ ```bash
409
+ npx @feedzy/mcp routine veille # run one now
410
+ npx @feedzy/mcp routines # the six, their time and their measured cost
411
+ npx @feedzy/mcp routines mesurer ia # run the AI ones once, publish nothing, keep their cost
412
+ npx @feedzy/mcp routines installer all # Windows Task Scheduler, folder "Feedzy.ai" (an AI routine needs its measure)
413
+ npx @feedzy/mcp routines retirer all
414
+ npx @feedzy/mcp routines mesurer-cloud all # PC off: measure matin, point, soir for the cloud (on this PC)
415
+ npx @feedzy/mcp routines installer-cloud all # then run them as claude.ai routines, through the online relay
416
+ npx @feedzy/mcp routines retirer-cloud all # pause them there
417
+ ```
418
+
419
+ - **Where they run.** On your PC, from the Windows Task Scheduler, while you are signed in to Windows — nothing else needs to
420
+ be open. Install them from a stable path (the scheduler runs the same `node` and script that installed them). Elsewhere, run
421
+ `feedzy-mcp routine <name>` from cron.
422
+ - **PC off: in the cloud (Max Cloud).** `matin`, `point` and `soir` can run as claude.ai routines (`/schedule`): they read
423
+ your Feeds through the online relay (the Feedzy connector, `https://mcp.feedzy.ai/mcp`, connected in claude.ai first)
424
+ and publish with its `feedzy_publier`, which drops the entry in a box only your extension opens — through the same door
425
+ (accept, cut, the daily limit). `soir` does not see your commits there: what got done is the Feeds of the day. `veille`,
426
+ `services` and `actus` read what only your PC has: they stay on it. `installer-cloud` asks your Claude Code (Haiku, the
427
+ `RemoteTrigger` and `Skill` tools only) to create the routine; `retirer-cloud` pauses it (the API deletes nothing: do it on
428
+ https://claude.ai/code/routines). Not installed until measured FOR THE CLOUD: the cloud does not tell what a run costs, so
429
+ `mesurer-cloud` runs the same prompt on this PC with the same Feedzy tools (this package's own server), publishing
430
+ nothing, and keeps its cost apart (`_cloud` in `mesures.json`). Kept in `~/.feedzy/routines/cloud.json`: the routine ids.
431
+ - **AI routines** make ONE `claude -p` call to your own Claude Code (`--safe-mode`, no tools, no MCP server, nothing kept in
432
+ your conversations): the routine reads your task queue (`~/.feedzy/espaces.json`) and, for `soir`, today's commit subjects
433
+ of your repositories (`FEEDZY_DEPOTS`), and hands them to Claude framed as data. Model per routine: `modeles` in
434
+ `~/.feedzy/routines/config.json` (`sonnet` by default, `haiku` for `actus`).
435
+ - **Their cost, in % of your window.** Claude Code tells the usage of your window to the percent, not what one call takes.
436
+ The calibration: what your Claude Code logs cost since the window started (API prices, cache included) divided by its
437
+ usage. Usage outside Claude Code (claude.ai) counts in the window and not in the logs, so the figure is too HIGH, never
438
+ flattering. Measured on 3/11/2026: `matin` ≈ 0.0005 %, `point` ≈ 0.0009 %, `soir` ≈ 0.001 % of the week per run.
439
+ - **A source you have not accepted costs one run, a cut one none.** Before calling Claude, the routine publishes « … in
440
+ progress » under today's key: the door answers `queued`, `pending` or `source_cut`. Cut: no call. Pending with a measure:
441
+ today's entry says « waits for your approval » with its cost, no call. Through the folder (no bridge) the door says nothing: the bridge's last answer decides, and with none the routine waits.
442
+ - **Actus IA** reads nothing until you list its sources in `actus.sources` of `~/.feedzy/routines/config.json` (the catalogue:
443
+ `showhn`, `simonw`, `latent`). It reads the posts of the last two days it has not read yet, masks and defuses them, and
444
+ makes ONE call; a tool is kept only if its source is an address found in what was read. Its candidates sit between your
445
+ own (`veille.enAvant`) and GitHub's in `outils-candidats.json`. Measured on 5/11/2026: ≈ 0.0007 % of the week on an
446
+ ordinary day with `sonnet`, ≈ 0.0001 % with `haiku`, its default. A day without new posts makes no call.
447
+ - **Services** runs `services.commande` from `~/.feedzy/routines/config.json` (an argv array) and reads
448
+ `{ sources: { name: { etat, … } }, alertes: [{ source, texte, quoi }] }` from its stdout.
449
+ - `~/.feedzy/routines/`: `config.json` (yours), `etat.json` (versions already announced, the door's last answer),
450
+ `mesures.json` (the cost of each AI routine, and the calibration: dollars and calls of your logs — numbers only).
451
+ `FEEDZY_ROUTINES_DIR` replaces it, `FEEDZY_CLAUDE` names the Claude Code binary (default: the newest one of the VS Code
452
+ extension, else `claude`). Exit code: `0` done · `1` bad usage or nothing to read · `2` source cut · `3` Claude Code did
453
+ not answer · `4` a Max Cloud feature: on the Free plan `routine`, `routines mesurer` and `routines installer` run nothing
454
+ (the list and `routines retirer` stay free).
455
+
456
+ ## Compatibility — the extension × this package
457
+
458
+ The extension (Chrome Web Store, updates itself) and this package (npm, updates when your client fetches it)
459
+ ship through two channels, at different times: every combination below exists on someone's machine. **0.2.0 is
460
+ the first version with decision sheets** (`feedzy_ask`, `feedzy_await_answers`). 0.1.0 never reached npm, but
461
+ tarballs of it circulated; "0.1.0" below is the package as it stood just before the decisions — an older 0.1.0
462
+ tarball may lack more than this table says. "Extension without sheets" is a build that does not announce the
463
+ `decisions` capability.
464
+
465
+ Every case is a test in [`test/decisions.test.mjs`](./test/decisions.test.mjs), block `MATRICE DE
466
+ COMPATIBILITÉ` (test names quoted below), and each one also carries a Feed from a public form.
467
+
468
+ | Mode | Extension | `@feedzy/mcp` | What you get | Guarded by |
469
+ | ------ | -------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
470
+ | folder | with sheets | ≥ 0.2.0 | Everything: `feedzy_ask` posts a form in the thread, the human ticks, `feedzy_await_answers` returns the answers and **seals** them ("Read by the agent"). | `DOSSIER · extension APRÈS × MCP APRÈS` |
471
+ | folder | without sheets | ≥ 0.2.0 | The sheet shows as an ordinary AI bubble whose text carries the questions and options; the human answers in prose → `replied_in_text`, nothing is sealed. `feedzy_ask` says `capability: "unknown"` for that reason: a folder cannot tell which extension will read it. | `DOSSIER · extension AVANT × MCP APRÈS` |
472
+ | folder | with sheets | 0.1.0 | No `feedzy_ask` / `feedzy_await_answers`, nothing seals. A sheet posted by another, newer agent and answered in the form reads as text (`Which database? → SQLite`); the Feed comes back in `awaiting: "agent"`, and after 5 minutes the extension says the agent has not read the answer. | `DOSSIER · extension APRÈS × MCP AVANT` |
473
+ | folder | without sheets | 0.1.0 | As before the decisions. Once both are updated, the old folder is read with no counts, no seal, and nothing written to it. | `DOSSIER · extension AVANT × MCP AVANT, puis les deux mis à jour` |
474
+ | bridge | with sheets | ≥ 0.2.0 | Everything, through the bridge queue: the extension posts the sheet, the seal goes back through the queue. | `PONT · extension APRÈS × MCP APRÈS` |
475
+ | bridge | without sheets | ≥ 0.2.0 | `feedzy_ask` refuses up front ("update the extension") and queues nothing; `get` seals nothing. That extension never receives the queue anyway: it polls with a `GET`, which Chrome sends without `Origin` → 403, so none of the agent's writes are applied until it is updated. | `PONT · extension AVANT × MCP APRÈS` |
476
+ | bridge | with sheets | 0.1.0 | ⚠️ **Open — only running ≥ 0.2.0 closes it.** The snapshot is accepted (0.1.0 drops `caps`), but the extension polls `POST /mutations`, which 0.1.0 does not serve: **404, and none of the agent's writes (resolve, comment, plan, create) are applied.** Before the decisions it was a 403 instead — no write ever reached the extension in bridge mode with 0.1.0. The loop keeps running; nothing says it. | `PONT · extension APRÈS × MCP AVANT` |
477
+ | bridge | without sheets | 0.1.0 | The snapshot passes, the queue never does (`GET` without `Origin` → 403) — the defect that only both updates close. | `PONT · extension AVANT × MCP AVANT` |
478
+
479
+ Outside the matrix:
480
+
481
+ | Case | What you get | Guarded by |
482
+ | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
483
+ | A team on mixed extension versions | A teammate without sheets sees the sheet as text and answers in prose (`replied_in_text` for the agent); the others see the form. | `DOSSIER · extension AVANT × MCP APRÈS` |
484
+ | A Feed from a public form (`wdem_…`), any row with 0.2.0 | `feedzy_ask` refuses with `feed_widget` before writing or queueing anything; a sheet forced onto such a Feed by a peer never enters the state — no form, no ❓ badge. | the widget Feed of each case above, and `⭐ REFUS DU WIDGET` (folder and bridge) |
485
+ | The hosted relay and the web dashboard (Max) | Both know decision sheets: the relay has `feedzy_ask` / `feedzy_await_answers` (it seals with its own identity), the dashboard answers in the bubble. See the table below. | not in this package — read in the server's code (its relay tests) |
486
+
487
+ **Which version am I running?** It is announced in the MCP handshake (`serverInfo.version`, which your client
488
+ shows) and on the bridge's `/ping` — both read from this package's `package.json`, never from a copy
489
+ ([`test/version.test.mjs`](./test/version.test.mjs)). To move to the latest: `npx -y @feedzy/mcp@latest`.
490
+
491
+ **From the source vs. from npm.** `node mcp/src/index.js` imports the extension's `shared/core` directly: it
492
+ follows your checkout commit by commit, and is "after" exactly when your checkout is. The npm bundle freezes
493
+ those files at build time — an extension updated later may know fields this package ignores, which is the
494
+ "extension with sheets × 0.1.0" situation again, one version further on.
495
+
496
+ ## The hosted relay (Max) — local ↔ relay
497
+
498
+ The hosted relay (the server's `apps/mcp`, the URL claude.ai and other remote agents connect to) serves **the same
499
+ tools** as this package, except `feedzy_publier`: an entry of the Fil is published locally only (FZ-160). Their titles, descriptions and server instructions have **one writing**,
500
+ [`shared/core/outils-mcp.js`](../shared/core/outils-mcp.js): what holds on one side only is written there, next to the
501
+ rest — never copied, never simulated. Their **schemas** are two copies (zod cannot ride in the shared core), kept equal
502
+ field by field: this package freezes what its real server announces in [`contrat-outils.json`](./contrat-outils.json)
503
+ (`npm run contrat`, checked by [`test/contrat.test.mjs`](./test/contrat.test.mjs)), the shared core carries it to the
504
+ server repository (`npm run events:sync`, under the core's fingerprint), and a relay test fails on any difference the
505
+ relay has not declared.
506
+
507
+ | Tool / feature | This package (folder or bridge) | Hosted relay |
508
+ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
509
+ | `feedzy_list_feedback` | ✓ — `project` is the Dossier's name, `dossierId` its id, `projectState` its chosen state (`paused` or `finished`, inherited; absent while in progress — FZ-229) | ✓ — the same since the relay knows the Dossier tree (R1): the name, the id, and the `project` filter takes either; `projectState` too (FZ-287) |
510
+ | `feedzy_get_feedback` | ✓ + `contexte` (`knownContexte`, `rappel`) + `sent` (bridge mode) | ✓ + `contexte` (`knownContexte`, `rappel` — the same rule as this package, since R1), without `sent` — **said** in its description |
511
+ | `feedzy_get_screenshot` | ✓ inline captures | ✓ inline captures, **and** the ones stored encrypted in object storage (fetched, decrypted, 3 per call) |
512
+ | `feedzy_plan` | ✓ — `role` and `model` per step; the human's model choice comes back in `feedzy_get_feedback` | ✓ — the relay edits **its own** plan, never another agent's; it keeps and returns roles, models and the human's choice (handing a step to a subagent is a Claude Code feature) |
513
+ | `feedzy_view` | ✓ (bridge mode: an extension that announces `vues`); without `id`, the Feed of this conversation; `source` kept | ✓ — one bubble per key, updated in place, on the team's encrypted stream; `id` required (no Claude Code conversation); `source` kept, never re-read by the relay |
514
+ | `feedzy_propose_link` | ✓ (bridge mode: an extension that announces `liens`, which checks it again before writing) | ✓ — only in a Dossier shared with the relay, or one of its sub-Dossiers; `par` is `Agent` |
515
+ | `feedzy_set_project_section` | local only (FZ-254) — folder mode writes it; bridge mode: an extension that announces `contexte`, which merges the section into the real context |
516
+ | `feedzy_move_feedback` | ✓ — folder mode writes `demande.project_set`; bridge mode: an open side panel that announces `ranger` (the worker does not), which moves it through "Move" | ✓ — only inside the project shared with the relay that holds it now (to one of its sub-projects, or back to it), written under its key; elsewhere refused (FZ-316) |
517
+ | `feedzy_create_space` | ✓ — folder mode writes the space file (`espaces.d/<id>.json`, with its code), `dossier.created` and `projectdoc.set`; bridge mode: an open side panel that announces `espace-neuf` (the root comes down by "la descente", the context is set by the `creerEspace` door once it exists; re-filed until seen) | ✗ — not on the hosted relay |
518
+ | `feedzy_ask` | ✓ (bridge mode: an extension that announces `decisions`) + an `image` per choice (FZ-203: a file of this computer or its bytes in `data`; an extension that announces `images-agent`) | ✓ + `signal`: the server was told a decision is waiting, so it can alert the human (push, opt-in e-mail) + an `image` per choice, its bytes in `data` (FZ-250: it cannot read the human's files; 1 MiB per sheet) |
519
+ | `feedzy_await_answers` | ✓ + `not_posted` / `extension_unreachable` (bridge mode) | ✓ — the waiting budget lives per relay process |
520
+ | `feedzy_resolve` | ✓ + `change` | ✓ + `change` |
521
+ | `feedzy_comment` | ✓ + `report` (FZ-152: steps for the human, next prompts; bridge mode: an extension that announces `comptes-rendus`, else folded into the text) + `images` (FZ-203: up to 6 images, files of this computer read by this server or their bytes in `data`; an extension that announces `images-agent`); `feedzy_plan` returns `replies` | ✓ + `report` (FZ-199: the same gate, written into the journal; read back since FZ-209 — `feedzy_get_feedback` returns `report`, `stepsDone`, `stepsLeft`); `feedzy_plan` returns `replies`; `images` with their bytes in `data` (FZ-250: a `path` is refused, 1 MiB per message) |
522
+ | `feedzy_create_feedback` | ✓ — any Dossier, or the root; + `task` (FZ-155: the Feed IS a task of a space, its id from it, filed once) | ✓ no `task` — into a Dossier shared with the relay as a whole **or one of its sub-Dossiers** (R1), written under the key of the shared Dossier that covers it: the only one by default, else `dossierId`; otherwise refused, with the ids (and names) it can use |
523
+ | Writing on a Feed of a team that shares several Dossiers | — (the extension picks the key) | ✓ since R1 — under the key of the shared Dossier that covers the Feed's filing; a Feed whose events reached the relay under a Dossier its filing does not explain (moved between two shared Dossiers, or a forged filing) is refused for writing — reading still works |
524
+ | The Claude Code conversation link | Every tool that touches a Feed links the Claude Code conversation that called it; the card reopens it | ✗ — there is no Claude Code session behind claude.ai (said in its instructions) |
525
+ | `sent` ("Ce qui part") | Bridge mode: the prompt the human reviewed and sent from Feedzy | ✗ — only the local bridge receives it |
526
+ | Claude subscription quota | Bridge mode: read from the Feedzy plugin's file, returned to the extension for its footer | ✗ — not a tool; it belongs to the local bridge |
527
+
528
+ ## Roadmap
529
+
530
+ - **v0:** local stdio, solo, BYOS folder. _Free._ — **done.**
531
+ - **v1:** drain the LIVE queue by proxying your running extension (ZK-intact). _Free — no account._ — **done** (extension push + mutation drain + Contexte cascade). Signing in is what makes that queue a **team** queue; it is not what makes the bridge work.
532
+ - **v2:** hosted **cloud** MCP (from anywhere) behind a **Max** license, opt-in + badged. _Max._
533
+
534
+ ## Develop
535
+
536
+ ```bash
537
+ npm install # also builds dist/index.js (prepare)
538
+ npm test # builds, then every test file named in package.json: folder round-trip (real crypto) + Contexte cascade + MCP protocol e2e + team bridge (incl. the extension's own push/poll loop driven against this server) + decisions (ask / await / sealing, both modes, on an injected clock) + publish preflight + the version the server and `/ping` announce (one source: package.json)
539
+ npm run build # bundle src/* + the extension's shared/core into a standalone dist/index.js (npx-ready)
540
+ npm run preflight # pre-publication check — verifies, never publishes (see PUBLISHING.md)
541
+ ```
542
+
543
+ The bundle inlines the extension's `shared/core/*` crypto + reducer (kept in
544
+ lockstep); `@modelcontextprotocol/sdk` + `zod` stay as installed dependencies.
545
+
546
+ **Publishing this package?** Everything you need — the preflight, the npm org, the exact
547
+ commands and what to do when one fails — is in [`PUBLISHING.md`](./PUBLISHING.md)
548
+ (French; maintainer-only, not shipped in the tarball).