apps 0.0.1-beta.142 → 0.0.1-beta.144

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 (72) hide show
  1. package/check-publish.mjs +0 -1
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-I6QAWNUM.js → chunk-2OGVSUNI.js} +2 -2
  4. package/js/{chunk-RIOLCZAV.js → chunk-455CCO6Q.js} +9 -17
  5. package/js/{chunk-W2C3IOZJ.js → chunk-5MEOL2SG.js} +32 -29
  6. package/js/{chunk-PQKQIH3T.js → chunk-6NRWFVK2.js} +10 -31
  7. package/js/{chunk-WZ36P57R.js → chunk-6OWHQINS.js} +11 -16
  8. package/js/{chunk-LSOHA2RH.js → chunk-6XBOKQ4E.js} +1 -1
  9. package/js/{chunk-H2K7OZ47.js → chunk-7A4ZSEM3.js} +1 -1
  10. package/js/{chunk-QTX7OUFH.js → chunk-A6FRLRCN.js} +2 -3
  11. package/js/{chunk-ZQVWMEH6.js → chunk-AFEMXP3F.js} +6 -7
  12. package/js/{chunk-Z5O7ON6S.js → chunk-B2PSDMZP.js} +2 -2
  13. package/js/{chunk-Q7PE4PLU.js → chunk-B4JN2A6F.js} +3 -3
  14. package/js/{chunk-VX36SA7Y.js → chunk-BHSWVS3Q.js} +1 -1
  15. package/js/{chunk-APPCHQHK.js → chunk-BU3UOD2T.js} +4 -4
  16. package/js/{chunk-HMYAZUNZ.js → chunk-EXL6F456.js} +6 -4
  17. package/js/{chunk-6QZVXLF2.js → chunk-INQON4A2.js} +2 -2
  18. package/js/{chunk-MB6L5YZE.js → chunk-IWLFLMIL.js} +1 -1
  19. package/js/{chunk-EKXBHVMR.js → chunk-JLHRRTRH.js} +8 -15
  20. package/js/{chunk-YFSOSNF3.js → chunk-NXEGROI6.js} +116 -116
  21. package/js/{chunk-ICIVU5SQ.js → chunk-OFSXKKD6.js} +27 -42
  22. package/js/{chunk-63DHI5Y4.js → chunk-QDF7PQAD.js} +6 -8
  23. package/js/{chunk-YVN2AMAU.js → chunk-QLUWYCOT.js} +2 -2
  24. package/js/{chunk-JH3MOQZR.js → chunk-T4MICYGT.js} +10 -51
  25. package/js/{chunk-OBT33ZDK.js → chunk-TMYRAFMC.js} +3 -3
  26. package/js/{chunk-2XDCAXAR.js → chunk-W6V5OIHB.js} +1 -1
  27. package/js/{chunk-34RH47V5.js → chunk-XR7KZNKD.js} +2 -2
  28. package/js/client.js +10 -15
  29. package/js/contracts.js +9 -7
  30. package/js/effect.js +18 -18
  31. package/js/graphql.js +20 -22
  32. package/js/host.js +18 -20
  33. package/js/index.js +14 -19
  34. package/js/mcp/effect.js +19 -19
  35. package/js/mcp.js +21 -21
  36. package/js/openapi.js +18 -25
  37. package/js/react.js +2 -2
  38. package/js/skills/effect.js +6 -6
  39. package/js/skills.js +21 -27
  40. package/js/ui/auth/contracts.js +2 -2
  41. package/js/ui/auth.js +5 -5
  42. package/js/ui/contracts.js +5 -5
  43. package/js/ui/serving.js +10 -10
  44. package/package.json +1 -1
  45. package/runtime.json +1 -1
  46. package/types/app-cache/src/index.d.ts +1 -40
  47. package/types/app-data/src/contracts/database.d.ts +0 -21
  48. package/types/apps/src/contracts/host.d.ts +6 -0
  49. package/types/telemetry/src/app-records.d.ts +0 -24
  50. package/types/telemetry/src/browser-operations.d.ts +0 -8
  51. package/types/telemetry/src/browser-performance.d.ts +0 -2
  52. package/types/telemetry/src/browser-request-timing.d.ts +0 -1
  53. package/types/telemetry/src/browser.d.ts +0 -10
  54. package/types/telemetry/src/config.d.ts +0 -8
  55. package/types/telemetry/src/context.d.ts +0 -6
  56. package/types/telemetry/src/index.d.ts +0 -1
  57. package/types/telemetry/src/keepalive.d.ts +0 -44
  58. package/types/telemetry/src/layer.d.ts +0 -8
  59. package/types/telemetry/src/measurements.d.ts +0 -8
  60. package/types/telemetry/src/ownership.d.ts +0 -45
  61. package/types/telemetry/src/pending-span.d.ts +0 -2
  62. package/types/telemetry/src/recorded-failure.d.ts +0 -26
  63. package/types/telemetry/src/relay.d.ts +0 -29
  64. package/types/telemetry/src/span-attributes.d.ts +0 -38
  65. package/types/telemetry/src/trace-context.d.ts +0 -6
  66. package/types/telemetry/src/transport.d.ts +0 -10
  67. package/types/utils/src/api-error.d.ts +0 -22
  68. package/types/utils/src/connection-failure.d.ts +0 -10
  69. package/types/utils/src/random-uuid.d.ts +0 -5
  70. package/types/utils/src/recorded-message.d.ts +0 -15
  71. package/types/utils/src/schema-definitions.d.ts +0 -6
  72. package/types/utils/src/user-facing-error.d.ts +0 -19
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  authorCache,
3
3
  unavailableCache
