@brainervirus/workit-pi 8.9.0 → 8.10.0
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/worker.js
CHANGED
|
@@ -8305,6 +8305,15 @@ var ENVELOPE = new Set([
|
|
|
8305
8305
|
"expectedWorkspaceRevision",
|
|
8306
8306
|
"judgment"
|
|
8307
8307
|
]);
|
|
8308
|
+
// packages/workit-core/src/host-session.ts
|
|
8309
|
+
var OWN_CHILD_SHELL = new Set(["opencode", "pi"]);
|
|
8310
|
+
var SESSION_UNSAFE = /[^A-Za-z0-9_.:@/+-]/g;
|
|
8311
|
+
function childSessionId(lead, child) {
|
|
8312
|
+
const leaf = child.replace(SESSION_UNSAFE, "-").slice(-120);
|
|
8313
|
+
const prefix = lead.replace(SESSION_UNSAFE, "-").slice(0, 127 - leaf.length);
|
|
8314
|
+
return prefix ? `${prefix}:${leaf}` : leaf;
|
|
8315
|
+
}
|
|
8316
|
+
|
|
8308
8317
|
// packages/workit-core/src/core/package-root.ts
|
|
8309
8318
|
import { existsSync } from "node:fs";
|
|
8310
8319
|
import path from "node:path";
|
|
@@ -8370,6 +8379,7 @@ var SLOT = Symbol.for("workit.migrationReporter");
|
|
|
8370
8379
|
var AUTO_COMPACT_BYTES = 2 * 1024 * 1024;
|
|
8371
8380
|
var TOMBSTONE = Symbol("tombstone");
|
|
8372
8381
|
var STALE_TEMPORARY_MS = 60 * 60000;
|
|
8382
|
+
var origins = new Map;
|
|
8373
8383
|
var heldInProcess = new Map;
|
|
8374
8384
|
// packages/workit-core/src/git/rev.ts
|
|
8375
8385
|
var MAX_BUFFER = 256 * 1024 * 1024;
|
|
@@ -8605,6 +8615,7 @@ var TASK_SCOPED_ACTIONS = new Set([
|
|
|
8605
8615
|
"worker.cancel",
|
|
8606
8616
|
"state.export"
|
|
8607
8617
|
]);
|
|
8618
|
+
var WORKER_ADDRESSED_ACTIONS = new Set(["worker.cancel", "worker.report"]);
|
|
8608
8619
|
var CREATING_ACTIONS = new Set([
|
|
8609
8620
|
"task.revise",
|
|
8610
8621
|
"task.progress",
|
|
@@ -8802,7 +8813,7 @@ function launchWorker(assignment, options) {
|
|
|
8802
8813
|
WORKIT_PI_WORKER_ID: workerId ?? "",
|
|
8803
8814
|
WORKIT_PI_WORKER_SESSION: sessionId,
|
|
8804
8815
|
WORKIT_HOST: "pi",
|
|
8805
|
-
WORKIT_SESSION_ID: sessionId,
|
|
8816
|
+
WORKIT_SESSION_ID: options.leadSession ? childSessionId(options.leadSession, sessionId) : sessionId,
|
|
8806
8817
|
WORKIT_PI_WORKER_ROLE: assignment.role,
|
|
8807
8818
|
WORKIT_PI_WORKER_SCOPE: JSON.stringify(assignment.scope)
|
|
8808
8819
|
};
|