@brainervirus/workit-cursor 0.8.0 → 0.8.1

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": "OpenCode-style verify, PR, changelog, commit, and session handoff for Cursor",
5
- "version": "0.8.0",
5
+ "version": "0.8.1",
6
6
  "author": {
7
7
  "name": "Cristhofer Pincetti"
8
8
  },
package/README.md CHANGED
@@ -23,7 +23,7 @@ npx @brainervirus/workit-cli init
23
23
  "command": "npx",
24
24
  "args": [
25
25
  "-y",
26
- "--package=@brainervirus/workit-cursor@latest",
26
+ "--package=@brainervirus/workit-cursor@0.8.0",
27
27
  "workit-cursor-mcp",
28
28
  "${workspaceFolder}"
29
29
  ]
@@ -35,7 +35,7 @@ npx @brainervirus/workit-cli init
35
35
  ### Requirements
36
36
 
37
37
  - **Node.js ≥ 22** — the MCP server and session-start hook are self-contained Node bundles invoked through `npx`.
38
- - **Network** — `npx -y …@latest` resolves and downloads the package on first run in each environment; a machine that cannot reach the npm registry cannot start the MCP server or hook (see [Runtime](#runtime)).
38
+ - **Network** — `npx -y …@0.8.0` resolves and downloads the package on first run in each environment; a machine that cannot reach the npm registry cannot start the MCP server or hook (see [Runtime](#runtime)).
39
39
 
40
40
  ## What it provides
41
41
 
@@ -59,11 +59,11 @@ Cursor adapts workit through policy-only confirmation: approvals and commits are
59
59
 
60
60
  Cursor launches the MCP server and session-start hook through `npx`, so the shipped manifests contain no repository-relative `dist` paths:
61
61
 
62
- - **MCP server** — `npx -y --package=@brainervirus/workit-cursor@latest workit-cursor-mcp ${workspaceFolder}`. It speaks the MCP stdio protocol; `stdout` is reserved for protocol messages and diagnostics go to `stderr`.
63
- - **Session-start hook** — `npx -y --package=@brainervirus/workit-cursor@latest workit-cursor-session-start`. It emits valid hook output and a diagnostic on runtime failure, and remains fail-open where Cursor's hook contract requires startup continuity.
62
+ - **MCP server** — `npx -y --package=@brainervirus/workit-cursor@0.8.0 workit-cursor-mcp ${workspaceFolder}`. It speaks the MCP stdio protocol; `stdout` is reserved for protocol messages and diagnostics go to `stderr`.
63
+ - **Session-start hook** — `npx -y --package=@brainervirus/workit-cursor@0.8.0 workit-cursor-session-start`. It emits valid hook output and a diagnostic on runtime failure, and remains fail-open where Cursor's hook contract requires startup continuity.
64
64
  - `npx` startup or network failure is surfaced by Cursor as an MCP/hook startup failure; Workit never silently substitutes stale local runtime code.
65
65
 
66
- The `@latest` tag means the runtime updates independently of the Marketplace metadata: Cursor reviews plugin metadata from Git, while npm serves the runtime. See [Update review](#update-review).
66
+ The runtime runs from the exact reviewed pin `@0.8.0`: Cursor reviews plugin metadata from Git, while npm serves the pinned runtime. Bumping the pin is a deliberate reviewed update, made only after the target npm version is public — never a mutable `latest` dist-tag. See [Update review](#update-review).
67
67
 
68
68
  ## Security and data handling
69
69
 
@@ -96,7 +96,7 @@ The repository root carries `.cursor-plugin/marketplace.json`, indexing `package
96
96
 
97
97
  - **Installing from Marketplace** — a Marketplace admin adds the repository URL through Cursor's authenticated publisher flow; end users then install the plugin from the Cursor Marketplace UI, which reads `.cursor-plugin/plugin.json` and the tracked components directly from Git.
98
98
  - **Submission** — Marketplace submission is a separate, later authenticated action at `https://cursor.com/marketplace/publish`. It is **not** performed here and no publication or acceptance is claimed; the repository is kept validated and submission-ready.
99
- - **Update review** — Git plugin metadata (manifest, rules, skills, assets) is reviewed by Cursor on Marketplace updates, while the npm runtime tagged `@latest` updates independently. Reviewing an npm runtime change is a manual step: pin `--package=@brainervirus/workit-cursor@<version>` in `mcp.json` / `hooks-cursor.json` if you need immutable reviewed code instead of `@latest`.
99
+ - **Update review** — Git plugin metadata (manifest, rules, skills, assets) is reviewed by Cursor on Marketplace updates, while the npm runtime is pinned to the exact reviewed `@0.8.0`. Bumping that pin in `mcp.json` / `hooks-cursor.json` is a deliberate reviewed change: only after the target npm version is public, never a mutable `latest` dist-tag.
100
100
  - **Troubleshooting** — `workit doctor` (or the `workflow_doctor` tool) reports installation health including runtime, token, VCS/YouTrack, and log-writability checks; it exits nonzero on failure. An MCP/hook startup failure with no network is an `npx`/registry reachability issue, not a Workit defect.
101
101
 
102
102
  ## Docs
@@ -21839,7 +21839,13 @@ function isWorkitPlugin(value) {
21839
21839
  const pkgPath = s.includes("/packages/workit-opencode/") || s.includes("/packages/workit-cursor/") || s.includes("/node_modules/@brainervirus/workit-opencode/") || s.includes("/node_modules/@brainervirus/workit-cursor/");
21840
21840
  return named(s, "workflow-toolkit") || named(s, "workflow-toolkit-opencode") || named(s, "local/workflow-toolkit") || named(s, "workit") || named(s, "local/workit") || named(s, "@brainervirus/workit-opencode") || named(s, "@brainervirus/workit-cursor") || url && pkgPath || s.startsWith("git+file://") && s.includes("workflow-toolkit");
21841
21841
  }
21842
- var named = (s, name) => s === name || s.startsWith(`${name}@`);
21842
+ function cursorHooksEntry(_packageDir) {
21843
+ return {
21844
+ command: `npx -y --package=${CURSOR_RUNTIME_PACKAGE} workit-cursor-session-start`,
21845
+ args: []
21846
+ };
21847
+ }
21848
+ var named = (s, name) => s === name || s.startsWith(`${name}@`), CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@0.8.0";
21843
21849
  var init_registration = () => {};
21844
21850
 
21845
21851
  // packages/workit-core/src/core/skill-manifests.ts
@@ -22183,7 +22189,7 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
22183
22189
  if (executable === "npx" || executable === "npx.exe" || executable === "npx.cmd") {
22184
22190
  if (args[0] !== "-y")
22185
22191
  return "invalid";
22186
- if (args[1] !== "--package=@brainervirus/workit-cursor@latest")
22192
+ if (args[1] !== `--package=${CURSOR_RUNTIME_PACKAGE}`)
22187
22193
  return "invalid";
22188
22194
  if (args[2] !== "workit-cursor-mcp")
22189
22195
  return "invalid";
@@ -22196,6 +22202,20 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
22196
22202
  runtime: command,
22197
22203
  entry: path9.isAbsolute(args[0]) ? args[0] : path9.resolve(path9.dirname(res.cursorMcp), args[0])
22198
22204
  };
22205
+ }, canonicalCursorHook, registeredCursorHook = (res) => {
22206
+ const hooksFile = path9.join(res.cursorPluginDir, "hooks", "hooks-cursor.json");
22207
+ if (!existsSync5(hooksFile))
22208
+ return "invalid";
22209
+ const config2 = readJson(hooksFile);
22210
+ if (!config2)
22211
+ return "invalid";
22212
+ const sessionStart = config2.hooks?.sessionStart;
22213
+ if (!Array.isArray(sessionStart) || sessionStart.length !== 1)
22214
+ return "invalid";
22215
+ const entry = sessionStart[0];
22216
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry))
22217
+ return "invalid";
22218
+ return typeof entry.command === "string" ? entry.command : "invalid";
22199
22219
  }, checkLauncher = (res) => {
22200
22220
  const dev = res.dev;
22201
22221
  const hosts = hostsFor(res.host);
@@ -22208,6 +22228,12 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
22208
22228
  } else if (registered && registered.kind === "node" && !validNodeEntry(registered.entry, registered.runtime, res.env)) {
22209
22229
  missing.push(`cursor: registered ${registered.entry}`);
22210
22230
  }
22231
+ const hook = registeredCursorHook(res);
22232
+ if (hook === "invalid") {
22233
+ missing.push(`cursor: canonical session-start hook in ${path9.join(res.cursorPluginDir, "hooks", "hooks-cursor.json")}`);
22234
+ } else if (hook !== null && hook !== canonicalCursorHook) {
22235
+ missing.push(`cursor: canonical session-start hook in ${path9.join(res.cursorPluginDir, "hooks", "hooks-cursor.json")} (registered ${hook})`);
22236
+ }
22211
22237
  }
22212
22238
  if (dev) {
22213
22239
  missing.push(...hosts.filter((h) => h !== "cursor").flatMap((h) => launcherSlotsFor(h, dev).filter((slot) => !slot.some((p) => existsSync5(p))).map((slot) => `${h}: ${slot.join(" or ")}`)));
@@ -22493,6 +22519,7 @@ var init_doctor = __esm(() => {
22493
22519
  init_registration();
22494
22520
  init_workspaces();
22495
22521
  init_skill_manifests();
22522
+ canonicalCursorHook = cursorHooksEntry("").command;
22496
22523
  RUN_CHECKS = [
22497
22524
  checkRuntime,
22498
22525
  checkVersions,
@@ -3,7 +3,7 @@
3
3
  "hooks": {
4
4
  "sessionStart": [
5
5
  {
6
- "command": "npx -y --package=@brainervirus/workit-cursor@latest workit-cursor-session-start"
6
+ "command": "npx -y --package=@brainervirus/workit-cursor@0.8.0 workit-cursor-session-start"
7
7
  }
8
8
  ]
9
9
  }
package/mcp.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "workit": {
4
4
  "command": "npx",
5
- "args": ["-y", "--package=@brainervirus/workit-cursor@latest", "workit-cursor-mcp", "${workspaceFolder}"]
5
+ "args": ["-y", "--package=@brainervirus/workit-cursor@0.8.0", "workit-cursor-mcp", "${workspaceFolder}"]
6
6
  }
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin: MCP server, hooks, rules, marketplace manifest (thin over @brainervirus/workit-core)",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "build": "bun scripts/build.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@brainervirus/workit-core": "^0.8.0",
42
+ "@brainervirus/workit-core": "^0.8.1",
43
43
  "@modelcontextprotocol/sdk": "^1.12.0",
44
44
  "zod": "^3.24.0"
45
45
  },