@workit-dev/codex 1.5.0 → 1.5.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/launch-mcp.js
CHANGED
|
@@ -22385,12 +22385,11 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
|
|
|
22385
22385
|
}
|
|
22386
22386
|
return reasons;
|
|
22387
22387
|
};
|
|
22388
|
-
const
|
|
22388
|
+
const voided = verdictVoids(rows, { chained: true });
|
|
22389
|
+
const retired = new Set(voided.keys());
|
|
22389
22390
|
for (const row of rows)
|
|
22390
|
-
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
|
|
22391
|
+
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && !voided.has(row.id) && trustReasons(cwd, row).length === 0)
|
|
22391
22392
|
retired.add(row.supersedes);
|
|
22392
|
-
for (const id of verdictVoids(rows, { chained: true }).keys())
|
|
22393
|
-
retired.add(id);
|
|
22394
22393
|
const byKind = new Map;
|
|
22395
22394
|
for (const row of rows.toSorted(byRank))
|
|
22396
22395
|
if (isLiveVerdict(row, retired) && scope(row)) {
|
|
@@ -30480,19 +30479,40 @@ if (false) {}
|
|
|
30480
30479
|
|
|
30481
30480
|
// packages/workit-core/src/hooks/skill-nudge.ts
|
|
30482
30481
|
var USER_INVOKED = new Set(["workit-retro", "workit-architecture"]);
|
|
30483
|
-
var
|
|
30484
|
-
|
|
30485
|
-
|
|
30486
|
-
|
|
30487
|
-
|
|
30488
|
-
|
|
30489
|
-
|
|
30490
|
-
|
|
30491
|
-
|
|
30492
|
-
|
|
30493
|
-
|
|
30494
|
-
|
|
30495
|
-
]
|
|
30482
|
+
var PROMPT_INTENTS = [
|
|
30483
|
+
[
|
|
30484
|
+
"debug",
|
|
30485
|
+
/\b(flaky|regressed|(is|introduced) a regression|regression (in|after|since|from)|(is|are|got|looks) broken|debug (this|it|the|why)|fix (the|this|a) bug)\b/i
|
|
30486
|
+
],
|
|
30487
|
+
[
|
|
30488
|
+
"continue",
|
|
30489
|
+
/\b(pick up where|where (were|did) we|resume (the|this|my|our|work|where)|hand ?off)\b/i
|
|
30490
|
+
],
|
|
30491
|
+
[
|
|
30492
|
+
"review",
|
|
30493
|
+
/\b(blast radius|code review|review (the|this|my|PR|pr|#\d+|branch|diff|changes))\b/i
|
|
30494
|
+
],
|
|
30495
|
+
[
|
|
30496
|
+
"ship",
|
|
30497
|
+
/\b(ship (it|this|the)|babysit|open (a|the) (PR|pr|MR|mr)(?=\s*$|\s+(for|to|on|with|and|against|into|from|after|once)\b|[.!,;])|merge (the|this|my) (PR|pr|MR|mr|branch)|(get|until|make) CI (is )?green)\b/i
|
|
30498
|
+
],
|
|
30499
|
+
["bdd", /\b(BDD|TDD|acceptance criteria|Given\/When\/Then)(?![\w/])/],
|
|
30500
|
+
["test-audit", /\b(test audit|audit the tests|tautolog\w*|weak tests)\b/i],
|
|
30501
|
+
["deslop", /\b(deslop|slop|dead code)\b/i],
|
|
30502
|
+
["fanout", /\b(fan( |-)?out|parallelize|parallel agents|agent swarm|swarm of agents)\b/i],
|
|
30503
|
+
["verify-app", /\b(verify the app|smoke test|prove it works)\b/i],
|
|
30504
|
+
["retro", /\b((a|the) retro(?![-\w]|\.\w)|retrospective)/i],
|
|
30505
|
+
["architecture", /\b(deepen (the )?modules|architecture (review|pass|audit))\b/i],
|
|
30506
|
+
[
|
|
30507
|
+
"shape",
|
|
30508
|
+
/\b(brainstorm\w*|grill me|should we|let'?s plan|plan (out|how|the|a|for)|(write|draft) (a|the) spec)\b/i
|
|
30509
|
+
],
|
|
30510
|
+
[
|
|
30511
|
+
"implement",
|
|
30512
|
+
/\b(implement (the|this|a|it)|add (a|the) feature|build (a|an|the) (new )?(feature|command|verb|page|endpoint|component|cli|tool))\b/i
|
|
30513
|
+
]
|
|
30514
|
+
].map(([name, pattern]) => [`workit-${name}`, pattern]);
|
|
30515
|
+
var READERS = new Set("cat sed head tail less more bat nl get-content gc type".split(" "));
|
|
30496
30516
|
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
30497
30517
|
import { existsSync as existsSync13, realpathSync as realpathSync10, statSync as statSync4 } from "node:fs";
|
|
30498
30518
|
import path33 from "node:path";
|
|
@@ -15298,12 +15298,11 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
|
|
|
15298
15298
|
}
|
|
15299
15299
|
return reasons;
|
|
15300
15300
|
};
|
|
15301
|
-
const
|
|
15301
|
+
const voided = verdictVoids(rows, { chained: true });
|
|
15302
|
+
const retired = new Set(voided.keys());
|
|
15302
15303
|
for (const row of rows)
|
|
15303
|
-
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
|
|
15304
|
+
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && !voided.has(row.id) && trustReasons(cwd, row).length === 0)
|
|
15304
15305
|
retired.add(row.supersedes);
|
|
15305
|
-
for (const id of verdictVoids(rows, { chained: true }).keys())
|
|
15306
|
-
retired.add(id);
|
|
15307
15306
|
const byKind = new Map;
|
|
15308
15307
|
for (const row of rows.toSorted(byRank))
|
|
15309
15308
|
if (isLiveVerdict(row, retired) && scope(row)) {
|
|
@@ -21789,40 +21788,37 @@ var SKILL_HOST = {
|
|
|
21789
21788
|
};
|
|
21790
21789
|
var PROMPT_INTENTS = [
|
|
21791
21790
|
[
|
|
21792
|
-
"
|
|
21793
|
-
/\b(flaky|regressed|(
|
|
21791
|
+
"debug",
|
|
21792
|
+
/\b(flaky|regressed|(is|introduced) a regression|regression (in|after|since|from)|(is|are|got|looks) broken|debug (this|it|the|why)|fix (the|this|a) bug)\b/i
|
|
21794
21793
|
],
|
|
21795
21794
|
[
|
|
21796
|
-
"
|
|
21797
|
-
/\b(pick up where|where (
|
|
21795
|
+
"continue",
|
|
21796
|
+
/\b(pick up where|where (were|did) we|resume (the|this|my|our|work|where)|hand ?off)\b/i
|
|
21798
21797
|
],
|
|
21799
21798
|
[
|
|
21800
|
-
"
|
|
21801
|
-
/\b(blast radius|code review|review (
|
|
21799
|
+
"review",
|
|
21800
|
+
/\b(blast radius|code review|review (the|this|my|PR|pr|#\d+|branch|diff|changes))\b/i
|
|
21802
21801
|
],
|
|
21803
21802
|
[
|
|
21804
|
-
"
|
|
21805
|
-
/\b(ship (
|
|
21803
|
+
"ship",
|
|
21804
|
+
/\b(ship (it|this|the)|babysit|open (a|the) (PR|pr|MR|mr)(?=\s*$|\s+(for|to|on|with|and|against|into|from|after|once)\b|[.!,;])|merge (the|this|my) (PR|pr|MR|mr|branch)|(get|until|make) CI (is )?green)\b/i
|
|
21806
21805
|
],
|
|
21807
|
-
["
|
|
21808
|
-
["
|
|
21809
|
-
["
|
|
21806
|
+
["bdd", /\b(BDD|TDD|acceptance criteria|Given\/When\/Then)(?![\w/])/],
|
|
21807
|
+
["test-audit", /\b(test audit|audit the tests|tautolog\w*|weak tests)\b/i],
|
|
21808
|
+
["deslop", /\b(deslop|slop|dead code)\b/i],
|
|
21809
|
+
["fanout", /\b(fan( |-)?out|parallelize|parallel agents|agent swarm|swarm of agents)\b/i],
|
|
21810
|
+
["verify-app", /\b(verify the app|smoke test|prove it works)\b/i],
|
|
21811
|
+
["retro", /\b((a|the) retro(?![-\w]|\.\w)|retrospective)/i],
|
|
21812
|
+
["architecture", /\b(deepen (the )?modules|architecture (review|pass|audit))\b/i],
|
|
21810
21813
|
[
|
|
21811
|
-
"
|
|
21812
|
-
/\b(
|
|
21814
|
+
"shape",
|
|
21815
|
+
/\b(brainstorm\w*|grill me|should we|let'?s plan|plan (out|how|the|a|for)|(write|draft) (a|the) spec)\b/i
|
|
21813
21816
|
],
|
|
21814
|
-
["workit-verify-app", /\b(verify the app|smoke test|prove it works)\b/i],
|
|
21815
|
-
["workit-retro", /\b((?:a|the) retro(?![-\w]|\.\w)|retrospective)/i],
|
|
21816
|
-
["workit-architecture", /\b(deepen (?:the )?modules|architecture (?:review|pass|audit))\b/i],
|
|
21817
21817
|
[
|
|
21818
|
-
"
|
|
21819
|
-
/\b(
|
|
21820
|
-
],
|
|
21821
|
-
[
|
|
21822
|
-
"workit-implement",
|
|
21823
|
-
/\b(implement (?:the|this|a|it)|add (?:a|the) feature|build (?:a|an|the) (?:new )?(?:feature|command|verb|page|endpoint|component|cli|tool))\b/i
|
|
21818
|
+
"implement",
|
|
21819
|
+
/\b(implement (the|this|a|it)|add (a|the) feature|build (a|an|the) (new )?(feature|command|verb|page|endpoint|component|cli|tool))\b/i
|
|
21824
21820
|
]
|
|
21825
|
-
];
|
|
21821
|
+
].map(([name, pattern]) => [`workit-${name}`, pattern]);
|
|
21826
21822
|
var workitSkillOf = (name) => {
|
|
21827
21823
|
const bare = name.trim().replace(/^\//, "").toLowerCase();
|
|
21828
21824
|
const alias = WORKIT_SKILL_ALIASES[bare];
|
|
@@ -21831,10 +21827,13 @@ var workitSkillOf = (name) => {
|
|
|
21831
21827
|
const skill = bare.replace(/^workit:/, "workit-");
|
|
21832
21828
|
return WORKIT_METHOD_SKILLS.includes(skill) ? skill : null;
|
|
21833
21829
|
};
|
|
21830
|
+
var QUOTED = /```[\s\S]*?```|["`“][^"`”\n]*["`”]|\B'[^'\n]*'\B/g;
|
|
21831
|
+
var COMPLAINT = /\b(why \w+ you|you keep|stop \w+ing)\b.*?(?=\b(and|but)\b|[?.,;\n]|$)/gi;
|
|
21834
21832
|
var promptTrigger = (prompt) => {
|
|
21835
|
-
|
|
21833
|
+
let asking = false;
|
|
21834
|
+
const text = prompt.slice(0, 4000).replace(QUOTED, " ").replace(COMPLAINT, (clause) => (asking ||= /ask|quest/i.test(clause), " "));
|
|
21836
21835
|
for (const [skill, pattern] of PROMPT_INTENTS) {
|
|
21837
|
-
const match = pattern.exec(text);
|
|
21836
|
+
const match = !(asking && skill === "workit-shape") && pattern.exec(text);
|
|
21838
21837
|
if (match)
|
|
21839
21838
|
return { skill, trigger: match[1] ?? match[0] };
|
|
21840
21839
|
}
|
|
@@ -21852,24 +21851,12 @@ var loadedSkills = (cwd, session) => {
|
|
|
21852
21851
|
};
|
|
21853
21852
|
var SKILL_FILE = /(?:^|[\\/])(workit-[a-z-]+)[\\/]SKILL\.md$/;
|
|
21854
21853
|
var skillFileIn = (file) => SKILL_FILE.exec(file)?.[1] ?? null;
|
|
21855
|
-
var READERS = new Set(
|
|
21856
|
-
"cat",
|
|
21857
|
-
"sed",
|
|
21858
|
-
"head",
|
|
21859
|
-
"tail",
|
|
21860
|
-
"less",
|
|
21861
|
-
"more",
|
|
21862
|
-
"bat",
|
|
21863
|
-
"nl",
|
|
21864
|
-
"get-content",
|
|
21865
|
-
"gc",
|
|
21866
|
-
"type"
|
|
21867
|
-
]);
|
|
21854
|
+
var READERS = new Set("cat sed head tail less more bat nl get-content gc type".split(" "));
|
|
21868
21855
|
var skillReadIn = (command, dialect = "posix") => {
|
|
21869
21856
|
for (const { words } of segmentsOf(command, dialect)) {
|
|
21870
21857
|
if (!READERS.has((words[0]?.split(/[\\/]/).at(-1) ?? "").toLowerCase()))
|
|
21871
21858
|
continue;
|
|
21872
|
-
if (words.some((word) => /^(
|
|
21859
|
+
if (words.some((word) => /^(-i(\.\w+)?|--in-place(=.*)?)$/.test(word)))
|
|
21873
21860
|
continue;
|
|
21874
21861
|
for (const word of words.slice(1)) {
|
|
21875
21862
|
const skill = skillFileIn(word);
|
|
@@ -21916,9 +21903,9 @@ var nudgeOnce = (input, session, skill, line) => {
|
|
|
21916
21903
|
writeSessionMarker(file, { ...marker, nudged: [...marker.nudged, skill] });
|
|
21917
21904
|
return line;
|
|
21918
21905
|
};
|
|
21919
|
-
var nudgeText = (input, skill, why) =>
|
|
21906
|
+
var nudgeText = (input, skill, why) => `Workit: ${why} looks like ${skill} work${USER_INVOKED.has(skill) ? `, which the user starts; offer it (/${skill.replace(/^workit-/, "wk-")}) rather than loading it.` : `; if it is, ${skillLoadWording(SKILL_HOST[input.host], skill)} first.`}`;
|
|
21920
21907
|
var promptLoads = (prompt) => /^\s*\/(?:skill:)?([\w:-]+)/.exec(prompt)?.[1] ?? /^\s*<skill name="([\w:-]+)"/.exec(prompt)?.[1] ?? /^\s*Load the (workit-[a-z-]+) skill with the skill tool\b/.exec(prompt)?.[1] ?? null;
|
|
21921
|
-
var relayedMessage = (prompt) => /^\s*(
|
|
21908
|
+
var relayedMessage = (prompt) => /^\s*(Another Claude session sent a message\b|<agent-message\s+from=|\[SYSTEM NOTIFICATION\b|<task-notification>)/.test(prompt);
|
|
21922
21909
|
function promptNudge(input, prompt) {
|
|
21923
21910
|
try {
|
|
21924
21911
|
const session = input.session.id;
|
|
@@ -21937,7 +21924,7 @@ function promptNudge(input, prompt) {
|
|
|
21937
21924
|
return null;
|
|
21938
21925
|
}
|
|
21939
21926
|
}
|
|
21940
|
-
var WORKIT_DELIVERY = /^(
|
|
21927
|
+
var WORKIT_DELIVERY = /^(pr (create|merge)|ci wait|git push)\b/;
|
|
21941
21928
|
var runsWorkitDelivery = (command, dialect) => workitInvocations(command, dialect).some((args) => !args.some((arg) => arg === "--help" || arg === "-h" || arg === "--dry-run") && WORKIT_DELIVERY.test(args.join(" ")));
|
|
21942
21929
|
var isDeliveryCommand = (cwd, command, dialect = "posix") => rawDelivery(cwd, command, dialect) || runsWorkitDelivery(command, dialect) && inWorkitWorkspace(cwd);
|
|
21943
21930
|
function shipNudge(input, command) {
|
|
@@ -23362,7 +23349,7 @@ var cwdRewrite = (command) => {
|
|
|
23362
23349
|
const rest = match?.[2];
|
|
23363
23350
|
if (!dir || !rest || dir.startsWith("-"))
|
|
23364
23351
|
return null;
|
|
23365
|
-
if (/[&;<>`\n]/u.test(rest.replaceAll("2>&1", "").replaceAll(/'[^']*'|"(
|
|
23352
|
+
if (/[&;<>`\n]/u.test(rest.replaceAll("2>&1", "").replaceAll(/'[^']*'|"([^"\\]|\\.)*"/gu, "")))
|
|
23366
23353
|
return null;
|
|
23367
23354
|
const segments = segmentsOf(rest);
|
|
23368
23355
|
const [head, ...filters] = segments;
|
|
@@ -23375,8 +23362,10 @@ var cwdRewrite = (command) => {
|
|
|
23375
23362
|
if (!filters.every((s) => FILTERS.has(s.words[0] ?? "") && stdinOnly(s.words)))
|
|
23376
23363
|
return null;
|
|
23377
23364
|
const at = head.words.indexOf("--cwd");
|
|
23378
|
-
if (at >= 0)
|
|
23379
|
-
|
|
23365
|
+
if (at >= 0) {
|
|
23366
|
+
const bare = dir.replace(/^(['"])(.*)\1$/u, "$2");
|
|
23367
|
+
return bare[0] === "/" && head.words[at + 1] === bare ? rest : null;
|
|
23368
|
+
}
|
|
23380
23369
|
if (head.words.some((w) => w.startsWith("--cwd=")))
|
|
23381
23370
|
return null;
|
|
23382
23371
|
const args = rest.slice("workit".length).trimStart();
|
|
@@ -23396,7 +23385,7 @@ var verbFirst = (command) => {
|
|
|
23396
23385
|
return null;
|
|
23397
23386
|
return `${lead} ${verb}${globals}${command.slice(whole.length)}`;
|
|
23398
23387
|
};
|
|
23399
|
-
var MUTATING_GIT2 = /^git(
|
|
23388
|
+
var MUTATING_GIT2 = /^git( -\S+| -[Cc] \S+)* (commit|push|add|switch|checkout|merge|rebase|reset|cherry-pick|revert|branch .*(-[dDmM]|--delete|--move)\b|tag (?!-l\b|--list)|stash(?! (list|show)\b))/u;
|
|
23400
23389
|
var cdWorkitSplit = (command) => {
|
|
23401
23390
|
const match = COMPOUND2.exec(command);
|
|
23402
23391
|
const dir = match?.[1];
|
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-t6n924zv.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.5.
|
|
3
|
+
"version": "1.5.1",
|
|
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.5.
|
|
45
|
-
"@workit-dev/mcp": "^1.5.
|
|
44
|
+
"@workit-dev/core": "^1.5.1",
|
|
45
|
+
"@workit-dev/mcp": "^1.5.1"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|