apps 0.0.1-beta.34 → 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.
Files changed (91) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-OX233L7N.js → chunk-4U2VUDET.js} +2 -2
  3. package/js/{chunk-HW3DPBZR.js → chunk-556EWA6P.js} +3 -2
  4. package/js/{chunk-UMCMZFXW.js → chunk-73AV3JVU.js} +1 -1
  5. package/js/{chunk-QKVZGWGZ.js → chunk-A2NN45C7.js} +7 -7
  6. package/js/{chunk-6ZJ2H6P4.js → chunk-A4O72Z3A.js} +298 -190
  7. package/js/{chunk-FBBXFFFJ.js → chunk-BI45HZWM.js} +2 -2
  8. package/js/{chunk-DXGWKNTQ.js → chunk-BI6R577B.js} +2 -2
  9. package/js/{chunk-QUEPZ67T.js → chunk-BKJDZYK7.js} +3 -3
  10. package/js/{chunk-QZD2RZ4S.js → chunk-CZLCA2O4.js} +8 -8
  11. package/js/{chunk-IU6OK5G2.js → chunk-ENJCQWVF.js} +3 -3
  12. package/js/{chunk-DASNNAP4.js → chunk-HDAQBRT5.js} +391 -14
  13. package/js/{chunk-EXGKN554.js → chunk-IJQ5LE74.js} +9805 -9254
  14. package/js/{chunk-5JVNM3CQ.js → chunk-IU7CCCUC.js} +12 -12
  15. package/js/{chunk-Q7Q5JTRW.js → chunk-JU7F4PRK.js} +2 -2
  16. package/js/{chunk-CJY5X26R.js → chunk-KOOJUMLR.js} +86 -50
  17. package/js/{chunk-ETLILMHY.js → chunk-KZFV3WCJ.js} +21 -19
  18. package/js/{chunk-ZOY7PDMI.js → chunk-NHCFIWN5.js} +1 -1
  19. package/js/chunk-NHUHTWAF.js +0 -0
  20. package/js/{chunk-QYM4STZW.js → chunk-PHO7HXTC.js} +149 -353
  21. package/js/{chunk-O3OAFU7Q.js → chunk-POOIHRPF.js} +2 -2
  22. package/js/{chunk-AUFVX4KM.js → chunk-RSNZDT4L.js} +2 -2
  23. package/js/{chunk-EPUWF4ZG.js → chunk-SRB2WDU7.js} +3 -3
  24. package/js/{chunk-MFHUR5SB.js → chunk-TADLIUEU.js} +4 -4
  25. package/js/{chunk-5OM6HBNU.js → chunk-UBAKWXAJ.js} +20 -29
  26. package/js/chunk-V5DWGYRK.js +268 -0
  27. package/js/{chunk-MYH3QZ4L.js → chunk-WAGGHNWH.js} +23 -15
  28. package/js/{chunk-GZ4UHXRT.js → chunk-WDBUOIWV.js} +3 -3
  29. package/js/{chunk-PUBNIORL.js → chunk-WMVTBHGK.js} +2 -2
  30. package/js/{chunk-DSUKW6KJ.js → chunk-XEXUHXC3.js} +296 -174
  31. package/js/{chunk-6KG4DZD7.js → chunk-Y3XN4X4Q.js} +1 -1
  32. package/js/{chunk-UKMIHP2G.js → chunk-YW333DH3.js} +4 -4
  33. package/js/{chunk-O4QOPXQT.js → chunk-ZQWDOHEO.js} +31 -24
  34. package/js/client.js +12 -11
  35. package/js/contracts.js +14 -11
  36. package/js/effect.js +23 -21
  37. package/js/graphql.js +25 -23
  38. package/js/host.js +23 -21
  39. package/js/index.js +16 -14
  40. package/js/mcp/effect.js +25 -23
  41. package/js/mcp/stdio.js +25 -23
  42. package/js/mcp.js +27 -25
  43. package/js/openapi.js +22 -21
  44. package/js/react.js +3 -3
  45. package/js/skills/effect.js +6 -5
  46. package/js/skills.js +60 -45
  47. package/js/storage/facet.js +19 -345
  48. package/js/ui/auth/contracts.js +2 -2
  49. package/js/ui/auth.js +5 -5
  50. package/js/ui/contracts.js +6 -5
  51. package/js/ui/serving.js +10 -9
  52. package/package.json +3 -3
  53. package/runtime.json +1 -1
  54. package/types/app-data/src/implementation/sqlite.d.ts +1 -1
  55. package/types/apps/src/contracts/elicitation.d.ts +6 -6
  56. package/types/apps/src/contracts/host.d.ts +10 -6
  57. package/types/apps/src/contracts/mcp.d.ts +6 -1
  58. package/types/apps/src/contracts/openapi.d.ts +1 -1
  59. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  60. package/types/apps/src/contracts/protocols/1.d.ts +12 -5
  61. package/types/apps/src/contracts/protocols/2.d.ts +5 -5
  62. package/types/apps/src/contracts/protocols/3.d.ts +5 -6
  63. package/types/apps/src/contracts/protocols/4.d.ts +5 -6
  64. package/types/apps/src/contracts/protocols/5.d.ts +7 -7
  65. package/types/apps/src/contracts/protocols/6.d.ts +7 -7
  66. package/types/apps/src/contracts/protocols/7.d.ts +7 -7
  67. package/types/apps/src/contracts/protocols/8.d.ts +17 -6
  68. package/types/apps/src/contracts/protocols/9.d.ts +1106 -0
  69. package/types/apps/src/contracts/skills.d.ts +5 -0
  70. package/types/apps/src/contracts/ui.d.ts +1 -1
  71. package/types/apps/src/implementation/failure-detail.d.ts +4 -3
  72. package/types/apps/src/implementation/live.d.ts +2 -2
  73. package/types/apps/src/implementation/mcp-client.d.ts +1 -1
  74. package/types/apps/src/implementation/mcp.d.ts +1 -1
  75. package/types/apps/src/implementation/network.d.ts +1 -1
  76. package/types/apps/src/implementation/openapi-compile.d.ts +1 -1
  77. package/types/apps/src/implementation/optimistic.d.ts +1 -1
  78. package/types/apps/src/implementation/query-commit.d.ts +1 -1
  79. package/types/apps/src/implementation/router-catalog.d.ts +2 -3
  80. package/types/apps/src/implementation/skills.d.ts +8 -8
  81. package/types/apps/src/implementation/ui-auth.d.ts +1 -1
  82. package/types/apps/src/implementation/ui-client.d.ts +1 -1
  83. package/types/apps/src/implementation/ui-serving.d.ts +1 -1
  84. package/types/apps/src/react.d.ts +1 -1
  85. package/types/apps/src/skills.d.ts +2 -1
  86. package/types/telemetry/src/browser-operations.d.ts +1 -1
  87. package/types/telemetry/src/browser.d.ts +2 -2
  88. package/types/telemetry/src/layer.d.ts +2 -2
  89. package/types/telemetry/src/relay.d.ts +2 -2
  90. package/types/telemetry/src/transport.d.ts +1 -1
  91. package/types/utils/src/api-error.d.ts +1 -1
