@brainervirus/workit-cursor 8.35.2 → 8.37.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.
|
@@ -22689,7 +22689,8 @@ function handleHook(input, deps) {
|
|
|
22689
22689
|
const decision = decide(input, deps);
|
|
22690
22690
|
if (deps.descriptor.transport !== "hook-process" || !PRE_TOOL.has(input.event.kind) || decision.kind === "deny" || decision.kind === "ask")
|
|
22691
22691
|
return decision;
|
|
22692
|
-
const delta = standingDelta(input)
|
|
22692
|
+
const delta = [standingDelta(input), deps.budget?.line(input) ?? null].filter(Boolean).join(`
|
|
22693
|
+
`) || null;
|
|
22693
22694
|
if (!delta)
|
|
22694
22695
|
return decision;
|
|
22695
22696
|
return decision.kind === "rewrite" || decision.kind === "update-input" ? { ...decision, text: [decision.text, delta].filter(Boolean).join(`
|
|
@@ -22799,7 +22800,11 @@ function decide(input, deps) {
|
|
|
22799
22800
|
case "subagent.start":
|
|
22800
22801
|
if (workitRole(descriptor, event.agentType) === "judge")
|
|
22801
22802
|
trackJudge(input, event.agentId, true);
|
|
22802
|
-
seedStanding({
|
|
22803
|
+
seedStanding({
|
|
22804
|
+
...input,
|
|
22805
|
+
session: { ...input.session, agentId: event.agentId }
|
|
22806
|
+
});
|
|
22807
|
+
deps.budget?.start(input, event.agentId, event.agentType);
|
|
22803
22808
|
return {
|
|
22804
22809
|
kind: "context",
|
|
22805
22810
|
text: subagentStartText(input, descriptor, event)
|
|
@@ -22812,13 +22817,19 @@ function decide(input, deps) {
|
|
|
22812
22817
|
case "tool.pre":
|
|
22813
22818
|
if (event.skill)
|
|
22814
22819
|
recordSkillLoad(input, event.skill, "tool");
|
|
22815
|
-
if (event.agentInput && input.host === "claude_code")
|
|
22816
|
-
|
|
22820
|
+
if (event.agentInput && input.host === "claude_code") {
|
|
22821
|
+
const spawn = spawnDecision(descriptor, input.cwd, event.agentInput);
|
|
22822
|
+
if (spawn.kind !== "deny")
|
|
22823
|
+
deps.budget?.spawn(input, event.agentInput);
|
|
22824
|
+
return spawn;
|
|
22825
|
+
}
|
|
22817
22826
|
return NONE6;
|
|
22818
22827
|
case "stop":
|
|
22819
22828
|
return usable2(descriptor.events.stop.support) ? stopDecision(input, descriptor) : NONE6;
|
|
22820
22829
|
case "subagent.stop":
|
|
22821
22830
|
trackJudge(input, event.agentId, false);
|
|
22831
|
+
if (event.agentId)
|
|
22832
|
+
deps.budget?.stop(input, event.agentId);
|
|
22822
22833
|
return NONE6;
|
|
22823
22834
|
case "prompt.submit":
|
|
22824
22835
|
return NONE6;
|
|
@@ -22871,7 +22882,8 @@ ${subagentStartText({ ...input, cwd: "" }, descriptor, event)}`;
|
|
|
22871
22882
|
try {
|
|
22872
22883
|
const decision = handleHook(parsed.input, {
|
|
22873
22884
|
descriptor,
|
|
22874
|
-
addendum: adapter.addendum?.(parsed.input) ?? null
|
|
22885
|
+
addendum: adapter.addendum?.(parsed.input) ?? null,
|
|
22886
|
+
budget: adapter.budget
|
|
22875
22887
|
});
|
|
22876
22888
|
return { ...adapter.render(decision, parsed.native), error: null };
|
|
22877
22889
|
} catch (error) {
|
|
@@ -23173,7 +23185,7 @@ var init_claude_code = __esm(() => {
|
|
|
23173
23185
|
"shell.post": { support: "native", native: "PostToolUse" },
|
|
23174
23186
|
"subagent.start": { support: "native", native: "SubagentStart" },
|
|
23175
23187
|
"prompt.submit": { support: "native", native: "UserPromptSubmit" },
|
|
23176
|
-
"subagent.stop": { support: "
|
|
23188
|
+
"subagent.stop": { support: "native", native: "SubagentStop" },
|
|
23177
23189
|
"compact.pre": { support: "none", native: null },
|
|
23178
23190
|
stop: { support: "native", native: "Stop" }
|
|
23179
23191
|
},
|
package/dist/workit-hook.js
CHANGED
|
@@ -22955,7 +22955,8 @@ function handleHook(input, deps) {
|
|
|
22955
22955
|
const decision = decide(input, deps);
|
|
22956
22956
|
if (deps.descriptor.transport !== "hook-process" || !PRE_TOOL.has(input.event.kind) || decision.kind === "deny" || decision.kind === "ask")
|
|
22957
22957
|
return decision;
|
|
22958
|
-
const delta = standingDelta(input)
|
|
22958
|
+
const delta = [standingDelta(input), deps.budget?.line(input) ?? null].filter(Boolean).join(`
|
|
22959
|
+
`) || null;
|
|
22959
22960
|
if (!delta)
|
|
22960
22961
|
return decision;
|
|
22961
22962
|
return decision.kind === "rewrite" || decision.kind === "update-input" ? { ...decision, text: [decision.text, delta].filter(Boolean).join(`
|
|
@@ -23065,7 +23066,11 @@ function decide(input, deps) {
|
|
|
23065
23066
|
case "subagent.start":
|
|
23066
23067
|
if (workitRole(descriptor, event.agentType) === "judge")
|
|
23067
23068
|
trackJudge(input, event.agentId, true);
|
|
23068
|
-
seedStanding({
|
|
23069
|
+
seedStanding({
|
|
23070
|
+
...input,
|
|
23071
|
+
session: { ...input.session, agentId: event.agentId }
|
|
23072
|
+
});
|
|
23073
|
+
deps.budget?.start(input, event.agentId, event.agentType);
|
|
23069
23074
|
return {
|
|
23070
23075
|
kind: "context",
|
|
23071
23076
|
text: subagentStartText(input, descriptor, event)
|
|
@@ -23078,13 +23083,19 @@ function decide(input, deps) {
|
|
|
23078
23083
|
case "tool.pre":
|
|
23079
23084
|
if (event.skill)
|
|
23080
23085
|
recordSkillLoad(input, event.skill, "tool");
|
|
23081
|
-
if (event.agentInput && input.host === "claude_code")
|
|
23082
|
-
|
|
23086
|
+
if (event.agentInput && input.host === "claude_code") {
|
|
23087
|
+
const spawn = spawnDecision(descriptor, input.cwd, event.agentInput);
|
|
23088
|
+
if (spawn.kind !== "deny")
|
|
23089
|
+
deps.budget?.spawn(input, event.agentInput);
|
|
23090
|
+
return spawn;
|
|
23091
|
+
}
|
|
23083
23092
|
return NONE6;
|
|
23084
23093
|
case "stop":
|
|
23085
23094
|
return usable2(descriptor.events.stop.support) ? stopDecision(input, descriptor) : NONE6;
|
|
23086
23095
|
case "subagent.stop":
|
|
23087
23096
|
trackJudge(input, event.agentId, false);
|
|
23097
|
+
if (event.agentId)
|
|
23098
|
+
deps.budget?.stop(input, event.agentId);
|
|
23088
23099
|
return NONE6;
|
|
23089
23100
|
case "prompt.submit":
|
|
23090
23101
|
return NONE6;
|
|
@@ -23108,7 +23119,8 @@ var dispatchHook = (adapter, raw, env = process.env) => {
|
|
|
23108
23119
|
try {
|
|
23109
23120
|
const decision = handleHook(parsed.input, {
|
|
23110
23121
|
descriptor,
|
|
23111
|
-
addendum: adapter.addendum?.(parsed.input) ?? null
|
|
23122
|
+
addendum: adapter.addendum?.(parsed.input) ?? null,
|
|
23123
|
+
budget: adapter.budget
|
|
23112
23124
|
});
|
|
23113
23125
|
return { ...adapter.render(decision, parsed.native), error: null };
|
|
23114
23126
|
} catch (error) {
|
|
@@ -23241,7 +23253,7 @@ var CLAUDE_CODE_DESCRIPTOR = {
|
|
|
23241
23253
|
"shell.post": { support: "native", native: "PostToolUse" },
|
|
23242
23254
|
"subagent.start": { support: "native", native: "SubagentStart" },
|
|
23243
23255
|
"prompt.submit": { support: "native", native: "UserPromptSubmit" },
|
|
23244
|
-
"subagent.stop": { support: "
|
|
23256
|
+
"subagent.stop": { support: "native", native: "SubagentStop" },
|
|
23245
23257
|
"compact.pre": { support: "none", native: null },
|
|
23246
23258
|
stop: { support: "native", native: "Stop" }
|
|
23247
23259
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cursor",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.37.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Cursor plugin — shared MCP transport, native hooks, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"build": "bun scripts/build.ts"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@brainervirus/workit-core": "^8.
|
|
50
|
-
"@brainervirus/workit-mcp": "^8.
|
|
49
|
+
"@brainervirus/workit-core": "^8.37.0",
|
|
50
|
+
"@brainervirus/workit-mcp": "^8.37.0"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=24"
|
|
@@ -23,7 +23,7 @@ description: Build a requested change in small verified steps - follow local pat
|
|
|
23
23
|
(`workit check test`, plus `lint` and `typecheck` when the repo has them),
|
|
24
24
|
not after every edit. Heavy work runs under one machine-wide lease: an ad-hoc
|
|
25
25
|
suite is `workit check --heavy -- <cmd>`, never a hand-made flock; a busy
|
|
26
|
-
lease waits and names its holder (`workit lock status`).
|
|
26
|
+
lease waits and names its holder (`workit lock status`). A tool warning is a finding: fix it in this PR in the right layer, or record the false positive with evidence; pre-existing ones get their own PR.
|
|
27
27
|
5. Prove the feature on its real surface with the project's `verify-<app>`
|
|
28
28
|
skill; none yet? Write one (read the `workit-verify-app` skill's SKILL.md and follow it). Tests show branch behavior,
|
|
29
29
|
not that the feature works. The report carries what you observed: a UI
|
|
@@ -49,7 +49,7 @@ the same check. Fix round and recheck both failed: a decider (read the `workit-f
|
|
|
49
49
|
5. **CI.** Local gates mirror CI: push and continue; `workit ci wait` once on
|
|
50
50
|
the final head, in the background where the host allows. Red: read `logTail`, classify. Flake or infra: one
|
|
51
51
|
`workit ci rerun --failed --reason flake|infra` per head. Real: reproduce
|
|
52
|
-
with `workit check`, fix the root cause, batch every fix in one push.
|
|
52
|
+
with `workit check`, fix the root cause, batch every fix in one push. A tool warning is a finding: fix it in this PR in the right layer, or record the false positive with evidence; pre-existing ones get their own PR.
|
|
53
53
|
6. **Verified.** The lane in `workit pr status` decides: none, no verdict; self, your `--self` verdict; focused or full (or `verification: self|independent`), one non-author verifier per PR after the last push, never per push (read the `workit-review` skill's SKILL.md and follow it), on Claude Code with the `model` and `effort` of `workit models show --role verifier`. A docs-only push (or test-only under a unit verdict) keeps the verdict (`carried`); `reverify: focused` re-checks only the new diff, reusing green CI; one verdict at a stack's top covers its unchanged lower PRs. Land only when
|
|
54
54
|
granted: `workit stack land` or `workit pr merge`; `--unverified --reason` if user-asked.
|
|
55
55
|
7. **Observe it landed:** `workit verify-delivery pr` or `merge`. After a failed
|