apps 0.0.1-beta.83 → 0.0.1-beta.85

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.
@@ -1998,15 +1998,6 @@ var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
1998
1998
  { anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError2, ProviderError]) }
1999
1999
  ) {
2000
2000
  };
2001
- var ProcessConfig = Schema_exports.Struct({
2002
- command: Schema_exports.NonEmptyString,
2003
- args: Schema_exports.Array(Schema_exports.String),
2004
- cwd: Schema_exports.optional(Schema_exports.String),
2005
- env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
2006
- timeoutMs: Schema_exports.Int.check(
2007
- Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
2008
- )
2009
- });
2010
2001
 
2011
2002
  // src/contracts/webhook-protocol.ts
2012
2003
  var WebhookTransportLimits = Schema_exports.Struct({
@@ -4429,7 +4420,6 @@ export {
4429
4420
  McpServerHeader,
4430
4421
  McpError2 as McpError,
4431
4422
  McpCredentialsUnverified,
4432
- ProcessConfig,
4433
4423
  WebhookTransportLimits,
4434
4424
  defaultWebhookTransportLimits,
4435
4425
  WebhookRequestData,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  fixedRouter
3
- } from "./chunk-JKH7ALFN.js";
3
+ } from "./chunk-24IHGRND.js";
4
4
  import {
5
5
  nativeOperation,
6
6
  operationDeclaration,
7
7
  routerDeclaration
8
- } from "./chunk-HNCCRVIT.js";
8
+ } from "./chunk-MHFAQ2XD.js";
9
9
 
10
10
  // src/implementation/protocol-operations.ts
11
11
  var protocolOperations = (operations, kinds = {}) => {
@@ -12,7 +12,7 @@ import {
12
12
  parseSkillLoadFailed,
13
13
  readCatalog,
14
14
  routerSkills
15
- } from "./chunk-JKH7ALFN.js";
15
+ } from "./chunk-24IHGRND.js";
16
16
  import {
17
17
  appInvocationFetch
18
18
  } from "./chunk-I6Q7ZPKJ.js";
@@ -26,12 +26,12 @@ import {
26
26
  makeEmitter,
27
27
  toEffectApp,
28
28
  withPlacements
29
- } from "./chunk-AIXYBMMI.js";
29
+ } from "./chunk-PAUT66KY.js";
30
30
  import {
31
31
  declaredOperations,
32
32
  locate,
33
33
  nativeOperation
34
- } from "./chunk-HNCCRVIT.js";
34
+ } from "./chunk-MHFAQ2XD.js";
35
35
  import {
36
36
  accountProviderError,
37
37
  appCode,
@@ -91,7 +91,7 @@ import {
91
91
  reservedTablePrefix,
92
92
  sqlBindingsLimit,
93
93
  workflowDurationMillis
94
- } from "./chunk-NG56RPCA.js";
94
+ } from "./chunk-WUPLD4VN.js";
95
95
  import {
96
96
  AppSkills,
97
97
  SkillFile
package/js/contracts.js CHANGED
@@ -146,7 +146,7 @@ import {
146
146
  skillCatalog,
147
147
  skillsCommand,
148
148
  workflowDurationMillis
149
- } from "./chunk-NG56RPCA.js";
149
+ } from "./chunk-WUPLD4VN.js";
150
150
  import {
151
151
  FailureCode,
152
152
  FailureDetail,
package/js/effect.js CHANGED
@@ -3,17 +3,17 @@ import {
3
3
  ApprovalDecision,
4
4
  createAppHandler,
5
5
  prepareElicitation
6
- } from "./chunk-OHBKJ54H.js";
6
+ } from "./chunk-ZKW64V6P.js";
7
7
  import "./chunk-PL5KOEZD.js";
8
- import "./chunk-JKH7ALFN.js";
8
+ import "./chunk-24IHGRND.js";
9
9
  import "./chunk-I6Q7ZPKJ.js";
10
10
  import "./chunk-XBG7HHXC.js";
11
- import "./chunk-AIXYBMMI.js";
12
- import "./chunk-HNCCRVIT.js";
11
+ import "./chunk-PAUT66KY.js";
12
+ import "./chunk-MHFAQ2XD.js";
13
13
  import "./chunk-W6XCQAXP.js";
14
14
  import {
15
15
  ToolAnnotations
16
- } from "./chunk-NG56RPCA.js";
16
+ } from "./chunk-WUPLD4VN.js";
17
17
  import "./chunk-Q4IZAUIF.js";
