experimental-ash 0.24.2 → 0.25.0

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 (251) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/docs/public/typescript-api.md +0 -12
  3. package/dist/src/channel/adapter.d.ts +5 -18
  4. package/dist/src/channel/adapter.js +2 -8
  5. package/dist/src/channel/cross-channel-receive.d.ts +10 -1
  6. package/dist/src/channel/cross-channel-receive.js +21 -3
  7. package/dist/src/channel/routes.d.ts +2 -1
  8. package/dist/src/channel/routes.js +6 -3
  9. package/dist/src/channel/schedule.js +2 -2
  10. package/dist/src/channel/types.d.ts +1 -1
  11. package/dist/src/chunks/{client-DLHAGI2g.js → client-BShLWzR6.js} +3 -3
  12. package/dist/src/chunks/compile-agent-75wLLW-E.js +5 -0
  13. package/dist/src/chunks/dev-authored-source-watcher-DqoJsDup.js +1 -0
  14. package/dist/src/chunks/host-JVy7fewA.js +70 -0
  15. package/dist/src/chunks/paths-DNjq5JOy.js +85 -0
  16. package/dist/src/chunks/{token-D98SQdvs.js → token-BOkIxJeV.js} +1 -1
  17. package/dist/src/chunks/types-CjIyrcYo.js +1 -0
  18. package/dist/src/cli/commands/info.js +1 -1
  19. package/dist/src/cli/dev/environment.d.ts +0 -5
  20. package/dist/src/cli/dev/environment.js +1 -1
  21. package/dist/src/cli/dev/repl.d.ts +1 -1
  22. package/dist/src/cli/dev/repl.js +3 -3
  23. package/dist/src/cli/run.d.ts +0 -1
  24. package/dist/src/cli/run.js +2 -2
  25. package/dist/src/client/message-reducer.js +13 -25
  26. package/dist/src/client/message-response.d.ts +2 -1
  27. package/dist/src/client/open-stream.d.ts +3 -3
  28. package/dist/src/client/open-stream.js +1 -2
  29. package/dist/src/client/session.d.ts +2 -1
  30. package/dist/src/client/session.js +0 -3
  31. package/dist/src/client/types.d.ts +3 -2
  32. package/dist/src/compiler/artifacts.d.ts +7 -10
  33. package/dist/src/compiler/artifacts.js +3 -3
  34. package/dist/src/compiler/manifest.d.ts +6 -15
  35. package/dist/src/compiler/manifest.js +3 -3
  36. package/dist/src/compiler/normalize-agent-config.js +12 -10
  37. package/dist/src/compiler/normalize-manifest.js +3 -2
  38. package/dist/src/context/container.d.ts +1 -16
  39. package/dist/src/context/container.js +1 -24
  40. package/dist/src/context/hook-lifecycle.d.ts +2 -7
  41. package/dist/src/context/hook-lifecycle.js +0 -6
  42. package/dist/src/context/provider.d.ts +1 -11
  43. package/dist/src/context/providers/sandbox.js +4 -1
  44. package/dist/src/context/run-step.d.ts +2 -4
  45. package/dist/src/context/run-step.js +4 -17
  46. package/dist/src/context/seed-keys.d.ts +1 -1
  47. package/dist/src/discover/connections.d.ts +2 -1
  48. package/dist/src/discover/diagnostics.d.ts +0 -8
  49. package/dist/src/discover/diagnostics.js +4 -16
  50. package/dist/src/discover/discover-agent.d.ts +3 -13
  51. package/dist/src/discover/discover-agent.js +1 -11
  52. package/dist/src/discover/discover-subagent.d.ts +3 -2
  53. package/dist/src/discover/discover-subagent.js +1 -1
  54. package/dist/src/discover/filesystem.d.ts +0 -37
  55. package/dist/src/discover/filesystem.js +0 -115
  56. package/dist/src/discover/grammar.d.ts +10 -20
  57. package/dist/src/discover/grammar.js +11 -33
  58. package/dist/src/discover/lib.d.ts +3 -2
  59. package/dist/src/discover/manifest.d.ts +3 -3
  60. package/dist/src/discover/markdown.d.ts +2 -1
  61. package/dist/src/discover/sandbox.d.ts +2 -1
  62. package/dist/src/discover/schedules.d.ts +3 -2
  63. package/dist/src/discover/schedules.js +1 -1
  64. package/dist/src/discover/skills.d.ts +3 -2
  65. package/dist/src/discover/skills.js +1 -1
  66. package/dist/src/discover/slots.d.ts +3 -2
  67. package/dist/src/evals/cli/eval.d.ts +0 -6
  68. package/dist/src/evals/cli/eval.js +1 -1
  69. package/dist/src/evals/loaders/index.d.ts +2 -22
  70. package/dist/src/evals/loaders/index.js +1 -1
  71. package/dist/src/evals/reporters/index.d.ts +2 -14
  72. package/dist/src/evals/reporters/index.js +1 -1
  73. package/dist/src/evals/runner/discover.d.ts +0 -6
  74. package/dist/src/evals/runner/discover.js +1 -1
  75. package/dist/src/evals/runner/execute-case.d.ts +2 -1
  76. package/dist/src/evals/runner/execute-suite.d.ts +2 -1
  77. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  78. package/dist/src/evals/runner/resolve-git-metadata.d.ts +3 -3
  79. package/dist/src/evals/scorers/autoevals-client.d.ts +2 -2
  80. package/dist/src/execution/connection-auth-steps.d.ts +1 -5
  81. package/dist/src/execution/connection-auth-steps.js +4 -5
  82. package/dist/src/execution/node-step.d.ts +1 -1
  83. package/dist/src/execution/skills/instructions.d.ts +2 -1
  84. package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
  85. package/dist/src/execution/subagent-tool.d.ts +0 -8
  86. package/dist/src/execution/subagent-tool.js +9 -16
  87. package/dist/src/execution/tool-compaction.js +0 -2
  88. package/dist/src/execution/turn-workflow.d.ts +1 -1
  89. package/dist/src/execution/turn-workflow.js +2 -2
  90. package/dist/src/execution/web-fetch/tool.js +1 -1
  91. package/dist/src/execution/workflow-steps.d.ts +17 -1
  92. package/dist/src/execution/workflow-steps.js +5 -6
  93. package/dist/src/harness/action-result-helpers.d.ts +0 -12
  94. package/dist/src/harness/action-result-helpers.js +1 -1
  95. package/dist/src/harness/emission.d.ts +2 -2
  96. package/dist/src/harness/execute-tool.d.ts +2 -1
  97. package/dist/src/harness/input-requests.d.ts +2 -1
  98. package/dist/src/harness/prompt-cache.d.ts +1 -9
  99. package/dist/src/harness/prompt-cache.js +0 -12
  100. package/dist/src/harness/runtime-actions.d.ts +2 -11
  101. package/dist/src/harness/runtime-actions.js +1 -1
  102. package/dist/src/harness/step-hooks.d.ts +3 -2
  103. package/dist/src/harness/step-hooks.js +3 -7
  104. package/dist/src/harness/tool-loop.js +0 -2
  105. package/dist/src/harness/types.d.ts +1 -1
  106. package/dist/src/internal/application/package.js +2 -2
  107. package/dist/src/internal/application/runtime-compiled-artifacts-source.js +0 -1
  108. package/dist/src/internal/attachments/errors.d.ts +8 -2
  109. package/dist/src/internal/attachments/url-refs.d.ts +0 -1
  110. package/dist/src/internal/attachments/url-refs.js +1 -1
  111. package/dist/src/internal/authored-definition/channel.d.ts +0 -5
  112. package/dist/src/internal/authored-definition/channel.js +1 -10
  113. package/dist/src/internal/authored-definition/sandbox.d.ts +2 -1
  114. package/dist/src/internal/authored-definition/schema-backed.d.ts +3 -2
  115. package/dist/src/internal/authored-module-loader.d.ts +0 -6
  116. package/dist/src/internal/authored-module-loader.js +0 -9
  117. package/dist/src/internal/authored-module.d.ts +0 -4
  118. package/dist/src/internal/authored-module.js +0 -10
  119. package/dist/src/internal/bundler/nitro-rolldown.d.ts +2 -10
  120. package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
  121. package/dist/src/{public → internal}/helpers/markdown.d.ts +2 -23
  122. package/dist/src/{public → internal}/helpers/markdown.js +1 -1
  123. package/dist/src/internal/logging.d.ts +2 -8
  124. package/dist/src/internal/nitro/host/build-vercel-agent-summary.d.ts +1 -1
  125. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  126. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  127. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +2 -2
  128. package/dist/src/internal/nitro/routes/channel-dispatch.js +2 -2
  129. package/dist/src/internal/nitro/routes/runtime-artifacts.js +0 -1
  130. package/dist/src/internal/node-esm-compat-banner.d.ts +1 -1
  131. package/dist/src/internal/runtime-registry.d.ts +2 -1
  132. package/dist/src/{protocol → internal}/vercel-agent-summary.d.ts +1 -1
  133. package/dist/src/protocol/message.d.ts +0 -34
  134. package/dist/src/protocol/message.js +0 -30
  135. package/dist/src/public/channels/index.d.ts +1 -1
  136. package/dist/src/public/channels/index.js +1 -1
  137. package/dist/src/public/channels/slack/api.d.ts +1 -7
  138. package/dist/src/public/channels/slack/api.js +1 -1
  139. package/dist/src/public/channels/slack/connections.d.ts +2 -6
  140. package/dist/src/public/channels/slack/hitl.d.ts +3 -2
  141. package/dist/src/public/channels/slack/inbound.d.ts +0 -35
  142. package/dist/src/public/definitions/channel.d.ts +2 -2
  143. package/dist/src/public/definitions/channel.js +1 -1
  144. package/dist/src/public/definitions/defineChannel.d.ts +1 -1
  145. package/dist/src/public/definitions/defineChannel.js +1 -1
  146. package/dist/src/public/definitions/instructions.d.ts +0 -11
  147. package/dist/src/public/definitions/instructions.js +0 -5
  148. package/dist/src/public/definitions/tool.d.ts +3 -7
  149. package/dist/src/public/definitions/tool.js +1 -1
  150. package/dist/src/public/instructions/index.d.ts +1 -5
  151. package/dist/src/public/instructions/index.js +1 -3
  152. package/dist/src/public/tool-result-narrowing.d.ts +2 -1
  153. package/dist/src/react/use-ash-agent.d.ts +2 -1
  154. package/dist/src/react/use-ash-agent.js +1 -5
  155. package/dist/src/runtime/actions/types.d.ts +8 -50
  156. package/dist/src/runtime/actions/types.js +5 -21
  157. package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +2 -1
  158. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  159. package/dist/src/runtime/channels/registry.js +3 -8
  160. package/dist/src/runtime/compiled-artifacts-source.d.ts +4 -11
  161. package/dist/src/runtime/compiled-artifacts-source.js +3 -7
  162. package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -14
  163. package/dist/src/runtime/connections/authorization-tokens.js +2 -28
  164. package/dist/src/runtime/connections/principal-context.d.ts +3 -2
  165. package/dist/src/runtime/connections/validate-authorization.d.ts +0 -11
  166. package/dist/src/runtime/connections/validate-authorization.js +0 -16
  167. package/dist/src/runtime/framework-channels/index.d.ts +0 -1
  168. package/dist/src/runtime/framework-channels/index.js +1 -1
  169. package/dist/src/runtime/framework-tools/index.d.ts +2 -1
  170. package/dist/src/runtime/framework-tools/index.js +2 -1
  171. package/dist/src/runtime/framework-tools/skill.d.ts +0 -13
  172. package/dist/src/runtime/framework-tools/skill.js +1 -1
  173. package/dist/src/runtime/governance/auth/token-claims.d.ts +1 -16
  174. package/dist/src/runtime/governance/auth/token-claims.js +3 -3
  175. package/dist/src/runtime/governance/auth/types.d.ts +0 -4
  176. package/dist/src/runtime/governance/network/ip-allow-list.d.ts +0 -17
  177. package/dist/src/runtime/governance/network/ip-allow-list.js +0 -39
  178. package/dist/src/runtime/hooks/registry.d.ts +7 -4
  179. package/dist/src/runtime/hooks/registry.js +4 -2
  180. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -5
  181. package/dist/src/runtime/loaders/bundled-artifacts.js +0 -7
  182. package/dist/src/runtime/loaders/compile-metadata.d.ts +3 -10
  183. package/dist/src/runtime/loaders/compile-metadata.js +6 -8
  184. package/dist/src/runtime/loaders/manifest.d.ts +2 -2
  185. package/dist/src/runtime/loaders/manifest.js +4 -5
  186. package/dist/src/runtime/loaders/module-map.d.ts +2 -2
  187. package/dist/src/runtime/loaders/module-map.js +3 -4
  188. package/dist/src/runtime/prompt/compose.d.ts +2 -1
  189. package/dist/src/runtime/resolve-agent-graph.d.ts +2 -15
  190. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  191. package/dist/src/runtime/sandbox/keys.d.ts +2 -1
  192. package/dist/src/runtime/sandbox/registry.d.ts +3 -3
  193. package/dist/src/runtime/schedules/resolve-schedule.d.ts +3 -12
  194. package/dist/src/runtime/schedules/resolve-schedule.js +1 -1
  195. package/dist/src/runtime/sessions/auth.d.ts +2 -13
  196. package/dist/src/runtime/sessions/auth.js +1 -11
  197. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  198. package/dist/src/runtime/sessions/runtime-session.d.ts +0 -6
  199. package/dist/src/runtime/sessions/runtime-session.js +0 -13
  200. package/dist/src/runtime/sessions/turn.d.ts +2 -2
  201. package/dist/src/runtime/subagents/registry.d.ts +2 -5
  202. package/dist/src/runtime/subagents/registry.js +0 -6
  203. package/dist/src/runtime/tools/registry.d.ts +2 -1
  204. package/dist/src/runtime/tools/registry.js +1 -4
  205. package/dist/src/runtime/types.d.ts +4 -3
  206. package/dist/src/runtime/workspace/seed-files.d.ts +2 -1
  207. package/dist/src/services/dev-client/request-headers.d.ts +37 -8
  208. package/dist/src/services/dev-client/request-headers.js +71 -46
  209. package/dist/src/services/dev-client/stream.d.ts +0 -19
  210. package/dist/src/services/dev-client/stream.js +0 -37
  211. package/dist/src/services/dev-client/url.d.ts +3 -7
  212. package/dist/src/services/dev-client/url.js +4 -10
  213. package/dist/src/services/dev-client.d.ts +0 -12
  214. package/dist/src/services/dev-client.js +6 -92
  215. package/dist/src/shared/agent-definition.d.ts +1 -1
  216. package/dist/src/shared/json.d.ts +0 -4
  217. package/dist/src/shared/json.js +0 -38
  218. package/dist/src/shared/skill-definition.d.ts +0 -2
  219. package/package.json +1 -6
  220. package/dist/src/chunks/dev-authored-source-watcher-CBID_Dwh.js +0 -1
  221. package/dist/src/chunks/host-zBy9FyyX.js +0 -70
  222. package/dist/src/chunks/package-HUaeub_D.js +0 -1
  223. package/dist/src/chunks/paths-CebY5GCi.js +0 -89
  224. package/dist/src/chunks/types-DDA2QUED.js +0 -1
  225. package/dist/src/compiler/resource-files.d.ts +0 -19
  226. package/dist/src/compiler/resource-files.js +0 -28
  227. package/dist/src/execution/subagent-invocation.d.ts +0 -19
  228. package/dist/src/execution/subagent-invocation.js +0 -17
  229. package/dist/src/execution/task-mode.d.ts +0 -9
  230. package/dist/src/execution/task-mode.js +0 -12
  231. package/dist/src/execution/types.d.ts +0 -20
  232. package/dist/src/execution/types.js +0 -1
  233. package/dist/src/internal/logical-paths.d.ts +0 -13
  234. package/dist/src/internal/logical-paths.js +0 -25
  235. package/dist/src/runtime/sessions/messages.d.ts +0 -140
  236. package/dist/src/runtime/sessions/messages.js +0 -170
  237. package/dist/src/runtime/standard-schema.d.ts +0 -27
  238. package/dist/src/runtime/standard-schema.js +0 -64
  239. package/dist/src/services/dev-client/live-stream.d.ts +0 -35
  240. package/dist/src/services/dev-client/live-stream.js +0 -157
  241. package/dist/src/services/dev-client/send-message.d.ts +0 -24
  242. package/dist/src/services/dev-client/send-message.js +0 -185
  243. package/dist/src/services/dev-client/session.d.ts +0 -54
  244. package/dist/src/services/dev-client/session.js +0 -52
  245. package/dist/src/services/host.d.ts +0 -14
  246. package/dist/src/services/host.js +0 -13
  247. /package/dist/src/{package-name.d.ts → internal/package-name.d.ts} +0 -0
  248. /package/dist/src/{package-name.js → internal/package-name.js} +0 -0
  249. /package/dist/src/{protocol → internal}/vercel-agent-summary.js +0 -0
  250. /package/dist/src/{run-mode.d.ts → shared/run-mode.d.ts} +0 -0
  251. /package/dist/src/{run-mode.js → shared/run-mode.js} +0 -0
