@tpsdev-ai/flair 0.28.0 → 0.30.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 (102) hide show
  1. package/README.md +1 -1
  2. package/dist/bridges/builtins/index.js +1 -1
  3. package/dist/bridges/discover.js +1 -1
  4. package/dist/bridges/runtime/load-plugin.js +1 -1
  5. package/dist/bridges/scaffold.js +3 -3
  6. package/dist/bridges/types.js +1 -1
  7. package/dist/cli-shim.cjs +1 -1
  8. package/dist/cli.js +357 -130
  9. package/dist/deploy.js +29 -19
  10. package/dist/fabric-upgrade.js +61 -23
  11. package/dist/fleet-verify.js +3 -3
  12. package/dist/lib/mcp-enable.js +2 -2
  13. package/dist/rem/runner.js +2 -2
  14. package/dist/rem/scheduler.js +226 -17
  15. package/dist/resources/A2AAdapter.js +1 -1
  16. package/dist/resources/Admin.js +1 -1
  17. package/dist/resources/AdminConnectors.js +1 -1
  18. package/dist/resources/AdminDashboard.js +1 -1
  19. package/dist/resources/AdminIdp.js +1 -1
  20. package/dist/resources/AdminInstance.js +1 -1
  21. package/dist/resources/AdminMemory.js +1 -1
  22. package/dist/resources/AdminPrincipals.js +1 -1
  23. package/dist/resources/Agent.js +1 -1
  24. package/dist/resources/AgentCard.js +1 -1
  25. package/dist/resources/AgentSeed.js +1 -1
  26. package/dist/resources/AttentionQuery.js +1 -1
  27. package/dist/resources/Credential.js +1 -1
  28. package/dist/resources/Federation.js +1 -1
  29. package/dist/resources/Instance.js +1 -1
  30. package/dist/resources/Integration.js +1 -1
  31. package/dist/resources/MCPClientMetadata.js +1 -1
  32. package/dist/resources/Memory.js +1 -1
  33. package/dist/resources/MemoryBootstrap.js +1 -1
  34. package/dist/resources/MemoryCandidate.js +168 -0
  35. package/dist/resources/MemoryConsolidate.js +1 -1
  36. package/dist/resources/MemoryDedupStats.js +1 -1
  37. package/dist/resources/MemoryFeed.js +1 -1
  38. package/dist/resources/MemoryGrant.js +1 -1
  39. package/dist/resources/MemoryMaintenance.js +1 -1
  40. package/dist/resources/MemoryReflect.js +3 -3
  41. package/dist/resources/MemoryReindex.js +1 -1
  42. package/dist/resources/MemoryUsage.js +1 -1
  43. package/dist/resources/OAuth.js +1 -1
  44. package/dist/resources/OAuthClient.js +1 -1
  45. package/dist/resources/OrgEvent.js +1 -1
  46. package/dist/resources/OrgEventCatchup.js +1 -1
  47. package/dist/resources/OrgEventMaintenance.js +1 -1
  48. package/dist/resources/PairingToken.js +1 -1
  49. package/dist/resources/Peer.js +1 -1
  50. package/dist/resources/Presence.js +3 -3
  51. package/dist/resources/RecordUsage.js +16 -2
  52. package/dist/resources/Relationship.js +1 -1
  53. package/dist/resources/SemanticSearch.js +1 -1
  54. package/dist/resources/SkillScan.js +1 -1
  55. package/dist/resources/Soul.js +1 -1
  56. package/dist/resources/SoulFeed.js +1 -1
  57. package/dist/resources/WorkspaceLatest.js +1 -1
  58. package/dist/resources/WorkspaceState.js +1 -1
  59. package/dist/resources/XAA.js +1 -1
  60. package/dist/resources/a2a-url.js +1 -1
  61. package/dist/resources/agent-auth.js +1 -1
  62. package/dist/resources/agentcard-fields.js +1 -1
  63. package/dist/resources/auth-middleware.js +1 -1
  64. package/dist/resources/embeddings-boot.js +4 -4
  65. package/dist/resources/embeddings-provider.js +13 -43
  66. package/dist/resources/federation-cleanup.js +5 -5
  67. package/dist/resources/federation-nonce-store.js +5 -5
  68. package/dist/resources/health.js +29 -6
  69. package/dist/resources/instance-identity.js +1 -1
  70. package/dist/resources/mcp-client-metadata-fields.js +1 -1
  71. package/dist/resources/mcp-handler.js +1 -1
  72. package/dist/resources/mcp-oauth.js +2 -2
  73. package/dist/resources/mcp-tools.js +9 -1
  74. package/dist/resources/memory-read-scope.js +1 -1
  75. package/dist/resources/memory-reflect-lib.js +4 -4
  76. package/dist/resources/memory-visibility.js +3 -3
  77. package/dist/resources/migration-boot.js +1 -1
  78. package/dist/resources/migrations/embedding-stamp.js +3 -3
  79. package/dist/resources/migrations/graph-heal.js +2 -2
  80. package/dist/resources/migrations/ledger.js +1 -1
  81. package/dist/resources/migrations/registry.js +14 -5
  82. package/dist/resources/migrations/runner.js +64 -11
  83. package/dist/resources/migrations/synthetic-test-migration.js +1 -1
  84. package/dist/resources/migrations/visibility-backfill.js +232 -0
  85. package/dist/resources/models-dir.js +55 -0
  86. package/dist/resources/record-types.js +30 -2
  87. package/dist/resources/rerank-provider.js +24 -4
  88. package/dist/resources/semantic-retrieval-core.js +1 -1
  89. package/dist/resources/usage-recording.js +73 -7
  90. package/dist/resources/version.js +33 -0
  91. package/dist/src/rem/scheduler.js +449 -0
  92. package/docs/assets/flair-cross-orchestrator.cast +1 -1
  93. package/docs/bridges.md +3 -3
  94. package/docs/deployment.md +1 -0
  95. package/docs/mcp-clients.md +3 -1
  96. package/docs/n8n.md +1 -2
  97. package/docs/notes/rem-ux.md +1 -1
  98. package/docs/rem.md +2 -0
  99. package/docs/supply-chain-policy.md +4 -4
  100. package/docs/upgrade.md +2 -2
  101. package/package.json +4 -4
  102. package/schemas/memory.graphql +27 -12
