@brainervirus/workit-cursor 2.4.0 → 2.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.
@@ -2,7 +2,7 @@
2
2
  "name": "workit",
3
3
  "displayName": "Workit",
4
4
  "description": "Adaptive Workit workflow with shared MCP tools and native Cursor hooks",
5
- "version": "2.4.0",
5
+ "version": "2.6.0",
6
6
  "author": {
7
7
  "name": "Cristhofer Pincetti"
8
8
  },
@@ -15453,10 +15453,7 @@ function handleHook(input, deps) {
15453
15453
  case "shell.pre":
15454
15454
  return usable2(descriptor.shellPolicy.deny) ? shellPolicy(input.cwd, event.command) : NONE2;
15455
15455
  case "subagent.start":
15456
- return {
15457
- kind: "context",
15458
- text: `Workit observed ${descriptor.label} subagent ${event.agentId} (${event.agentType}) as read-only/agent-guided; writer delegation is unavailable.`
15459
- };
15456
+ return { kind: "context", text: subagentStartText(input.host, descriptor, event) };
15460
15457
  case "compact.pre":
15461
15458
  return {
15462
15459
  kind: "notice",
@@ -15470,7 +15467,7 @@ function handleHook(input, deps) {
15470
15467
  return NONE2;
15471
15468
  }
15472
15469
  }
15473
- var usable2 = (value) => value === "native" || value === "partial", NONE2, offered, failureDecision = (descriptor, event, error) => {
15470
+ var usable2 = (value) => value === "native" || value === "partial", NONE2, offered, CLAUDE_WORKTREE_IMPLEMENTER = "workit:implementer", subagentStartText = (host, descriptor, event) => host === "claude_code" && event.agentType === CLAUDE_WORKTREE_IMPLEMENTER ? `Workit observed ${descriptor.label} subagent ${event.agentId} (${event.agentType}) working in its own git worktree: it may edit and commit there, within its brief's scope. Before the first commit, switch to a policy-compliant branch (\`git switch -c <type>/<slug>\`, e.g. feature/<slug>); branch policy hooks still deny protected or non-compliant branches. Never push, open a PR, or merge unless the brief asks for it.` : `Workit observed ${descriptor.label} subagent ${event.agentId} (${event.agentType}) as read-only/agent-guided; writer delegation is unavailable.`, failureDecision = (descriptor, event, error) => {
15474
15471
  if (event === "shell.pre" || event === "tool.pre")
15475
15472
  return descriptor.shellPolicy.failClosed ? { kind: "deny", reason: error, unblock: null } : NONE2;
15476
15473
  if (event === "session.start" || event === "subagent.start")
@@ -24973,10 +24973,13 @@ var redactSecrets = (value) => applyPatterns(value);
24973
24973
  import fs9 from "node:fs";
24974
24974
  import path12 from "node:path";
24975
24975
  import { spawnSync as spawnSync5 } from "node:child_process";
24976
+ // packages/workit-core/src/forge/pr-body.ts
24976
24977
  function parseGhIssue(value) {
24977
24978
  const m = /issues\/(\d+)/.exec(value);
24978
24979
  return m ? m[1] : String(value).trim().replace(/^#/, "");
24979
24980
  }
24981
+
24982
+ // packages/workit-core/src/core/pr-create.ts
24980
24983
  function whichOnPath(tool) {
24981
24984
  const names = process.platform === "win32" ? [tool, `${tool}.exe`, `${tool}.cmd`] : [tool];
24982
24985
  for (const dir of (process.env.PATH ?? "").split(path12.delimiter)) {
@@ -25876,6 +25879,37 @@ var fetchYouTrackIssueBody = async (issue, creds = youTrackToken, request = youT
25876
25879
  }
25877
25880
  };
25878
25881
 
25882
+ // packages/workit-core/src/forge/redact.ts
25883
+ var KEY = String.raw`[A-Za-z0-9_.-]*?(?:token|secret|password|passwd|pwd|api[_-]?key|access[_-]?key|account[_-]?key|private[_-]?key|client[_-]?secret|credentials?|authorization|cookie|signature)[A-Za-z0-9_.-]*`;
25884
+ var ASSIGNMENT = new RegExp(String.raw`(?<![A-Za-z0-9])(["']?${KEY}["']?\s*[:=]\s*["']?)((?:bearer|basic|token|digest)\s+)?([^\s"',;&]+)`, "giu");
25885
+ var QUOTED_ASSIGNMENT = new RegExp(String.raw`(?<![A-Za-z0-9])(["']?${KEY}["']?\s*[:=]\s*)(["'])([^"'\n]*[^\s"'][^"'\n]*)\2`, "giu");
25886
+ var ANSI = new RegExp(String.raw`\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007]*\u0007`, "gu");
25887
+
25888
+ // packages/workit-core/src/git/rev.ts
25889
+ var MAX_BUFFER = 256 * 1024 * 1024;
25890
+ var MAX_UNTRACKED_BYTES = 5 * 1024 * 1024;
25891
+
25892
+ // packages/workit-core/src/ledger.ts
25893
+ var PASSING = new Set(["verified", "tests-verified", "type-check-only"]);
25894
+ var FAILING = new Set(["failed", "blocked"]);
25895
+ var PR_ROW_TYPES = new Set(["pr.created", "pr.status", "pr.merged"]);
25896
+ var NETWORK_FS_TYPES = new Set([
25897
+ 26985,
25898
+ 20859,
25899
+ 4266872130,
25900
+ 4283649346,
25901
+ 1702057286,
25902
+ 1397113167,
25903
+ 12805120,
25904
+ 16914839,
25905
+ 1196443219,
25906
+ 198183888
25907
+ ]);
25908
+ var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
25909
+
25910
+ // packages/workit-core/src/git/ops.ts
25911
+ var COMMIT_TIMEOUT_MS = 10 * 60000;
25912
+
25879
25913
  // packages/workit-core/src/core/external-action-effects.ts
25880
25914
  var readExternalContext = async (root, payload) => {
25881
25915
  if (payload.range !== undefined && !isSafeContextRange(payload.range))
@@ -15421,6 +15421,8 @@ var shellPolicy = (cwd, command) => {
15421
15421
  var usable2 = (value) => value === "native" || value === "partial";
15422
15422
  var NONE2 = { kind: "none" };
15423
15423
  var offered = new Set;
15424
+ var CLAUDE_WORKTREE_IMPLEMENTER = "workit:implementer";
15425
+ var subagentStartText = (host, descriptor, event) => host === "claude_code" && event.agentType === CLAUDE_WORKTREE_IMPLEMENTER ? `Workit observed ${descriptor.label} subagent ${event.agentId} (${event.agentType}) working in its own git worktree: it may edit and commit there, within its brief's scope. Before the first commit, switch to a policy-compliant branch (\`git switch -c <type>/<slug>\`, e.g. feature/<slug>); branch policy hooks still deny protected or non-compliant branches. Never push, open a PR, or merge unless the brief asks for it.` : `Workit observed ${descriptor.label} subagent ${event.agentId} (${event.agentType}) as read-only/agent-guided; writer delegation is unavailable.`;
15424
15426
  function handleHook(input, deps) {
15425
15427
  const { descriptor } = deps;
15426
15428
  const event = input.event;
@@ -15446,10 +15448,7 @@ function handleHook(input, deps) {
15446
15448
  case "shell.pre":
15447
15449
  return usable2(descriptor.shellPolicy.deny) ? shellPolicy(input.cwd, event.command) : NONE2;
15448
15450
  case "subagent.start":
15449
- return {
15450
- kind: "context",
15451
- text: `Workit observed ${descriptor.label} subagent ${event.agentId} (${event.agentType}) as read-only/agent-guided; writer delegation is unavailable.`
15452
- };
15451
+ return { kind: "context", text: subagentStartText(input.host, descriptor, event) };
15453
15452
  case "compact.pre":
15454
15453
  return {
15455
15454
  kind: "notice",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin — shared MCP transport, native hooks, and fourteen method skills",
6
6
  "keywords": [
@@ -44,8 +44,8 @@
44
44
  "build": "bun scripts/build.ts"
45
45
  },
46
46
  "dependencies": {
47
- "@brainervirus/workit-core": "^2.4.0",
48
- "@brainervirus/workit-mcp": "^2.4.0"
47
+ "@brainervirus/workit-core": "^2.6.0",
48
+ "@brainervirus/workit-mcp": "^2.6.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=24"