@@ -1,18 +1,10 @@
1
- import { createAshMessageStreamRoutePath } from "#protocol/routes.js";
2
1
  export const ASH_SESSION_ID_HEADER = "x-ash-session-id";
3
2
  export const ASH_STREAM_FORMAT_HEADER = "x-ash-stream-format";
4
3
  export const ASH_STREAM_VERSION_HEADER = "x-ash-stream-version";
5
- export const ASH_WORKFLOW_ID_HEADER = "x-ash-workflow-id";
6
4
  export const ASH_MESSAGE_STREAM_CONTENT_TYPE = "application/x-ndjson; charset=utf-8";
7
5
  export const ASH_MESSAGE_STREAM_FORMAT = "ndjson";
8
6
  export const ASH_MESSAGE_STREAM_VERSION = "14";
9
7
  const textEncoder = new TextEncoder();
10
- /**
11
- * Returns the stable stream route path for one message workflow session.
12
- */
13
- export function createMessageSessionStreamPath(sessionId) {
14
- return createAshMessageStreamRoutePath(sessionId);
15
- }
16
8
  /**
17
9
  * Returns true when the current stream has reached a turn boundary or terminal
18
10
  * session outcome.
@@ -197,20 +189,6 @@ export function createActionResultEvent(input) {
197
189
  type: "action.result",
198
190
  };
199
191
  }
200
- /**
201
- * Creates the `subagent.event` envelope wrapping one child event for the
202
- * parent's stream.
203
- */
204
- export function createSubagentChildEventEvent(input) {
205
- return {
206
- data: {
207
- callId: input.callId,
208
- event: input.event,
209
- subagentName: input.subagentName,
210
- },
211
- type: "subagent.event",
212
- };
213
- }
214
192
  /**
215
193
  * Creates the `subagent.called` event for one started child workflow session.
216
194
  */
