@tpsdev-ai/flair 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -20
- package/SECURITY.md +4 -1
- package/dist/build-info.json +3 -3
- package/dist/cli.js +1800 -293
- package/dist/commands/agent.js +22 -15
- package/dist/commands/bridge.js +40 -3
- package/dist/commands/doctor.js +214 -4
- package/dist/commands/federation.js +265 -38
- package/dist/commands/hook.js +10 -2
- package/dist/commands/init.js +179 -48
- package/dist/commands/memory.js +24 -2
- package/dist/commands/quality.js +26 -18
- package/dist/commands/service.js +137 -22
- package/dist/commands/status.js +114 -3
- package/dist/commands/upgrade.js +204 -84
- package/dist/doctor-client.js +50 -4
- package/dist/federation/scheduler.js +253 -4
- package/dist/install/clients.js +89 -23
- package/dist/install/global-bin-path.js +26 -6
- package/dist/lib/atomic-write.js +256 -0
- package/dist/lib/auth-resolve.js +46 -0
- package/dist/lib/daemon-liveness.js +61 -0
- package/dist/lib/doctor-run.js +5 -0
- package/dist/lib/embed-gpu-doctor.js +49 -26
- package/dist/lib/federation-memory-attributes.js +15 -0
- package/dist/lib/init-admin-pass.js +4 -2
- package/dist/lib/init-listener-environ.js +38 -0
- package/dist/lib/init-occupied-listener.js +165 -0
- package/dist/lib/instance-identity-row.js +580 -0
- package/dist/lib/launchd-domain-preflight.js +448 -0
- package/dist/lib/launchd-management.js +176 -6
- package/dist/lib/launchd-repair.js +95 -0
- package/dist/lib/memory-attributes.js +77 -0
- package/dist/lib/node-alias-path.js +95 -0
- package/dist/lib/npm-registry.js +119 -6
- package/dist/lib/owned-pins.js +20 -6
- package/dist/lib/redact-token-id.js +197 -0
- package/dist/lib/service-repoint-apply.js +267 -0
- package/dist/lib/service-repoint.js +575 -0
- package/dist/lib/toml-string-array.js +104 -0
- package/dist/lib/tree-divergence.js +716 -0
- package/dist/lib/upgrade-plain-tree.js +18 -8
- package/dist/lib/upgrade-prior-liveness.js +69 -0
- package/dist/lib/upgrade-rollback.js +116 -0
- package/dist/rem/runner.js +11 -0
- package/dist/resources/Agent.js +27 -14
- package/dist/resources/AgentSeed.js +39 -2
- package/dist/resources/Asset.js +3 -11
- package/dist/resources/Credential.js +4 -10
- package/dist/resources/Federation.js +299 -127
- package/dist/resources/Integration.js +8 -32
- package/dist/resources/Memory.js +623 -86
- package/dist/resources/MemoryArchive.js +9 -0
- package/dist/resources/MemoryBootstrap.js +23 -12
- package/dist/resources/MemoryCandidate.js +3 -11
- package/dist/resources/MemoryDedupStats.js +1 -1
- package/dist/resources/MemoryFeed.js +214 -5
- package/dist/resources/MemoryGrant.js +19 -40
- package/dist/resources/MemoryHostSource.js +90 -0
- package/dist/resources/MemoryMaintenance.js +121 -32
- package/dist/resources/MemoryReflect.js +4 -1
- package/dist/resources/MemoryReindex.js +7 -4
- package/dist/resources/MemoryUsage.js +55 -18
- package/dist/resources/Presence.js +18 -10
- package/dist/resources/RecordUsage.js +30 -40
- package/dist/resources/Relationship.js +170 -89
- package/dist/resources/SemanticSearch.js +44 -19
- package/dist/resources/Soul.js +31 -19
- package/dist/resources/XAA.js +7 -3
- package/dist/resources/agent-auth.js +16 -10
- package/dist/resources/auth-middleware.js +164 -50
- package/dist/resources/auto-promote-lib.js +4 -4
- package/dist/resources/bm25-index-service.js +246 -32
- package/dist/resources/bm25-status.js +132 -0
- package/dist/resources/bm25.js +13 -14
- package/dist/resources/ed25519-auth.js +11 -54
- package/dist/resources/embed-gpu.js +262 -47
- package/dist/resources/embeddings-boot.js +52 -17
- package/dist/resources/federation-classify.js +12 -0
- package/dist/resources/federation-cleanup.js +289 -51
- package/dist/resources/federation-crypto.js +65 -19
- package/dist/resources/health.js +105 -22
- package/dist/resources/host-pointer/registry.js +35 -0
- package/dist/resources/host-pointer-adapter.js +15 -0
- package/dist/resources/host-source-visibility.js +167 -0
- package/dist/resources/host-source.js +151 -0
- package/dist/resources/in-process-api.js +2 -1
- package/dist/resources/instance-create-lock.js +363 -0
- package/dist/resources/instance-identity-rows.js +43 -0
- package/dist/resources/instance-identity.js +97 -12
- package/dist/resources/mcp-handler.js +155 -51
- package/dist/resources/mcp-tool-arguments.js +83 -0
- package/dist/resources/mcp-tools.js +28 -25
- package/dist/resources/memory-consolidate-lib.js +3 -1
- package/dist/resources/memory-declared-attributes.js +103 -0
- package/dist/resources/memory-feed-lib.js +5 -1
- package/dist/resources/memory-host-source.js +163 -0
- package/dist/resources/memory-visibility.js +10 -7
- package/dist/resources/migrations/synthetic-test-migration.js +4 -1
- package/dist/resources/migrations/visibility-backfill.js +4 -1
- package/dist/resources/originator-instance.js +235 -0
- package/dist/resources/promotion-stamp.js +2 -0
- package/dist/resources/provenance.js +111 -11
- package/dist/resources/rate-limit.js +6 -4
- package/dist/resources/record-owner-guard.js +19 -0
- package/dist/resources/record-type-kit.js +44 -23
- package/dist/resources/record-types.js +6 -6
- package/dist/resources/relay-ops.js +28 -3
- package/dist/resources/replay-store.js +289 -0
- package/dist/resources/request-transaction.js +78 -0
- package/dist/resources/search-readiness.js +26 -22
- package/dist/resources/semantic-retrieval-core.js +103 -4
- package/dist/resources/table-helpers.js +33 -0
- package/dist/resources/table-patch-policy.js +109 -0
- package/dist/resources/table-patches.js +17 -0
- package/dist/resources/table-post-policy.js +138 -0
- package/dist/resources/table-posts.js +22 -0
- package/dist/resources/table-subscription-policy.js +135 -0
- package/dist/resources/table-subscriptions.js +19 -0
- package/dist/resources/tool-descriptors/index.js +15 -15
- package/dist/resources/trust-block.js +10 -3
- package/dist/resources/usage-recording.js +169 -41
- package/dist/src/lib/instance-identity-row.js +580 -0
- package/dist/src/lib/memory-attributes.js +77 -0
- package/dist/src/lib/redact-token-id.js +197 -0
- package/docs/api-reference.md +80 -16
- package/docs/auth.md +5 -5
- package/docs/claude-code.md +137 -6
- package/docs/deploying-on-fabric.md +6 -3
- package/docs/deployment.md +1 -1
- package/docs/embedding-in-a-harper-app.md +3 -3
- package/docs/federation.md +17 -10
- package/docs/hosted-on-fabric.md +4 -3
- package/docs/integrations.md +28 -19
- package/docs/mcp-clients.md +26 -32
- package/docs/n8n.md +8 -8
- package/docs/notes/mcp-oauth-model2.md +27 -18
- package/docs/openclaw.md +29 -28
- package/docs/quickstart.md +5 -0
- package/docs/releasing.md +134 -2
- package/docs/spoke-bringup.md +14 -11
- package/docs/standalone-local.md +2 -2
- package/docs/supply-chain-policy.md +28 -10
- package/docs/system-requirements.md +1 -1
- package/docs/troubleshooting.md +11 -0
- package/docs/upgrade.md +189 -63
- package/package.json +9 -5
- package/schemas/agent.graphql +9 -6
- package/schemas/federation.graphql +2 -11
- package/schemas/memory.graphql +106 -17
- package/schemas/replay.graphql +18 -0
- package/templates/launchd/start-flair-with-admin-pass.sh +22 -0
- package/dist/resources/federation-nonce-store.js +0 -195
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ boost. Hybrid search combines semantic and lexical ranks to order results, so th
|
|
|
49
49
|
first result need not have the highest percentage or be near 100%. The percentage
|
|
50
50
|
is not a probability that the memory answers your question correctly.
|
|
51
51
|
|
|
52
|
-
`flair init
|
|
52
|
+
`flair init --agent <id>` installs or reuses Harper, creates or reuses the agent's Ed25519 keypair, and checks semantic search. When wiring is enabled, it attempts to wire detected clients and may run an MCP smoke test for MCP client wiring.
|
|
53
53
|
|
|
54
54
|
> **Pass `--agent`.** A bare `flair init` bootstraps the instance and stops there — no agent, no keypair, no MCP wiring.
|
|
55
55
|
|
|
@@ -63,9 +63,8 @@ Full walkthrough with expected output at every step: **[docs/quickstart.md](docs
|
|
|
63
63
|
|
|
64
64
|
Two MCP paths, on purpose. A client on this machine and a remote connector are different trust situations, and each has its own mechanism. The write-up that joins them is [docs/mcp-clients.md — Two MCP paths](docs/mcp-clients.md#two-mcp-paths).
|
|
65
65
|
|
|
66
|
-
- **Local client: the `npx` stdio adapter.** `@tpsdev-ai/flair-mcp` is a separate package and is not installed globally. `flair init
|
|
67
|
-
- **Remote client: native `/mcp`.** A JSON-RPC endpoint inside the server, OAuth bearer, exposing
|
|
68
|
-
|
|
66
|
+
- **Local client: the `npx` stdio adapter.** `@tpsdev-ai/flair-mcp` is a separate package and is not installed globally. `flair init --agent <id>` attempts to wire detected clients when wiring is enabled, using `npx -y @tpsdev-ai/flair-mcp@<version>` pinned to the CLI's version. The adapter sends requests to `FLAIR_URL`, signing with an Ed25519 key when one resolves and otherwise using configured administrator Basic credentials when available. Loopback HTTP is the right scheme on this machine (the default is `http://127.0.0.1:19926`). A remote `FLAIR_URL` should use HTTPS. This is the path for Claude Code, Cursor, Codex, Gemini, and every other local MCP client.
|
|
67
|
+
- **Remote client: native `/mcp`.** A JSON-RPC endpoint inside the server, OAuth bearer, exposing the curated tools that the JSON-RPC `tools/list` method on `/mcp` returns. It is off by default: an unset `FLAIR_MCP_OAUTH` leaves `/mcp` unregistered; a truthy flag and a configured issuer make Flair attempt to mount it, while only the literal value `true` also enables the OAuth component. `true` is the value that turns on both Flair's route and the OAuth component; `1`, `yes`, and `on` leave the component off and every call 401s. OAuth client-metadata is fetched over HTTPS and refuses a private, loopback, or link-local host, and `flair mcp enable` refuses a local origin (localhost, loopback, RFC1918, IPv4 link-local, `.local`). Remote connectors need a publicly reachable HTTPS origin; `flair mcp enable` refuses local origins, but route registration itself does not enforce a public HTTPS issuer.
|
|
69
68
|
`@tpsdev-ai/flair-client` is likewise its own package: add it to a project when you want to call Flair from your own code ([JavaScript / TypeScript](#javascript--typescript)).
|
|
70
69
|
|
|
71
70
|
### Where the agent's key lives
|
|
@@ -79,10 +78,10 @@ Keys are how an agent *outside* the process proves who it is. Code running insid
|
|
|
79
78
|
### Useful flags
|
|
80
79
|
|
|
81
80
|
```bash
|
|
82
|
-
flair init --client claude-code
|
|
83
|
-
flair init --no-mcp
|
|
84
|
-
flair init --skip-soul
|
|
85
|
-
flair init --port 8000
|
|
81
|
+
flair init --agent mybot --client claude-code # attempt to wire one client
|
|
82
|
+
flair init --agent mybot --no-mcp # register the agent; skip MCP wiring
|
|
83
|
+
flair init --agent mybot --skip-soul # skip the personality wizard
|
|
84
|
+
flair init --agent mybot --port 8000 # use a non-default port
|
|
86
85
|
```
|
|
87
86
|
|
|
88
87
|
### Lifecycle
|
|
@@ -148,7 +147,7 @@ One Ed25519 identity, one memory store, three MCP-capable CLIs. A memory written
|
|
|
148
147
|
└──────────────────────────────────────────────────────────────────┘
|
|
149
148
|
```
|
|
150
149
|
|
|
151
|
-
|
|
150
|
+
Choose your harness from the [full integrations catalog →](docs/integrations.md).
|
|
152
151
|
|
|
153
152
|
## How it works
|
|
154
153
|
|
|
@@ -184,7 +183,7 @@ See **[DESIGN.md](DESIGN.md)** for the invariants behind the three primitives
|
|
|
184
183
|
| **Federation** | Hub-and-spoke sync between instances using signed requests and pairing tokens. Originator enforcement blocks cross-node replay. [docs/federation.md](docs/federation.md) |
|
|
185
184
|
| **Memory hygiene (REM)** | On-demand (`flair rem rapid`) and scheduled nightly distillation. Candidates are staged and promoted one at a time with a required rationale — never auto-applied. [docs/rem.md](docs/rem.md) |
|
|
186
185
|
| **Memory bridges** | Import/export to foreign memory systems via a YAML descriptor or a code plugin. [docs/bridges.md](docs/bridges.md) |
|
|
187
|
-
| **Real-time feeds** |
|
|
186
|
+
| **Real-time feeds** | Administrators subscribe to table changes over WebSocket/SSE; verified agents subscribe to changes to the memories they can read through `/FeedMemories`, and to soul changes through `/FeedSouls`. |
|
|
188
187
|
| **OAuth 2.1 server** | PKCE, dynamic client registration, standards-compliant token endpoint. Delegate auth to Flair without a separate IdP. [docs/auth.md](docs/auth.md) |
|
|
189
188
|
| **XAA** | Bind agent identities to Google Workspace, Azure AD or Okta accounts. |
|
|
190
189
|
| **Web admin** | Server-rendered UI for principals, connectors, IdPs and instance config. No separate dashboard service. |
|
|
@@ -200,7 +199,7 @@ Every product here does semantic recall over stored memories. These are the dime
|
|
|
200
199
|
|---|---|---|---|---|---|---|
|
|
201
200
|
| **Where memories live** | infrastructure you run | self-host or Mem0 Cloud | self-host or hosted API | self-host or Letta Cloud | SageOx cloud | vendor cloud |
|
|
202
201
|
| **Memory is scoped to** | the agent, via an Ed25519 keypair | tenant / user | per-user tenant | the runtime | the team | the account |
|
|
203
|
-
| **Reaches other orchestrators** |
|
|
202
|
+
| **Reaches other orchestrators** | Coding assistants, workflow engines, and agent frameworks ([catalog](docs/integrations.md)) | several | several | Letta's runtime | 14+ coding agents and editors, via hooks, plugins and instruction files | no |
|
|
204
203
|
| **Sync between instances you run** | hub/spoke federation | no | no | no | one hosted service | one hosted service |
|
|
205
204
|
| **Captures in-person conversation** | no | no | no | no | yes — Ox Dot | no |
|
|
206
205
|
| **Per-agent persistent character** | first-class (Soul) | optional | persona-shaped | optional | team context, not per-agent | no |
|
|
@@ -213,7 +212,7 @@ Flair works with any agent runtime. Pick the path that fits yours — **[full ca
|
|
|
213
212
|
|
|
214
213
|
### Claude Code / Cursor / Codex CLI / Gemini CLI (MCP)
|
|
215
214
|
|
|
216
|
-
`flair init
|
|
215
|
+
`flair init --agent <id>` attempts to wire detected clients when wiring is enabled. To configure one by hand:
|
|
217
216
|
|
|
218
217
|
```json
|
|
219
218
|
// .mcp.json in your project root (Claude Code / Cursor format)
|
|
@@ -244,7 +243,7 @@ Per-CLI config snippets (Gemini CLI's `~/.gemini/settings.json`, Codex CLI's `~/
|
|
|
244
243
|
openclaw plugins install @tpsdev-ai/openclaw-flair
|
|
245
244
|
```
|
|
246
245
|
|
|
247
|
-
Auto-detects the agent identity, provides `memory_store` / `
|
|
246
|
+
Auto-detects the agent identity, provides `memory_store` / `memory_search` / `memory_get`, and provides bootstrap context from `before_prompt_build` (requires host opt-in). See the [plugin README](packages/openclaw-flair/README.md).
|
|
248
247
|
|
|
249
248
|
### n8n
|
|
250
249
|
|
|
@@ -252,7 +251,7 @@ Auto-detects the agent identity, provides `memory_store` / `memory_recall` / `me
|
|
|
252
251
|
Settings → Community Nodes → Install → @tpsdev-ai/n8n-nodes-flair
|
|
253
252
|
```
|
|
254
253
|
|
|
255
|
-
Three nodes: **Flair Chat Memory** (Memory port), **Flair Search**
|
|
254
|
+
Three nodes: **Flair Chat Memory** (Memory port), **Flair Search** (Tool port), **Flair Write** (Main connections). Setup and security guidance in **[docs/n8n.md](docs/n8n.md)** — read the auth note below first.
|
|
256
255
|
|
|
257
256
|
### Flair CLI
|
|
258
257
|
|
|
@@ -336,9 +335,9 @@ await h.post({ agentId: "mybot", content: "...", durability: "standard" });
|
|
|
336
335
|
|
|
337
336
|
### Auth across surfaces
|
|
338
337
|
|
|
339
|
-
|
|
338
|
+
Ordinary agents using Ed25519 keys sign network requests. They can write only their own records and read their own plus other agents' non-private memories. Administrator agent roles and administrator Basic credentials have broader authority, including access to private memories. Stdio MCP, Pi, LangGraph, and the wake runner can use administrator Basic auth when no signing key resolves; n8n requires a Harper administrator password in its credential; its node requests use FlairClient, which prefers a resolving Ed25519 key and otherwise uses the configured Basic credentials. See [SECURITY.md](SECURITY.md).
|
|
340
339
|
|
|
341
|
-
|
|
340
|
+
Treat n8n's credential as an instance-wide administrator credential: a workflow can read private memories and write under any agent ID. Use it only on an operator-controlled, single-tenant n8n instance with trusted workflow inputs. Full breakdown: [docs/auth.md](docs/auth.md#auth-across-surfaces-read-this-first).
|
|
342
341
|
|
|
343
342
|
In-process callers are a different model, not an exception to this one: they never sign, because identity is asserted through the call context rather than proven. Co-location *is* the grant — which is why Flair beside untrusted co-tenants on a shared instance is a different proposition to Flair inside your own app.
|
|
344
343
|
|
|
@@ -374,10 +373,10 @@ Managed hosting with multi-region replication and failover. Need a public URL fo
|
|
|
374
373
|
|
|
375
374
|
Full model, threat analysis and recommendations in [SECURITY.md](SECURITY.md).
|
|
376
375
|
|
|
377
|
-
- Ed25519
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
-
|
|
376
|
+
- Ordinary agent keys use Ed25519 signatures and bind writes to their agent identity.
|
|
377
|
+
- Administrator agent roles and administrator Basic credentials have broader authority.
|
|
378
|
+
- Ordinary signed agents can read their own memories and other agents' non-private memories. Private memories are owner-only for ordinary agents; administrators can also read them.
|
|
379
|
+
- `Memory.post()` and `Memory.put()` are the calls behind `flair memory add`, MCP `memory_store` and the SDK writes. A new memory they write without a visibility takes a default from durability: `permanent`/`persistent` default to `shared`, `standard`/`ephemeral` to `private`. A write that names neither lands `private`, and an update through `Memory.put()` that names no visibility keeps the stored one. Their write response names the visibility the record landed on whenever the record has one; the admin-only `_reindex` re-PUT, which rebuilds indexes for an existing row, does not return that response. `POST /FeedMemories` does not apply this default: a new `ephemeral` feed record without `visibility` lands `private`, any other new feed record without `visibility` has no visibility field and reads as non-private, an update that names no visibility keeps a stored `private`/`shared` value, and the response (the stored record) names `visibility` only when the record has one. Say what you mean with `--visibility shared|private` (CLI) or `visibility` (MCP / SDK / feed).
|
|
381
380
|
- The admin password is generated by `flair init` and written to `~/.flair/admin-pass` (mode 0600). The CLI prints the path, never the value. Prefer `--admin-pass-file` over `--admin-pass` so it stays out of `ps` and shell history.
|
|
382
381
|
- Key rotation via `flair agent rotate-key`.
|
|
383
382
|
|
package/SECURITY.md
CHANGED
|
@@ -22,7 +22,10 @@ agent's Ed25519 private key. The server verifies against the agent's
|
|
|
22
22
|
registered public key.
|
|
23
23
|
|
|
24
24
|
- **Replay window:** 30 seconds
|
|
25
|
-
- **Nonce deduplication:** Prevents replay within the window
|
|
25
|
+
- **Nonce deduplication:** Prevents replay within the window. Each nonce is
|
|
26
|
+
recorded once per instance, in a table every Harper worker thread shares,
|
|
27
|
+
before the request takes effect; if that record cannot be written, the
|
|
28
|
+
request is refused
|
|
26
29
|
- **No shared secrets:** Each agent has its own key pair
|
|
27
30
|
|
|
28
31
|
### Admin Authentication
|
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"commit": "
|
|
4
|
-
"builtAt": "2026-09-
|
|
2
|
+
"version": "0.58.0",
|
|
3
|
+
"commit": "2bec5cd8af1762763a438cfec9bde01bad69c034",
|
|
4
|
+
"builtAt": "2026-09-30T22:58:01.388Z",
|
|
5
5
|
"builder": "tsc"
|
|
6
6
|
}
|