@brainervirus/workit-cursor 2.0.1 → 2.0.2

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.0.1",
5
+ "version": "2.0.2",
6
6
  "author": {
7
7
  "name": "Cristhofer Pincetti"
8
8
  },
@@ -11941,7 +11941,8 @@ let imported decisions grant authority. Never turn a host deny into allow or
11941
11941
  claim enforcement/evidence a host cannot provide. A precise request with settled
11942
11942
  constraints does not need an interview. Present genuine unresolved options with
11943
11943
  evidence and a recommendation, then continue toward the requested delivery
11944
- endpoint: investigation, implementation, PR/MR-ready, merge, or release. Run
11944
+ endpoint: investigation, implementation, branch/commit/push, PR/MR-ready,
11945
+ merge, or release. Run
11945
11946
  applicable checks and safe repairs without repeated continuation questions;
11946
11947
  stop for missing host authority, a new consequential choice, a conflicting edit,
11947
11948
  or an unresolved blocker. A tracked record may close when actual evidence
@@ -11953,6 +11954,12 @@ confirm the stop. Preserve unresolved requirements, gaps, and uncertain workers.
11953
11954
  When context changes, distinguish a quick question, same-task adjustment, and
11954
11955
  separate request. Answer a quick question without pausing/resuming task state;
11955
11956
  park a concise checkpoint only when substantial work needs to continue later.
11957
+ For work spanning repositories, bind each unfinished item to its actual checkout,
11958
+ branch, requested deliverables, and delivery endpoint. Preserve held items with
11959
+ an explicit resume condition. Resolve competing plausible targets before a
11960
+ mutation; ask only when available context cannot settle that consequential choice.
11961
+ Before reporting delivery, reconcile every requested item and observe the actual
11962
+ target result; a local commit alone is not evidence of a requested remote push.
11956
11963
 
11957
11964
  Skill routing: slash aliases /wk-* load on demand. Use workit-steer for a
11958
11965
  substantial interruption or change of direction, workit-deslop when relevant
@@ -11998,11 +12005,18 @@ function reconcileResume(view, observations = []) {
11998
12005
  });
11999
12006
  }
12000
12007
  function compactTaskContext(view) {
12001
- const decisions = view.task.decisions.slice().sort((left, right) => left.id < right.id ? -1 : left.id > right.id ? 1 : 0).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
12008
+ const decisions = view.task.decisions.slice().sort((left, right) => {
12009
+ const leftAt = compactTimestamp(left.recordedAt);
12010
+ const rightAt = compactTimestamp(right.recordedAt);
12011
+ if (leftAt !== rightAt)
12012
+ return leftAt > rightAt ? -1 : 1;
12013
+ return left.id < right.id ? -1 : left.id > right.id ? 1 : 0;
12014
+ }).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
12002
12015
  id: entry.id,
12003
12016
  purpose: entry.data.purpose,
12004
12017
  status: entry.data.response,
12005
12018
  digest: entry.data.digest,
12019
+ choice: compactDecisionChoice(entry) || `task.inspect taskId=${view.task.id} view=full; decision=${entry.id}`,
12006
12020
  references: entry.data.binding.contentRefs.slice(0, 1).map(compactReference)
12007
12021
  }));
