apps 0.0.1-beta.34 → 0.0.1-beta.36

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 (91) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-OX233L7N.js → chunk-4U2VUDET.js} +2 -2
  3. package/js/{chunk-HW3DPBZR.js → chunk-556EWA6P.js} +3 -2
  4. package/js/{chunk-UMCMZFXW.js → chunk-73AV3JVU.js} +1 -1
  5. package/js/{chunk-QKVZGWGZ.js → chunk-A2NN45C7.js} +7 -7
  6. package/js/{chunk-6ZJ2H6P4.js → chunk-A4O72Z3A.js} +298 -190
  7. package/js/{chunk-FBBXFFFJ.js → chunk-BI45HZWM.js} +2 -2
  8. package/js/{chunk-DXGWKNTQ.js → chunk-BI6R577B.js} +2 -2
  9. package/js/{chunk-QUEPZ67T.js → chunk-BKJDZYK7.js} +3 -3
  10. package/js/{chunk-QZD2RZ4S.js → chunk-CZLCA2O4.js} +8 -8
  11. package/js/{chunk-IU6OK5G2.js → chunk-ENJCQWVF.js} +3 -3
  12. package/js/{chunk-DASNNAP4.js → chunk-HDAQBRT5.js} +391 -14
  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-Q7Q5JTRW.js → chunk-JU7F4PRK.js} +2 -2
  16. package/js/{chunk-CJY5X26R.js → chunk-KOOJUMLR.js} +86 -50
  17. package/js/{chunk-ETLILMHY.js → chunk-KZFV3WCJ.js} +21 -19
  18. package/js/{chunk-ZOY7PDMI.js → chunk-NHCFIWN5.js} +1 -1
  19. package/js/chunk-NHUHTWAF.js +0 -0
  20. package/js/{chunk-QYM4STZW.js → chunk-PHO7HXTC.js} +149 -353
  21. package/js/{chunk-O3OAFU7Q.js → chunk-POOIHRPF.js} +2 -2
  22. package/js/{chunk-AUFVX4KM.js → chunk-RSNZDT4L.js} +2 -2
  23. package/js/{chunk-EPUWF4ZG.js → chunk-SRB2WDU7.js} +3 -3
  24. package/js/{chunk-MFHUR5SB.js → chunk-TADLIUEU.js} +4 -4
  25. package/js/{chunk-5OM6HBNU.js → chunk-UBAKWXAJ.js} +20 -29
  26. package/js/chunk-V5DWGYRK.js +268 -0
  27. package/js/{chunk-MYH3QZ4L.js → chunk-WAGGHNWH.js} +23 -15
  28. package/js/{chunk-GZ4UHXRT.js → chunk-WDBUOIWV.js} +3 -3
  29. package/js/{chunk-PUBNIORL.js → chunk-WMVTBHGK.js} +2 -2
  30. package/js/{chunk-DSUKW6KJ.js → chunk-XEXUHXC3.js} +296 -174
  31. package/js/{chunk-6KG4DZD7.js → chunk-Y3XN4X4Q.js} +1 -1
  32. package/js/{chunk-UKMIHP2G.js → chunk-YW333DH3.js} +4 -4
  33. package/js/{chunk-O4QOPXQT.js → chunk-ZQWDOHEO.js} +31 -24
  34. package/js/client.js +12 -11
  35. package/js/contracts.js +14 -11
  36. package/js/effect.js +23 -21
  37. package/js/graphql.js +25 -23
  38. package/js/host.js +23 -21
  39. package/js/index.js +16 -14
  40. package/js/mcp/effect.js +25 -23
  41. package/js/mcp/stdio.js +25 -23
  42. package/js/mcp.js +27 -25
  43. package/js/openapi.js +22 -21
  44. package/js/react.js +3 -3
  45. package/js/skills/effect.js +6 -5
  46. package/js/skills.js +60 -45
  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/elicitation.d.ts +6 -6
  56. package/types/apps/src/contracts/host.d.ts +10 -6
  57. package/types/apps/src/contracts/mcp.d.ts +6 -1
  58. package/types/apps/src/contracts/openapi.d.ts +1 -1
  59. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  60. package/types/apps/src/contracts/protocols/1.d.ts +12 -5
  61. package/types/apps/src/contracts/protocols/2.d.ts +5 -5
  62. package/types/apps/src/contracts/protocols/3.d.ts +5 -6
  63. package/types/apps/src/contracts/protocols/4.d.ts +5 -6
  64. package/types/apps/src/contracts/protocols/5.d.ts +7 -7
  65. package/types/apps/src/contracts/protocols/6.d.ts +7 -7
  66. package/types/apps/src/contracts/protocols/7.d.ts +7 -7
  67. package/types/apps/src/contracts/protocols/8.d.ts +17 -6
  68. package/types/apps/src/contracts/protocols/9.d.ts +1106 -0
  69. package/types/apps/src/contracts/skills.d.ts +5 -0
  70. package/types/apps/src/contracts/ui.d.ts +1 -1
  71. package/types/apps/src/implementation/failure-detail.d.ts +4 -3
  72. package/types/apps/src/implementation/live.d.ts +2 -2
  73. package/types/apps/src/implementation/mcp-client.d.ts +1 -1
  74. package/types/apps/src/implementation/mcp.d.ts +1 -1
  75. package/types/apps/src/implementation/network.d.ts +1 -1
  76. package/types/apps/src/implementation/openapi-compile.d.ts +1 -1
  77. package/types/apps/src/implementation/optimistic.d.ts +1 -1
  78. package/types/apps/src/implementation/query-commit.d.ts +1 -1
  79. package/types/apps/src/implementation/router-catalog.d.ts +2 -3
  80. package/types/apps/src/implementation/skills.d.ts +8 -8
  81. package/types/apps/src/implementation/ui-auth.d.ts +1 -1
  82. package/types/apps/src/implementation/ui-client.d.ts +1 -1
  83. package/types/apps/src/implementation/ui-serving.d.ts +1 -1
  84. package/types/apps/src/react.d.ts +1 -1
  85. package/types/apps/src/skills.d.ts +2 -1
  86. package/types/telemetry/src/browser-operations.d.ts +1 -1
  87. package/types/telemetry/src/browser.d.ts +2 -2
  88. package/types/telemetry/src/layer.d.ts +2 -2
  89. package/types/telemetry/src/relay.d.ts +2 -2
  90. package/types/telemetry/src/transport.d.ts +1 -1
  91. package/types/utils/src/api-error.d.ts +1 -1
