@warlock.js/ai 4.4.0 → 4.6.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 +63 -52
- package/cjs/index.cjs +240 -14147
- package/cjs/src-Bmajk4Qg.cjs +30 -0
- package/cjs/src-OZyDYHxm.cjs +25089 -0
- package/cjs/src-OZyDYHxm.cjs.map +1 -0
- package/esm/agent/agent-config.type.d.mts +119 -1
- package/esm/agent/agent-config.type.d.mts.map +1 -1
- package/esm/agent/agent-input-builder.mjs +27 -6
- package/esm/agent/agent-input-builder.mjs.map +1 -1
- package/esm/agent/agent.d.mts +40 -1
- package/esm/agent/agent.d.mts.map +1 -1
- package/esm/agent/agent.mjs +328 -36
- package/esm/agent/agent.mjs.map +1 -1
- package/esm/agent/index.d.mts +2 -1
- package/esm/agent/index.mjs +1 -0
- package/esm/agent/judge-config.type.d.mts +33 -0
- package/esm/agent/judge-config.type.d.mts.map +1 -0
- package/esm/agent/judge-config.type.mjs +13 -0
- package/esm/agent/judge-config.type.mjs.map +1 -0
- package/esm/agent/signature.mjs +57 -0
- package/esm/agent/signature.mjs.map +1 -0
- package/esm/agent/snapshot.mjs +101 -0
- package/esm/agent/snapshot.mjs.map +1 -0
- package/esm/ai-openai/src/embedder.mjs +4 -0
- package/esm/ai-openai/src/image.mjs +5 -0
- package/esm/ai-openai/src/index.mjs +7 -0
- package/esm/ai-openai/src/model.mjs +5 -0
- package/esm/ai-openai/src/sdk.mjs +9 -0
- package/esm/ai-openai/src/speech.mjs +5 -0
- package/esm/ai-openai/src/transcription.mjs +6 -0
- package/esm/ai-openai/src/utils/index.mjs +5 -0
- package/esm/ai-openai/src/utils/to-openai-messages.mjs +3 -0
- package/esm/ai-openai/src/utils/to-openai-tools.mjs +3 -0
- package/esm/ai-openai/src/utils/wrap-openai-error.mjs +4 -0
- package/esm/ai.d.mts +164 -53
- package/esm/ai.d.mts.map +1 -1
- package/esm/ai.mjs +79 -8
- package/esm/ai.mjs.map +1 -1
- package/esm/batch/batch.d.mts.map +1 -1
- package/esm/batch/batch.mjs +21 -1
- package/esm/batch/batch.mjs.map +1 -1
- package/esm/batch/batch.type.d.mts +11 -4
- package/esm/batch/batch.type.d.mts.map +1 -1
- package/esm/config.d.mts +39 -3
- package/esm/config.d.mts.map +1 -1
- package/esm/config.mjs +26 -2
- package/esm/config.mjs.map +1 -1
- package/esm/contracts/agent/agent-options.type.d.mts +33 -5
- package/esm/contracts/agent/agent-options.type.d.mts.map +1 -1
- package/esm/contracts/agent/agent-snapshot.type.d.mts +90 -0
- package/esm/contracts/agent/agent-snapshot.type.d.mts.map +1 -0
- package/esm/contracts/agent/agent.contract.d.mts +29 -1
- package/esm/contracts/agent/agent.contract.d.mts.map +1 -1
- package/esm/contracts/agent/eval.type.d.mts +43 -2
- package/esm/contracts/agent/eval.type.d.mts.map +1 -1
- package/esm/contracts/agent/index.d.mts +2 -1
- package/esm/contracts/attachment-policy.type.d.mts +51 -0
- package/esm/contracts/attachment-policy.type.d.mts.map +1 -0
- package/esm/contracts/attachment.type.d.mts +16 -7
- package/esm/contracts/attachment.type.d.mts.map +1 -1
- package/esm/contracts/content-part.type.d.mts +14 -5
- package/esm/contracts/content-part.type.d.mts.map +1 -1
- package/esm/contracts/events/supervisor-events.type.d.mts.map +1 -1
- package/esm/contracts/image-model.contract.d.mts +156 -0
- package/esm/contracts/image-model.contract.d.mts.map +1 -0
- package/esm/contracts/index.d.mts +13 -6
- package/esm/contracts/model.contract.d.mts +11 -8
- package/esm/contracts/model.contract.d.mts.map +1 -1
- package/esm/contracts/orchestrator/index.d.mts +1 -0
- package/esm/contracts/orchestrator/orchestrator-config.type.d.mts +31 -2
- package/esm/contracts/orchestrator/orchestrator-config.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/session-lock.contract.d.mts +47 -0
- package/esm/contracts/orchestrator/session-lock.contract.d.mts.map +1 -0
- package/esm/contracts/planner/index.d.mts +3 -2
- package/esm/contracts/planner/planner-config.type.d.mts +61 -0
- package/esm/contracts/planner/planner-config.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-execute-options.type.d.mts +60 -1
- package/esm/contracts/planner/planner-execute-options.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-result.type.d.mts +8 -0
- package/esm/contracts/planner/planner-result.type.d.mts.map +1 -1
- package/esm/contracts/planner/planner-snapshot.type.d.mts +77 -0
- package/esm/contracts/planner/planner-snapshot.type.d.mts.map +1 -0
- package/esm/contracts/planner/planner.contract.d.mts +21 -1
- package/esm/contracts/planner/planner.contract.d.mts.map +1 -1
- package/esm/contracts/result/agent-result.type.d.mts +6 -4
- package/esm/contracts/result/agent-result.type.d.mts.map +1 -1
- package/esm/contracts/result/base-report.type.d.mts +21 -3
- package/esm/contracts/result/base-report.type.d.mts.map +1 -1
- package/esm/contracts/result/base-report.type.mjs.map +1 -1
- package/esm/contracts/result/execution-report.type.d.mts +53 -1
- package/esm/contracts/result/execution-report.type.d.mts.map +1 -1
- package/esm/contracts/result/supervisor-result.type.d.mts +14 -2
- package/esm/contracts/result/supervisor-result.type.d.mts.map +1 -1
- package/esm/contracts/result/workflow-result.type.d.mts +2 -1
- package/esm/contracts/result/workflow-result.type.d.mts.map +1 -1
- package/esm/contracts/sdk-adapter.contract.d.mts +37 -0
- package/esm/contracts/sdk-adapter.contract.d.mts.map +1 -1
- package/esm/contracts/speech-model.contract.d.mts +97 -0
- package/esm/contracts/speech-model.contract.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor-config.type.d.mts +29 -0
- package/esm/contracts/supervisor/supervisor-config.type.d.mts.map +1 -1
- package/esm/contracts/system-prompt.contract.d.mts +103 -1
- package/esm/contracts/system-prompt.contract.d.mts.map +1 -1
- package/esm/contracts/team/index.d.mts +1 -0
- package/esm/contracts/team/team-config.type.d.mts +127 -0
- package/esm/contracts/team/team-config.type.d.mts.map +1 -0
- package/esm/contracts/tool.contract.d.mts +4 -2
- package/esm/contracts/tool.contract.d.mts.map +1 -1
- package/esm/contracts/transcription-model.contract.d.mts +101 -0
- package/esm/contracts/transcription-model.contract.d.mts.map +1 -0
- package/esm/contracts/workflow/step.contract.d.mts +30 -5
- package/esm/contracts/workflow/step.contract.d.mts.map +1 -1
- package/esm/contracts/workflow/workflow.contract.d.mts +16 -0
- package/esm/contracts/workflow/workflow.contract.d.mts.map +1 -1
- package/esm/errors/agent-drift-error.d.mts +32 -0
- package/esm/errors/agent-drift-error.d.mts.map +1 -0
- package/esm/errors/agent-drift-error.mjs +31 -0
- package/esm/errors/agent-drift-error.mjs.map +1 -0
- package/esm/errors/error-code.type.d.mts +1 -1
- package/esm/errors/index.d.mts +3 -0
- package/esm/errors/index.mjs +3 -0
- package/esm/errors/outbound-policy-error.d.mts +27 -0
- package/esm/errors/outbound-policy-error.d.mts.map +1 -0
- package/esm/errors/outbound-policy-error.mjs +32 -0
- package/esm/errors/outbound-policy-error.mjs.map +1 -0
- package/esm/errors/planner-drift-error.d.mts +34 -0
- package/esm/errors/planner-drift-error.d.mts.map +1 -0
- package/esm/errors/planner-drift-error.mjs +33 -0
- package/esm/errors/planner-drift-error.mjs.map +1 -0
- package/esm/eval/dataset.d.mts +28 -0
- package/esm/eval/dataset.d.mts.map +1 -0
- package/esm/eval/dataset.mjs +112 -0
- package/esm/eval/dataset.mjs.map +1 -0
- package/esm/eval/dataset.type.d.mts +53 -0
- package/esm/eval/dataset.type.d.mts.map +1 -0
- package/esm/eval/eval-runner.d.mts.map +1 -1
- package/esm/eval/eval-runner.mjs +16 -2
- package/esm/eval/eval-runner.mjs.map +1 -1
- package/esm/eval/index.d.mts +20 -1
- package/esm/eval/index.d.mts.map +1 -1
- package/esm/eval/index.mjs +20 -2
- package/esm/eval/index.mjs.map +1 -1
- package/esm/eval/regression.d.mts +30 -0
- package/esm/eval/regression.d.mts.map +1 -0
- package/esm/eval/regression.mjs +51 -0
- package/esm/eval/regression.mjs.map +1 -0
- package/esm/eval/report-json.d.mts +30 -0
- package/esm/eval/report-json.d.mts.map +1 -0
- package/esm/eval/report-json.mjs +33 -0
- package/esm/eval/report-json.mjs.map +1 -0
- package/esm/eval/report-junit.d.mts +22 -0
- package/esm/eval/report-junit.d.mts.map +1 -0
- package/esm/eval/report-junit.mjs +60 -0
- package/esm/eval/report-junit.mjs.map +1 -0
- package/esm/guard/contracts/guard-options.type.d.mts +165 -0
- package/esm/guard/contracts/guard-options.type.d.mts.map +1 -0
- package/esm/guard/contracts/guardrail.contract.d.mts +78 -0
- package/esm/guard/contracts/guardrail.contract.d.mts.map +1 -0
- package/esm/guard/contracts/index.d.mts +4 -0
- package/esm/guard/contracts/openai-client.contract.d.mts +51 -0
- package/esm/guard/contracts/openai-client.contract.d.mts.map +1 -0
- package/esm/guard/contracts/verdict.type.d.mts +76 -0
- package/esm/guard/contracts/verdict.type.d.mts.map +1 -0
- package/esm/guard/detectors/index.d.mts +4 -0
- package/esm/guard/detectors/index.mjs +6 -0
- package/esm/guard/detectors/injection.d.mts +34 -0
- package/esm/guard/detectors/injection.d.mts.map +1 -0
- package/esm/guard/detectors/injection.mjs +254 -0
- package/esm/guard/detectors/injection.mjs.map +1 -0
- package/esm/guard/detectors/moderation.d.mts +32 -0
- package/esm/guard/detectors/moderation.d.mts.map +1 -0
- package/esm/guard/detectors/moderation.mjs +134 -0
- package/esm/guard/detectors/moderation.mjs.map +1 -0
- package/esm/guard/detectors/pii.d.mts +41 -0
- package/esm/guard/detectors/pii.d.mts.map +1 -0
- package/esm/guard/detectors/pii.mjs +199 -0
- package/esm/guard/detectors/pii.mjs.map +1 -0
- package/esm/guard/detectors/topic.d.mts +29 -0
- package/esm/guard/detectors/topic.d.mts.map +1 -0
- package/esm/guard/detectors/topic.mjs +99 -0
- package/esm/guard/detectors/topic.mjs.map +1 -0
- package/esm/guard/errors.d.mts +12 -0
- package/esm/guard/errors.d.mts.map +1 -0
- package/esm/guard/errors.mjs +18 -0
- package/esm/guard/errors.mjs.map +1 -0
- package/esm/guard/guard.d.mts +67 -0
- package/esm/guard/guard.d.mts.map +1 -0
- package/esm/guard/guard.mjs +209 -0
- package/esm/guard/guard.mjs.map +1 -0
- package/esm/guard/guardrail.d.mts +39 -0
- package/esm/guard/guardrail.d.mts.map +1 -0
- package/esm/guard/guardrail.mjs +22 -0
- package/esm/guard/guardrail.mjs.map +1 -0
- package/esm/human/contracts/approval.type.d.mts +154 -0
- package/esm/human/contracts/approval.type.d.mts.map +1 -0
- package/esm/human/contracts/human-approval.type.d.mts +38 -0
- package/esm/human/contracts/human-approval.type.d.mts.map +1 -0
- package/esm/human/contracts/index.d.mts +4 -0
- package/esm/human/contracts/interrupt-store.contract.d.mts +112 -0
- package/esm/human/contracts/interrupt-store.contract.d.mts.map +1 -0
- package/esm/human/contracts/resume.type.d.mts +77 -0
- package/esm/human/contracts/resume.type.d.mts.map +1 -0
- package/esm/human/errors.d.mts +84 -0
- package/esm/human/errors.d.mts.map +1 -0
- package/esm/human/errors.mjs +60 -0
- package/esm/human/errors.mjs.map +1 -0
- package/esm/human/human-approval.d.mts +57 -0
- package/esm/human/human-approval.d.mts.map +1 -0
- package/esm/human/human-approval.mjs +170 -0
- package/esm/human/human-approval.mjs.map +1 -0
- package/esm/human/policy.d.mts +55 -0
- package/esm/human/policy.d.mts.map +1 -0
- package/esm/human/policy.mjs +67 -0
- package/esm/human/policy.mjs.map +1 -0
- package/esm/human/register.mjs +37 -0
- package/esm/human/register.mjs.map +1 -0
- package/esm/human/resume-seed.mjs +53 -0
- package/esm/human/resume-seed.mjs.map +1 -0
- package/esm/human/resume.d.mts +54 -0
- package/esm/human/resume.d.mts.map +1 -0
- package/esm/human/resume.mjs +121 -0
- package/esm/human/resume.mjs.map +1 -0
- package/esm/human/stores/index.mjs +5 -0
- package/esm/human/stores/memory.d.mts +30 -0
- package/esm/human/stores/memory.d.mts.map +1 -0
- package/esm/human/stores/memory.mjs +91 -0
- package/esm/human/stores/memory.mjs.map +1 -0
- package/esm/human/stores/pg.d.mts +59 -0
- package/esm/human/stores/pg.d.mts.map +1 -0
- package/esm/human/stores/pg.mjs +220 -0
- package/esm/human/stores/pg.mjs.map +1 -0
- package/esm/human/stores/redis.d.mts +56 -0
- package/esm/human/stores/redis.d.mts.map +1 -0
- package/esm/human/stores/redis.mjs +201 -0
- package/esm/human/stores/redis.mjs.map +1 -0
- package/esm/image/image-cost.d.mts +32 -0
- package/esm/image/image-cost.d.mts.map +1 -0
- package/esm/image/image-cost.mjs +55 -0
- package/esm/image/image-cost.mjs.map +1 -0
- package/esm/image/image.d.mts +92 -0
- package/esm/image/image.d.mts.map +1 -0
- package/esm/image/image.mjs +113 -0
- package/esm/image/image.mjs.map +1 -0
- package/esm/image/index.mjs +4 -0
- package/esm/index.d.mts +137 -24
- package/esm/index.mjs +101 -11
- package/esm/middleware/builtins/budget.mjs +6 -2
- package/esm/middleware/builtins/budget.mjs.map +1 -1
- package/esm/middleware/utils/extract-user-text.d.mts +8 -1
- package/esm/middleware/utils/extract-user-text.d.mts.map +1 -1
- package/esm/middleware/utils/extract-user-text.mjs +8 -1
- package/esm/middleware/utils/extract-user-text.mjs.map +1 -1
- package/esm/mock/index.d.mts +3 -0
- package/esm/mock/index.mjs +3 -0
- package/esm/mock/mock-config.type.d.mts +22 -0
- package/esm/mock/mock-config.type.d.mts.map +1 -1
- package/esm/mock/mock-image-model.d.mts +41 -0
- package/esm/mock/mock-image-model.d.mts.map +1 -0
- package/esm/mock/mock-image-model.mjs +52 -0
- package/esm/mock/mock-image-model.mjs.map +1 -0
- package/esm/mock/mock-sdk.d.mts +7 -1
- package/esm/mock/mock-sdk.d.mts.map +1 -1
- package/esm/mock/mock-sdk.mjs +27 -0
- package/esm/mock/mock-sdk.mjs.map +1 -1
- package/esm/mock/mock-speech-model.d.mts +31 -0
- package/esm/mock/mock-speech-model.d.mts.map +1 -0
- package/esm/mock/mock-speech-model.mjs +39 -0
- package/esm/mock/mock-speech-model.mjs.map +1 -0
- package/esm/mock/mock-transcription-model.d.mts +32 -0
- package/esm/mock/mock-transcription-model.d.mts.map +1 -0
- package/esm/mock/mock-transcription-model.mjs +36 -0
- package/esm/mock/mock-transcription-model.mjs.map +1 -0
- package/esm/object-stream/index.d.mts +2 -0
- package/esm/object-stream/index.mjs +4 -0
- package/esm/object-stream/parse-partial-json.d.mts +22 -0
- package/esm/object-stream/parse-partial-json.d.mts.map +1 -0
- package/esm/object-stream/parse-partial-json.mjs +78 -0
- package/esm/object-stream/parse-partial-json.mjs.map +1 -0
- package/esm/object-stream/stream-object.d.mts +68 -0
- package/esm/object-stream/stream-object.d.mts.map +1 -0
- package/esm/object-stream/stream-object.mjs +104 -0
- package/esm/object-stream/stream-object.mjs.map +1 -0
- package/esm/observe/index.mjs +4 -0
- package/esm/observe/observer-registry.d.mts +30 -0
- package/esm/observe/observer-registry.d.mts.map +1 -0
- package/esm/observe/observer-registry.mjs +51 -0
- package/esm/observe/observer-registry.mjs.map +1 -0
- package/esm/observe/observer.contract.d.mts +40 -0
- package/esm/observe/observer.contract.d.mts.map +1 -0
- package/esm/observe/resolve-observers.d.mts +40 -0
- package/esm/observe/resolve-observers.d.mts.map +1 -0
- package/esm/observe/resolve-observers.mjs +73 -0
- package/esm/observe/resolve-observers.mjs.map +1 -0
- package/esm/orchestrator/execution.d.mts.map +1 -1
- package/esm/orchestrator/execution.mjs +5 -2
- package/esm/orchestrator/execution.mjs.map +1 -1
- package/esm/orchestrator/index.d.mts +1 -0
- package/esm/orchestrator/index.mjs +1 -0
- package/esm/orchestrator/orchestrator.d.mts.map +1 -1
- package/esm/orchestrator/orchestrator.mjs +39 -6
- package/esm/orchestrator/orchestrator.mjs.map +1 -1
- package/esm/orchestrator/session-lock.d.mts +25 -0
- package/esm/orchestrator/session-lock.d.mts.map +1 -0
- package/esm/orchestrator/session-lock.mjs +83 -0
- package/esm/orchestrator/session-lock.mjs.map +1 -0
- package/esm/planner/dag-scheduler.mjs +97 -0
- package/esm/planner/dag-scheduler.mjs.map +1 -0
- 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 +2 -1
- package/esm/planner/plan-prompt.mjs.map +1 -1
- package/esm/planner/planner-run.d.mts +8 -0
- package/esm/planner/planner-run.d.mts.map +1 -1
- package/esm/planner/planner-run.mjs +457 -31
- package/esm/planner/planner-run.mjs.map +1 -1
- package/esm/planner/planner.d.mts.map +1 -1
- package/esm/planner/planner.mjs +26 -2
- package/esm/planner/planner.mjs.map +1 -1
- package/esm/planner/snapshot.mjs +95 -0
- package/esm/planner/snapshot.mjs.map +1 -0
- package/esm/prompt/errors.d.mts +57 -0
- package/esm/prompt/errors.d.mts.map +1 -0
- package/esm/prompt/errors.mjs +73 -0
- package/esm/prompt/errors.mjs.map +1 -0
- package/esm/prompt/index.d.mts +3 -0
- package/esm/prompt/index.mjs +4 -0
- package/esm/prompt/prompt-langfuse-sync.mjs +104 -0
- package/esm/prompt/prompt-langfuse-sync.mjs.map +1 -0
- package/esm/prompt/prompt-langfuse-sync.type.d.mts +32 -0
- package/esm/prompt/prompt-langfuse-sync.type.d.mts.map +1 -0
- package/esm/prompt/prompt-validate.mjs +170 -0
- package/esm/prompt/prompt-validate.mjs.map +1 -0
- package/esm/prompt/prompt.d.mts +54 -0
- package/esm/prompt/prompt.d.mts.map +1 -0
- package/esm/prompt/prompt.mjs +218 -0
- package/esm/prompt/prompt.mjs.map +1 -0
- package/esm/prompt/prompt.type.d.mts +174 -0
- package/esm/prompt/prompt.type.d.mts.map +1 -0
- package/esm/prompts/index.d.mts +3 -0
- package/esm/prompts/index.mjs +3 -0
- package/esm/prompts/prompts-manager.contract.d.mts +154 -0
- package/esm/prompts/prompts-manager.contract.d.mts.map +1 -0
- package/esm/prompts/prompts-manager.d.mts +38 -0
- package/esm/prompts/prompts-manager.d.mts.map +1 -0
- package/esm/prompts/prompts-manager.mjs +410 -0
- package/esm/prompts/prompts-manager.mjs.map +1 -0
- package/esm/prompts/prompts-manager.type.d.mts +172 -0
- package/esm/prompts/prompts-manager.type.d.mts.map +1 -0
- package/esm/prompts/prompts-validate.mjs +200 -0
- package/esm/prompts/prompts-validate.mjs.map +1 -0
- package/esm/rag/as-tool.mjs +48 -0
- package/esm/rag/as-tool.mjs.map +1 -0
- package/esm/rag/chunk/chunk.d.mts +24 -0
- package/esm/rag/chunk/chunk.d.mts.map +1 -0
- package/esm/rag/chunk/chunk.mjs +44 -0
- package/esm/rag/chunk/chunk.mjs.map +1 -0
- package/esm/rag/chunk/fixed.mjs +32 -0
- package/esm/rag/chunk/fixed.mjs.map +1 -0
- package/esm/rag/chunk/markdown.mjs +75 -0
- package/esm/rag/chunk/markdown.mjs.map +1 -0
- package/esm/rag/chunk/recursive.mjs +132 -0
- package/esm/rag/chunk/recursive.mjs.map +1 -0
- package/esm/rag/chunk/sentence.mjs +73 -0
- package/esm/rag/chunk/sentence.mjs.map +1 -0
- package/esm/rag/contracts/chunk-options.type.d.mts +35 -0
- package/esm/rag/contracts/chunk-options.type.d.mts.map +1 -0
- package/esm/rag/contracts/citation.type.d.mts +35 -0
- package/esm/rag/contracts/citation.type.d.mts.map +1 -0
- package/esm/rag/contracts/index.d.mts +4 -0
- package/esm/rag/contracts/rag-config.type.d.mts +68 -0
- package/esm/rag/contracts/rag-config.type.d.mts.map +1 -0
- package/esm/rag/contracts/rag-document.type.d.mts +21 -0
- package/esm/rag/contracts/rag-document.type.d.mts.map +1 -0
- package/esm/rag/hybrid/bm25.d.mts +23 -0
- package/esm/rag/hybrid/bm25.d.mts.map +1 -0
- package/esm/rag/hybrid/bm25.mjs +51 -0
- package/esm/rag/hybrid/bm25.mjs.map +1 -0
- package/esm/rag/hybrid/hybrid-rank.d.mts +33 -0
- package/esm/rag/hybrid/hybrid-rank.d.mts.map +1 -0
- package/esm/rag/hybrid/hybrid-rank.mjs +29 -0
- package/esm/rag/hybrid/hybrid-rank.mjs.map +1 -0
- package/esm/rag/hybrid/rrf.d.mts +25 -0
- package/esm/rag/hybrid/rrf.d.mts.map +1 -0
- package/esm/rag/hybrid/rrf.mjs +30 -0
- package/esm/rag/hybrid/rrf.mjs.map +1 -0
- package/esm/rag/index.d.mts +22 -0
- package/esm/rag/index.mjs +18 -0
- package/esm/rag/loaders/errors.d.mts +19 -0
- package/esm/rag/loaders/errors.d.mts.map +1 -0
- package/esm/rag/loaders/errors.mjs +25 -0
- package/esm/rag/loaders/errors.mjs.map +1 -0
- package/esm/rag/loaders/index.mjs +7 -0
- package/esm/rag/loaders/load-html.d.mts +26 -0
- package/esm/rag/loaders/load-html.d.mts.map +1 -0
- package/esm/rag/loaders/load-html.mjs +138 -0
- package/esm/rag/loaders/load-html.mjs.map +1 -0
- package/esm/rag/loaders/load-pdf.d.mts +38 -0
- package/esm/rag/loaders/load-pdf.d.mts.map +1 -0
- package/esm/rag/loaders/load-pdf.mjs +150 -0
- package/esm/rag/loaders/load-pdf.mjs.map +1 -0
- package/esm/rag/loaders/load-text.d.mts +47 -0
- package/esm/rag/loaders/load-text.d.mts.map +1 -0
- package/esm/rag/loaders/load-text.mjs +60 -0
- package/esm/rag/loaders/load-text.mjs.map +1 -0
- package/esm/rag/loaders/load-web.d.mts +42 -0
- package/esm/rag/loaders/load-web.d.mts.map +1 -0
- package/esm/rag/loaders/load-web.mjs +89 -0
- package/esm/rag/loaders/load-web.mjs.map +1 -0
- package/esm/rag/loaders/loader.type.d.mts +89 -0
- package/esm/rag/loaders/loader.type.d.mts.map +1 -0
- package/esm/rag/rag.d.mts +38 -0
- package/esm/rag/rag.d.mts.map +1 -0
- package/esm/rag/rag.mjs +126 -0
- package/esm/rag/rag.mjs.map +1 -0
- package/esm/rag/rerank/keyword-reranker.d.mts +32 -0
- package/esm/rag/rerank/keyword-reranker.d.mts.map +1 -0
- package/esm/rag/rerank/keyword-reranker.mjs +58 -0
- package/esm/rag/rerank/keyword-reranker.mjs.map +1 -0
- package/esm/rag/rerank/llm-reranker.d.mts +36 -0
- package/esm/rag/rerank/llm-reranker.d.mts.map +1 -0
- package/esm/rag/rerank/llm-reranker.mjs +85 -0
- package/esm/rag/rerank/llm-reranker.mjs.map +1 -0
- package/esm/rag/rerank/reranker.contract.d.mts +28 -0
- package/esm/rag/rerank/reranker.contract.d.mts.map +1 -0
- package/esm/rag/retrieve.mjs +68 -0
- package/esm/rag/retrieve.mjs.map +1 -0
- package/esm/rag/store/cache-vector-store.d.mts +27 -0
- package/esm/rag/store/cache-vector-store.d.mts.map +1 -0
- package/esm/rag/store/cache-vector-store.mjs +48 -0
- package/esm/rag/store/cache-vector-store.mjs.map +1 -0
- package/esm/rag/store/pg-vector-store.d.mts +139 -0
- package/esm/rag/store/pg-vector-store.d.mts.map +1 -0
- package/esm/rag/store/pg-vector-store.mjs +328 -0
- package/esm/rag/store/pg-vector-store.mjs.map +1 -0
- package/esm/rag/store/vector-store.contract.d.mts +38 -0
- package/esm/rag/store/vector-store.contract.d.mts.map +1 -0
- package/esm/rag/transforms/multi-query.d.mts +27 -0
- package/esm/rag/transforms/multi-query.d.mts.map +1 -0
- package/esm/rag/transforms/multi-query.mjs +41 -0
- package/esm/rag/transforms/multi-query.mjs.map +1 -0
- package/esm/security/index.mjs +5 -0
- package/esm/security/outbound-policy.d.mts +46 -0
- package/esm/security/outbound-policy.d.mts.map +1 -0
- package/esm/security/outbound-policy.mjs +187 -0
- package/esm/security/outbound-policy.mjs.map +1 -0
- package/esm/security/outbound-policy.type.d.mts +74 -0
- package/esm/security/outbound-policy.type.d.mts.map +1 -0
- package/esm/security/private-ip.d.mts +15 -0
- package/esm/security/private-ip.d.mts.map +1 -0
- package/esm/security/private-ip.mjs +48 -0
- package/esm/security/private-ip.mjs.map +1 -0
- package/esm/security/redact.d.mts +59 -0
- package/esm/security/redact.d.mts.map +1 -0
- package/esm/security/redact.mjs +122 -0
- package/esm/security/redact.mjs.map +1 -0
- package/esm/serve/serve.d.mts +50 -0
- package/esm/serve/serve.d.mts.map +1 -0
- package/esm/serve/serve.mjs +90 -0
- package/esm/serve/serve.mjs.map +1 -0
- package/esm/serve/sse.d.mts +20 -0
- package/esm/serve/sse.d.mts.map +1 -0
- package/esm/serve/sse.mjs +25 -0
- package/esm/serve/sse.mjs.map +1 -0
- package/esm/serve/stream-to-sse.d.mts +29 -0
- package/esm/serve/stream-to-sse.d.mts.map +1 -0
- package/esm/serve/stream-to-sse.mjs +37 -0
- package/esm/serve/stream-to-sse.mjs.map +1 -0
- package/esm/skills/catalog.d.mts +49 -0
- package/esm/skills/catalog.d.mts.map +1 -0
- package/esm/skills/catalog.mjs +140 -0
- package/esm/skills/catalog.mjs.map +1 -0
- package/esm/skills/contracts/skill-record.type.d.mts +37 -0
- package/esm/skills/contracts/skill-record.type.d.mts.map +1 -0
- package/esm/skills/contracts/skills-config.type.d.mts +108 -0
- package/esm/skills/contracts/skills-config.type.d.mts.map +1 -0
- package/esm/skills/contracts/skills-store.contract.d.mts +28 -0
- package/esm/skills/contracts/skills-store.contract.d.mts.map +1 -0
- package/esm/skills/contracts/skills.contract.d.mts +43 -0
- package/esm/skills/contracts/skills.contract.d.mts.map +1 -0
- package/esm/skills/index.d.mts +16 -0
- package/esm/skills/index.mjs +14 -0
- package/esm/skills/load-skill-tool.d.mts +38 -0
- package/esm/skills/load-skill-tool.d.mts.map +1 -0
- package/esm/skills/load-skill-tool.mjs +65 -0
- package/esm/skills/load-skill-tool.mjs.map +1 -0
- package/esm/skills/review-gate.d.mts +33 -0
- package/esm/skills/review-gate.d.mts.map +1 -0
- package/esm/skills/review-gate.mjs +60 -0
- package/esm/skills/review-gate.mjs.map +1 -0
- package/esm/skills/save-skill-tool.d.mts +39 -0
- package/esm/skills/save-skill-tool.d.mts.map +1 -0
- package/esm/skills/save-skill-tool.mjs +65 -0
- package/esm/skills/save-skill-tool.mjs.map +1 -0
- package/esm/skills/skills.d.mts +33 -0
- package/esm/skills/skills.d.mts.map +1 -0
- package/esm/skills/skills.mjs +109 -0
- package/esm/skills/skills.mjs.map +1 -0
- package/esm/skills/sources/directory-source.d.mts +19 -0
- package/esm/skills/sources/directory-source.d.mts.map +1 -0
- package/esm/skills/sources/directory-source.mjs +108 -0
- package/esm/skills/sources/directory-source.mjs.map +1 -0
- package/esm/skills/sources/index.d.mts +18 -0
- package/esm/skills/sources/index.d.mts.map +1 -0
- package/esm/skills/sources/index.mjs +27 -0
- package/esm/skills/sources/index.mjs.map +1 -0
- package/esm/skills/sources/parse-frontmatter.d.mts +27 -0
- package/esm/skills/sources/parse-frontmatter.d.mts.map +1 -0
- package/esm/skills/sources/parse-frontmatter.mjs +46 -0
- package/esm/skills/sources/parse-frontmatter.mjs.map +1 -0
- package/esm/skills/sources/store-source.d.mts +14 -0
- package/esm/skills/sources/store-source.d.mts.map +1 -0
- package/esm/skills/sources/store-source.mjs +15 -0
- package/esm/skills/sources/store-source.mjs.map +1 -0
- package/esm/skills/sources/url-source.d.mts +29 -0
- package/esm/skills/sources/url-source.d.mts.map +1 -0
- package/esm/skills/sources/url-source.mjs +117 -0
- package/esm/skills/sources/url-source.mjs.map +1 -0
- package/esm/skills/store/mock-skills-store.d.mts +57 -0
- package/esm/skills/store/mock-skills-store.d.mts.map +1 -0
- package/esm/skills/store/mock-skills-store.mjs +100 -0
- package/esm/skills/store/mock-skills-store.mjs.map +1 -0
- package/esm/skills/store/procedural-skill-store.d.mts +30 -0
- package/esm/skills/store/procedural-skill-store.d.mts.map +1 -0
- package/esm/skills/store/procedural-skill-store.mjs +125 -0
- package/esm/skills/store/procedural-skill-store.mjs.map +1 -0
- package/esm/speech/index.mjs +3 -0
- package/esm/speech/speech.d.mts +65 -0
- package/esm/speech/speech.d.mts.map +1 -0
- package/esm/speech/speech.mjs +123 -0
- package/esm/speech/speech.mjs.map +1 -0
- package/esm/supervisor/as-tool.mjs +2 -2
- package/esm/supervisor/as-tool.mjs.map +1 -1
- package/esm/supervisor/entries.mjs +2 -2
- package/esm/supervisor/entries.mjs.map +1 -1
- package/esm/supervisor/execution.d.mts.map +1 -1
- package/esm/supervisor/execution.mjs +31 -28
- package/esm/supervisor/execution.mjs.map +1 -1
- package/esm/supervisor/supervisor.d.mts.map +1 -1
- package/esm/supervisor/supervisor.mjs +8 -3
- package/esm/supervisor/supervisor.mjs.map +1 -1
- package/esm/system-prompt/index.d.mts +4 -0
- package/esm/system-prompt/system-prompt.d.mts +68 -4
- package/esm/system-prompt/system-prompt.d.mts.map +1 -1
- package/esm/system-prompt/system-prompt.mjs +89 -5
- package/esm/system-prompt/system-prompt.mjs.map +1 -1
- package/esm/team/gates.mjs +48 -0
- package/esm/team/gates.mjs.map +1 -0
- package/esm/team/index.d.mts +1 -0
- package/esm/team/index.mjs +3 -0
- package/esm/team/team.d.mts +42 -0
- package/esm/team/team.d.mts.map +1 -0
- package/esm/team/team.mjs +94 -0
- package/esm/team/team.mjs.map +1 -0
- package/esm/tool/executable-as-tool.d.mts.map +1 -1
- package/esm/tool/executable-as-tool.mjs +2 -2
- package/esm/tool/executable-as-tool.mjs.map +1 -1
- package/esm/tool/tool.d.mts.map +1 -1
- package/esm/tool/tool.mjs +2 -2
- package/esm/tool/tool.mjs.map +1 -1
- package/esm/transcribe/audio-input.d.mts +47 -0
- package/esm/transcribe/audio-input.d.mts.map +1 -0
- package/esm/transcribe/audio-input.mjs +84 -0
- package/esm/transcribe/audio-input.mjs.map +1 -0
- package/esm/transcribe/index.mjs +4 -0
- package/esm/transcribe/transcribe.d.mts +64 -0
- package/esm/transcribe/transcribe.d.mts.map +1 -0
- package/esm/transcribe/transcribe.mjs +128 -0
- package/esm/transcribe/transcribe.mjs.map +1 -0
- package/esm/utils/compute-cost.d.mts +17 -1
- package/esm/utils/compute-cost.d.mts.map +1 -1
- package/esm/utils/compute-cost.mjs +26 -1
- package/esm/utils/compute-cost.mjs.map +1 -1
- package/esm/utils/extract-json-lenient.d.mts +42 -0
- package/esm/utils/extract-json-lenient.d.mts.map +1 -0
- package/esm/utils/extract-json-lenient.mjs +97 -0
- package/esm/utils/extract-json-lenient.mjs.map +1 -0
- package/esm/utils/index.d.mts +4 -2
- package/esm/utils/index.mjs +3 -1
- package/esm/utils/json-schema.d.mts +1 -1
- package/esm/utils/prepare-attachment-part.d.mts +10 -1
- package/esm/utils/prepare-attachment-part.d.mts.map +1 -1
- package/esm/utils/prepare-attachment-part.mjs +103 -11
- package/esm/utils/prepare-attachment-part.mjs.map +1 -1
- package/esm/utils/resolve-attachment.d.mts +4 -3
- package/esm/utils/resolve-attachment.d.mts.map +1 -1
- package/esm/utils/resolve-attachment.mjs +4 -3
- package/esm/utils/resolve-attachment.mjs.map +1 -1
- package/esm/utils/run-context.d.mts +94 -0
- package/esm/utils/run-context.d.mts.map +1 -0
- package/esm/utils/run-context.mjs +98 -0
- package/esm/utils/run-context.mjs.map +1 -0
- package/esm/vcr/cassette-io.mjs +57 -0
- package/esm/vcr/cassette-io.mjs.map +1 -0
- package/esm/vcr/errors.d.mts +42 -0
- package/esm/vcr/errors.d.mts.map +1 -0
- package/esm/vcr/errors.mjs +37 -0
- package/esm/vcr/errors.mjs.map +1 -0
- package/esm/vcr/hash-request.d.mts +28 -0
- package/esm/vcr/hash-request.d.mts.map +1 -0
- package/esm/vcr/hash-request.mjs +118 -0
- package/esm/vcr/hash-request.mjs.map +1 -0
- package/esm/vcr/index.d.mts +4 -0
- package/esm/vcr/index.mjs +5 -0
- package/esm/vcr/vcr.d.mts +32 -0
- package/esm/vcr/vcr.d.mts.map +1 -0
- package/esm/vcr/vcr.mjs +248 -0
- package/esm/vcr/vcr.mjs.map +1 -0
- package/esm/vcr/vcr.type.d.mts +118 -0
- package/esm/vcr/vcr.type.d.mts.map +1 -0
- package/esm/workflow/as-tool.mjs +2 -2
- package/esm/workflow/as-tool.mjs.map +1 -1
- package/esm/workflow/engine.mjs +1 -0
- package/esm/workflow/engine.mjs.map +1 -1
- package/esm/workflow/step-runner.mjs +19 -20
- package/esm/workflow/step-runner.mjs.map +1 -1
- package/esm/workflow/workflow.d.mts.map +1 -1
- package/esm/workflow/workflow.mjs +8 -3
- package/esm/workflow/workflow.mjs.map +1 -1
- package/llms-full.txt +2572 -204
- package/llms.txt +21 -4
- package/package.json +7 -3
- package/skills/README.md +44 -4
- package/skills/ai-dx-helpers/SKILL.md +2 -2
- package/skills/approve-tool-calls/SKILL.md +134 -0
- package/skills/attach-ai-middleware/SKILL.md +1 -1
- package/skills/detect-and-redact-pii/SKILL.md +104 -0
- package/skills/durable-agent-runs/SKILL.md +135 -0
- package/skills/durable-resume/SKILL.md +128 -0
- package/skills/escalate-block-to-human/SKILL.md +85 -0
- package/skills/eval-datasets-and-ci/SKILL.md +117 -0
- package/skills/generate-images/SKILL.md +138 -0
- package/skills/generate-speech/SKILL.md +139 -0
- package/skills/guard-input-output/SKILL.md +117 -0
- package/skills/manage-prompts/SKILL.md +186 -0
- package/skills/observe-ai-flows/SKILL.md +94 -0
- package/skills/rag-loaders-and-stores/SKILL.md +164 -0
- package/skills/record-replay-llm/SKILL.md +92 -0
- package/skills/run-ai-agent/SKILL.md +26 -1
- package/skills/run-ai-rag/SKILL.md +139 -0
- package/skills/run-ai-team/SKILL.md +107 -0
- package/skills/run-orchestrator/SKILL.md +2 -0
- package/skills/run-planner/SKILL.md +73 -8
- package/skills/run-supervisor/SKILL.md +20 -1
- package/skills/transcribe-audio/SKILL.md +157 -0
- package/skills/use-runtime-skills/SKILL.md +106 -0
- package/skills/write-system-prompt/SKILL.md +30 -1
- package/cjs/index.cjs.map +0 -1
- package/esm/contracts/result/index.d.mts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.type.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/agent/eval.type.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"eval.type.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/agent/eval.type.ts"],"mappings":";;;;;;;;AAYA;;;;;KAAY,SAAA;EASV,6CAPA,KAAA;EAOM;AASR;;;EAXE,MAAA,YAaM;EAXN,MAAA;AAAA;;;;;;;KASU,iBAAA;EAIV,uCAFA,IAAA,EAAM,QAAA,CAAS,OAAA,GAEK;EAApB,MAAA,EAAQ,WAAA,CAAY,OAAA,GAEX;EAAT,MAAA,GAAS,OAAA,EAEL;EAAJ,IAAA;AAAA;;;;;;;KASU,UAAA,uBACV,OAAA,EAAS,iBAAA,CAAkB,OAAA,MACxB,SAAA,GAAY,OAAA,CAAQ,SAAA;;;;;;;KAQb,QAAA;EARK,+DAUf,IAAA,UAVgC;EAYhC,KAAA;EAJU;;;;;EAUV,QAAA,YAIU;EAFV,OAAA,GAAU,UAAA,CAAW,OAAA,KAEQ;EAA7B,OAAA,GAAU,mBAAA,CAAoB,OAAA;AAAA;;;;;;;;;;AAAO;AAevC;;KAAY,SAAA;EAEU,+DAApB,KAAA,EAAO,aAAa;EAAb;;;;AAYM;EANb,MAAA;EAiBqB;;;;;EAXrB,aAAA;AAAA;;;;;;;;;KAWU,WAAA;EA8BW;;;;;EAxBrB,KAAA,EAAO,QAAA,CAAS,OAAA,MAAa,eAAA,CAAgB,OAAA,GAAhB;EAE7B,OAAA,GAAU,UAAA,CAAW,OAAA,KAArB;EAEA,KAAA,GAAQ,SAAA;EAFa;;;;EAOrB,aAAA;EAOyB;;;;;;EAAzB,SAAA,IAAa,UAAA,EAAY,cAAA,CAAe,OAAA,aAAoB,OAAA,QAQ5D;EANA,cAAA,GAAiB,mBAAA,CAAoB,OAAA;EAMf;;;AAMb;AAOX;EAbE,QAAA,GAAW,UAAA,CAAW,OAAA;;;;;;EAMtB,SAAA;AAAA;;;;;KAOU,cAAA;EAmBA;;;;EAdV,SAAA,EAAW,KAAK;IAAG,IAAA;IAAc,MAAA;IAAgB,KAAA;EAAA,IAoBhC;EAlBjB,OAAA,YAcA;EAZA,KAAA,YAYe;EAVf,MAAA;AAAA;;;;;;KAQU,cAAA;EAYF,0CAVR,IAAA,EAAM,QAAA,CAAS,OAAA,GAkBL;EAhBV,MAAA,EAAQ,WAAA,CAAY,OAAA,GAgBA;EAdpB,MAAA,EAAQ,SAAA,IA8BD;EA5BP,KAAA,UAmC2B;EAjC3B,MAAA,WAUqB;EARrB,QAAA;AAAA;;;;;;KAQU,UAAA;EAgBH,0CAdP,SAAA,UAgBA;EAdA,KAAA,UAmBa;EAjBb,WAAA,UAiB2B;EAf3B,WAAA;EAEA,QAAA;EAEA,SAAA;EAEA,MAAA;EAEA,KAAA,EAAO,cAAA,CAAe,OAAA;EAEtB,QAAA;;;;;EAKA,UAAA,GAAa,cAAA;AAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { EvalCase, EvalCaseResult, EvalJudge, EvalOptions, EvalReport, EvalScore, EvalScorer, EvalScorerContext } from "./eval.type.mjs";
|
|
2
2
|
import { AgentContract, AgentEventHandler } from "./agent.contract.mjs";
|
|
3
|
-
import { AgentExecuteOptions } from "./agent-options.type.mjs";
|
|
3
|
+
import { AgentExecuteOptions, AgentResumeOptions } from "./agent-options.type.mjs";
|
|
4
|
+
import { AgentSnapshot, AgentSnapshotStatus } from "./agent-snapshot.type.mjs";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { OutboundPolicy } from "../security/outbound-policy.type.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../@warlock.js/ai/src/contracts/attachment-policy.type.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Trust-boundary policy for agent attachments (S1). Attachment references
|
|
6
|
+
* are frequently user-controlled (chat uploads, document-ingestion
|
|
7
|
+
* endpoints), so the framework treats server-side fetches and local reads
|
|
8
|
+
* as hostile by default.
|
|
9
|
+
*
|
|
10
|
+
* Supply it on `AgentConfig.attachmentPolicy` (factory default) or
|
|
11
|
+
* per-call `AgentExecuteOptions.attachmentPolicy` (overrides the factory
|
|
12
|
+
* one). Omitting it keeps the safe defaults: remote text fetch is denied,
|
|
13
|
+
* and bare-string local paths warn (staged deprecation).
|
|
14
|
+
*/
|
|
15
|
+
type AttachmentPolicy = {
|
|
16
|
+
/**
|
|
17
|
+
* Allow fetching a REMOTE TEXT attachment (an `http`/`https` URL given
|
|
18
|
+
* as a `{ type: "text" }` source). Default `false` — default-deny: such
|
|
19
|
+
* a fetch throws `OutboundPolicyError` unless this is enabled.
|
|
20
|
+
*
|
|
21
|
+
* URL *image* attachments are handed to the provider as a URL and are
|
|
22
|
+
* never fetched server-side, so they are unaffected by this flag.
|
|
23
|
+
*/
|
|
24
|
+
allowRemoteFetch?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* {@link OutboundPolicy} applied to a permitted remote-text fetch
|
|
27
|
+
* (scheme + host allowlist, post-DNS private-IP deny, max bytes,
|
|
28
|
+
* timeout, injectable fetch). Defaults to the strict OutboundPolicy
|
|
29
|
+
* defaults (https-only, private-IP deny on, 5 MiB cap, 10s timeout).
|
|
30
|
+
*/
|
|
31
|
+
outbound?: OutboundPolicy;
|
|
32
|
+
/**
|
|
33
|
+
* Sandbox roots for LOCAL file attachments. When set, a local path must
|
|
34
|
+
* resolve inside one of these absolute roots, else it is rejected with
|
|
35
|
+
* `OutboundPolicyError`. When omitted, local reads are not path-
|
|
36
|
+
* restricted (back-compat) — set this to confine reads to an uploads
|
|
37
|
+
* directory.
|
|
38
|
+
*/
|
|
39
|
+
allowedRoots?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Allow bare-STRING local paths (e.g. `"./notes.txt"`, `"/etc/passwd"`).
|
|
42
|
+
* Staged deprecation: today bare-string local paths are allowed but warn
|
|
43
|
+
* once (outside tests). Set `false` to hard-deny them now — the typed
|
|
44
|
+
* `{ type, source: { absolutePath } }` StorageFile route stays supported
|
|
45
|
+
* (and is gated by {@link allowedRoots}).
|
|
46
|
+
*/
|
|
47
|
+
allowBareLocalPaths?: boolean;
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { AttachmentPolicy };
|
|
51
|
+
//# sourceMappingURL=attachment-policy.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment-policy.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/attachment-policy.type.ts"],"mappings":";;;;;AAaA;;;;;;;;;KAAY,gBAAA;EAgCS;;;;;;;;EAvBnB,gBAAA;;;;;;;EAOA,QAAA,GAAW,cAAc;;;;;;;;EAQzB,YAAA;;;;;;;;EAQA,mBAAA;AAAA"}
|
|
@@ -20,8 +20,9 @@ type StorageFileShape = {
|
|
|
20
20
|
*
|
|
21
21
|
* - `string` — local file path or remote URL (auto-detected via the
|
|
22
22
|
* `https?://` prefix).
|
|
23
|
-
* - `StorageFileShape` — a `@warlock.js/core` storage file;
|
|
24
|
-
* over
|
|
23
|
+
* - `StorageFileShape` — a `@warlock.js/core` storage file; `absolutePath`
|
|
24
|
+
* wins over `url` when both are present (prefer the local file the app
|
|
25
|
+
* already has over an extra remote hop).
|
|
25
26
|
* - `{ base64, mediaType }` — raw inline bytes with an explicit IANA
|
|
26
27
|
* media type, useful for in-memory data that never touched disk.
|
|
27
28
|
*/
|
|
@@ -35,12 +36,14 @@ type AttachmentSource = string | StorageFileShape | {
|
|
|
35
36
|
* Two forms:
|
|
36
37
|
*
|
|
37
38
|
* - **Tagged form** (preferred for non-image types and for explicit
|
|
38
|
-
* intent): `{ type: "image" | "text", source }`.
|
|
39
|
+
* intent): `{ type: "image" | "text" | "pdf" | "audio", source }`.
|
|
39
40
|
* - **Shorthand string / StorageFileShape**: the agent infers the
|
|
40
|
-
* media kind from the file extension. Recognized image
|
|
41
|
-
* `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`.
|
|
42
|
-
*
|
|
43
|
-
* ambiguous inputs causes silent
|
|
41
|
+
* media kind from the file extension. Recognized: image
|
|
42
|
+
* (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`), text (`.txt`), pdf
|
|
43
|
+
* (`.pdf`), audio (`.mp3`, `.wav`, `.m4a`, `.ogg`, `.weba`). Anything
|
|
44
|
+
* else throws — silent inference for ambiguous inputs causes silent
|
|
45
|
+
* bugs. The model must declare the matching capability
|
|
46
|
+
* (`vision` / `pdf` / `audio`) or the agent rejects the attachment.
|
|
44
47
|
*
|
|
45
48
|
* @example
|
|
46
49
|
* // Shorthand — extension-inferred image
|
|
@@ -69,6 +72,12 @@ type Attachment = string | StorageFileShape | {
|
|
|
69
72
|
} | {
|
|
70
73
|
type: "text";
|
|
71
74
|
source: AttachmentSource;
|
|
75
|
+
} | {
|
|
76
|
+
type: "pdf";
|
|
77
|
+
source: AttachmentSource;
|
|
78
|
+
} | {
|
|
79
|
+
type: "audio";
|
|
80
|
+
source: AttachmentSource;
|
|
72
81
|
};
|
|
73
82
|
/**
|
|
74
83
|
* A normalized attachment after source resolution — a tagged value the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/attachment.type.ts"],"mappings":";;AAUA;;;;AAIc;
|
|
1
|
+
{"version":3,"file":"attachment.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/attachment.type.ts"],"mappings":";;AAUA;;;;AAIc;AAgBd;;;;KApBY,gBAAA;EAuBN,6BArBJ,GAAA,WAqB6B;EAnB7B,YAAY;AAAA;;;;;;;;;;;;;;KAgBF,gBAAA,YAER,gBAAgB;EACd,MAAA;EAAgB,SAAA;AAAA;;;;;;;AA4CuB;AAgB7C;;;;;;;;;;;;AAG8C;;;;;;;;;;;;;;;;;KAzBlC,UAAA,YAER,gBAAA;EACE,IAAA;EAAe,MAAA,EAAQ,gBAAA;AAAA;EACvB,IAAA;EAAc,MAAA,EAAQ,gBAAA;AAAA;EACtB,IAAA;EAAa,MAAA,EAAQ,gBAAA;AAAA;EACrB,IAAA;EAAe,MAAA,EAAQ,gBAAA;AAAA;;;;;;;;;;;;;;;KAgBjB,kBAAA;EACN,IAAA;EAAa,KAAA;AAAA;EACb,IAAA;EAAc,KAAA;AAAA;EACd,IAAA;EAAgB,KAAA;EAAe,SAAA;AAAA"}
|
|
@@ -34,22 +34,31 @@ type ContentPart = {
|
|
|
34
34
|
} | {
|
|
35
35
|
type: "image";
|
|
36
36
|
source: ImageSource;
|
|
37
|
+
} | {
|
|
38
|
+
type: "pdf";
|
|
39
|
+
source: BinarySource;
|
|
40
|
+
} | {
|
|
41
|
+
type: "audio";
|
|
42
|
+
source: BinarySource;
|
|
37
43
|
};
|
|
38
44
|
/**
|
|
39
|
-
* Where
|
|
45
|
+
* Where binary media bytes live in a resolved `ContentPart`.
|
|
40
46
|
*
|
|
41
47
|
* - `{ url }` — remote URL the provider can fetch directly. Used for
|
|
42
48
|
* public URLs and StorageFile entries that already expose a URL.
|
|
43
49
|
* - `{ base64, mediaType }` — inlined base64 bytes with an explicit
|
|
44
|
-
* IANA media type (e.g. `"image/png"`
|
|
45
|
-
*
|
|
50
|
+
* IANA media type (e.g. `"image/png"`, `"application/pdf"`,
|
|
51
|
+
* `"audio/mpeg"`). Used for local file paths and StorageFile entries
|
|
52
|
+
* with only an absolute path.
|
|
46
53
|
*/
|
|
47
|
-
type
|
|
54
|
+
type BinarySource = {
|
|
48
55
|
url: string;
|
|
49
56
|
} | {
|
|
50
57
|
base64: string;
|
|
51
58
|
mediaType: string;
|
|
52
59
|
};
|
|
60
|
+
/** Image bytes for an `{ type: "image" }` part. Alias of {@link BinarySource}. */
|
|
61
|
+
type ImageSource = BinarySource;
|
|
53
62
|
//#endregion
|
|
54
|
-
export { ContentPart, ImageSource };
|
|
63
|
+
export { BinarySource, ContentPart, ImageSource };
|
|
55
64
|
//# sourceMappingURL=content-part.type.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-part.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/content-part.type.ts"],"mappings":";;AA6BA
|
|
1
|
+
{"version":3,"file":"content-part.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/content-part.type.ts"],"mappings":";;AA6BA;;;;;;;;;;;;;;;;;;;;AAIyC;AAYzC;;;;;;;KAhBY,WAAA;EACN,IAAA;EAAc,IAAA;AAAA;EACd,IAAA;EAAe,MAAA,EAAQ,WAAA;AAAA;EACvB,IAAA;EAAa,MAAA,EAAQ,YAAA;AAAA;EACrB,IAAA;EAAe,MAAA,EAAQ,YAAA;AAAA;;;;;;;;;;;KAYjB,YAAA;EAAiB,GAAA;AAAA;EAAkB,MAAA;EAAgB,SAAA;AAAA;;KAGnD,WAAA,GAAc,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor-events.type.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/events/supervisor-events.type.ts"],"mappings":";;;;;;;;;KAWY,yBAAA;EACV,cAAA;EACA,KAAA,EAAO,eAAe;AAAA;;KAIZ,kCAAA;EAAuC,SAAS;AAAA;;KAGhD,+BAAA;EAAoC,SAAS;AAAA;;KAG7C,8BAAA;EACV,SAAA;EACA,IAAA,EAAM,IAAI;EACV,SAAA;EACA,UAAA;AAAA;
|
|
1
|
+
{"version":3,"file":"supervisor-events.type.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/events/supervisor-events.type.ts"],"mappings":";;;;;;;;;KAWY,yBAAA;EACV,cAAA;EACA,KAAA,EAAO,eAAe;AAAA;;KAIZ,kCAAA;EAAuC,SAAS;AAAA;;KAGhD,+BAAA;EAAoC,SAAS;AAAA;;KAG7C,8BAAA;EACV,SAAA;EACA,IAAA,EAAM,IAAI;EACV,SAAA;EACA,UAAA;AAAA;AAPF;AAAA,KAWY,8BAAA;EACV,SAAA;EACA,MAAA;EACA,KAAA;AAAA;;;;;;KAQU,+BAAA;EACV,SAAA;EACA,MAAA;EACA,KAAA;AAAA;AAdF;AAAA,KAkBY,+BAAA;EACV,SAAA;EACA,MAAA;EACA,MAAA;EACA,KAAA;IAAS,KAAA;IAAe,MAAA;IAAgB,KAAA;EAAA;EACxC,QAAA;AAAA;;;;;;KAQU,4BAAA;EACV,SAAA;EACA,MAAA;EACA,KAAA,EAAO,OAAO;AAAA;;;;;;KAQJ,mCAAA;EAAwC,SAAS;AAAA;;AAnBnD;AAQV;;;;;KAoBY,oCAAA;EACV,KAAK;AAAA;;AAlBS;AAQhB;;;;KAmBY,oCAAA;EACV,MAAA;IAAU,MAAA;IAAiB,SAAA;IAAoB,UAAA;EAAA;EAC/C,MAAA;EACA,OAAA;EACA,MAAA;EACA,QAAA;EACA,KAAA,GAAQ,KAAK;AAAA;;;;;;KAQH,iCAAA;EACV,KAAA,EAAO,OAAO;AAAA;;AATD;AAQf;;;;KAUY,6BAAA;EACV,KAAK;AAAA;;;AAAA;AAQP;;KAAY,6BAAA;EACV,MAAA;EACA,KAAA,GAAQ,KAAA;EACR,QAAA;EACA,KAAA,GAAQ,OAAO;AAAA;;KAIL,gCAAA;EACV,SAAA;EACA,OAAA,EAAS,cAAc;AAAA;;;;;KAOb,mCAAA;EACV,SAAA;EACA,QAAA,EAAU,iBAAiB;AAAA;AAF7B;AAAA,KAMY,0BAAA;EACV,WAAA;EACA,MAAM;AAAA;;KAII,0BAAA;EACV,MAAA,EAAQ,gBAAgB,CAAC,OAAA;AAAA;AAP3B;;;;AAAA,KAcY,sBAAA;EAA2B,KAAA,EAAO,OAAO;AAAA"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Usage } from "./result/usage.type.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../@warlock.js/ai/src/contracts/image-model.contract.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* USD pricing for an image-generation model. Image providers meter one
|
|
6
|
+
* of two ways, and this single shape covers both so the cost rolls up
|
|
7
|
+
* through the same `Usage.cost` path the text models already use — no
|
|
8
|
+
* second accounting path (only a different INPUT unit).
|
|
9
|
+
*
|
|
10
|
+
* - **Token-metered** (OpenAI `gpt-image-1` family): the request bills
|
|
11
|
+
* per input/output token exactly like a chat model. Set `input` /
|
|
12
|
+
* `output` (USD per 1M tokens) and the framework prices the returned
|
|
13
|
+
* token `Usage` with the standard {@link computeCost} math.
|
|
14
|
+
* - **Per-image-metered** (DALL·E, Google Imagen): the request bills a
|
|
15
|
+
* flat amount per generated image, with no token usage. Set `perImage`
|
|
16
|
+
* (USD per image), optionally overridden per requested size via
|
|
17
|
+
* `perImageBySize`.
|
|
18
|
+
*
|
|
19
|
+
* When BOTH families' fields are set, per-image wins (a provider is one
|
|
20
|
+
* or the other, never both). When nothing is set, `Usage.cost` stays
|
|
21
|
+
* `undefined` — honest "cost unknown", not a false zero.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // gpt-image-1 — token-metered:
|
|
25
|
+
* const pricing: ImageModelPricing = { input: 5, output: 40 };
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // DALL·E 3 — per-image, size-tiered:
|
|
29
|
+
* const pricing: ImageModelPricing = {
|
|
30
|
+
* perImage: 0.04,
|
|
31
|
+
* perImageBySize: { "1024x1024": 0.04, "1792x1024": 0.08, "1024x1792": 0.08 },
|
|
32
|
+
* };
|
|
33
|
+
*/
|
|
34
|
+
type ImageModelPricing = {
|
|
35
|
+
/** USD per 1M input (prompt) tokens — token-metered models only. */input?: number; /** USD per 1M output (image) tokens — token-metered models only. */
|
|
36
|
+
output?: number; /** Flat USD per generated image — per-image-metered models. */
|
|
37
|
+
perImage?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Per-size USD-per-image overrides, keyed by the requested `size`
|
|
40
|
+
* label (e.g. `"1024x1024"`). When the resolved request size is a key
|
|
41
|
+
* here, it wins over the flat `perImage`. Lets one model price its
|
|
42
|
+
* size tiers (DALL·E 3 HD/large sizes cost more) without a second
|
|
43
|
+
* model instance.
|
|
44
|
+
*/
|
|
45
|
+
perImageBySize?: Record<string, number>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* One generated image, normalized to a discriminated shape so callers
|
|
49
|
+
* never have to probe which field a provider populated.
|
|
50
|
+
*
|
|
51
|
+
* - `{ type: "url" }` — a remote URL the provider hosts (DALL·E with
|
|
52
|
+
* `response_format: "url"`); URLs are typically short-lived, so
|
|
53
|
+
* download promptly if you need to persist the bytes.
|
|
54
|
+
* - `{ type: "base64" }` — inlined base64 bytes with an explicit IANA
|
|
55
|
+
* `mediaType` (the GPT-image family and Imagen always return bytes).
|
|
56
|
+
*
|
|
57
|
+
* `revisedPrompt` carries the provider's rewritten prompt when prompt
|
|
58
|
+
* enhancement ran (OpenAI `revised_prompt`, Imagen `enhancedPrompt`).
|
|
59
|
+
*/
|
|
60
|
+
type GeneratedImage = {
|
|
61
|
+
type: "url";
|
|
62
|
+
url: string;
|
|
63
|
+
mediaType?: string;
|
|
64
|
+
revisedPrompt?: string;
|
|
65
|
+
} | {
|
|
66
|
+
type: "base64";
|
|
67
|
+
base64: string;
|
|
68
|
+
mediaType: string;
|
|
69
|
+
revisedPrompt?: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Options for a single {@link ImageModelContract.generate} request.
|
|
73
|
+
* Every field is optional and provider-neutral; each adapter maps the
|
|
74
|
+
* ones its API supports and ignores the rest. Provider-specific knobs
|
|
75
|
+
* ride the index signature.
|
|
76
|
+
*/
|
|
77
|
+
type ImageGenerationOptions = {
|
|
78
|
+
/** How many images to generate. Adapters clamp to the provider's max. */count?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Requested pixel size as `"WxH"` (e.g. `"1024x1024"`). Forwarded to
|
|
81
|
+
* the provider's size param AND used to resolve `perImageBySize`
|
|
82
|
+
* pricing. Mutually-informative with `aspectRatio` — pass whichever
|
|
83
|
+
* the target provider speaks (OpenAI = size, Imagen = aspectRatio).
|
|
84
|
+
*/
|
|
85
|
+
size?: string; /** Quality tier (e.g. `"standard"` / `"hd"` / `"low"` / `"high"`). */
|
|
86
|
+
quality?: string; /** Aspect ratio (e.g. `"1:1"`, `"16:9"`) — ratio-based providers (Imagen). */
|
|
87
|
+
aspectRatio?: string; /** Concepts to steer the image away from (Imagen `negativePrompt`). */
|
|
88
|
+
negativePrompt?: string; /** Output container hint (`"png"` / `"jpeg"` / `"webp"`). */
|
|
89
|
+
format?: string; /** Cancellation handle wired into the provider request where supported. */
|
|
90
|
+
signal?: AbortSignal; /** Provider-specific escape hatch — forwarded verbatim. */
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Raw result of an {@link ImageModelContract.generate} call. Low-level,
|
|
95
|
+
* like `EmbedderContract.embed` — it returns the images plus token
|
|
96
|
+
* `Usage` (zeroed for per-image-metered providers) and THROWS a typed
|
|
97
|
+
* `AIError` on failure. The never-throws `{ data, error, usage, report }`
|
|
98
|
+
* envelope is added one layer up by the `ai.image()` facade verb.
|
|
99
|
+
*/
|
|
100
|
+
type ImageGenerationResponse = {
|
|
101
|
+
images: GeneratedImage[];
|
|
102
|
+
/**
|
|
103
|
+
* Token usage when the provider meters per token (gpt-image-1);
|
|
104
|
+
* `{ input: 0, output: 0, total: 0 }` for per-image-metered providers
|
|
105
|
+
* (DALL·E, Imagen), whose spend is priced from the image count via
|
|
106
|
+
* {@link ImageModelPricing.perImage}.
|
|
107
|
+
*/
|
|
108
|
+
usage: Usage;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Provider-neutral contract for an image-generation model — the output
|
|
112
|
+
* counterpart to {@link EmbedderContract}. Produced by an adapter's
|
|
113
|
+
* optional `image?(config)` factory and handed to the `ai.image()`
|
|
114
|
+
* facade verb, which wraps `generate()` into the uniform result
|
|
115
|
+
* envelope, prices it, builds the report, and routes it to observers.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* const model = openai.image({ name: "gpt-image-1" });
|
|
119
|
+
* const { images, usage } = await model.generate("a red bicycle on a white background");
|
|
120
|
+
*/
|
|
121
|
+
interface ImageModelContract {
|
|
122
|
+
/** Image model identifier (e.g. `"gpt-image-1"`, `"imagen-4.0-generate-001"`). */
|
|
123
|
+
readonly name: string;
|
|
124
|
+
/** Provider this model belongs to (e.g. `"openai"`, `"google"`). */
|
|
125
|
+
readonly provider: string;
|
|
126
|
+
/**
|
|
127
|
+
* Per-million-token OR per-image USD pricing. When set, `ai.image()`
|
|
128
|
+
* computes `Usage.cost` at emit time so image spend rolls up through
|
|
129
|
+
* the same report tree as text spend. Resolution mirrors the chat
|
|
130
|
+
* models: per-model `pricing` > SDK registry > undefined.
|
|
131
|
+
*/
|
|
132
|
+
readonly pricing?: ImageModelPricing;
|
|
133
|
+
/**
|
|
134
|
+
* Generate one or more images from a text prompt. Returns the
|
|
135
|
+
* normalized images plus usage, or throws a typed `AIError` (auth,
|
|
136
|
+
* rate-limit, content-filter, invalid-request) — caught and surfaced
|
|
137
|
+
* on `result.error` by the `ai.image()` facade.
|
|
138
|
+
*/
|
|
139
|
+
generate(prompt: string, options?: ImageGenerationOptions): Promise<ImageGenerationResponse>;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Configuration passed to an adapter's `image()` factory. Mirrors
|
|
143
|
+
* {@link EmbedderConfig}: `name` plus an optional per-model `pricing`
|
|
144
|
+
* override and provider-specific keys on the index signature.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* openai.image({ name: "dall-e-3", pricing: { perImage: 0.04 } });
|
|
148
|
+
*/
|
|
149
|
+
type ImageModelConfig = {
|
|
150
|
+
name: string; /** Per-model USD pricing override; wins over the SDK-level registry. */
|
|
151
|
+
pricing?: ImageModelPricing;
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
//#endregion
|
|
155
|
+
export { GeneratedImage, ImageGenerationOptions, ImageGenerationResponse, ImageModelConfig, ImageModelContract, ImageModelPricing };
|
|
156
|
+
//# sourceMappingURL=image-model.contract.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-model.contract.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/image-model.contract.ts"],"mappings":";;;;;AAgCA;;;;;;;;;;AAcyB;AAgBzB;;;;;;;;;;;;;AAEsE;AAQtE;;;KAxCY,iBAAA;EA0CV,oEAxCA,KAAA,WAiDA;EA/CA,MAAA,WAmDA;EAjDA,QAAA;EAqDA;;;;AAEY;AAUd;;EAzDE,cAAA,GAAiB,MAAM;AAAA;;;;;;AAiEX;AAcd;;;;;;;KA/DY,cAAA;EACN,IAAA;EAAa,GAAA;EAAa,SAAA;EAAoB,aAAA;AAAA;EAC9C,IAAA;EAAgB,MAAA;EAAgB,SAAA;EAAmB,aAAA;AAAA;;;AAgFoC;AAW7F;;;KAnFY,sBAAA;EAoFV,yEAlFA,KAAA;EAoFU;;;AACE;;;EA9EZ,IAAA;EAEA,OAAA;EAEA,WAAA;EAEA,cAAA;EAEA,MAAA;EAEA,MAAA,GAAS,WAAW;GAEnB,GAAA;AAAA;;;;;;;;KAUS,uBAAA;EACV,MAAA,EAAQ,cAAA;;;;;;;EAOR,KAAA,EAAO,KAAK;AAAA;;;;;;;;;;;;UAcG,kBAAA;;WAEN,IAAA;;WAEA,QAAA;;;;;;;WAOA,OAAA,GAAU,iBAAA;;;;;;;EAQnB,QAAA,CAAS,MAAA,UAAgB,OAAA,GAAU,sBAAA,GAAyB,OAAA,CAAQ,uBAAA;AAAA;;;;;;;;;KAW1D,gBAAA;EACV,IAAA;EAEA,OAAA,GAAU,iBAAiB;EAAA,CAC1B,GAAA;AAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AttachmentPolicy } from "./attachment-policy.type.mjs";
|
|
1
2
|
import { Attachment, AttachmentSource, ResolvedAttachment, StorageFileShape } from "./attachment.type.mjs";
|
|
2
|
-
import { ContentPart, ImageSource } from "./content-part.type.mjs";
|
|
3
|
+
import { BinarySource, ContentPart, ImageSource } from "./content-part.type.mjs";
|
|
3
4
|
import { ModelToolCallRequest } from "./model-tool-call-request.type.mjs";
|
|
4
5
|
import { Message } from "./conversation-message.type.mjs";
|
|
5
6
|
import { ModelPricing } from "./result/model-pricing.type.mjs";
|
|
@@ -10,7 +11,7 @@ import { BaseReport, REPORT_SCHEMA_VERSION, ReportStatus, ReportType } from "./r
|
|
|
10
11
|
import { FinishReason } from "./finish-reason.type.mjs";
|
|
11
12
|
import { ToolCall } from "./result/tool-call.type.mjs";
|
|
12
13
|
import { LLMTrip } from "./result/llm-trip.type.mjs";
|
|
13
|
-
import { AgentReport, ExecutionReport, ExecutionStatus } from "./result/execution-report.type.mjs";
|
|
14
|
+
import { AgentReport, CapturedMessage, ExecutionReport, ExecutionStatus } from "./result/execution-report.type.mjs";
|
|
14
15
|
import { AgentResult } from "./result/agent-result.type.mjs";
|
|
15
16
|
import { AgentCompletedPayload, AgentErrorPayload, AgentStartingPayload, AgentStreamingPayload, AgentToolCalledPayload, AgentToolCallingFailedPayload, AgentToolCallingPayload, AgentTripCompletedPayload, AgentTripStartedPayload, ToolEventMeta } from "./events/agent-events.type.mjs";
|
|
16
17
|
import { EventIdentity, WithoutIdentity } from "./events/event-identity.type.mjs";
|
|
@@ -40,7 +41,7 @@ import { MiddlewareState } from "./middleware/middleware-state.type.mjs";
|
|
|
40
41
|
import { MiddlewareAgentRef, MiddlewareExecuteContext, MiddlewareModelRef, MiddlewareSupervisorContext, MiddlewareSupervisorRef, MiddlewareToolContext, MiddlewareTripContext } from "./middleware/middleware-context.type.mjs";
|
|
41
42
|
import { AgentMiddleware, AgentMiddlewareExecuteHooks, AgentMiddlewareSupervisorHooks, AgentMiddlewareToolHooks, AgentMiddlewareTripHooks } from "./middleware/middleware.contract.mjs";
|
|
42
43
|
import { Placeholders } from "./placeholders.type.mjs";
|
|
43
|
-
import { InstructionContract, PersonaContract, SystemPromptBlockContract, SystemPromptContract } from "./system-prompt.contract.mjs";
|
|
44
|
+
import { InstructionContract, PersonaContract, SystemPromptBlockContract, SystemPromptContract, SystemPromptMergeOptions, SystemPromptMergeSource, SystemPromptMeta } from "./system-prompt.contract.mjs";
|
|
44
45
|
import { RouteContext } from "./supervisor/route-context.type.mjs";
|
|
45
46
|
import { AckCallback, AckConfig, AckEntry, AckRunEntry } from "./supervisor/ack-entry.type.mjs";
|
|
46
47
|
import { DispatchRawResult, IntentCallback, IntentEntry, IntentRunEntry, SupervisorIntentValue } from "./supervisor/intent-entry.type.mjs";
|
|
@@ -59,13 +60,16 @@ import { SupervisorAgentCompletedPayload, SupervisorAgentFailedPayload, Supervis
|
|
|
59
60
|
import { WorkflowCancelledPayload, WorkflowCompletedPayload, WorkflowErrorPayload, WorkflowLoopWarningPayload, WorkflowStartingPayload, WorkflowStepCompletedPayload, WorkflowStepFailedPayload, WorkflowStepRetryingPayload, WorkflowStepSkippedPayload, WorkflowStepStartingPayload, WorkflowStepStreamingPayload } from "./events/workflow-events.type.mjs";
|
|
60
61
|
import { AgentEventMap, SupervisorEventMap, WorkflowEventMap } from "./events/event-map.type.mjs";
|
|
61
62
|
import { StreamingToolGuardConfig } from "./streaming-tool-guard-config.type.mjs";
|
|
62
|
-
import { AgentExecuteOptions } from "./agent/agent-options.type.mjs";
|
|
63
|
+
import { AgentExecuteOptions, AgentResumeOptions } from "./agent/agent-options.type.mjs";
|
|
64
|
+
import { AgentSnapshot, AgentSnapshotStatus } from "./agent/agent-snapshot.type.mjs";
|
|
63
65
|
import { EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage } from "./embedder.contract.mjs";
|
|
66
|
+
import { GeneratedImage, ImageGenerationOptions, ImageGenerationResponse, ImageModelConfig, ImageModelContract, ImageModelPricing } from "./image-model.contract.mjs";
|
|
64
67
|
import { MemoryItem, MemoryTier, RecalledMemory } from "./memory/memory-item.type.mjs";
|
|
65
68
|
import { RecallOptions } from "./memory/recall-options.type.mjs";
|
|
66
69
|
import { MemoryContract } from "./memory/memory.contract.mjs";
|
|
67
70
|
import { MemoryConfig, SemanticMemoryConfig } from "./memory/memory-config.type.mjs";
|
|
68
71
|
import { CheckpointRecord, CheckpointStore } from "./orchestrator/checkpoint-store.contract.mjs";
|
|
72
|
+
import { SessionLock } from "./orchestrator/session-lock.contract.mjs";
|
|
69
73
|
import { OrchestratorCommands } from "./orchestrator/orchestrator-commands.type.mjs";
|
|
70
74
|
import { OrchestratorEvent, OrchestratorEventHandler, OrchestratorEventHandlers, OrchestratorEventMap, OrchestratorEventName } from "./orchestrator/orchestrator-event.type.mjs";
|
|
71
75
|
import { OrchestratorExecuteOptions, OrchestratorResumeOptions } from "./orchestrator/orchestrator-execute-options.type.mjs";
|
|
@@ -73,11 +77,14 @@ import { OrchestratorAsToolOptions, OrchestratorContract, OrchestratorSessionSco
|
|
|
73
77
|
import { OrchestratorConfig, OrchestratorMemoryConfig, SummarizeCallback, SummarizeConfig } from "./orchestrator/orchestrator-config.type.mjs";
|
|
74
78
|
import { SessionContract } from "./orchestrator/session.contract.mjs";
|
|
75
79
|
import { PlannerCapability } from "./planner/planner-capability.type.mjs";
|
|
76
|
-
import { PlannerConfig } from "./planner/planner-config.type.mjs";
|
|
77
|
-
import { PlannerExecuteOptions } from "./planner/planner-execute-options.type.mjs";
|
|
78
80
|
import { PlannerPlan, PlannerStep } from "./planner/planner-plan.type.mjs";
|
|
79
81
|
import { PlannerReport, PlannerReportType, PlannerResult, PlannerStepSnapshot } from "./planner/planner-result.type.mjs";
|
|
82
|
+
import { PlannerSnapshot, PlannerSnapshotStatus } from "./planner/planner-snapshot.type.mjs";
|
|
83
|
+
import { PlannerConfig } from "./planner/planner-config.type.mjs";
|
|
84
|
+
import { PlannerExecuteOptions, PlannerResumeOptions, PlannerStepDirective } from "./planner/planner-execute-options.type.mjs";
|
|
80
85
|
import { PlannerContract } from "./planner/planner.contract.mjs";
|
|
86
|
+
import { GeneratedAudio, SpeechGenerationResponse, SpeechModelConfig, SpeechModelContract, SpeechModelPricing, SpeechOptions } from "./speech-model.contract.mjs";
|
|
87
|
+
import { AudioInput, TranscribeOptions, TranscriptionModelConfig, TranscriptionModelContract, TranscriptionModelPricing, TranscriptionResponse, TranscriptionSegment } from "./transcription-model.contract.mjs";
|
|
81
88
|
import { ModelConfig, SDKAdapterContract } from "./sdk-adapter.contract.mjs";
|
|
82
89
|
import { CompleteEvent } from "./events/complete-event.type.mjs";
|
|
83
90
|
import { UsageEvent } from "./events/usage-event.type.mjs";
|
|
@@ -116,17 +116,20 @@ type ModelCapabilities = {
|
|
|
116
116
|
*/
|
|
117
117
|
promptCaching?: boolean;
|
|
118
118
|
/**
|
|
119
|
-
* True when the adapter accepts audio `ContentPart` input.
|
|
120
|
-
*
|
|
121
|
-
* throws upfront rather than dropping them at the wire
|
|
122
|
-
* `vision`).
|
|
119
|
+
* True when the adapter accepts audio `ContentPart` input (A2). The
|
|
120
|
+
* agent gates `{ type: "audio" }` attachments on this flag — when
|
|
121
|
+
* false/absent it throws upfront rather than dropping them at the wire
|
|
122
|
+
* layer (mirrors `vision`). Wired end-to-end: audio `ContentPart` +
|
|
123
|
+
* attachment resolution exist; today Google (Gemini, via `inlineData`)
|
|
124
|
+
* declares it.
|
|
123
125
|
*/
|
|
124
126
|
audio?: boolean;
|
|
125
127
|
/**
|
|
126
|
-
* True when the adapter accepts PDF / document `ContentPart` input.
|
|
127
|
-
*
|
|
128
|
-
* throws upfront
|
|
129
|
-
* `
|
|
128
|
+
* True when the adapter accepts PDF / document `ContentPart` input (A2).
|
|
129
|
+
* The agent gates `{ type: "pdf" }` attachments on this flag — when
|
|
130
|
+
* false/absent it throws upfront (mirrors `vision`). Wired end-to-end:
|
|
131
|
+
* Anthropic (`document` block), Bedrock Converse (`document` block), and
|
|
132
|
+
* Google (Gemini `inlineData`) map PDF parts.
|
|
130
133
|
*/
|
|
131
134
|
pdf?: boolean;
|
|
132
135
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.contract.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/model.contract.ts"],"mappings":";;;;;;;;;;AAqBA;;;;;;;;;;;;KAAY,gBAAA;EACV,WAAA;EACA,SAAA,WAkBA;EAhBA,KAAA,GAAQ,UAAA;EA2BR;;;;;;;;EAlBA,cAAA,GAAiB,MAAA;EA6CP;;;;AAAe;AAY3B;EAlDE,MAAA,GAAS,WAAA;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"model.contract.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/model.contract.ts"],"mappings":";;;;;;;;;;AAqBA;;;;;;;;;;;;KAAY,gBAAA;EACV,WAAA;EACA,SAAA,WAkBA;EAhBA,KAAA,GAAQ,UAAA;EA2BR;;;;;;;;EAlBA,cAAA,GAAiB,MAAA;EA6CP;;;;AAAe;AAY3B;EAlDE,MAAA,GAAS,WAAA;;;;;;;;;;AA+FN;EApFH,SAAA;IACE,MAAA,GAAS,eAAA;IACT,SAAA;EAAA;EAkGK;;;;;;;;;;;EArFP,YAAA;IACE,WAAA;EAAA,GAkGwB;EAAA,CA/FzB,GAAA;AAAA;;;;;;KAQS,eAAA;;;;;;;;;;;KAYA,iBAAA;EA0FgD;AAAA;AAgB5D;;;;EAnGE,gBAAA;EA8HmB;;;;;;;EAtHnB,MAAA;EA2HsE;;;;;;EApHtE,SAAA;EA0GmB;;;;;EApGnB,aAAA;EAyG2D;;;;;;;;EAhG3D,KAAA;EAqGuF;AAAA;;;;;;EA7FvF,GAAA;AAAA;;;;;;;;;;;KAaU,aAAA;EACV,OAAA;EACA,YAAA,EAAc,YAAA;EACd,KAAA,EAAO,KAAA;EAEP,SAAA,GAAY,oBAAA;AAAA;;;;;;;;;;KAYF,gBAAA;EACN,IAAA;EAAe,OAAA;AAAA;EAEf,IAAA;EACA,EAAA;EACA,IAAA;EACA,KAAA;;;;;;;EAOA,gBAAA,GAAmB,MAAA;AAAA;EAEnB,IAAA;EAAc,YAAA,EAAc,YAAA;EAAc,KAAA,EAAO,KAAA;AAAA;;;;;;;;;;;;;;;UAgBtC,aAAA;;WAEN,IAAA;;WAEA,QAAA;;;;;;WAMA,YAAA,GAAe,iBAAA;;;;;;;;;;;WAYf,OAAA,GAAU,YAAA;;;;EAKnB,QAAA,CAAS,QAAA,EAAU,OAAA,IAAW,OAAA,GAAU,gBAAA,GAAmB,OAAA,CAAQ,aAAA;;;;EAKnE,MAAA,CAAO,QAAA,EAAU,OAAA,IAAW,OAAA,GAAU,gBAAA,GAAmB,aAAA,CAAc,gBAAA;AAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PgClientLike, RedisClientLike, SnapshotStore } from "./snapshot-store.contract.mjs";
|
|
2
2
|
import { CheckpointRecord, CheckpointStore } from "./checkpoint-store.contract.mjs";
|
|
3
|
+
import { SessionLock } from "./session-lock.contract.mjs";
|
|
3
4
|
import { OrchestratorCommands } from "./orchestrator-commands.type.mjs";
|
|
4
5
|
import { OrchestratorEvent, OrchestratorEventHandler, OrchestratorEventHandlers, OrchestratorEventMap, OrchestratorEventName } from "./orchestrator-event.type.mjs";
|
|
5
6
|
import { OrchestratorExecuteOptions, OrchestratorResumeOptions } from "./orchestrator-execute-options.type.mjs";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Message } from "../conversation-message.type.mjs";
|
|
2
2
|
import { AgentContract } from "../agent/agent.contract.mjs";
|
|
3
|
+
import { FlowObserveOption } from "../../observe/resolve-observers.mjs";
|
|
3
4
|
import { SnapshotStore } from "./snapshot-store.contract.mjs";
|
|
4
5
|
import { ModelContract } from "../model.contract.mjs";
|
|
5
6
|
import { SystemPromptContract } from "../system-prompt.contract.mjs";
|
|
@@ -12,6 +13,7 @@ import { CompactionResult } from "../result/orchestrator-result.type.mjs";
|
|
|
12
13
|
import { MemoryTier } from "../memory/memory-item.type.mjs";
|
|
13
14
|
import { MemoryContract } from "../memory/memory.contract.mjs";
|
|
14
15
|
import { CheckpointStore } from "./checkpoint-store.contract.mjs";
|
|
16
|
+
import { SessionLock } from "./session-lock.contract.mjs";
|
|
15
17
|
import { OrchestratorEventHandlers } from "./orchestrator-event.type.mjs";
|
|
16
18
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
17
19
|
|
|
@@ -124,7 +126,15 @@ type OrchestratorMemoryConfig = {
|
|
|
124
126
|
*/
|
|
125
127
|
type OrchestratorConfig<TOutput, TState = TOutput, TIntents extends Record<string, SupervisorIntentValue> = Record<string, SupervisorIntentValue>> = {
|
|
126
128
|
/** Stable identifier — used in logs, events, checkpoints, signature. */name: string; /** Dev-curated version string. Metadata only (§10.2) — never parsed. */
|
|
127
|
-
version?: string;
|
|
129
|
+
version?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Per-flow observability routing. `true` routes each turn's report to the
|
|
132
|
+
* globally-registered observers (even with observe-all off); `false` opts
|
|
133
|
+
* out; an `Observer` is a flow-local collector; omitted follows the global
|
|
134
|
+
* observe-all flag. Parity with agent/workflow/supervisor — a durable
|
|
135
|
+
* session root no longer needs a manual `observe.collect()`.
|
|
136
|
+
*/
|
|
137
|
+
observe?: FlowObserveOption; /** Prepended to the router agent's system prompt (router mode only). */
|
|
128
138
|
systemPrompt?: SystemPromptContract | string; /** Dispatchable units keyed by intent name (supervisor surface). */
|
|
129
139
|
intents: TIntents; /** Deterministic per-turn dispatch. Mutually exclusive with `router`. */
|
|
130
140
|
route?: (ctx: RouteContext<TState>) => Next | Promise<Next>; /** LLM-driven dispatch. Mutually exclusive with `route`. */
|
|
@@ -151,7 +161,26 @@ type OrchestratorConfig<TOutput, TState = TOutput, TIntents extends Record<strin
|
|
|
151
161
|
}; /** Automatic post-turn compaction policy (§12). */
|
|
152
162
|
summarize?: SummarizeConfig | SummarizeCallback; /** Number of turn snapshots to retain per session. Default 100. */
|
|
153
163
|
keepSnapshots?: number | "all"; /** Durable session-state store. Falls back to `ai.config({ defaultCheckpointStore })`. */
|
|
154
|
-
checkpointStore?: CheckpointStore;
|
|
164
|
+
checkpointStore?: CheckpointStore;
|
|
165
|
+
/**
|
|
166
|
+
* Per-session turn serialization (C4). Each `execute` / `stream` /
|
|
167
|
+
* `resume` turn runs under `sessionLock.withLock(sessionId, …)` so a
|
|
168
|
+
* concurrent same-session turn can't race the checkpoint's read-modify-
|
|
169
|
+
* write and lose an update.
|
|
170
|
+
*
|
|
171
|
+
* - Omitted (default) → an in-process mutex keyed by `sessionId`. Fully
|
|
172
|
+
* serializes same-session turns within ONE process; for a
|
|
173
|
+
* horizontally-scaled deployment supply a distributed lock instead.
|
|
174
|
+
* - A {@link SessionLock} → your own (e.g. Redis/Postgres advisory
|
|
175
|
+
* locks) for cross-process serialization.
|
|
176
|
+
* - `false` → no locking. Only when an external mechanism (sticky
|
|
177
|
+
* routing, single-writer guarantee) already serializes the session.
|
|
178
|
+
*
|
|
179
|
+
* When a durable `checkpointStore` is configured but no explicit lock
|
|
180
|
+
* is supplied, the orchestrator warns once (outside tests) that the
|
|
181
|
+
* in-process default does not protect across processes.
|
|
182
|
+
*/
|
|
183
|
+
sessionLock?: SessionLock | false; /** Internal-supervisor snapshot store. Required when `iterate: true`. */
|
|
155
184
|
snapshotStore?: SnapshotStore;
|
|
156
185
|
/**
|
|
157
186
|
* Optional per-turn memory (memory core M2). When set, the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator-config.type.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/orchestrator/orchestrator-config.type.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrator-config.type.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/orchestrator/orchestrator-config.type.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;KAAY,eAAA;EAeE,qEAbZ,UAAA,WAEA;EAAA,IAAA,WAEa;EAAb,UAAA,GAAa,aAAA;EAOC;;;;;EADd,SAAA,IACE,UAAA,EAAY,gBAAA,EACZ,GAAA;IAAO,SAAA;EAAA,MACJ,OAAA,eAEW;EAAhB,IAAA;IAAS,OAAA;EAAA;AAAA;;;;;;;KASC,iBAAA,IACV,OAAA,EAAS,OAAA,OACN,OAAA,CAAQ,gBAAA,IAAoB,gBAAA;;;;;AAAgB;AAmBjD;;;;;;;;;;;;KAAY,wBAAA;EAYR,gFAVF,KAAA,EAAO,cAAA;EAkBP;;;;;AAYS;EAvBT,MAAA;IACE,CAAA;IACA,SAAA;IACA,IAAA,GAAO,UAAA;EAAA;EAmDQ;;;;;;EA3CjB,QAAA;EAkEc;;;;;EA5Dd,YAAA,GAAe,UAAA;EA8DmB;;;;;EAxDlC,SAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BU,kBAAA,mBAED,OAAA,mBACQ,MAAA,SAAe,qBAAA,IAAyB,MAAA,SAEvD,qBAAA;EAcF,wEAVA,IAAA,UAYA;EAVA,OAAA;EAaA;;;;;;;EALA,OAAA,GAAU,iBAAA,EAO4C;EALtD,YAAA,GAAe,oBAAA,WAON;EAJT,OAAA,EAAS,QAAA,EAIqC;EAF9C,KAAA,IAAS,GAAA,EAAK,YAAA,CAAa,MAAA,MAAY,IAAA,GAAO,OAAA,CAAQ,IAAA,GAK/C;EAHP,MAAA,GAAS,aAAA,YAAyB,WAAA,CAAY,MAAA,GAG5C;EADF,QAAA,IACE,GAAA,EAAK,eAAA,CAAgB,MAAA,MAClB,cAAA,GAAiB,OAAA,CAAQ,cAAA,GAAR;EAEtB,KAAA,GAAQ,MAAA,EAAR;EAEA,MAAA,GAAS,gBAAA,CAAiB,OAAA,GAA1B;EAEA,YAAA,WAF0B;EAI1B,aAAA;EAAA;;;;;EAOA,OAAA;EAO8C;;;;;EAD9C,aAAA;IACE,MAAA,cAAoB,QAAA,EAAU,OAAA,OAAc,OAAA;IAC5C,MAAA,cAAoB,QAAA,EAAU,OAAA,OAAc,OAAA;EAAA,GAQ9C;EALA,SAAA,GAAY,eAAA,GAAkB,iBAAA,EAwB9B;EAtBA,aAAA,mBAwBA;EArBA,eAAA,GAAkB,eAAA;EA+BlB;;;;;;AAG8B;;;;;;;;;;;;EAf9B,WAAA,GAAc,WAAA;EAEd,aAAA,GAAgB,aAAA;;;;;;;;;;EAUhB,MAAA,GAAS,cAAA,GAAiB,wBAAA;EAG1B,EAAA,GAAK,yBAAA;AAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region ../@warlock.js/ai/src/contracts/orchestrator/session-lock.contract.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Serializes concurrent turns for a single orchestrator session so the
|
|
4
|
+
* read-modify-write of the durable checkpoint can't lose an update
|
|
5
|
+
* (orchestrator C4). The orchestrator wraps each `execute()` / `stream()`
|
|
6
|
+
* / `resume()` turn in `withLock(sessionId, …)`.
|
|
7
|
+
*
|
|
8
|
+
* The framework default is an in-process mutex keyed by `sessionId`
|
|
9
|
+
* ({@link inProcessSessionLock}), which fully serializes same-session
|
|
10
|
+
* turns within ONE process. For a horizontally-scaled deployment (many
|
|
11
|
+
* processes / pods) supply a distributed implementation — Redis
|
|
12
|
+
* `SETNX` / Redlock, Postgres advisory locks, etc. — so the invariant
|
|
13
|
+
* holds across processes too. Set `sessionLock: false` on the config to
|
|
14
|
+
* opt out entirely (only when an external mechanism already serializes
|
|
15
|
+
* same-session turns, e.g. sticky routing).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // A Redis-backed distributed lock.
|
|
19
|
+
* const redisLock: SessionLock = {
|
|
20
|
+
* async withLock(key, fn, { signal } = {}) {
|
|
21
|
+
* await acquireRedisLock(key, { signal });
|
|
22
|
+
* try {
|
|
23
|
+
* return await fn();
|
|
24
|
+
* } finally {
|
|
25
|
+
* await releaseRedisLock(key);
|
|
26
|
+
* }
|
|
27
|
+
* },
|
|
28
|
+
* };
|
|
29
|
+
*/
|
|
30
|
+
interface SessionLock {
|
|
31
|
+
/**
|
|
32
|
+
* Acquire the lock for `key` (the sessionId), run `fn`, and release it
|
|
33
|
+
* — even if `fn` throws or rejects. Concurrent calls for the SAME key
|
|
34
|
+
* run one at a time, in arrival order; calls for DIFFERENT keys never
|
|
35
|
+
* contend.
|
|
36
|
+
*
|
|
37
|
+
* `options.signal` aborts the WAIT for the lock (never the critical
|
|
38
|
+
* section once acquired): a caller cancelled while queued rejects with
|
|
39
|
+
* the signal's reason instead of deadlocking behind a stuck holder.
|
|
40
|
+
*/
|
|
41
|
+
withLock<T>(key: string, fn: () => Promise<T>, options?: {
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}): Promise<T>;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { SessionLock };
|
|
47
|
+
//# sourceMappingURL=session-lock.contract.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-lock.contract.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/ai/src/contracts/orchestrator/session-lock.contract.ts"],"mappings":";;AA4BA;;;;;;;;;;;;;;;;;;;;;;AAec;;;;;UAfG,WAAA;;;;;;;;;;;EAWf,QAAA,IACE,GAAA,UACA,EAAA,QAAU,OAAA,CAAQ,CAAA,GAClB,OAAA;IAAY,MAAA,GAAS,WAAA;EAAA,IACpB,OAAA,CAAQ,CAAA;AAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PlannerCapability } from "./planner-capability.type.mjs";
|
|
2
|
-
import { PlannerConfig } from "./planner-config.type.mjs";
|
|
3
|
-
import { PlannerExecuteOptions } from "./planner-execute-options.type.mjs";
|
|
4
2
|
import { PlannerPlan, PlannerStep } from "./planner-plan.type.mjs";
|
|
5
3
|
import { PlannerReport, PlannerReportType, PlannerResult, PlannerStepSnapshot } from "./planner-result.type.mjs";
|
|
4
|
+
import { PlannerSnapshot, PlannerSnapshotStatus } from "./planner-snapshot.type.mjs";
|
|
5
|
+
import { PlannerConfig } from "./planner-config.type.mjs";
|
|
6
|
+
import { PlannerExecuteOptions, PlannerResumeOptions, PlannerStepDirective } from "./planner-execute-options.type.mjs";
|
|
6
7
|
import { PlannerContract } from "./planner.contract.mjs";
|