iranti 0.2.15 → 0.2.17

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 (58) hide show
  1. package/README.md +55 -94
  2. package/dist/scripts/iranti-cli.js +273 -14
  3. package/dist/scripts/iranti-mcp.js +1 -1
  4. package/dist/scripts/setup.js +7 -1
  5. package/dist/src/api/middleware/validation.d.ts +44 -0
  6. package/dist/src/api/middleware/validation.d.ts.map +1 -1
  7. package/dist/src/api/middleware/validation.js +12 -0
  8. package/dist/src/api/middleware/validation.js.map +1 -1
  9. package/dist/src/api/routes/memory.d.ts.map +1 -1
  10. package/dist/src/api/routes/memory.js +51 -0
  11. package/dist/src/api/routes/memory.js.map +1 -1
  12. package/dist/src/api/server.js +87 -5
  13. package/dist/src/api/server.js.map +1 -1
  14. package/dist/src/archivist/index.d.ts.map +1 -1
  15. package/dist/src/archivist/index.js +93 -0
  16. package/dist/src/archivist/index.js.map +1 -1
  17. package/dist/src/attendant/AttendantInstance.d.ts +53 -0
  18. package/dist/src/attendant/AttendantInstance.d.ts.map +1 -1
  19. package/dist/src/attendant/AttendantInstance.js +419 -6
  20. package/dist/src/attendant/AttendantInstance.js.map +1 -1
  21. package/dist/src/lib/llm.d.ts +2 -0
  22. package/dist/src/lib/llm.d.ts.map +1 -1
  23. package/dist/src/lib/llm.js +21 -2
  24. package/dist/src/lib/llm.js.map +1 -1
  25. package/dist/src/lib/providers/mock.d.ts +1 -0
  26. package/dist/src/lib/providers/mock.d.ts.map +1 -1
  27. package/dist/src/lib/providers/mock.js +7 -0
  28. package/dist/src/lib/providers/mock.js.map +1 -1
  29. package/dist/src/lib/router.d.ts.map +1 -1
  30. package/dist/src/lib/router.js +8 -0
  31. package/dist/src/lib/router.js.map +1 -1
  32. package/dist/src/lib/runtimeLifecycle.d.ts +41 -0
  33. package/dist/src/lib/runtimeLifecycle.d.ts.map +1 -0
  34. package/dist/src/lib/runtimeLifecycle.js +150 -0
  35. package/dist/src/lib/runtimeLifecycle.js.map +1 -0
  36. package/dist/src/lib/staffEventEmitter.d.ts +32 -0
  37. package/dist/src/lib/staffEventEmitter.d.ts.map +1 -0
  38. package/dist/src/lib/staffEventEmitter.js +30 -0
  39. package/dist/src/lib/staffEventEmitter.js.map +1 -0
  40. package/dist/src/lib/staffEventRegistry.d.ts +18 -0
  41. package/dist/src/lib/staffEventRegistry.d.ts.map +1 -0
  42. package/dist/src/lib/staffEventRegistry.js +33 -0
  43. package/dist/src/lib/staffEventRegistry.js.map +1 -0
  44. package/dist/src/librarian/index.d.ts.map +1 -1
  45. package/dist/src/librarian/index.js +238 -0
  46. package/dist/src/librarian/index.js.map +1 -1
  47. package/dist/src/library/locks.d.ts.map +1 -1
  48. package/dist/src/library/locks.js +11 -1
  49. package/dist/src/library/locks.js.map +1 -1
  50. package/dist/src/library/queries.d.ts +4 -4
  51. package/dist/src/resolutionist/index.d.ts.map +1 -1
  52. package/dist/src/resolutionist/index.js +32 -0
  53. package/dist/src/resolutionist/index.js.map +1 -1
  54. package/dist/src/sdk/index.d.ts +63 -0
  55. package/dist/src/sdk/index.d.ts.map +1 -1
  56. package/dist/src/sdk/index.js +39 -1
  57. package/dist/src/sdk/index.js.map +1 -1
  58. package/package.json +1 -1
