apps 0.0.1-beta.90 → 0.0.1-beta.92

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 (57) hide show
  1. package/README.md +4 -4
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-YRGL4QEF.js → chunk-2GPX2E57.js} +3 -3
  4. package/js/{chunk-H72MEDMN.js → chunk-4PIQKACY.js} +2 -2
  5. package/js/{chunk-JPEUKEV4.js → chunk-4X2UI4R2.js} +1 -1
  6. package/js/{chunk-KLYSEHUD.js → chunk-62NVUKED.js} +2 -2
  7. package/js/{chunk-KUCCHNVY.js → chunk-6C2I6JLA.js} +6 -6
  8. package/js/{chunk-YWFUWTUJ.js → chunk-6F3WAXVN.js} +4 -4
  9. package/js/{chunk-6XQLA5NC.js → chunk-6WC2OWHV.js} +15 -10
  10. package/js/{chunk-YNJ5CZMJ.js → chunk-74H25C4X.js} +13 -11
  11. package/js/{chunk-DDHBUKXX.js → chunk-7HG422GB.js} +42 -2
  12. package/js/{chunk-EOPQ727L.js → chunk-ACQXVKVQ.js} +1 -1
  13. package/js/{chunk-PYQLOLOC.js → chunk-ATBBIJ5O.js} +2 -2
  14. package/js/{chunk-TUMGL2OC.js → chunk-DILSCQPJ.js} +2 -2
  15. package/js/{chunk-5MDA7MKL.js → chunk-DYE2CKHG.js} +8 -8
  16. package/js/{chunk-WMD4NHXZ.js → chunk-FA5MLNYL.js} +17 -16
  17. package/js/{chunk-7PHHWYV4.js → chunk-JJZZLNJY.js} +6 -6
  18. package/js/{chunk-74YVXBKY.js → chunk-KLSEU35Y.js} +1 -1
  19. package/js/{chunk-36UFTECB.js → chunk-MBCUKNUA.js} +10 -10
  20. package/js/{chunk-I5C7FD5Z.js → chunk-MN5XVRKW.js} +4 -4
  21. package/js/{chunk-5FHWNLCI.js → chunk-OWN3DP2W.js} +1 -1
  22. package/js/{chunk-XBG7HHXC.js → chunk-PBGPES67.js} +2 -2
  23. package/js/{chunk-GQ33QSNB.js → chunk-RKFLB36H.js} +2 -2
  24. package/js/{chunk-DADXWWRZ.js → chunk-TNVB3KLB.js} +6 -6
  25. package/js/{chunk-QWQM3CLH.js → chunk-URKOTNDA.js} +4 -4
  26. package/js/{chunk-PD6I2SDG.js → chunk-YDW7DX3A.js} +2 -2
  27. package/js/{chunk-IFJU5SYQ.js → chunk-ZKDXML77.js} +178 -23
  28. package/js/client.js +16 -16
  29. package/js/contracts.js +7 -7
  30. package/js/effect.js +18 -18
  31. package/js/graphql.js +20 -20
  32. package/js/host.js +18 -18
  33. package/js/index.js +13 -13
  34. package/js/mcp/effect.js +19 -19
  35. package/js/mcp.js +21 -21
  36. package/js/openapi.js +80 -17
  37. package/js/react.js +2 -2
  38. package/js/skills/effect.js +6 -6
  39. package/js/skills.js +15 -15
  40. package/js/ui/auth/contracts.js +2 -2
  41. package/js/ui/auth.js +5 -5
  42. package/js/ui/contracts.js +9 -9
  43. package/js/ui/serving.js +15 -15
  44. package/package.json +1 -1
  45. package/runtime.json +1 -1
  46. package/types/apps/src/contracts/app.d.ts +1 -1
  47. package/types/apps/src/contracts/openapi-document.d.ts +1 -1
  48. package/types/apps/src/contracts/ui.d.ts +31 -21
  49. package/types/apps/src/contracts/workflows.d.ts +37 -17
  50. package/types/apps/src/implementation/browser-scripts.gen.d.ts +1 -1
  51. package/types/apps/src/implementation/openapi-source.d.ts +1 -1
  52. package/types/apps/src/implementation/sql.d.ts +1 -1
  53. package/types/apps/src/implementation/ui-client.d.ts +1 -1
  54. package/types/apps/src/implementation/ui-document.d.ts +2 -2
  55. package/types/apps/src/implementation/ui-serving.d.ts +4 -4
  56. package/types/apps/src/implementation/ui-watch.d.ts +1 -1
  57. package/types/utils/src/legacy-keys.d.ts +20 -0
