open-mem 0.6.1 → 0.7.1

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 (116) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +128 -18
  3. package/dist/adapters/http/server.d.ts +16 -0
  4. package/dist/adapters/http/server.d.ts.map +1 -0
  5. package/dist/{servers/sse-broadcaster.d.ts → adapters/http/sse.d.ts} +2 -12
  6. package/dist/adapters/http/sse.d.ts.map +1 -0
  7. package/dist/adapters/mcp/server.d.ts +26 -0
  8. package/dist/adapters/mcp/server.d.ts.map +1 -0
  9. package/dist/adapters/opencode/tools.d.ts +4 -0
  10. package/dist/adapters/opencode/tools.d.ts.map +1 -0
  11. package/dist/adapters/platform/bridge-client.d.ts +32 -0
  12. package/dist/adapters/platform/bridge-client.d.ts.map +1 -0
  13. package/dist/adapters/platform/builtin.d.ts +6 -0
  14. package/dist/adapters/platform/builtin.d.ts.map +1 -0
  15. package/dist/adapters/platform/claude-code.d.ts +7 -0
  16. package/dist/adapters/platform/claude-code.d.ts.map +1 -0
  17. package/dist/adapters/platform/cursor.d.ts +7 -0
  18. package/dist/adapters/platform/cursor.d.ts.map +1 -0
  19. package/dist/adapters/platform/index.d.ts +9 -0
  20. package/dist/adapters/platform/index.d.ts.map +1 -0
  21. package/dist/adapters/platform/normalize.d.ts +14 -0
  22. package/dist/adapters/platform/normalize.d.ts.map +1 -0
  23. package/dist/adapters/platform/opencode.d.ts +7 -0
  24. package/dist/adapters/platform/opencode.d.ts.map +1 -0
  25. package/dist/adapters/platform/runtime.d.ts +27 -0
  26. package/dist/adapters/platform/runtime.d.ts.map +1 -0
  27. package/dist/adapters/platform/types.d.ts +53 -0
  28. package/dist/adapters/platform/types.d.ts.map +1 -0
  29. package/dist/ai/compressor.d.ts.map +1 -1
  30. package/dist/ai/conflict-evaluator.d.ts.map +1 -1
  31. package/dist/ai/entity-extractor.d.ts +2 -2
  32. package/dist/ai/entity-extractor.d.ts.map +1 -1
  33. package/dist/ai/parser.d.ts.map +1 -1
  34. package/dist/ai/prompts.d.ts.map +1 -1
  35. package/dist/ai/summarizer.d.ts.map +1 -1
  36. package/dist/claude-code.d.ts +3 -0
  37. package/dist/claude-code.d.ts.map +1 -0
  38. package/dist/claude-code.js +551 -0
  39. package/dist/config/store.d.ts +33 -0
  40. package/dist/config/store.d.ts.map +1 -0
  41. package/dist/config.d.ts.map +1 -1
  42. package/dist/context/builder.d.ts.map +1 -1
  43. package/dist/contracts/api.d.ts +129 -0
  44. package/dist/contracts/api.d.ts.map +1 -0
  45. package/dist/core/contracts.d.ts +162 -0
  46. package/dist/core/contracts.d.ts.map +1 -0
  47. package/dist/core/memory-engine.d.ts +101 -0
  48. package/dist/core/memory-engine.d.ts.map +1 -0
  49. package/dist/cursor.d.ts +3 -0
  50. package/dist/cursor.d.ts.map +1 -0
  51. package/dist/cursor.js +551 -0
  52. package/dist/daemon.js +157 -124
  53. package/dist/dashboard/assets/index-BTEnO15N.js +63 -0
  54. package/dist/dashboard/assets/index-o3hCx7_v.css +1 -0
  55. package/dist/dashboard/index.html +2 -2
  56. package/dist/db/config-audit.d.ts +10 -0
  57. package/dist/db/config-audit.d.ts.map +1 -0
  58. package/dist/db/entities.d.ts.map +1 -1
  59. package/dist/db/maintenance-history.d.ts +9 -0
  60. package/dist/db/maintenance-history.d.ts.map +1 -0
  61. package/dist/db/observations.d.ts +15 -3
  62. package/dist/db/observations.d.ts.map +1 -1
  63. package/dist/db/schema.d.ts +3 -1
  64. package/dist/db/schema.d.ts.map +1 -1
  65. package/dist/db/user-memory.d.ts.map +1 -1
  66. package/dist/hooks/chat-capture.d.ts +11 -0
  67. package/dist/hooks/chat-capture.d.ts.map +1 -1
  68. package/dist/hooks/context-inject.d.ts.map +1 -1
  69. package/dist/hooks/session-events.d.ts +10 -0
  70. package/dist/hooks/session-events.d.ts.map +1 -1
  71. package/dist/hooks/tool-capture.d.ts +12 -0
  72. package/dist/hooks/tool-capture.d.ts.map +1 -1
  73. package/dist/index.d.ts +5 -3
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +234 -246
  76. package/dist/maintenance.d.ts +3 -0
  77. package/dist/maintenance.d.ts.map +1 -0
  78. package/dist/maintenance.js +380 -0
  79. package/dist/mcp.js +195 -165
  80. package/dist/platform-worker.d.ts +3 -0
  81. package/dist/platform-worker.d.ts.map +1 -0
  82. package/dist/queue/processor.d.ts +26 -1
  83. package/dist/queue/processor.d.ts.map +1 -1
  84. package/dist/runtime/metrics.d.ts +43 -0
  85. package/dist/runtime/metrics.d.ts.map +1 -0
  86. package/dist/runtime/queue-runtime.d.ts +9 -0
  87. package/dist/runtime/queue-runtime.d.ts.map +1 -0
  88. package/dist/search/graph.d.ts.map +1 -1
  89. package/dist/search/orchestrator.d.ts +1 -0
  90. package/dist/search/orchestrator.d.ts.map +1 -1
  91. package/dist/search/reranker.d.ts +1 -1
  92. package/dist/search/reranker.d.ts.map +1 -1
  93. package/dist/store/ports.d.ts +69 -0
  94. package/dist/store/ports.d.ts.map +1 -0
  95. package/dist/store/sqlite/adapters.d.ts +10 -0
  96. package/dist/store/sqlite/adapters.d.ts.map +1 -0
  97. package/dist/tools/recall.d.ts.map +1 -1
  98. package/dist/tools/save.d.ts +1 -1
  99. package/dist/tools/save.d.ts.map +1 -1
  100. package/dist/types.d.ts +67 -0
  101. package/dist/types.d.ts.map +1 -1
  102. package/dist/utils/agents-md.d.ts.map +1 -1
  103. package/dist/utils/folder-context-maintenance.d.ts +12 -0
  104. package/dist/utils/folder-context-maintenance.d.ts.map +1 -0
  105. package/package.json +29 -6
  106. package/dist/dashboard/assets/index-9JxqY10c.css +0 -1
  107. package/dist/dashboard/assets/index-DWbZtwHB.js +0 -60
  108. package/dist/dashboard/dist/assets/index-9JxqY10c.css +0 -1
  109. package/dist/dashboard/dist/assets/index-CTwrdVhA.js +0 -60
  110. package/dist/dashboard/dist/assets/index-DWbZtwHB.js +0 -60
  111. package/dist/dashboard/dist/index.html +0 -19
  112. package/dist/servers/http-server.d.ts +0 -26
  113. package/dist/servers/http-server.d.ts.map +0 -1
  114. package/dist/servers/mcp-server.d.ts +0 -45
  115. package/dist/servers/mcp-server.d.ts.map +0 -1
  116. package/dist/servers/sse-broadcaster.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.0] - 2026-02-08