18
18
  import "./chunk-H72MEDMN.js";
19
19
  import {
package/js/graphql.js CHANGED
@@ -4,28 +4,28 @@ import {
4
4
  } from "./chunk-TE25A7D6.js";
5
5
  import {
6
6
  protocolOperations
7
- } from "./chunk-T2B6GUVY.js";
7
+ } from "./chunk-Y46DFT3O.js";
8
8
  import "./chunk-BCSNKUAC.js";
9
- import "./chunk-OHBKJ54H.js";
9
+ import "./chunk-ZKW64V6P.js";
10
10
  import {
11
11
  cacheKey
12
12
  } from "./chunk-PL5KOEZD.js";
13
- import "./chunk-JKH7ALFN.js";
13
+ import "./chunk-24IHGRND.js";
14
14
  import {
15
15
  failOnNetworkRefusal
16
16
  } from "./chunk-I6Q7ZPKJ.js";
17
17
  import "./chunk-XBG7HHXC.js";
18
- import "./chunk-AIXYBMMI.js";
18
+ import "./chunk-PAUT66KY.js";
19
19
  import {
20
20
  nativeOperation,
21
21
  routerDeclaration
22
- } from "./chunk-HNCCRVIT.js";
22
+ } from "./chunk-MHFAQ2XD.js";
23
23
  import {
24
24
  accountProviderError,
25
25
  graphqlProviderError,
26
26
  httpProviderError
27
27
  } from "./chunk-W6XCQAXP.js";
28
- import "./chunk-NG56RPCA.js";
28
+ import "./chunk-WUPLD4VN.js";
29
29
  import {
30
30
  NetworkRefused,
31
31
  ProviderError
package/js/host.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createAppHandler
3
- } from "./chunk-OHBKJ54H.js";
3
+ } from "./chunk-ZKW64V6P.js";
4
4
  import "./chunk-PL5KOEZD.js";
5
- import "./chunk-JKH7ALFN.js";
5
+ import "./chunk-24IHGRND.js";
6
6
  import "./chunk-I6Q7ZPKJ.js";
7
7
  import "./chunk-XBG7HHXC.js";
8
- import "./chunk-AIXYBMMI.js";
9
- import "./chunk-HNCCRVIT.js";
8
+ import "./chunk-PAUT66KY.js";
9
+ import "./chunk-MHFAQ2XD.js";
10
10
  import "./chunk-W6XCQAXP.js";
11
11
  import {
12
12
  ElicitationFailed,
@@ -22,7 +22,7 @@ import {
22
22
  WorkflowRun,
23
23
  WorkflowRunId,
24
24
  WorkflowRunPage
25
- } from "./chunk-NG56RPCA.js";
25
+ } from "./chunk-WUPLD4VN.js";
26
26
  import {
27
27
  CacheCommand,
28
28
  CacheError,
package/js/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  query,
12
12
  t,
13
13
  workflow
14
- } from "./chunk-AIXYBMMI.js";
14
+ } from "./chunk-PAUT66KY.js";
15
15
  import {
16
16
  dynamicRouter,
17
17
  mutation,
@@ -25,7 +25,7 @@ import {
25
25
  toolAnnotations,
26
26
  withApproval,
27
27
  withApprovals
28
- } from "./chunk-HNCCRVIT.js";
28
+ } from "./chunk-MHFAQ2XD.js";
29
29
  import {
30
30
  accountProviderError,
31
31
  fromPromise
@@ -44,7 +44,7 @@ import {
44
44
  ScheduleTiming,
45
45
  SecretsMethod,
46
46
  WorkflowFailure
47
- } from "./chunk-NG56RPCA.js";
47
+ } from "./chunk-WUPLD4VN.js";
48
48
  import {
49
49
  CacheError,
50
50
  FetchOptionUnsupported,
package/js/mcp/effect.js CHANGED
@@ -2,18 +2,17 @@ import {
2
2
  mcpClientEffect,
3
3
  mcpHealthEffect,
4
4
  mcpToolsEffect
5
- } from "../chunk-BX2S3T2R.js";
6
- import "../chunk-IGOYMUWZ.js";
5
+ } from "../chunk-T6QLMX67.js";
7
6
  import "../chunk-BCSNKUAC.js";
8
- import "../chunk-OHBKJ54H.js";
7
+ import "../chunk-ZKW64V6P.js";
9
8
  import "../chunk-PL5KOEZD.js";
