@brainervirus/workit-opencode 1.0.5 → 1.0.7

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.
Files changed (2) hide show
  1. package/dist/plugin.js +9 -7
  2. package/package.json +2 -2
package/dist/plugin.js CHANGED
@@ -10275,10 +10275,9 @@ function evaluateRequirements(task, workspace, capabilities, candidate, checkout
10275
10275
  if (requirement.dimension !== "review")
10276
10276
  return true;
10277
10277
  const reviewSession = sessionFromRef(entry.data.reviewContext);
10278
- const implementationSession = sessionFromRef(task.intent.provenance.session);
10279
- const sameImplementation = sameSession(reviewSession, implementationSession);
10278
+ const sameImplementation = sameSession(reviewSession, task.intent.provenance.session);
10280
10279
  const sameEvidenceSession = task.evidence.some((other) => other.id !== entry.id && sameSession(reviewSession, other.provenance.session));
10281
- return entry.data.kind === "review" && reviewSession !== null && sameSession(reviewSession, entry.provenance.session) && !sameImplementation && !sameEvidenceSession;
10280
+ return entry.data.kind === "review" && reviewSession !== null && sameSession(reviewSession, entry.provenance.session) && (requirement.ruleId === "self-review" || !sameImplementation && !sameEvidenceSession);
10282
10281
  });
10283
10282
  if (passed.length) {
10284
10283
  const withRed = requirement.dimension === "testing" ? passed.filter(({ entry }) => related.some((other) => other.entry.data.kind === "check" && other.evaluation.status === "failed" && other.entry.data.requirementIds.includes(requirement.id) && other.entry.recordedAt <= entry.recordedAt)) : passed;
@@ -10505,6 +10504,9 @@ revisions, policy.assess {assessment: {facts, signals, consequences,
10505
10504
  verification}} where facts are inferred or observed with file refs,
10506
10505
  writer.acquire {taskId} before product writes, evidence.record {evidence} where
10507
10506
  check and review kinds auto-bind the current tree and need no digests. Record
10507
+ self-review requirements with kind review and reviewContext matching your own
10508
+ host session; the lead may also record checks. Fresh-context review requires a
10509
+ session distinct from the task creator and every other evidence recorder. Record
10508
10510
  verification evidence last: later evidence or commits can reopen fixed findings
10509
10511
  for re-verification, so verify, resolve, then close with nothing in between.
10510
10512
  decision.record {binding with taskId/workspaceId from inspect plus presented and
@@ -10794,7 +10796,7 @@ async function runAuthorizedExternalAction(input, effect) {
10794
10796
  const preflight = typeof contract.details === "object" && contract.details !== null && contract.details.outcome === "not_started";
10795
10797
  const outcome = input.failureOutcome ?? (preflight ? "not_started" : "unknown");
10796
10798
  const settled = settleWithRefresh(outcome, settle(outcome));
10797
- if (!settled.ok && outcome === "unknown")
10799
+ if (!settled.ok)
10798
10800
  return settled;
10799
10801
  return contract;
10800
10802
  }
@@ -28306,10 +28308,10 @@ var detectBranchPolicy = (workspaceRoot) => {
28306
28308
 
28307
28309
  // packages/workit-core/src/core/registration.ts
28308
28310
  var CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@latest";
28309
- var CURSOR_HOOK_RUN_COMMAND = `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-hook`;
28311
+ var CURSOR_HOOK_RUN_COMMAND = `npx -y --prefer-online --min-release-age=0 --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-hook`;
28310
28312
  function cursorHooksEntry(_packageDir) {
28311
28313
  return {
28312
- command: `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
28314
+ command: `npx -y --prefer-online --min-release-age=0 --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
28313
28315
  args: []
28314
28316
  };
28315
28317
  }
@@ -30787,7 +30789,7 @@ var resolveExternalActionRequest = (root, request, preservedDateMs) => {
30787
30789
  if (preview.error)
30788
30790
  return failure("invalid_input", preview.error);
30789
30791
  const target = String(preview.path);
30790
- const relative = path23.relative(path23.resolve(root), target).replaceAll(path23.sep, "/") || "CHANGELOG.md";
30792
+ const relative = path23.relative(fs13.realpathSync(root), target).replaceAll(path23.sep, "/") || "CHANGELOG.md";
30791
30793
  const normalized = {
30792
30794
  operation: request.operation,
30793
30795
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-opencode",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and fourteen method skills",
6
6
  "keywords": [
@@ -38,7 +38,7 @@
38
38
  "typecheck": "tsc --noEmit"
39
39
  },
40
40
  "dependencies": {
41
- "@brainervirus/workit-core": "^1.0.5"
41
+ "@brainervirus/workit-core": "^1.0.7"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@opencode-ai/plugin": "1.18.30"