apps 0.0.1-beta.44 → 0.0.1-beta.47

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 (55) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-DZQYE626.js → chunk-7UUHJR2Q.js} +1 -1
  3. package/js/{chunk-4ZTVLEN6.js → chunk-CDXQDN7W.js} +1 -1
  4. package/js/{chunk-V3RS2BK6.js → chunk-D45JTD6N.js} +39 -29
  5. package/js/chunk-GDYPM7RS.js +266 -0
  6. package/js/{chunk-CZGWW4NQ.js → chunk-JM7LOD2W.js} +187 -9
  7. package/js/{chunk-ELO5PRCO.js → chunk-JY56GVSV.js} +95 -4
  8. package/js/{chunk-EJUK2NK5.js → chunk-KLYSEHUD.js} +1 -1
  9. package/js/{chunk-EMHFXFTJ.js → chunk-LTDHQJ2Z.js} +53 -0
  10. package/js/{chunk-MZH4J2PO.js → chunk-PD6I2SDG.js} +1 -1
  11. package/js/{chunk-DRJRCHHO.js → chunk-PO5NPRFT.js} +204 -73
  12. package/js/{chunk-MGGMEGB2.js → chunk-QKHTRD6G.js} +2 -2
  13. package/js/{chunk-5SHUB37R.js → chunk-SVHI6AKV.js} +3 -3
  14. package/js/{chunk-KSGYJV46.js → chunk-TUMGL2OC.js} +1 -1
  15. package/js/{chunk-5GLC42LK.js → chunk-UM62MBJQ.js} +42 -24
  16. package/js/{chunk-OTGUPKKK.js → chunk-X5U5KIWQ.js} +12 -46
  17. package/js/{chunk-7EBODVQJ.js → chunk-YQD2MLFY.js} +14 -13
  18. package/js/client.js +8 -8
  19. package/js/contracts.js +25 -3
  20. package/js/effect.js +11 -11
  21. package/js/graphql.js +20 -18
  22. package/js/host.js +76 -51
  23. package/js/index.js +23 -16
  24. package/js/mcp/effect.js +13 -13
  25. package/js/mcp/stdio.js +27 -22
  26. package/js/mcp.js +20 -18
  27. package/js/openapi.js +103 -77
  28. package/js/skills/effect.js +2 -2
  29. package/js/skills.js +50 -33
  30. package/js/ui/auth.js +3 -3
  31. package/js/ui/contracts.js +3 -3
  32. package/js/ui/serving.js +6 -6
  33. package/package.json +1 -1
  34. package/runtime.json +1 -1
  35. package/types/apps/src/contracts/app.d.ts +2 -0
  36. package/types/apps/src/contracts/context.d.ts +8 -1
  37. package/types/apps/src/contracts/events.d.ts +93 -0
  38. package/types/apps/src/contracts/host.d.ts +21 -4
  39. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  40. package/types/apps/src/contracts/protocols/11.d.ts +1098 -0
  41. package/types/apps/src/host.d.ts +5 -0
  42. package/types/apps/src/implementation/authoring.d.ts +25 -5
  43. package/types/apps/src/implementation/cache.d.ts +4 -0
  44. package/types/apps/src/implementation/elicitation.d.ts +6 -3
  45. package/types/apps/src/implementation/events.d.ts +59 -0
  46. package/types/apps/src/implementation/invocation-timing.d.ts +16 -0
  47. package/types/apps/src/implementation/operations.d.ts +2 -2
  48. package/types/apps/src/implementation/router-catalog.d.ts +4 -4
  49. package/types/apps/src/implementation/sql.d.ts +5 -0
  50. package/types/apps/src/implementation/workflows.d.ts +1 -1
  51. package/types/apps/src/index.d.ts +2 -0
  52. package/types/telemetry/src/index.d.ts +1 -0
  53. package/types/telemetry/src/ownership.d.ts +56 -0
  54. package/js/chunk-646JVUH4.js +0 -156
  55. package/js/{chunk-LNSVJS2Q.js → chunk-EOPQ727L.js} +2 -2
