@brainervirus/workit-codex 8.15.1 → 8.17.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/.codex-plugin/plugin.json +1 -1
- package/dist/launch-mcp.js +197 -3
- package/dist/{workit-hook-v4a1y79w.js → workit-hook-23t8ttjv.js} +1487 -737
- package/dist/workit-hook-rbb0m9zp.js +282 -0
- package/dist/workit-hook.js +5 -3
- package/package.json +3 -3
- package/skills/workit-fanout/SKILL.md +7 -7
- package/skills/workit-fanout/references/brief.md +3 -1
- package/skills/workit-implement/SKILL.md +8 -1
- package/skills/workit-review/SKILL.md +2 -1
- package/skills/workit-verify-app/SKILL.md +2 -0
package/dist/launch-mcp.js
CHANGED
|
@@ -18870,6 +18870,7 @@ import fs9 from "node:fs";
|
|
|
18870
18870
|
import path9 from "node:path";
|
|
18871
18871
|
var SCRIPT_CHECKS = ["test", "lint", "typecheck", "check"];
|
|
18872
18872
|
var CHECKS_FILE = "workit.checks.json";
|
|
18873
|
+
var checksConfigFile = (root) => path9.join(root, CHECKS_FILE);
|
|
18873
18874
|
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18874
18875
|
var SHELL_META = /[|&;<>()$`\\*?[\]{}~!#]/u;
|
|
18875
18876
|
function splitCommand(command) {
|
|
@@ -18982,7 +18983,7 @@ function detectedChecks(root) {
|
|
|
18982
18983
|
var GATES = ["testing", "verification"];
|
|
18983
18984
|
function loadCheckConfig(cwd) {
|
|
18984
18985
|
const root = checkRoot(cwd);
|
|
18985
|
-
const file =
|
|
18986
|
+
const file = checksConfigFile(root);
|
|
18986
18987
|
const none = (error = null) => ({
|
|
18987
18988
|
source: error ? CHECKS_FILE : "none",
|
|
18988
18989
|
root,
|
|
@@ -19619,6 +19620,7 @@ var workspaceConfigSchema = object({
|
|
|
19619
19620
|
autoApprove: union([boolean2(), array(nonBlank)]).optional(),
|
|
19620
19621
|
defaultEndpoint: unknown().optional(),
|
|
19621
19622
|
verification: _enum(["self", "independent"]).optional(),
|
|
19623
|
+
delegation: unknown().optional(),
|
|
19622
19624
|
trailers: boolean2().optional(),
|
|
19623
19625
|
liveSessionGuard: boolean2().optional(),
|
|
19624
19626
|
fanout: object({ tierModels: unknown().optional() }).passthrough().optional(),
|
|
@@ -22409,6 +22411,58 @@ function evaluateClosure(requestedOutcome, view) {
|
|
|
22409
22411
|
requirementIds: evaluations.map((item) => item.requirementId)
|
|
22410
22412
|
});
|
|
22411
22413
|
}
|
|
22414
|
+
var BRIEF_TEXT = 250;
|
|
22415
|
+
var BRIEF_BLOCKERS = 3;
|
|
22416
|
+
var BRIEF_OPEN = 8;
|
|
22417
|
+
var clip = (value) => {
|
|
22418
|
+
const fits = (text) => Buffer.byteLength(JSON.stringify(text)) <= BRIEF_TEXT;
|
|
22419
|
+
if (fits(value))
|
|
22420
|
+
return value;
|
|
22421
|
+
let length = Math.min(value.length, BRIEF_TEXT);
|
|
22422
|
+
while (length > 0 && !fits(`${value.slice(0, length)}…`))
|
|
22423
|
+
length -= 1;
|
|
22424
|
+
return `${value.slice(0, length)}…`;
|
|
22425
|
+
};
|
|
22426
|
+
function boundTaskSummary(summary) {
|
|
22427
|
+
const rules = new Map((summary.policy?.requirements ?? []).map((item) => [item.id, item]));
|
|
22428
|
+
const unmet = summary.requirements.filter((item) => item.status === "unsatisfied" || item.status === "unavailable");
|
|
22429
|
+
const { progress, closure } = summary;
|
|
22430
|
+
const next = progress.nextAction;
|
|
22431
|
+
const open = unmet.slice(0, BRIEF_OPEN).map((item) => ({
|
|
22432
|
+
dimension: rules.get(item.requirementId)?.dimension ?? "verification",
|
|
22433
|
+
before: rules.get(item.requirementId)?.before ?? "close",
|
|
22434
|
+
status: item.status
|
|
22435
|
+
}));
|
|
22436
|
+
const brief = {
|
|
22437
|
+
id: summary.id,
|
|
22438
|
+
revision: summary.revision,
|
|
22439
|
+
workspaceRevision: summary.workspaceRevision,
|
|
22440
|
+
updatedAt: summary.updatedAt,
|
|
22441
|
+
objective: clip(summary.objective),
|
|
22442
|
+
status: summary.status,
|
|
22443
|
+
closure: closure && {
|
|
22444
|
+
outcome: closure.outcome,
|
|
22445
|
+
at: closure.at,
|
|
22446
|
+
summary: clip(closure.summary)
|
|
22447
|
+
},
|
|
22448
|
+
progress: {
|
|
22449
|
+
summary: clip(progress.summary),
|
|
22450
|
+
nextAction: next && clip(next),
|
|
22451
|
+
blockers: progress.blockers.slice(0, BRIEF_BLOCKERS).map((item) => ({
|
|
22452
|
+
reason: clip(item.reason),
|
|
22453
|
+
dependentAction: clip(item.dependentAction)
|
|
22454
|
+
}))
|
|
22455
|
+
},
|
|
22456
|
+
requirements: { total: summary.requirements.length, unmet: unmet.length, open },
|
|
22457
|
+
truncated: false
|
|
22458
|
+
};
|
|
22459
|
+
brief.truncated = JSON.stringify(brief).includes("…") || progress.blockers.length > BRIEF_BLOCKERS || unmet.length > BRIEF_OPEN;
|
|
22460
|
+
return brief;
|
|
22461
|
+
}
|
|
22462
|
+
function briefInspectResult(request, result) {
|
|
22463
|
+
const { action, view } = request ?? {};
|
|
22464
|
+
return result.ok && action === "inspect" && (view ?? "summary") === "summary" ? { ...result, data: boundTaskSummary(result.data) } : result;
|
|
22465
|
+
}
|
|
22412
22466
|
|
|
22413
22467
|
// packages/workit-core/src/core/methods.ts
|
|
22414
22468
|
var METHODS = {
|
|
@@ -22711,6 +22765,7 @@ var LAUNCHERS = new Set([
|
|
|
22711
22765
|
"sudo",
|
|
22712
22766
|
"command"
|
|
22713
22767
|
]);
|
|
22768
|
+
var PACKAGE_RUNNERS = new Set(["npx", "bunx", "pnpx"]);
|
|
22714
22769
|
var PUSH_VALUE_OPTIONS = new Set(["-o", "--push-option", "--receive-pack", "--exec", "--repo"]);
|
|
22715
22770
|
var VALUE_OPTIONS = {
|
|
22716
22771
|
git: new Set([
|
|
@@ -23669,6 +23724,15 @@ class WorkitCore {
|
|
|
23669
23724
|
if (!parsed.ok)
|
|
23670
23725
|
return parsed;
|
|
23671
23726
|
const input = parsed.data;
|
|
23727
|
+
if (this.context.readOnlyChild) {
|
|
23728
|
+
if (input.action !== "inspect")
|
|
23729
|
+
return failure2("permission_denied", "child sessions can only inspect the task summary");
|
|
23730
|
+
const task = this.store.readTask(input.taskId);
|
|
23731
|
+
if (!task.ok)
|
|
23732
|
+
return task;
|
|
23733
|
+
const summary = this.summary(task.data);
|
|
23734
|
+
return summary.ok ? { ...summary, data: boundTaskSummary(summary.data) } : summary;
|
|
23735
|
+
}
|
|
23672
23736
|
if ((this.context.workerId ?? null) !== null) {
|
|
23673
23737
|
if (input.action !== "inspect" && input.action !== "list")
|
|
23674
23738
|
return failure2("permission_denied", "helpers cannot control task lifecycle or scope");
|
|
@@ -28494,7 +28558,8 @@ function createMcpServer(host, contextProvider) {
|
|
|
28494
28558
|
}, workspaceRoot);
|
|
28495
28559
|
const core = new WorkitCore(new TaskStore(context.root), context);
|
|
28496
28560
|
const run = core[family];
|
|
28497
|
-
|
|
28561
|
+
const result = run.call(core, parsed.data);
|
|
28562
|
+
return resultForClient(family === "task" && context.callerAttested !== true ? briefInspectResult(parsed.data, result) : result, workspaceRoot);
|
|
28498
28563
|
} catch (error) {
|
|
28499
28564
|
return thrownResult(toolName, error, workspaceRoot);
|
|
28500
28565
|
}
|
|
@@ -28549,6 +28614,129 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
|
|
|
28549
28614
|
var signals = new Map;
|
|
28550
28615
|
var cache = new Map;
|
|
28551
28616
|
var TURN_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
28617
|
+
// packages/workit-core/src/core/heavy.ts
|
|
28618
|
+
var INFO_FLAGS = new Set(["--version", "-v", "-V", "--help", "-h", "help", "version"]);
|
|
28619
|
+
var sub = (...names) => new Set(names);
|
|
28620
|
+
var TOOLS = {
|
|
28621
|
+
jest: "any",
|
|
28622
|
+
vitest: "any",
|
|
28623
|
+
mocha: "any",
|
|
28624
|
+
ava: "any",
|
|
28625
|
+
tap: "any",
|
|
28626
|
+
karma: "any",
|
|
28627
|
+
jasmine: "any",
|
|
28628
|
+
nyc: "any",
|
|
28629
|
+
c8: "any",
|
|
28630
|
+
tsc: "any",
|
|
28631
|
+
"vue-tsc": "any",
|
|
28632
|
+
"svelte-check": "any",
|
|
28633
|
+
eslint: "any",
|
|
28634
|
+
stylelint: "any",
|
|
28635
|
+
tslint: "any",
|
|
28636
|
+
webpack: "any",
|
|
28637
|
+
"webpack-cli": "any",
|
|
28638
|
+
rollup: "any",
|
|
28639
|
+
parcel: "any",
|
|
28640
|
+
tsup: "any",
|
|
28641
|
+
vite: sub("build", "optimize"),
|
|
28642
|
+
next: sub("build", "lint"),
|
|
28643
|
+
nuxt: sub("build", "generate"),
|
|
28644
|
+
nuxi: sub("build", "generate"),
|
|
28645
|
+
astro: sub("build", "check"),
|
|
28646
|
+
ng: sub("build", "b", "test", "t", "e2e", "lint"),
|
|
28647
|
+
"react-scripts": sub("build", "test"),
|
|
28648
|
+
playwright: sub("test", "install"),
|
|
28649
|
+
cypress: sub("run"),
|
|
28650
|
+
wdio: "any",
|
|
28651
|
+
testcafe: "any",
|
|
28652
|
+
turbo: "any",
|
|
28653
|
+
lerna: sub("run", "exec", "bootstrap"),
|
|
28654
|
+
"sonar-scanner": "any",
|
|
28655
|
+
sonarless: sub("scan"),
|
|
28656
|
+
"sonarless-mcp": sub("scan"),
|
|
28657
|
+
go: sub("test", "build", "vet", "install", "generate"),
|
|
28658
|
+
"golangci-lint": sub("run"),
|
|
28659
|
+
gotestsum: "any",
|
|
28660
|
+
staticcheck: "any",
|
|
28661
|
+
cargo: sub("build", "b", "test", "t", "check", "c", "clippy", "bench", "nextest", "doc", "install", "tarpaulin", "llvm-cov"),
|
|
28662
|
+
mvn: "any",
|
|
28663
|
+
mvnw: "any",
|
|
28664
|
+
gradle: "any",
|
|
28665
|
+
gradlew: "any",
|
|
28666
|
+
ant: "any",
|
|
28667
|
+
sbt: "any",
|
|
28668
|
+
bazel: sub("build", "test", "run", "coverage"),
|
|
28669
|
+
bazelisk: sub("build", "test", "run", "coverage"),
|
|
28670
|
+
buck2: sub("build", "test", "run"),
|
|
28671
|
+
dotnet: sub("build", "test", "publish", "restore", "pack", "msbuild"),
|
|
28672
|
+
msbuild: "any",
|
|
28673
|
+
pytest: "any",
|
|
28674
|
+
"py.test": "any",
|
|
28675
|
+
tox: "any",
|
|
28676
|
+
nox: "any",
|
|
28677
|
+
mypy: "any",
|
|
28678
|
+
pyright: "any",
|
|
28679
|
+
pylint: "any",
|
|
28680
|
+
coverage: sub("run"),
|
|
28681
|
+
maturin: sub("build", "develop"),
|
|
28682
|
+
pip: sub("install", "wheel"),
|
|
28683
|
+
pip3: sub("install", "wheel"),
|
|
28684
|
+
rspec: "any",
|
|
28685
|
+
rails: sub("test", "assets:precompile"),
|
|
28686
|
+
phpunit: "any",
|
|
28687
|
+
pest: "any",
|
|
28688
|
+
phpstan: "any",
|
|
28689
|
+
psalm: "any",
|
|
28690
|
+
composer: sub("install", "update", "require", "test"),
|
|
28691
|
+
mix: sub("test", "compile", "deps.get", "dialyzer", "credo"),
|
|
28692
|
+
swift: sub("build", "test"),
|
|
28693
|
+
xcodebuild: "any",
|
|
28694
|
+
flutter: sub("build", "test"),
|
|
28695
|
+
dart: sub("test", "compile"),
|
|
28696
|
+
pod: sub("install"),
|
|
28697
|
+
cmake: sub("--build"),
|
|
28698
|
+
ninja: "any",
|
|
28699
|
+
meson: sub("compile", "test"),
|
|
28700
|
+
ctest: "any",
|
|
28701
|
+
scons: "any",
|
|
28702
|
+
"docker-compose": sub("build"),
|
|
28703
|
+
buildah: sub("bud", "build"),
|
|
28704
|
+
earthly: "any"
|
|
28705
|
+
};
|
|
28706
|
+
var PM_VALUES = new Set([
|
|
28707
|
+
"--prefix",
|
|
28708
|
+
"-w",
|
|
28709
|
+
"--workspace",
|
|
28710
|
+
"-C",
|
|
28711
|
+
"--dir",
|
|
28712
|
+
"--filter",
|
|
28713
|
+
"-F",
|
|
28714
|
+
"--cwd",
|
|
28715
|
+
"-p",
|
|
28716
|
+
"--package",
|
|
28717
|
+
"--cache",
|
|
28718
|
+
"--registry"
|
|
28719
|
+
]);
|
|
28720
|
+
var NPM_INSTALL = new Set([
|
|
28721
|
+
"ci",
|
|
28722
|
+
"clean-install",
|
|
28723
|
+
"cit",
|
|
28724
|
+
"install-test",
|
|
28725
|
+
"it",
|
|
28726
|
+
"install",
|
|
28727
|
+
"i",
|
|
28728
|
+
"in",
|
|
28729
|
+
"add",
|
|
28730
|
+
"rebuild",
|
|
28731
|
+
"update",
|
|
28732
|
+
"up"
|
|
28733
|
+
]);
|
|
28734
|
+
var NPM_RUN = new Set(["run", "run-script", "rum", "urn"]);
|
|
28735
|
+
var NPM_TEST = new Set(["test", "t", "tst"]);
|
|
28736
|
+
var EXEC = new Set(["exec", "x", "dlx"]);
|
|
28737
|
+
|
|
28738
|
+
// packages/workit-core/src/core/heavy-words.ts
|
|
28739
|
+
var HEAVY_WORDS = new Set(("npm npx pnpm pnpx yarn bun bunx deno corepack make gmake docker podman nerdctl " + "python python3 py uv poetry pdm pipenv hatch rye bundle rake nx " + "jest vitest mocha ava tap karma jasmine nyc c8 tsc vue-tsc svelte-check eslint stylelint " + "tslint webpack webpack-cli rollup parcel tsup vite next nuxt nuxi astro ng react-scripts " + "playwright cypress wdio testcafe turbo lerna sonar-scanner sonarless sonarless-mcp go " + "golangci-lint gotestsum staticcheck cargo mvn mvnw gradle gradlew ant sbt bazel bazelisk " + "buck2 dotnet msbuild pytest py.test tox nox mypy pyright pylint coverage maturin pip pip3 " + "rspec rails phpunit pest phpstan psalm composer mix swift xcodebuild flutter dart pod cmake " + "ninja meson ctest scons docker-compose buildah earthly").split(" "));
|
|
28552
28740
|
// packages/workit-core/src/core/live-session.ts
|
|
28553
28741
|
import { spawnSync as spawnSync15 } from "node:child_process";
|
|
28554
28742
|
var LIVE_SESSION_TTL_MS = 15 * 60000;
|
|
@@ -28562,6 +28750,7 @@ var PIDS = new Map;
|
|
|
28562
28750
|
// packages/workit-core/src/hooks/write-gate.ts
|
|
28563
28751
|
var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
|
|
28564
28752
|
var PREFIXES2 = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
|
|
28753
|
+
var SCRIPT_SHELLS = new Set(["sh", "bash", "zsh", "dash", "ksh"]);
|
|
28565
28754
|
var cache2 = new Map;
|
|
28566
28755
|
var MUTATING_GIT = new Set([
|
|
28567
28756
|
"add",
|
|
@@ -28662,7 +28851,12 @@ var CODEX_DESCRIPTOR = {
|
|
|
28662
28851
|
"compact.pre": { support: "none", native: null },
|
|
28663
28852
|
stop: { support: "native", native: "Stop" }
|
|
28664
28853
|
},
|
|
28665
|
-
shellPolicy: {
|
|
28854
|
+
shellPolicy: {
|
|
28855
|
+
deny: "native",
|
|
28856
|
+
channel: "permissionDecision",
|
|
28857
|
+
failClosed: false,
|
|
28858
|
+
rewrite: "none"
|
|
28859
|
+
},
|
|
28666
28860
|
context: {
|
|
28667
28861
|
sessionStart: "native",
|
|
28668
28862
|
perTurn: "native",
|