@tpsdev-ai/flair 0.57.0 → 0.59.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 (143) hide show
  1. package/README.md +7 -6
  2. package/SECURITY.md +4 -1
  3. package/config.yaml +3 -0
  4. package/dist/build-info.json +3 -3
  5. package/dist/cli.js +1726 -376
  6. package/dist/commands/agent.js +160 -2
  7. package/dist/commands/doctor.js +177 -27
  8. package/dist/commands/federation.js +2 -1
  9. package/dist/commands/hook.js +10 -2
  10. package/dist/commands/init.js +150 -44
  11. package/dist/commands/mcp.js +53 -22
  12. package/dist/commands/memory.js +24 -2
  13. package/dist/commands/quality.js +26 -18
  14. package/dist/commands/service.js +137 -22
  15. package/dist/commands/status.js +114 -3
  16. package/dist/commands/upgrade.js +204 -84
  17. package/dist/doctor-client.js +50 -4
  18. package/dist/federation/scheduler.js +253 -4
  19. package/dist/install/clients.js +89 -23
  20. package/dist/install/global-bin-path.js +26 -6
  21. package/dist/lib/atomic-write.js +256 -0
  22. package/dist/lib/daemon-liveness.js +103 -0
  23. package/dist/lib/doctor-run.js +72 -0
  24. package/dist/lib/embed-gpu-doctor.js +49 -26
  25. package/dist/lib/federation-memory-attributes.js +15 -0
  26. package/dist/lib/flair-agent-role.js +116 -0
  27. package/dist/lib/init-admin-pass.js +4 -2
  28. package/dist/lib/init-listener-environ.js +38 -0
  29. package/dist/lib/init-occupied-listener.js +165 -0
  30. package/dist/lib/launchd-domain-preflight.js +448 -0
  31. package/dist/lib/launchd-management.js +179 -8
  32. package/dist/lib/launchd-repair.js +95 -0
  33. package/dist/lib/mcp-enable.js +667 -72
  34. package/dist/lib/memory-attributes.js +77 -0
  35. package/dist/lib/node-alias-path.js +95 -0
  36. package/dist/lib/npm-registry.js +119 -6
  37. package/dist/lib/owned-pins.js +20 -6
  38. package/dist/lib/process-start-time.js +32 -0
  39. package/dist/lib/service-repoint-apply.js +267 -0
  40. package/dist/lib/service-repoint.js +575 -0
  41. package/dist/lib/toml-string-array.js +104 -0
  42. package/dist/lib/tree-divergence.js +716 -0
  43. package/dist/lib/upgrade-plain-tree.js +18 -8
  44. package/dist/lib/upgrade-prior-liveness.js +69 -0
  45. package/dist/lib/upgrade-rollback.js +116 -0
  46. package/dist/rem/runner.js +11 -0
  47. package/dist/resources/Agent.js +54 -21
  48. package/dist/resources/AgentSeed.js +44 -1
  49. package/dist/resources/Federation.js +84 -54
  50. package/dist/resources/Memory.js +567 -72
  51. package/dist/resources/MemoryArchive.js +9 -0
  52. package/dist/resources/MemoryBootstrap.js +125 -29
  53. package/dist/resources/MemoryFeed.js +204 -3
  54. package/dist/resources/MemoryHostSource.js +90 -0
  55. package/dist/resources/MemoryMaintenance.js +121 -32
  56. package/dist/resources/MemoryReflect.js +4 -1
  57. package/dist/resources/MemoryReindex.js +7 -4
  58. package/dist/resources/MemoryUsage.js +53 -3
  59. package/dist/resources/OrgSkillAssignment.js +209 -0
  60. package/dist/resources/Presence.js +18 -10
  61. package/dist/resources/RecordUsage.js +30 -40
  62. package/dist/resources/Relationship.js +167 -78
  63. package/dist/resources/SemanticSearch.js +19 -6
  64. package/dist/resources/Soul.js +31 -19
  65. package/dist/resources/XAA.js +47 -14
  66. package/dist/resources/agent-auth.js +16 -10
  67. package/dist/resources/agent-status-guard.js +63 -0
  68. package/dist/resources/auth-middleware.js +137 -49
  69. package/dist/resources/auto-promote-lib.js +4 -4
  70. package/dist/resources/bm25-index-service.js +246 -32
  71. package/dist/resources/bm25-status.js +132 -0
  72. package/dist/resources/ed25519-auth.js +11 -54
  73. package/dist/resources/embed-gpu.js +262 -47
  74. package/dist/resources/embeddings-boot.js +52 -17
  75. package/dist/resources/federation-classify.js +34 -0
  76. package/dist/resources/federation-crypto.js +65 -19
  77. package/dist/resources/flair-agent-role-boot.js +26 -0
  78. package/dist/resources/health.js +67 -16
  79. package/dist/resources/host-pointer/registry.js +35 -0
  80. package/dist/resources/host-pointer-adapter.js +15 -0
  81. package/dist/resources/host-source-visibility.js +167 -0
  82. package/dist/resources/host-source.js +151 -0
  83. package/dist/resources/instance-identity.js +3 -2
  84. package/dist/resources/key-lock.js +31 -0
  85. package/dist/resources/mcp-handler.js +147 -51
  86. package/dist/resources/mcp-oauth.js +3 -6
  87. package/dist/resources/mcp-tools.js +47 -25
  88. package/dist/resources/memory-consolidate-lib.js +3 -1
  89. package/dist/resources/memory-declared-attributes.js +103 -0
  90. package/dist/resources/memory-feed-lib.js +5 -1
  91. package/dist/resources/memory-host-source.js +163 -0
  92. package/dist/resources/migrations/synthetic-test-migration.js +4 -1
  93. package/dist/resources/migrations/visibility-backfill.js +4 -1
  94. package/dist/resources/multi-worker-guard.js +121 -0
  95. package/dist/resources/oauth-discovery.js +1 -0
  96. package/dist/resources/oauth-wellknown.js +8 -4
  97. package/dist/resources/originator-instance.js +235 -0
  98. package/dist/resources/promotion-stamp.js +2 -0
  99. package/dist/resources/provenance.js +111 -11
  100. package/dist/resources/record-owner-guard.js +19 -0
  101. package/dist/resources/record-type-kit.js +9 -12
  102. package/dist/resources/record-types.js +22 -6
  103. package/dist/resources/relay-ops.js +28 -3
  104. package/dist/resources/replay-store.js +336 -0
  105. package/dist/resources/request-transaction.js +78 -0
  106. package/dist/resources/search-readiness.js +19 -21
  107. package/dist/resources/semantic-retrieval-core.js +5 -1
  108. package/dist/resources/skill-manifest.js +181 -0
  109. package/dist/resources/skill-provenance.js +15 -10
  110. package/dist/resources/table-patch-policy.js +109 -0
  111. package/dist/resources/table-patches.js +17 -0
  112. package/dist/resources/table-post-policy.js +138 -0
  113. package/dist/resources/table-posts.js +22 -0
  114. package/dist/resources/table-subscription-policy.js +135 -0
  115. package/dist/resources/table-subscriptions.js +19 -0
  116. package/dist/resources/tool-descriptors/index.js +15 -15
  117. package/dist/resources/trust-block.js +10 -3
  118. package/dist/resources/usage-recording.js +169 -41
  119. package/dist/src/lib/flair-agent-role.js +116 -0
  120. package/dist/src/lib/memory-attributes.js +77 -0
  121. package/docs/access-control.md +667 -0
  122. package/docs/api-reference.md +85 -17
  123. package/docs/auth.md +4 -0
  124. package/docs/claude-code.md +132 -0
  125. package/docs/deepseek-harness.md +1 -1
  126. package/docs/deployment.md +1 -1
  127. package/docs/federation.md +1 -1
  128. package/docs/integrations.md +6 -6
  129. package/docs/mcp-clients.md +16 -24
  130. package/docs/notes/mcp-oauth-model2.md +15 -1
  131. package/docs/quickstart.md +5 -0
  132. package/docs/releasing.md +152 -20
  133. package/docs/supply-chain-policy.md +10 -5
  134. package/docs/troubleshooting.md +11 -0
  135. package/docs/upgrade.md +187 -61
  136. package/package.json +10 -5
  137. package/schemas/agent.graphql +9 -6
  138. package/schemas/federation.graphql +2 -11
  139. package/schemas/memory.graphql +137 -17
  140. package/schemas/oauth.graphql +8 -4
  141. package/schemas/replay.graphql +18 -0
  142. package/templates/launchd/start-flair-with-admin-pass.sh +95 -0
  143. package/dist/resources/federation-nonce-store.js +0 -195
