@brainervirus/workit-cli 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 (3) hide show
  1. package/README.md +5 -0
  2. package/dist/index.js +22 -18
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -34,6 +34,11 @@ workit # help
34
34
 
35
35
  `workit init` guides you through: platform selection (OpenCode/Cursor), global config (locale, timezone, branch policy), YouTrack, VCS, workspaces (path globs → provider), and project hygiene files. The wizard is a TTY application — `workit init` requires an interactive terminal and prints guidance (exiting nonzero) when stdin is not a TTY.
36
36
 
37
+ The platforms step also always lists Codex and Pi with their detected/configured
38
+ status and separate setup instructions. Init registers only OpenCode/Cursor;
39
+ Codex uses plugin/hooks setup and Pi uses `pi install @brainervirus/workit-pi`.
40
+ Use `workit cutover` for legacy migration.
41
+
37
42
  `workit doctor` checks the offline installation health and exits nonzero when problems are found; `--json` prints the full report as JSON instead of the human-readable table.
38
43
 
39
44
  The task surface exposes the eight shared operation families (`task`, `policy`,
package/dist/index.js CHANGED
@@ -43220,7 +43220,7 @@ function mergeCursorMcp(mcp, serverName, server) {
43220
43220
  return { config: base, changed };
43221
43221
  }
43222
43222
  var CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@latest";
43223
- var CURSOR_HOOK_RUN_COMMAND = `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-hook`;
43223
+ var CURSOR_HOOK_RUN_COMMAND = `npx -y --prefer-online --min-release-age=0 --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-hook`;
43224
43224
  var CURSOR_PRETOOLUSE_MATCHER = "Write|Edit|Delete|Shell|Remove|ApplyPatch|Apply_Patch|Patch|Rename|Mkdir|Mv|Cp|Touch";
43225
43225
  var canonicalHookEntry = (event) => event === "preToolUse" ? { command: CURSOR_HOOK_RUN_COMMAND, matcher: CURSOR_PRETOOLUSE_MATCHER, failClosed: true } : { command: CURSOR_HOOK_RUN_COMMAND, failClosed: true };
43226
43226
  function cursorHookDrift(installed) {
@@ -43245,6 +43245,7 @@ function cursorMcpServerEntry(_packageDir) {
43245
43245
  args: [
43246
43246
  "-y",
43247
43247
  "--prefer-online",
43248
+ "--min-release-age=0",
43248
43249
  `--package=${CURSOR_RUNTIME_PACKAGE}`,
43249
43250
  "workit-cursor-mcp",
43250
43251
  "${workspaceFolder}"
@@ -43253,7 +43254,7 @@ function cursorMcpServerEntry(_packageDir) {
43253
43254
  }
43254
43255
  function cursorHooksEntry(_packageDir) {
43255
43256
  return {
43256
- command: `npx -y --prefer-online --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
43257
+ command: `npx -y --prefer-online --min-release-age=0 --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
43257
43258
  args: []
43258
43259
  };
43259
43260
  }
@@ -54998,9 +54999,12 @@ function platformOptions(detection) {
54998
54999
  return { label: `${label}${tag}`, value };
54999
55000
  });
55000
55001
  }
55001
- var EXTERNAL_HOST_LABELS = { codex: "Codex", pi: "Pi" };
55002
- function externalDetectedHosts(detection) {
55003
- return Object.keys(EXTERNAL_HOST_LABELS).filter((host) => detection[host].detected).map((host) => EXTERNAL_HOST_LABELS[host]);
55002
+ function externalHostGuidance(detection) {
55003
+ return ["codex", "pi"].map((host) => {
55004
+ const found = detection[host];
55005
+ const status = found.configured ? "already configured" : found.detected ? "detected" : "not detected";
55006
+ return host === "codex" ? `Codex · ${status} — plugin/hooks setup: https://github.com/BrainerVirus/workit#readme (Codex CLI / desktop)` : `Pi · ${status} — install separately: pi install @brainervirus/workit-pi`;
55007
+ });
55004
55008
  }
55005
55009
  var BRANCH_PRESETS = [
55006
55010
  { label: "GitFlow", value: "gitflow" },
@@ -55376,7 +55380,6 @@ function Screen({
55376
55380
  detection = emptyDetection(),
55377
55381
  onSearchQueryChange
55378
55382
  }) {
55379
- const externalDetected = externalDetectedHosts(detection);
55380
55383
  switch (draft.screen) {
55381
55384
  case "platforms":
55382
55385
  return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
@@ -55387,6 +55390,9 @@ function Screen({
55387
55390
  bold: true,
55388
55391
  children: "Step 1 — Platforms"
55389
55392
  }, undefined, false, undefined, this),
55393
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
55394
+ children: "This wizard configures OpenCode and Cursor only."
55395
+ }, undefined, false, undefined, this),
55390
55396
  /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
55391
55397
  dimColor: true,
55392
55398
  children: "Select the tools to configure (space to toggle):"
@@ -55400,14 +55406,13 @@ function Screen({
55400
55406
  dispatch({ type: "next" });
55401
55407
  }
55402
55408
  }, undefined, false, undefined, this),
55403
- externalDetected.length > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
55409
+ externalHostGuidance(detection).map((guidance) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
55410
+ children: guidance
55411
+ }, guidance, false, undefined, this)),
55412
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
55404
55413
  dimColor: true,
55405
- children: [
55406
- "Detected: ",
55407
- externalDetected.join(", "),
55408
- " — set up via `workit cutover`."
55409
- ]
55410
- }, undefined, true, undefined, this),
55414
+ children: "For legacy installations, use `workit cutover` to preview migration."
55415
+ }, undefined, false, undefined, this),
55411
55416
  draft.errors.platforms && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
