@brainervirus/workit-mcp 2.1.4 → 2.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-mcp",
3
- "version": "2.1.4",
3
+ "version": "2.2.0",
4
4
  "private": false,
5
5
  "description": "Workit shared MCP transport for the eight task and policy operation families",
6
6
  "keywords": [
@@ -42,9 +42,9 @@
42
42
  "build": "bun scripts/build.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@brainervirus/workit-core": "^2.1.4",
46
- "@modelcontextprotocol/sdk": "1.30.0",
47
- "zod": "4.5.4"
45
+ "@brainervirus/workit-core": "^2.2.0",
46
+ "@modelcontextprotocol/sdk": "1.32.0",
47
+ "zod": "4.6.5"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=24"
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
  import path from "node:path";
3
3
  import { assertMcpHost, runStdioServer, sanitizeTransportText } from "./server";
4
- import type { McpHost } from "./server";
5
4
 
6
5
  export {
7
6
  assertMcpHost,
@@ -19,7 +18,7 @@ const main = async (): Promise<void> => {
19
18
  const host = hostIndex >= 0 ? args[hostIndex + 1] : undefined;
20
19
  try {
21
20
  assertMcpHost(host);
22
- await runStdioServer(host as McpHost);
21
+ await runStdioServer(host);
23
22
  } catch (error) {
24
23
  process.stderr.write(`${sanitizeTransportText(error)}\n`);
25
24
  process.exitCode = 2;
package/src/server.ts CHANGED
@@ -88,7 +88,7 @@ const rootVariants = (workspaceRoot?: string): string[] => {
88
88
  } catch {
89
89
  // The core will return a structured failure for an unavailable root.
90
90
  }
91
- return [...roots].sort((left, right) => right.length - left.length);
91
+ return [...roots].toSorted((left, right) => right.length - left.length);
92
92
  };
93
93
 
94
94
  export const sanitizeTransportText = (value: unknown, workspaceRoot?: string): string => {
@@ -141,7 +141,7 @@ const schemaBranches = (schema: Record<string, unknown>): unknown[] =>
141
141
  : [schema];
142
142
 
143
143
  const readOnlyBranches = (family: OperationFamily): unknown[] =>
144
- schemaBranches(boundedOperationJsonSchema(family) as Record<string, unknown>).filter((branch) => {
144
+ schemaBranches(boundedOperationJsonSchema(family)).filter((branch) => {
145
145
  const action = (branch as { properties?: { action?: { const?: unknown } } }).properties?.action
146
146
  ?.const;
147
147
  return typeof action === "string" && READ_ONLY_ACTIONS.has(action);
@@ -162,7 +162,7 @@ export const advertisedToolSchemas = (
162
162
  return OPERATION_FAMILIES.flatMap((family) => {
163
163
  const branches = readOnlyBranches(family);
164
164
  if (!branches.length) return [];
165
- const schema = boundedOperationJsonSchema(family) as Record<string, unknown>;
165
+ const schema = boundedOperationJsonSchema(family);
166
166
  return [
167
167
  {
168
168
  name: `workit_${family}`,