apps 0.0.1-beta.33 → 0.0.1-beta.35

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 (83) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-TEV5IMOM.js → chunk-5CQMUXW7.js} +2 -2
  3. package/js/{chunk-N72RKJ5E.js → chunk-5KNA2Z5I.js} +13 -102
  4. package/js/{chunk-UMCMZFXW.js → chunk-73AV3JVU.js} +1 -1
  5. package/js/{chunk-6ZJ2H6P4.js → chunk-A4O72Z3A.js} +298 -190
  6. package/js/{chunk-FBBXFFFJ.js → chunk-BI45HZWM.js} +2 -2
  7. package/js/{chunk-5DLG2FVN.js → chunk-BI6R577B.js} +93 -2
  8. package/js/{chunk-4OKYLVU4.js → chunk-ENJCQWVF.js} +3 -3
  9. package/js/{chunk-OX233L7N.js → chunk-FFTALB6S.js} +2 -2
  10. package/js/{chunk-DASNNAP4.js → chunk-HDAQBRT5.js} +391 -14
  11. package/js/{chunk-HW3DPBZR.js → chunk-I7CNZ4CM.js} +1 -1
  12. package/js/{chunk-GMMS4BY3.js → chunk-IA3VSGR4.js} +7 -7
  13. package/js/{chunk-EXGKN554.js → chunk-IJQ5LE74.js} +9805 -9254
  14. package/js/{chunk-5JVNM3CQ.js → chunk-IU7CCCUC.js} +12 -12
  15. package/js/{chunk-AYM2FUI5.js → chunk-JU7F4PRK.js} +2 -2
  16. package/js/{chunk-E6C2DUIA.js → chunk-KBXQOJYW.js} +8 -8
  17. package/js/{chunk-CJY5X26R.js → chunk-KOOJUMLR.js} +86 -50
  18. package/js/{chunk-ETLILMHY.js → chunk-KZFV3WCJ.js} +21 -19
  19. package/js/{chunk-AKKJDDOT.js → chunk-LUROQKFP.js} +10 -10
  20. package/js/{chunk-ZOY7PDMI.js → chunk-NHCFIWN5.js} +1 -1
  21. package/js/chunk-NHUHTWAF.js +0 -0
  22. package/js/{chunk-QYM4STZW.js → chunk-PHO7HXTC.js} +149 -353
  23. package/js/{chunk-O3OAFU7Q.js → chunk-POOIHRPF.js} +2 -2
  24. package/js/{chunk-AUFVX4KM.js → chunk-RSNZDT4L.js} +2 -2
  25. package/js/chunk-SRB2WDU7.js +49 -0
  26. package/js/{chunk-MFHUR5SB.js → chunk-TADLIUEU.js} +4 -4
  27. package/js/{chunk-3BHBWZLD.js → chunk-UWOIEJ56.js} +20 -18
  28. package/js/chunk-V5DWGYRK.js +268 -0
  29. package/js/{chunk-75JKK3ZE.js → chunk-VBVOPW4U.js} +3 -3
  30. package/js/{chunk-GZ4UHXRT.js → chunk-WDBUOIWV.js} +3 -3
  31. package/js/{chunk-6KG4DZD7.js → chunk-Y3XN4X4Q.js} +1 -1
  32. package/js/{chunk-WWSRAE5Y.js → chunk-YW333DH3.js} +11 -8
  33. package/js/{chunk-2SRLJHPM.js → chunk-YYK6GEMC.js} +14 -53
  34. package/js/client.js +12 -11
  35. package/js/contracts.js +17 -16
  36. package/js/effect.js +23 -20
  37. package/js/graphql.js +27 -25
  38. package/js/host.js +23 -20
  39. package/js/index.js +18 -16
  40. package/js/mcp/effect.js +25 -22
  41. package/js/mcp/stdio.js +25 -22
  42. package/js/mcp.js +28 -25
  43. package/js/openapi.js +25 -22
  44. package/js/react.js +3 -3
  45. package/js/skills/effect.js +6 -5
  46. package/js/skills.js +119 -49
  47. package/js/storage/facet.js +19 -345
  48. package/js/ui/auth/contracts.js +2 -2
  49. package/js/ui/auth.js +5 -5
  50. package/js/ui/contracts.js +6 -5
  51. package/js/ui/serving.js +10 -9
  52. package/package.json +3 -3
  53. package/runtime.json +1 -1
  54. package/types/app-data/src/implementation/sqlite.d.ts +1 -1
  55. package/types/apps/src/contracts/cache.d.ts +14 -0
  56. package/types/apps/src/contracts/elicitation.d.ts +6 -6
  57. package/types/apps/src/contracts/protocols/1.d.ts +4 -4
  58. package/types/apps/src/contracts/protocols/2.d.ts +4 -4
  59. package/types/apps/src/contracts/protocols/3.d.ts +4 -4
  60. package/types/apps/src/contracts/protocols/4.d.ts +4 -4
  61. package/types/apps/src/contracts/protocols/5.d.ts +4 -4
  62. package/types/apps/src/contracts/protocols/6.d.ts +4 -4
  63. package/types/apps/src/contracts/protocols/7.d.ts +4 -4
  64. package/types/apps/src/contracts/protocols/8.d.ts +4 -4
  65. package/types/apps/src/contracts/skills.d.ts +16 -4
  66. package/types/apps/src/contracts/ui.d.ts +1 -1
  67. package/types/apps/src/implementation/catalog-cache.d.ts +14 -17
  68. package/types/apps/src/implementation/live.d.ts +2 -2
  69. package/types/apps/src/implementation/network.d.ts +1 -1
  70. package/types/apps/src/implementation/optimistic.d.ts +1 -1
  71. package/types/apps/src/implementation/query-commit.d.ts +1 -1
  72. package/types/apps/src/implementation/skills.d.ts +13 -19
  73. package/types/apps/src/implementation/ui-auth.d.ts +1 -1
  74. package/types/apps/src/implementation/ui-client.d.ts +1 -1
  75. package/types/apps/src/implementation/ui-serving.d.ts +1 -1
  76. package/types/apps/src/react.d.ts +1 -1
  77. package/types/apps/src/skills.d.ts +4 -3
  78. package/types/telemetry/src/browser-operations.d.ts +1 -1
  79. package/types/telemetry/src/browser.d.ts +2 -2
  80. package/types/telemetry/src/layer.d.ts +2 -2
  81. package/types/telemetry/src/relay.d.ts +2 -2
  82. package/types/telemetry/src/transport.d.ts +1 -1
  83. package/types/utils/src/api-error.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  fixedRouter
