experimental-ash 0.45.0 → 0.46.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 +13 -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/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/manifest.d.ts +11 -0
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-map.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/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/durable-session-store.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/types.d.ts +2 -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/helpers/markdown.d.ts +1 -1
- package/dist/src/internal/helpers/markdown.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/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/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/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 +11 -0
- package/dist/src/shared/dynamic-tool-definition.d.ts +12 -0
- package/dist/src/shared/dynamic-tool-definition.js +1 -1
- 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
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import type { AttributeChange, ExperimentalSetAttributesResult } from './attributes.js';
|
|
2
|
+
import type { CreateEventParams, CreateEventRequest, Event, EventResult, GetEventParams, ListEventsByCorrelationIdParams, ListEventsParams, RunCreatedEventRequest } from './events.js';
|
|
3
|
+
import type { GetHookParams, Hook, ListHooksParams } from './hooks.js';
|
|
4
|
+
import type { Queue } from './queue.js';
|
|
5
|
+
import type { GetWorkflowRunParams, ListWorkflowRunsParams, WorkflowRun, WorkflowRunWithoutData } from './runs.js';
|
|
6
|
+
import type { GetChunksOptions, PaginatedResponse, StreamChunksResponse, StreamInfoResponse } from './shared.js';
|
|
7
|
+
import type { GetStepParams, ListWorkflowRunStepsParams, Step, StepWithoutData } from './steps.js';
|
|
8
|
+
export interface Streamer {
|
|
9
|
+
/**
|
|
10
|
+
* Override the default flush interval (in milliseconds) for buffered stream writes.
|
|
11
|
+
* Chunks are accumulated in a buffer and flushed together on this interval.
|
|
12
|
+
*
|
|
13
|
+
* The default is 10ms, which is appropriate for HTTP-based backends where
|
|
14
|
+
* each flush is a network round-trip. For backends with sub-millisecond writes
|
|
15
|
+
* (e.g., Redis, local filesystem), a lower value (or 0 for immediate flushing) reduces
|
|
16
|
+
* end-to-end stream latency.
|
|
17
|
+
*
|
|
18
|
+
* Not supported by all worlds.
|
|
19
|
+
*/
|
|
20
|
+
streamFlushIntervalMs?: number;
|
|
21
|
+
streams: {
|
|
22
|
+
write(runId: string, name: string, chunk: string | Uint8Array): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Write multiple chunks to a stream in a single operation.
|
|
25
|
+
* This is an optional optimization for world implementations that can
|
|
26
|
+
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
|
|
27
|
+
*
|
|
28
|
+
* If not implemented, the caller should fall back to sequential write() calls.
|
|
29
|
+
*
|
|
30
|
+
* @param runId - The run ID
|
|
31
|
+
* @param name - The stream name
|
|
32
|
+
* @param chunks - Array of chunks to write, in order
|
|
33
|
+
*/
|
|
34
|
+
writeMulti?(runId: string, name: string, chunks: (string | Uint8Array)[]): Promise<void>;
|
|
35
|
+
close(runId: string, name: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Read from a stream starting at the given chunk index.
|
|
38
|
+
* Positive values skip that many chunks from the start (0-based).
|
|
39
|
+
* Negative values start that many chunks before the current end
|
|
40
|
+
* (e.g. -3 on a 10-chunk stream starts at chunk 7). Clamped to 0.
|
|
41
|
+
*/
|
|
42
|
+
get(runId: string, name: string, startIndex?: number): Promise<ReadableStream<Uint8Array>>;
|
|
43
|
+
list(runId: string): Promise<string[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Fetch stream chunks with cursor-based pagination.
|
|
46
|
+
*
|
|
47
|
+
* Unlike `get` (which returns a live `ReadableStream` that waits
|
|
48
|
+
* for new chunks in real-time), `getChunks` returns a snapshot of currently
|
|
49
|
+
* available chunks in a standard paginated response.
|
|
50
|
+
*
|
|
51
|
+
* @param runId - The workflow run ID that owns the stream
|
|
52
|
+
* @param name - The stream name/ID
|
|
53
|
+
* @param options - Pagination options (limit defaults to 100, max 1000)
|
|
54
|
+
* @returns Paginated chunks with a `done` flag indicating stream completion
|
|
55
|
+
*/
|
|
56
|
+
getChunks(runId: string, name: string, options?: GetChunksOptions): Promise<StreamChunksResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Retrieve lightweight metadata about a stream.
|
|
59
|
+
*
|
|
60
|
+
* Returns the tail index (index of the last known chunk, 0-based) and
|
|
61
|
+
* whether the stream is complete. This is useful for resolving a negative
|
|
62
|
+
* `startIndex` into an absolute position before connecting to a stream.
|
|
63
|
+
*
|
|
64
|
+
* @param runId - The workflow run ID that owns the stream
|
|
65
|
+
* @param name - The stream name/ID
|
|
66
|
+
*/
|
|
67
|
+
getInfo(runId: string, name: string): Promise<StreamInfoResponse>;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Storage interface for workflow data.
|
|
72
|
+
*
|
|
73
|
+
* Workflow storage models an append-only event log, so all state changes are handled through `events.create()`.
|
|
74
|
+
* Run/Step/Hook entities provide materialized views into the current state, but entities can't be modified directly.
|
|
75
|
+
*
|
|
76
|
+
* User-originated state changes are also handled via events:
|
|
77
|
+
* - run_cancelled event for run cancellation
|
|
78
|
+
* - hook_disposed event for explicit hook disposal (optional)
|
|
79
|
+
*
|
|
80
|
+
* Note: Hooks are automatically disposed by the World implementation when a workflow
|
|
81
|
+
* reaches a terminal state (run_completed, run_failed, run_cancelled). This releases
|
|
82
|
+
* hook tokens for reuse by future workflows. The hook_disposed event is only needed
|
|
83
|
+
* for explicit disposal before workflow completion.
|
|
84
|
+
*/
|
|
85
|
+
export interface Storage {
|
|
86
|
+
runs: {
|
|
87
|
+
get(id: string, params: GetWorkflowRunParams & {
|
|
88
|
+
resolveData: 'none';
|
|
89
|
+
}): Promise<WorkflowRunWithoutData>;
|
|
90
|
+
get(id: string, params?: GetWorkflowRunParams & {
|
|
91
|
+
resolveData?: 'all';
|
|
92
|
+
}): Promise<WorkflowRun>;
|
|
93
|
+
get(id: string, params?: GetWorkflowRunParams): Promise<WorkflowRun | WorkflowRunWithoutData>;
|
|
94
|
+
list(params: ListWorkflowRunsParams & {
|
|
95
|
+
resolveData: 'none';
|
|
96
|
+
}): Promise<PaginatedResponse<WorkflowRunWithoutData>>;
|
|
97
|
+
list(params?: ListWorkflowRunsParams & {
|
|
98
|
+
resolveData?: 'all';
|
|
99
|
+
}): Promise<PaginatedResponse<WorkflowRun>>;
|
|
100
|
+
list(params?: ListWorkflowRunsParams): Promise<PaginatedResponse<WorkflowRun | WorkflowRunWithoutData>>;
|
|
101
|
+
/**
|
|
102
|
+
* Apply a batch of attribute changes to a run. Merge semantics:
|
|
103
|
+
* - `value: string` upserts the key
|
|
104
|
+
* - `value: null` removes the key
|
|
105
|
+
* - keys not listed in `changes` are untouched
|
|
106
|
+
*
|
|
107
|
+
* Returns the post-merge attribute snapshot on the run.
|
|
108
|
+
*
|
|
109
|
+
* Pass `options.allowReservedAttributes: true` to permit keys
|
|
110
|
+
* starting with the reserved `$` prefix. Default behavior rejects
|
|
111
|
+
* those keys so user code can't accidentally collide with
|
|
112
|
+
* framework / tooling namespaces; framework callers that own a
|
|
113
|
+
* sub-namespace flip this on.
|
|
114
|
+
*
|
|
115
|
+
* OPTIONAL. World implementations may omit this method; the SDK
|
|
116
|
+
* helper (`setAttributes` in `@workflow/core`) feature-detects its
|
|
117
|
+
* absence and no-ops with a one-time warning so third-party /
|
|
118
|
+
* community worlds keep working without adopting the experimental
|
|
119
|
+
* API.
|
|
120
|
+
*
|
|
121
|
+
* EXPERIMENTAL: this method exists as a stopgap until the
|
|
122
|
+
* `attr_set` event type lands in a future spec version. When that
|
|
123
|
+
* happens, `setAttributes` will dispatch through `events.create`
|
|
124
|
+
* instead, and this method is expected to be removed. See the
|
|
125
|
+
* `attributes-mvp` changelog entry for the migration shape.
|
|
126
|
+
*/
|
|
127
|
+
experimentalSetAttributes?(runId: string, changes: AttributeChange[], options?: {
|
|
128
|
+
allowReservedAttributes?: boolean;
|
|
129
|
+
}): Promise<ExperimentalSetAttributesResult>;
|
|
130
|
+
};
|
|
131
|
+
steps: {
|
|
132
|
+
get(runId: string, stepId: string, params: GetStepParams & {
|
|
133
|
+
resolveData: 'none';
|
|
134
|
+
}): Promise<StepWithoutData>;
|
|
135
|
+
get(runId: string, stepId: string, params?: GetStepParams & {
|
|
136
|
+
resolveData?: 'all';
|
|
137
|
+
}): Promise<Step>;
|
|
138
|
+
get(runId: string, stepId: string, params?: GetStepParams): Promise<Step | StepWithoutData>;
|
|
139
|
+
list(params: ListWorkflowRunStepsParams & {
|
|
140
|
+
resolveData: 'none';
|
|
141
|
+
}): Promise<PaginatedResponse<StepWithoutData>>;
|
|
142
|
+
list(params: ListWorkflowRunStepsParams & {
|
|
143
|
+
resolveData?: 'all';
|
|
144
|
+
}): Promise<PaginatedResponse<Step>>;
|
|
145
|
+
list(params: ListWorkflowRunStepsParams): Promise<PaginatedResponse<Step | StepWithoutData>>;
|
|
146
|
+
};
|
|
147
|
+
events: {
|
|
148
|
+
/**
|
|
149
|
+
* Create a run_created event to start a new workflow run.
|
|
150
|
+
* The runId may be provided by the client or left as null for the server to generate.
|
|
151
|
+
*
|
|
152
|
+
* @param runId - Client-generated runId, or null for server-generated
|
|
153
|
+
* @param data - The run_created event data
|
|
154
|
+
* @param params - Optional parameters for event creation
|
|
155
|
+
* @returns Promise resolving to the created event and run entity
|
|
156
|
+
*/
|
|
157
|
+
create(runId: string | null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
|
|
158
|
+
/**
|
|
159
|
+
* Create an event for an existing workflow run and atomically update the entity.
|
|
160
|
+
* Returns both the event and the affected entity (run/step/hook).
|
|
161
|
+
*
|
|
162
|
+
* @param runId - The workflow run ID (required for all events except run_created)
|
|
163
|
+
* @param data - The event to create
|
|
164
|
+
* @param params - Optional parameters for event creation
|
|
165
|
+
* @returns Promise resolving to the created event and affected entity
|
|
166
|
+
*/
|
|
167
|
+
create(runId: string, data: CreateEventRequest, params?: CreateEventParams): Promise<EventResult>;
|
|
168
|
+
get(runId: string, eventId: string, params?: GetEventParams): Promise<Event>;
|
|
169
|
+
list(params: ListEventsParams): Promise<PaginatedResponse<Event>>;
|
|
170
|
+
listByCorrelationId(params: ListEventsByCorrelationIdParams): Promise<PaginatedResponse<Event>>;
|
|
171
|
+
};
|
|
172
|
+
hooks: {
|
|
173
|
+
get(hookId: string, params?: GetHookParams): Promise<Hook>;
|
|
174
|
+
getByToken(token: string, params?: GetHookParams): Promise<Hook>;
|
|
175
|
+
list(params: ListHooksParams): Promise<PaginatedResponse<Hook>>;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The "World" interface represents how Workflows are able to communicate with the outside world.
|
|
180
|
+
*/
|
|
181
|
+
export interface World extends Queue, Streamer, Storage {
|
|
182
|
+
/**
|
|
183
|
+
* The highest spec version this World supports.
|
|
184
|
+
*
|
|
185
|
+
* When set, `start()` creates runs at this version so world-specific
|
|
186
|
+
* features (e.g., CBOR queue transport) are enabled automatically.
|
|
187
|
+
* When omitted, runs default to `SPEC_VERSION_SUPPORTS_EVENT_SOURCING` (2),
|
|
188
|
+
* the safe baseline that all worlds — including community worlds on
|
|
189
|
+
* older @workflow/world versions — are expected to handle.
|
|
190
|
+
*/
|
|
191
|
+
specVersion?: number;
|
|
192
|
+
/**
|
|
193
|
+
* Whether calling `process.exit(1)` from a queue handler is observed by
|
|
194
|
+
* the World as a delivery failure that will be retried.
|
|
195
|
+
*
|
|
196
|
+
* Set to `true` for worlds running inside a managed serverless platform
|
|
197
|
+
* (e.g. `world-vercel`) where the platform fails the invocation when the
|
|
198
|
+
* function process exits non-zero, and the queue redelivers the message
|
|
199
|
+
* via a separate fresh invocation.
|
|
200
|
+
*
|
|
201
|
+
* Set to `false` (the default) for in-process worlds (e.g. `world-local`,
|
|
202
|
+
* dev servers) where calling `process.exit()` would terminate the host
|
|
203
|
+
* process — including the user's `pnpm dev` — without producing a
|
|
204
|
+
* redelivery. Such worlds should instead surface failures via the event
|
|
205
|
+
* log and return normally.
|
|
206
|
+
*
|
|
207
|
+
* The core runtime reads this when deciding how to handle an exhausted
|
|
208
|
+
* replay budget: when `true` it exits so the queue redelivers; when
|
|
209
|
+
* `false` it writes `run_failed` best-effort and returns. See
|
|
210
|
+
* `packages/core/src/runtime/replay-budget.ts`.
|
|
211
|
+
*/
|
|
212
|
+
processExitTriggersQueueRedelivery?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* A function that will be called to start any background tasks needed by the World implementation.
|
|
215
|
+
* For example, in the case of a queue backed World, this would start the queue processing.
|
|
216
|
+
*/
|
|
217
|
+
start?(): Promise<void>;
|
|
218
|
+
/**
|
|
219
|
+
* Release any resources held by the World implementation (connection pools, listeners, etc.).
|
|
220
|
+
* After calling `close()`, the World instance should not be used again.
|
|
221
|
+
*
|
|
222
|
+
* This is important for CLI commands and short-lived processes that need to exit cleanly
|
|
223
|
+
* without relying on `process.exit()`.
|
|
224
|
+
*/
|
|
225
|
+
close?(): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Resolve the most recent deployment ID for the current deployment's environment.
|
|
228
|
+
*
|
|
229
|
+
* Used when `deploymentId: 'latest'` is passed to `start()`. The implementation
|
|
230
|
+
* determines the latest deployment that shares the same environment (e.g., same
|
|
231
|
+
* "production" target or same git branch for "preview" deployments) as the
|
|
232
|
+
* current deployment.
|
|
233
|
+
*
|
|
234
|
+
* Not all World implementations support this — it is only implemented by
|
|
235
|
+
* world-vercel where deployment routing is meaningful.
|
|
236
|
+
*/
|
|
237
|
+
resolveLatestDeploymentId?(): Promise<string>;
|
|
238
|
+
/**
|
|
239
|
+
* Retrieve the AES-256 encryption key for a specific workflow run.
|
|
240
|
+
*
|
|
241
|
+
* The returned key is a ready-to-use 32-byte AES-256 key. The World
|
|
242
|
+
* implementation handles all key retrieval and derivation internally
|
|
243
|
+
* (e.g., HKDF from a deployment key). The core encryption module uses
|
|
244
|
+
* this key directly for AES-GCM encrypt/decrypt operations.
|
|
245
|
+
*
|
|
246
|
+
* Two overloads:
|
|
247
|
+
*
|
|
248
|
+
* - `getEncryptionKeyForRun(run)` — Preferred. Pass a `WorkflowRun` when
|
|
249
|
+
* the run entity already exists. The World reads any context it needs
|
|
250
|
+
* (e.g., `deploymentId`) directly from the run.
|
|
251
|
+
*
|
|
252
|
+
* - `getEncryptionKeyForRun(runId, context?)` — Used when the run entity
|
|
253
|
+
* is not locally available, such as `start()` before run creation or a
|
|
254
|
+
* forwarded writable stream carrying its owning deployment context. The
|
|
255
|
+
* `context` parameter carries opaque world-specific data (e.g.,
|
|
256
|
+
* `{ deploymentId }` for world-vercel) needed to resolve the correct key.
|
|
257
|
+
* When `context` is omitted, the World assumes the current deployment.
|
|
258
|
+
*
|
|
259
|
+
* When not implemented, encryption is disabled — data is stored unencrypted.
|
|
260
|
+
*/
|
|
261
|
+
getEncryptionKeyForRun?(run: WorkflowRun): Promise<Uint8Array | undefined>;
|
|
262
|
+
getEncryptionKeyForRun?(runId: string, context?: Record<string, unknown>): Promise<Uint8Array | undefined>;
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { z } from '#compiled/zod/index.js';
|
|
2
|
+
export declare const QueuePrefix: z.ZodUnion<readonly [z.ZodLiteral<"__wkf_step_">, z.ZodLiteral<"__wkf_workflow_">]>;
|
|
3
|
+
export type QueuePrefix = z.infer<typeof QueuePrefix>;
|
|
4
|
+
export declare const ValidQueueName: z.ZodTemplateLiteral<`__wkf_step_${string}` | `__wkf_workflow_${string}`>;
|
|
5
|
+
export type ValidQueueName = z.infer<typeof ValidQueueName>;
|
|
6
|
+
export declare const MessageId: z.core.$ZodBranded<z.ZodString, "MessageId", "out">;
|
|
7
|
+
export type MessageId = z.infer<typeof MessageId>;
|
|
8
|
+
/**
|
|
9
|
+
* OpenTelemetry trace context for distributed tracing
|
|
10
|
+
*/
|
|
11
|
+
export declare const TraceCarrierSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
12
|
+
export type TraceCarrier = z.infer<typeof TraceCarrierSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* Run creation data carried through the queue for resilient start.
|
|
15
|
+
* Only present on the first queue delivery — re-enqueues omit this.
|
|
16
|
+
* When the runtime processes the message, it passes this data to the
|
|
17
|
+
* run_started event so the server can create the run if it doesn't exist yet.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RunInputSchema: z.ZodObject<{
|
|
20
|
+
input: z.ZodUnknown;
|
|
21
|
+
deploymentId: z.ZodString;
|
|
22
|
+
workflowName: z.ZodString;
|
|
23
|
+
specVersion: z.ZodNumber;
|
|
24
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type RunInput = z.infer<typeof RunInputSchema>;
|
|
27
|
+
export declare const WorkflowInvokePayloadSchema: z.ZodObject<{
|
|
28
|
+
runId: z.ZodString;
|
|
29
|
+
traceCarrier: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
30
|
+
requestedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
|
+
serverErrorRetryCount: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
stepName: z.ZodOptional<z.ZodString>;
|
|
34
|
+
runInput: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
input: z.ZodUnknown;
|
|
36
|
+
deploymentId: z.ZodString;
|
|
37
|
+
workflowName: z.ZodString;
|
|
38
|
+
specVersion: z.ZodNumber;
|
|
39
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const StepInvokePayloadSchema: z.ZodObject<{
|
|
43
|
+
workflowName: z.ZodString;
|
|
44
|
+
workflowRunId: z.ZodString;
|
|
45
|
+
workflowStartedAt: z.ZodNumber;
|
|
46
|
+
stepId: z.ZodString;
|
|
47
|
+
traceCarrier: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
48
|
+
requestedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type WorkflowInvokePayload = z.infer<typeof WorkflowInvokePayloadSchema>;
|
|
51
|
+
export type StepInvokePayload = z.infer<typeof StepInvokePayloadSchema>;
|
|
52
|
+
export type HealthCheckPayload = z.infer<typeof HealthCheckPayloadSchema>;
|
|
53
|
+
/**
|
|
54
|
+
* Health check payload - used to verify that the queue pipeline
|
|
55
|
+
* can deliver messages to workflow/step endpoints.
|
|
56
|
+
*/
|
|
57
|
+
export declare const HealthCheckPayloadSchema: z.ZodObject<{
|
|
58
|
+
__healthCheck: z.ZodLiteral<true>;
|
|
59
|
+
correlationId: z.ZodString;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export declare const QueuePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
62
|
+
runId: z.ZodString;
|
|
63
|
+
traceCarrier: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
64
|
+
requestedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
65
|
+
serverErrorRetryCount: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
67
|
+
stepName: z.ZodOptional<z.ZodString>;
|
|
68
|
+
runInput: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
input: z.ZodUnknown;
|
|
70
|
+
deploymentId: z.ZodString;
|
|
71
|
+
workflowName: z.ZodString;
|
|
72
|
+
specVersion: z.ZodNumber;
|
|
73
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
workflowName: z.ZodString;
|
|
77
|
+
workflowRunId: z.ZodString;
|
|
78
|
+
workflowStartedAt: z.ZodNumber;
|
|
79
|
+
stepId: z.ZodString;
|
|
80
|
+
traceCarrier: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
81
|
+
requestedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
__healthCheck: z.ZodLiteral<true>;
|
|
84
|
+
correlationId: z.ZodString;
|
|
85
|
+
}, z.core.$strip>]>;
|
|
86
|
+
export type QueuePayload = z.infer<typeof QueuePayloadSchema>;
|
|
87
|
+
export interface QueueOptions {
|
|
88
|
+
deploymentId?: string;
|
|
89
|
+
idempotencyKey?: string;
|
|
90
|
+
headers?: Record<string, string>;
|
|
91
|
+
/** Delay message delivery by this many seconds */
|
|
92
|
+
delaySeconds?: number;
|
|
93
|
+
/** Spec version of the target run. Used to select the queue transport format. */
|
|
94
|
+
specVersion?: number;
|
|
95
|
+
}
|
|
96
|
+
export interface Queue {
|
|
97
|
+
getDeploymentId(): Promise<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Enqueues a message to the specified queue.
|
|
100
|
+
*
|
|
101
|
+
* @param queueName - The name of the queue to which the message will be sent.
|
|
102
|
+
* @param message - The content of the message to be sent to the queue.
|
|
103
|
+
* @param opts - Optional parameters for the queue operation.
|
|
104
|
+
*/
|
|
105
|
+
queue(queueName: ValidQueueName, message: QueuePayload, opts?: QueueOptions): Promise<{
|
|
106
|
+
messageId: MessageId | null;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates an HTTP queue handler for processing messages from a specific queue.
|
|
110
|
+
*/
|
|
111
|
+
createQueueHandler(queueNamePrefix: QueuePrefix, handler: (message: unknown, meta: {
|
|
112
|
+
attempt: number;
|
|
113
|
+
queueName: ValidQueueName;
|
|
114
|
+
messageId: MessageId;
|
|
115
|
+
requestId?: string;
|
|
116
|
+
}) => Promise<void | {
|
|
117
|
+
timeoutSeconds: number;
|
|
118
|
+
}>): (req: Request) => Promise<Response>;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Queue } from './queue.js';
|
|
2
|
+
import type { Storage } from './interfaces.js';
|
|
3
|
+
/**
|
|
4
|
+
* Re-enqueue all active (pending/running) workflow runs so they resume
|
|
5
|
+
* processing after a world restart. The workflow handler is idempotent
|
|
6
|
+
* (event-log replay), so duplicate enqueues are safe.
|
|
7
|
+
*
|
|
8
|
+
* @param runs - Storage runs interface for listing active runs
|
|
9
|
+
* @param enqueue - Queue's enqueue method
|
|
10
|
+
* @param label - Log prefix for identifying the world implementation (e.g. "world-local")
|
|
11
|
+
*/
|
|
12
|
+
export declare function reenqueueActiveRuns(runs: Storage['runs'], enqueue: Queue['queue'], label: string): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=recovery.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from '#compiled/zod/index.js';
|
|
2
|
+
import { type SerializedData } from './serialization.js';
|
|
3
|
+
import type { PaginationOptions, ResolveData } from './shared.js';
|
|
4
|
+
export declare const WorkflowRunStatusSchema: z.ZodEnum<{
|
|
5
|
+
pending: "pending";
|
|
6
|
+
running: "running";
|
|
7
|
+
completed: "completed";
|
|
8
|
+
failed: "failed";
|
|
9
|
+
cancelled: "cancelled";
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Base schema for the Workflow runs. Prefer using WorkflowRunSchema
|
|
13
|
+
* which implements a discriminatedUnion for various states.
|
|
14
|
+
*
|
|
15
|
+
* Note: input/output use SerializedDataSchema to support both:
|
|
16
|
+
* - specVersion >= 2: Uint8Array (binary devalue format)
|
|
17
|
+
* - specVersion 1: any (legacy JSON format)
|
|
18
|
+
*/
|
|
19
|
+
export declare const WorkflowRunBaseSchema: z.ZodObject<{
|
|
20
|
+
runId: z.ZodString;
|
|
21
|
+
status: z.ZodEnum<{
|
|
22
|
+
pending: "pending";
|
|
23
|
+
running: "running";
|
|
24
|
+
completed: "completed";
|
|
25
|
+
failed: "failed";
|
|
26
|
+
cancelled: "cancelled";
|
|
27
|
+
}>;
|
|
28
|
+
deploymentId: z.ZodString;
|
|
29
|
+
workflowName: z.ZodString;
|
|
30
|
+
specVersion: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
32
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
33
|
+
output: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
34
|
+
error: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
35
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
36
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
37
|
+
expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
38
|
+
startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
39
|
+
completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
40
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
41
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const WorkflowRunSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
44
|
+
runId: z.ZodString;
|
|
45
|
+
deploymentId: z.ZodString;
|
|
46
|
+
workflowName: z.ZodString;
|
|
47
|
+
specVersion: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
49
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
50
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
51
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52
|
+
expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
53
|
+
startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
54
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
55
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
pending: "pending";
|
|
58
|
+
running: "running";
|
|
59
|
+
}>;
|
|
60
|
+
output: z.ZodOptional<z.ZodUndefined>;
|
|
61
|
+
error: z.ZodOptional<z.ZodUndefined>;
|
|
62
|
+
completedAt: z.ZodOptional<z.ZodUndefined>;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
runId: z.ZodString;
|
|
65
|
+
deploymentId: z.ZodString;
|
|
66
|
+
workflowName: z.ZodString;
|
|
67
|
+
specVersion: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
69
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
70
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
71
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
72
|
+
expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
73
|
+
startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
74
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
75
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
76
|
+
status: z.ZodLiteral<"cancelled">;
|
|
77
|
+
output: z.ZodOptional<z.ZodUndefined>;
|
|
78
|
+
error: z.ZodOptional<z.ZodUndefined>;
|
|
79
|
+
completedAt: z.ZodCoercedDate<unknown>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
runId: z.ZodString;
|
|
82
|
+
deploymentId: z.ZodString;
|
|
83
|
+
workflowName: z.ZodString;
|
|
84
|
+
specVersion: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
86
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
87
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
88
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
90
|
+
startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
91
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
92
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
93
|
+
status: z.ZodLiteral<"completed">;
|
|
94
|
+
output: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>;
|
|
95
|
+
error: z.ZodOptional<z.ZodUndefined>;
|
|
96
|
+
completedAt: z.ZodCoercedDate<unknown>;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
runId: z.ZodString;
|
|
99
|
+
deploymentId: z.ZodString;
|
|
100
|
+
workflowName: z.ZodString;
|
|
101
|
+
specVersion: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
103
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
104
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
105
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
106
|
+
expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
107
|
+
startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
108
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
109
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
110
|
+
status: z.ZodLiteral<"failed">;
|
|
111
|
+
output: z.ZodOptional<z.ZodUndefined>;
|
|
112
|
+
error: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>;
|
|
113
|
+
completedAt: z.ZodCoercedDate<unknown>;
|
|
114
|
+
}, z.core.$strip>], "status">;
|
|
115
|
+
export type WorkflowRunStatus = z.infer<typeof WorkflowRunStatusSchema>;
|
|
116
|
+
export type WorkflowRun = z.infer<typeof WorkflowRunSchema>;
|
|
117
|
+
/**
|
|
118
|
+
* WorkflowRun with input/output fields excluded (when resolveData='none').
|
|
119
|
+
* Used for listing runs without fetching the full serialized data.
|
|
120
|
+
*/
|
|
121
|
+
export type WorkflowRunWithoutData = Omit<WorkflowRun, 'input' | 'output'> & {
|
|
122
|
+
input: undefined;
|
|
123
|
+
output: undefined;
|
|
124
|
+
};
|
|
125
|
+
export interface CreateWorkflowRunRequest {
|
|
126
|
+
deploymentId: string;
|
|
127
|
+
workflowName: string;
|
|
128
|
+
input: SerializedData;
|
|
129
|
+
executionContext?: SerializedData;
|
|
130
|
+
specVersion?: number;
|
|
131
|
+
}
|
|
132
|
+
export interface GetWorkflowRunParams {
|
|
133
|
+
resolveData?: ResolveData;
|
|
134
|
+
}
|
|
135
|
+
export interface ListWorkflowRunsParams {
|
|
136
|
+
workflowName?: string;
|
|
137
|
+
status?: WorkflowRunStatus;
|
|
138
|
+
pagination?: PaginationOptions;
|
|
139
|
+
resolveData?: ResolveData;
|
|
140
|
+
}
|
|
141
|
+
export interface CancelWorkflowRunParams {
|
|
142
|
+
resolveData?: ResolveData;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from '#compiled/zod/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Binary serialized data using devalue format.
|
|
4
|
+
* This is the output of `TextEncoder.encode(devalue.stringify(...))`.
|
|
5
|
+
*
|
|
6
|
+
* The workflow core runtime handles serialization/deserialization,
|
|
7
|
+
* and World implementations store and transport this opaque binary payload.
|
|
8
|
+
*/
|
|
9
|
+
export type SerializedData = Uint8Array | unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Zod schema for validating SerializedData (Uint8Array).
|
|
12
|
+
* Used for specVersion >= 2.
|
|
13
|
+
*/
|
|
14
|
+
export declare const BinarySerializedDataSchema: z.ZodType<SerializedData>;
|
|
15
|
+
/**
|
|
16
|
+
* Legacy schema for serialized data (specVersion 1).
|
|
17
|
+
* Legacy data was stored as JSON, so it can be any value.
|
|
18
|
+
*/
|
|
19
|
+
export declare const LegacySerializedDataSchemaV1: z.ZodType<unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Union schema that accepts both v2+ (Uint8Array) and legacy (any) serialized data.
|
|
22
|
+
* Use this for validation when data may come from either specVersion.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SerializedDataSchema: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>;
|
|
25
|
+
//# sourceMappingURL=serialization.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from '#compiled/zod/index.js';
|
|
2
|
+
export declare const zodJsonSchema: z.ZodType<unknown>;
|
|
3
|
+
/**
|
|
4
|
+
* Options for paginated queries.
|
|
5
|
+
* Provides control over page size and cursor-based navigation.
|
|
6
|
+
*/
|
|
7
|
+
export interface PaginationOptions {
|
|
8
|
+
/** Maximum number of items to return (default varies by service, max: 1000) */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Cursor for pagination - token from previous response */
|
|
11
|
+
cursor?: string;
|
|
12
|
+
sortOrder?: 'asc' | 'desc';
|
|
13
|
+
}
|
|
14
|
+
export declare const PaginatedResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
|
|
15
|
+
data: z.ZodArray<T>;
|
|
16
|
+
cursor: z.ZodNullable<z.ZodString>;
|
|
17
|
+
hasMore: z.ZodBoolean;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type PaginatedResponse<T> = z.infer<ReturnType<typeof PaginatedResponseSchema<z.ZodType<T>>>>;
|
|
20
|
+
/**
|
|
21
|
+
* Controls how much data is resolved in the response.
|
|
22
|
+
* - "none": Returns minimal data with input: [] and output: undefined
|
|
23
|
+
* - "all": Returns full data with complete input and output
|
|
24
|
+
*/
|
|
25
|
+
export type ResolveData = 'none' | 'all';
|
|
26
|
+
/**
|
|
27
|
+
* A standard error schema shape for propogating errors from runs and steps
|
|
28
|
+
*/
|
|
29
|
+
export declare const StructuredErrorSchema: z.ZodObject<{
|
|
30
|
+
message: z.ZodString;
|
|
31
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
32
|
+
code: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type StructuredError = z.infer<typeof StructuredErrorSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* A single chunk from a stream, with its 0-based index and raw binary data.
|
|
37
|
+
*/
|
|
38
|
+
export interface StreamChunk {
|
|
39
|
+
/** The 0-based position of this chunk in the stream */
|
|
40
|
+
index: number;
|
|
41
|
+
/** The raw chunk data */
|
|
42
|
+
data: Uint8Array;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Options for paginated chunk retrieval.
|
|
46
|
+
*/
|
|
47
|
+
export interface GetChunksOptions {
|
|
48
|
+
/** Maximum number of chunks to return per page (default: 100, max: 1000) */
|
|
49
|
+
limit?: number;
|
|
50
|
+
/** Opaque cursor from a previous response to fetch the next page */
|
|
51
|
+
cursor?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Metadata about a stream, returned by {@link Streamer.getStreamInfo}.
|
|
55
|
+
*/
|
|
56
|
+
export interface StreamInfoResponse {
|
|
57
|
+
/**
|
|
58
|
+
* The index of the last known chunk (0-based).
|
|
59
|
+
* Returns `-1` when no chunks have been written yet.
|
|
60
|
+
*/
|
|
61
|
+
tailIndex: number;
|
|
62
|
+
/** Whether the stream is fully complete (closed). */
|
|
63
|
+
done: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Paginated response for stream chunks.
|
|
67
|
+
*
|
|
68
|
+
* Extends the standard `PaginatedResponse` shape with a `done` field that
|
|
69
|
+
* indicates whether the stream has been fully written (closed). When `done`
|
|
70
|
+
* is `false`, additional chunks may appear in future requests even after
|
|
71
|
+
* `hasMore` returns `false` for the current set of available chunks.
|
|
72
|
+
*/
|
|
73
|
+
export interface StreamChunksResponse {
|
|
74
|
+
/** Array of stream chunks in index order */
|
|
75
|
+
data: StreamChunk[];
|
|
76
|
+
/** Cursor for the next page, or `null` when no more pages are available */
|
|
77
|
+
cursor: string | null;
|
|
78
|
+
/** Whether additional pages of already-written chunks exist */
|
|
79
|
+
hasMore: boolean;
|
|
80
|
+
/** Whether the stream is fully complete (all chunks have been written and the stream is closed) */
|
|
81
|
+
done: boolean;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=shared.d.ts.map
|