@@ -5,14 +5,14 @@ import {
5
5
  networkRefusalHeader,
6
6
  networkRefusalStatus,
7
7
  supportedFetchOptions
8
- } from "./chunk-6XQLA5NC.js";
8
+ } from "./chunk-6WC2OWHV.js";
9
9
  import {
10
10
  invocationFetch
11
- } from "./chunk-QWQM3CLH.js";
11
+ } from "./chunk-URKOTNDA.js";
12
12
  import {
13
13
  Effect_exports,
14
14
  Schema_exports
15
- } from "./chunk-IFJU5SYQ.js";
15
+ } from "./chunk-ZKDXML77.js";
16
16
 
17
17
  // src/implementation/network.ts
18
18
  var refusalHeader = (status, header) => status === networkRefusalStatus && header !== null && header !== void 0 ? header : void 0;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  RecordedMessage
3
- } from "./chunk-5FHWNLCI.js";
3
+ } from "./chunk-OWN3DP2W.js";
4
4
  import {
5
5
  SchemaGetter_exports,
6
6
  Schema_exports
7
- } from "./chunk-IFJU5SYQ.js";
7
+ } from "./chunk-ZKDXML77.js";
8
8
 
9
9
  // ../utils/src/api-error.ts
10
10
  var MessageField = Schema_exports.String.pipe(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Schema_exports
3
- } from "./chunk-IFJU5SYQ.js";
3
+ } from "./chunk-ZKDXML77.js";
4
4
 
5
5
  // src/contracts/ui-auth.ts
6
6
  var AppSignInId = Schema_exports.String.check(Schema_exports.isPattern(/^[a-f0-9]{64}$/u)).pipe(
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  appSignInCallbackPath
3
- } from "./chunk-JPEUKEV4.js";
3
+ } from "./chunk-4X2UI4R2.js";
4
4
  import {
5
5
  HttpServerResponse_exports
6
- } from "./chunk-EOPQ727L.js";
6
+ } from "./chunk-ACQXVKVQ.js";
7
7
 
8
8
  // src/implementation/ui-auth.ts
9
9
  var appPrivateHeaders = {
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  getWithReads
3
- } from "./chunk-7PHHWYV4.js";
3
+ } from "./chunk-JJZZLNJY.js";
4
4
  import {
5
5
  fromPromise,
6
6
  method,
7
7
  toPromise
8
- } from "./chunk-I5C7FD5Z.js";
8
+ } from "./chunk-MN5XVRKW.js";
9
9
  import {
10
10
  CacheError
11
- } from "./chunk-6XQLA5NC.js";
11
+ } from "./chunk-6WC2OWHV.js";
12
12
  import {
13
13
  wrap
14
- } from "./chunk-GQ33QSNB.js";
14
+ } from "./chunk-RKFLB36H.js";
15
15
  import {
16
16
  JsonObject
17
- } from "./chunk-DDHBUKXX.js";
17
+ } from "./chunk-7HG422GB.js";
18
18
  import {
19
19
  Deferred_exports,
20
20
  Duration_exports,
21
21
  Effect_exports,
22
22
  Exit_exports,
23
23
  Schema_exports
24
- } from "./chunk-IFJU5SYQ.js";
24
+ } from "./chunk-ZKDXML77.js";
25
25
 
26
26
  // src/implementation/catalog-cache.ts
