@brainervirus/workit-core 1.0.6 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-core",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "private": false,
5
5
  "description": "Workit shared core — task, policy, evidence, review, decision, worker, and writer state for agentic coding workflows",
6
6
  "keywords": [
@@ -3,4 +3,4 @@
3
3
  # Launch the published package's MCP bin through npx, never a repo-relative
4
4
  # dist or share clone; a startup/network failure surfaces via npx's nonzero exit.
5
5
  set -euo pipefail
6
- exec npx -y --prefer-online --package=@brainervirus/workit-cursor@latest workit-cursor-mcp "$@"
6
+ exec npx -y --prefer-online --min-release-age=0 --package=@brainervirus/workit-cursor@latest workit-cursor-mcp "$@"
@@ -235,8 +235,9 @@ export const detectCursorLatest = (cursorMcp: string): boolean => {
235
235
  return (
236
236
  server.args[0] === "-y" &&
237
237
  server.args[1] === "--prefer-online" &&
238
- server.args[2] === `--package=${CURSOR_RUNTIME_PACKAGE}` &&
239
- server.args[3] === "workit-cursor-mcp"
238
+ server.args[2] === "--min-release-age=0" &&
239
+ server.args[3] === `--package=${CURSOR_RUNTIME_PACKAGE}` &&
240
+ server.args[4] === "workit-cursor-mcp"
240
241
  );
241
242
  } catch {
242
243
  return false;
@@ -531,7 +531,8 @@ const registeredCursorLauncher = (res: Resolved): CursorLauncher | null | "inval
531
531
  // offline doctor validates its shape (never the registry reachability).
532
532
  // Exact positional tokens — a substring match would accept `@latest-alpha`
533
533
  // or `workit-cursor-mcp-foo`, and any extra/missing token would weaken the
534
- // freshness guarantee (`--prefer-online` is mandatory).
534
+ // freshness guarantee (`--prefer-online` and the npm release-age workaround
535
+ // are mandatory).
535
536
  const canonical = cursorMcpServerEntry("").args;
536
537
  if (executable === "npx" || executable === "npx.exe" || executable === "npx.cmd") {
537
538
  if (args.length !== canonical.length || args.some((a, i) => a !== canonical[i]))
@@ -820,7 +820,7 @@ export const resolveExternalActionRequest = (
820
820
  if (preview.error) return failure("invalid_input", preview.error);
821
821
  const target = String(preview.path);
822
822
  const relative =
823
- path.relative(path.resolve(root), target).replaceAll(path.sep, "/") || "CHANGELOG.md";
823
+ path.relative(fs.realpathSync(root), target).replaceAll(path.sep, "/") || "CHANGELOG.md";
824
824
  const normalized = {
825
825
  operation: request.operation,
826
826
  payload: {
@@ -524,7 +524,7 @@ export async function runAuthorizedExternalAction<T>(
524
524
  (contract.details as Record<string, unknown>).outcome === "not_started";
525
525
  const outcome = input.failureOutcome ?? (preflight ? "not_started" : "unknown");
526
526
  const settled = settleWithRefresh(outcome, settle(outcome));
527
- if (!settled.ok && outcome === "unknown") return settled as ExternalActionResult<T>;
527
+ if (!settled.ok) return settled as ExternalActionResult<T>;
528
528
  return contract;
529
529
  }
530
530
  effectValue = contract.data;
@@ -206,8 +206,8 @@ export function mergeCursorHooks(
206
206
  * Canonical selector for the Cursor npm runtime: `@latest` with `--prefer-online`
207
207
  * (README "Update review"). The single source for every source-derived Cursor
208
208
  * runtime selector; the committed manifests keep the literal (static data
209
- * cannot import TS). `--prefer-online` is mandatory — it forces npx to check
210
- * the registry so a stale cached `latest` resolution is never reused.
209
+ * cannot import TS). `--min-release-age=0` works around npm/cli#9765, where
210
+ * npx ignores the user's scoped release-age exclusion.
211
211
  */
212
212
  export const CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@latest";
213
213
 
@@ -215,7 +215,7 @@ export const CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@latest";
215
215
  * Canonical Cursor hook launcher (single source of truth for the shipped
216
216
  * hooks-cursor.json, the installer merge, and the doctor drift check).
217
217
  */
218
- export const CURSOR_HOOK_RUN_COMMAND = `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-hook`;
218
+ export const CURSOR_HOOK_RUN_COMMAND = `npx -y --prefer-online --min-release-age=0 --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-hook`;
219
219
 
220
220
  /**
221
221
  * preToolUse matcher covering every name the hook's write-tool guard treats
@@ -270,6 +270,7 @@ export function cursorMcpServerEntry(_packageDir: string): {
270
270
  args: [
271
271
  "-y",
272
272
  "--prefer-online",
273
+ "--min-release-age=0",
273
274
  `--package=${CURSOR_RUNTIME_PACKAGE}`,
274
275
  "workit-cursor-mcp",
275
276
  "${workspaceFolder}",
@@ -286,7 +287,7 @@ export function cursorHooksEntry(_packageDir: string): {
286
287
  args: string[];
287
288
  } {
288
289
  return {
289
- command: `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
290
+ command: `npx -y --prefer-online --min-release-age=0 --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
290
291
  args: [],
291
292
  };
292
293
  }