iranti 0.2.21 → 0.2.23

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 (62) hide show
  1. package/README.md +24 -23
  2. package/dist/scripts/codex-setup.js +11 -5
  3. package/dist/scripts/iranti-cli.js +855 -120
  4. package/dist/scripts/iranti-mcp.js +1 -1
  5. package/dist/src/api/middleware/auth.d.ts +13 -0
  6. package/dist/src/api/middleware/auth.d.ts.map +1 -1
  7. package/dist/src/api/middleware/auth.js.map +1 -1
  8. package/dist/src/api/middleware/authorization.d.ts.map +1 -1
  9. package/dist/src/api/middleware/authorization.js +6 -3
  10. package/dist/src/api/middleware/authorization.js.map +1 -1
  11. package/dist/src/api/middleware/validation.d.ts +109 -0
  12. package/dist/src/api/middleware/validation.d.ts.map +1 -1
  13. package/dist/src/api/middleware/validation.js +97 -5
  14. package/dist/src/api/middleware/validation.js.map +1 -1
  15. package/dist/src/api/routes/knowledge.d.ts.map +1 -1
  16. package/dist/src/api/routes/knowledge.js +2 -1
  17. package/dist/src/api/routes/knowledge.js.map +1 -1
  18. package/dist/src/api/routes/memory.d.ts.map +1 -1
  19. package/dist/src/api/routes/memory.js +74 -11
  20. package/dist/src/api/routes/memory.js.map +1 -1
  21. package/dist/src/api/server.js +32 -3
  22. package/dist/src/api/server.js.map +1 -1
  23. package/dist/src/attendant/AttendantInstance.d.ts +43 -0
  24. package/dist/src/attendant/AttendantInstance.d.ts.map +1 -1
  25. package/dist/src/attendant/AttendantInstance.js +87 -11
  26. package/dist/src/attendant/AttendantInstance.js.map +1 -1
  27. package/dist/src/attendant/index.d.ts +2 -1
  28. package/dist/src/attendant/index.d.ts.map +1 -1
  29. package/dist/src/attendant/index.js +4 -1
  30. package/dist/src/attendant/index.js.map +1 -1
  31. package/dist/src/lib/dockerCliParsing.d.ts +3 -0
  32. package/dist/src/lib/dockerCliParsing.d.ts.map +1 -0
  33. package/dist/src/lib/dockerCliParsing.js +23 -0
  34. package/dist/src/lib/dockerCliParsing.js.map +1 -0
  35. package/dist/src/lib/runtimeEnv.d.ts.map +1 -1
  36. package/dist/src/lib/runtimeEnv.js +27 -11
  37. package/dist/src/lib/runtimeEnv.js.map +1 -1
  38. package/dist/src/lib/runtimeLifecycle.d.ts +21 -0
  39. package/dist/src/lib/runtimeLifecycle.d.ts.map +1 -1
  40. package/dist/src/lib/runtimeLifecycle.js +120 -0
  41. package/dist/src/lib/runtimeLifecycle.js.map +1 -1
  42. package/dist/src/librarian/index.d.ts.map +1 -1
  43. package/dist/src/librarian/index.js +154 -116
  44. package/dist/src/librarian/index.js.map +1 -1
  45. package/dist/src/library/entity-resolution.d.ts.map +1 -1
  46. package/dist/src/library/entity-resolution.js +14 -4
  47. package/dist/src/library/entity-resolution.js.map +1 -1
  48. package/dist/src/library/locks.d.ts.map +1 -1
  49. package/dist/src/library/locks.js +35 -8
  50. package/dist/src/library/locks.js.map +1 -1
  51. package/dist/src/library/queries.d.ts +14 -20
  52. package/dist/src/library/queries.d.ts.map +1 -1
  53. package/dist/src/library/queries.js +90 -22
  54. package/dist/src/library/queries.js.map +1 -1
  55. package/dist/src/sdk/index.d.ts +39 -6
  56. package/dist/src/sdk/index.d.ts.map +1 -1
  57. package/dist/src/sdk/index.js +84 -13
  58. package/dist/src/sdk/index.js.map +1 -1
  59. package/dist/src/security/scopes.d.ts.map +1 -1
  60. package/dist/src/security/scopes.js +13 -1
  61. package/dist/src/security/scopes.js.map +1 -1
  62. package/package.json +2 -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.20`](https://github.com/nfemmanuel/iranti/releases/tag/v0.2.20)
12
+ **Latest release:** [`v0.2.21`](https://github.com/nfemmanuel/iranti/releases/tag/v0.2.21)
13
13
  Published packages:
14
- - `iranti@0.2.20`
15
- - `@iranti/sdk@0.2.20`
14
+ - `iranti@0.2.21`
15
+ - `@iranti/sdk@0.2.21`
16
16
 
17
17
  ---
18
18
 
@@ -52,27 +52,26 @@ Vector databases answer "what's similar to X?" Iranti answers "what do we know a
52
52
 
53
53
  ## Benchmark Summary
54
54
 
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.
55
+ Iranti has now been rerun against a broader benchmark program covering 11 active capability tracks in `v0.2.21`. The current picture is stronger and narrower than the early validation story: exact, durable, shared memory is benchmark-backed; broad semantic-memory and autonomous-memory claims still need tighter boundaries.
56
56
 
57
57
  ### Confirmed Strengths
58
58
 
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.
59
+ - **Exact lookup (`iranti_query`)**: Retrieval remains exact and durable across genuine session and process breaks. At tested scale (`N=1938`, about `107k` tokens), the measured advantage is efficiency, not accuracy: Iranti answered `10/10` with zero haystack tokens while the baseline also answered `10/10` after reading the full document.
60
+ - **Persistence across sessions**: Facts survive context-window loss and genuine process boundaries. `iranti_query` remained `8/8` across isolated session breaks in the rerun.
61
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.
62
+ - **Multi-agent coordination**: Agents can share memory across genuine subprocess boundaries with zero shared conversational context.
63
+ - **Provenance on writes**: Write-side attribution through stored source metadata is working and benchmark-confirmed.
64
+ - **Ingest**: Prose extraction is accurate on clean entities in `v0.2.21`. Reliability under conflict-heavy transactional conditions should still be treated as a separate, narrower claim.
65
+ - **Observe with hints**: `iranti_observe` recovers facts reliably when given the right entity hint, with higher-confidence facts returned first.
68
66
  - **Session recovery**: Interrupted-session recovery now performs substantially better than baseline.
69
- - **Upgrade safety**: Memory durability was preserved across three version upgrades.
70
67
 
71
68
  ### Current Limits
72
69
 
73
- - **Search is not yet full semantic paraphrase retrieval.**
74
- - **Observe still performs better on confidence ranking than on broad progress-fact discovery.**
75
- - **Structured search is operational, but not yet broad semantic paraphrase retrieval.**
70
+ - **Search is lexical-first today, not semantic multi-hop retrieval.** In the current rerun, hop-value discovery was `0/4`; bare entity-token lookup worked, but `vectorScore` stayed `0` across results.
71
+ - **`iranti_attend` is not yet a reliable autonomous classifier.** Natural-language attend classification still falls back to `classification_parse_failed_default_false`; `forceInject` works as an operator bypass, not as proof of autonomous injection.
72
+ - **Observe performs better with explicit entity hints than with cold-start discovery.**
73
+ - **Upgrade durability should be scoped carefully.** The `v0.2.21` upgrade procedure reinitialized the instance under test; do not assume KB data survives upgrades without an explicit preservation or migration path.
74
+ - **Relationship and provenance reflection surfaces remain partially permission-gated in benchmark sessions.** The rerun did not prove `iranti_relate`, `iranti_related`, `iranti_related_deep`, or `iranti_who_knows` end-to-end under the benchmark session policy.
76
75
 
77
76
  ### Practical Position
78
77
 
@@ -82,9 +81,8 @@ Iranti is strongest today as **structured memory infrastructure for multi-agent
82
81
  - provenance-aware writes
83
82
  - conflict-aware storage
84
83
  - session-aware recovery
85
- - upgrade-safe persistence
86
84
 
87
- It should not yet be described as a fully general semantic-memory or autonomous-extraction system.
85
+ It should not yet be described as a fully general semantic-memory, semantic-search, or autonomous-memory-injection system.
88
86
 
89
87
  Historical benchmark material remains available here:
90
88
  - [`docs/internal/validation_results.md`](docs/internal/validation_results.md)
@@ -106,7 +104,7 @@ The current competitive case for Iranti is strongest when a team needs memory th
106
104
  - Explicit per-fact confidence scores
107
105
  - Per-agent memory injection through the Attendant
108
106
  - Temporal exact lookup with `asOf` and ordered `history()`
109
- - Relationship primitives through `relate()`, `getRelated()`, and `getRelatedDeep()`
107
+ - Relationship primitives through `relate()`, `getRelated()`, and `getRelatedDeep()` at the product surface, with benchmark confirmation for those MCP-accessible paths still pending
110
108
  - Hybrid retrieval when exact keys are unknown
111
109
  - Local install + project binding flow for Claude Code and Codex
112
110
  - Published npm / PyPI surfaces with machine-level CLI setup
@@ -163,11 +161,12 @@ The current landscape splits into three buckets:
163
161
  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:
164
162
 
165
163
  - exact cross-agent fact transfer works at meaningful context scales
166
- - facts survive session loss and version upgrades
164
+ - facts survive session loss and genuine process breaks
167
165
  - same-key conflicting writes are serialized and observable
168
- - relationship traversal, prose ingest, and attended recovery are usable surfaces
166
+ - prose ingest is accurate on clean entities
167
+ - attended recovery works with explicit hints, while autonomous attend classification remains a known defect
169
168
 
170
- 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.
169
+ 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 exact retrieval and bounded recovery behavior.
171
170
 
172
171
  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.
173
172
 
@@ -316,7 +315,7 @@ iranti codex-setup
316
315
  codex -C /path/to/your/project
317
316
  ```
