@sanity/workflow-mcp 0.34.0 → 0.35.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @sanity/workflow-mcp
2
2
 
3
+ ## 0.35.0
4
+
5
+ ### Patch Changes
6
+
7
+ - a43248f: The MCP server now sends queued adoption telemetry when a client disconnects normally by closing stdin.
8
+
9
+ **No upgrade action required.** Existing MCP client configurations receive the fix when they update the server package.
10
+
11
+ **Docs impact: None** because this corrects telemetry delivery without changing the MCP tools or their public behavior.
12
+
13
+ - Updated dependencies [7e24e4a]
14
+ - Updated dependencies [ab8754a]
15
+ - @sanity/workflow-engine@0.35.0
16
+
3
17
  ## 0.34.0
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -180,15 +180,19 @@ calls that return an `isError` result.
180
180
  Addressed write tools pass the MCP logger into the engine. Read tools and
181
181
  address-free tools do not emit engine events.
182
182
 
183
- Every instance-scoped engine event includes `definitionContentHash` (omitted
184
- when the definition predates fingerprinting) and `instanceId`.
183
+ Every engine event includes `executionRuntime` (the JavaScript runtime the
184
+ engine detected around itself, always `'node'` for the stdio server) and
185
+ `executionKind` (the host the engine was told it is running in, always
186
+ `'mcp'`). Every instance-scoped engine event additionally includes
187
+ `definitionContentHash` (omitted when the definition predates fingerprinting)
188
+ and `instanceId`.
185
189
 
186
190
  | Event | Version | When the MCP server emits it | Additional payload |
187
191
  | ------------------------------- | ------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
188
- | `Workflows Definition Deployed` | 1 | `workflows_deploy_definition` (created or unchanged) | `contentHash`, `status` (`'created'` or `'unchanged'`), `deployId` (random run id, not the workflow tag), `stageCount`, `activityCount`, `actionCount`, `transitionCount`, `fieldCount`, `activityKinds`, `fieldKinds`, `guardCount`, `effectCount`, `subworkflowCount`, `lifecycle` (`'standalone'` or `'child'`). Counts and kinds only — never names or GROQ. |
189
- | `Workflows Instance Started` | 1 | `workflows_start`, and a fire that spawns a child | `initialFieldCount`, `viaSpawn` (`true` only for a spawned child), `lifecycle`. |
190
- | `Workflows Stage Transitioned` | 1 | A committed hop from start or fire (cascades included) | `fromStageIndex`, `toStageIndex` (indexes into `stages[]`, never names), `toIsTerminal`, `isRevisit`, `dwellMs` (milliseconds in the exited stage, omitted if that entry is missing), `via`: `'transition'`. Unsampled. |
191
- | `Workflows Action Fired` | 1 | `workflows_fire_action` | `activityKind` (optional), `hasParams` (whether params were supplied — not the params), `cascaded`. |
192
+ | `Workflows Definition Deployed` | 2 | `workflows_deploy_definition` (created or unchanged) | `contentHash`, `status` (`'created'` or `'unchanged'`), `deployId` (random run id, not the workflow tag), `stageCount`, `activityCount`, `actionCount`, `transitionCount`, `fieldCount`, `activityKinds`, `fieldKinds`, `guardCount`, `effectCount`, `subworkflowCount`, `lifecycle` (`'standalone'` or `'child'`). Counts and kinds only — never names or GROQ. |
193
+ | `Workflows Instance Started` | 2 | `workflows_start`, and a fire that spawns a child | `initialFieldCount`, `viaSpawn` (`true` only for a spawned child), `lifecycle`. |
194
+ | `Workflows Stage Transitioned` | 2 | A committed hop from start or fire (cascades included) | `fromStageIndex`, `toStageIndex` (indexes into `stages[]`, never names), `toIsTerminal`, `isRevisit`, `dwellMs` (milliseconds in the exited stage, omitted if that entry is missing), `via`: `'transition'`. Unsampled. |
195
+ | `Workflows Action Fired` | 2 | `workflows_fire_action` | `activityKind` (optional), `hasParams` (whether params were supplied — not the params), `cascaded`. |
192
196
 
193
197
  This MCP surface has no abort, set-stage, reset-activity, delete, tick, drain,
194
198
  or generic field-edit tools, so it does not record `Workflows Instance Aborted`,
package/dist/stdio.js CHANGED
@@ -6,7 +6,7 @@ import { deployedTagsGroq, parseResourceGdr, datasetResourceParts, EXECUTION_KIN
6
6
 
7
7
  import { LIST_WORKFLOW_TAGS_TOOL_NAME, workflowAddressFields, LIST_WORKFLOW_TAGS_DESCRIPTION, withToolTelemetry, clientForResource, registerWorkflowTools, workflowAddressFromInput, createMcpTelemetry, createEngineCache } from "./_chunks-es/index.js";
8
8
 
9
- var version = "0.34.0", packageJson = {
9
+ var version = "0.35.0", packageJson = {
10
10
  version: version
11
11
  };
12
12
 
@@ -120,7 +120,9 @@ async function runStdioServer() {
120
120
  shutdown();
121
121
  }), server.server.onclose = () => {
122
122
  shutdown();
123
- };
123
+ }, process.stdin.once("end", () => {
124
+ shutdown();
125
+ });
124
126
  const transport = new StdioServerTransport;
125
127
  await server.connect(transport);
126
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/workflow-mcp",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "MCP server exposing Sanity workflow tools to agents — operate running workflow instances and author new definitions.",
5
5
  "keywords": [
6
6
  "agent",
@@ -62,15 +62,15 @@
62
62
  "@types/node": "^24.12.4",
63
63
  "vitest": "^4.1.8",
64
64
  "zod": "^4.4.3",
65
- "@sanity/workflow-engine": "0.34.0",
66
- "@sanity/workflow-engine-test": "0.34.0",
67
- "@sanity/workflow-examples": "0.12.2",
65
+ "@sanity/workflow-engine": "0.35.0",
66
+ "@sanity/workflow-engine-test": "0.35.0",
67
+ "@sanity/workflow-examples": "0.12.3",
68
68
  "@sanity/workflow-test-fixtures": "0.0.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@modelcontextprotocol/sdk": "^1.29.0",
72
72
  "zod": "^3.25.28 || ^4",
73
- "@sanity/workflow-engine": "0.34.0"
73
+ "@sanity/workflow-engine": "0.35.0"
74
74
  },
75
75
  "engines": {
76
76
  "node": ">=20"
@@ -80,6 +80,7 @@
80
80
  "docs": "node ../../scripts/run-typedoc.mjs",
81
81
  "typecheck": "tsc --noEmit -p tsconfig.json",
82
82
  "test": "vitest run",
83
+ "test:packaging": "vitest run --config vitest.packaging.config.ts",
83
84
  "test:watch": "vitest",
84
85
  "dev": "NODE_OPTIONS='--conditions=development' tsx --env-file-if-exists=../../.env bin/workflow-mcp.ts"
85
86
  }