12008
12022
  const methods = view.task.policy ? selectMethods(view.task.policy, view.capabilities).map((method) => ({
@@ -12046,7 +12060,12 @@ var COMPACT_MAX_BYTES = 4096, COMPACT_MAX_ITEMS = 8, COMPACT_TEXT_BYTES = 128, s
12046
12060
  return `${match.slice(0, separator)}=<redacted>`;
12047
12061
  const space = match.search(/\s/u);
12048
12062
  return `${match.slice(0, space)} <redacted>`;
12049
- }).slice(0, limit), compactBytes = (value) => new TextEncoder().encode(value).byteLength, compactReference = (ref) => {
12063
+ }).slice(0, limit), compactBytes = (value) => new TextEncoder().encode(value).byteLength, compactTimestamp = (value) => `${value.slice(0, 19)}.${value.slice(20, -1).padEnd(9, "0")}`, compactDecisionChoice = (entry) => {
12064
+ const stated = entry.data.binding.statedChoice?.text;
12065
+ const approved = entry.data.response === "approved" ? entry.data.binding.approvedContent : "";
12066
+ const source = stated?.trim() || approved.trim() || null;
12067
+ return compactText(source, COMPACT_TEXT_BYTES);
12068
+ }, compactReference = (ref) => {
12050
12069
  if (ref.kind === "file")
12051
12070
  return {
12052
12071
  kind: "file",
@@ -11882,7 +11882,8 @@ let imported decisions grant authority. Never turn a host deny into allow or
11882
11882
  claim enforcement/evidence a host cannot provide. A precise request with settled
11883
11883
  constraints does not need an interview. Present genuine unresolved options with
11884
11884
  evidence and a recommendation, then continue toward the requested delivery
11885
- endpoint: investigation, implementation, PR/MR-ready, merge, or release. Run
11885
+ endpoint: investigation, implementation, branch/commit/push, PR/MR-ready,
11886
+ merge, or release. Run
11886
11887
  applicable checks and safe repairs without repeated continuation questions;
11887
11888
  stop for missing host authority, a new consequential choice, a conflicting edit,
11888
11889
  or an unresolved blocker. A tracked record may close when actual evidence
@@ -11894,6 +11895,12 @@ confirm the stop. Preserve unresolved requirements, gaps, and uncertain workers.
11894
11895
  When context changes, distinguish a quick question, same-task adjustment, and
11895
11896
  separate request. Answer a quick question without pausing/resuming task state;
11896
11897
  park a concise checkpoint only when substantial work needs to continue later.
11898
+ For work spanning repositories, bind each unfinished item to its actual checkout,
11899
+ branch, requested deliverables, and delivery endpoint. Preserve held items with
11900
+ an explicit resume condition. Resolve competing plausible targets before a
11901
+ mutation; ask only when available context cannot settle that consequential choice.
11902
+ Before reporting delivery, reconcile every requested item and observe the actual
11903
+ target result; a local commit alone is not evidence of a requested remote push.
11897
11904
 
11898
11905
  Skill routing: slash aliases /wk-* load on demand. Use workit-steer for a
11899
11906
  substantial interruption or change of direction, workit-deslop when relevant
@@ -11940,6 +11947,13 @@ var compactText = (value, limit) => value === null ? null : value.replace(privat
11940
11947
  return `${match.slice(0, space)} <redacted>`;
11941
11948
  }).slice(0, limit);
11942
11949
  var compactBytes = (value) => new TextEncoder().encode(value).byteLength;
11950
+ var compactTimestamp = (value) => `${value.slice(0, 19)}.${value.slice(20, -1).padEnd(9, "0")}`;
11951
+ var compactDecisionChoice = (entry) => {
11952
+ const stated = entry.data.binding.statedChoice?.text;
11953
+ const approved = entry.data.response === "approved" ? entry.data.binding.approvedContent : "";
11954
+ const source = stated?.trim() || approved.trim() || null;
11955
+ return compactText(source, COMPACT_TEXT_BYTES);
11956
+ };
11943
11957
  var compactReference = (ref) => {
11944
11958
  if (ref.kind === "file")
11945
11959
  return {
@@ -11955,11 +11969,18 @@ var compactReference = (ref) => {
11955
11969
  return { kind: ref.kind };
11956
11970
  };
11957
11971
  function compactTaskContext(view) {
11958
- const decisions = view.task.decisions.slice().sort((left, right) => left.id < right.id ? -1 : left.id > right.id ? 1 : 0).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
11972
+ const decisions = view.task.decisions.slice().sort((left, right) => {
11973
+ const leftAt = compactTimestamp(left.recordedAt);
11974
+ const rightAt = compactTimestamp(right.recordedAt);
11975
+ if (leftAt !== rightAt)
11976
+ return leftAt > rightAt ? -1 : 1;
11977
+ return left.id < right.id ? -1 : left.id > right.id ? 1 : 0;
11978
+ }).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
11959
11979
  id: entry.id,
11960
11980
  purpose: entry.data.purpose,
11961
11981
  status: entry.data.response,
11962
11982
  digest: entry.data.digest,
11983
+ choice: compactDecisionChoice(entry) || `task.inspect taskId=${view.task.id} view=full; decision=${entry.id}`,
11963
11984
  references: entry.data.binding.contentRefs.slice(0, 1).map(compactReference)
11964
11985
  }));
11965
11986
  const methods = view.task.policy ? selectMethods(view.task.policy, view.capabilities).map((method) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
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.0.1",
48
- "@brainervirus/workit-mcp": "^2.0.1"
47
+ "@brainervirus/workit-core": "^2.0.2",
48
+ "@brainervirus/workit-mcp": "^2.0.2"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=24"
@@ -22,6 +22,14 @@ request, and a timeout is not proof that a worker stopped.
22
22
  until process exit or explicit recovery.
23
23
  4. Reconcile helper reports and run the checks appropriate to the requested
24
24
  outcome. If delegation is unavailable, continue inline when useful.
25
+ 5. Before a cross-repo mutation, resolve the actual checkout, branch and remote
26
+ from the request and current context. Ask only if competing plausible targets
27
+ remain unresolved. Branch, commit, direct push, PR-ready, merge and release
28
+ are distinct endpoints; perform only the authorized one under target rules.
29
+ Before saying done, reconcile every named deliverable against that checkout
30
+ and verify the requested result. For a push, observe the destination remote
31
+ ref and confirm it contains the delivered commit; report drift or missing
32
+ items as blockers instead of treating local success as remote delivery.
25
33
 
26
34
  Do not edit Workit metadata directly, create nested helper trees, widen paths, or
27
35
  create a second lifecycle. Read-only investigation and bounded reports do not
@@ -18,7 +18,11 @@ request. Preserve continuity when it helps; do not manufacture task mutations.
18
18
  3. For a separate request, do not silently resume an old objective. Park a
19
19
  concise checkpoint only when substantial work needs to continue later. Start
20
20
  a distinct tracked record only if the new work benefits from continuity,
21
- dependencies, coordination, or durable decisions.
21
+ dependencies, coordination, or durable decisions. For work spanning repos,
22
+ checkpoint each unfinished item with its checkout, branch, requested
23
+ deliverables, and delivery endpoint. Keep explicitly held items parked with
24
+ their resume condition until the user resumes them. A conversational
25
+ checkpoint is sufficient when no task record is needed.
22
26
  4. Before resuming a named tracked task, reconcile its checkout, branch, dirty
23
27
  state, current policy, stale evidence, uncertain effects, and ownership. Do
24
28
  not change branches, stash, fetch large histories, or seize ownership just