package/README.md CHANGED
@@ -67,7 +67,7 @@ If you need any of those specifically, use them. If you need crypto-pinned ident
67
67
 
68
68
  Anthropic shipped [Claude Dreams](https://platform.claude.com/docs/en/managed-agents/dreams) (research preview, April 2026) — async pipeline that reads a memory store + session transcripts and produces a curated output store: duplicates merged, stale entries replaced, insights surfaced. Validates the category: agent memory accumulates drift and needs cleanup.
69
69
 
70
- Flair ships both the on-demand curation surface (`flair rem rapid`) AND the scheduled nightly cycle, per the [FLAIR-NIGHTLY-REM spec](specs/FLAIR-NIGHTLY-REM.md) and its [in-process distillation slice](specs/FLAIR-NIGHTLY-REM-SLICE-2-DISTILLATION.md). Config recipe (Ollama zero-key default, hosted-provider egress warning, clustered-deploy rules): [`docs/rem.md`](docs/rem.md).
70
+ Flair ships both the on-demand curation surface (`flair rem rapid`) AND the scheduled nightly cycle, per [`docs/rem.md`](docs/rem.md) and its [distillation UX design note](docs/notes/rem-ux.md). **REM requires a configured generative backend** (Ollama, OpenAI, Anthropic, etc.) — without one, `flair rem rapid` fails with `Reflection error: No generative backend configured`. Config recipe (Ollama zero-key default, hosted-provider egress warning, clustered-deploy rules): [`docs/rem.md`](docs/rem.md).
71
71
 
72
72
  - **`flair rem rapid`** — reflects and distills server-side by default, staging candidates in one bounded call. `--focus {lessons_learned, patterns, decisions, errors}` mirrors Dreams' `instructions` parameter. `--prompt-only` falls back to the bring-your-own-model handoff. Outputs *candidates*, not a wholesale store swap.
73
73
  - **`flair rem candidates` / `flair rem promote <id> --rationale "<why>"` / `flair rem reject <id>`** — review and promote distilled candidates with required rationale.
@@ -10,7 +10,7 @@
10
10
  * To add a new built-in:
11
11
  * - YAML: write `src/bridges/builtins/<name>.ts` exporting a `YamlBridgeDescriptor`
12
12
  * - Code plugin: write `src/bridges/builtins/<name>.ts` exporting a `MemoryBridge`
13
- * Then register it here. See specs/FLAIR-BRIDGES.md §2 for shapes A/B.
13
+ * Then register it here. See docs/bridges.md § Two shapes for shapes A/B.
14
14
  */
15
15
  import { agenticStackDescriptor } from "./agentic-stack.js";
16
16
  import { claudeProjectMemoryBridge } from "./claude-project.js";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Bridge discovery — scans the four conventional sources defined in
3
- * FLAIR-BRIDGES.md §7:
3
+ * docs/bridges.md § Discovery:
4
4
  *
5
5
  * 1. Project YAML: <cwd>/.flair-bridge/*.yaml
6
6
  * 2. User YAML: ~/.flair/bridges/*.yaml
@@ -53,7 +53,7 @@ export async function loadCodePlugin(discovered, opts = {}) {
53
53
  field: "exports",
54
54
  expected: "named `bridge` export or default export implementing MemoryBridge",
55
55
  got: typeof mod === "object" && mod !== null ? `exports=${Object.keys(mod).join(",") || "(empty)"}` : typeof mod,
56
- hint: `flair-bridge-<name> packages must export \`bridge\` (or default-export) a MemoryBridge. See specs/FLAIR-BRIDGES.md §6`,
56
+ hint: `flair-bridge-<name> packages must export \`bridge\` (or default-export) a MemoryBridge. See docs/bridges.md § Shape B`,
57
57
  });
58
58
  }
59
59
  // Validate the shape. Keep this minimal — we trust the plugin author
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Bridge scaffolding — emits a working starter for a new bridge.
3
3
  *
4
- * From FLAIR-BRIDGES.md §2: "Scaffold & test in-tree. `flair bridge
4
+ * From docs/bridges.md § Two shapes: "Scaffold & test in-tree. `flair bridge
5
5
  * scaffold <name>` emits a working starter; `flair bridge test <name>`
6
6
  * runs a round-trip diff." This file handles the `scaffold` half.
7
7
  *
@@ -34,7 +34,7 @@ function fileDescriptorTemplate(name) {
34
34
  # Generated by \`flair bridge scaffold ${name} --file\`.
35
35
  # Edit to match your foreign system, then run \`flair bridge test ${name}\`.
36
36
  #
37
- # Spec: see FLAIR-BRIDGES.md §4 (memory schema) and §5 (YAML shape).
37
+ # Spec: see docs/bridges.md § The memory record and § Shape A.
38
38
  name: ${name}
39
39
  version: 1
40
40
  kind: file
@@ -90,7 +90,7 @@ function apiIndexTemplate(name) {
90
90
  * flair-bridge-${name}
91
91
  *
92
92
  * Generated by \`flair bridge scaffold ${name} --api\`.
93
- * Spec: see FLAIR-BRIDGES.md §4 (memory schema) and §6 (code plugin shape).
93
+ * Spec: see docs/bridges.md § The memory record and § Shape B.
94
94
  *
95
95
  * After editing, run:
96
96
  * flair bridge test ${name}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Types for the Flair memory bridge plugin system.
3
3
  *
4
- * Mirrors the contract in specs/FLAIR-BRIDGES.md. These types are the
4
+ * Mirrors the contract in docs/bridges.md. These types are the
5
5
  * public surface a bridge author (human or agent) targets.
6
6
  *
7
7
  * IMPORTANT: the YAML bridge format (shape A) also conforms to these types
package/dist/cli-shim.cjs CHANGED
@@ -9,7 +9,7 @@
9
9
  * The real CLI (dist/cli.js) is an ES module. In ESM, every top-level
10
10
  * `import` is HOISTED and the whole module graph is LINKED + EVALUATED before
11
11
  * the first statement in the file body runs. Flair's deps (harper-fabric-
12
- * embeddings requires Node >=22, @harperfast/harper / commander require >=20)
12
+ * embeddings requires Node >=22, harper / commander require >=20)
13
13
  * fail to load on an older engine — so a Node-version check placed even at the
14
14
  * very top of cli.ts never executes: the import graph crashes first. That is
15
15
  * exactly the silent-onboarding-failure bug (a Harper dev got zero output and