apps 0.0.1-beta.5 → 0.0.1-beta.6

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 (63) hide show
  1. package/README.md +65 -43
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-FWQC6I3C.js → chunk-5T57N25Q.js} +13 -1
  4. package/js/{chunk-67EVWIGJ.js → chunk-6BSSI67S.js} +4 -4
  5. package/js/{chunk-DQAZTA4I.js → chunk-B3EOZTK3.js} +212 -19
  6. package/js/{chunk-TDNYXSIX.js → chunk-ECQFRCH4.js} +21 -9
  7. package/js/{chunk-UDDE5KOR.js → chunk-ITM77QPO.js} +26 -7
  8. package/js/{chunk-G7T27IWB.js → chunk-MKWZPDR6.js} +1 -1
  9. package/js/chunk-MNMNLXBL.js +507 -0
  10. package/js/{chunk-CYYBFC2K.js → chunk-NKLWZJLE.js} +1 -1
  11. package/js/{chunk-C3VAOK5B.js → chunk-OE3QQTSB.js} +33 -26
  12. package/js/{chunk-YEPYT6SD.js → chunk-R3EV5FTO.js} +12 -0
  13. package/js/{chunk-XHO2ZX6W.js → chunk-RFVIONFX.js} +27 -10
  14. package/js/{chunk-LUVSFETN.js → chunk-SB4HEPNJ.js} +72 -228
  15. package/js/chunk-T7GKZBLP.js +209 -0
  16. package/js/client.js +1 -1
  17. package/js/contracts.js +24 -11
  18. package/js/effect.js +9 -11
  19. package/js/graphql.js +25 -32
  20. package/js/host.js +9 -11
  21. package/js/index.js +184 -173
  22. package/js/mcp/effect.js +11 -13
  23. package/js/mcp/stdio.js +15 -17
  24. package/js/mcp.js +50 -36
  25. package/js/openapi.js +166 -108
  26. package/js/skills.js +6 -7
  27. package/package.json +1 -1
  28. package/runtime.json +1 -1
  29. package/types/apps/src/contracts/app.d.ts +2 -5
  30. package/types/apps/src/contracts/host.d.ts +11 -7
  31. package/types/apps/src/contracts/mcp.d.ts +16 -0
  32. package/types/apps/src/contracts/openapi.d.ts +4 -0
  33. package/types/apps/src/contracts/operations.d.ts +0 -5
  34. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  35. package/types/apps/src/contracts/protocols/4.d.ts +1229 -0
  36. package/types/apps/src/contracts/router.d.ts +59 -0
  37. package/types/apps/src/graphql.d.ts +1 -3
  38. package/types/apps/src/implementation/account-router.d.ts +12 -0
  39. package/types/apps/src/implementation/app.d.ts +5 -4
  40. package/types/apps/src/implementation/catalog-cache.d.ts +9 -2
  41. package/types/apps/src/implementation/graphql-catalog.d.ts +1 -4
  42. package/types/apps/src/implementation/mcp-catalog.d.ts +1 -4
  43. package/types/apps/src/implementation/mcp-client.d.ts +35 -19
  44. package/types/apps/src/implementation/mcp.d.ts +35 -19
  45. package/types/apps/src/implementation/openapi-compile.d.ts +2 -1
  46. package/types/apps/src/implementation/openapi-source.d.ts +2 -6
  47. package/types/apps/src/implementation/operations.d.ts +26 -3
  48. package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
  49. package/types/apps/src/implementation/router-catalog.d.ts +225 -0
  50. package/types/apps/src/implementation/router.d.ts +59 -0
  51. package/types/apps/src/implementation/schema.d.ts +5 -1
  52. package/types/apps/src/implementation/workflow-context.d.ts +1 -1
  53. package/types/apps/src/index.d.ts +3 -2
  54. package/types/apps/src/mcp-stdio.d.ts +2 -5
  55. package/types/apps/src/mcp.d.ts +5 -4
  56. package/types/apps/src/openapi.d.ts +6 -6
  57. package/js/chunk-3XKZDQLM.js +0 -93
  58. package/js/chunk-4M277YTM.js +0 -136
  59. package/js/chunk-SB3V4YVR.js +0 -18
  60. package/js/chunk-W4DMKWAB.js +0 -35
  61. package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
  62. package/types/apps/src/implementation/account-operations.d.ts +0 -151
  63. package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
