opencodekit 0.17.13 → 0.18.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.
- package/dist/index.js +4 -6
- package/dist/template/.opencode/AGENTS.md +57 -0
- package/dist/template/.opencode/agent/scout.md +0 -37
- package/dist/template/.opencode/command/resume.md +1 -1
- package/dist/template/.opencode/command/status.md +7 -14
- package/dist/template/.opencode/dcp.jsonc +81 -81
- package/dist/template/.opencode/memory/memory.db +0 -0
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +199 -23
- package/dist/template/.opencode/opencode.json.tui-migration.bak +1380 -0
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plugin/README.md +37 -25
- package/dist/template/.opencode/plugin/lib/capture.ts +177 -0
- package/dist/template/.opencode/plugin/lib/context.ts +194 -0
- package/dist/template/.opencode/plugin/lib/curator.ts +234 -0
- package/dist/template/.opencode/plugin/lib/db/maintenance.ts +312 -0
- package/dist/template/.opencode/plugin/lib/db/observations.ts +299 -0
- package/dist/template/.opencode/plugin/lib/db/pipeline.ts +520 -0
- package/dist/template/.opencode/plugin/lib/db/schema.ts +356 -0
- package/dist/template/.opencode/plugin/lib/db/types.ts +211 -0
- package/dist/template/.opencode/plugin/lib/distill.ts +376 -0
- package/dist/template/.opencode/plugin/lib/inject.ts +126 -0
- package/dist/template/.opencode/plugin/lib/memory-admin-tools.ts +188 -0
- package/dist/template/.opencode/plugin/lib/memory-db.ts +54 -936
- package/dist/template/.opencode/plugin/lib/memory-helpers.ts +202 -0
- package/dist/template/.opencode/plugin/lib/memory-hooks.ts +240 -0
- package/dist/template/.opencode/plugin/lib/memory-tools.ts +341 -0
- package/dist/template/.opencode/plugin/memory.ts +56 -60
- package/dist/template/.opencode/plugin/sessions.ts +372 -93
- package/dist/template/.opencode/skill/memory-system/SKILL.md +103 -60
- package/dist/template/.opencode/skill/session-management/SKILL.md +22 -35
- package/dist/template/.opencode/tui.json +15 -0
- package/package.json +1 -1
- package/dist/template/.opencode/plugin/compaction.ts +0 -190
- package/dist/template/.opencode/tool/action-queue.ts +0 -313
- package/dist/template/.opencode/tool/memory-admin.ts +0 -445
- package/dist/template/.opencode/tool/memory-get.ts +0 -143
- package/dist/template/.opencode/tool/memory-read.ts +0 -45
- package/dist/template/.opencode/tool/memory-search.ts +0 -264
- package/dist/template/.opencode/tool/memory-timeline.ts +0 -105
- package/dist/template/.opencode/tool/memory-update.ts +0 -63
- package/dist/template/.opencode/tool/observation.ts +0 -357
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region package.json
|
|
21
|
-
var version = "0.
|
|
21
|
+
var version = "0.18.1";
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/utils/errors.ts
|
|
@@ -2629,7 +2629,6 @@ const MODEL_PRESETS = {
|
|
|
2629
2629
|
review: "opencode/minimax-m2.5-free",
|
|
2630
2630
|
explore: "opencode/glm-5-free",
|
|
2631
2631
|
general: "opencode/glm-5-free",
|
|
2632
|
-
looker: "opencode/minimax-m2.5-free",
|
|
2633
2632
|
vision: "opencode/minimax-m2.5-free",
|
|
2634
2633
|
scout: "opencode/glm-5-free",
|
|
2635
2634
|
painter: "opencode/minimax-m2.5-free"
|
|
@@ -2641,12 +2640,11 @@ const MODEL_PRESETS = {
|
|
|
2641
2640
|
build: "github-copilot/claude-opus-4.6",
|
|
2642
2641
|
plan: "openai/gpt-5.3-codex",
|
|
2643
2642
|
review: "openai/gpt-5.3-codex",
|
|
2644
|
-
explore: "
|
|
2645
|
-
general: "github-copilot/
|
|
2646
|
-
looker: "proxypal/gemini-3-flash",
|
|
2643
|
+
explore: "opencode/minimax-m2.5-free",
|
|
2644
|
+
general: "github-copilot/claude-sonnet-4.6",
|
|
2647
2645
|
vision: "proxypal/gemini-3.1-pro-high",
|
|
2648
2646
|
scout: "proxypal/claude-sonnet-4-6",
|
|
2649
|
-
painter: "proxypal/gemini-3-
|
|
2647
|
+
painter: "proxypal/gemini-3.1-flash-image"
|
|
2650
2648
|
}
|
|
2651
2649
|
}
|
|
2652
2650
|
};
|
|
@@ -220,3 +220,60 @@ Files over ~500 lines become hard to maintain and review. Extract helpers, split
|
|
|
220
220
|
- Cite concrete file paths and line numbers for non-trivial claims
|
|
221
221
|
|
|
222
222
|
_Complexity is the enemy. Minimize moving parts._
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Memory System
|
|
227
|
+
|
|
228
|
+
4-tier automated knowledge pipeline backed by SQLite + FTS5 (porter stemming).
|
|
229
|
+
|
|
230
|
+
**Pipeline:** messages → capture → distillations (TF-IDF) → observations (curator) → LTM injection (system.transform)
|
|
231
|
+
|
|
232
|
+
### Memory Tools
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Search observations (FTS5)
|
|
236
|
+
memory-search({ query: "auth" })
|
|
237
|
+
|
|
238
|
+
# Get full observation details
|
|
239
|
+
memory-get({ ids: "42,45" })
|
|
240
|
+
|
|
241
|
+
# Create observation
|
|
242
|
+
observation({ type: "decision", title: "Use JWT", narrative: "..." })
|
|
243
|
+
|
|
244
|
+
# Update memory file
|
|
245
|
+
memory-update({ file: "research/findings", content: "..." })
|
|
246
|
+
|
|
247
|
+
# Read memory file
|
|
248
|
+
memory-read({ file: "research/findings" })
|
|
249
|
+
|
|
250
|
+
# Admin operations
|
|
251
|
+
memory-admin({ operation: "status" })
|
|
252
|
+
memory-admin({ operation: "capture-stats" })
|
|
253
|
+
memory-admin({ operation: "distill-now" })
|
|
254
|
+
memory-admin({ operation: "curate-now" })
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Session Tools
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Search sessions by keyword
|
|
261
|
+
find_sessions({ query: "auth", limit: 5 })
|
|
262
|
+
|
|
263
|
+
# Read session messages
|
|
264
|
+
read_session({ session_id: "abc123" })
|
|
265
|
+
read_session({ session_id: "abc123", focus: "auth" })
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Directory Structure
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
.opencode/memory/
|
|
272
|
+
├── project/ # Tacit knowledge (auto-injected)
|
|
273
|
+
│ ├── user.md # User preferences
|
|
274
|
+
│ ├── tech-stack.md # Framework, constraints
|
|
275
|
+
│ └── gotchas.md # Footguns, warnings
|
|
276
|
+
├── research/ # Research notes
|
|
277
|
+
├── handoffs/ # Session handoffs
|
|
278
|
+
└── _templates/ # Document templates
|
|
279
|
+
```
|
|
@@ -47,43 +47,6 @@ Find trustworthy external references quickly and return concise, cited guidance.
|
|
|
47
47
|
- Cite every non-trivial claim
|
|
48
48
|
- Prefer high-signal synthesis over long dumps
|
|
49
49
|
|
|
50
|
-
## Source Quality Hierarchy
|
|
51
|
-
|
|
52
|
-
| Rank | Source Type | Tiebreaker |
|
|
53
|
-
| ---- | ----------------------------------------------------- | ---------------------------------------------- |
|
|
54
|
-
| 1 | Official docs/specifications/release notes | Use unless clearly outdated |
|
|
55
|
-
| 2 | Library/framework source code and maintained examples | Prefer recent commits |
|
|
56
|
-
| 3 | Maintainer-authored technical articles | Check date, prefer <1 year |
|
|
57
|
-
| 4 | Community blogs/posts | Use only when higher-ranked sources are absent |
|
|
58
|
-
|
|
59
|
-
## Output
|
|
60
|
-
|
|
61
|
-
- Summary (2-5 bullets)
|
|
62
|
-
- Recommended approach
|
|
63
|
-
- Sources
|
|
64
|
-
- Risks/tradeoffs
|
|
65
|
-
|
|
66
|
-
# Scout Agent
|
|
67
|
-
|
|
68
|
-
**Purpose**: Knowledge seeker — you find the signal in the noise of external information.
|
|
69
|
-
|
|
70
|
-
> _"Good research doesn't dump facts; it creates actionable clarity."_
|
|
71
|
-
|
|
72
|
-
## Identity
|
|
73
|
-
|
|
74
|
-
You are a read-only research agent. You output concise recommendations backed by verifiable sources only.
|
|
75
|
-
|
|
76
|
-
## Task
|
|
77
|
-
|
|
78
|
-
Find trustworthy external references quickly and return concise, cited guidance.
|
|
79
|
-
|
|
80
|
-
## Rules
|
|
81
|
-
|
|
82
|
-
- Never modify project files
|
|
83
|
-
- Never invent URLs; only use verified links
|
|
84
|
-
- Cite every non-trivial claim
|
|
85
|
-
- Prefer high-signal synthesis over long dumps
|
|
86
|
-
|
|
87
50
|
## Before You Scout
|
|
88
51
|
|
|
89
52
|
- **Verify memory first**: Always check memory-search before external research
|
|
@@ -40,12 +40,11 @@ skill({ name: "beads" });
|
|
|
40
40
|
|
|
41
41
|
## Available Tools
|
|
42
42
|
|
|
43
|
-
| Tool | Use When
|
|
44
|
-
| --------------- |
|
|
45
|
-
| `br` | Task status and stats
|
|
46
|
-
| `git` | Git state and history
|
|
47
|
-
| `
|
|
48
|
-
| `action-queue` | Pending approvals and ready tasks |
|
|
43
|
+
| Tool | Use When |
|
|
44
|
+
| --------------- | --------------------- |
|
|
45
|
+
| `br` | Task status and stats |
|
|
46
|
+
| `git` | Git state and history |
|
|
47
|
+
| `find_sessions` | Recent sessions |
|
|
49
48
|
|
|
50
49
|
## Phase 1: Gather State (Parallel)
|
|
51
50
|
|
|
@@ -64,8 +63,7 @@ git log --oneline -5
|
|
|
64
63
|
```
|
|
65
64
|
|
|
66
65
|
```typescript
|
|
67
|
-
|
|
68
|
-
action - queue({ op: "status" });
|
|
66
|
+
find_sessions({ query: "today", limit: 5 });
|
|
69
67
|
```
|
|
70
68
|
|
|
71
69
|
---
|
|
@@ -89,12 +87,7 @@ GIT
|
|
|
89
87
|
Recent: [from git log]
|
|
90
88
|
|
|
91
89
|
SESSIONS TODAY
|
|
92
|
-
[from
|
|
93
|
-
|
|
94
|
-
ACTION QUEUE
|
|
95
|
-
Pending approvals: [from action-queue pending_approvals]
|
|
96
|
-
Ready tasks: [from action-queue ready_tasks]
|
|
97
|
-
Idle workers: [from action-queue idle_workers]
|
|
90
|
+
[from find_sessions]
|
|
98
91
|
```
|
|
99
92
|
|
|
100
93
|
---
|
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
|
|
3
|
+
"enabled": true,
|
|
4
|
+
"debug": false,
|
|
5
|
+
// "minimal" shows prune activity without noise; "detailed" shows token counts
|
|
6
|
+
"pruneNotification": "detailed",
|
|
7
|
+
// "chat" (in-conversation) or "toast" (system notification)
|
|
8
|
+
"pruneNotificationType": "toast",
|
|
9
|
+
// Commands: /dcp context, /dcp stats, /dcp sweep
|
|
10
|
+
"commands": {
|
|
11
|
+
"enabled": true,
|
|
12
|
+
// Protect these from /dcp sweep
|
|
13
|
+
"protectedTools": ["observation", "memory-update", "memory-search"],
|
|
14
|
+
},
|
|
15
|
+
"turnProtection": {
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"turns": 4,
|
|
18
|
+
},
|
|
19
|
+
// Protected file patterns - never auto-prune reads of these files
|
|
20
|
+
"protectedFilePatterns": [
|
|
21
|
+
"**/.env*",
|
|
22
|
+
"**/AGENTS.md",
|
|
23
|
+
"**/.opencode/**",
|
|
24
|
+
"**/.beads/**",
|
|
25
|
+
"**/package.json",
|
|
26
|
+
"**/tsconfig.json",
|
|
27
|
+
"**/biome.json",
|
|
28
|
+
],
|
|
29
|
+
"tools": {
|
|
30
|
+
"settings": {
|
|
31
|
+
"nudgeEnabled": true,
|
|
32
|
+
"nudgeFrequency": 10,
|
|
33
|
+
// v2.0.1: percentage support - 80% of model's context (most models = 128k)
|
|
34
|
+
"contextLimit": "80%",
|
|
35
|
+
// Protect state-modifying and critical workflow tools
|
|
36
|
+
// LSP excluded: ephemeral exploration, prune after understanding
|
|
37
|
+
"protectedTools": [
|
|
38
|
+
"write",
|
|
39
|
+
"edit",
|
|
40
|
+
"memory-update",
|
|
41
|
+
"observation",
|
|
42
|
+
"skill",
|
|
43
|
+
"skill_mcp",
|
|
44
|
+
"task",
|
|
45
|
+
"batch",
|
|
46
|
+
"todowrite",
|
|
47
|
+
"todoread",
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
// v2.0.0: permission model - "allow", "ask", or "deny"
|
|
51
|
+
"prune": {
|
|
52
|
+
"permission": "allow",
|
|
53
|
+
},
|
|
54
|
+
"distill": {
|
|
55
|
+
"permission": "allow",
|
|
56
|
+
"showDistillation": false,
|
|
57
|
+
},
|
|
58
|
+
"compress": {
|
|
59
|
+
// v2.1.1: compress can have boundary matching issues - use ask for safety
|
|
60
|
+
"permission": "allow",
|
|
61
|
+
"showCompression": false,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
// Auto strategies - TOP LEVEL, not under tools
|
|
65
|
+
"strategies": {
|
|
66
|
+
// Dedup = zero LLM cost, high impact - always enable
|
|
67
|
+
"deduplication": {
|
|
68
|
+
"enabled": true,
|
|
69
|
+
"protectedTools": [],
|
|
70
|
+
},
|
|
71
|
+
// Supersede writes = zero cost, removes redundant write inputs after read
|
|
72
|
+
// Note: default changed to false in beta, we explicitly enable
|
|
73
|
+
"supersedeWrites": {
|
|
74
|
+
"enabled": true,
|
|
75
|
+
},
|
|
76
|
+
// Purge error inputs after N turns
|
|
77
|
+
"purgeErrors": {
|
|
78
|
+
"enabled": true,
|
|
79
|
+
"turns": 4,
|
|
80
|
+
"protectedTools": [],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
83
|
}
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|