klypix-mcp 1.49.2 → 1.50.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.
package/A2A.md CHANGED
@@ -1,4 +1,4 @@
1
- # KLYPIX speaks A2A
1
+ # KLYPIX speaks A2A protocol v0.3.0
2
2
 
3
3
  KLYPIX is the **shared, human-owned memory node** for a multi-agent stack.
4
4
  **A2A moves the messages between agents; `.klypix` holds the context they read
@@ -23,11 +23,13 @@ KLYPIX_VAULT=./canvases KLYPIX_A2A_PORT=41241 npx -p klypix-mcp klypix-a2a
23
23
  ```
24
24
 
25
25
  Flags / env: `--vault` (`KLYPIX_VAULT`), `--port` (`KLYPIX_A2A_PORT`, default
26
- `41241`), `--host` (`KLYPIX_A2A_HOST`, default `127.0.0.1`).
26
+ `41241`), `--host` (`KLYPIX_A2A_HOST`, loopback only), and
27
+ `--allow-cross-project` (opt in to machine-wide registered-brain search).
27
28
 
28
- It is **local-first**: it binds loopback and needs no auth, because the file
29
- lives on your disk. To expose it, set `--host 0.0.0.0` behind a reverse proxy
30
- that terminates TLS and adds authentication.
29
+ It is **local-only**: it binds loopback and needs no auth because callers are on
30
+ the same machine. Non-loopback `--host` values are refused. Remote exposure is
31
+ unsupported until authentication, TLS, a real identity model, and cross-process
32
+ write coordination exist together.
31
33
 
32
34
  ## Discover it
33
35
 
@@ -45,13 +47,13 @@ the skills below.
45
47
  | Skill `id` | Does | Returns |
46
48
  |---|---|---|
47
49
  | `make_board` | Create a new `.klypix` from cards + connections | a `.klypix` **FilePart** + summary |
48
- | `remember` | Append cards/decisions to an existing canvas (positions preserved) | the updated `.klypix` |
49
- | `learn_skill` | Capture a reusable how-to / gotcha as a 🛠 skill card — resurfaces every session | the updated `.klypix` |
50
+ | `remember` | Append cards/decisions to an existing canvas (positions preserved) | result summary; flat card appends also return a `.klypix` FilePart |
51
+ | `learn_skill` | Capture a reusable how-to / gotcha as a 🛠 skill card — resurfaces every session | result summary |
50
52
  | `recall` | Search card text/titles/`#tags` across the vault | matching cards (text) |
51
53
  | `read_canvas` | Read one canvas (cards, graph, `[[links]]`) + its images | markdown + image FileParts |
52
54
  | `list_canvases` | List canvases with counts | text |
53
55
  | `brain_insights` | Hubs / orphans / stale questions in a brain | text |
54
- | `search_all_brains` | Cross-project memory search (semantic + lexical) | text |
56
+ | `search_all_brains` | Cross-project memory search (semantic + lexical); advertised only with `--allow-cross-project` | text |
55
57
  | `brain_connect` | Find and draw related-but-unlinked cards (proposes before it applies) | text |
56
58
 
57
59
  ## Talk to it (JSON-RPC 2.0)
@@ -86,7 +88,8 @@ POST /
86
88
 
87
89
  The result is an A2A `Task` whose `artifacts[0].parts` contains a
88
90
  `{ kind: "file", file: { mimeType: "application/vnd.klypix+zip", bytes } }` — the
89
- board itself.
91
+ board itself. If `configuration.acceptedOutputModes` excludes that MIME type,
92
+ the server honors the negotiation and does not send the FilePart.
90
93
 
91
94
  **Free-text invocation** — a plain message is routed by intent (a convenience
92
95
  for chat-style callers):
@@ -109,11 +112,27 @@ server resumes it with a stable id and accumulated history).
109
112
  returns a terminal `Task`. `message/stream` emits a **monotonic** lifecycle in
110
113
  one burst — a non-terminal `Task` (`submitted`), then (for completed work) an
111
114
  `artifact-update`, then exactly one terminal `status-update` with `final:true`.