@@ -2,7 +2,7 @@ import {
2
2
  DatabaseFieldReserved,
3
3
  DatabaseLimitExceeded,
4
4
  DatabaseSchema
5
- } from "./chunk-UMCMZFXW.js";
5
+ } from "./chunk-73AV3JVU.js";
6
6
  import {
7
7
  CacheCommand,
8
8
  CacheReply,
@@ -13,18 +13,17 @@ import {
13
13
  FailureSource,
14
14
  ProviderError,
15
15
  UpstreamError
16
- } from "./chunk-DXGWKNTQ.js";
16
+ } from "./chunk-BI6R577B.js";
17
17
  import {
18
18
  AppSkillName,
19
- AppSkills,
20
- SkillLoadFailed
21
- } from "./chunk-HW3DPBZR.js";
19
+ AppSkills
20
+ } from "./chunk-556EWA6P.js";
22
21
  import {
23
22
  AccountId,
24
23
  HttpUrl,
25
24
  JsonObject as JsonObject2,
26
25
  JsonValue
27
- } from "./chunk-FBBXFFFJ.js";
26
+ } from "./chunk-BI45HZWM.js";
28
27
  import {
29
28
  Any,
30
29
  ArraySchema,
@@ -60,13 +59,13 @@ import {
60
59
  declare,
61
60
  decode,
62
61
  decodeTo,
63
- empty2 as empty,
62
+ empty,
64
63
  flatMap,
65
64
  fromUndefinedOr,
66
65
  isBetween,
67
66
  isSchema,
68
67
  isStream,
69
- make6 as make,
68
+ make4 as make,
70
69
  merge,
71
70
  optional,
72
71
  optionalKey,
@@ -75,129 +74,11 @@ import {
75
74
  symbol3 as symbol,
76
75
  sync2 as sync,
77
76
  tag,
77
+ toType,
78
78
  transformOptional,
79
79
  withConstructorDefault,
80
80
  withDefault
81
- } from "./chunk-EXGKN554.js";
82
-
83
- // src/contracts/router.ts
84
- var reservedRouterKeys = /* @__PURE__ */ new Set([
85
- "__proto__",
86
- "constructor",
87
- "prototype"
88
- ]);
89
- var RouterKey = Schema_exports.String.check(
90
- Schema_exports.isPattern(/^[A-Za-z_][A-Za-z0-9_-]{0,99}$/),
91
- Schema_exports.makeFilter((key) => !reservedRouterKeys.has(key))
92
- );
93
- var RouterIcon = Schema_exports.Struct({
94
- src: Schema_exports.NonEmptyString,
95
- mimeType: Schema_exports.optionalKey(Schema_exports.String),
96
- sizes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
97
- theme: Schema_exports.optionalKey(Schema_exports.Literals(["light", "dark"]))
98
- });
99
- var RouterMeta = Schema_exports.Struct({
100
- title: Schema_exports.optionalKey(Schema_exports.String),
101
- description: Schema_exports.optionalKey(Schema_exports.String),
102
- instructions: Schema_exports.optionalKey(Schema_exports.String),
103
- icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
104
- tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String))
105
- });
106
-
107
- // src/contracts/tools.ts
108
- var ToolAnnotations = Schema_exports.Struct({
109
- title: Schema_exports.optionalKey(Schema_exports.String),
110
- readOnlyHint: Schema_exports.optionalKey(Schema_exports.Boolean),
111
- destructiveHint: Schema_exports.optionalKey(Schema_exports.Boolean),
112
- idempotentHint: Schema_exports.optionalKey(Schema_exports.Boolean),
113
- openWorldHint: Schema_exports.optionalKey(Schema_exports.Boolean)
114
- });
115
-
116
- // src/contracts/mcp.ts
117
- var McpClientLimits = Schema_exports.Struct({
118
- timeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
119
- maxTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
120
- maxTools: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
121
- maxPaginationCursors: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
122
- cleanupTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
123
- });
124
- var defaultMcpClientLimits = McpClientLimits.make({
125
- timeoutMs: 3e4,
126
- maxTimeoutMs: 3e5,
127
- maxTools: 5e4,
128
- maxPaginationCursors: 1e3,
129
- cleanupTimeoutMs: 1e3
130
- });
131
- var mcpSdkTimerCeilingMs = 2147483647;
132
- var McpToolsOptions = Schema_exports.Struct({
133
- url: HttpUrl,
134
- accountId: Schema_exports.optional(AccountId),
135
- headers: Schema_exports.optional(Schema_exports.Record(Schema_exports.String, Schema_exports.String)),
136
- signal: Schema_exports.optional(Schema_exports.instanceOf(AbortSignal)),
137
- timeoutMs: Schema_exports.optional(
138
- Schema_exports.Number.check(
139
- Schema_exports.isInt(),
140
- Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
141
- )
142
- )
143
- });
144
- var McpHealthInput = Schema_exports.Struct({
145
- ...McpToolsOptions.fields,
146
- headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
147
- deadline: Schema_exports.optional(Schema_exports.Finite)
148
- });
149
- var mcpHealthReserveMs = 2 * defaultMcpClientLimits.cleanupTimeoutMs + 250;
150
- var McpToolResult = Schema_exports.Struct({
151
- content: Schema_exports.Array(JsonObject2),
152
- structuredContent: Schema_exports.optionalKey(JsonObject2),
153
- isError: Schema_exports.optionalKey(Schema_exports.Boolean),
154
- _meta: Schema_exports.optionalKey(JsonObject2)
155
- });
156
- var McpToolMetadata = Schema_exports.Struct({
157
- name: Schema_exports.String,
158
- title: Schema_exports.optional(Schema_exports.String),
159
- description: Schema_exports.optional(Schema_exports.String),
160
- inputSchema: JsonObject2,
161
- outputSchema: Schema_exports.optional(JsonObject2),
162
- annotations: Schema_exports.optional(ToolAnnotations),
163
- _meta: Schema_exports.optional(JsonObject2)
164
- });
165
- var McpServerHeader = Schema_exports.Struct({
166
- name: Schema_exports.optionalKey(Schema_exports.String),
167
- title: Schema_exports.optionalKey(Schema_exports.String),
168
- version: Schema_exports.optionalKey(Schema_exports.String),
169
- description: Schema_exports.optionalKey(Schema_exports.String),
170
- websiteUrl: Schema_exports.optionalKey(Schema_exports.String),
171
- icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
172
- instructions: Schema_exports.optionalKey(Schema_exports.String)
173
- });
174
- var McpError = class extends Schema_exports.TaggedError()("McpError", {
175
- phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
176
- reason: Schema_exports.Literals([
177
- "request",
178
- "unauthorized",
179
- "invalid_response",
180
- "timeout",
181
- "invalid_input"
182
- ]),
183
- status: Schema_exports.optional(Schema_exports.Number),
184
- upstream: Schema_exports.optional(UpstreamError)
185
- }) {
186
- };
187
- var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
188
- "McpCredentialsUnverified",
189
- { anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError, ProviderError]) }
190
- ) {
191
- };
192
- var ProcessConfig = Schema_exports.Struct({
193
- command: Schema_exports.NonEmptyString,
194
- args: Schema_exports.Array(Schema_exports.String),
195
- cwd: Schema_exports.optional(Schema_exports.String),
196
- env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
197
- timeoutMs: Schema_exports.Int.check(
198
- Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
199
- )
200
- });
81
+ } from "./chunk-IJQ5LE74.js";
201
82
 
