apps 0.0.1-beta.37 → 0.0.1-beta.39

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 (81) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-GHDZEEPO.js → chunk-27TDXHRX.js} +395 -82
  3. package/js/{chunk-KOOJUMLR.js → chunk-3MMG2H6M.js} +2 -2
  4. package/js/{chunk-LQBR7AI7.js → chunk-3V575NIW.js} +217 -19
  5. package/js/{chunk-U74JVKTQ.js → chunk-5NIEOXRZ.js} +7 -7
  6. package/js/{chunk-BWUHMKHQ.js → chunk-5TJA7364.js} +2 -2
  7. package/js/{chunk-7KEKFBV7.js → chunk-7CSHVXVR.js} +3 -3
  8. package/js/{chunk-3LRFKLUX.js → chunk-BO4US6DZ.js} +9 -49
  9. package/js/{chunk-A4O72Z3A.js → chunk-DKUEYTYD.js} +167 -30
  10. package/js/{chunk-ENJCQWVF.js → chunk-E4BWL7KQ.js} +3 -3
  11. package/js/{chunk-CAOHGMNW.js → chunk-F3TBO2U3.js} +7 -94
  12. package/js/{chunk-POOIHRPF.js → chunk-GHXRRFZA.js} +11 -34
  13. package/js/{chunk-RSNZDT4L.js → chunk-JTMDWPCH.js} +2 -2
  14. package/js/{chunk-YW333DH3.js → chunk-KANDIVIH.js} +4 -4
  15. package/js/{chunk-2FWXCU5I.js → chunk-KAQD3DTI.js} +1 -1
  16. package/js/{chunk-QQKHJ72Y.js → chunk-LVWX4UWK.js} +9 -9
  17. package/js/{chunk-KEZ4YZSP.js → chunk-MLHNVYHT.js} +2 -2
  18. package/js/{chunk-IJQ5LE74.js → chunk-MXDKXAY4.js} +363 -401
  19. package/js/{chunk-BI6R577B.js → chunk-P7MGDPFD.js} +2 -2
  20. package/js/{chunk-24EIFQYZ.js → chunk-PCV73KVK.js} +35 -10
  21. package/js/{chunk-JU7F4PRK.js → chunk-RIXVGVA6.js} +2 -2
  22. package/js/{chunk-D45FU4TZ.js → chunk-SDHD6J37.js} +3 -3
  23. package/js/{chunk-UCOMVHGW.js → chunk-U5PFZDVB.js} +2 -2
  24. package/js/{chunk-PHO7HXTC.js → chunk-VIU2XXA7.js} +294 -47
  25. package/js/{chunk-TADLIUEU.js → chunk-VJQXXOQ3.js} +2 -2
  26. package/js/{chunk-NHCFIWN5.js → chunk-W2NV54JD.js} +1 -1
  27. package/js/{chunk-BI45HZWM.js → chunk-YQ35E7KS.js} +1 -1
  28. package/js/{chunk-WDBUOIWV.js → chunk-ZUKBIHMK.js} +3 -3
  29. package/js/client.js +13 -17
  30. package/js/contracts.js +16 -21
  31. package/js/effect.js +19 -24
  32. package/js/graphql.js +21 -26
  33. package/js/host.js +19 -24
  34. package/js/index.js +13 -26
  35. package/js/mcp/effect.js +21 -26
  36. package/js/mcp/stdio.js +21 -26
  37. package/js/mcp.js +23 -28
  38. package/js/openapi.js +17 -21
  39. package/js/react.js +2 -3
  40. package/js/skills/effect.js +6 -7
  41. package/js/skills.js +15 -17
  42. package/js/storage/facet.js +1 -214
  43. package/js/ui/auth/contracts.js +2 -2
  44. package/js/ui/auth.js +5 -5
  45. package/js/ui/contracts.js +5 -6
  46. package/js/ui/serving.js +10 -11
  47. package/package.json +1 -2
  48. package/runtime.json +1 -1
  49. package/types/apps/src/contracts/app.d.ts +0 -2
  50. package/types/apps/src/contracts/context.d.ts +12 -11
  51. package/types/apps/src/contracts/host.d.ts +10 -8
  52. package/types/apps/src/contracts/live.d.ts +2 -0
  53. package/types/apps/src/contracts/operations.d.ts +3 -3
  54. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  55. package/types/apps/src/contracts/protocols/10.d.ts +1450 -0
  56. package/types/apps/src/contracts/protocols/4.d.ts +3 -3
  57. package/types/apps/src/contracts/protocols/5.d.ts +1 -1
  58. package/types/apps/src/contracts/protocols/6.d.ts +1 -1
  59. package/types/apps/src/contracts/protocols/7.d.ts +1 -1
  60. package/types/apps/src/contracts/sql.d.ts +58 -0
  61. package/types/apps/src/facet.d.ts +4 -5
  62. package/types/apps/src/implementation/openapi-compile.d.ts +2 -2
  63. package/types/apps/src/implementation/schema.d.ts +1 -10
  64. package/types/apps/src/implementation/sql.d.ts +66 -0
  65. package/types/apps/src/index.d.ts +1 -2
  66. package/types/telemetry/src/transport.d.ts +8 -1
  67. package/js/chunk-73AV3JVU.js +0 -186
  68. package/js/chunk-HDAQBRT5.js +0 -1254
  69. package/js/chunk-IU7CCCUC.js +0 -630
  70. package/js/chunk-NHUHTWAF.js +0 -0
  71. package/js/chunk-V5DWGYRK.js +0 -268
  72. package/js/chunk-Y3XN4X4Q.js +0 -19
  73. package/types/app-data/src/implementation/cursor.d.ts +0 -10
  74. package/types/app-data/src/implementation/index-key.d.ts +0 -7
  75. package/types/app-data/src/implementation/promise.d.ts +0 -68
  76. package/types/app-data/src/implementation/range.d.ts +0 -8
  77. package/types/app-data/src/implementation/schema.d.ts +0 -18
  78. package/types/app-data/src/implementation/sqlite.d.ts +0 -11
  79. package/types/app-data/src/index.d.ts +0 -4
  80. package/types/apps/src/contracts/storage.d.ts +0 -68
  81. package/types/apps/src/implementation/storage.d.ts +0 -15
