opencodekit 0.14.2 → 0.14.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.
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
750
750
  // package.json
751
751
  var package_default = {
752
752
  name: "opencodekit",
753
- version: "0.14.2",
753
+ version: "0.14.3",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  type: "module",
756
756
  repository: {
@@ -1,96 +1,96 @@
1
1
  {
2
- "tasks": {
3
- "bg_1767973877335_d2ihzd": {
4
- "taskId": "bg_1767973877335_d2ihzd",
5
- "sessionId": "ses_45c8b89a4ffeuq5BxBRQv4wrwd",
6
- "agent": "explore",
7
- "prompt": "Find all agent definitions in this project. List the file paths and agent names.",
8
- "started": 1767973890766,
9
- "status": "cancelled"
10
- },
11
- "bg_1767973898236_s7kyjm": {
12
- "taskId": "bg_1767973898236_s7kyjm",
13
- "sessionId": "ses_45c8b37ffffeIMMtZrHruaRN7A",
14
- "agent": "scout",
15
- "prompt": "What is the latest version of @opencode-ai/sdk and what are its main features?",
16
- "started": 1767973936815,
17
- "status": "completed"
18
- },
19
- "bg_1767974743680_ppd6p1": {
20
- "taskId": "bg_1767974743680_ppd6p1",
21
- "sessionId": "ses_45c7e517bffeagStJem1UDrHNf",
22
- "agent": "explore",
23
- "prompt": "Find all TypeScript files in the .opencode/tool directory and list them.",
24
- "started": 1767974756797,
25
- "status": "completed",
26
- "beadId": "opencodekit-template-ag8",
27
- "autoCloseBead": true
28
- },
29
- "bg_1767974825480_mlpk5z": {
30
- "taskId": "bg_1767974825480_mlpk5z",
31
- "sessionId": "ses_45c7d11efffe9LnnUp1W2C7GiI",
32
- "agent": "explore",
33
- "prompt": "List all files in .opencode/agent directory",
34
- "started": 1767974843970,
35
- "status": "completed",
36
- "beadId": "opencodekit-template-3k0",
37
- "autoCloseBead": true
38
- },
39
- "bg_1767975003390_y1pliv": {
40
- "taskId": "bg_1767975003390_y1pliv",
41
- "sessionId": "ses_45c7a5afffferx20SjJEy782Ap",
42
- "agent": "explore",
43
- "prompt": "Count the number of markdown files in .opencode/command directory",
44
- "started": 1767975020306,
45
- "status": "completed",
46
- "beadId": "opencodekit-template-0ch",
47
- "autoCloseBead": true
48
- },
49
- "bg_1767975064912_8nvlh7": {
50
- "taskId": "bg_1767975064912_8nvlh7",
51
- "sessionId": "ses_45c796aa9ffeYEhEzxybXEuOfO",
52
- "agent": "explore",
53
- "prompt": "List files in .opencode/agent directory",
54
- "started": 1767975078449,
55
- "status": "completed",
56
- "beadId": "opencodekit-template-ryg",
57
- "autoCloseBead": true
58
- },
59
- "bg_1767982850780_sdkoc4": {
60
- "taskId": "bg_1767982850780_sdkoc4",
61
- "sessionId": "ses_45c029d22ffe7cWSSebxdvxIgL",
62
- "agent": "explore",
63
- "prompt": "Find all TypeScript files in the src/commands directory and list what each command does. This is a test of agent delegation.",
64
- "started": 1767982870771,
65
- "status": "completed"
66
- },
67
- "bg_1767984165033_jyv9bd": {
68
- "taskId": "bg_1767984165033_jyv9bd",
69
- "sessionId": "ses_45bee8f51ffeJ6B5L7AMik624S",
70
- "parentSessionId": "ses_45c0ae526ffeQlmBlscyZMZALt",
71
- "agent": "explore",
72
- "prompt": "List all TypeScript files in .opencode/tool/ directory and briefly describe what each tool does. This is a test of sub-session linking.",
73
- "started": 1767984193526,
74
- "status": "completed"
75
- },
76
- "bg_1767984696916_qi0xa9": {
77
- "taskId": "bg_1767984696916_qi0xa9",
78
- "sessionId": "ses_45be671a7ffeXRL43PHImPBtCh",
79
- "parentSessionId": "ses_45c0ae526ffeQlmBlscyZMZALt",
80
- "agent": "explore",
81
- "prompt": "Find all files in src/commands/ and list their exports. This is a test of the updated background tool.",
82
- "started": 1767984719380,
83
- "status": "completed",
84
- "beadId": "bd-test-123"
85
- },
86
- "bg_1767985457040_uo3le4": {
87
- "taskId": "bg_1767985457040_uo3le4",
88
- "sessionId": "ses_45bdad86bffeZNUcXDi1wrSwxb",
89
- "parentSessionId": "ses_45c0ae526ffeQlmBlscyZMZALt",
90
- "agent": "explore",
91
- "prompt": "List files in src/ directory. Quick test.",
92
- "started": 1767985471066,
93
- "status": "running"
94
- }
95
- }
96
- }
2
+ "tasks": {
3
+ "bg_1767973877335_d2ihzd": {
4
+ "taskId": "bg_1767973877335_d2ihzd",
5
+ "sessionId": "ses_45c8b89a4ffeuq5BxBRQv4wrwd",
6
+ "agent": "explore",
7
+ "prompt": "Find all agent definitions in this project. List the file paths and agent names.",
8
+ "started": 1767973890766,
9
+ "status": "cancelled"
10
+ },
11
+ "bg_1767973898236_s7kyjm": {
12
+ "taskId": "bg_1767973898236_s7kyjm",
13
+ "sessionId": "ses_45c8b37ffffeIMMtZrHruaRN7A",
14
+ "agent": "scout",
15
+ "prompt": "What is the latest version of @opencode-ai/sdk and what are its main features?",
16
+ "started": 1767973936815,
17
+ "status": "completed"
18
+ },
19
+ "bg_1767974743680_ppd6p1": {
20
+ "taskId": "bg_1767974743680_ppd6p1",
21
+ "sessionId": "ses_45c7e517bffeagStJem1UDrHNf",
22
+ "agent": "explore",
23
+ "prompt": "Find all TypeScript files in the .opencode/tool directory and list them.",
24
+ "started": 1767974756797,
25
+ "status": "completed",
26
+ "beadId": "opencodekit-template-ag8",
27
+ "autoCloseBead": true
28
+ },
29
+ "bg_1767974825480_mlpk5z": {
30
+ "taskId": "bg_1767974825480_mlpk5z",
31
+ "sessionId": "ses_45c7d11efffe9LnnUp1W2C7GiI",
32
+ "agent": "explore",
33
+ "prompt": "List all files in .opencode/agent directory",
34
+ "started": 1767974843970,
35
+ "status": "completed",
36
+ "beadId": "opencodekit-template-3k0",
37
+ "autoCloseBead": true
38
+ },
39
+ "bg_1767975003390_y1pliv": {
40
+ "taskId": "bg_1767975003390_y1pliv",
41
+ "sessionId": "ses_45c7a5afffferx20SjJEy782Ap",
42
+ "agent": "explore",
43
+ "prompt": "Count the number of markdown files in .opencode/command directory",
44
+ "started": 1767975020306,
45
+ "status": "completed",
46
+ "beadId": "opencodekit-template-0ch",
47
+ "autoCloseBead": true
48
+ },
49
+ "bg_1767975064912_8nvlh7": {
50
+ "taskId": "bg_1767975064912_8nvlh7",
51
+ "sessionId": "ses_45c796aa9ffeYEhEzxybXEuOfO",
52
+ "agent": "explore",
53
+ "prompt": "List files in .opencode/agent directory",
54
+ "started": 1767975078449,
55
+ "status": "completed",
56
+ "beadId": "opencodekit-template-ryg",
57
+ "autoCloseBead": true
58
+ },
59
+ "bg_1767982850780_sdkoc4": {
60
+ "taskId": "bg_1767982850780_sdkoc4",
61
+ "sessionId": "ses_45c029d22ffe7cWSSebxdvxIgL",
62
+ "agent": "explore",
63
+ "prompt": "Find all TypeScript files in the src/commands directory and list what each command does. This is a test of agent delegation.",
64
+ "started": 1767982870771,
65
+ "status": "completed"
66
+ },
67
+ "bg_1767984165033_jyv9bd": {
68
+ "taskId": "bg_1767984165033_jyv9bd",
69
+ "sessionId": "ses_45bee8f51ffeJ6B5L7AMik624S",
70
+ "parentSessionId": "ses_45c0ae526ffeQlmBlscyZMZALt",
71
+ "agent": "explore",
72
+ "prompt": "List all TypeScript files in .opencode/tool/ directory and briefly describe what each tool does. This is a test of sub-session linking.",
73
+ "started": 1767984193526,
74
+ "status": "completed"
75
+ },
76
+ "bg_1767984696916_qi0xa9": {
77
+ "taskId": "bg_1767984696916_qi0xa9",
78
+ "sessionId": "ses_45be671a7ffeXRL43PHImPBtCh",
79
+ "parentSessionId": "ses_45c0ae526ffeQlmBlscyZMZALt",
80
+ "agent": "explore",
81
+ "prompt": "Find all files in src/commands/ and list their exports. This is a test of the updated background tool.",
82
+ "started": 1767984719380,
83
+ "status": "completed",
84
+ "beadId": "bd-test-123"
85
+ },
86
+ "bg_1767985457040_uo3le4": {
87
+ "taskId": "bg_1767985457040_uo3le4",
88
+ "sessionId": "ses_45bdad86bffeZNUcXDi1wrSwxb",
89
+ "parentSessionId": "ses_45c0ae526ffeQlmBlscyZMZALt",
90
+ "agent": "explore",
91
+ "prompt": "List files in src/ directory. Quick test.",
92
+ "started": 1767985471066,
93
+ "status": "running"
94
+ }
95
+ }
96
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
- "active": false,
3
- "sessionID": null,
4
- "iteration": 0,
5
- "maxIterations": 50,
6
- "completionPromise": "<promise>COMPLETE</promise>",
7
- "task": "",
8
- "prdFile": null,
9
- "progressFile": "progress.txt",
10
- "startedAt": null,
11
- "mode": "hitl"
12
- }
2
+ "active": false,
3
+ "sessionID": null,
4
+ "iteration": 0,
5
+ "maxIterations": 50,
6
+ "completionPromise": "<promise>COMPLETE</promise>",
7
+ "task": "",
8
+ "prdFile": null,
9
+ "progressFile": "progress.txt",
10
+ "startedAt": null,
11
+ "mode": "hitl"
12
+ }
@@ -56,6 +56,23 @@ Tool results and user messages may include `<system-reminder>` tags. These conta
56
56
  - Keep responses concise
