@warlock.js/core 4.7.0 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/esm/config/config-getter.mjs +5 -5
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-loader.mjs +2 -2
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/connectors/access-connector.mjs +2 -2
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.mjs +3 -3
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/cache-connector.mjs +2 -2
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/database-connector.mjs +2 -2
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/herald-connector.mjs +2 -2
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.mjs +7 -7
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/logger-connector.mjs +2 -2
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.mjs +2 -2
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.mjs +2 -2
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/socket-connector.mjs +3 -3
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/http/config.mjs +2 -2
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/createHttpApplication.mjs +2 -2
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +5 -5
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +2 -2
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +4 -4
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/plugins.mjs +9 -9
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/response.mjs +5 -5
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/server.mjs +4 -4
- package/esm/http/server.mjs.map +1 -1
- package/esm/utils/paths.mjs +2 -2
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/validation/validateAll.mjs +2 -2
- package/esm/validation/validateAll.mjs.map +1 -1
- package/package.json +12 -9
- package/esm/ai/src/agent/agent-input-builder.mjs +0 -133
- package/esm/ai/src/agent/agent-input-builder.mjs.map +0 -1
- package/esm/ai/src/agent/agent-log-event.mjs +0 -101
- package/esm/ai/src/agent/agent-log-event.mjs.map +0 -1
- package/esm/ai/src/agent/agent-stream.mjs +0 -82
- package/esm/ai/src/agent/agent-stream.mjs.map +0 -1
- package/esm/ai/src/agent/agent-to-stream-event.mjs +0 -86
- package/esm/ai/src/agent/agent-to-stream-event.mjs.map +0 -1
- package/esm/ai/src/agent/agent.mjs +0 -1276
- package/esm/ai/src/agent/agent.mjs.map +0 -1
- package/esm/ai/src/agent/index.mjs +0 -5
- package/esm/ai/src/agent/json-stream-guard.mjs +0 -400
- package/esm/ai/src/agent/json-stream-guard.mjs.map +0 -1
- package/esm/ai/src/agent/signature.mjs +0 -57
- package/esm/ai/src/agent/signature.mjs.map +0 -1
- package/esm/ai/src/agent/snapshot.mjs +0 -101
- package/esm/ai/src/agent/snapshot.mjs.map +0 -1
- package/esm/ai/src/agent/spawn-sub-agent.mjs +0 -68
- package/esm/ai/src/agent/spawn-sub-agent.mjs.map +0 -1
- package/esm/ai/src/ai.mjs +0 -191
- package/esm/ai/src/ai.mjs.map +0 -1
- package/esm/ai/src/batch/batch.mjs +0 -198
- package/esm/ai/src/batch/batch.mjs.map +0 -1
- package/esm/ai/src/batch/index.mjs +0 -3
- package/esm/ai/src/batch/run-batch-item.mjs +0 -100
- package/esm/ai/src/batch/run-batch-item.mjs.map +0 -1
- package/esm/ai/src/batch/run-with-concurrency.mjs +0 -39
- package/esm/ai/src/batch/run-with-concurrency.mjs.map +0 -1
- package/esm/ai/src/checkpoint/memory.mjs +0 -0
- package/esm/ai/src/checkpoint/memory.mjs.map +0 -1
- package/esm/ai/src/checkpoint/pg.mjs +0 -265
- package/esm/ai/src/checkpoint/pg.mjs.map +0 -1
- package/esm/ai/src/checkpoint/redis.mjs +0 -200
- package/esm/ai/src/checkpoint/redis.mjs.map +0 -1
- package/esm/ai/src/config.mjs +0 -59
- package/esm/ai/src/config.mjs.map +0 -1
- package/esm/ai/src/contracts/end.type.mjs +0 -47
- package/esm/ai/src/contracts/end.type.mjs.map +0 -1
- package/esm/ai/src/errors/agent-cancelled-error.mjs +0 -43
- package/esm/ai/src/errors/agent-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/agent-drift-error.mjs +0 -31
- package/esm/ai/src/errors/agent-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/agent-execution-error.mjs +0 -35
- package/esm/ai/src/errors/agent-execution-error.mjs.map +0 -1
- package/esm/ai/src/errors/agent-max-trips-error.mjs +0 -41
- package/esm/ai/src/errors/agent-max-trips-error.mjs.map +0 -1
- package/esm/ai/src/errors/ai-error.mjs +0 -68
- package/esm/ai/src/errors/ai-error.mjs.map +0 -1
- package/esm/ai/src/errors/budget-exceeded-error.mjs +0 -31
- package/esm/ai/src/errors/budget-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/content-filter-error.mjs +0 -28
- package/esm/ai/src/errors/content-filter-error.mjs.map +0 -1
- package/esm/ai/src/errors/context-length-exceeded-error.mjs +0 -31
- package/esm/ai/src/errors/context-length-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/guardrail-violation-error.mjs +0 -41
- package/esm/ai/src/errors/guardrail-violation-error.mjs.map +0 -1
- package/esm/ai/src/errors/index.mjs +0 -40
- package/esm/ai/src/errors/invalid-request-error.mjs +0 -31
- package/esm/ai/src/errors/invalid-request-error.mjs.map +0 -1
- package/esm/ai/src/errors/max-iterations-error.mjs +0 -32
- package/esm/ai/src/errors/max-iterations-error.mjs.map +0 -1
- package/esm/ai/src/errors/max-steps-exceeded-error.mjs +0 -21
- package/esm/ai/src/errors/max-steps-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-cancelled-error.mjs +0 -31
- package/esm/ai/src/errors/orchestrator-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-config-error.mjs +0 -30
- package/esm/ai/src/errors/orchestrator-config-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-drift-error.mjs +0 -37
- package/esm/ai/src/errors/orchestrator-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-failed-error.mjs +0 -36
- package/esm/ai/src/errors/orchestrator-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/outbound-policy-error.mjs +0 -32
- package/esm/ai/src/errors/outbound-policy-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-cancelled-error.mjs +0 -29
- package/esm/ai/src/errors/planner-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-drift-error.mjs +0 -33
- package/esm/ai/src/errors/planner-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-failed-error.mjs +0 -37
- package/esm/ai/src/errors/planner-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-plan-invalid-error.mjs +0 -25
- package/esm/ai/src/errors/planner-plan-invalid-error.mjs.map +0 -1
- package/esm/ai/src/errors/prompt-refinement-error.mjs +0 -27
- package/esm/ai/src/errors/prompt-refinement-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-auth-error.mjs +0 -26
- package/esm/ai/src/errors/provider-auth-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-error.mjs +0 -42
- package/esm/ai/src/errors/provider-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-rate-limit-error.mjs +0 -31
- package/esm/ai/src/errors/provider-rate-limit-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-timeout-error.mjs +0 -26
- package/esm/ai/src/errors/provider-timeout-error.mjs.map +0 -1
- package/esm/ai/src/errors/quota-exceeded-error.mjs +0 -40
- package/esm/ai/src/errors/quota-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/routing-error.mjs +0 -23
- package/esm/ai/src/errors/routing-error.mjs.map +0 -1
- package/esm/ai/src/errors/schema-validation-error.mjs +0 -37
- package/esm/ai/src/errors/schema-validation-error.mjs.map +0 -1
- package/esm/ai/src/errors/step-failed-error.mjs +0 -19
- package/esm/ai/src/errors/step-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-cancelled-error.mjs +0 -29
- package/esm/ai/src/errors/supervisor-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-drift-error.mjs +0 -30
- package/esm/ai/src/errors/supervisor-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-failed-error.mjs +0 -43
- package/esm/ai/src/errors/supervisor-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-routing-error.mjs +0 -39
- package/esm/ai/src/errors/supervisor-routing-error.mjs.map +0 -1
- package/esm/ai/src/errors/tool-execution-error.mjs +0 -32
- package/esm/ai/src/errors/tool-execution-error.mjs.map +0 -1
- package/esm/ai/src/errors/workflow-cancelled-error.mjs +0 -23
- package/esm/ai/src/errors/workflow-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/workflow-drift-error.mjs +0 -24
- package/esm/ai/src/errors/workflow-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/workflow-error.mjs +0 -18
- package/esm/ai/src/errors/workflow-error.mjs.map +0 -1
- package/esm/ai/src/eval/dataset.mjs +0 -112
- package/esm/ai/src/eval/dataset.mjs.map +0 -1
- package/esm/ai/src/eval/eval-runner.mjs +0 -135
- package/esm/ai/src/eval/eval-runner.mjs.map +0 -1
- package/esm/ai/src/eval/index.mjs +0 -48
- package/esm/ai/src/eval/index.mjs.map +0 -1
- package/esm/ai/src/eval/judge-scorer.mjs +0 -87
- package/esm/ai/src/eval/judge-scorer.mjs.map +0 -1
- package/esm/ai/src/eval/regression.mjs +0 -51
- package/esm/ai/src/eval/regression.mjs.map +0 -1
- package/esm/ai/src/eval/report-json.mjs +0 -33
- package/esm/ai/src/eval/report-json.mjs.map +0 -1
- package/esm/ai/src/eval/report-junit.mjs +0 -60
- package/esm/ai/src/eval/report-junit.mjs.map +0 -1
- package/esm/ai/src/eval/scorers.mjs +0 -101
- package/esm/ai/src/eval/scorers.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/index.mjs +0 -6
- package/esm/ai/src/guard/detectors/injection.mjs +0 -254
- package/esm/ai/src/guard/detectors/injection.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/moderation.mjs +0 -134
- package/esm/ai/src/guard/detectors/moderation.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/pii.mjs +0 -199
- package/esm/ai/src/guard/detectors/pii.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/topic.mjs +0 -99
- package/esm/ai/src/guard/detectors/topic.mjs.map +0 -1
- package/esm/ai/src/guard/errors.mjs +0 -18
- package/esm/ai/src/guard/errors.mjs.map +0 -1
- package/esm/ai/src/guard/guard.mjs +0 -209
- package/esm/ai/src/guard/guard.mjs.map +0 -1
- package/esm/ai/src/guard/guardrail.mjs +0 -22
- package/esm/ai/src/guard/guardrail.mjs.map +0 -1
- package/esm/ai/src/human/errors.mjs +0 -60
- package/esm/ai/src/human/errors.mjs.map +0 -1
- package/esm/ai/src/human/human-approval.mjs +0 -170
- package/esm/ai/src/human/human-approval.mjs.map +0 -1
- package/esm/ai/src/human/policy.mjs +0 -67
- package/esm/ai/src/human/policy.mjs.map +0 -1
- package/esm/ai/src/human/register.mjs +0 -37
- package/esm/ai/src/human/register.mjs.map +0 -1
- package/esm/ai/src/human/resume-seed.mjs +0 -53
- package/esm/ai/src/human/resume-seed.mjs.map +0 -1
- package/esm/ai/src/human/resume.mjs +0 -121
- package/esm/ai/src/human/resume.mjs.map +0 -1
- package/esm/ai/src/human/stores/index.mjs +0 -5
- package/esm/ai/src/human/stores/memory.mjs +0 -91
- package/esm/ai/src/human/stores/memory.mjs.map +0 -1
- package/esm/ai/src/human/stores/pg.mjs +0 -220
- package/esm/ai/src/human/stores/pg.mjs.map +0 -1
- package/esm/ai/src/human/stores/redis.mjs +0 -201
- package/esm/ai/src/human/stores/redis.mjs.map +0 -1
- package/esm/ai/src/image/image-cost.mjs +0 -55
- package/esm/ai/src/image/image-cost.mjs.map +0 -1
- package/esm/ai/src/image/image.mjs +0 -112
- package/esm/ai/src/image/image.mjs.map +0 -1
- package/esm/ai/src/image/index.mjs +0 -4
- package/esm/ai/src/index.mjs +0 -196
- package/esm/ai/src/memory/derive-id.mjs +0 -24
- package/esm/ai/src/memory/derive-id.mjs.map +0 -1
- package/esm/ai/src/memory/episodic-memory.mjs +0 -106
- package/esm/ai/src/memory/episodic-memory.mjs.map +0 -1
- package/esm/ai/src/memory/memory.mjs +0 -166
- package/esm/ai/src/memory/memory.mjs.map +0 -1
- package/esm/ai/src/memory/procedural-memory.mjs +0 -103
- package/esm/ai/src/memory/procedural-memory.mjs.map +0 -1
- package/esm/ai/src/memory/semantic-memory.mjs +0 -80
- package/esm/ai/src/memory/semantic-memory.mjs.map +0 -1
- package/esm/ai/src/memory/working-memory.mjs +0 -62
- package/esm/ai/src/memory/working-memory.mjs.map +0 -1
- package/esm/ai/src/middleware/builtins/budget.mjs +0 -219
- package/esm/ai/src/middleware/builtins/budget.mjs.map +0 -1
- package/esm/ai/src/middleware/builtins/guardrail.mjs +0 -76
- package/esm/ai/src/middleware/builtins/guardrail.mjs.map +0 -1
- package/esm/ai/src/middleware/builtins/semantic-cache.mjs +0 -149
- package/esm/ai/src/middleware/builtins/semantic-cache.mjs.map +0 -1
- package/esm/ai/src/middleware/helpers/compose.mjs +0 -52
- package/esm/ai/src/middleware/helpers/compose.mjs.map +0 -1
- package/esm/ai/src/middleware/helpers/for-tool.mjs +0 -80
- package/esm/ai/src/middleware/helpers/for-tool.mjs.map +0 -1
- package/esm/ai/src/middleware/index.mjs +0 -10
- package/esm/ai/src/middleware/pipeline.mjs +0 -100
- package/esm/ai/src/middleware/pipeline.mjs.map +0 -1
- package/esm/ai/src/middleware/utils/extract-user-text.mjs +0 -47
- package/esm/ai/src/middleware/utils/extract-user-text.mjs.map +0 -1
- package/esm/ai/src/middleware/utils/namespaced-state.mjs +0 -60
- package/esm/ai/src/middleware/utils/namespaced-state.mjs.map +0 -1
- package/esm/ai/src/mock/index.mjs +0 -4
- package/esm/ai/src/mock/mock-agent.mjs +0 -3
- package/esm/ai/src/mock/mock-router.mjs +0 -58
- package/esm/ai/src/mock/mock-router.mjs.map +0 -1
- package/esm/ai/src/model/fallback-model.mjs +0 -218
- package/esm/ai/src/model/fallback-model.mjs.map +0 -1
- package/esm/ai/src/model/index.mjs +0 -3
- package/esm/ai/src/object-stream/index.mjs +0 -4
- package/esm/ai/src/object-stream/parse-partial-json.mjs +0 -78
- package/esm/ai/src/object-stream/parse-partial-json.mjs.map +0 -1
- package/esm/ai/src/object-stream/stream-object.mjs +0 -97
- package/esm/ai/src/object-stream/stream-object.mjs.map +0 -1
- package/esm/ai/src/observe/index.mjs +0 -4
- package/esm/ai/src/observe/observer-registry.mjs +0 -35
- package/esm/ai/src/observe/observer-registry.mjs.map +0 -1
- package/esm/ai/src/observe/resolve-observers.mjs +0 -73
- package/esm/ai/src/observe/resolve-observers.mjs.map +0 -1
- package/esm/ai/src/orchestrator/as-tool.mjs +0 -98
- package/esm/ai/src/orchestrator/as-tool.mjs.map +0 -1
- package/esm/ai/src/orchestrator/checkpoint.mjs +0 -75
- package/esm/ai/src/orchestrator/checkpoint.mjs.map +0 -1
- package/esm/ai/src/orchestrator/commands.mjs +0 -34
- package/esm/ai/src/orchestrator/commands.mjs.map +0 -1
- package/esm/ai/src/orchestrator/compaction.mjs +0 -206
- package/esm/ai/src/orchestrator/compaction.mjs.map +0 -1
- package/esm/ai/src/orchestrator/dispatch.mjs +0 -171
- package/esm/ai/src/orchestrator/dispatch.mjs.map +0 -1
- package/esm/ai/src/orchestrator/emitter.mjs +0 -85
- package/esm/ai/src/orchestrator/emitter.mjs.map +0 -1
- package/esm/ai/src/orchestrator/execution.mjs +0 -395
- package/esm/ai/src/orchestrator/execution.mjs.map +0 -1
- package/esm/ai/src/orchestrator/index.mjs +0 -11
- package/esm/ai/src/orchestrator/load.mjs +0 -49
- package/esm/ai/src/orchestrator/load.mjs.map +0 -1
- package/esm/ai/src/orchestrator/lock.mjs +0 -75
- package/esm/ai/src/orchestrator/lock.mjs.map +0 -1
- package/esm/ai/src/orchestrator/memory.mjs +0 -141
- package/esm/ai/src/orchestrator/memory.mjs.map +0 -1
- package/esm/ai/src/orchestrator/orchestrator-stream.mjs +0 -98
- package/esm/ai/src/orchestrator/orchestrator-stream.mjs.map +0 -1
- package/esm/ai/src/orchestrator/orchestrator.mjs +0 -206
- package/esm/ai/src/orchestrator/orchestrator.mjs.map +0 -1
- package/esm/ai/src/orchestrator/resume.mjs +0 -74
- package/esm/ai/src/orchestrator/resume.mjs.map +0 -1
- package/esm/ai/src/orchestrator/session-lock.mjs +0 -83
- package/esm/ai/src/orchestrator/session-lock.mjs.map +0 -1
- package/esm/ai/src/orchestrator/signature.mjs +0 -120
- package/esm/ai/src/orchestrator/signature.mjs.map +0 -1
- package/esm/ai/src/orchestrator/window.mjs +0 -56
- package/esm/ai/src/orchestrator/window.mjs.map +0 -1
- package/esm/ai/src/planner/dag-scheduler.mjs +0 -97
- package/esm/ai/src/planner/dag-scheduler.mjs.map +0 -1
- package/esm/ai/src/planner/index.mjs +0 -6
- package/esm/ai/src/planner/plan-prompt.mjs +0 -31
- package/esm/ai/src/planner/plan-prompt.mjs.map +0 -1
- package/esm/ai/src/planner/plan-schema.mjs +0 -120
- package/esm/ai/src/planner/plan-schema.mjs.map +0 -1
- package/esm/ai/src/planner/planner-run.mjs +0 -769
- package/esm/ai/src/planner/planner-run.mjs.map +0 -1
- package/esm/ai/src/planner/planner.mjs +0 -144
- package/esm/ai/src/planner/planner.mjs.map +0 -1
- package/esm/ai/src/planner/signature.mjs +0 -27
- package/esm/ai/src/planner/signature.mjs.map +0 -1
- package/esm/ai/src/planner/snapshot.mjs +0 -95
- package/esm/ai/src/planner/snapshot.mjs.map +0 -1
- package/esm/ai/src/prompt/errors.mjs +0 -73
- package/esm/ai/src/prompt/errors.mjs.map +0 -1
- package/esm/ai/src/prompt/index.mjs +0 -4
- package/esm/ai/src/prompt/prompt-langfuse-sync.mjs +0 -104
- package/esm/ai/src/prompt/prompt-langfuse-sync.mjs.map +0 -1
- package/esm/ai/src/prompt/prompt-validate.mjs +0 -170
- package/esm/ai/src/prompt/prompt-validate.mjs.map +0 -1
- package/esm/ai/src/prompt/prompt.mjs +0 -218
- package/esm/ai/src/prompt/prompt.mjs.map +0 -1
- package/esm/ai/src/prompts/index.mjs +0 -3
- package/esm/ai/src/prompts/prompts-manager.mjs +0 -410
- package/esm/ai/src/prompts/prompts-manager.mjs.map +0 -1
- package/esm/ai/src/prompts/prompts-validate.mjs +0 -0
- package/esm/ai/src/prompts/prompts-validate.mjs.map +0 -1
- package/esm/ai/src/rag/as-tool.mjs +0 -48
- package/esm/ai/src/rag/as-tool.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/chunk.mjs +0 -44
- package/esm/ai/src/rag/chunk/chunk.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/fixed.mjs +0 -32
- package/esm/ai/src/rag/chunk/fixed.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/markdown.mjs +0 -75
- package/esm/ai/src/rag/chunk/markdown.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/recursive.mjs +0 -132
- package/esm/ai/src/rag/chunk/recursive.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/sentence.mjs +0 -73
- package/esm/ai/src/rag/chunk/sentence.mjs.map +0 -1
- package/esm/ai/src/rag/hybrid/bm25.mjs +0 -51
- package/esm/ai/src/rag/hybrid/bm25.mjs.map +0 -1
- package/esm/ai/src/rag/hybrid/hybrid-rank.mjs +0 -29
- package/esm/ai/src/rag/hybrid/hybrid-rank.mjs.map +0 -1
- package/esm/ai/src/rag/hybrid/rrf.mjs +0 -30
- package/esm/ai/src/rag/hybrid/rrf.mjs.map +0 -1
- package/esm/ai/src/rag/index.mjs +0 -18
- package/esm/ai/src/rag/loaders/errors.mjs +0 -25
- package/esm/ai/src/rag/loaders/errors.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/index.mjs +0 -7
- package/esm/ai/src/rag/loaders/load-html.mjs +0 -138
- package/esm/ai/src/rag/loaders/load-html.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/load-pdf.mjs +0 -150
- package/esm/ai/src/rag/loaders/load-pdf.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/load-text.mjs +0 -60
- package/esm/ai/src/rag/loaders/load-text.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/load-web.mjs +0 -89
- package/esm/ai/src/rag/loaders/load-web.mjs.map +0 -1
- package/esm/ai/src/rag/rag.mjs +0 -126
- package/esm/ai/src/rag/rag.mjs.map +0 -1
- package/esm/ai/src/rag/rerank/keyword-reranker.mjs +0 -58
- package/esm/ai/src/rag/rerank/keyword-reranker.mjs.map +0 -1
- package/esm/ai/src/rag/rerank/llm-reranker.mjs +0 -85
- package/esm/ai/src/rag/rerank/llm-reranker.mjs.map +0 -1
- package/esm/ai/src/rag/retrieve.mjs +0 -68
- package/esm/ai/src/rag/retrieve.mjs.map +0 -1
- package/esm/ai/src/rag/store/cache-vector-store.mjs +0 -48
- package/esm/ai/src/rag/store/cache-vector-store.mjs.map +0 -1
- package/esm/ai/src/rag/store/pg-vector-store.mjs +0 -328
- package/esm/ai/src/rag/store/pg-vector-store.mjs.map +0 -1
- package/esm/ai/src/rag/transforms/multi-query.mjs +0 -41
- package/esm/ai/src/rag/transforms/multi-query.mjs.map +0 -1
- package/esm/ai/src/security/index.mjs +0 -5
- package/esm/ai/src/security/outbound-policy.mjs +0 -187
- package/esm/ai/src/security/outbound-policy.mjs.map +0 -1
- package/esm/ai/src/security/private-ip.mjs +0 -48
- package/esm/ai/src/security/private-ip.mjs.map +0 -1
- package/esm/ai/src/security/redact.mjs +0 -60
- package/esm/ai/src/security/redact.mjs.map +0 -1
- package/esm/ai/src/serve/serve.mjs +0 -90
- package/esm/ai/src/serve/serve.mjs.map +0 -1
- package/esm/ai/src/serve/sse.mjs +0 -25
- package/esm/ai/src/serve/sse.mjs.map +0 -1
- package/esm/ai/src/serve/stream-to-sse.mjs +0 -37
- package/esm/ai/src/serve/stream-to-sse.mjs.map +0 -1
- package/esm/ai/src/skills/catalog.mjs +0 -140
- package/esm/ai/src/skills/catalog.mjs.map +0 -1
- package/esm/ai/src/skills/index.mjs +0 -11
- package/esm/ai/src/skills/load-skill-tool.mjs +0 -65
- package/esm/ai/src/skills/load-skill-tool.mjs.map +0 -1
- package/esm/ai/src/skills/save-skill-tool.mjs +0 -65
- package/esm/ai/src/skills/save-skill-tool.mjs.map +0 -1
- package/esm/ai/src/skills/skills.mjs +0 -109
- package/esm/ai/src/skills/skills.mjs.map +0 -1
- package/esm/ai/src/skills/sources/directory-source.mjs +0 -108
- package/esm/ai/src/skills/sources/directory-source.mjs.map +0 -1
- package/esm/ai/src/skills/sources/index.mjs +0 -27
- package/esm/ai/src/skills/sources/index.mjs.map +0 -1
- package/esm/ai/src/skills/sources/parse-frontmatter.mjs +0 -46
- package/esm/ai/src/skills/sources/parse-frontmatter.mjs.map +0 -1
- package/esm/ai/src/skills/sources/store-source.mjs +0 -15
- package/esm/ai/src/skills/sources/store-source.mjs.map +0 -1
- package/esm/ai/src/skills/sources/url-source.mjs +0 -117
- package/esm/ai/src/skills/sources/url-source.mjs.map +0 -1
- package/esm/ai/src/snapshot/memory.mjs +0 -81
- package/esm/ai/src/snapshot/memory.mjs.map +0 -1
- package/esm/ai/src/snapshot/pg.mjs +0 -146
- package/esm/ai/src/snapshot/pg.mjs.map +0 -1
- package/esm/ai/src/snapshot/redis.mjs +0 -101
- package/esm/ai/src/snapshot/redis.mjs.map +0 -1
- package/esm/ai/src/speech/index.mjs +0 -3
- package/esm/ai/src/speech/speech.mjs +0 -122
- package/esm/ai/src/speech/speech.mjs.map +0 -1
- package/esm/ai/src/supervisor/as-tool.mjs +0 -74
- package/esm/ai/src/supervisor/as-tool.mjs.map +0 -1
- package/esm/ai/src/supervisor/cancellation.mjs +0 -22
- package/esm/ai/src/supervisor/cancellation.mjs.map +0 -1
- package/esm/ai/src/supervisor/decide.mjs +0 -272
- package/esm/ai/src/supervisor/decide.mjs.map +0 -1
- package/esm/ai/src/supervisor/emitter.mjs +0 -47
- package/esm/ai/src/supervisor/emitter.mjs.map +0 -1
- package/esm/ai/src/supervisor/entries.mjs +0 -206
- package/esm/ai/src/supervisor/entries.mjs.map +0 -1
- package/esm/ai/src/supervisor/execution.mjs +0 -1921
- package/esm/ai/src/supervisor/execution.mjs.map +0 -1
- package/esm/ai/src/supervisor/fan-out.mjs +0 -65
- package/esm/ai/src/supervisor/fan-out.mjs.map +0 -1
- package/esm/ai/src/supervisor/index.mjs +0 -14
- package/esm/ai/src/supervisor/router-factory.mjs +0 -141
- package/esm/ai/src/supervisor/router-factory.mjs.map +0 -1
- package/esm/ai/src/supervisor/router-prompt.mjs +0 -52
- package/esm/ai/src/supervisor/router-prompt.mjs.map +0 -1
- package/esm/ai/src/supervisor/signature.mjs +0 -89
- package/esm/ai/src/supervisor/signature.mjs.map +0 -1
- package/esm/ai/src/supervisor/snapshot.mjs +0 -69
- package/esm/ai/src/supervisor/snapshot.mjs.map +0 -1
- package/esm/ai/src/supervisor/supervisor-stream.mjs +0 -89
- package/esm/ai/src/supervisor/supervisor-stream.mjs.map +0 -1
- package/esm/ai/src/supervisor/supervisor.mjs +0 -144
- package/esm/ai/src/supervisor/supervisor.mjs.map +0 -1
- package/esm/ai/src/system-prompt/index.mjs +0 -7
- package/esm/ai/src/system-prompt/instruction.mjs +0 -57
- package/esm/ai/src/system-prompt/instruction.mjs.map +0 -1
- package/esm/ai/src/system-prompt/persona.mjs +0 -57
- package/esm/ai/src/system-prompt/persona.mjs.map +0 -1
- package/esm/ai/src/system-prompt/refined-system-prompt.mjs +0 -461
- package/esm/ai/src/system-prompt/refined-system-prompt.mjs.map +0 -1
- package/esm/ai/src/system-prompt/render-placeholders.mjs +0 -58
- package/esm/ai/src/system-prompt/render-placeholders.mjs.map +0 -1
- package/esm/ai/src/system-prompt/system-prompt.mjs +0 -286
- package/esm/ai/src/system-prompt/system-prompt.mjs.map +0 -1
- package/esm/ai/src/team/gates.mjs +0 -48
- package/esm/ai/src/team/gates.mjs.map +0 -1
- package/esm/ai/src/team/index.mjs +0 -3
- package/esm/ai/src/team/team.mjs +0 -94
- package/esm/ai/src/team/team.mjs.map +0 -1
- package/esm/ai/src/tool/executable-as-tool.mjs +0 -81
- package/esm/ai/src/tool/executable-as-tool.mjs.map +0 -1
- package/esm/ai/src/tool/index.mjs +0 -4
- package/esm/ai/src/tool/tool.mjs +0 -185
- package/esm/ai/src/tool/tool.mjs.map +0 -1
- package/esm/ai/src/transcribe/audio-input.mjs +0 -84
- package/esm/ai/src/transcribe/audio-input.mjs.map +0 -1
- package/esm/ai/src/transcribe/index.mjs +0 -4
- package/esm/ai/src/transcribe/transcribe.mjs +0 -127
- package/esm/ai/src/transcribe/transcribe.mjs.map +0 -1
- package/esm/ai/src/utils/compute-cost.mjs +0 -112
- package/esm/ai/src/utils/compute-cost.mjs.map +0 -1
- package/esm/ai/src/utils/extract-json-lenient.mjs +0 -97
- package/esm/ai/src/utils/extract-json-lenient.mjs.map +0 -1
- package/esm/ai/src/utils/extract-json-payload.mjs +0 -39
- package/esm/ai/src/utils/extract-json-payload.mjs.map +0 -1
- package/esm/ai/src/utils/generate-run-id.mjs +0 -23
- package/esm/ai/src/utils/generate-run-id.mjs.map +0 -1
- package/esm/ai/src/utils/index.mjs +0 -12
- package/esm/ai/src/utils/json-schema.mjs +0 -89
- package/esm/ai/src/utils/json-schema.mjs.map +0 -1
- package/esm/ai/src/utils/prepare-attachment-part.mjs +0 -232
- package/esm/ai/src/utils/prepare-attachment-part.mjs.map +0 -1
- package/esm/ai/src/utils/resolve-attachment.mjs +0 -74
- package/esm/ai/src/utils/resolve-attachment.mjs.map +0 -1
- package/esm/ai/src/utils/run-context.mjs +0 -89
- package/esm/ai/src/utils/run-context.mjs.map +0 -1
- package/esm/ai/src/utils/safe-json-parse.mjs +0 -22
- package/esm/ai/src/utils/safe-json-parse.mjs.map +0 -1
- package/esm/ai/src/utils/stamp-report-lineage.mjs +0 -45
- package/esm/ai/src/utils/stamp-report-lineage.mjs.map +0 -1
- package/esm/ai/src/vcr/cassette-io.mjs +0 -57
- package/esm/ai/src/vcr/cassette-io.mjs.map +0 -1
- package/esm/ai/src/vcr/errors.mjs +0 -37
- package/esm/ai/src/vcr/errors.mjs.map +0 -1
- package/esm/ai/src/vcr/hash-request.mjs +0 -118
- package/esm/ai/src/vcr/hash-request.mjs.map +0 -1
- package/esm/ai/src/vcr/index.mjs +0 -5
- package/esm/ai/src/vcr/vcr.mjs +0 -248
- package/esm/ai/src/vcr/vcr.mjs.map +0 -1
- package/esm/ai/src/workflow/as-tool.mjs +0 -49
- package/esm/ai/src/workflow/as-tool.mjs.map +0 -1
- package/esm/ai/src/workflow/cancellation.mjs +0 -44
- package/esm/ai/src/workflow/cancellation.mjs.map +0 -1
- package/esm/ai/src/workflow/emitter.mjs +0 -40
- package/esm/ai/src/workflow/emitter.mjs.map +0 -1
- package/esm/ai/src/workflow/engine.mjs +0 -363
- package/esm/ai/src/workflow/engine.mjs.map +0 -1
- package/esm/ai/src/workflow/index.mjs +0 -5
- package/esm/ai/src/workflow/retry.mjs +0 -32
- package/esm/ai/src/workflow/retry.mjs.map +0 -1
- package/esm/ai/src/workflow/router.mjs +0 -56
- package/esm/ai/src/workflow/router.mjs.map +0 -1
- package/esm/ai/src/workflow/run-scoped-emitter.mjs +0 -32
- package/esm/ai/src/workflow/run-scoped-emitter.mjs.map +0 -1
- package/esm/ai/src/workflow/signature.mjs +0 -34
- package/esm/ai/src/workflow/signature.mjs.map +0 -1
- package/esm/ai/src/workflow/snapshot.mjs +0 -77
- package/esm/ai/src/workflow/snapshot.mjs.map +0 -1
- package/esm/ai/src/workflow/state.mjs +0 -37
- package/esm/ai/src/workflow/state.mjs.map +0 -1
- package/esm/ai/src/workflow/step-runner.mjs +0 -370
- package/esm/ai/src/workflow/step-runner.mjs.map +0 -1
- package/esm/ai/src/workflow/step.mjs +0 -37
- package/esm/ai/src/workflow/step.mjs.map +0 -1
- package/esm/ai/src/workflow/workflow.mjs +0 -122
- package/esm/ai/src/workflow/workflow.mjs.map +0 -1
- package/esm/ai-openai/src/embedder.mjs +0 -4
- package/esm/ai-openai/src/image.mjs +0 -5
- package/esm/ai-openai/src/index.mjs +0 -7
- package/esm/ai-openai/src/model.mjs +0 -5
- package/esm/ai-openai/src/sdk.mjs +0 -9
- package/esm/ai-openai/src/speech.mjs +0 -5
- package/esm/ai-openai/src/transcription.mjs +0 -6
- package/esm/ai-openai/src/utils/index.mjs +0 -5
- package/esm/ai-openai/src/utils/to-openai-messages.mjs +0 -3
- package/esm/ai-openai/src/utils/to-openai-tools.mjs +0 -3
- package/esm/ai-openai/src/utils/wrap-openai-error.mjs +0 -4
- package/esm/node_modules/langfuse/lib/index.mjs +0 -1827
- package/esm/node_modules/langfuse/lib/index.mjs.map +0 -1
- package/esm/node_modules/langfuse-core/lib/index.mjs +0 -1770
- package/esm/node_modules/langfuse-core/lib/index.mjs.map +0 -1
- package/esm/node_modules/mustache/mustache.mjs +0 -587
- package/esm/node_modules/mustache/mustache.mjs.map +0 -1
- package/esm/node_modules/openai/_vendor/partial-json-parser/parser.mjs +0 -180
- package/esm/node_modules/openai/_vendor/partial-json-parser/parser.mjs.map +0 -1
- package/esm/node_modules/openai/auth/workload-identity-auth.mjs +0 -80
- package/esm/node_modules/openai/auth/workload-identity-auth.mjs.map +0 -1
- package/esm/node_modules/openai/azure.mjs +0 -82
- package/esm/node_modules/openai/azure.mjs.map +0 -1
- package/esm/node_modules/openai/client.mjs +0 -638
- package/esm/node_modules/openai/client.mjs.map +0 -1
- package/esm/node_modules/openai/core/api-promise.mjs +0 -75
- package/esm/node_modules/openai/core/api-promise.mjs.map +0 -1
- package/esm/node_modules/openai/core/error.mjs +0 -110
- package/esm/node_modules/openai/core/error.mjs.map +0 -1
- package/esm/node_modules/openai/core/pagination.mjs +0 -160
- package/esm/node_modules/openai/core/pagination.mjs.map +0 -1
- package/esm/node_modules/openai/core/resource.mjs +0 -10
- package/esm/node_modules/openai/core/resource.mjs.map +0 -1
- package/esm/node_modules/openai/core/streaming.mjs +0 -238
- package/esm/node_modules/openai/core/streaming.mjs.map +0 -1
- package/esm/node_modules/openai/index.mjs +0 -8
- package/esm/node_modules/openai/internal/decoders/line.mjs +0 -91
- package/esm/node_modules/openai/internal/decoders/line.mjs.map +0 -1
- package/esm/node_modules/openai/internal/detect-platform.mjs +0 -123
- package/esm/node_modules/openai/internal/detect-platform.mjs.map +0 -1
- package/esm/node_modules/openai/internal/errors.mjs +0 -26
- package/esm/node_modules/openai/internal/errors.mjs.map +0 -1
- package/esm/node_modules/openai/internal/headers.mjs +0 -65
- package/esm/node_modules/openai/internal/headers.mjs.map +0 -1
- package/esm/node_modules/openai/internal/parse.mjs +0 -41
- package/esm/node_modules/openai/internal/parse.mjs.map +0 -1
- package/esm/node_modules/openai/internal/qs/formats.mjs +0 -12
- package/esm/node_modules/openai/internal/qs/formats.mjs.map +0 -1
- package/esm/node_modules/openai/internal/qs/stringify.mjs +0 -179
- package/esm/node_modules/openai/internal/qs/stringify.mjs.map +0 -1
- package/esm/node_modules/openai/internal/qs/utils.mjs +0 -65
- package/esm/node_modules/openai/internal/qs/utils.mjs.map +0 -1
- package/esm/node_modules/openai/internal/request-options.mjs +0 -11
- package/esm/node_modules/openai/internal/request-options.mjs.map +0 -1
- package/esm/node_modules/openai/internal/shims.mjs +0 -77
- package/esm/node_modules/openai/internal/shims.mjs.map +0 -1
- package/esm/node_modules/openai/internal/to-file.mjs +0 -63
- package/esm/node_modules/openai/internal/to-file.mjs.map +0 -1
- package/esm/node_modules/openai/internal/tslib.mjs +0 -16
- package/esm/node_modules/openai/internal/tslib.mjs.map +0 -1
- package/esm/node_modules/openai/internal/uploads.mjs +0 -94
- package/esm/node_modules/openai/internal/uploads.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/base64.mjs +0 -22
- package/esm/node_modules/openai/internal/utils/base64.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/bytes.mjs +0 -26
- package/esm/node_modules/openai/internal/utils/bytes.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/env.mjs +0 -16
- package/esm/node_modules/openai/internal/utils/env.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/log.mjs +0 -58
- package/esm/node_modules/openai/internal/utils/log.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/path.mjs +0 -62
- package/esm/node_modules/openai/internal/utils/path.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/query.mjs +0 -10
- package/esm/node_modules/openai/internal/utils/query.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/sleep.mjs +0 -6
- package/esm/node_modules/openai/internal/utils/sleep.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/uuid.mjs +0 -18
- package/esm/node_modules/openai/internal/utils/uuid.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/values.mjs +0 -41
- package/esm/node_modules/openai/internal/utils/values.mjs.map +0 -1
- package/esm/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +0 -247
- package/esm/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +0 -1
- package/esm/node_modules/openai/lib/AssistantStream.mjs +0 -472
- package/esm/node_modules/openai/lib/AssistantStream.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ChatCompletionRunner.mjs +0 -26
- package/esm/node_modules/openai/lib/ChatCompletionRunner.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ChatCompletionStream.mjs +0 -423
- package/esm/node_modules/openai/lib/ChatCompletionStream.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +0 -26
- package/esm/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map +0 -1
- package/esm/node_modules/openai/lib/EventStream.mjs +0 -163
- package/esm/node_modules/openai/lib/EventStream.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ResponsesParser.mjs +0 -94
- package/esm/node_modules/openai/lib/ResponsesParser.mjs.map +0 -1
- package/esm/node_modules/openai/lib/RunnableFunction.mjs +0 -8
- package/esm/node_modules/openai/lib/RunnableFunction.mjs.map +0 -1
- package/esm/node_modules/openai/lib/Util.mjs +0 -19
- package/esm/node_modules/openai/lib/Util.mjs.map +0 -1
- package/esm/node_modules/openai/lib/chatCompletionUtils.mjs +0 -11
- package/esm/node_modules/openai/lib/chatCompletionUtils.mjs.map +0 -1
- package/esm/node_modules/openai/lib/parser.mjs +0 -88
- package/esm/node_modules/openai/lib/parser.mjs.map +0 -1
- package/esm/node_modules/openai/lib/responses/ResponseStream.mjs +0 -231
- package/esm/node_modules/openai/lib/responses/ResponseStream.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/admin.mjs +0 -15
- package/esm/node_modules/openai/resources/admin/admin.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/admin-api-keys.mjs +0 -81
- package/esm/node_modules/openai/resources/admin/organization/admin-api-keys.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/audit-logs.mjs +0 -31
- package/esm/node_modules/openai/resources/admin/organization/audit-logs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/certificates.mjs +0 -153
- package/esm/node_modules/openai/resources/admin/organization/certificates.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/data-retention.mjs +0 -42
- package/esm/node_modules/openai/resources/admin/organization/data-retention.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/groups/groups.mjs +0 -106
- package/esm/node_modules/openai/resources/admin/organization/groups/groups.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/groups/roles.mjs +0 -88
- package/esm/node_modules/openai/resources/admin/organization/groups/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/groups/users.mjs +0 -88
- package/esm/node_modules/openai/resources/admin/organization/groups/users.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/invites.mjs +0 -83
- package/esm/node_modules/openai/resources/admin/organization/invites.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/organization.mjs +0 -45
- package/esm/node_modules/openai/resources/admin/organization/organization.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/api-keys.mjs +0 -72
- package/esm/node_modules/openai/resources/admin/organization/projects/api-keys.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/certificates.mjs +0 -78
- package/esm/node_modules/openai/resources/admin/organization/projects/certificates.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/data-retention.mjs +0 -46
- package/esm/node_modules/openai/resources/admin/organization/projects/data-retention.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs +0 -95
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs +0 -91
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs +0 -45
- package/esm/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs +0 -63
- package/esm/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/projects.mjs +0 -137
- package/esm/node_modules/openai/resources/admin/organization/projects/projects.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs +0 -51
- package/esm/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/roles.mjs +0 -108
- package/esm/node_modules/openai/resources/admin/organization/projects/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs +0 -112
- package/esm/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs +0 -106
- package/esm/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/users/roles.mjs +0 -91
- package/esm/node_modules/openai/resources/admin/organization/projects/users/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/users/users.mjs +0 -118
- package/esm/node_modules/openai/resources/admin/organization/projects/users/users.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/roles.mjs +0 -96
- package/esm/node_modules/openai/resources/admin/organization/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/spend-alerts.mjs +0 -97
- package/esm/node_modules/openai/resources/admin/organization/spend-alerts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/usage.mjs +0 -207
- package/esm/node_modules/openai/resources/admin/organization/usage.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/users/roles.mjs +0 -88
- package/esm/node_modules/openai/resources/admin/organization/users/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/users/users.mjs +0 -82
- package/esm/node_modules/openai/resources/admin/organization/users/users.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/audio.mjs +0 -21
- package/esm/node_modules/openai/resources/audio/audio.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/speech.mjs +0 -39
- package/esm/node_modules/openai/resources/audio/speech.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/transcriptions.mjs +0 -22
- package/esm/node_modules/openai/resources/audio/transcriptions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/translations.mjs +0 -21
- package/esm/node_modules/openai/resources/audio/translations.mjs.map +0 -1
- package/esm/node_modules/openai/resources/batches.mjs +0 -54
- package/esm/node_modules/openai/resources/batches.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/assistants.mjs +0 -78
- package/esm/node_modules/openai/resources/beta/assistants.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/beta.mjs +0 -24
- package/esm/node_modules/openai/resources/beta/beta.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/chatkit/chatkit.mjs +0 -18
- package/esm/node_modules/openai/resources/beta/chatkit/chatkit.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/chatkit/sessions.mjs +0 -49
- package/esm/node_modules/openai/resources/beta/chatkit/sessions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/chatkit/threads.mjs +0 -85
- package/esm/node_modules/openai/resources/beta/chatkit/threads.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/realtime/realtime.mjs +0 -21
- package/esm/node_modules/openai/resources/beta/realtime/realtime.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/realtime/sessions.mjs +0 -33
- package/esm/node_modules/openai/resources/beta/realtime/sessions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs +0 -33
- package/esm/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/messages.mjs +0 -83
- package/esm/node_modules/openai/resources/beta/threads/messages.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/runs/runs.mjs +0 -183
- package/esm/node_modules/openai/resources/beta/threads/runs/runs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/runs/steps.mjs +0 -45
- package/esm/node_modules/openai/resources/beta/threads/runs/steps.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/threads.mjs +0 -101
- package/esm/node_modules/openai/resources/beta/threads/threads.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/chat.mjs +0 -15
- package/esm/node_modules/openai/resources/chat/chat.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/completions/completions.mjs +0 -123
- package/esm/node_modules/openai/resources/chat/completions/completions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/completions/index.mjs +0 -7
- package/esm/node_modules/openai/resources/chat/completions/messages.mjs +0 -35
- package/esm/node_modules/openai/resources/chat/completions/messages.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/index.mjs +0 -5
- package/esm/node_modules/openai/resources/completions.mjs +0 -20
- package/esm/node_modules/openai/resources/completions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/containers/containers.mjs +0 -57
- package/esm/node_modules/openai/resources/containers/containers.mjs.map +0 -1
- package/esm/node_modules/openai/resources/containers/files/content.mjs +0 -23
- package/esm/node_modules/openai/resources/containers/files/content.mjs.map +0 -1
- package/esm/node_modules/openai/resources/containers/files/files.mjs +0 -63
- package/esm/node_modules/openai/resources/containers/files/files.mjs.map +0 -1
- package/esm/node_modules/openai/resources/conversations/conversations.mjs +0 -57
- package/esm/node_modules/openai/resources/conversations/conversations.mjs.map +0 -1
- package/esm/node_modules/openai/resources/conversations/items.mjs +0 -57
- package/esm/node_modules/openai/resources/conversations/items.mjs.map +0 -1
- package/esm/node_modules/openai/resources/embeddings.mjs +0 -48
- package/esm/node_modules/openai/resources/embeddings.mjs.map +0 -1
- package/esm/node_modules/openai/resources/evals/evals.mjs +0 -73
- package/esm/node_modules/openai/resources/evals/evals.mjs.map +0 -1
- package/esm/node_modules/openai/resources/evals/runs/output-items.mjs +0 -35
- package/esm/node_modules/openai/resources/evals/runs/output-items.mjs.map +0 -1
- package/esm/node_modules/openai/resources/evals/runs/runs.mjs +0 -72
- package/esm/node_modules/openai/resources/evals/runs/runs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/files.mjs +0 -111
- package/esm/node_modules/openai/resources/files.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs +0 -15
- package/esm/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/alpha/graders.mjs +0 -60
- package/esm/node_modules/openai/resources/fine-tuning/alpha/graders.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs +0 -15
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs +0 -102
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/fine-tuning.mjs +0 -24
- package/esm/node_modules/openai/resources/fine-tuning/fine-tuning.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs +0 -34
- package/esm/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs +0 -148
- package/esm/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/methods.mjs +0 -8
- package/esm/node_modules/openai/resources/fine-tuning/methods.mjs.map +0 -1
- package/esm/node_modules/openai/resources/graders/grader-models.mjs +0 -8
- package/esm/node_modules/openai/resources/graders/grader-models.mjs.map +0 -1
- package/esm/node_modules/openai/resources/graders/graders.mjs +0 -15
- package/esm/node_modules/openai/resources/graders/graders.mjs.map +0 -1
- package/esm/node_modules/openai/resources/images.mjs +0 -46
- package/esm/node_modules/openai/resources/images.mjs.map +0 -1
- package/esm/node_modules/openai/resources/index.mjs +0 -27
- package/esm/node_modules/openai/resources/models.mjs +0 -44
- package/esm/node_modules/openai/resources/models.mjs.map +0 -1
- package/esm/node_modules/openai/resources/moderations.mjs +0 -23
- package/esm/node_modules/openai/resources/moderations.mjs.map +0 -1
- package/esm/node_modules/openai/resources/realtime/calls.mjs +0 -79
- package/esm/node_modules/openai/resources/realtime/calls.mjs.map +0 -1
- package/esm/node_modules/openai/resources/realtime/client-secrets.mjs +0 -39
- package/esm/node_modules/openai/resources/realtime/client-secrets.mjs.map +0 -1
- package/esm/node_modules/openai/resources/realtime/realtime.mjs +0 -18
- package/esm/node_modules/openai/resources/realtime/realtime.mjs.map +0 -1
- package/esm/node_modules/openai/resources/responses/input-items.mjs +0 -31
- package/esm/node_modules/openai/resources/responses/input-items.mjs.map +0 -1
- package/esm/node_modules/openai/resources/responses/input-tokens.mjs +0 -27
- package/esm/node_modules/openai/resources/responses/input-tokens.mjs.map +0 -1
- package/esm/node_modules/openai/resources/responses/responses.mjs +0 -110
- package/esm/node_modules/openai/resources/responses/responses.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/content.mjs +0 -22
- package/esm/node_modules/openai/resources/skills/content.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/skills.mjs +0 -69
- package/esm/node_modules/openai/resources/skills/skills.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/versions/content.mjs +0 -23
- package/esm/node_modules/openai/resources/skills/versions/content.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/versions/versions.mjs +0 -58
- package/esm/node_modules/openai/resources/skills/versions/versions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/uploads/parts.mjs +0 -34
- package/esm/node_modules/openai/resources/uploads/parts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/uploads/uploads.mjs +0 -84
- package/esm/node_modules/openai/resources/uploads/uploads.mjs.map +0 -1
- package/esm/node_modules/openai/resources/vector-stores/file-batches.mjs +0 -126
- package/esm/node_modules/openai/resources/vector-stores/file-batches.mjs.map +0 -1
- package/esm/node_modules/openai/resources/vector-stores/files.mjs +0 -147
- package/esm/node_modules/openai/resources/vector-stores/files.mjs.map +0 -1
- package/esm/node_modules/openai/resources/vector-stores/vector-stores.mjs +0 -87
- package/esm/node_modules/openai/resources/vector-stores/vector-stores.mjs.map +0 -1
- package/esm/node_modules/openai/resources/videos.mjs +0 -115
- package/esm/node_modules/openai/resources/videos.mjs.map +0 -1
- package/esm/node_modules/openai/resources/webhooks/index.mjs +0 -3
- package/esm/node_modules/openai/resources/webhooks/webhooks.mjs +0 -69
- package/esm/node_modules/openai/resources/webhooks/webhooks.mjs.map +0 -1
- package/esm/node_modules/openai/resources/webhooks.mjs +0 -4
- package/esm/node_modules/openai/streaming.mjs +0 -3
- package/esm/node_modules/openai/version.mjs +0 -6
- package/esm/node_modules/openai/version.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"end.type.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/contracts/end.type.ts"],"sourcesContent":["/**\n * Framework-global termination sentinel. Emitted by any primitive\n * whose control flow is routed through JSON-serializable strings —\n * supervisor (router agent's `next`, deterministic `route` callback),\n * future planner (plan steps), future orchestrator (session\n * directive), any future primitive that needs to say \"stop\" across a\n * wire that can't carry `null`.\n *\n * **Why one shared literal.** Consumers learn one word. Cross-\n * primitive pipes — a planner feeding a supervisor, a supervisor\n * nested as a tool inside an orchestrator — can pass the sentinel\n * through without translation.\n *\n * **Why this specific string.** Brand-prefixed (`__warlock:`) so it\n * can't collide with a realistic user-chosen intent / step / route\n * key (`\"end\"`, `\"done\"`, `\"stop\"` are all valid user keys).\n * Underscore-surrounded so it stands out in logs and snapshots.\n * JSON-safe so a router agent emits it verbatim.\n *\n * **Not used by every primitive.** Workflow's `nextStep` returns\n * `null` to end — a callback-level mechanism that predates this\n * sentinel. Workflows keep `null`; the sentinel is for primitives\n * whose \"end\" must survive a JSON boundary.\n *\n * @example\n * import { END } from \"@warlock.js/ai\";\n *\n * // Supervisor route callback\n * ai.supervisor({\n * intents: { writer, critic },\n * route: (ctx) => (ctx.iteration >= 5 ? END : \"writer\"),\n * });\n *\n * // Router agent output schema\n * const router = ai.agent({\n * model,\n * output: z.object({\n * next: z.union([z.string(), z.array(z.string()), z.literal(END)]),\n * }),\n * });\n */\nexport const END = \"__warlock:end__\" as const;\n\n/**\n * Value type of `END`. Exposed so consumers building Zod / Standard\n * Schema output schemas can write `z.literal(END)` without\n * hard-coding the string, and so generic helpers that accept \"the\n * end sentinel\" can type-narrow correctly.\n */\nexport type EndSentinel = typeof END;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,MAAM"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { AgentExecutionError } from "./agent-execution-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/agent-cancelled-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Agent run was cancelled via `AbortSignal` before it could finish.
|
|
6
|
-
* Between-trip cancellation is guaranteed; mid-trip cancellation is
|
|
7
|
-
* best-effort (the signal is threaded into the provider adapter's
|
|
8
|
-
* HTTP client when supported).
|
|
9
|
-
*
|
|
10
|
-
* Surfaced on `result.error` rather than thrown — `agent.execute()`
|
|
11
|
-
* still returns with `report.status = "cancelled"` and partial trip
|
|
12
|
-
* history intact. Consumers branch on the class (not the message) to
|
|
13
|
-
* distinguish caller-initiated stops from other failures.
|
|
14
|
-
*
|
|
15
|
-
* **Why split from `AgentExecutionError`.** Cancellation is a
|
|
16
|
-
* different operational signal from "the agent crashed" — retry
|
|
17
|
-
* policy and dashboards typically want different behavior for each.
|
|
18
|
-
* Keeping cancellation in its own class lets the category
|
|
19
|
-
* (`"cancelled"`) be set declaratively per type instead of inferred
|
|
20
|
-
* from a `context.cancelled === true` flag.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* const result = await agent.execute(input, { signal });
|
|
24
|
-
* if (result.error instanceof AgentCancelledError) {
|
|
25
|
-
* // caller pulled the plug — don't retry, surface a "stopped" UI
|
|
26
|
-
* return { status: "cancelled" };
|
|
27
|
-
* }
|
|
28
|
-
*/
|
|
29
|
-
var AgentCancelledError = class extends AgentExecutionError {
|
|
30
|
-
static {
|
|
31
|
-
this.defaultCategory = "cancelled";
|
|
32
|
-
}
|
|
33
|
-
constructor(message, options) {
|
|
34
|
-
super(message, options, "AGENT_CANCELLED");
|
|
35
|
-
this.name = "AgentCancelledError";
|
|
36
|
-
this.cancelledAt = options?.cancelledAt;
|
|
37
|
-
this.reason = options?.reason;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { AgentCancelledError };
|
|
43
|
-
//# sourceMappingURL=agent-cancelled-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-cancelled-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/agent-cancelled-error.ts"],"sourcesContent":["import { AgentExecutionError } from \"./agent-execution-error\";\nimport type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\n\n/**\n * Payload for {@link AgentCancelledError}. `cancelledAt` is the\n * ISO-8601 timestamp at which the abort was observed; `reason`\n * carries the value the caller supplied to `controller.abort(reason)`\n * when present.\n */\nexport type AgentCancelledErrorOptions = AIErrorOptions & {\n cancelledAt?: string;\n reason?: string;\n};\n\n/**\n * Agent run was cancelled via `AbortSignal` before it could finish.\n * Between-trip cancellation is guaranteed; mid-trip cancellation is\n * best-effort (the signal is threaded into the provider adapter's\n * HTTP client when supported).\n *\n * Surfaced on `result.error` rather than thrown — `agent.execute()`\n * still returns with `report.status = \"cancelled\"` and partial trip\n * history intact. Consumers branch on the class (not the message) to\n * distinguish caller-initiated stops from other failures.\n *\n * **Why split from `AgentExecutionError`.** Cancellation is a\n * different operational signal from \"the agent crashed\" — retry\n * policy and dashboards typically want different behavior for each.\n * Keeping cancellation in its own class lets the category\n * (`\"cancelled\"`) be set declaratively per type instead of inferred\n * from a `context.cancelled === true` flag.\n *\n * @example\n * const result = await agent.execute(input, { signal });\n * if (result.error instanceof AgentCancelledError) {\n * // caller pulled the plug — don't retry, surface a \"stopped\" UI\n * return { status: \"cancelled\" };\n * }\n */\nexport class AgentCancelledError extends AgentExecutionError {\n public static readonly defaultCategory: ErrorCategory = \"cancelled\";\n\n public readonly cancelledAt?: string;\n public readonly reason?: string;\n\n public constructor(message: string, options?: AgentCancelledErrorOptions) {\n super(message, options, \"AGENT_CANCELLED\");\n this.name = \"AgentCancelledError\";\n this.cancelledAt = options?.cancelledAt;\n this.reason = options?.reason;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAa,sBAAb,cAAyC,oBAAoB;;yBACH;;CAKxD,AAAO,YAAY,SAAiB,SAAsC;EACxE,MAAM,SAAS,SAAS,iBAAiB;EACzC,KAAK,OAAO;EACZ,KAAK,cAAc,SAAS;EAC5B,KAAK,SAAS,SAAS;CACzB;AACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AgentExecutionError } from "./agent-execution-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/agent-drift-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* `agent.resume(runId)` loaded a durable snapshot whose structural
|
|
6
|
-
* fingerprint does not match the current agent definition (model +
|
|
7
|
-
* provider + sorted tool names + maxTrips + output presence + version).
|
|
8
|
-
* The resume is refused — no trip runs — and the user decides how to
|
|
9
|
-
* recover: discard the snapshot, migrate manually, or call
|
|
10
|
-
* `resume(runId, { force: true })` to bypass the check.
|
|
11
|
-
*
|
|
12
|
-
* Mirrors `SupervisorDriftError` / `WorkflowDriftError` — same rationale,
|
|
13
|
-
* different primitive. Thrown (not returned on `result.error`) because a
|
|
14
|
-
* drifted resume never produces a valid run.
|
|
15
|
-
*/
|
|
16
|
-
var AgentDriftError = class extends AgentExecutionError {
|
|
17
|
-
static {
|
|
18
|
-
this.defaultCategory = "drift";
|
|
19
|
-
}
|
|
20
|
-
constructor(message, options) {
|
|
21
|
-
super(message, options, "AGENT_DRIFT");
|
|
22
|
-
this.name = "AgentDriftError";
|
|
23
|
-
this.savedSignature = options.savedSignature;
|
|
24
|
-
this.currentSignature = options.currentSignature;
|
|
25
|
-
this.runId = options.runId;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { AgentDriftError };
|
|
31
|
-
//# sourceMappingURL=agent-drift-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-drift-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/agent-drift-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport { AgentExecutionError } from \"./agent-execution-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\n\nexport type AgentDriftErrorOptions = AIErrorOptions & {\n /** Signature recorded on the snapshot being resumed. */\n savedSignature: string;\n /** Signature computed from the current agent definition. */\n currentSignature: string;\n runId: string;\n};\n\n/**\n * `agent.resume(runId)` loaded a durable snapshot whose structural\n * fingerprint does not match the current agent definition (model +\n * provider + sorted tool names + maxTrips + output presence + version).\n * The resume is refused — no trip runs — and the user decides how to\n * recover: discard the snapshot, migrate manually, or call\n * `resume(runId, { force: true })` to bypass the check.\n *\n * Mirrors `SupervisorDriftError` / `WorkflowDriftError` — same rationale,\n * different primitive. Thrown (not returned on `result.error`) because a\n * drifted resume never produces a valid run.\n */\nexport class AgentDriftError extends AgentExecutionError {\n public static readonly defaultCategory: ErrorCategory = \"drift\";\n\n public readonly savedSignature: string;\n public readonly currentSignature: string;\n public readonly runId: string;\n\n public constructor(message: string, options: AgentDriftErrorOptions) {\n super(message, options, \"AGENT_DRIFT\");\n this.name = \"AgentDriftError\";\n this.savedSignature = options.savedSignature;\n this.currentSignature = options.currentSignature;\n this.runId = options.runId;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,IAAa,kBAAb,cAAqC,oBAAoB;;yBACC;;CAMxD,AAAO,YAAY,SAAiB,SAAiC;EACnE,MAAM,SAAS,SAAS,aAAa;EACrC,KAAK,OAAO;EACZ,KAAK,iBAAiB,QAAQ;EAC9B,KAAK,mBAAmB,QAAQ;EAChC,KAAK,QAAQ,QAAQ;CACvB;AACF"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { AIError } from "./ai-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/agent-execution-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Base for agent runtime failures that aren't schema / tool / provider
|
|
6
|
-
* problems — runtime-structural issues inside the trip loop or
|
|
7
|
-
* authoring-time middleware misconfiguration. Two specialized
|
|
8
|
-
* subclasses cover the two non-generic cases:
|
|
9
|
-
*
|
|
10
|
-
* - {@link AgentCancelledError} (`AGENT_CANCELLED`) — caller-driven
|
|
11
|
-
* abort via `AbortSignal`.
|
|
12
|
-
* - {@link AgentMaxTripsError} (`AGENT_MAX_TRIPS`) — trip loop hit
|
|
13
|
-
* the `maxTrips` cap without a natural stop.
|
|
14
|
-
*
|
|
15
|
-
* Use the base class directly for anything else (unregistered tool
|
|
16
|
-
* dispatch, authoring-time middleware validation, surprise
|
|
17
|
-
* exceptions). The subclasses exist so consumers can branch on a
|
|
18
|
-
* dedicated `instanceof` / category without inferring from `context`
|
|
19
|
-
* flags or parsing the message.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* if (result.error?.code === "AGENT_EXEC_FAILED") {
|
|
23
|
-
* logger.warn("unexpected agent failure", result.error.context);
|
|
24
|
-
* }
|
|
25
|
-
*/
|
|
26
|
-
var AgentExecutionError = class extends AIError {
|
|
27
|
-
constructor(message, options, code = "AGENT_EXEC_FAILED") {
|
|
28
|
-
super(code, message, options);
|
|
29
|
-
this.name = "AgentExecutionError";
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { AgentExecutionError };
|
|
35
|
-
//# sourceMappingURL=agent-execution-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-execution-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/agent-execution-error.ts"],"sourcesContent":["import { AIError, type AIErrorOptions } from \"./ai-error\";\nimport type { AIErrorCode } from \"./error-code.type\";\n\n/**\n * Base for agent runtime failures that aren't schema / tool / provider\n * problems — runtime-structural issues inside the trip loop or\n * authoring-time middleware misconfiguration. Two specialized\n * subclasses cover the two non-generic cases:\n *\n * - {@link AgentCancelledError} (`AGENT_CANCELLED`) — caller-driven\n * abort via `AbortSignal`.\n * - {@link AgentMaxTripsError} (`AGENT_MAX_TRIPS`) — trip loop hit\n * the `maxTrips` cap without a natural stop.\n *\n * Use the base class directly for anything else (unregistered tool\n * dispatch, authoring-time middleware validation, surprise\n * exceptions). The subclasses exist so consumers can branch on a\n * dedicated `instanceof` / category without inferring from `context`\n * flags or parsing the message.\n *\n * @example\n * if (result.error?.code === \"AGENT_EXEC_FAILED\") {\n * logger.warn(\"unexpected agent failure\", result.error.context);\n * }\n */\nexport class AgentExecutionError extends AIError {\n public constructor(\n message: string,\n options?: AIErrorOptions,\n code: AIErrorCode = \"AGENT_EXEC_FAILED\",\n ) {\n super(code, message, options);\n this.name = \"AgentExecutionError\";\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAa,sBAAb,cAAyC,QAAQ;CAC/C,AAAO,YACL,SACA,SACA,OAAoB,qBACpB;EACA,MAAM,MAAM,SAAS,OAAO;EAC5B,KAAK,OAAO;CACd;AACF"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { AgentExecutionError } from "./agent-execution-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/agent-max-trips-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Runaway-loop hard guard: the agent's trip loop ran `maxTrips` round
|
|
6
|
-
* trips to the model without the model issuing a natural stop. The
|
|
7
|
-
* loop terminates with this typed error on `result.error` and the
|
|
8
|
-
* full trip history preserved in `result.report.trips` so consumers
|
|
9
|
-
* can see where the loop got stuck.
|
|
10
|
-
*
|
|
11
|
-
* **Not retryable by default.** A run that hit the cap usually
|
|
12
|
-
* indicates either a tool the agent can't satisfy (causing infinite
|
|
13
|
-
* re-asks) or a model that won't commit to an answer. Bumping
|
|
14
|
-
* `maxTrips` and retrying without root-causing the underlying issue
|
|
15
|
-
* just burns more tokens.
|
|
16
|
-
*
|
|
17
|
-
* **Why split from `AgentExecutionError`.** The catch-all base wears
|
|
18
|
-
* too many hats — cancellation vs. max-trips vs. generic crashes had
|
|
19
|
-
* to be disambiguated from `context` flags or message regex. Split
|
|
20
|
-
* subclasses let category dispatch (`"max-trips"`) and consumer
|
|
21
|
-
* branching (`instanceof`) work without inference.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* if (result.error instanceof AgentMaxTripsError) {
|
|
25
|
-
* logger.warn("agent hit trip cap", { max: result.error.maxTrips });
|
|
26
|
-
* }
|
|
27
|
-
*/
|
|
28
|
-
var AgentMaxTripsError = class extends AgentExecutionError {
|
|
29
|
-
static {
|
|
30
|
-
this.defaultCategory = "max-trips";
|
|
31
|
-
}
|
|
32
|
-
constructor(message, options) {
|
|
33
|
-
super(message, options, "AGENT_MAX_TRIPS");
|
|
34
|
-
this.name = "AgentMaxTripsError";
|
|
35
|
-
this.maxTrips = options.maxTrips;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { AgentMaxTripsError };
|
|
41
|
-
//# sourceMappingURL=agent-max-trips-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-max-trips-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/agent-max-trips-error.ts"],"sourcesContent":["import { AgentExecutionError } from \"./agent-execution-error\";\nimport type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\n\n/**\n * Payload for {@link AgentMaxTripsError}. `maxTrips` is the cap the\n * agent hit — useful for log/metric attribution and for retry-with-\n * higher-cap recovery strategies.\n */\nexport type AgentMaxTripsErrorOptions = AIErrorOptions & {\n maxTrips: number;\n};\n\n/**\n * Runaway-loop hard guard: the agent's trip loop ran `maxTrips` round\n * trips to the model without the model issuing a natural stop. The\n * loop terminates with this typed error on `result.error` and the\n * full trip history preserved in `result.report.trips` so consumers\n * can see where the loop got stuck.\n *\n * **Not retryable by default.** A run that hit the cap usually\n * indicates either a tool the agent can't satisfy (causing infinite\n * re-asks) or a model that won't commit to an answer. Bumping\n * `maxTrips` and retrying without root-causing the underlying issue\n * just burns more tokens.\n *\n * **Why split from `AgentExecutionError`.** The catch-all base wears\n * too many hats — cancellation vs. max-trips vs. generic crashes had\n * to be disambiguated from `context` flags or message regex. Split\n * subclasses let category dispatch (`\"max-trips\"`) and consumer\n * branching (`instanceof`) work without inference.\n *\n * @example\n * if (result.error instanceof AgentMaxTripsError) {\n * logger.warn(\"agent hit trip cap\", { max: result.error.maxTrips });\n * }\n */\nexport class AgentMaxTripsError extends AgentExecutionError {\n public static readonly defaultCategory: ErrorCategory = \"max-trips\";\n\n public readonly maxTrips: number;\n\n public constructor(message: string, options: AgentMaxTripsErrorOptions) {\n super(message, options, \"AGENT_MAX_TRIPS\");\n this.name = \"AgentMaxTripsError\";\n this.maxTrips = options.maxTrips;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,IAAa,qBAAb,cAAwC,oBAAoB;;yBACF;;CAIxD,AAAO,YAAY,SAAiB,SAAoC;EACtE,MAAM,SAAS,SAAS,iBAAiB;EACzC,KAAK,OAAO;EACZ,KAAK,WAAW,QAAQ;CAC1B;AACF"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
//#region ../@warlock.js/ai/src/errors/ai-error.ts
|
|
2
|
-
/**
|
|
3
|
-
* Base class for every error thrown (or surfaced via `result.error`) by
|
|
4
|
-
* `@warlock.js/ai` and its provider adapter packages.
|
|
5
|
-
*
|
|
6
|
-
* **Role.** The single typed error contract across the AI framework.
|
|
7
|
-
* Every thrown error anywhere in `@warlock.js/ai*` is either an
|
|
8
|
-
* `AIError` itself or one of its subclasses — plain `Error` must never
|
|
9
|
-
* leak out. Consumers branch either on the narrow `error.code` (stable
|
|
10
|
-
* string), on `error.category` (coarse dashboard grouping), or on
|
|
11
|
-
* `instanceof` a specific subclass.
|
|
12
|
-
*
|
|
13
|
-
* **Independence.** Deliberately extends the platform `Error` directly
|
|
14
|
-
* — never `HttpError` from `@warlock.js/core`. The AI framework is a
|
|
15
|
-
* standalone product; coupling its error base to a web framework would
|
|
16
|
-
* force every consumer to pull in the HTTP layer even when they only
|
|
17
|
-
* use AI in a CLI, worker, or test.
|
|
18
|
-
*
|
|
19
|
-
* **Fields.**
|
|
20
|
-
* - `code` — stable machine-readable identifier (see `AIErrorCode`).
|
|
21
|
-
* - `category` — coarse `ErrorCategory` for dashboards / retry policy.
|
|
22
|
-
* Resolved at construction from the subclass's `static defaultCategory`
|
|
23
|
-
* (or, for direct `new AIError(...)` calls, from the explicit 4th
|
|
24
|
-
* constructor argument).
|
|
25
|
-
* - `cause` — optional original thrown value (SDK error, nested error,
|
|
26
|
-
* raw value). Preserves root cause through re-wrapping.
|
|
27
|
-
* - `context` — optional free-form diagnostic bag (status, requestId,
|
|
28
|
-
* headers). Consumers treat it as opaque; logs and telemetry read it.
|
|
29
|
-
*
|
|
30
|
-
* **Category override — direct AIError usage only.** Subclasses ARE
|
|
31
|
-
* their category by type; there's no legitimate runtime override at
|
|
32
|
-
* the subclass level. The 4th constructor argument exists ONLY for
|
|
33
|
-
* direct `new AIError(...)` callers, who would otherwise be stuck with
|
|
34
|
-
* the `"unknown"` default. Subclasses construct via `super(code,
|
|
35
|
-
* message, options)` and physically cannot reach the override slot
|
|
36
|
-
* through their own typed signatures.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* try {
|
|
40
|
-
* await agent.execute("hello");
|
|
41
|
-
* } catch (error) {
|
|
42
|
-
* if (error instanceof AIError) {
|
|
43
|
-
* console.error(`[${error.code}] (${error.category}) ${error.message}`);
|
|
44
|
-
* }
|
|
45
|
-
* }
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* // Direct AIError construction with explicit category — escape hatch
|
|
49
|
-
* // for call sites that lack a specific subclass.
|
|
50
|
-
* throw new AIError("UNEXPECTED", "transient glitch", undefined, "provider");
|
|
51
|
-
*/
|
|
52
|
-
var AIError = class extends Error {
|
|
53
|
-
static {
|
|
54
|
-
this.defaultCategory = "unknown";
|
|
55
|
-
}
|
|
56
|
-
constructor(code, message, options, category) {
|
|
57
|
-
super(message);
|
|
58
|
-
this.name = "AIError";
|
|
59
|
-
this.code = code;
|
|
60
|
-
this.context = options?.context;
|
|
61
|
-
this.category = category ?? this.constructor.defaultCategory;
|
|
62
|
-
if (options?.cause !== void 0) this.cause = options.cause;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
export { AIError };
|
|
68
|
-
//# sourceMappingURL=ai-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/ai-error.ts"],"sourcesContent":["import type { ErrorCategory } from \"./error-category.type\";\nimport type { AIErrorCode } from \"./error-code.type\";\n\n/**\n * Optional constructor payload shared by every `AIError` subclass.\n *\n * `cause` carries the original thrown value (SDK error, runtime crash,\n * validation failure) so downstream logging and debuggers can still\n * reach it. `context` is a free-form diagnostic bag for provider-raw\n * metadata (status codes, request ids, response headers) that shouldn't\n * be promoted to typed fields but is useful in logs and telemetry.\n *\n * **No `category` here.** Category is fixed per subclass via the\n * class-level `static defaultCategory`. Subclasses ARE their\n * category — `RateLimitError` is always `\"rate-limit\"`, never\n * something else at runtime. Direct `new AIError(...)` callers (the\n * one legitimate override case, since the base catch-all has no\n * specific class) receive a separate 4th constructor argument\n * instead, so the override is structurally unreachable from subclass\n * call sites.\n */\nexport type AIErrorOptions = {\n cause?: unknown;\n context?: Record<string, unknown>;\n};\n\n/**\n * Base class for every error thrown (or surfaced via `result.error`) by\n * `@warlock.js/ai` and its provider adapter packages.\n *\n * **Role.** The single typed error contract across the AI framework.\n * Every thrown error anywhere in `@warlock.js/ai*` is either an\n * `AIError` itself or one of its subclasses — plain `Error` must never\n * leak out. Consumers branch either on the narrow `error.code` (stable\n * string), on `error.category` (coarse dashboard grouping), or on\n * `instanceof` a specific subclass.\n *\n * **Independence.** Deliberately extends the platform `Error` directly\n * — never `HttpError` from `@warlock.js/core`. The AI framework is a\n * standalone product; coupling its error base to a web framework would\n * force every consumer to pull in the HTTP layer even when they only\n * use AI in a CLI, worker, or test.\n *\n * **Fields.**\n * - `code` — stable machine-readable identifier (see `AIErrorCode`).\n * - `category` — coarse `ErrorCategory` for dashboards / retry policy.\n * Resolved at construction from the subclass's `static defaultCategory`\n * (or, for direct `new AIError(...)` calls, from the explicit 4th\n * constructor argument).\n * - `cause` — optional original thrown value (SDK error, nested error,\n * raw value). Preserves root cause through re-wrapping.\n * - `context` — optional free-form diagnostic bag (status, requestId,\n * headers). Consumers treat it as opaque; logs and telemetry read it.\n *\n * **Category override — direct AIError usage only.** Subclasses ARE\n * their category by type; there's no legitimate runtime override at\n * the subclass level. The 4th constructor argument exists ONLY for\n * direct `new AIError(...)` callers, who would otherwise be stuck with\n * the `\"unknown\"` default. Subclasses construct via `super(code,\n * message, options)` and physically cannot reach the override slot\n * through their own typed signatures.\n *\n * @example\n * try {\n * await agent.execute(\"hello\");\n * } catch (error) {\n * if (error instanceof AIError) {\n * console.error(`[${error.code}] (${error.category}) ${error.message}`);\n * }\n * }\n *\n * @example\n * // Direct AIError construction with explicit category — escape hatch\n * // for call sites that lack a specific subclass.\n * throw new AIError(\"UNEXPECTED\", \"transient glitch\", undefined, \"provider\");\n */\nexport class AIError extends Error {\n /**\n * Class-level category for every instance of this error type.\n * Subclasses redeclare with their own concrete `ErrorCategory` so\n * `error.category` is correct without per-call wiring. The base\n * class keeps `\"unknown\"` so untyped direct throws of `AIError`\n * itself remain honest about their lack of dispatch information\n * (and can override via the 4th constructor argument).\n */\n public static readonly defaultCategory: ErrorCategory = \"unknown\";\n\n public readonly code: AIErrorCode;\n public readonly category: ErrorCategory;\n public readonly context?: Record<string, unknown>;\n\n public constructor(\n code: AIErrorCode,\n message: string,\n options?: AIErrorOptions,\n category?: ErrorCategory,\n ) {\n super(message);\n\n this.name = \"AIError\";\n this.code = code;\n this.context = options?.context;\n this.category = category ?? (this.constructor as typeof AIError).defaultCategory;\n\n if (options?.cause !== undefined) {\n (this as { cause?: unknown }).cause = options.cause;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,IAAa,UAAb,cAA6B,MAAM;;yBASuB;;CAMxD,AAAO,YACL,MACA,SACA,SACA,UACA;EACA,MAAM,OAAO;EAEb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,UAAU,SAAS;EACxB,KAAK,WAAW,YAAa,KAAK,YAA+B;EAEjE,IAAI,SAAS,UAAU,QACrB,AAAC,KAA6B,QAAQ,QAAQ;CAElD;AACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AIError } from "./ai-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/budget-exceeded-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* A user- or framework-configured budget was exceeded mid-execution.
|
|
6
|
-
*
|
|
7
|
-
* **Not thrown yet.** The class is defined here so v2's budget
|
|
8
|
-
* middleware can throw it without a breaking release of the error
|
|
9
|
-
* hierarchy. Shape is locked: `{ limit, actual, unit }`.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* if (error instanceof BudgetExceededError && error.unit === "usd") {
|
|
13
|
-
* alertFinance(error.actual, error.limit);
|
|
14
|
-
* }
|
|
15
|
-
*/
|
|
16
|
-
var BudgetExceededError = class extends AIError {
|
|
17
|
-
static {
|
|
18
|
-
this.defaultCategory = "budget";
|
|
19
|
-
}
|
|
20
|
-
constructor(message, options) {
|
|
21
|
-
super("BUDGET_EXCEEDED", message, options);
|
|
22
|
-
this.name = "BudgetExceededError";
|
|
23
|
-
this.limit = options.limit;
|
|
24
|
-
this.actual = options.actual;
|
|
25
|
-
this.unit = options.unit;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { BudgetExceededError };
|
|
31
|
-
//# sourceMappingURL=budget-exceeded-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"budget-exceeded-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/budget-exceeded-error.ts"],"sourcesContent":["import { AIError, type AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\n\n/**\n * Unit of the budget being enforced. `tokens` for context/output\n * caps, `usd` for monetary caps, `requests` for call-count caps.\n */\nexport type BudgetUnit = \"tokens\" | \"usd\" | \"requests\";\n\n/**\n * Payload for `BudgetExceededError`. All three fields are required so\n * consumers can present the breach numerically without having to\n * reparse the message.\n */\nexport type BudgetExceededErrorOptions = AIErrorOptions & {\n limit: number;\n actual: number;\n unit: BudgetUnit;\n};\n\n/**\n * A user- or framework-configured budget was exceeded mid-execution.\n *\n * **Not thrown yet.** The class is defined here so v2's budget\n * middleware can throw it without a breaking release of the error\n * hierarchy. Shape is locked: `{ limit, actual, unit }`.\n *\n * @example\n * if (error instanceof BudgetExceededError && error.unit === \"usd\") {\n * alertFinance(error.actual, error.limit);\n * }\n */\nexport class BudgetExceededError extends AIError {\n public static readonly defaultCategory: ErrorCategory = \"budget\";\n\n public readonly limit: number;\n public readonly actual: number;\n public readonly unit: BudgetUnit;\n\n public constructor(message: string, options: BudgetExceededErrorOptions) {\n super(\"BUDGET_EXCEEDED\", message, options);\n this.name = \"BudgetExceededError\";\n this.limit = options.limit;\n this.actual = options.actual;\n this.unit = options.unit;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAa,sBAAb,cAAyC,QAAQ;;yBACS;;CAMxD,AAAO,YAAY,SAAiB,SAAqC;EACvE,MAAM,mBAAmB,SAAS,OAAO;EACzC,KAAK,OAAO;EACZ,KAAK,QAAQ,QAAQ;EACrB,KAAK,SAAS,QAAQ;EACtB,KAAK,OAAO,QAAQ;CACtB;AACF"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ProviderError } from "./provider-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/content-filter-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Response (or request) was blocked by the provider's safety filter.
|
|
6
|
-
* Not retryable with the same input — reshape the prompt or lean on
|
|
7
|
-
* a less-restrictive model.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* if (result.error instanceof ContentFilterError) {
|
|
11
|
-
* return respondWithPolicyMessage(result.error.reason);
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
|
-
var ContentFilterError = class extends ProviderError {
|
|
15
|
-
static {
|
|
16
|
-
this.defaultCategory = "content-filter";
|
|
17
|
-
}
|
|
18
|
-
constructor(message, options) {
|
|
19
|
-
super(message, options, "CONTENT_FILTER");
|
|
20
|
-
this.name = "ContentFilterError";
|
|
21
|
-
this.reason = options?.reason;
|
|
22
|
-
this.categories = options?.categories;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { };
|
|
28
|
-
//# sourceMappingURL=content-filter-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-filter-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/content-filter-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { ProviderError } from \"./provider-error\";\n\n/**\n * Payload for `ContentFilterError`. Both fields optional — providers\n * don't consistently disclose the specific filter reason or\n * categories, especially when the block is pre-generation.\n */\nexport type ContentFilterErrorOptions = AIErrorOptions & {\n reason?: string;\n categories?: string[];\n};\n\n/**\n * Response (or request) was blocked by the provider's safety filter.\n * Not retryable with the same input — reshape the prompt or lean on\n * a less-restrictive model.\n *\n * @example\n * if (result.error instanceof ContentFilterError) {\n * return respondWithPolicyMessage(result.error.reason);\n * }\n */\nexport class ContentFilterError extends ProviderError {\n public static readonly defaultCategory: ErrorCategory = \"content-filter\";\n\n public readonly reason?: string;\n public readonly categories?: string[];\n\n public constructor(message: string, options?: ContentFilterErrorOptions) {\n super(message, options, \"CONTENT_FILTER\");\n this.name = \"ContentFilterError\";\n this.reason = options?.reason;\n this.categories = options?.categories;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAa,qBAAb,cAAwC,cAAc;;yBACI;;CAKxD,AAAO,YAAY,SAAiB,SAAqC;EACvE,MAAM,SAAS,SAAS,gBAAgB;EACxC,KAAK,OAAO;EACZ,KAAK,SAAS,SAAS;EACvB,KAAK,aAAa,SAAS;CAC7B;AACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ProviderError } from "./provider-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/context-length-exceeded-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* The request's prompt (messages + tools + schema) exceeded the
|
|
6
|
-
* model's context window. Not retryable without shortening the input.
|
|
7
|
-
*
|
|
8
|
-
* Typically surfaced as OpenAI 400 with `code: "context_length_exceeded"`.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* if (result.error instanceof ContextLengthExceededError) {
|
|
12
|
-
* messages = truncateOldestTurns(messages);
|
|
13
|
-
* return agent.execute(input, { history: messages });
|
|
14
|
-
* }
|
|
15
|
-
*/
|
|
16
|
-
var ContextLengthExceededError = class extends ProviderError {
|
|
17
|
-
static {
|
|
18
|
-
this.defaultCategory = "context-length";
|
|
19
|
-
}
|
|
20
|
-
constructor(message, options) {
|
|
21
|
-
super(message, options, "CONTEXT_LENGTH_EXCEEDED");
|
|
22
|
-
this.name = "ContextLengthExceededError";
|
|
23
|
-
this.limit = options?.limit;
|
|
24
|
-
this.actual = options?.actual;
|
|
25
|
-
this.modelName = options?.modelName;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { };
|
|
31
|
-
//# sourceMappingURL=context-length-exceeded-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-length-exceeded-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/context-length-exceeded-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { ProviderError } from \"./provider-error\";\n\n/**\n * Payload for `ContextLengthExceededError`. All fields are optional —\n * providers inconsistently surface exact token counts and the\n * model's limit. When present, they let callers compute a trim\n * target; when absent, the error still categorizes the failure.\n */\nexport type ContextLengthExceededErrorOptions = AIErrorOptions & {\n limit?: number;\n actual?: number;\n modelName?: string;\n};\n\n/**\n * The request's prompt (messages + tools + schema) exceeded the\n * model's context window. Not retryable without shortening the input.\n *\n * Typically surfaced as OpenAI 400 with `code: \"context_length_exceeded\"`.\n *\n * @example\n * if (result.error instanceof ContextLengthExceededError) {\n * messages = truncateOldestTurns(messages);\n * return agent.execute(input, { history: messages });\n * }\n */\nexport class ContextLengthExceededError extends ProviderError {\n public static readonly defaultCategory: ErrorCategory = \"context-length\";\n\n public readonly limit?: number;\n public readonly actual?: number;\n public readonly modelName?: string;\n\n public constructor(\n message: string,\n options?: ContextLengthExceededErrorOptions,\n ) {\n super(message, options, \"CONTEXT_LENGTH_EXCEEDED\");\n this.name = \"ContextLengthExceededError\";\n this.limit = options?.limit;\n this.actual = options?.actual;\n this.modelName = options?.modelName;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA4BA,IAAa,6BAAb,cAAgD,cAAc;;yBACJ;;CAMxD,AAAO,YACL,SACA,SACA;EACA,MAAM,SAAS,SAAS,yBAAyB;EACjD,KAAK,OAAO;EACZ,KAAK,QAAQ,SAAS;EACtB,KAAK,SAAS,SAAS;EACvB,KAAK,YAAY,SAAS;CAC5B;AACF"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { AIError } from "./ai-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/guardrail-violation-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* A guardrail middleware rejected the prompt or response mid-execution.
|
|
6
|
-
*
|
|
7
|
-
* **Role.** The typed abort surface for `ai.middleware.guardrail`.
|
|
8
|
-
* Consumers branch on `error.phase` to distinguish "the user asked
|
|
9
|
-
* something disallowed" (`"input"`) from "the model produced something
|
|
10
|
-
* disallowed" (`"output"`) — the two failure modes have very different
|
|
11
|
-
* product responses (block vs. retry, or surface a policy message vs.
|
|
12
|
-
* re-prompt the model).
|
|
13
|
-
*
|
|
14
|
-
* Thrown from inside the middleware pipeline's `trip.before` / `trip.after`
|
|
15
|
-
* hooks; surfaced to the caller via `result.error` like every other
|
|
16
|
-
* `AIError`.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* if (result.error instanceof GuardrailViolationError) {
|
|
20
|
-
* if (result.error.phase === "input") {
|
|
21
|
-
* return respondWithPolicyMessage(result.error.reason);
|
|
22
|
-
* }
|
|
23
|
-
* return retryWithSanitizedPrompt();
|
|
24
|
-
* }
|
|
25
|
-
*/
|
|
26
|
-
var GuardrailViolationError = class extends AIError {
|
|
27
|
-
static {
|
|
28
|
-
this.defaultCategory = "guardrail";
|
|
29
|
-
}
|
|
30
|
-
constructor(message, options) {
|
|
31
|
-
super("GUARDRAIL_VIOLATION", message, options);
|
|
32
|
-
this.name = "GuardrailViolationError";
|
|
33
|
-
this.phase = options.phase;
|
|
34
|
-
this.reason = options.reason;
|
|
35
|
-
this.guardrail = options.guardrail;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { GuardrailViolationError };
|
|
41
|
-
//# sourceMappingURL=guardrail-violation-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-violation-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/guardrail-violation-error.ts"],"sourcesContent":["import { AIError, type AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\n\n/**\n * Phase at which a guardrail rejected the content — `\"input\"` when the\n * violation was detected on the outbound prompt (before the model saw\n * it), `\"output\"` when it was detected on the model's response (before\n * the caller saw it).\n */\nexport type GuardrailPhase = \"input\" | \"output\";\n\n/**\n * Payload for `GuardrailViolationError`. `phase` tells the caller\n * whether the prompt or the response tripped the check; `reason` is\n * the free-form explanation the guardrail middleware produced;\n * `guardrail` names the offending middleware so operators can tune a\n * specific rule without hunting through logs.\n */\nexport type GuardrailViolationErrorOptions = AIErrorOptions & {\n phase: GuardrailPhase;\n reason: string;\n guardrail?: string;\n};\n\n/**\n * A guardrail middleware rejected the prompt or response mid-execution.\n *\n * **Role.** The typed abort surface for `ai.middleware.guardrail`.\n * Consumers branch on `error.phase` to distinguish \"the user asked\n * something disallowed\" (`\"input\"`) from \"the model produced something\n * disallowed\" (`\"output\"`) — the two failure modes have very different\n * product responses (block vs. retry, or surface a policy message vs.\n * re-prompt the model).\n *\n * Thrown from inside the middleware pipeline's `trip.before` / `trip.after`\n * hooks; surfaced to the caller via `result.error` like every other\n * `AIError`.\n *\n * @example\n * if (result.error instanceof GuardrailViolationError) {\n * if (result.error.phase === \"input\") {\n * return respondWithPolicyMessage(result.error.reason);\n * }\n * return retryWithSanitizedPrompt();\n * }\n */\nexport class GuardrailViolationError extends AIError {\n public static readonly defaultCategory: ErrorCategory = \"guardrail\";\n\n public readonly phase: GuardrailPhase;\n public readonly reason: string;\n public readonly guardrail?: string;\n\n public constructor(message: string, options: GuardrailViolationErrorOptions) {\n super(\"GUARDRAIL_VIOLATION\", message, options);\n\n this.name = \"GuardrailViolationError\";\n this.phase = options.phase;\n this.reason = options.reason;\n this.guardrail = options.guardrail;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,IAAa,0BAAb,cAA6C,QAAQ;;yBACK;;CAMxD,AAAO,YAAY,SAAiB,SAAyC;EAC3E,MAAM,uBAAuB,SAAS,OAAO;EAE7C,KAAK,OAAO;EACZ,KAAK,QAAQ,QAAQ;EACrB,KAAK,SAAS,QAAQ;EACtB,KAAK,YAAY,QAAQ;CAC3B;AACF"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AIError } from "./ai-error.mjs";
|
|
2
|
-
import { AgentExecutionError } from "./agent-execution-error.mjs";
|
|
3
|
-
import { AgentCancelledError } from "./agent-cancelled-error.mjs";
|
|
4
|
-
import { AgentDriftError } from "./agent-drift-error.mjs";
|
|
5
|
-
import { AgentMaxTripsError } from "./agent-max-trips-error.mjs";
|
|
6
|
-
import { BudgetExceededError } from "./budget-exceeded-error.mjs";
|
|
7
|
-
import { ProviderError } from "./provider-error.mjs";
|
|
8
|
-
import "./content-filter-error.mjs";
|
|
9
|
-
import "./context-length-exceeded-error.mjs";
|
|
10
|
-
import { GuardrailViolationError } from "./guardrail-violation-error.mjs";
|
|
11
|
-
import { InvalidRequestError } from "./invalid-request-error.mjs";
|
|
12
|
-
import { SupervisorFailedError } from "./supervisor-failed-error.mjs";
|
|
13
|
-
import { MaxIterationsError } from "./max-iterations-error.mjs";
|
|
14
|
-
import { WorkflowError } from "./workflow-error.mjs";
|
|
15
|
-
import { MaxStepsExceededError } from "./max-steps-exceeded-error.mjs";
|
|
16
|
-
import { OrchestratorFailedError } from "./orchestrator-failed-error.mjs";
|
|
17
|
-
import "./orchestrator-cancelled-error.mjs";
|
|
18
|
-
import { OrchestratorConfigError } from "./orchestrator-config-error.mjs";
|
|
19
|
-
import { OrchestratorDriftError } from "./orchestrator-drift-error.mjs";
|
|
20
|
-
import { OutboundPolicyError } from "./outbound-policy-error.mjs";
|
|
21
|
-
import { PlannerFailedError } from "./planner-failed-error.mjs";
|
|
22
|
-
import { PlannerCancelledError } from "./planner-cancelled-error.mjs";
|
|
23
|
-
import { PlannerDriftError } from "./planner-drift-error.mjs";
|
|
24
|
-
import { PlannerPlanInvalidError } from "./planner-plan-invalid-error.mjs";
|
|
25
|
-
import { PromptRefinementError } from "./prompt-refinement-error.mjs";
|
|
26
|
-
import "./provider-auth-error.mjs";
|
|
27
|
-
import "./provider-rate-limit-error.mjs";
|
|
28
|
-
import "./provider-timeout-error.mjs";
|
|
29
|
-
import "./quota-exceeded-error.mjs";
|
|
30
|
-
import { RoutingError } from "./routing-error.mjs";
|
|
31
|
-
import { SchemaValidationError } from "./schema-validation-error.mjs";
|
|
32
|
-
import { StepFailedError } from "./step-failed-error.mjs";
|
|
33
|
-
import { SupervisorCancelledError } from "./supervisor-cancelled-error.mjs";
|
|
34
|
-
import { SupervisorDriftError } from "./supervisor-drift-error.mjs";
|
|
35
|
-
import { SupervisorRoutingError } from "./supervisor-routing-error.mjs";
|
|
36
|
-
import { ToolExecutionError } from "./tool-execution-error.mjs";
|
|
37
|
-
import { WorkflowCancelledError } from "./workflow-cancelled-error.mjs";
|
|
38
|
-
import { WorkflowDriftError } from "./workflow-drift-error.mjs";
|
|
39
|
-
|
|
40
|
-
export { };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ProviderError } from "./provider-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/invalid-request-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Provider rejected the request as malformed — bad model name,
|
|
6
|
-
* unsupported feature, missing required field, image attached to a
|
|
7
|
-
* non-vision model, etc. The catch-all for 4xx responses that aren't
|
|
8
|
-
* auth, rate-limit, context-length, or content-filter.
|
|
9
|
-
*
|
|
10
|
-
* Also thrown from the agent when user-side validation fails at the
|
|
11
|
-
* boundary (e.g. vision gate, malformed attachment shape) — the
|
|
12
|
-
* category is "you sent something the provider / agent cannot use".
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* if (result.error instanceof InvalidRequestError) {
|
|
16
|
-
* logger.error("bad agent input", { context: result.error.context });
|
|
17
|
-
* }
|
|
18
|
-
*/
|
|
19
|
-
var InvalidRequestError = class extends ProviderError {
|
|
20
|
-
static {
|
|
21
|
-
this.defaultCategory = "validation";
|
|
22
|
-
}
|
|
23
|
-
constructor(message, options) {
|
|
24
|
-
super(message, options, "PROVIDER_INVALID_REQUEST");
|
|
25
|
-
this.name = "InvalidRequestError";
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { InvalidRequestError };
|
|
31
|
-
//# sourceMappingURL=invalid-request-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invalid-request-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/invalid-request-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { ProviderError } from \"./provider-error\";\n\n/**\n * Provider rejected the request as malformed — bad model name,\n * unsupported feature, missing required field, image attached to a\n * non-vision model, etc. The catch-all for 4xx responses that aren't\n * auth, rate-limit, context-length, or content-filter.\n *\n * Also thrown from the agent when user-side validation fails at the\n * boundary (e.g. vision gate, malformed attachment shape) — the\n * category is \"you sent something the provider / agent cannot use\".\n *\n * @example\n * if (result.error instanceof InvalidRequestError) {\n * logger.error(\"bad agent input\", { context: result.error.context });\n * }\n */\nexport class InvalidRequestError extends ProviderError {\n public static readonly defaultCategory: ErrorCategory = \"validation\";\n\n public constructor(message: string, options?: AIErrorOptions) {\n super(message, options, \"PROVIDER_INVALID_REQUEST\");\n this.name = \"InvalidRequestError\";\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAa,sBAAb,cAAyC,cAAc;;yBACG;;CAExD,AAAO,YAAY,SAAiB,SAA0B;EAC5D,MAAM,SAAS,SAAS,0BAA0B;EAClD,KAAK,OAAO;CACd;AACF"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { SupervisorFailedError } from "./supervisor-failed-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/max-iterations-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Hard-cap guard: the supervisor ran `maxIterations` loop turns
|
|
6
|
-
* without reaching a terminal decision (`END`, `satisfied: true`, or
|
|
7
|
-
* cancellation). Terminates the run immediately with a typed error on
|
|
8
|
-
* `result.error` — partial per-iteration snapshots are still
|
|
9
|
-
* available on `result.report.snapshots`.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* const { error, report } = await supervisor.execute(input);
|
|
13
|
-
* if (error?.code === "SUPERVISOR_MAX_ITERATIONS") {
|
|
14
|
-
* logger.warn("supervisor did not converge", {
|
|
15
|
-
* iterations: report.iterations,
|
|
16
|
-
* });
|
|
17
|
-
* }
|
|
18
|
-
*/
|
|
19
|
-
var MaxIterationsError = class extends SupervisorFailedError {
|
|
20
|
-
static {
|
|
21
|
-
this.defaultCategory = "max-iterations";
|
|
22
|
-
}
|
|
23
|
-
constructor(message, options) {
|
|
24
|
-
super(message, options, "SUPERVISOR_MAX_ITERATIONS");
|
|
25
|
-
this.name = "MaxIterationsError";
|
|
26
|
-
this.maxIterations = options.maxIterations;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { MaxIterationsError };
|
|
32
|
-
//# sourceMappingURL=max-iterations-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"max-iterations-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/max-iterations-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { SupervisorFailedError } from \"./supervisor-failed-error\";\n\nexport type MaxIterationsErrorOptions = AIErrorOptions & {\n maxIterations: number;\n};\n\n/**\n * Hard-cap guard: the supervisor ran `maxIterations` loop turns\n * without reaching a terminal decision (`END`, `satisfied: true`, or\n * cancellation). Terminates the run immediately with a typed error on\n * `result.error` — partial per-iteration snapshots are still\n * available on `result.report.snapshots`.\n *\n * @example\n * const { error, report } = await supervisor.execute(input);\n * if (error?.code === \"SUPERVISOR_MAX_ITERATIONS\") {\n * logger.warn(\"supervisor did not converge\", {\n * iterations: report.iterations,\n * });\n * }\n */\nexport class MaxIterationsError extends SupervisorFailedError {\n public static readonly defaultCategory: ErrorCategory = \"max-iterations\";\n\n public readonly maxIterations: number;\n\n public constructor(message: string, options: MaxIterationsErrorOptions) {\n super(message, options, \"SUPERVISOR_MAX_ITERATIONS\");\n this.name = \"MaxIterationsError\";\n this.maxIterations = options.maxIterations;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,IAAa,qBAAb,cAAwC,sBAAsB;;yBACJ;;CAIxD,AAAO,YAAY,SAAiB,SAAoC;EACtE,MAAM,SAAS,SAAS,2BAA2B;EACnD,KAAK,OAAO;EACZ,KAAK,gBAAgB,QAAQ;CAC/B;AACF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { WorkflowError } from "./workflow-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/max-steps-exceeded-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* Runaway-loop hard guard: workflow executed more step transitions
|
|
6
|
-
* than `maxSteps` allows. Terminates the workflow immediately.
|
|
7
|
-
*/
|
|
8
|
-
var MaxStepsExceededError = class extends WorkflowError {
|
|
9
|
-
static {
|
|
10
|
-
this.defaultCategory = "max-steps";
|
|
11
|
-
}
|
|
12
|
-
constructor(message, options) {
|
|
13
|
-
super(message, options, "WORKFLOW_MAX_STEPS");
|
|
14
|
-
this.name = "MaxStepsExceededError";
|
|
15
|
-
this.maxSteps = options.maxSteps;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { MaxStepsExceededError };
|
|
21
|
-
//# sourceMappingURL=max-steps-exceeded-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"max-steps-exceeded-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/max-steps-exceeded-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { WorkflowError } from \"./workflow-error\";\n\nexport type MaxStepsExceededErrorOptions = AIErrorOptions & {\n maxSteps: number;\n};\n\n/**\n * Runaway-loop hard guard: workflow executed more step transitions\n * than `maxSteps` allows. Terminates the workflow immediately.\n */\nexport class MaxStepsExceededError extends WorkflowError {\n public static readonly defaultCategory: ErrorCategory = \"max-steps\";\n\n public readonly maxSteps: number;\n\n public constructor(message: string, options: MaxStepsExceededErrorOptions) {\n super(message, options, \"WORKFLOW_MAX_STEPS\");\n this.name = \"MaxStepsExceededError\";\n this.maxSteps = options.maxSteps;\n }\n}\n"],"mappings":";;;;;;;AAYA,IAAa,wBAAb,cAA2C,cAAc;;yBACC;;CAIxD,AAAO,YAAY,SAAiB,SAAuC;EACzE,MAAM,SAAS,SAAS,oBAAoB;EAC5C,KAAK,OAAO;EACZ,KAAK,WAAW,QAAQ;CAC1B;AACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { OrchestratorFailedError } from "./orchestrator-failed-error.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/ai/src/errors/orchestrator-cancelled-error.ts
|
|
4
|
-
/**
|
|
5
|
-
* A turn was cancelled via `AbortSignal` before it could settle
|
|
6
|
-
* (orchestrator.md §17 — "mid-turn cancel"). The orchestrator returns
|
|
7
|
-
* normally with `report.status: "cancelled"` and the error placed on
|
|
8
|
-
* `result.error` rather than thrown; session state reverts to the
|
|
9
|
-
* pre-turn checkpoint (the orchestrator does not persist a fresh row
|
|
10
|
-
* for a cancelled turn — Q10).
|
|
11
|
-
*
|
|
12
|
-
* Mirrors `SupervisorCancelledError`, orchestrator scope. When an
|
|
13
|
-
* `iterate: true` turn is cancelled mid-iteration, the underlying
|
|
14
|
-
* `SupervisorCancelledError` rides on `cause`.
|
|
15
|
-
*/
|
|
16
|
-
var OrchestratorCancelledError = class extends OrchestratorFailedError {
|
|
17
|
-
static {
|
|
18
|
-
this.defaultCategory = "cancelled";
|
|
19
|
-
}
|
|
20
|
-
constructor(message, options) {
|
|
21
|
-
super(message, options, "ORCHESTRATOR_CANCELLED");
|
|
22
|
-
this.name = "OrchestratorCancelledError";
|
|
23
|
-
this.cancelledAt = options.cancelledAt;
|
|
24
|
-
this.sessionId = options.sessionId;
|
|
25
|
-
this.reason = options.reason;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { };
|
|
31
|
-
//# sourceMappingURL=orchestrator-cancelled-error.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator-cancelled-error.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/ai/src/errors/orchestrator-cancelled-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { OrchestratorFailedError } from \"./orchestrator-failed-error\";\n\nexport type OrchestratorCancelledErrorOptions = AIErrorOptions & {\n /** ISO-8601 timestamp at which the abort was observed by the orchestrator. */\n cancelledAt: string;\n /** The session whose turn was cancelled. */\n sessionId: string;\n /** `controller.abort(reason)` payload when the caller supplied one. */\n reason?: string;\n};\n\n/**\n * A turn was cancelled via `AbortSignal` before it could settle\n * (orchestrator.md §17 — \"mid-turn cancel\"). The orchestrator returns\n * normally with `report.status: \"cancelled\"` and the error placed on\n * `result.error` rather than thrown; session state reverts to the\n * pre-turn checkpoint (the orchestrator does not persist a fresh row\n * for a cancelled turn — Q10).\n *\n * Mirrors `SupervisorCancelledError`, orchestrator scope. When an\n * `iterate: true` turn is cancelled mid-iteration, the underlying\n * `SupervisorCancelledError` rides on `cause`.\n */\nexport class OrchestratorCancelledError extends OrchestratorFailedError {\n public static readonly defaultCategory: ErrorCategory = \"cancelled\";\n\n public readonly cancelledAt: string;\n public readonly sessionId: string;\n public readonly reason?: string;\n\n public constructor(\n message: string,\n options: OrchestratorCancelledErrorOptions,\n ) {\n super(message, options, \"ORCHESTRATOR_CANCELLED\");\n this.name = \"OrchestratorCancelledError\";\n this.cancelledAt = options.cancelledAt;\n this.sessionId = options.sessionId;\n this.reason = options.reason;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAa,6BAAb,cAAgD,wBAAwB;;yBACd;;CAMxD,AAAO,YACL,SACA,SACA;EACA,MAAM,SAAS,SAAS,wBAAwB;EAChD,KAAK,OAAO;EACZ,KAAK,cAAc,QAAQ;EAC3B,KAAK,YAAY,QAAQ;EACzB,KAAK,SAAS,QAAQ;CACxB;AACF"}
|