112
- - The server binds loopback and exposes no auth; the A2A face additionally
113
- refuses any `canvas` reference that resolves **outside the vault** (absolute or
114
- `..` paths), even though the underlying engine would allow it for the trusted
115
- MCP/stdio caller.
116
- - Provenance: writes are stamped with the calling agent's name when supplied via
117
- `message.metadata.agentName` (or a `DataPart` `agentName`), else `a2a`.
118
- - The A2A and MCP faces share one engine (`src/klypix-core.mjs`); neither can
119
- corrupt the other, and both operate only on the `.klypix` files in the vault.
115
+ - The server validates the request `Host`, rejects foreign browser `Origin`
116
+ headers, accepts only `application/json` POST bodies (maximum 1 MiB), and emits
117
+ no permissive CORS header. The Agent Card and health endpoint do not disclose
118
+ the local vault path.
119
+ - For every caller-supplied canvas reference — including a path supplied in a
120
+ text part — the server resolves the effective target once, follows symlinks,
121
+ and refuses it if the resulting file is outside the configured vault. The
122
+ project brain selected by the operator's launch `cwd` remains a separate,
123
+ intentional default for brain-specific operations.
124
+ - Provenance is a claim, not authentication: supplied agent names are bounded,
125
+ slugged, and stamped as `a2a:<name>` so they cannot render like an attested
126
+ local `createdVia` identity.
127
+ - `search_all_brains` is absent from the default Agent Card and rejected unless
128
+ the operator starts the server with `--allow-cross-project`; it intentionally
129
+ reads the machine-wide brain registry and cannot be made vault-scoped.
130
+ - A2A writes are serialized **within the server process only**. The desktop app,
131
+ hooks, and other processes are not coordinated by that lock. Any move off
132
+ loopback or to concurrent multi-process callers requires the shared
133
+ cross-process lock first. Do not describe this as conflict-free or lossless
134
+ across processes.
135
+ - A2A does not provide `brain_sync`, presence registration, `brain_message`, or
136
+ `brain_garden` apply. HTTP has no reliable session-close lifecycle for presence,
137
+ messaging would be send-only, and garden's out-of-band human approval gate must
138
+ not be weakened for protocol symmetry.
package/README.md CHANGED
@@ -435,20 +435,21 @@ echo '{ "title": "Plan", "cards": [{ "text": "kickoff" }] }' \
435
435
  | npx -p klypix-mcp klypix-write --out plan.klypix
436
436
  ```
437
437
 
438
- ## Also speaks A2A (Agent-to-Agent) — experimental
438
+ ## Also speaks A2A protocol v0.3.0 — experimental
439
439
 
440
440
  ```bash
441
441
  npx -p klypix-mcp klypix-a2a --vault ./canvases # 127.0.0.1:41241
442
442
  # Agent Card: http://127.0.0.1:41241/.well-known/agent-card.json
443
443
  ```
444
444
 
445
- Nine skills: `make_board`, `remember`, `learn_skill`, `recall`, `read_canvas`, `list_canvases`,
446
- `brain_insights`, `search_all_brains`, `brain_connect`. Unlike a typical A2A agent that returns
447
- text, KLYPIX returns the `.klypix` board itself as a multimodal artifact. Details:
445
+ Eight vault/project skills by default: `make_board`, `remember`, `learn_skill`, `recall`,
446
+ `read_canvas`, `list_canvases`, `brain_insights`, `brain_connect`. Machine-wide
447
+ `search_all_brains` is a ninth, explicit opt-in via `--allow-cross-project`. Unlike a typical A2A
448
+ agent that returns text, KLYPIX returns the `.klypix` board itself as a multimodal artifact. Details:
448
449
  [A2A.md](A2A.md).
449
450
 
450
- Treat this as a preview: the A2A smoke test is not in the default `npm test` chain, and it has not
451
- been exercised against a third-party A2A client.
451
+ Treat this as a preview: the adversarial A2A smoke test runs in the default `npm test` chain, but
452
+ the server has not been exercised against a third-party A2A client.
452
453
 
453
454
  ## Updates — the propagation contract
454
455