4
- } from "./chunk-PQKQIH3T.js";
4
+ } from "./chunk-6NRWFVK2.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-WZ36P57R.js";
15
+ } from "./chunk-6OWHQINS.js";
16
16
  import {
17
17
  appInvocationFetch
18
- } from "./chunk-Q7PE4PLU.js";
18
+ } from "./chunk-B4JN2A6F.js";
19
19
  import {
20
20
  folderSkillsEffect
21
- } from "./chunk-34RH47V5.js";
21
+ } from "./chunk-XR7KZNKD.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-63DHI5Y4.js";
29
+ } from "./chunk-QDF7PQAD.js";
30
30
  import {
31
31
  declaredOperations,
32
32
  locate,
33
33
  nativeOperation
34
- } from "./chunk-RIOLCZAV.js";
34
+ } from "./chunk-455CCO6Q.js";
35
35
  import {
36
36
  accountProviderError,
37
37
  appCode,
@@ -39,9 +39,10 @@ import {
39
39
  httpProviderError,
40
40
  parseProviderError,
41
41
  toPromise
42
- } from "./chunk-APPCHQHK.js";
42
+ } from "./chunk-BU3UOD2T.js";
43
43
  import {
44
44
  AccountCheckResult,
45
+ AfterReply,
45
46
  DeclaredProvider,
46
47
  DeclaredRequirements,
47
48
  ElicitationFailed,
@@ -95,11 +96,11 @@ import {
95
96
  sqlBindingsLimit,
96
97
  withoutHelp,
97
98
  workflowDurationMillis
98
- } from "./chunk-HMYAZUNZ.js";
99
+ } from "./chunk-EXL6F456.js";
99
100
  import {
100
101
  AppSkills,
101
102
  SkillFile
102
- } from "./chunk-QTX7OUFH.js";
103
+ } from "./chunk-A6FRLRCN.js";
103
104
  import {
104
105
  allowedValues,
105
106
  echoableKey,
@@ -112,17 +113,17 @@ import {
112
113
  missingKeyText,
113
114
  objectShape,
114
115
  unionShape
115
- } from "./chunk-EKXBHVMR.js";
116
+ } from "./chunk-JLHRRTRH.js";
116
117
  import {
117
118
  captureTelemetry,
118
119
  makeOwnershipAccounting,
119
120
  measuredSpan,
120
121
  owned
121
- } from "./chunk-JH3MOQZR.js";
122
+ } from "./chunk-T4MICYGT.js";
122
123
  import {
123
124
  JsonObject,
124
125
  JsonValue
125
- } from "./chunk-H2K7OZ47.js";
126
+ } from "./chunk-7A4ZSEM3.js";
126
127
  import {
127
128
  Base64_exports,
128
129
  Cause_exports,
@@ -135,7 +136,7 @@ import {
135
136
  SchemaIssue_exports,
136
137
  Schema_exports,
137
138
  Stream_exports
138
- } from "./chunk-YFSOSNF3.js";
139
+ } from "./chunk-NXEGROI6.js";
139
140
 
140
141
  // src/implementation/invocation-timing.ts
141
142
  var elicitationWaitSpan = "app.elicitation.wait";
@@ -265,11 +266,7 @@ var makeWorkflowContext = (execution, definition, fresh, signal) => Effect_expor
265
266
  Effect_exports.timeout(timeout),
266
267
  Effect_exports.catchTag(
267
268
  "TimeoutError",
268
- () => (
269
- // Both the capability deadline and the native engine deadline describe
270
- // the same cancellation, regardless of which timer fires first.
271
- Effect_exports.fail(new WorkflowFailure({ reason: "engine", retryable: true }))
272
- )
269
+ () => Effect_exports.fail(new WorkflowFailure({ reason: "engine", retryable: true }))
273
270
  )
