experimental-ash 0.24.2 → 0.25.1
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.
- package/CHANGELOG.md +18 -0
- package/dist/docs/public/typescript-api.md +0 -12
- package/dist/src/channel/adapter.d.ts +5 -18
- package/dist/src/channel/adapter.js +2 -8
- package/dist/src/channel/cross-channel-receive.d.ts +10 -1
- package/dist/src/channel/cross-channel-receive.js +21 -3
- package/dist/src/channel/routes.d.ts +2 -1
- package/dist/src/channel/routes.js +6 -3
- package/dist/src/channel/schedule.js +2 -2
- package/dist/src/channel/types.d.ts +1 -1
- package/dist/src/chunks/{client-DLHAGI2g.js → client-BShLWzR6.js} +3 -3
- package/dist/src/chunks/compile-agent-CyP6FrL8.js +5 -0
- package/dist/src/chunks/dev-authored-source-watcher-DIWfVUsu.js +1 -0
- package/dist/src/chunks/host-BxT35q6K.js +70 -0
- package/dist/src/chunks/paths-B2hLA0Fn.js +85 -0
- package/dist/src/chunks/{token-D98SQdvs.js → token-BOkIxJeV.js} +1 -1
- package/dist/src/chunks/types-CjIyrcYo.js +1 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/dev/environment.d.ts +0 -5
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/repl.d.ts +1 -1
- package/dist/src/cli/dev/repl.js +3 -3
- package/dist/src/cli/run.d.ts +0 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/client/index.d.ts +1 -1
- package/dist/src/client/message-reducer.js +13 -25
- package/dist/src/client/message-response.d.ts +2 -1
- package/dist/src/client/open-stream.d.ts +3 -3
- package/dist/src/client/open-stream.js +1 -2
- package/dist/src/client/session.d.ts +2 -1
- package/dist/src/client/session.js +0 -3
- package/dist/src/client/types.d.ts +3 -2
- package/dist/src/compiler/artifacts.d.ts +7 -10
- package/dist/src/compiler/artifacts.js +3 -3
- package/dist/src/compiler/manifest.d.ts +6 -15
- package/dist/src/compiler/manifest.js +3 -3
- package/dist/src/compiler/normalize-agent-config.js +12 -10
- package/dist/src/compiler/normalize-manifest.js +3 -2
- package/dist/src/context/container.d.ts +1 -16
- package/dist/src/context/container.js +1 -24
- package/dist/src/context/hook-lifecycle.d.ts +2 -7
- package/dist/src/context/hook-lifecycle.js +0 -6
- package/dist/src/context/provider.d.ts +1 -11
- package/dist/src/context/providers/sandbox.js +4 -1
- package/dist/src/context/run-step.d.ts +2 -4
- package/dist/src/context/run-step.js +4 -17
- package/dist/src/context/seed-keys.d.ts +1 -1
- package/dist/src/discover/connections.d.ts +2 -1
- package/dist/src/discover/diagnostics.d.ts +0 -8
- package/dist/src/discover/diagnostics.js +4 -16
- package/dist/src/discover/discover-agent.d.ts +3 -13
- package/dist/src/discover/discover-agent.js +1 -11
- package/dist/src/discover/discover-subagent.d.ts +3 -2
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/filesystem.d.ts +0 -37
- package/dist/src/discover/filesystem.js +0 -115
- package/dist/src/discover/grammar.d.ts +10 -20
- package/dist/src/discover/grammar.js +11 -33
- package/dist/src/discover/lib.d.ts +3 -2
- package/dist/src/discover/manifest.d.ts +3 -3
- package/dist/src/discover/markdown.d.ts +2 -1
- package/dist/src/discover/sandbox.d.ts +2 -1
- package/dist/src/discover/schedules.d.ts +3 -2
- package/dist/src/discover/schedules.js +1 -1
- package/dist/src/discover/skills.d.ts +3 -2
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/discover/slots.d.ts +3 -2
- package/dist/src/evals/cli/eval.d.ts +0 -6
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/loaders/index.d.ts +2 -22
- package/dist/src/evals/loaders/index.js +1 -1
- package/dist/src/evals/reporters/index.d.ts +2 -14
- package/dist/src/evals/reporters/index.js +1 -1
- package/dist/src/evals/runner/discover.d.ts +0 -6
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/evals/runner/execute-case.d.ts +2 -1
- package/dist/src/evals/runner/execute-suite.d.ts +2 -1
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/resolve-git-metadata.d.ts +3 -3
- package/dist/src/evals/scorers/autoevals-client.d.ts +2 -2
- package/dist/src/execution/await-authorization-orchestrator.d.ts +0 -2
- package/dist/src/execution/await-authorization-orchestrator.js +11 -19
- package/dist/src/execution/connection-auth-steps.d.ts +1 -5
- package/dist/src/execution/connection-auth-steps.js +5 -9
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/skills/instructions.d.ts +2 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
- package/dist/src/execution/subagent-tool.d.ts +0 -8
- package/dist/src/execution/subagent-tool.js +9 -16
- package/dist/src/execution/tool-compaction.js +0 -2
- package/dist/src/execution/turn-workflow.d.ts +1 -1
- package/dist/src/execution/turn-workflow.js +2 -3
- package/dist/src/execution/web-fetch/tool.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +15 -1
- package/dist/src/execution/workflow-steps.js +8 -18
- package/dist/src/harness/action-result-helpers.d.ts +0 -12
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/emission.d.ts +2 -2
- package/dist/src/harness/execute-tool.d.ts +2 -1
- package/dist/src/harness/input-requests.d.ts +2 -1
- package/dist/src/harness/prompt-cache.d.ts +1 -9
- package/dist/src/harness/prompt-cache.js +0 -12
- package/dist/src/harness/runtime-actions.d.ts +2 -11
- package/dist/src/harness/runtime-actions.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +3 -2
- package/dist/src/harness/step-hooks.js +3 -7
- package/dist/src/harness/tool-loop.js +0 -2
- package/dist/src/harness/types.d.ts +1 -1
- package/dist/src/internal/application/package.js +2 -2
- package/dist/src/internal/application/runtime-compiled-artifacts-source.js +0 -1
- package/dist/src/internal/attachments/errors.d.ts +8 -2
- package/dist/src/internal/attachments/url-refs.d.ts +0 -1
- package/dist/src/internal/attachments/url-refs.js +1 -1
- package/dist/src/internal/authored-definition/channel.d.ts +0 -5
- package/dist/src/internal/authored-definition/channel.js +1 -10
- package/dist/src/internal/authored-definition/sandbox.d.ts +2 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +3 -2
- package/dist/src/internal/authored-module-loader.d.ts +0 -6
- package/dist/src/internal/authored-module-loader.js +0 -9
- package/dist/src/internal/authored-module.d.ts +0 -4
- package/dist/src/internal/authored-module.js +0 -10
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +2 -10
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/{public → internal}/helpers/markdown.d.ts +2 -23
- package/dist/src/{public → internal}/helpers/markdown.js +1 -1
- package/dist/src/internal/logging.d.ts +2 -8
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.d.ts +1 -1
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +2 -2
- package/dist/src/internal/nitro/routes/channel-dispatch.js +2 -2
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +0 -1
- package/dist/src/internal/node-esm-compat-banner.d.ts +1 -1
- package/dist/src/internal/runtime-registry.d.ts +2 -1
- package/dist/src/{protocol → internal}/vercel-agent-summary.d.ts +1 -1
- package/dist/src/protocol/message.d.ts +0 -34
- package/dist/src/protocol/message.js +0 -30
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/index.js +1 -1
- package/dist/src/public/channels/slack/api.d.ts +1 -7
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +2 -6
- package/dist/src/public/channels/slack/hitl.d.ts +3 -2
- package/dist/src/public/channels/slack/inbound.d.ts +0 -35
- package/dist/src/public/definitions/channel.d.ts +2 -2
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/defineChannel.d.ts +1 -1
- package/dist/src/public/definitions/defineChannel.js +1 -1
- package/dist/src/public/definitions/instructions.d.ts +0 -11
- package/dist/src/public/definitions/instructions.js +0 -5
- package/dist/src/public/definitions/tool.d.ts +3 -7
- package/dist/src/public/definitions/tool.js +1 -1
- package/dist/src/public/instructions/index.d.ts +1 -5
- package/dist/src/public/instructions/index.js +1 -3
- package/dist/src/public/tool-result-narrowing.d.ts +2 -1
- package/dist/src/react/use-ash-agent.d.ts +2 -1
- package/dist/src/react/use-ash-agent.js +1 -5
- package/dist/src/runtime/actions/types.d.ts +8 -50
- package/dist/src/runtime/actions/types.js +5 -21
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +2 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/channels/registry.js +3 -8
- package/dist/src/runtime/compiled-artifacts-source.d.ts +4 -11
- package/dist/src/runtime/compiled-artifacts-source.js +3 -7
- package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -14
- package/dist/src/runtime/connections/authorization-tokens.js +2 -28
- package/dist/src/runtime/connections/principal-context.d.ts +3 -2
- package/dist/src/runtime/connections/validate-authorization.d.ts +0 -11
- package/dist/src/runtime/connections/validate-authorization.js +0 -16
- package/dist/src/runtime/framework-channels/index.d.ts +0 -1
- package/dist/src/runtime/framework-channels/index.js +1 -1
- package/dist/src/runtime/framework-tools/connection-search.d.ts +0 -46
- package/dist/src/runtime/framework-tools/connection-search.js +3 -78
- package/dist/src/runtime/framework-tools/connection-tools.d.ts +3 -6
- package/dist/src/runtime/framework-tools/connection-tools.js +6 -13
- package/dist/src/runtime/framework-tools/index.d.ts +2 -1
- package/dist/src/runtime/framework-tools/index.js +2 -1
- package/dist/src/runtime/framework-tools/skill.d.ts +0 -13
- package/dist/src/runtime/framework-tools/skill.js +1 -1
- package/dist/src/runtime/governance/auth/token-claims.d.ts +1 -16
- package/dist/src/runtime/governance/auth/token-claims.js +3 -3
- package/dist/src/runtime/governance/auth/types.d.ts +0 -4
- package/dist/src/runtime/governance/network/ip-allow-list.d.ts +0 -17
- package/dist/src/runtime/governance/network/ip-allow-list.js +0 -39
- package/dist/src/runtime/hooks/registry.d.ts +7 -4
- package/dist/src/runtime/hooks/registry.js +4 -2
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -5
- package/dist/src/runtime/loaders/bundled-artifacts.js +0 -7
- package/dist/src/runtime/loaders/compile-metadata.d.ts +3 -10
- package/dist/src/runtime/loaders/compile-metadata.js +6 -8
- package/dist/src/runtime/loaders/manifest.d.ts +2 -2
- package/dist/src/runtime/loaders/manifest.js +4 -5
- package/dist/src/runtime/loaders/module-map.d.ts +2 -2
- package/dist/src/runtime/loaders/module-map.js +3 -4
- package/dist/src/runtime/prompt/compose.d.ts +2 -1
- package/dist/src/runtime/resolve-agent-graph.d.ts +2 -15
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/sandbox/keys.d.ts +2 -1
- package/dist/src/runtime/sandbox/registry.d.ts +3 -3
- package/dist/src/runtime/schedules/resolve-schedule.d.ts +3 -12
- package/dist/src/runtime/schedules/resolve-schedule.js +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +2 -13
- package/dist/src/runtime/sessions/auth.js +1 -11
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-session.d.ts +0 -6
- package/dist/src/runtime/sessions/runtime-session.js +0 -13
- package/dist/src/runtime/sessions/turn.d.ts +2 -2
- package/dist/src/runtime/subagents/registry.d.ts +2 -5
- package/dist/src/runtime/subagents/registry.js +0 -6
- package/dist/src/runtime/tools/registry.d.ts +2 -1
- package/dist/src/runtime/tools/registry.js +1 -4
- package/dist/src/runtime/types.d.ts +4 -3
- package/dist/src/runtime/workspace/seed-files.d.ts +2 -1
- package/dist/src/services/dev-client/request-headers.d.ts +37 -8
- package/dist/src/services/dev-client/request-headers.js +71 -46
- package/dist/src/services/dev-client/stream.d.ts +0 -19
- package/dist/src/services/dev-client/stream.js +0 -37
- package/dist/src/services/dev-client/url.d.ts +3 -7
- package/dist/src/services/dev-client/url.js +4 -10
- package/dist/src/services/dev-client.d.ts +0 -12
- package/dist/src/services/dev-client.js +6 -92
- package/dist/src/shared/agent-definition.d.ts +1 -1
- package/dist/src/shared/json.d.ts +0 -4
- package/dist/src/shared/json.js +0 -38
- package/dist/src/shared/skill-definition.d.ts +0 -2
- package/package.json +1 -6
- package/dist/src/chunks/dev-authored-source-watcher-CBID_Dwh.js +0 -1
- package/dist/src/chunks/host-zBy9FyyX.js +0 -70
- package/dist/src/chunks/package-HUaeub_D.js +0 -1
- package/dist/src/chunks/paths-CebY5GCi.js +0 -89
- package/dist/src/chunks/types-DDA2QUED.js +0 -1
- package/dist/src/compiler/resource-files.d.ts +0 -19
- package/dist/src/compiler/resource-files.js +0 -28
- package/dist/src/execution/subagent-invocation.d.ts +0 -19
- package/dist/src/execution/subagent-invocation.js +0 -17
- package/dist/src/execution/task-mode.d.ts +0 -9
- package/dist/src/execution/task-mode.js +0 -12
- package/dist/src/execution/types.d.ts +0 -20
- package/dist/src/execution/types.js +0 -1
- package/dist/src/internal/logical-paths.d.ts +0 -13
- package/dist/src/internal/logical-paths.js +0 -25
- package/dist/src/runtime/sessions/messages.d.ts +0 -140
- package/dist/src/runtime/sessions/messages.js +0 -170
- package/dist/src/runtime/standard-schema.d.ts +0 -27
- package/dist/src/runtime/standard-schema.js +0 -64
- package/dist/src/services/dev-client/live-stream.d.ts +0 -35
- package/dist/src/services/dev-client/live-stream.js +0 -157
- package/dist/src/services/dev-client/send-message.d.ts +0 -24
- package/dist/src/services/dev-client/send-message.js +0 -185
- package/dist/src/services/dev-client/session.d.ts +0 -54
- package/dist/src/services/dev-client/session.js +0 -52
- package/dist/src/services/host.d.ts +0 -14
- package/dist/src/services/host.js +0 -13
- /package/dist/src/{package-name.d.ts → internal/package-name.d.ts} +0 -0
- /package/dist/src/{package-name.js → internal/package-name.js} +0 -0
- /package/dist/src/{protocol → internal}/vercel-agent-summary.js +0 -0
- /package/dist/src/{run-mode.d.ts → shared/run-mode.d.ts} +0 -0
- /package/dist/src/{run-mode.js → shared/run-mode.js} +0 -0
|
@@ -129,7 +129,7 @@ export interface VercelAshConnectionEntry {
|
|
|
129
129
|
}
|
|
130
130
|
export interface VercelAshChannelEntry {
|
|
131
131
|
readonly name: string;
|
|
132
|
-
readonly method: "GET" | "POST" | "PUT" | "
|
|
132
|
+
readonly method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
133
133
|
readonly urlPath: string;
|
|
134
134
|
readonly type: VercelAshChannelType;
|
|
135
135
|
/**
|
|
@@ -6,7 +6,6 @@ import type { JsonObject } from "#shared/json.js";
|
|
|
6
6
|
export declare const ASH_SESSION_ID_HEADER = "x-ash-session-id";
|
|
7
7
|
export declare const ASH_STREAM_FORMAT_HEADER = "x-ash-stream-format";
|
|
8
8
|
export declare const ASH_STREAM_VERSION_HEADER = "x-ash-stream-version";
|
|
9
|
-
export declare const ASH_WORKFLOW_ID_HEADER = "x-ash-workflow-id";
|
|
10
9
|
export declare const ASH_MESSAGE_STREAM_CONTENT_TYPE = "application/x-ndjson; charset=utf-8";
|
|
11
10
|
export declare const ASH_MESSAGE_STREAM_FORMAT = "ndjson";
|
|
12
11
|
export declare const ASH_MESSAGE_STREAM_VERSION = "14";
|
|
@@ -96,18 +95,6 @@ export type HandleMessageRequestBody = {
|
|
|
96
95
|
readonly message: string | UserContent;
|
|
97
96
|
readonly clientContext?: string | readonly string[] | JsonObject;
|
|
98
97
|
};
|
|
99
|
-
/**
|
|
100
|
-
* JSON response returned when the message route accepts a start or resume
|
|
101
|
-
* request.
|
|
102
|
-
*/
|
|
103
|
-
export type HandleMessageResponseBody = {
|
|
104
|
-
readonly continuationToken: string;
|
|
105
|
-
readonly ok: true;
|
|
106
|
-
} | {
|
|
107
|
-
readonly continuationToken: string;
|
|
108
|
-
readonly ok: true;
|
|
109
|
-
readonly sessionId: string;
|
|
110
|
-
};
|
|
111
98
|
/**
|
|
112
99
|
* Stream event emitted when the durable message workflow session starts.
|
|
113
100
|
*/
|
|
@@ -365,7 +352,6 @@ export interface CompactionRequestedStreamEvent {
|
|
|
365
352
|
modelId: string;
|
|
366
353
|
sequence: number;
|
|
367
354
|
sessionId: string;
|
|
368
|
-
thresholdPercent: number;
|
|
369
355
|
turnId: string;
|
|
370
356
|
usageInputTokens: number | null;
|
|
371
357
|
};
|
|
@@ -377,7 +363,6 @@ export interface CompactionRequestedStreamEvent {
|
|
|
377
363
|
*/
|
|
378
364
|
export interface CompactionCompletedStreamEvent {
|
|
379
365
|
data: {
|
|
380
|
-
lastCompactionIndex: number;
|
|
381
366
|
modelId: string;
|
|
382
367
|
sequence: number;
|
|
383
368
|
sessionId: string;
|
|
@@ -484,10 +469,6 @@ export type HandleMessageStreamEvent = (CompactionCompletedStreamEvent | Compact
|
|
|
484
469
|
export type TimedHandleMessageStreamEvent = HandleMessageStreamEvent & {
|
|
485
470
|
readonly meta: HandleMessageStreamEventMeta;
|
|
486
471
|
};
|
|
487
|
-
/**
|
|
488
|
-
* Returns the stable stream route path for one message workflow session.
|
|
489
|
-
*/
|
|
490
|
-
export declare function createMessageSessionStreamPath(sessionId: string): string;
|
|
491
472
|
/**
|
|
492
473
|
* Returns true when the current stream has reached a turn boundary or terminal
|
|
493
474
|
* session outcome.
|
|
@@ -589,15 +570,6 @@ export declare function createActionResultEvent(input: {
|
|
|
589
570
|
readonly stepIndex: number;
|
|
590
571
|
readonly turnId: string;
|
|
591
572
|
}): ActionResultStreamEvent;
|
|
592
|
-
/**
|
|
593
|
-
* Creates the `subagent.event` envelope wrapping one child event for the
|
|
594
|
-
* parent's stream.
|
|
595
|
-
*/
|
|
596
|
-
export declare function createSubagentChildEventEvent(input: {
|
|
597
|
-
readonly callId: string;
|
|
598
|
-
readonly event: HandleMessageStreamEvent;
|
|
599
|
-
readonly subagentName: string;
|
|
600
|
-
}): SubagentChildEventStreamEvent;
|
|
601
573
|
/**
|
|
602
574
|
* Creates the `subagent.called` event for one started child workflow session.
|
|
603
575
|
*/
|
|
@@ -708,7 +680,6 @@ export declare function createCompactionRequestedEvent(input: {
|
|
|
708
680
|
readonly modelId: string;
|
|
709
681
|
readonly sequence: number;
|
|
710
682
|
readonly sessionId: string;
|
|
711
|
-
readonly thresholdPercent: number;
|
|
712
683
|
readonly turnId: string;
|
|
713
684
|
readonly usageInputTokens: number | undefined;
|
|
714
685
|
}): CompactionRequestedStreamEvent;
|
|
@@ -716,7 +687,6 @@ export declare function createCompactionRequestedEvent(input: {
|
|
|
716
687
|
* Creates the `compaction.completed` event for one appended checkpoint.
|
|
717
688
|
*/
|
|
718
689
|
export declare function createCompactionCompletedEvent(input: {
|
|
719
|
-
readonly lastCompactionIndex: number;
|
|
720
690
|
readonly modelId: string;
|
|
721
691
|
readonly sequence: number;
|
|
722
692
|
readonly sessionId: string;
|
|
@@ -753,7 +723,3 @@ export declare function timestampHandleMessageStreamEvent(event: HandleMessageSt
|
|
|
753
723
|
* Encodes one message stream event as newline-delimited JSON.
|
|
754
724
|
*/
|
|
755
725
|
export declare function encodeMessageStreamEvent(event: TimedHandleMessageStreamEvent): Uint8Array;
|
|
756
|
-
/**
|
|
757
|
-
* Encodes one stream event as newline-delimited JSON.
|
|
758
|
-
*/
|
|
759
|
-
export declare function encodeAnyStreamEvent(event: unknown): Uint8Array;
|
|
@@ -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,
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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" | "
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
39
|
+
type RuntimeLoadSkillActionRequest = z.infer<typeof runtimeLoadSkillActionRequestSchema>;
|
|
40
40
|
/**
|
|
41
41
|
* Zod schema for one runtime-owned load-skill action request.
|
|
42
42
|
*/
|
|
43
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {};
|