@warlock.js/ai 4.8.1 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/cjs/index.cjs +24451 -244
- package/cjs/index.cjs.map +1 -0
- 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/index.d.mts +2 -1
- package/esm/index.mjs +2 -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/index.d.mts +2 -1
- package/esm/prompts/index.mjs +1 -0
- 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 +44 -0
- package/esm/prompts/prompts-validate.d.mts.map +1 -0
- 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 +8 -2
- 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 +2 -2
- 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 +5 -3
- 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
- package/cjs/src-5ze7nVpa.cjs +0 -25626
- package/cjs/src-5ze7nVpa.cjs.map +0 -1
- package/cjs/src-DTQ4KgBu.cjs +0 -30
- package/esm/ai-openai/src/embedder.mjs +0 -4
- package/esm/ai-openai/src/image.mjs +0 -5
- package/esm/ai-openai/src/index.mjs +0 -7
- package/esm/ai-openai/src/model.mjs +0 -5
- package/esm/ai-openai/src/sdk.mjs +0 -9
- package/esm/ai-openai/src/speech.mjs +0 -5
- package/esm/ai-openai/src/transcription.mjs +0 -6
- package/esm/ai-openai/src/utils/index.mjs +0 -5
- package/esm/ai-openai/src/utils/to-openai-messages.mjs +0 -3
- package/esm/ai-openai/src/utils/to-openai-tools.mjs +0 -3
- package/esm/ai-openai/src/utils/wrap-openai-error.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"for-tool.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"for-tool.mjs","names":[],"sources":["../../../../../../../../ai/src/middleware/helpers/for-tool.ts"],"sourcesContent":["import type { AgentMiddleware } from \"../../contracts/middleware\";\n\n/**\n * Scope a middleware's `tool`-level hooks to only fire for a\n * specific tool name (or a set of names). `execute` and `trip`\n * hooks pass through unchanged.\n *\n * **Role.** Tool-specific concerns — \"rate-limit `search_web`\",\n * \"cache results for `fetch_faq`\" — are common. Rather than adding\n * a `middleware` field to `ai.tool()` (see decisions §27), the\n * framework keeps one contract (`AgentMiddleware`) and offers this\n * helper for the locality problem. The middleware body stays agnostic\n * of the tool name; `forTool` handles the filtering.\n *\n * **What gets filtered.** Only `tool.before` / `tool.after` /\n * `tool.onError`. Each hook is wrapped so that `ctx.tool.name`\n * must be in the allowed set or the wrapped hook is a no-op.\n * `execute` and `trip` hooks are NOT touched — they run normally.\n *\n * **Why not filter execute/trip too?** Because a middleware that\n * reaches across levels (a tool-specific budget that initializes a\n * counter in `execute.before` and checks it in `tool.before`) still\n * needs `execute.before` to fire unconditionally. Scoping all hooks\n * would break cross-level middleware; scoping only `tool` hooks\n * matches the mental model of \"this middleware cares about these\n * tools.\"\n *\n * **Single-name vs multi-name.** A string matches one tool; a string\n * array matches any of the listed tools. No wildcards, no regex —\n * keep it boring.\n *\n * @example\n * // Single tool\n * const scoped = ai.middleware.forTool(\n * \"search_web\",\n * toolRateLimit({ maxCalls: 3 }),\n * );\n *\n * @example\n * // Multiple tools sharing a rule\n * const scoped = ai.middleware.forTool(\n * [\"paid_api\", \"expensive_db\"],\n * toolRateLimit({ maxCalls: 5 }),\n * );\n *\n * ai.agent({\n * model,\n * tools: [webTool, paidApiTool, expensiveDbTool],\n * middleware: [scoped],\n * });\n */\nexport function forTool(\n toolNames: string | ReadonlyArray<string>,\n middleware: AgentMiddleware,\n): AgentMiddleware {\n const allowed = new Set(\n typeof toolNames === \"string\" ? [toolNames] : toolNames,\n );\n const scope =\n allowed.size === 1 ? Array.from(allowed)[0] : Array.from(allowed).join(\"+\");\n\n if (!middleware.tool) {\n return middleware;\n }\n\n const innerBefore = middleware.tool.before;\n const innerAfter = middleware.tool.after;\n const innerOnError = middleware.tool.onError;\n\n return {\n ...middleware,\n name: `${middleware.name}[for:${scope}]`,\n tool: {\n before: innerBefore\n ? async ctx => {\n if (!allowed.has(ctx.tool.name)) {\n return;\n }\n\n return innerBefore(ctx);\n }\n : undefined,\n after: innerAfter\n ? async (ctx, result) => {\n if (!allowed.has(ctx.tool.name)) {\n return;\n }\n\n return innerAfter(ctx, result);\n }\n : undefined,\n onError: innerOnError\n ? async (ctx, error) => {\n if (!allowed.has(ctx.tool.name)) {\n return;\n }\n\n return innerOnError(ctx, error);\n }\n : undefined,\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAgB,QACd,WACA,YACiB;CACjB,MAAM,UAAU,IAAI,IAClB,OAAO,cAAc,WAAW,CAAC,SAAS,IAAI,SAChD;CACA,MAAM,QACJ,QAAQ,SAAS,IAAI,MAAM,KAAK,OAAO,CAAC,CAAC,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC,KAAK,GAAG;CAE5E,IAAI,CAAC,WAAW,MACd,OAAO;CAGT,MAAM,cAAc,WAAW,KAAK;CACpC,MAAM,aAAa,WAAW,KAAK;CACnC,MAAM,eAAe,WAAW,KAAK;CAErC,OAAO;EACL,GAAG;EACH,MAAM,GAAG,WAAW,KAAK,OAAO,MAAM;EACtC,MAAM;GACJ,QAAQ,cACJ,OAAM,QAAO;IACX,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,GAC5B;IAGF,OAAO,YAAY,GAAG;GACxB,IACA;GACJ,OAAO,aACH,OAAO,KAAK,WAAW;IACrB,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,GAC5B;IAGF,OAAO,WAAW,KAAK,MAAM;GAC/B,IACA;GACJ,SAAS,eACL,OAAO,KAAK,UAAU;IACpB,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,GAC5B;IAGF,OAAO,aAAa,KAAK,KAAK;GAChC,IACA;EACN;CACF;AACF"}
|
|
@@ -2,7 +2,7 @@ import { MiddlewareExecuteContext, MiddlewareSupervisorContext, MiddlewareToolCo
|
|
|
2
2
|
import { AgentMiddleware } from "../contracts/middleware/middleware.contract.mjs";
|
|
3
3
|
import { Logger } from "@warlock.js/logger";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../ai/src/middleware/pipeline.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* The four levels at which middleware can hook — mirrors
|
|
8
8
|
* `AgentMiddleware`'s optional `execute` / `trip` / `tool` /
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"pipeline.d.mts","names":[],"sources":["../../../../../../../ai/src/middleware/pipeline.ts"],"mappings":";;;;;;;;;AAmBA;;;;KAAY,eAAA;AAOZ;;;;;AAAA,KAAY,wBAAA;EACV,OAAA,EAAS,wBAAA;EACT,IAAA,EAAM,qBAAA;EACN,IAAA,EAAM,qBAAA;EACN,UAAA,EAAY,2BAAA;AAAA;;;;;;;;AAA2B;AA+CzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMkB;iBANI,WAAA,eAA0B,eAAA,WAC9C,WAAA,EAAa,aAAA,CAAc,eAAA,GAC3B,KAAA,EAAO,KAAA,EACP,OAAA,EAAS,wBAAA,CAAyB,KAAA,GAClC,KAAA,QAAa,OAAA,CAAQ,OAAA,GACrB,MAAA,GAAS,MAAA,GACR,OAAA,CAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"pipeline.mjs","names":[],"sources":["../../../../../../../ai/src/middleware/pipeline.ts"],"sourcesContent":["import type { Logger } from \"@warlock.js/logger\";\nimport type {\n AgentMiddleware,\n MiddlewareExecuteContext,\n MiddlewareSupervisorContext,\n MiddlewareToolContext,\n MiddlewareTripContext,\n} from \"../contracts/middleware\";\n\nconst LOG_MODULE = \"ai.middleware\";\n\n/**\n * The four levels at which middleware can hook — mirrors\n * `AgentMiddleware`'s optional `execute` / `trip` / `tool` /\n * `supervisor` keys. Kept as a single named union so callers can pass\n * it around without inline-duplicating the literals. The first three\n * fire on the agent pipeline; `supervisor` fires once around a whole\n * `supervisor.execute()` run.\n */\nexport type MiddlewareLevel = \"execute\" | \"trip\" | \"tool\" | \"supervisor\";\n\n/**\n * Shape of the context object for each level. The pipeline is\n * level-parameterized on the ctx type via this mapping so callers\n * get compile-time narrowing when they instantiate `runPipeline`.\n */\nexport type MiddlewareContextByLevel = {\n execute: MiddlewareExecuteContext;\n trip: MiddlewareTripContext;\n tool: MiddlewareToolContext;\n supervisor: MiddlewareSupervisorContext;\n};\n\n/**\n * Run an inner async operation through a stack of agent middlewares\n * at a single level, applying the onion-model before/after/onError\n * semantics documented on `AgentMiddleware`.\n *\n * **Semantics.**\n * - `before` hooks run in registration order (top-down).\n * Returning a defined value from a `before` hook short-circuits the\n * pipeline with that value as the result, skipping `inner()` and\n * all deeper `before` / `after` hooks — but outer middleware\n * `after` hooks (registered earlier) still run on the synthetic\n * value.\n * - `after` hooks run in reverse registration order (bottom-up).\n * Returning a defined value replaces the result before it\n * propagates further out. Returning `void` / `undefined` keeps the\n * existing result.\n * - `onError` hooks also run in reverse (bottom-up) — any error\n * thrown by `inner()`, by a `before` hook, or by an `after` hook\n * unwinds through each frame's `onError` in turn. Returning a\n * defined value from `onError` recovers: the error is cleared and\n * the returned value becomes the new result (which then flows\n * through outer `after` hooks). Returning `void` propagates the\n * error to the next outer frame.\n *\n * **Implementation.** Built by folding the middleware array from the\n * end inward: each middleware produces a closure that wraps the\n * previous closure (the deeper pipeline). The outermost wrap is\n * middleware index 0 — so registration order matches onion order\n * without any reverse iteration at call time.\n *\n * **No magic.** The pipeline does not swallow, retry, or translate\n * errors. Hooks that throw propagate unchanged (subject to `onError`\n * recovery). Pipeline-level logging is debug-only and respects each\n * middleware's `log: false` kill-switch.\n *\n * @example\n * const response = await runPipeline(\n * middlewares,\n * \"trip\",\n * tripContext,\n * () => model.complete(messages, callOptions),\n * logger,\n * );\n */\nexport async function runPipeline<Level extends MiddlewareLevel, TResult>(\n middlewares: ReadonlyArray<AgentMiddleware>,\n level: Level,\n context: MiddlewareContextByLevel[Level],\n inner: () => Promise<TResult>,\n logger?: Logger,\n): Promise<TResult> {\n if (middlewares.length === 0) {\n return inner();\n }\n\n let next: () => Promise<TResult> = inner;\n\n for (let index = middlewares.length - 1; index >= 0; index--) {\n const middleware = middlewares[index];\n const hooks = middleware[level];\n\n if (!hooks) {\n continue;\n }\n\n const previous = next;\n\n next = async () => {\n const logEnabled = middleware.log !== false && logger !== undefined;\n\n if (hooks.before) {\n if (logEnabled) {\n logger!.debug(LOG_MODULE, `${level}.before`, middleware.name, {\n middleware: middleware.name,\n level,\n });\n }\n\n const shortCircuit = await (\n hooks.before as (ctx: unknown) => Promise<unknown> | unknown\n )(context);\n\n if (shortCircuit !== undefined) {\n if (logEnabled) {\n logger!.debug(\n LOG_MODULE,\n `${level}.short-circuit`,\n middleware.name,\n {\n middleware: middleware.name,\n level,\n },\n );\n }\n\n return shortCircuit as TResult;\n }\n }\n\n let result: TResult;\n\n try {\n result = await previous();\n } catch (thrown) {\n if (!hooks.onError) {\n throw thrown;\n }\n\n const recovered = await (\n hooks.onError as (\n ctx: unknown,\n error: unknown,\n ) => Promise<unknown> | unknown\n )(context, thrown);\n\n if (recovered === undefined) {\n throw thrown;\n }\n\n if (logEnabled) {\n logger!.debug(LOG_MODULE, `${level}.recovered`, middleware.name, {\n middleware: middleware.name,\n level,\n });\n }\n\n result = recovered as TResult;\n }\n\n if (hooks.after) {\n const replacement = await (\n hooks.after as (\n ctx: unknown,\n value: unknown,\n ) => Promise<unknown> | unknown\n )(context, result);\n\n if (replacement !== undefined) {\n result = replacement as TResult;\n }\n\n if (logEnabled) {\n logger!.debug(LOG_MODULE, `${level}.after`, middleware.name, {\n middleware: middleware.name,\n level,\n });\n }\n }\n\n return result;\n };\n }\n\n return next();\n}\n"],"mappings":";AASA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEnB,eAAsB,YACpB,aACA,OACA,SACA,OACA,QACkB;CAClB,IAAI,YAAY,WAAW,GACzB,OAAO,MAAM;CAGf,IAAI,OAA+B;CAEnC,KAAK,IAAI,QAAQ,YAAY,SAAS,GAAG,SAAS,GAAG,SAAS;EAC5D,MAAM,aAAa,YAAY;EAC/B,MAAM,QAAQ,WAAW;EAEzB,IAAI,CAAC,OACH;EAGF,MAAM,WAAW;EAEjB,OAAO,YAAY;GACjB,MAAM,aAAa,WAAW,QAAQ,SAAS,WAAW;GAE1D,IAAI,MAAM,QAAQ;IAChB,IAAI,YACF,OAAQ,MAAM,YAAY,GAAG,MAAM,UAAU,WAAW,MAAM;KAC5D,YAAY,WAAW;KACvB;IACF,CAAC;IAGH,MAAM,eAAe,MACnB,MAAM,OACN,OAAO;IAET,IAAI,iBAAiB,QAAW;KAC9B,IAAI,YACF,OAAQ,MACN,YACA,GAAG,MAAM,iBACT,WAAW,MACX;MACE,YAAY,WAAW;MACvB;KACF,CACF;KAGF,OAAO;IACT;GACF;GAEA,IAAI;GAEJ,IAAI;IACF,SAAS,MAAM,SAAS;GAC1B,SAAS,QAAQ;IACf,IAAI,CAAC,MAAM,SACT,MAAM;IAGR,MAAM,YAAY,MAChB,MAAM,QAIN,SAAS,MAAM;IAEjB,IAAI,cAAc,QAChB,MAAM;IAGR,IAAI,YACF,OAAQ,MAAM,YAAY,GAAG,MAAM,aAAa,WAAW,MAAM;KAC/D,YAAY,WAAW;KACvB;IACF,CAAC;IAGH,SAAS;GACX;GAEA,IAAI,MAAM,OAAO;IACf,MAAM,cAAc,MAClB,MAAM,MAIN,SAAS,MAAM;IAEjB,IAAI,gBAAgB,QAClB,SAAS;IAGX,IAAI,YACF,OAAQ,MAAM,YAAY,GAAG,MAAM,SAAS,WAAW,MAAM;KAC3D,YAAY,WAAW;KACvB;IACF,CAAC;GAEL;GAEA,OAAO;EACT;CACF;CAEA,OAAO,KAAK;AACd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Message } from "../../contracts/conversation-message.type.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../ai/src/middleware/utils/extract-user-text.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Pull the text a content-inspection middleware should care about
|
|
6
6
|
* from the outbound message list.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-user-text.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"extract-user-text.d.mts","names":[],"sources":["../../../../../../../../ai/src/middleware/utils/extract-user-text.ts"],"mappings":";;;;;AAmCA;;;;;;;;AAAgE;;;;;;;;;;;;;;;;;;;;;;;iBAAhD,eAAA,CAAgB,QAAA,EAAU,aAAa,CAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-user-text.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"extract-user-text.mjs","names":[],"sources":["../../../../../../../../ai/src/middleware/utils/extract-user-text.ts"],"sourcesContent":["import type { Message } from \"../../contracts/conversation-message.type\";\n\n/**\n * Pull the text a content-inspection middleware should care about\n * from the outbound message list.\n *\n * **Role.** Built-ins that inspect \"what the user just said\" — the\n * guardrail on `trip.before`, the semantic cache on `trip.before`,\n * future consumers like PII redactors — all need the same string:\n * the most recent `user`-role message's text content. This helper\n * is the single authority on how that string is resolved.\n *\n * **Behavior.**\n * - Walks `messages` from the end backwards so the LAST user turn\n * wins (correct when the agent has history + a fresh prompt).\n * - Returns a plain string directly when `content` is a string.\n * - Joins `text` parts with `\"\\n\"` when `content` is a multipart\n * `ContentPart[]`. Non-text parts (images, audio, pdf) are skipped —\n * callers concerned with multimodal content inspect `request`\n * / attachments separately.\n * - Returns `\"\"` when there is no user message at all (e.g. a trip\n * composed entirely of tool results).\n *\n * **Coverage limit (D3).** Because only `text` parts are extracted, any\n * guardrail / PII detector built on this helper inspects **text only** —\n * image / PDF / audio attachment content is NOT scanned. A guardrail is\n * therefore not a multimodal safety control: for non-text inputs add an\n * attachment-level policy (e.g. an OCR / moderation pass before the call)\n * rather than relying on input detectors.\n *\n * @example\n * const prompt = extractUserText(context.messages);\n * if (!prompt) return;\n * const verdict = await inputCheck(prompt);\n */\nexport function extractUserText(messages: ReadonlyArray<Message>): string {\n for (let index = messages.length - 1; index >= 0; index--) {\n const message = messages[index];\n\n if (message.role !== \"user\") {\n continue;\n }\n\n if (typeof message.content === \"string\") {\n return message.content;\n }\n\n if (Array.isArray(message.content)) {\n return message.content\n .filter((part) => part.type === \"text\")\n .map((part) => (part as { text: string }).text)\n .join(\"\\n\");\n }\n }\n\n return \"\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,gBAAgB,UAA0C;CACxE,KAAK,IAAI,QAAQ,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS;EACzD,MAAM,UAAU,SAAS;EAEzB,IAAI,QAAQ,SAAS,QACnB;EAGF,IAAI,OAAO,QAAQ,YAAY,UAC7B,OAAO,QAAQ;EAGjB,IAAI,MAAM,QAAQ,QAAQ,OAAO,GAC/B,OAAO,QAAQ,QACZ,QAAQ,SAAS,KAAK,SAAS,MAAM,CAAC,CACtC,KAAK,SAAU,KAA0B,IAAI,CAAC,CAC9C,KAAK,IAAI;CAEhB;CAEA,OAAO;AACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MiddlewareState } from "../../contracts/middleware/middleware-state.type.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../ai/src/middleware/utils/namespaced-state.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Typed accessor over `ctx.state` for a single namespace key. Wraps
|
|
5
5
|
* the raw `Map<string, unknown>` so middleware authors stop typing
|
|
@@ -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
|