9
+
10
+ ### Added (Interop & Ops)
11
+ - MCP strict lifecycle support and protocol negotiation (`initialize`, `notifications/initialized`, strict pre-init gating)
12
+ - Deterministic MCP validation errors and JSON-schema tool metadata generation
13
+ - Runtime ops APIs: `GET /v1/health` and `GET /v1/metrics`
14
+ - Platform adapter foundation (`adapters/platform`) with normalized event schema and capability descriptors for OpenCode, Claude Code, and Cursor
15
+ - Dashboard Operations page showing runtime health, queue state, and throughput counters
16
+ - Benchmark scripts:
17
+ - `bun run bench:search`
18
+ - `bun run bench:platform`
19
+ - MCP compatibility matrix documentation (`docs/mcp-compatibility-matrix.md`)
20
+ - External compatibility GA scaffolding:
21
+ - verification harness (`scripts/verify-external-clients.ts`)
22
+ - worker bridge smoke checks (`scripts/smoke-platform-workers.ts`)
23
+ - matrix renderer + release gate scripts (`scripts/render-compat-matrix.ts`, `scripts/check-external-compat-gate.ts`)
24
+ - CI workflows for nightly compatibility evidence and release blocking (`.github/workflows/external-compat.yml`, `.github/workflows/release-gate.yml`)
25
+
26
+ ### Added (Core 0.7.0)
27
+ - Modular architecture boundaries: `core`, `store`, `runtime`, and `adapters` layers
28
+ - `MemoryEngine` interface as single orchestration surface for all transports
29
+ - Shared API contracts with Zod schemas and `ok()`/`fail()` envelope (`contracts/api.ts`)
30
+ - Config control-plane APIs: `GET /api/config/schema`, `GET /api/config/effective`, `POST /api/config/preview`, `PATCH /api/config`
31
+ - Folder-context maintenance endpoints:
32
+ - `POST /api/maintenance/folder-context/dry-run`
33
+ - `POST /api/maintenance/folder-context/clean`
34
+ - `POST /api/maintenance/folder-context/rebuild`
35
+ - Maintenance CLI binary `open-mem-maintenance`:
36
+ - `reset-db --project <path>`
37
+ - `folder-context clean|rebuild [--dry-run]`
38
+ - Import-boundary validation script (`bun run check:boundaries`)
39
+
40
+ ### Changed
41
+ - Tool names renamed from `mem-*` prefix to `memory.*` namespace (e.g. `mem-search` → `memory.find`, `mem-save` → `memory.create`)
42
+ - `memory.revise` now uses immutable revision semantics (creates a successor revision)
43
+ - `memory.remove` now uses tombstone semantics (soft-delete active observation)
44
+ - Active retrieval/search now returns only non-superseded, non-tombstoned observations
45
+ - Schema baseline extended to v10 (`scope`, `revision_of`, `deleted_at` + indexes)
46
+ - Dashboard Settings now includes editable config with preview/apply and folder-context maintenance controls
47
+
48
+ ### Removed
49
+ - Internal backward-compatibility guarantees with pre-`0.7.0` schema internals
50
+ - Package self-dependency (`open-mem` depending on itself)
51
+ - Legacy `servers/http-server.ts`, `servers/mcp-server.ts`, `servers/sse-broadcaster.ts` — replaced by `adapters/http/`, `adapters/mcp/`, `adapters/http/sse.ts`
52
+
53
+ ### Notes
54
+ - Local-first storage remains in project `.open-mem/` (plus optional user-level DB)
55
+ - Pre-`0.7.0` local databases are not auto-migrated to immutable lineage semantics; use the maintenance reset flow
56
+
8
57
  ## [0.2.0] - 2026-02-06
