@tpsdev-ai/flair 0.7.0 → 0.8.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 +12 -1
- package/dist/bridges/builtins/index.js +28 -11
- package/dist/bridges/builtins/markdown.js +66 -0
- package/dist/bridges/runtime/context.js +2 -1
- package/dist/bridges/runtime/formats.js +97 -9
- package/dist/bridges/runtime/load-bridge.js +15 -5
- package/dist/cli.js +1445 -103
- package/dist/resources/Federation.js +67 -10
- package/dist/resources/Memory.js +17 -24
- package/dist/resources/MemoryBootstrap.js +11 -2
- package/dist/resources/auth-middleware.js +23 -1
- package/dist/resources/content-safety.js +21 -0
- package/dist/resources/federation-cleanup.js +161 -0
- package/dist/resources/federation-crypto.js +100 -1
- package/package.json +6 -6
- package/schemas/memory.graphql +28 -0
package/schemas/memory.graphql
CHANGED
|
@@ -26,6 +26,8 @@ type Memory @table(database: "flair") {
|
|
|
26
26
|
lastReflected: String # ISO timestamp of last reflection pass
|
|
27
27
|
supersedes: String @indexed # ID of memory this one replaces (version chain)
|
|
28
28
|
subject: String @indexed # entity this memory is about (person, service, project)
|
|
29
|
+
summary: String # agent-set multi-sentence dense compression (optional; ops-wkoh)
|
|
30
|
+
# 3-tier compression chain: subject (one-line) → summary (paragraph) → content (full)
|
|
29
31
|
validFrom: String @indexed # ISO timestamp — when this fact became true
|
|
30
32
|
validTo: String @indexed # ISO timestamp — when this fact stopped being true (null = still valid)
|
|
31
33
|
_safetyFlags: [String] # content safety flags from scanContent()
|
|
@@ -68,3 +70,29 @@ type MemoryGrant @table(database: "flair") @export {
|
|
|
68
70
|
filter: String
|
|
69
71
|
createdAt: String
|
|
70
72
|
}
|
|
73
|
+
|
|
74
|
+
# MemoryCandidate — staged distillations from the FLAIR-NIGHTLY-REM cycle.
|
|
75
|
+
# Per specs/FLAIR-NIGHTLY-REM.md § 7. Slice 1 of ops-2qq adds the schema +
|
|
76
|
+
# `flair rem candidates` listing command. Future slices wire the nightly
|
|
77
|
+
# cycle that populates this table and the promote/reject endpoints.
|
|
78
|
+
#
|
|
79
|
+
# Inviolable contract: candidates are NEVER auto-promoted. Promotion is a
|
|
80
|
+
# separate, deliberate action (`flair rem promote <id> --rationale "<why>"`)
|
|
81
|
+
# that requires both --rationale and --to (soul|memory). Rejected candidates
|
|
82
|
+
# retain their decision history so recurring false-positives become visible
|
|
83
|
+
# via the `supersedes` chain.
|
|
84
|
+
type MemoryCandidate @table(database: "flair") {
|
|
85
|
+
id: ID @primaryKey
|
|
86
|
+
agentId: String! @indexed
|
|
87
|
+
claim: String! # distilled lesson text
|
|
88
|
+
sourceMemoryIds: [String] # episodic memories feeding the distillation
|
|
89
|
+
rationalePrompt: String # the prompt given to the distillation LLM
|
|
90
|
+
generatedBy: String # model identifier (e.g. "claude-opus-4-7")
|
|
91
|
+
generatedAt: String! @indexed
|
|
92
|
+
status: String! @indexed # pending | promoted | rejected
|
|
93
|
+
target: String # soul | memory (set on promote)
|
|
94
|
+
reviewerId: String # who decided (agentId or human admin)
|
|
95
|
+
reviewRationale: String # required on promote/reject (no rubber-stamp)
|
|
96
|
+
decidedAt: String
|
|
97
|
+
supersedes: String @indexed # previous rejected candidate this replaces
|
|
98
|
+
}
|