57
57
  - First output is ~70-80% right; refinement is expected, not failure
58
58
 
59
+ ## Progress Updates (Preamble Pattern)
60
+
61
+ Before tool calls during multi-step work, send brief updates (8-12 words) to keep users informed:
62
+
63
+ **Good examples:**
64
+
65
+ - "Tests passing. Now updating the API handler."
66
+ - "Found the bug in auth.ts:42. Fixing now."
67
+ - "Linter clean. Running full test suite."
68
+
69
+ **Bad examples:**
70
+
71
+ - [radio silence for 2 minutes while working]
72
+ - "I am now going to use the edit tool to modify the authentication service file..." (too verbose)
73
+
74
+ Keep users in the loop without flooding them.
75
+
59
76
  ## Phase 0: Intent Gate
60
77
 
61
78
  Before ANY action on a new request, do two things.
@@ -198,7 +215,18 @@ Never leave code in a broken state. Never continue hoping random changes will wo
198
215
 
199
216
  ## Task Management
200
217
 
201
- - Use TodoWrite to track subtasks; update every 10-15 minutes
218
+ Use TodoWrite to track subtasks with explicit status flow:
219
+
220
+ ```
221
+ pending → in_progress → completed
222
+ ```
223
+
224
+ **Rules:**
225
+
226
+ - There should be exactly ONE `in_progress` task at a time
227
+ - Complete current tasks before starting new ones
228
+ - Mark tasks complete immediately after finishing (don't batch)
229
+ - Update every 10-15 minutes during long sessions
202
230
  - Finish one subtask end-to-end before starting next
203
231
  - Create handoff via `/handoff <bead-id>` before context limit
204
232
 
@@ -42,6 +42,43 @@ Think, read, search, and delegate @explore/@scout agents to construct a well-for
42
42
  Tool results and user messages may include `<system-reminder>` tags. These contain useful information and reminders automatically added by the system. They bear no direct relation to the specific tool results or user messages in which they appear.
43
43
  </system-reminder>
44
44
 
45
+ ## When to Plan vs When to Execute
46
+
47
+ **Use a plan when:**
48
+
49
+ - Task is non-trivial and requires multiple actions over a long time horizon
50
+ - There are logical phases or dependencies where sequencing matters
51
+ - Work has ambiguity that benefits from outlining high-level goals
52
+ - User asked for more than one thing in a single prompt
53
+ - You need intermediate checkpoints for feedback and validation
54
+
55
+ **Skip planning for:**
56
+
57
+ - Simple single-step queries you can answer immediately
58
+ - Padding simple work with filler steps
59
+ - Trivial tasks where planning adds no value
60
+
61
+ Don't over-plan. If user asks "fix the typo in line 42", just delegate to @build. No plan needed.
62
+
63
+ ---
64
+
65
+ ## Progress Updates (Preamble Pattern)
66
+
67
+ Before tool calls during research, send brief updates (8-12 words) to keep users informed:
68
+
69
+ **Good examples:**
70
+
71
+ - "Explored the repo; now checking API route definitions."
72
+ - "Config's looking tidy. Next up is editing helpers."
73
+ - "Finished reviewing auth patterns. Chasing down error handling."
74
+
75
+ **Bad examples:**
76
+
77
+ - [radio silence for 30 seconds while agents run]
78
+ - "I am now going to use the explore agent to search for patterns in the codebase..." (too verbose)
79
+
80
+ ---
81
+
45
82
  ## Enhanced Planning Workflow
46
83
 
47
84
  ### Phase 1: Initial Understanding
@@ -175,6 +212,62 @@ Final plan should include:
175
212
 
176
213
  **Always end with**: "Ready to proceed with this plan?"
177
214
 
215
+ ---
216
+
217
+ ## Plan Quality Examples
218
+
219
+ **High-quality plans** (specific, actionable, verifiable):
220
+
221
+ ```
222
+ 1. Add CLI entry with file args
223
+ 2. Parse Markdown via CommonMark library
224
+ 3. Apply semantic HTML template
225
+ 4. Handle code blocks, images, links
226
+ 5. Add error handling for invalid files
227
+ ```
228
+
229
+ ```
230
+ 1. Define CSS variables for colors
231
+ 2. Add toggle with localStorage state
232
+ 3. Refactor components to use variables
233
+ 4. Verify all views for readability
234
+ 5. Add smooth theme-change transition
235
+ ```
236
+
237
+ **Low-quality plans** (vague, no actionable steps):
238
+
239
+ ```
240
+ 1. Create CLI tool
241
+ 2. Add Markdown parser
242
+ 3. Convert to HTML
243
+ ```
244
+
245
+ ```
246
+ 1. Add dark mode toggle
247
+ 2. Save preference
248
+ 3. Make styles look good
249
+ ```
250
+
251
+ The difference: high-quality plans have **specific implementation details** that can be verified. Low-quality plans are just restating the goal.
252
+
253
+ ---
254
+
255
+ ## TodoWrite Status Management
256
+
257
+ When creating implementation plans that @build will execute, understand the status flow:
258
+
259
+ ```
260
+ pending → in_progress → completed
261
+ ```
262
+
263
+ **Rules:**
264
+
265
+ - There should be exactly ONE `in_progress` step at a time
266
+ - Complete current tasks before starting new ones
267
+ - Mark steps complete immediately after finishing (don't batch)
268
+
269
+ This helps @build track progress and helps users understand where work stands
270
+
178
271
  ## Specification Quality Checklist
179
272
 
180
273
  Before presenting plan:
@@ -113,6 +113,24 @@ Delegate immediately when you hit any of these:
113
113
  - First output is ~70-80% right; refinement is expected
114
114
  - Quick sanity check after changes (linter/type-check), but don't do full verification loops
115
115
 
116
+ ## Progress Updates (Preamble Pattern)
117
+
118
+ Even at speed, brief updates (8-12 words) help users track what's happening:
119
+
120
+ **Good examples:**
121
+
122
+ - "Found it. Fixing the typo now."
123
+ - "Config updated. Running quick lint check."
124
+ - "Done. Delegating the rest to @build."
125
+
126
+ Don't go silent during multi-file changes. One-liners are fine.
127
+
128
+ ## Ambition vs Precision
129
+
130
+ **Greenfield code** (new files, new features): Be bold. Use modern patterns. Move fast.
131
+
132
+ **Existing code** (modifications, fixes): Be surgical. Match existing style exactly. Don't refactor unrelated code—that's scope creep, delegate to @build.
133
+
116
134
  ## Challenge Obvious Problems
117
135
 
118
136
  Even at speed, don't blindly implement bad ideas. If you see an obvious problem with what the user is asking—something that will clearly break or contradict existing patterns—say so in one sentence and ask if they want to proceed anyway.
@@ -7,11 +7,11 @@
7
7
  },
8
8
  "compaction": {
9
9
  "description": "Session summarizer for context continuity across compactions",
10
- "model": "opencode/big-pickle"
10
+ "model": "proxypal/gemini-2.5-flash"
11
11
  },
12
12
  "explore": {
13
13
  "description": "Fast codebase search specialist",
14
- "model": "opencode/grok-code"
14
+ "model": "proxypal/gemini-3-flash-preview"
15
15
  },
16
16
  "looker": {
17
17
  "description": "Media extraction specialist for images, PDFs, diagrams",
@@ -510,7 +510,7 @@
510
510
  }
511
511
  },