3
- } from "./chunk-2SRLJHPM.js";
3
+ } from "./chunk-YYK6GEMC.js";
4
4
  import {
5
5
  nativeOperation,
6
6
  operationDeclaration,
7
7
  routerDeclaration
8
- } from "./chunk-75JKK3ZE.js";
8
+ } from "./chunk-VBVOPW4U.js";
9
9
 
10
10
  // src/implementation/protocol-operations.ts
11
11
  var protocolOperations = (operations, kinds = {}) => {
@@ -2,7 +2,7 @@ import {
2
2
  DatabaseFieldReserved,
3
3
  DatabaseLimitExceeded,
4
4
  DatabaseSchema
5
- } from "./chunk-UMCMZFXW.js";
5
+ } from "./chunk-73AV3JVU.js";
6
6
  import {
7
7
  CacheCommand,
8
8
  CacheReply,
@@ -13,18 +13,18 @@ import {
13
13
  FailureSource,
14
14
  ProviderError,
15
15
  UpstreamError
16
- } from "./chunk-5DLG2FVN.js";
16
+ } from "./chunk-BI6R577B.js";
17
17
  import {
18
18
  AppSkillName,
19
19
  AppSkills,
20
20
  SkillLoadFailed
21
- } from "./chunk-HW3DPBZR.js";
21
+ } from "./chunk-I7CNZ4CM.js";
22
22
  import {
23
23
  AccountId,
24
24
  HttpUrl,
25
25
  JsonObject as JsonObject2,
26
26
  JsonValue
27
- } from "./chunk-FBBXFFFJ.js";
27
+ } from "./chunk-BI45HZWM.js";
28
28
  import {
29
29
  Any,
30
30
  ArraySchema,
@@ -60,13 +60,13 @@ import {
60
60
  declare,
61
61
  decode,
62
62
  decodeTo,
63
- empty2 as empty,
63
+ empty,
64
64
  flatMap,
65
65
  fromUndefinedOr,
66
66
  isBetween,
67
67
  isSchema,
68
68
  isStream,
69
- make6 as make,
69
+ make4 as make,
70
70
  merge,
71
71
  optional,
72
72
  optionalKey,
@@ -75,10 +75,11 @@ import {
75
75
  symbol3 as symbol,
76
76
  sync2 as sync,
77
77
  tag,
78
+ toType,
78
79
  transformOptional,
79
80
  withConstructorDefault,
80
81
  withDefault
81
- } from "./chunk-EXGKN554.js";
82
+ } from "./chunk-IJQ5LE74.js";
82
83
 
83
84
  // src/contracts/router.ts
84
85
  var reservedRouterKeys = /* @__PURE__ */ new Set([
@@ -226,88 +227,6 @@ var defaultOpenapiErrorLimits = OpenapiErrorLimits.make({
226
227
  readTimeoutMs: 2e3
227
228
  });
228
229
 
229
- // src/contracts/network.ts
230
- var NetworkRefusal = Schema_exports.Union([
231
- Schema_exports.Struct({ reason: Schema_exports.Literal("private_address") }),
232
- Schema_exports.Struct({
233
- reason: Schema_exports.Literal("credential_host"),
234
- /** The provider of the credential handle the request carried. */
235
- provider: Schema_exports.String,
236
- /** The hosts that provider's credentials may reach; empty when it declares none. */
237
- allowedHosts: Schema_exports.Array(Schema_exports.String)
238
- }),
239
- Schema_exports.Struct({ reason: Schema_exports.Literal("credential_app") }),
240
- Schema_exports.Struct({
241
- reason: Schema_exports.Literal("credential_expired"),
242
- /** The provider of the expired credential handle. */
243
- provider: Schema_exports.String
244
- })
245
- ]);
246
- var NetworkRefused = class extends Schema_exports.TaggedError()("NetworkRefused", {
247
- /** The refused destination, with its port when the URL names one. */
248
- host: Schema_exports.String,
249
- refusal: NetworkRefusal
250
- }) {
251
- get message() {
252
- const refusal = this.refusal;
253
- switch (refusal.reason) {
254
- case "private_address":
255
- return `Executor refused a request to ${this.host}: apps on this instance can reach only public addresses, and ${this.host} is a private, loopback or internal address. The request was not sent.`;
256
- case "credential_host":
257
- return refusal.allowedHosts.length === 0 ? `Executor refused this request: ${refusal.provider} credentials cannot be sent to ${this.host}: the provider declares no hosts.` : `Executor refused this request: ${refusal.provider} credentials cannot be sent to ${this.host}. The provider allows: ${refusal.allowedHosts.join(", ")}.`;
258
- case "credential_app":
259
- return "Executor refused this request: it carries a credential handle that is not valid for this app. Use the account fields this invocation received.";
260
- case "credential_expired":
261
- return `Executor refused this request: it carries an expired ${refusal.provider} credential handle. Use the account fields this invocation received.`;
262
- }
263
- }
264
- };
265
- var networkRefusalStatus = 421;
266
- var networkRefusalHeader = "x-executor-refused";
267
- var NetworkRefusedHeader = Schema_exports.StringFromUriComponent.pipe(
268
- Schema_exports.decodeTo(Schema_exports.fromJsonString(NetworkRefused))
269
- );
270
- var encodeRefusal = Schema_exports.encodeSync(NetworkRefused);
271
- var encodeRefusalHeader = Schema_exports.encodeSync(NetworkRefusedHeader);
272
- var networkRefusalResponse = (refused) => new Response(JSON.stringify({ ...encodeRefusal(refused), message: refused.message }), {
273
- status: networkRefusalStatus,
274
- statusText: "Refused by Executor",
275
- headers: {
276
- "content-type": "application/json; charset=utf-8",
277
- [networkRefusalHeader]: encodeRefusalHeader(refused)
278
- }
279
- });
280
- var RestrictedFetchOption = Schema_exports.Literals(["redirect", "cache", "integrity"]);
281
- var supportedFetchOptions = {
282
- redirect: ["follow", "manual"],
283
- cache: ["no-store", "no-cache"],
284
- integrity: [""]
285
- };
286
- var FetchOptionUnsupported = class extends Schema_exports.TaggedError()(
287
- "FetchOptionUnsupported",
288
- {
289
- option: RestrictedFetchOption,
290
- value: Schema_exports.String,
291
- supported: Schema_exports.Array(Schema_exports.String)
292
- }
293
- ) {
294
- get message() {
295
- const supported = this.supported.map((value) => JSON.stringify(value)).join(" or ");
296
- return `fetch option ${this.option}: ${JSON.stringify(this.value)} is not supported by Executor's app runtime. Use ${supported}, or omit ${this.option}.${this.advice}`;
297
- }
298
- /** What to do instead, when the standard value has an equivalent the runtime supports. */
299
- get advice() {
300
- switch (this.option) {
301
- case "redirect":
302
- return this.value === "error" ? ` To reject redirects, send redirect: "manual" and treat a 3xx response as the error.` : "";
303
- case "cache":
304
- return "";
305
- case "integrity":
306
- return " To check a digest, read the body and hash it with crypto.subtle.digest.";
307
- }
308
- }
309
- };
310
-
311
230
  // src/contracts/workflows.ts
312
231
  var WorkflowRunId = Schema_exports.NonEmptyString.pipe(Schema_exports.brand("wfr"));
313
232
  var WorkflowName = Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(200));
@@ -478,7 +397,7 @@ var WorkflowControlCommand = Schema_exports.Union([
478
397
  Schema_exports.Struct({ operation: Schema_exports.Literal("terminate"), run: WorkflowRunId })
479
398
  ]);
480
399
 
481
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/RpcSchema.js
400
+ // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/rpc/RpcSchema.js
482
401
  var StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
483
402
  var schema = /* @__PURE__ */ declare(isStream);
484
403
  function Stream(success, error) {
@@ -489,7 +408,7 @@ function Stream(success, error) {
489
408
  });
490
409
  }
491
410
 
492
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/Rpc.js
411
+ // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/rpc/Rpc.js
493
412
  var TypeId = "~effect/rpc/Rpc";
494
413
  var Proto = {
495
414
  [TypeId]: TypeId,
@@ -607,7 +526,7 @@ var make2 = (tag2, options) => {
607
526
  });
608
527
  };
