@tpsdev-ai/flair 0.25.0 → 0.25.1
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 +13 -4
- package/dist/cli.js +32 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -134,6 +134,15 @@ flair memory search "native addon loading in sandboxed runtimes"
|
|
|
134
134
|
# → [0.67] Harper v5 sandbox blocks node:module but process.dlopen works
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
+
### Trust-Graded Recall
|
|
138
|
+
Recall can carry an opt-in **trust-evidence block** per result — provenance (verified vs claimed author), usage signal, freshness/validity, supersession — so an agent weighs *what to trust*, not just *what matched*. On top of it:
|
|
139
|
+
|
|
140
|
+
- **Confidence bands** (`matchQuality`): each result is labeled `strong` / `moderate` / `breadcrumb` from its absolute similarity — a weak-but-relevant hit is taken for what it is, not mistaken for a confident one.
|
|
141
|
+
- **First-class abstention** (`abstain`): when nothing clears a confidence floor, recall returns an honest "no memory covers this" verdict instead of the N weakest matches.
|
|
142
|
+
- **Citation-on-write** (`usedMemoryIds`) + **`record_usage`**: report which memories actually grounded an answer — a deduped, principal-bound usage signal (honest evidence, never retrieval-popularity) that strengthens future recall.
|
|
143
|
+
|
|
144
|
+
Opt-in and additive (`includeTrust` / `abstain` on the recall path) — off by default, byte-identical when unused. Reachable today via the authenticated HTTP API and the native `/mcp` tools; first-class exposure in the `flair` CLI, `@tpsdev-ai/flair-client`, and the `flair-mcp` bridge is a follow-up. Full arc in the [CHANGELOG](CHANGELOG.md) (flair#744).
|
|
145
|
+
|
|
137
146
|
### Tiered Durability
|
|
138
147
|
Not all memories are equal:
|
|
139
148
|
|
|
@@ -340,7 +349,7 @@ Add to your `CLAUDE.md`:
|
|
|
340
349
|
|
|
341
350
|
At the start of every session, run mcp__flair__bootstrap before responding.
|
|
342
351
|
|
|
343
|
-
Your agent's memory **follows it across CLIs** — same Flair instance, same agent identity, switch from Claude Code to Gemini CLI to Codex CLI without losing state. The
|
|
352
|
+
Your agent's memory **follows it across CLIs** — same Flair instance, same agent identity, switch from Claude Code to Gemini CLI to Codex CLI without losing state. The `flair-mcp` server — the bridge these CLIs connect to — exposes `memory_store`, `memory_search`, `memory_update`, `memory_get`, `memory_delete`, `relationship_store`, `bootstrap`, `soul_set`, `soul_get`, `flair_workspace_set`, and `flair_orgevent`. (Flair's in-Harper native `/mcp` surface is a separate, still-experimental tool set with `attention` + `record_usage` — see Trust-Graded Recall above.)
|
|
344
353
|
|
|
345
354
|
For per-CLI config snippets (Gemini CLI's `~/.gemini/settings.json`, Codex CLI's `~/.codex/config.toml`, etc.), see **[docs/mcp-clients.md](docs/mcp-clients.md)**. For a deeper Claude Code walk-through with `CLAUDE.md` patterns, see [docs/claude-code.md](docs/claude-code.md).
|
|
346
355
|
|
|
@@ -353,7 +362,7 @@ Use Flair as the memory backend for n8n's AI Agent. Same memories readable from
|
|
|
353
362
|
@tpsdev-ai/n8n-nodes-flair
|
|
354
363
|
```
|
|
355
364
|
|
|
356
|
-
|
|
365
|
+
Three nodes ship: **Flair Chat Memory** (Memory port, conversation buffer), **Flair Search** (Tool port, semantic search + get-by-subject), and **Flair Write** (Tool port, store memories). Setup walkthrough, subject/sessionId patterns, and security guidance in **[docs/n8n.md](docs/n8n.md)**.
|
|
357
366
|
|
|
358
367
|
### JavaScript / TypeScript (Client Library)
|
|
359
368
|
|
|
@@ -541,13 +550,13 @@ Flair is in active development and daily use. We dogfood it — the agents that
|
|
|
541
550
|
- ✅ Web admin UI (principals, connectors, IdPs, instance config)
|
|
542
551
|
- ✅ Federation (hub-and-spoke sync with signed requests and pairing tokens)
|
|
543
552
|
- ✅ OpenClaw memory plugin
|
|
544
|
-
- ✅ MCP server for Claude Code / Cursor /
|
|
553
|
+
- ✅ MCP server for Claude Code / Cursor / Codex / Gemini CLI
|
|
545
554
|
- ✅ Lightweight client library (`@tpsdev-ai/flair-client`)
|
|
546
555
|
- ✅ Portable agent identity (export/import between instances)
|
|
547
556
|
- ✅ `flair --version`, `flair upgrade`
|
|
557
|
+
- ✅ First-run soul wizard (interactive personality setup)
|
|
548
558
|
|
|
549
559
|
**What's next:**
|
|
550
|
-
- [ ] First-run soul wizard (interactive personality setup)
|
|
551
560
|
- [ ] Git-backed memory sync
|
|
552
561
|
- [ ] Encryption at rest (opt-in AES-256-GCM per memory)
|
|
553
562
|
- [ ] Harper Fabric deployment (managed multi-office)
|
package/dist/cli.js
CHANGED
|
@@ -1641,6 +1641,23 @@ export function decideAfterVerify(result, previousVersion) {
|
|
|
1641
1641
|
if (result.ok)
|
|
1642
1642
|
return { kind: "ok" };
|
|
1643
1643
|
const reason = result.error ?? "post-restart verification failed";
|
|
1644
|
+
// A HEALTHY instance whose ONLY failure was that the verifier couldn't
|
|
1645
|
+
// authenticate (401/403) is demonstrably UP: the public /Health answered
|
|
1646
|
+
// 2xx AND the server responded to the authenticated probe — it rejected our
|
|
1647
|
+
// credentials, it did not fail to respond. A version we couldn't READ is not
|
|
1648
|
+
// grounds to roll back a RUNNING instance. Rolling back here is destructive
|
|
1649
|
+
// AND self-defeating — the rollback's own re-verify hits the identical
|
|
1650
|
+
// missing-credential wall, producing the false "ROLLBACK ALSO FAILED / state
|
|
1651
|
+
// UNKNOWN" for an instance that was healthy the whole time. (The real
|
|
1652
|
+
// incident: /HealthDetail became a verified-read in flair#747, so a machine
|
|
1653
|
+
// with no admin-pass/agent key authenticates fine against the pre-upgrade
|
|
1654
|
+
// version but not post-restart — the pre-flight credential check can't
|
|
1655
|
+
// anticipate a version that changes /HealthDetail's auth requirement.)
|
|
1656
|
+
// Report it as up-but-unverified and NEVER roll back. This supersedes
|
|
1657
|
+
// flair#741 fix #3's "prefer the known-good version" default, which the
|
|
1658
|
+
// incident proved wrong for a healthy instance.
|
|
1659
|
+
if (isCredentialOnlyFailure(result))
|
|
1660
|
+
return { kind: "healthy-unverified", reason };
|
|
1644
1661
|
if (!previousVersion)
|
|
1645
1662
|
return { kind: "cannot-rollback", reason };
|
|
1646
1663
|
return { kind: "rollback", reason, toVersion: previousVersion };
|
|
@@ -8352,18 +8369,22 @@ program
|
|
|
8352
8369
|
console.log(`✅ verified: healthy, authenticated${verify.version ? `, running ${verify.version}` : ""}`);
|
|
8353
8370
|
return;
|
|
8354
8371
|
}
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
console.
|
|
8372
|
+
// flair#741 follow-through: a healthy instance the verifier just couldn't
|
|
8373
|
+
// authenticate against. The upgrade SUCCEEDED — the new version's server is
|
|
8374
|
+
// up (public /Health passed); we simply couldn't read its version over the
|
|
8375
|
+
// authenticated /HealthDetail. Report the caveat and STOP — never roll back
|
|
8376
|
+
// a running instance over a credentials gap. (decideAfterVerify only
|
|
8377
|
+
// returns this for isCredentialOnlyFailure(verify), so the old
|
|
8378
|
+
// "print an honest note but roll back anyway" branch that used to sit below
|
|
8379
|
+
// is gone — that credentials case can no longer reach the rollback path.)
|
|
8380
|
+
if (verdict.kind === "healthy-unverified") {
|
|
8381
|
+
console.log(`✅ upgrade complete: the instance is up and healthy${expectedFlairVersion ? ` on @tpsdev-ai/flair@${expectedFlairVersion}` : ""}.`);
|
|
8382
|
+
console.log(` The version could not be verified — the checker couldn't authenticate to /HealthDetail (${verdict.reason}).`);
|
|
8383
|
+
console.log(" The server is confirmed running (public /Health passed); this is a verification gap, not an upgrade failure — nothing was rolled back.");
|
|
8384
|
+
console.log(" To enable full post-upgrade verification: set FLAIR_ADMIN_PASS, or run `flair init` to provision ~/.flair/admin-pass or an agent key.");
|
|
8385
|
+
return;
|
|
8366
8386
|
}
|
|
8387
|
+
console.error(`❌ post-restart verification failed: ${verdict.reason}`);
|
|
8367
8388
|
if (verdict.kind === "cannot-rollback") {
|
|
8368
8389
|
console.error(" Cannot roll back automatically: the previously-installed @tpsdev-ai/flair version is unknown.");
|
|
8369
8390
|
console.error(" Check the instance now: flair doctor");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/flair",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"packageManager": "bun@1.3.10",
|
|
5
5
|
"description": "Identity, memory, and soul for AI agents. Cryptographic identity (Ed25519), semantic memory with local embeddings, and persistent personality — all in a single process.",
|
|
6
6
|
"type": "module",
|