opencode-metis 0.1.1 → 0.1.3

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 (3) hide show
  1. package/README.md +34 -34
  2. package/dist/worker.cjs +33 -32
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -34,29 +34,29 @@ Persistent memory system for [OpenCode](https://opencode.ai) sessions. Captures
34
34
 
35
35
  ## CLI
36
36
 
37
- | Command | Description |
38
- |---------|-------------|
39
- | `opencode-metis init` | Configure `opencode.json` and copy framework files |
40
- | `opencode-metis start` | Start the memory worker and launch opencode |
41
- | `opencode-metis stop` | Stop the memory worker |
37
+ | Command | Description |
38
+ | -------------------------- | ------------------------------------------------------------------ |
39
+ | `opencode-metis init` | Configure `opencode.json` and copy framework files |
40
+ | `opencode-metis start` | Start the memory worker and launch opencode |
41
+ | `opencode-metis stop` | Stop the memory worker |
42
42
  | `opencode-metis start-mcp` | Start the MCP server (used by opencode via `opencode.json` config) |
43
43
 
44
44
  ## Configuration
45
45
 
46
46
  The memory system has its own optional config file at `~/.config/opencode/memory/settings.json` (separate from OpenCode's config). All fields have sensible defaults:
47
47
 
48
- | Key | Type | Default | Description |
49
- |-----|------|---------|-------------|
50
- | `workerPort` | number | `41777` | HTTP port for the worker daemon |
51
- | `workerBind` | string | `"127.0.0.1"` | Bind address for the worker |
52
- | `chromaDbUrl` | string | `"http://localhost:8000"` | ChromaDB server URL |
53
- | `recencyWindowDays` | number | `90` | Days to boost recent results |
54
- | `retentionDays` | number | `365` | Days before observations expire |
55
- | `tddEnabled` | boolean | `true` | Enforce test-file checks on edit |
56
- | `fileLengthWarn` | number | `300` | Line count warning threshold |
57
- | `fileLengthCritical` | number | `500` | Line count critical threshold |
58
- | `testFilePatterns` | string[] | `["*.test.ts", "*.spec.ts", "*_test.go", "test_*.py"]` | Glob patterns for test files |
59
- | `toolRedirectRules` | array | `[]` | Rules to deny or redirect specific tools |
48
+ | Key | Type | Default | Description |
49
+ | -------------------- | -------- | ------------------------------------------------------ | ---------------------------------------- |
50
+ | `workerPort` | number | `41777` | HTTP port for the worker daemon |
51
+ | `workerBind` | string | `"127.0.0.1"` | Bind address for the worker |
52
+ | `chromaDbUrl` | string | `"http://localhost:8000"` | ChromaDB server URL |
53
+ | `recencyWindowDays` | number | `90` | Days to boost recent results |
54
+ | `retentionDays` | number | `365` | Days before observations expire |
55
+ | `tddEnabled` | boolean | `true` | Enforce test-file checks on edit |
56
+ | `fileLengthWarn` | number | `300` | Line count warning threshold |
57
+ | `fileLengthCritical` | number | `500` | Line count critical threshold |
58
+ | `testFilePatterns` | string[] | `["*.test.ts", "*.spec.ts", "*_test.go", "test_*.py"]` | Glob patterns for test files |
59
+ | `toolRedirectRules` | array | `[]` | Rules to deny or redirect specific tools |
60
60
 
61
61
  ## Architecture
62
62
 
@@ -71,28 +71,28 @@ The system has four components, each built as a separate bundle under `dist/`:
71
71
 
72
72
  Tools available to the AI through the MCP server:
73
73
 
74
- | Tool | Description |
75
- |------|-------------|
76
- | `search` | Semantic or keyword search across observations. Accepts `query`, optional `limit`, `type`, and `project` filters. |
77
- | `timeline` | Chronological context around an observation. Accepts `anchor` (ID, session ID, timestamp, or query) with `depth_before`/`depth_after`. |
78
- | `get_observations` | Fetch full details for specific observation IDs. |
79
- | `save_memory` | Save a new observation with `text`, optional `title` and `project`. |
80
- | `decisions` | Search decision-type observations. Optional `query` and `project` filters. |
81
- | `changes` | Get recent change-type observations. Optional `project` and `limit`. |
74
+ | Tool | Description |
75
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
76
+ | `search` | Semantic or keyword search across observations. Accepts `query`, optional `limit`, `type`, and `project` filters. |
77
+ | `timeline` | Chronological context around an observation. Accepts `anchor` (ID, session ID, timestamp, or query) with `depth_before`/`depth_after`. |
78
+ | `get_observations` | Fetch full details for specific observation IDs. |
79
+ | `save_memory` | Save a new observation with `text`, optional `title` and `project`. |
80
+ | `decisions` | Search decision-type observations. Optional `query` and `project` filters. |
81
+ | `changes` | Get recent change-type observations. Optional `project` and `limit`. |
82
82
 
83
83
  The plugin also registers `memory_search` and `memory_save` as custom tools directly in OpenCode.
84
84
 
85
85
  ## Plugin Hooks
86
86
 
87
- | Hook | Purpose |
88
- |------|---------|
89
- | `session.created` | Injects relevant memory context at session start |
90
- | `tool.execute.before` | Enforces tool redirect rules (deny/redirect) before execution |
91
- | `tool.execute.after` | Captures tool executions as observations |
92
- | `session.idle` | Saves session summaries when the session goes idle |
93
- | `experimental.session.compacting` | Saves active plan and task state before compaction |
94
- | `session.compacted` | Restores memory context after compaction |
95
- | `file.edited` | Checks for missing test files and warns on file length |
87
+ | Hook | Purpose |
88
+ | --------------------------------- | ------------------------------------------------------------- |
89
+ | `session.created` | Injects relevant memory context at session start |
90
+ | `tool.execute.before` | Enforces tool redirect rules (deny/redirect) before execution |
91
+ | `tool.execute.after` | Captures tool executions as observations |
92
+ | `session.idle` | Saves session summaries when the session goes idle |
93
+ | `experimental.session.compacting` | Saves active plan and task state before compaction |
94
+ | `session.compacted` | Restores memory context after compaction |
95
+ | `file.edited` | Checks for missing test files and warns on file length |
96
96
 
97
97
  ## Local Development
98
98