@brainervirus/workit-claude-code 8.45.3 → 8.45.4
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/.claude-plugin/plugin.json +1 -1
- package/dist/workit.js +28 -39
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workit",
|
|
3
3
|
"displayName": "Workit",
|
|
4
|
-
"version": "8.45.
|
|
4
|
+
"version": "8.45.4",
|
|
5
5
|
"description": "Workflow rails for agentic coding: task context on every session, branch policy on shell commands, and the workit method skills",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "BrainerVirus"
|
package/dist/workit.js
CHANGED
|
@@ -9734,7 +9734,7 @@ var package_default;
|
|
|
9734
9734
|
var init_package = __esm(() => {
|
|
9735
9735
|
package_default = {
|
|
9736
9736
|
name: "@brainervirus/workit-cli",
|
|
9737
|
-
version: "8.45.
|
|
9737
|
+
version: "8.45.4",
|
|
9738
9738
|
private: false,
|
|
9739
9739
|
description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
|
|
9740
9740
|
keywords: [
|
|
@@ -9772,13 +9772,13 @@ var init_package = __esm(() => {
|
|
|
9772
9772
|
},
|
|
9773
9773
|
dependencies: {
|
|
9774
9774
|
"@babel/parser": "7.29.9",
|
|
9775
|
-
"@brainervirus/workit-cursor": "^8.45.
|
|
9775
|
+
"@brainervirus/workit-cursor": "^8.45.4",
|
|
9776
9776
|
"@inkjs/ui": "2.0.0",
|
|
9777
9777
|
ink: "7.1.1",
|
|
9778
9778
|
react: "19.2.8"
|
|
9779
9779
|
},
|
|
9780
9780
|
devDependencies: {
|
|
9781
|
-
"@brainervirus/workit-core": "^8.45.
|
|
9781
|
+
"@brainervirus/workit-core": "^8.45.4"
|
|
9782
9782
|
},
|
|
9783
9783
|
engines: {
|
|
9784
9784
|
node: ">=24"
|
|
@@ -70689,7 +70689,7 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
|
|
|
70689
70689
|
status: "info",
|
|
70690
70690
|
detail: "could not list running codex processes (ps) — skipping"
|
|
70691
70691
|
};
|
|
70692
|
-
const stale = running.filter((proc) => startedBefore(proc, latest.at));
|
|
70692
|
+
const stale = running.filter((proc) => !/\bapp-server\b/.test(proc.args) && startedBefore(proc, latest.at));
|
|
70693
70693
|
if (stale.length === 0)
|
|
70694
70694
|
return {
|
|
70695
70695
|
id,
|
|
@@ -76407,7 +76407,7 @@ var pluginApiArgs = (home) => [
|
|
|
76407
76407
|
"plugin.list",
|
|
76408
76408
|
"-H",
|
|
76409
76409
|
`x-opencode-directory:${home}`
|
|
76410
|
-
], PLUGIN_LIST, OPENCODE_READY_TIMEOUT_MS = 20000, READY_INTERVAL_MS = 500, OPENCODE_NOT_READY, isWorkitTarget = (target) => typeof target === "string" && /^(?:npm:)?@brainervirus\/workit-opencode(?:@[^/\s]+)?$/.test(target), lacksApi = (result) => result.status !== 0 && !result.timedOut && /\b(?:unknown|unrecognized|unsupported) (?:command|operation|argument)|\bno such (?:command|operation)/i.test(`${result.stdout}
|
|
76410
|
+
], PLUGIN_LIST, OPENCODE_READY_TIMEOUT_MS = 20000, READY_INTERVAL_MS = 500, OPENCODE_STALE = "update ran, but OpenCode still lists", OPENCODE_NOT_READY, isWorkitTarget = (target) => typeof target === "string" && /^(?:npm:)?@brainervirus\/workit-opencode(?:@[^/\s]+)?$/.test(target), lacksApi = (result) => result.status !== 0 && !result.timedOut && /\b(?:unknown|unrecognized|unsupported) (?:command|operation|argument)|\bno such (?:command|operation)/i.test(`${result.stdout}
|
|
76411
76411
|
${result.stderr ?? ""}`), parsePluginApi = (result) => {
|
|
76412
76412
|
if (result.status !== 0)
|
|
76413
76413
|
return null;
|
|
@@ -76443,7 +76443,22 @@ ${result.stderr ?? ""}`), parsePluginApi = (result) => {
|
|
|
76443
76443
|
return { via: "list", listed: true, version };
|
|
76444
76444
|
}
|
|
76445
76445
|
return { via: "list", listed: false };
|
|
76446
|
-
}, readOpencodePlugin = async (run, home) => parsePluginApi(await run("opencode", pluginApiArgs(home), { cwd: home })) ?? parsePluginList(await run("opencode", PLUGIN_LIST, { cwd: home })),
|
|
76446
|
+
}, readOpencodePlugin = async (run, home) => parsePluginApi(await run("opencode", pluginApiArgs(home), { cwd: home })) ?? parsePluginList(await run("opencode", PLUGIN_LIST, { cwd: home })), waitForOpencodeVersion = async (run, home, target, options = {}) => {
|
|
76447
|
+
const timeoutMs = options.timeoutMs ?? OPENCODE_READY_TIMEOUT_MS;
|
|
76448
|
+
const intervalMs = options.intervalMs ?? READY_INTERVAL_MS;
|
|
76449
|
+
const now = options.now ?? Date.now;
|
|
76450
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
76451
|
+
const deadline = now() + timeoutMs;
|
|
76452
|
+
let version = (await readOpencodePlugin(run, home)).version;
|
|
76453
|
+
if (target === undefined)
|
|
76454
|
+
return version;
|
|
76455
|
+
const reached = (found) => found !== undefined && versionAtLeast(found, target);
|
|
76456
|
+
while (!reached(version) && now() < deadline) {
|
|
76457
|
+
await sleep(intervalMs);
|
|
76458
|
+
version = (await readOpencodePlugin(run, home)).version ?? version;
|
|
76459
|
+
}
|
|
76460
|
+
return version;
|
|
76461
|
+
}, waitForOpencodePlugin = async (run, home, options = {}) => {
|
|
76447
76462
|
const timeoutMs = options.timeoutMs ?? OPENCODE_READY_TIMEOUT_MS;
|
|
76448
76463
|
const intervalMs = options.intervalMs ?? READY_INTERVAL_MS;
|
|
76449
76464
|
const now = options.now ?? Date.now;
|
|
@@ -76611,18 +76626,6 @@ async function applyUpgrade(plan, deps = {}, options = {}) {
|
|
|
76611
76626
|
continue;
|
|
76612
76627
|
}
|
|
76613
76628
|
}
|
|
76614
|
-
const daemons = running.filter((proc) => proc.host === "codex" && proc.kind === "daemon");
|
|
76615
|
-
const stopDaemon = entry.host === "codex" && daemons.length > 0;
|
|
76616
|
-
const stopped = stopDaemon ? await progress.run("Stopping the Codex app-server daemon", () => runAsync("codex", ["app-server", "daemon", "stop"]), (result) => result.status === 0 ? "done" : "failed") : null;
|
|
76617
|
-
if (stopped && stopped.status !== 0) {
|
|
76618
|
-
hosts.push({
|
|
76619
|
-
host: "codex",
|
|
76620
|
-
status: "failed",
|
|
76621
|
-
reason: `could not stop the Codex app-server daemon (${daemons.map(describe2).join("; ")})${stderrTail(stopped.stderr) ? `: ${stderrTail(stopped.stderr)}` : ""}`,
|
|
76622
|
-
fix: "codex app-server daemon stop && workit upgrade --hosts=codex"
|
|
76623
|
-
});
|
|
76624
|
-
continue;
|
|
76625
|
-
}
|
|
76626
76629
|
let outcome;
|
|
76627
76630
|
try {
|
|
76628
76631
|
outcome = await applyEntry(entry, {
|
|
@@ -76640,10 +76643,10 @@ async function applyUpgrade(plan, deps = {}, options = {}) {
|
|
|
76640
76643
|
reason: `${outcome.reason}; ${agents.note}`,
|
|
76641
76644
|
fix: agents.fix
|
|
76642
76645
|
};
|
|
76643
|
-
else
|
|
76646
|
+
else
|
|
76644
76647
|
outcome = {
|
|
76645
76648
|
...outcome,
|
|
76646
|
-
reason: `${outcome.reason}
|
|
76649
|
+
reason: `${outcome.reason}${agents.note ? `; ${agents.note}` : ""}; new Codex threads load it`
|
|
76647
76650
|
};
|
|
76648
76651
|
}
|
|
76649
76652
|
} catch (error) {
|
|
@@ -76654,21 +76657,9 @@ async function applyUpgrade(plan, deps = {}, options = {}) {
|
|
|
76654
76657
|
fix: entry.fix
|
|
76655
76658
|
};
|
|
76656
76659
|
}
|
|
76657
|
-
if (stopDaemon) {
|
|
76658
|
-
const started = (await progress.run("Restarting the Codex app-server daemon", () => runAsync("codex", ["app-server", "daemon", "start"]), (result) => result.status === 0 ? "done" : "failed")).status === 0;
|
|
76659
|
-
outcome = started ? {
|
|
76660
|
-
...outcome,
|
|
76661
|
-
reason: `${outcome.reason}; app-server daemon stopped and started again`
|
|
76662
|
-
} : {
|
|
76663
|
-
...outcome,
|
|
76664
|
-
status: "failed",
|
|
76665
|
-
reason: `${outcome.reason}; the app-server daemon did not start again`,
|
|
76666
|
-
fix: "codex app-server daemon start"
|
|
76667
|
-
};
|
|
76668
|
-
}
|
|
76669
76660
|
if (entry.host === "opencode") {
|
|
76670
76661
|
const servers = running.filter((proc) => proc.host === "opencode" && proc.kind === "daemon");
|
|
76671
|
-
if (servers.length && outcome.
|
|
76662
|
+
if (servers.length && outcome.reason.startsWith(OPENCODE_STALE))
|
|
76672
76663
|
outcome = {
|
|
76673
76664
|
...outcome,
|
|
76674
76665
|
reason: `${outcome.reason}; restart opencode serve (${servers.map(describe2).join("; ")}) to load it`
|
|
@@ -76720,11 +76711,9 @@ var briefDetail = (detail) => {
|
|
|
76720
76711
|
}
|
|
76721
76712
|
const newest = versions.reduce((best, version) => best && versionAtLeast(best, version) ? best : version, null);
|
|
76722
76713
|
return newest ? path49.join(dir, newest) : null;
|
|
76723
|
-
},
|
|
76714
|
+
}, opencodeOutcome = async (before, target, runAsync, home, ready) => {
|
|
76724
76715
|
const below = (version) => target !== undefined && (version === undefined || !versionAtLeast(version, target));
|
|
76725
|
-
|
|
76726
|
-
if (below(after))
|
|
76727
|
-
after = await opencodeVersion(runAsync, home) ?? after;
|
|
76716
|
+
const after = await waitForOpencodeVersion(runAsync, home, target, ready);
|
|
76728
76717
|
const live = "OpenCode V2 loads it live";
|
|
76729
76718
|
if (before && target && versionAtLeast(before, target))
|
|
76730
76719
|
return { host: "opencode", status: "current", reason: `already current (${before})` };
|
|
@@ -76732,7 +76721,7 @@ var briefDetail = (detail) => {
|
|
|
76732
76721
|
return {
|
|
76733
76722
|
host: "opencode",
|
|
76734
76723
|
status: "updated",
|
|
76735
|
-
reason:
|
|
76724
|
+
reason: `${OPENCODE_STALE} ${after} (published ${target}); the doctor below checks its package cache`
|
|
76736
76725
|
};
|
|
76737
76726
|
if (before && after && after !== before)
|
|
76738
76727
|
return { host: "opencode", status: "updated", reason: `${before} -> ${after}; ${live}` };
|
|
@@ -76837,7 +76826,7 @@ ${result.stderr}`;
|
|
|
76837
76826
|
return fail(failureReason(command, result));
|
|
76838
76827
|
}
|
|
76839
76828
|
if (entry.host === "opencode")
|
|
76840
|
-
return opencodeOutcome(before, entry.published, runAsync, home);
|
|
76829
|
+
return opencodeOutcome(before, entry.published, runAsync, home, context.opencodeReady);
|
|
76841
76830
|
if (entry.host === "claude-code") {
|
|
76842
76831
|
const after = claudeWorkitInstalls(home, env, null).find((install) => install.id === entry.selector)?.version;
|
|
76843
76832
|
return after && after === entry.installedVersion ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-claude-code",
|
|
3
|
-
"version": "8.45.
|
|
3
|
+
"version": "8.45.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Claude Code plugin — session and per-turn task context, branch policy on git shell commands, workit method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"build": "bun scripts/build.ts"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@brainervirus/workit-cli": "^8.45.
|
|
43
|
-
"@brainervirus/workit-core": "^8.45.
|
|
42
|
+
"@brainervirus/workit-cli": "^8.45.4",
|
|
43
|
+
"@brainervirus/workit-core": "^8.45.4"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=24"
|