@@ -371,7 +349,6 @@ export function createCompactionRequestedEvent(input) {
371
349
  modelId: input.modelId,
372
350
  sequence: input.sequence,
373
351
  sessionId: input.sessionId,
374
- thresholdPercent: input.thresholdPercent,
375
352
  turnId: input.turnId,
376
353
  usageInputTokens: input.usageInputTokens ?? null,
377
354
  },
@@ -384,7 +361,6 @@ export function createCompactionRequestedEvent(input) {
384
361
  export function createCompactionCompletedEvent(input) {
385
362
  return {
386
363
  data: {
387
- lastCompactionIndex: input.lastCompactionIndex,
388
364
  modelId: input.modelId,
389
365
  sequence: input.sequence,
390
366
  sessionId: input.sessionId,
@@ -445,12 +421,6 @@ export function timestampHandleMessageStreamEvent(event, at = new Date().toISOSt
445
421
  * Encodes one message stream event as newline-delimited JSON.
446
422
  */
447
423
  export function encodeMessageStreamEvent(event) {
448
- return encodeAnyStreamEvent(event);
449
- }
450
- /**
451
- * Encodes one stream event as newline-delimited JSON.
452
- */
453
- export function encodeAnyStreamEvent(event) {
454
424
  return textEncoder.encode(`${JSON.stringify(event)}\n`);
455
425
  }
456
426
  function normalizeActionResultOutcome(result) {
@@ -1 +1 @@
1
- export { defineChannel, POST, GET, PUT, DELETE, type Channel, type ChannelConfig, type ChannelEvents, type Session, type SessionHandle, type RouteDefinition, type RouteHandlerArgs, type SendFn, type SendOptions, type SendPayload, type GetSessionFn, } from "#public/definitions/defineChannel.js";
1
+ export { defineChannel, GET, POST, PUT, PATCH, DELETE, type Channel, type ChannelConfig, type ChannelEvents, type Session, type SessionHandle, type RouteDefinition, type RouteHandlerArgs, type SendFn, type SendOptions, type SendPayload, type GetSessionFn, } from "#public/definitions/defineChannel.js";
@@ -1 +1 @@
1
- export { defineChannel, POST, GET, PUT, DELETE, } from "#public/definitions/defineChannel.js";
1
+ export { defineChannel, GET, POST, PUT, PATCH, DELETE, } from "#public/definitions/defineChannel.js";
@@ -53,12 +53,6 @@ export declare function callSlackApi(input: {
53
53
  readonly operation: string;
54
54
  readonly body: unknown;
55
55
  }): Promise<SlackApiResponse>;
56
- /**
57
- * Builds the `request(op, body)` Slack API caller installed on every
58
- * {@link SlackHandle}. Resolves the bot token at call time so rotated
59
- * credentials are picked up without rebuilding the binding.
60
- */
61
- export declare function createSlackRequester(botToken: SlackBotToken | undefined): (operation: string, body: unknown) => Promise<SlackApiResponse>;
62
56
  /**
63
57
  * Result of a {@link SlackThread.post} or {@link SlackThread.postEphemeral}
64
58
  * call. Carries the Slack `ts` of the posted message under `id` so
@@ -264,7 +258,7 @@ export interface SlackHandle {
264
258
  * handler, interaction handler, and event handler. Returned by
265
259
  * {@link buildSlackBinding}.
266
260
  */
267
- export interface SlackBinding {
261
+ interface SlackBinding {
268
262
  readonly thread: SlackThread;
269
263
  readonly slack: SlackHandle;
270
264
  }
@@ -67,7 +67,7 @@ export async function callSlackApi(input) {
67
67
  * {@link SlackHandle}. Resolves the bot token at call time so rotated
68
68
  * credentials are picked up without rebuilding the binding.
69
69
  */
70
- export function createSlackRequester(botToken) {
70
+ function createSlackRequester(botToken) {
71
71
  return (operation, body) => callSlackApi({ botToken, operation, body });
72
72
  }
73
73
  /**
@@ -14,12 +14,8 @@
14
14
  * the public status message is edited in place to surface the outcome
15
15
  * (`authorized` / `declined` / `failed` / `timed-out`).
16
16
  */
17
- /**
18
- * Outcomes carried on a `connection.authorization_completed` event.
19
- * Mirrors the framework event shape so the renderer needs no extra
20
- * imports.
21
- */
22
- export type ConnectionAuthorizationOutcome = "authorized" | "declined" | "failed" | "timed-out";
17
+ import type { ConnectionAuthorizationOutcome } from "#protocol/message.js";
18
+ export type { ConnectionAuthorizationOutcome };
23
19
  /**
24
20
  * Title-cases a connection name (`linear` → `Linear`) for display. Empty
25
21
  * strings pass through unchanged so the renderer never emits an empty
@@ -44,7 +44,7 @@ export declare const HITL_FREEFORM_MODAL_ACTION_ID = "ash_freeform_text";
44
44
  * Subset of one Slack interactivity action the HITL decoder reads.
45
45
  * Mirrors the relevant fields of `SlackInteractionAction`.
46
46
  */
47
- export interface SlackHitlAction {
47
+ interface SlackHitlAction {
48
48
  readonly actionId: string;
49
49
  /** `value` field on Slack `button` payloads. */
50
50
  readonly value?: string;
@@ -56,7 +56,7 @@ export interface SlackHitlAction {
56
56
  * Matches the `InputResponse` contract minus `text` — freeform answers
57
57
  * come back through a different interaction path.
58
58
  */
59
- export interface DerivedHitlResponse {
59
+ interface DerivedHitlResponse {
60
60
  readonly requestId: string;
61
61
  readonly optionId: string;
62
62
  }
@@ -138,3 +138,4 @@ export declare function buildAnsweredBlocks(input: {
138
138
  readonly answerLabel: string;
139
139
  readonly userId?: string;
140
140
  }): unknown[];
141
+ export {};
@@ -64,41 +64,6 @@ export interface SlackMessage {
64
64
  /** Raw inbound event payload from Slack. */
65
65
  readonly raw: Record<string, unknown>;
66
66
  }
67
- /**
68
- * Slack `app_mention` event envelope (subset of fields the channel
69
- * actually reads).
70
- */
71
- export interface SlackAppMentionEvent {
72
- readonly type: "app_mention";
73
- readonly user?: string;
74
- readonly text?: string;
75
- readonly channel?: string;
76
- readonly ts?: string;
77
- readonly thread_ts?: string;
78
- readonly bot_id?: string;
79
- readonly username?: string;
80
- readonly files?: readonly Record<string, unknown>[];
81
- readonly [key: string]: unknown;
82
- }
83
- /**
84
- * Slack `message` event envelope (subset of fields the channel
85
- * actually reads). Direct messages arrive as `message` events with
86
- * `channel_type: "im"`.
87
- */
88
- export interface SlackMessageEvent {
89
- readonly type: "message";
90
- readonly channel_type?: string;
91
- readonly subtype?: string;
92
- readonly user?: string;
93
- readonly text?: string;
94
- readonly channel?: string;
95
- readonly ts?: string;
96
- readonly thread_ts?: string;
97
- readonly bot_id?: string;
98
- readonly username?: string;
99
- readonly files?: readonly Record<string, unknown>[];
100
- readonly [key: string]: unknown;
101
- }
102
67
  /**
103
68
  * Slack webhook envelope for an `event_callback`. The channel cares
104
69
  * only about `team_id` (for ergonomic auth derivation) and the inner
@@ -6,7 +6,7 @@ export type { GetEventStreamOptions } from "#channel/types.js";
6
6
  * is a webhook. Override only when authoring a non-webhook route such as a
7
7
  * long-poll endpoint or an event-stream reader.
8
8
  */
9
- export type ChannelMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
9
+ export type ChannelMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
10
10
  /**
11
11
  * Per-request surface exposed to a route's `fetch` handler. The
12
12
  * framework constructs this per request and passes it as the second
@@ -96,7 +96,7 @@ export interface Agent {
96
96
  /**
97
97
  * Marker discriminator written into every {@link DisabledRouteSentinel}.
98
98
  */
99
- export declare const DISABLED_ROUTE_SENTINEL_KIND = "ash:disabled-channel";
99
+ declare const DISABLED_ROUTE_SENTINEL_KIND = "ash:disabled-channel";
100
100
  /**
101
101
  * Marker value returned from {@link disableRoute}. Export this as the
102
102
  * default export of a file in `agent/channels/` to remove the framework
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Marker discriminator written into every {@link DisabledRouteSentinel}.
3
3
  */
4
- export const DISABLED_ROUTE_SENTINEL_KIND = "ash:disabled-channel";
4
+ const DISABLED_ROUTE_SENTINEL_KIND = "ash:disabled-channel";
5
5
  /**
6
6
  * Returns a sentinel that disables the framework route whose logical name
7
7
  * matches the containing file's slug path.
@@ -5,7 +5,7 @@ import type { HandleMessageStreamEvent } from "#protocol/message.js";
5
5
  import type { RouteDefinition, SendFn } from "#channel/routes.js";
6
6
  import type { Session, SessionHandle } from "#channel/session.js";
7
7
  export type { Session, SessionHandle } from "#channel/session.js";
8
- export { POST, GET, PUT, DELETE } from "#channel/routes.js";
8
+ export { GET, POST, PUT, PATCH, DELETE } from "#channel/routes.js";
9
9
  export type { RouteDefinition, RouteHandlerArgs, SendFn, SendOptions, SendPayload, GetSessionFn, } from "#channel/routes.js";
10
10
  type EventData<T extends HandleMessageStreamEvent["type"]> = Extract<HandleMessageStreamEvent, {
11
11
  type: T;
@@ -1,7 +1,7 @@
1
1
  import { CHANNEL_SENTINEL } from "#channel/compiled-channel.js";
2
2
  import { defaultDeliverResult } from "#channel/adapter.js";
3
3
  import { HTTP_ADAPTER_KIND } from "#channel/http.js";
4
- export { POST, GET, PUT, DELETE } from "#channel/routes.js";
4
+ export { GET, POST, PUT, PATCH, DELETE } from "#channel/routes.js";
5
5
  export function defineChannel(config) {
6
6
  const adapter = buildAdapter(config);
7
7
  const compiled = {
@@ -16,14 +16,3 @@ export interface InstructionsDefinition {
16
16
  * discovery produces from markdown.
17
17
  */
18
18
  export declare function defineInstructions<TInstructions extends InstructionsDefinition>(definition: TInstructions): TInstructions;
19
- /**
20
- * @deprecated Use {@link InstructionsDefinition} instead. The authored
21
- * file slot was renamed from `system.{md,ts,...}` to
22
- * `instructions.{md,ts,...}`.
23
- */
24
- export type SystemDefinition = InstructionsDefinition;
25
- /**
26
- * @deprecated Use {@link defineInstructions} instead. The authored file
27
- * slot was renamed from `system.{md,ts,...}` to `instructions.{md,ts,...}`.
28
- */
29
- export declare const defineSystem: typeof defineInstructions;
@@ -5,8 +5,3 @@
5
5
  export function defineInstructions(definition) {
6
6
  return definition;
7
7
  }
8
- /**
9
- * @deprecated Use {@link defineInstructions} instead. The authored file
10
- * slot was renamed from `system.{md,ts,...}` to `instructions.{md,ts,...}`.
11
- */
12
- export const defineSystem = defineInstructions;
@@ -2,7 +2,7 @@ import type { StandardJSONSchemaV1 } from "#compiled/@standard-schema/spec/index
2
2
  import type { ModelMessage } from "ai";
3
3
  import type { AshContext } from "#context/container.js";
4
4
  import type { HarnessSession } from "#harness/types.js";
5
- import type { PublicToolDefinitionWithExecuteFn, ToolExecuteOptions as AiSdkToolExecuteOptions } from "#shared/tool-definition.js";
5
+ import type { PublicToolDefinitionWithExecuteFn } from "#shared/tool-definition.js";
6
6
  /**
7
7
  * Input passed to a tool's {@link ToolDefinition.onCompact} hook.
8
8
  *
@@ -42,11 +42,6 @@ export interface NeedsApprovalContext {
42
42
  readonly toolInput?: Readonly<Record<string, unknown>>;
43
43
  readonly toolName: string;
44
44
  }
45
- /**
46
- * Options forwarded from the AI SDK to the tool's {@link ToolDefinition.execute}
47
- * function. These are the same options the SDK passes to every tool call.
48
- */
49
- export type ToolExecuteOptions = Readonly<AiSdkToolExecuteOptions>;
50
45
  /**
51
46
  * Ash-owned shape for the model-facing tool result produced by
52
47
  * {@link ToolDefinition.toModelOutput}. Structurally compatible with the
@@ -156,7 +151,7 @@ export declare function defineTool<TInput = unknown, TOutput = unknown>(definiti
156
151
  /**
157
152
  * Marker discriminator written into every {@link DisabledToolSentinel}.
158
153
  */
159
- export declare const DISABLED_TOOL_SENTINEL_KIND = "ash:disabled-tool";
154
+ declare const DISABLED_TOOL_SENTINEL_KIND = "ash:disabled-tool";
160
155
  /**
161
156
  * Marker value returned from {@link disableTool}. Export this as the default
162
157
  * export of a file in `agent/tools/` to remove the framework default whose
@@ -175,3 +170,4 @@ export declare function disableTool(): DisabledToolSentinel;
175
170
  * produced by {@link disableTool}.
176
171
  */
177
172
  export declare function isDisabledToolSentinel(value: unknown): value is DisabledToolSentinel;
173
+ export {};
@@ -6,7 +6,7 @@ export function defineTool(definition) {
6
6
  /**
7
7
  * Marker discriminator written into every {@link DisabledToolSentinel}.
8
8
  */
9
- export const DISABLED_TOOL_SENTINEL_KIND = "ash:disabled-tool";
9
+ const DISABLED_TOOL_SENTINEL_KIND = "ash:disabled-tool";
10
10
  /**
11
11
  * Returns a sentinel that disables the framework tool whose name matches the
12
12
  * containing file's slug.
@@ -1,8 +1,4 @@
1
1
  /**
2
2
  * Instructions prompt authoring helpers for `agent/instructions.ts` files.
3
3
  */
4
- export { defineInstructions, type InstructionsDefinition,
5
- /** @deprecated Use {@link defineInstructions} instead. */
6
- defineSystem,
7
- /** @deprecated Use {@link InstructionsDefinition} instead. */
8
- type SystemDefinition, } from "#public/definitions/instructions.js";
4
+ export { defineInstructions, type InstructionsDefinition, } from "#public/definitions/instructions.js";
@@ -1,6 +1,4 @@
1
1
  /**
2
2
  * Instructions prompt authoring helpers for `agent/instructions.ts` files.
3
3
  */
4
- export { defineInstructions,
5
- /** @deprecated Use {@link defineInstructions} instead. */
6
- defineSystem, } from "#public/definitions/instructions.js";
4
+ export { defineInstructions, } from "#public/definitions/instructions.js";
@@ -31,7 +31,7 @@ export interface MatchedConnectionResult {
31
31
  * Discriminated source entry stamped on authored definitions during
32
32
  * agent resolution via {@link stampDefinitionSource}.
33
33
  */
34
- export type DefinitionSourceEntry = {
34
+ type DefinitionSourceEntry = {
35
35
  readonly kind: "connection";
36
36
  readonly name: string;
37
37
  } | {
@@ -69,3 +69,4 @@ export interface ToolResultFromFn {
69
69
  * `isError` is `true`.
70
70
  */
71
71
  export declare const toolResultFrom: ToolResultFromFn;
72
+ export {};
@@ -24,7 +24,7 @@ export interface UseAshAgentSnapshot<TData> {
24
24
  /**
25
25
  * Lifecycle callbacks invoked while `useAshAgent` processes a turn.
26
26
  */
27
- export interface UseAshAgentCallbacks<TData> {
27
+ interface UseAshAgentCallbacks<TData> {
28
28
  readonly onError?: (error: Error) => void;
29
29
  readonly onEvent?: (event: HandleMessageStreamEvent) => void;
30
30
  readonly onFinish?: (snapshot: UseAshAgentSnapshot<TData>) => void;
@@ -85,3 +85,4 @@ export declare function useAshAgent(options?: UseAshAgentOptions<AshMessageData>
85
85
  export declare function useAshAgent<TData>(options: UseAshAgentOptions<TData> & {
86
86
  readonly reducer: AshAgentReducer<TData>;
87
87
  }): UseAshAgentHelpers<TData>;
88
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
2
2
  import { Client } from "#client/client.js";
3
3
  import { defaultMessageReducer } from "#client/message-reducer.js";
4
+ import { toError } from "#shared/errors.js";
4
5
  /**
5
6
  * React hook for driving an Ash session and projecting Ash events into UI data.
6
7
  */
@@ -337,11 +338,6 @@ function summarizeUserContent(message) {
337
338
  function isAbortError(error) {
338
339
  return error instanceof Error && error.name === "AbortError";
339
340
  }
340
- function toError(error) {
341
- if (error instanceof Error)
342
- return error;
343
- return new Error(String(error));
344
- }
345
341
  function toTerminalStreamFailureError(event) {
346
342
  if (event.type !== "session.failed") {
347
343
  return undefined;
@@ -21,7 +21,7 @@ export type RuntimeSubagentCallActionRequest = z.infer<typeof runtimeSubagentCal
21
21
  /**
22
22
  * Zod schema for one runtime-owned subagent-call action request.
23
23
  */
24
- export declare const runtimeSubagentCallActionRequestSchema: z.ZodObject<{
24
+ declare const runtimeSubagentCallActionRequestSchema: z.ZodObject<{
25
25
  callId: z.ZodString;
26
26
  description: z.ZodString;
27
27
  input: z.ZodType<import("../../shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonObject, unknown>>;
@@ -36,11 +36,11 @@ export declare const runtimeSubagentCallActionRequestSchema: z.ZodObject<{
36
36
  * Harness-native capabilities such as `bash` do not cross the harness boundary
37
37
  * as runtime actions. Only runtime-executed requests use this taxonomy.
38
38
  */
39
- export type RuntimeLoadSkillActionRequest = z.infer<typeof runtimeLoadSkillActionRequestSchema>;
39
+ type RuntimeLoadSkillActionRequest = z.infer<typeof runtimeLoadSkillActionRequestSchema>;
40
40
  /**
41
41
  * Zod schema for one runtime-owned load-skill action request.
42
42
  */
43
- export declare const runtimeLoadSkillActionRequestSchema: z.ZodObject<{
43
+ declare const runtimeLoadSkillActionRequestSchema: z.ZodObject<{
44
44
  callId: z.ZodString;
45
45
  input: z.ZodType<import("../../shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonObject, unknown>>;
46
46
  kind: z.ZodLiteral<"load-skill">;
@@ -52,27 +52,6 @@ export declare const runtimeLoadSkillActionRequestSchema: z.ZodObject<{
52
52
  * as runtime actions. Only runtime-executed requests use this taxonomy.
53
53
  */
54
54
  export type RuntimeActionRequest = RuntimeLoadSkillActionRequest | RuntimeSubagentCallActionRequest | RuntimeToolCallActionRequest;
55
- /**
56
- * Zod schema for one runtime action request.
57
- */
58
- export declare const runtimeActionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
- callId: z.ZodString;
60
- input: z.ZodType<import("../../shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonObject, unknown>>;
61
- kind: z.ZodLiteral<"load-skill">;
62
- }, z.core.$strict>, z.ZodObject<{
63
- callId: z.ZodString;
64
- description: z.ZodString;
65
- input: z.ZodType<import("../../shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonObject, unknown>>;
66
- kind: z.ZodLiteral<"subagent-call">;
67
- name: z.ZodString;
68
- nodeId: z.ZodString;
69
- subagentName: z.ZodString;
70
- }, z.core.$strict>, z.ZodObject<{
71
- callId: z.ZodString;
72
- input: z.ZodType<import("../../shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonObject, unknown>>;
73
- kind: z.ZodLiteral<"tool-call">;
74
- toolName: z.ZodString;
75
- }, z.core.$strict>], "kind">;
76
55
  /**
77
56
  * Runtime-owned authored tool-result projected back into a harness resume call.
78
57
  */
@@ -80,7 +59,7 @@ export type RuntimeToolResultActionResult = z.infer<typeof runtimeToolResultActi
80
59
  /**
81
60
  * Zod schema for one runtime-owned authored tool-result action result.
82
61
  */
83
- export declare const runtimeToolResultActionResultSchema: z.ZodObject<{
62
+ declare const runtimeToolResultActionResultSchema: z.ZodObject<{
84
63
  callId: z.ZodString;
85
64
  isError: z.ZodOptional<z.ZodBoolean>;
86
65
  kind: z.ZodLiteral<"tool-result">;
@@ -94,7 +73,7 @@ export type RuntimeSubagentResultActionResult = z.infer<typeof runtimeSubagentRe
94
73
  /**
95
74
  * Zod schema for one runtime-owned subagent result action result.
96
75
  */
97
- export declare const runtimeSubagentResultActionResultSchema: z.ZodObject<{
76
+ declare const runtimeSubagentResultActionResultSchema: z.ZodObject<{
98
77
  callId: z.ZodString;
99
78
  isError: z.ZodOptional<z.ZodBoolean>;
100
79
  kind: z.ZodLiteral<"subagent-result">;
@@ -104,14 +83,14 @@ export declare const runtimeSubagentResultActionResultSchema: z.ZodObject<{
104
83
  /**
105
84
  * Runtime-owned action result produced by framework-owned loading code.
106
85
  */
107
- export type RuntimeLoadSkillActionResult = z.infer<typeof runtimeLoadSkillActionResultSchema>;
86
+ type RuntimeLoadSkillActionResult = z.infer<typeof runtimeLoadSkillActionResultSchema>;
108
87
  /**
109
88
  * Zod schema for one runtime-owned load-skill action result.
110
89
  *
111
90
  * The result still reports whether a skill became active during the turn; the
112
91
  * action name reflects how the model requests those instructions.
113
92
  */
114
- export declare const runtimeLoadSkillActionResultSchema: z.ZodObject<{
93
+ declare const runtimeLoadSkillActionResultSchema: z.ZodObject<{
115
94
  callId: z.ZodString;
116
95
  isError: z.ZodOptional<z.ZodBoolean>;
117
96
  kind: z.ZodLiteral<"load-skill-result">;
@@ -122,25 +101,4 @@ export declare const runtimeLoadSkillActionResultSchema: z.ZodObject<{
122
101
  * Runtime-owned action result produced by framework-owned runtime code.
123
102
  */
124
103
  export type RuntimeActionResult = RuntimeLoadSkillActionResult | RuntimeSubagentResultActionResult | RuntimeToolResultActionResult;
125
- /**
126
- * Zod schema for one runtime action result.
127
- */
128
- export declare const runtimeActionResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
129
- callId: z.ZodString;
130
- isError: z.ZodOptional<z.ZodBoolean>;
131
- kind: z.ZodLiteral<"load-skill-result">;
132
- output: z.ZodType<import("../../shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonValue, unknown>>;
133
- name: z.ZodOptional<z.ZodString>;
134
- }, z.core.$strict>, z.ZodObject<{
135
- callId: z.ZodString;
136
- isError: z.ZodOptional<z.ZodBoolean>;
137
- kind: z.ZodLiteral<"subagent-result">;
138
- output: z.ZodType<import("../../shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonValue, unknown>>;
139
- subagentName: z.ZodString;
140
- }, z.core.$strict>, z.ZodObject<{
141
- callId: z.ZodString;
142
- isError: z.ZodOptional<z.ZodBoolean>;
143
- kind: z.ZodLiteral<"tool-result">;
144
- output: z.ZodType<import("../../shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.js").JsonValue, unknown>>;
145
- toolName: z.ZodString;
146
- }, z.core.$strict>], "kind">;
104
+ export {};
@@ -14,7 +14,7 @@ export const runtimeToolCallActionRequestSchema = z
14
14
  /**
15
15
  * Zod schema for one runtime-owned subagent-call action request.
16
16
  */
17
- export const runtimeSubagentCallActionRequestSchema = z
17
+ const runtimeSubagentCallActionRequestSchema = z
18
18
  .object({
19
19
  callId: z.string(),
20
20
  description: z.string(),
@@ -28,25 +28,17 @@ export const runtimeSubagentCallActionRequestSchema = z
28
28
  /**
29
29
  * Zod schema for one runtime-owned load-skill action request.
30
30
  */
31
- export const runtimeLoadSkillActionRequestSchema = z
31
+ const runtimeLoadSkillActionRequestSchema = z
32
32
  .object({
33
33
  callId: z.string(),
34
34
  input: jsonObjectSchema,
35
35
  kind: z.literal("load-skill"),
36
36
  })
37
37
  .strict();
38
- /**
39
- * Zod schema for one runtime action request.
40
- */
41
- export const runtimeActionRequestSchema = z.discriminatedUnion("kind", [
42
- runtimeLoadSkillActionRequestSchema,
43
- runtimeSubagentCallActionRequestSchema,
44
- runtimeToolCallActionRequestSchema,
45
- ]);
46
38
  /**
47
39
  * Zod schema for one runtime-owned authored tool-result action result.
48
40
  */
49
- export const runtimeToolResultActionResultSchema = z
41
+ const runtimeToolResultActionResultSchema = z
50
42
  .object({
51
43
  callId: z.string(),
52
44
  isError: z.boolean().optional(),
@@ -58,7 +50,7 @@ export const runtimeToolResultActionResultSchema = z
58
50
  /**
59
51
  * Zod schema for one runtime-owned subagent result action result.
60
52
  */
61
- export const runtimeSubagentResultActionResultSchema = z
53
+ const runtimeSubagentResultActionResultSchema = z
62
54
  .object({
63
55
  callId: z.string(),
64
56
  isError: z.boolean().optional(),
@@ -73,7 +65,7 @@ export const runtimeSubagentResultActionResultSchema = z
73
65
  * The result still reports whether a skill became active during the turn; the
74
66
  * action name reflects how the model requests those instructions.
75
67
  */
76
- export const runtimeLoadSkillActionResultSchema = z
68
+ const runtimeLoadSkillActionResultSchema = z
77
69
  .object({
78
70
  callId: z.string(),
79
71
  isError: z.boolean().optional(),
@@ -82,11 +74,3 @@ export const runtimeLoadSkillActionResultSchema = z
82
74
  name: z.string().optional(),
83
75
  })
84
76
  .strict();
85
- /**
86
- * Zod schema for one runtime action result.
87
- */
88
- export const runtimeActionResultSchema = z.discriminatedUnion("kind", [
89
- runtimeLoadSkillActionResultSchema,
90
- runtimeSubagentResultActionResultSchema,
91
- runtimeToolResultActionResultSchema,
92
- ]);
@@ -2,7 +2,7 @@ import type { MockLanguageModelV3 } from "ai/test";
2
2
  export type BootstrapGenerateOptions = Parameters<MockLanguageModelV3["doGenerate"]>[0];
3
3
  export type BootstrapPrompt = BootstrapGenerateOptions["prompt"];
4
4
  export type BootstrapGenerateResult = Awaited<ReturnType<MockLanguageModelV3["doGenerate"]>>;
5
- export type BootstrapStreamResult = Awaited<ReturnType<MockLanguageModelV3["doStream"]>>;
5
+ type BootstrapStreamResult = Awaited<ReturnType<MockLanguageModelV3["doStream"]>>;
6
6
  /**
7
7
  * Builds a deterministic `doGenerate` result from a text response and token
8
8
  * estimates. Shared by the real bootstrap model and the authored-model mock.
@@ -34,3 +34,4 @@ export declare function getLastUserPromptText(prompt: BootstrapPrompt): string |
34
34
  * Joins all message content in the prompt into a single string.
35
35
  */
36
36
  export declare function getPromptText(prompt: BootstrapPrompt): string;
37
+ export {};
@@ -2,8 +2,8 @@ import { MockLanguageModelV3 } from "ai/test";
2
2
  import { z } from "#compiled/zod/index.js";
3
3
  import { BOOTSTRAP_RUNTIME_MODEL_ID, BOOTSTRAP_RUNTIME_SYSTEM_PROMPT, } from "#runtime/agent/bootstrap.js";
4
4
  import { createBootstrapGenerateResult, createBootstrapStreamResult, estimateTokenCount, getLastUserPromptText, getPromptContentText, getPromptText, } from "#runtime/agent/bootstrap-model-utils.js";
5
+ import { LOAD_SKILL_TOOL_NAME } from "#runtime/skills/fragment-context.js";
5
6
  const MOCK_RUNTIME_MODEL_PROVIDER = "ash-runtime-mock";
6
- const LOAD_SKILL_TOOL_NAME = "load_skill";
7
7
  const LOAD_SKILL_TOOL_CALL_ID = "call_load_skill";
8
8
  const GET_WEATHER_TOOL_CALL_ID = "call_get_weather";
9
9
  const authoredRuntimeModelMocks = new Map();
@@ -24,7 +24,6 @@ const ADAPTER_NON_EVENT_FIELDS = new Set([
24
24
  "kind",
25
25
  "state",
26
26
  "deliver",
27
- "contextProviders",
28
27
  "createAdapterContext",
29
28
  "fetchFile",
30
29
  ]);
@@ -64,9 +63,8 @@ export function createRuntimeAdapterRegistry(input) {
64
63
  throw new RuntimeRegistryError("adapter", `Channel adapter kind "${kind}" is reserved by the framework. ` +
65
64
  `A route-declared adapter may share a framework kind only as a ` +
66
65
  `pass-through with no \`deliver\` hook, event handlers, ` +
67
- `\`attachments\` resolver, \`contextProviders\`, or ` +
68
- `\`createAdapterContext\` factory. Use a custom \`kind\` to add ` +
69
- `channel-specific behavior.`, { ...location, entryName: kind });
66
+ `\`attachments\` resolver, or \`createAdapterContext\` factory. ` +
67
+ `Use a custom \`kind\` to add channel-specific behavior.`, { ...location, entryName: kind });
70
68
  }
71
69
  // Additive pass-through — the framework adapter stays in place.
72
70
  continue;
@@ -98,7 +96,7 @@ export function deserializeRuntimeAdapter(registry, data) {
98
96
  }
99
97
  function requireAdapterKind(adapter, location) {
100
98
  const kind = getAdapterKind(adapter);
101
- if (kind === "unknown") {
99
+ if (typeof kind !== "string" || kind.length === 0) {
102
100
  throw new RuntimeRegistryError("adapter", "Adapters must declare a non-empty `kind` field.", {
103
101
  entryName: "unknown",
104
102
  logicalPath: location?.logicalPath,
@@ -121,9 +119,6 @@ function carriesAdapterBehavior(adapter) {
121
119
  if (adapter.createAdapterContext !== undefined) {
122
120
  return true;
123
121
  }
124
- if (adapter.contextProviders !== undefined && adapter.contextProviders.length > 0) {
125
- return true;
126
- }
127
122
  // Remaining keys on a ChannelAdapter object correspond to stream
128
123
  // event handlers (keyed by event type, e.g. "input.requested").
129
124
  for (const [key, value] of Object.entries(adapter)) {