27
27
  var catalogScope = (options, credential, invalid) => {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  fromPromise
3
- } from "./chunk-I5C7FD5Z.js";
3
+ } from "./chunk-MN5XVRKW.js";
4
4
  import {
5
5
  HostedTool,
6
6
  RouterKey,
7
7
  RouterMeta,
8
8
  reservedRouterKeys
9
- } from "./chunk-6XQLA5NC.js";
9
+ } from "./chunk-6WC2OWHV.js";
10
10
  import {
11
11
  decoderOf,
12
12
  schemaArgument
13
- } from "./chunk-GQ33QSNB.js";
13
+ } from "./chunk-RKFLB36H.js";
14
14
  import {
15
15
  Effect_exports,
16
16
  Schema_exports
17
- } from "./chunk-IFJU5SYQ.js";
17
+ } from "./chunk-ZKDXML77.js";
18
18
 
19
19
  // src/implementation/operations.ts
20
20
  var NativeOperation = /* @__PURE__ */ Symbol("apps.Operation");
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  AppSkillName,
3
3
  AppSkills
4
- } from "./chunk-H72MEDMN.js";
4
+ } from "./chunk-4PIQKACY.js";
5
5
  import {
6
6
  RecordedMessage
7
- } from "./chunk-5FHWNLCI.js";
7
+ } from "./chunk-OWN3DP2W.js";
8
8
  import {
9
9
  AccountId,
10
10
  HttpUrl,
11
11
  JsonObject as JsonObject2,
12
- JsonValue
13
- } from "./chunk-DDHBUKXX.js";
12
+ JsonValue,
13
+ withLegacyKeys
14
+ } from "./chunk-7HG422GB.js";
14
15
  import {
15
16
  Any,
16
17
  ArraySchema,
@@ -66,7 +67,7 @@ import {
66
67
  transformOptional,
67
68
  withConstructorDefault,
68
69
  withDefault
69
- } from "./chunk-IFJU5SYQ.js";
70
+ } from "./chunk-ZKDXML77.js";
70
71
 
71
72
  // src/contracts/failure.ts
72
73
  var maxFailureMessageLength = 2048;
@@ -335,7 +336,7 @@ var HostedWorkflow = Schema_exports.Struct({
335
336
  var runFields = {
336
337
  id: WorkflowRunId,
337
338
  app: Schema_exports.NonEmptyString,
338
- deployment: Schema_exports.NonEmptyString,
339
+ version: Schema_exports.NonEmptyString,
339
340
  workflow: WorkflowName,
340
341
  createdAt: Schema_exports.String
341
342
  };
@@ -343,16 +344,20 @@ var WorkflowRun = Schema_exports.Union([
343
344
  Schema_exports.Struct({
344
345
  ...runFields,
345
346
  status: Schema_exports.Literals(["queued", "running", "waiting", "paused", "waitingForPause"])
346
- }),
347
- Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("complete"), output: WorkflowValue }),
347
+ }).pipe(withLegacyKeys({ version: "deployment" })),
348
+ Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("complete"), output: WorkflowValue }).pipe(
349
+ withLegacyKeys({ version: "deployment" })
350
+ ),
348
351
  Schema_exports.Struct({
349
352
  ...runFields,
350
353
  status: Schema_exports.Literal("errored"),
351
354
  error: WorkflowFailure.fields.reason,
352
355
  /** The failing step and the app's own error, when the run recorded them. */
353
356
  failure: Schema_exports.optionalKey(WorkflowRunFailure)
354
- }),
355
- Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("terminated") })
357
+ }).pipe(withLegacyKeys({ version: "deployment" })),
358
+ Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("terminated") }).pipe(
359
+ withLegacyKeys({ version: "deployment" })
360
+ )
356
361
  ]);
357
362
  var WorkflowRunPage = Schema_exports.Struct({
358
363
  items: Schema_exports.Array(WorkflowRun),
@@ -1,28 +1,30 @@
1
1
  import {
2
- JsonValue
3
- } from "./chunk-DDHBUKXX.js";
2
+ JsonValue,
3
+ withLegacyKeys
4
+ } from "./chunk-7HG422GB.js";
4
5
  import {
5
6
  HttpApiEndpoint_exports,
6
7
  HttpApiGroup_exports,
7
8
  HttpApiSchema_exports,
8
9
  HttpApi_exports
9
- } from "./chunk-TUMGL2OC.js";
10
+ } from "./chunk-DILSCQPJ.js";
10
11
  import {
11
12
  Schema_exports
12
- } from "./chunk-IFJU5SYQ.js";
13
+ } from "./chunk-ZKDXML77.js";
13
14
 