55412
55417
  color: "red",
55413
55418
  children: draft.errors.platforms
@@ -58816,10 +58821,9 @@ function evaluateRequirements(task, workspace, capabilities, candidate, checkout
58816
58821
  if (requirement.dimension !== "review")
58817
58822
  return true;
58818
58823
  const reviewSession = sessionFromRef(entry.data.reviewContext);
58819
- const implementationSession = sessionFromRef(task.intent.provenance.session);
58820
- const sameImplementation = sameSession(reviewSession, implementationSession);
58824
+ const sameImplementation = sameSession(reviewSession, task.intent.provenance.session);
58821
58825
  const sameEvidenceSession = task.evidence.some((other) => other.id !== entry.id && sameSession(reviewSession, other.provenance.session));
58822
- return entry.data.kind === "review" && reviewSession !== null && sameSession(reviewSession, entry.provenance.session) && !sameImplementation && !sameEvidenceSession;
58826
+ return entry.data.kind === "review" && reviewSession !== null && sameSession(reviewSession, entry.provenance.session) && (requirement.ruleId === "self-review" || !sameImplementation && !sameEvidenceSession);
58823
58827
  });
58824
58828
  if (passed.length) {
58825
58829
  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;
@@ -59275,7 +59279,7 @@ async function runAuthorizedExternalAction(input, effect) {
59275
59279
  const preflight = typeof contract.details === "object" && contract.details !== null && contract.details.outcome === "not_started";
59276
59280
  const outcome = input.failureOutcome ?? (preflight ? "not_started" : "unknown");
59277
59281
  const settled = settleWithRefresh(outcome, settle(outcome));
59278
- if (!settled.ok && outcome === "unknown")
59282
+ if (!settled.ok)
59279
59283
  return settled;
59280
59284
  return contract;
59281
59285
  }
@@ -64322,7 +64326,7 @@ var resolveExternalActionRequest = (root, request, preservedDateMs) => {
64322
64326
  if (preview.error)
64323
64327
  return failure("invalid_input", preview.error);
64324
64328
  const target = String(preview.path);
64325
- const relative = path28.relative(path28.resolve(root), target).replaceAll(path28.sep, "/") || "CHANGELOG.md";
64329
+ const relative = path28.relative(fs14.realpathSync(root), target).replaceAll(path28.sep, "/") || "CHANGELOG.md";
64326
64330
  const normalized = {
64327
64331
  operation: request.operation,
64328
64332
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "private": false,
5
5
  "description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
6
6
  "keywords": [
@@ -37,9 +37,9 @@
37
37
  "typecheck": "tsc --noEmit"
38
38
  },
39
39
  "dependencies": {
40
- "@brainervirus/workit-core": "^1.0.5",
41
- "@brainervirus/workit-cursor": "^1.0.5",
42
- "@brainervirus/workit-opencode": "^1.0.5",
40
+ "@brainervirus/workit-core": "^1.0.7",
41
+ "@brainervirus/workit-cursor": "^1.0.7",
42
+ "@brainervirus/workit-opencode": "^1.0.7",
43
43
  "@inkjs/ui": "2.0.0",
44
44
  "ink": "7.1.1",
45
45
  "react": "19.2.8"