package/README.md CHANGED
@@ -9,10 +9,10 @@
9
9
 
10
10
  Iranti gives agents persistent, identity-based memory. Facts written by one agent are retrievable by any other agent through exact entity+key lookup. Iranti also supports hybrid search (lexical + vector) when exact keys are unknown. Memory persists across sessions and survives context window limits.
11
11
 
12
- **Latest release:** [`v0.2.10`](https://github.com/nfemmanuel/iranti/releases/tag/v0.2.10)
12
+ **Latest release:** [`v0.2.16`](https://github.com/nfemmanuel/iranti/releases/tag/v0.2.16)
13
13
  Published packages:
14
- - `iranti@0.2.10`
15
- - `@iranti/sdk@0.2.10`
14
+ - `iranti@0.2.16`
15
+ - `@iranti/sdk@0.2.16`
16
16
 
17
17
  ---
18
18
 
@@ -50,97 +50,49 @@ Vector databases answer "what's similar to X?" Iranti answers "what do we know a
50
50
 
51
51
  ---
52
52
 
53
- ## Validated Results
53
+ ## Benchmark Summary
54
54
 
55
- All five goals validated with fictional entities and invented facts that GPT-4o-mini cannot know from training data.
55
+ Iranti has now been rerun against a broader benchmark program covering 13 capability tracks. The current picture is stronger and narrower than the early validation story: exact, durable, shared memory is benchmark-backed; broad semantic-memory claims still need tighter boundaries.
56
56
 
57
- | Goal | Experiment | Score | Status |
58
- |---|---|---|---|
59
- | **1. Easy Integration** | Raw HTTP (9 lines) | 3/3 facts | ✓ PASSED |
60
- | **2. Context Persistence** | observe() API | 6/6 injected | ✓ PASSED |
61
- | **3. Working Retrieval** | Cross-agent query | 5/5 facts | ✓ PASSED |
62
- | **4. Per-Agent Persistence** | Cross-process | 5/5 facts | ✓ PASSED |
63
- | **5. Response Quality** | Memory injection | 0/2 → 2/2 | ✓ PASSED |
57
+ ### Confirmed Strengths
64
58
 
65
- ### Framework Compatibility
59
+ - **Exact lookup (`iranti_query`)**: O(1) retrieval confirmed up to 276k-token haystacks, with a positive differential over baseline at large context size.
60
+ - **Persistence**: Facts survive across sessions and across version upgrades with no observed data loss.
61
+ - **Conflict handling**: Reliable when confidence differentials are large and explicit.
62
+ - **Multi-agent coordination**: Agents can share memory with correct separation and attribution.
63
+ - **Provenance**: `agentId` attribution is preserved correctly.
64
+ - **Relationships**: Relationship writes, reads, and depth traversal are working.
65
+ - **Ingest**: Prose extraction is working and benchmark-confirmed in `v0.2.16`.
66
+ - **Search**: Effective for structured attribute-value retrieval.
67
+ - **Observe / Attend**: Automatic detection and injection behavior improved materially and now works in realistic benchmark conditions.
68
+ - **Session recovery**: Interrupted-session recovery now performs substantially better than baseline.
69
+ - **Upgrade safety**: Memory durability was preserved across three version upgrades.
66
70
 
67
- Validated with multiple agent frameworks:
71
+ ### Current Limits
68
72
 
69
- | Framework | Entity | Facts | Score | Time |
70
- |---|---|---|---|---|
71
- | **Raw OpenAI API** | project/void_runner | 5 | 5/5 ✓ | 14.0s |
72
- | **LangChain** | project/stellar_drift | 5 | 5/5 | 2.9s |
73
- | **CrewAI** | project/nexus_prime | 6 | 6/6 ✓ | 60s |
73
+ - **Search is not yet full semantic paraphrase retrieval.**
74
+ - **Observe still performs better with hints than without them.**
75
+ - Two product defects remain under review:
76
+ - silent retrieval drop when `/` appears inside certain fact values
77
+ - `user/main` noise from benchmark smoke artifacts
74
78
 
75
- **Total: 16/16 facts transferred (100%)**
79
+ ### Practical Position
76
80
 
77
- Full validation report: [`docs/internal/validation_results.md`](docs/internal/validation_results.md) | Multi-framework details: [`docs/internal/MULTI_FRAMEWORK_VALIDATION.md`](docs/internal/MULTI_FRAMEWORK_VALIDATION.md)
81
+ Iranti is strongest today as **structured memory infrastructure for multi-agent systems**:
82
+ - exact entity/key lookup
83
+ - durable shared memory
84
+ - provenance-aware writes
85
+ - conflict-aware storage
86
+ - session-aware recovery
87
+ - upgrade-safe persistence
78
88
 
79
- ### Conflict Benchmark Baseline
89
+ It should not yet be described as a fully general semantic-memory or autonomous-extraction system.
80
90
 
81
- Iranti now also has an adversarial conflict benchmark that measures contradiction handling rather than basic retrieval.
82
-
83
- | Suite | Score | Notes |
84
- |---|---|---|
85
- | **Direct contradiction** | `4/4` | Same entity+key conflicts are explicitly resolved or escalated |
86
- | **Temporal conflict** | `4/4` | Equal-score ties now use deterministic temporal tie-breaks |
87
- | **Cascading conflict** | `4/4` | Deterministic same-entity cross-key contradiction checks |
88
- | **Multi-hop conflict** | `4/4` | Narrow relationship-aware contradiction checks across related entities |
89
- | **Total** | `16/16 (100%)` | Current benchmark coverage for the Librarian |
90
-
91
- Conflict benchmark methodology: [`docs/internal/conflict_benchmark.md`](docs/internal/conflict_benchmark.md)
92
-
93
- ### Consistency Validation
94
-
95
- Iranti also now documents and validates its consistency model empirically:
96
-
97
- | Check | Result |
98
- |---|---|
99
- | Concurrent write serialization | `PASS` |
100
- | Read-after-write visibility | `PASS` |
101
- | Escalation state integrity | `PASS` |
102
- | Observe isolation from uncommitted writes | `PASS` |
103
- | **Total** | `4/4` |
104
-
105
- Consistency model and validation: [`docs/internal/consistency_model.md`](docs/internal/consistency_model.md)
106
-
107
- ### Goal 1: Easy Integration
108
-
109
- - **Entity**: `project/quantum_bridge`
110
- - **Test**: Integrate Iranti with raw HTTP in under 20 lines of Python
111
- - **Result**: 9 lines of code, 3/3 facts written and retrieved
112
- - **Conclusion**: No SDK or framework dependencies required, just standard `requests` library
113
-
114
- ### Goal 2: Context Persistence
115
-
116
- - **Entity**: `project/nexus_prime`
117
- - **Control**: Facts already in context → `observe()` returns 0 to inject (correct, avoids duplication)
118
- - **Treatment**: Facts missing from context → `observe()` returns 6/6 facts for injection
119
- - **Result**: 100% recovery rate when facts fall out of context window
120
-
121
- ### Goal 3: Working Retrieval
122
-
123
- - **Entity**: `project/photon_cascade`
124
- - **Test**: Agent 2 retrieves facts written by Agent 1 with zero shared context
125
- - **Result**: 5/5 facts retrieved via identity-based lookup (entity+key)
126
- - **Conclusion**: Facts accessible across agents with no context window dependency
127
-
128
- ### Goal 4: Per-Agent Knowledge Persistence
129
-
130
- - **Entity**: `project/resonance_field`
131
- - **Test**: Process 1 writes facts and exits, Process 2 reads in new process
132
- - **Result**: 5/5 facts retrieved with no shared state between processes
133
- - **Conclusion**: PostgreSQL storage validated, facts survive across sessions
134
-
135
- ### Goal 5: Response Quality
136
-
137
- - **Entity**: `project/meridian_core`
138
- - **Test**: Ask LLM question requiring facts from earlier in long conversation
139
- - **Control**: Without Iranti → 0/2 facts correct (hallucinated answers)
140
- - **Treatment**: With Iranti memory injection → 2/2 facts correct (accurate answers)
141
- - **Conclusion**: Memory injection eliminates hallucination, improves response accuracy
142
-
143
- Full validation report: [`docs/internal/validation_results.md`](docs/internal/validation_results.md)
91
+ Historical benchmark material remains available here:
92
+ - [`docs/internal/validation_results.md`](docs/internal/validation_results.md)
93
+ - [`docs/internal/MULTI_FRAMEWORK_VALIDATION.md`](docs/internal/MULTI_FRAMEWORK_VALIDATION.md)
94
+ - [`docs/internal/conflict_benchmark.md`](docs/internal/conflict_benchmark.md)
95
+ - [`docs/internal/consistency_model.md`](docs/internal/consistency_model.md)
144
96
 
145
97
  ## Gap Analysis
146
98
 
@@ -210,17 +162,14 @@ The current landscape splits into three buckets:
210
162
 
211
163
  ### Current Position
212
164
 
213
- Iranti is strongest today as infrastructure for developers building multi-agent systems who need shared, structured, queryable memory rather than pure semantic recall. The current evidence base is now more concrete than a positioning claim alone:
214
-
215
- - `16/16` fictional-fact transfer in retrieval validation
216
- - `16/16 (100%)` on the current adversarial conflict benchmark
217
- - `4/4` on empirical consistency validation for serialized writes and read visibility
218
-
219
- That is not a claim that multi-agent memory is solved. It is a claim that Iranti now has reproducible evidence for three things at once:
165
+ Iranti is strongest today as infrastructure for developers building multi-agent systems who need shared, structured, queryable memory rather than pure semantic recall. The current benchmark base now supports a more concrete product claim:
220
166
 
221
- - exact cross-agent fact transfer works
167
+ - exact cross-agent fact transfer works at meaningful context scales
168
+ - facts survive session loss and version upgrades
222
169
  - same-key conflicting writes are serialized and observable
223
- - conflict handling quality is measurable, including clearly documented failure modes
170
+ - relationship traversal, prose ingest, and attended recovery are usable surfaces
171
+
172
+ That is still not a claim that multi-agent memory is solved. It is a claim that Iranti now has broader evidence for durable, structured, attribution-aware memory with recovery and upgrade safety.
224
173
 
225
174
  The next leverage is still product simplicity: setup, operations, and day-to-day inspection need to be simple enough that real users keep Iranti in the loop.
226
175
 
@@ -245,6 +194,18 @@ iranti run --instance local
245
194
 
246
195
  If local PostgreSQL is available, setup can bootstrap a localhost database for you. If local PostgreSQL is not available, setup recommends Docker when Docker is installed, and otherwise steers you to managed PostgreSQL with concrete install guidance.
247
196
 
197
+ Long-running agents can now checkpoint and recover interrupted work. Programmatic session lifecycle methods are available through the SDK and REST API:
198
+ - `checkpoint()`
199
+ - `resumeSession()`
200
+ - `completeSession()`
201
+ - `abandonSession()`
202
+
203
+ Running instances now publish runtime metadata in `/health`, and the CLI can see that state through `iranti status`, `iranti instance show`, and `iranti upgrade --check`. When you want an installed upgrade to immediately take effect on an instance-backed API server, use:
204
+
205
+ ```bash
206
+ iranti upgrade --restart --instance local
207
+ ```
208
+
248
209
  If something still fails and you need more detail, use:
249
210
 
250
211
  ```bash