@tpsdev-ai/flair 0.59.0 → 0.63.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 (359) hide show
  1. package/README.md +10 -10
  2. package/SECURITY.md +49 -5
  3. package/config.yaml +23 -12
  4. package/dist/bridges/builtins/mem0.js +63 -28
  5. package/dist/bridges/runtime/execute.js +1 -0
  6. package/dist/bridges/runtime/import-runner.js +12 -0
  7. package/dist/bridges/runtime/load-plugin.js +42 -13
  8. package/dist/bridges/runtime/yaml-loader.js +4 -2
  9. package/dist/bridges/types.js +1 -0
  10. package/dist/build-info.json +3 -3
  11. package/dist/cli.js +1054 -367
  12. package/dist/commands/agent.js +233 -90
  13. package/dist/commands/attention.js +4 -3
  14. package/dist/commands/backup-approval.js +218 -0
  15. package/dist/commands/backup.js +211 -39
  16. package/dist/commands/bootstrap.js +3 -1
  17. package/dist/commands/bridge.js +172 -119
  18. package/dist/commands/deploy.js +71 -8
  19. package/dist/commands/doctor.js +711 -146
  20. package/dist/commands/export.js +57 -23
  21. package/dist/commands/federation.js +787 -82
  22. package/dist/commands/grant.js +5 -6
  23. package/dist/commands/help.js +25 -0
  24. package/dist/commands/hook.js +155 -2
  25. package/dist/commands/idp.js +27 -19
  26. package/dist/commands/import.js +136 -20
  27. package/dist/commands/init.js +469 -200
  28. package/dist/commands/integrity.js +387 -0
  29. package/dist/commands/keys.js +247 -58
  30. package/dist/commands/mcp.js +108 -52
  31. package/dist/commands/memory.js +203 -35
  32. package/dist/commands/migrate-harness-memory.js +3 -2
  33. package/dist/commands/orgevent.js +51 -47
  34. package/dist/commands/presence.js +4 -3
  35. package/dist/commands/principal.js +428 -62
  36. package/dist/commands/quality.js +13 -1
  37. package/dist/commands/reembed.js +141 -17
  38. package/dist/commands/relationship.js +2 -1
  39. package/dist/commands/rem.js +537 -80
  40. package/dist/commands/restore.js +413 -65
  41. package/dist/commands/search.js +6 -4
  42. package/dist/commands/service.js +235 -40
  43. package/dist/commands/soul.js +4 -9
  44. package/dist/commands/status.js +94 -38
  45. package/dist/commands/test.js +7 -3
  46. package/dist/commands/upgrade.js +77 -23
  47. package/dist/commands/workspace.js +13 -11
  48. package/dist/component-env.js +31 -41
  49. package/dist/deploy.js +136 -4
  50. package/dist/doctor-client.js +534 -92
  51. package/dist/engine-version-contract.js +1 -0
  52. package/dist/engine-version.js +23 -3
  53. package/dist/fabric-upgrade.js +12 -2
  54. package/dist/federation/presence-send.js +139 -0
  55. package/dist/federation-verify.js +273 -180
  56. package/dist/hook-install.js +670 -6
  57. package/dist/install/clients.js +171 -35
  58. package/dist/keystore.js +72 -0
  59. package/dist/lib/action-recall-runtime.js +328 -0
  60. package/dist/lib/agent-home-fields.js +132 -0
  61. package/dist/lib/agent-home.js +427 -0
  62. package/dist/lib/agent-id-rule.js +88 -0
  63. package/dist/lib/agent-roster.js +33 -0
  64. package/dist/lib/atomic-write.js +1 -1
  65. package/dist/lib/auth-resolve.js +1069 -60
  66. package/dist/lib/backup-approval-store.js +612 -0
  67. package/dist/lib/backup-artifact.js +343 -0
  68. package/dist/lib/capture-runtime.js +124 -0
  69. package/dist/lib/config-critical-section.js +212 -25
  70. package/dist/lib/connect-phase.js +33 -0
  71. package/dist/lib/credential-status-rule.js +78 -0
  72. package/dist/lib/daemon-liveness.js +43 -11
  73. package/dist/lib/doctor-run.js +75 -37
  74. package/dist/lib/durability-copy.js +10 -0
  75. package/dist/lib/embedding-space-doctor.js +75 -0
  76. package/dist/lib/federation-pair-access.js +4 -0
  77. package/dist/lib/federation-retry-queue.js +283 -0
  78. package/dist/lib/federation-retry-row.js +101 -0
  79. package/dist/lib/flair-agent-role.js +4 -0
  80. package/dist/lib/hub-url.js +12 -0
  81. package/dist/lib/init-admin-pass.js +88 -12
  82. package/dist/lib/init-listener-environ.js +1 -2
  83. package/dist/lib/init-occupied-listener.js +15 -111
  84. package/dist/lib/init-spawn-attribution.js +73 -0
  85. package/dist/lib/init-tcp-probe.js +33 -0
  86. package/dist/lib/instance-identity-row.js +20 -0
  87. package/dist/lib/instruction-event-contract.js +17 -0
  88. package/dist/lib/instruction-event-doctor.js +102 -0
  89. package/dist/lib/launchd-management.js +38 -3
  90. package/dist/lib/listener-table.js +268 -0
  91. package/dist/lib/local-delete-instance.js +27 -0
  92. package/dist/lib/local-instance-pair.js +256 -0
  93. package/dist/lib/mcp-enable.js +1182 -341
  94. package/dist/lib/mcp-oauth-env-core.js +133 -0
  95. package/dist/lib/mcp-oauth-env.js +125 -0
  96. package/dist/lib/mcp-spec.js +17 -1
  97. package/dist/lib/memory-attributes.js +4 -0
  98. package/dist/lib/memory-id-policy.js +46 -0
  99. package/dist/lib/memory-integrity.js +309 -0
  100. package/dist/lib/memory-provider-timeout.js +33 -0
  101. package/dist/lib/memory-purge-response.js +20 -0
  102. package/dist/lib/mqtt-config.js +132 -0
  103. package/dist/lib/mqtt-listener-doctor.js +104 -0
  104. package/dist/lib/open-live-row.js +20 -0
  105. package/dist/lib/ops-table-count.js +25 -0
  106. package/dist/lib/ops-url.js +52 -0
  107. package/dist/lib/owned-pins.js +67 -10
  108. package/dist/lib/peer-status.js +27 -0
  109. package/dist/lib/principal-status.js +29 -0
  110. package/dist/lib/process-start-time.js +76 -12
  111. package/dist/lib/promotion-content-hash.js +20 -0
  112. package/dist/lib/proto-safe-record.js +42 -0
  113. package/dist/lib/record-id-path.js +25 -0
  114. package/dist/lib/reembed-server-support.js +66 -0
  115. package/dist/lib/restore-archive.js +760 -0
  116. package/dist/lib/restore-verify.js +104 -0
  117. package/dist/lib/scheduler-platform.js +10 -6
  118. package/dist/lib/secret-keys.js +25 -0
  119. package/dist/lib/secrets-push.js +50 -22
  120. package/dist/lib/skill-assignment-preflight.js +159 -0
  121. package/dist/lib/skill-seed-pending.js +24 -0
  122. package/dist/lib/skill-seed.js +448 -0
  123. package/dist/lib/skill-tombstone-doctor.js +133 -0
  124. package/dist/lib/soul-scope-fields.js +26 -0
  125. package/dist/lib/stop-start-recovery.js +54 -0
  126. package/dist/lib/uninstall-purge.js +266 -11
  127. package/dist/lib/upgrade-prior-liveness.js +2 -1
  128. package/dist/lib/using-flair-skill.js +87 -0
  129. package/dist/mcp-client-assertion.js +114 -14
  130. package/dist/memory-id-checkpoint.js +347 -0
  131. package/dist/memory-node-compare.js +207 -0
  132. package/dist/mqtt-off-deploy.js +550 -0
  133. package/dist/packages/flair-mcp/src/secret-redaction.js +113 -0
  134. package/dist/rem/promote-policy.js +3 -3
  135. package/dist/rem/restore.js +303 -26
  136. package/dist/rem/runner.js +317 -96
  137. package/dist/rem/scheduler.js +21 -4
  138. package/dist/resources/A2AAdapter.js +131 -178
  139. package/dist/resources/AdminMemory.js +2 -0
  140. package/dist/resources/AdminMemoryCandidates.js +116 -0
  141. package/dist/resources/Agent.js +463 -33
  142. package/dist/resources/AgentCard.js +4 -0
  143. package/dist/resources/AgentKeyRegister.js +248 -0
  144. package/dist/resources/AgentKeyRegistration.js +28 -0
  145. package/dist/resources/AgentReadPosition.js +7 -0
  146. package/dist/resources/AgentSeed.js +238 -107
  147. package/dist/resources/AutoPromoteCandidates.js +413 -78
  148. package/dist/resources/Credential.js +183 -10
  149. package/dist/resources/Federation.js +915 -145
  150. package/dist/resources/FederationRetry.js +140 -0
  151. package/dist/resources/InstructionVersion.js +220 -0
  152. package/dist/resources/Integration.js +300 -25
  153. package/dist/resources/MCPClientMetadata.js +6 -3
  154. package/dist/resources/Memory.js +3300 -758
  155. package/dist/resources/MemoryArchive.js +171 -53
  156. package/dist/resources/MemoryBootstrap.js +122 -61
  157. package/dist/resources/MemoryCandidate.js +37 -3
  158. package/dist/resources/MemoryConsolidate.js +2 -2
  159. package/dist/resources/MemoryDedupStats.js +30 -1
  160. package/dist/resources/MemoryFeed.js +545 -50
  161. package/dist/resources/MemoryGrant.js +21 -1
  162. package/dist/resources/MemoryMaintenance.js +368 -46
  163. package/dist/resources/MemoryPurge.js +348 -0
  164. package/dist/resources/MemoryReflect.js +71 -12
  165. package/dist/resources/MemoryReindex.js +111 -17
  166. package/dist/resources/Message.js +16 -5
  167. package/dist/resources/OAuth.js +342 -48
  168. package/dist/resources/OAuthClient.js +1 -1
  169. package/dist/resources/OrgEvent.js +405 -19
  170. package/dist/resources/OrgEventCatchup.js +7 -0
  171. package/dist/resources/OrgEventMaintenance.js +48 -10
  172. package/dist/resources/PairingToken.js +1 -1
  173. package/dist/resources/Presence.js +166 -51
  174. package/dist/resources/PromoteMemoryCandidate.js +24 -7
  175. package/dist/resources/RecordUsage.js +2 -4
  176. package/dist/resources/Relationship.js +23 -0
  177. package/dist/resources/SemanticSearch.js +63 -32
  178. package/dist/resources/Soul.js +191 -76
  179. package/dist/resources/SoulFeed.js +2 -1
  180. package/dist/resources/TeamDirectory.js +35 -0
  181. package/dist/resources/WorkspaceLatest.js +4 -0
  182. package/dist/resources/WorkspaceState.js +21 -1
  183. package/dist/resources/XAA.js +207 -63
  184. package/dist/resources/a2a-stream.js +313 -0
  185. package/dist/resources/a2a-url.js +4 -5
  186. package/dist/resources/agent-admin.js +10 -1
  187. package/dist/resources/agent-auth.js +138 -83
  188. package/dist/resources/agent-read-position-lib.js +4 -1
  189. package/dist/resources/agent-status-guard.js +9 -7
  190. package/dist/resources/auth-middleware.js +534 -171
  191. package/dist/resources/authority-field-guard.js +9 -11
  192. package/dist/resources/auto-promote-lib.js +8 -5
  193. package/dist/resources/basic-auth-header.js +21 -0
  194. package/dist/resources/bm25-index-service.js +4 -5
  195. package/dist/resources/dedup-cluster.js +6 -1
  196. package/dist/resources/ed25519-auth.js +1 -1
  197. package/dist/resources/embedding-space-guard.js +366 -72
  198. package/dist/resources/embeddings-provider.js +25 -0
  199. package/dist/resources/engine-version-stamp-boot.js +53 -0
  200. package/dist/resources/federation-classify.js +161 -0
  201. package/dist/resources/federation-crypto.js +5 -5
  202. package/dist/resources/federation-retry-lib.js +60 -0
  203. package/dist/resources/grant-visibility.js +135 -0
  204. package/dist/resources/harper-routing.js +83 -0
  205. package/dist/resources/health.js +163 -22
  206. package/dist/resources/host-pointer/registry.js +29 -0
  207. package/dist/resources/host-pointer-adapter.js +1 -0
  208. package/dist/resources/host-source-citation.js +49 -0
  209. package/dist/resources/host-source-visibility.js +7 -6
  210. package/dist/resources/in-process.js +24 -22
  211. package/dist/resources/instance-create-lock.js +17 -0
  212. package/dist/resources/instance-identity.js +23 -0
  213. package/dist/resources/instruction-version-record.js +587 -0
  214. package/dist/resources/internal-authority.js +13 -0
  215. package/dist/resources/key-lock.js +3 -3
  216. package/dist/resources/mcp-handler.js +141 -19
  217. package/dist/resources/mcp-oauth-env-guard.js +36 -0
  218. package/dist/resources/mcp-oauth-flag.js +12 -14
  219. package/dist/resources/mcp-oauth.js +450 -56
  220. package/dist/resources/mcp-tool-arguments.js +4 -6
  221. package/dist/resources/mcp-tools.js +187 -40
  222. package/dist/resources/memory-bootstrap-lib.js +5 -15
  223. package/dist/resources/memory-declared-attributes.js +4 -1
  224. package/dist/resources/memory-deletion-history.js +55 -0
  225. package/dist/resources/memory-durability.js +54 -0
  226. package/dist/resources/memory-embed-hash.js +144 -0
  227. package/dist/resources/memory-embedding-value.js +8 -0
  228. package/dist/resources/memory-host-source.js +32 -7
  229. package/dist/resources/memory-id-guard.js +75 -0
  230. package/dist/resources/memory-redaction.js +236 -0
  231. package/dist/resources/memory-reflect-lib.js +1 -1
  232. package/dist/resources/memory-supplied-vector.js +72 -0
  233. package/dist/resources/memory-write-lock.js +489 -0
  234. package/dist/resources/memory-write-response.js +139 -0
  235. package/dist/resources/memory-write-transaction.js +243 -0
  236. package/dist/resources/migration-boot.js +17 -12
  237. package/dist/resources/migrations/boot-progress.js +25 -0
  238. package/dist/resources/migrations/data-dir.js +90 -19
  239. package/dist/resources/migrations/dir-safety.js +61 -3
  240. package/dist/resources/migrations/embedding-stamp.js +462 -82
  241. package/dist/resources/migrations/export.js +1 -0
  242. package/dist/resources/migrations/graph-heal.js +27 -27
  243. package/dist/resources/migrations/ledger.js +5 -2
  244. package/dist/resources/migrations/lock.js +870 -77
  245. package/dist/resources/migrations/progress.js +71 -10
  246. package/dist/resources/migrations/runner.js +212 -18
  247. package/dist/resources/migrations/snapshot.js +1 -0
  248. package/dist/resources/migrations/source-fields.js +5 -5
  249. package/dist/resources/migrations/state.js +36 -1
  250. package/dist/resources/migrations/status.js +2 -13
  251. package/dist/resources/migrations/synthetic-test-migration.js +81 -12
  252. package/dist/resources/migrations/types.js +26 -1
  253. package/dist/resources/migrations/visibility-backfill.js +113 -72
  254. package/dist/resources/oauth-discovery.js +0 -5
  255. package/dist/resources/object-body-guard.js +40 -0
  256. package/dist/resources/org-event-created-at.js +133 -0
  257. package/dist/resources/org-event-reserved.js +92 -0
  258. package/dist/resources/org-event-write-fault.js +19 -0
  259. package/dist/resources/originator-instance.js +39 -7
  260. package/dist/resources/owner-delete-recheck.js +78 -0
  261. package/dist/resources/owner-field-guard.js +39 -5
  262. package/dist/resources/owner-scoped-write-policy.js +256 -0
  263. package/dist/resources/owner-scoped-writes.js +89 -0
  264. package/dist/resources/path-id-rewrite.js +76 -0
  265. package/dist/resources/presence-internal.js +5 -5
  266. package/dist/resources/presence-receipt.js +236 -0
  267. package/dist/resources/promotion-binding.js +43 -0
  268. package/dist/resources/promotion-stamp.js +143 -17
  269. package/dist/resources/protocol-context.js +189 -0
  270. package/dist/resources/record-owner-guard.js +74 -26
  271. package/dist/resources/record-type-kit.js +2 -4
  272. package/dist/resources/record-types.js +1 -1
  273. package/dist/resources/relay-ops.js +78 -6
  274. package/dist/resources/replay-store.js +96 -19
  275. package/dist/resources/request-target.js +163 -0
  276. package/dist/resources/request-transaction.js +46 -1
  277. package/dist/resources/search-readiness.js +4 -1
  278. package/dist/resources/seed-ids.js +9 -0
  279. package/dist/resources/seed-reservation.js +116 -0
  280. package/dist/resources/semantic-retrieval-core.js +27 -15
  281. package/dist/resources/server-row-validation.js +71 -0
  282. package/dist/resources/skill-manifest.js +24 -14
  283. package/dist/resources/skill-subject.js +53 -0
  284. package/dist/resources/skill-version-write.js +789 -0
  285. package/dist/resources/skill-write-fault.js +20 -0
  286. package/dist/resources/skill-write-policy.js +68 -0
  287. package/dist/resources/skill-write.js +67 -7
  288. package/dist/resources/soul-write-policy.js +26 -7
  289. package/dist/resources/table-helpers.js +10 -7
  290. package/dist/resources/table-subscription-policy.js +518 -85
  291. package/dist/resources/table-subscriptions.js +20 -7
  292. package/dist/resources/team-directory.js +248 -0
  293. package/dist/resources/tool-descriptors/index.js +69 -8
  294. package/dist/resources/txn-pause-point.js +235 -0
  295. package/dist/resources/usage-recording.js +186 -70
  296. package/dist/resources/write-back.js +383 -0
  297. package/dist/resources/write-journal-context.js +5 -0
  298. package/dist/resources/write-journal.js +289 -0
  299. package/dist/src/engine-version-contract.js +1 -0
  300. package/dist/src/keystore.js +72 -0
  301. package/dist/src/lib/agent-home-fields.js +132 -0
  302. package/dist/src/lib/agent-id-rule.js +88 -0
  303. package/dist/src/lib/agent-key-register.js +80 -0
  304. package/dist/src/lib/atomic-write.js +256 -0
  305. package/dist/src/lib/credential-status-rule.js +78 -0
  306. package/dist/src/lib/expired-by-agent.js +37 -0
  307. package/dist/src/lib/federation-retry-row.js +101 -0
  308. package/dist/src/lib/flair-agent-role.js +4 -0
  309. package/dist/src/lib/idp-mapping-rule.js +81 -0
  310. package/dist/src/lib/instance-identity-row.js +20 -0
  311. package/dist/src/lib/instruction-event-contract.js +17 -0
  312. package/dist/src/lib/mcp-oauth-env-core.js +133 -0
  313. package/dist/src/lib/memory-attributes.js +4 -0
  314. package/dist/src/lib/memory-id-policy.js +46 -0
  315. package/dist/src/lib/open-live-row.js +20 -0
  316. package/dist/src/lib/principal-status.js +29 -0
  317. package/dist/src/lib/proto-safe-record.js +42 -0
  318. package/dist/src/lib/reembed-server-support.js +66 -0
  319. package/dist/src/lib/scheduler-platform.js +10 -6
  320. package/dist/src/lib/soul-scope-fields.js +26 -0
  321. package/dist/src/lib/systemd-agent-id.js +38 -0
  322. package/dist/src/rem/promote-policy.js +3 -3
  323. package/dist/src/rem/scheduler.js +21 -4
  324. package/docs/access-control.md +164 -54
  325. package/docs/api-reference.md +165 -32
  326. package/docs/auth.md +46 -30
  327. package/docs/bridges.md +11 -0
  328. package/docs/claude-code.md +37 -7
  329. package/docs/deploying-on-fabric.md +178 -0
  330. package/docs/deployment.md +19 -0
  331. package/docs/embedding-in-a-harper-app.md +17 -15
  332. package/docs/entity-vocabulary.md +3 -6
  333. package/docs/federation.md +61 -3
  334. package/docs/hosted-on-fabric.md +43 -36
  335. package/docs/integrations.md +14 -14
  336. package/docs/mcp-clients.md +12 -7
  337. package/docs/n8n.md +17 -11
  338. package/docs/notes/mcp-agent-auth-consumer.md +16 -13
  339. package/docs/notes/mcp-oauth-model2.md +40 -11
  340. package/docs/openclaw.md +1 -1
  341. package/docs/quickstart-fabric.md +4 -4
  342. package/docs/quickstart.md +12 -4
  343. package/docs/releasing.md +25 -19
  344. package/docs/rem.md +32 -3
  345. package/docs/secrets-and-keys.md +21 -4
  346. package/docs/standalone-local.md +30 -2
  347. package/docs/supply-chain-policy.md +34 -16
  348. package/docs/the-team.md +2 -2
  349. package/docs/upgrade.md +46 -6
  350. package/package.json +24 -12
  351. package/schemas/agent-key-registration.graphql +22 -0
  352. package/schemas/agent.graphql +6 -3
  353. package/schemas/federation.graphql +41 -1
  354. package/schemas/memory.graphql +91 -7
  355. package/schemas/oauth.graphql +19 -0
  356. package/schemas/schema.graphql +2 -0
  357. package/templates/bin/flair-rem-nightly.sh.tmpl +7 -1
  358. package/templates/launchd/start-flair-with-admin-pass.sh +188 -10
  359. package/dist/resources/soul-adk-guard.js +0 -68