609
528
 
610
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/ai/McpSchema.js
529
+ // ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/ai/McpSchema.js
611
530
  var optionalWithDefault = (schema2, defaultValue) => {
612
531
  const effect = sync(defaultValue);
613
532
  return optionalKey(schema2).pipe(decode({
@@ -615,7 +534,7 @@ var optionalWithDefault = (schema2, defaultValue) => {
615
534
  encode: passthrough()
616
535
  }), withConstructorDefault(effect));
617
536
  };
618
- var optional2 = (schema2) => optionalKey(schema2).pipe(decodeTo(optional(schema2), {
537
+ var optional2 = (schema2) => optionalKey(schema2).pipe(decodeTo(toType(optional(schema2)), {
619
538
  decode: passthrough(),
620
539
  encode: transformOptional(flatMap(fromUndefinedOr))
621
540
  }));
@@ -1618,6 +1537,7 @@ var CompleteResult = class _CompleteResult extends (/* @__PURE__ */ Opaque()(/*
1618
1537
  /**
1619
1538
  * Empty completion result used when a completion request has no values.
1620
1539
  *
1540
+ * @stability unstable
1621
1541
  * @since 4.0.0
1622
1542
  */
1623
1543
  static empty = /* @__PURE__ */ _CompleteResult.make({
@@ -3017,15 +2937,6 @@ var ToolResultObservation = Context_exports.Reference(
3017
2937
  );
3018
2938
 
3019
2939
  export {
3020
- NetworkRefusal,
3021
- NetworkRefused,
3022
- networkRefusalStatus,
3023
- networkRefusalHeader,
3024
- NetworkRefusedHeader,
3025
- networkRefusalResponse,
3026
- RestrictedFetchOption,
3027
- supportedFetchOptions,
3028
- FetchOptionUnsupported,
3029
2940
  SecretsMethod,
3030
2941
  OAuthClientAuth,
3031
2942
  OAuthSecretClientAuth,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Schema_exports
3
- } from "./chunk-EXGKN554.js";
3
+ } from "./chunk-IJQ5LE74.js";
4
4
 
5
5
  // ../app-data/src/contracts/database.ts
6
6
  var DataName = Schema_exports.String.check(