@@ -1,8 +1,3 @@
1
- import {
2
- DatabaseFieldReserved,
3
- DatabaseLimitExceeded,
4
- DatabaseSchema
5
- } from "./chunk-73AV3JVU.js";
6
1
  import {
7
2
  CacheCommand,
8
3
  CacheReply,
@@ -13,20 +8,20 @@ import {
13
8
  FailureSource,
14
9
  ProviderError,
15
10
  UpstreamError
16
- } from "./chunk-BI6R577B.js";
11
+ } from "./chunk-P7MGDPFD.js";
17
12
  import {
18
13
  AppSkillName,
19
14
  AppSkills
20
- } from "./chunk-KEZ4YZSP.js";
15
+ } from "./chunk-MLHNVYHT.js";
21
16
  import {
22
17
  RecordedMessage
23
- } from "./chunk-2FWXCU5I.js";
18
+ } from "./chunk-KAQD3DTI.js";
24
19
  import {
25
20
  AccountId,
26
21
  HttpUrl,
27
22
  JsonObject as JsonObject2,
28
23
  JsonValue
29
- } from "./chunk-BI45HZWM.js";
24
+ } from "./chunk-YQ35E7KS.js";
30
25
  import {
31
26
  Any,
32
27
  ArraySchema,
@@ -68,7 +63,7 @@ import {
68
63
  isBetween,
69
64
  isSchema,
70
65
  isStream,
71
- make4 as make,
66
+ make2 as make,
72
67
  merge,
73
68
  optional,
74
69
  optionalKey,
@@ -81,7 +76,7 @@ import {
81
76
  transformOptional,
82
77
  withConstructorDefault,
83
78
  withDefault
84
- } from "./chunk-IJQ5LE74.js";
79
+ } from "./chunk-MXDKXAY4.js";
85
80
 
86
81
  // src/contracts/api-response-error.ts
87
82
  var maxApiErrorInstructionsLength = 4096;
@@ -287,6 +282,177 @@ var WorkflowControlCommand = Schema_exports.Union([
287
282
  Schema_exports.Struct({ operation: Schema_exports.Literal("terminate"), run: WorkflowRunId })
288
283
  ]);
289
284
 
285
+ // ../app-data/src/contracts/database.ts
286
+ var DataName = Schema_exports.String.check(
287
+ Schema_exports.makeFilter((value) => /^[A-Za-z][A-Za-z0-9_]*$/.test(value) && value.length <= 128)
288
+ );
289
+ var Scalar = Schema_exports.Union([Schema_exports.String, Schema_exports.Finite, Schema_exports.Boolean]);
290
+ var Field = Schema_exports.Struct({
291
+ kind: Schema_exports.Literals(["string", "number", "boolean", "id", "userId"]),
292
+ optional: Schema_exports.optional(Schema_exports.Boolean),
293
+ default: Schema_exports.optional(Scalar),
294
+ references: Schema_exports.optional(DataName)
295
+ });
296
+ var Index = Schema_exports.Struct({ name: DataName, fields: Schema_exports.NonEmptyArray(DataName) });
297
+ var Table = Schema_exports.Struct({
298
+ fields: Schema_exports.Record(DataName, Field),
299
+ indexes: Schema_exports.Array(Index)
300
+ });
301
+ var DatabaseSchema = Schema_exports.Record(DataName, Table);
302
+ var Row = Schema_exports.Record(Schema_exports.String, Scalar);
303
+ var RowMetadata = Schema_exports.Struct({
304
+ id: Schema_exports.NonEmptyString,
305
+ createdAt: Schema_exports.String,
306
+ updatedAt: Schema_exports.String
307
+ });
308
+ var Patch = Schema_exports.Record(DataName, Schema_exports.NullOr(Scalar));
309
+ var RangeClause = Schema_exports.Struct({
310
+ field: DataName,
311
+ op: Schema_exports.Literals(["eq", "gt", "gte", "lt", "lte"]),
312
+ value: Schema_exports.NullOr(Scalar)
313
+ });
314
+ var QueryPlan = Schema_exports.Struct({
315
+ table: DataName,
316
+ index: DataName,
317
+ order: Schema_exports.Literals(["asc", "desc"]),
318
+ clauses: Schema_exports.Array(RangeClause)
319
+ });
320
+ var QueryTerminal = Schema_exports.Union([
321
+ Schema_exports.Struct({ kind: Schema_exports.Literal("collect") }),
322
+ Schema_exports.Struct({ kind: Schema_exports.Literal("count") }),
323
+ Schema_exports.Struct({ kind: Schema_exports.Literal("first") }),
324
+ Schema_exports.Struct({
325
+ kind: Schema_exports.Literal("take"),
326
+ count: Schema_exports.Int.check(Schema_exports.isGreaterThanOrEqualTo(0))
327
+ }),
328
+ Schema_exports.Struct({
329
+ kind: Schema_exports.Literal("paginate"),
330
+ cursor: Schema_exports.NullOr(Schema_exports.String),
331
+ numItems: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
332
+ })
333
+ ]);
334
+ var DatabaseOperation = Schema_exports.Union([
335
+ Schema_exports.Struct({ kind: Schema_exports.Literal("get"), table: DataName, id: Schema_exports.NonEmptyString }),
336
+ Schema_exports.Struct({ kind: Schema_exports.Literal("insert"), table: DataName, value: Patch }),
337
+ Schema_exports.Struct({
338
+ kind: Schema_exports.Literal("update"),
339
+ table: DataName,
340
+ id: Schema_exports.NonEmptyString,
341
+ patch: Patch
342
+ }),
343
+ Schema_exports.Struct({ kind: Schema_exports.Literal("delete"), table: DataName, id: Schema_exports.NonEmptyString }),
344
+ Schema_exports.Struct({ kind: Schema_exports.Literal("query"), plan: QueryPlan, terminal: QueryTerminal })
345
+ ]);
346
+ var PaginationResult = Schema_exports.Struct({
347
+ page: Schema_exports.Array(Row),
348
+ continueCursor: Schema_exports.NullOr(Schema_exports.String),
349
+ isDone: Schema_exports.Boolean
350
+ });
351
+ var OperationResult = Schema_exports.Union([
352
+ Row,
353
+ Schema_exports.Array(Row),
354
+ PaginationResult,
355
+ Schema_exports.Boolean,
356
+ Schema_exports.Finite,
357
+ Schema_exports.Null
358
+ ]);
359
+ var AppDatabaseError = class extends Schema_exports.TaggedError()("AppDatabaseError", {
360
+ reason: Schema_exports.Literals([
361
+ "schema",
362
+ "schema_changed",
363
+ "table",
364
+ "index",
365
+ "range",
366
+ "value",
367
+ "readonly",
368
+ "cursor",
369
+ "limit",
370
+ "closed",
371
+ "storage",
372
+ "replay"
373
+ ])
374
+ }) {
375
+ };
376
+ var DatabaseLimits = Schema_exports.Struct({
377
+ rowsRead: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
378
+ rowsReturned: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
379
+ bytesRead: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
380
+ writes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
381
+ scanCalls: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
382
+ directGets: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
383
+ valueBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
384
+ indexBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
385
+ });
386
+ var defaultDatabaseLimits = {
387
+ rowsRead: 5e3,
388
+ rowsReturned: 1e3,
389
+ bytesRead: 4 * 1024 * 1024,
390
+ writes: 1e3,
391
+ scanCalls: 100,
392
+ directGets: 1e3,
393
+ valueBytes: 64 * 1024,
394
+ indexBytes: 2048
395
+ };
396
+ var DatabaseLimit = Schema_exports.Literals([
397
+ "scanCalls",
398
+ "directGets",
399
+ "rowsRead",
400
+ "rowsReturned",
401
+ "pageSize",
402
+ "bytesRead",
403
+ "writes",
404
+ "valueBytes"
405
+ ]);
406
+ var count = (value) => value.toLocaleString("en-US");
407
+ var limitMessages = {
408
+ scanCalls: (maximum, requested) => `This invocation made ${count(requested)} index queries; the limit is ${count(maximum)}. Each first(), take(), collect(), count() or paginate() call on withIndex(...) counts once. Read related rows with one take() or paginate() over a shared index prefix instead of one first() per item, use get(id) for known IDs, or split the work across workflow steps.`,
409
+ directGets: (maximum, requested) => `This invocation made ${count(requested)} get(id) calls, including those made by update and delete; the limit is ${count(maximum)}. Split the work across workflow steps or mutations.`,
410
+ rowsRead: (maximum, requested) => `This invocation read ${count(requested)} rows; the limit is ${count(maximum)}. Read fewer rows per call, through an index or a LIMIT, or split the work across calls or workflow steps.`,
411
+ rowsReturned: (maximum, requested) => `This invocation returned ${count(requested)} rows; the limit is ${count(maximum)}. collect() fails rather than truncating. Page with paginate() across calls or workflow steps.`,
412
+ pageSize: (maximum, requested) => `One call asked for ${count(requested)} rows; take(n) and paginate({ numItems }) accept at most ${count(maximum)}. Page with paginate() across calls or workflow steps.`,
413
+ bytesRead: (maximum, requested) => `This invocation read ${count(requested)} bytes; the limit is ${count(maximum)}. Read fewer or smaller rows per call, or page with paginate() across calls or workflow steps.`,
414
+ writes: (maximum, requested) => `This invocation wrote ${count(requested)} rows; the limit is ${count(maximum)}. Split large ingests into batches, one batch per mutation or workflow step.`,
415
+ valueBytes: (maximum, requested) => `A row encodes to ${count(requested)} bytes; each row may use at most ${count(maximum)}. Store large content outside the row or split it across rows.`
416
+ };
417
+ var DatabaseLimitExceeded = class extends Schema_exports.TaggedError()(
418
+ "DatabaseLimitExceeded",
419
+ {
420
+ limit: DatabaseLimit,
421
+ maximum: Schema_exports.Int,
422
+ requested: Schema_exports.Int
423
+ }
424
+ ) {
425
+ get message() {
426
+ return limitMessages[this.limit](this.maximum, this.requested);
427
+ }
428
+ };
429
+ var reservedFieldNames = ["id", "createdAt", "updatedAt"];
430
+ var DatabaseFieldReserved = class extends Schema_exports.TaggedError()(
431
+ "DatabaseFieldReserved",
432
+ {
433
+ table: Schema_exports.String,
434
+ field: Schema_exports.Literals(reservedFieldNames)
435
+ }
436
+ ) {
437
+ get message() {
438
+ return `Table "${this.table}" declares "${this.field}", which is reserved: the host adds id, createdAt and updatedAt to every row. Rename the field, or use the row's own ${this.field}.`;
439
+ }
440
+ };
441
+ var DatabaseRuntimeLimits = Schema_exports.Struct({
442
+ maxCursorChars: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
443
+ connectionCacheCapacity: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
444
+ connectionCacheTtlMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
445
+ });
446
+ var defaultDatabaseRuntimeLimits = DatabaseRuntimeLimits.make({
447
+ maxCursorChars: 8192,
448
+ connectionCacheCapacity: 64,
449
+ connectionCacheTtlMs: 5 * 60 * 1e3
450
+ });
451
+
452
+ // src/contracts/sql.ts
453
+ var reservedTablePrefix = "_executor_";
454
+ var migrationsDirectory = "migrations";
455
+
290
456
  // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/rpc/RpcSchema.js
291
457
  var StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
292
458
  var schema = /* @__PURE__ */ declare(isStream);
@@ -1973,7 +2139,7 @@ var ManyAccounts = class extends Data_exports.TaggedClass("many") {
1973
2139
  };
1974
2140
 
1975
2141
  // src/contracts/protocol-version.ts
1976
- var frameworkProtocol = 9;
2142
+ var frameworkProtocol = 10;
1977
2143
 
1978
2144
  // src/contracts/protocols/oauth.ts
1979
2145
  var OAuthClientAuth2 = Schema_exports.Literals([
@@ -2099,12 +2265,12 @@ var OAuth2Config2 = Schema_exports.Union([
2099
2265
 
2100
2266
  // src/contracts/schedules.ts
2101
2267
  var minimumIntervalMilliseconds = 6e4;
2102
- var count = Schema_exports.Int.check(Schema_exports.isGreaterThan(0));
2268
+ var count2 = Schema_exports.Int.check(Schema_exports.isGreaterThan(0));
2103
2269
  var absent = Schema_exports.optionalKey(Schema_exports.Never);
2104
2270
  var Interval = Schema_exports.Union([
2105
- Schema_exports.Struct({ seconds: count, minutes: absent, hours: absent }),
2106
- Schema_exports.Struct({ seconds: absent, minutes: count, hours: absent }),
2107
- Schema_exports.Struct({ seconds: absent, minutes: absent, hours: count })
2271
+ Schema_exports.Struct({ seconds: count2, minutes: absent, hours: absent }),
2272
+ Schema_exports.Struct({ seconds: absent, minutes: count2, hours: absent }),
2273
+ Schema_exports.Struct({ seconds: absent, minutes: absent, hours: count2 })
2108
2274
  ]);
2109
2275
  var CalendarSchedule = Schema_exports.Struct({
2110
2276
  expression: Schema_exports.NonEmptyString,
@@ -3006,6 +3172,31 @@ var protocol9 = {
3006
3172
  }
3007
3173
  };
3008
3174
 
3175
+ // src/contracts/protocols/10.ts
3176
+ var DeclaredRequirements5 = Schema_exports.Struct({
3177
+ ...DeclaredRequirements4.fields,
3178
+ sql: Schema_exports.optionalKey(Schema_exports.Literal(true))
3179
+ });
3180
+ var MigrateCommand = Schema_exports.Struct({ operation: Schema_exports.Literal("migrate") });
3181
+ var MigrateResult = Schema_exports.Array(
3182
+ Schema_exports.Struct({ id: Schema_exports.Int, name: Schema_exports.NonEmptyString })
3183
+ );
3184
+ var HostRequest4 = Schema_exports.Union([...HostRequest3.members, MigrateCommand]);
3185
+ var HostInvocation6 = Schema_exports.Struct({
3186
+ ...HostInvocation5.fields,
3187
+ command: HostRequest4
3188
+ });
3189
+ var protocol10 = {
3190
+ version: 10,
3191
+ schemas: {
3192
+ ...protocol9.schemas,
3193
+ request: HostRequest4,
3194
+ requirements: DeclaredRequirements5,
3195
+ invocation: HostInvocation6,
3196
+ migrate: MigrateResult
3197
+ }
3198
+ };
3199
+
3009
3200
  // src/contracts/host.ts
3010
3201
  var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
3011
3202
  var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
@@ -3100,6 +3291,10 @@ export {
3100
3291
  WorkflowRpcCommand,
3101
3292
  WorkflowRpcResult,
3102
3293
  WorkflowControlCommand,
3294
+ DatabaseLimitExceeded,
3295
+ DatabaseFieldReserved,
3296
+ reservedTablePrefix,
3297
+ migrationsDirectory,
3103
3298
  ElicitationLimits,
3104
3299
  defaultElicitationLimits,
3105
3300
  FormElicitation,
@@ -3163,16 +3358,13 @@ export {
3163
3358
  HostKindMismatch,
3164
3359
  protocol4,
3165
3360
  AccountCheckCommand,
3166
- HostRequest3 as HostRequest,
3167
3361
  protocol5,
3168
3362
  protocol6,
3169
3363
  CredentialHost,
3170
3364
  DeclaredAuthMethod3 as DeclaredAuthMethod,
3171
3365
  DeclaredProvider3 as DeclaredProvider,
3172
- DeclaredRequirements4 as DeclaredRequirements,
3173
3366
  ResolvedAccount3 as ResolvedAccount,
3174
3367
  ResolvedAccounts3 as ResolvedAccounts,
3175
- HostInvocation5 as HostInvocation,
3176
3368
  protocol7,
3177
3369
  HostDeclarationInvalid3 as HostDeclarationInvalid,
3178
3370
  HostEvaluationFailed3 as HostEvaluationFailed,
@@ -3187,6 +3379,12 @@ export {
3187
3379
  HostError5 as HostError,
3188
3380
  HostResponse5 as HostResponse,
3189
3381
  protocol9,
3382
+ DeclaredRequirements5 as DeclaredRequirements,
3383
+ MigrateCommand,
3384
+ MigrateResult,
3385
+ HostRequest4 as HostRequest,
3386
+ HostInvocation6 as HostInvocation,
3387
+ protocol10,
3190
3388
  skillsCommand,
3191
3389
  skillCatalog,
3192
3390
  inspectCommand,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  prepareElicitation
3
- } from "./chunk-GHDZEEPO.js";
3
+ } from "./chunk-27TDXHRX.js";
4
4
  import {
5
5
  fromPromise
6
- } from "./chunk-7KEKFBV7.js";
6
+ } from "./chunk-7CSHVXVR.js";
7
7
  import {
8
8
  bodyUpstreamError
9
- } from "./chunk-ENJCQWVF.js";
9
+ } from "./chunk-E4BWL7KQ.js";
10
10
  import {
11
11
  ElicitationFailed,
12
12
  McpError,
@@ -18,15 +18,15 @@ import {
18
18
  defaultElicitationLimits,
19
19
  defaultMcpClientLimits,
20
20
  mcpSdkTimerCeilingMs
21
- } from "./chunk-LQBR7AI7.js";
21
+ } from "./chunk-3V575NIW.js";
22
22
  import {
23
23
  jsonSchemaDecoder,
24
24
  nestJsonSchema,
25
25
  preparedJsonSchemaDecoder
26
- } from "./chunk-POOIHRPF.js";
26
+ } from "./chunk-GHXRRFZA.js";
27
27
  import {
28
28
  JsonObject
29
- } from "./chunk-BI45HZWM.js";
29
+ } from "./chunk-YQ35E7KS.js";
30
30
  import {
31
31
  Clock_exports,
32
32
  Deferred_exports,
@@ -35,7 +35,7 @@ import {
35
35
  Option_exports,
36
36
  Queue_exports,
37
37
  Schema_exports
38
- } from "./chunk-IJQ5LE74.js";
38
+ } from "./chunk-MXDKXAY4.js";
39
39
 
40
40
  // src/implementation/mcp-tools.ts
41
41
  var resultFields = {
@@ -5,11 +5,11 @@ import {
5
5
  SkillDefinitionInvalid,
6
6
  SkillFile,
7
7
  SkillFilePath
8
- } from "./chunk-KEZ4YZSP.js";
8
+ } from "./chunk-MLHNVYHT.js";
9
9
  import {
10
10
  Effect_exports,
11
11
  Schema_exports
12
- } from "./chunk-IJQ5LE74.js";
12
+ } from "./chunk-MXDKXAY4.js";
13
13
 
14
14
  // src/implementation/skill-files.ts
15
15
  var skillFromFiles = (input, source = {}) => Effect_exports.gen(function* () {
@@ -3,15 +3,15 @@ import {
3
3
  RouterKey,
4
4
  RouterMeta,
5
5
  reservedRouterKeys
6
- } from "./chunk-LQBR7AI7.js";
6
+ } from "./chunk-3V575NIW.js";
7
7
  import {
8
8
  decoderOf,
9
9
  schemaArgument
10
- } from "./chunk-POOIHRPF.js";
10
+ } from "./chunk-GHXRRFZA.js";
11
11
  import {
12
12
  Effect_exports,
13
13
  Schema_exports
14
- } from "./chunk-IJQ5LE74.js";
14
+ } from "./chunk-MXDKXAY4.js";
15
15
 
16
16
  // src/implementation/authoring.ts
17
17
  var NativeCallback = /* @__PURE__ */ Symbol("apps.NativeCallback");
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  skillFromFiles
3
- } from "./chunk-BWUHMKHQ.js";
3
+ } from "./chunk-5TJA7364.js";
4
4
  import {
5
5
  joinPath,
6
6
  mergeMeta
7
- } from "./chunk-7KEKFBV7.js";
7
+ } from "./chunk-7CSHVXVR.js";
8
8
  import {
9
9
  isShortenedUpstream,
10
10
  parseProviderError,
11
11
  providerError
12
- } from "./chunk-ENJCQWVF.js";
12
+ } from "./chunk-E4BWL7KQ.js";
13
13
  import {
14
14
  ApiErrorResponse,
15
15
  HostDeclarationInvalid,
@@ -21,10 +21,7 @@ import {
21
21
  McpError,
22
22
  McpError2,
23
23
  SkillLoadFailed as SkillLoadFailed2
24
- } from "./chunk-LQBR7AI7.js";
25
- import {
26
- AppDatabaseError
27
- } from "./chunk-73AV3JVU.js";
24
+ } from "./chunk-3V575NIW.js";
28
25
  import {
29
26
  CacheError,
30
27
  FailureCode,
@@ -35,23 +32,19 @@ import {
35
32
  maxFailureFields,
36
33
  maxFailureMessageLength,
37
34
  maxUpstreamMessageLength
38
- } from "./chunk-BI6R577B.js";
35
+ } from "./chunk-P7MGDPFD.js";
39
36
  import {
40
37
  SkillLoadFailed,
41
38
  skillFormatLimits
42
- } from "./chunk-KEZ4YZSP.js";
39
+ } from "./chunk-MLHNVYHT.js";
43
40
  import {
44
41
  jsonSchemaDocument
45
- } from "./chunk-POOIHRPF.js";
46
- import {
47
- AppStorageError,
48
- AppStorageUnavailable
49
- } from "./chunk-Y3XN4X4Q.js";
42
+ } from "./chunk-GHXRRFZA.js";
50
43
  import {
51
44
  AccountId,
52
45
  HttpUrl,
53
46
  JsonObject
54
- } from "./chunk-BI45HZWM.js";
47
+ } from "./chunk-YQ35E7KS.js";
55
48
  import {
56
49
  Cause_exports,
57
50
  Effect_exports,
@@ -61,7 +54,7 @@ import {
61
54
  Redacted_exports,
62
55
  Result_exports,
63
56
  Schema_exports
64
- } from "./chunk-IJQ5LE74.js";
57
+ } from "./chunk-MXDKXAY4.js";
65
58
 
