apps 0.0.1-beta.35 → 0.0.1-beta.36
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-FFTALB6S.js → chunk-4U2VUDET.js} +1 -1
- package/js/{chunk-I7CNZ4CM.js → chunk-556EWA6P.js} +2 -1
- package/js/{chunk-IA3VSGR4.js → chunk-A2NN45C7.js} +3 -3
- package/js/{chunk-VBVOPW4U.js → chunk-BKJDZYK7.js} +1 -1
- package/js/{chunk-KBXQOJYW.js → chunk-CZLCA2O4.js} +2 -2
- package/js/{chunk-UWOIEJ56.js → chunk-UBAKWXAJ.js} +8 -17
- package/js/{chunk-LUROQKFP.js → chunk-WAGGHNWH.js} +16 -8
- package/js/{chunk-5CQMUXW7.js → chunk-WMVTBHGK.js} +2 -2
- package/js/{chunk-5KNA2Z5I.js → chunk-XEXUHXC3.js} +284 -164
- package/js/{chunk-YYK6GEMC.js → chunk-ZQWDOHEO.js} +24 -17
- package/js/contracts.js +6 -4
- package/js/effect.js +7 -7
- package/js/graphql.js +8 -8
- package/js/host.js +7 -7
- package/js/index.js +4 -4
- package/js/mcp/effect.js +9 -9
- package/js/mcp/stdio.js +9 -9
- package/js/mcp.js +10 -10
- package/js/openapi.js +6 -6
- package/js/skills/effect.js +2 -2
- package/js/skills.js +44 -31
- 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/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
|
@@ -16,9 +16,8 @@ import {
|
|
|
16
16
|
} from "./chunk-BI6R577B.js";
|
|
17
17
|
import {
|
|
18
18
|
AppSkillName,
|
|
19
|
-
AppSkills
|
|
20
|
-
|
|
21
|
-
} from "./chunk-I7CNZ4CM.js";
|
|
19
|
+
AppSkills
|
|
20
|
+
} from "./chunk-556EWA6P.js";
|
|
22
21
|
import {
|
|
23
22
|
AccountId,
|
|
24
23
|
HttpUrl,
|
|
@@ -81,125 +80,6 @@ import {
|
|
|
81
80
|
withDefault
|
|
82
81
|
} from "./chunk-IJQ5LE74.js";
|
|
83
82
|
|
|
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
83
|
// src/contracts/api-response-error.ts
|
|
204
84
|
var maxApiErrorInstructionsLength = 4096;
|
|
205
85
|
var ApiErrorRecovery = Schema_exports.Struct({
|
|
@@ -796,7 +676,7 @@ var InternalError = class _InternalError extends (/* @__PURE__ */ Error2("effect
|
|
|
796
676
|
message: "Not implemented"
|
|
797
677
|
});
|
|
798
678
|
};
|
|
799
|
-
var
|
|
679
|
+
var McpError = /* @__PURE__ */ Union([ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError, McpErrorBase]);
|
|
800
680
|
var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
|
|
801
681
|
...ResultMeta.fields,
|
|
802
682
|
/**
|
|
@@ -819,7 +699,7 @@ var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ S
|
|
|
819
699
|
};
|
|
820
700
|
var Initialize = class extends (/* @__PURE__ */ make2("initialize", {
|
|
821
701
|
success: InitializeResult,
|
|
822
|
-
error:
|
|
702
|
+
error: McpError,
|
|
823
703
|
payload: {
|
|
824
704
|
...RequestMeta.fields,
|
|
825
705
|
/**
|
|
@@ -1018,7 +898,7 @@ var ReadResourceResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */
|
|
|
1018
898
|
};
|
|
1019
899
|
var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
|
|
1020
900
|
success: ReadResourceResult,
|
|
1021
|
-
error:
|
|
901
|
+
error: McpError,
|
|
1022
902
|
payload: {
|
|
1023
903
|
...RequestMeta.fields,
|
|
1024
904
|
/**
|
|
@@ -1031,7 +911,7 @@ var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
|
|
|
1031
911
|
};
|
|
1032
912
|
var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
|
|
1033
913
|
success: /* @__PURE__ */ Struct({}),
|
|
1034
|
-
error:
|
|
914
|
+
error: McpError,
|
|
1035
915
|
payload: {
|
|
1036
916
|
...RequestMeta.fields,
|
|
1037
917
|
/**
|
|
@@ -1044,7 +924,7 @@ var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
|
|
|
1044
924
|
};
|
|
1045
925
|
var Unsubscribe = class extends (/* @__PURE__ */ make2("resources/unsubscribe", {
|
|
1046
926
|
success: /* @__PURE__ */ Struct({}),
|
|
1047
|
-
error:
|
|
927
|
+
error: McpError,
|
|
1048
928
|
payload: {
|
|
1049
929
|
...RequestMeta.fields,
|
|
1050
930
|
/**
|
|
@@ -1188,7 +1068,7 @@ var GetPromptResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema
|
|
|
1188
1068
|
};
|
|
1189
1069
|
var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
|
|
1190
1070
|
success: GetPromptResult,
|
|
1191
|
-
error:
|
|
1071
|
+
error: McpError,
|
|
1192
1072
|
payload: {
|
|
1193
1073
|
...RequestMeta.fields,
|
|
1194
1074
|
/**
|
|
@@ -1203,7 +1083,7 @@ var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
|
|
|
1203
1083
|
}
|
|
1204
1084
|
})) {
|
|
1205
1085
|
};
|
|
1206
|
-
var
|
|
1086
|
+
var ToolAnnotations = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
|
|
1207
1087
|
/**
|
|
1208
1088
|
* A human-readable title for the tool.
|
|
1209
1089
|
*/
|
|
@@ -1272,7 +1152,7 @@ var Tool = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/Tool")({
|
|
|
1272
1152
|
/**
|
|
1273
1153
|
* Optional additional tool information.
|
|
1274
1154
|
*/
|
|
1275
|
-
annotations: /* @__PURE__ */ optional2(
|
|
1155
|
+
annotations: /* @__PURE__ */ optional2(ToolAnnotations),
|
|
1276
1156
|
/**
|
|
1277
1157
|
* Icons that clients can display for this tool.
|
|
1278
1158
|
*/
|
|
@@ -1308,7 +1188,7 @@ var CallToolResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/
|
|
|
1308
1188
|
};
|
|
1309
1189
|
var CallTool = class extends (/* @__PURE__ */ make2("tools/call", {
|
|
1310
1190
|
success: CallToolResult,
|
|
1311
|
-
error:
|
|
1191
|
+
error: McpError,
|
|
1312
1192
|
payload: {
|
|
1313
1193
|
...RequestMeta.fields,
|
|
1314
1194
|
name: String,
|
|
@@ -1328,7 +1208,7 @@ var SetLevel = class extends (/* @__PURE__ */ make2("logging/setLevel", {
|
|
|
1328
1208
|
level: LoggingLevel
|
|
1329
1209
|
},
|
|
1330
1210
|
success: /* @__PURE__ */ Struct({}),
|
|
1331
|
-
error:
|
|
1211
|
+
error: McpError
|
|
1332
1212
|
})) {
|
|
1333
1213
|
};
|
|
1334
1214
|
var LoggingMessageNotification = class extends (/* @__PURE__ */ make2("notifications/message", {
|
|
@@ -1474,7 +1354,7 @@ var CreateMessageResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
|
|
|
1474
1354
|
};
|
|
1475
1355
|
var CreateMessage = class extends (/* @__PURE__ */ make2("sampling/createMessage", {
|
|
1476
1356
|
success: CreateMessageResult,
|
|
1477
|
-
error:
|
|
1357
|
+
error: McpError,
|
|
1478
1358
|
payload: {
|
|
1479
1359
|
messages: /* @__PURE__ */ ArraySchema(SamplingMessage),
|
|
1480
1360
|
/**
|
|
@@ -1686,7 +1566,7 @@ var ElicitDeclineResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
|
|
|
1686
1566
|
var ElicitResult = /* @__PURE__ */ Union([ElicitAcceptResult, ElicitDeclineResult]);
|
|
1687
1567
|
var Elicit = class extends (/* @__PURE__ */ make2("elicitation/create", {
|
|
1688
1568
|
success: ElicitResult,
|
|
1689
|
-
error:
|
|
1569
|
+
error: McpError,
|
|
1690
1570
|
payload: ElicitRequestParams
|
|
1691
1571
|
})) {
|
|
1692
1572
|
};
|
|
@@ -1752,6 +1632,126 @@ ${JSON.stringify(input, null, 2)}`,
|
|
|
1752
1632
|
requestedSchema: { type: "object", properties: {} }
|
|
1753
1633
|
});
|
|
1754
1634
|
|
|
1635
|
+
// src/contracts/router.ts
|
|
1636
|
+
var reservedRouterKeys = /* @__PURE__ */ new Set([
|
|
1637
|
+
"__proto__",
|
|
1638
|
+
"constructor",
|
|
1639
|
+
"prototype"
|
|
1640
|
+
]);
|
|
1641
|
+
var RouterKey = Schema_exports.String.check(
|
|
1642
|
+
Schema_exports.isPattern(/^[A-Za-z_][A-Za-z0-9_-]{0,99}$/),
|
|
1643
|
+
Schema_exports.makeFilter((key) => !reservedRouterKeys.has(key))
|
|
1644
|
+
);
|
|
1645
|
+
var RouterIcon = Schema_exports.Struct({
|
|
1646
|
+
src: Schema_exports.NonEmptyString,
|
|
1647
|
+
mimeType: Schema_exports.optionalKey(Schema_exports.String),
|
|
1648
|
+
sizes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
|
|
1649
|
+
theme: Schema_exports.optionalKey(Schema_exports.Literals(["light", "dark"]))
|
|
1650
|
+
});
|
|
1651
|
+
var RouterMeta = Schema_exports.Struct({
|
|
1652
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1653
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
1654
|
+
instructions: Schema_exports.optionalKey(Schema_exports.String),
|
|
1655
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
1656
|
+
tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String))
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1659
|
+
// src/contracts/tools.ts
|
|
1660
|
+
var ToolAnnotations2 = Schema_exports.Struct({
|
|
1661
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1662
|
+
readOnlyHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1663
|
+
destructiveHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1664
|
+
idempotentHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1665
|
+
openWorldHint: Schema_exports.optionalKey(Schema_exports.Boolean)
|
|
1666
|
+
});
|
|
1667
|
+
|
|
1668
|
+
// src/contracts/mcp.ts
|
|
1669
|
+
var McpClientLimits = Schema_exports.Struct({
|
|
1670
|
+
timeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1671
|
+
maxTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1672
|
+
maxTools: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1673
|
+
maxPaginationCursors: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
1674
|
+
cleanupTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
1675
|
+
});
|
|
1676
|
+
var defaultMcpClientLimits = McpClientLimits.make({
|
|
1677
|
+
timeoutMs: 3e4,
|
|
1678
|
+
maxTimeoutMs: 3e5,
|
|
1679
|
+
maxTools: 5e4,
|
|
1680
|
+
maxPaginationCursors: 1e3,
|
|
1681
|
+
cleanupTimeoutMs: 1e3
|
|
1682
|
+
});
|
|
1683
|
+
var mcpSdkTimerCeilingMs = 2147483647;
|
|
1684
|
+
var McpToolsOptions = Schema_exports.Struct({
|
|
1685
|
+
url: HttpUrl,
|
|
1686
|
+
accountId: Schema_exports.optional(AccountId),
|
|
1687
|
+
headers: Schema_exports.optional(Schema_exports.Record(Schema_exports.String, Schema_exports.String)),
|
|
1688
|
+
signal: Schema_exports.optional(Schema_exports.instanceOf(AbortSignal)),
|
|
1689
|
+
timeoutMs: Schema_exports.optional(
|
|
1690
|
+
Schema_exports.Number.check(
|
|
1691
|
+
Schema_exports.isInt(),
|
|
1692
|
+
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
1693
|
+
)
|
|
1694
|
+
)
|
|
1695
|
+
});
|
|
1696
|
+
var McpHealthInput = Schema_exports.Struct({
|
|
1697
|
+
...McpToolsOptions.fields,
|
|
1698
|
+
headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
1699
|
+
deadline: Schema_exports.optional(Schema_exports.Finite)
|
|
1700
|
+
});
|
|
1701
|
+
var mcpHealthReserveMs = 2 * defaultMcpClientLimits.cleanupTimeoutMs + 250;
|
|
1702
|
+
var McpToolResult = Schema_exports.Struct({
|
|
1703
|
+
content: Schema_exports.Array(JsonObject2),
|
|
1704
|
+
structuredContent: Schema_exports.optionalKey(JsonObject2),
|
|
1705
|
+
isError: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1706
|
+
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
1707
|
+
});
|
|
1708
|
+
var McpToolMetadata = Schema_exports.Struct({
|
|
1709
|
+
name: Schema_exports.String,
|
|
1710
|
+
title: Schema_exports.optional(Schema_exports.String),
|
|
1711
|
+
description: Schema_exports.optional(Schema_exports.String),
|
|
1712
|
+
inputSchema: JsonObject2,
|
|
1713
|
+
outputSchema: Schema_exports.optional(JsonObject2),
|
|
1714
|
+
annotations: Schema_exports.optional(ToolAnnotations2),
|
|
1715
|
+
_meta: Schema_exports.optional(JsonObject2)
|
|
1716
|
+
});
|
|
1717
|
+
var McpServerHeader = Schema_exports.Struct({
|
|
1718
|
+
name: Schema_exports.optionalKey(Schema_exports.String),
|
|
1719
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1720
|
+
version: Schema_exports.optionalKey(Schema_exports.String),
|
|
1721
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
1722
|
+
websiteUrl: Schema_exports.optionalKey(Schema_exports.String),
|
|
1723
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
1724
|
+
instructions: Schema_exports.optionalKey(Schema_exports.String)
|
|
1725
|
+
});
|
|
1726
|
+
var McpError2 = class extends Schema_exports.TaggedError()("McpError", {
|
|
1727
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
1728
|
+
reason: Schema_exports.Literals([
|
|
1729
|
+
"request",
|
|
1730
|
+
"unauthorized",
|
|
1731
|
+
"invalid_response",
|
|
1732
|
+
"timeout",
|
|
1733
|
+
"invalid_input"
|
|
1734
|
+
]),
|
|
1735
|
+
status: Schema_exports.optional(Schema_exports.Number),
|
|
1736
|
+
upstream: Schema_exports.optional(UpstreamError),
|
|
1737
|
+
session: Schema_exports.optional(Schema_exports.Literal(true))
|
|
1738
|
+
}) {
|
|
1739
|
+
};
|
|
1740
|
+
var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
|
|
1741
|
+
"McpCredentialsUnverified",
|
|
1742
|
+
{ anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError2, ProviderError]) }
|
|
1743
|
+
) {
|
|
1744
|
+
};
|
|
1745
|
+
var ProcessConfig = Schema_exports.Struct({
|
|
1746
|
+
command: Schema_exports.NonEmptyString,
|
|
1747
|
+
args: Schema_exports.Array(Schema_exports.String),
|
|
1748
|
+
cwd: Schema_exports.optional(Schema_exports.String),
|
|
1749
|
+
env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
1750
|
+
timeoutMs: Schema_exports.Int.check(
|
|
1751
|
+
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
1752
|
+
)
|
|
1753
|
+
});
|
|
1754
|
+
|
|
1755
1755
|
// src/contracts/webhook-protocol.ts
|
|
1756
1756
|
var WebhookTransportLimits = Schema_exports.Struct({
|
|
1757
1757
|
maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
@@ -1963,7 +1963,7 @@ var ManyAccounts = class extends Data_exports.TaggedClass("many") {
|
|
|
1963
1963
|
};
|
|
1964
1964
|
|
|
1965
1965
|
// src/contracts/protocol-version.ts
|
|
1966
|
-
var frameworkProtocol =
|
|
1966
|
+
var frameworkProtocol = 9;
|
|
1967
1967
|
|
|
1968
1968
|
// src/contracts/protocols/oauth.ts
|
|
1969
1969
|
var OAuthClientAuth2 = Schema_exports.Literals([
|
|
@@ -2141,6 +2141,20 @@ var McpError3 = class extends Schema_exports.TaggedError()("McpError", {
|
|
|
2141
2141
|
status: Schema_exports.optional(Schema_exports.Number)
|
|
2142
2142
|
}) {
|
|
2143
2143
|
};
|
|
2144
|
+
var SkillLoadFailed = class extends Schema_exports.TaggedError()("SkillLoadFailed", {
|
|
2145
|
+
reason: Schema_exports.Literals([
|
|
2146
|
+
"source",
|
|
2147
|
+
"request",
|
|
2148
|
+
"rate_limited",
|
|
2149
|
+
"document",
|
|
2150
|
+
"limit",
|
|
2151
|
+
"changed",
|
|
2152
|
+
"encoding"
|
|
2153
|
+
]),
|
|
2154
|
+
message: Schema_exports.optional(Schema_exports.String.check(Schema_exports.isMaxLength(500))),
|
|
2155
|
+
status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 })))
|
|
2156
|
+
}) {
|
|
2157
|
+
};
|
|
2144
2158
|
var WorkflowFailure2 = class extends Schema_exports.TaggedError()("WorkflowFailure", {
|
|
2145
2159
|
reason: Schema_exports.Literals([
|
|
2146
2160
|
"unavailable",
|
|
@@ -2236,7 +2250,7 @@ var HostedTool = Schema_exports.Struct({
|
|
|
2236
2250
|
readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
2237
2251
|
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
2238
2252
|
outputSchema: Schema_exports.optionalKey(JsonObject2),
|
|
2239
|
-
annotations: Schema_exports.optionalKey(
|
|
2253
|
+
annotations: Schema_exports.optionalKey(ToolAnnotations2),
|
|
2240
2254
|
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
2241
2255
|
});
|
|
2242
2256
|
var HostedToolSummary = HostedTool.mapFields(
|
|
@@ -2492,7 +2506,7 @@ var HostedTool2 = Schema_exports.Struct({
|
|
|
2492
2506
|
readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
2493
2507
|
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
2494
2508
|
outputSchema: Schema_exports.optionalKey(JsonObject2),
|
|
2495
|
-
annotations: Schema_exports.optionalKey(
|
|
2509
|
+
annotations: Schema_exports.optionalKey(ToolAnnotations2),
|
|
2496
2510
|
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
2497
2511
|
});
|
|
2498
2512
|
var HostedToolSummary2 = HostedTool2.mapFields(
|
|
@@ -2804,6 +2818,19 @@ var protocol7 = {
|
|
|
2804
2818
|
};
|
|
2805
2819
|
|
|
2806
2820
|
// src/contracts/protocols/8.ts
|
|
2821
|
+
var McpError4 = class extends Schema_exports.TaggedError()("McpError", {
|
|
2822
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
2823
|
+
reason: Schema_exports.Literals([
|
|
2824
|
+
"request",
|
|
2825
|
+
"unauthorized",
|
|
2826
|
+
"invalid_response",
|
|
2827
|
+
"timeout",
|
|
2828
|
+
"invalid_input"
|
|
2829
|
+
]),
|
|
2830
|
+
status: Schema_exports.optional(Schema_exports.Number),
|
|
2831
|
+
upstream: Schema_exports.optional(UpstreamError)
|
|
2832
|
+
}) {
|
|
2833
|
+
};
|
|
2807
2834
|
var HostDeclarationInvalid3 = class extends Schema_exports.TaggedError()(
|
|
2808
2835
|
"HostDeclarationInvalid",
|
|
2809
2836
|
FailureDetail
|
|
@@ -2821,7 +2848,7 @@ var HostOperationFailed3 = class extends Schema_exports.TaggedError()(
|
|
|
2821
2848
|
};
|
|
2822
2849
|
var HostRouterError2 = Schema_exports.Union([
|
|
2823
2850
|
ProviderError,
|
|
2824
|
-
|
|
2851
|
+
McpError4,
|
|
2825
2852
|
SkillLoadFailed,
|
|
2826
2853
|
HostDeclarationInvalid3,
|
|
2827
2854
|
HostEvaluationFailed3
|
|
@@ -2841,7 +2868,7 @@ var HostedCatalogSummary2 = Schema_exports.Struct({
|
|
|
2841
2868
|
var HostError4 = Schema_exports.Union([
|
|
2842
2869
|
OpenapiResponseError,
|
|
2843
2870
|
ProviderError,
|
|
2844
|
-
|
|
2871
|
+
McpError4,
|
|
2845
2872
|
SkillLoadFailed,
|
|
2846
2873
|
WorkflowFailure,
|
|
2847
2874
|
HostRequestInvalid,
|
|
@@ -2879,6 +2906,96 @@ var protocol8 = {
|
|
|
2879
2906
|
}
|
|
2880
2907
|
};
|
|
2881
2908
|
|
|
2909
|
+
// src/contracts/protocols/9.ts
|
|
2910
|
+
var McpError5 = class extends Schema_exports.TaggedError()("McpError", {
|
|
2911
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
2912
|
+
reason: Schema_exports.Literals([
|
|
2913
|
+
"request",
|
|
2914
|
+
"unauthorized",
|
|
2915
|
+
"invalid_response",
|
|
2916
|
+
"timeout",
|
|
2917
|
+
"invalid_input"
|
|
2918
|
+
]),
|
|
2919
|
+
status: Schema_exports.optional(Schema_exports.Number),
|
|
2920
|
+
upstream: Schema_exports.optional(UpstreamError),
|
|
2921
|
+
session: Schema_exports.optional(Schema_exports.Literal(true))
|
|
2922
|
+
}) {
|
|
2923
|
+
};
|
|
2924
|
+
var SkillLoadFailed2 = class extends Schema_exports.TaggedError()("SkillLoadFailed", {
|
|
2925
|
+
reason: Schema_exports.Literals([
|
|
2926
|
+
"source",
|
|
2927
|
+
"request",
|
|
2928
|
+
"rate_limited",
|
|
2929
|
+
"document",
|
|
2930
|
+
"limit",
|
|
2931
|
+
"changed",
|
|
2932
|
+
"encoding"
|
|
2933
|
+
]),
|
|
2934
|
+
message: Schema_exports.optional(Schema_exports.String.check(Schema_exports.isMaxLength(500))),
|
|
2935
|
+
status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 }))),
|
|
2936
|
+
missing: Schema_exports.optional(Schema_exports.Literals(["repository", "ref"]))
|
|
2937
|
+
}) {
|
|
2938
|
+
};
|
|
2939
|
+
var HostRouterError3 = Schema_exports.Union([
|
|
2940
|
+
ProviderError,
|
|
2941
|
+
McpError5,
|
|
2942
|
+
SkillLoadFailed2,
|
|
2943
|
+
HostDeclarationInvalid3,
|
|
2944
|
+
HostEvaluationFailed3
|
|
2945
|
+
]);
|
|
2946
|
+
var HostedRouter3 = Schema_exports.Struct({
|
|
2947
|
+
...HostedRouter2.fields,
|
|
2948
|
+
error: Schema_exports.optionalKey(HostRouterError3)
|
|
2949
|
+
});
|
|
2950
|
+
var HostedCatalog3 = Schema_exports.Struct({
|
|
2951
|
+
...HostedCatalog2.fields,
|
|
2952
|
+
routers: Schema_exports.Array(HostedRouter3)
|
|
2953
|
+
});
|
|
2954
|
+
var HostedCatalogSummary3 = Schema_exports.Struct({
|
|
2955
|
+
...HostedCatalogSummary2.fields,
|
|
2956
|
+
routers: Schema_exports.Array(HostedRouter3)
|
|
2957
|
+
});
|
|
2958
|
+
var HostError5 = Schema_exports.Union([
|
|
2959
|
+
OpenapiResponseError,
|
|
2960
|
+
ProviderError,
|
|
2961
|
+
McpError5,
|
|
2962
|
+
SkillLoadFailed2,
|
|
2963
|
+
WorkflowFailure,
|
|
2964
|
+
HostRequestInvalid,
|
|
2965
|
+
HostAccountsInvalid,
|
|
2966
|
+
HostDeclarationInvalid3,
|
|
2967
|
+
HostEvaluationFailed3,
|
|
2968
|
+
HostOperationNotFound,
|
|
2969
|
+
HostOperationFailed3,
|
|
2970
|
+
DatabaseLimitExceeded,
|
|
2971
|
+
DatabaseFieldReserved,
|
|
2972
|
+
HostToolNotFound,
|
|
2973
|
+
HostInputInvalid,
|
|
2974
|
+
HostOutputInvalid,
|
|
2975
|
+
HostToolBlocked,
|
|
2976
|
+
HostToolApprovalRequired,
|
|
2977
|
+
HostToolPolicyFailed,
|
|
2978
|
+
ElicitationFailed,
|
|
2979
|
+
HostKindMismatch
|
|
2980
|
+
]);
|
|
2981
|
+
var HostResponse5 = Schema_exports.Union([
|
|
2982
|
+
Schema_exports.Struct({
|
|
2983
|
+
ok: Schema_exports.Literal(true),
|
|
2984
|
+
value: JsonValue,
|
|
2985
|
+
toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2986
|
+
}),
|
|
2987
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError5 })
|
|
2988
|
+
]);
|
|
2989
|
+
var protocol9 = {
|
|
2990
|
+
version: 9,
|
|
2991
|
+
schemas: {
|
|
2992
|
+
...protocol8.schemas,
|
|
2993
|
+
response: HostResponse5,
|
|
2994
|
+
catalog: HostedCatalog3,
|
|
2995
|
+
catalogSummary: HostedCatalogSummary3
|
|
2996
|
+
}
|
|
2997
|
+
};
|
|
2998
|
+
|
|
2882
2999
|
// src/contracts/host.ts
|
|
2883
3000
|
var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
|
|
2884
3001
|
var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
|
|
@@ -2896,8 +3013,8 @@ var HostRequirementsError = Schema_exports.Union([
|
|
|
2896
3013
|
]);
|
|
2897
3014
|
var HostInspectError = Schema_exports.Union([
|
|
2898
3015
|
ProviderError,
|
|
2899
|
-
|
|
2900
|
-
|
|
3016
|
+
McpError5,
|
|
3017
|
+
SkillLoadFailed2,
|
|
2901
3018
|
HostRequestInvalid,
|
|
2902
3019
|
HostDeclarationInvalid3,
|
|
2903
3020
|
HostAccountsInvalid,
|
|
@@ -2949,23 +3066,6 @@ export {
|
|
|
2949
3066
|
AccountCheckResult,
|
|
2950
3067
|
Provider,
|
|
2951
3068
|
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
3069
|
maxApiErrorInstructionsLength,
|
|
2970
3070
|
ApiErrorRecovery,
|
|
2971
3071
|
maxApiErrorMessageLength,
|
|
@@ -2999,6 +3099,23 @@ export {
|
|
|
2999
3099
|
ApprovalElicitation,
|
|
3000
3100
|
ApprovalResponse,
|
|
3001
3101
|
approvalElicitation,
|
|
3102
|
+
reservedRouterKeys,
|
|
3103
|
+
RouterKey,
|
|
3104
|
+
RouterIcon,
|
|
3105
|
+
RouterMeta,
|
|
3106
|
+
ToolAnnotations2 as ToolAnnotations,
|
|
3107
|
+
McpClientLimits,
|
|
3108
|
+
defaultMcpClientLimits,
|
|
3109
|
+
mcpSdkTimerCeilingMs,
|
|
3110
|
+
McpToolsOptions,
|
|
3111
|
+
McpHealthInput,
|
|
3112
|
+
mcpHealthReserveMs,
|
|
3113
|
+
McpToolResult,
|
|
3114
|
+
McpToolMetadata,
|
|
3115
|
+
McpServerHeader,
|
|
3116
|
+
McpError2 as McpError,
|
|
3117
|
+
McpCredentialsUnverified,
|
|
3118
|
+
ProcessConfig,
|
|
3002
3119
|
WebhookTransportLimits,
|
|
3003
3120
|
defaultWebhookTransportLimits,
|
|
3004
3121
|
WebhookRequestData,
|
|
@@ -3050,13 +3167,16 @@ export {
|
|
|
3050
3167
|
HostDeclarationInvalid3 as HostDeclarationInvalid,
|
|
3051
3168
|
HostEvaluationFailed3 as HostEvaluationFailed,
|
|
3052
3169
|
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
3170
|
protocol8,
|
|
3171
|
+
McpError5 as McpError2,
|
|
3172
|
+
SkillLoadFailed2 as SkillLoadFailed,
|
|
3173
|
+
HostRouterError3 as HostRouterError,
|
|
3174
|
+
HostedRouter3 as HostedRouter,
|
|
3175
|
+
HostedCatalog3 as HostedCatalog,
|
|
3176
|
+
HostedCatalogSummary3 as HostedCatalogSummary,
|
|
3177
|
+
HostError5 as HostError,
|
|
3178
|
+
HostResponse5 as HostResponse,
|
|
3179
|
+
protocol9,
|
|
3060
3180
|
skillsCommand,
|
|
3061
3181
|
skillCatalog,
|
|
3062
3182
|
inspectCommand,
|