@brainervirus/workit-opencode 0.8.5 → 0.8.7
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/assets/skills/wk-handoff/SKILL.md +1 -0
- package/assets/skills/wk-implement/SKILL.md +4 -0
- package/assets/skills/wk-init/SKILL.md +5 -5
- package/assets/skills/wk-status/SKILL.md +2 -2
- package/assets/templates/execution-contract.md +2 -0
- package/assets/templates/plan-template.md +2 -0
- package/assets/vendor/superpowers/skills/subagent-driven-development/SKILL.md +9 -1
- package/dist/plugin.js +58 -27
- package/package.json +2 -2
|
@@ -13,5 +13,6 @@ disable-model-invocation: true
|
|
|
13
13
|
5. Pass only `message`; the tool itself recognizes an exact `--stay` flag and otherwise selects the new session.
|
|
14
14
|
6. Report the structured success, failure stage, or partial result; never infer success.
|
|
15
15
|
7. After any `workflow_handoff_session` result—success, partial, or failure—end the originating turn immediately after one status message. Never create todos, execute the plan inline, modify files, retry handoff, or call another tool.
|
|
16
|
+
8. A destination run that executes the plan must still end with `workflow_plan_complete` (or the CLI `workit flow complete`) once the SDD ledger is complete and repository verification passes, and never finish the run while the plan is still `active`.
|
|
16
17
|
|
|
17
18
|
Never emit a continuation prompt, use the clipboard, or ask the user to copy text. If selected, report the session ID only if the current session remains visible. If staying, report the seeded session ID. On failure, report `stage` and `error`; preserve any returned session for the session picker and never recreate it automatically. `todowrite` and `task` are unnecessary here.
|
|
@@ -34,8 +34,12 @@ For every plan task whose ID is absent from `completed_task_ids`:
|
|
|
34
34
|
6. Dispatch separate `general` agents for spec-compliance review and code-quality review. **Blocking findings** (Critical, Important, or spec-compliance) may trigger at most **two** fix+re-review rounds per task. **Advisory** findings (Minor, style, YAGNI, taste) never pause the loop — append them to `<SDD_DIR>/advisories.md` with the task id.
|
|
35
35
|
7. Append the validated ledger line with `workflow_sdd_append_progress` using `confirmed: true`, then mark the task completed with `todowrite`.
|
|
36
36
|
|
|
37
|
+
Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; each progress line records the task's real base..head shas.
|
|
38
|
+
|
|
37
39
|
Never redispatch completed task IDs. Pass task briefs and review diffs to agents; do not make them reparse the plan. Keep commits on the in-place feature/bugfix branch.
|
|
38
40
|
|
|
39
41
|
## Final gate
|
|
40
42
|
|
|
41
43
|
After all remaining tasks, dispatch a final full-branch code review, run `workflow_verify`, and report exact per-check results. Present the full `<SDD_DIR>/advisories.md` roll-up once, then use native `question` so the user can choose which advisory items to fix, discuss, or discard. Only then may advisory fixes run. Use `workflow_git_context` for the final commit preview and the `wk-commit` skill for any approved commit. If a tracked stash reference exists, preview reapplication with `question`, then call `workflow_branch_setup` with `confirmed: true` only after approval.
|
|
44
|
+
|
|
45
|
+
**Mandatory:** end the run by calling `workflow_plan_complete` (OpenCode/Cursor) or the CLI `workit flow complete` (CLI host) after the final task once the SDD ledger is complete (all task IDs appended) and `workflow_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
|
|
@@ -7,10 +7,10 @@ disable-model-invocation: true
|
|
|
7
7
|
# Init
|
|
8
8
|
|
|
9
9
|
1. Load this skill explicitly through OpenCode's `skill` tool.
|
|
10
|
-
2. Call the read-only `
|
|
10
|
+
2. Call the read-only `workit_init_status` context tool; its result is ground truth.
|
|
11
11
|
3. Draft an exact preview of each missing scaffold and the active VCS provider.
|
|
12
12
|
4. For each guarded mutation, use native `question` with concise choices and allow a custom answer.
|
|
13
|
-
5. Call `
|
|
13
|
+
5. Call `workit_init_apply` only after approval with `confirmed: true` and the chosen action.
|
|
14
14
|
6. Report the structured success, failure stage, or partial result; never infer success.
|
|
15
15
|
|
|
16
16
|
Never ask for or accept tokens in chat. For missing YouTrack configuration, preview `youtrack_scaffold`; for missing VCS configuration, ask GitLab or GitHub, preview `vcs_scaffold`, and pass `vcs_provider`. Both provider token placeholders may be created, but identify which one is active. Show the returned token-create URL and local edit path after apply. Verification remains a separate `wk-status` run. `todowrite` and `task` are unnecessary here.
|
|
@@ -24,8 +24,8 @@ When the user wants to personalize the toolkit (locale, timezone, branch policy)
|
|
|
24
24
|
3. **Branch policy preset** — gitflow / github-flow / trunk-based / custom.
|
|
25
25
|
4. **Custom branch lists** (only when preset = custom): allowed patterns (`feature/*`, `codex/*`, …) and protected names (`main`, …).
|
|
26
26
|
|
|
27
|
-
Then call `
|
|
27
|
+
Then call `workit_init_apply` with `action: "config"`, `confirmed: true`, and the answered values. Report the written `config.json` path and its contents.
|
|
28
28
|
|
|
29
|
-
After config, call `
|
|
29
|
+
After config, call `workit_init_apply` with `action: "gitignore"` and `confirmed: true` to ensure the project `.gitignore` covers `docs/*/sdd/` and common OS/editor entries (creates it if missing, preserves existing entries).
|
|
30
30
|
|
|
31
|
-
After gitignore, call `
|
|
31
|
+
After gitignore, call `workit_init_apply` with `action: "hygiene"`, `confirmed: true`, and `include_open_source: true` for open-source repos — creates CHANGELOG.md (Keep a Changelog), README.md, .editorconfig, .gitattributes, and optionally LICENSE + CONTRIBUTING.md. Never overwrites existing files.
|
|
@@ -7,10 +7,10 @@ disable-model-invocation: true
|
|
|
7
7
|
# Status
|
|
8
8
|
|
|
9
9
|
1. Load this skill explicitly through OpenCode's `skill` tool.
|
|
10
|
-
2. Call the read-only `
|
|
10
|
+
2. Call the read-only `workit_status` context tool once; its result is ground truth.
|
|
11
11
|
3. Draft the health report from structured facts.
|
|
12
12
|
4. This workflow has no guarded mutation and does not need `question`.
|
|
13
13
|
5. Do not call any mutation tool.
|
|
14
14
|
6. Report the structured success, failure stage, or partial result; never infer success.
|
|
15
15
|
|
|
16
|
-
Show every `items[]` result, the resolved YouTrack settings and verification, the VCS provider and verification, and the exact `ready` verdict. For placeholders, point to the returned token creation and edit paths; never request tokens in chat. Use only `
|
|
16
|
+
Show every `items[]` result, the resolved YouTrack settings and verification, the VCS provider and verification, and the exact `ready` verdict. For placeholders, point to the returned token creation and edit paths; never request tokens in chat. Use only `workit_status` and report its structured state. Do not run shell, Git, direct HTTP, isolated token verification, or any mutation. `todowrite` and `task` are unnecessary for this read-only workflow.
|
|
@@ -59,6 +59,8 @@ For each top-level task absent from `completed_task_ids`:
|
|
|
59
59
|
|
|
60
60
|
Run a separate full-branch code review, then `workflow_verify`. Present the full `<SDD_DIR>/advisories.md` roll-up once, then use native `question` so the user can choose which advisory items to fix, discuss, or discard. Report exact check results and never infer success. Use `workflow_git_context` for a commit preview and load `wk-commit` through `skill` for an approved commit. If working state contains a stash reference, preview reapplication through `question`, then call `workflow_branch_setup` with `confirmed: true` after approval.
|
|
61
61
|
|
|
62
|
+
**Mandatory:** end the run by calling `workflow_plan_complete` (OpenCode/Cursor) or the CLI `workit flow complete` (CLI host) after the final task once the SDD ledger is complete (all task IDs appended) and `workflow_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
|
|
63
|
+
|
|
62
64
|
## Task order
|
|
63
65
|
|
|
64
66
|
<TASK_LIST>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
## Global Constraints
|
|
11
11
|
|
|
12
|
+
- Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; each progress line records the task's real base..head shas.
|
|
13
|
+
- The final task ends execution with `workflow_plan_complete` (or the CLI `workit flow complete`) once the SDD ledger is complete and repository verification passes — a run never finishes while the plan is still `active`.
|
|
12
14
|
- <project-wide requirements, one line each>
|
|
13
15
|
|
|
14
16
|
---
|
|
@@ -63,6 +63,7 @@ digraph process {
|
|
|
63
63
|
"Read plan, note context and global constraints, create todos" [shape=box];
|
|
64
64
|
"More tasks remain?" [shape=diamond];
|
|
65
65
|
"Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" [shape=box];
|
|
66
|
+
"Run verification, then workflow_plan_complete once the ledger is complete and verification passes" [shape=box];
|
|
66
67
|
"Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
|
|
67
68
|
|
|
68
69
|
"Read plan, note context and global constraints, create todos" -> "Dispatch implementer subagent (./implementer-prompt.md)";
|
|
@@ -78,10 +79,13 @@ digraph process {
|
|
|
78
79
|
"Mark task complete in todo list and progress ledger" -> "More tasks remain?";
|
|
79
80
|
"More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
|
|
80
81
|
"More tasks remain?" -> "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" [label="no"];
|
|
81
|
-
"Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" -> "
|
|
82
|
+
"Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" -> "Run verification, then workflow_plan_complete once the ledger is complete and verification passes";
|
|
83
|
+
"Run verification, then workflow_plan_complete once the ledger is complete and verification passes" -> "Use superpowers:finishing-a-development-branch";
|
|
82
84
|
}
|
|
83
85
|
```
|
|
84
86
|
|
|
87
|
+
**Mandatory completion:** after the final whole-branch review, run repository verification. Once the SDD ledger is complete and verification passes, end the run by calling `workflow_plan_complete` (or the CLI `workit flow complete`) — a complete ledger and green verification are the tool's gates. Never finish while the plan is still `active`.
|
|
88
|
+
|
|
85
89
|
## Pre-Flight Plan Review
|
|
86
90
|
|
|
87
91
|
Before dispatching Task 1, scan the plan once for conflicts:
|
|
@@ -257,6 +261,10 @@ a ledger file, not only in todos.
|
|
|
257
261
|
- When a task's review comes back clean, append one line to the ledger in
|
|
258
262
|
the same message as your other bookkeeping:
|
|
259
263
|
`Task N: complete (commits <base7>..<head7>, review clean)`.
|
|
264
|
+
- Each task produces exactly one contiguous non-empty commit range: fix
|
|
265
|
+
rounds append commits to it, never amend or rewrite an active review
|
|
266
|
+
range, and the ledger progress line records the task's real base..head
|
|
267
|
+
shas.
|
|
260
268
|
- The ledger is your recovery map: the commits it names exist in git even
|
|
261
269
|
when your context no longer remembers creating them. After compaction,
|
|
262
270
|
trust the ledger and `git log` over your own recollection.
|
package/dist/plugin.js
CHANGED
|
@@ -316,9 +316,9 @@ var compiledOpenCodeSections = () => {
|
|
|
316
316
|
|
|
317
317
|
// packages/workit-opencode/src/bootstrap.ts
|
|
318
318
|
var root = fileURLToPath(new URL("../assets/", import.meta.url));
|
|
319
|
-
var marker = "<
|
|
319
|
+
var marker = "<workit-contract>";
|
|
320
320
|
var cached;
|
|
321
|
-
var
|
|
321
|
+
var loadWorkitBootstrap = (rootDir) => {
|
|
322
322
|
const contractPath = path3.join(rootDir, "templates", "superpowers-doc-contract.md");
|
|
323
323
|
try {
|
|
324
324
|
return readFileSync3(contractPath, "utf8");
|
|
@@ -326,10 +326,10 @@ var loadWorkflowBootstrap = (rootDir) => {
|
|
|
326
326
|
return null;
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
|
-
var
|
|
329
|
+
var getWorkitBootstrap = () => {
|
|
330
330
|
if (cached !== undefined)
|
|
331
331
|
return cached;
|
|
332
|
-
const contract =
|
|
332
|
+
const contract = loadWorkitBootstrap(root);
|
|
333
333
|
if (contract === null) {
|
|
334
334
|
cached = null;
|
|
335
335
|
return null;
|
|
@@ -364,7 +364,7 @@ On success, use native \`question\` with exactly: Subagent-driven, Inline, Hando
|
|
|
364
364
|
When the user asks about a library, framework, or API reference, prefer live docs (e.g. Context7 MCP \`resolve-library-id\` + \`query-docs\`) over training-data guesses.
|
|
365
365
|
${userSections ? `
|
|
366
366
|
${userSections}
|
|
367
|
-
` : ""}</
|
|
367
|
+
` : ""}</workit-contract>`;
|
|
368
368
|
return cached;
|
|
369
369
|
};
|
|
370
370
|
|
|
@@ -1132,10 +1132,22 @@ function isWorkitPlugin(value) {
|
|
|
1132
1132
|
const pkgPath = s.includes("/packages/workit-opencode/") || s.includes("/packages/workit-cursor/") || s.includes("/node_modules/@brainervirus/workit-opencode/") || s.includes("/node_modules/@brainervirus/workit-cursor/");
|
|
1133
1133
|
return named(s, "workflow-toolkit") || named(s, "workflow-toolkit-opencode") || named(s, "local/workflow-toolkit") || named(s, "workit") || named(s, "local/workit") || named(s, "@brainervirus/workit-opencode") || named(s, "@brainervirus/workit-cursor") || url && pkgPath || s.startsWith("git+file://") && s.includes("workflow-toolkit");
|
|
1134
1134
|
}
|
|
1135
|
-
var CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@
|
|
1135
|
+
var CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@latest";
|
|
1136
|
+
function cursorMcpServerEntry(_packageDir) {
|
|
1137
|
+
return {
|
|
1138
|
+
command: "npx",
|
|
1139
|
+
args: [
|
|
1140
|
+
"-y",
|
|
1141
|
+
"--prefer-online",
|
|
1142
|
+
`--package=${CURSOR_RUNTIME_PACKAGE}`,
|
|
1143
|
+
"workit-cursor-mcp",
|
|
1144
|
+
"${workspaceFolder}"
|
|
1145
|
+
]
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1136
1148
|
function cursorHooksEntry(_packageDir) {
|
|
1137
1149
|
return {
|
|
1138
|
-
command: `npx -y --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
|
|
1150
|
+
command: `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
|
|
1139
1151
|
args: []
|
|
1140
1152
|
};
|
|
1141
1153
|
}
|
|
@@ -1505,12 +1517,9 @@ var registeredCursorLauncher = (res) => {
|
|
|
1505
1517
|
return "invalid";
|
|
1506
1518
|
}
|
|
1507
1519
|
const executable = path10.basename(command).toLowerCase();
|
|
1520
|
+
const canonical = cursorMcpServerEntry("").args;
|
|
1508
1521
|
if (executable === "npx" || executable === "npx.exe" || executable === "npx.cmd") {
|
|
1509
|
-
if (args
|
|
1510
|
-
return "invalid";
|
|
1511
|
-
if (args[1] !== `--package=${CURSOR_RUNTIME_PACKAGE}`)
|
|
1512
|
-
return "invalid";
|
|
1513
|
-
if (args[2] !== "workit-cursor-mcp")
|
|
1522
|
+
if (args.length !== canonical.length || args.some((a, i) => a !== canonical[i]))
|
|
1514
1523
|
return "invalid";
|
|
1515
1524
|
return { kind: "npx" };
|
|
1516
1525
|
}
|
|
@@ -1538,6 +1547,18 @@ var registeredCursorHook = (res) => {
|
|
|
1538
1547
|
return "invalid";
|
|
1539
1548
|
return typeof entry.command === "string" ? entry.command : "invalid";
|
|
1540
1549
|
};
|
|
1550
|
+
var validLocalDistHook = (command, res) => {
|
|
1551
|
+
const m = /^node\s+(.+)$/.exec(command.trim());
|
|
1552
|
+
if (!m)
|
|
1553
|
+
return false;
|
|
1554
|
+
const entry = m[1].trim();
|
|
1555
|
+
if (!path10.isAbsolute(entry))
|
|
1556
|
+
return false;
|
|
1557
|
+
if (path10.resolve(entry) !== path10.resolve(path10.join(res.cursorPluginDir, "dist", "cursor-session-start.js"))) {
|
|
1558
|
+
return false;
|
|
1559
|
+
}
|
|
1560
|
+
return validNodeEntry(entry, "node", res.env);
|
|
1561
|
+
};
|
|
1541
1562
|
var checkLauncher = (res) => {
|
|
1542
1563
|
const dev = res.dev;
|
|
1543
1564
|
const hosts = hostsFor(res.host);
|
|
@@ -1553,7 +1574,7 @@ var checkLauncher = (res) => {
|
|
|
1553
1574
|
const hook = registeredCursorHook(res);
|
|
1554
1575
|
if (hook === "invalid") {
|
|
1555
1576
|
missing.push(`cursor: canonical session-start hook in ${path10.join(res.cursorPluginDir, "hooks", "hooks-cursor.json")}`);
|
|
1556
|
-
} else if (hook !== null && hook !== canonicalCursorHook) {
|
|
1577
|
+
} else if (hook !== null && hook !== canonicalCursorHook && !validLocalDistHook(hook, res)) {
|
|
1557
1578
|
missing.push(`cursor: canonical session-start hook in ${path10.join(res.cursorPluginDir, "hooks", "hooks-cursor.json")} (registered ${hook})`);
|
|
1558
1579
|
}
|
|
1559
1580
|
}
|
|
@@ -3284,7 +3305,7 @@ function initStatusData(configDirPath = configDir()) {
|
|
|
3284
3305
|
ok: fs4.existsSync(ytJson) && youtrackConfig !== null && !("error" in youtrackConfig),
|
|
3285
3306
|
path: fs4.existsSync(ytJson) ? resolvePath(ytJson) : path16.resolve(ytJson),
|
|
3286
3307
|
config_edit_path: resolvePath(ytJson),
|
|
3287
|
-
fix: "
|
|
3308
|
+
fix: "workit_init_apply action=youtrack_scaffold"
|
|
3288
3309
|
});
|
|
3289
3310
|
const ytTokenPath = youtrackConfig?.tokenFile ?? path16.join(configDirPath, "youtrack.token");
|
|
3290
3311
|
const tokenText = fs4.existsSync(ytTokenPath) ? fs4.readFileSync(ytTokenPath, "utf8").trim() : "";
|
|
@@ -3347,7 +3368,7 @@ function initStatusData(configDirPath = configDir()) {
|
|
|
3347
3368
|
ok: fs4.existsSync(vcsJson) && vcsCfg !== null && !("error" in vcsCfg),
|
|
3348
3369
|
path: fs4.existsSync(vcsJson) ? resolvePath(vcsJson) : path16.resolve(vcsJson),
|
|
3349
3370
|
config_edit_path: resolvePath(vcsJson),
|
|
3350
|
-
fix: "
|
|
3371
|
+
fix: "workit_init_apply action=vcs_scaffold"
|
|
3351
3372
|
});
|
|
3352
3373
|
const provActive = vcsCfg && !("error" in vcsCfg) ? vcsCfg.provider : null;
|
|
3353
3374
|
const tokenItem = (tid, label, rawPath, providerKey) => {
|
|
@@ -4352,8 +4373,13 @@ function sddReviewPackage({
|
|
|
4352
4373
|
const contained = resolveDocsPath({ workspace_root, path: sdd_dir });
|
|
4353
4374
|
if (!contained.ok)
|
|
4354
4375
|
return { error: contained.error };
|
|
4376
|
+
if (base_sha === head_sha) {
|
|
4377
|
+
return {
|
|
4378
|
+
error: `empty commit range (base_sha ${base_sha} === head_sha ${head_sha}): nothing to review`,
|
|
4379
|
+
code: "empty_commit_range"
|
|
4380
|
+
};
|
|
4381
|
+
}
|
|
4355
4382
|
const dir = contained.path;
|
|
4356
|
-
mkdirSync8(dir, { recursive: true });
|
|
4357
4383
|
const base7 = base_sha.slice(0, 7);
|
|
4358
4384
|
const head7 = head_sha.slice(0, 7);
|
|
4359
4385
|
const diffPath = path19.join(dir, `review-${base7}..${head7}.diff`);
|
|
@@ -4363,6 +4389,13 @@ function sddReviewPackage({
|
|
|
4363
4389
|
encoding: "utf8",
|
|
4364
4390
|
stdio: ["pipe", "pipe", "pipe"]
|
|
4365
4391
|
});
|
|
4392
|
+
if (diff.trim() === "") {
|
|
4393
|
+
return {
|
|
4394
|
+
error: `empty commit range (${base_sha}..${head_sha}): diff is empty, nothing to review`,
|
|
4395
|
+
code: "empty_commit_range"
|
|
4396
|
+
};
|
|
4397
|
+
}
|
|
4398
|
+
mkdirSync8(dir, { recursive: true });
|
|
4366
4399
|
writeFileSync10(diffPath, diff, "utf8");
|
|
4367
4400
|
const rel = posix2(path19.relative(contained.base, diffPath));
|
|
4368
4401
|
return { diff_path: rel, base_sha, head_sha, base7, head7 };
|
|
@@ -4370,7 +4403,7 @@ function sddReviewPackage({
|
|
|
4370
4403
|
return { error: error instanceof Error ? error.message : "git diff failed" };
|
|
4371
4404
|
}
|
|
4372
4405
|
}
|
|
4373
|
-
var PROGRESS_RE = /^Task\s+\d+:\s+complete\s+\(commits\s+[0-9a-f]{7,40}\.\.[0-9a-f]{7,40},/i;
|
|
4406
|
+
var PROGRESS_RE = /^Task\s+\d+:\s+complete\s+\(commits\s+([0-9a-f]{7,40})\.\.([0-9a-f]{7,40}),/i;
|
|
4374
4407
|
function sddAppendProgress({
|
|
4375
4408
|
progress_path,
|
|
4376
4409
|
line,
|
|
@@ -4381,7 +4414,8 @@ function sddAppendProgress({
|
|
|
4381
4414
|
return { error: contained.error };
|
|
4382
4415
|
const path_ = contained.path;
|
|
4383
4416
|
const trimmed = line.trim();
|
|
4384
|
-
|
|
4417
|
+
const match = PROGRESS_RE.exec(trimmed);
|
|
4418
|
+
if (!match || match[1].toLowerCase() === match[2].toLowerCase()) {
|
|
4385
4419
|
return { error: "invalid progress line format" };
|
|
4386
4420
|
}
|
|
4387
4421
|
if (existsSync12(path_) && statSync5(path_).isDirectory()) {
|
|
@@ -5351,9 +5385,6 @@ var resetForSpecDrift = (state) => ({
|
|
|
5351
5385
|
var resetForPlanDrift = (state) => ({
|
|
5352
5386
|
...state,
|
|
5353
5387
|
plan: { ...state.plan, status: "draft", evidence: null, approved_digest: null },
|
|
5354
|
-
menu: { presented: false, chosen: "", evidence: null },
|
|
5355
|
-
execution: { status: "pending", mode: null, evidence: null },
|
|
5356
|
-
handoff_destination: false,
|
|
5357
5388
|
updated_at: Date.now()
|
|
5358
5389
|
});
|
|
5359
5390
|
var driftCodeFor = (root2, relPath, storedDigest) => {
|
|
@@ -6117,7 +6148,7 @@ var COORDINATOR_WRITE_TOOLS = [
|
|
|
6117
6148
|
"workflow_template_edit",
|
|
6118
6149
|
"workflow_changelog_apply",
|
|
6119
6150
|
"workflow_branch_setup",
|
|
6120
|
-
"
|
|
6151
|
+
"workit_init_apply",
|
|
6121
6152
|
"workflow_docs_promote",
|
|
6122
6153
|
"workflow_docs_layout",
|
|
6123
6154
|
"workflow_docs_repo_link",
|
|
@@ -19470,12 +19501,12 @@ function createRepoTools(runtime = defaultRuntime) {
|
|
|
19470
19501
|
return output(scriptResult(await runContext(root2, value), parse5));
|
|
19471
19502
|
};
|
|
19472
19503
|
return {
|
|
19473
|
-
|
|
19504
|
+
workit_init_status: tool({
|
|
19474
19505
|
description: "Inspect toolkit initialization",
|
|
19475
19506
|
args: {},
|
|
19476
19507
|
execute: async (_input, context2) => output(scriptResult(await runtime.initStatus(context2.directory), json2))
|
|
19477
19508
|
}),
|
|
19478
|
-
|
|
19509
|
+
workit_status: tool({
|
|
19479
19510
|
description: "Inspect toolkit and repository state",
|
|
19480
19511
|
args: {},
|
|
19481
19512
|
execute: async (_input, context2) => output(scriptResult(await runtime.toolkitStatus(context2.directory), json2))
|
|
@@ -19623,7 +19654,7 @@ function createRepoTools(runtime = defaultRuntime) {
|
|
|
19623
19654
|
})));
|
|
19624
19655
|
}
|
|
19625
19656
|
}),
|
|
19626
|
-
|
|
19657
|
+
workit_init_apply: tool({
|
|
19627
19658
|
description: "Apply a confirmed toolkit initialization action",
|
|
19628
19659
|
args: {
|
|
19629
19660
|
confirmed: tool.schema.boolean(),
|
|
@@ -22074,8 +22105,8 @@ var plugin = async ({ client, directory }) => {
|
|
|
22074
22105
|
const firstAnchor = firstUser.parts.find((part) => part.type === "text") ?? firstUser.parts[0];
|
|
22075
22106
|
const firstText = firstUser.parts.filter((part) => part.type === "text").map((part) => part.text ?? "").join(`
|
|
22076
22107
|
`);
|
|
22077
|
-
const bootstrap =
|
|
22078
|
-
if (bootstrap && !firstText.includes("<
|
|
22108
|
+
const bootstrap = getWorkitBootstrap();
|
|
22109
|
+
if (bootstrap && !firstText.includes("<workit-contract>")) {
|
|
22079
22110
|
firstUser.parts.unshift({
|
|
22080
22111
|
id: firstAnchor.id,
|
|
22081
22112
|
sessionID: firstAnchor.sessionID,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-opencode",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin (thin wrapper over @brainervirus/workit-core)",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"typecheck": "tsc --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@brainervirus/workit-core": "^0.8.
|
|
37
|
+
"@brainervirus/workit-core": "^0.8.7"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@opencode-ai/plugin": "1.17.7"
|