@@ -14,21 +14,11 @@ If you've never set up Flair before, do step 1 first. If Flair is already runnin
14
14
 
15
15
  ## Step 1 — Install Flair (do once)
16
16
 
17
- ```bash
18
- # Install Flair globally
19
- npm install -g @tpsdev-ai/flair
20
-
21
- # Initialize the local Harper-backed server
22
- flair init
23
-
24
- # Provision an agent identity. Pick a name — typically per-project, per-purpose,
25
- # or "me" if you want one durable identity across everything.
26
- flair agent add my-project
27
- # → writes ~/.flair/keys/my-project.key (a raw 32-byte Ed25519 seed) and registers the agent
28
-
29
- # Sanity check
30
- flair status
31
- ```
17
+ Follow [the laptop quickstart](quickstart.md) through agent setup and
18
+ verification. Its `flair init --agent local` path creates the agent identity
19
+ and attempts to wire detected clients when wiring is enabled.
20
+ For the manual snippets below, replace `my-project` with the agent ID you
21
+ created (`local` if you followed the quickstart unchanged).
32
22
 
33
23
  > **`flair: command not found` right after installing?** Your npm global prefix's bin dir isn't on PATH (common with a user prefix like `~/.npm-global`) — run `export PATH="$(npm prefix -g)/bin:$PATH"`, persist that line in your shell profile, and `flair doctor` will print the exact line for your shell any time.
34
24
 
@@ -45,7 +35,7 @@ The snippets below are the **local** path. Flair also has a native `/mcp` endpoi
45
35
 
46
36
  Native `/mcp` is remote-only by design. The OAuth authorization server fetches client metadata over HTTPS and refuses private, loopback, and link-local hosts. `flair mcp enable` refuses localhost, loopback, RFC1918, IPv4 link-local, and `.local`. Set `FLAIR_MCP_OAUTH=true` — that is the one value that enables both Flair's `/mcp` route and the OAuth component. A loopback Flair cannot be the origin those clients dial. The stdio adapter is the local path because it speaks the instance's Ed25519 HTTP API and does not need that public origin.
47
37
 