@@ -41,11 +41,11 @@ flair init --target https://<cluster>.<org>.harperfabric.com \
41
41
  - `--remote` marks it a federation **hub** and creates the `flair_pair_initiator` role; without it, pairing later fails role-not-found.
42
42
  - Generated admin password lands in `~/.tps/secrets/flair-fabric-hdb` (mode `0600`); `--flair-admin-pass` to choose your own.
43
43
 
44
- ### Port derivation trap
44
+ ### Operations endpoint
45
45
 
46
- Locally, Flair serves data on `19926` and the ops API on `19925`. The CLI derives **ops = data − 1** everywhere. A managed endpoint is HTTPS on 443 with no port, so derivation produces `:442` — where nothing answers.
46
+ Portless HTTPS targets derive the ops endpoint at `:9925`. <!-- docs-freshness-allow: Fabric ops API port (FABRIC_OPS_PORT), not legacy data port -->
47
47
 
48
- **Pass `--ops-target <url>` explicitly** (or set `FLAIR_OPS_TARGET`) on any command that touches the ops API: `init --target`, `agent add --target`, `federation token --target`.
48
+ Set `FLAIR_OPS_TARGET` to override the derived endpoint, including for `flair backup`.
49
49
 
50
50
  ---
51
51
 
@@ -59,56 +59,63 @@ On Fabric, configuration goes through the component's environment, not a local `
59
59
  | `HDB_ADMIN_PASSWORD` | Bootstrap password for the embedded Harper. | Set at install time. |
