@workit-dev/codex 1.5.1 → 1.6.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/launch-mcp.js
CHANGED
|
@@ -30586,6 +30586,10 @@ var writeTargets = (input) => {
|
|
|
30586
30586
|
const paths = writePaths(input);
|
|
30587
30587
|
return paths.length > 0 ? paths : null;
|
|
30588
30588
|
};
|
|
30589
|
+
// packages/workit-core/src/approvals/store.ts
|
|
30590
|
+
var REQUEST_TTL_MS = 30 * 60000;
|
|
30591
|
+
var GRANT_TTL_MS = 15 * 60000;
|
|
30592
|
+
|
|
30589
30593
|
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
30590
30594
|
var CLAUDE_CODE_DESCRIPTOR = {
|
|
30591
30595
|
host: "claude_code",
|
|
@@ -30627,7 +30631,11 @@ var CLAUDE_CODE_DESCRIPTOR = {
|
|
|
30627
30631
|
maxConcurrency: "undocumented",
|
|
30628
30632
|
agentPrefix: "workit:"
|
|
30629
30633
|
},
|
|
30630
|
-
provenance: {
|
|
30634
|
+
provenance: {
|
|
30635
|
+
sessionId: "native",
|
|
30636
|
+
agentIdOnTool: "native",
|
|
30637
|
+
postToolObserve: "native"
|
|
30638
|
+
},
|
|
30631
30639
|
interaction: { questions: "undocumented", writeBoundary: "partial" },
|
|
30632
30640
|
stopControl: "native",
|
|
30633
30641
|
shellAvailable: "native",
|
|
@@ -30689,6 +30697,7 @@ var CONTEXT_EVENTS = new Set([
|
|
|
30689
30697
|
"PreToolUse",
|
|
30690
30698
|
"PostToolUse"
|
|
30691
30699
|
]);
|
|
30700
|
+
var ASKING_MODES = new Set(["default", "acceptEdits", "plan"]);
|
|
30692
30701
|
|
|
30693
30702
|
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
30694
30703
|
function detectCodexSurface(env) {
|
|
@@ -19365,7 +19365,8 @@ var WORKIT_USER_ONLY = [
|
|
|
19365
19365
|
["release", "notes", "approve"],
|
|
19366
19366
|
["grant", "set"],
|
|
19367
19367
|
["grant", "raise"],
|
|
19368
|
-
["ledger", "void"]
|
|
19368
|
+
["ledger", "void"],
|
|
19369
|
+
["approve"]
|
|
19369
19370
|
];
|
|
19370
19371
|
var ALLOWED = new Set(WORKIT_ALLOWED_VERBS);
|
|
19371
19372
|
var hasWordsInOrder = (words, needle) => {
|
|
@@ -21137,7 +21138,12 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
21137
21138
|
};
|
|
21138
21139
|
for (const segment of segments) {
|
|
21139
21140
|
if (segment.group === "open") {
|
|
21140
|
-
groups.push({
|
|
21141
|
+
groups.push({
|
|
21142
|
+
dir,
|
|
21143
|
+
stack: [...stack],
|
|
21144
|
+
vars: new Map(vars),
|
|
21145
|
+
loops: new Map(loops)
|
|
21146
|
+
});
|
|
21141
21147
|
continue;
|
|
21142
21148
|
}
|
|
21143
21149
|
if (segment.group === "close") {
|
|
@@ -21345,39 +21351,60 @@ var claimAll = (owner, targets, deps) => {
|
|
|
21345
21351
|
claimLiveSession(target, owner, deps);
|
|
21346
21352
|
};
|
|
21347
21353
|
var liveTargets = (cwd, paths) => paths?.length ? paths.map((file) => path28.resolve(cwd, file)) : [path28.join(cwd, DIR_TARGET)];
|
|
21348
|
-
var
|
|
21354
|
+
var registryTarget = (cwd, targets) => {
|
|
21349
21355
|
const state = resolveStateDir();
|
|
21350
|
-
const
|
|
21351
|
-
|
|
21356
|
+
for (const target of targets) {
|
|
21357
|
+
const registry = underRegistry(state, cwd, homeExpanded(target), process.platform, canonical3);
|
|
21358
|
+
if (registry)
|
|
21359
|
+
return { file: target, registry };
|
|
21360
|
+
}
|
|
21361
|
+
return null;
|
|
21352
21362
|
};
|
|
21353
|
-
var
|
|
21363
|
+
var underRegistry = (state, cwd, target, platform = process.platform, real = (file) => file) => {
|
|
21354
21364
|
const win = platform === "win32";
|
|
21355
21365
|
const p = win ? path28.win32 : path28.posix;
|
|
21356
21366
|
const fold = (value) => win || platform === "darwin" ? value.toLowerCase() : value;
|
|
21357
21367
|
const named = win ? target.replace(/^\/([a-zA-Z])(?=\/|$)/, "$1:") : target;
|
|
21358
21368
|
const relative = p.relative(fold(real(p.resolve(state))), fold(real(p.resolve(cwd, named))));
|
|
21359
21369
|
if (relative.startsWith("..") || p.isAbsolute(relative))
|
|
21360
|
-
return
|
|
21361
|
-
|
|
21370
|
+
return null;
|
|
21371
|
+
const first = relative.split(p.sep)[0];
|
|
21372
|
+
if (first.startsWith("issued"))
|
|
21373
|
+
return "issued";
|
|
21374
|
+
return first === "approvals" ? "approvals" : null;
|
|
21362
21375
|
};
|
|
21363
|
-
var
|
|
21376
|
+
var unquotedWindowsRegistry = (command) => {
|
|
21364
21377
|
if (process.platform !== "win32" || !command.includes("\\"))
|
|
21365
|
-
return
|
|
21378
|
+
return null;
|
|
21366
21379
|
const flat = (value) => value.replaceAll("\\", "/").toLowerCase();
|
|
21367
|
-
|
|
21380
|
+
const text = flat(command);
|
|
21381
|
+
const state = flat(resolveStateDir());
|
|
21382
|
+
const registry = text.includes(`${state}/issued`) ? "issued" : text.includes(`${state}/approvals`) ? "approvals" : null;
|
|
21383
|
+
return registry && shellWrites(command).writes ? registry : null;
|
|
21384
|
+
};
|
|
21385
|
+
var REGISTRY_DENY = {
|
|
21386
|
+
issued: {
|
|
21387
|
+
label: "issued-registry guard",
|
|
21388
|
+
unblock: "Issued ids and tokens are written only by Workit's SubagentStart hook. Run the verifier or reviewer agent so the host issues its own session; never edit the issued registries by hand."
|
|
21389
|
+
},
|
|
21390
|
+
approvals: {
|
|
21391
|
+
label: "approvals guard",
|
|
21392
|
+
unblock: "Approval requests and the user's yes are written only by Workit: run `workit approve <id>` as its own call so the host asks the user, or ask the user to run it in their own terminal; never edit the approvals registry by hand."
|
|
21393
|
+
}
|
|
21368
21394
|
};
|
|
21369
|
-
var
|
|
21370
|
-
const
|
|
21395
|
+
var registryDeny = ({ file, registry }) => {
|
|
21396
|
+
const { label, unblock } = REGISTRY_DENY[registry];
|
|
21397
|
+
const what = registry === "issued" ? "issued-session state" : "host-approval state";
|
|
21371
21398
|
return {
|
|
21372
21399
|
kind: "deny",
|
|
21373
|
-
reason: `workit
|
|
21400
|
+
reason: `workit ${label}: ${file} is under Workit's ${what}. ${unblock}`,
|
|
21374
21401
|
unblock
|
|
21375
21402
|
};
|
|
21376
21403
|
};
|
|
21377
21404
|
function writeGate(cwd, paths, owner, deps) {
|
|
21378
|
-
const forged = paths?.length ?
|
|
21405
|
+
const forged = paths?.length ? registryTarget(cwd, paths) : null;
|
|
21379
21406
|
if (forged)
|
|
21380
|
-
return
|
|
21407
|
+
return registryDeny(forged);
|
|
21381
21408
|
if (!owner)
|
|
21382
21409
|
return beforeWriteGate(cwd, paths);
|
|
21383
21410
|
const targets = liveTargets(cwd, paths);
|
|
@@ -21391,9 +21418,10 @@ function writeGate(cwd, paths, owner, deps) {
|
|
|
21391
21418
|
}
|
|
21392
21419
|
function shellGate(cwd, command, owner, dialect = "posix", deps) {
|
|
21393
21420
|
try {
|
|
21394
|
-
const
|
|
21421
|
+
const windows = unquotedWindowsRegistry(command);
|
|
21422
|
+
const forged = registryTarget(cwd, segmentTargets(cwd, command, dialect)) ?? (windows ? { file: `the ${windows} registry`, registry: windows } : null);
|
|
21395
21423
|
if (forged)
|
|
21396
|
-
return
|
|
21424
|
+
return registryDeny(forged);
|
|
21397
21425
|
} catch {}
|
|
21398
21426
|
const writes = shellWrites(command);
|
|
21399
21427
|
let targets = [];
|
|
@@ -22027,6 +22055,10 @@ var writeTargets = (input) => {
|
|
|
22027
22055
|
import fs22 from "node:fs";
|
|
22028
22056
|
import path32 from "node:path";
|
|
22029
22057
|
|
|
22058
|
+
// packages/workit-core/src/approvals/store.ts
|
|
22059
|
+
var REQUEST_TTL_MS = 30 * 60000;
|
|
22060
|
+
var GRANT_TTL_MS = 15 * 60000;
|
|
22061
|
+
|
|
22030
22062
|
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
22031
22063
|
var CLAUDE_CODE_DESCRIPTOR = {
|
|
22032
22064
|
host: "claude_code",
|
|
@@ -22068,7 +22100,11 @@ var CLAUDE_CODE_DESCRIPTOR = {
|
|
|
22068
22100
|
maxConcurrency: "undocumented",
|
|
22069
22101
|
agentPrefix: "workit:"
|
|
22070
22102
|
},
|
|
22071
|
-
provenance: {
|
|
22103
|
+
provenance: {
|
|
22104
|
+
sessionId: "native",
|
|
22105
|
+
agentIdOnTool: "native",
|
|
22106
|
+
postToolObserve: "native"
|
|
22107
|
+
},
|
|
22072
22108
|
interaction: { questions: "undocumented", writeBoundary: "partial" },
|
|
22073
22109
|
stopControl: "native",
|
|
22074
22110
|
shellAvailable: "native",
|
|
@@ -22130,6 +22166,7 @@ var CONTEXT_EVENTS = new Set([
|
|
|
22130
22166
|
"PreToolUse",
|
|
22131
22167
|
"PostToolUse"
|
|
22132
22168
|
]);
|
|
22169
|
+
var ASKING_MODES = new Set(["default", "acceptEdits", "plan"]);
|
|
22133
22170
|
|
|
22134
22171
|
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
22135
22172
|
function detectCodexSurface(env) {
|
package/dist/workit-hook.js
CHANGED
|
@@ -84,7 +84,7 @@ if (quiet) {
|
|
|
84
84
|
`);
|
|
85
85
|
} else {
|
|
86
86
|
try {
|
|
87
|
-
const { runCodexHook } = await import("./workit-hook-
|
|
87
|
+
const { runCodexHook } = await import("./workit-hook-ecwds2tm.js");
|
|
88
88
|
await runCodexHook([payload]);
|
|
89
89
|
} catch (error) {
|
|
90
90
|
const { answerRuntimeFailure } = await import("./workit-hook-ehy7rps6.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/codex",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"build": "bun scripts/build.ts"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@workit-dev/core": "^1.
|
|
45
|
-
"@workit-dev/mcp": "^1.
|
|
44
|
+
"@workit-dev/core": "^1.6.0",
|
|
45
|
+
"@workit-dev/mcp": "^1.6.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|