@@ -1,3 +1,8 @@
1
+ import {
2
+ fromPromise,
3
+ method,
4
+ toPromise
5
+ } from "./chunk-LTDHQJ2Z.js";
1
6
  import {
2
7
  CacheError
3
8
  } from "./chunk-MWKHKOTL.js";
@@ -8,6 +13,7 @@ import {
8
13
  JsonObject
9
14
  } from "./chunk-H2CJWXA3.js";
10
15
  import {
16
+ Deferred_exports,
11
17
  Duration_exports,
12
18
  Effect_exports,
13
19
  Schema_exports
@@ -31,7 +37,6 @@ var Manifest = Schema_exports.Struct({
31
37
  summaries: Schema_exports.Int,
32
38
  header: Schema_exports.optionalKey(JsonObject)
33
39
  });
34
- var invoke = (work) => Effect_exports.tryPromise({ try: work, catch: (error) => error });
35
40
  var catalogCache = (options) => Effect_exports.gen(function* () {
36
41
  const cache = options.cache;
37
42
  const key = [...options.prefix, "current"];
@@ -48,14 +53,12 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
48
53
  const pages = (cache2, revision, kind, count, decoder) => Effect_exports.gen(function* () {
49
54
  const batches = yield* Effect_exports.forEach(
50
55
  Array.from({ length: Math.ceil(count / 4) }, (_, batch) => batch * 4),
51
- (offset) => invoke(
52
- () => cache2.readMany(
53
- Array.from(
54
- { length: Math.min(4, count - offset) },
55
- (_, index) => part(revision, kind, offset + index)
56
- ),
57
- schema(Schema_exports.Array(decoder))
58
- )
56
+ (offset) => fromPromise(method(cache2, "readMany"), "cache")(
57
+ Array.from(
58
+ { length: Math.min(4, count - offset) },
59
+ (_, index) => part(revision, kind, offset + index)
60
+ ),
61
+ schema(Schema_exports.Array(decoder))
59
62
  ),
60
63
  { concurrency: "unbounded" }
61
64
  );
@@ -66,7 +69,7 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
66
69
  }
67
70
  return values;
68
71
  });
69
- const kept = (cache2) => invoke(() => cache2.read(key, schema(Manifest))).pipe(
72
+ const kept = (cache2) => fromPromise(method(cache2, "read"), "cache")(key, schema(Manifest)).pipe(
70
73
  Effect_exports.map(
71
74
  (manifest) => manifest === void 0 ? void 0 : {
72
75
  header: manifest.header,
@@ -76,12 +79,13 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
76
79
  );
77
80
  const refresh = (context) => Effect_exports.gen(function* () {
78
81
  const { tools, header } = yield* options.load(context, kept(context.cache));
79
- const digest = yield* invoke(
80
- () => crypto.subtle.digest(
82
+ const digest = yield* Effect_exports.tryPromise({
83
+ try: () => crypto.subtle.digest(
81
84
  "SHA-256",
82
85
  new TextEncoder().encode(JSON.stringify({ tools, header: header ?? null }))
83
- )
84
- );
86
+ ),
87
+ catch: (error) => error
88
+ });
85
89
  const revision = Array.from(
86
90
  new Uint8Array(digest),
87
91
  (byte) => byte.toString(16).padStart(2, "0")
@@ -101,7 +105,7 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
101
105
  batch = [];
102
106
  batchBytes = 0;
103
107
  if (!entries.length) return Effect_exports.void;
104
- return invoke(() => context.cache.write(entries, retention)).pipe(
108
+ return fromPromise(method(context.cache, "write"), "cache")(entries, retention).pipe(
105
109
  Effect_exports.withSpan("app.cache.flush", {
106
110
  attributes: {
107
111
  "cache.flush.index": flushes++,
@@ -160,17 +164,30 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
160
164
  freshFor,
161
165
  staleFor,
162
166
  ...options.stale === void 0 ? {} : { stale: options.stale },
163
- load: (context) => Effect_exports.runPromise(refresh(context), { signal: context.signal })
167
+ // A cache may call the loader as a Promise; its own signal cancels that load.
168
+ load: toPromise(refresh, (context) => context.signal)
164
169
  };
165
170
  let reading;
166
- const current = () => cache === void 0 ? Effect_exports.fail(new CacheError({ reason: "unavailable" })) : invoke(
167
- () => reading ??= cache.get(getOptions).finally(() => {
168
- reading = void 0;
169
- })
170
- );
171
+ const current = () => Effect_exports.suspend(() => {
172
+ if (cache === void 0) return Effect_exports.fail(new CacheError({ reason: "unavailable" }));
173
+ const shared = reading;
174
+ if (shared !== void 0) return Deferred_exports.await(shared);
175
+ const deferred = Deferred_exports.makeUnsafe();
176
+ reading = deferred;
177
+ return fromPromise(
178
+ method(cache, "get"),
179
+ "cache"
180
+ )(getOptions).pipe(
181
+ Effect_exports.onExit(
182
+ (exit) => Effect_exports.sync(() => {
183
+ if (reading === deferred) reading = void 0;
184
+ }).pipe(Effect_exports.andThen(Deferred_exports.done(deferred, exit)))
185
+ )
186
+ );
187
+ });
171
188
  if (options.revalidate) {
172
189
  if (cache === void 0) yield* local;
173
- else yield* invoke(() => cache.revalidate(getOptions));
190
+ else yield* fromPromise(method(cache, "revalidate"), "cache")(getOptions);
174
191
  }
175
192
  const metadata = () => Effect_exports.gen(function* () {
176
193
  if (cache === void 0) return (yield* local).tools;
@@ -195,8 +212,9 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
195
212
  }),
196
213
  resolve: (name) => cache === void 0 ? local.pipe(Effect_exports.map(({ tools }) => tools.find((tool) => tool.name === name))) : current().pipe(
197
214
  Effect_exports.flatMap(
198
- (manifest) => invoke(
199
- () => cache.read(part(manifest.revision, "tool", name), schema(options.schema))
215
+ (manifest) => fromPromise(method(cache, "read"), "cache")(
216
+ part(manifest.revision, "tool", name),
217
+ schema(options.schema)
200
218
  )
201
219
  )
202
220
  )
@@ -1,9 +1,12 @@
1
+ import {
2
+ fromPromise
3
+ } from "./chunk-LTDHQJ2Z.js";
1
4
  import {
2
5
  HostedTool,
3
6
  RouterKey,
4
7
  RouterMeta,
5
8
  reservedRouterKeys
6
- } from "./chunk-ELO5PRCO.js";
9
+ } from "./chunk-JY56GVSV.js";
7
10
  import {
8
11
  decoderOf,
9
12
  schemaArgument
@@ -13,38 +16,6 @@ import {
13
16
  Schema_exports
14
17
  } from "./chunk-IFJU5SYQ.js";
15
18
 
16
- // src/implementation/authoring.ts
17
- var NativeCallback = /* @__PURE__ */ Symbol("apps.NativeCallback");
18
- var fromPromise = (callback) => (...args) => {
19
- if (NativeCallback in callback) {
20
- const native = callback[NativeCallback];
21
- return native(...args);
22
- }
23
- return Effect_exports.tryPromise({ try: () => callback(...args), catch: (error) => error });
24
- };
25
- var toPromise = (operation, signal) => {
26
- const native = (...args) => Effect_exports.suspend(() => {
27
- if (signal === void 0) return operation(...args);
28
- if (signal.aborted) return Effect_exports.interrupt;
29
- const cancelled = Effect_exports.callback((resume) => {
30
- if (signal.aborted) {
31
- resume(Effect_exports.interrupt);
32
- return;
33
- }
34
- const abort = () => resume(Effect_exports.interrupt);
35
- signal.addEventListener("abort", abort, { once: true });
36
- return Effect_exports.sync(() => signal.removeEventListener("abort", abort));
37
- });
38
- return Effect_exports.raceFirst(
39
- cancelled,
40
- Effect_exports.suspend(() => operation(...args))
41
- );
42
- });
43
- return Object.assign((...args) => Effect_exports.runPromise(native(...args)), {
44
- [NativeCallback]: native
45
- });
46
- };
47
-
48
19
  // src/implementation/operations.ts
49
20
  var NativeOperation = /* @__PURE__ */ Symbol("apps.Operation");
50
21
  var NativeRouterKey = /* @__PURE__ */ Symbol("apps.Router");
@@ -65,7 +36,7 @@ var operationOptions = (options) => {
65
36
  ...options._meta === void 0 ? {} : { _meta: options._meta },
66
37
  input: decoderOf(options.input),
67
38
  ...approval === void 0 ? {} : {
68
- approval: (context) => Effect_exports.tryPromise({ try: async () => approval(context), catch: (error) => error })
39
+ approval: (context) => fromPromise(async () => approval(context), "approval")()
69
40
  }
70
41
  };
71
42
  };
@@ -73,7 +44,7 @@ var approvedOperation = (operation, approval) => {
73
44
  const copy = Object.defineProperties({}, Object.getOwnPropertyDescriptors(operation));
74
45
  return Object.defineProperty(copy, "approval", {
75
46
  enumerable: true,
76
- value: (context) => Effect_exports.tryPromise({ try: async () => approval(context), catch: (error) => error })
47
+ value: (context) => fromPromise(async () => approval(context), "approval")()
77
48
  });
78
49
  };
79
50
  var withApproval = (operation, approval) => ({
@@ -86,12 +57,9 @@ var make = (kind, options, run) => operationDeclaration({
86
57
  kind,
87
58
  // The host always validates JSON serialization, even without a stronger output declaration.
88
59
  ...options.output === void 0 ? {} : { output: decoderOf(schemaArgument(options.output, `The ${kind} output`)) },
89
- run: (context, input) => Effect_exports.tryPromise({
90
- // SAFETY: defineApp checks the handler context against its requirements.
91
- // The host validates account bindings and creates the matching storage facade.
92
- try: () => run(context, input),
93
- catch: (error) => error
94
- })
60
+ // SAFETY: defineApp checks the handler context against its requirements.
61
+ // The host validates account bindings and creates the matching storage facade.
62
+ run: (context, input) => fromPromise(run, "handler")(context, input)
95
63
  });
96
64
  var query = (options, run) => make("query", options, run);
97
65
  var mutation = (options, run) => make("mutation", options, run);
@@ -139,14 +107,14 @@ var dynamicRouter = (source) => {
139
107
  return routerDeclaration({
140
108
  kind: "dynamic",
141
109
  ...meta === void 0 ? {} : {
142
- meta: () => fromPromise(async () => meta())().pipe(
110
+ meta: () => fromPromise(async () => meta(), "router")().pipe(
143
111
  Effect_exports.flatMap((options) => Schema_exports.decodeUnknownEffect(RouterMeta)(options))
144
112
  )
145
113
  },
146
- list: () => fromPromise(async () => source.list())().pipe(
114
+ list: () => fromPromise(async () => source.list(), "router")().pipe(
147
115
  Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(Schema_exports.Array(HostedTool)))
148
116
  ),
149
- resolve: (name) => fromPromise(async () => source.resolve(name))().pipe(
117
+ resolve: (name) => fromPromise(async () => source.resolve(name), "router")().pipe(
150
118
  Effect_exports.map((value) => {
151
119
  if (value === void 0) return void 0;
152
120
  const operation = nativeOperation(value);
@@ -235,8 +203,6 @@ var withApprovals = (source, policy) => {
235
203
  };
236
204
 
237
205
  export {
238
- fromPromise,
239
- toPromise,
240
206
  operationDeclaration,
241
207
  nativeOperation,
242
208
  withApproval,
@@ -3,16 +3,16 @@ import {
3
3
  answeredError,
4
4
  mcpClient,
5
5
  mcpJsonSchemaValidator
6
- } from "./chunk-V3RS2BK6.js";
6
+ } from "./chunk-D45JTD6N.js";
7
7
  import {
8
8
  failOnNetworkRefusal
9
- } from "./chunk-DZQYE626.js";
9
+ } from "./chunk-7UUHJR2Q.js";
10
10
  import {
11
11
  accountProviderError,
12
12
  bodyUpstreamError,
13
13
  httpProviderError,
14
14
  providerErrorDetail
15
- } from "./chunk-EMHFXFTJ.js";
15
+ } from "./chunk-LTDHQJ2Z.js";
16
16
  import {
17
17
  McpCredentialsUnverified,
18
18
  McpError,
@@ -20,21 +20,22 @@ import {
20
20
  McpToolsOptions,
21
21
  defaultMcpClientLimits,
22
22
  mcpHealthReserveMs
23
- } from "./chunk-ELO5PRCO.js";
23
+ } from "./chunk-JY56GVSV.js";
24
24
  import {
25
25
  NetworkRefused,
26
26
  ProviderError
27
27
  } from "./chunk-MWKHKOTL.js";
28
28
  import {
29
- captureTelemetry
30
- } from "./chunk-CZGWW4NQ.js";
29
+ captureTelemetry,
30
+ owned
31
+ } from "./chunk-JM7LOD2W.js";
31
32
  import {
32
33
  FetchHttpClient_exports
33
- } from "./chunk-MZH4J2PO.js";
34
+ } from "./chunk-PD6I2SDG.js";
34
35
  import {
35
36
  HttpClientRequest_exports,
36
37
  HttpClient_exports
37
- } from "./chunk-LNSVJS2Q.js";
38
+ } from "./chunk-EOPQ727L.js";
38
39
  import {
39
40
  Clock_exports,
40
41
  Deferred_exports,
@@ -236,7 +237,7 @@ function withClient(connection, mode, use, changed) {
236
237
  Effect_exports.timeout(defaultMcpClientLimits.cleanupTimeoutMs),
237
238
  Effect_exports.ignore
238
239
  );
239
- }).pipe(Effect_exports.withSpan("provider.mcp.close"))
240
+ }).pipe(owned("upstream", "provider.mcp.close"))
240
241
  );
241
242
  const wire = transport;
242
243
  yield* Effect_exports.tryPromise({
@@ -246,7 +247,7 @@ function withClient(connection, mode, use, changed) {
246
247
  Effect_exports.raceFirst(Deferred_exports.await(rejected)),
247
248
  Effect_exports.catch(explained("connect", answered)),
248
249
  Effect_exports.timeout(connection.timeoutMs),
249
- Effect_exports.withSpan("provider.mcp.connect")
250
+ owned("upstream", "provider.mcp.connect")
250
251
  );
251
252
  return yield* use(client).pipe(
252
253
  Effect_exports.raceFirst(Deferred_exports.await(rejected)),
@@ -254,7 +255,7 @@ function withClient(connection, mode, use, changed) {
254
255
  );
255
256
  })
256
257
  ).pipe(
257
- Effect_exports.withSpan("provider.mcp.session", {
258
+ owned("upstream", "provider.mcp.session", {
258
259
  attributes: {
259
260
  "mcp.transport": kind,
260
261
  "mcp.operation": mode,
@@ -327,9 +328,9 @@ var mcpHealthEffect = (check, options) => Effect_exports.gen(function* () {
327
328
  // Executor's network refused the attempt, so the server never answered it.
328
329
  onFailure: (error) => Schema_exports.is(NetworkRefused)(error) ? Effect_exports.fail(error) : refusesCredentials(error) ? Effect_exports.void : Effect_exports.fail(new McpCredentialsUnverified({ anonymous: error }))
329
330
  }),
330
- Effect_exports.withSpan("provider.mcp.anonymous")
331
+ owned("upstream", "provider.mcp.anonymous")
331
332
  );
332
- }).pipe(Effect_exports.withSpan("provider.mcp.health"));
333
+ }).pipe(owned("upstream", "provider.mcp.health"));
333
334
  var mcpToolsEffect = (input) => mcpClientEffect(input).pipe(Effect_exports.flatMap(adaptMcpTools));
334
335
 
335
336
  export {
package/js/client.js CHANGED
@@ -3,36 +3,36 @@ import {
3
3
  UiContext,
4
4
  UiDeploymentChanged,
5
5
  UiFailed
6
- } from "./chunk-4ZTVLEN6.js";
6
+ } from "./chunk-CDXQDN7W.js";
7
7
  import {
8
8
  AsyncResult_exports,
9
9
  AtomRegistry_exports,
10
10
  Atom_exports,
11
11
  queryResult
12
12
  } from "./chunk-74YVXBKY.js";
13
+ import {
14
+ decoderOf
15
+ } from "./chunk-KGCTYL2S.js";
13
16
  import {
14
17
  OtlpExporter_exports,
15
18
  externalTrace,
16
19
  pendingSpan,
17
20
  telemetryLayer,
18
21
  traceLinks
19
- } from "./chunk-CZGWW4NQ.js";
22
+ } from "./chunk-JM7LOD2W.js";
20
23
  import {
21
24
  FetchHttpClient_exports
22
- } from "./chunk-MZH4J2PO.js";
23
- import {
24
- decoderOf
25
- } from "./chunk-KGCTYL2S.js";
25
+ } from "./chunk-PD6I2SDG.js";
26
26
  import "./chunk-5FHWNLCI.js";
27
27
  import {
28
28
  JsonValue
29
29
  } from "./chunk-H2CJWXA3.js";
30
30
  import {
31
31
  HttpApiClient_exports
32
- } from "./chunk-KSGYJV46.js";
32
+ } from "./chunk-TUMGL2OC.js";
33
33
  import {
34
34
  HttpClientError_exports
35
- } from "./chunk-LNSVJS2Q.js";
35
+ } from "./chunk-EOPQ727L.js";
36
36
  import {
37
37
  Cause_exports,
38
38
  Clock_exports,
package/js/contracts.js CHANGED
@@ -10,12 +10,19 @@ import {
10
10
  DatabaseFieldReserved,
11
11
  DatabaseLimitExceeded,
12
12
  DeclaredAuthMethod,
13
+ DeclaredEvent,
14
+ DeclaredEvents,
13
15
  DeclaredProvider,
14
16
  DeclaredRequirements,
15
17
  ElicitationFailed,
16
18
  ElicitationLimits,
17
19
  ElicitationReply,
18
20
  ElicitationResponse,
21
+ EmittedEvent,
22
+ EmittedEvents,
23
+ EventFilterValue,
24
+ EventLimits,
25
+ EventName,
19
26
  FormElicitation,
20
27
  HostAccountCheckError,
21
28
  HostAccountsInvalid,
@@ -50,6 +57,8 @@ import {
50
57
  InputProblem,
51
58
  Interval,
52
59
  InvocationDeadline,
60
+ InvocationTiming,
61
+ InvocationTimingSink,
53
62
  ManualWebhookDescriptor,
54
63
  ManualWebhookSetup,
55
64
  McpClientLimits,
@@ -95,6 +104,7 @@ import {
95
104
  WorkflowValue,
96
105
  approvalElicitation,
97
106
  defaultElicitationLimits,
107
+ defaultEventLimits,
98
108
  defaultMcpClientLimits,
99
109
  defaultWebhookTransportLimits,
100
110
  frameworkProtocol,
@@ -106,6 +116,7 @@ import {
106
116
  minimumIntervalMilliseconds,
107
117
  protocol1,
108
118
  protocol10,
119
+ protocol11,
109
120
  protocol2,
110
121
  protocol3,
111
122
  protocol4,
@@ -118,7 +129,7 @@ import {
118
129
  skillCatalog,
119
130
  skillsCommand,
120
131
  workflowDurationMillis
121
- } from "./chunk-ELO5PRCO.js";
132
+ } from "./chunk-JY56GVSV.js";
122
133
  import {
123
134
  FailureCode,
124
135
  FailureDetail,
@@ -159,8 +170,8 @@ import {
159
170
  AccountId,
160
171
  HttpUrl
161
172
  } from "./chunk-H2CJWXA3.js";
162
- import "./chunk-KSGYJV46.js";
163
- import "./chunk-LNSVJS2Q.js";
173
+ import "./chunk-TUMGL2OC.js";
174
+ import "./chunk-EOPQ727L.js";
164
175
  import "./chunk-IFJU5SYQ.js";
165
176
  import "./chunk-CZ7CSFO4.js";
166
177
  export {
@@ -180,12 +191,19 @@ export {
180
191
  DatabaseFieldReserved,
181
192
  DatabaseLimitExceeded,
182
193
  DeclaredAuthMethod,
194
+ DeclaredEvent,
195
+ DeclaredEvents,
183
196
  DeclaredProvider,
184
197
  DeclaredRequirements,
185
198
  ElicitationFailed,
186
199
  ElicitationLimits,
187
200
  ElicitationReply,
188
201
  ElicitationResponse,
202
+ EmittedEvent,
203
+ EmittedEvents,
204
+ EventFilterValue,
205
+ EventLimits,
206
+ EventName,
189
207
  FailureCode,
190
208
  FailureDetail,
191
209
  FailureFieldName,
@@ -231,6 +249,8 @@ export {
231
249
  InputProblem,
232
250
  Interval,
233
251
  InvocationDeadline,
252
+ InvocationTiming,
253
+ InvocationTimingSink,
234
254
  ManualWebhookDescriptor,
235
255
  ManualWebhookSetup,
236
256
  McpClientLimits,
@@ -284,6 +304,7 @@ export {
284
304
  WorkflowValue,
285
305
  approvalElicitation,
286
306
  defaultElicitationLimits,
307
+ defaultEventLimits,
287
308
  defaultMcpClientLimits,
288
309
  defaultWebhookTransportLimits,
289
310
  frameworkProtocol,
@@ -302,6 +323,7 @@ export {
302
323
  networkRefusalStatus,
303
324
  protocol1,
304
325
  protocol10,
326
+ protocol11,
305
327
  protocol2,
306
328
  protocol3,
307
329
  protocol4,
package/js/effect.js CHANGED
@@ -3,35 +3,35 @@ import {
3
3
  ApprovalDecision,
4
4
  createAppHandler,
5
5
  prepareElicitation
6
- } from "./chunk-DRJRCHHO.js";
6
+ } from "./chunk-PO5NPRFT.js";
7
7
  import "./chunk-AQU56EPI.js";
8
- import "./chunk-5SHUB37R.js";
9
- import "./chunk-DZQYE626.js";
8
+ import "./chunk-SVHI6AKV.js";
9
+ import "./chunk-7UUHJR2Q.js";
10
10
  import "./chunk-XBG7HHXC.js";
11
- import "./chunk-646JVUH4.js";
12
- import "./chunk-OTGUPKKK.js";
13
- import "./chunk-EMHFXFTJ.js";
11
+ import "./chunk-GDYPM7RS.js";
12
+ import "./chunk-X5U5KIWQ.js";
13
+ import "./chunk-LTDHQJ2Z.js";
14
14
  import {
15
15
  ToolAnnotations
16
- } from "./chunk-ELO5PRCO.js";
16
+ } from "./chunk-JY56GVSV.js";
17
17
  import "./chunk-MWKHKOTL.js";
18
18
  import "./chunk-H72MEDMN.js";
19
- import "./chunk-CZGWW4NQ.js";
20
- import "./chunk-MZH4J2PO.js";
21
19
  import {
22
20
  compileJsonSchemaDecoder,
23
21
  decoderOf,
24
22
  jsonSchemaDecoder,
25
23
  wrap
26
24
  } from "./chunk-KGCTYL2S.js";
25
+ import "./chunk-JM7LOD2W.js";
26
+ import "./chunk-PD6I2SDG.js";
27
27
  import "./chunk-5FHWNLCI.js";
28
28
  import {
29
29
  HttpUrl,
30
30
  JsonObject,
31
31
  ValidationError
32
32
  } from "./chunk-H2CJWXA3.js";
33
- import "./chunk-KSGYJV46.js";
34
- import "./chunk-LNSVJS2Q.js";
33
+ import "./chunk-TUMGL2OC.js";
34
+ import "./chunk-EOPQ727L.js";
35
35
  import "./chunk-IFJU5SYQ.js";
36
36
  import "./chunk-CZ7CSFO4.js";
37
37
  export {
package/js/graphql.js CHANGED
@@ -1,54 +1,56 @@
1
1
  import {
2
2
  catalogCache,
3
3
  catalogScope
4
- } from "./chunk-5GLC42LK.js";
4
+ } from "./chunk-UM62MBJQ.js";
5
5
  import {
6
6
  protocolOperations
7
- } from "./chunk-MGGMEGB2.js";
7
+ } from "./chunk-QKHTRD6G.js";
8
8
  import "./chunk-BCSNKUAC.js";
9
- import "./chunk-DRJRCHHO.js";
9
+ import "./chunk-PO5NPRFT.js";
10
10
  import {
11
11
  cacheKey
12
12
  } from "./chunk-AQU56EPI.js";
13
- import "./chunk-5SHUB37R.js";
13
+ import "./chunk-SVHI6AKV.js";
14
14
  import {
15
15
  failOnNetworkRefusal
16
- } from "./chunk-DZQYE626.js";
16
+ } from "./chunk-7UUHJR2Q.js";
17
17
  import "./chunk-XBG7HHXC.js";
18
- import "./chunk-646JVUH4.js";
18
+ import "./chunk-GDYPM7RS.js";
19
19
  import {
20
20
  nativeOperation,
21
21
  routerDeclaration
22
- } from "./chunk-OTGUPKKK.js";
22
+ } from "./chunk-X5U5KIWQ.js";
23
23
  import {
24
24
  accountProviderError,
25
25
  graphqlProviderError,
26
26
  httpProviderError
27
- } from "./chunk-EMHFXFTJ.js";
28
- import "./chunk-ELO5PRCO.js";
27
+ } from "./chunk-LTDHQJ2Z.js";
28
+ import "./chunk-JY56GVSV.js";
29
29
  import {
30
30
  NetworkRefused,
31
31
  ProviderError
32
32
  } from "./chunk-MWKHKOTL.js";
33
33
  import "./chunk-H72MEDMN.js";
34
- import "./chunk-CZGWW4NQ.js";
35
- import {
36
- FetchHttpClient_exports
37
- } from "./chunk-MZH4J2PO.js";
38
34
  import {
39
35
  jsonSchemaDecoder
40
36
  } from "./chunk-KGCTYL2S.js";
37
+ import {
38
+ owned
39
+ } from "./chunk-JM7LOD2W.js";
40
+ import {
41
+ FetchHttpClient_exports
42
+ } from "./chunk-PD6I2SDG.js";
41
43
  import "./chunk-5FHWNLCI.js";
42
44
  import {
43
45
  AccountId,
44
46
  HttpUrl,
45
47
  JsonObject
46
48
  } from "./chunk-H2CJWXA3.js";
47
- import "./chunk-KSGYJV46.js";
49
+ import "./chunk-TUMGL2OC.js";
48
50
  import {
49
51
  HttpClientRequest_exports,
50
52
  HttpClient_exports
51
- } from "./chunk-LNSVJS2Q.js";
53
+ } from "./chunk-EOPQ727L.js";
52
54
  import {
53
55
  Effect_exports,
54
56
  Redacted_exports,
@@ -276,7 +278,7 @@ var graphqlClientEffect = (input) => Effect_exports.gen(function* () {
276
278
  if (response.status < 200 || response.status >= 300)
277
279
  return yield* httpProviderError(response.status, response.headers) ?? new GraphqlError({ phase, reason: "request", status: response.status });
278
280
  const result = yield* response.json.pipe(
279
- Effect_exports.withSpan("provider.http.response.read"),
281
+ owned("upstream", "provider.http.response.read"),
280
282
  Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(GraphqlResponse)),
281
283
  Effect_exports.mapError(() => new GraphqlError({ phase, reason: "invalid_response" }))
282
284
  );
@@ -287,7 +289,7 @@ var graphqlClientEffect = (input) => Effect_exports.gen(function* () {
287
289
  return result.data;
288
290
  })
289
291
  ).pipe(
290
- Effect_exports.withSpan("provider.graphql.request", {
292
+ owned("upstream", "provider.graphql.request", {
291
293
  attributes: {
292
294
  "executor.operation": phase,
293
295
  "server.address": url.hostname
@@ -416,7 +418,7 @@ var adaptGraphqlTool = (client, definition) => Effect_exports.gen(function* () {
416
418
  return yield* new GraphqlError({ phase: "call", reason: "invalid_response" });
417
419
  return value;
418
420
  }).pipe(
419
- Effect_exports.withSpan("provider.graphql.call", {
421
+ owned("upstream", "provider.graphql.call", {
420
422
  attributes: {
421
423
  "graphql.operation.type": kind,
422
424
  "executor.tool.name": name