60
60
  | `FLAIR_KEY_PASSPHRASE` | Passphrase for federation key encryption. | Set for production federation deployments. |
61
61
 
62
- On Fabric / managed deploys, environment variables are provisioned through Harper's Fabric secrets mechanism (encrypted at rest with `enc:v1:` storage format).
62
+ On Fabric / managed deploys, Harper's secrets mechanism can provision environment variables (encrypted at rest with `enc:v1:` storage format). `flair mcp enable` uses a staged-file fallback when the push is unavailable or fails.
63
63
 
64
64
  ### How `flair mcp enable` delivers its secrets
65
65
 
66
- `flair mcp enable` needs five variables live in the target's process before it restarts — including `FLAIR_MCP_OAUTH` and the RS256 signing key, both read from `process.env` only and therefore impossible to deliver via `set_configuration`.
66
+ `flair mcp enable` provisions five variables for the target's process, including `FLAIR_MCP_OAUTH`, which is read from `process.env` only, so `set_configuration` cannot deliver it.
67
+
68
+ Use `--fabric` for a non-loopback custom-domain Fabric target.
67
69
 
68
70
  It asks the target what it can do, rather than assuming from the hostname or the version:
69
71
 
70
72
  | The target… | What happens |
71
73
  |-------------|--------------|
72
- | supports Harper's env-secrets operations | the five vars are **sealed locally** and pushed over the ops API. No manual step, no re-run. |
73
- | does not have them (Harper older than 5.2) | the vars are staged to a `0600` file and you apply them yourself, then re-run with `--confirm-secrets-applied` |
74
+ | returns a usable env-secrets public key | `enable` attempts a sealed push over the ops API. If the push fails, it reports a staged-file fallback. After confirmation, an already active surface can pass without a restart or re-run; restart if this run changed a secret value. If the surface is inactive, restart the Fabric target after a successful push, or apply the staged values and restart, then re-run with `--confirm-secrets-applied`. |
75
+ | reports no env-secrets public-key operation | the vars are staged to a `0600` file and you apply them yourself, then re-run with `--confirm-secrets-applied` |
74
76
  | is unreachable, refuses the probe, or answers unusably | same staged-file fallback, and the output says **which** of those happened |
75
77
 
76
- Values are encrypted **before leaving your machine** — AES-256-GCM on the value, RSA-OAEP(SHA-256) wrapping the key, addressed to a public key fetched from the target. Plaintext never appears in a request body, and the command's output carries variable *names* only.
78
+ For an automated push, values are encrypted **before leaving your machine** — AES-256-GCM on the value, RSA-OAEP(SHA-256) wrapping the key, addressed to a public key fetched from the target. Plaintext does not appear in the push request body, and the command's output names variables without showing their values.
77
79
 
78
- The staging file is written in every case, so a fallback never strands you mid-run. When the push succeeds it simply goes unused.
80
+ At secrets provisioning, `enable` stages the file before any probe or push; dry runs stop earlier. A successful push leaves it unused.
79
81
 
