apps 0.0.1-beta.20 → 0.0.1-beta.21

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.
@@ -21,6 +21,9 @@ import {
21
21
  import {
22
22
  AppDatabaseError
23
23
  } from "./chunk-N7YDVXYJ.js";
24
+ import {
25
+ CacheError
26
+ } from "./chunk-R3EV5FTO.js";
24
27
  import {
25
28
  SkillLoadFailed,
26
29
  skillFormatLimits
@@ -175,6 +178,13 @@ var storageMessages = {
175
178
  storage: "App storage failed to complete the operation.",
176
179
  replay: "A workflow step replayed with different input than its first run."
177
180
  };
181
+ var cacheMessages = {
182
+ capacity: "A cache key, value or batch exceeded the app cache's size limits.",
183
+ invalid: "The app made a cache request the app cache could not accept.",
184
+ unavailable: "The app cache is not available on this host.",
185
+ storage: "The app cache failed to complete the operation.",
186
+ timeout: "The app cache did not respond in time."
187
+ };
178
188
  var minimumSecretLength = 6;
179
189
  var secretValues = (value, found) => {
180
190
  if (typeof value === "string") {
@@ -207,6 +217,13 @@ var ownMessage = (error) => {
207
217
  };
208
218
  var describeFailure = (error) => error instanceof Error ? `${errorName(error)}: ${ownMessage(error) ?? "(no message)"}` : typeof error === "string" ? error : `A non-Error ${error === null ? "null" : typeof error} value was thrown`;
209
219
  var failureDetail = (error, secrets) => {
220
+ if (Schema_exports.is(CacheError)(error))
221
+ return {
222
+ source: "storage",
223
+ errorName: "CacheError",
224
+ code: error.reason,
225
+ message: cacheMessages[error.reason]
226
+ };
210
227
  if (Schema_exports.is(AppDatabaseError)(error))
211
228
  return {
212
229
  source: "storage",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  prepareElicitation
3
- } from "./chunk-ZKISLYWM.js";
3
+ } from "./chunk-CHAK4P5C.js";
4
4
  import {
5
5
  fromPromise
6
6
  } from "./chunk-NMKHTJOQ.js";
@@ -8,7 +8,7 @@ import {
8
8
  failureDetail,
9
9
  readCatalog,
10
10
  routerSkills
11
- } from "./chunk-F2IASQK2.js";
11
+ } from "./chunk-625MBYU4.js";
12
12
  import {
13
13
  folderSkillsEffect
14
14
  } from "./chunk-IPI4MFSN.js";
@@ -1252,6 +1252,14 @@ var createAppHandler = (app) => (request, context) => Effect_exports.gen(functio
1252
1252
  toolError = true;
1253
1253
  }
1254
1254
  }),
1255
+ // Name what failed on the span; the bounded message stays in the reply only.
1256
+ Effect_exports.tapError(
1257
+ (error) => (error._tag === "HostEvaluationFailed" || error._tag === "HostOperationFailed" || error._tag === "HostDeclarationInvalid") && error.errorName !== void 0 ? Effect_exports.annotateCurrentSpan({
1258
+ "error.type": error.errorName,
1259
+ ...error.source === void 0 ? {} : { "executor.failure.source": error.source },
1260
+ ...error.code === void 0 ? {} : { "executor.failure.code": error.code }
1261
+ }) : Effect_exports.void
1262
+ ),
1255
1263
  Effect_exports.withSpan(`app.${command.operation}`)
1256
1264
  );
1257
1265
  if (toolError)
@@ -2,7 +2,7 @@ import {
2
2
  adaptMcpTools,
3
3
  mcpClient,
4
4
  mcpJsonSchemaValidator
5
- } from "./chunk-7H44SOSX.js";
5
+ } from "./chunk-BLI53LPN.js";
6
6
  import {
7
7
  accountProviderError,
8
8
  httpProviderError
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fixedRouter
3
- } from "./chunk-F2IASQK2.js";
3
+ } from "./chunk-625MBYU4.js";
4
4
  import {
5
5
  nativeOperation,
6
6
  operationDeclaration,
package/js/effect.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  ApprovalDecision,
4
4
  createAppHandler,
5
5
  prepareElicitation
6
- } from "./chunk-ZKISLYWM.js";
6
+ } from "./chunk-CHAK4P5C.js";
7
7
  import "./chunk-NKLWZJLE.js";
8
- import "./chunk-F2IASQK2.js";
8
+ import "./chunk-625MBYU4.js";
9
9
  import "./chunk-IPI4MFSN.js";
10
10
  import "./chunk-XNCYIB4D.js";
11
11
  import "./chunk-ZQINWV4W.js";
package/js/graphql.js CHANGED
@@ -4,13 +4,13 @@ import {
4
4
  } from "./chunk-OZ4UK3CD.js";
5
5
  import {
6
6
  protocolOperations
7
- } from "./chunk-HQY4UTYX.js";
7
+ } from "./chunk-RAAPJMVZ.js";
8
8
  import "./chunk-BCSNKUAC.js";
