@tpsdev-ai/flair 0.4.15 → 0.5.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 +49 -0
- package/dist/cli.js +971 -102
- package/dist/keystore.js +116 -0
- package/dist/resources/AdminConnectors.js +54 -0
- package/dist/resources/AdminDashboard.js +68 -0
- package/dist/resources/AdminIdp.js +57 -0
- package/dist/resources/AdminInstance.js +64 -0
- package/dist/resources/AdminMemory.js +92 -0
- package/dist/resources/AdminPrincipals.js +71 -0
- package/dist/resources/Agent.js +49 -2
- package/dist/resources/Credential.js +105 -0
- package/dist/resources/Federation.js +315 -0
- package/dist/resources/Memory.js +11 -0
- package/dist/resources/MemoryBootstrap.js +91 -4
- package/dist/resources/OAuth.js +381 -0
- package/dist/resources/Relationship.js +96 -0
- package/dist/resources/SemanticSearch.js +20 -4
- package/dist/resources/XAA.js +264 -0
- package/dist/resources/admin-layout.js +94 -0
- package/dist/resources/auth-middleware.js +39 -21
- package/dist/resources/embeddings-provider.js +33 -30
- package/dist/resources/federation-crypto.js +52 -0
- package/dist/resources/health.js +67 -1
- package/dist/src/keystore.js +116 -0
- package/package.json +5 -3
- package/schemas/agent.graphql +51 -2
- package/schemas/federation.graphql +51 -0
- package/schemas/memory.graphql +20 -0
- package/schemas/oauth.graphql +72 -0
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# 🎖️ Flair
|
|
2
2
|
|
|
3
3
|
[](https://github.com/tpsdev-ai/flair/actions/workflows/test.yml)
|
|
4
|
+
[](https://github.com/tpsdev-ai/flair/actions/workflows/docker-test.yml)
|
|
4
5
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
6
|
|
|
6
7
|
**Identity, memory, and soul for AI agents. Runs standalone or as part of a [TPS](https://tps.dev) office.**
|
|
@@ -63,12 +64,36 @@ Not all memories are equal:
|
|
|
63
64
|
| `standard` | ✅ Allowed | None | Working memory (default) |
|
|
64
65
|
| `ephemeral` | ✅ Allowed | 24h | Scratch space, temp context |
|
|
65
66
|
|
|
67
|
+
### Temporal Validity
|
|
68
|
+
Memories can be time-bounded with `validFrom` and `validTo` fields. Expired memories are excluded from search and bootstrap automatically — no manual cleanup.
|
|
69
|
+
|
|
70
|
+
### Relationship Graph
|
|
71
|
+
Entity-to-entity triples with temporal bounds. Model structured knowledge — "Flint works-with Anvil since 2024-01-01" — queryable alongside semantic memory.
|
|
72
|
+
|
|
66
73
|
### Real-Time Feeds
|
|
67
74
|
Subscribe to memory or soul changes via WebSocket/SSE. Useful for dashboards, cross-agent sync, or audit trails.
|
|
68
75
|
|
|
69
76
|
### Multi-Agent
|
|
70
77
|
One Flair instance serves any number of agents. Each agent has its own keys, memories, and soul. Agents can't read each other's data without explicit access grants.
|
|
71
78
|
|
|
79
|
+
### OAuth 2.1 Authorization Server
|
|
80
|
+
Built-in OAuth 2.1 server with PKCE, dynamic client registration, and a standards-compliant token endpoint. Agents and services can delegate auth to Flair without a separate IdP.
|
|
81
|
+
|
|
82
|
+
### XAA (Enterprise-Managed Authorization)
|
|
83
|
+
IdP integration for Google Workspace, Azure AD, and Okta. Bind agent identities to enterprise accounts — access follows your org's user lifecycle.
|
|
84
|
+
|
|
85
|
+
### Web Admin
|
|
86
|
+
Server-rendered admin UI for managing principals, connectors, IdPs, and instance configuration. No separate dashboard service.
|
|
87
|
+
|
|
88
|
+
### Federation
|
|
89
|
+
Hub-and-spoke sync between Flair instances using signed requests and pairing tokens. Originator enforcement prevents replay across federated nodes. Share memories across offices without giving any node raw access.
|
|
90
|
+
|
|
91
|
+
### Predictive Bootstrap
|
|
92
|
+
Context-signal-aware preloading. Bootstrap reads active project context, recent activity, and agent role to select the most relevant memories — not just the most recent ones.
|
|
93
|
+
|
|
94
|
+
### Auto Entity Detection
|
|
95
|
+
Passive extraction of entities from memory content on write. Entities are indexed automatically — no tagging required. Feeds the relationship graph without agent intervention.
|
|
96
|
+
|
|
72
97
|
## Quick Start
|
|
73
98
|
|
|
74
99
|
### Prerequisites
|
|
@@ -296,6 +321,22 @@ bun test # Run unit + integration tests
|
|
|
296
321
|
|
|
297
322
|
Integration tests spin up a real Harper instance on a random port, run the test suite, and tear down. No mocks for the database layer.
|
|
298
323
|
|
|
324
|
+
### Test Coverage
|
|
325
|
+
|
|
326
|
+
**203+ unit tests** across 19 test files, covering 7 CI checks on every commit.
|
|
327
|
+
|
|
328
|
+
| Category | Tests | What's covered |
|
|
329
|
+
|----------|-------|----------------|
|
|
330
|
+
| **Auth & Identity** | auth-middleware, auth-scoping, key-paths-and-rotation | Ed25519 signature verification, agent isolation, key rotation |
|
|
331
|
+
| **Memory** | data-scoping, backup-restore, agent-remove-and-grants | Cross-agent access denied, data durability, grant lifecycle |
|
|
332
|
+
| **Content Safety** | content-safety | Prompt injection detection, identity hijacking, format injection, exfiltration patterns |
|
|
333
|
+
| **Search** | temporal-scoring, embeddings | Temporal decay, relevance scoring, embedding generation |
|
|
334
|
+
| **Rate Limiting** | rate-limiter | Per-agent rate limiting, bucket isolation |
|
|
335
|
+
| **Integration** | smoke, durability-guard | End-to-end write/search/bootstrap, durability tier enforcement |
|
|
336
|
+
| **CLI** | cli-v2, cli-api, first-run-soul | Full CLI command coverage, API layer, soul onboarding |
|
|
337
|
+
|
|
338
|
+
CI pipeline: unit tests, integration tests, type check, dependency audit, Semgrep SAST, CodeQL SAST, Docker from-scratch validation.
|
|
339
|
+
|
|
299
340
|
## Status
|
|
300
341
|
|
|
301
342
|
> **Note:** Flair uses [Harper v5](https://harper.fast), currently in beta. We run it in production daily and track upstream closely. Pin your Harper version.
|
|
@@ -312,6 +353,14 @@ Flair is in active development and daily use. We dogfood it — the agents that
|
|
|
312
353
|
- ✅ Real-time feeds (WebSocket/SSE)
|
|
313
354
|
- ✅ Agent-scoped data isolation
|
|
314
355
|
- ✅ Cold start bootstrap with adaptive time window
|
|
356
|
+
- ✅ Predictive bootstrap (context-signal-aware preloading)
|
|
357
|
+
- ✅ Temporal validity (`validFrom`/`validTo` on memories)
|
|
358
|
+
- ✅ Relationship graph (entity-to-entity triples with temporal bounds)
|
|
359
|
+
- ✅ Auto entity detection (passive extraction from memory content)
|
|
360
|
+
- ✅ OAuth 2.1 authorization server (PKCE, dynamic client registration, token endpoint)
|
|
361
|
+
- ✅ XAA enterprise authorization (Google Workspace, Azure AD, Okta)
|
|
362
|
+
- ✅ Web admin UI (principals, connectors, IdPs, instance config)
|
|
363
|
+
- ✅ Federation (hub-and-spoke sync with signed requests and pairing tokens)
|
|
315
364
|
- ✅ OpenClaw memory plugin
|
|
316
365
|
- ✅ MCP server for Claude Code / Cursor / Windsurf
|
|
317
366
|
- ✅ Lightweight client library (`@tpsdev-ai/flair-client`)
|