@workit-dev/codex 1.1.7 → 1.1.8
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.
|
@@ -20091,7 +20091,7 @@ var splitDenial = (plan) => ({
|
|
|
20091
20091
|
unblock: plan.unblock
|
|
20092
20092
|
});
|
|
20093
20093
|
// packages/workit-core/src/hooks/write-gate.ts
|
|
20094
|
-
import { existsSync as existsSync9, realpathSync as realpathSync6 } from "node:fs";
|
|
20094
|
+
import { existsSync as existsSync9, realpathSync as realpathSync6, statSync as statSync3 } from "node:fs";
|
|
20095
20095
|
import os8 from "node:os";
|
|
20096
20096
|
import path27 from "node:path";
|
|
20097
20097
|
|
|
@@ -20495,12 +20495,81 @@ var opaqueWrites = (input, scriptOf = (index) => input[index]) => {
|
|
|
20495
20495
|
})
|
|
20496
20496
|
];
|
|
20497
20497
|
};
|
|
20498
|
+
if (name === "curl")
|
|
20499
|
+
return curlOutputs(args);
|
|
20498
20500
|
if (name === "perl")
|
|
20499
20501
|
return inline(/^-[a-zA-Z]*[eE]$/);
|
|
20500
20502
|
if (/^(?:python[\d.]*|node|bun|deno|ruby|php)$/.test(name))
|
|
20501
20503
|
return inline(/^-[a-zA-Z]*[ce]$|^--eval$|^-p$/);
|
|
20502
20504
|
return shellScript2(words) === null ? null : ["."];
|
|
20503
20505
|
};
|
|
20506
|
+
var CURL_LONG = [
|
|
20507
|
+
"output",
|
|
20508
|
+
"output-dir",
|
|
20509
|
+
"cookie-jar",
|
|
20510
|
+
"dump-header",
|
|
20511
|
+
"trace",
|
|
20512
|
+
"trace-ascii",
|
|
20513
|
+
"stderr",
|
|
20514
|
+
"libcurl",
|
|
20515
|
+
"hsts",
|
|
20516
|
+
"alt-svc",
|
|
20517
|
+
"etag-save",
|
|
20518
|
+
"config",
|
|
20519
|
+
"write-out",
|
|
20520
|
+
"remote-name",
|
|
20521
|
+
"remote-name-all"
|
|
20522
|
+
];
|
|
20523
|
+
var CURL_SHORT_LONG = {
|
|
20524
|
+
o: "output",
|
|
20525
|
+
c: "cookie-jar",
|
|
20526
|
+
D: "dump-header",
|
|
20527
|
+
K: "config",
|
|
20528
|
+
w: "write-out"
|
|
20529
|
+
};
|
|
20530
|
+
var CURL_SHORT = /^-([^-AbcCdDeEFHKmoPQrtTuUwxXyYz]*)(?:([AbcCdDeEFHKmoPQrtTuUwxXyYz])(.*))?$/s;
|
|
20531
|
+
var curlOutputs = (args) => {
|
|
20532
|
+
const files = [];
|
|
20533
|
+
const named = [];
|
|
20534
|
+
const dirs = [];
|
|
20535
|
+
let remote = false;
|
|
20536
|
+
for (let index = 0;index < args.length; index++) {
|
|
20537
|
+
const long = /^--([\w.-]+)(?:=(.*))?$/s.exec(args[index]);
|
|
20538
|
+
const short = long ? null : CURL_SHORT.exec(args[index]);
|
|
20539
|
+
if (short?.[1].includes("O"))
|
|
20540
|
+
remote = true;
|
|
20541
|
+
const option = long ? long[1] === "cookie" ? undefined : CURL_LONG.find((name) => name === long[1]) ?? CURL_LONG.find((name) => name.startsWith(long[1])) : CURL_SHORT_LONG[short?.[2] ?? ""];
|
|
20542
|
+
if (option?.startsWith("remote-name"))
|
|
20543
|
+
remote = true;
|
|
20544
|
+
if (option === undefined || option.startsWith("remote-name")) {
|
|
20545
|
+
if (short?.[2] && !short[3])
|
|
20546
|
+
index++;
|
|
20547
|
+
continue;
|
|
20548
|
+
}
|
|
20549
|
+
const value = (long ? long[2] : short?.[3]) || args[++index];
|
|
20550
|
+
if (option === "config" || option === "write-out" && value?.startsWith("@"))
|
|
20551
|
+
files.push(unknownVarTarget(`curl ${option === "config" ? "-K <config>" : "-w @<format>"}`));
|
|
20552
|
+
else if (value === undefined || value === "-")
|
|
20553
|
+
continue;
|
|
20554
|
+
else if (option === "output")
|
|
20555
|
+
named.push(value);
|
|
20556
|
+
else if (option === "output-dir")
|
|
20557
|
+
dirs.push(value);
|
|
20558
|
+
else if (option === "write-out")
|
|
20559
|
+
for (const match of value.matchAll(/%output\{(?:>>)?([^}]*)\}/g))
|
|
20560
|
+
files.push(match[1]);
|
|
20561
|
+
else
|
|
20562
|
+
files.push(value);
|
|
20563
|
+
}
|
|
20564
|
+
for (const name of named) {
|
|
20565
|
+
if (dirs.length === 0 || /^[/~$]|^[A-Za-z]:[\\/]/.test(name))
|
|
20566
|
+
files.push(name);
|
|
20567
|
+
files.push(...dirs.map((dir) => `${dir}/${name}`));
|
|
20568
|
+
}
|
|
20569
|
+
if (remote)
|
|
20570
|
+
files.push(...dirs.length ? dirs : ["."]);
|
|
20571
|
+
return files.length > 0 ? files : null;
|
|
20572
|
+
};
|
|
20504
20573
|
var pathsIn = (text) => [
|
|
20505
20574
|
...text.matchAll(/(?<![\w.~:/$-])(?:~\/|\/|[A-Za-z]:\/|\.\.(?:\/|$))[^\s'"`$),;:*?<>|\\[\]{}]*/g)
|
|
20506
20575
|
].map((match) => match[0]);
|
|
@@ -20603,6 +20672,7 @@ var MUTATING_GIT = new Set([
|
|
|
20603
20672
|
var DRY_N = new Set(["add", "clean", "rm", "mv"]);
|
|
20604
20673
|
var MUTATING_WORKIT_GIT = new Set(["commit", "branch", "stage", "unstage"]);
|
|
20605
20674
|
var DIR_TARGET = ".workit-live-target";
|
|
20675
|
+
var OPAQUE_TARGET = ".workit-runs-";
|
|
20606
20676
|
var OVERRIDE = "WORKIT_LIVE_SESSION=override";
|
|
20607
20677
|
var inert = (args, sub) => args.some((arg) => arg === "--help" || arg === "-h" || arg === "--dry-run" || DRY_N.has(sub) && /^-[a-zA-Z]*n[a-zA-Z]*$/.test(arg) && !arg.startsWith("--"));
|
|
20608
20678
|
var gitMutationDirs = (cwd, command, dialect) => {
|
|
@@ -20732,6 +20802,10 @@ var untrustedVars = (segments) => {
|
|
|
20732
20802
|
depth = Math.max(0, depth - 1);
|
|
20733
20803
|
}
|
|
20734
20804
|
const words = segment.words.slice(start);
|
|
20805
|
+
const at = words.findIndex((word) => !/^\w+=/.test(word));
|
|
20806
|
+
const ifs = (word) => /\bIFS\b/.test(word);
|
|
20807
|
+
if (segment.subs?.some(ifs) || words.some((w, i) => ifs(w) && !(i < at && words[at] === "read")))
|
|
20808
|
+
all = true;
|
|
20735
20809
|
if (depth > 0)
|
|
20736
20810
|
for (const [key] of assignmentsOf(words))
|
|
20737
20811
|
names.add(key);
|
|
@@ -20776,7 +20850,10 @@ var unresolvedRefs = (text) => [
|
|
|
20776
20850
|
return name === undefined ? match[0] : `$${name}`;
|
|
20777
20851
|
}))
|
|
20778
20852
|
];
|
|
20779
|
-
var unknownVarTarget = (text) =>
|
|
20853
|
+
var unknownVarTarget = (text) => {
|
|
20854
|
+
const refs = unresolvedRefs(text);
|
|
20855
|
+
return path27.join(UNKNOWN_VAR, (refs.length > 0 ? refs : [text]).map(encodeURIComponent).join("+"));
|
|
20856
|
+
};
|
|
20780
20857
|
var applyOperator = (value, operator) => {
|
|
20781
20858
|
if (operator === "")
|
|
20782
20859
|
return value;
|
|
@@ -20872,6 +20949,20 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
20872
20949
|
const name = /^\$(\w+)$/.exec(ref)?.[1];
|
|
20873
20950
|
return name === undefined || new RegExp(`(?<!\\\\)\\$(?:${name}(?!\\w)|\\{${name}\\b)`).test(command);
|
|
20874
20951
|
};
|
|
20952
|
+
const listWord = (word) => unresolvedRefs(word).length > 0 || /[\s*?[]/.test(word) ? null : word;
|
|
20953
|
+
const listWords = (item) => expansions(item, vars, loops).map((text) => listWord(homeExpanded(text)));
|
|
20954
|
+
const redefined = untrusted.all || Boolean(process.env.CDPATH) || /\bCDPATH\b/.test(command) || segments.some((s, i) => s.words.length > 0 && segments[i + 1]?.group === "open" && segments[i + 2]?.group === "close");
|
|
20955
|
+
const moved = (plain) => {
|
|
20956
|
+
if (plain && !redefined && !untrusted.names.has("PWD") && dir !== undefined && dir !== UNKNOWN_DIR && statSync3(dir, { throwIfNoEntry: false })?.isDirectory())
|
|
20957
|
+
vars.set("PWD", dir);
|
|
20958
|
+
else
|
|
20959
|
+
vars.delete("PWD");
|
|
20960
|
+
};
|
|
20961
|
+
const lost = () => {
|
|
20962
|
+
dir = strict ? UNKNOWN_DIR : undefined;
|
|
20963
|
+
stack = [];
|
|
20964
|
+
moved(false);
|
|
20965
|
+
};
|
|
20875
20966
|
const assigned = (value) => {
|
|
20876
20967
|
const made = mktempPath(value, dir);
|
|
20877
20968
|
if (made !== null)
|
|
@@ -20901,10 +20992,10 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
20901
20992
|
if (loop >= 0) {
|
|
20902
20993
|
const [name = "", keyword, ...items] = segment.words.slice(loop + 1);
|
|
20903
20994
|
const expanding = new Set(segment.expands ?? []);
|
|
20904
|
-
const
|
|
20995
|
+
const list = items.flatMap((item, index) => expanding.has(loop + 3 + index) ? listWords(item) : [listWord(homeExpanded(item))]);
|
|
20905
20996
|
vars.delete(name);
|
|
20906
|
-
if (
|
|
20907
|
-
loops.set(name,
|
|
20997
|
+
if (keyword === "in" && list.length <= MAX_EXPANSIONS2 && !list.includes(null) && !untrusted.all && !untrusted.names.has(name))
|
|
20998
|
+
loops.set(name, list);
|
|
20908
20999
|
else
|
|
20909
21000
|
loops.delete(name);
|
|
20910
21001
|
continue;
|
|
@@ -20922,31 +21013,53 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
20922
21013
|
vars.set(key, resolved);
|
|
20923
21014
|
}
|
|
20924
21015
|
}
|
|
21016
|
+
const moving = (word = "") => {
|
|
21017
|
+
const verb = (word.split(/[\\/]/).at(-1) ?? "").toLowerCase();
|
|
21018
|
+
return CD2.has(verb) || PUSHD2.has(verb) || POPD2.has(verb);
|
|
21019
|
+
};
|
|
20925
21020
|
const name = (words[0]?.split(/[\\/]/).at(-1) ?? "").toLowerCase();
|
|
20926
|
-
const moves =
|
|
21021
|
+
const moves = moving(name);
|
|
20927
21022
|
if (moves && strict && nesting > 0) {
|
|
20928
21023
|
dir = UNKNOWN_DIR;
|
|
21024
|
+
moved(false);
|
|
20929
21025
|
continue;
|
|
20930
21026
|
}
|
|
20931
|
-
if (moves && keywords > 0)
|
|
21027
|
+
if (moves && keywords > 0) {
|
|
21028
|
+
moved(false);
|
|
20932
21029
|
continue;
|
|
21030
|
+
}
|
|
21031
|
+
const wrapper = words.findIndex((word) => !TRANSPARENT.has(word) && !PREFIXES2.has(word));
|
|
21032
|
+
if (wrapper > 0 && moving(words[wrapper])) {
|
|
21033
|
+
lost();
|
|
21034
|
+
continue;
|
|
21035
|
+
}
|
|
21036
|
+
const plain = !segment.conditional;
|
|
20933
21037
|
if (CD2.has(name)) {
|
|
20934
21038
|
dir = cdInto(dir, words, strict, vars);
|
|
21039
|
+
moved(plain);
|
|
21040
|
+
continue;
|
|
21041
|
+
}
|
|
21042
|
+
const rotates = words.length < 2 || words.slice(1).some((word) => /^[-+]/.test(word));
|
|
21043
|
+
if (dialect === "posix" && (PUSHD2.has(name) ? rotates : POPD2.has(name) && words.length > 1)) {
|
|
21044
|
+
lost();
|
|
20935
21045
|
continue;
|
|
20936
21046
|
}
|
|
20937
21047
|
if (PUSHD2.has(name)) {
|
|
20938
21048
|
stack.push(dir);
|
|
20939
21049
|
dir = cdInto(dir, words, strict, vars);
|
|
21050
|
+
moved(plain);
|
|
20940
21051
|
continue;
|
|
20941
21052
|
}
|
|
20942
21053
|
if (POPD2.has(name)) {
|
|
20943
21054
|
dir = stack.length ? stack.pop() : strict ? UNKNOWN_DIR : undefined;
|
|
21055
|
+
moved(plain);
|
|
20944
21056
|
continue;
|
|
20945
21057
|
}
|
|
20946
21058
|
const inner = depth < 4 ? wrappedScript(words) ?? (strict ? shellScript2(words) : null) : null;
|
|
21059
|
+
const unPwd = () => new Map([...vars].filter(([key]) => key !== "PWD"));
|
|
20947
21060
|
if (inner !== null && dir !== undefined)
|
|
20948
21061
|
for (const runIn of workitRunDir(dir, words, atAll))
|
|
20949
|
-
targets.push(...segmentTargets(runIn, inner, "posix", depth + 1, strict, vars));
|
|
21062
|
+
targets.push(...segmentTargets(runIn, inner, "posix", depth + 1, strict, runIn === dir ? vars : unPwd()));
|
|
20950
21063
|
if (strict && dir !== undefined) {
|
|
20951
21064
|
const runIn = dir;
|
|
20952
21065
|
for (const sub of depth < 4 ? segment.subs ?? [] : [])
|
|
@@ -20957,13 +21070,18 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
20957
21070
|
if (word === undefined || !expanding.has(keywords + index))
|
|
20958
21071
|
return word;
|
|
20959
21072
|
const all = expansions(word, vars, loops);
|
|
20960
|
-
|
|
20961
|
-
|
|
21073
|
+
return all.some((text) => unresolvedRefs(text).some(unescaped)) ? undefined : all.join(`
|
|
21074
|
+
`);
|
|
20962
21075
|
};
|
|
20963
21076
|
const opaque = segment.unanalyzable ? ["."] : inner === null ? opaqueWrites(body, scriptOf) : null;
|
|
21077
|
+
const ran = words.findIndex((word) => word === "xargs" || !PREFIXES2.has(word));
|
|
21078
|
+
const runner = words[ran];
|
|
21079
|
+
if (runner !== undefined && expanding.has(keywords + lead + ran) && unresolvedRefs(homeExpanded(runner)).length > 0)
|
|
21080
|
+
targets.push(unknownVarTarget(runner));
|
|
21081
|
+
const here = segment.unanalyzable ? DIR_TARGET : `${OPAQUE_TARGET}${encodeURIComponent(runner?.split(/[\\/]/).at(-1) ?? "a command")}`;
|
|
20964
21082
|
for (const file of opaque ?? [])
|
|
20965
21083
|
for (const resolved of atAll(file))
|
|
20966
|
-
targets.push(file === "." ? path27.join(resolved,
|
|
21084
|
+
targets.push(file === "." ? path27.join(resolved, here) : resolved);
|
|
20967
21085
|
const ln = words.findIndex((word) => /^ln$/i.test(word.split(/[\\/]/).at(-1) ?? ""));
|
|
20968
21086
|
if (ln >= 0 && words.slice(0, ln).every((word) => PREFIXES2.has(word)))
|
|
20969
21087
|
targets.push(...linkSources(words.slice(ln + 1), at));
|
|
@@ -21680,7 +21798,7 @@ ${line}` };
|
|
|
21680
21798
|
return decision;
|
|
21681
21799
|
};
|
|
21682
21800
|
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
21683
|
-
import { existsSync as existsSync10, realpathSync as realpathSync7, statSync as
|
|
21801
|
+
import { existsSync as existsSync10, realpathSync as realpathSync7, statSync as statSync4 } from "node:fs";
|
|
21684
21802
|
import path29 from "node:path";
|
|
21685
21803
|
var isRecord5 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
21686
21804
|
var nonEmpty2 = (value) => typeof value === "string" && value.trim() !== "";
|
|
@@ -21689,7 +21807,7 @@ var existingDirectory = (value) => {
|
|
|
21689
21807
|
if (!nonEmpty2(value) || !path29.isAbsolute(value) || !existsSync10(value))
|
|
21690
21808
|
return null;
|
|
21691
21809
|
try {
|
|
21692
|
-
return
|
|
21810
|
+
return statSync4(value).isDirectory() ? realpathSync7(value) : null;
|
|
21693
21811
|
} catch {
|
|
21694
21812
|
return null;
|
|
21695
21813
|
}
|
|
@@ -22497,7 +22615,14 @@ var hostIsolated = (cwd, agentId) => {
|
|
|
22497
22615
|
return false;
|
|
22498
22616
|
}
|
|
22499
22617
|
};
|
|
22500
|
-
var
|
|
22618
|
+
var runnerAt = (target) => {
|
|
22619
|
+
const base = path30.basename(target);
|
|
22620
|
+
return base.startsWith(OPAQUE_TARGET) ? decodeURIComponent(base.slice(OPAQUE_TARGET.length)) : null;
|
|
22621
|
+
};
|
|
22622
|
+
var shown = (target) => {
|
|
22623
|
+
const named = /^\.workit-(?:live-target$|runs-)/.test(path30.basename(target)) ? path30.dirname(target) : target;
|
|
22624
|
+
return path30.sep === "\\" ? named.replaceAll("/", "\\") : named;
|
|
22625
|
+
};
|
|
22501
22626
|
var unboundDeny = (input, target) => {
|
|
22502
22627
|
const unblock = "Work only in the worktree your brief names, which the lead made with `workit fanout worktree create <slice>`: edit files under it and run one verb per call against it (`workit git --cwd <worktree> commit -m … -- <paths>`, `workit check --cwd <worktree> <name>`). If your brief names no worktree, stop and report that to the lead.";
|
|
22503
22628
|
return {
|
|
@@ -22507,10 +22632,11 @@ var unboundDeny = (input, target) => {
|
|
|
22507
22632
|
};
|
|
22508
22633
|
};
|
|
22509
22634
|
var outsideDeny = (input, worktree, target) => {
|
|
22510
|
-
const
|
|
22635
|
+
const runner = runnerAt(target);
|
|
22636
|
+
const unblock = `${runner === null ? "" : `Run \`${runner}\` from your worktree: \`cd ${worktree} && …\`. `}Edit only under ${worktree} and run git there, one verb per call: \`workit git --cwd ${worktree} commit -m … -- <paths>\`, \`workit check --cwd ${worktree} <name>\` (or \`git -C ${worktree} …\`); a command whose writes Workit cannot see is judged by the directory it runs in. Anything outside it is a follow-up for your report.`;
|
|
22511
22637
|
return {
|
|
22512
22638
|
kind: "deny",
|
|
22513
|
-
reason: `workit worktree confinement: implementer ${input.session.agentId} is bound to the worktree ${worktree}, and ${shown(target)} is outside it. ${unblock}`,
|
|
22639
|
+
reason: `workit worktree confinement: implementer ${input.session.agentId} is bound to the worktree ${worktree}, and ${runner === null ? `${shown(target)} is` : `\`${runner}\` runs in ${shown(target)},`} outside it. ${unblock}`,
|
|
22514
22640
|
unblock
|
|
22515
22641
|
};
|
|
22516
22642
|
};
|
|
@@ -22534,15 +22660,28 @@ var literalForm = (command, refs) => {
|
|
|
22534
22660
|
};
|
|
22535
22661
|
var unknownVarDeny = (input, worktree, targets, command) => {
|
|
22536
22662
|
const refs = [
|
|
22537
|
-
...new Set(targets.flatMap((target) =>
|
|
22663
|
+
...new Set(targets.flatMap((target) => path30.relative(UNKNOWN_VAR, path30.resolve(target)).split(path30.sep)[0].split("+").filter(Boolean).map(decodeURIComponent)))
|
|
22538
22664
|
];
|
|
22665
|
+
let text = command ?? "";
|
|
22666
|
+
const first = [];
|
|
22667
|
+
const named = refs.map((ref) => {
|
|
22668
|
+
const name = /^\$(\w+)$/.exec(ref)?.[1];
|
|
22669
|
+
const set = name ? new RegExp(`(^|[\\s;&|(])${name}=("?)(\\$\\([^()]*\\)|\`[^\`]*\`)\\2[ \\t]*(?:&&|;|\\n)?[ \\t]*`).exec(text) : null;
|
|
22670
|
+
const sub = set?.[3] ?? (/^(?:\$\(|`)/.test(ref) ? ref : null);
|
|
22671
|
+
if (sub === null)
|
|
22672
|
+
return ref;
|
|
22673
|
+
if (set)
|
|
22674
|
+
text = text.replace(set[0], set[1]);
|
|
22675
|
+
first.push(`Run \`${sub.slice(sub.startsWith("`") ? 1 : 2, -1).trim()}\` first, then`);
|
|
22676
|
+
return sub === ref ? ref : `${ref} (set by \`${sub}\`)`;
|
|
22677
|
+
});
|
|
22539
22678
|
const wt = worktree ?? "<worktree>";
|
|
22540
|
-
const
|
|
22541
|
-
const retry = command === undefined ? "" : ` Retry as: \`${
|
|
22542
|
-
const unblock = `Spell the path out instead of ${
|
|
22679
|
+
const literal = literalForm(text, refs.filter((ref) => /^[$`]/.test(ref)));
|
|
22680
|
+
const retry = command === undefined || literal === command ? "" : ` ${first.length ? `${first.join(" ")} retry` : "Retry"} as: \`${literal}\`.`;
|
|
22681
|
+
const unblock = `Spell the path out instead of ${refs.join(", ")}: Workit follows only a plain \`NAME=<literal>\` set earlier in the same command, \`$(mktemp …)\`, \`$PWD\` after a literal \`cd\` and a \`for\` over literal words.${retry} Write under ${wt} (\`workit git --cwd ${wt} …\`, \`workit check --cwd ${wt} …\`) or a temp dir.`;
|
|
22543
22682
|
return {
|
|
22544
22683
|
kind: "deny",
|
|
22545
|
-
reason: `workit worktree confinement: implementer ${input.session.agentId} writes to a path built from ${named}, which Workit cannot resolve (a command substitution, a loop over unknown words, a conditional
|
|
22684
|
+
reason: `workit worktree confinement: implementer ${input.session.agentId} writes to a path built from ${named.join(", ")}, which Workit cannot resolve (a command substitution, a loop over unknown or split words, a conditional, a binder such as read or eval, or an options file sets it), so it cannot tell whether the write stays in its worktree. ${unblock}`,
|
|
22546
22685
|
unblock
|
|
22547
22686
|
};
|
|
22548
22687
|
};
|
|
@@ -22887,7 +23026,7 @@ var verbFirst = (command) => {
|
|
|
22887
23026
|
};
|
|
22888
23027
|
|
|
22889
23028
|
// packages/workit-core/src/hooks/model-limit.ts
|
|
22890
|
-
import { closeSync as closeSync2, openSync as openSync2, readdirSync as readdirSync3, readSync, statSync as
|
|
23029
|
+
import { closeSync as closeSync2, openSync as openSync2, readdirSync as readdirSync3, readSync, statSync as statSync5 } from "node:fs";
|
|
22891
23030
|
import os9 from "node:os";
|
|
22892
23031
|
import path32 from "node:path";
|
|
22893
23032
|
var MONTHS = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
|
@@ -23100,7 +23239,7 @@ var scanClaudeTranscripts = (cwd, env, now = new Date) => {
|
|
|
23100
23239
|
const files = listDir(project).flatMap((entry) => entry.endsWith(".jsonl") ? [{ file: entry, worker: false }] : listDir(path32.join(entry, "subagents")).filter((file) => file.endsWith(".jsonl")).map((file) => ({ file, worker: true })));
|
|
23101
23240
|
for (const { file, worker } of files)
|
|
23102
23241
|
try {
|
|
23103
|
-
const stat =
|
|
23242
|
+
const stat = statSync5(file);
|
|
23104
23243
|
if (now.getTime() - stat.mtimeMs > SCAN_MS)
|
|
23105
23244
|
continue;
|
|
23106
23245
|
const last = lastApiError(tail(file, stat.size));
|
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-1t5fcvt5.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.1.
|
|
3
|
+
"version": "1.1.8",
|
|
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.1.
|
|
45
|
-
"@workit-dev/mcp": "^1.1.
|
|
44
|
+
"@workit-dev/core": "^1.1.8",
|
|
45
|
+
"@workit-dev/mcp": "^1.1.8"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|