48
- `flair init --agent <id>` attempts to wire detected local clients unless MCP wiring is disabled; bare `flair init` only initializes the instance. Turning on native `/mcp` is a separate operator step for a publicly reachable instance, documented from the API side in [api-reference.md](api-reference.md#mcp-tools).
38
+ `flair init --agent <id>` attempts to wire detected local clients unless MCP wiring is disabled; bare `flair init` only initializes the instance. Turning on native `/mcp` is a separate operator step for a publicly reachable instance, documented from the API side in [api-reference.md](api-reference.md#mcp-tools). Who can connect through native `/mcp`, and how to revoke access, is in [access-control.md](access-control.md).
49
39
 
50
40
  ---
51
41
 
@@ -306,25 +296,25 @@ Clients on this page talk to the stdio server `@tpsdev-ai/flair-mcp`. Its `tools
306
296
  | Tool | What it does |
307
297
  |---|---|
308
298
  | `memory_search` | Semantic search across the caller's own and other agents' non-private memories |
309
- | `memory_store` | Save a memory (type, durability, tags, visibility), attributed to the authenticated agent. Optional `usedMemoryIds` cites memories that informed the write |
299
+ | `memory_store` | Save a memory (type, durability, tags, visibility), under the configured agent ID, subject to server authorization. Optional `usedMemoryIds` cites memories that informed the write |
310
300
  | `skill_store` | Write a skill-tagged memory. `trigger` is the recall text; `content` is the procedure. Durability is forced to persistent, and SkillScan rejects a dangerous payload before embed |
311
301
  | `skill_search` | Rank skills by their trigger against a task. Returns a catalog (id, name, trigger, description, tags, agentId), not the procedure |
312
- | `skill_get` | Fetch one skill's full procedure by id. Own skills and shared skills only; a private skill owned by someone else is not returned |
302
+ | `skill_get` | Fetch one skill's full procedure by id. Non-admin callers can retrieve their own and other agents' non-private skills; administrators can also retrieve private skills |
313
303
  | `memory_update` | Update a memory by id. Overwrites in place, or pass `preserveHistory` to write a superseding version. Optional `usedMemoryIds` |
314
304
  | `memory_get` | Fetch a specific memory by ID |
315
- | `memory_delete` | Delete one of your own memories |
305
+ | `memory_delete` | Delete a memory by ID. Non-admin callers can delete only their own memories; administrators can also delete other agents' memories |
316
306
  | `relationship_store` | Assert a subject-predicate-object triple (for example "nathan manages flair"). Asserting the same triple again updates that row |
317
307
  | `bootstrap` | Session-start context: soul, memories, and predicted context. Pass `subjects` for predictive loading |
318
- | `soul_set` | Advertised as setting a soul entry. The server refuses runtime Soul writes, including this tool's Ed25519 call; operators use `flair soul set` |
308
+ | `soul_set` | Advertised as setting a soul entry. Verified administrator Basic credentials are accepted; Ed25519 agent calls, including this tool's, are refused. Operators use `flair soul set` |
319
309
  | `soul_get` | Get a soul entry |
320
310
  | `flair_workspace_set` | Set this agent's workspace state (ref, label, provider, task, phase, summary) in the Office Space |
321
311
  | `flair_orgevent` | Publish an org-wide coordination event (claim, release, or status), attributed to the caller |
322
312
  | `flair_catchup` | Drain this agent's own org-event catch-up feed. Page with `after`; advance the watermark with `ack` |
323
313
  | `record_usage` | Report that recalled memories were actually used (`memoryId` or `memoryIds`, plus optional `attribution`). Drives `usageCount` / `usageBoost` |
324
314
 
325
- Writes are scoped per-agent (your `FLAIR_AGENT_ID`) and enforced by Flair's server, not by client convention — you can't write as another agent. Reads are more open by design: any agent on the same Flair instance can read any other agent's **non-private** memories, with no grant to set up (open-within-org read; see [SECURITY.md](../SECURITY.md)).
315
+ For ordinary signed agents, Flair enforces write ownership server-side: they can write only under their authenticated agent ID. Administrator credentials and administrator agent roles have broader authority. Reads are more open by design: any agent on the same Flair instance can read any other agent's **non-private** memories, with no grant to set up (open-within-org read; see [SECURITY.md](../SECURITY.md)).
326
316
 
327
- Which memories are non-private is decided at write time, and the default is not "shared". `memory_store` defaults `durability` to `standard`, and the server derives visibility from durability — `permanent`/`persistent` → `shared`, `standard`/`ephemeral` → `private` — so **a bare `memory_store` call writes an owner-only memory that no other agent can read.** Pass `visibility: "shared"` (or `"private"`, to be explicit) to say what you mean; the tool reports the visibility the write actually landed on so an agent can confirm it rather than assume.
317
+ Which memories are non-private is decided at write time, and the default is not "shared". `memory_store` defaults `durability` to `standard`, and the server derives visibility from durability — `permanent`/`persistent` → `shared`, `standard`/`ephemeral` → `private` — so **a bare `memory_store` call creates a private memory: ordinary agents other than its owner cannot read it; administrators retain access.** Pass `visibility: "shared"` (or `"private"`, to be explicit) to say what you mean; the tool reports the visibility the write actually landed on so an agent can confirm it rather than assume.
328
318
 
329
319
  ### Reading the `bootstrap` payload
330
320
 
@@ -332,7 +322,9 @@ The following structured-payload details describe the HTTP bootstrap response an
332
322
 
333
323
  `bootstrap` returns the canonical structured containers — `soul`, `memories`, `predicted`, `teammateFindings`, `events` — plus counts and a `tokenEstimate`. The containers are **always present** (empty `[]`/`{}` when there's nothing), so an empty container is distinguishable from an unsupported one.
334
324
 
335
- **The token ledger reconciles `tokenEstimate` from the payload alone (flair#1270).** Every token-charged content class carries a counter — `soulTokens`, `memoryTokens`, `trustTokens`, `eventsTokens` — plus a measured `scaffoldTokens` for the fixed JSON frame, and `tokenEstimate ≈ scaffoldTokens + soulTokens + memoryTokens + trustTokens + eventsTokens`. The remaining ≈ gap is the bounded per-item difference between the prose lines the memory counters measure and the heavier structured objects the containers ship. A payload whose estimate an agent can't decompose from the reported figures is a bug, not an accounting convention.
325
+ **Skill assignments are reported in `skills` and `skillDiagnostics` (flair#2141).** A `skills` entry is `{ name, skillId, scope, priority, source }` for an assigned skill that won priority resolution; a `skillDiagnostics` entry is a refused, superseded, unresolved or ambiguous assignment with its `decision` and `reason`. Both arrays are present whatever `includeSoul` and `includeContext` say, and hold the entries admitted within the remaining token budget; `skillsTruncated` and `skillDiagnosticsTruncated` count the entries that did not fit. An entry names the skill and does not carry its procedure: fetch that with `skill_get` and the `skillId`, or over REST with a signed `GET /Memory/<skillId>`, which applies the same by-id read gate as `skill_get`. A name-only assignment that wins priority resolution resolves when the agent has exactly one live skill row of its own with that name (not archived, past `validTo` or past `expiresAt`); with none it is `unresolved`, with more than one `ambiguous`. An `OrgSkillAssignment` row is also a candidate when the target's Agent record has `kind` agent and `status` active (absent counts as agent and active); humans, deactivated principals and targets with no Agent record get no org candidates. A Soul `skill-assignment` row with `metadata.optOut: true` removes the org candidates with that name for that agent before priority resolution, when this instance's id can be read and the row's `originatorInstanceId` equals it. An org `skills` entry has `scope: "org"` and its `skillId` is the row's `skillRef`; an org assignment that wins priority resolution with a `skillRef` that is not a live skill row the agent can read is `unresolved`. The `name` and `source` strings come from Soul `skill-assignment` rows, and an org entry's `name` from its `OrgSkillAssignment` row; they reach the agent without SkillScan; that is safe only because no agent key can write those rows (admin agent keys included); only operator credentials and Flair's own internal paths can, so widening who may write them changes what reaches the agent's context.
326
+
327
+ **The token ledger reconciles `tokenEstimate` from the payload alone (flair#1270).** Every token-charged content class carries a counter — `soulTokens`, `memoryTokens`, `trustTokens`, `eventsTokens`, `skillsTokens`, `skillDiagnosticsTokens` — plus a measured `scaffoldTokens` for the fixed JSON frame, and `tokenEstimate ≈ scaffoldTokens + soulTokens + memoryTokens + trustTokens + eventsTokens + skillsTokens + skillDiagnosticsTokens`. At the `/mcp` default (`includeContext: false`) the remaining ≈ gap is the bounded per-item difference between the prose lines the memory counters measure and the heavier structured objects the containers ship; with `includeContext: true` the prose `context` mirror widens it and no upper bound applies. A payload whose estimate an agent can't decompose from the reported figures is a bug, not an accounting convention.
336
328
 
337
329
  **Empty containers say why they're empty (flair#1182).** When a structured container ships empty, the payload carries a short hint naming the reason and what fills it — `eventsHint`, `teammateFindingsHint`, `predictedHint`. This is present *only* when the container is empty, so a deliberately-empty container is never confused with a silent drop (a connector never has to diff against a previous payload to tell the two apart).
338
330
 
@@ -384,7 +376,7 @@ Future MCP-capable agent CLIs (and there are more landing every month) will work
384
376
 
385
377
  **"connection_error: could not reach Flair at http://127.0.0.1:19926".** The Flair server isn't running. Run `flair status` to check; `flair start` to bring it up.
386
378
 
387
- **"auth_error: …" on every call.** The agent identity doesn't match a registered key. Re-run `flair agent add <id>` (idempotent on re-add — won't lose existing memories). Against a hosted instance the same three shapes apply (record missing / key mismatch / config wrong), and a by-id 404 is fail-closed ownership, not an existence signal — [Hosted Flair auth](integrations.md#hosted-flair-auth--your-agent-got-a-404).
379
+ **"auth_error: …" on every call.** Read the reported cause. For `unknown_agent`, no Agent row exists: run `flair agent add <id>`. For `invalid_signature`, the signature did not verify against the stored public key. Check the signing key and the signed request first. For a confirmed key mismatch, `agent add` refuses a well-formed existing row. On the Flair host, `flair agent rotate-key <id>` writes a new private key on that host. That file must be on the client host before the MCP process can sign with it. `FLAIR_KEY_PATH` only names a path on the signing host; point it at that local file when the key is not in the default location, then restart the MCP process. `flair agent remove <id>` and then add again is the other path for a well-formed row. `flair agent remove` tries to delete that agent's Memory and Soul rows. Other auth errors follow the cause they name. A by-id 404 is fail-closed ownership, not an existence signal — [Hosted Flair auth](integrations.md#hosted-flair-auth--your-agent-got-a-404).
388
380
 
389
381
  **Tool calls succeed but the agent doesn't see results in subsequent turns.** Check that the CLI is actually invoking `bootstrap` at session start — most CLIs need an explicit prompt nudge ("call the bootstrap tool now") on first use. Subsequent turns should pick up automatically once the CLI sees the schema.
390
382
 
@@ -34,11 +34,25 @@ aud, scope }`. The handler maps `sub` → a flair `Agent` id:
34
34
 
35
35
  1. Look up `Credential` where `kind === "idp"` AND `idpSubject === sub` → its
36
36
  `principalId` is the Agent id. (Same credential surface XAA's ID-JAG path
37
- uses — one identity model.)
37
+ uses — one identity model.) That Agent must exist and be active on **every**
38
+ tool call dispatched through the mapping — the rule the Ed25519 path applies
39
+ (`isPrincipalDeactivated`; a record with no `status` field counts as
40
+ active). A deactivated or missing principal is refused with a JSON-RPC error
41
+ that names the principal and the operator's remedy, so a token minted while
42
+ the principal was active stops working once it is deactivated and, while the
43
+ token remains valid, works again once it is reactivated. The credential's
44
+ `lastUsedAt` is updated, best effort, after a tool has run; the update
45
+ writes that field alone.
38
46
  2. If no mapping and `FLAIR_MCP_JIT_PROVISION` is on, JIT-provision a
39
47
  non-admin `Agent` + `Credential(kind:"idp")` from the sub.
40
48
  3. Otherwise **deny** — an unresolvable sub never runs as anonymous or admin.
41
49
 
50
+ A failed credential lookup or principal read during identity resolution
51
+ refuses the call. It is never read as "allowed", and never as "no mapping", so
52
+ step 2 runs only for a subject the credential lookup answered for. A failed
53
+ read of the credential before the post-tool `lastUsedAt` update leaves the
54
+ served answer unchanged.
55
+
42
56
  The resolved agent is set as `request.tpsAgent` on a flair-shaped delegation
43
57
  context, so the wrapped handler scopes to the verified agent exactly as an
44
58
  Ed25519-signed REST call would. Identity always comes from the resolved agent,
@@ -121,6 +121,11 @@ flair memory add --agent local "Harper v5 sandbox blocks node:module but process
121
121
 
122
122
  Flair embedded the text locally on write. No network calls.
123
123
 
124
+ ### Task summaries
125
+ Use `flair memory write-task-summary --agent local --outcome merged --summary "Finished the task"` to save a persistent task summary and print its memory id.
126
+ The optional `--ref <ref>` accepts a task, issue, or PR reference; omitted references use `unreferenced`. Outcomes are `merged`, `rejected`, or `abandoned`.
127
+ Existing `--beads` callers remain supported as a deprecated alias; `--ref` takes precedence.
128
+
124
129
  ### Who can read it
125
130
 
126
131
  `visibility: private` means **only `local` can read this memory** — no other agent on the instance can search it, fetch it by id, or receive it in a bootstrap.
package/docs/releasing.md CHANGED
@@ -15,13 +15,8 @@ The staging tag is an **immutable property of the staged package** (`npm help st
15
15
  re-staging the same version under a different tag requires `npm stage reject` first.
16
16
  There is no "fix the stage in place" — you reject it and re-cut the next patch.
17
17
 
18
- > `flair-bench` is version-bumped and tagged in lockstep with the other 7, and stages in
19
- > its own step in CI for [historical reasons](#flair-bench-bootstrap-one-time-done). That
20
- > step is no longer allowed to fail: every already-published package must stage
21
- > for a release to pass.
22
-
23
18
  ```
24
- merge release PR ──▶ push tag v0.11.0 ──▶ CI stages all packages (tag: staged)
19
+ merge release PR ──▶ auto-tag v0.11.0 ──▶ CI stages all packages (tag: staged)
25
20
  │
26
21
  maintainer reviews + approves (2FA)
27
22
  ▼
@@ -35,12 +30,10 @@ There is no "fix the stage in place" — you reject it and re-cut the next patch
35
30
  latest moves
36
31
  ```
37
32
 
38
- Pushing a `vX.Y.Z` tag triggers the release. This replaces the old "run
33
+ The `vX.Y.Z` tag triggers the release. This replaces the old "run
39
34
  `release.sh --publish` from a laptop logged into npm" flow. Nothing publishes without
40
35
  a human 2FA approval, and every package ships with a provenance attestation (public
41
- repo → verifiable build origin). The person who tags the release does **not** need npm
42
- credentials or `Actions: write` — only repo push access; the only privileged step is
43
- the maintainer's 2FA approval.
36
+ repo → verifiable build origin).
44
37
 
45
38
  ## Cutting a release
46
39
 
@@ -50,8 +43,10 @@ the maintainer's 2FA approval.
50
43
  ./scripts/release.sh 0.11.0
51
44
  ```
52
45
 
53
- This assembles the changelog, bumps every workspace package to the version, aligns
54
- internal deps, refreshes `bun.lock`, builds, tests, and opens a `release: v0.11.0` PR.
46
+ This assembles the changelog, bumps the lockstep release packages (listed in
47
+ `scripts/release.sh`) to the version, aligns internal deps, refreshes `bun.lock`, builds,
48
+ tests, and opens a `release: v0.11.0` PR. The Cursor workspaces (`packages/cursor-flair`
49
+ and `packages/cursor-wake-runner`) keep their own versions.
55
50
  Review and merge it (CI green + K&S approval) the same as any other PR.
56
51
 
57
52
  **Nothing about the version is bumped by hand.** The version is declared outside
@@ -83,13 +78,94 @@ fragment directory is empty (nothing to release) or when someone hand-wrote an e
83
78
 
84
79
  ### Phase 2 — tag the release
85
80
 
86
- After the release PR is merged to `main`, push the version tag:
81
+ After a release PR merges to `main`, [Release auto-tag](../.github/workflows/release-auto-tag.yml)
82
+ normally creates its tag after a successful push CI run on `main`, subject to the release checks.
83
+ If an allowlisted advisory job fails that CI run, the immediate path is skipped and
84
+ nightly recovery makes the tag instead. It runs at **04:23 UTC daily**, so expect up
85
+ to **24 hours plus run time**. It uses completed CI runs regardless of their overall
86
+ conclusion and tolerates only exact names in [the advisory allowlist](../.github/release-auto-tag-advisories.json).
87
+ All other release conditions must pass, and it targets the version still declared
88
+ on `main`, so a newer version supersedes a missed release.
89
+
90
+ If Release auto-tag refused, resolve what it reports; do not tag by hand. If it did not
91
+ run, a repository admin tags by hand (a ruleset restricts creating `v*` tags) once the
92
+ checks it applies pass. The first command must print nothing:
87
93
 
88
94
  ```bash
95
+ git ls-remote --tags origin v0.11.0
89
96
  git checkout main && git pull
90
97
  git tag v0.11.0 && git push origin v0.11.0
91
98
  ```
92
99
 
100
+ > When the release commit's tree carries
101
+ > `packages/adk-flair/pyproject.toml` whose `[project].version` equals the version
102
+ > being tagged, the auto-tagger ALSO creates `adk-flair-v<version>` from the same
103
+ > commit — so the PyPI publish run then needs only the environment gate its owner
104
+ > keeps or drops (no hand-pushed `adk-flair-v` tag).
105
+ >
106
+ > The project version is read with Python's `tomllib` — the SAME reader
107
+ > `.github/workflows/adk-flair-publish.yml` decides with — by handing the file to
108
+ > `python3` on stdin, in isolated mode (`-I`: no working-directory module can
109
+ > shadow the standard library) with an environment of `PATH` only, so no token
110
+ > reaches the interpreter ((r9e)). It fails CLOSED: a TOML parse error, a `python3` without
111
+ > `tomllib` (older than 3.11), or a `[project]` that is not a table is
112
+ > `unsupported`, and the tagger refuses `adk-pyproject-unsupported` naming the
113
+ > reason ((s), (v)); a `dynamic = [ … "version" … ]` or a missing
114
+ > `[project].version` is NONE and refuses `adk-version-mismatch` ((t)); a
115
+ > `[project].version` that differs from the version being tagged refuses
116
+ > `adk-version-mismatch` BEFORE either tag is written ((p), (q), (g)) — a
117
+ > `version =` line inside a multi-line string or array is never read as the
118
+ > project version. With NO `packages/adk-flair/pyproject.toml` the
119
+ > tagger's adk step is skipped ((b)), but `scripts/check-version-sync.mjs` lists the
120
+ > pyproject as a source file and refuses when it is missing, so today such a release
121
+ > refuses at `version-sync`. Removing the Python package from the repo means removing
122
+ > it, in the same change, from the checker's source list and from the paths
123
+ > `scripts/release.sh` stages for the release commit; a release is then tagged `v`
124
+ > alone. An
125
+ > `adk-flair-v<version>` already at another commit refuses
126
+ > `adk-tag-exists-elsewhere` before the `v` tag is written ((d)); a second POST
127
+ > rejected for lack of permission refuses `adk-ref-write-rejected`, and the text
128
+ > reports what THIS run read back for BOTH refs and the next step ((e)): for a 403
129
+ > the text names the App's bypass-actor setting on the `adk-flair-v*` ruleset as the
130
+ > first thing to check (the usual cause; the code sees only the status), then a
131
+ > re-run; for any other status, a re-run ((r9a)). A read of the adk ref that FAILS
132
+ > (the API answers neither found nor not found) refuses `adk-ref-unreadable` instead
133
+ > of throwing: before any tag is written at the pre-check and on a same-commit re-run
134
+ > ((r9b), (r9f), (r9g)), and with the `v` tag in place at the re-read and the
135
+ > read-back ((r9c), (r9d)). After a REJECTED adk POST the refusal stays
136
+ > `adk-ref-write-rejected`, and the text reports the adk read-back as
137
+ > `not read: <reason>`; when the adk read-back cannot be resolved, the text reports its raw
138
+ > ref type and SHA (or `not found`), so it names BOTH refs' read-back values on every
139
+ > branch. The post-POST read-back has THREE refusals, each reporting only
140
+ > what this run observed: the adk ref did not read back at all (MISSING, (i2)); it
141
+ > read back but could not be resolved to a commit (UNRESOLVED, (i3)); or it
142
+ > resolves elsewhere (ELSEWHERE, (i)). None states what a future run will do. The
143
+ > membership+read of the pyproject is ONE function (`readAdkPyproject`): a
144
+ > `git ls-tree` that does not answer exactly "absent" or "the path" (non-zero exit,
145
+ > spawn error, timeout, unexpected output) or a failed `git show` refuses
146
+ > `adk-pyproject-unreadable` — before any POST, on BOTH the decide and write paths
147
+ > ((r1)-(r4)); no stderr substring decides anything.
148
+ >
149
+ > The writer (`scripts/check-version-sync.mjs --write`) precomputes the two
150
+ > `SOURCE_VERSION_FILES` edits — `packages/flair-bench/src/version.ts` and
151
+ > `packages/adk-flair/pyproject.toml` — verifies the pyproject edit with `tomllib`
152
+ > (refused unless only `project.version` changed) and the flair-bench edit with its
153
+ > own declaration check (exactly one `TOOL_VERSION = "…"` match), writes NOTHING if
154
+ > either fails, and leaves the `package.json` bumps to `release.sh` ((w), (x2), (m),
155
+ > (h), all-or-nothing).
156
+ >
157
+ > Re-run states (`decide`): with the `v` tag already at `<sha>` and the adk tag
158
+ > absent, the run is a TAG with the `v` step marked SKIP ((n)); with BOTH tags at
159
+ > `<sha>` it is a SKIP, so no write job starts on later runs ((o)). Once `v` is
160
+ > known to sit at the sha, EVERY later refusal carries `v_verdict=SKIP`, so the
161
+ > refusal issue never prints `v: REFUSE` for an existing ref — fed from `decide`'s
162
+ > outputs when `write` was skipped — and that is asserted on the RENDERED issue
163
+ > line, not the wiring (`test/unit/release-auto-tag-workflow.test.ts`). The App
164
+ > must be listed as a bypass actor on the `adk-flair-v*` tag ruleset (id 24044018)
165
+ > for that second POST to be allowed. Each guarantee names its test:
166
+ > `test/unit/release-auto-tag.test.ts` and
167
+ > `test/unit/release-auto-tag-workflow.test.ts`.
168
+
93
169
  The tag push triggers the [`release-publish`](../.github/workflows/release-publish.yml)
94
170
  workflow, which:
95
171
 
@@ -98,11 +174,11 @@ workflow, which:
98
174
  3. Verifies every lockstep package's `package.json` is at that version.
99
175
  4. Builds every package.
100
176
  5. Runs `npm stage publish` for each lockstep package in dependency order
101
- (flair-client first), then `flair-bench` in its own step. Any lockstep package
177
+ (flair-client first). Any lockstep package
102
178
  failing to stage fails the release.
103
179
 
104
180
  It authenticates via OIDC — no secrets, and it does **not** create or move any tag (the
105
- tag you pushed is the trigger). Watch the run; when it's green, the packages are staged
181
+ tag is the trigger). Watch the run; when it's green, the packages are staged
106
182
  but **not yet live**.
107
183
 
108
184
  In parallel — and **independent of the npm staging approval** — a `github-release` job
@@ -149,12 +225,15 @@ cannot be re-staged under a different tag.
149
225
 
150
226
  The moment the staged packages are approved, dispatch the
151
227
  [`post-publish canary`](../.github/workflows/canary.yml) (Actions → "Post-publish canary
152
- — install + boot a published version") with two inputs:
228
+ — install + boot a published version") with three inputs:
153
229
 
154
230
  | Input | Value |
155
231
  | ----- | ----- |
156
232
  | `version` | the version just approved, exact (e.g. `vX.Y.Z` without the `v`) |
157
233
  | `expected_sha256` | the published tarball's sha256 (64 hex). The canary computes it from the registry with `node scripts/ci/registry-tarball-sha256.mjs <ver>`. |
234
+ | `package_set_digest` | the certified package-set digest (64 lowercase hex), printed as `package-set-digest=<digest>` in the log of the release run's "Pack publishable packages and write the release manifest" step. It can also be recomputed from that step's lines (`<name>@<version> <sha256> <basename>`) by feeding `<name>=<sha256>` lines to `node scripts/ci/package-set-digest.mjs --version <ver>`. The canary re-derives the digest from the tarballs it verified and refuses a mismatch before any verdict. |
235
+
236
+ For example, after all staged packages are public: `gh workflow run canary.yml --ref main -f 'version=<ver>' -f 'expected_sha256=<flair-tarball-sha256>' -f 'package_set_digest=<package-set-digest>'`.
158
237
 
159
238
  The canary runs on clean `ubuntu-latest` and `macos-latest` runners and is
160
239
  **credential-less**: it installs `@tpsdev-ai/flair@<ver>` by exact version from the
@@ -229,6 +308,15 @@ and 0.55.1's promote had to be assembled by hand, line by line, for this reason.
229
308
  It reads `dist-tags.latest` for every lockstep package and exits non-zero
230
309
  naming any that disagree (or that differ from `<ver>`). The canary runs the same
231
310
  check BEFORE the verdict, so a pre-existing skew is visible there too.
311
+
312
+ The promote block runs this check itself, in its wait mode (`--await 120`, with
313
+ each package's previous `latest`): it reads every `latest` from the registry's
314
+ dist-tags endpoint, re-reads a package that is not yet at `<ver>` until it is or
315
+ the wait ends, and exits 3 if every such package still reads its previous
316
+ `latest` at the end. On exit 3, re-run the command the block prints before
317
+ restoring anything. A run without `--await` reads the package document, which
318
+ the public registry serves from its CDN and which can still show the previous
319
+ `latest` for a short time after a move.
232
320
  - **On FAIL**, the version stays public but unpromoted. The canary emits one
233
321
  `npm deprecate` line per package; run them, then re-cut the next patch. A
234
322
  version is never refreshed in place.
@@ -267,10 +355,6 @@ published; since flair#1683 it is a
267
355
 
268
356
  ### `flair-bench` bootstrap (one-time, done)
269
357
 
270
- **Nothing to do here.** This section is kept because the next brand-new package added to
271
- the release set will hit the same wall, and because it explains why `flair-bench` still
272
- stages in its own workflow step.
273
-
274
358
  `flair-bench` (added 2026-07-12, flair#702) was wired into the version-bump/tag flow
275
359
  (`scripts/release.sh`, `release-publish.yml`'s version-check) alongside the other 7 before
276
360
  it existed on npm at all. That is a chicken-and-egg: `npm stage publish` categorically
@@ -332,3 +416,51 @@ The maintainer who approves staged packages must have 2FA enabled on their npm a
332
416
  npm itself; local approvers need a recent npm.
333
417
  - Node **≥ 22.14**.
334
418
  - Trusted publishing runs on GitHub-hosted runners only (no self-hosted support yet).
419
+
420
+ ## Automated promote — slice 1 (flair#1928)
421
+
422
+ After the npm approval, a maintainer today pastes the promote block from a
423
+ checkout. Slice 1 lands the four pieces the privileged promote job (slice 2) will
424
+ stand on; it holds no npm credential (the poll runs on the automatic
425
+ `GITHUB_TOKEN` with `actions: write`, `contents: read` and `deployments: read`).
426
+
427
+ - **The certified digest travels with the release attempt.** The `release-attempt`
428
+ deployment marker carries a `payload` of `package_set_digest`, `manifest_sha256`
429
+ and `version`, taken from the values `stage-publish` re-derived from the artifact
430
+ it staged. It is written BEFORE anything is staged, so a missing or mismatched
431
+ digest refuses the stage (nothing staged).
432
+ - **A machine surface for the promote block.** `scripts/ci/canary-verdict.sh
433
+ --emit bash` prints ONLY the executable promote block — byte-identical to the
434
+ text between the fences a human sees (one definition). A FAIL or a non-release
435
+ version has no promote block: `--emit bash` exits 3 with one stderr line.
436
+ - **The unprivileged poll.** `release-promote-poll.yml` runs every 10 minutes
437
+ (`schedule` only — there is no manual trigger, because `gh workflow run --ref <branch>` runs that branch's copy of the workflow, and a guard inside the file cannot bind it to main) and holds NO npm credential: no `environment`,
438
+ no repo secret — it runs on the automatic `GITHUB_TOKEN` with `actions: write`,
439
+ `contents: read` and `deployments: read`. It checks out ONLY the default branch
440
+ at the run's own sha (never a tag's tree), and brings exactly what the package
441
+ derivation reads (`scripts/ci`, the root `package.json` and
442
+ `packages/*/package.json`); that derivation FAILS CLOSED — a non-zero exit or an
443
+ empty list is an error exit that names the cause, never a silent "ready". It
444
+ reads every `release-attempt` / `promoted` marker across ALL pages
445
+ (`--paginate`, flattened), and for each pending marker takes the version from the
446
+ MARKER PAYLOAD (never main's `package.json`, which moves on after a release;
447
+ never the ref alone — the ref must equal `v<payload.version>` or the marker is
448
+ refused). It requires EVERY lockstep package `<name>@<version>` to be public and
449
+ to re-derive the certified package-set digest (ALL-form: one missing/odd package
450
+ is NOT READY, exit 0, the package named), and on READY dispatches
451
+ `release-promote.yml --ref v<version>`, gated behind that workflow existing
452
+ (slice 2). Every run is a schedule run of the default branch's copy of the file, so
453
+ `github.sha` is always a main sha. **The poll's outputs are
454
+ never an input to what gets promoted** — the privileged job re-derives everything
455
+ it acts on. (`test/unit/release-promote-poll-workflow.test.ts`.)
456
+ - **Trust-root ownership.** `.github/CODEOWNERS` puts `/scripts/ci/canary-verdict.sh`,
457
+ `/scripts/ci/package-set-digest.mjs`, `/scripts/ci/registry-tarball-sha256.mjs`,
458
+ `/scripts/ci/registry-latest-skew.mjs`, `/scripts/ci/lockstep-packages.mjs`,
459
+ `/.github/workflows/canary.yml` and `/.github/workflows/release-promote*.yml`
460
+ under the trust root (`@heskew`); the test resolves EFFECTIVE ownership (last
461
+ matching rule wins) for each protected path.
462
+ (`test/unit/release-auto-tag-workflow.test.ts`.)
463
+
464
+ Not in this slice: the privileged `release-promote.yml`, the `release-promote`
465
+ environment, `NPM_TOKEN`, the machinery-recency guard, and the refusal issue with
466
+ restore lines — all slice 2.
@@ -38,9 +38,9 @@ Override per-run via `FLAIR_DEP_KEEP_CURRENT="pkg1,pkg2,@scope/pkg3"` env (addit
38
38
 
39
39
  ### 2. Exact-version pinning for production deps
40
40
 
41
- Some `dependencies` entries are exact-pinned (`harper@5.2.8`, `commander@14.0.3`, `jose@6.2.2`, `tweetnacl@1.0.3`), but others are range-spec'd (`harper-fabric-embeddings@^0.5.0`, `js-yaml@^4.3.2`, `semver@^7.8.5`, `tar@^7.5.22`). Most overrides use ranges (`^`/`~`), with one exact alias (`npm:empty-npm-package@1.0.0` for `react-native-fs`). The age gate (`scripts/check-dep-ages.mjs`, line 130) checks npm publish age for external entries in the `dependencies` field whose declared version starts with a digit (`/^\d/.test(version)`), excluding workspace-internal dependencies and the keep-current list (`harper`, `harper-fabric-embeddings`, `@harperfast/oauth`); its default threshold is seven days.
41
+ Some `dependencies` entries are exact-pinned (`harper@5.2.8`, `commander@14.0.3`, `jose@6.2.2`, `tweetnacl@1.0.3`), but others are range-spec'd (`harper-fabric-embeddings@^0.5.0`, `js-yaml@^4.3.2`, `semver@^7.8.5`, `tar@^7.5.22`). Most overrides use ranges (`^`/`~`), with one exact alias (`npm:empty-npm-package@1.0.0` for `react-native-fs`). The age gate (`scripts/check-dep-ages.mjs`, with the collection rule in `collectDeps` in `scripts/lib/check-dep-ages-collect.mjs`) checks npm publish age for external entries in both `dependencies` and `optionalDependencies` whose declared version starts with a digit (`/^\d/.test(version)`), excluding workspace-internal dependencies and the keep-current list (`harper`, `harper-fabric-embeddings`, `@harperfast/oauth`); its default threshold is seven days.
42
42
 
43
- - `peerDependencies` may use ranges: they state what the host project must provide, and they are never bundled into our published tarballs. They are still installed, because npm and Bun install non-optional peers by default: a consumer's install resolves them, and our own workspace install records the required peers of `langgraph-flair`, `n8n-nodes-flair` and `openclaw-flair` in `bun.lock` like any other dependency (the frozen-lockfile install does not check a recorded peer against its declared range; flair#1936). Most `devDependencies` are exact-pinned for build reproducibility; a few are ranged (`@types/semver@^7.8.0`). They don't ship in our published tarballs.
43
+ - `peerDependencies` may use ranges: they state what the host project must provide. They are still installed, but an exact-pin check of our declaration does not describe what actually gets installed — the consumer resolves them from a range. This is the reason we do not include peers in the bake-time gate (not "never bundled into tarballs"): the gate checks versions we actually pull, and we don't pull a peer declaration at face value. Our workspace install records the required peers of `langgraph-flair`, `n8n-nodes-flair` and `openclaw-flair` in `bun.lock` like any other dependency (the frozen-lockfile install does not check a recorded peer against its declared range; flair#1936). Most `devDependencies` are exact-pinned for build reproducibility; a few are ranged (`@types/semver@^7.8.0`). They don't ship in our published tarballs.
44
44
  - **Flair declares no optional peers today**, and no `optionalDependencies` at the root; `packages/flair-bench/package.json` (line 38) declares some. If either is ever proposed as an install-weight fix, the mechanism has now been measured twice (`@harperfast/oauth` flair#750, `node-llama-cpp` flair#887) and the result is counter-intuitive enough to be worth stating: **only `peerDependencies` + `peerDependenciesMeta.optional` is skipped by a default install** (npm and bun alike). A plain `optionalDependencies` entry *is* still installed by default — "optional" there means "a failed install is non-fatal", not "skipped" — so it buys no install-weight reduction whatsoever. Exact-pinning an optional peer (rather than ranging it) is also legitimate where the consuming code path is version-sensitive, so that an operator who installs a different version gets told the version they have is not the version that was tested.
45
45
 
46
46
  Note the corollary, measured during flair#893: an optional peer that is simply *absent* installs silently — npm prints no warning at all — so it cannot be relied on to prompt anyone to install it. Anything a user must install for a feature to work needs to be documented, or detected and reported at runtime.
@@ -121,7 +121,7 @@ Fails any PR where a workspace package declares an internal `@tpsdev-ai/*` dep a
121
121
 
122
122
  ### `scripts/check-dep-ages.mjs` (this PR)
123
123
 
124
- Fails any PR with an external pinned production dep version published less than `FLAIR_DEP_MIN_AGE_DAYS` ago (default 7). Queries the npm registry's `time` map. Workspace-internal deps exempt. Wired into the `test-unit` job. Its limits, stated: it covers npm production dependencies only (not the Python, Docker or GitHub Actions updates the Renovate preset proposes), and it reads the same registry publish timestamp Renovate does, so it is a second line against the cooldown being removed from the config — not against a release whose publish date lies.
124
+ Fails any PR with an external pinned production dep version published less than `FLAIR_DEP_MIN_AGE_DAYS` ago (default 7). Queries the npm registry's `time` map. Checks both `dependencies` and `optionalDependencies` — npm and bun install optionalDependencies by default. Workspace-internal deps exempt. Wired into the `test-unit` job. Its limits, stated: it does not check `peerDependencies` (resolved from a range by the consumer's install) nor `devDependencies` (don't ship in our tarballs) — it reads the same registry publish timestamp Renovate does, so it is a second line against the cooldown being removed from the config — not against a release whose publish date lies.
125
125
 
126
126
  Configurable:
127
127
 
@@ -163,17 +163,22 @@ Each check matches a CI gate exactly so the local and remote outcomes can't drif
163
163
 
164
164
  If you're building on top of `@tpsdev-ai/flair-client` and want the same posture:
165
165
 
166
+ The guard is two files: `scripts/check-dep-ages.mjs` imports `./lib/check-dep-ages-collect.mjs` relative to itself, so copy both and keep `lib/` beside the script.
167
+
166
168
  ```bash
167
- # Copy the dep-age guard into your repo
169
+ # Copy the dep-age guard into your repo (both files, same relative layout)
170
+ mkdir -p scripts/lib
168
171
  curl -fsSL https://raw.githubusercontent.com/tpsdev-ai/flair/main/scripts/check-dep-ages.mjs \
169
172
  -o scripts/check-dep-ages.mjs
173
+ curl -fsSL https://raw.githubusercontent.com/tpsdev-ai/flair/main/scripts/lib/check-dep-ages-collect.mjs \
174
+ -o scripts/lib/check-dep-ages-collect.mjs
170
175
  chmod +x scripts/check-dep-ages.mjs
171
176
 
172
177
  # Wire it into your CI as a fast pre-test step
173
178
  - run: node scripts/check-dep-ages.mjs
174
179
  ```
175
180
 
176
- The script has no external dependencies — node 18+ is enough.
181
+ The two files have no external dependencies — node 18+ is enough.
177
182
 
178
183
  To adopt the same Renovate preset in your repo, make your `.github/renovate.json`:
179
184
 
@@ -8,6 +8,17 @@ flair doctor
8
8
 
9
9
  ## Common Issues
10
10
 
11
+ ### BM25 index status
12
+
13
+ `flair status` prints the lexical index for the Harper worker that answered:
14
+
15
+ - `building 312/817 docs (38%) · started 4s ago` — the background build (started after embeddings boot) is in progress. A text search waits for that build.
16
+ - `ready · 817 docs · built in 1.2s · 3m ago` — the index is serving.
17
+ - `disabled — <reason>` — the index is not serving. After a feed error or a failed build, search uses a per-query scan and `flair status` also lists it as a warning. `FLAIR_BM25_INDEX is off` (the kill switch) and `retrieval mode is vector-only` are settings: the index is not built and they are not warnings.
18
+ - `not built yet — builds in the background after startup, or on the first text search` — the warm has not started. A text search builds it too.
19
+
20
+ With `THREADS_COUNT` greater than 1 the line names the worker it describes (`worker 3 of 4`). Each worker has its own index; the line is not a cluster total.
21
+
11
22
  ### Pre-0.18.0 flair-client / flair-mcp silently drops writes
12
23
 
13
24
  **Symptoms:** `memory_store` comes back as if it stored something (`written: false`, a `mergedWith` id, or a "deduplicated" record you did not write) and **zero rows** appear for the writing agent. The match it folded into can be **another agent's `shared` memory**. `flair doctor` after this server version names the pin.