202
83
  // src/contracts/api-response-error.ts
203
84
  var maxApiErrorInstructionsLength = 4096;
@@ -396,7 +277,7 @@ var WorkflowControlCommand = Schema_exports.Union([
396
277
  Schema_exports.Struct({ operation: Schema_exports.Literal("terminate"), run: WorkflowRunId })
397
278
  ]);
398
279
 
399
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/RpcSchema.js
280
+ // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/rpc/RpcSchema.js
400
281
  var StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
401
282
  var schema = /* @__PURE__ */ declare(isStream);
402
283
  function Stream(success, error) {
@@ -407,7 +288,7 @@ function Stream(success, error) {
407
288
  });
408
289
  }
409
290
 
410
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/Rpc.js
291
+ // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/rpc/Rpc.js
411
292
  var TypeId = "~effect/rpc/Rpc";
412
293
  var Proto = {
413
294
  [TypeId]: TypeId,
@@ -525,7 +406,7 @@ var make2 = (tag2, options) => {
525
406
  });
526
407
  };
527
408
 
528
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/ai/McpSchema.js
409
+ // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/ai/McpSchema.js
529
410
  var optionalWithDefault = (schema2, defaultValue) => {
530
411
  const effect = sync(defaultValue);
531
412
  return optionalKey(schema2).pipe(decode({
@@ -533,7 +414,7 @@ var optionalWithDefault = (schema2, defaultValue) => {
533
414
  encode: passthrough()
534
415
  }), withConstructorDefault(effect));
535
416
  };
536
- var optional2 = (schema2) => optionalKey(schema2).pipe(decodeTo(optional(schema2), {
417
+ var optional2 = (schema2) => optionalKey(schema2).pipe(decodeTo(toType(optional(schema2)), {
537
418
  decode: passthrough(),
538
419
  encode: transformOptional(flatMap(fromUndefinedOr))
539
420
  }));
@@ -795,7 +676,7 @@ var InternalError = class _InternalError extends (/* @__PURE__ */ Error2("effect
795
676
  message: "Not implemented"
796
677
  });
797
678
  };
798
- var McpError2 = /* @__PURE__ */ Union([ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError, McpErrorBase]);
679
+ var McpError = /* @__PURE__ */ Union([ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError, McpErrorBase]);
799
680
  var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
800
681
  ...ResultMeta.fields,
801
682
  /**
@@ -818,7 +699,7 @@ var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ S
818
699
  };
819
700
  var Initialize = class extends (/* @__PURE__ */ make2("initialize", {
820
701
  success: InitializeResult,
821
- error: McpError2,
702
+ error: McpError,
822
703
  payload: {
823
704
  ...RequestMeta.fields,
824
705
  /**
@@ -1017,7 +898,7 @@ var ReadResourceResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */
1017
898
  };
1018
899
  var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
1019
900
  success: ReadResourceResult,
1020
- error: McpError2,
901
+ error: McpError,
1021
902
  payload: {
1022
903
  ...RequestMeta.fields,
1023
904
  /**
@@ -1030,7 +911,7 @@ var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
1030
911
  };
1031
912
  var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
1032
913
  success: /* @__PURE__ */ Struct({}),
1033
- error: McpError2,
914
+ error: McpError,
1034
915
  payload: {
1035
916
  ...RequestMeta.fields,
1036
917
  /**
@@ -1043,7 +924,7 @@ var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
1043
924
  };
1044
925
  var Unsubscribe = class extends (/* @__PURE__ */ make2("resources/unsubscribe", {
1045
926
  success: /* @__PURE__ */ Struct({}),
1046
- error: McpError2,
927
+ error: McpError,
1047
928
  payload: {
1048
929
  ...RequestMeta.fields,
1049
930
  /**
@@ -1187,7 +1068,7 @@ var GetPromptResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema
1187
1068
  };
1188
1069
  var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
1189
1070
  success: GetPromptResult,
1190
- error: McpError2,
1071
+ error: McpError,
1191
1072
  payload: {
1192
1073
  ...RequestMeta.fields,
1193
1074
  /**
@@ -1202,7 +1083,7 @@ var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
1202
1083
  }
1203
1084
  })) {
1204
1085
  };
1205
- var ToolAnnotations2 = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
1086
+ var ToolAnnotations = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
1206
1087
  /**
1207
1088
  * A human-readable title for the tool.
1208
1089
  */
@@ -1271,7 +1152,7 @@ var Tool = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/Tool")({
1271
1152
  /**
1272
1153
  * Optional additional tool information.
1273
1154
  */
1274
- annotations: /* @__PURE__ */ optional2(ToolAnnotations2),
1155
+ annotations: /* @__PURE__ */ optional2(ToolAnnotations),
1275
1156
  /**
1276
1157
  * Icons that clients can display for this tool.
1277
1158
  */
@@ -1307,7 +1188,7 @@ var CallToolResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/
1307
1188
  };
1308
1189
  var CallTool = class extends (/* @__PURE__ */ make2("tools/call", {
1309
1190
  success: CallToolResult,
1310
- error: McpError2,
1191
+ error: McpError,
1311
1192
  payload: {
1312
1193
  ...RequestMeta.fields,
1313
1194
  name: String,
@@ -1327,7 +1208,7 @@ var SetLevel = class extends (/* @__PURE__ */ make2("logging/setLevel", {
1327
1208
  level: LoggingLevel
1328
1209
  },
1329
1210
  success: /* @__PURE__ */ Struct({}),
1330
- error: McpError2
1211
+ error: McpError
1331
1212
  })) {
1332
1213
  };
1333
1214
  var LoggingMessageNotification = class extends (/* @__PURE__ */ make2("notifications/message", {
@@ -1473,7 +1354,7 @@ var CreateMessageResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
1473
1354
  };
1474
1355
  var CreateMessage = class extends (/* @__PURE__ */ make2("sampling/createMessage", {
1475
1356
  success: CreateMessageResult,
1476
- error: McpError2,
1357
+ error: McpError,
1477
1358
  payload: {
1478
1359
  messages: /* @__PURE__ */ ArraySchema(SamplingMessage),
1479
1360
  /**
@@ -1536,6 +1417,7 @@ var CompleteResult = class _CompleteResult extends (/* @__PURE__ */ Opaque()(/*
1536
1417
  /**
1537
1418
  * Empty completion result used when a completion request has no values.
1538
1419
  *
1420
+ * @stability unstable
1539
1421
  * @since 4.0.0
1540
1422
  */
1541
1423
  static empty = /* @__PURE__ */ _CompleteResult.make({
@@ -1684,7 +1566,7 @@ var ElicitDeclineResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
1684
1566
  var ElicitResult = /* @__PURE__ */ Union([ElicitAcceptResult, ElicitDeclineResult]);
1685
1567
  var Elicit = class extends (/* @__PURE__ */ make2("elicitation/create", {
1686
1568
  success: ElicitResult,
1687
- error: McpError2,
1569
+ error: McpError,
1688
1570
  payload: ElicitRequestParams
1689
1571
  })) {
1690
1572
  };
@@ -1750,6 +1632,126 @@ ${JSON.stringify(input, null, 2)}`,
1750
1632
  requestedSchema: { type: "object", properties: {} }
1751
1633
  });
1752
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
+
1753
1755
  // src/contracts/webhook-protocol.ts
1754
1756
  var WebhookTransportLimits = Schema_exports.Struct({
1755
1757
  maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
@@ -1961,7 +1963,7 @@ var ManyAccounts = class extends Data_exports.TaggedClass("many") {
1961
1963
  };
1962
1964
 
1963
1965
  // src/contracts/protocol-version.ts
1964
- var frameworkProtocol = 8;
1966
+ var frameworkProtocol = 9;
1965
1967
 
1966
1968
  // src/contracts/protocols/oauth.ts
1967
1969
  var OAuthClientAuth2 = Schema_exports.Literals([
@@ -2139,6 +2141,20 @@ var McpError3 = class extends Schema_exports.TaggedError()("McpError", {
2139
2141
  status: Schema_exports.optional(Schema_exports.Number)
2140
2142
  }) {
2141
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
+ };
2142
2158
  var WorkflowFailure2 = class extends Schema_exports.TaggedError()("WorkflowFailure", {
2143
2159
  reason: Schema_exports.Literals([
2144
2160
  "unavailable",
@@ -2234,7 +2250,7 @@ var HostedTool = Schema_exports.Struct({
2234
2250
  readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
2235
2251
  title: Schema_exports.optionalKey(Schema_exports.String),
2236
2252
  outputSchema: Schema_exports.optionalKey(JsonObject2),
2237
- annotations: Schema_exports.optionalKey(ToolAnnotations),
2253
+ annotations: Schema_exports.optionalKey(ToolAnnotations2),
2238
2254
  _meta: Schema_exports.optionalKey(JsonObject2)
2239
2255
  });
2240
2256
  var HostedToolSummary = HostedTool.mapFields(
@@ -2490,7 +2506,7 @@ var HostedTool2 = Schema_exports.Struct({
2490
2506
  readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
2491
2507
  title: Schema_exports.optionalKey(Schema_exports.String),
2492
2508
  outputSchema: Schema_exports.optionalKey(JsonObject2),
2493
- annotations: Schema_exports.optionalKey(ToolAnnotations),
2509
+ annotations: Schema_exports.optionalKey(ToolAnnotations2),
2494
2510
  _meta: Schema_exports.optionalKey(JsonObject2)
2495
2511
  });
2496
2512
  var HostedToolSummary2 = HostedTool2.mapFields(
@@ -2802,6 +2818,19 @@ var protocol7 = {
2802
2818
  };
2803
2819
 
2804
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
+ };
2805
2834
  var HostDeclarationInvalid3 = class extends Schema_exports.TaggedError()(
2806
2835
  "HostDeclarationInvalid",
2807
2836
  FailureDetail
@@ -2819,7 +2848,7 @@ var HostOperationFailed3 = class extends Schema_exports.TaggedError()(
2819
2848
  };
2820
2849
  var HostRouterError2 = Schema_exports.Union([
2821
2850
  ProviderError,
2822
- McpError,
2851
+ McpError4,
2823
2852
  SkillLoadFailed,
2824
2853
  HostDeclarationInvalid3,
2825
2854
  HostEvaluationFailed3
@@ -2839,7 +2868,7 @@ var HostedCatalogSummary2 = Schema_exports.Struct({
2839
2868
  var HostError4 = Schema_exports.Union([
2840
2869
  OpenapiResponseError,
2841
2870
  ProviderError,
2842
- McpError,
2871
+ McpError4,
2843
2872
  SkillLoadFailed,
2844
2873
  WorkflowFailure,
2845
2874
  HostRequestInvalid,
@@ -2877,6 +2906,96 @@ var protocol8 = {
2877
2906
  }
2878
2907
  };
2879
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
+
2880
2999
  // src/contracts/host.ts
2881
3000
  var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
2882
3001
  var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
@@ -2894,8 +3013,8 @@ var HostRequirementsError = Schema_exports.Union([
2894
3013
  ]);
2895
3014
  var HostInspectError = Schema_exports.Union([
2896
3015
  ProviderError,
2897
- McpError,
2898
- SkillLoadFailed,
3016
+ McpError5,
3017
+ SkillLoadFailed2,
2899
3018
  HostRequestInvalid,
2900
3019
  HostDeclarationInvalid3,
2901
3020
  HostAccountsInvalid,
@@ -2947,23 +3066,6 @@ export {
2947
3066
  AccountCheckResult,
2948
3067
  Provider,
2949
3068
  ManyAccounts,
2950
- reservedRouterKeys,
2951
- RouterKey,
2952
- RouterIcon,
2953
- RouterMeta,
2954
- ToolAnnotations,
2955
- McpClientLimits,
2956
- defaultMcpClientLimits,
2957
- mcpSdkTimerCeilingMs,
2958
- McpToolsOptions,
2959
- McpHealthInput,
2960
- mcpHealthReserveMs,
2961
- McpToolResult,
2962
- McpToolMetadata,
2963
- McpServerHeader,
2964
- McpError,
2965
- McpCredentialsUnverified,
2966
- ProcessConfig,
2967
3069
  maxApiErrorInstructionsLength,
2968
3070
  ApiErrorRecovery,
2969
3071
  maxApiErrorMessageLength,
@@ -2997,6 +3099,23 @@ export {
2997
3099
  ApprovalElicitation,
2998
3100
  ApprovalResponse,
2999
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,
3000
3119
  WebhookTransportLimits,
3001
3120
  defaultWebhookTransportLimits,
3002
3121
  WebhookRequestData,
@@ -3048,13 +3167,16 @@ export {
3048
3167
  HostDeclarationInvalid3 as HostDeclarationInvalid,
3049
3168
  HostEvaluationFailed3 as HostEvaluationFailed,
3050
3169
  HostOperationFailed3 as HostOperationFailed,
3051
- HostRouterError2 as HostRouterError,
3052
- HostedRouter2 as HostedRouter,
3053
- HostedCatalog2 as HostedCatalog,
3054
- HostedCatalogSummary2 as HostedCatalogSummary,
3055
- HostError4 as HostError,
3056
- HostResponse4 as HostResponse,
3057
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,
3058
3180
  skillsCommand,
3059
3181
  skillCatalog,
3060
3182
  inspectCommand,