@shipstatic/mcp 2.8.0-beta.4 → 2.8.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/dist/call.d.ts +15 -0
- package/dist/call.js +25 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/call.d.ts
CHANGED
|
@@ -74,4 +74,19 @@ export interface AuthFailure {
|
|
|
74
74
|
* kept equal by review.
|
|
75
75
|
*/
|
|
76
76
|
export declare function createCall(options: CallOptions): CallFn;
|
|
77
|
+
/**
|
|
78
|
+
* Where an error result carries the wire's own `ErrorResponse`: a key of the
|
|
79
|
+
* result's `_meta`, named under the platform's domain as the specification
|
|
80
|
+
* asks of a `_meta` key.
|
|
81
|
+
*
|
|
82
|
+
* Not `structuredContent`, because that field belongs to the tool's
|
|
83
|
+
* `outputSchema`, which describes a SUCCESS. The specification's error example
|
|
84
|
+
* carries no structure, and the TypeScript SDK's client validates
|
|
85
|
+
* `structuredContent` against the output schema even on an `isError` result
|
|
86
|
+
* (modelcontextprotocol/typescript-sdk#1943, fix open as #1945), so a client
|
|
87
|
+
* built on it shows "Structured content does not match the tool's output
|
|
88
|
+
* schema" instead of the refusal. `_meta` is read by whoever asks for it and
|
|
89
|
+
* validated by nobody, and the deploy card reads its notice from here.
|
|
90
|
+
*/
|
|
91
|
+
export declare const ERROR_META_KEY = "com.shipstatic/error";
|
|
77
92
|
export declare const call: CallFn;
|
package/dist/call.js
CHANGED
|
@@ -80,29 +80,35 @@ function requiredScopeOf(details) {
|
|
|
80
80
|
function isPlainObject(value) {
|
|
81
81
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Where an error result carries the wire's own `ErrorResponse`: a key of the
|
|
85
|
+
* result's `_meta`, named under the platform's domain as the specification
|
|
86
|
+
* asks of a `_meta` key.
|
|
87
|
+
*
|
|
88
|
+
* Not `structuredContent`, because that field belongs to the tool's
|
|
89
|
+
* `outputSchema`, which describes a SUCCESS. The specification's error example
|
|
90
|
+
* carries no structure, and the TypeScript SDK's client validates
|
|
91
|
+
* `structuredContent` against the output schema even on an `isError` result
|
|
92
|
+
* (modelcontextprotocol/typescript-sdk#1943, fix open as #1945), so a client
|
|
93
|
+
* built on it shows "Structured content does not match the tool's output
|
|
94
|
+
* schema" instead of the refusal. `_meta` is read by whoever asks for it and
|
|
95
|
+
* validated by nobody, and the deploy card reads its notice from here.
|
|
96
|
+
*/
|
|
97
|
+
export const ERROR_META_KEY = 'com.shipstatic/error';
|
|
83
98
|
/**
|
|
84
99
|
* The failure envelope: authoritative prose, with the wire's own structure
|
|
85
100
|
* riding beside it.
|
|
86
101
|
*
|
|
87
|
-
* The TEXT is
|
|
88
|
-
* the
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* else still works.
|
|
92
|
-
*
|
|
93
|
-
* `structuredContent` carries `ShipError.toResponse()` verbatim — the same
|
|
94
|
-
* `ErrorResponse` the wire itself uses. Until 1.0.0-beta.8 the typed contract
|
|
95
|
-
* terminated here: `status`, `ErrorType`, and every `details` payload except
|
|
96
|
-
* the Validation arm's were dropped, so the platform's own law — *clients
|
|
97
|
-
* branch on error type and status, never on message strings* — held for every
|
|
98
|
-
* consumer EXCEPT the one best equipped to obey it. The recorded bite was a
|
|
99
|
-
* 429: `details.expires` died at this boundary, leaving the caller most in
|
|
100
|
-
* need of a precise backoff to parse "try again in 9 minutes" out of English.
|
|
102
|
+
* The TEXT is the contract, hints included. The API authors its messages for
|
|
103
|
+
* the end user at the throw site (`cloudflare/api/CLAUDE.md`, "Message
|
|
104
|
+
* authoring law"), so the sentence always contains what the agent needs, and
|
|
105
|
+
* a client that reads nothing else still works.
|
|
101
106
|
*
|
|
102
|
-
*
|
|
103
|
-
* `
|
|
104
|
-
*
|
|
105
|
-
*
|
|
107
|
+
* `_meta[ERROR_META_KEY]` carries `ShipError.toResponse()` verbatim, the same
|
|
108
|
+
* `ErrorResponse` the wire uses, so a client that branches on error type and
|
|
109
|
+
* status (the platform's law: never on message strings) reads exactly what
|
|
110
|
+
* every other client sees, `details` included: a 429's `details.expires` is
|
|
111
|
+
* the precise backoff its sentence rounds into words.
|
|
106
112
|
*/
|
|
107
113
|
function toErrorResult(error, hints, onAuthFailure) {
|
|
108
114
|
if (isShipError(error)) {
|
|
@@ -131,7 +137,7 @@ function toErrorResult(error, hints, onAuthFailure) {
|
|
|
131
137
|
}
|
|
132
138
|
return {
|
|
133
139
|
content: [{ type: 'text', text: message }],
|
|
134
|
-
|
|
140
|
+
_meta: { [ERROR_META_KEY]: { ...error.toResponse() } },
|
|
135
141
|
isError: true,
|
|
136
142
|
};
|
|
137
143
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
* extra — because adding an export is the quiet failure: everything published
|
|
65
65
|
* becomes a breaking change to remove.
|
|
66
66
|
*/
|
|
67
|
-
export { type AuthFailure, type CallFn, type CallOptions, createCall, type ErrorHints, } from './call.js';
|
|
67
|
+
export { type AuthFailure, type CallFn, type CallOptions, createCall, ERROR_META_KEY, type ErrorHints, } from './call.js';
|
|
68
68
|
export { createServer } from './server.js';
|
|
69
69
|
export { ACCOUNT_TOOL_NAMES, type AccountToolName, registerAccountTools, TOOLS, type ToolName, } from './tools.js';
|
|
70
70
|
export { annotate, DESCRIPTION_BLOCKS, INSTRUCTION_BLOCKS, PARAM_DESCRIPTIONS, PUBLIC_EXPIRY, SERVER_INFO, SERVER_NAME, type ToolContract, titled, UPLOAD_TOOL_NAME, UPLOAD_TOOL_TITLE, } from './vocabulary.js';
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
* extra — because adding an export is the quiet failure: everything published
|
|
65
65
|
* becomes a breaking change to remove.
|
|
66
66
|
*/
|
|
67
|
-
export { createCall, } from './call.js';
|
|
67
|
+
export { createCall, ERROR_META_KEY, } from './call.js';
|
|
68
68
|
export { createServer } from './server.js';
|
|
69
69
|
export { ACCOUNT_TOOL_NAMES, registerAccountTools, TOOLS, } from './tools.js';
|
|
70
70
|
export { annotate, DESCRIPTION_BLOCKS, INSTRUCTION_BLOCKS, PARAM_DESCRIPTIONS, PUBLIC_EXPIRY, SERVER_INFO, SERVER_NAME, titled, UPLOAD_TOOL_NAME, UPLOAD_TOOL_TITLE, } from './vocabulary.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipstatic/mcp",
|
|
3
|
-
"version": "2.8.0
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Deploy static websites, landing pages, and prototypes instantly. Free, no account needed. Start with the hosted endpoint at mcp.shipstatic.com, or run the same fifteen tools on your own machine with this package.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"license": "MIT",
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
70
|
-
"@shipstatic/ship": "3.10.0
|
|
71
|
-
"@shipstatic/types": "3.15.0
|
|
70
|
+
"@shipstatic/ship": "3.10.0",
|
|
71
|
+
"@shipstatic/types": "3.15.0",
|
|
72
72
|
"zod": "^4.4.3"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|