package/js/index.js CHANGED
@@ -3,19 +3,23 @@ import {
3
3
  defineDatabase,
4
4
  table,
5
5
  workflow
6
- } from "./chunk-C3VAOK5B.js";
6
+ } from "./chunk-OE3QQTSB.js";
7
7
  import "./chunk-ZQINWV4W.js";
8
8
  import {
9
+ dynamicRouter,
9
10
  fromPromise,
10
11
  mutation,
11
12
  nativeOperation,
13
+ nativeRouter,
12
14
  operationDeclaration,
13
15
  query,
16
+ router,
17
+ routerDeclaration,
14
18
  withApproval
15
- } from "./chunk-3XKZDQLM.js";
19
+ } from "./chunk-T7GKZBLP.js";
16
20
  import {
17
21
  accountProviderError
18
- } from "./chunk-G7T27IWB.js";
22
+ } from "./chunk-MKWZPDR6.js";
19
23
  import {
20
24
  CalendarSchedule,
21
25
  ElicitationFailed,
@@ -30,16 +34,13 @@ import {
30
34
  ScheduleTiming,
31
35
  SecretsMethod,
32
36
  WorkflowFailure
33
- } from "./chunk-DQAZTA4I.js";
37
+ } from "./chunk-B3EOZTK3.js";
34
38
  import "./chunk-N7YDVXYJ.js";
35
39
  import {
36
- CacheError
37
- } from "./chunk-YEPYT6SD.js";
38
- import "./chunk-JU7VHODU.js";
39
- import "./chunk-W4DMKWAB.js";
40
- import {
40
+ CacheError,
41
41
  ProviderError
42
- } from "./chunk-SB3V4YVR.js";
42
+ } from "./chunk-R3EV5FTO.js";
43
+ import "./chunk-JU7VHODU.js";
43
44
  import {
44
45
  array,
45
46
  boolean,
@@ -59,7 +60,7 @@ import {
59
60
  userId,
60
61
  withLazyJsonSchemaDocument,
61
62
  wrap
62
- } from "./chunk-FWQC6I3C.js";
63
+ } from "./chunk-5T57N25Q.js";
63
64
  import "./chunk-PZB6T6KU.js";
