@warlock.js/ai 4.8.2 → 4.9.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 +10 -0
- package/cjs/index.cjs +263 -241
- package/cjs/index.cjs.map +1 -1
- package/cjs/{magic-string.es-BtxW4VqG.cjs → magic-string.es-BoSa5xIt.cjs} +3 -3
- package/cjs/magic-string.es-BoSa5xIt.cjs.map +1 -0
- package/cjs/{matcher-logic-SBnzYohQ.cjs → matcher-logic-07fFOz7r.cjs} +3 -3
- package/cjs/matcher-logic-07fFOz7r.cjs.map +1 -0
- package/cjs/{matchers-BBh3gyB-.cjs → matchers-DnV47KR_.cjs} +24 -24
- package/cjs/matchers-DnV47KR_.cjs.map +1 -0
- package/esm/agent/agent-config.type.d.mts +1 -1
- package/esm/agent/agent-config.type.d.mts.map +1 -1
- package/esm/agent/agent-input-builder.mjs +1 -1
- package/esm/agent/agent-input-builder.mjs.map +1 -1
- package/esm/agent/agent-log-event.mjs +1 -1
- package/esm/agent/agent-log-event.mjs.map +1 -1
- package/esm/agent/agent-stream.d.mts +1 -1
- package/esm/agent/agent-stream.d.mts.map +1 -1
- package/esm/agent/agent-stream.mjs +1 -1
- package/esm/agent/agent-stream.mjs.map +1 -1
- package/esm/agent/agent-to-stream-event.mjs +1 -1
- package/esm/agent/agent-to-stream-event.mjs.map +1 -1
- package/esm/agent/agent.d.mts +1 -1
- package/esm/agent/agent.d.mts.map +1 -1
- package/esm/agent/agent.mjs +1 -1
- package/esm/agent/agent.mjs.map +1 -1
- package/esm/agent/json-stream-guard.mjs +1 -1
- package/esm/agent/json-stream-guard.mjs.map +1 -1
- package/esm/agent/judge-config.type.d.mts +1 -1
- package/esm/agent/judge-config.type.d.mts.map +1 -1
- package/esm/agent/judge-config.type.mjs +1 -1
- package/esm/agent/judge-config.type.mjs.map +1 -1
- package/esm/agent/signature.mjs +1 -1
- package/esm/agent/signature.mjs.map +1 -1
- package/esm/agent/snapshot.mjs +1 -1
- package/esm/agent/snapshot.mjs.map +1 -1
- package/esm/agent/spawn-sub-agent.d.mts +1 -1
- package/esm/agent/spawn-sub-agent.d.mts.map +1 -1
- package/esm/agent/spawn-sub-agent.mjs +1 -1
- package/esm/agent/spawn-sub-agent.mjs.map +1 -1
- package/esm/ai.d.mts +1 -1
- package/esm/ai.d.mts.map +1 -1
- package/esm/ai.mjs +1 -1
- package/esm/ai.mjs.map +1 -1
- package/esm/batch/batch.d.mts +1 -1
- package/esm/batch/batch.d.mts.map +1 -1
- package/esm/batch/batch.mjs +1 -1
- package/esm/batch/batch.mjs.map +1 -1
- package/esm/batch/batch.type.d.mts +1 -1
- package/esm/batch/batch.type.d.mts.map +1 -1
- package/esm/batch/run-batch-item.mjs +1 -1
- package/esm/batch/run-batch-item.mjs.map +1 -1
- package/esm/batch/run-with-concurrency.mjs +1 -1
- package/esm/batch/run-with-concurrency.mjs.map +1 -1
- package/esm/checkpoint/memory.d.mts +1 -1
- package/esm/checkpoint/memory.d.mts.map +1 -1
- package/esm/checkpoint/memory.mjs +0 -0
- package/esm/checkpoint/memory.mjs.map +1 -1
- package/esm/checkpoint/pg.d.mts +1 -1
- package/esm/checkpoint/pg.d.mts.map +1 -1
- package/esm/checkpoint/pg.mjs +1 -1
- package/esm/checkpoint/pg.mjs.map +1 -1
- package/esm/checkpoint/redis.d.mts +1 -1
- package/esm/checkpoint/redis.d.mts.map +1 -1
- package/esm/checkpoint/redis.mjs +1 -1
- package/esm/checkpoint/redis.mjs.map +1 -1
- package/esm/config.d.mts +1 -1
- package/esm/config.d.mts.map +1 -1
- package/esm/config.mjs +1 -1
- package/esm/config.mjs.map +1 -1
- package/esm/contracts/agent/agent-options.type.d.mts +1 -1
- package/esm/contracts/agent/agent-options.type.d.mts.map +1 -1
- package/esm/contracts/agent/agent-snapshot.type.d.mts +1 -1
- package/esm/contracts/agent/agent-snapshot.type.d.mts.map +1 -1
- package/esm/contracts/agent/agent.contract.d.mts +1 -1
- package/esm/contracts/agent/agent.contract.d.mts.map +1 -1
- package/esm/contracts/agent/eval.type.d.mts +1 -1
- package/esm/contracts/agent/eval.type.d.mts.map +1 -1
- package/esm/contracts/attachment-policy.type.d.mts +1 -1
- package/esm/contracts/attachment-policy.type.d.mts.map +1 -1
- package/esm/contracts/attachment.type.d.mts +1 -1
- package/esm/contracts/attachment.type.d.mts.map +1 -1
- package/esm/contracts/content-part.type.d.mts +1 -1
- package/esm/contracts/content-part.type.d.mts.map +1 -1
- package/esm/contracts/conversation-message.type.d.mts +1 -1
- package/esm/contracts/conversation-message.type.d.mts.map +1 -1
- package/esm/contracts/embedder.contract.d.mts +1 -1
- package/esm/contracts/embedder.contract.d.mts.map +1 -1
- package/esm/contracts/end.type.d.mts +1 -1
- package/esm/contracts/end.type.d.mts.map +1 -1
- package/esm/contracts/end.type.mjs +1 -1
- package/esm/contracts/end.type.mjs.map +1 -1
- package/esm/contracts/events/agent-events.type.d.mts +1 -1
- package/esm/contracts/events/agent-events.type.d.mts.map +1 -1
- package/esm/contracts/events/complete-event.type.d.mts +1 -1
- package/esm/contracts/events/complete-event.type.d.mts.map +1 -1
- package/esm/contracts/events/event-identity.type.d.mts +1 -1
- package/esm/contracts/events/event-identity.type.d.mts.map +1 -1
- package/esm/contracts/events/event-map.type.d.mts +1 -1
- package/esm/contracts/events/event-map.type.d.mts.map +1 -1
- package/esm/contracts/events/supervisor-events.type.d.mts +1 -1
- package/esm/contracts/events/supervisor-events.type.d.mts.map +1 -1
- package/esm/contracts/events/usage-event.type.d.mts +1 -1
- package/esm/contracts/events/usage-event.type.d.mts.map +1 -1
- package/esm/contracts/events/workflow-events.type.d.mts +1 -1
- package/esm/contracts/events/workflow-events.type.d.mts.map +1 -1
- package/esm/contracts/executable.contract.d.mts +1 -1
- package/esm/contracts/executable.contract.d.mts.map +1 -1
- package/esm/contracts/fallback-model.contract.d.mts +1 -1
- package/esm/contracts/fallback-model.contract.d.mts.map +1 -1
- package/esm/contracts/finish-reason.type.d.mts +1 -1
- package/esm/contracts/finish-reason.type.d.mts.map +1 -1
- package/esm/contracts/image-model.contract.d.mts +1 -1
- package/esm/contracts/image-model.contract.d.mts.map +1 -1
- package/esm/contracts/memory/memory-config.type.d.mts +1 -1
- package/esm/contracts/memory/memory-config.type.d.mts.map +1 -1
- package/esm/contracts/memory/memory-item.type.d.mts +1 -1
- package/esm/contracts/memory/memory-item.type.d.mts.map +1 -1
- package/esm/contracts/memory/memory.contract.d.mts +1 -1
- package/esm/contracts/memory/memory.contract.d.mts.map +1 -1
- package/esm/contracts/memory/recall-options.type.d.mts +1 -1
- package/esm/contracts/memory/recall-options.type.d.mts.map +1 -1
- package/esm/contracts/middleware/middleware-context.type.d.mts +1 -1
- package/esm/contracts/middleware/middleware-context.type.d.mts.map +1 -1
- package/esm/contracts/middleware/middleware-state.type.d.mts +1 -1
- package/esm/contracts/middleware/middleware-state.type.d.mts.map +1 -1
- package/esm/contracts/middleware/middleware.contract.d.mts +1 -1
- package/esm/contracts/middleware/middleware.contract.d.mts.map +1 -1
- package/esm/contracts/model-tool-call-request.type.d.mts +1 -1
- package/esm/contracts/model-tool-call-request.type.d.mts.map +1 -1
- package/esm/contracts/model.contract.d.mts +9 -1
- package/esm/contracts/model.contract.d.mts.map +1 -1
- package/esm/contracts/orchestrator/checkpoint-store.contract.d.mts +1 -1
- package/esm/contracts/orchestrator/checkpoint-store.contract.d.mts.map +1 -1
- package/esm/contracts/orchestrator/orchestrator-commands.type.d.mts +1 -1
- package/esm/contracts/orchestrator/orchestrator-commands.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/orchestrator-config.type.d.mts +1 -1
- package/esm/contracts/orchestrator/orchestrator-config.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/orchestrator-event.type.d.mts +1 -1
- package/esm/contracts/orchestrator/orchestrator-event.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/orchestrator-execute-options.type.d.mts +1 -1
- package/esm/contracts/orchestrator/orchestrator-execute-options.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/orchestrator.contract.d.mts +1 -1
- package/esm/contracts/orchestrator/orchestrator.contract.d.mts.map +1 -1
- package/esm/contracts/orchestrator/session-lock.contract.d.mts +1 -1
- package/esm/contracts/orchestrator/session-lock.contract.d.mts.map +1 -1
- package/esm/contracts/orchestrator/session.contract.d.mts +1 -1
- package/esm/contracts/orchestrator/session.contract.d.mts.map +1 -1
- package/esm/contracts/orchestrator/snapshot-store.contract.d.mts +1 -1
- package/esm/contracts/orchestrator/snapshot-store.contract.d.mts.map +1 -1
- package/esm/contracts/placeholders.type.d.mts +1 -1
- package/esm/contracts/placeholders.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-capability.type.d.mts +1 -1
- package/esm/contracts/planner/planner-capability.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-config.type.d.mts +1 -1
- package/esm/contracts/planner/planner-config.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-execute-options.type.d.mts +1 -1
- package/esm/contracts/planner/planner-execute-options.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-plan.type.d.mts +1 -1
- package/esm/contracts/planner/planner-plan.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-result.type.d.mts +1 -1
- package/esm/contracts/planner/planner-result.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-snapshot.type.d.mts +1 -1
- package/esm/contracts/planner/planner-snapshot.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner.contract.d.mts +1 -1
- package/esm/contracts/planner/planner.contract.d.mts.map +1 -1
- package/esm/contracts/result/agent-result.type.d.mts +1 -1
- package/esm/contracts/result/agent-result.type.d.mts.map +1 -1
- package/esm/contracts/result/attempt-entry.type.d.mts +1 -1
- package/esm/contracts/result/attempt-entry.type.d.mts.map +1 -1
- package/esm/contracts/result/base-report.type.d.mts +1 -1
- package/esm/contracts/result/base-report.type.d.mts.map +1 -1
- package/esm/contracts/result/base-report.type.mjs +1 -1
- package/esm/contracts/result/base-report.type.mjs.map +1 -1
- package/esm/contracts/result/base-result.type.d.mts +1 -1
- package/esm/contracts/result/base-result.type.d.mts.map +1 -1
- package/esm/contracts/result/execute-result.type.d.mts +1 -1
- package/esm/contracts/result/execute-result.type.d.mts.map +1 -1
- package/esm/contracts/result/execution-report.type.d.mts +1 -1
- package/esm/contracts/result/execution-report.type.d.mts.map +1 -1
- package/esm/contracts/result/llm-trip.type.d.mts +1 -1
- package/esm/contracts/result/llm-trip.type.d.mts.map +1 -1
- package/esm/contracts/result/model-pricing.type.d.mts +1 -1
- package/esm/contracts/result/model-pricing.type.d.mts.map +1 -1
- package/esm/contracts/result/orchestrator-result.type.d.mts +1 -1
- package/esm/contracts/result/orchestrator-result.type.d.mts.map +1 -1
- package/esm/contracts/result/session-send-result.type.d.mts +1 -1
- package/esm/contracts/result/session-send-result.type.d.mts.map +1 -1
- package/esm/contracts/result/step-result.type.d.mts +12 -2
- package/esm/contracts/result/step-result.type.d.mts.map +1 -1
- package/esm/contracts/result/supervisor-result.type.d.mts +1 -1
- package/esm/contracts/result/supervisor-result.type.d.mts.map +1 -1
- package/esm/contracts/result/tool-call.type.d.mts +1 -1
- package/esm/contracts/result/tool-call.type.d.mts.map +1 -1
- package/esm/contracts/result/usage.type.d.mts +1 -1
- package/esm/contracts/result/usage.type.d.mts.map +1 -1
- package/esm/contracts/result/workflow-result.type.d.mts +1 -1
- package/esm/contracts/result/workflow-result.type.d.mts.map +1 -1
- package/esm/contracts/sdk-adapter.contract.d.mts +1 -1
- package/esm/contracts/sdk-adapter.contract.d.mts.map +1 -1
- package/esm/contracts/speech-model.contract.d.mts +1 -1
- package/esm/contracts/speech-model.contract.d.mts.map +1 -1
- package/esm/contracts/stream/stream-event.type.d.mts +1 -1
- package/esm/contracts/stream/stream-event.type.d.mts.map +1 -1
- package/esm/contracts/stream/stream.contract.d.mts +1 -1
- package/esm/contracts/stream/stream.contract.d.mts.map +1 -1
- package/esm/contracts/streaming-tool-guard-config.type.d.mts +1 -1
- package/esm/contracts/streaming-tool-guard-config.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/ack-entry.type.d.mts +1 -1
- package/esm/contracts/supervisor/ack-entry.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/classifier-context.type.d.mts +1 -1
- package/esm/contracts/supervisor/classifier-context.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/dispatch-context.type.d.mts +1 -1
- package/esm/contracts/supervisor/dispatch-context.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/evaluate-context.type.d.mts +1 -1
- package/esm/contracts/supervisor/evaluate-context.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/intent-entry.type.d.mts +1 -1
- package/esm/contracts/supervisor/intent-entry.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/iteration-snapshot.type.d.mts +1 -1
- package/esm/contracts/supervisor/iteration-snapshot.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/next.type.d.mts +1 -1
- package/esm/contracts/supervisor/next.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/route-context.type.d.mts +1 -1
- package/esm/contracts/supervisor/route-context.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/router-entry.type.d.mts +1 -1
- package/esm/contracts/supervisor/router-entry.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor-config.type.d.mts +1 -1
- package/esm/contracts/supervisor/supervisor-config.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts +1 -1
- package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor-input.type.d.mts +1 -1
- package/esm/contracts/supervisor/supervisor-input.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts +1 -1
- package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts +1 -1
- package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor.contract.d.mts +1 -1
- package/esm/contracts/supervisor/supervisor.contract.d.mts.map +1 -1
- package/esm/contracts/system-prompt.contract.d.mts +1 -1
- package/esm/contracts/system-prompt.contract.d.mts.map +1 -1
- package/esm/contracts/team/team-config.type.d.mts +1 -1
- package/esm/contracts/team/team-config.type.d.mts.map +1 -1
- package/esm/contracts/tool.contract.d.mts +1 -1
- package/esm/contracts/tool.contract.d.mts.map +1 -1
- package/esm/contracts/transcription-model.contract.d.mts +1 -1
- package/esm/contracts/transcription-model.contract.d.mts.map +1 -1
- package/esm/contracts/workflow/next-step-result.type.d.mts +1 -1
- package/esm/contracts/workflow/next-step-result.type.d.mts.map +1 -1
- package/esm/contracts/workflow/retry-config.type.d.mts +1 -1
- package/esm/contracts/workflow/retry-config.type.d.mts.map +1 -1
- package/esm/contracts/workflow/step.contract.d.mts +1 -1
- package/esm/contracts/workflow/step.contract.d.mts.map +1 -1
- package/esm/contracts/workflow/workflow-context.type.d.mts +1 -1
- package/esm/contracts/workflow/workflow-context.type.d.mts.map +1 -1
- package/esm/contracts/workflow/workflow-snapshot.type.d.mts +1 -1
- package/esm/contracts/workflow/workflow-snapshot.type.d.mts.map +1 -1
- package/esm/contracts/workflow/workflow.contract.d.mts +1 -1
- package/esm/contracts/workflow/workflow.contract.d.mts.map +1 -1
- package/esm/errors/agent-cancelled-error.d.mts +1 -1
- package/esm/errors/agent-cancelled-error.d.mts.map +1 -1
- package/esm/errors/agent-cancelled-error.mjs +1 -1
- package/esm/errors/agent-cancelled-error.mjs.map +1 -1
- package/esm/errors/agent-drift-error.d.mts +1 -1
- package/esm/errors/agent-drift-error.d.mts.map +1 -1
- package/esm/errors/agent-drift-error.mjs +1 -1
- package/esm/errors/agent-drift-error.mjs.map +1 -1
- package/esm/errors/agent-execution-error.d.mts +1 -1
- package/esm/errors/agent-execution-error.d.mts.map +1 -1
- package/esm/errors/agent-execution-error.mjs +1 -1
- package/esm/errors/agent-execution-error.mjs.map +1 -1
- package/esm/errors/agent-max-trips-error.d.mts +1 -1
- package/esm/errors/agent-max-trips-error.d.mts.map +1 -1
- package/esm/errors/agent-max-trips-error.mjs +1 -1
- package/esm/errors/agent-max-trips-error.mjs.map +1 -1
- package/esm/errors/ai-error.d.mts +1 -1
- package/esm/errors/ai-error.d.mts.map +1 -1
- package/esm/errors/ai-error.mjs +1 -1
- package/esm/errors/ai-error.mjs.map +1 -1
- package/esm/errors/budget-exceeded-error.d.mts +1 -1
- package/esm/errors/budget-exceeded-error.d.mts.map +1 -1
- package/esm/errors/budget-exceeded-error.mjs +1 -1
- package/esm/errors/budget-exceeded-error.mjs.map +1 -1
- package/esm/errors/content-filter-error.d.mts +1 -1
- package/esm/errors/content-filter-error.d.mts.map +1 -1
- package/esm/errors/content-filter-error.mjs +1 -1
- package/esm/errors/content-filter-error.mjs.map +1 -1
- package/esm/errors/context-length-exceeded-error.d.mts +1 -1
- package/esm/errors/context-length-exceeded-error.d.mts.map +1 -1
- package/esm/errors/context-length-exceeded-error.mjs +1 -1
- package/esm/errors/context-length-exceeded-error.mjs.map +1 -1
- package/esm/errors/error-category.type.d.mts +1 -1
- package/esm/errors/error-category.type.d.mts.map +1 -1
- package/esm/errors/error-code.type.d.mts +1 -1
- package/esm/errors/error-code.type.d.mts.map +1 -1
- package/esm/errors/guardrail-violation-error.d.mts +1 -1
- package/esm/errors/guardrail-violation-error.d.mts.map +1 -1
- package/esm/errors/guardrail-violation-error.mjs +1 -1
- package/esm/errors/guardrail-violation-error.mjs.map +1 -1
- package/esm/errors/invalid-request-error.d.mts +1 -1
- package/esm/errors/invalid-request-error.d.mts.map +1 -1
- package/esm/errors/invalid-request-error.mjs +1 -1
- package/esm/errors/invalid-request-error.mjs.map +1 -1
- package/esm/errors/max-iterations-error.d.mts +1 -1
- package/esm/errors/max-iterations-error.d.mts.map +1 -1
- package/esm/errors/max-iterations-error.mjs +1 -1
- package/esm/errors/max-iterations-error.mjs.map +1 -1
- package/esm/errors/max-steps-exceeded-error.d.mts +1 -1
- package/esm/errors/max-steps-exceeded-error.d.mts.map +1 -1
- package/esm/errors/max-steps-exceeded-error.mjs +1 -1
- package/esm/errors/max-steps-exceeded-error.mjs.map +1 -1
- package/esm/errors/orchestrator-cancelled-error.d.mts +1 -1
- package/esm/errors/orchestrator-cancelled-error.d.mts.map +1 -1
- package/esm/errors/orchestrator-cancelled-error.mjs +1 -1
- package/esm/errors/orchestrator-cancelled-error.mjs.map +1 -1
- package/esm/errors/orchestrator-config-error.d.mts +1 -1
- package/esm/errors/orchestrator-config-error.d.mts.map +1 -1
- package/esm/errors/orchestrator-config-error.mjs +1 -1
- package/esm/errors/orchestrator-config-error.mjs.map +1 -1
- package/esm/errors/orchestrator-drift-error.d.mts +1 -1
- package/esm/errors/orchestrator-drift-error.d.mts.map +1 -1
- package/esm/errors/orchestrator-drift-error.mjs +1 -1
- package/esm/errors/orchestrator-drift-error.mjs.map +1 -1
- package/esm/errors/orchestrator-failed-error.d.mts +1 -1
- package/esm/errors/orchestrator-failed-error.d.mts.map +1 -1
- package/esm/errors/orchestrator-failed-error.mjs +1 -1
- package/esm/errors/orchestrator-failed-error.mjs.map +1 -1
- package/esm/errors/outbound-policy-error.d.mts +1 -1
- package/esm/errors/outbound-policy-error.d.mts.map +1 -1
- package/esm/errors/outbound-policy-error.mjs +1 -1
- package/esm/errors/outbound-policy-error.mjs.map +1 -1
- package/esm/errors/planner-cancelled-error.d.mts +1 -1
- package/esm/errors/planner-cancelled-error.d.mts.map +1 -1
- package/esm/errors/planner-cancelled-error.mjs +1 -1
- package/esm/errors/planner-cancelled-error.mjs.map +1 -1
- package/esm/errors/planner-drift-error.d.mts +1 -1
- package/esm/errors/planner-drift-error.d.mts.map +1 -1
- package/esm/errors/planner-drift-error.mjs +1 -1
- package/esm/errors/planner-drift-error.mjs.map +1 -1
- package/esm/errors/planner-failed-error.d.mts +1 -1
- package/esm/errors/planner-failed-error.d.mts.map +1 -1
- package/esm/errors/planner-failed-error.mjs +1 -1
- package/esm/errors/planner-failed-error.mjs.map +1 -1
- package/esm/errors/planner-plan-invalid-error.d.mts +1 -1
- package/esm/errors/planner-plan-invalid-error.d.mts.map +1 -1
- package/esm/errors/planner-plan-invalid-error.mjs +1 -1
- package/esm/errors/planner-plan-invalid-error.mjs.map +1 -1
- package/esm/errors/prompt-refinement-error.d.mts +1 -1
- package/esm/errors/prompt-refinement-error.d.mts.map +1 -1
- package/esm/errors/prompt-refinement-error.mjs +1 -1
- package/esm/errors/prompt-refinement-error.mjs.map +1 -1
- package/esm/errors/provider-auth-error.d.mts +1 -1
- package/esm/errors/provider-auth-error.d.mts.map +1 -1
- package/esm/errors/provider-auth-error.mjs +1 -1
- package/esm/errors/provider-auth-error.mjs.map +1 -1
- package/esm/errors/provider-error.d.mts +1 -1
- package/esm/errors/provider-error.d.mts.map +1 -1
- package/esm/errors/provider-error.mjs +1 -1
- package/esm/errors/provider-error.mjs.map +1 -1
- package/esm/errors/provider-rate-limit-error.d.mts +1 -1
- package/esm/errors/provider-rate-limit-error.d.mts.map +1 -1
- package/esm/errors/provider-rate-limit-error.mjs +1 -1
- package/esm/errors/provider-rate-limit-error.mjs.map +1 -1
- package/esm/errors/provider-timeout-error.d.mts +1 -1
- package/esm/errors/provider-timeout-error.d.mts.map +1 -1
- package/esm/errors/provider-timeout-error.mjs +1 -1
- package/esm/errors/provider-timeout-error.mjs.map +1 -1
- package/esm/errors/quota-exceeded-error.d.mts +1 -1
- package/esm/errors/quota-exceeded-error.d.mts.map +1 -1
- package/esm/errors/quota-exceeded-error.mjs +1 -1
- package/esm/errors/quota-exceeded-error.mjs.map +1 -1
- package/esm/errors/routing-error.d.mts +1 -1
- package/esm/errors/routing-error.d.mts.map +1 -1
- package/esm/errors/routing-error.mjs +1 -1
- package/esm/errors/routing-error.mjs.map +1 -1
- package/esm/errors/schema-validation-error.d.mts +1 -1
- package/esm/errors/schema-validation-error.d.mts.map +1 -1
- package/esm/errors/schema-validation-error.mjs +1 -1
- package/esm/errors/schema-validation-error.mjs.map +1 -1
- package/esm/errors/step-failed-error.d.mts +1 -1
- package/esm/errors/step-failed-error.d.mts.map +1 -1
- package/esm/errors/step-failed-error.mjs +1 -1
- package/esm/errors/step-failed-error.mjs.map +1 -1
- package/esm/errors/supervisor-cancelled-error.d.mts +1 -1
- package/esm/errors/supervisor-cancelled-error.d.mts.map +1 -1
- package/esm/errors/supervisor-cancelled-error.mjs +1 -1
- package/esm/errors/supervisor-cancelled-error.mjs.map +1 -1
- package/esm/errors/supervisor-drift-error.d.mts +1 -1
- package/esm/errors/supervisor-drift-error.d.mts.map +1 -1
- package/esm/errors/supervisor-drift-error.mjs +1 -1
- package/esm/errors/supervisor-drift-error.mjs.map +1 -1
- package/esm/errors/supervisor-failed-error.d.mts +1 -1
- package/esm/errors/supervisor-failed-error.d.mts.map +1 -1
- package/esm/errors/supervisor-failed-error.mjs +1 -1
- package/esm/errors/supervisor-failed-error.mjs.map +1 -1
- package/esm/errors/supervisor-routing-error.d.mts +1 -1
- package/esm/errors/supervisor-routing-error.d.mts.map +1 -1
- package/esm/errors/supervisor-routing-error.mjs +1 -1
- package/esm/errors/supervisor-routing-error.mjs.map +1 -1
- package/esm/errors/tool-execution-error.d.mts +1 -1
- package/esm/errors/tool-execution-error.d.mts.map +1 -1
- package/esm/errors/tool-execution-error.mjs +1 -1
- package/esm/errors/tool-execution-error.mjs.map +1 -1
- package/esm/errors/workflow-cancelled-error.d.mts +1 -1
- package/esm/errors/workflow-cancelled-error.d.mts.map +1 -1
- package/esm/errors/workflow-cancelled-error.mjs +1 -1
- package/esm/errors/workflow-cancelled-error.mjs.map +1 -1
- package/esm/errors/workflow-drift-error.d.mts +1 -1
- package/esm/errors/workflow-drift-error.d.mts.map +1 -1
- package/esm/errors/workflow-drift-error.mjs +1 -1
- package/esm/errors/workflow-drift-error.mjs.map +1 -1
- package/esm/errors/workflow-error.d.mts +1 -1
- package/esm/errors/workflow-error.d.mts.map +1 -1
- package/esm/errors/workflow-error.mjs +1 -1
- package/esm/errors/workflow-error.mjs.map +1 -1
- package/esm/eval/dataset.d.mts +1 -1
- package/esm/eval/dataset.d.mts.map +1 -1
- package/esm/eval/dataset.mjs +1 -1
- package/esm/eval/dataset.mjs.map +1 -1
- package/esm/eval/dataset.type.d.mts +1 -1
- package/esm/eval/dataset.type.d.mts.map +1 -1
- package/esm/eval/eval-runner.d.mts +1 -1
- package/esm/eval/eval-runner.d.mts.map +1 -1
- package/esm/eval/eval-runner.mjs +1 -1
- package/esm/eval/eval-runner.mjs.map +1 -1
- package/esm/eval/index.d.mts +1 -1
- package/esm/eval/index.d.mts.map +1 -1
- package/esm/eval/index.mjs +1 -1
- package/esm/eval/index.mjs.map +1 -1
- package/esm/eval/judge-scorer.d.mts +1 -1
- package/esm/eval/judge-scorer.d.mts.map +1 -1
- package/esm/eval/judge-scorer.mjs +1 -1
- package/esm/eval/judge-scorer.mjs.map +1 -1
- package/esm/eval/regression.d.mts +1 -1
- package/esm/eval/regression.d.mts.map +1 -1
- package/esm/eval/regression.mjs +1 -1
- package/esm/eval/regression.mjs.map +1 -1
- package/esm/eval/report-json.d.mts +1 -1
- package/esm/eval/report-json.d.mts.map +1 -1
- package/esm/eval/report-json.mjs +1 -1
- package/esm/eval/report-json.mjs.map +1 -1
- package/esm/eval/report-junit.d.mts +1 -1
- package/esm/eval/report-junit.d.mts.map +1 -1
- package/esm/eval/report-junit.mjs +1 -1
- package/esm/eval/report-junit.mjs.map +1 -1
- package/esm/eval/scorers.d.mts +1 -1
- package/esm/eval/scorers.d.mts.map +1 -1
- package/esm/eval/scorers.mjs +1 -1
- package/esm/eval/scorers.mjs.map +1 -1
- package/esm/guard/contracts/guard-options.type.d.mts +1 -1
- package/esm/guard/contracts/guard-options.type.d.mts.map +1 -1
- package/esm/guard/contracts/guardrail.contract.d.mts +1 -1
- package/esm/guard/contracts/guardrail.contract.d.mts.map +1 -1
- package/esm/guard/contracts/openai-client.contract.d.mts +1 -1
- package/esm/guard/contracts/openai-client.contract.d.mts.map +1 -1
- package/esm/guard/contracts/verdict.type.d.mts +1 -1
- package/esm/guard/contracts/verdict.type.d.mts.map +1 -1
- package/esm/guard/detectors/injection.d.mts +1 -1
- package/esm/guard/detectors/injection.d.mts.map +1 -1
- package/esm/guard/detectors/injection.mjs +1 -1
- package/esm/guard/detectors/injection.mjs.map +1 -1
- package/esm/guard/detectors/moderation.d.mts +1 -1
- package/esm/guard/detectors/moderation.d.mts.map +1 -1
- package/esm/guard/detectors/moderation.mjs +1 -1
- package/esm/guard/detectors/moderation.mjs.map +1 -1
- package/esm/guard/detectors/pii.d.mts +1 -1
- package/esm/guard/detectors/pii.d.mts.map +1 -1
- package/esm/guard/detectors/pii.mjs +1 -1
- package/esm/guard/detectors/pii.mjs.map +1 -1
- package/esm/guard/detectors/topic.d.mts +1 -1
- package/esm/guard/detectors/topic.d.mts.map +1 -1
- package/esm/guard/detectors/topic.mjs +1 -1
- package/esm/guard/detectors/topic.mjs.map +1 -1
- package/esm/guard/errors.d.mts +1 -1
- package/esm/guard/errors.d.mts.map +1 -1
- package/esm/guard/errors.mjs +1 -1
- package/esm/guard/errors.mjs.map +1 -1
- package/esm/guard/guard.d.mts +1 -1
- package/esm/guard/guard.d.mts.map +1 -1
- package/esm/guard/guard.mjs +1 -1
- package/esm/guard/guard.mjs.map +1 -1
- package/esm/guard/guardrail.d.mts +1 -1
- package/esm/guard/guardrail.d.mts.map +1 -1
- package/esm/guard/guardrail.mjs +1 -1
- package/esm/guard/guardrail.mjs.map +1 -1
- package/esm/human/contracts/approval.type.d.mts +1 -1
- package/esm/human/contracts/approval.type.d.mts.map +1 -1
- package/esm/human/contracts/human-approval.type.d.mts +1 -1
- package/esm/human/contracts/human-approval.type.d.mts.map +1 -1
- package/esm/human/contracts/interrupt-store.contract.d.mts +1 -1
- package/esm/human/contracts/interrupt-store.contract.d.mts.map +1 -1
- package/esm/human/contracts/resume.type.d.mts +1 -1
- package/esm/human/contracts/resume.type.d.mts.map +1 -1
- package/esm/human/errors.d.mts +1 -1
- package/esm/human/errors.d.mts.map +1 -1
- package/esm/human/errors.mjs +1 -1
- package/esm/human/errors.mjs.map +1 -1
- package/esm/human/human-approval.d.mts +1 -1
- package/esm/human/human-approval.d.mts.map +1 -1
- package/esm/human/human-approval.mjs +1 -1
- package/esm/human/human-approval.mjs.map +1 -1
- package/esm/human/policy.d.mts +1 -1
- package/esm/human/policy.d.mts.map +1 -1
- package/esm/human/policy.mjs +1 -1
- package/esm/human/policy.mjs.map +1 -1
- package/esm/human/register.mjs +1 -1
- package/esm/human/register.mjs.map +1 -1
- package/esm/human/resume-seed.mjs +1 -1
- package/esm/human/resume-seed.mjs.map +1 -1
- package/esm/human/resume.d.mts +1 -1
- package/esm/human/resume.d.mts.map +1 -1
- package/esm/human/resume.mjs +1 -1
- package/esm/human/resume.mjs.map +1 -1
- package/esm/human/stores/memory.d.mts +1 -1
- package/esm/human/stores/memory.d.mts.map +1 -1
- package/esm/human/stores/memory.mjs +1 -1
- package/esm/human/stores/memory.mjs.map +1 -1
- package/esm/human/stores/pg.d.mts +1 -1
- package/esm/human/stores/pg.d.mts.map +1 -1
- package/esm/human/stores/pg.mjs +1 -1
- package/esm/human/stores/pg.mjs.map +1 -1
- package/esm/human/stores/redis.d.mts +1 -1
- package/esm/human/stores/redis.d.mts.map +1 -1
- package/esm/human/stores/redis.mjs +1 -1
- package/esm/human/stores/redis.mjs.map +1 -1
- package/esm/image/image-cost.d.mts +1 -1
- package/esm/image/image-cost.d.mts.map +1 -1
- package/esm/image/image-cost.mjs +1 -1
- package/esm/image/image-cost.mjs.map +1 -1
- package/esm/image/image.d.mts +1 -1
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/memory/derive-id.mjs +1 -1
- package/esm/memory/derive-id.mjs.map +1 -1
- package/esm/memory/episodic-memory.mjs +1 -1
- package/esm/memory/episodic-memory.mjs.map +1 -1
- package/esm/memory/memory.d.mts +1 -1
- package/esm/memory/memory.d.mts.map +1 -1
- package/esm/memory/memory.mjs +1 -1
- package/esm/memory/memory.mjs.map +1 -1
- package/esm/memory/procedural-memory.mjs +1 -1
- package/esm/memory/procedural-memory.mjs.map +1 -1
- package/esm/memory/semantic-memory.mjs +1 -1
- package/esm/memory/semantic-memory.mjs.map +1 -1
- package/esm/memory/working-memory.mjs +1 -1
- package/esm/memory/working-memory.mjs.map +1 -1
- package/esm/middleware/builtins/budget-contract.type.d.mts +1 -1
- package/esm/middleware/builtins/budget-contract.type.d.mts.map +1 -1
- package/esm/middleware/builtins/budget.d.mts +1 -1
- package/esm/middleware/builtins/budget.d.mts.map +1 -1
- package/esm/middleware/builtins/budget.mjs +1 -1
- package/esm/middleware/builtins/budget.mjs.map +1 -1
- package/esm/middleware/builtins/guardrail.d.mts +1 -1
- package/esm/middleware/builtins/guardrail.d.mts.map +1 -1
- package/esm/middleware/builtins/guardrail.mjs +1 -1
- package/esm/middleware/builtins/guardrail.mjs.map +1 -1
- package/esm/middleware/builtins/semantic-cache.d.mts +1 -1
- package/esm/middleware/builtins/semantic-cache.d.mts.map +1 -1
- package/esm/middleware/builtins/semantic-cache.mjs +1 -1
- package/esm/middleware/builtins/semantic-cache.mjs.map +1 -1
- package/esm/middleware/helpers/compose.d.mts +1 -1
- package/esm/middleware/helpers/compose.d.mts.map +1 -1
- package/esm/middleware/helpers/compose.mjs +1 -1
- package/esm/middleware/helpers/compose.mjs.map +1 -1
- package/esm/middleware/helpers/for-tool.d.mts +1 -1
- package/esm/middleware/helpers/for-tool.d.mts.map +1 -1
- package/esm/middleware/helpers/for-tool.mjs +1 -1
- package/esm/middleware/helpers/for-tool.mjs.map +1 -1
- package/esm/middleware/pipeline.d.mts +1 -1
- package/esm/middleware/pipeline.d.mts.map +1 -1
- package/esm/middleware/pipeline.mjs +1 -1
- package/esm/middleware/pipeline.mjs.map +1 -1
- package/esm/middleware/utils/extract-user-text.d.mts +1 -1
- package/esm/middleware/utils/extract-user-text.d.mts.map +1 -1
- package/esm/middleware/utils/extract-user-text.mjs +1 -1
- package/esm/middleware/utils/extract-user-text.mjs.map +1 -1
- package/esm/middleware/utils/namespaced-state.d.mts +1 -1
- package/esm/middleware/utils/namespaced-state.d.mts.map +1 -1
- package/esm/middleware/utils/namespaced-state.mjs +1 -1
- package/esm/middleware/utils/namespaced-state.mjs.map +1 -1
- package/esm/mock/mock-agent.d.mts +1 -1
- package/esm/mock/mock-agent.d.mts.map +1 -1
- package/esm/mock/mock-agent.mjs +1 -1
- package/esm/mock/mock-agent.mjs.map +1 -1
- package/esm/mock/mock-config.type.d.mts +1 -1
- package/esm/mock/mock-config.type.d.mts.map +1 -1
- package/esm/mock/mock-image-model.d.mts +1 -1
- package/esm/mock/mock-image-model.d.mts.map +1 -1
- package/esm/mock/mock-image-model.mjs +1 -1
- package/esm/mock/mock-image-model.mjs.map +1 -1
- package/esm/mock/mock-model.d.mts +1 -1
- package/esm/mock/mock-model.d.mts.map +1 -1
- package/esm/mock/mock-model.mjs +1 -1
- package/esm/mock/mock-model.mjs.map +1 -1
- package/esm/mock/mock-router.d.mts +1 -1
- package/esm/mock/mock-router.d.mts.map +1 -1
- package/esm/mock/mock-router.mjs +1 -1
- package/esm/mock/mock-router.mjs.map +1 -1
- package/esm/mock/mock-sdk.d.mts +1 -1
- package/esm/mock/mock-sdk.d.mts.map +1 -1
- package/esm/mock/mock-sdk.mjs +1 -1
- package/esm/mock/mock-sdk.mjs.map +1 -1
- package/esm/mock/mock-speech-model.d.mts +1 -1
- package/esm/mock/mock-speech-model.d.mts.map +1 -1
- package/esm/mock/mock-speech-model.mjs +1 -1
- package/esm/mock/mock-speech-model.mjs.map +1 -1
- package/esm/mock/mock-transcription-model.d.mts +1 -1
- package/esm/mock/mock-transcription-model.d.mts.map +1 -1
- package/esm/mock/mock-transcription-model.mjs +1 -1
- package/esm/mock/mock-transcription-model.mjs.map +1 -1
- package/esm/model/fallback-model.d.mts +1 -1
- package/esm/model/fallback-model.d.mts.map +1 -1
- package/esm/model/fallback-model.mjs +1 -1
- package/esm/model/fallback-model.mjs.map +1 -1
- package/esm/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +1 -1
- package/esm/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -1
- package/esm/node_modules/@vitest/expect/dist/index.mjs +1 -1
- package/esm/node_modules/@vitest/expect/dist/index.mjs.map +1 -1
- package/esm/node_modules/@vitest/pretty-format/dist/index.mjs +1 -1
- package/esm/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -1
- package/esm/node_modules/@vitest/runner/dist/chunk-artifact.mjs +1 -1
- package/esm/node_modules/@vitest/runner/dist/chunk-artifact.mjs.map +1 -1
- package/esm/node_modules/@vitest/snapshot/dist/index.mjs +1 -1
- package/esm/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -1
- package/esm/node_modules/@vitest/spy/dist/index.mjs +1 -1
- package/esm/node_modules/@vitest/spy/dist/index.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/diff.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/diff.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/display.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/display.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/error.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/error.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/helpers.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/offset.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/offset.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/serialize.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/serialize.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/source-map.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -1
- package/esm/node_modules/@vitest/utils/dist/timers.mjs +1 -1
- package/esm/node_modules/@vitest/utils/dist/timers.mjs.map +1 -1
- package/esm/node_modules/chai/index.mjs +1 -1
- package/esm/node_modules/chai/index.mjs.map +1 -1
- package/esm/node_modules/magic-string/dist/magic-string.es.mjs +1 -1
- package/esm/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -1
- package/esm/node_modules/tinyrainbow/dist/index.mjs +1 -1
- package/esm/node_modules/tinyrainbow/dist/index.mjs.map +1 -1
- package/esm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +1 -1
- package/esm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs.map +1 -1
- package/esm/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs +1 -1
- package/esm/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs.map +1 -1
- package/esm/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs +1 -1
- package/esm/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs.map +1 -1
- package/esm/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs +1 -1
- package/esm/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs.map +1 -1
- package/esm/object-stream/parse-partial-json.d.mts +1 -1
- package/esm/object-stream/parse-partial-json.d.mts.map +1 -1
- package/esm/object-stream/parse-partial-json.mjs +1 -1
- package/esm/object-stream/parse-partial-json.mjs.map +1 -1
- package/esm/object-stream/stream-object.d.mts +1 -1
- package/esm/object-stream/stream-object.d.mts.map +1 -1
- package/esm/object-stream/stream-object.mjs +1 -1
- package/esm/object-stream/stream-object.mjs.map +1 -1
- package/esm/observe/observer-registry.d.mts +1 -1
- package/esm/observe/observer-registry.d.mts.map +1 -1
- package/esm/observe/observer-registry.mjs +1 -1
- package/esm/observe/observer-registry.mjs.map +1 -1
- package/esm/observe/observer.contract.d.mts +1 -1
- package/esm/observe/observer.contract.d.mts.map +1 -1
- package/esm/observe/resolve-observers.d.mts +1 -1
- package/esm/observe/resolve-observers.d.mts.map +1 -1
- package/esm/observe/resolve-observers.mjs +1 -1
- package/esm/observe/resolve-observers.mjs.map +1 -1
- package/esm/orchestrator/as-tool.d.mts +1 -1
- package/esm/orchestrator/as-tool.d.mts.map +1 -1
- package/esm/orchestrator/as-tool.mjs +1 -1
- package/esm/orchestrator/as-tool.mjs.map +1 -1
- package/esm/orchestrator/checkpoint.mjs +1 -1
- package/esm/orchestrator/checkpoint.mjs.map +1 -1
- package/esm/orchestrator/commands.d.mts +1 -1
- package/esm/orchestrator/commands.d.mts.map +1 -1
- package/esm/orchestrator/commands.mjs +1 -1
- package/esm/orchestrator/commands.mjs.map +1 -1
- package/esm/orchestrator/compaction.mjs +1 -1
- package/esm/orchestrator/compaction.mjs.map +1 -1
- package/esm/orchestrator/dispatch.mjs +1 -1
- package/esm/orchestrator/dispatch.mjs.map +1 -1
- package/esm/orchestrator/emitter-port.type.d.mts +1 -1
- package/esm/orchestrator/emitter-port.type.d.mts.map +1 -1
- package/esm/orchestrator/emitter.d.mts +1 -1
- package/esm/orchestrator/emitter.d.mts.map +1 -1
- package/esm/orchestrator/emitter.mjs +1 -1
- package/esm/orchestrator/emitter.mjs.map +1 -1
- package/esm/orchestrator/engine-context.type.d.mts +1 -1
- package/esm/orchestrator/engine-context.type.d.mts.map +1 -1
- package/esm/orchestrator/execution.d.mts +1 -1
- package/esm/orchestrator/execution.d.mts.map +1 -1
- package/esm/orchestrator/execution.mjs +1 -1
- package/esm/orchestrator/execution.mjs.map +1 -1
- package/esm/orchestrator/load.mjs +1 -1
- package/esm/orchestrator/load.mjs.map +1 -1
- package/esm/orchestrator/lock.mjs +1 -1
- package/esm/orchestrator/lock.mjs.map +1 -1
- package/esm/orchestrator/memory.d.mts +1 -1
- package/esm/orchestrator/memory.d.mts.map +1 -1
- package/esm/orchestrator/memory.mjs +1 -1
- package/esm/orchestrator/memory.mjs.map +1 -1
- package/esm/orchestrator/orchestrator-stream.d.mts +1 -1
- package/esm/orchestrator/orchestrator-stream.d.mts.map +1 -1
- package/esm/orchestrator/orchestrator-stream.mjs +1 -1
- package/esm/orchestrator/orchestrator-stream.mjs.map +1 -1
- package/esm/orchestrator/orchestrator.d.mts +1 -1
- package/esm/orchestrator/orchestrator.d.mts.map +1 -1
- package/esm/orchestrator/orchestrator.mjs +1 -1
- package/esm/orchestrator/orchestrator.mjs.map +1 -1
- package/esm/orchestrator/resume.mjs +1 -1
- package/esm/orchestrator/resume.mjs.map +1 -1
- package/esm/orchestrator/session-lock.d.mts +1 -1
- package/esm/orchestrator/session-lock.d.mts.map +1 -1
- package/esm/orchestrator/session-lock.mjs +1 -1
- package/esm/orchestrator/session-lock.mjs.map +1 -1
- package/esm/orchestrator/signature.d.mts +1 -1
- package/esm/orchestrator/signature.d.mts.map +1 -1
- package/esm/orchestrator/signature.mjs +1 -1
- package/esm/orchestrator/signature.mjs.map +1 -1
- package/esm/orchestrator/window.mjs +1 -1
- package/esm/orchestrator/window.mjs.map +1 -1
- package/esm/planner/dag-scheduler.mjs +1 -1
- package/esm/planner/dag-scheduler.mjs.map +1 -1
- package/esm/planner/plan-prompt.d.mts +1 -1
- package/esm/planner/plan-prompt.d.mts.map +1 -1
- package/esm/planner/plan-prompt.mjs +1 -1
- package/esm/planner/plan-prompt.mjs.map +1 -1
- package/esm/planner/plan-schema.d.mts +1 -1
- package/esm/planner/plan-schema.d.mts.map +1 -1
- package/esm/planner/plan-schema.mjs +1 -1
- package/esm/planner/plan-schema.mjs.map +1 -1
- package/esm/planner/planner-run.d.mts +1 -1
- package/esm/planner/planner-run.d.mts.map +1 -1
- package/esm/planner/planner-run.mjs +1 -1
- package/esm/planner/planner-run.mjs.map +1 -1
- package/esm/planner/planner.d.mts +1 -1
- package/esm/planner/planner.d.mts.map +1 -1
- package/esm/planner/planner.mjs +1 -1
- package/esm/planner/planner.mjs.map +1 -1
- package/esm/planner/signature.d.mts +1 -1
- package/esm/planner/signature.d.mts.map +1 -1
- package/esm/planner/signature.mjs +1 -1
- package/esm/planner/signature.mjs.map +1 -1
- package/esm/planner/snapshot.mjs +1 -1
- package/esm/planner/snapshot.mjs.map +1 -1
- package/esm/prompt/errors.d.mts +1 -1
- package/esm/prompt/errors.d.mts.map +1 -1
- package/esm/prompt/errors.mjs +1 -1
- package/esm/prompt/errors.mjs.map +1 -1
- package/esm/prompt/prompt-langfuse-sync.mjs +1 -1
- package/esm/prompt/prompt-langfuse-sync.mjs.map +1 -1
- package/esm/prompt/prompt-langfuse-sync.type.d.mts +1 -1
- package/esm/prompt/prompt-langfuse-sync.type.d.mts.map +1 -1
- package/esm/prompt/prompt-validate.mjs +1 -1
- package/esm/prompt/prompt-validate.mjs.map +1 -1
- package/esm/prompt/prompt.d.mts +1 -1
- package/esm/prompt/prompt.d.mts.map +1 -1
- package/esm/prompt/prompt.mjs +1 -1
- package/esm/prompt/prompt.mjs.map +1 -1
- package/esm/prompt/prompt.type.d.mts +1 -1
- package/esm/prompt/prompt.type.d.mts.map +1 -1
- package/esm/prompts/prompts-manager.contract.d.mts +1 -1
- package/esm/prompts/prompts-manager.contract.d.mts.map +1 -1
- package/esm/prompts/prompts-manager.d.mts +1 -1
- package/esm/prompts/prompts-manager.d.mts.map +1 -1
- package/esm/prompts/prompts-manager.mjs +1 -1
- package/esm/prompts/prompts-manager.mjs.map +1 -1
- package/esm/prompts/prompts-manager.type.d.mts +1 -1
- package/esm/prompts/prompts-manager.type.d.mts.map +1 -1
- package/esm/prompts/prompts-validate.d.mts +1 -1
- package/esm/prompts/prompts-validate.d.mts.map +1 -1
- package/esm/prompts/prompts-validate.mjs +0 -0
- package/esm/prompts/prompts-validate.mjs.map +1 -1
- package/esm/rag/as-tool.mjs +1 -1
- package/esm/rag/as-tool.mjs.map +1 -1
- package/esm/rag/chunk/chunk.d.mts +1 -1
- package/esm/rag/chunk/chunk.d.mts.map +1 -1
- package/esm/rag/chunk/chunk.mjs +1 -1
- package/esm/rag/chunk/chunk.mjs.map +1 -1
- package/esm/rag/chunk/fixed.mjs +1 -1
- package/esm/rag/chunk/fixed.mjs.map +1 -1
- package/esm/rag/chunk/markdown.mjs +1 -1
- package/esm/rag/chunk/markdown.mjs.map +1 -1
- package/esm/rag/chunk/recursive.mjs +1 -1
- package/esm/rag/chunk/recursive.mjs.map +1 -1
- package/esm/rag/chunk/sentence.mjs +1 -1
- package/esm/rag/chunk/sentence.mjs.map +1 -1
- package/esm/rag/contracts/chunk-options.type.d.mts +1 -1
- package/esm/rag/contracts/chunk-options.type.d.mts.map +1 -1
- package/esm/rag/contracts/citation.type.d.mts +1 -1
- package/esm/rag/contracts/citation.type.d.mts.map +1 -1
- package/esm/rag/contracts/rag-config.type.d.mts +1 -1
- package/esm/rag/contracts/rag-config.type.d.mts.map +1 -1
- package/esm/rag/contracts/rag-document.type.d.mts +1 -1
- package/esm/rag/contracts/rag-document.type.d.mts.map +1 -1
- package/esm/rag/hybrid/bm25.d.mts +1 -1
- package/esm/rag/hybrid/bm25.d.mts.map +1 -1
- package/esm/rag/hybrid/bm25.mjs +1 -1
- package/esm/rag/hybrid/bm25.mjs.map +1 -1
- package/esm/rag/hybrid/hybrid-rank.d.mts +1 -1
- package/esm/rag/hybrid/hybrid-rank.d.mts.map +1 -1
- package/esm/rag/hybrid/hybrid-rank.mjs +1 -1
- package/esm/rag/hybrid/hybrid-rank.mjs.map +1 -1
- package/esm/rag/hybrid/rrf.d.mts +1 -1
- package/esm/rag/hybrid/rrf.d.mts.map +1 -1
- package/esm/rag/hybrid/rrf.mjs +1 -1
- package/esm/rag/hybrid/rrf.mjs.map +1 -1
- package/esm/rag/loaders/errors.d.mts +1 -1
- package/esm/rag/loaders/errors.d.mts.map +1 -1
- package/esm/rag/loaders/errors.mjs +1 -1
- package/esm/rag/loaders/errors.mjs.map +1 -1
- package/esm/rag/loaders/load-html.d.mts +1 -1
- package/esm/rag/loaders/load-html.d.mts.map +1 -1
- package/esm/rag/loaders/load-html.mjs +1 -1
- package/esm/rag/loaders/load-html.mjs.map +1 -1
- package/esm/rag/loaders/load-pdf.d.mts +1 -1
- package/esm/rag/loaders/load-pdf.d.mts.map +1 -1
- package/esm/rag/loaders/load-pdf.mjs +1 -1
- package/esm/rag/loaders/load-pdf.mjs.map +1 -1
- package/esm/rag/loaders/load-text.d.mts +1 -1
- package/esm/rag/loaders/load-text.d.mts.map +1 -1
- package/esm/rag/loaders/load-text.mjs +1 -1
- package/esm/rag/loaders/load-text.mjs.map +1 -1
- package/esm/rag/loaders/load-web.d.mts +1 -1
- package/esm/rag/loaders/load-web.d.mts.map +1 -1
- package/esm/rag/loaders/load-web.mjs +1 -1
- package/esm/rag/loaders/load-web.mjs.map +1 -1
- package/esm/rag/loaders/loader.type.d.mts +1 -1
- package/esm/rag/loaders/loader.type.d.mts.map +1 -1
- package/esm/rag/rag.d.mts +1 -1
- package/esm/rag/rag.d.mts.map +1 -1
- package/esm/rag/rag.mjs +1 -1
- package/esm/rag/rag.mjs.map +1 -1
- package/esm/rag/rerank/keyword-reranker.d.mts +1 -1
- package/esm/rag/rerank/keyword-reranker.d.mts.map +1 -1
- package/esm/rag/rerank/keyword-reranker.mjs +1 -1
- package/esm/rag/rerank/keyword-reranker.mjs.map +1 -1
- package/esm/rag/rerank/llm-reranker.d.mts +1 -1
- package/esm/rag/rerank/llm-reranker.d.mts.map +1 -1
- package/esm/rag/rerank/llm-reranker.mjs +1 -1
- package/esm/rag/rerank/llm-reranker.mjs.map +1 -1
- package/esm/rag/rerank/reranker.contract.d.mts +1 -1
- package/esm/rag/rerank/reranker.contract.d.mts.map +1 -1
- package/esm/rag/retrieve.mjs +1 -1
- package/esm/rag/retrieve.mjs.map +1 -1
- package/esm/rag/store/cache-vector-store.d.mts +1 -1
- package/esm/rag/store/cache-vector-store.d.mts.map +1 -1
- package/esm/rag/store/cache-vector-store.mjs +1 -1
- package/esm/rag/store/cache-vector-store.mjs.map +1 -1
- package/esm/rag/store/pg-vector-store.d.mts +1 -1
- package/esm/rag/store/pg-vector-store.d.mts.map +1 -1
- package/esm/rag/store/pg-vector-store.mjs +1 -1
- package/esm/rag/store/pg-vector-store.mjs.map +1 -1
- package/esm/rag/store/vector-store.contract.d.mts +1 -1
- package/esm/rag/store/vector-store.contract.d.mts.map +1 -1
- package/esm/rag/transforms/multi-query.d.mts +1 -1
- package/esm/rag/transforms/multi-query.d.mts.map +1 -1
- package/esm/rag/transforms/multi-query.mjs +1 -1
- package/esm/rag/transforms/multi-query.mjs.map +1 -1
- package/esm/security/outbound-policy.d.mts +1 -1
- package/esm/security/outbound-policy.d.mts.map +1 -1
- package/esm/security/outbound-policy.mjs +1 -1
- package/esm/security/outbound-policy.mjs.map +1 -1
- package/esm/security/outbound-policy.type.d.mts +1 -1
- package/esm/security/outbound-policy.type.d.mts.map +1 -1
- package/esm/security/private-ip.d.mts +1 -1
- package/esm/security/private-ip.d.mts.map +1 -1
- package/esm/security/private-ip.mjs +1 -1
- package/esm/security/private-ip.mjs.map +1 -1
- package/esm/security/redact.d.mts +1 -1
- package/esm/security/redact.d.mts.map +1 -1
- package/esm/security/redact.mjs +1 -1
- package/esm/security/redact.mjs.map +1 -1
- package/esm/serve/serve.d.mts +1 -1
- package/esm/serve/serve.d.mts.map +1 -1
- package/esm/serve/serve.mjs +1 -1
- package/esm/serve/serve.mjs.map +1 -1
- package/esm/serve/sse.d.mts +1 -1
- package/esm/serve/sse.d.mts.map +1 -1
- package/esm/serve/sse.mjs +1 -1
- package/esm/serve/sse.mjs.map +1 -1
- package/esm/serve/stream-to-sse.d.mts +1 -1
- package/esm/serve/stream-to-sse.d.mts.map +1 -1
- package/esm/serve/stream-to-sse.mjs +1 -1
- package/esm/serve/stream-to-sse.mjs.map +1 -1
- package/esm/skills/catalog.d.mts +1 -1
- package/esm/skills/catalog.d.mts.map +1 -1
- package/esm/skills/catalog.mjs +1 -1
- package/esm/skills/catalog.mjs.map +1 -1
- package/esm/skills/contracts/skill-record.type.d.mts +1 -1
- package/esm/skills/contracts/skill-record.type.d.mts.map +1 -1
- package/esm/skills/contracts/skills-config.type.d.mts +1 -1
- package/esm/skills/contracts/skills-config.type.d.mts.map +1 -1
- package/esm/skills/contracts/skills-store.contract.d.mts +1 -1
- package/esm/skills/contracts/skills-store.contract.d.mts.map +1 -1
- package/esm/skills/contracts/skills.contract.d.mts +1 -1
- package/esm/skills/contracts/skills.contract.d.mts.map +1 -1
- package/esm/skills/load-skill-tool.d.mts +1 -1
- package/esm/skills/load-skill-tool.d.mts.map +1 -1
- package/esm/skills/load-skill-tool.mjs +1 -1
- package/esm/skills/load-skill-tool.mjs.map +1 -1
- package/esm/skills/review-gate.d.mts +1 -1
- package/esm/skills/review-gate.d.mts.map +1 -1
- package/esm/skills/review-gate.mjs +1 -1
- package/esm/skills/review-gate.mjs.map +1 -1
- package/esm/skills/save-skill-tool.d.mts +1 -1
- package/esm/skills/save-skill-tool.d.mts.map +1 -1
- package/esm/skills/save-skill-tool.mjs +1 -1
- package/esm/skills/save-skill-tool.mjs.map +1 -1
- package/esm/skills/skills.d.mts +1 -1
- package/esm/skills/skills.d.mts.map +1 -1
- package/esm/skills/skills.mjs +1 -1
- package/esm/skills/skills.mjs.map +1 -1
- package/esm/skills/sources/directory-source.d.mts +1 -1
- package/esm/skills/sources/directory-source.d.mts.map +1 -1
- package/esm/skills/sources/directory-source.mjs +1 -1
- package/esm/skills/sources/directory-source.mjs.map +1 -1
- package/esm/skills/sources/index.d.mts +1 -1
- package/esm/skills/sources/index.d.mts.map +1 -1
- package/esm/skills/sources/index.mjs +1 -1
- package/esm/skills/sources/index.mjs.map +1 -1
- package/esm/skills/sources/parse-frontmatter.d.mts +1 -1
- package/esm/skills/sources/parse-frontmatter.d.mts.map +1 -1
- package/esm/skills/sources/parse-frontmatter.mjs +1 -1
- package/esm/skills/sources/parse-frontmatter.mjs.map +1 -1
- package/esm/skills/sources/store-source.d.mts +1 -1
- package/esm/skills/sources/store-source.d.mts.map +1 -1
- package/esm/skills/sources/store-source.mjs +1 -1
- package/esm/skills/sources/store-source.mjs.map +1 -1
- package/esm/skills/sources/url-source.d.mts +1 -1
- package/esm/skills/sources/url-source.d.mts.map +1 -1
- package/esm/skills/sources/url-source.mjs +1 -1
- package/esm/skills/sources/url-source.mjs.map +1 -1
- package/esm/skills/store/mock-skills-store.d.mts +1 -1
- package/esm/skills/store/mock-skills-store.d.mts.map +1 -1
- package/esm/skills/store/mock-skills-store.mjs +1 -1
- package/esm/skills/store/mock-skills-store.mjs.map +1 -1
- package/esm/skills/store/procedural-skill-store.d.mts +1 -1
- package/esm/skills/store/procedural-skill-store.d.mts.map +1 -1
- package/esm/skills/store/procedural-skill-store.mjs +1 -1
- package/esm/skills/store/procedural-skill-store.mjs.map +1 -1
- package/esm/snapshot/memory.d.mts +1 -1
- package/esm/snapshot/memory.d.mts.map +1 -1
- package/esm/snapshot/memory.mjs +1 -1
- package/esm/snapshot/memory.mjs.map +1 -1
- package/esm/snapshot/pg.d.mts +1 -1
- package/esm/snapshot/pg.d.mts.map +1 -1
- package/esm/snapshot/pg.mjs +1 -1
- package/esm/snapshot/pg.mjs.map +1 -1
- package/esm/snapshot/redis.d.mts +1 -1
- package/esm/snapshot/redis.d.mts.map +1 -1
- package/esm/snapshot/redis.mjs +1 -1
- package/esm/snapshot/redis.mjs.map +1 -1
- package/esm/speech/speech.d.mts +1 -1
- package/esm/speech/speech.d.mts.map +1 -1
- package/esm/speech/speech.mjs +1 -1
- package/esm/speech/speech.mjs.map +1 -1
- package/esm/supervisor/as-tool.d.mts +1 -1
- package/esm/supervisor/as-tool.d.mts.map +1 -1
- package/esm/supervisor/as-tool.mjs +1 -1
- package/esm/supervisor/as-tool.mjs.map +1 -1
- package/esm/supervisor/cancellation.d.mts +1 -1
- package/esm/supervisor/cancellation.d.mts.map +1 -1
- package/esm/supervisor/cancellation.mjs +1 -1
- package/esm/supervisor/cancellation.mjs.map +1 -1
- package/esm/supervisor/decide.mjs +1 -1
- package/esm/supervisor/decide.mjs.map +1 -1
- package/esm/supervisor/emitter.d.mts +1 -1
- package/esm/supervisor/emitter.d.mts.map +1 -1
- package/esm/supervisor/emitter.mjs +1 -1
- package/esm/supervisor/emitter.mjs.map +1 -1
- package/esm/supervisor/entries.d.mts +1 -1
- package/esm/supervisor/entries.d.mts.map +1 -1
- package/esm/supervisor/entries.mjs +1 -1
- package/esm/supervisor/entries.mjs.map +1 -1
- package/esm/supervisor/execution.d.mts +1 -1
- package/esm/supervisor/execution.d.mts.map +1 -1
- package/esm/supervisor/execution.mjs +1 -1
- package/esm/supervisor/execution.mjs.map +1 -1
- package/esm/supervisor/fan-out.d.mts +1 -1
- package/esm/supervisor/fan-out.d.mts.map +1 -1
- package/esm/supervisor/fan-out.mjs +1 -1
- package/esm/supervisor/fan-out.mjs.map +1 -1
- package/esm/supervisor/router-factory.d.mts +1 -1
- package/esm/supervisor/router-factory.d.mts.map +1 -1
- package/esm/supervisor/router-factory.mjs +1 -1
- package/esm/supervisor/router-factory.mjs.map +1 -1
- package/esm/supervisor/router-prompt.d.mts +1 -1
- package/esm/supervisor/router-prompt.d.mts.map +1 -1
- package/esm/supervisor/router-prompt.mjs +1 -1
- package/esm/supervisor/router-prompt.mjs.map +1 -1
- package/esm/supervisor/signature.d.mts +1 -1
- package/esm/supervisor/signature.d.mts.map +1 -1
- package/esm/supervisor/signature.mjs +1 -1
- package/esm/supervisor/signature.mjs.map +1 -1
- package/esm/supervisor/snapshot.d.mts +1 -1
- package/esm/supervisor/snapshot.d.mts.map +1 -1
- package/esm/supervisor/snapshot.mjs +1 -1
- package/esm/supervisor/snapshot.mjs.map +1 -1
- package/esm/supervisor/supervisor-stream.d.mts +1 -1
- package/esm/supervisor/supervisor-stream.d.mts.map +1 -1
- package/esm/supervisor/supervisor-stream.mjs +1 -1
- package/esm/supervisor/supervisor-stream.mjs.map +1 -1
- package/esm/supervisor/supervisor.d.mts +1 -1
- package/esm/supervisor/supervisor.d.mts.map +1 -1
- package/esm/supervisor/supervisor.mjs +1 -1
- package/esm/supervisor/supervisor.mjs.map +1 -1
- package/esm/system-prompt/instruction.d.mts +1 -1
- package/esm/system-prompt/instruction.d.mts.map +1 -1
- package/esm/system-prompt/instruction.mjs +1 -1
- package/esm/system-prompt/instruction.mjs.map +1 -1
- package/esm/system-prompt/persona.d.mts +1 -1
- package/esm/system-prompt/persona.d.mts.map +1 -1
- package/esm/system-prompt/persona.mjs +1 -1
- package/esm/system-prompt/persona.mjs.map +1 -1
- package/esm/system-prompt/refined-system-prompt.d.mts +1 -1
- package/esm/system-prompt/refined-system-prompt.d.mts.map +1 -1
- package/esm/system-prompt/refined-system-prompt.mjs +1 -1
- package/esm/system-prompt/refined-system-prompt.mjs.map +1 -1
- package/esm/system-prompt/render-placeholders.d.mts +1 -1
- package/esm/system-prompt/render-placeholders.d.mts.map +1 -1
- package/esm/system-prompt/render-placeholders.mjs +1 -1
- package/esm/system-prompt/render-placeholders.mjs.map +1 -1
- package/esm/system-prompt/system-prompt.d.mts +1 -1
- package/esm/system-prompt/system-prompt.d.mts.map +1 -1
- package/esm/system-prompt/system-prompt.mjs +1 -1
- package/esm/system-prompt/system-prompt.mjs.map +1 -1
- package/esm/team/gates.mjs +1 -1
- package/esm/team/gates.mjs.map +1 -1
- package/esm/team/team.d.mts +1 -1
- package/esm/team/team.d.mts.map +1 -1
- package/esm/team/team.mjs +1 -1
- package/esm/team/team.mjs.map +1 -1
- package/esm/testing/matcher-logic.d.mts +1 -1
- package/esm/testing/matcher-logic.d.mts.map +1 -1
- package/esm/testing/matcher-logic.mjs +1 -1
- package/esm/testing/matcher-logic.mjs.map +1 -1
- package/esm/testing/matchers.d.mts +1 -1
- package/esm/testing/matchers.d.mts.map +1 -1
- package/esm/testing/matchers.mjs +1 -1
- package/esm/testing/matchers.mjs.map +1 -1
- package/esm/testing/register-lazy.d.mts +1 -1
- package/esm/testing/register-lazy.d.mts.map +1 -1
- package/esm/testing/register-lazy.mjs +1 -1
- package/esm/testing/register-lazy.mjs.map +1 -1
- package/esm/tool/executable-as-tool.d.mts +1 -1
- package/esm/tool/executable-as-tool.d.mts.map +1 -1
- package/esm/tool/executable-as-tool.mjs +1 -1
- package/esm/tool/executable-as-tool.mjs.map +1 -1
- package/esm/tool/tool.d.mts +1 -1
- package/esm/tool/tool.d.mts.map +1 -1
- package/esm/tool/tool.mjs +1 -1
- package/esm/tool/tool.mjs.map +1 -1
- package/esm/transcribe/audio-input.d.mts +1 -1
- package/esm/transcribe/audio-input.d.mts.map +1 -1
- package/esm/transcribe/audio-input.mjs +1 -1
- package/esm/transcribe/audio-input.mjs.map +1 -1
- package/esm/transcribe/transcribe.d.mts +1 -1
- package/esm/transcribe/transcribe.d.mts.map +1 -1
- package/esm/transcribe/transcribe.mjs +1 -1
- package/esm/transcribe/transcribe.mjs.map +1 -1
- package/esm/utils/compute-cost.d.mts +1 -1
- package/esm/utils/compute-cost.d.mts.map +1 -1
- package/esm/utils/compute-cost.mjs +1 -1
- package/esm/utils/compute-cost.mjs.map +1 -1
- package/esm/utils/extract-json-lenient.d.mts +1 -1
- package/esm/utils/extract-json-lenient.d.mts.map +1 -1
- package/esm/utils/extract-json-lenient.mjs +1 -1
- package/esm/utils/extract-json-lenient.mjs.map +1 -1
- package/esm/utils/extract-json-payload.d.mts +1 -1
- package/esm/utils/extract-json-payload.d.mts.map +1 -1
- package/esm/utils/extract-json-payload.mjs +1 -1
- package/esm/utils/extract-json-payload.mjs.map +1 -1
- package/esm/utils/generate-run-id.d.mts +1 -1
- package/esm/utils/generate-run-id.d.mts.map +1 -1
- package/esm/utils/generate-run-id.mjs +1 -1
- package/esm/utils/generate-run-id.mjs.map +1 -1
- package/esm/utils/json-schema.d.mts +1 -1
- package/esm/utils/json-schema.d.mts.map +1 -1
- package/esm/utils/json-schema.mjs +1 -1
- package/esm/utils/json-schema.mjs.map +1 -1
- package/esm/utils/prepare-attachment-part.d.mts +1 -1
- package/esm/utils/prepare-attachment-part.d.mts.map +1 -1
- package/esm/utils/prepare-attachment-part.mjs +1 -1
- package/esm/utils/prepare-attachment-part.mjs.map +1 -1
- package/esm/utils/resolve-attachment.d.mts +1 -1
- package/esm/utils/resolve-attachment.d.mts.map +1 -1
- package/esm/utils/resolve-attachment.mjs +1 -1
- package/esm/utils/resolve-attachment.mjs.map +1 -1
- package/esm/utils/run-context.d.mts +1 -1
- package/esm/utils/run-context.d.mts.map +1 -1
- package/esm/utils/run-context.mjs +1 -1
- package/esm/utils/run-context.mjs.map +1 -1
- package/esm/utils/safe-json-parse.d.mts +1 -1
- package/esm/utils/safe-json-parse.d.mts.map +1 -1
- package/esm/utils/safe-json-parse.mjs +1 -1
- package/esm/utils/safe-json-parse.mjs.map +1 -1
- package/esm/utils/stamp-report-lineage.d.mts +1 -1
- package/esm/utils/stamp-report-lineage.d.mts.map +1 -1
- package/esm/utils/stamp-report-lineage.mjs +1 -1
- package/esm/utils/stamp-report-lineage.mjs.map +1 -1
- package/esm/utils/token-count.d.mts +1 -1
- package/esm/utils/token-count.d.mts.map +1 -1
- package/esm/utils/token-count.mjs +1 -1
- package/esm/utils/token-count.mjs.map +1 -1
- package/esm/vcr/cassette-io.mjs +1 -1
- package/esm/vcr/cassette-io.mjs.map +1 -1
- package/esm/vcr/errors.d.mts +1 -1
- package/esm/vcr/errors.d.mts.map +1 -1
- package/esm/vcr/errors.mjs +1 -1
- package/esm/vcr/errors.mjs.map +1 -1
- package/esm/vcr/hash-request.d.mts +1 -1
- package/esm/vcr/hash-request.d.mts.map +1 -1
- package/esm/vcr/hash-request.mjs +1 -1
- package/esm/vcr/hash-request.mjs.map +1 -1
- package/esm/vcr/vcr.d.mts +1 -1
- package/esm/vcr/vcr.d.mts.map +1 -1
- package/esm/vcr/vcr.mjs +1 -1
- package/esm/vcr/vcr.mjs.map +1 -1
- package/esm/vcr/vcr.type.d.mts +1 -1
- package/esm/vcr/vcr.type.d.mts.map +1 -1
- package/esm/workflow/as-tool.mjs +1 -1
- package/esm/workflow/as-tool.mjs.map +1 -1
- package/esm/workflow/cancellation.mjs +1 -1
- package/esm/workflow/cancellation.mjs.map +1 -1
- package/esm/workflow/emitter.mjs +1 -1
- package/esm/workflow/emitter.mjs.map +1 -1
- package/esm/workflow/engine.mjs +5 -2
- package/esm/workflow/engine.mjs.map +1 -1
- package/esm/workflow/retry.mjs +1 -1
- package/esm/workflow/retry.mjs.map +1 -1
- package/esm/workflow/router.mjs +1 -1
- package/esm/workflow/router.mjs.map +1 -1
- package/esm/workflow/run-scoped-emitter.mjs +1 -1
- package/esm/workflow/run-scoped-emitter.mjs.map +1 -1
- package/esm/workflow/signature.d.mts +1 -1
- package/esm/workflow/signature.d.mts.map +1 -1
- package/esm/workflow/signature.mjs +1 -1
- package/esm/workflow/signature.mjs.map +1 -1
- package/esm/workflow/snapshot.mjs +1 -1
- package/esm/workflow/snapshot.mjs.map +1 -1
- package/esm/workflow/state.mjs +1 -1
- package/esm/workflow/state.mjs.map +1 -1
- package/esm/workflow/step-runner.mjs +25 -6
- package/esm/workflow/step-runner.mjs.map +1 -1
- package/esm/workflow/step.d.mts +1 -1
- package/esm/workflow/step.d.mts.map +1 -1
- package/esm/workflow/step.mjs +1 -1
- package/esm/workflow/step.mjs.map +1 -1
- package/esm/workflow/workflow.d.mts +1 -1
- package/esm/workflow/workflow.d.mts.map +1 -1
- package/esm/workflow/workflow.mjs +1 -1
- package/esm/workflow/workflow.mjs.map +1 -1
- package/llms-full.txt +23 -2
- package/package.json +4 -4
- package/skills/observe-ai-flows/SKILL.md +2 -2
- package/skills/run-ai-workflow/SKILL.md +19 -0
- package/skills/run-supervisor/SKILL.md +2 -0
- package/cjs/magic-string.es-BtxW4VqG.cjs.map +0 -1
- package/cjs/matcher-logic-SBnzYohQ.cjs.map +0 -1
- package/cjs/matchers-BBh3gyB-.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaced-state.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"namespaced-state.d.mts","names":[],"sources":["../../../../../../../../ai/src/middleware/utils/namespaced-state.ts"],"mappings":";;;;;AAyCA;;;;;;;;;;;;;;;;AAG4B;AAwB5B;;;;;;;;;;;;;AAIK;;;;;;iBA/BW,eAAA,IACd,GAAA;EAAA,SAAgB,KAAA,EAAO,eAAA;AAAA,GACvB,SAAA,WACC,uBAAA,CAAwB,CAAA;;;;;;;;KAwBf,uBAAA;EACV,GAAA,IAAO,CAAA;EACP,GAAA,CAAI,KAAA,EAAO,CAAC;EACZ,MAAA;EACA,GAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../ai/src/middleware/utils/namespaced-state.ts
|
|
2
2
|
/**
|
|
3
3
|
* Typed accessor over `ctx.state` for a single namespace key. Wraps
|
|
4
4
|
* the raw `Map<string, unknown>` so middleware authors stop typing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaced-state.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"namespaced-state.mjs","names":[],"sources":["../../../../../../../../ai/src/middleware/utils/namespaced-state.ts"],"sourcesContent":["import type { MiddlewareState } from \"../../contracts/middleware\";\n\n/**\n * Typed accessor over `ctx.state` for a single namespace key. Wraps\n * the raw `Map<string, unknown>` so middleware authors stop typing\n * `as Counters | undefined` on every read.\n *\n * **Role.** Every built-in middleware reads and writes one or two\n * entries in `ctx.state` under its own name. Without a helper,\n * every call-site looks like:\n *\n * ```ts\n * const counters = context.state.get(\"budget.counters\") as Counters | undefined;\n * if (!counters) { ... }\n * counters.tokens += n;\n * ```\n *\n * — cast noise, no type narrowing on `set`, no protection against\n * key typos. `namespacedState<T>` eliminates all three.\n *\n * **Scope.** Deliberately narrow: one key, typed value, four methods\n * (`get` / `set` / `delete` / `has`). Does NOT try to model compound\n * or nested keys — if you need those, use the raw `ctx.state` Map\n * directly, or create a second namespaced accessor for the second key.\n *\n * **Namespace convention.** Use the middleware's `name` as the key\n * (or a `name.<field>` prefix when a middleware needs multiple\n * entries). The pipeline does not enforce this — it is a convention\n * the built-ins follow to avoid collisions between middlewares.\n *\n * @example\n * // Inside a budget middleware:\n * const counters = namespacedState<Counters>(ctx, \"budget\");\n *\n * if (!counters.has()) {\n * counters.set({ tokens: 0, costUSD: 0 });\n * }\n *\n * const current = counters.get()!;\n * current.tokens += response.usage.total;\n */\nexport function namespacedState<T>(\n ctx: { readonly state: MiddlewareState },\n namespace: string,\n): NamespacedStateAccessor<T> {\n return {\n get(): T | undefined {\n return ctx.state.get(namespace) as T | undefined;\n },\n set(value: T): void {\n ctx.state.set(namespace, value);\n },\n delete(): void {\n ctx.state.delete(namespace);\n },\n has(): boolean {\n return ctx.state.has(namespace);\n },\n };\n}\n\n/**\n * Four-method accessor returned by `namespacedState`. Callers hold\n * it for the lifetime of a hook body — it is a thin typed view over\n * `ctx.state`, not a detached snapshot. Reads are live; writes hit\n * the underlying Map immediately and are visible to every other\n * hook that uses the same namespace.\n */\nexport type NamespacedStateAccessor<T> = {\n get(): T | undefined;\n set(value: T): void;\n delete(): void;\n has(): boolean;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,gBACd,KACA,WAC4B;CAC5B,OAAO;EACL,MAAqB;GACnB,OAAO,IAAI,MAAM,IAAI,SAAS;EAChC;EACA,IAAI,OAAgB;GAClB,IAAI,MAAM,IAAI,WAAW,KAAK;EAChC;EACA,SAAe;GACb,IAAI,MAAM,OAAO,SAAS;EAC5B;EACA,MAAe;GACb,OAAO,IAAI,MAAM,IAAI,SAAS;EAChC;CACF;AACF"}
|
|
@@ -2,7 +2,7 @@ import { AgentContract } from "../contracts/agent/agent.contract.mjs";
|
|
|
2
2
|
import { ToolContract } from "../tool/tool.mjs";
|
|
3
3
|
import { MockModelResponse } from "./mock-config.type.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../ai/src/mock/mock-agent.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Test helper that wires `MockSDK` → mock model → `agent()` in one call.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-agent.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-agent.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-agent.ts"],"mappings":";;;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;iBAAgB,SAAA,oBACd,OAAA;EACE,IAAA;EACA,SAAA,GAAY,iBAAA;EACZ,KAAA,GAAQ,YAAA;;;;;;EAMR,SAAA;AAAA,IAED,aAAA,CAAc,OAAA"}
|
package/esm/mock/mock-agent.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { agent } from "../agent/agent.mjs";
|
|
2
2
|
import { MockSDK } from "./mock-sdk.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/mock/mock-agent.ts
|
|
5
5
|
/**
|
|
6
6
|
* Test helper that wires `MockSDK` → mock model → `agent()` in one call.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-agent.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-agent.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-agent.ts"],"sourcesContent":["import { agent } from \"../agent/agent\";\nimport type { AgentConfig } from \"../agent/agent-config.type\";\nimport type { AgentContract } from \"../contracts/agent/agent.contract\";\nimport type { ToolContract } from \"../tool/tool\";\nimport type { MockModelResponse } from \"./mock-config.type\";\nimport { MockSDK } from \"./mock-sdk\";\n\n/**\n * Test helper that wires `MockSDK` → mock model → `agent()` in one call.\n *\n * Replaces the 4-line ritual specs typically write:\n * ```ts\n * const mock = MockSDK({ responses: [...] });\n * const myAgent = agent({ name: \"x\", model: mock.model({ name: \"m\" }) });\n * ```\n *\n * Defaults to a single empty `\"stop\"` response — enough to exercise an\n * agent that doesn't need a scripted reply (composition wiring,\n * anonymous-name tests, etc.). Pass `responses` to script outputs.\n *\n * `name` is optional — when omitted the resulting agent runs through\n * the normal anonymous-name fingerprint\n * (`anon_<provider>_<model>[_<tool1>+<tool2>...]`), which is the\n * default for `agent({ model })`.\n *\n * @example\n * const a = mockAgent({ name: \"writer\", responses: [{ content: \"hi\", finishReason: \"stop\" }] });\n * const result = await a.execute(\"anything\");\n */\nexport function mockAgent<TOutput = unknown>(\n options: {\n name?: string;\n responses?: MockModelResponse[];\n tools?: ToolContract<unknown, unknown>[];\n /**\n * Override the model name reported by the mock model. Defaults to\n * `\"mock-model\"` (the MockSDK default). Useful when a test needs\n * deterministic provider/model fingerprinting.\n */\n modelName?: string;\n } = {},\n): AgentContract<TOutput> {\n const responses = options.responses ?? [{ content: \"\", finishReason: \"stop\" as const }];\n const sdk = MockSDK({ responses });\n const model = sdk.model({ name: options.modelName ?? \"mock-model\" });\n\n const config: AgentConfig<TOutput> = { model };\n\n if (options.name !== undefined) {\n config.name = options.name;\n }\n\n if (options.tools !== undefined) {\n config.tools = options.tools;\n }\n\n return agent<TOutput>(config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,UACd,UAUI,CAAC,GACmB;CAKxB,MAAM,SAA+B,EAAE,OAH3B,QAAQ,EAAE,WADJ,QAAQ,aAAa,CAAC;EAAE,SAAS;EAAI,cAAc;CAAgB,CAAC,EACtD,CAChB,CAAC,CAAC,MAAM,EAAE,MAAM,QAAQ,aAAa,aAAa,CAEvB,EAAE;CAE7C,IAAI,QAAQ,SAAS,QACnB,OAAO,OAAO,QAAQ;CAGxB,IAAI,QAAQ,UAAU,QACpB,OAAO,QAAQ,QAAQ;CAGzB,OAAO,MAAe,MAAM;AAC9B"}
|
|
@@ -9,7 +9,7 @@ import { MockImageResponse } from "./mock-image-model.mjs";
|
|
|
9
9
|
import { MockSpeechResponse } from "./mock-speech-model.mjs";
|
|
10
10
|
import { MockTranscriptionResponse } from "./mock-transcription-model.mjs";
|
|
11
11
|
|
|
12
|
-
//#region
|
|
12
|
+
//#region ../ai/src/mock/mock-config.type.d.ts
|
|
13
13
|
/**
|
|
14
14
|
* Configuration for a single mock model response.
|
|
15
15
|
* Responses are consumed in order — last one repeats if list is exhausted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-config.type.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-config.type.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-config.type.ts"],"mappings":";;;;;;;;;;;;;;;AAeA;KAAY,iBAAA;EACV,OAAA;EACA,YAAA,GAAe,YAAA;EACf,KAAA,GAAQ,KAAA;EACR,SAAA,GAAY,oBAAA,IAIJ;EAFR,KAAA,WAEa;EAAb,KAAA,GAAQ,KAAA;AAAA;AAAA,KAGE,aAAA;EARV,wEAUA,SAAA,GAAY,iBAAA,IATZ;EAWA,gBAAA;EATA;;;;AAEa;AAGf;EAWE,YAAA,GAAe,iBAAA;;;;;;EAMf,cAAA,GAAiB,iBAAA;EASD;;;;EAJhB,YAAA,GAAe,iBAAA,EApBf;EAsBA,eAAA,GAAkB,kBAAA,IApBlB;EAsBA,aAAA,GAAgB,kBAAA,EAfD;EAiBf,sBAAA,GAAyB,yBAAA,IAXR;EAajB,oBAAA,GAAuB,yBAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Usage } from "../contracts/result/usage.type.mjs";
|
|
2
2
|
import { GeneratedImage, ImageGenerationOptions, ImageGenerationResponse, ImageModelContract, ImageModelPricing } from "../contracts/image-model.contract.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/mock/mock-image-model.d.ts
|
|
5
5
|
/** One scripted response for a {@link MockImageModel}. */
|
|
6
6
|
type MockImageResponse = {
|
|
7
7
|
/** Images to return; defaults to a single 1×1 transparent PNG. */images?: GeneratedImage[]; /** Token usage to report; defaults to all-zero (per-image-metered). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-image-model.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-image-model.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-image-model.ts"],"mappings":";;;;;KAUY,iBAAA;EAAA,kEAEV,MAAA,GAAS,cAAA;EAET,KAAA,GAAQ,KAAA,EAAA;EAER,KAAA,GAAQ,KAAA,EAAK;EAEb,KAAA;AAAA;;KAIU,aAAA;EACV,MAAA;EACA,OAAA,EAAS,sBAAsB;AAAA;;;AAN1B;AAIP;;;;;;;;AAEiC;cAmBpB,cAAA,YAA0B,kBAAA;EAAA,SAOnB,IAAA;EAAA,iBACC,SAAA;EAAA,SACD,OAAA,GAAU,iBAAA;EAAA,SARZ,QAAA;EAAA,SACA,KAAA,EAAO,aAAA;EAAA,QAEf,SAAA;cAGU,IAAA,UACC,SAAA,EAAW,iBAAA,IACZ,OAAA,GAAU,iBAAA;EAGf,QAAA,CACX,MAAA,UACA,OAAA,GAAU,sBAAA,GACT,OAAA,CAAQ,uBAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../ai/src/mock/mock-image-model.ts
|
|
2
2
|
/** A 1×1 transparent PNG — the default mock image payload. */
|
|
3
3
|
const TRANSPARENT_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==";
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-image-model.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-image-model.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-image-model.ts"],"sourcesContent":["import type {\n GeneratedImage,\n ImageGenerationOptions,\n ImageGenerationResponse,\n ImageModelContract,\n ImageModelPricing,\n} from \"../contracts/image-model.contract\";\nimport type { Usage } from \"../contracts/result/usage.type\";\n\n/** One scripted response for a {@link MockImageModel}. */\nexport type MockImageResponse = {\n /** Images to return; defaults to a single 1×1 transparent PNG. */\n images?: GeneratedImage[];\n /** Token usage to report; defaults to all-zero (per-image-metered). */\n usage?: Usage;\n /** Throw this instead of returning — drives the never-throws/error path. */\n error?: Error;\n /** Simulate latency before resolving/rejecting (ms). */\n delay?: number;\n};\n\n/** One recorded `generate()` invocation, for test assertions. */\nexport type MockImageCall = {\n prompt: string;\n options: ImageGenerationOptions | undefined;\n};\n\n/** A 1×1 transparent PNG — the default mock image payload. */\nconst TRANSPARENT_PNG_BASE64 =\n \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==\";\n\n/**\n * Deterministic {@link ImageModelContract} double for tests — no HTTP.\n * Scripts responses in sequence (the last repeats once exhausted),\n * records every call, and can be primed with pricing to exercise the\n * cost rollup. Mirrors {@link MockModel} for the image path.\n *\n * @example\n * const model = new MockImageModel(\"mock-image\", [{ usage: { input: 0, output: 0, total: 0 } }], {\n * perImage: 0.04,\n * });\n * const { data, usage } = await ai.image({ model, prompt: \"a cat\" });\n */\nexport class MockImageModel implements ImageModelContract {\n public readonly provider = \"mock\";\n public readonly calls: MockImageCall[] = [];\n\n private callIndex = 0;\n\n public constructor(\n public readonly name: string,\n private readonly responses: MockImageResponse[],\n public readonly pricing?: ImageModelPricing,\n ) {}\n\n public async generate(\n prompt: string,\n options?: ImageGenerationOptions,\n ): Promise<ImageGenerationResponse> {\n this.calls.push({ prompt, options });\n\n const response = this.responses[Math.min(this.callIndex, this.responses.length - 1)] ?? {};\n this.callIndex += 1;\n\n if (response.delay) {\n await new Promise((resolve) => setTimeout(resolve, response.delay));\n }\n\n if (response.error) {\n throw response.error;\n }\n\n const count = options?.count ?? 1;\n const images: GeneratedImage[] =\n response.images ??\n Array.from({ length: count }, () => ({\n type: \"base64\" as const,\n base64: TRANSPARENT_PNG_BASE64,\n mediaType: \"image/png\",\n }));\n\n return {\n images,\n usage: response.usage ?? { input: 0, output: 0, total: 0 },\n };\n }\n}\n"],"mappings":";;AA4BA,MAAM,yBACJ;;;;;;;;;;;;;AAcF,IAAa,iBAAb,MAA0D;CAMxD,AAAO,YACL,AAAgB,MAChB,AAAiB,WACjB,AAAgB,SAChB;EAHgB;EACC;EACD;kBARS;eACc,CAAC;mBAEtB;CAMjB;CAEH,MAAa,SACX,QACA,SACkC;EAClC,KAAK,MAAM,KAAK;GAAE;GAAQ;EAAQ,CAAC;EAEnC,MAAM,WAAW,KAAK,UAAU,KAAK,IAAI,KAAK,WAAW,KAAK,UAAU,SAAS,CAAC,MAAM,CAAC;EACzF,KAAK,aAAa;EAElB,IAAI,SAAS,OACX,MAAM,IAAI,SAAS,YAAY,WAAW,SAAS,SAAS,KAAK,CAAC;EAGpE,IAAI,SAAS,OACX,MAAM,SAAS;EAGjB,MAAM,QAAQ,SAAS,SAAS;EAShC,OAAO;GACL,QARA,SAAS,UACT,MAAM,KAAK,EAAE,QAAQ,MAAM,UAAU;IACnC,MAAM;IACN,QAAQ;IACR,WAAW;GACb,EAAE;GAIF,OAAO,SAAS,SAAS;IAAE,OAAO;IAAG,QAAQ;IAAG,OAAO;GAAE;EAC3D;CACF;AACF"}
|
|
@@ -2,7 +2,7 @@ import { Message } from "../contracts/conversation-message.type.mjs";
|
|
|
2
2
|
import { ModelCallOptions, ModelCapabilities, ModelContract, ModelResponse, ModelStreamChunk } from "../contracts/model.contract.mjs";
|
|
3
3
|
import { MockModelResponse } from "./mock-config.type.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../ai/src/mock/mock-model.d.ts
|
|
6
6
|
type RecordedCall = {
|
|
7
7
|
messages: Message[];
|
|
8
8
|
options?: ModelCallOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-model.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-model.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-model.ts"],"mappings":";;;;;KAUK,YAAA;EACH,QAAA,EAAU,OAAA;EACV,OAAA,GAAU,gBAAgB;AAAA;;;;;;;;AAAA;AA+B5B;;;;;;;;;;;;;;;;;;;;cAAa,SAAA,YAAqB,aAAA;EAAA,SAQd,IAAA;EAAA,iBACC,SAAA;EAAA,SARH,QAAA;EAAA,SACA,YAAA,GAAe,iBAAA;EAAA,QAEvB,aAAA;EAAA,QACA,KAAA;cAGU,IAAA,UACC,SAAA,EAAW,iBAAA,IAC5B,YAAA,GAAe,iBAAA;EADa;;;;;EAAA,IAWnB,WAAA,IAAe,YAAA;EAQf;;;;EAAA,IAAA,SAAA;EA8CW;;;;;;EAAA,QApCd,YAAA;EA4DN;;;;;EAAA,QA/CM,aAAA;EA6FI;AAAA;;;;;EAtEC,QAAA,CAAS,QAAA,EAAU,OAAA,IAAW,OAAA,GAAU,gBAAA,GAAmB,OAAA,CAAQ,aAAA;;;;;;;;EAuBlE,MAAA,CACZ,QAAA,EAAU,OAAA,IACV,OAAA,GAAU,gBAAA,GACT,aAAA,CAAc,gBAAA;;;;;;EA4CV,KAAA;AAAA"}
|
package/esm/mock/mock-model.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-model.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-model.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-model.ts"],"sourcesContent":["import type { Message } from \"../contracts/conversation-message.type\";\nimport type {\n ModelCallOptions,\n ModelCapabilities,\n ModelContract,\n ModelResponse,\n ModelStreamChunk,\n} from \"../contracts/model.contract\";\nimport type { MockModelResponse } from \"./mock-config.type\";\n\ntype RecordedCall = {\n messages: Message[];\n options?: ModelCallOptions;\n};\n\n/**\n * Deterministic in-memory `ModelContract` implementation for tests.\n *\n * **Role.** Stands in for a real provider model so agent/workflow/supervisor\n * tests can assert behavior without hitting the network, spending tokens, or\n * depending on non-deterministic LLM output.\n *\n * **Responsibility.**\n * - Owns: a scripted queue of `MockModelResponse` entries, a call-history\n * log for assertions, and the index pointer that advances through the\n * queue on each `complete()` / `stream()` call.\n * - Does NOT own: any real inference, tokenization, or network I/O — when\n * the queue is exhausted, the final entry is reused so tests never crash\n * on accidental over-consumption.\n *\n * Every AI-related test in this repo uses `MockSDK` / `MockModel` — real\n * provider APIs are never hit from the test suite (see §6 of code-style.md).\n *\n * @example\n * const model = new MockModel(\"mock-gpt\", [\n * { content: \"Hello!\", finishReason: \"stop\" },\n * { content: \"Second turn.\", finishReason: \"stop\" },\n * ]);\n *\n * const first = await model.complete([{ role: \"user\", content: \"hi\" }]);\n * expect(first.content).toBe(\"Hello!\");\n * expect(model.callCount).toBe(1);\n */\nexport class MockModel implements ModelContract {\n public readonly provider = \"mock\";\n public readonly capabilities?: ModelCapabilities;\n\n private responseIndex = 0;\n private calls: RecordedCall[] = [];\n\n public constructor(\n public readonly name: string,\n private readonly responses: MockModelResponse[],\n capabilities?: ModelCapabilities,\n ) {\n this.capabilities = capabilities;\n }\n\n /**\n * Full history of calls made to this model. Each entry is the exact\n * `{ messages, options }` pair that was passed — useful for asserting\n * that an agent built the right prompt or forwarded the right tool list.\n */\n public get callHistory(): RecordedCall[] {\n return this.calls;\n }\n\n /**\n * Number of times `complete()` or `stream()` has been invoked. Convenient\n * shorthand for `callHistory.length` in assertions.\n */\n public get callCount(): number {\n return this.calls.length;\n }\n\n /**\n * Advance the scripted response queue by one and return the entry at the\n * current pointer. If the queue is exhausted, the final scripted entry is\n * returned repeatedly so over-consumption in tests produces predictable\n * output instead of `undefined`.\n */\n private nextResponse(): MockModelResponse {\n const response = this.responses[Math.min(this.responseIndex, this.responses.length - 1)];\n\n this.responseIndex++;\n\n return response ?? { content: \"Mock response\", finishReason: \"stop\" };\n }\n\n /**\n * Convert a scripted `MockModelResponse` into a full `ModelResponse` with\n * synthesized usage numbers when the script didn't supply them. Input\n * usage is a fixed estimate; output usage is derived from content length.\n */\n private buildResponse(mock: MockModelResponse): ModelResponse {\n const estimatedInput = 10;\n const estimatedOutput = Math.ceil(mock.content.length / 4);\n\n return {\n content: mock.content,\n finishReason: mock.finishReason ?? \"stop\",\n usage: {\n input: mock.usage?.input ?? estimatedInput,\n output: mock.usage?.output ?? estimatedOutput,\n total: (mock.usage?.input ?? estimatedInput) + (mock.usage?.output ?? estimatedOutput),\n ...(mock.usage?.cachedTokens !== undefined ? { cachedTokens: mock.usage.cachedTokens } : {}),\n },\n toolCalls: mock.toolCalls,\n };\n }\n\n /**\n * Record the call, optionally delay (to simulate latency), and either\n * throw the scripted error or return the scripted response. Mirrors the\n * real provider's `complete()` contract so agents cannot tell the\n * difference at runtime.\n */\n public async complete(messages: Message[], options?: ModelCallOptions): Promise<ModelResponse> {\n this.calls.push({ messages, options });\n\n const mock = this.nextResponse();\n\n if (mock.delay) {\n await new Promise((resolve) => setTimeout(resolve, mock.delay));\n }\n\n if (mock.error) {\n throw mock.error;\n }\n\n return this.buildResponse(mock);\n }\n\n /**\n * Record the call, optionally delay, then emit the scripted response as a\n * sequence of stream chunks: content split word-by-word as `delta`\n * chunks, each scripted tool call as a `tool-call` chunk, and finally a\n * `done` chunk with finish reason + usage. Throws eagerly if the scripted\n * entry carries an `error`.\n */\n public async *stream(\n messages: Message[],\n options?: ModelCallOptions,\n ): AsyncIterable<ModelStreamChunk> {\n this.calls.push({ messages, options });\n\n const mock = this.nextResponse();\n\n if (mock.delay) {\n await new Promise((resolve) => setTimeout(resolve, mock.delay));\n }\n\n if (mock.error) {\n throw mock.error;\n }\n\n const words = mock.content.split(\" \");\n\n for (const word of words) {\n yield { type: \"delta\", content: word + \" \" };\n }\n\n if (mock.toolCalls) {\n for (const toolCall of mock.toolCalls) {\n yield {\n type: \"tool-call\",\n id: toolCall.id,\n name: toolCall.name,\n input: toolCall.input,\n };\n }\n }\n\n const response = this.buildResponse(mock);\n\n yield {\n type: \"done\",\n finishReason: response.finishReason,\n usage: response.usage,\n };\n }\n\n /**\n * Reset call history and response pointer back to their initial state.\n * Intended for test-suite `beforeEach` hooks so a single `MockModel`\n * instance can be reused across cases without cross-test leakage.\n */\n public reset(): void {\n this.calls = [];\n this.responseIndex = 0;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAa,YAAb,MAAgD;CAO9C,AAAO,YACL,AAAgB,MAChB,AAAiB,WACjB,cACA;EAHgB;EACC;kBARQ;uBAGH;eACQ,CAAC;EAO/B,KAAK,eAAe;CACtB;;;;;;CAOA,IAAW,cAA8B;EACvC,OAAO,KAAK;CACd;;;;;CAMA,IAAW,YAAoB;EAC7B,OAAO,KAAK,MAAM;CACpB;;;;;;;CAQA,AAAQ,eAAkC;EACxC,MAAM,WAAW,KAAK,UAAU,KAAK,IAAI,KAAK,eAAe,KAAK,UAAU,SAAS,CAAC;EAEtF,KAAK;EAEL,OAAO,YAAY;GAAE,SAAS;GAAiB,cAAc;EAAO;CACtE;;;;;;CAOA,AAAQ,cAAc,MAAwC;EAC5D,MAAM,iBAAiB;EACvB,MAAM,kBAAkB,KAAK,KAAK,KAAK,QAAQ,SAAS,CAAC;EAEzD,OAAO;GACL,SAAS,KAAK;GACd,cAAc,KAAK,gBAAgB;GACnC,OAAO;IACL,OAAO,KAAK,OAAO,SAAS;IAC5B,QAAQ,KAAK,OAAO,UAAU;IAC9B,QAAQ,KAAK,OAAO,SAAS,mBAAmB,KAAK,OAAO,UAAU;IACtE,GAAI,KAAK,OAAO,iBAAiB,SAAY,EAAE,cAAc,KAAK,MAAM,aAAa,IAAI,CAAC;GAC5F;GACA,WAAW,KAAK;EAClB;CACF;;;;;;;CAQA,MAAa,SAAS,UAAqB,SAAoD;EAC7F,KAAK,MAAM,KAAK;GAAE;GAAU;EAAQ,CAAC;EAErC,MAAM,OAAO,KAAK,aAAa;EAE/B,IAAI,KAAK,OACP,MAAM,IAAI,SAAS,YAAY,WAAW,SAAS,KAAK,KAAK,CAAC;EAGhE,IAAI,KAAK,OACP,MAAM,KAAK;EAGb,OAAO,KAAK,cAAc,IAAI;CAChC;;;;;;;;CASA,OAAc,OACZ,UACA,SACiC;EACjC,KAAK,MAAM,KAAK;GAAE;GAAU;EAAQ,CAAC;EAErC,MAAM,OAAO,KAAK,aAAa;EAE/B,IAAI,KAAK,OACP,MAAM,IAAI,SAAS,YAAY,WAAW,SAAS,KAAK,KAAK,CAAC;EAGhE,IAAI,KAAK,OACP,MAAM,KAAK;EAGb,MAAM,QAAQ,KAAK,QAAQ,MAAM,GAAG;EAEpC,KAAK,MAAM,QAAQ,OACjB,MAAM;GAAE,MAAM;GAAS,SAAS,OAAO;EAAI;EAG7C,IAAI,KAAK,WACP,KAAK,MAAM,YAAY,KAAK,WAC1B,MAAM;GACJ,MAAM;GACN,IAAI,SAAS;GACb,MAAM,SAAS;GACf,OAAO,SAAS;EAClB;EAIJ,MAAM,WAAW,KAAK,cAAc,IAAI;EAExC,MAAM;GACJ,MAAM;GACN,cAAc,SAAS;GACvB,OAAO,SAAS;EAClB;CACF;;;;;;CAOA,AAAO,QAAc;EACnB,KAAK,QAAQ,CAAC;EACd,KAAK,gBAAgB;CACvB;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RouteContext } from "../contracts/supervisor/route-context.type.mjs";
|
|
2
2
|
import { Next } from "../contracts/supervisor/next.type.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/mock/mock-router.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* A canned routing decision for {@link mockRouter}. Either a literal
|
|
7
7
|
* {@link Next} value (intent key, fan-out array, or the `END`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-router.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-router.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-router.ts"],"mappings":";;;;;;AAWA;;;;;KAAY,kBAAA,UAA4B,MAAA,qBACpC,IAAA,KACE,OAAA,EAAS,YAAA,CAAa,MAAA,MAAY,IAAA;;;;;;;;;;;;;KAc5B,oBAAA;AAAZ;;;AAAA,KAKY,iBAAA;EALoB,wEAO9B,WAAA,GAAc,oBAAoB;AAAA;;;AAAA;AA+BpC;;;;;;;;;;;;;;;;;;;;;;;;AAG0C;iBAH1B,UAAA,UAAoB,MAAA,mBAClC,SAAA,EAAW,kBAAA,CAAmB,MAAA,KAC9B,OAAA,GAAS,iBAAA,IACP,OAAA,EAAS,YAAA,CAAa,MAAA,MAAY,IAAA"}
|
package/esm/mock/mock-router.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { END } from "../contracts/end.type.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../ai/src/mock/mock-router.ts
|
|
4
4
|
/**
|
|
5
5
|
* Build a deterministic `route` callback that replays a canned
|
|
6
6
|
* sequence of routing decisions — one per supervisor iteration — for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-router.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-router.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-router.ts"],"sourcesContent":["import { END } from \"../contracts/end.type\";\nimport type { Next } from \"../contracts/supervisor/next.type\";\nimport type { RouteContext } from \"../contracts/supervisor/route-context.type\";\n\n/**\n * A canned routing decision for {@link mockRouter}. Either a literal\n * {@link Next} value (intent key, fan-out array, or the `END`\n * sentinel) or a predicate that derives the decision from the live\n * {@link RouteContext} — the latter lets a test branch on accumulated\n * state without scripting an exact per-iteration sequence.\n */\nexport type MockRouterDecision<TState = Record<string, unknown>> =\n | Next\n | ((context: RouteContext<TState>) => Next);\n\n/**\n * Behavior when the canned decision queue is exhausted before the\n * supervisor terminates on its own.\n *\n * - `\"end\"` (default) — return `END`, terminating the run cleanly. The\n * common case: script the interesting turns, let the run stop.\n * - `\"throw\"` — throw, surfacing the over-run as a test failure. Use\n * when every iteration must be accounted for.\n * - `\"repeat\"` — replay the last decision for every further iteration.\n * Useful for \"keep routing to the same intent until evaluate is\n * satisfied\" scenarios.\n */\nexport type MockRouterExhaustion = \"end\" | \"throw\" | \"repeat\";\n\n/**\n * Options for {@link mockRouter}.\n */\nexport type MockRouterOptions = {\n /** What to do once the decision queue is exhausted. Default `\"end\"`. */\n onExhausted?: MockRouterExhaustion;\n};\n\n/**\n * Build a deterministic `route` callback that replays a canned\n * sequence of routing decisions — one per supervisor iteration — for\n * testing supervisors without an LLM router.\n *\n * Drop the returned callback into `ai.supervisor({ route: mockRouter([...]) })`\n * in place of an LLM `router`. The Nth iteration consumes the Nth\n * decision; a function decision is evaluated against the live\n * `RouteContext`. When the queue runs out, behavior follows\n * `options.onExhausted` (default: terminate with `END`).\n *\n * Pairs with the `toRouteTo` / `toConverge` matchers to assert the\n * resulting report tree.\n *\n * @example\n * const supervisor = ai.supervisor({\n * name: \"draft-then-review\",\n * intents: { writer, critic },\n * route: mockRouter([\"writer\", \"critic\", END]),\n * });\n *\n * @example\n * // Branch on accumulated state, repeat the last decision until done.\n * route: mockRouter(\n * [\"research\", (ctx) => (ctx.state.summary ? END : \"research\")],\n * { onExhausted: \"repeat\" },\n * );\n */\nexport function mockRouter<TState = Record<string, unknown>>(\n decisions: MockRouterDecision<TState>[],\n options: MockRouterOptions = {},\n): (context: RouteContext<TState>) => Next {\n const onExhausted = options.onExhausted ?? \"end\";\n let cursor = 0;\n\n return (context: RouteContext<TState>): Next => {\n if (cursor < decisions.length) {\n const decision = decisions[cursor];\n cursor++;\n\n return resolveDecision(decision, context);\n }\n\n if (onExhausted === \"throw\") {\n throw new Error(\n `mockRouter exhausted after ${decisions.length} decision(s) at iteration ${context.iteration}`,\n );\n }\n\n if (onExhausted === \"repeat\" && decisions.length > 0) {\n return resolveDecision(decisions[decisions.length - 1], context);\n }\n\n return END;\n };\n}\n\n/**\n * Resolve a single decision entry into a concrete {@link Next} —\n * invoking the predicate form against the live context, or returning\n * the literal form verbatim.\n */\nfunction resolveDecision<TState>(\n decision: MockRouterDecision<TState>,\n context: RouteContext<TState>,\n): Next {\n if (typeof decision === \"function\") {\n return decision(context);\n }\n\n return decision;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,SAAgB,WACd,WACA,UAA6B,CAAC,GACW;CACzC,MAAM,cAAc,QAAQ,eAAe;CAC3C,IAAI,SAAS;CAEb,QAAQ,YAAwC;EAC9C,IAAI,SAAS,UAAU,QAAQ;GAC7B,MAAM,WAAW,UAAU;GAC3B;GAEA,OAAO,gBAAgB,UAAU,OAAO;EAC1C;EAEA,IAAI,gBAAgB,SAClB,MAAM,IAAI,MACR,8BAA8B,UAAU,OAAO,4BAA4B,QAAQ,WACrF;EAGF,IAAI,gBAAgB,YAAY,UAAU,SAAS,GACjD,OAAO,gBAAgB,UAAU,UAAU,SAAS,IAAI,OAAO;EAGjE,OAAO;CACT;AACF;;;;;;AAOA,SAAS,gBACP,UACA,SACM;CACN,IAAI,OAAO,aAAa,YACtB,OAAO,SAAS,OAAO;CAGzB,OAAO;AACT"}
|
package/esm/mock/mock-sdk.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { MockTranscriptionModel } from "./mock-transcription-model.mjs";
|
|
|
5
5
|
import { MockSDKConfig } from "./mock-config.type.mjs";
|
|
6
6
|
import { MockModel } from "./mock-model.mjs";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../ai/src/mock/mock-sdk.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* Creates a mock SDK adapter for testing — no HTTP calls, fully configurable.
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-sdk.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-sdk.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-sdk.ts"],"mappings":";;;;;;;;;;AA4BA;;;;;;;;;;;;iBAAgB,OAAA,CAAQ,MAAA,GAAQ,aAAA,GAAqB,kBAAA;EAAA,8EAEnD,MAAA,EAAQ,SAAA,IAAA;EAER,WAAA,EAAa,cAAA,IAAA;EAEb,YAAA,EAAc,eAAA,IAAA;EAEd,mBAAA,EAAqB,sBAAA;AAAA"}
|
package/esm/mock/mock-sdk.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { MockModel } from "./mock-model.mjs";
|
|
|
4
4
|
import { MockSpeechModel } from "./mock-speech-model.mjs";
|
|
5
5
|
import { MockTranscriptionModel } from "./mock-transcription-model.mjs";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../ai/src/mock/mock-sdk.ts
|
|
8
8
|
/**
|
|
9
9
|
* Creates a mock SDK adapter for testing — no HTTP calls, fully configurable.
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-sdk.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-sdk.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-sdk.ts"],"sourcesContent":["import type { ImageModelConfig } from \"../contracts/image-model.contract\";\nimport type {\n ModelConfig,\n SDKAdapterContract,\n} from \"../contracts/sdk-adapter.contract\";\nimport type { SpeechModelConfig } from \"../contracts/speech-model.contract\";\nimport type { TranscriptionModelConfig } from \"../contracts/transcription-model.contract\";\nimport { approximateTokenCount } from \"../utils/token-count\";\nimport type { MockSDKConfig } from \"./mock-config.type\";\nimport { MockImageModel } from \"./mock-image-model\";\nimport { MockModel } from \"./mock-model\";\nimport { MockSpeechModel } from \"./mock-speech-model\";\nimport { MockTranscriptionModel } from \"./mock-transcription-model\";\n\n/**\n * Creates a mock SDK adapter for testing — no HTTP calls, fully configurable.\n *\n * @example\n * const mock = MockSDK({\n * responses: [\n * { content: \"Hello from mock!\" },\n * { content: \"Second response\" },\n * ],\n * });\n * const model = mock.model({ name: \"gpt-4o\" });\n * const result = await model.complete([{ role: \"user\", content: \"Hi\" }]);\n * console.log(result.content); // \"Hello from mock!\"\n */\nexport function MockSDK(config: MockSDKConfig = {}): SDKAdapterContract & {\n /** All model instances created by this SDK — for inspecting calls in tests */\n models: MockModel[];\n /** All image-model instances created by this SDK — for inspecting calls in tests */\n imageModels: MockImageModel[];\n /** All speech-model instances created by this SDK — for inspecting calls in tests */\n speechModels: MockSpeechModel[];\n /** All transcription-model instances created by this SDK — for inspecting calls in tests */\n transcriptionModels: MockTranscriptionModel[];\n} {\n const models: MockModel[] = [];\n const imageModels: MockImageModel[] = [];\n const speechModels: MockSpeechModel[] = [];\n const transcriptionModels: MockTranscriptionModel[] = [];\n const responses = config.responses ?? [{ content: \"Mock response\" }];\n const imageResponses = config.imageResponses ?? [{}];\n const speechResponses = config.speechResponses ?? [{}];\n const transcriptionResponses = config.transcriptionResponses ?? [{}];\n\n return {\n models,\n imageModels,\n speechModels,\n transcriptionModels,\n model(modelConfig: ModelConfig) {\n const model = new MockModel(\n modelConfig.name ?? config.defaultModelName ?? \"mock-model\",\n responses,\n config.capabilities,\n );\n models.push(model);\n return model;\n },\n image(imageConfig: ImageModelConfig) {\n const model = new MockImageModel(\n imageConfig.name ?? config.defaultModelName ?? \"mock-image-model\",\n imageResponses,\n imageConfig.pricing ?? config.imagePricing,\n );\n imageModels.push(model);\n return model;\n },\n speech(speechConfig: SpeechModelConfig) {\n const model = new MockSpeechModel(\n speechConfig.name ?? config.defaultModelName ?? \"mock-speech-model\",\n speechResponses,\n speechConfig.pricing ?? config.speechPricing,\n );\n speechModels.push(model);\n return model;\n },\n transcribe(transcribeConfig: TranscriptionModelConfig) {\n const model = new MockTranscriptionModel(\n transcribeConfig.name ?? config.defaultModelName ?? \"mock-transcription-model\",\n transcriptionResponses,\n transcribeConfig.pricing ?? config.transcriptionPricing,\n );\n transcriptionModels.push(model);\n return model;\n },\n async count(text: string, _model?: string): Promise<number> {\n return approximateTokenCount(text);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,QAAQ,SAAwB,CAAC,GAS/C;CACA,MAAM,SAAsB,CAAC;CAC7B,MAAM,cAAgC,CAAC;CACvC,MAAM,eAAkC,CAAC;CACzC,MAAM,sBAAgD,CAAC;CACvD,MAAM,YAAY,OAAO,aAAa,CAAC,EAAE,SAAS,gBAAgB,CAAC;CACnE,MAAM,iBAAiB,OAAO,kBAAkB,CAAC,CAAC,CAAC;CACnD,MAAM,kBAAkB,OAAO,mBAAmB,CAAC,CAAC,CAAC;CACrD,MAAM,yBAAyB,OAAO,0BAA0B,CAAC,CAAC,CAAC;CAEnE,OAAO;EACL;EACA;EACA;EACA;EACA,MAAM,aAA0B;GAC9B,MAAM,QAAQ,IAAI,UAChB,YAAY,QAAQ,OAAO,oBAAoB,cAC/C,WACA,OAAO,YACT;GACA,OAAO,KAAK,KAAK;GACjB,OAAO;EACT;EACA,MAAM,aAA+B;GACnC,MAAM,QAAQ,IAAI,eAChB,YAAY,QAAQ,OAAO,oBAAoB,oBAC/C,gBACA,YAAY,WAAW,OAAO,YAChC;GACA,YAAY,KAAK,KAAK;GACtB,OAAO;EACT;EACA,OAAO,cAAiC;GACtC,MAAM,QAAQ,IAAI,gBAChB,aAAa,QAAQ,OAAO,oBAAoB,qBAChD,iBACA,aAAa,WAAW,OAAO,aACjC;GACA,aAAa,KAAK,KAAK;GACvB,OAAO;EACT;EACA,WAAW,kBAA4C;GACrD,MAAM,QAAQ,IAAI,uBAChB,iBAAiB,QAAQ,OAAO,oBAAoB,4BACpD,wBACA,iBAAiB,WAAW,OAAO,oBACrC;GACA,oBAAoB,KAAK,KAAK;GAC9B,OAAO;EACT;EACA,MAAM,MAAM,MAAc,QAAkC;GAC1D,OAAO,sBAAsB,IAAI;EACnC;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Usage } from "../contracts/result/usage.type.mjs";
|
|
2
2
|
import { GeneratedAudio, SpeechGenerationResponse, SpeechModelContract, SpeechModelPricing, SpeechOptions } from "../contracts/speech-model.contract.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/mock/mock-speech-model.d.ts
|
|
5
5
|
/** One scripted response for a {@link MockSpeechModel}. */
|
|
6
6
|
type MockSpeechResponse = {
|
|
7
7
|
audio?: GeneratedAudio;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-speech-model.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-speech-model.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-speech-model.ts"],"mappings":";;;;;KAUY,kBAAA;EACV,KAAA,GAAQ,cAAA;EACR,KAAA,GAAQ,KAAA;EAER,UAAA;EACA,KAAA,GAAQ,KAAA;EACR,KAAA;AAAA;;KAIU,cAAA;EAAmB,IAAA;EAAc,OAAA,EAAS,aAAa;AAAA;;cAGtD,eAAA,YAA2B,mBAAA;EAAA,SAOpB,IAAA;EAAA,iBACC,SAAA;EAAA,SACD,OAAA,GAAU,kBAAA;EAAA,SARZ,QAAA;EAAA,SACA,KAAA,EAAO,cAAA;EAAA,QAEf,SAAA;cAGU,IAAA,UACC,SAAA,EAAW,kBAAA,IACZ,OAAA,GAAU,kBAAA;EAGf,QAAA,CAAS,IAAA,UAAc,OAAA,GAAU,aAAA,GAAgB,OAAA,CAAQ,wBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-speech-model.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-speech-model.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-speech-model.ts"],"sourcesContent":["import type {\n GeneratedAudio,\n SpeechGenerationResponse,\n SpeechModelContract,\n SpeechModelPricing,\n SpeechOptions,\n} from \"../contracts/speech-model.contract\";\nimport type { Usage } from \"../contracts/result/usage.type\";\n\n/** One scripted response for a {@link MockSpeechModel}. */\nexport type MockSpeechResponse = {\n audio?: GeneratedAudio;\n usage?: Usage;\n /** Characters synthesized; defaults to the input text length. */\n characters?: number;\n error?: Error;\n delay?: number;\n};\n\n/** One recorded `generate()` invocation, for test assertions. */\nexport type MockSpeechCall = { text: string; options: SpeechOptions | undefined };\n\n/** Deterministic {@link SpeechModelContract} double for tests — no HTTP. */\nexport class MockSpeechModel implements SpeechModelContract {\n public readonly provider = \"mock\";\n public readonly calls: MockSpeechCall[] = [];\n\n private callIndex = 0;\n\n public constructor(\n public readonly name: string,\n private readonly responses: MockSpeechResponse[],\n public readonly pricing?: SpeechModelPricing,\n ) {}\n\n public async generate(text: string, options?: SpeechOptions): Promise<SpeechGenerationResponse> {\n this.calls.push({ text, options });\n\n const response = this.responses[Math.min(this.callIndex, this.responses.length - 1)] ?? {};\n this.callIndex += 1;\n\n if (response.delay) {\n await new Promise((resolve) => setTimeout(resolve, response.delay));\n }\n if (response.error) {\n throw response.error;\n }\n\n return {\n audio: response.audio ?? { type: \"base64\", base64: \"AAAA\", mediaType: \"audio/mpeg\" },\n usage: response.usage ?? { input: 0, output: 0, total: 0 },\n characters: response.characters ?? text.length,\n };\n }\n}\n"],"mappings":";;AAuBA,IAAa,kBAAb,MAA4D;CAM1D,AAAO,YACL,AAAgB,MAChB,AAAiB,WACjB,AAAgB,SAChB;EAHgB;EACC;EACD;kBARS;eACe,CAAC;mBAEvB;CAMjB;CAEH,MAAa,SAAS,MAAc,SAA4D;EAC9F,KAAK,MAAM,KAAK;GAAE;GAAM;EAAQ,CAAC;EAEjC,MAAM,WAAW,KAAK,UAAU,KAAK,IAAI,KAAK,WAAW,KAAK,UAAU,SAAS,CAAC,MAAM,CAAC;EACzF,KAAK,aAAa;EAElB,IAAI,SAAS,OACX,MAAM,IAAI,SAAS,YAAY,WAAW,SAAS,SAAS,KAAK,CAAC;EAEpE,IAAI,SAAS,OACX,MAAM,SAAS;EAGjB,OAAO;GACL,OAAO,SAAS,SAAS;IAAE,MAAM;IAAU,QAAQ;IAAQ,WAAW;GAAa;GACnF,OAAO,SAAS,SAAS;IAAE,OAAO;IAAG,QAAQ;IAAG,OAAO;GAAE;GACzD,YAAY,SAAS,cAAc,KAAK;EAC1C;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Usage } from "../contracts/result/usage.type.mjs";
|
|
2
2
|
import { AudioInput, TranscribeOptions, TranscriptionModelContract, TranscriptionModelPricing, TranscriptionResponse, TranscriptionSegment } from "../contracts/transcription-model.contract.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/mock/mock-transcription-model.d.ts
|
|
5
5
|
/** One scripted response for a {@link MockTranscriptionModel}. */
|
|
6
6
|
type MockTranscriptionResponse = {
|
|
7
7
|
text?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-transcription-model.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-transcription-model.d.mts","names":[],"sources":["../../../../../../../ai/src/mock/mock-transcription-model.ts"],"mappings":";;;;;KAWY,yBAAA;EACV,IAAA;EACA,QAAA,GAAW,oBAAA;EACX,eAAA;EACA,KAAA,GAAQ,KAAA;EACR,KAAA,GAAQ,KAAA;EACR,KAAA;AAAA;;KAIU,qBAAA;EAA0B,KAAA,EAAO,UAAA;EAAY,OAAA,EAAS,iBAAiB;AAAA;;cAGtE,sBAAA,YAAkC,0BAAA;EAAA,SAO3B,IAAA;EAAA,iBACC,SAAA;EAAA,SACD,OAAA,GAAU,yBAAA;EAAA,SARZ,QAAA;EAAA,SACA,KAAA,EAAO,qBAAA;EAAA,QAEf,SAAA;cAGU,IAAA,UACC,SAAA,EAAW,yBAAA,IACZ,OAAA,GAAU,yBAAA;EAGf,UAAA,CACX,KAAA,EAAO,UAAA,EACP,OAAA,GAAU,iBAAA,GACT,OAAA,CAAQ,qBAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../ai/src/mock/mock-transcription-model.ts
|
|
2
2
|
/** Deterministic {@link TranscriptionModelContract} double for tests — no HTTP. */
|
|
3
3
|
var MockTranscriptionModel = class {
|
|
4
4
|
constructor(name, responses, pricing) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-transcription-model.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"mock-transcription-model.mjs","names":[],"sources":["../../../../../../../ai/src/mock/mock-transcription-model.ts"],"sourcesContent":["import type { Usage } from \"../contracts/result/usage.type\";\nimport type {\n AudioInput,\n TranscribeOptions,\n TranscriptionModelContract,\n TranscriptionModelPricing,\n TranscriptionResponse,\n TranscriptionSegment,\n} from \"../contracts/transcription-model.contract\";\n\n/** One scripted response for a {@link MockTranscriptionModel}. */\nexport type MockTranscriptionResponse = {\n text?: string;\n segments?: TranscriptionSegment[];\n durationSeconds?: number;\n usage?: Usage;\n error?: Error;\n delay?: number;\n};\n\n/** One recorded `transcribe()` invocation, for test assertions. */\nexport type MockTranscriptionCall = { audio: AudioInput; options: TranscribeOptions | undefined };\n\n/** Deterministic {@link TranscriptionModelContract} double for tests — no HTTP. */\nexport class MockTranscriptionModel implements TranscriptionModelContract {\n public readonly provider = \"mock\";\n public readonly calls: MockTranscriptionCall[] = [];\n\n private callIndex = 0;\n\n public constructor(\n public readonly name: string,\n private readonly responses: MockTranscriptionResponse[],\n public readonly pricing?: TranscriptionModelPricing,\n ) {}\n\n public async transcribe(\n audio: AudioInput,\n options?: TranscribeOptions,\n ): Promise<TranscriptionResponse> {\n this.calls.push({ audio, options });\n\n const response = this.responses[Math.min(this.callIndex, this.responses.length - 1)] ?? {};\n this.callIndex += 1;\n\n if (response.delay) {\n await new Promise((resolve) => setTimeout(resolve, response.delay));\n }\n if (response.error) {\n throw response.error;\n }\n\n return {\n text: response.text ?? \"mock transcript\",\n ...(response.segments ? { segments: response.segments } : {}),\n ...(response.durationSeconds !== undefined\n ? { durationSeconds: response.durationSeconds }\n : {}),\n usage: response.usage ?? { input: 0, output: 0, total: 0 },\n };\n }\n}\n"],"mappings":";;AAwBA,IAAa,yBAAb,MAA0E;CAMxE,AAAO,YACL,AAAgB,MAChB,AAAiB,WACjB,AAAgB,SAChB;EAHgB;EACC;EACD;kBARS;eACsB,CAAC;mBAE9B;CAMjB;CAEH,MAAa,WACX,OACA,SACgC;EAChC,KAAK,MAAM,KAAK;GAAE;GAAO;EAAQ,CAAC;EAElC,MAAM,WAAW,KAAK,UAAU,KAAK,IAAI,KAAK,WAAW,KAAK,UAAU,SAAS,CAAC,MAAM,CAAC;EACzF,KAAK,aAAa;EAElB,IAAI,SAAS,OACX,MAAM,IAAI,SAAS,YAAY,WAAW,SAAS,SAAS,KAAK,CAAC;EAEpE,IAAI,SAAS,OACX,MAAM,SAAS;EAGjB,OAAO;GACL,MAAM,SAAS,QAAQ;GACvB,GAAI,SAAS,WAAW,EAAE,UAAU,SAAS,SAAS,IAAI,CAAC;GAC3D,GAAI,SAAS,oBAAoB,SAC7B,EAAE,iBAAiB,SAAS,gBAAgB,IAC5C,CAAC;GACL,OAAO,SAAS,SAAS;IAAE,OAAO;IAAG,QAAQ;IAAG,OAAO;GAAE;EAC3D;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelContract } from "../contracts/model.contract.mjs";
|
|
2
2
|
import { FallbackModelContract, FallbackModelOptions } from "../contracts/fallback-model.contract.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/model/fallback-model.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* A `ModelContract` that wraps an ordered list of models and tries each
|
|
7
7
|
* in turn, advancing to the next only when the current one fails with a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback-model.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"fallback-model.d.mts","names":[],"sources":["../../../../../../../ai/src/model/fallback-model.ts"],"mappings":";;;;;;AAuEA;;;;;;;;;;;;;;AAGwB;;;;;;;;;;;;;;;;;;;;;iBAHR,aAAA,CACd,MAAA,EAAQ,aAAA,IACR,OAAA,GAAU,oBAAA,GACT,qBAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AIError } from "../errors/ai-error.mjs";
|
|
2
2
|
import { accumulateCost } from "../utils/compute-cost.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../ai/src/model/fallback-model.ts
|
|
5
5
|
/**
|
|
6
6
|
* Error codes treated as transient — and therefore worth falling over
|
|
7
7
|
* to the next model — when the caller does not supply an explicit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback-model.mjs","names":[],"sources":["../../../../../../../@warlock.js/ai/src/model/fallback-model.ts"],"sourcesContent":["import type {\n FallbackAttempt,\n FallbackModelContract,\n FallbackModelOptions,\n FallbackRetryPredicate,\n} from \"../contracts/fallback-model.contract\";\nimport type { Message } from \"../contracts/conversation-message.type\";\nimport type {\n ModelCallOptions,\n ModelCapabilities,\n ModelContract,\n ModelResponse,\n ModelStreamChunk,\n} from \"../contracts/model.contract\";\nimport type { Usage } from \"../contracts/result/usage.type\";\nimport { AIError } from \"../errors/ai-error\";\nimport type { AIErrorCode } from \"../errors/error-code.type\";\nimport { accumulateCost } from \"../utils/compute-cost\";\n\n/**\n * Error codes treated as transient — and therefore worth falling over\n * to the next model — when the caller does not supply an explicit\n * `retryOn`. Covers provider rate-limits, timeouts, and the generic\n * `PROVIDER_ERROR` catch-all that adapters throw for 5xx / unknown\n * network failures. Deliberately omits auth, invalid-request,\n * context-length, and content-filter: those fail identically on every\n * downstream model, so retrying only burns budget.\n */\nconst DEFAULT_RETRYABLE_CODES: readonly AIErrorCode[] = [\n \"PROVIDER_RATE_LIMIT\",\n \"PROVIDER_TIMEOUT\",\n \"PROVIDER_ERROR\",\n];\n\n/**\n * A `ModelContract` that wraps an ordered list of models and tries each\n * in turn, advancing to the next only when the current one fails with a\n * matching (transient) provider error.\n *\n * **Role.** A drop-in `ModelContract` for resilience: hand it to any\n * agent / workflow / supervisor in place of a single model and provider\n * outages, rate-limits, and timeouts transparently fail over to a\n * backup. Non-transient failures (bad key, oversized prompt, blocked\n * content) re-throw immediately rather than wastefully retrying.\n *\n * **What it owns / doesn't own.** Owns the ordered model list, the\n * retry decision, and per-call usage aggregation across attempted\n * models. Does NOT own retry/backoff timing (it advances instantly to\n * the next model — pair it with a backoff middleware if you want delay)\n * nor any provider I/O of its own; every call is delegated to a wrapped\n * model.\n *\n * **Streaming fall-over caveat.** `stream()` can only fail over while no\n * chunk has been emitted yet. Once the first `delta` / `tool-call`\n * reaches the consumer, the partial output cannot be un-sent, so a\n * mid-stream failure propagates instead of restarting on the next\n * model.\n *\n * @example\n * const model = fallbackModel([\n * ai.openai.model({ name: \"gpt-4o\" }),\n * ai.anthropic.model({ name: \"claude-3-5-sonnet\" }),\n * ]);\n * const agent = ai.agent({ model });\n *\n * @example\n * // custom retry predicate\n * const model = fallbackModel([primary, backup], {\n * retryOn: (error) => error instanceof ProviderError,\n * });\n */\nexport function fallbackModel(\n models: ModelContract[],\n options?: FallbackModelOptions,\n): FallbackModelContract {\n if (models.length === 0) {\n throw new AIError(\n \"PROVIDER_INVALID_REQUEST\",\n \"fallbackModel() requires at least one model in the chain.\",\n undefined,\n \"validation\",\n );\n }\n\n return new FallbackModel(models, resolveShouldRetry(options?.retryOn));\n}\n\n/**\n * Build the chain-advancement predicate from the caller's `retryOn`.\n * An array becomes a code membership test against an `AIError.code`; a\n * function is used verbatim; absence falls back to the transient\n * default set.\n */\nfunction resolveShouldRetry(\n retryOn: FallbackModelOptions[\"retryOn\"],\n): FallbackRetryPredicate {\n if (typeof retryOn === \"function\") {\n return retryOn;\n }\n\n const codes: readonly AIErrorCode[] = retryOn ?? DEFAULT_RETRYABLE_CODES;\n\n return (error: unknown): boolean => {\n return error instanceof AIError && codes.includes(error.code);\n };\n}\n\n/**\n * Add a successful call's usage into a running aggregate, mirroring the\n * agent's trip accumulation: scalar token counts sum, optional channels\n * sum only when present, and cost merges via `accumulateCost` so an\n * unpriced model never erases a priced sibling's cost.\n */\nfunction aggregateUsage(total: Usage, next: Usage): void {\n total.input += next.input;\n total.output += next.output;\n total.total += next.total;\n\n if (next.cachedTokens !== undefined) {\n total.cachedTokens = (total.cachedTokens ?? 0) + next.cachedTokens;\n }\n\n if (next.reasoningTokens !== undefined) {\n total.reasoningTokens = (total.reasoningTokens ?? 0) + next.reasoningTokens;\n }\n\n if (next.cacheWriteTokens !== undefined) {\n total.cacheWriteTokens = (total.cacheWriteTokens ?? 0) + next.cacheWriteTokens;\n }\n\n total.cost = accumulateCost(total.cost, next.cost);\n}\n\n/**\n * Internal `ModelContract` implementation backing {@link fallbackModel}.\n *\n * Long-lived (its identity, capabilities, and pricing front the primary\n * model for the wrapper's whole lifetime) so it is a class rather than a\n * closure. Per-call mutable state (the usage aggregate, the attempt log)\n * lives in {@link FallbackRun}, instantiated fresh on every\n * `complete()` / `stream()` so concurrent calls never share bookkeeping.\n */\nclass FallbackModel implements FallbackModelContract {\n public readonly name: string;\n public readonly provider: string;\n public readonly capabilities?: ModelCapabilities;\n public readonly pricing?: ModelContract[\"pricing\"];\n\n private latestAttempts: FallbackAttempt[] = [];\n\n public constructor(\n private readonly models: ModelContract[],\n private readonly shouldRetry: FallbackRetryPredicate,\n ) {\n const primary = models[0]!;\n\n this.name = primary.name;\n this.provider = primary.provider;\n this.capabilities = primary.capabilities;\n this.pricing = primary.pricing;\n }\n\n /**\n * Models that failed with a chain-advancing error during the most\n * recent `complete()` / `stream()` call, in attempt order. Empty when\n * the primary model succeeded outright. Overwritten on each call.\n */\n public get lastAttempts(): FallbackAttempt[] {\n return this.latestAttempts;\n }\n\n public async complete(\n messages: Message[],\n options?: ModelCallOptions,\n ): Promise<ModelResponse> {\n const run = new FallbackRun(this.models, this.shouldRetry);\n const response = await run.complete(messages, options);\n\n this.latestAttempts = run.attempts;\n\n return response;\n }\n\n public stream(\n messages: Message[],\n options?: ModelCallOptions,\n ): AsyncIterable<ModelStreamChunk> {\n const run = new FallbackRun(this.models, this.shouldRetry);\n\n return run.stream(messages, options, (attempts) => {\n this.latestAttempts = attempts;\n });\n }\n}\n\n/**\n * Per-call execution of the fallback chain. Holds the usage aggregate\n * and the attempt log for a single `complete()` / `stream()` invocation\n * so the long-lived {@link FallbackModel} stays free of shared mutable\n * state across concurrent calls.\n */\nclass FallbackRun {\n public readonly attempts: FallbackAttempt[] = [];\n\n private readonly usage: Usage = { input: 0, output: 0, total: 0 };\n\n public constructor(\n private readonly models: ModelContract[],\n private readonly shouldRetry: FallbackRetryPredicate,\n ) {}\n\n /**\n * Try each model's `complete()` in order. On a chain-advancing error,\n * record the attempt and move to the next; on the last model (or a\n * non-retryable error) re-throw the underlying error verbatim so the\n * caller still sees a typed `AIError` with its original code.\n */\n public async complete(\n messages: Message[],\n options?: ModelCallOptions,\n ): Promise<ModelResponse> {\n for (let index = 0; index < this.models.length; index++) {\n const model = this.models[index]!;\n const isLast = index === this.models.length - 1;\n\n try {\n const response = await model.complete(messages, options);\n\n aggregateUsage(this.usage, response.usage);\n\n return { ...response, usage: this.usage };\n } catch (error) {\n if (isLast || !this.shouldRetry(error)) {\n throw error;\n }\n\n this.recordAttempt(model, error);\n }\n }\n\n throw new AIError(\n \"PROVIDER_ERROR\",\n \"fallbackModel() exhausted its chain without producing a response.\",\n undefined,\n \"provider\",\n );\n }\n\n /**\n * Try each model's `stream()` in order. Fall-over is only attempted\n * while no chunk has been emitted yet for the current model — once the\n * consumer has seen a `delta` / `tool-call`, a mid-stream failure\n * propagates instead of restarting (partial output cannot be un-sent).\n * The aggregated usage replaces the `done` chunk's usage so the caller\n * sees the chain total.\n */\n public async *stream(\n messages: Message[],\n options: ModelCallOptions | undefined,\n onSettle: (attempts: FallbackAttempt[]) => void,\n ): AsyncIterable<ModelStreamChunk> {\n try {\n for (let index = 0; index < this.models.length; index++) {\n const model = this.models[index]!;\n const isLast = index === this.models.length - 1;\n let emitted = false;\n\n try {\n for await (const chunk of model.stream(messages, options)) {\n if (chunk.type === \"done\") {\n aggregateUsage(this.usage, chunk.usage);\n\n yield { ...chunk, usage: this.usage };\n return;\n }\n\n emitted = true;\n\n yield chunk;\n }\n\n return;\n } catch (error) {\n if (emitted || isLast || !this.shouldRetry(error)) {\n throw error;\n }\n\n this.recordAttempt(model, error);\n }\n }\n\n throw new AIError(\n \"PROVIDER_ERROR\",\n \"fallbackModel() exhausted its chain without producing a response.\",\n undefined,\n \"provider\",\n );\n } finally {\n onSettle(this.attempts);\n }\n }\n\n private recordAttempt(model: ModelContract, error: unknown): void {\n this.attempts.push({\n modelName: model.name,\n provider: model.provider,\n error,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,0BAAkD;CACtD;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgB,cACd,QACA,SACuB;CACvB,IAAI,OAAO,WAAW,GACpB,MAAM,IAAI,QACR,4BACA,6DACA,QACA,YACF;CAGF,OAAO,IAAI,cAAc,QAAQ,mBAAmB,SAAS,OAAO,CAAC;AACvE;;;;;;;AAQA,SAAS,mBACP,SACwB;CACxB,IAAI,OAAO,YAAY,YACrB,OAAO;CAGT,MAAM,QAAgC,WAAW;CAEjD,QAAQ,UAA4B;EAClC,OAAO,iBAAiB,WAAW,MAAM,SAAS,MAAM,IAAI;CAC9D;AACF;;;;;;;AAQA,SAAS,eAAe,OAAc,MAAmB;CACvD,MAAM,SAAS,KAAK;CACpB,MAAM,UAAU,KAAK;CACrB,MAAM,SAAS,KAAK;CAEpB,IAAI,KAAK,iBAAiB,QACxB,MAAM,gBAAgB,MAAM,gBAAgB,KAAK,KAAK;CAGxD,IAAI,KAAK,oBAAoB,QAC3B,MAAM,mBAAmB,MAAM,mBAAmB,KAAK,KAAK;CAG9D,IAAI,KAAK,qBAAqB,QAC5B,MAAM,oBAAoB,MAAM,oBAAoB,KAAK,KAAK;CAGhE,MAAM,OAAO,eAAe,MAAM,MAAM,KAAK,IAAI;AACnD;;;;;;;;;;AAWA,IAAM,gBAAN,MAAqD;CAQnD,AAAO,YACL,AAAiB,QACjB,AAAiB,aACjB;EAFiB;EACA;wBAJyB,CAAC;EAM3C,MAAM,UAAU,OAAO;EAEvB,KAAK,OAAO,QAAQ;EACpB,KAAK,WAAW,QAAQ;EACxB,KAAK,eAAe,QAAQ;EAC5B,KAAK,UAAU,QAAQ;CACzB;;;;;;CAOA,IAAW,eAAkC;EAC3C,OAAO,KAAK;CACd;CAEA,MAAa,SACX,UACA,SACwB;EACxB,MAAM,MAAM,IAAI,YAAY,KAAK,QAAQ,KAAK,WAAW;EACzD,MAAM,WAAW,MAAM,IAAI,SAAS,UAAU,OAAO;EAErD,KAAK,iBAAiB,IAAI;EAE1B,OAAO;CACT;CAEA,AAAO,OACL,UACA,SACiC;EAGjC,OAAO,IAFS,YAAY,KAAK,QAAQ,KAAK,WAErC,CAAC,CAAC,OAAO,UAAU,UAAU,aAAa;GACjD,KAAK,iBAAiB;EACxB,CAAC;CACH;AACF;;;;;;;AAQA,IAAM,cAAN,MAAkB;CAKhB,AAAO,YACL,AAAiB,QACjB,AAAiB,aACjB;EAFiB;EACA;kBAN2B,CAAC;eAEf;GAAE,OAAO;GAAG,QAAQ;GAAG,OAAO;EAAE;CAK7D;;;;;;;CAQH,MAAa,SACX,UACA,SACwB;EACxB,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,OAAO,QAAQ,SAAS;GACvD,MAAM,QAAQ,KAAK,OAAO;GAC1B,MAAM,SAAS,UAAU,KAAK,OAAO,SAAS;GAE9C,IAAI;IACF,MAAM,WAAW,MAAM,MAAM,SAAS,UAAU,OAAO;IAEvD,eAAe,KAAK,OAAO,SAAS,KAAK;IAEzC,OAAO;KAAE,GAAG;KAAU,OAAO,KAAK;IAAM;GAC1C,SAAS,OAAO;IACd,IAAI,UAAU,CAAC,KAAK,YAAY,KAAK,GACnC,MAAM;IAGR,KAAK,cAAc,OAAO,KAAK;GACjC;EACF;EAEA,MAAM,IAAI,QACR,kBACA,qEACA,QACA,UACF;CACF;;;;;;;;;CAUA,OAAc,OACZ,UACA,SACA,UACiC;EACjC,IAAI;GACF,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,OAAO,QAAQ,SAAS;IACvD,MAAM,QAAQ,KAAK,OAAO;IAC1B,MAAM,SAAS,UAAU,KAAK,OAAO,SAAS;IAC9C,IAAI,UAAU;IAEd,IAAI;KACF,WAAW,MAAM,SAAS,MAAM,OAAO,UAAU,OAAO,GAAG;MACzD,IAAI,MAAM,SAAS,QAAQ;OACzB,eAAe,KAAK,OAAO,MAAM,KAAK;OAEtC,MAAM;QAAE,GAAG;QAAO,OAAO,KAAK;OAAM;OACpC;MACF;MAEA,UAAU;MAEV,MAAM;KACR;KAEA;IACF,SAAS,OAAO;KACd,IAAI,WAAW,UAAU,CAAC,KAAK,YAAY,KAAK,GAC9C,MAAM;KAGR,KAAK,cAAc,OAAO,KAAK;IACjC;GACF;GAEA,MAAM,IAAI,QACR,kBACA,qEACA,QACA,UACF;EACF,UAAU;GACR,SAAS,KAAK,QAAQ;EACxB;CACF;CAEA,AAAQ,cAAc,OAAsB,OAAsB;EAChE,KAAK,SAAS,KAAK;GACjB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB;EACF,CAAC;CACH;AACF"}
|
|
1
|
+
{"version":3,"file":"fallback-model.mjs","names":[],"sources":["../../../../../../../ai/src/model/fallback-model.ts"],"sourcesContent":["import type {\n FallbackAttempt,\n FallbackModelContract,\n FallbackModelOptions,\n FallbackRetryPredicate,\n} from \"../contracts/fallback-model.contract\";\nimport type { Message } from \"../contracts/conversation-message.type\";\nimport type {\n ModelCallOptions,\n ModelCapabilities,\n ModelContract,\n ModelResponse,\n ModelStreamChunk,\n} from \"../contracts/model.contract\";\nimport type { Usage } from \"../contracts/result/usage.type\";\nimport { AIError } from \"../errors/ai-error\";\nimport type { AIErrorCode } from \"../errors/error-code.type\";\nimport { accumulateCost } from \"../utils/compute-cost\";\n\n/**\n * Error codes treated as transient — and therefore worth falling over\n * to the next model — when the caller does not supply an explicit\n * `retryOn`. Covers provider rate-limits, timeouts, and the generic\n * `PROVIDER_ERROR` catch-all that adapters throw for 5xx / unknown\n * network failures. Deliberately omits auth, invalid-request,\n * context-length, and content-filter: those fail identically on every\n * downstream model, so retrying only burns budget.\n */\nconst DEFAULT_RETRYABLE_CODES: readonly AIErrorCode[] = [\n \"PROVIDER_RATE_LIMIT\",\n \"PROVIDER_TIMEOUT\",\n \"PROVIDER_ERROR\",\n];\n\n/**\n * A `ModelContract` that wraps an ordered list of models and tries each\n * in turn, advancing to the next only when the current one fails with a\n * matching (transient) provider error.\n *\n * **Role.** A drop-in `ModelContract` for resilience: hand it to any\n * agent / workflow / supervisor in place of a single model and provider\n * outages, rate-limits, and timeouts transparently fail over to a\n * backup. Non-transient failures (bad key, oversized prompt, blocked\n * content) re-throw immediately rather than wastefully retrying.\n *\n * **What it owns / doesn't own.** Owns the ordered model list, the\n * retry decision, and per-call usage aggregation across attempted\n * models. Does NOT own retry/backoff timing (it advances instantly to\n * the next model — pair it with a backoff middleware if you want delay)\n * nor any provider I/O of its own; every call is delegated to a wrapped\n * model.\n *\n * **Streaming fall-over caveat.** `stream()` can only fail over while no\n * chunk has been emitted yet. Once the first `delta` / `tool-call`\n * reaches the consumer, the partial output cannot be un-sent, so a\n * mid-stream failure propagates instead of restarting on the next\n * model.\n *\n * @example\n * const model = fallbackModel([\n * ai.openai.model({ name: \"gpt-4o\" }),\n * ai.anthropic.model({ name: \"claude-3-5-sonnet\" }),\n * ]);\n * const agent = ai.agent({ model });\n *\n * @example\n * // custom retry predicate\n * const model = fallbackModel([primary, backup], {\n * retryOn: (error) => error instanceof ProviderError,\n * });\n */\nexport function fallbackModel(\n models: ModelContract[],\n options?: FallbackModelOptions,\n): FallbackModelContract {\n if (models.length === 0) {\n throw new AIError(\n \"PROVIDER_INVALID_REQUEST\",\n \"fallbackModel() requires at least one model in the chain.\",\n undefined,\n \"validation\",\n );\n }\n\n return new FallbackModel(models, resolveShouldRetry(options?.retryOn));\n}\n\n/**\n * Build the chain-advancement predicate from the caller's `retryOn`.\n * An array becomes a code membership test against an `AIError.code`; a\n * function is used verbatim; absence falls back to the transient\n * default set.\n */\nfunction resolveShouldRetry(\n retryOn: FallbackModelOptions[\"retryOn\"],\n): FallbackRetryPredicate {\n if (typeof retryOn === \"function\") {\n return retryOn;\n }\n\n const codes: readonly AIErrorCode[] = retryOn ?? DEFAULT_RETRYABLE_CODES;\n\n return (error: unknown): boolean => {\n return error instanceof AIError && codes.includes(error.code);\n };\n}\n\n/**\n * Add a successful call's usage into a running aggregate, mirroring the\n * agent's trip accumulation: scalar token counts sum, optional channels\n * sum only when present, and cost merges via `accumulateCost` so an\n * unpriced model never erases a priced sibling's cost.\n */\nfunction aggregateUsage(total: Usage, next: Usage): void {\n total.input += next.input;\n total.output += next.output;\n total.total += next.total;\n\n if (next.cachedTokens !== undefined) {\n total.cachedTokens = (total.cachedTokens ?? 0) + next.cachedTokens;\n }\n\n if (next.reasoningTokens !== undefined) {\n total.reasoningTokens = (total.reasoningTokens ?? 0) + next.reasoningTokens;\n }\n\n if (next.cacheWriteTokens !== undefined) {\n total.cacheWriteTokens = (total.cacheWriteTokens ?? 0) + next.cacheWriteTokens;\n }\n\n total.cost = accumulateCost(total.cost, next.cost);\n}\n\n/**\n * Internal `ModelContract` implementation backing {@link fallbackModel}.\n *\n * Long-lived (its identity, capabilities, and pricing front the primary\n * model for the wrapper's whole lifetime) so it is a class rather than a\n * closure. Per-call mutable state (the usage aggregate, the attempt log)\n * lives in {@link FallbackRun}, instantiated fresh on every\n * `complete()` / `stream()` so concurrent calls never share bookkeeping.\n */\nclass FallbackModel implements FallbackModelContract {\n public readonly name: string;\n public readonly provider: string;\n public readonly capabilities?: ModelCapabilities;\n public readonly pricing?: ModelContract[\"pricing\"];\n\n private latestAttempts: FallbackAttempt[] = [];\n\n public constructor(\n private readonly models: ModelContract[],\n private readonly shouldRetry: FallbackRetryPredicate,\n ) {\n const primary = models[0]!;\n\n this.name = primary.name;\n this.provider = primary.provider;\n this.capabilities = primary.capabilities;\n this.pricing = primary.pricing;\n }\n\n /**\n * Models that failed with a chain-advancing error during the most\n * recent `complete()` / `stream()` call, in attempt order. Empty when\n * the primary model succeeded outright. Overwritten on each call.\n */\n public get lastAttempts(): FallbackAttempt[] {\n return this.latestAttempts;\n }\n\n public async complete(\n messages: Message[],\n options?: ModelCallOptions,\n ): Promise<ModelResponse> {\n const run = new FallbackRun(this.models, this.shouldRetry);\n const response = await run.complete(messages, options);\n\n this.latestAttempts = run.attempts;\n\n return response;\n }\n\n public stream(\n messages: Message[],\n options?: ModelCallOptions,\n ): AsyncIterable<ModelStreamChunk> {\n const run = new FallbackRun(this.models, this.shouldRetry);\n\n return run.stream(messages, options, (attempts) => {\n this.latestAttempts = attempts;\n });\n }\n}\n\n/**\n * Per-call execution of the fallback chain. Holds the usage aggregate\n * and the attempt log for a single `complete()` / `stream()` invocation\n * so the long-lived {@link FallbackModel} stays free of shared mutable\n * state across concurrent calls.\n */\nclass FallbackRun {\n public readonly attempts: FallbackAttempt[] = [];\n\n private readonly usage: Usage = { input: 0, output: 0, total: 0 };\n\n public constructor(\n private readonly models: ModelContract[],\n private readonly shouldRetry: FallbackRetryPredicate,\n ) {}\n\n /**\n * Try each model's `complete()` in order. On a chain-advancing error,\n * record the attempt and move to the next; on the last model (or a\n * non-retryable error) re-throw the underlying error verbatim so the\n * caller still sees a typed `AIError` with its original code.\n */\n public async complete(\n messages: Message[],\n options?: ModelCallOptions,\n ): Promise<ModelResponse> {\n for (let index = 0; index < this.models.length; index++) {\n const model = this.models[index]!;\n const isLast = index === this.models.length - 1;\n\n try {\n const response = await model.complete(messages, options);\n\n aggregateUsage(this.usage, response.usage);\n\n return { ...response, usage: this.usage };\n } catch (error) {\n if (isLast || !this.shouldRetry(error)) {\n throw error;\n }\n\n this.recordAttempt(model, error);\n }\n }\n\n throw new AIError(\n \"PROVIDER_ERROR\",\n \"fallbackModel() exhausted its chain without producing a response.\",\n undefined,\n \"provider\",\n );\n }\n\n /**\n * Try each model's `stream()` in order. Fall-over is only attempted\n * while no chunk has been emitted yet for the current model — once the\n * consumer has seen a `delta` / `tool-call`, a mid-stream failure\n * propagates instead of restarting (partial output cannot be un-sent).\n * The aggregated usage replaces the `done` chunk's usage so the caller\n * sees the chain total.\n */\n public async *stream(\n messages: Message[],\n options: ModelCallOptions | undefined,\n onSettle: (attempts: FallbackAttempt[]) => void,\n ): AsyncIterable<ModelStreamChunk> {\n try {\n for (let index = 0; index < this.models.length; index++) {\n const model = this.models[index]!;\n const isLast = index === this.models.length - 1;\n let emitted = false;\n\n try {\n for await (const chunk of model.stream(messages, options)) {\n if (chunk.type === \"done\") {\n aggregateUsage(this.usage, chunk.usage);\n\n yield { ...chunk, usage: this.usage };\n return;\n }\n\n emitted = true;\n\n yield chunk;\n }\n\n return;\n } catch (error) {\n if (emitted || isLast || !this.shouldRetry(error)) {\n throw error;\n }\n\n this.recordAttempt(model, error);\n }\n }\n\n throw new AIError(\n \"PROVIDER_ERROR\",\n \"fallbackModel() exhausted its chain without producing a response.\",\n undefined,\n \"provider\",\n );\n } finally {\n onSettle(this.attempts);\n }\n }\n\n private recordAttempt(model: ModelContract, error: unknown): void {\n this.attempts.push({\n modelName: model.name,\n provider: model.provider,\n error,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,0BAAkD;CACtD;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgB,cACd,QACA,SACuB;CACvB,IAAI,OAAO,WAAW,GACpB,MAAM,IAAI,QACR,4BACA,6DACA,QACA,YACF;CAGF,OAAO,IAAI,cAAc,QAAQ,mBAAmB,SAAS,OAAO,CAAC;AACvE;;;;;;;AAQA,SAAS,mBACP,SACwB;CACxB,IAAI,OAAO,YAAY,YACrB,OAAO;CAGT,MAAM,QAAgC,WAAW;CAEjD,QAAQ,UAA4B;EAClC,OAAO,iBAAiB,WAAW,MAAM,SAAS,MAAM,IAAI;CAC9D;AACF;;;;;;;AAQA,SAAS,eAAe,OAAc,MAAmB;CACvD,MAAM,SAAS,KAAK;CACpB,MAAM,UAAU,KAAK;CACrB,MAAM,SAAS,KAAK;CAEpB,IAAI,KAAK,iBAAiB,QACxB,MAAM,gBAAgB,MAAM,gBAAgB,KAAK,KAAK;CAGxD,IAAI,KAAK,oBAAoB,QAC3B,MAAM,mBAAmB,MAAM,mBAAmB,KAAK,KAAK;CAG9D,IAAI,KAAK,qBAAqB,QAC5B,MAAM,oBAAoB,MAAM,oBAAoB,KAAK,KAAK;CAGhE,MAAM,OAAO,eAAe,MAAM,MAAM,KAAK,IAAI;AACnD;;;;;;;;;;AAWA,IAAM,gBAAN,MAAqD;CAQnD,AAAO,YACL,AAAiB,QACjB,AAAiB,aACjB;EAFiB;EACA;wBAJyB,CAAC;EAM3C,MAAM,UAAU,OAAO;EAEvB,KAAK,OAAO,QAAQ;EACpB,KAAK,WAAW,QAAQ;EACxB,KAAK,eAAe,QAAQ;EAC5B,KAAK,UAAU,QAAQ;CACzB;;;;;;CAOA,IAAW,eAAkC;EAC3C,OAAO,KAAK;CACd;CAEA,MAAa,SACX,UACA,SACwB;EACxB,MAAM,MAAM,IAAI,YAAY,KAAK,QAAQ,KAAK,WAAW;EACzD,MAAM,WAAW,MAAM,IAAI,SAAS,UAAU,OAAO;EAErD,KAAK,iBAAiB,IAAI;EAE1B,OAAO;CACT;CAEA,AAAO,OACL,UACA,SACiC;EAGjC,OAAO,IAFS,YAAY,KAAK,QAAQ,KAAK,WAErC,CAAC,CAAC,OAAO,UAAU,UAAU,aAAa;GACjD,KAAK,iBAAiB;EACxB,CAAC;CACH;AACF;;;;;;;AAQA,IAAM,cAAN,MAAkB;CAKhB,AAAO,YACL,AAAiB,QACjB,AAAiB,aACjB;EAFiB;EACA;kBAN2B,CAAC;eAEf;GAAE,OAAO;GAAG,QAAQ;GAAG,OAAO;EAAE;CAK7D;;;;;;;CAQH,MAAa,SACX,UACA,SACwB;EACxB,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,OAAO,QAAQ,SAAS;GACvD,MAAM,QAAQ,KAAK,OAAO;GAC1B,MAAM,SAAS,UAAU,KAAK,OAAO,SAAS;GAE9C,IAAI;IACF,MAAM,WAAW,MAAM,MAAM,SAAS,UAAU,OAAO;IAEvD,eAAe,KAAK,OAAO,SAAS,KAAK;IAEzC,OAAO;KAAE,GAAG;KAAU,OAAO,KAAK;IAAM;GAC1C,SAAS,OAAO;IACd,IAAI,UAAU,CAAC,KAAK,YAAY,KAAK,GACnC,MAAM;IAGR,KAAK,cAAc,OAAO,KAAK;GACjC;EACF;EAEA,MAAM,IAAI,QACR,kBACA,qEACA,QACA,UACF;CACF;;;;;;;;;CAUA,OAAc,OACZ,UACA,SACA,UACiC;EACjC,IAAI;GACF,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,OAAO,QAAQ,SAAS;IACvD,MAAM,QAAQ,KAAK,OAAO;IAC1B,MAAM,SAAS,UAAU,KAAK,OAAO,SAAS;IAC9C,IAAI,UAAU;IAEd,IAAI;KACF,WAAW,MAAM,SAAS,MAAM,OAAO,UAAU,OAAO,GAAG;MACzD,IAAI,MAAM,SAAS,QAAQ;OACzB,eAAe,KAAK,OAAO,MAAM,KAAK;OAEtC,MAAM;QAAE,GAAG;QAAO,OAAO,KAAK;OAAM;OACpC;MACF;MAEA,UAAU;MAEV,MAAM;KACR;KAEA;IACF,SAAS,OAAO;KACd,IAAI,WAAW,UAAU,CAAC,KAAK,YAAY,KAAK,GAC9C,MAAM;KAGR,KAAK,cAAc,OAAO,KAAK;IACjC;GACF;GAEA,MAAM,IAAI,QACR,kBACA,qEACA,QACA,UACF;EACF,UAAU;GACR,SAAS,KAAK,QAAQ;EACxB;CACF;CAEA,AAAQ,cAAc,OAAsB,OAAsB;EAChE,KAAK,SAAS,KAAK;GACjB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB;EACF,CAAC;CACH;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
2
2
|
var comma = ",".charCodeAt(0);
|
|
3
3
|
var semicolon = ";".charCodeAt(0);
|
|
4
4
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourcemap-codec.mjs","names":[],"sources":["../../../../../../../../../../@warlock.js/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs"],"sourcesContent":["// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";AACA,IAAI,QAAQ,IAAI,WAAW,CAAC;AAC5B,IAAI,YAAY,IAAI,WAAW,CAAC;AAChC,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,CAAC;CAC5B,UAAU,KAAK;CACf,UAAU,KAAK;AACjB;AAkBA,SAAS,cAAc,SAAS,KAAK,UAAU;CAC7C,IAAI,QAAQ,MAAM;CAClB,QAAQ,QAAQ,IAAI,CAAC,SAAS,IAAI,IAAI,SAAS;CAC/C,GAAG;EACD,IAAI,UAAU,QAAQ;EACtB,WAAW;EACX,IAAI,QAAQ,GAAG,WAAW;EAC1B,QAAQ,MAAM,UAAU,QAAQ;CAClC,SAAS,QAAQ;CACjB,OAAO;AACT;AAOA,IAAI,YAAY,OAAO;AACvB,IAAI,KAAK,OAAO,gBAAgB,8BAA8B,IAAI,YAAY,IAAI,OAAO,WAAW,cAAc,EAChH,OAAO,KAAK;CAEV,OADY,OAAO,KAAK,IAAI,QAAQ,IAAI,YAAY,IAAI,UAC/C,CAAC,CAAC,SAAS;AACtB,EACF,IAAI,EACF,OAAO,KAAK;CACV,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAC9B,OAAO,OAAO,aAAa,IAAI,EAAE;CAEnC,OAAO;AACT,EACF;AACA,IAAI,eAAe,MAAM;CACvB,cAAc;EACZ,KAAK,MAAM;EACX,KAAK,MAAM;EACX,KAAK,SAAS,IAAI,WAAW,SAAS;CACxC;CACA,MAAM,GAAG;EACP,MAAM,EAAE,WAAW;EACnB,OAAO,KAAK,SAAS;EACrB,IAAI,KAAK,QAAQ,WAAW;GAC1B,KAAK,OAAO,GAAG,OAAO,MAAM;GAC5B,KAAK,MAAM;EACb;CACF;CACA,QAAQ;EACN,MAAM,EAAE,QAAQ,KAAK,QAAQ;EAC7B,OAAO,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,SAAS,GAAG,GAAG,CAAC,IAAI;CAC9D;AACF;AAuTA,SAAS,OAAO,SAAS;CACvB,MAAM,SAAS,IAAI,aAAa;CAChC,IAAI,eAAe;CACnB,IAAI,aAAa;CACjB,IAAI,eAAe;CACnB,IAAI,aAAa;CACjB,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,OAAO,QAAQ;EACrB,IAAI,IAAI,GAAG,OAAO,MAAM,SAAS;EACjC,IAAI,KAAK,WAAW,GAAG;EACvB,IAAI,YAAY;EAChB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;GACpC,MAAM,UAAU,KAAK;GACrB,IAAI,IAAI,GAAG,OAAO,MAAM,KAAK;GAC7B,YAAY,cAAc,QAAQ,QAAQ,IAAI,SAAS;GACvD,IAAI,QAAQ,WAAW,GAAG;GAC1B,eAAe,cAAc,QAAQ,QAAQ,IAAI,YAAY;GAC7D,aAAa,cAAc,QAAQ,QAAQ,IAAI,UAAU;GACzD,eAAe,cAAc,QAAQ,QAAQ,IAAI,YAAY;GAC7D,IAAI,QAAQ,WAAW,GAAG;GAC1B,aAAa,cAAc,QAAQ,QAAQ,IAAI,UAAU;EAC3D;CACF;CACA,OAAO,OAAO,MAAM;AACtB"}
|
|
1
|
+
{"version":3,"file":"sourcemap-codec.mjs","names":[],"sources":["../../../../../../../../../../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs"],"sourcesContent":["// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";AACA,IAAI,QAAQ,IAAI,WAAW,CAAC;AAC5B,IAAI,YAAY,IAAI,WAAW,CAAC;AAChC,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,CAAC;CAC5B,UAAU,KAAK;CACf,UAAU,KAAK;AACjB;AAkBA,SAAS,cAAc,SAAS,KAAK,UAAU;CAC7C,IAAI,QAAQ,MAAM;CAClB,QAAQ,QAAQ,IAAI,CAAC,SAAS,IAAI,IAAI,SAAS;CAC/C,GAAG;EACD,IAAI,UAAU,QAAQ;EACtB,WAAW;EACX,IAAI,QAAQ,GAAG,WAAW;EAC1B,QAAQ,MAAM,UAAU,QAAQ;CAClC,SAAS,QAAQ;CACjB,OAAO;AACT;AAOA,IAAI,YAAY,OAAO;AACvB,IAAI,KAAK,OAAO,gBAAgB,8BAA8B,IAAI,YAAY,IAAI,OAAO,WAAW,cAAc,EAChH,OAAO,KAAK;CAEV,OADY,OAAO,KAAK,IAAI,QAAQ,IAAI,YAAY,IAAI,UAC/C,CAAC,CAAC,SAAS;AACtB,EACF,IAAI,EACF,OAAO,KAAK;CACV,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAC9B,OAAO,OAAO,aAAa,IAAI,EAAE;CAEnC,OAAO;AACT,EACF;AACA,IAAI,eAAe,MAAM;CACvB,cAAc;EACZ,KAAK,MAAM;EACX,KAAK,MAAM;EACX,KAAK,SAAS,IAAI,WAAW,SAAS;CACxC;CACA,MAAM,GAAG;EACP,MAAM,EAAE,WAAW;EACnB,OAAO,KAAK,SAAS;EACrB,IAAI,KAAK,QAAQ,WAAW;GAC1B,KAAK,OAAO,GAAG,OAAO,MAAM;GAC5B,KAAK,MAAM;EACb;CACF;CACA,QAAQ;EACN,MAAM,EAAE,QAAQ,KAAK,QAAQ;EAC7B,OAAO,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,SAAS,GAAG,GAAG,CAAC,IAAI;CAC9D;AACF;AAuTA,SAAS,OAAO,SAAS;CACvB,MAAM,SAAS,IAAI,aAAa;CAChC,IAAI,eAAe;CACnB,IAAI,aAAa;CACjB,IAAI,eAAe;CACnB,IAAI,aAAa;CACjB,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,OAAO,QAAQ;EACrB,IAAI,IAAI,GAAG,OAAO,MAAM,SAAS;EACjC,IAAI,KAAK,WAAW,GAAG;EACvB,IAAI,YAAY;EAChB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;GACpC,MAAM,UAAU,KAAK;GACrB,IAAI,IAAI,GAAG,OAAO,MAAM,KAAK;GAC7B,YAAY,cAAc,QAAQ,QAAQ,IAAI,SAAS;GACvD,IAAI,QAAQ,WAAW,GAAG;GAC1B,eAAe,cAAc,QAAQ,QAAQ,IAAI,YAAY;GAC7D,aAAa,cAAc,QAAQ,QAAQ,IAAI,UAAU;GACzD,eAAe,cAAc,QAAQ,QAAQ,IAAI,YAAY;GAC7D,IAAI,QAAQ,WAAW,GAAG;GAC1B,aAAa,cAAc,QAAQ,QAAQ,IAAI,UAAU;EAC3D;CACF;CACA,OAAO,OAAO,MAAM;AACtB"}
|
|
@@ -6,7 +6,7 @@ import { processError } from "../../utils/dist/error.mjs";
|
|
|
6
6
|
import { isMockFunction } from "../../spy/dist/index.mjs";
|
|
7
7
|
import { use, utils_exports } from "../../../chai/index.mjs";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../node_modules/@vitest/expect/dist/index.js
|
|
10
10
|
const ChaiStyleAssertions = (chai, utils) => {
|
|
11
11
|
function defProperty(name, delegateTo) {
|
|
12
12
|
utils.addProperty(chai.Assertion.prototype, name, function() {
|