14
15
  // src/contracts/ui.ts
15
- var UiContext = Schema_exports.Struct({
16
- deployment: Schema_exports.NonEmptyString,
16
+ var UiContextFields = Schema_exports.Struct({
17
+ version: Schema_exports.NonEmptyString,
17
18
  accounts: Schema_exports.optional(
18
19
  Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.Array(Schema_exports.NonEmptyString))
19
20
  )
20
21
  });
22
+ var UiContext = UiContextFields.pipe(withLegacyKeys({ version: "deployment" }));
21
23
  var UiOperation = Schema_exports.Struct({
22
- ...UiContext.fields,
24
+ ...UiContextFields.fields,
23
25
  name: Schema_exports.NonEmptyString,
24
26
  input: JsonValue
25
- });
27
+ }).pipe(withLegacyKeys({ version: "deployment" }));
26
28
  var UiUnauthorized = class extends Schema_exports.TaggedError()(
27
29
  "UiUnauthorized",
28
30
  {},
@@ -35,7 +37,7 @@ var UiForbidden = class extends Schema_exports.TaggedError()(
35
37
  { httpApiStatus: 403 }
36
38
  ) {
37
39
  };
38
- var UiDeploymentChanged = class extends Schema_exports.TaggedError()(
40
+ var UiVersionChanged = class extends Schema_exports.TaggedError()(
39
41
  "UiDeploymentChanged",
40
42
  {},
41
43
  { httpApiStatus: 409 }
@@ -58,7 +60,7 @@ var UiSnapshot = Schema_exports.Union([
58
60
  Schema_exports.Struct({ type: Schema_exports.Literal("failure"), error: UiFailed }),
59
61
  Schema_exports.Struct({ type: Schema_exports.Literal("heartbeat") })
60
62
  ]);
61
- var errors = [UiUnauthorized, UiForbidden, UiDeploymentChanged, UiFailed];
63
+ var errors = [UiUnauthorized, UiForbidden, UiVersionChanged, UiFailed];
62
64
  var AppUiApi = HttpApi_exports.make("app-ui").add(
63
65
  HttpApiGroup_exports.make("ui").add(
64
66
  HttpApiEndpoint_exports.post("query", "/_executor/api/query", {
@@ -86,7 +88,7 @@ export {
86
88
  UiOperation,
87
89
  UiUnauthorized,
88
90
  UiForbidden,
89
- UiDeploymentChanged,
91
+ UiVersionChanged,
90
92
  UiFailed,
91
93
  UiSnapshot,
92
94
  AppUiApi
@@ -1,6 +1,7 @@
1
1
  import {
2
+ SchemaTransformation_exports,
2
3
  Schema_exports
3
- } from "./chunk-IFJU5SYQ.js";
4
+ } from "./chunk-ZKDXML77.js";
4
5
 
5
6
  // src/contracts/schema.ts
6
7
  var JsonValue = Schema_exports.Json;
@@ -40,11 +41,50 @@ var ValidationError = class extends Schema_exports.TaggedError()("ValidationErro
40
41
  }
41
42
  };
42
43
 
44
+ // ../utils/src/legacy-keys.ts
45
+ var withLegacyKeys = (mapping) => (self) => {
46
+ const renamed = Object.entries(mapping).filter(
47
+ (entry) => typeof entry[1] === "string"
48
+ );
49
+ const fields = {};
50
+ for (const key of Object.keys(self.fields)) {
51
+ const encoded = Schema_exports.toEncoded(self.fields[key]);
52
+ const legacy = mapping[key];
53
+ fields[key] = typeof legacy === "string" ? Schema_exports.optionalKey(encoded) : encoded;
54
+ if (typeof legacy === "string") fields[legacy] = Schema_exports.optionalKey(encoded);
55
+ }
56
+ return Schema_exports.Struct(fields).pipe(
57
+ Schema_exports.decodeTo(
58
+ self,
59
+ SchemaTransformation_exports.transform({
60
+ decode: (input) => {
61
+ const output = { ...input };
62
+ for (const [key, legacy] of renamed) {
63
+ if (!Object.hasOwn(output, key) && Object.hasOwn(output, legacy)) {
64
+ output[key] = output[legacy];
65
+ }
66
+ delete output[legacy];
67
+ }
68
+ return output;
69
+ },
70
+ encode: (input) => {
71
+ const output = { ...input };
72
+ for (const [key, legacy] of renamed) {
73
+ if (Object.hasOwn(output, key)) output[legacy] = output[key];
74
+ }
75
+ return output;
76
+ }
77
+ })
78
+ )
79
+ );
80
+ };
81
+
43
82
  export {
44
83
  JsonValue,
45
84
  JsonObject,
46
85
  AccountId,
47
86
  HttpUrl,
48
87
  DeclarationInvalid,
49
- ValidationError
88
+ ValidationError,
89
+ withLegacyKeys
50
90
  };
@@ -211,7 +211,7 @@ import {
211
211
  withFiber,
212
212
  withParentSpan,
213
213
  zero2 as zero
214
- } from "./chunk-IFJU5SYQ.js";
214
+ } from "./chunk-ZKDXML77.js";
215
215
  import {
216
216
  __export
217
217
  } from "./chunk-CZ7CSFO4.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  fixedRouter
3
- } from "./chunk-5MDA7MKL.js";
3
+ } from "./chunk-DYE2CKHG.js";
4
4
  import {
5
5
  nativeOperation,
6
6
  operationDeclaration,
7
7
  routerDeclaration
8
- } from "./chunk-YWFUWTUJ.js";
8
+ } from "./chunk-6F3WAXVN.js";
9
9
 
10
10
  // src/implementation/protocol-operations.ts
11
11
  var protocolOperations = (operations, kinds = {}) => {
@@ -19,7 +19,7 @@ import {
19
19
  text,
20
20
  uint8Array,
21
21
  urlParams
22
- } from "./chunk-EOPQ727L.js";
22
+ } from "./chunk-ACQXVKVQ.js";
23
23
  import {
24
24
  Cause,
25
25
  Defect,
@@ -114,7 +114,7 @@ import {
114
114
  transformEffect,
115
115
  transformPull,
116
116
  void_2 as void_
117
- } from "./chunk-IFJU5SYQ.js";
117
+ } from "./chunk-ZKDXML77.js";
118
118
  import {
119
119
  __export
120
120
  } from "./chunk-CZ7CSFO4.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  skillFromFiles
3
- } from "./chunk-XBG7HHXC.js";
3
+ } from "./chunk-PBGPES67.js";
4
4
  import {
5
5
  joinPath,
6
6
  mergeMeta
7
- } from "./chunk-YWFUWTUJ.js";
7
+ } from "./chunk-6F3WAXVN.js";
8
8
  import {
9
9
  isShortenedUpstream,
10
10
  parseProviderError,
11
11
  providerError
12
- } from "./chunk-I5C7FD5Z.js";
12
+ } from "./chunk-MN5XVRKW.js";
13
13
  import {
14
14
  ApiErrorResponse,
15
15
  CacheError,
@@ -31,19 +31,19 @@ import {
31
31
  maxFailureFields,
32
32
  maxFailureMessageLength,
33
33
  maxUpstreamMessageLength
34
- } from "./chunk-6XQLA5NC.js";
34
+ } from "./chunk-6WC2OWHV.js";
35
35
  import {
36
36
  SkillLoadFailed,
37
37
  skillFormatLimits
38
- } from "./chunk-H72MEDMN.js";
38
+ } from "./chunk-4PIQKACY.js";
39
39
  import {
40
40
  jsonSchemaDocument
41
- } from "./chunk-GQ33QSNB.js";
41
+ } from "./chunk-RKFLB36H.js";
42
42
  import {
43
43
  AccountId,
44
44
  HttpUrl,
45
45
  JsonObject
46
- } from "./chunk-DDHBUKXX.js";
46
+ } from "./chunk-7HG422GB.js";
47
47
  import {
48
48
  Cause_exports,
49
49
  Effect_exports,
@@ -53,7 +53,7 @@ import {
53
53
  Redacted_exports,
54
54
  Result_exports,
55
55
  Schema_exports
56
- } from "./chunk-IFJU5SYQ.js";
56
+ } from "./chunk-ZKDXML77.js";
57
57
 