274
271
  );
275
272
  };
@@ -913,7 +910,6 @@ var authorSql = (storage, options) => {
913
910
  }
914
911
  };
915
912
  const writer = {
916
- // A step's writes go through its one transaction, which also records its receipt.
917
913
  exec: (query, ...bindings) => run(query, bindings, options.step ? "read" : "write"),
918
914
  transaction
919
915
  };
@@ -1092,7 +1088,6 @@ var migrate = (storage, files) => Effect_exports.gen(function* () {
1092
1088
  }));
1093
1089
  })
1094
1090
  ).pipe(
1095
- // Both are thrown inside the transaction so that it rolls back; they are expected failures.
1096
1091
  Effect_exports.catchDefect(
1097
1092
  (defect) => Schema_exports.is(MigrationFailed)(defect) || Schema_exports.is(MigrationHistoryChanged)(defect) ? Effect_exports.fail(defect) : Effect_exports.die(defect)
1098
1093
  ),
@@ -1177,7 +1172,6 @@ function providerDeclaration(provider) {
1177
1172
  return yield* Schema_exports.decodeUnknownEffect(DeclaredProvider)({
1178
1173
  name: provider.name,
1179
1174
  auth: Object.fromEntries(auth),
1180
- // Order and repetition carry no meaning, so neither changes the provider's identity.
1181
1175
  ...provider.hosts === void 0 ? {} : { hosts: [...new Set(provider.hosts)].sort() }
1182
1176
  });
1183
1177
  }),
@@ -1424,7 +1418,6 @@ function dispatch(app, request, context, signal, emitted) {
1424
1418
  let running;
1425
1419
  const delivery = (request2, signal2) => Effect_exports.suspend(
1426
1420
  () => running !== void 0 && context.elicitation !== void 0 ? context.elicitation(request2, signal2).pipe(
1427
- // Delivering the question and waiting for its answer is the person's time.
1428
1421
  owned("person", "app.tool.elicitation"),
1429
1422
  Effect_exports.provideContext(running.context)
1430
1423
  ) : Effect_exports.fail(new ElicitationFailed({ reason: "unavailable" }))
@@ -1601,7 +1594,6 @@ function dispatch(app, request, context, signal, emitted) {
1601
1594
  stepId,
1602
1595
  idempotencyKey: stepId
1603
1596
  },
1604
- // The resolved values, not the app's decoded fields, which may be `Redacted`.
1605
1597
  secrets: accountSecrets(current.accounts)
1606
1598
  };
1607
1599
  }),
@@ -1739,7 +1731,7 @@ function dispatch(app, request, context, signal, emitted) {
1739
1731
  ...kind === "mutate" ? { events: emitter() } : {}
1740
1732
  },
1741
1733
  input