64
65
  import {
65
66
  JsonObject,
@@ -104,7 +105,7 @@ var secrets = (options) => new SecretsMethod(options);
104
105
  var oauth2 = (config, response) => parse(OAuth2Config, config).pipe(Effect_exports.map((config2) => new OAuth2Method({ config: config2, response })));
105
106
  var defineProvider = (options) => new Provider(options);
106
107
 
107
- // src/implementation/account-operations.ts
108
+ // src/implementation/account-router.ts
108
109
  var inputDocument = (operation) => {
109
110
  const imported = importedJsonSchema(operation.input);
110
111
  if (imported !== void 0) return Schema_exports.decodeUnknownSync(JsonObject)(imported);
@@ -115,72 +116,70 @@ var declaresOutput = (operation) => {
115
116
  const property = Object.getOwnPropertyDescriptor(operation, "outputSchema");
116
117
  return property !== void 0 && (property.get !== void 0 || property.value !== void 0);
117
118
  };
118
- var combine = (kind, groups) => Object.fromEntries(
119
- [...groups].map(([name, accounts]) => {
120
- const variants = [...accounts.values()];
121
- const first = variants[0];
122
- if (first === void 0)
123
- throw new Error("An account operation must have at least one account");
124
- const select = (input2) => {
125
- const operation = accounts.get(input2.accountId);
126
- if (operation === void 0)
127
- throw new Error("Account selection must be decoded before execution");
128
- return operation;
129
- };
130
- const input = Schema_exports.Union(
131
- [...accounts].map(
132
- ([accountId, operation]) => Schema_exports.Struct({ accountId: Schema_exports.Literal(accountId), input: operation.input })
133
- )
134
- );
135
- const inputSchema = () => ({
119
+ var combineOperation = (accounts) => {
120
+ const variants = [...accounts.values()];
121
+ const first = variants[0];
122
+ if (first === void 0) throw new Error("An account operation must have at least one account");
123
+ const kind = variants.every((operation) => operation.kind === "query") ? "query" : "mutation";
124
+ const select = (input2) => {
125
+ const operation = accounts.get(input2.accountId);
126
+ if (operation === void 0)
127
+ throw new Error("Account selection must be decoded before execution");
128
+ return operation;
129
+ };
130
+ const input = Schema_exports.Union(
131
+ [...accounts].map(
132
+ ([accountId, operation]) => Schema_exports.Struct({ accountId: Schema_exports.Literal(accountId), input: operation.input })
133
+ )
134
+ );
135
+ const inputSchema = () => ({
136
+ type: "object",
137
+ anyOf: [...accounts].map(([accountId, operation], index) => ({
136
138
  type: "object",
137
- anyOf: [...accounts].map(([accountId, operation], index) => ({
138
- type: "object",
139
- properties: {
140
- accountId: { type: "string", const: accountId },
141
- input: nestJsonSchema(inputDocument(operation), `#/anyOf/${index}/properties/input`)
142
- },
143
- required: ["accountId", "input"]
144
- }))
145
- });
146
- const declaration2 = operationDeclaration({
147
- kind,
148
- ...first.description === void 0 ? {} : { description: first.description },
149
- ...first.title === void 0 ? {} : { title: first.title },
150
- ...first.annotations === void 0 || !variants.every(
151
- (operation) => JSON.stringify(operation.annotations) === JSON.stringify(first.annotations)
152
- ) ? {} : { annotations: first.annotations },
153
- ...first._meta === void 0 || !variants.every(
154
- (operation) => JSON.stringify(operation._meta) === JSON.stringify(first._meta)
155
- ) ? {} : { _meta: first._meta },
156
- input: withLazyJsonSchemaDocument(input, inputSchema),
157
- approval: (context) => {
158
- const operation = select(context.toolInput);
159
- return operation.approval === void 0 ? Effect_exports.succeed("approved") : operation.approval({ ...context, toolInput: context.toolInput.input });
139
+ properties: {
140
+ accountId: { type: "string", const: accountId },
141
+ input: nestJsonSchema(inputDocument(operation), `#/anyOf/${index}/properties/input`)
160
142
  },
161
- run: (context, input2) => {
162
- const operation = select(input2);
163
- return operation.run(context, input2.input).pipe(
164
- Effect_exports.mapError((error) => accountProviderError(error, input2.accountId)),
165
- Effect_exports.flatMap(
166
- (output) => operation.output === void 0 ? Effect_exports.succeed(output) : Schema_exports.decodeUnknownEffect(operation.output)(output)
167
- )
168
- );
169
- }
170
- });
171
- if (variants.every(declaresOutput)) {
172
- const outputSchema = once(() => ({
173
- anyOf: variants.flatMap(
174
- (operation) => operation.outputSchema === void 0 ? [] : [operation.outputSchema]
175
- ).map((output, index) => nestJsonSchema(output, `#/anyOf/${index}`))
176
- }));
177
- const native = nativeOperation(declaration2);
178
- if (native !== void 0)
179
- Object.defineProperty(native, "outputSchema", { enumerable: true, get: outputSchema });
143
+ required: ["accountId", "input"]
144
+ }))
145
+ });
146
+ const declaration2 = operationDeclaration({
147
+ kind,
148
+ ...first.description === void 0 ? {} : { description: first.description },
149
+ ...first.title === void 0 ? {} : { title: first.title },
150
+ ...first.annotations === void 0 || !variants.every(
151
+ (operation) => JSON.stringify(operation.annotations) === JSON.stringify(first.annotations)
152
+ ) ? {} : { annotations: first.annotations },
153
+ ...first._meta === void 0 || !variants.every((operation) => JSON.stringify(operation._meta) === JSON.stringify(first._meta)) ? {} : { _meta: first._meta },
154
+ input: withLazyJsonSchemaDocument(input, inputSchema),
155
+ approval: (context) => {
156
+ const operation = select(context.toolInput);
157
+ return operation.approval === void 0 ? Effect_exports.succeed("approved") : operation.approval({ ...context, toolInput: context.toolInput.input });
158
+ },
159
+ run: (context, input2) => {
160
+ const operation = select(input2);
161
+ return operation.run(context, input2.input).pipe(
162
+ Effect_exports.mapError((error) => accountProviderError(error, input2.accountId)),
163
+ Effect_exports.flatMap(
164
+ (output) => operation.output === void 0 ? Effect_exports.succeed(output) : Schema_exports.decodeUnknownEffect(operation.output)(output)
165
+ )
166
+ );
180
167
  }
181
- return [name, declaration2];
182
- })
183
- );
168
+ });
169
+ if (variants.every(declaresOutput)) {
170
+ const outputSchema = once(() => ({
171
+ anyOf: variants.flatMap(
172
+ (operation) => operation.outputSchema === void 0 ? [] : [operation.outputSchema]
173
+ ).map((output, index) => nestJsonSchema(output, `#/anyOf/${index}`))
174
+ }));
175
+ const native2 = nativeOperation(declaration2);
176
+ if (native2 !== void 0)
177
+ Object.defineProperty(native2, "outputSchema", { enumerable: true, get: outputSchema });
178
+ }
179
+ const native = nativeOperation(declaration2);
180
+ if (native === void 0) throw new Error("Expected a combined operation");
181
+ return native;
182
+ };
184
183
  var sameAcross = (key, variants) => {
185
184
  const first = variants[0]?.[1][key];
186
185
  return first !== void 0 && variants.every(([, tool]) => JSON.stringify(tool[key]) === JSON.stringify(first)) ? { [key]: first } : {};
@@ -192,7 +191,7 @@ var mergeSummary = (name, variants) => {
192
191
  name,
193
192
  description: first.description,
194
193
  ...first.title === void 0 ? {} : { title: first.title },
195
- readOnly: name.startsWith("queries."),
194
+ readOnly: variants.every(([, tool]) => tool.readOnly === true),
196
195
  ...sameAcross("annotations", variants)
197
196
  });
198
197
  };
@@ -218,112 +217,123 @@ var merge = (name, variants) => Schema_exports.decodeUnknownSync(HostedTool)({
218
217
  } : {},
219
218
  ...sameAcross("_meta", variants)
220
219
  });
221
- var accountOperations = (accounts, discover, options) => Effect_exports.runPromise(
220
+ var combineDynamic = (sources) => {
221
+ const first = [...sources.values()][0];
222
+ const grouped = (read) => Effect_exports.gen(function* () {
223
+ const groups = /* @__PURE__ */ new Map();
224
+ for (const [accountId, source] of sources) {
225
+ const tools = yield* read(source).pipe(
226
+ Effect_exports.mapError((error) => accountProviderError(error, accountId))
227
+ );
228
+ for (const tool of tools) {
229
+ const variants = groups.get(tool.name) ?? [];
230
+ if (variants.some(([id2]) => id2 === accountId))
231
+ return yield* Effect_exports.die(new Error("Duplicate source operation"));
232
+ variants.push([accountId, tool]);
233
+ groups.set(tool.name, variants);
234
+ }
235
+ }
236
+ return groups;
237
+ });
238
+ return {
239
+ kind: "dynamic",
240
+ // Accounts share one source, so the first account describes the router.
241
+ ...first?.meta === void 0 ? {} : { meta: first.meta },
242
+ ...first?.overrides === void 0 ? {} : { overrides: first.overrides },
243
+ list: () => grouped((source) => source.list()).pipe(
244
+ Effect_exports.map((groups) => [...groups].map(([name, variants]) => merge(name, variants)))
245
+ ),
246
+ summaries: () => grouped(
247
+ (source) => source.summaries === void 0 ? source.list() : source.summaries()
248
+ ).pipe(
249
+ Effect_exports.map((groups) => [...groups].map(([name, variants]) => mergeSummary(name, variants)))
250
+ ),
251
+ describe: (name) => Effect_exports.gen(function* () {
252
+ const variants = [];
253
+ for (const [accountId, source] of sources) {
254
+ const tool = yield* (source.describe === void 0 ? source.list().pipe(Effect_exports.map((tools) => tools.find((tool2) => tool2.name === name))) : source.describe(name)).pipe(Effect_exports.mapError((error) => accountProviderError(error, accountId)));
255
+ if (tool !== void 0) variants.push([accountId, tool]);
256
+ }
257
+ return variants.length === 0 ? void 0 : merge(name, variants);
258
+ }),
259
+ resolve: (name) => Effect_exports.gen(function* () {
260
+ const operations = /* @__PURE__ */ new Map();
261
+ for (const [accountId, source] of sources) {
262
+ const operation = yield* source.resolve(name).pipe(Effect_exports.mapError((error) => accountProviderError(error, accountId)));
263
+ if (operation !== void 0) operations.set(accountId, operation);
264
+ }
265
+ return operations.size === 0 ? void 0 : combineOperation(operations);
266
+ })
267
+ };
268
+ };
269
+ var combineNode = (variants) => {
270
+ const nodes = [...variants.values()];
271
+ const first = nodes[0];
272
+ if (first === void 0) throw new Error("An account operation must have at least one account");
273
+ switch (first.kind) {
274
+ case "query":
275
+ case "mutation":
276
+ return combineOperation(
277
+ narrow(
278
+ variants,
279
+ (node) => node.kind === "query" || node.kind === "mutation"
280
+ )
281
+ );
282
+ case "dynamic":
283
+ return combineDynamic(
284
+ narrow(variants, (node) => node.kind === "dynamic")
285
+ );
286
+ case "router": {
287
+ const routers = narrow(variants, (node) => node.kind === "router");
288
+ const keys = new Set([...routers.values()].flatMap((router2) => Object.keys(router2.children)));
289
+ return {
290
+ kind: "router",
291
+ ...first.meta === void 0 ? {} : { meta: first.meta },
292
+ children: Object.fromEntries(
293
+ [...keys].map((key) => {
294
+ const children = /* @__PURE__ */ new Map();
295
+ for (const [accountId, router2] of routers) {
296
+ const child = Object.hasOwn(router2.children, key) ? router2.children[key] : void 0;
297
+ if (child !== void 0) children.set(accountId, child);
298
+ }
299
+ return [key, combineNode(children)];
300
+ })
301
+ )
302
+ };
303
+ }
304
+ }
305
+ };
306
+ var narrow = (variants, is) => {
307
+ const narrowed = /* @__PURE__ */ new Map();
308
+ for (const [accountId, node] of variants) {
309
+ if (!is(node)) throw new Error("Each account's router must have the same shape");
310
+ narrowed.set(accountId, node);
311
+ }
312
+ return narrowed;
313
+ };
314
+ var accountRouter = (accounts, discover, options) => Effect_exports.runPromise(
222
315
  Effect_exports.gen(function* () {
223
- const queries = /* @__PURE__ */ new Map();
224
- const mutations = /* @__PURE__ */ new Map();
225
- const sources = /* @__PURE__ */ new Map();
316
+ const routers = /* @__PURE__ */ new Map();
226
317
  for (const account of accounts) {
227
- const operations = yield* Effect_exports.tryPromise({
318
+ const declaration2 = yield* Effect_exports.tryPromise({
228
319
  try: () => discover(account),
229
320
  catch: (error) => accountProviderError(error, account.id)
230
321
  });
231
- if (sources.has(account.id))
322
+ if (routers.has(account.id))
232
323
  return yield* Effect_exports.die(new Error("Account selections must be unique"));
233
- if (operations.dynamicTools !== void 0) sources.set(account.id, operations.dynamicTools);
234
- for (const [source, target] of [
235
- [operations.queries, queries],
236
- [operations.mutations, mutations]
237
- ]) {
238
- for (const [name, declaration2] of Object.entries(source ?? {})) {
239
- const operation = nativeOperation(declaration2);
240
- if (operation === void 0)
241
- return yield* Effect_exports.die(new Error("Expected a protocol operation"));
242
- const group = target.get(name) ?? /* @__PURE__ */ new Map();
243
- if (group.has(account.id))
244
- return yield* Effect_exports.die(new Error("Account selections must be unique"));
245
- group.set(account.id, operation);
246
- target.set(name, group);
247
- }
248
- }
324
+ const router2 = nativeRouter(declaration2);
325
+ if (router2 === void 0) return yield* Effect_exports.die(new Error("Expected a protocol router"));
326
+ routers.set(account.id, router2);
249
327
  }
250
- const declared = {
251
- queries: combine("query", queries),
252
- mutations: combine("mutation", mutations)
253
- };
254
- if (sources.size === 0) return declared;
255
- const grouped = (read) => Effect_exports.gen(function* () {
256
- const groups = /* @__PURE__ */ new Map();
257
- for (const [accountId, source] of sources) {
258
- const tools = yield* read(source).pipe(
259
- Effect_exports.mapError((error) => accountProviderError(error, accountId))
260
- );
261
- for (const tool of tools) {
262
- const variants = groups.get(tool.name) ?? [];
263
- if (variants.some(([id2]) => id2 === accountId))
264
- return yield* Effect_exports.die(new Error("Duplicate source operation"));
265
- variants.push([accountId, tool]);
266
- groups.set(tool.name, variants);
267
- }
268
- }
269
- return groups;
270
- });
271
- return {
272
- ...declared,
273
- dynamicTools: {
274
- list: () => grouped((source) => source.list()).pipe(
275
- Effect_exports.map((groups) => [...groups].map(([name, variants]) => merge(name, variants)))
276
- ),
277
- summaries: () => grouped(
278
- (source) => source.summaries === void 0 ? source.list() : source.summaries()
279
- ).pipe(
280
- Effect_exports.map(
281
- (groups) => [...groups].map(([name, variants]) => mergeSummary(name, variants))
282
- )
283
- ),
284
- describe: (name) => Effect_exports.gen(function* () {
285
- const variants = [];
286
- for (const [accountId, source] of sources) {
287
- const tool = yield* (source.describe === void 0 ? source.list().pipe(Effect_exports.map((tools) => tools.find((tool2) => tool2.name === name))) : source.describe(name)).pipe(Effect_exports.mapError((error) => accountProviderError(error, accountId)));
288
- if (tool !== void 0) variants.push([accountId, tool]);
289
- }
290
- return variants.length === 0 ? void 0 : merge(name, variants);
291
- }),
292
- resolve: (name) => Effect_exports.gen(function* () {
293
- const kind = name.startsWith("queries.") ? "query" : "mutation";
294
- const operations = /* @__PURE__ */ new Map();
295
- for (const [accountId, source] of sources) {
296
- const operation = yield* source.resolve(name).pipe(Effect_exports.mapError((error) => accountProviderError(error, accountId)));
297
- if (operation !== void 0) {
298
- if (operation.kind !== kind)
299
- return yield* Effect_exports.die(new Error("Operation kind changed"));
300
- operations.set(accountId, operation);
301
- }
302
- }
303
- if (operations.size === 0) return void 0;
304
- return nativeOperation(combine(kind, /* @__PURE__ */ new Map([[name, operations]]))[name]);
305
- })
306
- }
307
- };
328
+ if (routers.size === 0) return routerDeclaration({ kind: "router", children: {} });
329
+ const combined = combineNode(routers);
330
+ if (combined.kind !== "router" && combined.kind !== "dynamic")
331
+ return yield* Effect_exports.die(new Error("Expected a protocol router"));
332
+ return routerDeclaration(combined);
308
333
  }),
309
334
  options
310
335
  );
311
336
 
312
- // src/implementation/dynamic-tools.ts
313
- var dynamicTools = (source) => ({
314
- list: () => fromPromise(source.list)().pipe(
315
- Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(Schema_exports.Array(HostedTool)))
316
- ),
317
- resolve: (name) => fromPromise(source.resolve)(name).pipe(
318
- Effect_exports.map((value) => {
319
- if (value === void 0) return void 0;
320
- const operation = nativeOperation(value);
321
- if (operation === void 0) throw new Error("Expected an operation declaration");
322
- return operation;
323
- })
324
- )
325
- });
326
-
327
337
  // src/implementation/dynamic-skills.ts
328
338
  var dynamicSkills = (source) => ({
329
339
  list: fromPromise(async () => source.list())
@@ -396,7 +406,7 @@ export {
396
406
  ResponseStatusError,
397
407
  ValidationError,
398
408
  WorkflowFailure,
399
- accountOperations,
409
+ accountRouter,
400
410
  array,
401
411
  boolean,
402
412
  cron,
@@ -404,8 +414,8 @@ export {
404
414
  defineApp,
405
415
  defineDatabase,
406
416
  defineProvider,
417
+ dynamicRouter,
407
418
  dynamicSkills,
408
- dynamicTools,
409
419
  id,
410
420
  interval,
411
421
  json,
@@ -417,6 +427,7 @@ export {
417
427
  object,
418
428
  query,
419
429
  record,
430
+ router,
420
431
  secrets2 as secrets,
421
432
  string,
422
433
  table,
package/js/mcp/effect.js CHANGED
@@ -1,27 +1,25 @@
1
1
  import {
2
2
  mcpClientEffect,
3
3
  mcpToolsEffect
4
- } from "../chunk-67EVWIGJ.js";
5
- import "../chunk-UDDE5KOR.js";
4
+ } from "../chunk-6BSSI67S.js";
5
+ import "../chunk-ITM77QPO.js";
6
6
  import "../chunk-BCSNKUAC.js";
7
- import "../chunk-LUVSFETN.js";
8
- import "../chunk-CYYBFC2K.js";
7
+ import "../chunk-SB4HEPNJ.js";
8
+ import "../chunk-NKLWZJLE.js";
9
+ import "../chunk-MNMNLXBL.js";
9
10
  import "../chunk-IPI4MFSN.js";
10
- import "../chunk-4M277YTM.js";
11
- import "../chunk-C3VAOK5B.js";
11
+ import "../chunk-OE3QQTSB.js";
12
12
  import "../chunk-ZQINWV4W.js";
13
- import "../chunk-3XKZDQLM.js";
14
- import "../chunk-G7T27IWB.js";
15
- import "../chunk-DQAZTA4I.js";
13
+ import "../chunk-T7GKZBLP.js";
14
+ import "../chunk-MKWZPDR6.js";
15
+ import "../chunk-B3EOZTK3.js";
16
16
  import "../chunk-N7YDVXYJ.js";
17
- import "../chunk-YEPYT6SD.js";
17
+ import "../chunk-R3EV5FTO.js";
18
18
  import "../chunk-JU7VHODU.js";
19
- import "../chunk-W4DMKWAB.js";
20
- import "../chunk-SB3V4YVR.js";
21
19
  import "../chunk-RJDDBDSN.js";
22
20
  import "../chunk-57RKNWL2.js";
23
21
  import "../chunk-UK573G7W.js";
24
- import "../chunk-FWQC6I3C.js";
22
+ import "../chunk-5T57N25Q.js";
25
23
  import "../chunk-PZB6T6KU.js";
26
24
  import "../chunk-27F7W2LG.js";
27
25
  import "../chunk-CDL5PM2Q.js";
package/js/mcp/stdio.js CHANGED
@@ -2,32 +2,30 @@ import {
2
2
  adaptMcpTools,
3
3
  mcpClient,
4
4
  mcpJsonSchemaValidator
5
- } from "../chunk-UDDE5KOR.js";
5
+ } from "../chunk-ITM77QPO.js";
6
6
  import {
7
- protocolOperations
8
- } from "../chunk-TDNYXSIX.js";
7
+ protocolRouter
8
+ } from "../chunk-ECQFRCH4.js";
9
9
  import "../chunk-BCSNKUAC.js";
10
- import "../chunk-LUVSFETN.js";
11
- import "../chunk-CYYBFC2K.js";
10
+ import "../chunk-SB4HEPNJ.js";
11
+ import "../chunk-NKLWZJLE.js";
12
+ import "../chunk-MNMNLXBL.js";
12
13
  import "../chunk-IPI4MFSN.js";
13
- import "../chunk-4M277YTM.js";
14
- import "../chunk-C3VAOK5B.js";
14
+ import "../chunk-OE3QQTSB.js";
15
15
  import "../chunk-ZQINWV4W.js";
16
- import "../chunk-3XKZDQLM.js";
17
- import "../chunk-G7T27IWB.js";
16
+ import "../chunk-T7GKZBLP.js";
17
+ import "../chunk-MKWZPDR6.js";
18
18
  import {
19
19
  McpError,
20
20
  ProcessConfig
21
- } from "../chunk-DQAZTA4I.js";
21
+ } from "../chunk-B3EOZTK3.js";
22
22
  import "../chunk-N7YDVXYJ.js";
23
- import "../chunk-YEPYT6SD.js";
23
+ import "../chunk-R3EV5FTO.js";
24
24
  import "../chunk-JU7VHODU.js";
25
- import "../chunk-W4DMKWAB.js";
26
- import "../chunk-SB3V4YVR.js";
27
25
  import "../chunk-RJDDBDSN.js";
28
26
  import "../chunk-57RKNWL2.js";
29
27
  import "../chunk-UK573G7W.js";
30
- import "../chunk-FWQC6I3C.js";
28
+ import "../chunk-5T57N25Q.js";
31
29
  import "../chunk-PZB6T6KU.js";
32
30
  import "../chunk-27F7W2LG.js";
33
31
  import {
@@ -120,11 +118,11 @@ var stdioToolsEffect = (input) => Effect_exports.gen(function* () {
120
118
  });
121
119
 
122
120
  // src/mcp-stdio.ts
123
- var stdioOperations = (config, signal, kinds = {}) => Effect_exports.runPromise(
124
- stdioToolsEffect(config).pipe(Effect_exports.map((tools) => protocolOperations(tools, kinds))),
121
+ var stdioRouter = (config, signal, kinds = {}) => Effect_exports.runPromise(
122
+ stdioToolsEffect(config).pipe(Effect_exports.map((tools) => protocolRouter(tools, kinds))),
125
123
  signal === void 0 ? {} : { signal }
126
124
  );
127
125
  export {
128
126
  McpError,
129
- stdioOperations
127
+ stdioRouter
130
128
  };