58
58
  // src/contracts/openapi.ts
59
59
  var OpenapiErrorResponse = Schema_exports.Struct({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  authorCache,
3
3
  unavailableCache
4
- } from "./chunk-7PHHWYV4.js";
4
+ } from "./chunk-JJZZLNJY.js";
5
5
  import {
6
6
  accountSecrets,
7
7
  boundFailureMessage,
@@ -12,13 +12,13 @@ import {
12
12
  parseSkillLoadFailed,
13
13
  readCatalog,
14
14
  routerSkills
15
- } from "./chunk-5MDA7MKL.js";
15
+ } from "./chunk-DYE2CKHG.js";
16
16
  import {
17
17
  appInvocationFetch
18
- } from "./chunk-YRGL4QEF.js";
18
+ } from "./chunk-2GPX2E57.js";
19
19
  import {
20
20
  folderSkillsEffect
21
- } from "./chunk-XBG7HHXC.js";
21
+ } from "./chunk-PBGPES67.js";
22
22
  import {
23
23
  ResponseStatusError,
24
24
  declaredEvents,
@@ -26,12 +26,12 @@ import {
26
26
  makeEmitter,
27
27
  toEffectApp,
28
28
  withPlacements
29
- } from "./chunk-DADXWWRZ.js";
29
+ } from "./chunk-TNVB3KLB.js";
30
30
  import {
31
31
  declaredOperations,
32
32
  locate,
33
33
  nativeOperation
34
- } from "./chunk-YWFUWTUJ.js";
34
+ } from "./chunk-6F3WAXVN.js";
35
35
  import {
36
36
  accountProviderError,
37
37
  appCode,
@@ -39,7 +39,7 @@ import {
39
39
  httpProviderError,
40
40
  parseProviderError,
41
41
  toPromise
42
- } from "./chunk-I5C7FD5Z.js";
42
+ } from "./chunk-MN5XVRKW.js";
43
43
  import {
44
44
  AccountCheckResult,
45
45
  DeclaredProvider,
@@ -91,11 +91,11 @@ import {
91
91
  reservedTablePrefix,
92
92
  sqlBindingsLimit,
93
93
  workflowDurationMillis
94
- } from "./chunk-6XQLA5NC.js";
94
+ } from "./chunk-6WC2OWHV.js";
95
95
  import {
96
96
  AppSkills,
97
97
  SkillFile
98
- } from "./chunk-H72MEDMN.js";
98
+ } from "./chunk-4PIQKACY.js";
99
99
  import {
100
100
  allowedValues,
101
101
  echoableKey,
@@ -108,17 +108,17 @@ import {
108
108
  missingKeyText,
109
109
  objectShape,
110
110
  unionShape
111
- } from "./chunk-GQ33QSNB.js";
111
+ } from "./chunk-RKFLB36H.js";
112
112
  import {
113
113
  captureTelemetry,
114
114
  makeOwnershipAccounting,
115
115
  measuredSpan,
116
116
  owned
117
- } from "./chunk-QWQM3CLH.js";
117
+ } from "./chunk-URKOTNDA.js";
118
118
  import {
119
119
  JsonObject,
120
120
  JsonValue
121
- } from "./chunk-DDHBUKXX.js";
121
+ } from "./chunk-7HG422GB.js";
122
122
  import {
123
123
  Base64_exports,
124
124
  Cause_exports,
@@ -131,7 +131,7 @@ import {
131
131
  SchemaIssue_exports,
132
132
  Schema_exports,
133
133
  Stream_exports
134
- } from "./chunk-IFJU5SYQ.js";
134
+ } from "./chunk-ZKDXML77.js";
135
135
 