9
- import "./chunk-ZKISLYWM.js";
9
+ import "./chunk-CHAK4P5C.js";
10
10
  import {
11
11
  cacheKey
12
12
  } from "./chunk-NKLWZJLE.js";
13
- import "./chunk-F2IASQK2.js";
13
+ import "./chunk-625MBYU4.js";
14
14
  import "./chunk-IPI4MFSN.js";
15
15
  import "./chunk-XNCYIB4D.js";
16
16
  import "./chunk-ZQINWV4W.js";
package/js/host.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createAppHandler
3
- } from "./chunk-ZKISLYWM.js";
3
+ } from "./chunk-CHAK4P5C.js";
4
4
  import "./chunk-NKLWZJLE.js";
5
- import "./chunk-F2IASQK2.js";
5
+ import "./chunk-625MBYU4.js";
6
6
  import "./chunk-IPI4MFSN.js";
7
7
  import "./chunk-XNCYIB4D.js";
8
8
  import "./chunk-ZQINWV4W.js";
package/js/mcp/effect.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  mcpClientEffect,
3
3
  mcpToolsEffect
4
- } from "../chunk-MAF4BRQF.js";
5
- import "../chunk-7H44SOSX.js";
4
+ } from "../chunk-CMRKLZZY.js";
5
+ import "../chunk-BLI53LPN.js";
6
6
  import "../chunk-BCSNKUAC.js";
7
- import "../chunk-ZKISLYWM.js";
7
+ import "../chunk-CHAK4P5C.js";
8
8
  import "../chunk-NKLWZJLE.js";
9
- import "../chunk-F2IASQK2.js";
9
+ import "../chunk-625MBYU4.js";
10
10
  import "../chunk-IPI4MFSN.js";
11
11
  import "../chunk-XNCYIB4D.js";
12
12
  import "../chunk-ZQINWV4W.js";
package/js/mcp/stdio.js CHANGED
@@ -2,14 +2,14 @@ import {
2
2
  adaptMcpTools,
3
3
  mcpClient,
4
4
  mcpJsonSchemaValidator
5
- } from "../chunk-7H44SOSX.js";
5
+ } from "../chunk-BLI53LPN.js";
6
6
  import {
7
7
  protocolRouter
8
- } from "../chunk-HQY4UTYX.js";
8
+ } from "../chunk-RAAPJMVZ.js";
9
9
  import "../chunk-BCSNKUAC.js";
10
- import "../chunk-ZKISLYWM.js";
10
+ import "../chunk-CHAK4P5C.js";
11
11
  import "../chunk-NKLWZJLE.js";
12
- import "../chunk-F2IASQK2.js";
12
+ import "../chunk-625MBYU4.js";
13
13
  import "../chunk-IPI4MFSN.js";
14
14
  import "../chunk-XNCYIB4D.js";
15
15
  import "../chunk-ZQINWV4W.js";
package/js/mcp.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  mcpClientEffect
3
- } from "./chunk-MAF4BRQF.js";
3
+ } from "./chunk-CMRKLZZY.js";
4
4
  import {
5
5
  catalogCache,
6
6
  catalogScope
7
7
  } from "./chunk-OZ4UK3CD.js";
8
8
  import {
9
9
  adaptMcpTool
10
- } from "./chunk-7H44SOSX.js";
10
+ } from "./chunk-BLI53LPN.js";
11
11
  import {
12
12
  protocolOperations
13
- } from "./chunk-HQY4UTYX.js";
13
+ } from "./chunk-RAAPJMVZ.js";
14
14
  import "./chunk-BCSNKUAC.js";
15
- import "./chunk-ZKISLYWM.js";
15
+ import "./chunk-CHAK4P5C.js";
16
16
  import {
17
17
  cacheKey
18
18
  } from "./chunk-NKLWZJLE.js";
19
- import "./chunk-F2IASQK2.js";
19
+ import "./chunk-625MBYU4.js";
20
20
  import "./chunk-IPI4MFSN.js";
21
21
  import "./chunk-XNCYIB4D.js";
22
22
  import "./chunk-ZQINWV4W.js";
package/js/openapi.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  protocolOperations,
10
10
  protocolRouter
11
- } from "./chunk-HQY4UTYX.js";
11
+ } from "./chunk-RAAPJMVZ.js";
12
12
  import {
13
13
  OpenapiError,
14
14
  OpenapiErrorResponse,
@@ -21,7 +21,7 @@ import {
21
21
  isOpenapiTextMedia,
22
22
  openapiBinaryResultSchema,
23
23
  openapiMediaKind
24
- } from "./chunk-F2IASQK2.js";
24
+ } from "./chunk-625MBYU4.js";
25
25
  import "./chunk-IPI4MFSN.js";
26
26
  import {
27
27
  fromPromise,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps",
3
- "version": "0.0.1-beta.20",
3
+ "version": "0.0.1-beta.21",
4
4
  "description": "TypeScript apps with typed tools, accounts, storage, and UI.",
5
5
  "type": "module",
6
6
  "sideEffects": false,