318
317
 
319
- When `iranti codex-setup` is run from a project directory, it automatically captures that project's `.env.iranti` as `IRANTI_PROJECT_ENV` so Codex resolves the correct Iranti instance consistently.
318
+ By default, `iranti codex-setup` does not pin a project binding globally. `iranti mcp` resolves `.env.iranti` from the active project/workspace at runtime. Use `--project-env` only if you deliberately want to pin Codex globally to one project binding.
320
319
 
321
320
  Alias:
322
321
 
@@ -755,6 +754,8 @@ Express server on port 3001 with endpoints:
755
754
  - `POST /memory/attend` - Decide whether to inject memory for this turn
756
755
  - `POST /memory/observe` - Context persistence (inject missing facts)
757
756
  - `POST /memory/handshake` - Working memory brief for agent session
757
+ - `GET /memory/sessions` - List persisted operator-visible session checkpoints across agents, with optional operator filters/sorting
758
+ - `GET /memory/session/:agentId` - Inspect the current persisted session checkpoint/recovery state
758
759
  - `POST /kb/relate` - Create entity relationship
759
760
  - `GET /kb/related/:entityType/:entityId` - Get related entities
760
761
  - `POST /agents/register` - Register agent in registry
@@ -71,7 +71,8 @@ function printHelp() {
71
71
  'Notes:',
72
72
  ' - Registers a global Codex MCP entry using `codex mcp add`.',
73
73
  ' - Prefers the installed CLI path: `iranti mcp`.',
74
- ' - Auto-detects .env.iranti from the current working directory and stores it as IRANTI_PROJECT_ENV.',
74
+ ' - By default does not pin IRANTI_PROJECT_ENV, so Codex can resolve .env.iranti from the active project/workspace at runtime.',
75
+ ' - Use --project-env only when you deliberately want to pin Codex globally to one project binding.',
75
76
  ' - Use --local-script only if you need to point Codex at this repo build directly.',
76
77
  ' - Does not store DATABASE_URL in Codex config; iranti-mcp loads project/instance env at runtime.',
77
78
  ' - Replaces any existing MCP entry with the same name.',
@@ -141,8 +142,7 @@ function resolveProjectEnv(options) {
141
142
  }
142
143
  return resolved;
143
144
  }
