experimental-ash 0.45.0 → 0.47.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 +19 -0
- package/dist/docs/internals/discovery.md +1 -1
- package/dist/docs/internals/hooks.md +7 -10
- package/dist/docs/public/advanced/hooks.mdx +5 -68
- package/dist/docs/public/advanced/project-layout.md +14 -14
- package/dist/src/channel/adapter.js +1 -1
- package/dist/src/channel/routes.d.ts +9 -0
- package/dist/src/channel/send.js +1 -1
- package/dist/src/channel/types.d.ts +3 -0
- package/dist/src/client/index.d.ts +1 -1
- package/dist/src/client/message-reducer-types.d.ts +1 -0
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-response.d.ts +2 -2
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/output-schema.d.ts +12 -0
- package/dist/src/client/output-schema.js +1 -0
- package/dist/src/client/session.d.ts +2 -2
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +17 -2
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/index.js +4 -4
- package/dist/src/compiled/@vercel/oidc/index.js +2 -2
- package/dist/src/compiled/@vercel/sandbox/index.js +18 -18
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/define-hook.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +3 -1
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/world.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +16 -16
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +6 -0
- package/dist/src/compiled/@workflow/core/serialization.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/symbols.d.ts +6 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/define-hook.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/world/attributes.d.ts +110 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +415 -0
- package/dist/src/compiled/@workflow/world/hooks.d.ts +72 -0
- package/dist/src/compiled/@workflow/world/index.d.ts +25 -0
- package/dist/src/compiled/@workflow/world/index.js +1 -0
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +264 -0
- package/dist/src/compiled/@workflow/world/queue.d.ts +120 -0
- package/dist/src/compiled/@workflow/world/recovery.d.ts +13 -0
- package/dist/src/compiled/@workflow/world/runs.d.ts +144 -0
- package/dist/src/compiled/@workflow/world/serialization.d.ts +25 -0
- package/dist/src/compiled/@workflow/world/shared.d.ts +83 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +46 -0
- package/dist/src/compiled/@workflow/world/steps.d.ts +70 -0
- package/dist/src/compiled/@workflow/world/ulid.d.ts +35 -0
- package/dist/src/compiled/@workflow/world/waits.d.ts +21 -0
- package/dist/src/compiled/_chunks/node/{token-CoIbMZkq.js → token-ORseRyWn.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{coerce-BhzIW-Hm.js → coerce-BTuSKQr5.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{compat-DcEvieoj.js → compat-CG1hDp-3.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{core-XWIi7wKc.js → core-5Woff_dW.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{dist-Dl-X5RB3.js → dist-Chj-QcBs.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BlALLgSA.js +12 -0
- package/dist/src/compiled/_chunks/workflow/{schemas-DmgDnhW3.js → schemas-DWOIBELG.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/sleep-Bg0t23kF.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{symbols-DygIC1sj.js → symbols-u476uwyR.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-D9z1dMB6.js → token-CcaAeZHd.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-DV7rQw_t.js → token-nK4u-N7w.js} +1 -1
- package/dist/src/compiled/commander/index.js +1 -1
- package/dist/src/compiled/experimental-ai-sdk-code-mode/index.js +1 -1
- package/dist/src/compiled/gray-matter/index.js +1 -1
- package/dist/src/compiled/just-bash/index.js +1 -1
- package/dist/src/compiled/zod/index.js +1 -1
- package/dist/src/compiled/zod-validation-error/index.js +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +1 -0
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/manifest.d.ts +15 -0
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-instructions.d.ts +27 -4
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +3 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/remote-agent-node.d.ts +2 -0
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/context/dynamic-instruction-lifecycle.d.ts +26 -0
- package/dist/src/context/dynamic-instruction-lifecycle.js +1 -0
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/hook-lifecycle.js +1 -1
- package/dist/src/discover/filesystem.d.ts +2 -2
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/grammar.d.ts +16 -10
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +10 -7
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +2 -0
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +2 -0
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/next-driver-action.d.ts +1 -0
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/session.d.ts +1 -0
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +22 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/types.d.ts +15 -4
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.d.ts +3 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/helpers/markdown.d.ts +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/json-schema.d.ts +1 -6
- package/dist/src/internal/json-schema.js +1 -1
- package/dist/src/node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js +2 -2
- package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/client.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/version.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +1 -1
- package/dist/src/packages/ash-scaffold/src/channels.js +1 -1
- package/dist/src/protocol/message.d.ts +29 -3
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/public/channels/ash.js +1 -1
- package/dist/src/public/channels/slack/blocks.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +4 -19
- package/dist/src/public/definitions/instructions.d.ts +19 -7
- package/dist/src/public/definitions/instructions.js +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +9 -0
- package/dist/src/public/hooks/index.d.ts +1 -1
- package/dist/src/public/instructions/index.d.ts +4 -1
- package/dist/src/public/instructions/index.js +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +1 -0
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
- package/dist/src/runtime/agent/mock-structured-output.d.ts +5 -0
- package/dist/src/runtime/agent/mock-structured-output.js +1 -0
- package/dist/src/runtime/framework-tools/final-output.d.ts +14 -0
- package/dist/src/runtime/framework-tools/final-output.js +1 -0
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-dynamic-instructions.d.ts +4 -0
- package/dist/src/runtime/resolve-dynamic-instructions.js +1 -0
- package/dist/src/runtime/types.d.ts +13 -0
- package/dist/src/shared/agent-definition.d.ts +9 -0
- package/dist/src/shared/dynamic-tool-definition.d.ts +12 -0
- package/dist/src/shared/dynamic-tool-definition.js +1 -1
- package/dist/src/shared/json-schema.d.ts +7 -0
- package/dist/src/shared/json-schema.js +1 -0
- package/package.json +4 -4
- package/dist/src/compiled/@ai-sdk/anthropic/package.json +0 -7
- package/dist/src/compiled/@ai-sdk/google/package.json +0 -7
- package/dist/src/compiled/@ai-sdk/mcp/package.json +0 -7
- package/dist/src/compiled/@ai-sdk/openai/package.json +0 -7
- package/dist/src/compiled/@ai-sdk/otel/package.json +0 -7
- package/dist/src/compiled/@ai-sdk/provider/package.json +0 -7
- package/dist/src/compiled/@chat-adapter/slack/package.json +0 -7
- package/dist/src/compiled/@chat-adapter/state-memory/package.json +0 -7
- package/dist/src/compiled/@opentelemetry/api/package.json +0 -7
- package/dist/src/compiled/@standard-schema/spec/package.json +0 -7
- package/dist/src/compiled/@vercel/oidc/package.json +0 -7
- package/dist/src/compiled/@vercel/sandbox/package.json +0 -7
- package/dist/src/compiled/@workflow/core/_workflow-world.d.ts +0 -60
- package/dist/src/compiled/@workflow/core/package.json +0 -7
- package/dist/src/compiled/@workflow/errors/package.json +0 -7
- package/dist/src/compiled/_chunks/workflow/resume-hook-B2kqAsX6.js +0 -12
- package/dist/src/compiled/_chunks/workflow/sleep-kQ0UwHn0.js +0 -1
- package/dist/src/compiled/chat/package.json +0 -7
- package/dist/src/compiled/chokidar/package.json +0 -7
- package/dist/src/compiled/commander/package.json +0 -7
- package/dist/src/compiled/experimental-ai-sdk-code-mode/package.json +0 -7
- package/dist/src/compiled/gray-matter/package.json +0 -7
- package/dist/src/compiled/jose/package.json +0 -7
- package/dist/src/compiled/jsonc-parser/package.json +0 -7
- package/dist/src/compiled/just-bash/package.json +0 -7
- package/dist/src/compiled/picocolors/package.json +0 -7
- package/dist/src/compiled/turndown/package.json +0 -7
- package/dist/src/compiled/zod/package.json +0 -7
- package/dist/src/compiled/zod-validation-error/package.json +0 -7
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/version.js +0 -1
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/_vendor/partial-json-parser/parser.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/auth/workload-identity-auth.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/azure.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/api-promise.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/error.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/pagination.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/resource.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/streaming.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/uploads.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/error.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/decoders/line.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/detect-platform.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/errors.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/headers.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/parse.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/qs/formats.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/qs/stringify.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/qs/utils.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/request-options.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/shims.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/to-file.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/tslib.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/uploads.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/base64.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/bytes.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/env.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/log.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/path.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/query.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/sleep.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/uuid.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/values.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/AbstractChatCompletionRunner.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/AssistantStream.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ChatCompletionRunner.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ChatCompletionStream.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ChatCompletionStreamingRunner.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/EventStream.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ResponsesParser.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/RunnableFunction.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/Util.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/chatCompletionUtils.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/parser.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/responses/ResponseStream.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/admin.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/admin-api-keys.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/audit-logs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/certificates.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/data-retention.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/groups.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/users.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/invites.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/organization.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/api-keys.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/certificates.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/data-retention.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/groups/groups.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/groups/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/model-permissions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/projects.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/rate-limits.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/service-accounts.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/users/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/users/users.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/spend-alerts.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/usage.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/users/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/users/users.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/audio.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/speech.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/transcriptions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/translations.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/batches.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/assistants.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/beta.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/chatkit/chatkit.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/chatkit/sessions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/chatkit/threads.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/realtime/realtime.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/realtime/sessions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/realtime/transcription-sessions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/messages.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/runs/runs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/runs/steps.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/threads.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/chat.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/completions/completions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/completions/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/completions/messages.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/completions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/containers/containers.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/containers/files/content.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/containers/files/files.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/conversations/conversations.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/conversations/items.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/embeddings.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/evals/evals.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/evals/runs/output-items.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/evals/runs/runs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/files.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/alpha/alpha.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/alpha/graders.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/fine-tuning.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/jobs/jobs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/methods.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/graders/grader-models.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/graders/graders.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/images.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/models.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/moderations.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/realtime/calls.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/realtime/client-secrets.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/realtime/realtime.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/responses/input-items.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/responses/input-tokens.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/responses/responses.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/shared.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/content.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/skills.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/versions/content.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/versions/versions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/uploads/parts.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/uploads/uploads.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/vector-stores/file-batches.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/vector-stores/files.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/vector-stores/vector-stores.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/videos.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/webhooks/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/webhooks/webhooks.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/webhooks.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/streaming.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# experimental-ash
|
|
2
2
|
|
|
3
|
+
## 0.47.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f12c464: Ash message turns can now request deterministic structured output with `outputSchema`; fulfilled turns emit `result.completed` and client results expose typed `data`. Agents may also declare task-mode `outputSchema` for structured subagent, schedule, and job results.
|
|
8
|
+
|
|
9
|
+
## 0.46.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 0d26330: Dynamic instructions can now be authored with `defineDynamic` + `defineInstructions` in `agent/instructions/`, matching the pattern for dynamic tools and skills. Resolvers subscribe to lifecycle events (`session.started`, `turn.started`, `step.started`) and return branded `defineInstructions(...)` entries containing `modelContext` (model messages) or `markdown` (lowered to system messages). The `agent/instructions/` directory also supports static `.md` files alongside dynamic `.ts` resolvers. The existing singular `agent/instructions.md` and `agent/instructions.ts` forms continue to work unchanged.
|
|
14
|
+
- 4cdc490: Remove `modelContext` from `LifecycleHookResult`. Lifecycle hooks are now side-effect-only and cannot inject model messages. Use `defineDynamic` + `defineInstructions` in `agent/instructions/` to contribute runtime model messages instead.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- edebeec: Cancel the internal durable session tail stream after reading the latest snapshot and bound session hydration reads with a 10s timeout so turn startup does not leave workflow stream reads waiting indefinitely for a future chunk.
|
|
19
|
+
- a944089: Fix session-killing "assistant message prefill" error on long conversations. When compaction reduced the recent window to messages trailing with an assistant response (e.g. deferred-input continuations where no user message was appended), the model call was rejected by providers that don't support assistant prefill. A synthetic user message is now appended to ensure the conversation always resumes from a user turn.
|
|
20
|
+
- c890c00: Upgrade `@workflow/core`, `@workflow/world`, and `@workflow/world-local` to the latest betas. This picks up the upstream fix for cross-run writable stream encryption keys (a child run writing into another run's stream now resolves the owning run's key correctly), letting us drop the ash-side serialization source patch we previously vendored on top of `@workflow/core`.
|
|
21
|
+
|
|
3
22
|
## 0.45.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -13,7 +13,7 @@ Discovery answers: given an app root and agent root, what authored sources exist
|
|
|
13
13
|
|
|
14
14
|
`discoverAgent()` reads the agent root, sorts entries by name (for stable manifest ordering), and scans each slot:
|
|
15
15
|
|
|
16
|
-
- `instructions.md` / `instructions.{ts,...}` — instructions prompt source. The legacy `system.{md,ts,...}` slot is still discovered as a fallback (deprecation warning).
|
|
16
|
+
- `instructions.md` / `instructions.{ts,...}` / `instructions/` — instructions prompt source. Supports a flat file or a directory of `.md` and `.ts` files (including `defineDynamic` resolvers for runtime-resolved model messages). The legacy `system.{md,ts,...}` slot is still discovered as a fallback (deprecation warning).
|
|
17
17
|
- `agent.ts` — optional config module (reference only)
|
|
18
18
|
- `tools/` — module-backed, never imported. File stem becomes runtime tool name.
|
|
19
19
|
- `hooks/` — module-backed lifecycle and stream-event subscribers, recursively discovered. Path-relative slug becomes the hook id.
|
|
@@ -49,9 +49,9 @@ defineHook({
|
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
The split between `lifecycle:` and `events:` is structural so the
|
|
52
|
-
contract is explicit at the call site.
|
|
53
|
-
|
|
54
|
-
to
|
|
52
|
+
contract is explicit at the call site. Both are side-effect-only — hooks
|
|
53
|
+
cannot inject model context. Use `defineDynamic` + `defineInstructions`
|
|
54
|
+
in `agent/instructions/` to contribute runtime model messages.
|
|
55
55
|
|
|
56
56
|
## Pipeline
|
|
57
57
|
|
|
@@ -110,10 +110,7 @@ Stages, in order:
|
|
|
110
110
|
flag **before** running the chain so a thrown hook does not retry on
|
|
111
111
|
the next turn — `lifecycle.session` errors are terminal session
|
|
112
112
|
failures (`session.failed`).
|
|
113
|
-
2. **`lifecycle.turn`** runs sequentially.
|
|
114
|
-
`{ modelContext? }`. Contributions from session and turn are
|
|
115
|
-
concatenated; the resulting `modelContext` becomes a one-shot
|
|
116
|
-
addition to the next model call's message list. A thrown hook is
|
|
113
|
+
2. **`lifecycle.turn`** runs sequentially. A thrown hook is
|
|
117
114
|
caught here and lowered into a recoverable `turn.failed` cascade
|
|
118
115
|
(`session.started` once → `turn.started` → `message.received` →
|
|
119
116
|
`step.failed` → `turn.failed` → `session.waiting`).
|
|
@@ -188,8 +185,8 @@ The `discover/discover-subagent.ts` path walks each local subagent's
|
|
|
188
185
|
|
|
189
186
|
```
|
|
190
187
|
dispatchHookLifecycle():
|
|
191
|
-
lifecycle.session hooks (once per session,
|
|
192
|
-
lifecycle.turn hooks (once per turn,
|
|
188
|
+
lifecycle.session hooks (once per session, side-effect-only)
|
|
189
|
+
lifecycle.turn hooks (once per turn, side-effect-only)
|
|
193
190
|
|
|
194
191
|
emitTurnPreamble() via handleEvent:
|
|
195
192
|
handleEvent(session.started) → emit, hooks, dynamic tool resolvers
|
|
@@ -218,7 +215,7 @@ emitStepActions() via handleEvent:
|
|
|
218
215
|
`src/runtime/resolve-hook.ts` ⇄ `runtime/resolve-hook.test.ts`).
|
|
219
216
|
- Lifecycle dispatcher behavior is covered by
|
|
220
217
|
`src/context/hook-lifecycle.integration.test.ts` (synthetic context,
|
|
221
|
-
session/turn
|
|
218
|
+
session/turn lifecycle dispatch, recoverable turn-failed path,
|
|
222
219
|
stream-event fan-out, error propagation).
|
|
223
220
|
- Discovery integration is folded into
|
|
224
221
|
`src/discover/agent.integration.test.ts` (recursive walk,
|
|
@@ -55,7 +55,7 @@ The slug is the path-relative basename: `agent/hooks/audit.ts` → `"audit"`,
|
|
|
55
55
|
A hook file declares two kinds of subscribers under named maps:
|
|
56
56
|
|
|
57
57
|
- `lifecycle: { session?, turn? }` — runs **before** the harness step.
|
|
58
|
-
|
|
58
|
+
Side-effect-only.
|
|
59
59
|
- `events: { ... }` — runs **after** Ash has accepted a stream event
|
|
60
60
|
and written it to the durable stream. Observe-only.
|
|
61
61
|
|
|
@@ -115,9 +115,7 @@ it includes `{ output, toolName, connectionToolName, callId }` with
|
|
|
115
115
|
Lifecycle hooks share one signature:
|
|
116
116
|
|
|
117
117
|
```ts
|
|
118
|
-
type LifecycleHook = (
|
|
119
|
-
ctx: HookContext,
|
|
120
|
-
) => void | { modelContext?: readonly ModelMessage[] } | Promise<…>;
|
|
118
|
+
type LifecycleHook = (ctx: HookContext) => void | Promise<void>;
|
|
121
119
|
```
|
|
122
120
|
|
|
123
121
|
Session and turn metadata are available on `ctx.session`. For example,
|
|
@@ -127,16 +125,9 @@ Session and turn metadata are available on `ctx.session`. For example,
|
|
|
127
125
|
model turn. `lifecycle.turn` runs **once per fresh delivery** — tool-loop
|
|
128
126
|
continuations and HITL resumes do not re-fire it.
|
|
129
127
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
contribute the same `modelContext` shape through `SendPayload`;
|
|
134
|
-
channel-provided messages appear before lifecycle hook messages.
|
|
135
|
-
|
|
136
|
-
Browser UIs can contribute one-turn page state through `useAshAgent()`
|
|
137
|
-
`prepareSend` and `clientContext`. That client context is merged before
|
|
138
|
-
runtime lifecycle hook context, so use it for page state and use runtime hooks
|
|
139
|
-
for server-side policy and durable context.
|
|
128
|
+
Hooks are side-effect-only — they cannot inject model context. To
|
|
129
|
+
contribute runtime model messages, use `defineDynamic` +
|
|
130
|
+
`defineInstructions` in `agent/instructions/`.
|
|
140
131
|
|
|
141
132
|
### Seed durable context
|
|
142
133
|
|
|
@@ -161,60 +152,6 @@ export default defineHook({
|
|
|
161
152
|
The profile is now visible to every tool, provider, and subsequent hook
|
|
162
153
|
through `githubProfile.get()`.
|
|
163
154
|
|
|
164
|
-
### Inject ephemeral system text
|
|
165
|
-
|
|
166
|
-
```ts
|
|
167
|
-
// agent/hooks/incident-context.ts
|
|
168
|
-
import { defineHook } from "experimental-ash/hooks";
|
|
169
|
-
import { fetchActiveIncident } from "../lib/linear";
|
|
170
|
-
|
|
171
|
-
export default defineHook({
|
|
172
|
-
lifecycle: {
|
|
173
|
-
async turn(ctx) {
|
|
174
|
-
const incident = await fetchActiveIncident();
|
|
175
|
-
if (incident === null) return;
|
|
176
|
-
|
|
177
|
-
return {
|
|
178
|
-
modelContext: [
|
|
179
|
-
{
|
|
180
|
-
role: "system",
|
|
181
|
-
content: `Active incident: ${incident.title} (priority ${incident.priority}).`,
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
};
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
});
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
`modelContext` messages are appended in registry order and visible to
|
|
191
|
-
the next model call only — never persisted.
|
|
192
|
-
|
|
193
|
-
### Once-per-session text
|
|
194
|
-
|
|
195
|
-
```ts
|
|
196
|
-
// agent/hooks/welcome.ts
|
|
197
|
-
import { defineHook } from "experimental-ash/hooks";
|
|
198
|
-
|
|
199
|
-
export default defineHook({
|
|
200
|
-
lifecycle: {
|
|
201
|
-
async session(ctx) {
|
|
202
|
-
return {
|
|
203
|
-
modelContext: [
|
|
204
|
-
{
|
|
205
|
-
role: "system",
|
|
206
|
-
content: `Greet the user by name (${await lookupName(ctx.session.id)}).`,
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
};
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
});
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
The session contribution lands in `modelContext` for the **first** model
|
|
216
|
-
call only. Subsequent turns proceed without it.
|
|
217
|
-
|
|
218
155
|
## Stream Events
|
|
219
156
|
|
|
220
157
|
Side-effect-only handlers for accepted runtime events. Subscribe by
|
|
@@ -32,20 +32,20 @@ my-agent/
|
|
|
32
32
|
|
|
33
33
|
## Slot Guide
|
|
34
34
|
|
|
35
|
-
| Path
|
|
36
|
-
|
|
|
37
|
-
| `instructions.md` or `instructions
|
|
38
|
-
| `agent.ts`
|
|
39
|
-
| `instrumentation.ts`
|
|
40
|
-
| `channels/`
|
|
41
|
-
| `connections/`
|
|
42
|
-
| `hooks/`
|
|
43
|
-
| `skills/`
|
|
44
|
-
| `lib/`
|
|
45
|
-
| `sandbox/` or `sandbox.ts`
|
|
46
|
-
| `tools/`
|
|
47
|
-
| `schedules/`
|
|
48
|
-
| `subagents/`
|
|
35
|
+
| Path | Purpose | Notes |
|
|
36
|
+
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `instructions.md`, `instructions.ts`, or `instructions/` | Base instructions prompt | A flat file or a directory of `.md` and `.ts` files. Static sources are composed at build time; dynamic sources (using `defineDynamic` + `defineInstructions`) resolve at runtime and inject model messages. The legacy `system.{md,ts,...}` slot is still discovered with a deprecation warning. |
|
|
38
|
+
| `agent.ts` | Runtime config | Model, metadata, build, compaction, modelOptions |
|
|
39
|
+
| `instrumentation.ts` | Telemetry config | OTel exporter setup and AI SDK span settings; auto-discovered and run before agent code |
|
|
40
|
+
| `channels/` | HTTP or messaging entrypoints | Root-only today |
|
|
41
|
+
| `connections/` | External service connections (MCP) | Each file defines one connection; name derived from filename |
|
|
42
|
+
| `hooks/` | Lifecycle and stream-event subscribers | Module-backed only. Recursive directories supported. See [Hooks](./hooks.mdx). |
|
|
43
|
+
| `skills/` | On-demand procedures and capability packs | Flat markdown, module-backed skills, or packaged skills |
|
|
44
|
+
| `lib/` | Shared authored helper code | Import-only source, not mounted into the workspace |
|
|
45
|
+
| `sandbox/` or `sandbox.ts` | The agent's single sandbox. Use top-level `sandbox.ts` for a definition-only override; use `sandbox/sandbox.ts` + optional `sandbox/workspace/**` when you also want seeded files. Framework default applies when neither is authored. | Supported on the root agent and local subagents |
|
|
46
|
+
| `tools/` | Typed executable integrations | Module-backed only |
|
|
47
|
+
| `schedules/` | Recurring jobs; each schedule is a single `<name>.ts` (with `defineSchedule({...})` as the default export) or `<name>.md` (frontmatter `cron:` plus the prompt as the body). Recursive nesting supported. | Root-only today |
|
|
48
|
+
| `subagents/` | Specialist child agents | Each child is its own local package |
|
|
49
49
|
|
|
50
50
|
## Root Agent Example
|
|
51
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";const log=createLogger(`channel.adapter`);function defaultDeliverResult(e){
|
|
1
|
+
import{createLogger}from"#internal/logging.js";const log=createLogger(`channel.adapter`);function defaultDeliverResult(e){let{inputResponses:t,message:n,modelContext:r,outputSchema:i}=e;if(!(n===void 0&&!t?.length&&!r?.length&&i===void 0))return{inputResponses:t,message:n,modelContext:r,outputSchema:i}}function getAdapterKind(e){return e.kind}async function callAdapterEventHandler(e,n,r){let i=e[n.type];if(i===void 0)return n;try{await i(`data`in n?n.data:void 0,r)}catch(r){log.error(`adapter event handler threw — event swallowed`,{adapterKind:getAdapterKind(e),eventType:n.type,error:r})}return n}export{callAdapterEventHandler,defaultDeliverResult,getAdapterKind};
|
|
@@ -4,6 +4,7 @@ import type { SessionAuthContext, SessionCallback } from "#channel/types.js";
|
|
|
4
4
|
import type { InputResponse } from "#runtime/input/types.js";
|
|
5
5
|
import type { Session } from "#channel/session.js";
|
|
6
6
|
import type { RunMode } from "#shared/run-mode.js";
|
|
7
|
+
import type { JsonObject } from "#shared/json.js";
|
|
7
8
|
export interface RouteHandlerArgs<TState = undefined> {
|
|
8
9
|
send: SendFn<TState>;
|
|
9
10
|
getSession: GetSessionFn;
|
|
@@ -30,6 +31,14 @@ export interface SendPayload {
|
|
|
30
31
|
* other roles land after the user message.
|
|
31
32
|
*/
|
|
32
33
|
readonly modelContext?: readonly ModelMessage[];
|
|
34
|
+
/**
|
|
35
|
+
* Run-scoped JSON schema the turn's result must match. Orthogonal to
|
|
36
|
+
* {@link BaseSendOptions.mode}: a schema is enforced in either mode. Mode
|
|
37
|
+
* only decides what happens when the agent fails to produce it — a
|
|
38
|
+
* conversation run parks recoverably and waits for more input, a task run
|
|
39
|
+
* (which cannot wait) finishes as an error.
|
|
40
|
+
*/
|
|
41
|
+
readonly outputSchema?: JsonObject;
|
|
33
42
|
}
|
|
34
43
|
export type SendFn<TState = undefined> = (input: string | UserContent | SendPayload, options: SendOptions<TState>) => Promise<Session>;
|
|
35
44
|
type BaseSendOptions = {
|
package/dist/src/channel/send.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSession}from"#channel/session.js";import{createLogger}from"#internal/logging.js";import{isRuntimeNoActiveSessionError}from"#execution/runtime-errors.js";import{serializeUrlFilePart}from"#internal/attachments/url-refs.js";const log=createLogger(`channel.send`);function createSendFn(t,r,i){return async(a,o)=>{let s=o.auth,c=o.callback,l=o.mode??`conversation`,u=o.state,d=o.continuationToken,f=`${i}:${d}`,{message:p,inputResponses:m,modelContext:h}=normalizeSendInput(a),
|
|
1
|
+
import{createSession}from"#channel/session.js";import{createLogger}from"#internal/logging.js";import{isRuntimeNoActiveSessionError}from"#execution/runtime-errors.js";import{serializeUrlFilePart}from"#internal/attachments/url-refs.js";const log=createLogger(`channel.send`);function createSendFn(t,r,i){return async(a,o)=>{let s=o.auth,c=o.callback,l=o.mode??`conversation`,u=o.state,d=o.continuationToken,f=`${i}:${d}`,{message:p,inputResponses:m,modelContext:h,outputSchema:g}=normalizeSendInput(a),_=serializeUrlFilePartsInMessage(p);try{let{sessionId:n}=await t.deliver({auth:s,continuationToken:f,payload:{inputResponses:m,message:_,modelContext:h,outputSchema:g}});return createSession(n,d,t)}catch(e){isRuntimeNoActiveSessionError(e)||log.warn(`deliver failed, falling back to starting a new session`,{continuationToken:f})}if(m&&m.length>0)throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`);let v=u?{...r,state:{...r.state,...u}}:r;return createSession((await t.run({adapter:v,auth:s,capabilities:l===`conversation`?{requestInput:!0}:void 0,channelName:i,callback:c,continuationToken:f,input:{message:_??``,modelContext:h,outputSchema:g},mode:l})).sessionId,d,t)}}function serializeUrlFilePartsInMessage(e){if(e===void 0||typeof e==`string`)return e;let t=!1,n=e.map(e=>e.type===`file`&&e.data instanceof URL&&e.data.protocol!==`data:`?(t=!0,{...e,data:serializeUrlFilePart(e.data)}):e);return t?n:e}function normalizeSendInput(e){return typeof e==`string`||Array.isArray(e)?{message:e}:e}export{createSendFn};
|
|
@@ -4,6 +4,7 @@ import type { RunMode } from "#shared/run-mode.js";
|
|
|
4
4
|
import type { RuntimeActionResult } from "#runtime/actions/types.js";
|
|
5
5
|
import type { InputRequest, InputResponse } from "#runtime/input/types.js";
|
|
6
6
|
import type { ChannelAdapter } from "#channel/adapter.js";
|
|
7
|
+
import type { JsonObject } from "#shared/json.js";
|
|
7
8
|
export type { ContextAccessor } from "#context/key.js";
|
|
8
9
|
export type { ChannelInstrumentationProjection } from "#channel/instrumentation.js";
|
|
9
10
|
/**
|
|
@@ -70,6 +71,7 @@ export interface DeliverPayload {
|
|
|
70
71
|
readonly inputResponses?: readonly InputResponse[];
|
|
71
72
|
readonly message?: string | UserContent;
|
|
72
73
|
readonly modelContext?: readonly ModelMessage[];
|
|
74
|
+
readonly outputSchema?: JsonObject;
|
|
73
75
|
readonly [key: string]: unknown;
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
@@ -214,6 +216,7 @@ export interface RunInput {
|
|
|
214
216
|
readonly input: {
|
|
215
217
|
readonly message: string | UserContent;
|
|
216
218
|
readonly modelContext?: readonly ModelMessage[];
|
|
219
|
+
readonly outputSchema?: JsonObject;
|
|
217
220
|
};
|
|
218
221
|
readonly mode: RunMode;
|
|
219
222
|
readonly parent?: SessionParent;
|
|
@@ -6,7 +6,7 @@ export { ClientSession } from "#client/session.js";
|
|
|
6
6
|
export type { ClientAuth, ClientOptions, HeadersValue, HealthResult, MessageResult, OpenStreamOptions, SendMessageOptions, SendTurnInput, SessionState, TokenValue, } from "#client/types.js";
|
|
7
7
|
export type { AshAgentReducer, AshAgentReducerEvent, ClientInputRespondedEvent, ClientMessageFailedEvent, ClientMessageSubmittedEvent, } from "#client/reducer.js";
|
|
8
8
|
export type { AshMessageData, AshDynamicToolPart, AshMessageInputRequest, AshMessage, AshMessageMetadata, AshMessagePart, AshMessageToolMetadata, } from "#client/message-reducer.js";
|
|
9
|
-
export type { ActionResultStreamEvent, ActionsRequestedStreamEvent, AssistantStepFinishReason, CompactionCompletedStreamEvent, CompactionRequestedStreamEvent, AuthorizationCompletedStreamEvent, ConnectionAuthorizationOutcome, AuthorizationRequiredStreamEvent, HandleMessageStreamEvent, InputRequestedStreamEvent, MessageAppendedStreamEvent, MessageCompletedStreamEvent, MessageReceivedStreamEvent, ReasoningAppendedStreamEvent, ReasoningCompletedStreamEvent, SessionCompletedStreamEvent, SessionFailedStreamEvent, SessionStartedStreamEvent, SessionWaitingStreamEvent, StepCompletedStreamEvent, StepFailedStreamEvent, StepStartedStreamEvent, SubagentCalledStreamEvent, SubagentChildEventStreamEvent, SubagentCompletedStreamEvent, SubagentStartedStreamEvent, TurnCompletedStreamEvent, TurnFailedStreamEvent, TurnStartedStreamEvent, } from "#protocol/message.js";
|
|
9
|
+
export type { ActionResultStreamEvent, ActionsRequestedStreamEvent, AssistantStepFinishReason, CompactionCompletedStreamEvent, CompactionRequestedStreamEvent, AuthorizationCompletedStreamEvent, ConnectionAuthorizationOutcome, AuthorizationRequiredStreamEvent, HandleMessageStreamEvent, InputRequestedStreamEvent, MessageAppendedStreamEvent, MessageCompletedStreamEvent, MessageReceivedStreamEvent, ReasoningAppendedStreamEvent, ReasoningCompletedStreamEvent, ResultCompletedStreamEvent, SessionCompletedStreamEvent, SessionFailedStreamEvent, SessionStartedStreamEvent, SessionWaitingStreamEvent, StepCompletedStreamEvent, StepFailedStreamEvent, StepStartedStreamEvent, SubagentCalledStreamEvent, SubagentChildEventStreamEvent, SubagentCompletedStreamEvent, SubagentStartedStreamEvent, TurnCompletedStreamEvent, TurnFailedStreamEvent, TurnStartedStreamEvent, } from "#protocol/message.js";
|
|
10
10
|
export { isCurrentTurnBoundaryEvent } from "#protocol/message.js";
|
|
11
11
|
export type { InputOption, InputRequest, InputResponse } from "#runtime/input/types.js";
|
|
12
12
|
export { inputOptionSchema, inputRequestSchema, inputResponseSchema, isInputRequest, isInputResponse, } from "#runtime/input/types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function defaultMessageReducer(){return{initial(){return{messages:[]}},reduce(e,t){return reduceMessageData(e,t)}}}function reduceMessageData(e,t){switch(t.type){case`client.message.submitted`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`submitted`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.message.failed`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`failed`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.input.responded`:{let n=e;for(let e of t.data.responses)n=respondToInputRequest(n,e);return n}case`message.received`:return upsertMessage(e,{id:`${t.data.turnId}:user`,metadata:{status:`complete`,turnId:t.data.turnId},parts:[{type:`text`,text:t.data.message,state:`done`}],role:`user`});case`step.started`:return updateAssistantMessage(e,t.data.turnId,e=>ensureStepStartPart(e,t.data.stepIndex));case`reasoning.appended`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`streaming`,stepIndex:t.data.stepIndex,text:t.data.reasoningSoFar,type:`reasoning`}));case`reasoning.completed`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.reasoning,type:`reasoning`}));case`actions.requested`:{let n=e;for(let e of t.data.actions){let r=normalizeActionRequest(e);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{input:`input`in e?e.input:void 0,state:`input-available`,stepIndex:t.data.stepIndex,toolCallId:e.callId,toolMetadata:createToolMetadata(r),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`input.requested`:{let n=e;for(let e of t.data.requests){let r=normalizeActionRequest(e.action);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{approval:{id:e.requestId},input:e.action.input,state:`approval-requested`,stepIndex:t.data.stepIndex,toolCallId:e.action.callId,toolMetadata:createToolMetadata(r,{inputRequest:toMessageInputRequest(e)}),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`action.result`:{let n=normalizeActionResult(t.data.result),r=findToolPart(e,t.data.result.callId),i=t.data.error?.code===`TOOL_EXECUTION_DENIED`,a=t.data.status===`failed`&&!i,o=r?.approval?.id??t.data.result.callId,s=mergeToolMetadata(r?.toolMetadata,createToolMetadata(n)),c={input:r?.input,stepIndex:t.data.stepIndex,toolCallId:t.data.result.callId,toolMetadata:s,toolName:r?.toolName??n.toolName,type:`dynamic-tool`},l;return l=i?{...c,approval:{approved:!1,id:o,reason:t.data.error?.message},state:`output-denied`}:a?{...c,approval:approvedApproval(r),errorText:t.data.error?.message??stringifyUnknown(t.data.result.output),state:`output-error`}:{...c,approval:approvedApproval(r),output:t.data.result.output,state:`output-available`},r===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),l)):updateToolPart(e,t.data.result.callId,l)}case`message.appended`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`streaming`,stepIndex:t.data.stepIndex,text:t.data.messageSoFar,type:`text`}));case`message.completed`:return updateAssistantMessage(e,t.data.turnId,e=>t.data.message===null?completeExistingTextPart(e):upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.message,type:`text`}));case`turn.completed`:return updateAssistantMetadata(e,t.data.turnId,{status:`complete`});case`turn.failed`:case`session.failed`:return e;default:return e}}function respondToInputRequest(e,t){let n=findToolPartByApprovalId(e,t.requestId);if(!n)return e;let r={id:t.requestId};return t.text!==void 0&&(r.reason=t.text),updateToolPart(e,n.toolCallId,{approval:r,input:n.input,state:`approval-responded`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:mergeToolMetadata(n.toolMetadata,{ash:{inputResponse:t,kind:n.toolMetadata?.ash?.kind??`unknown`,name:n.toolMetadata?.ash?.name??n.toolName}}),toolName:n.toolName,type:`dynamic-tool`})}function updateAssistantMessage(e,t,n){return upsertMessage(e,n(e.messages.find(e=>e.role===`assistant`&&e.metadata?.turnId===t)??createAssistantMessage(t)))}function updateAssistantMetadata(e,t,n){return updateAssistantMessage(e,t,e=>({...e,metadata:{...e.metadata,...n}}))}function createAssistantMessage(e){return{id:`${e}:assistant`,metadata:{status:`streaming`,turnId:e},parts:[],role:`assistant`}}function ensureStepStartPart(e,t){let n=e.parts.filter(e=>e.type===`step-start`).length;if(n>t)return e;let r=t-n+1;return{...e,parts:[...e.parts,...Array.from({length:r},()=>({type:`step-start`}))]}}function upsertPart(e,t){let n=e.parts.findIndex(e=>partKey(e)===partKey(t)),r=n===-1?[...e.parts,t]:[...e.parts.slice(0,n),t,...e.parts.slice(n+1)];return{...e,metadata:{...e.metadata,status:t.type===`text`&&t.state===`done`?`complete`:`streaming`},parts:r}}function completeExistingTextPart(e){let t=findLastIndex(e.parts,e=>e.type===`text`);if(t===-1)return e;let n=e.parts[t];return n?.type===`text`?{...e,metadata:{...e.metadata,status:`complete`},parts:[...e.parts.slice(0,t),{...n,state:`done`},...e.parts.slice(t+1)]}:e}function updateToolPart(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.parts.some(e=>e.type===`dynamic-tool`&&e.toolCallId===t));return r?upsertMessage(e,upsertPart(r,n)):e}function findToolPart(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.toolCallId===t)return e}function findToolPartByApprovalId(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.approval?.id===t)return e}function partKey(e){switch(e.type){case`text`:return`text:${e.stepIndex??0}`;case`reasoning`:return`reasoning:${e.stepIndex??0}`;case`step-start`:return`step-start`;case`dynamic-tool`:return`dynamic-tool:${e.toolCallId}`}}function upsertMessage(e,t){let n=e.messages.findIndex(e=>e.id===t.id);return n===-1?{messages:[...e.messages,t]}:{messages:[...e.messages.slice(0,n),t,...e.messages.slice(n+1)]}}function toMessageInputRequest(e){return{allowFreeform:e.allowFreeform,display:e.display,options:e.options,prompt:e.prompt,requestId:e.requestId}}function createToolMetadata(e,t){return{ash:{inputRequest:t?.inputRequest,kind:e.kind,name:e.name}}}function mergeToolMetadata(e,t){let n=t.ash?.kind??e?.ash?.kind??`unknown`,r=t.ash?.name??e?.ash?.name??`unknown`;return{ash:{...e?.ash,...t.ash,inputRequest:t.ash?.inputRequest??e?.ash?.inputRequest,inputResponse:t.ash?.inputResponse??e?.ash?.inputResponse,kind:n,name:r}}}function approvedApproval(e){if(e?.approval?.id)return{approved:!0,id:e.approval.id,isAutomatic:e.approval.isAutomatic,reason:e.approval.reason}}function normalizeActionRequest(e){switch(e.kind){case`load-skill`:return{kind:`load-skill`,name:`load_skill`,toolName:`ash:load-skill`};case`tool-call`:return{kind:`tool-call`,name:e.toolName,toolName:e.toolName};case`subagent-call`:return{kind:`subagent-call`,name:e.subagentName,toolName:`ash:subagent:${e.subagentName}`};case`remote-agent-call`:return{kind:`subagent-call`,name:e.remoteAgentName,toolName:`ash:subagent:${e.remoteAgentName}`}}}function normalizeActionResult(e){switch(e.kind){case`load-skill-result`:return{kind:`load-skill`,name:e.name??`load_skill`,toolName:`ash:load-skill`};case`tool-result`:return{kind:`tool-call`,name:e.toolName,toolName:e.toolName};case`subagent-result`:return{kind:`subagent-call`,name:e.subagentName,toolName:`ash:subagent:${e.subagentName}`}}}function optimisticUserMessageId(e){return`optimistic:${e}:user`}function stringifyUnknown(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return`Action failed.`}}function findLastIndex(e,t){for(let n=e.length-1;n>=0;--n)if(t(e[n]))return n;return-1}export{defaultMessageReducer};
|
|
1
|
+
function defaultMessageReducer(){return{initial(){return{messages:[]}},reduce(e,t){return reduceMessageData(e,t)}}}function reduceMessageData(e,t){switch(t.type){case`client.message.submitted`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`submitted`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.message.failed`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`failed`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.input.responded`:{let n=e;for(let e of t.data.responses)n=respondToInputRequest(n,e);return n}case`message.received`:return upsertMessage(e,{id:`${t.data.turnId}:user`,metadata:{status:`complete`,turnId:t.data.turnId},parts:[{type:`text`,text:t.data.message,state:`done`}],role:`user`});case`step.started`:return updateAssistantMessage(e,t.data.turnId,e=>ensureStepStartPart(e,t.data.stepIndex));case`reasoning.appended`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`streaming`,stepIndex:t.data.stepIndex,text:t.data.reasoningSoFar,type:`reasoning`}));case`reasoning.completed`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.reasoning,type:`reasoning`}));case`actions.requested`:{let n=e;for(let e of t.data.actions){let r=normalizeActionRequest(e);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{input:`input`in e?e.input:void 0,state:`input-available`,stepIndex:t.data.stepIndex,toolCallId:e.callId,toolMetadata:createToolMetadata(r),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`input.requested`:{let n=e;for(let e of t.data.requests){let r=normalizeActionRequest(e.action);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{approval:{id:e.requestId},input:e.action.input,state:`approval-requested`,stepIndex:t.data.stepIndex,toolCallId:e.action.callId,toolMetadata:createToolMetadata(r,{inputRequest:toMessageInputRequest(e)}),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`action.result`:{let n=normalizeActionResult(t.data.result),r=findToolPart(e,t.data.result.callId),i=t.data.error?.code===`TOOL_EXECUTION_DENIED`,a=t.data.status===`failed`&&!i,o=r?.approval?.id??t.data.result.callId,s=mergeToolMetadata(r?.toolMetadata,createToolMetadata(n)),c={input:r?.input,stepIndex:t.data.stepIndex,toolCallId:t.data.result.callId,toolMetadata:s,toolName:r?.toolName??n.toolName,type:`dynamic-tool`},l;return l=i?{...c,approval:{approved:!1,id:o,reason:t.data.error?.message},state:`output-denied`}:a?{...c,approval:approvedApproval(r),errorText:t.data.error?.message??stringifyUnknown(t.data.result.output),state:`output-error`}:{...c,approval:approvedApproval(r),output:t.data.result.output,state:`output-available`},r===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),l)):updateToolPart(e,t.data.result.callId,l)}case`message.appended`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`streaming`,stepIndex:t.data.stepIndex,text:t.data.messageSoFar,type:`text`}));case`message.completed`:return updateAssistantMessage(e,t.data.turnId,e=>t.data.message===null?completeExistingTextPart(e):upsertPart(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.message,type:`text`}));case`result.completed`:return updateAssistantMetadata(e,t.data.turnId,{result:t.data.result});case`turn.completed`:return updateAssistantMetadata(e,t.data.turnId,{status:`complete`});case`turn.failed`:case`session.failed`:return e;default:return e}}function respondToInputRequest(e,t){let n=findToolPartByApprovalId(e,t.requestId);if(!n)return e;let r={id:t.requestId};return t.text!==void 0&&(r.reason=t.text),updateToolPart(e,n.toolCallId,{approval:r,input:n.input,state:`approval-responded`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:mergeToolMetadata(n.toolMetadata,{ash:{inputResponse:t,kind:n.toolMetadata?.ash?.kind??`unknown`,name:n.toolMetadata?.ash?.name??n.toolName}}),toolName:n.toolName,type:`dynamic-tool`})}function updateAssistantMessage(e,t,n){return upsertMessage(e,n(e.messages.find(e=>e.role===`assistant`&&e.metadata?.turnId===t)??createAssistantMessage(t)))}function updateAssistantMetadata(e,t,n){return updateAssistantMessage(e,t,e=>({...e,metadata:{...e.metadata,...n}}))}function createAssistantMessage(e){return{id:`${e}:assistant`,metadata:{status:`streaming`,turnId:e},parts:[],role:`assistant`}}function ensureStepStartPart(e,t){let n=e.parts.filter(e=>e.type===`step-start`).length;if(n>t)return e;let r=t-n+1;return{...e,parts:[...e.parts,...Array.from({length:r},()=>({type:`step-start`}))]}}function upsertPart(e,t){let n=e.parts.findIndex(e=>partKey(e)===partKey(t)),r=n===-1?[...e.parts,t]:[...e.parts.slice(0,n),t,...e.parts.slice(n+1)];return{...e,metadata:{...e.metadata,status:t.type===`text`&&t.state===`done`?`complete`:`streaming`},parts:r}}function completeExistingTextPart(e){let t=findLastIndex(e.parts,e=>e.type===`text`);if(t===-1)return e;let n=e.parts[t];return n?.type===`text`?{...e,metadata:{...e.metadata,status:`complete`},parts:[...e.parts.slice(0,t),{...n,state:`done`},...e.parts.slice(t+1)]}:e}function updateToolPart(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.parts.some(e=>e.type===`dynamic-tool`&&e.toolCallId===t));return r?upsertMessage(e,upsertPart(r,n)):e}function findToolPart(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.toolCallId===t)return e}function findToolPartByApprovalId(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.approval?.id===t)return e}function partKey(e){switch(e.type){case`text`:return`text:${e.stepIndex??0}`;case`reasoning`:return`reasoning:${e.stepIndex??0}`;case`step-start`:return`step-start`;case`dynamic-tool`:return`dynamic-tool:${e.toolCallId}`}}function upsertMessage(e,t){let n=e.messages.findIndex(e=>e.id===t.id);return n===-1?{messages:[...e.messages,t]}:{messages:[...e.messages.slice(0,n),t,...e.messages.slice(n+1)]}}function toMessageInputRequest(e){return{allowFreeform:e.allowFreeform,display:e.display,options:e.options,prompt:e.prompt,requestId:e.requestId}}function createToolMetadata(e,t){return{ash:{inputRequest:t?.inputRequest,kind:e.kind,name:e.name}}}function mergeToolMetadata(e,t){let n=t.ash?.kind??e?.ash?.kind??`unknown`,r=t.ash?.name??e?.ash?.name??`unknown`;return{ash:{...e?.ash,...t.ash,inputRequest:t.ash?.inputRequest??e?.ash?.inputRequest,inputResponse:t.ash?.inputResponse??e?.ash?.inputResponse,kind:n,name:r}}}function approvedApproval(e){if(e?.approval?.id)return{approved:!0,id:e.approval.id,isAutomatic:e.approval.isAutomatic,reason:e.approval.reason}}function normalizeActionRequest(e){switch(e.kind){case`load-skill`:return{kind:`load-skill`,name:`load_skill`,toolName:`ash:load-skill`};case`tool-call`:return{kind:`tool-call`,name:e.toolName,toolName:e.toolName};case`subagent-call`:return{kind:`subagent-call`,name:e.subagentName,toolName:`ash:subagent:${e.subagentName}`};case`remote-agent-call`:return{kind:`subagent-call`,name:e.remoteAgentName,toolName:`ash:subagent:${e.remoteAgentName}`}}}function normalizeActionResult(e){switch(e.kind){case`load-skill-result`:return{kind:`load-skill`,name:e.name??`load_skill`,toolName:`ash:load-skill`};case`tool-result`:return{kind:`tool-call`,name:e.toolName,toolName:e.toolName};case`subagent-result`:return{kind:`subagent-call`,name:e.subagentName,toolName:`ash:subagent:${e.subagentName}`}}}function optimisticUserMessageId(e){return`optimistic:${e}:user`}function stringifyUnknown(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return`Action failed.`}}function findLastIndex(e,t){for(let n=e.length-1;n>=0;--n)if(t(e[n]))return n;return-1}export{defaultMessageReducer};
|
|
@@ -16,7 +16,7 @@ interface MessageResponseInput {
|
|
|
16
16
|
* separately — either collected via {@link result} or iterated with
|
|
17
17
|
* `for await...of`.
|
|
18
18
|
*/
|
|
19
|
-
export declare class MessageResponse implements AsyncIterable<HandleMessageStreamEvent> {
|
|
19
|
+
export declare class MessageResponse<TOutput = unknown> implements AsyncIterable<HandleMessageStreamEvent> {
|
|
20
20
|
#private;
|
|
21
21
|
/**
|
|
22
22
|
* Continuation token returned by the server for follow-up messages.
|
|
@@ -32,7 +32,7 @@ export declare class MessageResponse implements AsyncIterable<HandleMessageStrea
|
|
|
32
32
|
* Consumes the full event stream and returns the aggregated
|
|
33
33
|
* {@link MessageResult}.
|
|
34
34
|
*/
|
|
35
|
-
result(): Promise<MessageResult
|
|
35
|
+
result(): Promise<MessageResult<TOutput>>;
|
|
36
36
|
/**
|
|
37
37
|
* Yields stream events one at a time.
|
|
38
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{deriveResultStatus,extractCompletedMessage}from"#client/session-utils.js";var MessageResponse=class{continuationToken;sessionId;#e=!1;#t;constructor(e){this.continuationToken=e.continuationToken,this.sessionId=e.sessionId,this.#t=e.createStream}async result(){let t=[];for await(let e of this)t.push(e);return{events:t,message:extractCompletedMessage(t),sessionId:this.sessionId,status:deriveResultStatus(t)}}[Symbol.asyncIterator](){if(this.#e)throw Error(`MessageResponse has already been consumed.`);return this.#e=!0,this.#t()}};export{MessageResponse};
|
|
1
|
+
import{deriveResultStatus,extractCompletedMessage}from"#client/session-utils.js";import{extractCompletedResult}from"#client/output-schema.js";var MessageResponse=class{continuationToken;sessionId;#e=!1;#t;constructor(e){this.continuationToken=e.continuationToken,this.sessionId=e.sessionId,this.#t=e.createStream}async result(){let t=[];for await(let e of this)t.push(e);return{data:extractCompletedResult(t),events:t,message:extractCompletedMessage(t),sessionId:this.sessionId,status:deriveResultStatus(t)}}[Symbol.asyncIterator](){if(this.#e)throw Error(`MessageResponse has already been consumed.`);return this.#e=!0,this.#t()}};export{MessageResponse};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StandardJSONSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
|
|
2
|
+
import type { HandleMessageStreamEvent } from "#protocol/message.js";
|
|
3
|
+
import type { JsonObject } from "#shared/json.js";
|
|
4
|
+
/**
|
|
5
|
+
* Normalizes a client-supplied output schema into the wire-safe JSON Schema
|
|
6
|
+
* representation accepted by Ash message routes.
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeOutputSchemaForRequest<TOutput>(schema: StandardJSONSchemaV1<unknown, TOutput> | JsonObject | undefined): JsonObject | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Extracts the most recent finalized structured result from a turn event list.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractCompletedResult<TOutput>(events: readonly HandleMessageStreamEvent[]): TOutput | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeJsonSchemaDefinition}from"#shared/json-schema.js";function normalizeOutputSchemaForRequest(t){return t===void 0?void 0:normalizeJsonSchemaDefinition(t)}function extractCompletedResult(e){let t;for(let n of e)isResultCompletedEvent(n)&&(t=n.data.result);return t}function isResultCompletedEvent(e){return e.type===`result.completed`}export{extractCompletedResult,normalizeOutputSchemaForRequest};
|
|
@@ -36,14 +36,14 @@ export declare class ClientSession {
|
|
|
36
36
|
* The session's state is updated automatically after the stream is
|
|
37
37
|
* consumed.
|
|
38
38
|
*/
|
|
39
|
-
sendMessage(message: string, options?: SendMessageOptions): Promise<MessageResponse
|
|
39
|
+
sendMessage<TOutput = unknown>(message: string, options?: SendMessageOptions<TOutput>): Promise<MessageResponse<TOutput>>;
|
|
40
40
|
/**
|
|
41
41
|
* Sends one turn payload to the agent.
|
|
42
42
|
*
|
|
43
43
|
* Use this to submit follow-up text, HITL results, or both in a single
|
|
44
44
|
* request.
|
|
45
45
|
*/
|
|
46
|
-
send(input: SendTurnInput, options?: SendMessageOptions): Promise<MessageResponse
|
|
46
|
+
send<TOutput = unknown>(input: SendTurnInput, options?: SendMessageOptions<TOutput>): Promise<MessageResponse<TOutput>>;
|
|
47
47
|
/**
|
|
48
48
|
* Opens this session's event stream using the current session ID and stream
|
|
49
49
|
* index.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ASH_CREATE_SESSION_ROUTE_PATH,createAshContinueSessionRoutePath,createAshMessageStreamRoutePath}from"#protocol/routes.js";import{openStreamIterable}from"#client/open-stream.js";import{ASH_SESSION_ID_HEADER,isCurrentTurnBoundaryEvent}from"#protocol/message.js";import{ClientError}from"#client/client-error.js";import{advanceSession}from"#client/session-utils.js";import{createClientUrl}from"#client/url.js";import{MessageResponse}from"#client/message-response.js";import{isStreamDisconnectError,readNdjsonStream}from"#client/ndjson.js";var ClientSession=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get state(){return this.#t}async sendMessage(e,t){return this.send({message:e},t)}async send(e,t){let n=this.#t,{continuationToken:r,sessionId:i}=await this.#n(e,n,t);return new MessageResponse({continuationToken:r,createStream:()=>this.#r(i,r,n,t),sessionId:i})}openStream(e){let t=this.#t.sessionId;if(!t)throw Error(`Session has no session ID. Send a message first.`);return openStreamIterable({host:this.#e.host,maxReconnectAttempts:this.#e.maxReconnectAttempts,resolveHeaders:()=>this.#e.resolveHeaders(),sessionId:t,signal:e?.signal,startIndex:e?.startIndex??this.#t.streamIndex})}async#n(n,r,a){let s=r.sessionId?createAshContinueSessionRoutePath(r.sessionId):ASH_CREATE_SESSION_ROUTE_PATH,c=createClientUrl(this.#e.host,s),l=await this.#e.resolveHeaders(a?.headers);l.set(`content-type`,`application/json`);let u=createHandleMessageBody({input:n,session:r});if(u===null)throw Error(`Session.send requires a non-empty message, inputResponses, or both.`);let d=await fetch(c,{body:JSON.stringify(u),headers:l,method:`POST`,signal:a?.signal??null});if(!d.ok){let e=await d.text();throw new ClientError(d.status,e)}let f=await d.json(),p=(typeof f.sessionId==`string`?f.sessionId:void 0)??d.headers.get(ASH_SESSION_ID_HEADER)?.trim()??r.sessionId;if(!p)throw Error(`Message route did not return a session id.`);return{continuationToken:typeof f.continuationToken==`string`?f.continuationToken:void 0,sessionId:p}}async*#r(e,t,n,r){let i=[];try{let t=n.sessionId===e?n.streamIndex:0,o=this.#e.maxReconnectAttempts;for(;;){let n=await this.#i(e,t,r?.signal),s=!1;try{for await(let e of readNdjsonStream(n))if(i.push(e),t+=1,yield e,isCurrentTurnBoundaryEvent(e)){s=!0;break}}catch(e){if(!isStreamDisconnectError(e))throw e}if(s||o<=0)break;--o}}finally{this.#t=advanceSession({continuationToken:t,events:i,sessionId:e,session:n})}}async#i(e,t,r){let i=createClientUrl(this.#e.host,createAshMessageStreamRoutePath(e),t>0?{startIndex:String(t)}:void 0),a=await this.#e.resolveHeaders(),s=await fetch(i,{headers:a,signal:r??null});if(!s.ok){let e=await s.text();throw new ClientError(s.status,e)}if(!s.body)throw new ClientError(s.status,`Response body is null.`);return s.body}};function createHandleMessageBody(e){let t={};return e.input.message!==void 0&&(t.message=e.input.message),e.input.inputResponses!==void 0&&e.input.inputResponses.length>0&&(t.inputResponses=e.input.inputResponses),e.input.clientContext!==void 0&&(t.clientContext=e.input.clientContext),e.session.continuationToken!==void 0&&(t.continuationToken=e.session.continuationToken),Object.keys(t).length===0||e.session.continuationToken===void 0&&t.message===void 0||e.session.continuationToken!==void 0&&t.message===void 0&&t.inputResponses===void 0?null:t}export{ClientSession};
|
|
1
|
+
import{ASH_CREATE_SESSION_ROUTE_PATH,createAshContinueSessionRoutePath,createAshMessageStreamRoutePath}from"#protocol/routes.js";import{openStreamIterable}from"#client/open-stream.js";import{ASH_SESSION_ID_HEADER,isCurrentTurnBoundaryEvent}from"#protocol/message.js";import{ClientError}from"#client/client-error.js";import{advanceSession}from"#client/session-utils.js";import{createClientUrl}from"#client/url.js";import{MessageResponse}from"#client/message-response.js";import{normalizeOutputSchemaForRequest}from"#client/output-schema.js";import{isStreamDisconnectError,readNdjsonStream}from"#client/ndjson.js";var ClientSession=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get state(){return this.#t}async sendMessage(e,t){return this.send({message:e},t)}async send(e,t){let n=this.#t,{continuationToken:r,sessionId:i}=await this.#n(e,n,t);return new MessageResponse({continuationToken:r,createStream:()=>this.#r(i,r,n,t),sessionId:i})}openStream(e){let t=this.#t.sessionId;if(!t)throw Error(`Session has no session ID. Send a message first.`);return openStreamIterable({host:this.#e.host,maxReconnectAttempts:this.#e.maxReconnectAttempts,resolveHeaders:()=>this.#e.resolveHeaders(),sessionId:t,signal:e?.signal,startIndex:e?.startIndex??this.#t.streamIndex})}async#n(n,r,a){let s=r.sessionId?createAshContinueSessionRoutePath(r.sessionId):ASH_CREATE_SESSION_ROUTE_PATH,c=createClientUrl(this.#e.host,s),l=await this.#e.resolveHeaders(a?.headers);l.set(`content-type`,`application/json`);let u=createHandleMessageBody({input:n,outputSchema:normalizeOutputSchemaForRequest(a?.outputSchema),session:r});if(u===null)throw Error(`Session.send requires a non-empty message, inputResponses, or both.`);let d=await fetch(c,{body:JSON.stringify(u),headers:l,method:`POST`,signal:a?.signal??null});if(!d.ok){let e=await d.text();throw new ClientError(d.status,e)}let f=await d.json(),p=(typeof f.sessionId==`string`?f.sessionId:void 0)??d.headers.get(ASH_SESSION_ID_HEADER)?.trim()??r.sessionId;if(!p)throw Error(`Message route did not return a session id.`);return{continuationToken:typeof f.continuationToken==`string`?f.continuationToken:void 0,sessionId:p}}async*#r(e,t,n,r){let i=[];try{let t=n.sessionId===e?n.streamIndex:0,o=this.#e.maxReconnectAttempts;for(;;){let n=await this.#i(e,t,r?.signal),s=!1;try{for await(let e of readNdjsonStream(n))if(i.push(e),t+=1,yield e,isCurrentTurnBoundaryEvent(e)){s=!0;break}}catch(e){if(!isStreamDisconnectError(e))throw e}if(s||o<=0)break;--o}}finally{this.#t=advanceSession({continuationToken:t,events:i,sessionId:e,session:n})}}async#i(e,t,r){let i=createClientUrl(this.#e.host,createAshMessageStreamRoutePath(e),t>0?{startIndex:String(t)}:void 0),a=await this.#e.resolveHeaders(),s=await fetch(i,{headers:a,signal:r??null});if(!s.ok){let e=await s.text();throw new ClientError(s.status,e)}if(!s.body)throw new ClientError(s.status,`Response body is null.`);return s.body}};function createHandleMessageBody(e){let t={};return e.input.message!==void 0&&(t.message=e.input.message),e.input.inputResponses!==void 0&&e.input.inputResponses.length>0&&(t.inputResponses=e.input.inputResponses),e.input.clientContext!==void 0&&(t.clientContext=e.input.clientContext),e.outputSchema!==void 0&&(t.outputSchema=e.outputSchema),e.session.continuationToken!==void 0&&(t.continuationToken=e.session.continuationToken),Object.keys(t).length===0||e.session.continuationToken===void 0&&t.message===void 0||e.session.continuationToken!==void 0&&t.message===void 0&&t.inputResponses===void 0?null:t}export{ClientSession};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UserContent } from "ai";
|
|
2
|
+
import type { StandardJSONSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
|
|
2
3
|
import type { HandleMessageStreamEvent } from "#protocol/message.js";
|
|
3
4
|
import type { InputResponse } from "#runtime/input/types.js";
|
|
4
5
|
import type { JsonObject } from "#shared/json.js";
|
|
@@ -54,7 +55,16 @@ export interface ClientOptions {
|
|
|
54
55
|
/**
|
|
55
56
|
* Per-message options for {@link Client.sendMessage}.
|
|
56
57
|
*/
|
|
57
|
-
export interface SendMessageOptions {
|
|
58
|
+
export interface SendMessageOptions<TOutput = unknown> {
|
|
59
|
+
/**
|
|
60
|
+
* Optional schema the harness must satisfy before this turn terminates.
|
|
61
|
+
*
|
|
62
|
+
* The client lowers Standard Schema implementations (Zod, Valibot,
|
|
63
|
+
* ArkType, etc.) to JSON Schema before sending the request. The server is
|
|
64
|
+
* authoritative for validation; {@link MessageResult.data} is typed to this
|
|
65
|
+
* schema's output type and is not revalidated client-side.
|
|
66
|
+
*/
|
|
67
|
+
readonly outputSchema?: StandardJSONSchemaV1<unknown, TOutput> | JsonObject;
|
|
58
68
|
/**
|
|
59
69
|
* Abort signal for cancelling the request.
|
|
60
70
|
*/
|
|
@@ -104,7 +114,12 @@ export interface OpenStreamOptions {
|
|
|
104
114
|
* Aggregated result of one message turn, returned by
|
|
105
115
|
* {@link MessageResponse.result}.
|
|
106
116
|
*/
|
|
107
|
-
export interface MessageResult {
|
|
117
|
+
export interface MessageResult<TOutput = unknown> {
|
|
118
|
+
/**
|
|
119
|
+
* Final structured result emitted by the harness, when this turn requested
|
|
120
|
+
* an output schema and the server fulfilled it.
|
|
121
|
+
*/
|
|
122
|
+
readonly data: TOutput | undefined;
|
|
108
123
|
/**
|
|
109
124
|
* The final completed assistant message text, or `undefined` if no terminal
|
|
110
125
|
* `message.completed` event was observed.
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
"turndown": "7.2.4",
|
|
23
23
|
"@vercel/oidc": "3.5.0",
|
|
24
24
|
"@vercel/sandbox": "2.1.0",
|
|
25
|
-
"@workflow/core": "5.0.0-beta.
|
|
25
|
+
"@workflow/core": "5.0.0-beta.11",
|
|
26
26
|
"@workflow/errors": "5.0.0-beta.6",
|
|
27
|
+
"@workflow/world": "5.0.0-beta.6",
|
|
27
28
|
"zod": "4.4.3",
|
|
28
29
|
"zod-validation-error": "5.0.0"
|
|
29
30
|
},
|
|
30
|
-
"scriptHash": "
|
|
31
|
+
"scriptHash": "d058df06982d76ea3f28a17d85e12bfd9d19a58aede5830e27938e6ee911c5f4"
|
|
31
32
|
}
|