10
- import "../chunk-JKH7ALFN.js";
9
+ import "../chunk-24IHGRND.js";
11
10
  import "../chunk-I6Q7ZPKJ.js";
12
11
  import "../chunk-XBG7HHXC.js";
13
- import "../chunk-AIXYBMMI.js";
14
- import "../chunk-HNCCRVIT.js";
12
+ import "../chunk-PAUT66KY.js";
13
+ import "../chunk-MHFAQ2XD.js";
15
14
  import "../chunk-W6XCQAXP.js";
16
- import "../chunk-NG56RPCA.js";
15
+ import "../chunk-WUPLD4VN.js";
17
16
  import "../chunk-Q4IZAUIF.js";
18
17
  import "../chunk-H72MEDMN.js";
19
18
  import "../chunk-KGCTYL2S.js";
package/js/mcp.js CHANGED
@@ -1,32 +1,30 @@
1
- import {
2
- mcpClientEffect,
3
- mcpHealthEffect
4
- } from "./chunk-BX2S3T2R.js";
5
1
  import {
6
2
  catalogCache,
7
3
  catalogScope
8
4
  } from "./chunk-TE25A7D6.js";
9
- import {
10
- adaptMcpTool
11
- } from "./chunk-IGOYMUWZ.js";
12
5
  import {
13
6
  protocolOperations
14
- } from "./chunk-T2B6GUVY.js";
7
+ } from "./chunk-Y46DFT3O.js";
8
+ import {
9
+ adaptMcpTool,
10
+ mcpClientEffect,
11
+ mcpHealthEffect
12
+ } from "./chunk-T6QLMX67.js";
15
13
  import "./chunk-BCSNKUAC.js";
16
- import "./chunk-OHBKJ54H.js";
14
+ import "./chunk-ZKW64V6P.js";
17
15
  import {
18
16
  cacheKey
19
17
  } from "./chunk-PL5KOEZD.js";
20
18
  import {
21
19
  operationDescription
22
- } from "./chunk-JKH7ALFN.js";
20
+ } from "./chunk-24IHGRND.js";
23
21
  import "./chunk-I6Q7ZPKJ.js";
24
22
  import "./chunk-XBG7HHXC.js";
25
- import "./chunk-AIXYBMMI.js";
23
+ import "./chunk-PAUT66KY.js";
26
24
  import {
27
25
  nativeOperation,
28
26
  routerDeclaration
29
- } from "./chunk-HNCCRVIT.js";
27
+ } from "./chunk-MHFAQ2XD.js";
30
28
  import {
31
29
  fromPromise,
32
30
  method
@@ -37,7 +35,7 @@ import {
37
35
  McpServerHeader,
38
36
  McpToolMetadata,
39
37
  McpToolsOptions
40
- } from "./chunk-NG56RPCA.js";
38
+ } from "./chunk-WUPLD4VN.js";
41
39
  import "./chunk-Q4IZAUIF.js";
42
40
  import "./chunk-H72MEDMN.js";
43
41
  import "./chunk-KGCTYL2S.js";
package/js/openapi.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  protocolOperations,
10
10
  protocolRouter
11
- } from "./chunk-T2B6GUVY.js";
11
+ } from "./chunk-Y46DFT3O.js";
12
12
  import {
13
13
  OpenapiCompileError,
14
14
  OpenapiCompileErrorCode,
@@ -29,7 +29,7 @@ import {
29
29
  isOpenapiTextMedia,
30
30
  openapiBinaryResultSchema,
31
31
  openapiMediaKind
32
- } from "./chunk-JKH7ALFN.js";
32
+ } from "./chunk-24IHGRND.js";
33
33
  import {
34
34
  failOnNetworkRefusal
35
35
  } from "./chunk-I6Q7ZPKJ.js";
@@ -37,7 +37,7 @@ import "./chunk-XBG7HHXC.js";
37
37
  import {
38
38
  nativeOperation,
39
39
  routerDeclaration
40
- } from "./chunk-HNCCRVIT.js";
40
+ } from "./chunk-MHFAQ2XD.js";
41
41
  import {
42
42
  accountProviderError,
43
43
  bodyUpstreamError,
@@ -53,7 +53,7 @@ import {
53
53
  OpenapiResponseError,
54
54
  RouterMeta,
55
55
  defaultOpenapiErrorLimits
56
- } from "./chunk-NG56RPCA.js";
56
+ } from "./chunk-WUPLD4VN.js";
57
57
  import {
58
58
  NetworkRefused,
59
59
  ProviderError,
@@ -5004,19 +5004,21 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
5004
5004
  } catch (error) {
5005
5005
  if (!(error instanceof OpenapiCompileError)) throw error;
5006
5006
  }