66
59
  // src/contracts/openapi.ts
67
60
  var OpenapiErrorResponse = Schema_exports.Struct({
@@ -270,20 +263,6 @@ var OpenapiCompileError = class extends Schema_exports.TaggedError()(
270
263
  };
271
264
 
272
265
  // src/implementation/failure-detail.ts
273
- var storageMessages = {
274
- schema: "The app's database schema is invalid.",
275
- schema_changed: "The app's database schema changed during this operation. Retry it.",
276
- table: "The operation used a table the app's database schema does not declare.",
277
- index: "The operation used an index the table does not declare, or used it incorrectly.",
278
- range: "The index range is invalid for the declared index.",
279
- value: "A value does not match the table's declared field schema.",
280
- readonly: "Queries cannot write. Move writes into a mutation.",
281
- cursor: "The pagination cursor is invalid or belongs to a different query.",
282
- limit: "The operation exceeded a per-invocation app data limit.",
283
- closed: "The database session closed before this operation finished.",
284
- storage: "App storage failed to complete the operation.",
285
- replay: "A workflow step replayed with different input than its first run."
286
- };
287
266
  var cacheMessages = {
288
267
  capacity: "A cache key, value or batch exceeded the app cache's size limits.",
289
268
  invalid: "The app made a cache request the app cache could not accept.",
@@ -429,25 +408,6 @@ var failureDetail = (error, secrets) => {
429
408
  code: error.reason,
430
409
  message: cacheMessages[error.reason]
431
410
  };
432
- if (Schema_exports.is(AppDatabaseError)(error))
433
- return {
434
- source: "storage",
435
- errorName: "AppDatabaseError",
436
- code: error.reason,
437
- message: boundFailureMessage(ownMessage(error) ?? storageMessages[error.reason], secrets)
438
- };
439
- if (Schema_exports.is(AppStorageUnavailable)(error))
440
- return {
441
- source: "storage",
442
- errorName: "AppStorageUnavailable",
443
- message: "App storage is not available on this host."
444
- };
445
- if (Schema_exports.is(AppStorageError)(error))
446
- return {
447
- source: "storage",
448
- errorName: "AppStorageError",
449
- message: "App storage failed to complete the operation."
450
- };
451
411
  if (Schema_exports.is(OpenapiError)(error))
452
412
  return {
453
413
  source: "service",