1742
- );
1734
+ ).pipe(Effect_exports.provideService(AfterReply, context.cache?.background));
1743
1735
  }).pipe(
1744
1736
  Effect_exports.ensuring(
1745
1737
  Effect_exports.sync(() => {
@@ -1885,8 +1877,6 @@ var createAppHandler = (app) => (request, context) => Effect_exports.gen(functio
1885
1877
  toolError = true;
1886
1878
  }
1887
1879
  }),
1888
- // Name what failed on the span; the bounded message stays in the reply only. The host
1889
- // records an app's own error names and codes as `unrecognized` (telemetry `app-records`).
1890
1880
  Effect_exports.tapError(
1891
1881
  (error) => (error._tag === "HostEvaluationFailed" || error._tag === "HostOperationFailed" || error._tag === "HostDeclarationInvalid") && error.errorName !== void 0 ? Effect_exports.annotateCurrentSpan({
1892
1882
  "error.type": error.errorName,
@@ -1894,8 +1884,6 @@ var createAppHandler = (app) => (request, context) => Effect_exports.gen(functio
1894
1884
  ...error.code === void 0 ? {} : { "executor.failure.code": error.code }
1895
1885
  }) : Effect_exports.void
1896
1886
  ),
1897
- // Tool operations time themselves, dividing their time by who owned the work in progress.
1898
- // Other operations do not.
1899
1887
  command.operation === "call" || command.operation === "query" || command.operation === "mutate" ? timedInvocation(command.operation) : Effect_exports.withSpan(`app.${command.operation}`)
1900
1888
  );
1901
1889
  if (toolError)
@@ -1919,21 +1907,18 @@ var createAppHandler = (app) => (request, context) => Effect_exports.gen(functio
1919
1907
  )
1920
1908
  ),
1921
1909
  Effect_exports.catchCause(
1922
- (cause) => Cause_exports.hasInterrupts(cause) ? Effect_exports.interrupt : (
1923
- // The cause can carry any text the app threw; its caller receives that, not the log.
1924
- Effect_exports.logError("The app's request failed unexpectedly").pipe(
1925
- Effect_exports.andThen(
1926
- Schema_exports.encodeEffect(HostError)(
1927
- declarationInvalid(
1928
- "The app failed while it was loaded",
1929
- Cause_exports.squash(cause),
1930
- accountSecrets(context.accounts)
1931
- )
1910
+ (cause) => Cause_exports.hasInterrupts(cause) ? Effect_exports.interrupt : Effect_exports.logError("The app's request failed unexpectedly").pipe(
1911
+ Effect_exports.andThen(
1912
+ Schema_exports.encodeEffect(HostError)(
1913
+ declarationInvalid(
1914
+ "The app failed while it was loaded",
1915
+ Cause_exports.squash(cause),
1916
+ accountSecrets(context.accounts)
1932
1917
  )
1933
- ),
1934
- Effect_exports.map((error) => Response.json({ ok: false, error }, { status: 500 })),
1935
- Effect_exports.orDie
1936
- )
1918
+ )
1919
+ ),
1920
+ Effect_exports.map((error) => Response.json({ ok: false, error }, { status: 500 })),
1921
+ Effect_exports.orDie
1937
1922
  )
1938
1923
  )
1939
1924
  );
@@ -2,11 +2,11 @@ import {
2
2
  declaredOperations,
3
3
  nativeOperation,
4
4
  nativeRouter
5
- } from "./chunk-RIOLCZAV.js";
5
+ } from "./chunk-455CCO6Q.js";
6
6
  import {
7
7
  fromPromise,
8
8
  method
9
- } from "./chunk-APPCHQHK.js";
9
+ } from "./chunk-BU3UOD2T.js";
10
10
  import {
11
11
  EmittedEvent,
12
12
  EventName,
@@ -17,21 +17,21 @@ import {
17
17
  normalizePlacements,
18
18
  placementFields,
19
19
  renderPlacement
20
- } from "./chunk-HMYAZUNZ.js";
20
+ } from "./chunk-EXL6F456.js";
21
21
  import {
22
22
  decoderOf,
23
23
  isSchema,
24
24
  jsonSchemaDocument,
25
25
  schemaArgument
26
- } from "./chunk-EKXBHVMR.js";
26
+ } from "./chunk-JLHRRTRH.js";
27
27
  import {
28
28
  JsonValue
29
- } from "./chunk-H2K7OZ47.js";
29
+ } from "./chunk-7A4ZSEM3.js";
30
30
  import {
31
31
  Effect_exports,
32
32
  Result_exports,
33
33
  Schema_exports
34
- } from "./chunk-YFSOSNF3.js";
34
+ } from "./chunk-NXEGROI6.js";
35
35
 
36
36
  // src/contracts/http.ts
37
37
  var ResponseStatusError = class extends Schema_exports.TaggedError()(
@@ -205,7 +205,6 @@ var workflow = (options, run) => ({
205
205
  input: decoderOf(schemaArgument(options.input, "The workflow input")),
206
206
  ...options.output === void 0 ? {} : { output: decoderOf(schemaArgument(options.output, "The workflow output")) },
207
207
  ...options.description === void 0 ? {} : { description: options.description },
208
- // SAFETY: defineApp checks required context; the host supplies the pinned run's capabilities.
209
208
  run: (context, input) => fromPromise(run, "workflow")(context, input)
210
209
  }
211
210
  });