9
58
 
10
59
  ### Added
package/README.md CHANGED
@@ -75,7 +75,7 @@ Without any provider configured, open-mem still works — it falls back to a bas
75
75
  - 🔍 **Hybrid search** — FTS5 full-text search + vector embeddings with Reciprocal Rank Fusion
76
76
  - 💡 **Progressive disclosure** with token-cost-aware context injection and ROI tracking
77
77
  - 🔒 **Privacy controls** with `<private>` tag support
78
- - 🛠️ **Six custom tools**: mem-search, mem-save, mem-timeline, mem-recall, mem-export, mem-import
78
+ - 🛠️ **Nine custom tools**: memory.find, memory.create, memory.history, memory.get, memory.transfer.export, memory.transfer.import, memory.revise, memory.remove, memory.help
79
79
  - 🌐 **MCP server mode** — expose memory tools to any MCP-compatible AI client
80
80
  - 🌳 **Git worktree support** — shared memory across all worktrees
81
81
  - 📂 **AGENTS.md generation** — auto-generated folder-level context on session end
@@ -110,12 +110,15 @@ open-mem runs in the background as an OpenCode plugin. When you use tools (readi
110
110
  │ │
111
111
  │ session.end ──────────> [AGENTS.md Generation] │
112
112
  │ │
113
- mem-search ─────────> [Hybrid Search (FTS5 + Vector/RRF)] │
114
- mem-save ───────────> [Direct Save] │
115
- mem-timeline ───────> [Session Query] │
116
- mem-recall ─────────> [Full Observation Fetch] │
117
- mem-export ─────────> [JSON Export] │
118
- mem-import ─────────> [JSON Import] │
113
+ memory.find ─────────> [Hybrid Search (FTS5 + Vector/RRF)] │
114
+ memory.create ───────────> [Direct Save] │
115
+ memory.history ───────> [Session Query] │
116
+ memory.get ─────────> [Full Observation Fetch] │
117
+ memory.transfer.export ─────────> [JSON Export] │
118
+ memory.transfer.import ─────────> [JSON Import] │
119
+ │ memory.revise ─────────> [Create Revision] │
120
+ │ memory.remove ─────────> [Tombstone Observation] │
121
+ │ memory.help ──────────> [Workflow Guidance] │
119
122
  │ │
120
123
  │ ┌──────────────────────────────────────────┐ │
121
124
  │ │ MCP Server (stdin/stdout, JSON-RPC 2.0) │ │
@@ -144,7 +147,7 @@ If no API key is set, a fallback compressor extracts basic metadata without AI.
144
147
 
145
148
  open-mem injects a compact index into the system prompt at session start. Each entry shows a type icon, title, token cost, and related files — giving the agent a map of what's in memory without consuming the full context window.
146
149
 
147
- The agent sees *what* exists and decides *what to fetch* using `mem-search` and `mem-recall`. This minimizes context window usage while providing full access to all stored observations.
150
+ The agent sees *what* exists and decides *what to fetch* using `memory.find` and `memory.get`. This minimizes context window usage while providing full access to all stored observations.
148
151
 
149
152
  Example of an injected index entry:
150
153
 
@@ -183,7 +186,7 @@ The context injector includes a "Memory Economics" footer showing how much conte
183
186
 
184
187
  ## Custom Tools
185
188
 
186
- ### mem-search
189
+ ### memory.find
187
190
 
188
191
  Search through past observations and session summaries. Uses hybrid search (FTS5 + vector embeddings) when an embedding-capable provider is configured, or FTS5-only otherwise.
189
192
 
@@ -193,7 +196,7 @@ Search through past observations and session summaries. Uses hybrid search (FTS5
193
196
  | `type` | enum | no | Filter by type: `decision`, `bugfix`, `feature`, `refactor`, `discovery`, `change` |
194
197
  | `limit` | number | no | Max results (1–50, default: 10) |
195
198
 
196
- ### mem-save
199
+ ### memory.create
197
200
 
198
201
  Manually save an important observation to memory.
199
202
 
@@ -205,7 +208,7 @@ Manually save an important observation to memory.
205
208
  | `concepts` | string[] | no | Related concepts/tags |
206
209
  | `files` | string[] | no | Related file paths |
207
210
 
208
- ### mem-timeline
211
+ ### memory.history
209
212
 
210
213
  View a timeline of past coding sessions for the current project.
211
214
 
@@ -214,16 +217,16 @@ View a timeline of past coding sessions for the current project.
214
217
  | `limit` | number | no | Number of recent sessions (1–20, default: 5) |
215
218
  | `sessionId` | string | no | Show details for a specific session |
216
219
 
217
- ### mem-recall
220
+ ### memory.get
218
221
 
219
- Fetch full observation details by ID. Use after `mem-search` to get complete narratives, facts, concepts, and file lists for specific observations.
222
+ Fetch full observation details by ID. Use after `memory.find` to get complete narratives, facts, concepts, and file lists for specific observations.
220
223
 
221
224
  | Argument | Type | Required | Description |
222
225
  |----------|------|----------|-------------|
223
226
  | `ids` | string[] | yes | Observation IDs to fetch |
224
227
  | `limit` | number | no | Maximum number of results (1–50, default: 10) |
225
228
 
226
- ### mem-export
229
+ ### memory.transfer.export
227
230
 
228
231
  Export project memories (observations and session summaries) as portable JSON for backup or transfer between machines.
229
232
 
@@ -233,13 +236,41 @@ Export project memories (observations and session summaries) as portable JSON fo
233
236
  | `type` | enum | no | Filter by observation type |
234
237
  | `limit` | number | no | Maximum observations to export |
235
238
 
236
- ### mem-import
239
+ ### memory.transfer.import
237
240
 
238
241
  Import observations and summaries from a JSON export. Skips duplicates by ID.
239
242
 
240
243
  | Argument | Type | Required | Description |
241
244
  |----------|------|----------|-------------|
242
- | `data` | string | yes | JSON string from a mem-export output |
245
+ | `data` | string | yes | JSON string from a memory.transfer.export output |
246
+
247
+ ### memory.revise
248
+
249
+ Update an existing project observation by ID.
250
+ This is immutable: the update creates a new revision and supersedes the previous active revision.
251
+
252
+ | Argument | Type | Required | Description |
253
+ |----------|------|----------|-------------|
254
+ | `id` | string | yes | Observation ID to update |
255
+ | `title` | string | no | Updated title |
256
+ | `narrative` | string | no | Updated narrative |
257
+ | `type` | enum | no | Updated observation type |
258
+ | `concepts` | string[] | no | Updated concepts/tags |
259
+ | `importance` | number | no | Updated importance (1-5) |
260
+
261
+ ### memory.remove
262
+
263
+ Tombstone an existing project observation by ID.
264
+ This is a soft delete: the observation is hidden from default recall/search but retained for lineage.
265
+
266
+ | Argument | Type | Required | Description |
267
+ |----------|------|----------|-------------|
268
+ | `id` | string | yes | Observation ID to delete |
269
+
270
+ ### memory.help
271
+
272
+ Returns a short workflow guide for using memory tools effectively:
273
+ `memory.find` -> `memory.history` -> `memory.get`, plus write/edit/import/export patterns.
243
274
 
244
275
  ## MCP Server Mode
245
276
 
@@ -266,7 +297,80 @@ Or add it to your MCP client config:
266
297
  }
267
298
  ```
268
299
 
269
- The server communicates over stdin/stdout using JSON-RPC 2.0 and exposes: `mem-search`, `mem-save`, `mem-timeline`, `mem-recall`.
300
+ The server communicates over stdin/stdout using JSON-RPC 2.0 and exposes: `memory.find`, `memory.create`, `memory.history`, `memory.get`, `memory.transfer.export`, `memory.transfer.import`, `memory.revise`, `memory.remove`, `memory.help`.
301
+
302
+ Lifecycle behavior:
303
+ - `initialize` negotiates protocol version (default `2024-11-05`)
304
+ - `notifications/initialized` is supported
305
+ - strict mode requires initialize before `tools/list`/`tools/call`
306
+
307
+ ## Platform Adapter Workers (Claude Code / Cursor)
308
+
309
+ open-mem now includes dedicated adapter workers that ingest JSON events over stdin:
310
+
311
+ ```bash
312
+ # Claude Code adapter worker
313
+ bunx open-mem-claude-code --project /path/to/project
314
+
315
+ # Cursor adapter worker
316
+ bunx open-mem-cursor --project /path/to/project
317
+ ```
318
+
319
+ Each line on stdin must be one JSON event. The workers normalize events into open-mem's shared platform schema and reuse the same capture/lifecycle pipeline used by OpenCode hooks.
320
+ Each line receives a JSON response on stdout:
321
+ - success: `{"ok":true,"code":"OK","ingested":true}`
322
+ - parse error: `{"ok":false,"code":"INVALID_JSON",...}`
323
+ - schema mismatch: `{"ok":false,"code":"UNSUPPORTED_EVENT",...}`
324
+
325
+ Optional worker commands:
326
+ - `{"command":"flush"}` to force queue processing
327
+ - `{"command":"health"}` to get worker queue status
328
+ - `{"command":"shutdown"}` to request graceful shutdown
329
+
330
+ Optional HTTP bridge mode:
331
+
332
+ ```bash
333
+ bunx open-mem-claude-code --project /path/to/project --http-port 37877
334
+ ```
335
+
336
+ Endpoints:
337
+ - `POST /v1/events` (same envelope/response semantics as stdio)
338
+ - `GET /v1/health`
339
+
340
+ Enable these adapters via env vars:
341
+ - `OPEN_MEM_PLATFORM_CLAUDE_CODE=true`
342
+ - `OPEN_MEM_PLATFORM_CURSOR=true`
343
+
344
+ ## Data Model Notes
345
+
346
+ - Local-first storage remains project-local in `.open-mem/` (plus optional user-level DB).
347
+ - `memory.revise` uses revision lineage, not in-place mutation.
348
+ - `memory.remove` uses tombstones, not hard delete, for safer auditability and conflict handling.
349
+ - Pre-`0.7.0` databases are not auto-migrated to lineage semantics. Use:
350
+
351
+ ```bash
352
+ bunx open-mem-maintenance reset-db --project /path/to/your/project
353
+ ```
354
+
355
+ ## Config Control Plane
356
+
357
+ open-mem now supports a canonical project config file at `.open-mem/config.json`, in addition to environment variables.
358
+
359
+ Precedence:
360
+ 1. defaults
361
+ 2. `.open-mem/config.json`
362
+ 3. environment variables
363
+ 4. programmatic overrides
364
+
365
+ Dashboard config APIs:
366
+ - `GET /api/config/schema`
367
+ - `GET /api/config/effective`
368
+ - `POST /api/config/preview`
369
+ - `PATCH /api/config`
370
+ - `GET /api/modes`
371
+ - `POST /api/modes/:id/apply`
372
+ - `GET /api/health`
373
+ - `GET /api/metrics`
270
374
 
271
375
  ## Configuration
272
376
 
@@ -293,6 +397,12 @@ open-mem works out of the box with zero configuration. All settings can be custo
293
397
  | `OPEN_MEM_MAX_OBSERVATIONS` | `50` | Maximum observations to consider for context |
294
398
  | `OPEN_MEM_FOLDER_CONTEXT` | `true` | Set to `false` to disable AGENTS.md generation |
295
399
  | `OPEN_MEM_FOLDER_CONTEXT_MAX_DEPTH` | `5` | Max folder depth for AGENTS.md generation |
400
+ | `OPEN_MEM_PLATFORM_OPENCODE` | `true` | Set to `false` to disable OpenCode adapter |
401
+ | `OPEN_MEM_PLATFORM_CLAUDE_CODE` | `false` | Set to `true` to enable Claude Code adapter surface |
402
+ | `OPEN_MEM_PLATFORM_CURSOR` | `false` | Set to `true` to enable Cursor adapter surface |
403
+ | `OPEN_MEM_MCP_COMPAT_MODE` | `strict` | MCP mode: `strict` or `legacy` |
404
+ | `OPEN_MEM_MCP_PROTOCOL_VERSION` | `2024-11-05` | Preferred MCP protocol version |
405
+ | `OPEN_MEM_MCP_SUPPORTED_PROTOCOLS` | `2024-11-05` | Comma-separated supported protocol versions |
296
406
 
297
407
  <details>
298
408
  <summary><strong>Programmatic Configuration Reference</strong></summary>
@@ -392,7 +502,7 @@ rm -rf .open-mem/
392
502
 
393
503
  1. Verify the plugin is loaded: check OpenCode logs for `[open-mem]` messages
394
504
  2. Ensure `OPEN_MEM_CONTEXT_INJECTION` is not set to `false`
395
- 3. Check that observations exist: use the `mem-timeline` tool
505
+ 3. Check that observations exist: use the `memory.history` tool
396
506
  4. The first session won't have context — observations must be captured first
397
507
 
398
508
  ### High memory usage
@@ -0,0 +1,16 @@
1
+ import type { EmbeddingModel } from "ai";
2
+ import type { Context } from "hono";
3
+ import { Hono } from "hono";
4
+ import type { MemoryEngine, RuntimeStatusSnapshot } from "../../core/contracts";
5
+ import type { OpenMemConfig } from "../../types";
6
+ export interface DashboardDeps {
7
+ config: OpenMemConfig;
8
+ projectPath: string;
9
+ embeddingModel: EmbeddingModel | null;
10
+ memoryEngine: MemoryEngine;
11
+ runtimeStatusProvider?: () => RuntimeStatusSnapshot;
12
+ sseHandler?: (c: Context) => Response | Promise<Response>;
13
+ dashboardDir?: string;
14
+ }
15
+ export declare function createDashboardApp(deps: DashboardDeps): Hono;
16
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/adapters/http/server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAS5B,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,WAAW,aAAa;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,YAAY,EAAE,YAAY,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,qBAAqB,CAAC;IACpD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAoCD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CA0e5D"}
@@ -1,12 +1,6 @@
1
1
  import type { Context } from "hono";
2
- import type { MemoryEventBus } from "../events/bus";
3
- /** Writer function that sends an SSE event to a connected client */
2
+ import type { MemoryEventBus } from "../../events/bus";
4
3
  export type SSEWriter = (event: string, data: string) => void | Promise<void>;
5
- /**
6
- * Bridges the MemoryEventBus to connected SSE clients.
7
- * Subscribes to all event bus events and broadcasts them to every connected
8
- * client writer in real time.
9
- */
10
4
  export declare class SSEBroadcaster {
11
5
  private eventBus;
12
6
  private clients;
@@ -19,9 +13,5 @@ export declare class SSEBroadcaster {
19
13
  private subscribeToAll;
20
14
  private broadcast;
21
15
  }
22
- /**
23
- * Creates a Hono route handler for `GET /api/events` that streams SSE events
24
- * from the broadcaster to connected clients.
25
- */
26
16
  export declare function createSSERoute(broadcaster: SSEBroadcaster): (c: Context) => Response;
27
- //# sourceMappingURL=sse-broadcaster.d.ts.map
17
+ //# sourceMappingURL=sse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../src/adapters/http/sse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAmC,MAAM,kBAAkB,CAAC;AAExF,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE9E,qBAAa,cAAc;IAId,OAAO,CAAC,QAAQ;IAH5B,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,QAAQ,CAAyB;gBAErB,QAAQ,EAAE,cAAc;IAI5C,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIlC,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIrC,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,SAAS;CAajB;AAID,wBAAgB,cAAc,CAAC,WAAW,EAAE,cAAc,IACjD,GAAG,OAAO,cAqBlB"}
@@ -0,0 +1,26 @@
1
+ import type { MemoryEngine } from "../../core/contracts";
2
+ export interface McpServerDeps {
3
+ memoryEngine: MemoryEngine;
4
+ version: string;
5
+ compatibilityMode?: "strict" | "legacy";
6
+ protocolVersion?: string;
7
+ supportedProtocolVersions?: string[];
8
+ }
9
+ export declare class McpServer {
10
+ private readonly memoryEngine;
11
+ private readonly version;
12
+ private readonly compatibilityMode;
13
+ private readonly protocolVersion;
14
+ private readonly supportedProtocolVersions;
15
+ private initialized;
16
+ private pendingOps;
17
+ constructor(deps: McpServerDeps);
18
+ start(): void;
19
+ private handle;
20
+ private handleInitialize;
21
+ private getToolDefinitions;
22
+ private handleToolCall;
23
+ private executeTool;
24
+ private send;
25
+ }
26
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/adapters/mcp/server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAgCzD,MAAM,WAAW,aAAa;IAC7B,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAkCD,qBAAa,SAAS;IACrB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAW;IACrD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAuB;gBAE7B,IAAI,EAAE,aAAa;IAW/B,KAAK,IAAI,IAAI;IA0Bb,OAAO,CAAC,MAAM;IA8Cd,OAAO,CAAC,gBAAgB;IAmCxB,OAAO,CAAC,kBAAkB;YAuDZ,cAAc;YA8Cd,WAAW;IAuIzB,OAAO,CAAC,IAAI;CAGZ"}
@@ -0,0 +1,4 @@
1
+ import type { MemoryEngine } from "../../core/contracts";
2
+ import type { ToolDefinition } from "../../types";
3
+ export declare function createOpenCodeTools(engine: MemoryEngine): Record<string, ToolDefinition>;
4
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/adapters/opencode/tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAuBhE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA+IxF"}
@@ -0,0 +1,32 @@
1
+ export type BridgeCommand = "event" | "flush" | "health" | "shutdown";
2
+ export interface BridgeEnvelope {
3
+ id?: string | number;
4
+ command?: BridgeCommand;
5
+ payload?: unknown;
6
+ }
7
+ export interface BridgeStatus {
8
+ platform: "opencode" | "claude-code" | "cursor";
9
+ projectPath: string;
10
+ queue: {
11
+ mode: string;
12
+ running: boolean;
13
+ processing: boolean;
14
+ pending: number;
15
+ };
16
+ }
17
+ export interface BridgeResponse {
18
+ id?: string | number;
19
+ ok: boolean;
20
+ code: string;
21
+ message?: string;
22
+ ingested?: boolean;
23
+ processed?: number;
24
+ status?: BridgeStatus;
25
+ }
26
+ export declare function createEventEnvelope(payload: unknown, id?: string | number): BridgeEnvelope;
27
+ export declare function createCommandEnvelope(command: Exclude<BridgeCommand, "event">, id?: string | number, payload?: unknown): BridgeEnvelope;
28
+ export declare function parseBridgeResponse(input: string | unknown): BridgeResponse;
29
+ export declare function isBridgeSuccess(response: BridgeResponse, allowedCodes?: string[]): boolean;
30
+ export declare function sendBridgeHttpEvent(baseUrl: string, envelope: BridgeEnvelope, fetchImpl?: typeof fetch): Promise<BridgeResponse>;
31
+ export declare function getBridgeHealth(baseUrl: string, fetchImpl?: typeof fetch): Promise<BridgeResponse>;
32
+ //# sourceMappingURL=bridge-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge-client.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/bridge-client.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,cAAc;IAC9B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,EAAE,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF;AAED,MAAM,WAAW,cAAc;IAC9B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,CAE1F;AAED,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,EACxC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EACpB,OAAO,CAAC,EAAE,OAAO,GACf,cAAc,CAEhB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,CAwB3E;AAED,wBAAgB,eAAe,CAC9B,QAAQ,EAAE,cAAc,EACxB,YAAY,GAAE,MAAM,EAAW,GAC7B,OAAO,CAET;AAED,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,EACxB,SAAS,GAAE,OAAO,KAAa,GAC7B,OAAO,CAAC,cAAc,CAAC,CA0BzB;AAED,wBAAsB,eAAe,CACpC,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,OAAO,KAAa,GAC7B,OAAO,CAAC,cAAc,CAAC,CAczB"}
@@ -0,0 +1,6 @@
1
+ import type { PlatformAdapterDescriptor } from "./types";
2
+ export declare const OPEN_CODE_ADAPTER: PlatformAdapterDescriptor;
3
+ export declare const CLAUDE_CODE_ADAPTER: PlatformAdapterDescriptor;
4
+ export declare const CURSOR_ADAPTER: PlatformAdapterDescriptor;
5
+ export declare const BUILTIN_PLATFORM_ADAPTERS: PlatformAdapterDescriptor[];
6
+ //# sourceMappingURL=builtin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/builtin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,iBAAiB,EAAE,yBAS/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,yBASjC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,yBAS5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,yBAAyB,EAIhE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { NormalizedPlatformEvent, PlatformAdapter } from "./types";
2
+ export declare class ClaudeCodeAdapter implements PlatformAdapter {
3
+ readonly descriptor: import("./types").PlatformAdapterDescriptor;
4
+ normalize(rawEvent: unknown): NormalizedPlatformEvent | null;
5
+ }
6
+ export declare function createClaudeCodeAdapter(): PlatformAdapter;
7
+ //# sourceMappingURL=claude-code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/claude-code.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0BxE,qBAAa,iBAAkB,YAAW,eAAe;IACxD,QAAQ,CAAC,UAAU,8CAAuB;IAE1C,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI;CAiB5D;AAED,wBAAgB,uBAAuB,IAAI,eAAe,CAEzD"}
@@ -0,0 +1,7 @@
1
+ import type { NormalizedPlatformEvent, PlatformAdapter } from "./types";
2
+ export declare class CursorAdapter implements PlatformAdapter {
3
+ readonly descriptor: import("./types").PlatformAdapterDescriptor;
4
+ normalize(rawEvent: unknown): NormalizedPlatformEvent | null;
5
+ }
6
+ export declare function createCursorAdapter(): PlatformAdapter;
7
+ //# sourceMappingURL=cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/cursor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAgCxE,qBAAa,aAAc,YAAW,eAAe;IACpD,QAAQ,CAAC,UAAU,8CAAkB;IAErC,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI;CAkB5D;AAED,wBAAgB,mBAAmB,IAAI,eAAe,CAErD"}
@@ -0,0 +1,9 @@
1
+ export * from "./bridge-client";
2
+ export * from "./builtin";
3
+ export * from "./claude-code";
4
+ export * from "./cursor";
5
+ export * from "./normalize";
6
+ export * from "./opencode";
7
+ export * from "./runtime";
8
+ export * from "./types";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { NormalizedPlatformEvent, PlatformName } from "./types";
2
+ /**
3
+ * Normalize OpenCode hook payloads into a platform-agnostic event shape.
4
+ */
5
+ export declare function normalizeOpenCodeEvent(input: {
6
+ eventType: "tool.execute.after" | "chat.message" | "event";
7
+ payload: unknown;
8
+ output?: unknown;
9
+ }): NormalizedPlatformEvent | null;
10
+ /**
11
+ * Normalize external adapter events (Claude Code / Cursor) to common schema.
12
+ */
13
+ export declare function normalizeExternalEvent(platform: Exclude<PlatformName, "opencode">, raw: unknown): NormalizedPlatformEvent | null;
14
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAerE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC7C,SAAS,EAAE,oBAAoB,GAAG,cAAc,GAAG,OAAO,CAAC;IAC3D,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,uBAAuB,GAAG,IAAI,CAmGjC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,EAC3C,GAAG,EAAE,OAAO,GACV,uBAAuB,GAAG,IAAI,CAiDhC"}
@@ -0,0 +1,7 @@
1
+ import type { NormalizedPlatformEvent, PlatformAdapter } from "./types";
2
+ export declare class OpenCodeAdapter implements PlatformAdapter {
3
+ readonly descriptor: import("./types").PlatformAdapterDescriptor;
4
+ normalize(rawEvent: unknown): NormalizedPlatformEvent | null;
5
+ }
6
+ export declare function createOpenCodePlatformAdapter(): PlatformAdapter;
7
+ //# sourceMappingURL=opencode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/opencode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQxE,qBAAa,eAAgB,YAAW,eAAe;IACtD,QAAQ,CAAC,UAAU,8CAAqB;IAExC,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI;CAU5D;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAE/D"}
@@ -0,0 +1,27 @@
1
+ import { type SessionLifecycleDeps } from "../../hooks/session-events";
2
+ import type { OpenMemConfig } from "../../types";
3
+ import type { NormalizedPlatformEvent, PlatformAdapter, PlatformName } from "./types";
4
+ export interface PlatformIngestionRuntimeDeps {
5
+ adapter: PlatformAdapter;
6
+ queue: SessionLifecycleDeps["queue"];
7
+ sessions: SessionLifecycleDeps["sessions"];
8
+ observations: SessionLifecycleDeps["observations"];
9
+ pendingMessages: SessionLifecycleDeps["pendingMessages"];
10
+ projectPath: string;
11
+ config: OpenMemConfig;
12
+ }
13
+ export declare class PlatformIngestionRuntime {
14
+ private readonly adapter;
15
+ private readonly lifecycleDeps;
16
+ private readonly queue;
17
+ private readonly sessions;
18
+ private readonly observations;
19
+ private readonly projectPath;
20
+ private readonly config;
21
+ constructor(deps: PlatformIngestionRuntimeDeps);
22
+ platform(): PlatformName;
23
+ normalize(rawEvent: unknown): NormalizedPlatformEvent | null;
24
+ ingestRaw(rawEvent: unknown): Promise<boolean>;
25
+ ingestNormalized(event: NormalizedPlatformEvent): Promise<void>;
26
+ }
27
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEpG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEtF,MAAM,WAAW,4BAA4B;IAC5C,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC3C,YAAY,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACnD,eAAe,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;CACtB;AAED,qBAAa,wBAAwB;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuB;IACrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmC;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuC;IACpE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAE3B,IAAI,EAAE,4BAA4B;IAiB9C,QAAQ,IAAI,YAAY;IAIxB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI;IAItD,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAO9C,gBAAgB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;CAoCrE"}
@@ -0,0 +1,53 @@
1
+ export type PlatformName = "opencode" | "claude-code" | "cursor";
2
+ export interface PlatformCapabilities {
3
+ nativeSessionLifecycle: boolean;
4
+ nativeToolCapture: boolean;
5
+ nativeChatCapture: boolean;
6
+ emulatedIdleFlush: boolean;
7
+ }
8
+ export interface PlatformAdapterDescriptor {
9
+ name: PlatformName;
10
+ version: string;
11
+ capabilities: PlatformCapabilities;
12
+ }
13
+ export type NormalizedPlatformEvent = {
14
+ kind: "session.start";
15
+ platform: PlatformName;
16
+ sessionId: string;
17
+ occurredAt: string;
18
+ metadata?: Record<string, unknown>;
19
+ } | {
20
+ kind: "session.end";
21
+ platform: PlatformName;
22
+ sessionId: string;
23
+ occurredAt: string;
24
+ metadata?: Record<string, unknown>;
25
+ } | {
26
+ kind: "chat.message";
27
+ platform: PlatformName;
28
+ sessionId: string;
29
+ occurredAt: string;
30
+ role: "user" | "assistant" | "system";
31
+ text: string;
32
+ metadata?: Record<string, unknown>;
33
+ } | {
34
+ kind: "tool.execute";
35
+ platform: PlatformName;
36
+ sessionId: string;
37
+ occurredAt: string;
38
+ callId: string;
39
+ toolName: string;
40
+ output: string;
41
+ metadata?: Record<string, unknown>;
42
+ } | {
43
+ kind: "idle.flush";
44
+ platform: PlatformName;
45
+ sessionId: string;
46
+ occurredAt: string;
47
+ metadata?: Record<string, unknown>;
48
+ };
49
+ export interface PlatformAdapter {
50
+ readonly descriptor: PlatformAdapterDescriptor;
51
+ normalize(rawEvent: unknown): NormalizedPlatformEvent | null;
52
+ }
53
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/platform/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC;AAEjE,MAAM,WA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EAAE,sBAAsB,EAC9B,UAAU,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAC1C,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAgCrC"}
1
+ {"version":3,"file":"conflict-evaluator.d.ts","sourceRoot":"","sources":["../../src/ai/conflict-evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,IAAI,CAAC;AACtD,OAAO,EAAE,KAAK,kBAAkB,EAAmC,MAAM,UAAU,CAAC;AACpF,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,MAAM,WAAW,CAAC;AAInB,6CAA6C;AAC7C,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;AAC9E,yCAAyC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,2DAA2D;AAC3D,MAAM,WAAW,uBAAuB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,MAAM,CAA0B;IAExC,SAAS,sBAAgB;gBAEb,MAAM,EAAE,uBAAuB;IAkB3C;;;OAGG;IACG,QAAQ,CACb,MAAM,EAAE,sBAAsB,EAC9B,UAAU,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAC1C,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAgCrC"}
@@ -2,9 +2,9 @@ import { generateText } from "ai";
2
2
  import { type ParsedEntityExtraction } from "./parser";
3
3
  import { type EntityExtractionObservation } from "./prompts";
4
4
  /** Re-exported entity extraction result types. */
5
- export type { ParsedEntityExtraction as EntityExtractionResult, EntityExtractionObservation, };
5
+ export type { ParsedEntityExtraction as EntityExtractionResult, EntityExtractionObservation };
6
6
  /** Re-exported entity and relation types. */
7
- export type { ParsedEntity as ExtractedEntity, ParsedRelation as ExtractedRelation, EntityType, RelationshipType, } from "./parser";
7
+ export type { EntityType, ParsedEntity as ExtractedEntity, ParsedRelation as ExtractedRelation, RelationshipType, } from "./parser";
8
8
  /** Configuration for the AI-powered entity extractor. */
9
9
  export interface EntityExtractorConfig {
10
10
  provider: string;
@@ -1 +1 @@
1
- {"version":3,"file":"entity-extractor.d.ts","sourceRoot":"","sources":["../../src/ai/entity-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,MAAM,IAAI,CAAC;AACtD,OAAO,EACN,KAAK,sBAAsB,EAE3B,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,KAAK,2BAA2B,EAEhC,MAAM,WAAW,CAAC;AAInB,kDAAkD;AAClD,YAAY,EACX,sBAAsB,IAAI,sBAAsB,EAChD,2BAA2B,GAC3B,CAAC;AACF,6CAA6C;AAC7C,YAAY,EACX,YAAY,IAAI,eAAe,EAC/B,cAAc,IAAI,iBAAiB,EACnC,UAAU,EACV,gBAAgB,GAChB,MAAM,UAAU,CAAC;AAElB,yDAAyD;AACzD,MAAM,WAAW,qBAAqB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,eAAe;IAC3B,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,MAAM,CAAwB;IAEtC,SAAS,sBAAgB;gBAEb,MAAM,EAAE,qBAAqB;IAkBzC;;;OAGG;IACG,OAAO,CACZ,WAAW,EAAE,2BAA2B,GACtC,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC;CAmCzC"}
1
+ {"version":3,"file":"entity-extractor.d.ts","sourceRoot":"","sources":["../../src/ai/entity-extractor.ts"],"names":[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