80
- > **What the probe does not promise.** It establishes that the target accepts secrets, not that it will *decrypt* them — no read-only call can, since a secret only proves it was decrypted by being present in the process. The **self-verify** step at the end is what proves that. Note the endpoint does *not* go quiet when the flag is off — flair serves its own OAuth 2.1 discovery document instead, and self-verify tells them apart by the advertised `token_endpoint` (`/OAuthToken` is flair's own; the MCP one is `/oauth/mcp/token`). So a secret that is stored and never decrypted fails at self-verify with a message naming `FLAIR_MCP_OAUTH`, rather than reporting success.
82
+ > **What the probe does not promise.** When successful, it returns a public key for a possible push; it does not prove the push succeeds or that the target process loads the values. `enable` checks the target's MCP token endpoint and public metadata before reporting success. Flair also serves OAuth metadata when the MCP flag is off: the target check distinguishes Flair's `/OAuthToken` from the MCP `/oauth/mcp/token`. An already active surface can pass these checks before newly pushed values are loaded; restart if this run changed a secret value.
81
83
 
82
84
  `--secrets-mechanism <fabric-env-secrets|env-file>` remains an explicit override and skips the probe entirely.
83
85
 
84
86
  ### The `mcp.enabled` operator step (Fabric)
85
87
 
86
- MCP is **off by default**. The shipped component `config.yaml` contains
87
- `@harperfast/oauth` → `mcp` → `enabled: false`. Until [flair#1152](https://github.com/tpsdev-ai/flair/issues/1152)
88
- lands (interpolate from env — *ON HOLD*), you must flip this manually:
89
-
90
- 1. In your deployed component's `config.yaml`, change:
91
- ```yaml
92
- '@harperfast/oauth':
93
- mcp:
94
- enabled: true # was: false
95
- ```
96
- 2. Re-deploy the component so Harper picks up the new value.
97
- 3. **Verify the `/mcp` surface is actually serving** (the flag alone does not
98
- guarantee it — a secret that is stored but never decrypted fails at self-verify):
99
- ```bash
100
- # Check /mcp is reachable and returning MCP protocol (not a loopback proxy or 404)
101
- curl -sf https://<cluster>.<org>.harperfabric.com/mcp
102
- # Should return MCP JSON-RPC content; if you get HTML redirect or 404 the flag
103
- # is not effective
104
- ```
105
-
106
- **⚠ SECURITY CAVEAT — the upgrade-reverts trap.** Any package update or fleet component
107
- update re-ships the literal `enabled: false` and silently darkens a live `/mcp` surface.
108
- You must **re-flip to `true` after every upgrade** and re-deploy. An updated component
109
- without this re-flip will appear healthy (`/Health` green) while its MCP tools are
110
- dark to every connected client. If you rely on MCP, add the re-flip to your upgrade
111
- runbook.
88
+ MCP is **off by default**. The shipped component `config.yaml` contains the `@harperfast/oauth` block
89
+ uncommented with `mcp.enabled: ${FLAIR_MCP_OAUTH}`, a whole-token environment reference
90
+ ([flair#1152](https://github.com/tpsdev-ai/flair/issues/1152)), so the on/off choice lives in the
91
+ instance's environment and a re-packed deploy cannot revert it. There is no `config.yaml` edit and no
92
+ re-deploy to make.
93
+
94
+ For **`*.harperfabric.com` targets** or non-loopback custom-domain targets selected with `--fabric`, `flair mcp enable` does not restart the instance. It provisions the secrets, then checks the MCP
95
+ surface in this order:
96
+
97
+ 1. **Target/issuer binding.** The target's *own* metadata at
98
+ `<instance-url>/.well-known/oauth-authorization-server` must name the verified issuer and advertise
99
+ the MCP token endpoint `/oauth/mcp/token`. A mismatch refuses the run.
100
+ 2. **Public-origin self-verify.** Metadata at the same path is fetched from the public issuer. The check
101
+ requires a matching issuer, the issuer's `/oauth/mcp/token` endpoint, and advertised
102
+ CIMD support. `flair mcp status`
103
+ uses this check.
104
+
105
+ Then one of:
106
+
107
+ - **Self-verify passes.** The run prints the paste block. If this run changed a secret value, restart the
108
+ instance so its process picks the new value up.
109
+ - **It answers but does not pass** (HTTP 404, flair's own authorization server, or CIMD not advertised).
110
+ The step fails, reports the metadata problem, and gives generic apply-or-restart advice. Re-run
111
+ `flair mcp enable` with the same options plus `--confirm-secrets-applied`.
112
+ - **The request fails** (DNS, connection, TLS, timeout). The step fails and says the public issuer could
113
+ not be reached, quoting the URL and the error. It gives no activation instruction; it asks you to check
114
+ that the host resolves, that this machine can reach it over HTTPS, and that the instance is running in
115
+ Fabric — then re-run with `--confirm-secrets-applied`.
116
+
117
+ After applying the secrets and restarting, re-run with `--confirm-secrets-applied`. The run passes only if
118
+ the target's issuer and MCP token endpoint match, and the public metadata and CIMD checks pass.
112
119
 
113
120
  ---
114
121
 
@@ -1,8 +1,8 @@
1
1
  # Flair integrations
2
2
 
3
- Where Flair already runs. Each integration can reach one shared Flair memory store; signed requests identify an agent, while other verified agents may read its non-private records, and n8n uses admin Basic auth.
3
+ Where Flair already runs. Each integration can reach one shared Flair memory store; signed requests identify an agent. Reads follow each resource's policy: Memory uses owner/visibility scope with an additional current-authority check for retained closed skills, while Credential records are owner-only for non-admin callers.
4
4
 
5
- > **The point.** Memory can follow an agent across orchestrators. Integrations using an ordinary Ed25519 agent key can write under that identity and read their own plus other agents' non-private records. Administrator agent roles have broader authority. n8n uses Harper administrator Basic auth; stdio MCP, Pi, LangGraph, and the wake runner can also use it when no signing key resolves. Administrator Basic auth can read private records and write under any agent ID. Choose an integration with its authentication and recall behavior in mind.
5
+ > **The point.** Memory can follow an agent across orchestrators. Integrations using an ordinary Ed25519 agent key can write under that identity. Reads follow each resource's policy: Memory uses owner/visibility scope with an additional current-authority check for retained closed skills, while Credential records are owner-only for non-admin callers. Administrator agent roles have broader authority. n8n signs with Agent Private Key selected; its deprecated Admin Password path uses administrator Basic only with an empty key. stdio MCP, Pi, LangGraph, and the wake runner can use administrator Basic auth when no signing key resolves. Administrator Basic auth can read private records and write under any agent ID. Choose an integration with its authentication and recall behavior in mind.
6
6
 
7
7
  ---
8
8
 
@@ -20,11 +20,11 @@ Where Flair already runs. Each integration can reach one shared Flair memory sto
20
20
  | **DeepSeek Harness** (`dsh`) | [`flair-mcp`](deepseek-harness.md) | Cordis overlay | First-party MCP bridge; tools-only, reactive recall — [dedicated page](deepseek-harness.md) |
21
21
  | **LangGraph (TS)** | [`langgraph-flair`](#langgraph-typescript) | FlairClient | FlairStore provides get, put, delete, search, and batch (limitations apply) |
22
22
  | **OpenClaw** | [`openclaw-flair`](#openclaw) | Ed25519 | Native plugin (context-engine slot left intact) |
23
- | **n8n** | [`n8n-nodes-flair`](#n8n) | FlairApi credential | Three nodes (chat memory, search, store) |
23
+ | **n8n** | [`n8n-nodes-flair`](#n8n) | Ed25519 with Agent Private Key selected; deprecated administrator Basic | Three nodes (chat memory, search, store) |
24
24
  | **Hermes Agent** | [`hermes-flair`](#hermes-agent) | Ed25519 | Python `MemoryProvider` |
25
- | **Pi agent** | [`pi-flair`](#pi-agent) | Ed25519 | Native pi extension (pi has no MCP support); with `--agent <id>` and wiring enabled, `flair init` attempts Pi wiring for `--client pi`, for detected Pi under `--client all`, or for detected Pi when `--client` is omitted; `--client none` and `--no-mcp` skip it. |
26
- | **Google ADK** (Python) | [`adk-flair`](../packages/adk-flair/README.md) | Ed25519 | `BaseMemoryService`; see [hosted auth](#hosted-flair-auth--your-agent-got-a-404) if you just got a 404 |
27
- | **Google ADK** (JS/TS) | [`@tpsdev-ai/adk-flair`](../packages/adk-flair-js/README.md) | Ed25519 | Same identity model as the Python package |
25
+ | **Pi agent** | [`pi-flair`](#pi-agent) | Ed25519 | Native pi extension; with `--agent <id>` and wiring enabled, `flair init` attempts Pi wiring for `--client pi`, for detected Pi under `--client all`, or for detected Pi when `--client` is omitted; `--client none` and `--no-mcp` skip it. |
26
+ | **Google ADK** (Python) | [`adk-flair`](https://github.com/tpsdev-ai/flair/blob/main/packages/adk-flair/README.md) | Ed25519 | `BaseMemoryService`; see [hosted auth](#hosted-flair-auth--your-agent-got-a-404) if you just got a 404 |
27
+ | **Google ADK** (JS/TS) | [`@tpsdev-ai/adk-flair`](https://github.com/tpsdev-ai/flair/blob/main/packages/adk-flair-js/README.md) | Ed25519 | Same identity model as the Python package |
28
28
 
29
29
  Don't see your harness? If it speaks **MCP** — Flair already works with `flair-mcp`. For a custom memory protocol such as LangGraph's `BaseStore` or CrewAI's `RAGStorage`, an adapter must translate that protocol's operations to Flair; [open an issue](https://github.com/tpsdev-ai/flair/issues) or [send a PR](https://github.com/tpsdev-ai/flair).
30
30
 
@@ -76,14 +76,14 @@ A verified agent that is not allowed the row gets 404, never 403. Anonymous by-i
76
76
 
77
77
  | Adapter | URL | Agent id | Keyfile | Hosted extras |
78
78
  |---|---|---|---|---|
79
- | **adk-flair** (Python) | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEYFILE` | `FLAIR_ALLOW_REMOTE_URL=1`, `FLAIR_HTTP_TIMEOUT` — [adk-flair README](../packages/adk-flair/README.md#hosted-flair) |
80
- | **adk-flair-js** (JS/TS) | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEYFILE` | For a non-localhost URL, set `FLAIR_ALLOW_REMOTE_URL=1`; request timeout comes from constructor `timeoutMs` (default 2000 ms), not `FLAIR_HTTP_TIMEOUT` — [adk-flair-js README](../packages/adk-flair-js/README.md) |
79
+ | **adk-flair** (Python) | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEYFILE` | `FLAIR_ALLOW_REMOTE_URL=1`, `FLAIR_HTTP_TIMEOUT` — [adk-flair README](https://github.com/tpsdev-ai/flair/blob/main/packages/adk-flair/README.md#hosted-flair) |
80
+ | **adk-flair-js** (JS/TS) | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEYFILE` | For a non-localhost URL, set `FLAIR_ALLOW_REMOTE_URL=1`; request timeout comes from constructor `timeoutMs` (default 2000 ms), not `FLAIR_HTTP_TIMEOUT` — [adk-flair-js README](https://github.com/tpsdev-ai/flair/blob/main/packages/adk-flair-js/README.md) |
81
81
  | **flair-mcp** / Cursor plugin | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEY_PATH` (optional; auto-resolved) | Key must be on the **npx host** |
82
82
  | **Hermes** | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEY_PATH` or Hermes `key_path` | Same Ed25519 model |
83
83
  | **Pi** | `FLAIR_URL` | `FLAIR_AGENT_ID` | `FLAIR_KEY_PATH` or Pi client `keyPath` | Same Ed25519 model |
84
84
  | **LangGraph** | `FLAIR_URL` | `config.agentId` (required) | Signed requests use `config.privateKey`, `config.keyPath`, or automatic key candidates (`FLAIR_KEY_DIR`, then standard paths); it does not read `FLAIR_KEY_PATH`. | Admin credentials provide a Basic-auth fallback when no key is available. |
85
85
 
86
- n8n still uses Harper admin Basic auth — it is not this path. See [n8n.md](n8n.md#security).
86
+ n8n signs as its credential's Agent ID with Agent Private Key selected. See [n8n.md](n8n.md#3-create-the-credential).
87
87
 
88
88
  ---
89
89
 
@@ -173,7 +173,7 @@ const store = new FlairStore({ agentId: "my-langgraph-agent" });
173
173
  const agent = createReactAgent({ llm, tools, store });
174
174
  ```
175
175
 
176
- Maps LangGraph namespaces to Flair tags, keys to ids, values to JSON content. Non-empty search queries call Flair's `/SemanticSearch` endpoint. The server selects hybrid (BM25 plus vector), vector-only, or BM25-only retrieval; embedding availability affects whether the vector leg can run. Filter operators applied client-side. Full mapping table: [`packages/langgraph-flair/README.md`](../packages/langgraph-flair/README.md).
176
+ Maps LangGraph namespaces to Flair tags, keys to ids, values to JSON content. Non-empty search queries call Flair's `/SemanticSearch` endpoint. The server selects hybrid (BM25 plus vector), vector-only, or BM25-only retrieval; embedding availability affects whether the vector leg can run. Filter operators applied client-side. Full mapping table: [`packages/langgraph-flair/README.md`](https://github.com/tpsdev-ai/flair/blob/main/packages/langgraph-flair/README.md).
177
177
 
178
178
  This package contains the TypeScript adapter; it does not include a Python implementation.
179
179
 
@@ -187,7 +187,7 @@ This package contains the TypeScript adapter; it does not include a Python imple
187
187
  openclaw plugins install @tpsdev-ai/openclaw-flair
188
188
  ```
189
189
 
190
- Configuration via OpenClaw's standard plugin surface. See [`docs/openclaw.md`](openclaw.md) for the per-agent install pattern. The host's own workspace files load each agent's `SOUL.md` / `AGENTS.md`; Flair does not manage or anchor these.
190
+ Configuration via OpenClaw's standard plugin surface. See [`docs/openclaw.md`](openclaw.md) for the per-agent install pattern. The host's own workspace files load each agent's `SOUL.md` / `AGENTS.md`; Flair does not manage or anchor these. <!-- docs-freshness-allow: names files in the host's workspace -->
191
191
 
192
192
  ---
193
193
 
@@ -201,7 +201,7 @@ Configuration via OpenClaw's standard plugin surface. See [`docs/openclaw.md`](o
201
201
 
202
202
  The FlairApi credential provides authentication.
203
203
 
204
- **FlairApi credential** — Harper administrator password for Basic authentication; Agent ID selects memory ownership and does not restrict the credential's instance-wide authority.
204
+ **FlairApi credential** — with Agent Private Key selected, requests sign as Agent ID. Ordinary agents read their own and other agents' non-private memories. The deprecated Admin Password path uses Harper administrator Basic authentication only with an empty Agent Private Key, and warns on each node execution.
205
205
 
206
206
  Install via the standard n8n community-node UI (Settings → Community nodes → `@tpsdev-ai/n8n-nodes-flair`) or:
207
207
 
@@ -227,7 +227,7 @@ Auth: TPS-Ed25519 (the same model the rest of Flair uses) — writes are isolate
227
227
 
228
228
  ## Pi agent
229
229
 
230
- [`@tpsdev-ai/pi-flair`](https://www.npmjs.com/package/@tpsdev-ai/pi-flair) is the **native pi extension** for the [Pi coding agent](https://github.com/mariozechner/pi-coding-agent) — pi has no MCP client support, so this is a first-party plugin, not an MCP bridge. Memory + identity (`memory_search`, `memory_store`, `bootstrap`) for the pi runtime.
230
+ [`@tpsdev-ai/pi-flair`](https://www.npmjs.com/package/@tpsdev-ai/pi-flair) is the **native pi extension** for the [Pi coding agent](https://github.com/mariozechner/pi-coding-agent). Memory + identity (`memory_search`, `memory_store`, `bootstrap`) for the pi runtime.
231
231
 
232
232
  To provision an agent and wire Pi, use the init command below; if the agent is already provisioned, install the extension with Pi's installer.
233
233
 
@@ -256,7 +256,7 @@ export FLAIR_AGENT_ID=my-agent # per host/purpose
256
256
  pi
257
257
  ```
258
258
 
259
- Full details (tools, env reference, auto-recall/auto-capture flags, security notes): [`packages/pi-flair/README.md`](../packages/pi-flair/README.md).
259
+ Full details (tools, env reference, auto-recall/auto-capture flags, security notes): [`packages/pi-flair/README.md`](https://github.com/tpsdev-ai/flair/blob/main/packages/pi-flair/README.md).
260
260
 
261
261
  ---
262
262
 
@@ -33,7 +33,7 @@ The snippets below are the **local** path. Flair also has a native `/mcp` endpoi
33
33
  | MCP client on this machine (Claude Code, Cursor, Codex, Gemini, and the snippets below) | `npx -y @tpsdev-ai/flair-mcp@<version>` stdio adapter | Ed25519 over HTTP to the instance |
34
34
  | Remote MCP client that must dial a public HTTPS origin | Native `/mcp` on the instance | OAuth bearer. Unmounted until `FLAIR_MCP_OAUTH=true` and a public issuer are set (otherwise the path 404s). |
35
35
 
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.
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` accepts loopback or unspecified targets for the local restart but refuses local issuers. 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.
37
37
 
38
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).
39
39
 
@@ -261,7 +261,7 @@ reports that pending-approval state as configured but delivery not verified.
261
261
  Some clients have no session-start hook Flair can write. Wiring the MCP
262
262
  server is necessary but not sufficient — the model still has to choose to
263
263
  call `bootstrap`. Add a short instruction block to the file that client
264
- already loads (`AGENTS.md`, `GEMINI.md`, or the equivalent):
264
+ already loads (`AGENTS.md`, `GEMINI.md`, or the equivalent): <!-- docs-freshness-allow: names files in the reader's project -->
265
265
 
266
266
  ```markdown
267
267
  ## Flair memory
@@ -291,7 +291,7 @@ If you see (a) the agent calling the `bootstrap` tool returning soul + recent me
291
291
 
292
292
  ## What the MCP server exposes
293
293
 
294
- Clients on this page talk to the stdio server `@tpsdev-ai/flair-mcp`. Its `tools/list` advertises these sixteen tools, in this order. The embedded HTTP `/mcp` handler is a different set: it also advertises `memory_basement`, `memory_restore`, and `attention`, and it does not advertise `relationship_store` or `flair_catchup`.
294
+ Clients on this page talk to the stdio server `@tpsdev-ai/flair-mcp`. Its `tools/list` advertises these seventeen tools, in this order. The embedded HTTP `/mcp` handler is a different set: it also advertises `memory_basement`, `memory_restore`, and `attention`, and it does not advertise `relationship_store` or `flair_catchup`.
295
295
 
296
296
  | Tool | What it does |
297
297
  |---|---|
@@ -299,7 +299,7 @@ Clients on this page talk to the stdio server `@tpsdev-ai/flair-mcp`. Its `tools
299
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 |
300
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 |
301
301
  | `skill_search` | Rank skills by their trigger against a task. Returns a catalog (id, name, trigger, description, tags, agentId), not the procedure |
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 |
302
+ | `skill_get` | Fetch one skill's full procedure by id. Non-admin callers use Memory's owner/visibility scope and, for retained closed skills, its current-authority check; administrators are not subject to those restrictions |
303
303
  | `memory_update` | Update a memory by id. Overwrites in place, or pass `preserveHistory` to write a superseding version. Optional `usedMemoryIds` |
304
304
  | `memory_get` | Fetch a specific memory by ID |
305
305
  | `memory_delete` | Delete a memory by ID. Non-admin callers can delete only their own memories; administrators can also delete other agents' memories |
@@ -310,9 +310,12 @@ Clients on this page talk to the stdio server `@tpsdev-ai/flair-mcp`. Its `tools
310
310
  | `flair_workspace_set` | Set this agent's workspace state (ref, label, provider, task, phase, summary) in the Office Space |
311
311
  | `flair_orgevent` | Publish an org-wide coordination event (claim, release, or status), attributed to the caller |
312
312
  | `flair_catchup` | Drain this agent's own org-event catch-up feed. Page with `after`; advance the watermark with `ack` |
313
+ | `team_directory` | List active agents with published tps-mail contacts. Filter by `id` or `name`; page with `cursor`/`limit` |
313
314
  | `record_usage` | Report that recalled memories were actually used (`memoryId` or `memoryIds`, plus optional `attribution`). Drives `usageCount` / `usageBoost` |
314
315
 
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)).
316
+ On the embedded `/mcp` handler, `soul_set` is listed only for a caller the soul write policy's source-authorization step admits (`Soul.post` applies its content guards after that step). That route authenticates callers with OAuth bearer tokens: a token subject mapped to an Agent acts as an agent principal, and the policy refuses an agent principal, so an agent's `tools/list` does not include `soul_set`. Listing resolves the caller the way a call does, except that it never JIT-provisions. An agent's soul is changed by the operator, on the agent's behalf (`flair soul set`).
317
+
318
+ 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: reads use the open-within-org base scope without a grant, with an additional current-authority check for non-admin by-id and collection reads of retained closed skills (see [SECURITY.md](../SECURITY.md)).
316
319
 
317
320
  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.
318
321
 
@@ -322,6 +325,8 @@ The following structured-payload details describe the HTTP bootstrap response an
322
325
 
323
326
  `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.
324
327
 
328
+ **The structured containers carry no host-source pointer (flair#2448).** A `memories` or `predicted` entry omits `hostSource`. A visible, bound pointer appears in the bootstrap PROSE only when `includeContext` is true, for an authenticated non-admin caller; the admin bootstrap prose is uncited. A non-admin structured consumer that needs the pointer reads the memory back through the gated Memory read — `memory_get` by id — which renders the pointer that caller may see. An admin `memory_get` takes no pointer join, so it does not render the pointer either.
329
+
325
330
  **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
331
 
327
332
  **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.
@@ -346,7 +351,7 @@ The MCP server has no client-side flags beyond these env vars; everything else (
346
351
 
347
352
  ## What about pi?
348
353
 
349
- pi has no MCP client support, so Flair ships a **native pi extension** instead: [`@tpsdev-ai/pi-flair`](../packages/pi-flair/README.md). Same backend. With an ordinary signed identity, writes are owned by that agent; reads admit its own records and other agents' non-private records. Zero MCP in the path.
354
+ Flair ships a **native pi extension**: [`@tpsdev-ai/pi-flair`](https://github.com/tpsdev-ai/flair/blob/main/packages/pi-flair/README.md). Same backend. With an ordinary signed identity, writes are owned by that agent. Reads follow each resource's policy: Memory uses owner/visibility scope with an additional current-authority check for retained closed skills, while Credential records are owner-only for non-admin callers. Zero MCP in the path.
350
355
 
351
356
  Wiring is a `packages` entry in pi's own settings (`~/.pi/agent/settings.json`), not an `mcpServers` block:
352
357
 
@@ -364,7 +369,7 @@ One difference from the MCP clients above: pi settings carry no per-package `env
364
369
 
365
370
  ## What about Hermes (Nous Research)?
366
371
 
367
- Hermes uses its own Python-native `MemoryProvider` ABC instead of MCP. It has its own Flair integration in [`packages/hermes-flair/`](../packages/hermes-flair). Same backend. With an ordinary signed identity, writes are owned by that agent; reads admit its own records and other agents' non-private records. Different plug shape.
372
+ Hermes uses its own Python-native `MemoryProvider` ABC instead of MCP. It has its own Flair integration in [`packages/hermes-flair/`](../packages/hermes-flair). Same backend. With an ordinary signed identity, writes are owned by that agent. Reads follow each resource's policy: Memory uses owner/visibility scope with an additional current-authority check for retained closed skills, while Credential records are owner-only for non-admin callers. Different plug shape.
368
373
 
369
374
  Future MCP-capable agent CLIs (and there are more landing every month) will work out of the box with the MCP server above — no per-framework adapter required from us.
370
375
 
package/docs/n8n.md CHANGED
@@ -13,7 +13,7 @@ Flair is the right pick when you want:
13
13
  | **Shape** | Tagged + typed memories with semantic search, plus chat-buffer compatibility | Conversation-buffer only (LangChain `BaseMessage` records) |
14
14
  | **Cross-orchestrator** | Same memory readable from Claude Code, OpenClaw, n8n | n8n-internal schema; nothing else reads it |
15
15
  | **Cross-instance** | Hub-spoke federation built-in (local ↔ Fabric, etc.) | Single-instance unless you self-build replication |
16
- | **Identity** | Ed25519 per-agent (planned) or admin-token (v1) | n8n credential per workflow |
16
+ | **Identity** | Ed25519 with Agent Private Key selected; the v1 admin password is still accepted, deprecated | n8n credential per workflow |
17
17
 
18
18
  If your AI Agent only needs to remember the last N turns of a single chat in a single n8n instance, Postgres-as-memory is fine. If you want the same memory to inform a Claude Code conversation tomorrow, or to persist across n8n redeploys via federated Flair, this package is the path.
19
19
 
@@ -39,10 +39,20 @@ In n8n: **Credentials → New → Flair API**. Fill in:
39
39
  | Field | Value |
40
40
  |---|---|
41
41
  | **Base URL** | `http://localhost:19926` (or your team's Flair URL) |
42
- | **Agent ID** | Logical identity that will own memories from this n8n workspace. Workflows that share an Agent ID share memory ownership. Use distinct Agent IDs to organize ownership; the shared admin credential can access the whole instance. |
43
- | **Admin Password** | Your Flair admin password (in `~/.flair/admin-pass` for local installs). **Sensitive** — see [Security](#security). |
42
+ | **Agent ID** | The memory owner and, with Agent Private Key selected, signing identity, e.g. `n8n-support`. Workflows that share an Agent ID share memory ownership. |
43
+ | **Agent Private Key** | That agent's Ed25519 private key. |
44
44
 
45
- Click **Test** — if the test request to `/Memory` returns 200, the credential is good.
45
+ Register a new agent with `flair agent add n8n-support`, or use an existing agent's matching key:
46
+
47
+ ```bash
48
+ base64 < ~/.flair/keys/n8n-support.key
49
+ ```
50
+
51
+ Paste the base64 output into **Agent Private Key**.
52
+
53
+ Click **Test** — it reads `/Memory` using the selected auth mode and reports that mode on success.
54
+
55
+ **Admin Password (deprecated)** — used only with Agent Private Key empty. Requests use Harper administrator Basic authentication, including access to other agents' private memories, and each node execution warns.
46
56
 
47
57
  ### 4. Wire the nodes
48
58
 
@@ -81,15 +91,11 @@ Patterns:
81
91
 
82
92
  ## Security
83
93
 
84
- > **The admin password gives every workflow with this credential read/write access to the entire Flair instance**, not just the configured Agent ID. The blast radius is the whole memory store. Treat the credential as highly sensitive: n8n encrypts credentials at rest, but any n8n admin or backup restore can extract it.
85
-
86
- For production deployments where untrusted workflow inputs reach Flair, wait for **Ed25519 per-agent authentication** (planned). v1 (admin password) is appropriate when:
94
+ With Agent Private Key selected, requests sign as the credential's Agent ID. Ordinary agents write their own memories and read their own plus other agents' non-private memories; administrator-role agents have broader authority.
87
95
 
88
- - The n8n instance is single-tenant and operator-controlled
89
- - Workflow inputs are trusted (your own CRM, your own webhook source)
90
- - Memory leakage between agents is acceptable for the use case
96
+ The deprecated **Admin Password** path uses Harper administrator Basic authentication, with access to other agents' private memories. It is used only while Agent Private Key is empty, and every execution that uses it logs a warning. To migrate, set Agent Private Key (step 3).
91
97
 
92
- If any of those don't hold, use Flair's CLI / SDK clients (which support per-agent Ed25519 today) and wait for the n8n credential update.
98
+ Treat the key as a secret.
93
99
 
94
100
  ## Get By Tag
95
101
 
@@ -37,11 +37,19 @@ header `{alg: "EdDSA", typ: "JWT"}`; claims `iss = sub = client_id`, `aud =
37
37
  token endpoint`, `exp - iat ≤ 60s` (hard-capped, not just defaulted), `iat`,
38
38
  random `jti`. Signed with `node:crypto` alone (no new dependency, matching
39
39
  the plugin's own approach and this repo's existing `flair-client.mjs` /
40
- `buildEd25519Auth` signing style). The claim shape is pinned to what PR #165
40
+ `buildEd25519Auth` signing style). The default claim shape is pinned to what PR #165
41
41
  (`src/lib/mcp/clientAssertion.ts`) verifies, and
42
- `test/unit/mcp-client-credentials-live-package.test.ts` proves assertions
43
- this module signs pass the plugin's **real** `verifyClientAssertion` —
44
- including negative cases (wrong signing key, tampered payload).
42
+ `test/unit/mcp-client-credentials-live-package.test.ts` proves default-form
43
+ assertions this module signs pass the pinned plugin's **real**
44
+ `verifyClientAssertion`; it also checks refusals for the issuer form, wrong
45
+ signing keys, and tampered payloads.
46
+
47
+ The audience form is a transition switch (`FLAIR_MCP_CLIENT_ASSERTION_AUDIENCE`,
48
+ or `flair mcp token --assertion-audience`): the default is the shape above, and
49
+ `issuer` signs `aud` = the authorization server metadata document's `issuer`
50
+ with `typ: "client-authentication+jwt"` — the RFC 7523bis form, for the
51
+ verifier release that accepts it (HarperFast/oauth #245, merged upstream but
52
+ not released).
45
53
 
46
54
  Key loading (`resolveAgentKeyPath` / `loadEd25519PrivateKeyFromFile`) mirrors
47
55
  `src/cli.ts`'s existing `resolveKeyPath` / `buildEd25519Auth` (used by the
@@ -76,8 +84,7 @@ cache (e.g. after an unexpected 401).
76
84
  CLI: `flair mcp token --agent-id <id>` now performs the real mint by
77
85
  default; `--dry-run` restores the old sign-and-print behavior.
78
86
  `--client-id`/`--token-endpoint`/`--resource` default to this instance's own
79
- oauth surface (derived from `FLAIR_MCP_ISSUER` / `FLAIR_PUBLIC_URL`,
80
- matching `resources/mcp-oauth-flag.ts`) but are fully overridable — an
87
+ oauth surface (derived from `FLAIR_MCP_ISSUER` / `FLAIR_PUBLIC_URL`) but are fully overridable — an
81
88
  agent can authenticate to a **different** Harper MCP server; identity is
82
89
  portable.
83
90
 
@@ -85,9 +92,7 @@ portable.
85
92
 
86
93
  `buildTokenRequestForm` carries an optional `resource` field, pass-through
87
94
  only (it never invents a value). The CLI supplies the default:
88
- `${FLAIR_MCP_ISSUER}/mcp`, the same canonical resource identifier
89
- `resources/mcp-oauth-flag.ts`'s `mcpResource()` uses for this instance's own
90
- `/mcp` audience binding — exact-match, fail-closed on the AS side. The
95
+ `${FLAIR_MCP_ISSUER}/mcp` (falling back to `FLAIR_PUBLIC_URL`). The
91
96
  `resource` is part of the token-cache key: a token minted for one resource
92
97
  never serves another.
93
98
 
@@ -96,7 +101,7 @@ never serves another.
96
101
  Each agent's Client ID Metadata Document is **served**, not just generated:
97
102
  `GET /MCPClientMetadata/{agentId}` (public, unauthenticated — mirrors
98
103
  `AgentCard.ts`'s A2A-card posture). `client_id` = that URL itself (derived
99
- from `mcpIssuer()`, same env vars as above); `jwks` = the agent's existing
104
+ from `FLAIR_MCP_ISSUER` / `FLAIR_PUBLIC_URL`); `jwks` = the agent's existing
100
105
  `Agent.publicKey` re-expressed as a JWK OKP.
101
106
 
102
107
  Why served rather than exported for external hosting: Flair already
@@ -208,9 +213,7 @@ in-process proof, not measured; everything else above is measured.
208
213
  Whoever owns the AS-side `@harperfast/oauth` config for a given Harper
209
214
  instance MUST add this Flair instance's `MCPClientMetadata` host to
210
215
  `clientIdMetadataDocuments.allowedHosts`. That host is derived from
211
- `FLAIR_MCP_ISSUER` (or `FLAIR_PUBLIC_URL` as fallback) — the same env var
212
- `mcpIssuer()` in `resources/mcp-oauth-flag.ts` and `defaultMcpClientId()` in
213
- `src/mcp-client-assertion.ts` both read. If the allowlist isn't updated,
216
+ `FLAIR_MCP_ISSUER` (or `FLAIR_PUBLIC_URL` as fallback). If the allowlist isn't updated,
214
217
  `/mcp` client_credentials auth for this agent fails closed (by design; the
215
218
  e2e proves the "Unknown client" rejection live). This is an operational
216
219
  step, not a code change; flag it explicitly when coordinating a rollout.
@@ -6,7 +6,7 @@
6
6
  > Do NOT enable in production until Sherlock signs off on live enablement.
7
7
 
8
8
  This is the **Model 2** native-MCP path: a custom in-process `/mcp` JSON-RPC
9
- handler guarded by `@harperfast/oauth`'s `withMCPAuth`, serving the 17 tools in `resources/mcp-tools.ts`
9
+ handler guarded by `@harperfast/oauth`'s `withMCPAuth`, serving the 18 tools in `resources/mcp-tools.ts`
10
10
  with a per-agent OAuth identity. It is distinct from the
11
11
  native-application-MCP surface (design A / `FLAIR_MCP_ENABLED`); Model 2 does not
12
12
  use Harper's native MCP transport, so it is not blocked by the Harper native-MCP
@@ -18,10 +18,9 @@ gating gaps.
18
18
  Streamable HTTP: `initialize` / `tools/list` / `tools/call` / `ping`. On
19
19
  `tools/call` it resolves the verified token `sub` → a flair `Agent`, then
20
20
  dispatches to the curated tool.
21
- - `resources/mcp-tools.ts` — the 17 tools in `resources/mcp-tools.ts`, each a thin wrapper over the existing resource handler
21
+ - `resources/mcp-tools.ts` — the 18 tools in `resources/mcp-tools.ts`, delegating to resource handlers or the team-directory resolver
22
22
  (Memory / SemanticSearch / BootstrapMemories / Soul / WorkspaceState /
23
- OrgEvent / AttentionQuery / RecordUsage). No raw CRUD surface — the only path to the datastore through `/mcp`
24
- is one of the 17 tools in `resources/mcp-tools.ts`. Curated **by construction**.
23
+ OrgEvent / AttentionQuery / RecordUsage / the team-directory resolver).
25
24
  - `resources/mcp-oauth.ts` — registers `server.http(withMCPAuth(mcpHandler),
26
25
  { urlPath: '/mcp' })` **only when `FLAIR_MCP_OAUTH` is on.** `/mcp` runs on its
27
26
  own dispatch chain; flair's default auth-middleware does not run for it.
@@ -130,6 +129,7 @@ registered identities.
130
129
  github:
131
130
  clientId: ${OAUTH_GITHUB_CLIENT_ID}
132
131
  clientSecret: ${OAUTH_GITHUB_CLIENT_SECRET}
132
+ redirectUri: ${OAUTH_GITHUB_REDIRECT_URI} # this instance's public origin + /oauth; the plugin appends '/github/callback'. Since @harperfast/oauth 2.7.0 a CONFIGURED provider needs it (2.8.1 skips an unconfigured one first — HarperFast/oauth#259)
133
133
  mcp:
134
134
  enabled: ${FLAIR_MCP_OAUTH} # whole-token env reference (flair#1152) — the choice lives in the ENVIRONMENT, so a re-packed deploy can't revert it
135
135
  issuer: ${FLAIR_MCP_ISSUER} # pin to your public origin — REQUIRED
@@ -144,7 +144,8 @@ registered identities.
144
144
  allowedHosts: # CIMD is the only supported client-registration path
145
145
  - claude.ai
146
146
  - claude.com
147
- signingKeyPem: ${FLAIR_MCP_SIGNING_KEY_PEM} # pin in clusters
147
+ # signingKeyPem: ${FLAIR_MCP_SIGNING_KEY_PEM} # Optional pin; add this line and stage the variable.
148
+ # Without a pin, minting reuses a persisted key or generates and persists one if the key table is empty.
148
149
  ```
149
150
 
150
151
  **DCR is not supported; clients connect via CIMD (Client ID Metadata
@@ -156,17 +157,45 @@ registered identities.
156
157
  credentials.
157
158
 
158
159
  2. **Set the env:**
159
- - `FLAIR_MCP_OAUTH=true` — turns on the `/mcp` route registration AND the
160
- component AS (flair#1152: `true` is the ONE value both readers accept —
161
- flair's flag takes 1/true/yes/on, but the component's config read of the
162
- same var accepts only "true"/"false" and deletes anything else, so `1`
163
- gives you a guarded `/mcp` with no authorization server behind it).
164
- - `FLAIR_MCP_ISSUER=https://your-public-origin` (or `FLAIR_PUBLIC_URL`).
160
+ - `FLAIR_MCP_OAUTH=true` — the recommended value, which both readers accept
161
+ (the component trims it and ignores case, but `1`, `yes` and `on` leave it
162
+ disabled); the authorization
163
+ server also needs the issuer and provider credentials. An instance enabled
164
+ before 0.46 may still have `FLAIR_MCP_OAUTH=1`.
165
+ - `FLAIR_MCP_ISSUER=https://your-public-origin` — a bare HTTP(S) origin.
166
+ - `OAUTH_GITHUB_CLIENT_ID`, `OAUTH_GITHUB_CLIENT_SECRET` and
167
+ `OAUTH_GITHUB_REDIRECT_URI=https://your-public-origin/oauth` — staged by
168
+ `flair mcp enable` using `--issuer` (default: `--instance`).
165
169
  - `FLAIR_MCP_JIT_PROVISION=1` — ONLY if you want unknown subjects
166
170
  auto-provisioned (default OFF; pre-provision Agent+Credential otherwise).
167
171
 
168
172
  3. **Restart flair.** `/mcp` mounts, OAuth-guarded.
169
173
 
174
+ 4. **Upgrading an instance that still holds the old staged value.** When the
175
+ component loads `FLAIR_MCP_OAUTH=1`, its MCP AS is disabled. Correct the value without re-running IdP intake
176
+ or changing the identity mapping:
177
+
178
+ `--admin-pass <target-admin-password>` is required.
179
+
180
+ ```bash
181
+ flair mcp enable --instance https://your-public-origin --refresh-flag --admin-pass <target-admin-password>
182
+ ```
183
+
184
+ It ATTEMPTS an encrypted
185
+ `FLAIR_MCP_OAUTH=true` push: it probes for a usable public key, attempts the update,
186
+ and checks the secret row's `processEnv` marker before restart and discovery
187
+ checks: the target's own discovery document must advertise that issuer with
188
+ the MCP token endpoint, and
189
+ the public document read at that issuer must match the same normalized issuer and its token
190
+ endpoint. When the update could not be pushed or confirmed — a failed capability
191
+ probe, a local encryption failure, a refused or unconfirmed push, or
192
+ a push whose read-back could not confirm storage with `processEnv=true` — it attempts a 0600
193
+ one-var fallback file. Refresh uses a separate default filename; an explicit
194
+ `--secrets-path` can select `mcp enable`'s path. An occupied explicit path
195
+ is refused before probing; an occupied default path is refused when the fallback is
196
+ needed — in both cases by name rather than truncated (the writer opens
197
+ exclusively). These fallback outcomes exit non-zero.
198
+
170
199
  ## Sherlock's 4 requirements — how they are met
171
200
 
172
201
  1. **Token lifetime.** `mcp.accessTokenTtl: 900` (5–15 min) in the AS config +
package/docs/openclaw.md CHANGED
@@ -83,7 +83,7 @@ Without `hooks.allowPromptInjection` the plugin contributes no context and logs
83
83
 
84
84
  ## Multi-Agent
85
85
 
86
- Each OpenClaw agent writes with its `agentId` as a field (tags are optional); reads use owner plus visibility. A verified agent can read all its own records (private included) and other agents' non-private records on the instance; grants do not expand that read scope.
86
+ Each OpenClaw agent writes with its `agentId` as a field (tags are optional); reads use owner plus visibility. The base memory scope includes the reader's own records and other agents' non-private records; non-admin by-id and collection reads additionally check current authority for retained closed skills, and grants do not expand the read scope.
87
87
 
88
88
  ```bash
89
89
  flair agent add research-agent
@@ -56,7 +56,7 @@ Then set an admin password in Fabric Studio (Cluster Settings → Admin). `flair
56
56
 
57
57
  `flair agent add` takes a positional id and `--target`. There is no `--remote` flag on this command (`--remote` belongs to `flair init`).
58
58
 
59
- On Fabric, ops lives on the **same hostname at port 9925**, not the CLI's default "data port − 1" derivation (that would be `:442`, where nothing answers). Pass `--ops-target` explicitly: <!-- docs-freshness-allow: Fabric ops API port, not legacy data port -->
59
+ For portless HTTPS, the CLI derives the ops endpoint at `:9925`; `--ops-target` overrides it. <!-- docs-freshness-allow: Fabric ops API port -->
60
60
 
61
61
  ```bash
62
62
  export FLAIR_URL=https://<cluster>.<org>.harperfabric.com
@@ -64,7 +64,7 @@ export FLAIR_URL=https://<cluster>.<org>.harperfabric.com
64
64
  # Keep the Fabric admin password in an owner-only file; the CLI reads it in-process.
65
65
  printf '%s\n' '<fabric-admin-password>' > ~/.flair/fabric-admin-pass && chmod 600 ~/.flair/fabric-admin-pass
66
66
 
67
- # Fabric ops is :9925 on the same host, not derived :442. docs-freshness-allow: Fabric ops API
67
+ # Operations endpoint override. docs-freshness-allow: Fabric ops API
68
68
  flair agent add mybot --target "$FLAIR_URL" --ops-target https://<cluster>.<org>.harperfabric.com:9925 --admin-pass-file ~/.flair/fabric-admin-pass
69
69
  ```
70
70
 
@@ -89,7 +89,7 @@ In Cursor: **Plugins → Configure**
89
89
  | `FLAIR_URL` | `https://<cluster>.<org>.harperfabric.com` |
90
90
  | `FLAIR_AGENT_ID` | `mybot` (the id you just added) |
91
91
 
92
- Those are the two plugin schema fields. Local Cursor's `npx` can use the key from step 3 at `~/.flair/keys/mybot.key`. A cloud agent's `npx` runs on a different machine — that VM needs the key (or host-env admin credentials). See [`packages/cursor-flair/README.md`](../packages/cursor-flair/README.md).
92
+ Those are the two plugin schema fields. Local Cursor's `npx` can use the key from step 3 at `~/.flair/keys/mybot.key`. A cloud agent's `npx` runs on a different machine — that VM needs the key (or host-env admin credentials). See [`packages/cursor-flair/README.md`](https://github.com/tpsdev-ai/flair/blob/main/packages/cursor-flair/README.md).
93
93
 
94
94
  ## 5. Wire a Grok Bot agent
95
95
 
@@ -121,7 +121,7 @@ Same connector, different panel. This is the field-verified sequence — includi
121
121
 
122
122
  5. The next tool call picks up the key — a miss is not cached. A 401 names the agent and the paths that were looked in. If those are not where `flair agent add` wrote the file, the MCP process's home differs from the shell; set `FLAIR_KEY_PATH` to the absolute path of the `.key` file.
123
123
 
124
- 6. Verify: ask the agent to "load my Flair bootstrap". You should get soul + memories **including shared org context** — findings written by teammate agents. A shared-visibility write from this agent is now readable by every org agent.
124
+ 6. Verify: ask the agent to "load my Flair bootstrap". You should get soul + memories **including shared org context** — findings written by teammate agents. A shared-visibility write from this agent passes every org agent's base visibility check; non-admin Memory by-id and collection reads of retained closed skills also apply the current-authority check.
125
125
 
126
126
  **Account-wide connectors are shared.** A connector added at the Grok Bot account level is one identity used by every agent on that account. For per-agent identity, give each agent its own MCP entry with its own `FLAIR_AGENT_ID` — and register each id (steps 2–5).
127
127