apps 0.0.1-beta.35 → 0.0.1-beta.37
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/framework-reference.json +1 -1
- package/js/{chunk-KZFV3WCJ.js → chunk-24EIFQYZ.js} +377 -50
- package/js/chunk-2FWXCU5I.js +16 -0
- package/js/{chunk-YYK6GEMC.js → chunk-3LRFKLUX.js} +24 -17
- package/js/{chunk-VBVOPW4U.js → chunk-7KEKFBV7.js} +1 -1
- package/js/{chunk-FFTALB6S.js → chunk-BWUHMKHQ.js} +1 -1
- package/js/{chunk-KBXQOJYW.js → chunk-CAOHGMNW.js} +2 -2
- package/js/{chunk-SRB2WDU7.js → chunk-D45FU4TZ.js} +1 -1
- package/js/{chunk-UWOIEJ56.js → chunk-GHDZEEPO.js} +26 -31
- package/js/{chunk-I7CNZ4CM.js → chunk-KEZ4YZSP.js} +18 -4
- package/js/{chunk-5KNA2Z5I.js → chunk-LQBR7AI7.js} +294 -164
- package/js/{chunk-LUROQKFP.js → chunk-QQKHJ72Y.js} +18 -10
- package/js/{chunk-IA3VSGR4.js → chunk-U74JVKTQ.js} +3 -3
- package/js/{chunk-5CQMUXW7.js → chunk-UCOMVHGW.js} +2 -2
- package/js/client.js +2 -1
- package/js/contracts.js +7 -4
- package/js/effect.js +10 -9
- package/js/graphql.js +11 -10
- package/js/host.js +10 -9
- package/js/index.js +5 -4
- package/js/mcp/effect.js +12 -11
- package/js/mcp/stdio.js +12 -11
- package/js/mcp.js +13 -12
- package/js/openapi.js +9 -8
- package/js/skills/effect.js +3 -2
- package/js/skills.js +47 -33
- package/js/ui/serving.js +2 -1
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/host.d.ts +10 -6
- package/types/apps/src/contracts/mcp.d.ts +6 -1
- package/types/apps/src/contracts/openapi.d.ts +1 -1
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +8 -1
- package/types/apps/src/contracts/protocols/2.d.ts +1 -1
- package/types/apps/src/contracts/protocols/3.d.ts +1 -2
- package/types/apps/src/contracts/protocols/4.d.ts +1 -2
- package/types/apps/src/contracts/protocols/5.d.ts +3 -3
- package/types/apps/src/contracts/protocols/6.d.ts +3 -3
- package/types/apps/src/contracts/protocols/7.d.ts +3 -3
- package/types/apps/src/contracts/protocols/8.d.ts +13 -2
- package/types/apps/src/contracts/protocols/9.d.ts +1106 -0
- package/types/apps/src/contracts/skills.d.ts +5 -0
- package/types/apps/src/contracts/workflows.d.ts +6 -0
- package/types/apps/src/implementation/failure-detail.d.ts +4 -3
- package/types/apps/src/implementation/mcp-client.d.ts +1 -1
- package/types/apps/src/implementation/mcp.d.ts +1 -1
- package/types/apps/src/implementation/openapi-compile.d.ts +1 -1
- package/types/apps/src/implementation/router-catalog.d.ts +2 -3
- package/types/apps/src/implementation/skills.d.ts +8 -8
- package/types/apps/src/skills.d.ts +2 -1
- package/types/telemetry/src/app-records.d.ts +42 -0
- package/types/telemetry/src/recorded-failure.d.ts +20 -0
- package/types/utils/src/api-error.d.ts +5 -0
- package/types/utils/src/recorded-message.d.ts +15 -0
|
@@ -16,9 +16,11 @@ import {
|
|
|
16
16
|
} from "./chunk-BI6R577B.js";
|
|
17
17
|
import {
|
|
18
18
|
AppSkillName,
|
|
19
|
-
AppSkills
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
AppSkills
|
|
20
|
+
} from "./chunk-KEZ4YZSP.js";
|
|
21
|
+
import {
|
|
22
|
+
RecordedMessage
|
|
23
|
+
} from "./chunk-2FWXCU5I.js";
|
|
22
24
|
import {
|
|
23
25
|
AccountId,
|
|
24
26
|
HttpUrl,
|
|
@@ -81,125 +83,6 @@ import {
|
|
|
81
83
|
withDefault
|
|
82
84
|
} from "./chunk-IJQ5LE74.js";
|
|
83
85
|
|
|
84
|
-
// src/contracts/router.ts
|
|
85
|
-
var reservedRouterKeys = /* @__PURE__ */ new Set([
|
|
86
|
-
"__proto__",
|
|
87
|
-
"constructor",
|
|
88
|
-
"prototype"
|
|
89
|
-
]);
|
|
90
|
-
var RouterKey = Schema_exports.String.check(
|
|
91
|
-
Schema_exports.isPattern(/^[A-Za-z_][A-Za-z0-9_-]{0,99}$/),
|
|
92
|
-
Schema_exports.makeFilter((key) => !reservedRouterKeys.has(key))
|
|
93
|
-
);
|
|
94
|
-
var RouterIcon = Schema_exports.Struct({
|
|
95
|
-
src: Schema_exports.NonEmptyString,
|
|
96
|
-
mimeType: Schema_exports.optionalKey(Schema_exports.String),
|
|
97
|
-
sizes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
|
|
98
|
-
theme: Schema_exports.optionalKey(Schema_exports.Literals(["light", "dark"]))
|
|
99
|
-
});
|
|
100
|
-
var RouterMeta = Schema_exports.Struct({
|
|
101
|
-
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
102
|
-
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
103
|
-
instructions: Schema_exports.optionalKey(Schema_exports.String),
|
|
104
|
-
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
105
|
-
tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String))
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
// src/contracts/tools.ts
|
|
109
|
-
var ToolAnnotations = Schema_exports.Struct({
|
|
110
|
-
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
111
|
-
readOnlyHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
112
|
-
destructiveHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
113
|
-
idempotentHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
114
|
-
openWorldHint: Schema_exports.optionalKey(Schema_exports.Boolean)
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// src/contracts/mcp.ts
|
|
118
|
-
var McpClientLimits = Schema_exports.Struct({
|
|
119
|
-
timeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
120
|
-
maxTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
121
|
-
maxTools: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
122
|
-
maxPaginationCursors: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
123
|
-
cleanupTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
124
|
-
});
|
|
125
|
-
var defaultMcpClientLimits = McpClientLimits.make({
|
|
126
|
-
timeoutMs: 3e4,
|
|
127
|
-
maxTimeoutMs: 3e5,
|
|
128
|
-
maxTools: 5e4,
|
|
129
|
-
maxPaginationCursors: 1e3,
|
|
130
|
-
cleanupTimeoutMs: 1e3
|
|
131
|
-
});
|
|
132
|
-
var mcpSdkTimerCeilingMs = 2147483647;
|
|
133
|
-
var McpToolsOptions = Schema_exports.Struct({
|
|
134
|
-
url: HttpUrl,
|
|
135
|
-
accountId: Schema_exports.optional(AccountId),
|
|
136
|
-
headers: Schema_exports.optional(Schema_exports.Record(Schema_exports.String, Schema_exports.String)),
|
|
137
|
-
signal: Schema_exports.optional(Schema_exports.instanceOf(AbortSignal)),
|
|
138
|
-
timeoutMs: Schema_exports.optional(
|
|
139
|
-
Schema_exports.Number.check(
|
|
140
|
-
Schema_exports.isInt(),
|
|
141
|
-
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
142
|
-
)
|
|
143
|
-
)
|
|
144
|
-
});
|
|
145
|
-
var McpHealthInput = Schema_exports.Struct({
|
|
146
|
-
...McpToolsOptions.fields,
|
|
147
|
-
headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
148
|
-
deadline: Schema_exports.optional(Schema_exports.Finite)
|
|
149
|
-
});
|
|
150
|
-
var mcpHealthReserveMs = 2 * defaultMcpClientLimits.cleanupTimeoutMs + 250;
|
|
151
|
-
var McpToolResult = Schema_exports.Struct({
|
|
152
|
-
content: Schema_exports.Array(JsonObject2),
|
|
153
|
-
structuredContent: Schema_exports.optionalKey(JsonObject2),
|
|
154
|
-
isError: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
155
|
-
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
156
|
-
});
|
|
157
|
-
var McpToolMetadata = Schema_exports.Struct({
|
|
158
|
-
name: Schema_exports.String,
|
|
159
|
-
title: Schema_exports.optional(Schema_exports.String),
|
|
160
|
-
description: Schema_exports.optional(Schema_exports.String),
|
|
161
|
-
inputSchema: JsonObject2,
|
|
162
|
-
outputSchema: Schema_exports.optional(JsonObject2),
|
|
163
|
-
annotations: Schema_exports.optional(ToolAnnotations),
|
|
164
|
-
_meta: Schema_exports.optional(JsonObject2)
|
|
165
|
-
});
|
|
166
|
-
var McpServerHeader = Schema_exports.Struct({
|
|
167
|
-
name: Schema_exports.optionalKey(Schema_exports.String),
|
|
168
|
-
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
169
|
-
version: Schema_exports.optionalKey(Schema_exports.String),
|
|
170
|
-
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
171
|
-
websiteUrl: Schema_exports.optionalKey(Schema_exports.String),
|
|
172
|
-
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
173
|
-
instructions: Schema_exports.optionalKey(Schema_exports.String)
|
|
174
|
-
});
|
|
175
|
-
var McpError = class extends Schema_exports.TaggedError()("McpError", {
|
|
176
|
-
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
177
|
-
reason: Schema_exports.Literals([
|
|
178
|
-
"request",
|
|
179
|
-
"unauthorized",
|
|
180
|
-
"invalid_response",
|
|
181
|
-
"timeout",
|
|
182
|
-
"invalid_input"
|
|
183
|
-
]),
|
|
184
|
-
status: Schema_exports.optional(Schema_exports.Number),
|
|
185
|
-
upstream: Schema_exports.optional(UpstreamError)
|
|
186
|
-
}) {
|
|
187
|
-
};
|
|
188
|
-
var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
|
|
189
|
-
"McpCredentialsUnverified",
|
|
190
|
-
{ anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError, ProviderError]) }
|
|
191
|
-
) {
|
|
192
|
-
};
|
|
193
|
-
var ProcessConfig = Schema_exports.Struct({
|
|
194
|
-
command: Schema_exports.NonEmptyString,
|
|
195
|
-
args: Schema_exports.Array(Schema_exports.String),
|
|
196
|
-
cwd: Schema_exports.optional(Schema_exports.String),
|
|
197
|
-
env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
198
|
-
timeoutMs: Schema_exports.Int.check(
|
|
199
|
-
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
200
|
-
)
|
|
201
|
-
});
|
|
202
|
-
|
|
203
86
|
// src/contracts/api-response-error.ts
|
|
204
87
|
var maxApiErrorInstructionsLength = 4096;
|
|
205
88
|
var ApiErrorRecovery = Schema_exports.Struct({
|
|
@@ -291,6 +174,13 @@ var WorkflowFailure = class extends Schema_exports.TaggedError()("WorkflowFailur
|
|
|
291
174
|
]),
|
|
292
175
|
retryable: Schema_exports.Boolean
|
|
293
176
|
}) {
|
|
177
|
+
/**
|
|
178
|
+
* The step name and error detail are the app's. Its run's owner reads them; telemetry records
|
|
179
|
+
* only the reason, however the failure was built or decoded.
|
|
180
|
+
*/
|
|
181
|
+
get [RecordedMessage]() {
|
|
182
|
+
return this.step === void 0 && this.errorName === void 0 && !this.message ? void 0 : `The workflow failed (${this.reason}); the app's error is not recorded`;
|
|
183
|
+
}
|
|
294
184
|
};
|
|
295
185
|
var NonRetryableError = class extends Error {
|
|
296
186
|
name = "NonRetryableError";
|
|
@@ -796,7 +686,7 @@ var InternalError = class _InternalError extends (/* @__PURE__ */ Error2("effect
|
|
|
796
686
|
message: "Not implemented"
|
|
797
687
|
});
|
|
798
688
|
};
|
|
799
|
-
var
|
|
689
|
+
var McpError = /* @__PURE__ */ Union([ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError, McpErrorBase]);
|
|
800
690
|
var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
|
|
801
691
|
...ResultMeta.fields,
|
|
802
692
|
/**
|
|
@@ -819,7 +709,7 @@ var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ S
|
|
|
819
709
|
};
|
|
820
710
|
var Initialize = class extends (/* @__PURE__ */ make2("initialize", {
|
|
821
711
|
success: InitializeResult,
|
|
822
|
-
error:
|
|
712
|
+
error: McpError,
|
|
823
713
|
payload: {
|
|
824
714
|
...RequestMeta.fields,
|
|
825
715
|
/**
|
|
@@ -1018,7 +908,7 @@ var ReadResourceResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */
|
|
|
1018
908
|
};
|
|
1019
909
|
var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
|
|
1020
910
|
success: ReadResourceResult,
|
|
1021
|
-
error:
|
|
911
|
+
error: McpError,
|
|
1022
912
|
payload: {
|
|
1023
913
|
...RequestMeta.fields,
|
|
1024
914
|
/**
|
|
@@ -1031,7 +921,7 @@ var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
|
|
|
1031
921
|
};
|
|
1032
922
|
var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
|
|
1033
923
|
success: /* @__PURE__ */ Struct({}),
|
|
1034
|
-
error:
|
|
924
|
+
error: McpError,
|
|
1035
925
|
payload: {
|
|
1036
926
|
...RequestMeta.fields,
|
|
1037
927
|
/**
|
|
@@ -1044,7 +934,7 @@ var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
|
|
|
1044
934
|
};
|
|
1045
935
|
var Unsubscribe = class extends (/* @__PURE__ */ make2("resources/unsubscribe", {
|
|
1046
936
|
success: /* @__PURE__ */ Struct({}),
|
|
1047
|
-
error:
|
|
937
|
+
error: McpError,
|
|
1048
938
|
payload: {
|
|
1049
939
|
...RequestMeta.fields,
|
|
1050
940
|
/**
|
|
@@ -1188,7 +1078,7 @@ var GetPromptResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema
|
|
|
1188
1078
|
};
|
|
1189
1079
|
var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
|
|
1190
1080
|
success: GetPromptResult,
|
|
1191
|
-
error:
|
|
1081
|
+
error: McpError,
|
|
1192
1082
|
payload: {
|
|
1193
1083
|
...RequestMeta.fields,
|
|
1194
1084
|
/**
|
|
@@ -1203,7 +1093,7 @@ var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
|
|
|
1203
1093
|
}
|
|
1204
1094
|
})) {
|
|
1205
1095
|
};
|
|
1206
|
-
var
|
|
1096
|
+
var ToolAnnotations = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
|
|
1207
1097
|
/**
|
|
1208
1098
|
* A human-readable title for the tool.
|
|
1209
1099
|
*/
|
|
@@ -1272,7 +1162,7 @@ var Tool = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/Tool")({
|
|
|
1272
1162
|
/**
|
|
1273
1163
|
* Optional additional tool information.
|
|
1274
1164
|
*/
|
|
1275
|
-
annotations: /* @__PURE__ */ optional2(
|
|
1165
|
+
annotations: /* @__PURE__ */ optional2(ToolAnnotations),
|
|
1276
1166
|
/**
|
|
1277
1167
|
* Icons that clients can display for this tool.
|
|
1278
1168
|
*/
|
|
@@ -1308,7 +1198,7 @@ var CallToolResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/
|
|
|
1308
1198
|
};
|
|
1309
1199
|
var CallTool = class extends (/* @__PURE__ */ make2("tools/call", {
|
|
1310
1200
|
success: CallToolResult,
|
|
1311
|
-
error:
|
|
1201
|
+
error: McpError,
|
|
1312
1202
|
payload: {
|
|
1313
1203
|
...RequestMeta.fields,
|
|
1314
1204
|
name: String,
|
|
@@ -1328,7 +1218,7 @@ var SetLevel = class extends (/* @__PURE__ */ make2("logging/setLevel", {
|
|
|
1328
1218
|
level: LoggingLevel
|
|
1329
1219
|
},
|
|
1330
1220
|
success: /* @__PURE__ */ Struct({}),
|
|
1331
|
-
error:
|
|
1221
|
+
error: McpError
|
|
1332
1222
|
})) {
|
|
1333
1223
|
};
|
|
1334
1224
|
var LoggingMessageNotification = class extends (/* @__PURE__ */ make2("notifications/message", {
|
|
@@ -1474,7 +1364,7 @@ var CreateMessageResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
|
|
|
1474
1364
|
};
|
|
1475
1365
|
var CreateMessage = class extends (/* @__PURE__ */ make2("sampling/createMessage", {
|
|
1476
1366
|
success: CreateMessageResult,
|
|
1477
|
-
error:
|
|
1367
|
+
error: McpError,
|
|
1478
1368
|
payload: {
|
|
1479
1369
|
messages: /* @__PURE__ */ ArraySchema(SamplingMessage),
|
|
1480
1370
|
/**
|
|
@@ -1686,7 +1576,7 @@ var ElicitDeclineResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
|
|
|
1686
1576
|
var ElicitResult = /* @__PURE__ */ Union([ElicitAcceptResult, ElicitDeclineResult]);
|
|
1687
1577
|
var Elicit = class extends (/* @__PURE__ */ make2("elicitation/create", {
|
|
1688
1578
|
success: ElicitResult,
|
|
1689
|
-
error:
|
|
1579
|
+
error: McpError,
|
|
1690
1580
|
payload: ElicitRequestParams
|
|
1691
1581
|
})) {
|
|
1692
1582
|
};
|
|
@@ -1752,6 +1642,126 @@ ${JSON.stringify(input, null, 2)}`,
|
|
|
1752
1642
|
requestedSchema: { type: "object", properties: {} }
|
|
1753
1643
|
});
|
|
1754
1644
|
|
|
1645
|
+
// src/contracts/router.ts
|
|
1646
|
+
var reservedRouterKeys = /* @__PURE__ */ new Set([
|
|
1647
|
+
"__proto__",
|
|
1648
|
+
"constructor",
|
|
1649
|
+
"prototype"
|
|
1650
|
+
]);
|
|
1651
|
+
var RouterKey = Schema_exports.String.check(
|
|
1652
|
+
Schema_exports.isPattern(/^[A-Za-z_][A-Za-z0-9_-]{0,99}$/),
|
|
1653
|
+
Schema_exports.makeFilter((key) => !reservedRouterKeys.has(key))
|
|
1654
|
+
);
|
|
1655
|
+
var RouterIcon = Schema_exports.Struct({
|
|
1656
|
+
src: Schema_exports.NonEmptyString,
|
|
1657
|
+
mimeType: Schema_exports.optionalKey(Schema_exports.String),
|
|
1658
|
+
sizes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
|
|
1659
|
+
theme: Schema_exports.optionalKey(Schema_exports.Literals(["light", "dark"]))
|
|
1660
|
+
});
|
|
1661
|
+
var RouterMeta = Schema_exports.Struct({
|
|
1662
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1663
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
1664
|
+
instructions: Schema_exports.optionalKey(Schema_exports.String),
|
|
1665
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
1666
|
+
tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String))
|
|
1667
|
+
});
|
|
1668
|
+
|
|
1669
|
+
// src/contracts/tools.ts
|
|
1670
|
+
var ToolAnnotations2 = Schema_exports.Struct({
|
|
1671
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1672
|
+
readOnlyHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1673
|
+
destructiveHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1674
|
+
idempotentHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1675
|
+
openWorldHint: Schema_exports.optionalKey(Schema_exports.Boolean)
|
|
1676
|
+
});
|
|
1677
|
+
|
|
1678
|
+
// src/contracts/mcp.ts
|
|
1679
|
+
var McpClientLimits = Schema_exports.Struct({
|
|
1680
|
+
timeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1681
|
+
maxTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1682
|
+
maxTools: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1683
|
+
maxPaginationCursors: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1684
|
+
cleanupTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
1685
|
+
});
|
|
1686
|
+
var defaultMcpClientLimits = McpClientLimits.make({
|
|
1687
|
+
timeoutMs: 3e4,
|
|
1688
|
+
maxTimeoutMs: 3e5,
|
|
1689
|
+
maxTools: 5e4,
|
|
1690
|
+
maxPaginationCursors: 1e3,
|
|
1691
|
+
cleanupTimeoutMs: 1e3
|
|
1692
|
+
});
|
|
1693
|
+
var mcpSdkTimerCeilingMs = 2147483647;
|
|
1694
|
+
var McpToolsOptions = Schema_exports.Struct({
|
|
1695
|
+
url: HttpUrl,
|
|
1696
|
+
accountId: Schema_exports.optional(AccountId),
|
|
1697
|
+
headers: Schema_exports.optional(Schema_exports.Record(Schema_exports.String, Schema_exports.String)),
|
|
1698
|
+
signal: Schema_exports.optional(Schema_exports.instanceOf(AbortSignal)),
|
|
1699
|
+
timeoutMs: Schema_exports.optional(
|
|
1700
|
+
Schema_exports.Number.check(
|
|
1701
|
+
Schema_exports.isInt(),
|
|
1702
|
+
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
1703
|
+
)
|
|
1704
|
+
)
|
|
1705
|
+
});
|
|
1706
|
+
var McpHealthInput = Schema_exports.Struct({
|
|
1707
|
+
...McpToolsOptions.fields,
|
|
1708
|
+
headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
1709
|
+
deadline: Schema_exports.optional(Schema_exports.Finite)
|
|
1710
|
+
});
|
|
1711
|
+
var mcpHealthReserveMs = 2 * defaultMcpClientLimits.cleanupTimeoutMs + 250;
|
|
1712
|
+
var McpToolResult = Schema_exports.Struct({
|
|
1713
|
+
content: Schema_exports.Array(JsonObject2),
|
|
1714
|
+
structuredContent: Schema_exports.optionalKey(JsonObject2),
|
|
1715
|
+
isError: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1716
|
+
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
1717
|
+
});
|
|
1718
|
+
var McpToolMetadata = Schema_exports.Struct({
|
|
1719
|
+
name: Schema_exports.String,
|
|
1720
|
+
title: Schema_exports.optional(Schema_exports.String),
|
|
1721
|
+
description: Schema_exports.optional(Schema_exports.String),
|
|
1722
|
+
inputSchema: JsonObject2,
|
|
1723
|
+
outputSchema: Schema_exports.optional(JsonObject2),
|
|
1724
|
+
annotations: Schema_exports.optional(ToolAnnotations2),
|
|
1725
|
+
_meta: Schema_exports.optional(JsonObject2)
|
|
1726
|
+
});
|
|
1727
|
+
var McpServerHeader = Schema_exports.Struct({
|
|
1728
|
+
name: Schema_exports.optionalKey(Schema_exports.String),
|
|
1729
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1730
|
+
version: Schema_exports.optionalKey(Schema_exports.String),
|
|
1731
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
1732
|
+
websiteUrl: Schema_exports.optionalKey(Schema_exports.String),
|
|
1733
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
1734
|
+
instructions: Schema_exports.optionalKey(Schema_exports.String)
|
|
1735
|
+
});
|
|
1736
|
+
var McpError2 = class extends Schema_exports.TaggedError()("McpError", {
|
|
1737
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
1738
|
+
reason: Schema_exports.Literals([
|
|
1739
|
+
"request",
|
|
1740
|
+
"unauthorized",
|
|
1741
|
+
"invalid_response",
|
|
1742
|
+
"timeout",
|
|
1743
|
+
"invalid_input"
|
|
1744
|
+
]),
|
|
1745
|
+
status: Schema_exports.optional(Schema_exports.Number),
|
|
1746
|
+
upstream: Schema_exports.optional(UpstreamError),
|
|
1747
|
+
session: Schema_exports.optional(Schema_exports.Literal(true))
|
|
1748
|
+
}) {
|
|
1749
|
+
};
|
|
1750
|
+
var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
|
|
1751
|
+
"McpCredentialsUnverified",
|
|
1752
|
+
{ anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError2, ProviderError]) }
|
|
1753
|
+
) {
|
|
1754
|
+
};
|
|
1755
|
+
var ProcessConfig = Schema_exports.Struct({
|
|
1756
|
+
command: Schema_exports.NonEmptyString,
|
|
1757
|
+
args: Schema_exports.Array(Schema_exports.String),
|
|
1758
|
+
cwd: Schema_exports.optional(Schema_exports.String),
|
|
1759
|
+
env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
1760
|
+
timeoutMs: Schema_exports.Int.check(
|
|
1761
|
+
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
1762
|
+
)
|
|
1763
|
+
});
|
|
1764
|
+
|
|
1755
1765
|
// src/contracts/webhook-protocol.ts
|
|
1756
1766
|
var WebhookTransportLimits = Schema_exports.Struct({
|
|
1757
1767
|
maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
@@ -1963,7 +1973,7 @@ var ManyAccounts = class extends Data_exports.TaggedClass("many") {
|
|
|
1963
1973
|
};
|
|
1964
1974
|
|
|
1965
1975
|
// src/contracts/protocol-version.ts
|
|
1966
|
-
var frameworkProtocol =
|
|
1976
|
+
var frameworkProtocol = 9;
|
|
1967
1977
|
|
|
1968
1978
|
// src/contracts/protocols/oauth.ts
|
|
1969
1979
|
var OAuthClientAuth2 = Schema_exports.Literals([
|
|
@@ -2141,6 +2151,20 @@ var McpError3 = class extends Schema_exports.TaggedError()("McpError", {
|
|
|
2141
2151
|
status: Schema_exports.optional(Schema_exports.Number)
|
|
2142
2152
|
}) {
|
|
2143
2153
|
};
|
|
2154
|
+
var SkillLoadFailed = class extends Schema_exports.TaggedError()("SkillLoadFailed", {
|
|
2155
|
+
reason: Schema_exports.Literals([
|
|
2156
|
+
"source",
|
|
2157
|
+
"request",
|
|
2158
|
+
"rate_limited",
|
|
2159
|
+
"document",
|
|
2160
|
+
"limit",
|
|
2161
|
+
"changed",
|
|
2162
|
+
"encoding"
|
|
2163
|
+
]),
|
|
2164
|
+
message: Schema_exports.optional(Schema_exports.String.check(Schema_exports.isMaxLength(500))),
|
|
2165
|
+
status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 })))
|
|
2166
|
+
}) {
|
|
2167
|
+
};
|
|
2144
2168
|
var WorkflowFailure2 = class extends Schema_exports.TaggedError()("WorkflowFailure", {
|
|
2145
2169
|
reason: Schema_exports.Literals([
|
|
2146
2170
|
"unavailable",
|
|
@@ -2236,7 +2260,7 @@ var HostedTool = Schema_exports.Struct({
|
|
|
2236
2260
|
readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
2237
2261
|
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
2238
2262
|
outputSchema: Schema_exports.optionalKey(JsonObject2),
|
|
2239
|
-
annotations: Schema_exports.optionalKey(
|
|
2263
|
+
annotations: Schema_exports.optionalKey(ToolAnnotations2),
|
|
2240
2264
|
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
2241
2265
|
});
|
|
2242
2266
|
var HostedToolSummary = HostedTool.mapFields(
|
|
@@ -2492,7 +2516,7 @@ var HostedTool2 = Schema_exports.Struct({
|
|
|
2492
2516
|
readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
2493
2517
|
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
2494
2518
|
outputSchema: Schema_exports.optionalKey(JsonObject2),
|
|
2495
|
-
annotations: Schema_exports.optionalKey(
|
|
2519
|
+
annotations: Schema_exports.optionalKey(ToolAnnotations2),
|
|
2496
2520
|
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
2497
2521
|
});
|
|
2498
2522
|
var HostedToolSummary2 = HostedTool2.mapFields(
|
|
@@ -2804,6 +2828,19 @@ var protocol7 = {
|
|
|
2804
2828
|
};
|
|
2805
2829
|
|
|
2806
2830
|
// src/contracts/protocols/8.ts
|
|
2831
|
+
var McpError4 = class extends Schema_exports.TaggedError()("McpError", {
|
|
2832
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
2833
|
+
reason: Schema_exports.Literals([
|
|
2834
|
+
"request",
|
|
2835
|
+
"unauthorized",
|
|
2836
|
+
"invalid_response",
|
|
2837
|
+
"timeout",
|
|
2838
|
+
"invalid_input"
|
|
2839
|
+
]),
|
|
2840
|
+
status: Schema_exports.optional(Schema_exports.Number),
|
|
2841
|
+
upstream: Schema_exports.optional(UpstreamError)
|
|
2842
|
+
}) {
|
|
2843
|
+
};
|
|
2807
2844
|
var HostDeclarationInvalid3 = class extends Schema_exports.TaggedError()(
|
|
2808
2845
|
"HostDeclarationInvalid",
|
|
2809
2846
|
FailureDetail
|
|
@@ -2821,7 +2858,7 @@ var HostOperationFailed3 = class extends Schema_exports.TaggedError()(
|
|
|
2821
2858
|
};
|
|
2822
2859
|
var HostRouterError2 = Schema_exports.Union([
|
|
2823
2860
|
ProviderError,
|
|
2824
|
-
|
|
2861
|
+
McpError4,
|
|
2825
2862
|
SkillLoadFailed,
|
|
2826
2863
|
HostDeclarationInvalid3,
|
|
2827
2864
|
HostEvaluationFailed3
|
|
@@ -2841,7 +2878,7 @@ var HostedCatalogSummary2 = Schema_exports.Struct({
|
|
|
2841
2878
|
var HostError4 = Schema_exports.Union([
|
|
2842
2879
|
OpenapiResponseError,
|
|
2843
2880
|
ProviderError,
|
|
2844
|
-
|
|
2881
|
+
McpError4,
|
|
2845
2882
|
SkillLoadFailed,
|
|
2846
2883
|
WorkflowFailure,
|
|
2847
2884
|
HostRequestInvalid,
|
|
@@ -2879,6 +2916,96 @@ var protocol8 = {
|
|
|
2879
2916
|
}
|
|
2880
2917
|
};
|
|
2881
2918
|
|
|
2919
|
+
// src/contracts/protocols/9.ts
|
|
2920
|
+
var McpError5 = class extends Schema_exports.TaggedError()("McpError", {
|
|
2921
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
2922
|
+
reason: Schema_exports.Literals([
|
|
2923
|
+
"request",
|
|
2924
|
+
"unauthorized",
|
|
2925
|
+
"invalid_response",
|
|
2926
|
+
"timeout",
|
|
2927
|
+
"invalid_input"
|
|
2928
|
+
]),
|
|
2929
|
+
status: Schema_exports.optional(Schema_exports.Number),
|
|
2930
|
+
upstream: Schema_exports.optional(UpstreamError),
|
|
2931
|
+
session: Schema_exports.optional(Schema_exports.Literal(true))
|
|
2932
|
+
}) {
|
|
2933
|
+
};
|
|
2934
|
+
var SkillLoadFailed2 = class extends Schema_exports.TaggedError()("SkillLoadFailed", {
|
|
2935
|
+
reason: Schema_exports.Literals([
|
|
2936
|
+
"source",
|
|
2937
|
+
"request",
|
|
2938
|
+
"rate_limited",
|
|
2939
|
+
"document",
|
|
2940
|
+
"limit",
|
|
2941
|
+
"changed",
|
|
2942
|
+
"encoding"
|
|
2943
|
+
]),
|
|
2944
|
+
message: Schema_exports.optional(Schema_exports.String.check(Schema_exports.isMaxLength(500))),
|
|
2945
|
+
status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 }))),
|
|
2946
|
+
missing: Schema_exports.optional(Schema_exports.Literals(["repository", "ref"]))
|
|
2947
|
+
}) {
|
|
2948
|
+
};
|
|
2949
|
+
var HostRouterError3 = Schema_exports.Union([
|
|
2950
|
+
ProviderError,
|
|
2951
|
+
McpError5,
|
|
2952
|
+
SkillLoadFailed2,
|
|
2953
|
+
HostDeclarationInvalid3,
|
|
2954
|
+
HostEvaluationFailed3
|
|
2955
|
+
]);
|
|
2956
|
+
var HostedRouter3 = Schema_exports.Struct({
|
|
2957
|
+
...HostedRouter2.fields,
|
|
2958
|
+
error: Schema_exports.optionalKey(HostRouterError3)
|
|
2959
|
+
});
|
|
2960
|
+
var HostedCatalog3 = Schema_exports.Struct({
|
|
2961
|
+
...HostedCatalog2.fields,
|
|
2962
|
+
routers: Schema_exports.Array(HostedRouter3)
|
|
2963
|
+
});
|
|
2964
|
+
var HostedCatalogSummary3 = Schema_exports.Struct({
|
|
2965
|
+
...HostedCatalogSummary2.fields,
|
|
2966
|
+
routers: Schema_exports.Array(HostedRouter3)
|
|
2967
|
+
});
|
|
2968
|
+
var HostError5 = Schema_exports.Union([
|
|
2969
|
+
OpenapiResponseError,
|
|
2970
|
+
ProviderError,
|
|
2971
|
+
McpError5,
|
|
2972
|
+
SkillLoadFailed2,
|
|
2973
|
+
WorkflowFailure,
|
|
2974
|
+
HostRequestInvalid,
|
|
2975
|
+
HostAccountsInvalid,
|
|
2976
|
+
HostDeclarationInvalid3,
|
|
2977
|
+
HostEvaluationFailed3,
|
|
2978
|
+
HostOperationNotFound,
|
|
2979
|
+
HostOperationFailed3,
|
|
2980
|
+
DatabaseLimitExceeded,
|
|
2981
|
+
DatabaseFieldReserved,
|
|
2982
|
+
HostToolNotFound,
|
|
2983
|
+
HostInputInvalid,
|
|
2984
|
+
HostOutputInvalid,
|
|
2985
|
+
HostToolBlocked,
|
|
2986
|
+
HostToolApprovalRequired,
|
|
2987
|
+
HostToolPolicyFailed,
|
|
2988
|
+
ElicitationFailed,
|
|
2989
|
+
HostKindMismatch
|
|
2990
|
+
]);
|
|
2991
|
+
var HostResponse5 = Schema_exports.Union([
|
|
2992
|
+
Schema_exports.Struct({
|
|
2993
|
+
ok: Schema_exports.Literal(true),
|
|
2994
|
+
value: JsonValue,
|
|
2995
|
+
toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2996
|
+
}),
|
|
2997
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError5 })
|
|
2998
|
+
]);
|
|
2999
|
+
var protocol9 = {
|
|
3000
|
+
version: 9,
|
|
3001
|
+
schemas: {
|
|
3002
|
+
...protocol8.schemas,
|
|
3003
|
+
response: HostResponse5,
|
|
3004
|
+
catalog: HostedCatalog3,
|
|
3005
|
+
catalogSummary: HostedCatalogSummary3
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
3008
|
+
|
|
2882
3009
|
// src/contracts/host.ts
|
|
2883
3010
|
var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
|
|
2884
3011
|
var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
|
|
@@ -2896,8 +3023,8 @@ var HostRequirementsError = Schema_exports.Union([
|
|
|
2896
3023
|
]);
|
|
2897
3024
|
var HostInspectError = Schema_exports.Union([
|
|
2898
3025
|
ProviderError,
|
|
2899
|
-
|
|
2900
|
-
|
|
3026
|
+
McpError5,
|
|
3027
|
+
SkillLoadFailed2,
|
|
2901
3028
|
HostRequestInvalid,
|
|
2902
3029
|
HostDeclarationInvalid3,
|
|
2903
3030
|
HostAccountsInvalid,
|
|
@@ -2949,23 +3076,6 @@ export {
|
|
|
2949
3076
|
AccountCheckResult,
|
|
2950
3077
|
Provider,
|
|
2951
3078
|
ManyAccounts,
|
|
2952
|
-
reservedRouterKeys,
|
|
2953
|
-
RouterKey,
|
|
2954
|
-
RouterIcon,
|
|
2955
|
-
RouterMeta,
|
|
2956
|
-
ToolAnnotations,
|
|
2957
|
-
McpClientLimits,
|
|
2958
|
-
defaultMcpClientLimits,
|
|
2959
|
-
mcpSdkTimerCeilingMs,
|
|
2960
|
-
McpToolsOptions,
|
|
2961
|
-
McpHealthInput,
|
|
2962
|
-
mcpHealthReserveMs,
|
|
2963
|
-
McpToolResult,
|
|
2964
|
-
McpToolMetadata,
|
|
2965
|
-
McpServerHeader,
|
|
2966
|
-
McpError,
|
|
2967
|
-
McpCredentialsUnverified,
|
|
2968
|
-
ProcessConfig,
|
|
2969
3079
|
maxApiErrorInstructionsLength,
|
|
2970
3080
|
ApiErrorRecovery,
|
|
2971
3081
|
maxApiErrorMessageLength,
|
|
@@ -2999,6 +3109,23 @@ export {
|
|
|
2999
3109
|
ApprovalElicitation,
|
|
3000
3110
|
ApprovalResponse,
|
|
3001
3111
|
approvalElicitation,
|
|
3112
|
+
reservedRouterKeys,
|
|
3113
|
+
RouterKey,
|
|
3114
|
+
RouterIcon,
|
|
3115
|
+
RouterMeta,
|
|
3116
|
+
ToolAnnotations2 as ToolAnnotations,
|
|
3117
|
+
McpClientLimits,
|
|
3118
|
+
defaultMcpClientLimits,
|
|
3119
|
+
mcpSdkTimerCeilingMs,
|
|
3120
|
+
McpToolsOptions,
|
|
3121
|
+
McpHealthInput,
|
|
3122
|
+
mcpHealthReserveMs,
|
|
3123
|
+
McpToolResult,
|
|
3124
|
+
McpToolMetadata,
|
|
3125
|
+
McpServerHeader,
|
|
3126
|
+
McpError2 as McpError,
|
|
3127
|
+
McpCredentialsUnverified,
|
|
3128
|
+
ProcessConfig,
|
|
3002
3129
|
WebhookTransportLimits,
|
|
3003
3130
|
defaultWebhookTransportLimits,
|
|
3004
3131
|
WebhookRequestData,
|
|
@@ -3050,13 +3177,16 @@ export {
|
|
|
3050
3177
|
HostDeclarationInvalid3 as HostDeclarationInvalid,
|
|
3051
3178
|
HostEvaluationFailed3 as HostEvaluationFailed,
|
|
3052
3179
|
HostOperationFailed3 as HostOperationFailed,
|
|
3053
|
-
HostRouterError2 as HostRouterError,
|
|
3054
|
-
HostedRouter2 as HostedRouter,
|
|
3055
|
-
HostedCatalog2 as HostedCatalog,
|
|
3056
|
-
HostedCatalogSummary2 as HostedCatalogSummary,
|
|
3057
|
-
HostError4 as HostError,
|
|
3058
|
-
HostResponse4 as HostResponse,
|
|
3059
3180
|
protocol8,
|
|
3181
|
+
McpError5 as McpError2,
|
|
3182
|
+
SkillLoadFailed2 as SkillLoadFailed,
|
|
3183
|
+
HostRouterError3 as HostRouterError,
|
|
3184
|
+
HostedRouter3 as HostedRouter,
|
|
3185
|
+
HostedCatalog3 as HostedCatalog,
|
|
3186
|
+
HostedCatalogSummary3 as HostedCatalogSummary,
|
|
3187
|
+
HostError5 as HostError,
|
|
3188
|
+
HostResponse5 as HostResponse,
|
|
3189
|
+
protocol9,
|
|
3060
3190
|
skillsCommand,
|
|
3061
3191
|
skillCatalog,
|
|
3062
3192
|
inspectCommand,
|