@typeship-ax/mcp 0.10.0 → 0.20.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.
Files changed (107) hide show
  1. package/AGENTS.md +11 -5
  2. package/README.md +16 -5
  3. package/api.json +8824 -3777
  4. package/api.md +8359 -3987
  5. package/dist/api-identity.d.ts.map +1 -1
  6. package/dist/api-identity.js +6 -1
  7. package/dist/core/http.d.ts +29 -16
  8. package/dist/core/http.d.ts.map +1 -1
  9. package/dist/core/http.js +108 -25
  10. package/dist/core/pagination.d.ts +8 -8
  11. package/dist/core/pagination.d.ts.map +1 -1
  12. package/dist/core/pagination.js +7 -16
  13. package/dist/errors.d.ts +20 -13
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/errors.js +29 -20
  16. package/dist/index.d.ts +37 -19
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +42 -18
  19. package/dist/mcp-protocol.d.ts +10 -6
  20. package/dist/mcp-protocol.d.ts.map +1 -1
  21. package/dist/mcp-protocol.js +110 -39
  22. package/dist/mcp.d.ts.map +1 -1
  23. package/dist/mcp.js +38 -18
  24. package/dist/ops.d.ts +5 -1
  25. package/dist/ops.d.ts.map +1 -1
  26. package/dist/ops.js +42 -35
  27. package/dist/resources/api-keys.d.ts +44 -18
  28. package/dist/resources/api-keys.d.ts.map +1 -1
  29. package/dist/resources/api-keys.js +46 -14
  30. package/dist/resources/deliveries.d.ts +46 -0
  31. package/dist/resources/deliveries.d.ts.map +1 -0
  32. package/dist/resources/deliveries.js +70 -0
  33. package/dist/resources/drafts.d.ts +155 -0
  34. package/dist/resources/drafts.d.ts.map +1 -0
  35. package/dist/resources/drafts.js +230 -0
  36. package/dist/resources/files.d.ts +23 -0
  37. package/dist/resources/files.d.ts.map +1 -0
  38. package/dist/resources/files.js +38 -0
  39. package/dist/resources/generate.d.ts +49 -20
  40. package/dist/resources/generate.d.ts.map +1 -1
  41. package/dist/resources/generate.js +56 -14
  42. package/dist/resources/generations.d.ts +70 -18
  43. package/dist/resources/generations.d.ts.map +1 -1
  44. package/dist/resources/generations.js +84 -16
  45. package/dist/resources/organization.d.ts +18 -0
  46. package/dist/resources/organization.d.ts.map +1 -0
  47. package/dist/resources/organization.js +32 -0
  48. package/dist/resources/projects.d.ts +87 -124
  49. package/dist/resources/projects.d.ts.map +1 -1
  50. package/dist/resources/projects.js +70 -173
  51. package/dist/resources/publications.d.ts +46 -0
  52. package/dist/resources/publications.d.ts.map +1 -0
  53. package/dist/resources/publications.js +70 -0
  54. package/dist/resources/releases.d.ts +66 -0
  55. package/dist/resources/releases.d.ts.map +1 -0
  56. package/dist/resources/releases.js +101 -0
  57. package/dist/resources/spec-revisions.d.ts +85 -0
  58. package/dist/resources/spec-revisions.d.ts.map +1 -0
  59. package/dist/resources/spec-revisions.js +116 -0
  60. package/dist/resources/specs.d.ts +72 -0
  61. package/dist/resources/specs.d.ts.map +1 -0
  62. package/dist/resources/specs.js +107 -0
  63. package/dist/resources/targets.d.ts +85 -105
  64. package/dist/resources/targets.d.ts.map +1 -1
  65. package/dist/resources/targets.js +70 -163
  66. package/dist/schemas.d.ts.map +1 -1
  67. package/dist/schemas.js +175 -129
  68. package/dist/types.d.ts +2626 -1141
  69. package/dist/types.d.ts.map +1 -1
  70. package/dist/types.js +90 -11
  71. package/package.json +3 -3
  72. package/server.json +3 -3
  73. package/src/api-identity.ts +6 -2
  74. package/src/core/http.ts +106 -30
  75. package/src/core/pagination.ts +13 -23
  76. package/src/errors.ts +30 -20
  77. package/src/index.ts +46 -24
  78. package/src/mcp-protocol.ts +95 -38
  79. package/src/mcp.ts +34 -16
  80. package/src/ops.ts +47 -36
  81. package/src/resources/api-keys.ts +87 -19
  82. package/src/resources/deliveries.ts +139 -0
  83. package/src/resources/drafts.ts +422 -0
  84. package/src/resources/files.ts +68 -0
  85. package/src/resources/generate.ts +81 -19
  86. package/src/resources/generations.ts +167 -29
  87. package/src/resources/organization.ts +53 -0
  88. package/src/resources/projects.ts +129 -322
  89. package/src/resources/publications.ts +139 -0
  90. package/src/resources/releases.ts +199 -0
  91. package/src/resources/spec-revisions.ts +237 -0
  92. package/src/resources/specs.ts +200 -0
  93. package/src/resources/targets.ts +135 -304
  94. package/src/schemas.ts +175 -129
  95. package/src/types.ts +2793 -1177
  96. package/dist/resources/account.d.ts +0 -18
  97. package/dist/resources/account.d.ts.map +0 -1
  98. package/dist/resources/account.js +0 -27
  99. package/dist/resources/definition-revisions.d.ts +0 -58
  100. package/dist/resources/definition-revisions.d.ts.map +0 -1
  101. package/dist/resources/definition-revisions.js +0 -114
  102. package/dist/resources/definitions.d.ts +0 -35
  103. package/dist/resources/definitions.d.ts.map +0 -1
  104. package/dist/resources/definitions.js +0 -60
  105. package/src/resources/account.ts +0 -46
  106. package/src/resources/definition-revisions.ts +0 -207
  107. package/src/resources/definitions.ts +0 -122