136
136
  // src/implementation/invocation-timing.ts
137
137
  var elicitationWaitSpan = "app.elicitation.wait";
@@ -916,7 +916,7 @@ var MigrationHistoryChanged = class extends Schema_exports.TaggedError()(
916
916
  { reason: Schema_exports.String }
917
917
  ) {
918
918
  get message() {
919
- return `${this.reason} Applied migrations cannot change: restore the original file and add a new migration instead. Nothing was applied; the previous deployment is still active.`;
919
+ return `${this.reason} Applied migrations cannot change: restore the original file and add a new migration instead. Nothing was applied; the previous version is still active.`;
920
920
  }
921
921
  };
922
922
  var MigrationFailed = class extends Schema_exports.TaggedError()("MigrationFailed", {
@@ -924,7 +924,7 @@ var MigrationFailed = class extends Schema_exports.TaggedError()("MigrationFaile
924
924
  reason: Schema_exports.String
925
925
  }) {
926
926
  get message() {
927
- return `${this.path} failed: ${this.reason}. No migrations were applied; the previous deployment is still active.`;
927
+ return `${this.path} failed: ${this.reason}. No migrations were applied; the previous version is still active.`;
928
928
  }
929
929
  };
930
930
  var migrationName = /^(\d+)_[A-Za-z0-9_-]+\.sql$/;
@@ -1723,8 +1723,9 @@ function dispatch(app, request, context, signal, emitted) {
1723
1723
  const response = Schema_exports.decodeUnknownOption(OpenapiResponseError)(error);
1724
1724
  const mcp = parseMcpError(error, secrets);
1725
1725
  const failure = Schema_exports.decodeUnknownOption(ElicitationFailed)(error);
1726
+ const removed = Schema_exports.is(HostToolNotFound)(error) ? request.operation === "call" ? new HostToolNotFound() : new HostOperationNotFound() : void 0;
1726
1727
  return Effect_exports.fail(
1727
- Option_exports.isSome(provider) ? leavingProviderError(provider.value, secrets, "call") : Option_exports.isSome(response) ? new OpenapiResponseError({
1728
+ removed !== void 0 ? removed : Option_exports.isSome(provider) ? leavingProviderError(provider.value, secrets, "call") : Option_exports.isSome(response) ? new OpenapiResponseError({
1728
1729
  code: response.value.code,
1729
1730
  status: response.value.status,
1730
1731
  message: response.value.message,
@@ -1,33 +1,33 @@
1
1
  import {
2
2
  appInvocationFetch
3
- } from "./chunk-YRGL4QEF.js";
3
+ } from "./chunk-2GPX2E57.js";
4
4
  import {
5
5
  fromPromise,
6
6
  method,
7
7
  toPromise
8
- } from "./chunk-I5C7FD5Z.js";
8
+ } from "./chunk-MN5XVRKW.js";
9
9
  import {
10
10
  CacheAcquired,
11
11
  CacheEntry,
12
12
  CacheError,
13
13
  cacheLimits,
14
14
  scopedSlots
15
- } from "./chunk-6XQLA5NC.js";
15
+ } from "./chunk-6WC2OWHV.js";
16
16
  import {
17
17
  decoderOf
18
- } from "./chunk-GQ33QSNB.js";
18
+ } from "./chunk-RKFLB36H.js";
19
19
  import {
20
20
  captureTelemetry,
21
21
  owned,
22
22
  ownedBy
23
- } from "./chunk-QWQM3CLH.js";
23
+ } from "./chunk-URKOTNDA.js";
24
24
  import {
25
25
  Clock_exports,
26
26
  Duration_exports,
27
27
  Effect_exports,
28
28
  Exit_exports,
29
29
  Schema_exports
30
- } from "./chunk-IFJU5SYQ.js";
30
+ } from "./chunk-ZKDXML77.js";
31
31
 
32
32
  // ../app-cache/src/index.ts
33
33
  var canonical = (value) => {
@@ -162,7 +162,7 @@ import {
162
162
  void_2,
163
163
  whileLoop,
164
164
  zipRight
165
- } from "./chunk-IFJU5SYQ.js";
165
+ } from "./chunk-ZKDXML77.js";
166
166
  import {
167
167
  __export
168
168
  } from "./chunk-CZ7CSFO4.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  prepareElicitation
3
- } from "./chunk-WMD4NHXZ.js";
3
+ } from "./chunk-FA5MLNYL.js";
4
4
  import {
5
5
  failOnNetworkRefusal
6
- } from "./chunk-YRGL4QEF.js";
6
+ } from "./chunk-2GPX2E57.js";
7
7
  import {
8
8
  accountProviderError,
9
9
  bodyUpstreamError,
10
10
  fromPromise,
11
11
  httpProviderError,
12
12
  providerErrorDetail
13
- } from "./chunk-I5C7FD5Z.js";
13
+ } from "./chunk-MN5XVRKW.js";
14
14
  import {
15
15
  ElicitationFailed,
16
16
  McpCredentialsUnverified,
@@ -28,26 +28,26 @@ import {
28
28
  defaultMcpClientLimits,
29
29
  mcpHealthReserveMs,
30
30
  mcpSdkTimerCeilingMs
31
- } from "./chunk-6XQLA5NC.js";
31
+ } from "./chunk-6WC2OWHV.js";
32
32
  import {
33
33
  jsonSchemaDecoder,
34
34
  nestJsonSchema,
35
35
  preparedJsonSchemaDecoder
36
- } from "./chunk-GQ33QSNB.js";
36
+ } from "./chunk-RKFLB36H.js";
37
37
  import {
38
38
  captureTelemetry,
39
39
  owned
40
- } from "./chunk-QWQM3CLH.js";
40
+ } from "./chunk-URKOTNDA.js";
41
41
  import {
42
42
  FetchHttpClient_exports
43
- } from "./chunk-PD6I2SDG.js";
43
+ } from "./chunk-YDW7DX3A.js";
44
44
  import {
45
45
  JsonObject
46
- } from "./chunk-DDHBUKXX.js";
46
+ } from "./chunk-7HG422GB.js";
47
47
  import {
48
48
  HttpClientRequest_exports,
49
49
  HttpClient_exports
50
- } from "./chunk-EOPQ727L.js";
50
+ } from "./chunk-ACQXVKVQ.js";
51
51
  import {
52
52
  Clock_exports,
53
53
  Deferred_exports,
@@ -61,7 +61,7 @@ import {
61
61
  Ref_exports,
62
62
  Schema_exports,
63
63
  Stream_exports
64
- } from "./chunk-IFJU5SYQ.js";
64
+ } from "./chunk-ZKDXML77.js";
65
65
 
