@workit-dev/opencode 2.15.0 → 2.16.1
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/plugin.js +17 -6
- package/package.json +2 -2
package/dist/plugin.js
CHANGED
|
@@ -24348,6 +24348,10 @@ function findExecutable(bin, env) {
|
|
|
24348
24348
|
var TIMEOUT_MS = 60000;
|
|
24349
24349
|
var YTRACK_EXIT = { ok: 0, failed: 1, cancelled: 2, auth: 4 };
|
|
24350
24350
|
var findYtrack = (env) => env.WORKIT_NO_YTRACK === "1" ? null : findExecutable("ytrack", env);
|
|
24351
|
+
var YTRACK_QUIET_ENV = {
|
|
24352
|
+
YTRACK_NO_UPDATE_NOTIFIER: "1",
|
|
24353
|
+
YTRACK_NO_AUTO_UPGRADE: "1"
|
|
24354
|
+
};
|
|
24351
24355
|
function ytrackRunner(env, host, timeoutMs = TIMEOUT_MS) {
|
|
24352
24356
|
return (args, input) => {
|
|
24353
24357
|
const exe = findYtrack(env);
|
|
@@ -24355,7 +24359,12 @@ function ytrackRunner(env, host, timeoutMs = TIMEOUT_MS) {
|
|
|
24355
24359
|
return { status: null, stdout: "", stderr: "", missing: true };
|
|
24356
24360
|
const result = spawnSync21(exe, args, {
|
|
24357
24361
|
encoding: "utf8",
|
|
24358
|
-
env: {
|
|
24362
|
+
env: {
|
|
24363
|
+
...env,
|
|
24364
|
+
NO_COLOR: "1",
|
|
24365
|
+
...YTRACK_QUIET_ENV,
|
|
24366
|
+
...host ? { YTRACK_HOST: host } : {}
|
|
24367
|
+
},
|
|
24359
24368
|
timeout: timeoutMs,
|
|
24360
24369
|
killSignal: "SIGKILL",
|
|
24361
24370
|
windowsHide: true,
|
|
@@ -29244,16 +29253,18 @@ var openLog = (env, args) => {
|
|
|
29244
29253
|
return null;
|
|
29245
29254
|
}
|
|
29246
29255
|
};
|
|
29247
|
-
function runCli(args, env
|
|
29256
|
+
function runCli(args, env) {
|
|
29248
29257
|
let log = null;
|
|
29249
29258
|
try {
|
|
29250
29259
|
const cli = locateWorkitCli({ env });
|
|
29260
|
+
const cwd = teardownDir(env);
|
|
29261
|
+
fs31.mkdirSync(cwd, { recursive: true });
|
|
29251
29262
|
log = openLog(env, args);
|
|
29252
29263
|
const started = teardownDeps.spawn({
|
|
29253
29264
|
command: cli.command,
|
|
29254
29265
|
args: [...cli.args, ...args],
|
|
29255
29266
|
env,
|
|
29256
|
-
cwd
|
|
29267
|
+
cwd,
|
|
29257
29268
|
log
|
|
29258
29269
|
});
|
|
29259
29270
|
if (!started && log !== null)
|
|
@@ -29279,7 +29290,7 @@ function endSession(end, env = process.env) {
|
|
|
29279
29290
|
const child = { ...env, WORKIT_SESSION_ID: session, WORKIT_HOST: end.host };
|
|
29280
29291
|
for (const key of HOST_SESSION_VARS2)
|
|
29281
29292
|
delete child[key];
|
|
29282
|
-
return runCli(["stop", "--session", session, "--reason", "session-end"], child
|
|
29293
|
+
return runCli(["stop", "--session", session, "--reason", "session-end"], child);
|
|
29283
29294
|
}
|
|
29284
29295
|
var claim2 = (file, now) => {
|
|
29285
29296
|
for (let attempt = 0;attempt < 2; attempt += 1)
|
|
@@ -29307,7 +29318,7 @@ var fresh = (stamp, now) => {
|
|
|
29307
29318
|
return false;
|
|
29308
29319
|
}
|
|
29309
29320
|
};
|
|
29310
|
-
function reapAtStart(
|
|
29321
|
+
function reapAtStart(_cwd, env = process.env) {
|
|
29311
29322
|
const stamp = reapStamp(env);
|
|
29312
29323
|
const lock = `${stamp}.claim`;
|
|
29313
29324
|
const now = teardownDeps.now();
|
|
@@ -29324,7 +29335,7 @@ function reapAtStart(cwd, env = process.env) {
|
|
|
29324
29335
|
try {
|
|
29325
29336
|
if (fresh(stamp, now))
|
|
29326
29337
|
return false;
|
|
29327
|
-
started = runCli(["stop", "--orphans", "--reason", "session-start"], env
|
|
29338
|
+
started = runCli(["stop", "--orphans", "--reason", "session-start"], env);
|
|
29328
29339
|
if (started) {
|
|
29329
29340
|
const temp = `${stamp}.${process.pid}`;
|
|
29330
29341
|
fs31.writeFileSync(temp, String(now), { mode: 384 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@opencode/plugin": "2.0.18",
|
|
44
|
-
"@workit-dev/core": "^2.
|
|
44
|
+
"@workit-dev/core": "^2.16.1"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|