144
- const candidate = node_path_1.default.resolve(process.cwd(), '.env.iranti');
145
- return node_fs_1.default.existsSync(candidate) ? candidate : undefined;
145
+ return undefined;
146
146
  }
147
147
  function canUseInstalledIranti(repoRoot) {
148
148
  try {
@@ -204,7 +204,10 @@ function main() {
204
204
  if (useInstalled) {
205
205
  console.log('Registration target: installed CLI (`iranti mcp`)');
206
206
  if (projectEnv) {
207
- console.log(`Project binding: ${projectEnv}`);
207
+ console.log(`Pinned project binding: ${projectEnv}`);
208
+ }
209
+ else {
210
+ console.log('Project binding: not pinned; `iranti mcp` will resolve `.env.iranti` from the active project/workspace at runtime.');
208
211
  }
209
212
  console.log('Launch Codex in the project you want to bind to Iranti, for example:');
210
213
  console.log(' codex -C C:\\path\\to\\your\\project');
@@ -212,7 +215,10 @@ function main() {
212
215
  else {
213
216
  console.log(`Registration target: repo build (${mcpScript})`);
214
217
  if (projectEnv) {
215
- console.log(`Project binding: ${projectEnv}`);
218
+ console.log(`Pinned project binding: ${projectEnv}`);
219
+ }
220
+ else {
221
+ console.log('Project binding: not pinned; `iranti mcp` will resolve `.env.iranti` from the active project/workspace at runtime.');
216
222
  }
217
223
  console.log(`Launch with: codex -C "${repoRoot}"`);
218
224
  }