66
66
  // src/implementation/mcp.ts
67
67
  import { UnauthorizedError } from "@modelcontextprotocol/sdk/client/auth.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  ProviderError,
3
3
  maxUpstreamMessageLength
4
- } from "./chunk-6XQLA5NC.js";
4
+ } from "./chunk-6WC2OWHV.js";
5
5
  import {
6
6
  owned
7
- } from "./chunk-QWQM3CLH.js";
7
+ } from "./chunk-URKOTNDA.js";
8
8
  import {
9
9
  AccountId
10
- } from "./chunk-DDHBUKXX.js";
10
+ } from "./chunk-7HG422GB.js";
11
11
  import {
12
12
  Effect_exports,
13
13
  Option_exports,
14
14
  Schema_exports
15
- } from "./chunk-IFJU5SYQ.js";
15
+ } from "./chunk-ZKDXML77.js";
16
16
 
17
17
  // src/implementation/authoring.ts
18
18
  var NativeCallback = /* @__PURE__ */ Symbol("apps.NativeCallback");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Predicate_exports
3
- } from "./chunk-IFJU5SYQ.js";
3
+ } from "./chunk-ZKDXML77.js";
4
4
 
5
5
  // ../utils/src/recorded-message.ts
6
6
  var RecordedMessage = /* @__PURE__ */ Symbol.for("@executor-js/utils/RecordedMessage");