wkappbot-code 0.3.1 → 0.3.2
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/README.md +1 -1
- package/bin/wkappbot-code.js +2 -2
- package/lib/update.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Get the CLI by one of three roads, then run `wkappbot-code install` once:
|
|
|
31
31
|
```bash
|
|
32
32
|
npm i -g https://kiexpert.github.io/wkappbot-kih/wkappbot-code/wkappbot-code.tgz # web: the scrub-gated tgz the SDK workflow ships daily (SHA256SUMS + version.json beside it)
|
|
33
33
|
npm i -g wkappbot-code # registry (published only when the SDK has NPM_TOKEN)
|
|
34
|
-
npm pack ./wkappbot-code && npm i -g ./wkappbot-code-0.3.
|
|
34
|
+
npm pack ./wkappbot-code && npm i -g ./wkappbot-code-0.3.2.tgz # from a checkout
|
|
35
35
|
|
|
36
36
|
wkappbot-code install # every part below, idempotent
|
|
37
37
|
wkappbot-code doctor # one PASS/WARN/FAIL/SKIP row per part
|
package/bin/wkappbot-code.js
CHANGED
|
@@ -92,7 +92,7 @@ function kihDir(o) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
function opencodeVersion() {
|
|
95
|
-
try { return execFileSync("opencode", ["--version"], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim(); }
|
|
95
|
+
try { return execFileSync("opencode", ["--version"], { shell: process.platform === "win32", encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim(); }
|
|
96
96
|
catch { return ""; }
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -321,7 +321,7 @@ function install(o) {
|
|
|
321
321
|
if (have === OPENCODE_VERSION) log("opencode " + have + " already installed");
|
|
322
322
|
else {
|
|
323
323
|
log("npm install -g opencode-ai@" + OPENCODE_VERSION + " (was: " + (have || "none") + ")");
|
|
324
|
-
execFileSync("npm", ["install", "-g", "opencode-ai@" + OPENCODE_VERSION, "--no-audit", "--no-fund"], { stdio: "inherit" });
|
|
324
|
+
execFileSync("npm", ["install", "-g", "opencode-ai@" + OPENCODE_VERSION, "--no-audit", "--no-fund"], { shell: process.platform === "win32", stdio: "inherit" });
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
const dest = binDest(o);
|
package/lib/update.js
CHANGED
|
@@ -57,7 +57,7 @@ export function readRemote(secs = 20) {
|
|
|
57
57
|
// WKAPPBOT_CODE_NO_REGISTRY=1 skips it (tests).
|
|
58
58
|
export function readRegistry(secs = 15) {
|
|
59
59
|
if (process.env.WKAPPBOT_CODE_NO_REGISTRY === "1") return { ok: false, err: "registry check off" };
|
|
60
|
-
const r = spawnSync("npm", ["view", "wkappbot-code", "version"], { encoding: "utf8", timeout: secs * 1000 });
|
|
60
|
+
const r = spawnSync("npm", ["view", "wkappbot-code", "version"], { shell: process.platform === "win32", encoding: "utf8", timeout: secs * 1000 });
|
|
61
61
|
const v = (r.stdout || "").trim().split("\n").pop();
|
|
62
62
|
return r.status === 0 && /^\d+\.\d+\.\d+/.test(v) ? { ok: true, version: v, source: "registry" } : { ok: false, err: "npm view rc " + r.status };
|
|
63
63
|
}
|
|
@@ -73,7 +73,7 @@ export function runUpdate({ current, cliPath, installArgs = [], log = console.lo
|
|
|
73
73
|
if (r.source === "registry") {
|
|
74
74
|
// npm verifies the registry tarball's own integrity hash.
|
|
75
75
|
log("PASS update: " + r.version + " available (installed " + current + ") on the npm registry");
|
|
76
|
-
const g = spawnSync("npm", ["install", "-g", "wkappbot-code@" + r.version, "--no-audit", "--no-fund", "--silent"], { encoding: "utf8" });
|
|
76
|
+
const g = spawnSync("npm", ["install", "-g", "wkappbot-code@" + r.version, "--no-audit", "--no-fund", "--silent"], { shell: process.platform === "win32", encoding: "utf8" });
|
|
77
77
|
if (g.status !== 0) { log("FAIL update: npm install -g wkappbot-code@" + r.version + " rc " + g.status); return 1; }
|
|
78
78
|
log("PASS update: npm install -g wkappbot-code " + r.version);
|
|
79
79
|
return reinstall(cliPath, installArgs, log);
|
|
@@ -88,7 +88,7 @@ export function runUpdate({ current, cliPath, installArgs = [], log = console.lo
|
|
|
88
88
|
const got = createHash("sha256").update(readFileSync(tgz)).digest("hex");
|
|
89
89
|
if (got !== r.sha256) { log("FAIL update: sha256 MISMATCH (expected " + r.sha256 + ", got " + got + "); nothing changed"); return 1; }
|
|
90
90
|
log("PASS update: sha256 ok " + got);
|
|
91
|
-
const n = spawnSync("npm", ["install", "-g", tgz, "--no-audit", "--no-fund", "--silent"], { encoding: "utf8" });
|
|
91
|
+
const n = spawnSync("npm", ["install", "-g", tgz, "--no-audit", "--no-fund", "--silent"], { shell: process.platform === "win32", encoding: "utf8" });
|
|
92
92
|
if (n.status !== 0) { log("FAIL update: npm install -g rc " + n.status + " " + (n.stderr || "").trim()); return 1; }
|
|
93
93
|
log("PASS update: npm install -g wkappbot-code " + r.version);
|
|
94
94
|
} finally { rmSync(tmp, { recursive: true, force: true }); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wkappbot-code",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "wkappbot-code -- Wisdom Kernel: the pinned OpenCode bridge plus the reflex harness plugin, the wkappbot core, the web harness and the latest public skills in one install",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|