@tpsdev-ai/flair 0.57.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 +4 -4
- package/SECURITY.md +4 -1
- package/dist/build-info.json +3 -3
- package/dist/cli.js +1685 -279
- package/dist/commands/doctor.js +162 -4
- package/dist/commands/federation.js +2 -1
- package/dist/commands/hook.js +10 -2
- package/dist/commands/init.js +150 -44
- 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/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/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/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 +35 -1
- package/dist/resources/Federation.js +70 -52
- package/dist/resources/Memory.js +567 -72
- package/dist/resources/MemoryArchive.js +9 -0
- package/dist/resources/MemoryBootstrap.js +4 -0
- package/dist/resources/MemoryFeed.js +204 -3
- 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 +53 -3
- package/dist/resources/Presence.js +18 -10
- package/dist/resources/RecordUsage.js +30 -40
- package/dist/resources/Relationship.js +167 -78
- package/dist/resources/SemanticSearch.js +19 -6
- 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 +135 -48
- 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/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-crypto.js +65 -19
- package/dist/resources/health.js +57 -14
- 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/instance-identity.js +3 -2
- package/dist/resources/mcp-handler.js +147 -51
- package/dist/resources/mcp-tools.js +25 -21
- 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/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/record-owner-guard.js +19 -0
- package/dist/resources/record-type-kit.js +9 -12
- 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 +19 -21
- package/dist/resources/semantic-retrieval-core.js +5 -1
- 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/memory-attributes.js +77 -0
- package/docs/api-reference.md +79 -15
- package/docs/claude-code.md +132 -0
- package/docs/deployment.md +1 -1
- package/docs/federation.md +1 -1
- package/docs/integrations.md +5 -5
- package/docs/mcp-clients.md +11 -21
- package/docs/notes/mcp-oauth-model2.md +15 -1
- package/docs/quickstart.md +5 -0
- package/docs/releasing.md +134 -2
- package/docs/supply-chain-policy.md +10 -5
- package/docs/troubleshooting.md +11 -0
- package/docs/upgrade.md +187 -61
- 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
|
@@ -63,7 +63,7 @@ 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
|
|
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
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.
|
|
68
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)).
|
|
69
69
|
|
|
@@ -183,7 +183,7 @@ See **[DESIGN.md](DESIGN.md)** for the invariants behind the three primitives
|
|
|
183
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) |
|
|
184
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) |
|
|
185
185
|
| **Memory bridges** | Import/export to foreign memory systems via a YAML descriptor or a code plugin. [docs/bridges.md](docs/bridges.md) |
|
|
186
|
-
| **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`. |
|
|
187
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) |
|
|
188
188
|
| **XAA** | Bind agent identities to Google Workspace, Azure AD or Okta accounts. |
|
|
189
189
|
| **Web admin** | Server-rendered UI for principals, connectors, IdPs and instance config. No separate dashboard service. |
|
|
@@ -335,7 +335,7 @@ await h.post({ agentId: "mybot", content: "...", durability: "standard" });
|
|
|
335
335
|
|
|
336
336
|
### Auth across surfaces
|
|
337
337
|
|
|
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
|
|
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).
|
|
339
339
|
|
|
340
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).
|
|
341
341
|
|
|
@@ -376,7 +376,7 @@ Full model, threat analysis and recommendations in [SECURITY.md](SECURITY.md).
|
|
|
376
376
|
- Ordinary agent keys use Ed25519 signatures and bind writes to their agent identity.
|
|
377
377
|
- Administrator agent roles and administrator Basic credentials have broader authority.
|
|
378
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
|
-
-
|
|
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).
|
|
380
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.
|
|
381
381
|
- Key rotation via `flair agent rotate-key`.
|
|
382
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
|
}
|