@brainervirus/workit-claude-code 8.44.1 → 8.44.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/.claude-plugin/plugin.json +1 -1
- package/dist/workit.js +187 -43
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workit",
|
|
3
3
|
"displayName": "Workit",
|
|
4
|
-
"version": "8.44.
|
|
4
|
+
"version": "8.44.3",
|
|
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
|
@@ -9431,7 +9431,7 @@ var package_default;
|
|
|
9431
9431
|
var init_package = __esm(() => {
|
|
9432
9432
|
package_default = {
|
|
9433
9433
|
name: "@brainervirus/workit-cli",
|
|
9434
|
-
version: "8.44.
|
|
9434
|
+
version: "8.44.3",
|
|
9435
9435
|
private: false,
|
|
9436
9436
|
description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
|
|
9437
9437
|
keywords: [
|
|
@@ -9469,13 +9469,13 @@ var init_package = __esm(() => {
|
|
|
9469
9469
|
},
|
|
9470
9470
|
dependencies: {
|
|
9471
9471
|
"@babel/parser": "7.29.9",
|
|
9472
|
-
"@brainervirus/workit-cursor": "^8.44.
|
|
9472
|
+
"@brainervirus/workit-cursor": "^8.44.3",
|
|
9473
9473
|
"@inkjs/ui": "2.0.0",
|
|
9474
9474
|
ink: "7.1.1",
|
|
9475
9475
|
react: "19.2.8"
|
|
9476
9476
|
},
|
|
9477
9477
|
devDependencies: {
|
|
9478
|
-
"@brainervirus/workit-core": "^8.44.
|
|
9478
|
+
"@brainervirus/workit-core": "^8.44.3"
|
|
9479
9479
|
},
|
|
9480
9480
|
engines: {
|
|
9481
9481
|
node: ">=24"
|
|
@@ -75775,9 +75775,13 @@ import { createHash as createHash15 } from "node:crypto";
|
|
|
75775
75775
|
function errorText(error) {
|
|
75776
75776
|
return error instanceof Error ? error.message : "installed source could not be read";
|
|
75777
75777
|
}
|
|
75778
|
-
var LAUNCH_HOSTS, HOSTS2, LIVE_HOSTS, OPENCODE_PACKAGE = "@brainervirus/workit-opencode", OPENCODE_UPDATE, CODEX_MARKETPLACE = "workflow-toolkit", CLI_FIX = "npm install --global @brainervirus/workit-cli@latest", stderrTail = (text, lines = 5) => (text ?? "").split(/\r?\n/).map((line) => line.trim()).filter(Boolean).slice(-lines).join(" | "),
|
|
75778
|
+
var LAUNCH_HOSTS, HOSTS2, LIVE_HOSTS, OPENCODE_PACKAGE = "@brainervirus/workit-opencode", OPENCODE_UPDATE, CODEX_MARKETPLACE = "workflow-toolkit", CLI_FIX = "npm install --global @brainervirus/workit-cli@latest", stderrTail = (text, lines = 5) => (text ?? "").split(/\r?\n/).map((line) => line.trim()).filter(Boolean).slice(-lines).join(" | "), errorLine = (result) => `${result.stdout}
|
|
75779
|
+
${result.stderr ?? ""}`.split(/\r?\n/).map((line) => line.trim()).find((line) => /\bError:/.test(line)), failureReason = (command, result) => {
|
|
75779
75780
|
const tail = stderrTail(result.stderr);
|
|
75780
|
-
|
|
75781
|
+
const message = errorLine(result);
|
|
75782
|
+
const detail = message && !tail.includes(message) ? [message, tail].filter(Boolean) : [tail];
|
|
75783
|
+
const text = detail.filter(Boolean).join(" | ");
|
|
75784
|
+
return `\`${command.command} ${command.args.join(" ")}\` failed${text ? `: ${text}` : ""}`;
|
|
75781
75785
|
}, fixFor = (host, selector = "") => host === "pi" ? `pi update --extension ${selector || "npm:@brainervirus/workit-pi"}` : host === "codex" ? `codex plugin marketplace upgrade ${CODEX_MARKETPLACE} && codex plugin add workit@${CODEX_MARKETPLACE}` : host === "claude-code" ? "claude plugin marketplace update workit && claude plugin update workit@workit" : host === "opencode" ? OPENCODE_UPDATE : host === "cursor" ? "workit upgrade --hosts=cursor" : CLI_FIX, upgradePaths = (deps) => {
|
|
75782
75786
|
const home = deps.home ?? deps.env?.HOME ?? os17.homedir();
|
|
75783
75787
|
const env = {
|
|
@@ -75824,11 +75828,11 @@ var LAUNCH_HOSTS, HOSTS2, LIVE_HOSTS, OPENCODE_PACKAGE = "@brainervirus/workit-o
|
|
|
75824
75828
|
} catch {
|
|
75825
75829
|
return null;
|
|
75826
75830
|
}
|
|
75827
|
-
}, digest2 = (file) => existsSync21(file) ? createHash15("sha256").update(readFileSync23(file)).digest("hex") : "missing", runner = (deps) => deps.run ?? ((command, args) => {
|
|
75831
|
+
}, digest2 = (file) => existsSync21(file) ? createHash15("sha256").update(readFileSync23(file)).digest("hex") : "missing", runner = (deps) => deps.run ?? ((command, args, options) => {
|
|
75828
75832
|
const { home, env } = upgradePaths(deps);
|
|
75829
75833
|
let step;
|
|
75830
75834
|
try {
|
|
75831
|
-
step = hostCommand(command, args, { home, env });
|
|
75835
|
+
step = hostCommand(command, args, { home, env, cwd: options?.cwd });
|
|
75832
75836
|
} catch (error) {
|
|
75833
75837
|
return { status: 1, stdout: "", stderr: errorText(error) };
|
|
75834
75838
|
}
|
|
@@ -75839,12 +75843,12 @@ var LAUNCH_HOSTS, HOSTS2, LIVE_HOSTS, OPENCODE_PACKAGE = "@brainervirus/workit-o
|
|
|
75839
75843
|
return deps.runAsync;
|
|
75840
75844
|
const injected = deps.run;
|
|
75841
75845
|
if (injected)
|
|
75842
|
-
return async (command, args) => injected(command, args);
|
|
75843
|
-
return (command, args) => {
|
|
75846
|
+
return async (command, args, options) => injected(command, args, options);
|
|
75847
|
+
return (command, args, options) => {
|
|
75844
75848
|
const { home, env } = upgradePaths(deps);
|
|
75845
75849
|
let step;
|
|
75846
75850
|
try {
|
|
75847
|
-
step = hostCommand(command, args, { home, env });
|
|
75851
|
+
step = hostCommand(command, args, { home, env, cwd: options?.cwd });
|
|
75848
75852
|
} catch (error) {
|
|
75849
75853
|
return Promise.resolve({ status: 1, stdout: "", stderr: errorText(error) });
|
|
75850
75854
|
}
|
|
@@ -75984,6 +75988,90 @@ var init_processes = __esm(() => {
|
|
|
75984
75988
|
SCRIPT_RUNTIMES = new Set(["node", "nodejs", "bun"]);
|
|
75985
75989
|
});
|
|
75986
75990
|
|
|
75991
|
+
// packages/workit-cli/src/upgrade/opencode.ts
|
|
75992
|
+
var pluginApiArgs = (home) => [
|
|
75993
|
+
"api",
|
|
75994
|
+
"plugin.list",
|
|
75995
|
+
"-H",
|
|
75996
|
+
`x-opencode-directory:${home}`
|
|
75997
|
+
], 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}
|
|
75998
|
+
${result.stderr ?? ""}`), parsePluginApi = (result) => {
|
|
75999
|
+
if (result.status !== 0)
|
|
76000
|
+
return null;
|
|
76001
|
+
let parsed;
|
|
76002
|
+
try {
|
|
76003
|
+
parsed = JSON.parse(result.stdout);
|
|
76004
|
+
} catch {
|
|
76005
|
+
return null;
|
|
76006
|
+
}
|
|
76007
|
+
const data = parsed?.data;
|
|
76008
|
+
if (!Array.isArray(data))
|
|
76009
|
+
return null;
|
|
76010
|
+
const entry = data.find((item) => isWorkitTarget(item?.source?.target));
|
|
76011
|
+
if (!entry)
|
|
76012
|
+
return { via: "api", listed: false };
|
|
76013
|
+
const version = entry.source?.version;
|
|
76014
|
+
return {
|
|
76015
|
+
via: "api",
|
|
76016
|
+
listed: true,
|
|
76017
|
+
...typeof version === "string" && /^\d+\.\d+\.\d+$/.test(version) ? { version } : {},
|
|
76018
|
+
...typeof entry.source?.outdated === "boolean" ? { outdated: entry.source.outdated } : {},
|
|
76019
|
+
...typeof entry.state?.status === "string" ? { status: entry.state.status } : {}
|
|
76020
|
+
};
|
|
76021
|
+
}, parsePluginList = (result) => {
|
|
76022
|
+
if (result.status === 0)
|
|
76023
|
+
for (const line of result.stdout.split(/\r?\n/)) {
|
|
76024
|
+
const fields = line.trim().split(/\s+/);
|
|
76025
|
+
if (fields.length < 3)
|
|
76026
|
+
continue;
|
|
76027
|
+
const source = fields[fields.length - 1].replace(/^file:\/\//, "");
|
|
76028
|
+
const version = fields[fields.length - 2];
|
|
76029
|
+
if (isWorkitTarget(source) && /^\d+\.\d+\.\d+$/.test(version))
|
|
76030
|
+
return { via: "list", listed: true, version };
|
|
76031
|
+
}
|
|
76032
|
+
return { via: "list", listed: false };
|
|
76033
|
+
}, readOpencodePlugin = async (run, home) => parsePluginApi(await run("opencode", pluginApiArgs(home), { cwd: home })) ?? parsePluginList(await run("opencode", PLUGIN_LIST, { cwd: home })), waitForOpencodePlugin = async (run, home, options = {}) => {
|
|
76034
|
+
const timeoutMs = options.timeoutMs ?? OPENCODE_READY_TIMEOUT_MS;
|
|
76035
|
+
const intervalMs = options.intervalMs ?? READY_INTERVAL_MS;
|
|
76036
|
+
const now = options.now ?? Date.now;
|
|
76037
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
76038
|
+
const deadline = now() + timeoutMs;
|
|
76039
|
+
const [versionResult, firstApi] = await Promise.all([
|
|
76040
|
+
run("opencode", ["--version"], { cwd: home }),
|
|
76041
|
+
run("opencode", pluginApiArgs(home), { cwd: home })
|
|
76042
|
+
]);
|
|
76043
|
+
const installed = versionResult.stdout.match(/\d+\.\d+\.\d+/)?.[0];
|
|
76044
|
+
if (installed && !versionAtLeast(installed, SUPPORT_MATRIX.opencode.minimum)) {
|
|
76045
|
+
const text = parsePluginList(await run("opencode", PLUGIN_LIST, { cwd: home }));
|
|
76046
|
+
return text.listed ? text : { via: "list", listed: true };
|
|
76047
|
+
}
|
|
76048
|
+
let pending = firstApi;
|
|
76049
|
+
let textOnly = false;
|
|
76050
|
+
for (;; ) {
|
|
76051
|
+
let api = null;
|
|
76052
|
+
if (!textOnly) {
|
|
76053
|
+
const result = pending ?? await run("opencode", pluginApiArgs(home), { cwd: home });
|
|
76054
|
+
pending = undefined;
|
|
76055
|
+
api = parsePluginApi(result);
|
|
76056
|
+
textOnly = !api && lacksApi(result);
|
|
76057
|
+
}
|
|
76058
|
+
if (textOnly || api?.listed) {
|
|
76059
|
+
const text = parsePluginList(await run("opencode", PLUGIN_LIST, { cwd: home }));
|
|
76060
|
+
if (text.listed)
|
|
76061
|
+
return api?.listed ? { ...api, version: api.version ?? text.version } : text;
|
|
76062
|
+
}
|
|
76063
|
+
if (now() >= deadline)
|
|
76064
|
+
return null;
|
|
76065
|
+
await sleep(Math.min(intervalMs, Math.max(0, deadline - now())));
|
|
76066
|
+
}
|
|
76067
|
+
};
|
|
76068
|
+
var init_opencode = __esm(() => {
|
|
76069
|
+
init_support_matrix();
|
|
76070
|
+
init_shared();
|
|
76071
|
+
PLUGIN_LIST = ["plugin", "list"];
|
|
76072
|
+
OPENCODE_NOT_READY = `OpenCode did not finish loading its plugins (opencode api plugin.list never listed ${OPENCODE_PACKAGE})`;
|
|
76073
|
+
});
|
|
76074
|
+
|
|
75987
76075
|
// packages/workit-cli/src/upgrade/apply.ts
|
|
75988
76076
|
import { existsSync as existsSync22, readdirSync as readdirSync12, mkdirSync as mkdirSync12, copyFileSync as copyFileSync6, chmodSync as chmodSync2, cpSync as cpSync5 } from "node:fs";
|
|
75989
76077
|
import path48 from "node:path";
|
|
@@ -76124,7 +76212,12 @@ async function applyUpgrade(plan, deps = {}, options = {}) {
|
|
|
76124
76212
|
}
|
|
76125
76213
|
let outcome;
|
|
76126
76214
|
try {
|
|
76127
|
-
outcome = await applyEntry(entry, {
|
|
76215
|
+
outcome = await applyEntry(entry, {
|
|
76216
|
+
runAsync,
|
|
76217
|
+
paths,
|
|
76218
|
+
configDir,
|
|
76219
|
+
opencodeReady: deps.opencodeReady
|
|
76220
|
+
});
|
|
76128
76221
|
if (entry.host === "codex" && outcome.status === "updated") {
|
|
76129
76222
|
const agents = await refreshCodexAgents(runAsync, paths.codexHome);
|
|
76130
76223
|
if (!agents.ok)
|
|
@@ -76214,25 +76307,11 @@ var briefDetail = (detail) => {
|
|
|
76214
76307
|
}
|
|
76215
76308
|
const newest = versions.reduce((best, version) => best && versionAtLeast(best, version) ? best : version, null);
|
|
76216
76309
|
return newest ? path48.join(dir, newest) : null;
|
|
76217
|
-
}, opencodeVersion = async (run) => {
|
|
76218
|
-
const listing = await run("opencode", ["plugin", "list"]);
|
|
76219
|
-
if (listing.status !== 0)
|
|
76220
|
-
return;
|
|
76221
|
-
for (const line of listing.stdout.split(/\r?\n/)) {
|
|
76222
|
-
const fields = line.trim().split(/\s+/);
|
|
76223
|
-
if (fields.length < 3)
|
|
76224
|
-
continue;
|
|
76225
|
-
const source = fields[fields.length - 1].replace(/^file:\/\//, "");
|
|
76226
|
-
const version = fields[fields.length - 2];
|
|
76227
|
-
if (/^(?:npm:)?@brainervirus\/workit-opencode(?:@[^/\s]+)?$/.test(source) && /^\d+\.\d+\.\d+$/.test(version))
|
|
76228
|
-
return version;
|
|
76229
|
-
}
|
|
76230
|
-
return;
|
|
76231
|
-
}, opencodeOutcome = async (before, target, runAsync) => {
|
|
76310
|
+
}, opencodeVersion = async (run, home) => (await readOpencodePlugin(run, home)).version, opencodeOutcome = async (before, target, runAsync, home) => {
|
|
76232
76311
|
const below = (version) => target !== undefined && (version === undefined || !versionAtLeast(version, target));
|
|
76233
|
-
let after = await opencodeVersion(runAsync);
|
|
76312
|
+
let after = await opencodeVersion(runAsync, home);
|
|
76234
76313
|
if (below(after))
|
|
76235
|
-
after = await opencodeVersion(runAsync) ?? after;
|
|
76314
|
+
after = await opencodeVersion(runAsync, home) ?? after;
|
|
76236
76315
|
const live = "OpenCode V2 loads it live";
|
|
76237
76316
|
if (before && target && versionAtLeast(before, target))
|
|
76238
76317
|
return { host: "opencode", status: "current", reason: `already current (${before})` };
|
|
@@ -76329,16 +76408,23 @@ ${result.stderr}`;
|
|
|
76329
76408
|
reason: entry.repair ? `reinstalled missing plugin files (${entry.latest})` : `${entry.installedVersion ?? "?"} -> ${entry.latest}`
|
|
76330
76409
|
};
|
|
76331
76410
|
}
|
|
76332
|
-
|
|
76411
|
+
let before;
|
|
76412
|
+
if (entry.host === "opencode") {
|
|
76413
|
+
const ready = await waitForOpencodePlugin(runAsync, home, context.opencodeReady);
|
|
76414
|
+
if (!ready)
|
|
76415
|
+
return fail(OPENCODE_NOT_READY);
|
|
76416
|
+
before = ready.version;
|
|
76417
|
+
}
|
|
76333
76418
|
for (const command of entry.commands) {
|
|
76334
|
-
|
|
76419
|
+
const where = command.cwd ? { cwd: command.cwd } : undefined;
|
|
76420
|
+
let result = await runAsync(command.command, command.args, where);
|
|
76335
76421
|
if (result.status !== 0 && entry.host === "opencode")
|
|
76336
|
-
result = await runAsync(command.command, command.args);
|
|
76422
|
+
result = await runAsync(command.command, command.args, where);
|
|
76337
76423
|
if (result.status !== 0)
|
|
76338
76424
|
return fail(failureReason(command, result));
|
|
76339
76425
|
}
|
|
76340
76426
|
if (entry.host === "opencode")
|
|
76341
|
-
return opencodeOutcome(before, entry.published, runAsync);
|
|
76427
|
+
return opencodeOutcome(before, entry.published, runAsync, home);
|
|
76342
76428
|
if (entry.host === "claude-code") {
|
|
76343
76429
|
const after = claudeWorkitInstalls(home, env, null).find((install) => install.id === entry.selector)?.version;
|
|
76344
76430
|
return after && after === entry.installedVersion ? {
|
|
@@ -76419,6 +76505,7 @@ var init_apply = __esm(() => {
|
|
|
76419
76505
|
init_safe_write();
|
|
76420
76506
|
init_progress();
|
|
76421
76507
|
init_processes();
|
|
76508
|
+
init_opencode();
|
|
76422
76509
|
init_shared();
|
|
76423
76510
|
});
|
|
76424
76511
|
|
|
@@ -76592,7 +76679,15 @@ var PROBE_TIMEOUT_MS = 20000, probeKey = (command, args) => [command, ...args].j
|
|
|
76592
76679
|
XDG_DATA_HOME: path50.join(scratch, "data"),
|
|
76593
76680
|
XDG_STATE_HOME: path50.join(scratch, "state"),
|
|
76594
76681
|
XDG_CACHE_HOME: path50.join(scratch, "cache")
|
|
76595
|
-
}), registry2 = (name) => ["npm", ["view", name, "version"]],
|
|
76682
|
+
}), registry2 = (name) => ["npm", ["view", name, "version"]], OPENCODE_READY_KEY = "opencode-ready", opencodeReading = (probes) => {
|
|
76683
|
+
const result = probes?.get(OPENCODE_READY_KEY);
|
|
76684
|
+
if (!result)
|
|
76685
|
+
return;
|
|
76686
|
+
return result.status === 0 ? JSON.parse(result.stdout) : null;
|
|
76687
|
+
}, opencodeRegistersWorkit = (file) => {
|
|
76688
|
+
const config = objectOrNull(file);
|
|
76689
|
+
return [config?.plugins, config?.plugin].flatMap((value) => Array.isArray(value) ? value : []).some((pin) => typeof pin === "string" && /^(?:npm:)?@brainervirus\/workit-opencode(?:@[^/\s]+)?$/.test(pin));
|
|
76690
|
+
}, runProbes = async (hosts, cli, deps, options = {}) => {
|
|
76596
76691
|
const paths = upgradePaths(deps);
|
|
76597
76692
|
const timeoutMs = deps.probeTimeoutMs ?? PROBE_TIMEOUT_MS;
|
|
76598
76693
|
const run = asyncRunner(deps, timeoutMs);
|
|
@@ -76601,11 +76696,15 @@ var PROBE_TIMEOUT_MS = 20000, probeKey = (command, args) => [command, ...args].j
|
|
|
76601
76696
|
const scratch = mkdtempSync3(path50.join(os18.tmpdir(), "workit-upgrade-opencode-"));
|
|
76602
76697
|
try {
|
|
76603
76698
|
if (hosts.includes("opencode") && existsSync23(paths.opencodeConfig)) {
|
|
76604
|
-
|
|
76605
|
-
|
|
76606
|
-
|
|
76699
|
+
if (!options.check) {
|
|
76700
|
+
const opencode = asyncRunner({ ...deps, env: opencodeScratchEnv(deps, scratch) }, timeoutMs);
|
|
76701
|
+
add("opencode", ["--version"], opencode);
|
|
76702
|
+
add("opencode", ["plugin", "--help"], opencode);
|
|
76703
|
+
}
|
|
76607
76704
|
add(...registry2(OPENCODE_PACKAGE));
|
|
76608
76705
|
}
|
|
76706
|
+
for (const name of options.registries ?? [])
|
|
76707
|
+
add(...registry2(name));
|
|
76609
76708
|
if (hosts.includes("cursor"))
|
|
76610
76709
|
add(...registry2("@brainervirus/workit-cursor"));
|
|
76611
76710
|
if (hosts.includes("codex")) {
|
|
@@ -76621,6 +76720,14 @@ var PROBE_TIMEOUT_MS = 20000, probeKey = (command, args) => [command, ...args].j
|
|
|
76621
76720
|
add("npm", ["root", "--global"]);
|
|
76622
76721
|
add(...registry2(CLI_PACKAGE2));
|
|
76623
76722
|
}
|
|
76723
|
+
const ready = hosts.includes("opencode") && opencodeRegistersWorkit(paths.opencodeConfig) ? waitForOpencodePlugin((command, args, where) => run(command, args, where).catch((error) => ({
|
|
76724
|
+
status: 1,
|
|
76725
|
+
stdout: "",
|
|
76726
|
+
stderr: error instanceof Error ? error.message : String(error)
|
|
76727
|
+
})), paths.home, deps.opencodeReady).then((reading) => [
|
|
76728
|
+
OPENCODE_READY_KEY,
|
|
76729
|
+
reading ? { status: 0, stdout: JSON.stringify(reading) } : { status: 1, stdout: "", stderr: OPENCODE_NOT_READY }
|
|
76730
|
+
]) : undefined;
|
|
76624
76731
|
const results = await Promise.all(probes.map(async ([command, args, runner]) => {
|
|
76625
76732
|
let timer;
|
|
76626
76733
|
const timedOut = new Promise((resolve) => {
|
|
@@ -76645,13 +76752,14 @@ var PROBE_TIMEOUT_MS = 20000, probeKey = (command, args) => [command, ...args].j
|
|
|
76645
76752
|
clearTimeout(timer);
|
|
76646
76753
|
}
|
|
76647
76754
|
}));
|
|
76648
|
-
return new Map(results);
|
|
76755
|
+
return new Map([...results, ...ready ? [await ready] : []]);
|
|
76649
76756
|
} finally {
|
|
76650
76757
|
rmSync8(scratch, { recursive: true, force: true });
|
|
76651
76758
|
}
|
|
76652
76759
|
};
|
|
76653
76760
|
var init_probes = __esm(() => {
|
|
76654
76761
|
init_update_check();
|
|
76762
|
+
init_opencode();
|
|
76655
76763
|
init_shared();
|
|
76656
76764
|
});
|
|
76657
76765
|
|
|
@@ -76762,13 +76870,26 @@ function previewUpgrade(hosts = HOSTS2, deps = {}, probes) {
|
|
|
76762
76870
|
});
|
|
76763
76871
|
continue;
|
|
76764
76872
|
}
|
|
76873
|
+
const reading = opencodeReading(probes);
|
|
76874
|
+
if (reading === null) {
|
|
76875
|
+
plan.failed.push({
|
|
76876
|
+
host: "opencode",
|
|
76877
|
+
status: "failed",
|
|
76878
|
+
reason: OPENCODE_NOT_READY,
|
|
76879
|
+
fix: OPENCODE_UPDATE
|
|
76880
|
+
});
|
|
76881
|
+
continue;
|
|
76882
|
+
}
|
|
76765
76883
|
const published = registryVersion(run, OPENCODE_PACKAGE);
|
|
76766
76884
|
plan.entries.push({
|
|
76767
76885
|
host: "opencode",
|
|
76768
76886
|
selector: source.selector,
|
|
76769
76887
|
latest: "",
|
|
76770
76888
|
...published ? { published } : {},
|
|
76771
|
-
|
|
76889
|
+
...reading?.version ? { installedVersion: reading.version } : {},
|
|
76890
|
+
commands: [
|
|
76891
|
+
{ command: "opencode", args: ["plugin", "update", OPENCODE_PACKAGE], cwd: home }
|
|
76892
|
+
],
|
|
76772
76893
|
fix: OPENCODE_UPDATE
|
|
76773
76894
|
});
|
|
76774
76895
|
continue;
|
|
@@ -77010,6 +77131,7 @@ var codexRegistered = (configFile) => {
|
|
|
77010
77131
|
};
|
|
77011
77132
|
var init_plan = __esm(() => {
|
|
77012
77133
|
init_probes();
|
|
77134
|
+
init_opencode();
|
|
77013
77135
|
init_registration();
|
|
77014
77136
|
init_setup_state();
|
|
77015
77137
|
init_host_install();
|
|
@@ -77020,10 +77142,16 @@ var init_plan = __esm(() => {
|
|
|
77020
77142
|
|
|
77021
77143
|
// packages/workit-cli/src/upgrade/check.ts
|
|
77022
77144
|
import path52 from "node:path";
|
|
77023
|
-
function runUpdateCheck(json, deps) {
|
|
77145
|
+
async function runUpdateCheck(json, deps) {
|
|
77024
77146
|
const out = deps.out ?? process.stdout;
|
|
77025
77147
|
const paths = upgradePaths(deps);
|
|
77026
|
-
const
|
|
77148
|
+
const progress = deps.progress ?? createProgress({ stream: process.stderr, json });
|
|
77149
|
+
const checking = HOSTS2.length + 1;
|
|
77150
|
+
const probes = await progress.run(`Checking ${checking} hosts`, () => runProbes(HOSTS2, true, deps, {
|
|
77151
|
+
check: true,
|
|
77152
|
+
registries: ["@brainervirus/workit-claude-code"]
|
|
77153
|
+
}));
|
|
77154
|
+
const run = probedRunner(deps, probes);
|
|
77027
77155
|
const latest = (name) => registryVersion(run, name);
|
|
77028
77156
|
const cliLatest = latest(CLI_PACKAGE2);
|
|
77029
77157
|
if (cliLatest)
|
|
@@ -77064,14 +77192,27 @@ function runUpdateCheck(json, deps) {
|
|
|
77064
77192
|
}
|
|
77065
77193
|
if (!versionBy.has(host))
|
|
77066
77194
|
continue;
|
|
77067
|
-
const
|
|
77195
|
+
const reading = host === "opencode" ? opencodeReading(probes) : undefined;
|
|
77196
|
+
if (reading === null) {
|
|
77197
|
+
components.push({
|
|
77198
|
+
component: host,
|
|
77199
|
+
package: name,
|
|
77200
|
+
installed: null,
|
|
77201
|
+
latest: null,
|
|
77202
|
+
status: "unreadable",
|
|
77203
|
+
reason: OPENCODE_NOT_READY
|
|
77204
|
+
});
|
|
77205
|
+
continue;
|
|
77206
|
+
}
|
|
77207
|
+
const version = versionBy.get(host) ?? reading?.version;
|
|
77068
77208
|
const newest = latest(name);
|
|
77209
|
+
const status = statusOf(version, newest);
|
|
77069
77210
|
components.push({
|
|
77070
77211
|
component: host,
|
|
77071
77212
|
package: name,
|
|
77072
77213
|
installed: version ?? null,
|
|
77073
77214
|
latest: newest ?? null,
|
|
77074
|
-
status:
|
|
77215
|
+
status: reading?.outdated && status === "current" ? "update" : status
|
|
77075
77216
|
});
|
|
77076
77217
|
}
|
|
77077
77218
|
const pending = components.some((entry) => entry.status === "update" || entry.status === "unknown");
|
|
@@ -77131,7 +77272,10 @@ var init_check = __esm(() => {
|
|
|
77131
77272
|
init_package();
|
|
77132
77273
|
init_style();
|
|
77133
77274
|
init_update_check();
|
|
77275
|
+
init_progress();
|
|
77276
|
+
init_opencode();
|
|
77134
77277
|
init_plan();
|
|
77278
|
+
init_probes();
|
|
77135
77279
|
init_shared();
|
|
77136
77280
|
SET_USAGE = `Usage: workit upgrade --set-updates=${UPDATES_MODES.join("|")}
|
|
77137
77281
|
`;
|
|
@@ -77244,7 +77388,7 @@ async function upgradeOnce(argv, deps, handed) {
|
|
|
77244
77388
|
out.write(USAGE3);
|
|
77245
77389
|
return 2;
|
|
77246
77390
|
}
|
|
77247
|
-
return setting ? runSetUpdates(setting.slice("--set-updates=".length), deps) : runUpdateCheck(argv.includes("--json"), deps);
|
|
77391
|
+
return setting ? runSetUpdates(setting.slice("--set-updates=".length), deps) : await runUpdateCheck(argv.includes("--json"), deps);
|
|
77248
77392
|
}
|
|
77249
77393
|
const flags = new Set(argv);
|
|
77250
77394
|
const unknown = argv.filter((arg) => !["--apply", "--confirm", "--json", "--cli", "--preview", "--yes"].includes(arg) && !arg.startsWith("--hosts="));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-claude-code",
|
|
3
|
-
"version": "8.44.
|
|
3
|
+
"version": "8.44.3",
|
|
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.44.
|
|
43
|
-
"@brainervirus/workit-core": "^8.44.
|
|
42
|
+
"@brainervirus/workit-cli": "^8.44.3",
|
|
43
|
+
"@brainervirus/workit-core": "^8.44.3"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=24"
|