@@ -12,15 +12,15 @@ import {
12
12
  defaultDatabaseLimits,
13
13
  defaultDatabaseRuntimeLimits,
14
14
  reservedFieldNames
15
- } from "./chunk-UMCMZFXW.js";
15
+ } from "./chunk-73AV3JVU.js";
16
16
  import {
17
+ Base64Url_exports,
17
18
  Cause_exports,
18
19
  Clock_exports,
19
20
  Effect_exports,
20
- Encoding_exports,
21
21
  Schema_exports,
22
22
  Semaphore_exports
23
- } from "./chunk-EXGKN554.js";
23
+ } from "./chunk-IJQ5LE74.js";
24
24
 
25
25
  // ../app-data/src/implementation/schema.ts
26
26
  var metadata = new Set(reservedFieldNames);
@@ -107,7 +107,7 @@ var Payload = Schema_exports.Struct({
107
107
  key: Schema_exports.String
108
108
  });
109
109
  var fingerprint = (crypto, value) => Effect_exports.tryPromise({
110
- try: async () => Encoding_exports.encodeBase64Url(
110
+ try: async () => Base64Url_exports.encode(
111
111
  new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)))
112
112
  ),
113
113
  catch: () => new AppDatabaseError({ reason: "storage" })
@@ -125,7 +125,7 @@ var cursorCodec = (crypto, bytes) => Effect_exports.gen(function* () {
125
125
  try: async () => {
126
126
  const nonce = crypto.getRandomValues(new Uint8Array(12));
127
127
  const plaintext = new TextEncoder().encode(
128
- JSON.stringify({ version: 1, query, key: Encoding_exports.encodeBase64Url(position) })
128
+ JSON.stringify({ version: 1, query, key: Base64Url_exports.encode(position) })
129
129
  );
130
130
  const ciphertext = new Uint8Array(
131
131
  await crypto.subtle.encrypt({ name: "AES-GCM", iv: nonce }, key, plaintext)
@@ -133,14 +133,14 @@ var cursorCodec = (crypto, bytes) => Effect_exports.gen(function* () {
133
133
  const token = new Uint8Array(nonce.length + ciphertext.length);
134
134
  token.set(nonce);
135
135
  token.set(ciphertext, nonce.length);
136
- return Encoding_exports.encodeBase64Url(token);
136
+ return Base64Url_exports.encode(token);
137
137
  },
138
138
  catch: () => new AppDatabaseError({ reason: "cursor" })
139
139
  }),
140
140
  decode: (query, token) => Effect_exports.gen(function* () {
141
141
  if (token.length > defaultDatabaseRuntimeLimits.maxCursorChars)
142
142
  return yield* new AppDatabaseError({ reason: "cursor" });
143
- const encoded = yield* Effect_exports.fromResult(Encoding_exports.decodeBase64Url(token));
143
+ const encoded = yield* Effect_exports.fromResult(Base64Url_exports.decode(token));
144
144
  if (encoded.length < 28) return yield* new AppDatabaseError({ reason: "cursor" });
145
145
  const plain = yield* Effect_exports.tryPromise(
146
146
  () => crypto.subtle.decrypt(
@@ -153,7 +153,7 @@ var cursorCodec = (crypto, bytes) => Effect_exports.gen(function* () {
153
153
  new TextDecoder().decode(plain)
154
154
  );
155
155
  if (payload.query !== query) return yield* new AppDatabaseError({ reason: "cursor" });
156
- return yield* Effect_exports.fromResult(Encoding_exports.decodeBase64Url(payload.key));
156
+ return yield* Effect_exports.fromResult(Base64Url_exports.decode(payload.key));
157
157
  }).pipe(Effect_exports.mapError(() => new AppDatabaseError({ reason: "cursor" })))
158
158
  };
159
159
  });
@@ -272,14 +272,14 @@ var makeSqliteDatabase = (options) => Effect_exports.gen(function* () {
272
272
  yield* sql`CREATE TABLE IF NOT EXISTS app_indexes (table_name TEXT NOT NULL, index_name TEXT NOT NULL, sort_key BLOB NOT NULL, row_id TEXT NOT NULL, PRIMARY KEY (table_name, index_name, sort_key)) WITHOUT ROWID`;
273
273
  yield* sql`CREATE TABLE IF NOT EXISTS app_mutation_receipts (id TEXT PRIMARY KEY, fingerprint TEXT NOT NULL, result TEXT NOT NULL) WITHOUT ROWID`;
274
274
  yield* sql`CREATE INDEX IF NOT EXISTS app_indexes_by_row ON app_indexes (table_name, row_id)`;
275
- const generated = Encoding_exports.encodeBase64Url(crypto.getRandomValues(new Uint8Array(32)));
275
+ const generated = Base64Url_exports.encode(crypto.getRandomValues(new Uint8Array(32)));
276
276
  yield* sql`INSERT OR IGNORE INTO app_database (singleton, schema_hash, cursor_key) VALUES (1, ${schemaHash}, ${generated})`;
277
277
  const saved = yield* sql`SELECT schema_hash, cursor_key FROM app_database WHERE singleton = 1`.pipe(
278
278
  Effect_exports.flatMap((rows) => Schema_exports.decodeUnknownEffect(Saved)(rows[0]))
279
279
  );
280
280
  if (saved.schema_hash !== schemaHash)
281
281
  return yield* new AppDatabaseError({ reason: "schema_changed" });
282
- return yield* Effect_exports.fromResult(Encoding_exports.decodeBase64Url(saved.cursor_key));
282
+ return yield* Effect_exports.fromResult(Base64Url_exports.decode(saved.cursor_key));
283
283
  })
284
284
  ).pipe(
285
285
  Effect_exports.catchTags({
@@ -423,8 +423,8 @@ var makeSqliteDatabase = (options) => Effect_exports.gen(function* () {
423
423
  table: tableName,
424
424
  index: plan.index,
425
425
  order: plan.order,
426
- lower: Encoding_exports.encodeBase64Url(bounds.lower),
427
- upper: bounds.upper === void 0 ? null : Encoding_exports.encodeBase64Url(bounds.upper)
426
+ lower: Base64Url_exports.encode(bounds.lower),
427
+ upper: bounds.upper === void 0 ? null : Base64Url_exports.encode(bounds.upper)
428
428
  })
429
429
  );
430
430
  const position = terminal.kind === "paginate" && terminal.cursor !== null ? yield* cursors.decode(query, terminal.cursor) : void 0;
@@ -3,14 +3,14 @@ import {
3
3
  CacheEntry,
4
4
  CacheError,
5
5
  cacheLimits
6
- } from "./chunk-DXGWKNTQ.js";
6
+ } from "./chunk-BI6R577B.js";
7
7
  import {
8
8
  Clock_exports,
9
9
  Duration_exports,
10
10
  Effect_exports,
11
11
  Exit_exports,
12
12
  Schema_exports
13
- } from "./chunk-EXGKN554.js";
13
+ } from "./chunk-IJQ5LE74.js";
14
14
 
15
15
  // ../app-cache/src/index.ts
16
16
  var canonical = (value) => {