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.
- package/CHANGELOG.md +12 -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-75wLLW-E.js +5 -0
- package/dist/src/chunks/dev-authored-source-watcher-DqoJsDup.js +1 -0
- package/dist/src/chunks/host-JVy7fewA.js +70 -0
- package/dist/src/chunks/paths-DNjq5JOy.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/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/connection-auth-steps.d.ts +1 -5
- package/dist/src/execution/connection-auth-steps.js +4 -5
- 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 -2
- package/dist/src/execution/web-fetch/tool.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +17 -1
- package/dist/src/execution/workflow-steps.js +5 -6
- 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/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
|
@@ -93,7 +93,7 @@ export async function accumulateRuntimeActionResults(input) {
|
|
|
93
93
|
* batch when every action has a matching result. Unknown and duplicate results
|
|
94
94
|
* are ignored.
|
|
95
95
|
*/
|
|
96
|
-
|
|
96
|
+
function resolveReadyRuntimeActionResults(input) {
|
|
97
97
|
const batch = getPendingRuntimeActionBatch(input.session);
|
|
98
98
|
if (batch === undefined) {
|
|
99
99
|
return undefined;
|
|
@@ -12,7 +12,7 @@ export type HarnessStepResult = Pick<StepResult<ToolSet>, "content" | "finishRea
|
|
|
12
12
|
/**
|
|
13
13
|
* Input for {@link buildStepHooks}.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
interface StepHooksInput {
|
|
16
16
|
readonly cachePath: PromptCachePath;
|
|
17
17
|
readonly emit?: HarnessEmitFn;
|
|
18
18
|
readonly emissionState: HarnessEmissionState;
|
|
@@ -43,7 +43,7 @@ export interface StepHooksInput {
|
|
|
43
43
|
/**
|
|
44
44
|
* Composable hooks returned by {@link buildStepHooks}.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
interface StepHooks {
|
|
47
47
|
/**
|
|
48
48
|
* `ToolLoopAgent` `onStepFinish` callback.
|
|
49
49
|
*
|
|
@@ -106,3 +106,4 @@ export declare function emitStepActions(emitFn: HarnessEmitFn, state: HarnessEmi
|
|
|
106
106
|
* will throw on the JSON-object invariant.
|
|
107
107
|
*/
|
|
108
108
|
export declare function isInvalidToolCall(toolCall: TypedToolCall<ToolSet>): boolean;
|
|
109
|
+
export {};
|
|
@@ -50,14 +50,10 @@ export function buildStepHooks(input) {
|
|
|
50
50
|
}
|
|
51
51
|
return stepResult;
|
|
52
52
|
};
|
|
53
|
-
// -------------------------------------------------------------------------
|
|
54
|
-
// onStepFinish
|
|
55
|
-
// -------------------------------------------------------------------------
|
|
56
|
-
const onStepFinish = async (step) => {
|
|
57
|
-
resolveStep(step);
|
|
58
|
-
};
|
|
59
53
|
return {
|
|
60
|
-
onStepFinish
|
|
54
|
+
onStepFinish: async (step) => {
|
|
55
|
+
resolveStep(step);
|
|
56
|
+
},
|
|
61
57
|
prepareStep,
|
|
62
58
|
stepResult,
|
|
63
59
|
};
|
|
@@ -812,7 +812,6 @@ async function maybeCompact(input) {
|
|
|
812
812
|
modelId: formatLanguageModelGatewayId(compaction.model),
|
|
813
813
|
sequence: emissionState.sequence,
|
|
814
814
|
sessionId: session.sessionId,
|
|
815
|
-
thresholdPercent: 0,
|
|
816
815
|
turnId: emissionState.turnId,
|
|
817
816
|
usageInputTokens: getInputTokenCount(messages, session.compaction),
|
|
818
817
|
}));
|
|
@@ -827,7 +826,6 @@ async function maybeCompact(input) {
|
|
|
827
826
|
}
|
|
828
827
|
if (emit) {
|
|
829
828
|
await emit(createCompactionCompletedEvent({
|
|
830
|
-
lastCompactionIndex: 0,
|
|
831
829
|
modelId: formatLanguageModelGatewayId(compaction.model),
|
|
832
830
|
sequence: emissionState.sequence,
|
|
833
831
|
sessionId: session.sessionId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LanguageModel, ModelMessage, UserContent } from "ai";
|
|
2
2
|
import type { SessionCapabilities } from "#channel/types.js";
|
|
3
3
|
import type { HandleMessageStreamEvent, RuntimeIdentity } from "#protocol/message.js";
|
|
4
|
-
import type { RunMode } from "#run-mode.js";
|
|
4
|
+
import type { RunMode } from "#shared/run-mode.js";
|
|
5
5
|
import type { RuntimeActionResult } from "#runtime/actions/types.js";
|
|
6
6
|
import type { RuntimeModelReference } from "#runtime/agent/bootstrap.js";
|
|
7
7
|
import type { InputResponse } from "#runtime/input/types.js";
|
|
@@ -2,11 +2,11 @@ import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { basename, dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { ASH_PACKAGE_NAME } from "#package-name.js";
|
|
5
|
+
import { ASH_PACKAGE_NAME } from "#internal/package-name.js";
|
|
6
6
|
let cachedPackageInfo;
|
|
7
7
|
// The package build stamps the published version into `dist` so bundled
|
|
8
8
|
// deployments can still report package metadata without resolving package.json.
|
|
9
|
-
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.
|
|
9
|
+
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.25.0";
|
|
10
10
|
const BUNDLED_FALLBACK_PACKAGE_VERSION_PLACEHOLDER = "__ASH_PACKAGE_VERSION_PLACEHOLDER__";
|
|
11
11
|
const WORKFLOW_MODULE_ALIASES = {
|
|
12
12
|
"workflow/api": "src/compiled/@workflow/core/runtime.js",
|
|
@@ -7,6 +7,5 @@ import { resolvePackageSourceFilePath } from "#internal/application/package.js";
|
|
|
7
7
|
export function createAuthoredSourceRuntimeCompiledArtifactsSource(appRoot) {
|
|
8
8
|
return createDiskRuntimeCompiledArtifactsSource(appRoot, {
|
|
9
9
|
moduleMapLoaderPath: resolvePackageSourceFilePath("src/internal/authored-module-map-loader.ts"),
|
|
10
|
-
moduleMapLoadMode: "authored-source",
|
|
11
10
|
});
|
|
12
11
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Discriminator for {@link AshAttachmentError}.
|
|
3
|
+
*
|
|
4
|
+
* Today the only literal ever produced in the codebase is
|
|
5
|
+
* `"resolver-threw"`. The union remains a discriminated type so future
|
|
6
|
+
* producers can broaden it intentionally rather than as an accident of
|
|
7
|
+
* a string parameter that drifted.
|
|
3
8
|
*/
|
|
4
|
-
|
|
9
|
+
type AshAttachmentErrorKind = "resolver-threw";
|
|
5
10
|
/**
|
|
6
11
|
* Input shape for {@link AshAttachmentError}. Separated from the class
|
|
7
12
|
* constructor so callers can build the options object inline and TS
|
|
8
13
|
* can check the `kind` / `message` pair without a positional
|
|
9
14
|
* constructor signature.
|
|
10
15
|
*/
|
|
11
|
-
|
|
16
|
+
interface AshAttachmentErrorInput {
|
|
12
17
|
readonly kind: AshAttachmentErrorKind;
|
|
13
18
|
readonly message: string;
|
|
14
19
|
readonly adapterKind?: string;
|
|
@@ -30,3 +35,4 @@ export declare class AshAttachmentError extends Error {
|
|
|
30
35
|
readonly cause?: unknown;
|
|
31
36
|
constructor(input: AshAttachmentErrorInput);
|
|
32
37
|
}
|
|
38
|
+
export {};
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* reconstitutes them back to `URL` objects so `instanceof URL` checks
|
|
9
9
|
* work reliably.
|
|
10
10
|
*/
|
|
11
|
-
export declare const ASH_URL_SCHEME = "ash-url:";
|
|
12
11
|
export declare function serializeUrlFilePart(url: URL): string;
|
|
13
12
|
export declare function isSerializedUrlFilePart(data: unknown): data is string;
|
|
14
13
|
export declare function deserializeUrlFilePart(data: string): URL;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* reconstitutes them back to `URL` objects so `instanceof URL` checks
|
|
9
9
|
* work reliably.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
const ASH_URL_SCHEME = "ash-url:";
|
|
12
12
|
export function serializeUrlFilePart(url) {
|
|
13
13
|
return `${ASH_URL_SCHEME}${url.href}`;
|
|
14
14
|
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { type CompiledChannel } from "#channel/compiled-channel.js";
|
|
2
|
-
/**
|
|
3
|
-
* Type guard: returns whether `value` is a {@link CompiledChannel} produced
|
|
4
|
-
* by {@link defineChannel}.
|
|
5
|
-
*/
|
|
6
|
-
export declare function isCompiledChannel(value: unknown): value is CompiledChannel;
|
|
7
2
|
/**
|
|
8
3
|
* Normalizes one authored channel definition into the canonical internal
|
|
9
4
|
* shape consumed by the compiler.
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
* Type guard: returns whether `value` is a {@link CompiledChannel} produced
|
|
4
|
-
* by {@link defineChannel}.
|
|
5
|
-
*/
|
|
6
|
-
export function isCompiledChannel(value) {
|
|
7
|
-
return (typeof value === "object" &&
|
|
8
|
-
value !== null &&
|
|
9
|
-
value.__kind === CHANNEL_SENTINEL);
|
|
10
|
-
}
|
|
1
|
+
import { isCompiledChannel } from "#channel/compiled-channel.js";
|
|
11
2
|
/**
|
|
12
3
|
* Normalizes one authored channel definition into the canonical internal
|
|
13
4
|
* shape consumed by the compiler.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
2
|
import type { SandboxDefinition } from "#public/definitions/sandbox.js";
|
|
3
|
-
|
|
3
|
+
type NormalizedSandboxDefinition = Readonly<Omit<SandboxDefinition, "backend">> & {
|
|
4
4
|
readonly backend?: SandboxBackend;
|
|
5
5
|
readonly description?: string;
|
|
6
6
|
};
|
|
@@ -13,3 +13,4 @@ export type NormalizedSandboxDefinition = Readonly<Omit<SandboxDefinition, "back
|
|
|
13
13
|
* access and the resulting backend is memoized.
|
|
14
14
|
*/
|
|
15
15
|
export declare function normalizeSandboxDefinition(value: unknown, message: string): NormalizedSandboxDefinition;
|
|
16
|
+
export {};
|
|
@@ -5,14 +5,14 @@ import type { InternalToolDefinitionWithExecuteFn } from "#shared/tool-definitio
|
|
|
5
5
|
* Identity is path-derived — the compiler stamps the filename slug onto
|
|
6
6
|
* the compiled entry. This shape never carries an authored `name`.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
type NormalizedAuthoredTool = Readonly<Omit<InternalToolDefinitionWithExecuteFn, "name">>;
|
|
9
9
|
/**
|
|
10
10
|
* Result of normalizing one authored tool default export. Either a real tool
|
|
11
11
|
* definition or a sentinel that disables a framework default. In both cases
|
|
12
12
|
* the disable target / runtime name is the authored file's slug, supplied by
|
|
13
13
|
* the compiler — this layer never sees a name.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
type NormalizedToolEntry = {
|
|
16
16
|
readonly kind: "tool";
|
|
17
17
|
readonly definition: NormalizedAuthoredTool;
|
|
18
18
|
} | {
|
|
@@ -25,3 +25,4 @@ export type NormalizedToolEntry = {
|
|
|
25
25
|
* Authored `name` fields are rejected — tool identity is path-derived.
|
|
26
26
|
*/
|
|
27
27
|
export declare function normalizeToolDefinition(value: unknown, message: string): NormalizedToolEntry;
|
|
28
|
+
export {};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registers a loaded channel module in the global cache so Rolldown-
|
|
3
|
-
* bundled schedule modules that import the same channel get the exact
|
|
4
|
-
* same route object instance.
|
|
5
|
-
*/
|
|
6
|
-
export declare function registerChannelModuleInCache(absolutePath: string, moduleDefault: unknown): void;
|
|
7
1
|
/**
|
|
8
2
|
* Loads one authored module namespace from disk during compile-time
|
|
9
3
|
* discovery. Concurrent loads of the same `modulePath` share a single
|
|
@@ -22,15 +22,6 @@ const RESOLVE_EXTENSIONS = [
|
|
|
22
22
|
];
|
|
23
23
|
const CHANNEL_MODULE_CACHE_KEY = "__ashChannelModuleCache__";
|
|
24
24
|
const CACHED_CHANNEL_PREFIX = "ash-cached-channel:";
|
|
25
|
-
/**
|
|
26
|
-
* Registers a loaded channel module in the global cache so Rolldown-
|
|
27
|
-
* bundled schedule modules that import the same channel get the exact
|
|
28
|
-
* same route object instance.
|
|
29
|
-
*/
|
|
30
|
-
export function registerChannelModuleInCache(absolutePath, moduleDefault) {
|
|
31
|
-
const cache = (globalThis[CHANNEL_MODULE_CACHE_KEY] ??= new Map());
|
|
32
|
-
cache.set(resolve(absolutePath), moduleDefault);
|
|
33
|
-
}
|
|
34
25
|
function getChannelModuleCache() {
|
|
35
26
|
return globalThis[CHANNEL_MODULE_CACHE_KEY];
|
|
36
27
|
}
|
|
@@ -32,10 +32,6 @@ export declare function expectProviderOptions(value: unknown, message: string):
|
|
|
32
32
|
* Rejects unexpected keys on one plain object.
|
|
33
33
|
*/
|
|
34
34
|
export declare function expectOnlyKnownKeys(record: Record<string, unknown>, knownKeys: readonly string[], message: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Returns one optional string property when present.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getOptionalStringProperty(record: Record<string, unknown>, key: string, message: string): string | undefined;
|
|
39
35
|
/**
|
|
40
36
|
* Returns one optional string-record property when present.
|
|
41
37
|
*/
|
|
@@ -64,16 +64,6 @@ export function expectOnlyKnownKeys(record, knownKeys, message) {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Returns one optional string property when present.
|
|
69
|
-
*/
|
|
70
|
-
export function getOptionalStringProperty(record, key, message) {
|
|
71
|
-
const value = record[key];
|
|
72
|
-
if (value === undefined) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
return expectString(value, message);
|
|
76
|
-
}
|
|
77
67
|
/**
|
|
78
68
|
* Returns one optional string-record property when present.
|
|
79
69
|
*/
|
|
@@ -8,22 +8,14 @@ type RolldownOutputAsset = {
|
|
|
8
8
|
readonly fileName: string;
|
|
9
9
|
readonly source: string | Uint8Array;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type RolldownOutput = {
|
|
12
12
|
readonly output: readonly [RolldownOutputChunk, ...(RolldownOutputChunk | RolldownOutputAsset)[]];
|
|
13
13
|
};
|
|
14
14
|
export type RolldownBuild = (options: Record<string, unknown>) => Promise<RolldownOutput>;
|
|
15
|
-
|
|
16
|
-
type RolldownModule = {
|
|
17
|
-
readonly build: RolldownBuild;
|
|
18
|
-
};
|
|
15
|
+
type RolldownParseAst = (sourceText: string, options?: Record<string, unknown> | null, filename?: string) => unknown;
|
|
19
16
|
type RolldownParseAstModule = {
|
|
20
17
|
readonly parseAst: RolldownParseAst;
|
|
21
18
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Loads Rolldown from Nitro's dependency tree so Ash does not carry a second
|
|
24
|
-
* native bundler package in its own install footprint.
|
|
25
|
-
*/
|
|
26
|
-
export declare function loadNitroRolldown(): Promise<RolldownModule>;
|
|
27
19
|
/**
|
|
28
20
|
* Loads Rolldown's parser from Nitro's dependency tree so workflow directive
|
|
29
21
|
* transforms can use the same bundler dependency without exposing it publicly.
|
|
@@ -6,7 +6,7 @@ let rolldownParseAstPromise;
|
|
|
6
6
|
* Loads Rolldown from Nitro's dependency tree so Ash does not carry a second
|
|
7
7
|
* native bundler package in its own install footprint.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
function loadNitroRolldown() {
|
|
10
10
|
rolldownPromise ??= (async () => {
|
|
11
11
|
const require = createRequire(import.meta.url);
|
|
12
12
|
const nitroRequire = createRequire(require.resolve("nitro/package.json"));
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import { type ScheduleDefinition } from "#public/definitions/schedule.js";
|
|
2
2
|
import { type SkillDefinition } from "#public/definitions/skill.js";
|
|
3
3
|
import { type InstructionsDefinition } from "#public/definitions/instructions.js";
|
|
4
|
-
/**
|
|
5
|
-
* Parsed markdown document with optional YAML frontmatter.
|
|
6
|
-
*/
|
|
7
|
-
export interface ParsedMarkdownDocument {
|
|
8
|
-
/**
|
|
9
|
-
* Whether the source started with a parsed frontmatter block.
|
|
10
|
-
*/
|
|
11
|
-
hasFrontmatter: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Parsed frontmatter object. Empty when the source does not include a
|
|
14
|
-
* frontmatter block.
|
|
15
|
-
*/
|
|
16
|
-
frontmatter: Record<string, unknown>;
|
|
17
|
-
/**
|
|
18
|
-
* Markdown body content after stripping the frontmatter delimiters.
|
|
19
|
-
*/
|
|
20
|
-
markdown: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Parses markdown with optional YAML frontmatter.
|
|
24
|
-
*/
|
|
25
|
-
export declare function parseMarkdownDocument(source: string): ParsedMarkdownDocument;
|
|
26
4
|
/**
|
|
27
5
|
* Lowers authored instructions prompt markdown into the shared public
|
|
28
6
|
* definition shape. Instructions identity is path-derived, so the lowered
|
|
@@ -38,7 +16,7 @@ export declare function lowerInstructionsMarkdown(markdown: string): Instruction
|
|
|
38
16
|
* Skill identity itself comes from the file path — the lowered definition
|
|
39
17
|
* never carries a `name`.
|
|
40
18
|
*/
|
|
41
|
-
|
|
19
|
+
interface LowerSkillMarkdownInput {
|
|
42
20
|
readonly description?: string;
|
|
43
21
|
readonly slug?: string;
|
|
44
22
|
}
|
|
@@ -64,3 +42,4 @@ export interface LowerSkillMarkdownInput {
|
|
|
64
42
|
*/
|
|
65
43
|
export declare function lowerScheduleMarkdown(source: string): ScheduleDefinition;
|
|
66
44
|
export declare function lowerSkillMarkdown(source: string, input?: LowerSkillMarkdownInput): SkillDefinition;
|
|
45
|
+
export {};
|
|
@@ -8,7 +8,7 @@ const CLOSED_FRONTMATTER_PATTERN = /^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/;
|
|
|
8
8
|
/**
|
|
9
9
|
* Parses markdown with optional YAML frontmatter.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
function parseMarkdownDocument(source) {
|
|
12
12
|
if (!grayMatter.test(source)) {
|
|
13
13
|
return {
|
|
14
14
|
hasFrontmatter: false,
|
|
@@ -6,13 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { type Span } from "#compiled/@opentelemetry/api/index.js";
|
|
8
8
|
import type { JsonObject } from "#shared/json.js";
|
|
9
|
-
/**
|
|
10
|
-
* Severity level for a single log record.
|
|
11
|
-
*
|
|
12
|
-
* Exposed so the logger API is composable with future sinks that want
|
|
13
|
-
* to filter or route by severity.
|
|
14
|
-
*/
|
|
15
|
-
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
16
9
|
/**
|
|
17
10
|
* Extra structured context attached to a log record.
|
|
18
11
|
*
|
|
@@ -20,7 +13,7 @@ export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
|
20
13
|
* before rendering, so a caller can pass `{ error }` and the full
|
|
21
14
|
* cause chain will flow through to the sink.
|
|
22
15
|
*/
|
|
23
|
-
|
|
16
|
+
type LogFields = Readonly<Record<string, unknown>>;
|
|
24
17
|
/**
|
|
25
18
|
* One namespaced logger handle. Returned by {@link createLogger}.
|
|
26
19
|
*
|
|
@@ -94,3 +87,4 @@ export declare function formatErrorHint(event: {
|
|
|
94
87
|
* non-active span should be annotated.
|
|
95
88
|
*/
|
|
96
89
|
export declare function recordErrorOnSpan(span: Span, error: unknown): void;
|
|
90
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CompiledAgentManifest } from "#compiler/manifest.js";
|
|
2
|
-
import { type VercelAshAgentSummary } from "#
|
|
2
|
+
import { type VercelAshAgentSummary } from "#internal/vercel-agent-summary.js";
|
|
3
3
|
/**
|
|
4
4
|
* Builds the public {@link VercelAshAgentSummary} from a compiled agent
|
|
5
5
|
* manifest. The result is the stable contract Vercel ingests from the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { resolveInstalledPackageInfo } from "#internal/application/package.js";
|
|
4
|
-
import { VERCEL_ASH_AGENT_SUMMARY_KIND, VERCEL_ASH_AGENT_SUMMARY_OUTPUT_PATH, VERCEL_ASH_AGENT_SUMMARY_VERSION, normalizeChannelKindForDisplay, } from "#
|
|
4
|
+
import { VERCEL_ASH_AGENT_SUMMARY_KIND, VERCEL_ASH_AGENT_SUMMARY_OUTPUT_PATH, VERCEL_ASH_AGENT_SUMMARY_VERSION, normalizeChannelKindForDisplay, } from "#internal/vercel-agent-summary.js";
|
|
5
5
|
/**
|
|
6
6
|
* Builds the public {@link VercelAshAgentSummary} from a compiled agent
|
|
7
7
|
* manifest. The result is the stable contract Vercel ingests from the
|
|
@@ -2,7 +2,7 @@ import { readFile } from "node:fs/promises";
|
|
|
2
2
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { createNitro } from "nitro/builder";
|
|
5
|
-
import { ASH_PACKAGE_NAME } from "#package-name.js";
|
|
5
|
+
import { ASH_PACKAGE_NAME } from "#internal/package-name.js";
|
|
6
6
|
import { resolvePackageSourceDirectoryPath, resolvePackageSourceFilePath, resolveWorkflowModulePath, } from "#internal/application/package.js";
|
|
7
7
|
import { prepareAshVersionedCacheDirectory, writeAshVersionedCacheMetadata, } from "#internal/application/cache-metadata.js";
|
|
8
8
|
import { resolveNitroBuildDirectory } from "#internal/application/paths.js";
|
|
@@ -12,7 +12,7 @@ import { computeChannelRouteRegistrations, syncChannelVirtualHandlers, } from "#
|
|
|
12
12
|
import { prepareApplicationHost } from "#internal/nitro/host/prepare-application-host.js";
|
|
13
13
|
import { prewarmAppSandboxes } from "#execution/sandbox/prewarm.js";
|
|
14
14
|
import { syncScheduleTaskHandlers } from "#internal/nitro/host/schedule-task-routes.js";
|
|
15
|
-
import { getDevelopmentEnvironmentFilePaths,
|
|
15
|
+
import { getDevelopmentEnvironmentFilePaths, loadDevelopmentEnvironmentFiles, } from "#cli/dev/environment.js";
|
|
16
16
|
const DEBOUNCE_MS = 120;
|
|
17
17
|
const WATCHED_LOCKFILE_NAMES = [
|
|
18
18
|
"pnpm-lock.yaml",
|
|
@@ -76,7 +76,7 @@ export async function startAuthoredSourceWatcher(input) {
|
|
|
76
76
|
console.log(`[ash:dev] change detected (${eventSummary} event${eventSummary === 1 ? "" : "s"}), rebuilding authored artifacts...`);
|
|
77
77
|
try {
|
|
78
78
|
if (hasEnvironmentChange) {
|
|
79
|
-
|
|
79
|
+
loadDevelopmentEnvironmentFiles(previousHost.appRoot);
|
|
80
80
|
}
|
|
81
81
|
const nextHost = await prepareApplicationHost(previousHost.appRoot);
|
|
82
82
|
await prewarmAppSandboxes({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createCrossChannelReceiveFn } from "#channel/cross-channel-receive.js";
|
|
1
|
+
import { createCrossChannelReceiveFn, toCrossChannelTargets, } from "#channel/cross-channel-receive.js";
|
|
2
2
|
import { createSendFn } from "#channel/send.js";
|
|
3
3
|
import { createGetSessionFn } from "#channel/session.js";
|
|
4
4
|
import { resolveNitroChannelRuntimeBundle } from "#internal/nitro/routes/runtime-stack.js";
|
|
@@ -41,7 +41,7 @@ export async function dispatchChannelRequest(event, routeKey, config) {
|
|
|
41
41
|
const adapter = matchedChannel.adapter ?? { kind: "channel" };
|
|
42
42
|
const send = createSendFn(bundle.runtime, adapter, matchedChannel.name);
|
|
43
43
|
const getSession = createGetSessionFn(bundle.runtime);
|
|
44
|
-
const receive = createCrossChannelReceiveFn(bundle.runtime, bundle.channels);
|
|
44
|
+
const receive = createCrossChannelReceiveFn(bundle.runtime, toCrossChannelTargets(bundle.channels));
|
|
45
45
|
const args = {
|
|
46
46
|
send,
|
|
47
47
|
getSession,
|
|
@@ -12,7 +12,6 @@ export function resolveNitroCompiledArtifactsSource(config) {
|
|
|
12
12
|
}
|
|
13
13
|
return createDiskRuntimeCompiledArtifactsSource(appRoot, {
|
|
14
14
|
moduleMapLoaderPath: config.moduleMapLoaderPath,
|
|
15
|
-
moduleMapLoadMode: "authored-source",
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
17
|
if (readBundledCompiledArtifacts() !== null) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* time. The banner builder omits any line whose binding the chunk already
|
|
9
9
|
* provides.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
interface NodeEsmCompatBannerOptions {
|
|
12
12
|
/** Whether to expose a CommonJS `require` shim alongside the path globals. */
|
|
13
13
|
readonly includeRequire?: boolean;
|
|
14
14
|
}
|
|
@@ -29,7 +29,7 @@ export declare class RuntimeRegistryError extends Error {
|
|
|
29
29
|
/**
|
|
30
30
|
* Options accepted by {@link RuntimeRegistry.register}.
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
interface RuntimeRegistryRegisterOptions {
|
|
33
33
|
/** Source location attached to the error if registration fails. */
|
|
34
34
|
readonly location?: RuntimeRegistryEntryLocation;
|
|
35
35
|
/** Override the default "duplicate name" error message. */
|
|
@@ -74,3 +74,4 @@ export declare class RuntimeRegistry<TEntry> {
|
|
|
74
74
|
*/
|
|
75
75
|
set(name: string, entry: TEntry): void;
|
|
76
76
|
}
|
|
77
|
+
export {};
|
|
@@ -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;
|