5007
- let pinnedOrigin = options.allowedOrigin;
5008
- for (const [origin, count] of options.allowedOrigin === void 0 ? counts : []) {
5009
- const best = pinnedOrigin === void 0 ? 0 : counts.get(pinnedOrigin) ?? 0;
5010
- if (count > best || count === best && origin === documentOrigin) pinnedOrigin = origin;
5007
+ const allowed = options.allowedOrigin === void 0 ? void 0 : typeof options.allowedOrigin === "string" ? [options.allowedOrigin] : options.allowedOrigin;
5008
+ let mostUsed;
5009
+ for (const [origin, count] of allowed === void 0 ? counts : []) {
5010
+ const best = mostUsed === void 0 ? 0 : counts.get(mostUsed) ?? 0;
5011
+ if (count > best || count === best && origin === documentOrigin) mostUsed = origin;
5011
5012
  }
5013
+ const pinnedOrigins = new Set(allowed ?? (mostUsed === void 0 ? [] : [mostUsed]));
5012
5014
  const imported = [];
5013
5015
  for (const { operation, methods: operationMethods, declared } of built) {
5014
5016
  const origin = new URL(operation.baseUrl).origin;
5015
- if (origin !== pinnedOrigin) {
5017
+ if (!pinnedOrigins.has(origin)) {
5016
5018
  skipped.push({
5017
5019
  ...declared,
5018
5020
  code: "multiple_hosts",
5019
- reason: options.allowedOrigin === void 0 ? `Its server origin ${origin} differs from ${pinnedOrigin ?? "the origin"} most operations use.` : `Its server origin ${origin} is not allowedOrigin ${options.allowedOrigin}.`
5021
+ reason: allowed === void 0 ? `Its server origin ${origin} differs from ${mostUsed ?? "the origin"} most operations use.` : `Its server origin ${origin} is not allowedOrigin ${allowed.join(", ")}.`
5020
5022
  });
5021
5023
  continue;
5022
5024
  }
@@ -5026,10 +5028,10 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
5026
5028
  const operations = imported.map(({ operation }) => operation);
5027
5029
  if (!operations.length) {
5028
5030
  const left = inDefinitionOrder(skipped);
5029
- if (options.allowedOrigin !== void 0 && built.length > 0)
5031
+ if (allowed !== void 0 && built.length > 0)
5030
5032
  throw new OpenapiCompileError({
5031
5033
  code: "no_supported_operations",
5032
- reason: `allowedOrigin ${options.allowedOrigin} is not the origin of any operation. They resolve to ${[...counts.keys()].join(", ")}. Set allowedOrigin to the origin that receives the account's credentials, or set baseUrl.`,
5034
+ reason: `allowedOrigin ${allowed.join(", ")} is not the origin of any operation. They resolve to ${[...counts.keys()].join(", ")}. Set allowedOrigin to the origin that receives the account's credentials, or set baseUrl.`,
5033
5035
  skipped: left,
5034
5036
  origins: [...counts.keys()]
5035
5037
  });
@@ -5094,7 +5096,7 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
5094
5096
  secrets: [...methods.values()],
5095
5097
  oauth,
5096
5098
  schemes,
5097
- pinnedOrigin,
5099
+ pinnedOrigins: [...pinnedOrigins],
5098
5100
  fallback
5099
5101
  };
5100
5102
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps",
3
- "version": "0.0.1-beta.83",
3
+ "version": "0.0.1-beta.85",
4
4
  "description": "TypeScript apps with typed tools, accounts, storage, and UI.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -33,10 +33,6 @@
33
33
  "types": "./types/apps/src/mcp.d.ts",
34
34
  "import": "./js/mcp.js"
35
35
  },
36
- "./mcp/stdio": {
37
- "types": "./types/apps/src/mcp-stdio.d.ts",
38
- "import": "./js/mcp/stdio.js"
39
- },
40
36
  "./mcp/effect": {
41
37
  "types": "./types/apps/src/implementation/mcp.d.ts",
42
38
  "import": "./js/mcp/effect.js"