@@ -1,5 +1,6 @@
1
1
  /**
2
- * MCP 2026-07-28 for a tools-only server. Generated by typeship — https://typeship.dev
2
+ * MCP tools server with a 2025-11-25 handshake adapter and a 2026-07-28 core.
3
+ * Generated by typeship — https://typeship.dev
3
4
  *
4
5
  * The protocol layer shared by the MCP server in every generated package and
5
6
  * by typeship's hosted endpoint: JSON-RPC shape checks, the per-request _meta
@@ -17,10 +18,9 @@
17
18
  import { dateKindOf, relativeDate } from "./dates.js";
18
19
  import { docsReadTarget, resolveDocsContentUrl, searchConnectedGuides } from "./docs.js";
19
20
  export const MCP_PROTOCOL_VERSION = "2026-07-28";
20
- /** Revisions served. Legacy (initialize-handshake) revisions are not; an
21
- * initialize request gets an error naming this list, as the spec asks of
22
- * modern-only servers. */
23
- export const SUPPORTED_PROTOCOL_VERSIONS = [MCP_PROTOCOL_VERSION];
21
+ export const LEGACY_PROTOCOL_VERSION = "2025-11-25";
22
+ /** The modern model and the supported initialize-handshake wire revision. */
23
+ export const SUPPORTED_PROTOCOL_VERSIONS = [MCP_PROTOCOL_VERSION, LEGACY_PROTOCOL_VERSION];
24
24
  export const META_VERSION = "io.modelcontextprotocol/protocolVersion";
25
25
  export const META_CLIENT_CAPS = "io.modelcontextprotocol/clientCapabilities";
26
26
  export const META_SERVER_INFO = "io.modelcontextprotocol/serverInfo";