512
512
  "share": "manual",
513
- "small_model": "opencode/gpt-5-nano",
513
+ "small_model": "proxypal/gemini-2.5-flash-lite",
514
514
  "tui": {
515
515
  "diff_style": "auto",
516
516
  "scroll_acceleration": {
@@ -12,7 +12,7 @@
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
14
  "@lancedb/lancedb": "^0.23.0",
15
- "@opencode-ai/plugin": "1.1.8",
15
+ "@opencode-ai/plugin": "1.1.11",
16
16
  "@opencode-ai/sdk": "^1.1.8",
17
17
  "openai": "^6.15.0"
18
18
  },
@@ -222,7 +222,8 @@ export const Lsp: Plugin = async () => {
222
222
  * Injects LSP reminder when user mentions code files in their message
223
223
  * This catches intent BEFORE tools are executed
224
224
  */
225
- "chat.message": async (_input, output) => {
225
+ "chat.message": async (input, output) => {
226
+ const { sessionID, messageID } = input;
226
227
  const { message, parts } = output;
227
228
 
228
229
  // Only process user messages
@@ -259,12 +260,16 @@ Do NOT skip LSP. Editing without semantic context leads to broken code.
259
260
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
260
261
  `;
261
262
 
262
- // Inject synthetic message part - cast to any for synthetic property
263
- (parts as unknown[]).push({
263
+ // Inject synthetic message part with all required fields
264
+ const partId = `lsp-nudge-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
265
+ parts.push({
266
+ id: partId,
267
+ sessionID,
268
+ messageID: messageID || "",
264
269
  type: "text",
265
270
  text: nudgeText,
266
271
  synthetic: true,
267
- });
272
+ } as import("@opencode-ai/sdk").Part);
268
273
  },
269
274
 
270
275
  /**
@@ -66,7 +66,7 @@ function findBdPath(): string {
66
66
  execSync(`test -x "${p}"`, { timeout: 1000 });
67
67
  return p;
68
68
  } catch {
69
- continue;
69
+ // Try next path
70
70
  }
71
71
  }
72
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "type": "module",
6
6
  "repository": {