@tpsdev-ai/flair 0.20.1 → 0.21.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 +29 -4
- package/SECURITY.md +28 -18
- package/dist/cli.js +465 -32
- package/dist/deploy.js +93 -11
- package/dist/doctor-client.js +312 -0
- package/dist/install/clients.js +18 -0
- package/dist/rem/restore.js +1 -1
- package/dist/resources/Admin.js +1 -1
- package/dist/resources/AdminConnectors.js +1 -1
- package/dist/resources/AdminDashboard.js +1 -1
- package/dist/resources/AdminIdp.js +1 -1
- package/dist/resources/AdminInstance.js +1 -1
- package/dist/resources/AdminMemory.js +2 -2
- package/dist/resources/AdminPrincipals.js +1 -1
- package/dist/resources/Agent.js +14 -0
- package/dist/resources/AgentCard.js +1 -1
- package/dist/resources/AgentSeed.js +1 -1
- package/dist/resources/Federation.js +98 -2
- package/dist/resources/IngestEvents.js +1 -1
- package/dist/resources/Integration.js +1 -1
- package/dist/resources/Memory.js +123 -17
- package/dist/resources/MemoryBootstrap.js +46 -36
- package/dist/resources/MemoryGrant.js +1 -1
- package/dist/resources/OAuth.js +61 -4
- package/dist/resources/OrgEventCatchup.js +1 -1
- package/dist/resources/Presence.js +55 -3
- package/dist/resources/Relationship.js +10 -1
- package/dist/resources/SemanticSearch.js +14 -14
- package/dist/resources/Soul.js +14 -0
- package/dist/resources/WorkspaceLatest.js +1 -1
- package/dist/resources/WorkspaceState.js +1 -1
- package/dist/resources/agent-auth.js +1 -1
- package/dist/resources/agentcard-fields.js +2 -2
- package/dist/resources/auth-middleware.js +24 -5
- package/dist/resources/bm25-filter.js +1 -1
- package/dist/resources/bm25.js +1 -1
- package/dist/resources/dedup.js +2 -2
- package/dist/resources/ed25519-auth.js +2 -2
- package/dist/resources/embeddings-provider.js +1 -1
- package/dist/resources/federation-nonce-store.js +195 -0
- package/dist/resources/instance-identity.js +53 -0
- package/dist/resources/memory-bootstrap-lib.js +1 -1
- package/dist/resources/memory-read-scope.js +58 -71
- package/dist/resources/memory-visibility.js +37 -0
- package/dist/version-check.js +167 -0
- package/package.json +2 -2
- package/schemas/agent.graphql +7 -0
- package/schemas/federation.graphql +12 -0
- package/schemas/memory.graphql +16 -0
|
@@ -39,6 +39,18 @@ type Peer @table(database: "flair") @export {
|
|
|
39
39
|
updatedAt: String
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
# Anti-replay nonce store (federation-edge-hardening slice 4).
|
|
43
|
+
# Persists nonces recorded by verifyBodySignatureFresh (federation-crypto.ts)
|
|
44
|
+
# so an instance restart doesn't wipe recently-seen nonces — closes the
|
|
45
|
+
# ±30s freshness-window replay gap a restart would otherwise reopen. Nonces
|
|
46
|
+
# are already globally unique (128-bit random, generated per request by
|
|
47
|
+
# signBodyFresh), so the nonce string itself is the primary key — no scope
|
|
48
|
+
# prefix needed. Internal bookkeeping only: never served, never replicated.
|
|
49
|
+
type Nonce @table(database: "flair") {
|
|
50
|
+
id: ID @primaryKey # the nonce string (base64url, 128-bit random)
|
|
51
|
+
seenAt: Int! @indexed # ms-epoch when first recorded — eviction cutoff
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
# Sync log — audit trail for federation operations.
|
|
43
55
|
type SyncLog @table(database: "flair") {
|
|
44
56
|
id: ID @primaryKey
|
package/schemas/memory.graphql
CHANGED
|
@@ -31,6 +31,16 @@ type Memory @table(database: "flair") {
|
|
|
31
31
|
validFrom: String @indexed # ISO timestamp — when this fact became true
|
|
32
32
|
validTo: String @indexed # ISO timestamp — when this fact stopped being true (null = still valid)
|
|
33
33
|
_safetyFlags: [String] # content safety flags from scanContent()
|
|
34
|
+
provenance: String # JSON blob (memory-provenance slice 1): { v, verified: { agentId, timestamp }, claimed?: { model } }
|
|
35
|
+
# Nullable by design — existing rows read back provenance = null, unchanged behavior (clean-upgrade-path gate).
|
|
36
|
+
# Same idiom as Soul.metadata below. Stamped server-side in resources/Memory.ts; never client-writable.
|
|
37
|
+
originatorInstanceId: String @indexed # federation-edge-hardening slice 1: WRITE-TIME instance identity, stamped server-side in
|
|
38
|
+
# resources/Memory.ts from resources/instance-identity.ts's localInstanceId() — never client-writable.
|
|
39
|
+
# Nullable (existing rows read null = clean upgrade). Distinct from the legacy _originatorInstanceId
|
|
40
|
+
# (Federation.ts's mergeRecord — stamped by the RECEIVER at merge time, forgeable/lossy); this field is
|
|
41
|
+
# stamped by the ORIGINATING instance itself and preserved (never re-stamped) as the record flows through
|
|
42
|
+
# sync merges. @indexed for the later sync push-query filter (per-record signature verification and the
|
|
43
|
+
# classifier org-gate are separate, later slices — not built here).
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
# Explicit entity-to-entity relationships with temporal validity.
|
|
@@ -48,6 +58,9 @@ type Relationship @table(database: "flair") {
|
|
|
48
58
|
source: String # where this was learned (memory ID, conversation, etc.)
|
|
49
59
|
createdAt: String! @indexed
|
|
50
60
|
updatedAt: String
|
|
61
|
+
originatorInstanceId: String @indexed # federation-edge-hardening slice 1 — see Memory.originatorInstanceId's doc above
|
|
62
|
+
# for the full contract (write-time stamp, nullable, preserved across sync merges).
|
|
63
|
+
# Stamped server-side in resources/Relationship.ts's put().
|
|
51
64
|
}
|
|
52
65
|
|
|
53
66
|
type Soul @table(database: "flair") {
|
|
@@ -60,6 +73,9 @@ type Soul @table(database: "flair") {
|
|
|
60
73
|
durability: String @indexed
|
|
61
74
|
createdAt: String!
|
|
62
75
|
updatedAt: String
|
|
76
|
+
originatorInstanceId: String @indexed # federation-edge-hardening slice 1 — see Memory.originatorInstanceId's doc above
|
|
77
|
+
# for the full contract (write-time stamp, nullable, preserved across sync merges).
|
|
78
|
+
# Stamped server-side in resources/Soul.ts's post()/put().
|
|
63
79
|
}
|
|
64
80
|
|
|
65
81
|
type MemoryGrant @table(database: "flair") @export {
|