@@ -306,7 +305,6 @@ function rejectCatalogs(definition) {
306
305
  function adaptDefinition(definition) {
307
306
  rejectCatalogs(definition);
308
307
  const webhooks = definition.webhooks === void 0 ? {} : {
309
- // SAFETY: `Required` only where the optional method was just checked to be present.
310
308
  webhooks: Object.fromEntries(
311
309
  Object.entries(definition.webhooks).map(([name, webhook]) => [
312
310
  name,
@@ -26,7 +26,7 @@ import {
26
26
  uint8Array,
27
27
  upgrade,
28
28
  urlParams
29
- } from "./chunk-MB6L5YZE.js";
29
+ } from "./chunk-IWLFLMIL.js";
30
30
  import {
31
31
  Cause,
32
32
  CurrentRedactedNames,
@@ -161,7 +161,7 @@ import {
161
161
  unwrap2 as unwrap,
162
162
  updateService,
163
163
  void_2 as void_
164
- } from "./chunk-YFSOSNF3.js";
164
+ } from "./chunk-NXEGROI6.js";
165
165
  import {
166
166
  __export
167
167
  } from "./chunk-CZ7CSFO4.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  FetchHttpClient_exports
3
- } from "./chunk-I6QAWNUM.js";
3
+ } from "./chunk-2OGVSUNI.js";
4
4
  import {
5
5
  recordedMessage
6
- } from "./chunk-LSOHA2RH.js";
6
+ } from "./chunk-6XBOKQ4E.js";
7
7
  import {
8
8
  HttpBody_exports,
9
9
  HttpClient,
@@ -25,7 +25,7 @@ import {
25
25
  text,
26
26
  transformResponse,
27
27
  uint8Array
28
- } from "./chunk-MB6L5YZE.js";
28
+ } from "./chunk-IWLFLMIL.js";
29
29
  import {
30
30
  Array as Array2,
31
31
  Boolean2 as Boolean,
@@ -139,7 +139,7 @@ import {
139
139
  withDefault2 as withDefault,
140
140
  withTracerEnabled,
141
141
  zero
142
- } from "./chunk-YFSOSNF3.js";
142
+ } from "./chunk-NXEGROI6.js";
143
143
  import {
144
144
  __export
145
145
  } from "./chunk-CZ7CSFO4.js";
@@ -233,7 +233,6 @@ var makeOwnershipAccounting = (origin, owner) => {
233
233
  const declared = inBackground ? "background" : declaredOwner(options.annotations);
234
234
  const boundary = {
235
235
  owner: declared ?? enclosingBoundary?.owner ?? owner,
236
- // Background work runs beside its caller, which stays innermost meanwhile.
237
236
  parent: declared === "background" ? void 0 : enclosingBoundary,
238
237
  open: true,
239
238
  children: 0
@@ -288,15 +287,10 @@ var makeOwnershipAccounting = (origin, owner) => {
288
287
  }
289
288
  });
290
289
  return {
291
- /** Run `effect` with the spans it opens observed, including spans it hands to later work. */
292
290
  observe: (effect2) => Effect_exports.gen(function* () {
293
291
  const tracer = yield* Tracer_exports.Tracer;
294
292
  return yield* effect2.pipe(Effect_exports.provideService(Tracer_exports.Tracer, observed(tracer)));
295
293
  }),
296
- /**
297
- * Close the window at `end` and return its milliseconds by owner, each instant counted once.
298
- * Spans still open count up to `end`; spans that open or end afterwards are ignored.
299
- */
300
294
  read: (end) => {
301
295
  if (!done) advance(end);
302
296
  done = true;
@@ -907,11 +901,7 @@ var CurrentTelemetryClient = Context_exports.Reference(
907
901
  var selectedClient = Layer_exports.unwrap(
908
902
  CurrentTelemetryClient.pipe(
909
903
  Effect_exports.map(
910
- (client) => (
911
- // Export-only RequestInit options, such as browser keepalive, must not
912
- // enter product clients that share the page's Layer memo map.
913
- client === void 0 ? Layer_exports.fresh(FetchHttpClient_exports.layer) : Layer_exports.succeed(HttpClient_exports.HttpClient, client)
914
- )
904
+ (client) => client === void 0 ? Layer_exports.fresh(FetchHttpClient_exports.layer) : Layer_exports.succeed(HttpClient_exports.HttpClient, client)
915
905
  )
916
906
  )
917
907
  );
@@ -1111,20 +1101,14 @@ var httpSpanAttributeAllowlist = /* @__PURE__ */ new Set([
1111
1101
  "http.response.status_code",
1112
1102
  "server.address",
1113
1103
  "url.scheme",
1114
- // Path only. `url.full` and `url.query` carry the query string, so neither is listed.
1115
- // Once a route is recorded, the path is that route's template (`allowlistedSpan`).
1116
1104
  "url.path",
1117
- // The router's matched path template, such as `/api/organizations/:organization`; no values.
1118
1105
  "http.route",
1119
1106
  "http.request.header.content-type",
1120
1107
  "http.request.header.content-length",
1121
1108
  "http.request.header.user-agent",
1122
1109
  "http.response.header.content-type",
1123
1110
  "http.response.header.content-length",
1124
- // The server tracer records the user agent a second time under its own name.
1125
1111
  "user_agent.original",
1126
- // The server tracer's remote address: the peer the host saw, or on Cloud the address
1127
- // Cloudflare saw (`cf-connecting-ip`, which Cloudflare overwrites on every incoming request).
1128
1112
  "client.address"
1129
1113
  ]);
1130
1114
  var spanAttributeAllowed = (key) => {
@@ -1167,9 +1151,6 @@ var allowlistedSpan = (span, ended) => {
1167
1151
  get kind() {
1168
1152
  return span.kind;
1169
1153
  },
1170
- // A successful transport can carry a failed domain operation. The producer
1171
- // explicitly marks that outcome; arbitrary result payloads are never inspected.
1172
- // A failure records the fixed message an error declares in place of an app's text.
1173
1154
  end: (endTime, exit) => {
1174
1155
  span.end(
1175
1156
  endTime,
@@ -2442,24 +2423,16 @@ var telemetryLayer = (config, lifetime = "process", logger = Logger_exports.with
2442
2423
  url: target.url,
2443
2424
  resource,
2444
2425
  ...target.headers === void 0 ? {} : { headers: Redacted_exports.value(target.headers) },
2445
- // An event exports when its scope closes. With no interval the exporter runs no loop, so a
2446
- // span or log recorded from another event never resumes a fiber of this one.
2447
2426
  exportInterval: lifetime === "event" ? Duration_exports.infinity : "1 second",
2448
2427
  shutdownTimeout: shutdownTimeouts[name] ?? "3 seconds"
2449
2428
  });
2450
2429
  const console = Logger_exports.layer([logger]);
2451
2430
  return Layer_exports.mergeAll(
2452
2431
  Layer_exports.succeed(CurrentTelemetryConfig, config),
2453
- config.traces === void 0 ? Layer_exports.empty : (
2454
- // Credentials travel in provider headers and query strings this product does
2455
- // not choose, so every exported span records only allowlisted HTTP attributes.
2456
- // Record every operation. Caller-supplied sampling is correlation metadata,
2457
- // not authority to suppress server diagnostics.
2458
- spanAttributes(config.clock, true).pipe(
2459
- Layer_exports.provideMerge(
2460
- OtlpTracer_exports.layer(signal(config.traces, "traces")).pipe(
2461
- Layer_exports.provide(OtlpSerialization_exports.layerJson)
2462
- )
2432
+ config.traces === void 0 ? Layer_exports.empty : spanAttributes(config.clock, true).pipe(
2433
+ Layer_exports.provideMerge(
2434
+ OtlpTracer_exports.layer(signal(config.traces, "traces")).pipe(
2435
+ Layer_exports.provide(OtlpSerialization_exports.layerJson)
2463
2436
  )
2464
2437
  )
2465
2438
  ),
@@ -2478,10 +2451,7 @@ var telemetryLayer = (config, lifetime = "process", logger = Logger_exports.with
2478
2451
  )
2479
2452
  ).pipe(
2480
2453
  Layer_exports.provide(telemetryHttpClient),
2481
- // Export fibers capture services during construction. Their failure evidence
2482
- // must reach the host logger even after the remote log exporter is closed.
2483
2454
  Layer_exports.provide(console),
2484
- // Each event exports only its own measurements; process hosts share a process registry.
2485
2455
  Layer_exports.provideMerge(Layer_exports.sync(Metric_exports.MetricRegistry, () => /* @__PURE__ */ new Map()))
2486
2456
  );
2487
2457
  };
@@ -2621,13 +2591,11 @@ var errorKinds = /* @__PURE__ */ new Set([
2621
2591
  "function"
2622
2592
  ]);
2623
2593
  var failureCodes = /* @__PURE__ */ new Set([
2624
- // CacheError
2625
2594
  "unavailable",
2626
2595
  "storage",
2627
2596
  "invalid",
2628
2597
  "capacity",
2629
2598
  "timeout",
2630
- // AppDatabaseError
2631
2599
  "schema",
2632
2600
  "schema_changed",
2633
2601
  "table",
@@ -2639,18 +2607,15 @@ var failureCodes = /* @__PURE__ */ new Set([
2639
2607
  "limit",
2640
2608
  "closed",
2641
2609
  "replay",
2642
- // OpenapiError
2643
2610
  "invalid_definition",
2644
2611
  "invalid_input",
2645
2612
  "request",
2646
- // McpError, McpCredentialsUnverified and ProviderError
2647
2613
  "unauthorized",
2648
2614
  "invalid_response",
2649
2615
  "forbidden",
2650
2616
  "rate_limited",
2651
2617
  "rejected",
2652
2618
  "anonymous_access",
2653
- // NetworkRefused and FetchOptionUnsupported
2654
2619
  "private_address",
2655
2620
  "credential_host",
2656
2621
  "credential_app",
@@ -2729,8 +2694,6 @@ var spanAttributes2 = {
2729
2694
  "http.request.method": oneOf(...httpMethods),
2730
2695
  "http.response.status_code": status,
2731
2696
  "url.scheme": oneOf("http", "https"),
2732
- // Effect 4.1 marks an interrupted span with `effect.fiber.interrupted`; apps built on an
2733
- // earlier Effect still send the label and `status.interrupted`.
2734
2697
  "effect.fiber.interrupted": flag,
2735
2698
  "span.label": oneOf("\u26A0\uFE0E Interrupted"),
2736
2699
  "status.interrupted": flag,
@@ -2903,11 +2866,7 @@ var TelemetryDrainScope = Context_exports.Reference(
2903
2866
  );
2904
2867
  var makeTelemetryForwarder = Effect_exports.flatMap(
2905
2868
  TelemetryDrainScope,
2906
- (scope) => scope === void 0 ? forwarder : (
2907
- // A scope of its own: its drain runs before its queue is interrupted, even when the host's
2908
- // scope closes its finalizers in parallel.
2909
- Effect_exports.flatMap(Scope_exports.fork(scope, "sequential"), (own) => Scope_exports.provide(forwarder, own))
2910
- )
2869
+ (scope) => scope === void 0 ? forwarder : Effect_exports.flatMap(Scope_exports.fork(scope, "sequential"), (own) => Scope_exports.provide(forwarder, own))
2911
2870
  );
2912
2871
  var queueBudget = 8 * 1048576;
2913
2872
  var exportBudget2 = 4 * 1048576;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  JsonValue,
3
3
  withLegacyKeys
4
- } from "./chunk-H2K7OZ47.js";
4
+ } from "./chunk-7A4ZSEM3.js";
5
5
  import {
6
6
  HttpApiEndpoint_exports,
7
7
  HttpApiGroup_exports,
8
8
  HttpApiSchema_exports,
9
9
  HttpApi_exports
10
- } from "./chunk-YVN2AMAU.js";
10
+ } from "./chunk-QLUWYCOT.js";
11
11
  import {
12
12
  Schema_exports
13
- } from "./chunk-YFSOSNF3.js";
13
+ } from "./chunk-NXEGROI6.js";
14
14
 
15
15
  // src/contracts/ui.ts
16
16
  var UiContextFields = Schema_exports.Struct({
@@ -164,7 +164,7 @@ import {
164
164
  void_2,
165
165
  whileLoop,
166
166
  zipRight
167
- } from "./chunk-YFSOSNF3.js";
167
+ } from "./chunk-NXEGROI6.js";
168
168
  import {
169
169
  __export
170
170
  } from "./chunk-CZ7CSFO4.js";
@@ -5,11 +5,11 @@ import {
5
5
  SkillDefinitionInvalid,
6
6
  SkillFile,
7
7
  SkillFilePath
8
- } from "./chunk-QTX7OUFH.js";
8
+ } from "./chunk-A6FRLRCN.js";
9
9
  import {
10
10
  Effect_exports,
11
11
  Schema_exports
12
- } from "./chunk-YFSOSNF3.js";
12
+ } from "./chunk-NXEGROI6.js";
13
13
 
14
14
  // src/implementation/skill-files.ts
15
15
  var skillFromFiles = (input, source = {}) => Effect_exports.gen(function* () {
package/js/client.js CHANGED
@@ -3,16 +3,16 @@ import {
3
3
  UiContext,
4
4
  UiFailed,
5
5
  UiVersionChanged
6
- } from "./chunk-OBT33ZDK.js";
6
+ } from "./chunk-TMYRAFMC.js";
7
7
  import {
8
8
  AsyncResult_exports,
9
9
  AtomRegistry_exports,
10
10
  Atom_exports,
11
11
  queryResult
12
- } from "./chunk-2XDCAXAR.js";
12
+ } from "./chunk-W6V5OIHB.js";
13
13
  import {
14
14
  decoderOf
15
- } from "./chunk-EKXBHVMR.js";
15
+ } from "./chunk-JLHRRTRH.js";
16
16
  import {
17
17
  OtlpExporter_exports,
18
18
  TraceContext,
@@ -20,20 +20,20 @@ import {
20
20
  pendingSpan,
21
21
  telemetryLayer,
22
22
  traceLinks
23
- } from "./chunk-JH3MOQZR.js";
23
+ } from "./chunk-T4MICYGT.js";
24
24
  import {
25
25
  FetchHttpClient_exports
26
- } from "./chunk-I6QAWNUM.js";
27
- import "./chunk-LSOHA2RH.js";
26
+ } from "./chunk-2OGVSUNI.js";
27
+ import "./chunk-6XBOKQ4E.js";
28
28
  import {
29
29
  JsonValue
30
- } from "./chunk-H2K7OZ47.js";
30
+ } from "./chunk-7A4ZSEM3.js";
31
31
  import {
32
32
  HttpApiClient_exports
33
- } from "./chunk-YVN2AMAU.js";
33
+ } from "./chunk-QLUWYCOT.js";
34
34
  import {
35
35
  HttpClientError_exports
36
- } from "./chunk-MB6L5YZE.js";
36
+ } from "./chunk-IWLFLMIL.js";
37
37
  import {
38
38
  Cause_exports,
39
39
  Clock_exports,
@@ -52,7 +52,7 @@ import {
52
52
  Semaphore_exports,
53
53
  Stream_exports,
54
54
  Tracer_exports
55
- } from "./chunk-YFSOSNF3.js";
55
+ } from "./chunk-NXEGROI6.js";
56
56
  import "./chunk-CZ7CSFO4.js";
57
57
 
58
58
  // src/contracts/live.ts
@@ -687,7 +687,6 @@ var browserTelemetryLayer = (settings) => Layer_exports.unwrap(
687
687
  navigation = current;
688
688
  run(
689
689
  Deferred_exports.await(current.done).pipe(
690
- // Record visibility however the navigation ends, including when a later one interrupts it.
691
690
  Effect_exports.ensuring(
692
691
  Effect_exports.suspend(
693
692
  () => Effect_exports.annotateCurrentSpan("executor.navigation.hidden", current.hidden)
@@ -770,7 +769,6 @@ var makeOptimisticClient = (transport) => {
770
769
  return structuredClone(next.get(keyOf(reference.name, json(input))));
771
770
  },
772
771
  getAllQueries: (reference) => [...entries].filter(([, entry]) => entry.name === reference.name).map(([key, entry]) => ({
773
- // SAFETY: input is validated JSON; the referenced operation and each query decoder bind these types.
774
772
  input: structuredClone(entry.input),
775
773
  value: structuredClone(next.get(key))
776
774
  })),
@@ -1163,8 +1161,6 @@ var createAppClient = () => {
1163
1161
  );
1164
1162
  })
1165
1163
  ).pipe(
1166
- // Keep the last snapshot while the watcher replaces the document.
1167
- // Unmount or client disposal interrupts the version-change wait.
1168
1164
  Stream_exports.catch(
1169
1165
  (error) => Schema_exports.is(UiVersionChanged)(error) ? Stream_exports.unwrap(versionChanged.pipe(Effect_exports.as(Stream_exports.never))) : Stream_exports.fail(error)
1170
1166
  ),
@@ -1189,7 +1185,6 @@ var createAppClient = () => {
1189
1185
  )
1190
1186
  )
1191
1187
  ),
1192
- // Shown outside the retried stream, so they do not reset its delay.
1193
1188
  Stream_exports.fromQueue(retrying),
1194
1189
  { haltStrategy: "left" }
1195
1190
  );
package/js/contracts.js CHANGED
@@ -2,6 +2,7 @@ import {
2
2
  AccountCheckCommand,
3
3
  AccountCheckResult,
4
4
  AccountInfo,
5
+ AfterReply,
5
6
  ApiErrorResponse,
6
7
  AppIcon,
7
8
  AppIcons,
@@ -186,7 +187,7 @@ import {
186
187
  skillsCommand,
187
188
  withoutHelp,
188
189
  workflowDurationMillis
189
- } from "./chunk-HMYAZUNZ.js";
190
+ } from "./chunk-EXL6F456.js";
190
191
  import {
191
192
  AppSkillMetadata,
192
193
  AppSkillName,
@@ -198,21 +199,22 @@ import {
198
199
  SkillServiceName,
199
200
  skillFormatLimits,
200
201
  skillLoadLimits
201
- } from "./chunk-QTX7OUFH.js";
202
- import "./chunk-LSOHA2RH.js";
202
+ } from "./chunk-A6FRLRCN.js";
203
+ import "./chunk-6XBOKQ4E.js";
203
204
  import {
204
205
  AccountId,
205
206
  HttpUrl
206
- } from "./chunk-H2K7OZ47.js";
207
- import "./chunk-YVN2AMAU.js";
208
- import "./chunk-MB6L5YZE.js";
209
- import "./chunk-YFSOSNF3.js";
207
+ } from "./chunk-7A4ZSEM3.js";
208
+ import "./chunk-QLUWYCOT.js";
209
+ import "./chunk-IWLFLMIL.js";
210
+ import "./chunk-NXEGROI6.js";
210
211
  import "./chunk-CZ7CSFO4.js";
211
212
  export {
212
213
  AccountCheckCommand,
213
214
  AccountCheckResult,
214
215
  AccountId,
215
216
  AccountInfo,
217
+ AfterReply,
216
218
  ApiErrorResponse,
217
219
  AppIcon,
218
220
  AppIcons,