@@ -98,7 +98,7 @@ export function checkRequestMeta(request) {
98
98
  if (typeof version !== "string") {
99
99
  return rpcError(request.id, -32602, "Invalid params: params._meta[\"" + META_VERSION + "\"] is required on every request (MCP " + MCP_PROTOCOL_VERSION + ").", 400);
100
100
  }
101
- if (!SUPPORTED_PROTOCOL_VERSIONS.includes(version)) {
101
+ if (version !== MCP_PROTOCOL_VERSION) {
102
102
  return rpcError(request.id, -32022, "Unsupported protocol version", 400, { supported: SUPPORTED_PROTOCOL_VERSIONS, requested: version });
103
103
  }
104
104
  if (caps === null || typeof caps !== "object" || Array.isArray(caps)) {
@@ -127,6 +127,17 @@ export function checkRequestHeaders(headers, message) {
127
127
  const id = message.id;
128
128
  const version = headers.get("mcp-protocol-version");
129
129
  const bodyVersion = message.params?._meta?.[META_VERSION];
130
+ if (version !== null && !SUPPORTED_PROTOCOL_VERSIONS.includes(version))
131
+ return rpcError(id, -32022, "Unsupported protocol version", 400, { supported: SUPPORTED_PROTOCOL_VERSIONS, requested: version });
132
+ if (message.method === "initialize" || version === LEGACY_PROTOCOL_VERSION) {
133
+ if (bodyVersion !== undefined || headers.get("mcp-method") !== null || headers.get("mcp-name") !== null) {
134
+ return rpcError(id, -32020, "Header mismatch: initialize-handshake requests cannot carry modern protocol metadata or routing headers.", 400);
135
+ }
136
+ if (version !== null && version !== LEGACY_PROTOCOL_VERSION) {
137
+ return rpcError(id, -32022, "Unsupported initialize-handshake protocol version", 400, { supported: [LEGACY_PROTOCOL_VERSION], requested: version });
138
+ }
139
+ return null;
140
+ }
130
141
  if (version === null)
131
142
  return rpcError(id, -32020, "Header mismatch: MCP-Protocol-Version header is required", 400);
132
143
  if (typeof bodyVersion === "string" && version !== bodyVersion) {
@@ -157,7 +168,39 @@ export function takeCancelled(id) {
157
168
  return (typeof id === "string" || typeof id === "number") && cancelled.delete(id);
158
169
  }
159
170
  // ---- dispatch ------------------------------------------------------------------
160
- export async function handleRpc(server, incoming) {
171
+ /** One stdio process owns its handshake state. HTTP instead carries the
172
+ * negotiated revision on each request and never needs a server session. */
173
+ export function createStdioRpcHandler(server) {
174
+ let version;
175
+ let initialized = false;
176
+ let initializing = false;
177
+ return async (incoming) => {
178
+ const request = asJsonRpc(incoming);
179
+ if (isRpcOutcome(request))
180
+ return request;
181
+ if (request.method === "initialize") {
182
+ if (version || initializing)
183
+ return rpcError(request.id, -32600, "This connection has already selected its MCP protocol.", 400, { supported: SUPPORTED_PROTOCOL_VERSIONS });
184
+ initializing = true;
185
+ const result = await handleRpc(server, request);
186
+ initializing = false;
187
+ if (result.status === 200)
188
+ version = LEGACY_PROTOCOL_VERSION;
189
+ return result;
190
+ }
191
+ if (version === LEGACY_PROTOCOL_VERSION) {
192
+ if (request.method === "notifications/initialized" && request.id === undefined)
193
+ initialized = true;
194
+ if (!initialized && request.id !== undefined && request.method !== "ping")
195
+ return rpcError(request.id, -32600, "Send notifications/initialized before calling MCP methods.", 400);
196
+ }
197
+ else if (request.params?._meta?.[META_VERSION] === MCP_PROTOCOL_VERSION) {
198
+ version = MCP_PROTOCOL_VERSION;
199
+ }
200
+ return handleRpc(server, request, version);
201
+ };
202
+ }
203
+ export async function handleRpc(server, incoming, protocolVersion) {
161
204
  const parsed = asJsonRpc(incoming);
162
205
  if (isRpcOutcome(parsed))
163
206
  return parsed;
@@ -172,20 +215,46 @@ export async function handleRpc(server, incoming) {
172
215
  }
173
216
  return { message: null, status: 202 };
174
217
  }
175
- // Legacy clients open with initialize; name what we do speak so their one
176
- // visible error is actionable (spec: modern-only servers SHOULD do this).
218
+ // Only the wire envelope differs. Tool execution and authorization below
219
+ // remain shared with modern clients.
177
220
  if (request.method === "initialize") {
178
- return rpcError(id, -32601, "This server speaks MCP " + SUPPORTED_PROTOCOL_VERSIONS.join(", ") + " only (stateless, no initialize handshake). Upgrade the client, or send requests with params._meta[\"" + META_VERSION + "\"].", 400, { supported: SUPPORTED_PROTOCOL_VERSIONS });
221
+ const params = request.params;
222
+ if (params?._meta?.[META_VERSION] !== undefined)
223
+ return rpcError(id, -32602, "initialize cannot carry modern protocol metadata.", 400);
224
+ const info = params?.clientInfo;
225
+ if (!params || typeof params.protocolVersion !== "string" || !params.capabilities || typeof params.capabilities !== "object" || Array.isArray(params.capabilities) ||
226
+ !info || typeof info !== "object" || Array.isArray(info) || typeof info.name !== "string" || typeof info.version !== "string") {
227
+ return rpcError(id, -32602, "initialize requires protocolVersion, capabilities, and clientInfo with name and version.", 400);
228
+ }
229
+ if (params.protocolVersion !== LEGACY_PROTOCOL_VERSION)
230
+ return rpcError(id, -32022, "Unsupported initialize-handshake protocol version", 400, { supported: [LEGACY_PROTOCOL_VERSION], requested: params.protocolVersion });
231
+ return { status: 200, message: { jsonrpc: "2.0", id, result: {
232
+ protocolVersion: LEGACY_PROTOCOL_VERSION,
233
+ capabilities: { tools: {} },
234
+ serverInfo: server.serverInfo,
235
+ ...(server.instructions ? { instructions: server.instructions } : {}),
236
+ } } };
237
+ }
238
+ const legacy = protocolVersion === LEGACY_PROTOCOL_VERSION;
239
+ if (legacy) {
240
+ const meta = request.params?._meta;
241
+ if (meta?.[META_VERSION] !== undefined || meta?.[META_CLIENT_CAPS] !== undefined || request.params?.inputResponses !== undefined || request.method === "server/discover") {
242
+ return rpcError(id, -32602, "Modern protocol metadata and methods cannot be used on an initialize-handshake connection.", 400);
243
+ }
244
+ }
245
+ else {
246
+ const meta = checkRequestMeta(request);
247
+ if ("status" in meta)
248
+ return meta;
179
249
  }
180
- const meta = checkRequestMeta(request);
181
- if ("status" in meta)
182
- return meta;
183
250
  const complete = (result) => ({
184
- message: { jsonrpc: "2.0", id, result: { resultType: "complete", ...result, _meta: { [META_SERVER_INFO]: server.serverInfo } } },
251
+ message: { jsonrpc: "2.0", id, result: legacy ? result : { resultType: "complete", ...result, _meta: { [META_SERVER_INFO]: server.serverInfo } } },
185
252
  status: 200,
186
253
  });
187
254
  const cacheScope = server.cacheScope ?? "public";
188
255
  switch (request.method) {
256
+ case "ping":
257
+ return legacy ? complete({}) : rpcError(id, -32601, "Method not found: ping", 404);
189
258
  case "server/discover":
190
259
  return complete({
191
260
  supportedVersions: SUPPORTED_PROTOCOL_VERSIONS,
@@ -195,7 +264,7 @@ export async function handleRpc(server, incoming) {
195
264
  cacheScope,
196
265
  });
197
266
  case "tools/list":
198
- return complete({ tools: server.listTools(), ttlMs: server.toolsTtlMs, cacheScope });
267
+ return complete({ tools: server.listTools(), ...(!legacy ? { ttlMs: server.toolsTtlMs, cacheScope } : {}) });
199
268
  case "tools/call": {
200
269
  const name = request.params?.name;
201
270
  if (typeof name !== "string")
@@ -229,7 +298,7 @@ export async function handleRpc(server, incoming) {
229
298
  catch (error) {
230
299
  if (!(error instanceof McpAccountLinkRequired))
231
300
  throw error;
232
- const caps = (request.params?._meta)[META_CLIENT_CAPS];
301
+ const caps = legacy ? {} : (request.params?._meta)[META_CLIENT_CAPS];
233
302
  const urlMode = caps.elicitation?.url;
234
303
  if (urlMode === null || typeof urlMode !== "object" || Array.isArray(urlMode)) {
235
304
  const unsupported = textError("Connect your API account using an MCP client that supports browser account-linking prompts (URL-mode elicitation), then retry.", "ACCOUNT_LINK_REQUIRED");
@@ -997,7 +1066,8 @@ export function argumentsError(op, issues) {
997
1066
  }
998
1067
  // ---- results: projection, size cap, envelopes ------------------------------------
999
1068
  /** Keep only `paths` of a value: arrays item by item, objects by dotted
1000
- * path; scalars untouched. Same rule as the CLI's --fields. */
1069
+ * path, including paths through arrays (`items.id` keeps each item's id);
1070
+ * scalars untouched. Same rule as the CLI's --fields. */
1001
1071
  export function projectFields(value, paths) {
1002
1072
  if (paths === null)
1003
1073
  return value;
@@ -1005,26 +1075,25 @@ export function projectFields(value, paths) {
1005
1075
  return value.map((v) => projectFields(v, paths));
1006
1076
  if (value === null || typeof value !== "object")
1007
1077
  return value;
1078
+ const groups = new Map();
1079
+ for (const [key, ...rest] of paths) {
1080
+ if (key === undefined)
1081
+ continue;
1082
+ const group = groups.get(key);
1083
+ if (group)
1084
+ group.push(rest);
1085
+ else
1086
+ groups.set(key, [rest]);
1087
+ }
1008
1088
  const out = {};
1009
- for (const path of paths) {
1010
- let cursor = value;
1011
- for (const key of path) {
1012
- if (cursor === null || typeof cursor !== "object" || Array.isArray(cursor)) {
1013
- cursor = undefined;
1014
- break;
1015
- }
1016
- cursor = cursor[key];
1017
- }
1018
- if (cursor === undefined)
1089
+ for (const [key, rests] of groups) {
1090
+ const child = value[key];
1091
+ if (child === undefined)
1019
1092
  continue;
1020
- let target = out;
1021
- for (const key of path.slice(0, -1)) {
1022
- const next = target[key];
1023
- if (next === undefined || next === null || typeof next !== "object" || Array.isArray(next))
1024
- target[key] = {};
1025
- target = target[key];
1026
- }
1027
- target[path[path.length - 1]] = cursor;
1093
+ if (rests.some((rest) => rest.length === 0))
1094
+ out[key] = child;
1095
+ else if (child !== null && typeof child === "object")
1096
+ out[key] = projectFields(child, rests);
1028
1097
  }
1029
1098
  return out;
1030
1099
  }
@@ -1102,7 +1171,9 @@ export function pageOutcome(items, nextPage, options = {}) {
1102
1171
  return { text: JSON.stringify(structured), isError: false, structured };
1103
1172
  }
1104
1173
  /** Placeholder for a value cut from an oversized object result. */
1105
- const omittedMarker = (key, chars) => "[omitted: " + chars.toLocaleString("en-US") + " characters. Pass fields=[\"" + key + "\"] to fetch this key alone.]";
1174
+ const omittedMarker = (key, chars, maxChars) => chars > maxChars
1175
+ ? "[omitted: " + chars.toLocaleString("en-US") + " characters, more than the cap on its own. Pass fields with dotted paths inside it, such as [\"" + key + ".id\"], or request a smaller page.]"
1176
+ : "[omitted: " + chars.toLocaleString("en-US") + " characters. Pass fields=[\"" + key + "\"] to fetch this key alone.]";
1106
1177
  export function dataOutcome(data, options = {}) {
1107
1178
  const fields = options.fields ?? null;
1108
1179
  const maxChars = options.maxChars ?? DEFAULT_MAX_RESULT_CHARS;
@@ -1143,7 +1214,7 @@ export function dataOutcome(data, options = {}) {
1143
1214
  out[e.key] = e.v;
1144
1215
  out.truncated = {
1145
1216
  omitted_keys: [...cut.keys()],
1146
- omitted: Object.fromEntries([...cut].map(([key, chars]) => [key, omittedMarker(key, chars)])),
1217
+ omitted: Object.fromEntries([...cut].map(([key, chars]) => [key, omittedMarker(key, chars, maxChars)])),
1147
1218
  reason: "The result is " + text.length.toLocaleString("en-US") + " characters; results are capped at " + maxChars.toLocaleString("en-US") + ".",
1148
1219
  next_steps: [fieldsHint(false)],
1149
1220
  };
@@ -1321,8 +1392,8 @@ function omittedPlanLimit(ops, requested) {
1321
1392
  error: "PlanLimitError",
1322
1393
  code: "PLAN_LIMIT",
1323
1394
  message: requested
1324
- ? "The operation " + requested + " exists in the API Definition but was omitted from this generated package by its plan limit."
1325
- : "Matching operations exist in the API Definition but were omitted from this generated package by its plan limit.",
1395
+ ? "The operation " + requested + " exists in the Spec but was omitted from this generated package by its plan limit."
1396
+ : "Matching operations exist in the Spec but were omitted from this generated package by its plan limit.",
1326
1397
  omitted_operations: ops.map((op) => ({ tool: op.tool, method: op.httpMethod, path: op.path })),
1327
1398
  next_steps: ["Upgrade at https://typeship.dev/pricing and regenerate the package without the operation cap.", "Do not invent or retry an omitted operation against this generated package."],
1328
1399
  };
package/dist/mcp.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":";AAuBA,OAAO,EAAoC,KAAK,aAAa,EAAmB,MAAM,YAAY,CAAC;AAcnG,OAAO,EAA8C,KAAK,6BAA6B,EAAE,KAAK,kCAAkC,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACpL,YAAY,EAAE,6BAA6B,EAAE,kCAAkC,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9H,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AA4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OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAErE"}
package/dist/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // typeship — MCP server. Generated by typeship — https://typeship.dev
3
- // Speaks MCP 2026-07-28 (stateless: per-request _meta, server/discover; no
4
- // initialize handshake, no sessions); the protocol layer and tool surface
3
+ // Speaks MCP 2026-07-28 and accepts the 2025-11-25 initialize handshake.
4
+ // HTTP is stateless (no sessions); the protocol layer and tool surface
5
5
  // live in ./mcp-protocol.js, shared with typeship's hosted endpoint. Two
6
6
  // transports, zero dependencies:
7
7
  // node mcp.js stdio (newline-delimited JSON-RPC 2.0)
@@ -21,8 +21,9 @@ import { homedir, tmpdir } from "node:os";
21
21
  import { basename, join } from "node:path";
22
22
  import { fileURLToPath } from "node:url";
23
23
  import { TypeshipClient, formatDebugEvent } from "./index.js";
24
+ import { asApiResult } from "./core/http.js";
24
25
  import { GLOBALS, OMITTED_OPS, OPS, buildArgs } from "./ops.js";
25
- import { DEFAULT_MAX_RESULT_CHARS, SUPPORTED_PROTOCOL_VERSIONS, McpAccountLinkRequired, argumentsError, asJsonRpc, binaryOutcome, callSharedTool, checkRequestHeaders, dataOutcome, errorOutcome, handleRpc, isRpcOutcome, pageOutcome, parseIncludeList, prepareCall, resolveReferences, serverInstructions, takeCancelled, textError, toolDefinitions, visibleOps, } from "./mcp-protocol.js";
26
+ import { DEFAULT_MAX_RESULT_CHARS, SUPPORTED_PROTOCOL_VERSIONS, McpAccountLinkRequired, argumentsError, asJsonRpc, binaryOutcome, callSharedTool, checkRequestHeaders, createStdioRpcHandler, dataOutcome, errorOutcome, handleRpc, isRpcOutcome, pageOutcome, parseIncludeList, prepareCall, resolveReferences, serverInstructions, takeCancelled, textError, toolDefinitions, visibleOps, } from "./mcp-protocol.js";
26
27
  import { fetchDocsText } from "./docs.js";
27
28
  import { assertCredentialDestination, assertStoredIdentity } from "./oauth-session.js";
28
29
  import { createCredentialStore } from "./credential-storage.js";
@@ -33,14 +34,14 @@ export { McpAccountLinkRequired } from "./mcp-protocol.js";
33
34
  const BIN = "typeship";
34
35
  const PKG_NAME = "@typeship-ax/mcp";
35
36
  const SERVER_NAME = "typeship-mcp";
36
- const SERVER_VERSION = "0.10.0";
37
+ const SERVER_VERSION = "0.20.0";
37
38
  /** The MCP client's announced name (clientInfo in request _meta), for the User-Agent. */
38
39
  let MCP_CLIENT_NAME = null;
39
40
  function noteClientInfo(message) {
40
41
  const meta = message?.params?._meta;
41
42
  const name = meta?.["io.modelcontextprotocol/clientInfo"]?.name;
42
- if (typeof name === "string" && name && name !== MCP_CLIENT_NAME) {
43
- MCP_CLIENT_NAME = name.slice(0, 60);
43
+ if (typeof name === "string" && name) {
44
+ MCP_CLIENT_NAME = name.replace(/[\s;()]+/g, "_").slice(0, 60);
44
45
  }
45
46
  }
46
47
  const DEFAULT_BASE_URL = "https://typeship.dev/api/v1";
@@ -56,7 +57,7 @@ const TOOL_MODE = "meta";
56
57
  /** Project-supplied guidance appended to the server instructions. */
57
58
  const CUSTOM_INSTRUCTIONS = null;
58
59
  /** The tool that returns the caller (the CLI's whoami target), named in the instructions. */
59
- const IDENTITY_TOOL = "account_retrieve";
60
+ const IDENTITY_TOOL = null;
60
61
  /** Surface switches: reads only, and/or a subset of resources or tools.
61
62
  * Flags win over the environment. */
62
63
  const ARGV = process.argv.slice(2);
@@ -144,7 +145,7 @@ function makeClient(op) {
144
145
  options.debug = (event) => process.stderr.write(formatDebugEvent(BIN + "-mcp", event) + "\n");
145
146
  }
146
147
  // The local MCP server identifies itself (surface + the client it serves, when announced).
147
- options.defaultHeaders = { "User-Agent": PKG_NAME + "-mcp/" + SERVER_VERSION + " (typeship" + (MCP_CLIENT_NAME ? "; client=" + MCP_CLIENT_NAME : "") + ")" };
148
+ options.defaultHeaders = { "User-Agent": PKG_NAME + "-mcp/" + SERVER_VERSION + (MCP_CLIENT_NAME ? " (client=" + MCP_CLIENT_NAME + ")" : "") };
148
149
  // Keep the SDK's machine-token cache while re-evaluating local configuration.
149
150
  const key = createHash("sha256").update(JSON.stringify([options, config, profile?.name, stored?.oauth?.sessionId, null, process.env["TYPESHIP_DEBUG"]])).digest("hex");
150
151
  if (clientInstance && clientKey === key)
@@ -173,8 +174,9 @@ async function callOperationRaw(op, rawArgs, remote, client) {
173
174
  const { args, fields, maxChars } = prepared.call;
174
175
  const values = {};
175
176
  for (const p of op.params) {
176
- if (args[p.name] !== undefined)
177
- values[p.name] = args[p.name];
177
+ const argument = p.kind === "header" && p.name === "If-Match" ? "if_match" : p.name;
178
+ if (args[argument] !== undefined)
179
+ values[p.name] = args[argument];
178
180
  }
179
181
  // File arguments are local paths on this machine; unreadable ones are
180
182
  // argument errors, reported before anything is sent.
@@ -211,9 +213,21 @@ async function callOperationRaw(op, rawArgs, remote, client) {
211
213
  const shape = { fields, maxChars, pagination: op.pagination, args };
212
214
  try {
213
215
  const target = client[op.resource];
214
- const result = await target[op.method](...callArgs);
216
+ let result = await asApiResult(target[op.method](...callArgs));
215
217
  if (!result.ok)
216
218
  return errorOutcome(result.error, errorContext);
219
+ if (op.httpMethod === "POST" && op.path === "/projects/{project_id}/generate") {
220
+ const batch = result.data;
221
+ const generations = client.generations;
222
+ const completed = [];
223
+ for (const generation of batch.data) {
224
+ const waited = await asApiResult(generations.wait(generation.id));
225
+ if (!waited.ok)
226
+ return errorOutcome(waited.error, errorContext);
227
+ completed.push(waited.data);
228
+ }
229
+ result = { ...result, data: { ...batch, data: completed } };
230
+ }
217
231
  if (op.paginated) {
218
232
  const page = result.data;
219
233
  return pageOutcome(page.items, page.nextPageParams(), { ...shape, requestId: page.response.requestId });
@@ -281,7 +295,13 @@ const LOCAL_CREDENTIALS = LOCAL_PROCESS && !ARGV.includes("--http");
281
295
  * only on a local server (mcpExposed), writes are out under --read-only,
282
296
  * and --tools narrows to a subset. A hidden operation is unknown to
283
297
  * tools/call and execute alike. */
284
- const MCP_OPS = visibleOps(OPS, { readOnly: READ_ONLY, include: INCLUDE, uploads: LOCAL_PROCESS });
298
+ const MCP_OPS = visibleOps(OPS, { readOnly: READ_ONLY, include: INCLUDE, uploads: LOCAL_PROCESS }).map((op) => {
299
+ const properties = op.inputSchema.properties;
300
+ if (!properties || !Object.hasOwn(properties, "If-Match"))
301
+ return op;
302
+ const { ["If-Match"]: ifMatch, ...rest } = properties;
303
+ return { ...op, inputSchema: { ...op.inputSchema, properties: { ...rest, if_match: ifMatch } } };
304
+ });
285
305
  const HIDDEN_WRITES = READ_ONLY ? visibleOps(OPS, { include: INCLUDE, uploads: LOCAL_PROCESS }).length - MCP_OPS.length : 0;
286
306
  const HAS_UPLOADS = MCP_OPS.some((op) => op.bodyKind === "multipart" || op.bodyKind === "binary");
287
307
  /** A local file as an upload part (multipart field or raw body). */
@@ -408,7 +428,7 @@ async function authorizedHttp(request, authorizer, credentialsFor, apiBaseUrl) {
408
428
  return json(404, { error: "Unknown MCP endpoint." });
409
429
  if (request.method !== "POST") {
410
430
  // GET streams, DELETE (session end) and Mcp-Session-Id belong to earlier
411
- // revisions; the spec asks modern-only servers to answer 405.
431
+ // revisions; this stateless transport answers 405 instead.
412
432
  return json(405, { error: "POST JSON-RPC messages to this endpoint (MCP " + SUPPORTED_PROTOCOL_VERSIONS[0] + ", stateless)." }, { Allow: "POST, OPTIONS" });
413
433
  }
414
434
  let principal;
@@ -449,9 +469,8 @@ async function authorizedHttp(request, authorizer, credentialsFor, apiBaseUrl) {
449
469
  const parsed = asJsonRpc(incoming);
450
470
  if (isRpcOutcome(parsed))
451
471
  return json(parsed.status, parsed.message);
452
- // Header/body agreement is checked for requests; the spec defines no
453
- // header requirements for notification POSTs.
454
- if (parsed.id !== undefined && parsed.id !== null && parsed.method !== "initialize") {
472
+ // Validate the selected wire revision before dispatching a request.
473
+ if (parsed.id !== undefined && parsed.id !== null) {
455
474
  const mismatch = checkRequestHeaders(request.headers, parsed);
456
475
  if (mismatch)
457
476
  return json(mismatch.status, mismatch.message);
@@ -459,7 +478,7 @@ async function authorizedHttp(request, authorizer, credentialsFor, apiBaseUrl) {
459
478
  noteClientInfo(parsed);
460
479
  let outcome;
461
480
  try {
462
- outcome = await handleRpc(serverFor(remote), parsed);
481
+ outcome = await handleRpc(serverFor(remote), parsed, request.headers.get("mcp-protocol-version"));
463
482
  }
464
483
  catch (e) {
465
484
  return json(500, { jsonrpc: "2.0", id: parsed.id ?? null, error: { code: -32603, message: "Internal error" } });
@@ -505,6 +524,7 @@ async function startStdio() {
505
524
  const rl = createInterface({ input: process.stdin });
506
525
  const write = (message) => process.stdout.write(JSON.stringify(message) + "\n");
507
526
  const server = serverFor();
527
+ const dispatch = createStdioRpcHandler(server);
508
528
  rl.on("line", (line) => {
509
529
  const trimmed = line.trim();
510
530
  if (trimmed === "")
@@ -519,7 +539,7 @@ async function startStdio() {
519
539
  }
520
540
  const id = incoming !== null && typeof incoming === "object" && !Array.isArray(incoming) ? incoming.id : undefined;
521
541
  noteClientInfo(incoming);
522
- void handleRpc(server, incoming)
542
+ void dispatch(incoming)
523
543
  .then((outcome) => {
524
544
  if (outcome.message === null)
525
545
  return;
package/dist/ops.d.ts CHANGED
@@ -12,6 +12,8 @@ export interface ParamSpec {
12
12
  * value — JSON if it parses, else the raw text. */
13
13
  type: "string" | "number" | "boolean" | "array" | "object" | "json" | "file";
14
14
  required: boolean;
15
+ /** A JSON body flag accepts the literal null as JSON null. */
16
+ nullable?: boolean;
15
17
  enum?: string[];
16
18
  /** Element type of an "array" param: what each repeated/comma value coerces to. */
17
19
  items?: {
@@ -107,9 +109,11 @@ export interface OpSpec {
107
109
  /** What the tool returns (JSON Schema 2020-12), when the spec documents
108
110
  * a success body; paginated tools describe { items, hasMore, nextPage }. */
109
111
  outputSchema?: Record<string, unknown>;
112
+ /** File array used by CLI --out, independent of the agent schema budget. */
113
+ fileBundleProperty?: string;
110
114
  }
111
115
  export declare const OPS: OpSpec[];
112
- /** Operations present in the API Definition but omitted by this
116
+ /** Operations present in the API Spec but omitted by this
113
117
  * generation's operation cap. Kept deliberately small: enough for honest
114
118
  * discovery and PLAN_LIMIT errors, never enough to call an absent method. */
115
119
  export type OmittedOpSpec = Pick<OpSpec, "resource" | "method" | "command" | "commandAlias" | "tool" | "httpMethod" | "path" | "summary" | "description" | "toolDescription" | "paginated" | "select" | "safety" | "auth" | "security" | "params" | "inputSchema">;
package/dist/ops.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../src/ops.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C;;;uDAGmD;IACnD,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7E,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,mFAAmF;IACnF,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvF,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;4DACwD;IACxD,OAAO,CAAC,EAAE,KAAK,GAAG;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,CAAC,EAAE,MAA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