@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
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BaseReport } from "../contracts/result/base-report.type.mjs";
|
|
2
|
+
import { ExecuteResult } from "../contracts/result/execute-result.type.mjs";
|
|
3
|
+
import { FlowObserveOption } from "../observe/resolve-observers.mjs";
|
|
4
|
+
import { GeneratedImage, ImageModelContract } from "../contracts/image-model.contract.mjs";
|
|
5
|
+
|
|
6
|
+
//#region ../@warlock.js/ai/src/image/image.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Parameters for {@link image}. `model` comes from an adapter's
|
|
9
|
+
* `image()` factory (`openai.image({ name })` / `google.image({ name })`);
|
|
10
|
+
* the rest are provider-neutral generation knobs plus the standard
|
|
11
|
+
* observability seam every verb shares.
|
|
12
|
+
*/
|
|
13
|
+
type ImageParams = {
|
|
14
|
+
/** The image model to generate from (`sdk.image({ name })`). */model: ImageModelContract; /** Text description of the image(s) to generate. */
|
|
15
|
+
prompt: string; /** How many images to generate. Adapters clamp to the provider max. */
|
|
16
|
+
count?: number; /** Requested pixel size as `"WxH"` (e.g. `"1024x1024"`). */
|
|
17
|
+
size?: string; /** Quality tier (e.g. `"standard"` / `"hd"`). */
|
|
18
|
+
quality?: string; /** Aspect ratio (e.g. `"1:1"`, `"16:9"`) — ratio-based providers (Imagen). */
|
|
19
|
+
aspectRatio?: string; /** Concepts to steer away from (Imagen `negativePrompt`). */
|
|
20
|
+
negativePrompt?: string; /** Output container hint (`"png"` / `"jpeg"` / `"webp"`). */
|
|
21
|
+
format?: string; /** Cancellation handle, wired into the provider request where supported. */
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
/**
|
|
24
|
+
* Observability routing for this call — same `observe` seam as
|
|
25
|
+
* agents / workflows. `true` routes to the globally registered
|
|
26
|
+
* observers; an `Observer` object routes flow-locally; `false` opts
|
|
27
|
+
* out; omitted follows the global observe-all flag.
|
|
28
|
+
*/
|
|
29
|
+
observe?: FlowObserveOption; /** Groups this call into a session for flat cost/trace queries. */
|
|
30
|
+
sessionId?: string; /** Report node name (defaults to `"image"`). */
|
|
31
|
+
name?: string; /** Provider-specific options forwarded verbatim to the adapter. */
|
|
32
|
+
options?: Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
/** Success payload of an {@link image} run. */
|
|
35
|
+
type ImageData = {
|
|
36
|
+
/** The generated images, normalized to the discriminated shape. */images: GeneratedImage[];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The report node an {@link image} run produces — a {@link BaseReport}
|
|
40
|
+
* (`type: "image"`) plus which model ran and how many images came back,
|
|
41
|
+
* so panoptic and any flat-row consumer attribute the cost/latency
|
|
42
|
+
* without special-casing.
|
|
43
|
+
*/
|
|
44
|
+
type ImageReport = BaseReport & {
|
|
45
|
+
type: "image"; /** Identity of the image model this run used. */
|
|
46
|
+
model: {
|
|
47
|
+
name: string;
|
|
48
|
+
provider: string;
|
|
49
|
+
}; /** Number of images returned (0 on failure). */
|
|
50
|
+
imageCount: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Result envelope of {@link image} — the same uniform
|
|
54
|
+
* `{ data, error, usage, report }` every executable returns, narrowed
|
|
55
|
+
* with the `"image"` discriminant.
|
|
56
|
+
*/
|
|
57
|
+
type ImageResult = ExecuteResult<ImageData> & {
|
|
58
|
+
type: "image";
|
|
59
|
+
report: ImageReport;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Generate one or more images from a text prompt — the image-output
|
|
63
|
+
* counterpart to `ai.agent`, and the first verb of the output-modality
|
|
64
|
+
* track (Theme I). Wraps an {@link ImageModelContract} (from
|
|
65
|
+
* `openai.image(...)` / `google.image(...)`) in the framework's uniform
|
|
66
|
+
* result contract:
|
|
67
|
+
*
|
|
68
|
+
* - **Never throws.** Provider failures (auth, rate-limit,
|
|
69
|
+
* content-filter, invalid request) surface as a typed `AIError` on
|
|
70
|
+
* `result.error`; `result.data` is then `undefined`.
|
|
71
|
+
* - **Cost-truth.** When the model carries pricing, `result.usage.cost`
|
|
72
|
+
* is filled in — per-token for gpt-image-1, per-image for
|
|
73
|
+
* DALL·E / Imagen — folding into the same `Usage.cost` rollup as text.
|
|
74
|
+
* - **Observable.** The completed {@link ImageReport} routes to any
|
|
75
|
+
* registered `Observer` (panoptic, OTel, …) via the shared `observe`
|
|
76
|
+
* seam, exactly like an agent run.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* const openai = new OpenAISDK({ apiKey });
|
|
80
|
+
* const { data, error, usage } = await ai.image({
|
|
81
|
+
* model: openai.image({ name: "gpt-image-1" }),
|
|
82
|
+
* prompt: "an isometric office desk, soft studio lighting",
|
|
83
|
+
* size: "1024x1024",
|
|
84
|
+
* });
|
|
85
|
+
*
|
|
86
|
+
* if (error) console.warn(error.code);
|
|
87
|
+
* else for (const img of data.images) save(img); // { type: "base64" | "url", ... }
|
|
88
|
+
*/
|
|
89
|
+
declare function image(params: ImageParams): Promise<ImageResult>;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { ImageData, ImageParams, ImageReport, ImageResult, image };
|
|
92
|
+
//# sourceMappingURL=image.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/image/image.ts"],"mappings":";;;;;;;;AAsBA;;;;KAAY,WAAA;EAyBA,gEAvBV,KAAA,EAAO,kBAAA,EA6BS;EA3BhB,MAAA,UAFA;EAIA,KAAA,WAFA;EAIA,IAAA;EAEA,OAAA,WAEA;EAAA,WAAA,WAIA;EAFA,cAAA,WAIS;EAFT,MAAA,WASU;EAPV,MAAA,GAAS,WAAA;EAWT;;;;AAEgB;AAIlB;EAVE,OAAA,GAAU,iBAAA;EAEV,SAAA,WAUsB;EARtB,IAAA,WAiBqB;EAfrB,OAAA,GAAU,MAAA;AAAA;;KAIA,SAAA;EAcV,mEAZA,MAAA,EAAQ,cAAc;AAAA;;;AAcZ;AAQZ;;;KAbY,WAAA,GAAc,UAAU;EAClC,IAAA,WAcQ;EAZR,KAAA;IAAS,IAAA;IAAc,QAAA;EAAA,GAWvB;EATA,UAAA;AAAA;;AAUmB;AA+BrB;;;KAjCY,WAAA,GAAc,aAAA,CAAc,SAAA;EACtC,IAAA;EACA,MAAA,EAAQ,WAAA;AAAA;;;;;;;AA+B2D;;;;;;;;;;;;;;;;;;;;;;iBAA/C,KAAA,CAAM,MAAA,EAAQ,WAAA,GAAc,OAAA,CAAQ,WAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { AIError } from "../errors/ai-error.mjs";
|
|
2
|
+
import { ProviderError } from "../errors/provider-error.mjs";
|
|
3
|
+
import { generateRunId } from "../utils/generate-run-id.mjs";
|
|
4
|
+
import { REPORT_SCHEMA_VERSION } from "../contracts/result/base-report.type.mjs";
|
|
5
|
+
import { stampReportLineage } from "../utils/stamp-report-lineage.mjs";
|
|
6
|
+
import { notifyObservers } from "../observe/resolve-observers.mjs";
|
|
7
|
+
import { computeImageCost } from "./image-cost.mjs";
|
|
8
|
+
|
|
9
|
+
//#region ../@warlock.js/ai/src/image/image.ts
|
|
10
|
+
/**
|
|
11
|
+
* Generate one or more images from a text prompt — the image-output
|
|
12
|
+
* counterpart to `ai.agent`, and the first verb of the output-modality
|
|
13
|
+
* track (Theme I). Wraps an {@link ImageModelContract} (from
|
|
14
|
+
* `openai.image(...)` / `google.image(...)`) in the framework's uniform
|
|
15
|
+
* result contract:
|
|
16
|
+
*
|
|
17
|
+
* - **Never throws.** Provider failures (auth, rate-limit,
|
|
18
|
+
* content-filter, invalid request) surface as a typed `AIError` on
|
|
19
|
+
* `result.error`; `result.data` is then `undefined`.
|
|
20
|
+
* - **Cost-truth.** When the model carries pricing, `result.usage.cost`
|
|
21
|
+
* is filled in — per-token for gpt-image-1, per-image for
|
|
22
|
+
* DALL·E / Imagen — folding into the same `Usage.cost` rollup as text.
|
|
23
|
+
* - **Observable.** The completed {@link ImageReport} routes to any
|
|
24
|
+
* registered `Observer` (panoptic, OTel, …) via the shared `observe`
|
|
25
|
+
* seam, exactly like an agent run.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const openai = new OpenAISDK({ apiKey });
|
|
29
|
+
* const { data, error, usage } = await ai.image({
|
|
30
|
+
* model: openai.image({ name: "gpt-image-1" }),
|
|
31
|
+
* prompt: "an isometric office desk, soft studio lighting",
|
|
32
|
+
* size: "1024x1024",
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* if (error) console.warn(error.code);
|
|
36
|
+
* else for (const img of data.images) save(img); // { type: "base64" | "url", ... }
|
|
37
|
+
*/
|
|
38
|
+
async function image(params) {
|
|
39
|
+
const { model, prompt } = params;
|
|
40
|
+
const runId = generateRunId("image");
|
|
41
|
+
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
42
|
+
const startPerf = performance.now();
|
|
43
|
+
const usage = {
|
|
44
|
+
input: 0,
|
|
45
|
+
output: 0,
|
|
46
|
+
total: 0
|
|
47
|
+
};
|
|
48
|
+
let data;
|
|
49
|
+
let error;
|
|
50
|
+
let status = "completed";
|
|
51
|
+
let imageCount = 0;
|
|
52
|
+
try {
|
|
53
|
+
const response = await model.generate(prompt, {
|
|
54
|
+
count: params.count,
|
|
55
|
+
size: params.size,
|
|
56
|
+
quality: params.quality,
|
|
57
|
+
aspectRatio: params.aspectRatio,
|
|
58
|
+
negativePrompt: params.negativePrompt,
|
|
59
|
+
format: params.format,
|
|
60
|
+
signal: params.signal,
|
|
61
|
+
...params.options
|
|
62
|
+
});
|
|
63
|
+
Object.assign(usage, response.usage);
|
|
64
|
+
if (usage.cost === void 0) {
|
|
65
|
+
const cost = computeImageCost(usage, response.images.length, params.size, model.pricing);
|
|
66
|
+
if (cost !== void 0) usage.cost = cost;
|
|
67
|
+
}
|
|
68
|
+
data = { images: response.images };
|
|
69
|
+
imageCount = response.images.length;
|
|
70
|
+
} catch (thrown) {
|
|
71
|
+
error = thrown instanceof AIError ? thrown : new ProviderError(toMessage(thrown), { cause: thrown });
|
|
72
|
+
status = params.signal?.aborted ? "cancelled" : "failed";
|
|
73
|
+
}
|
|
74
|
+
const report = {
|
|
75
|
+
runId,
|
|
76
|
+
rootRunId: runId,
|
|
77
|
+
name: params.name ?? "image",
|
|
78
|
+
type: "image",
|
|
79
|
+
status,
|
|
80
|
+
error,
|
|
81
|
+
startedAt,
|
|
82
|
+
endedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
83
|
+
duration: performance.now() - startPerf,
|
|
84
|
+
usage,
|
|
85
|
+
children: [],
|
|
86
|
+
model: {
|
|
87
|
+
name: model.name,
|
|
88
|
+
provider: model.provider
|
|
89
|
+
},
|
|
90
|
+
imageCount,
|
|
91
|
+
reportSchemaVersion: 1
|
|
92
|
+
};
|
|
93
|
+
stampReportLineage(report, {
|
|
94
|
+
rootRunId: runId,
|
|
95
|
+
sessionId: params.sessionId
|
|
96
|
+
});
|
|
97
|
+
await notifyObservers(params.observe, report);
|
|
98
|
+
return {
|
|
99
|
+
type: "image",
|
|
100
|
+
data,
|
|
101
|
+
error,
|
|
102
|
+
usage,
|
|
103
|
+
report
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/** Best-effort message for a non-`AIError` thrown value. */
|
|
107
|
+
function toMessage(thrown) {
|
|
108
|
+
return thrown instanceof Error ? thrown.message : String(thrown);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
export { image };
|
|
113
|
+
//# sourceMappingURL=image.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.mjs","names":[],"sources":["../../../../../../../@warlock.js/ai/src/image/image.ts"],"sourcesContent":["import type {\n GeneratedImage,\n ImageModelContract,\n} from \"../contracts/image-model.contract\";\nimport type { BaseReport } from \"../contracts/result/base-report.type\";\nimport { REPORT_SCHEMA_VERSION } from \"../contracts/result/base-report.type\";\nimport type { ExecuteResult } from \"../contracts/result/execute-result.type\";\nimport type { Usage } from \"../contracts/result/usage.type\";\nimport { AIError } from \"../errors/ai-error\";\nimport { ProviderError } from \"../errors/provider-error\";\nimport type { FlowObserveOption } from \"../observe/resolve-observers\";\nimport { notifyObservers } from \"../observe/resolve-observers\";\nimport { generateRunId } from \"../utils/generate-run-id\";\nimport { stampReportLineage } from \"../utils/stamp-report-lineage\";\nimport { computeImageCost } from \"./image-cost\";\n\n/**\n * Parameters for {@link image}. `model` comes from an adapter's\n * `image()` factory (`openai.image({ name })` / `google.image({ name })`);\n * the rest are provider-neutral generation knobs plus the standard\n * observability seam every verb shares.\n */\nexport type ImageParams = {\n /** The image model to generate from (`sdk.image({ name })`). */\n model: ImageModelContract;\n /** Text description of the image(s) to generate. */\n prompt: string;\n /** How many images to generate. Adapters clamp to the provider max. */\n count?: number;\n /** Requested pixel size as `\"WxH\"` (e.g. `\"1024x1024\"`). */\n size?: string;\n /** Quality tier (e.g. `\"standard\"` / `\"hd\"`). */\n quality?: string;\n /** Aspect ratio (e.g. `\"1:1\"`, `\"16:9\"`) — ratio-based providers (Imagen). */\n aspectRatio?: string;\n /** Concepts to steer away from (Imagen `negativePrompt`). */\n negativePrompt?: string;\n /** Output container hint (`\"png\"` / `\"jpeg\"` / `\"webp\"`). */\n format?: string;\n /** Cancellation handle, wired into the provider request where supported. */\n signal?: AbortSignal;\n /**\n * Observability routing for this call — same `observe` seam as\n * agents / workflows. `true` routes to the globally registered\n * observers; an `Observer` object routes flow-locally; `false` opts\n * out; omitted follows the global observe-all flag.\n */\n observe?: FlowObserveOption;\n /** Groups this call into a session for flat cost/trace queries. */\n sessionId?: string;\n /** Report node name (defaults to `\"image\"`). */\n name?: string;\n /** Provider-specific options forwarded verbatim to the adapter. */\n options?: Record<string, unknown>;\n};\n\n/** Success payload of an {@link image} run. */\nexport type ImageData = {\n /** The generated images, normalized to the discriminated shape. */\n images: GeneratedImage[];\n};\n\n/**\n * The report node an {@link image} run produces — a {@link BaseReport}\n * (`type: \"image\"`) plus which model ran and how many images came back,\n * so panoptic and any flat-row consumer attribute the cost/latency\n * without special-casing.\n */\nexport type ImageReport = BaseReport & {\n type: \"image\";\n /** Identity of the image model this run used. */\n model: { name: string; provider: string };\n /** Number of images returned (0 on failure). */\n imageCount: number;\n};\n\n/**\n * Result envelope of {@link image} — the same uniform\n * `{ data, error, usage, report }` every executable returns, narrowed\n * with the `\"image\"` discriminant.\n */\nexport type ImageResult = ExecuteResult<ImageData> & {\n type: \"image\";\n report: ImageReport;\n};\n\n/**\n * Generate one or more images from a text prompt — the image-output\n * counterpart to `ai.agent`, and the first verb of the output-modality\n * track (Theme I). Wraps an {@link ImageModelContract} (from\n * `openai.image(...)` / `google.image(...)`) in the framework's uniform\n * result contract:\n *\n * - **Never throws.** Provider failures (auth, rate-limit,\n * content-filter, invalid request) surface as a typed `AIError` on\n * `result.error`; `result.data` is then `undefined`.\n * - **Cost-truth.** When the model carries pricing, `result.usage.cost`\n * is filled in — per-token for gpt-image-1, per-image for\n * DALL·E / Imagen — folding into the same `Usage.cost` rollup as text.\n * - **Observable.** The completed {@link ImageReport} routes to any\n * registered `Observer` (panoptic, OTel, …) via the shared `observe`\n * seam, exactly like an agent run.\n *\n * @example\n * const openai = new OpenAISDK({ apiKey });\n * const { data, error, usage } = await ai.image({\n * model: openai.image({ name: \"gpt-image-1\" }),\n * prompt: \"an isometric office desk, soft studio lighting\",\n * size: \"1024x1024\",\n * });\n *\n * if (error) console.warn(error.code);\n * else for (const img of data.images) save(img); // { type: \"base64\" | \"url\", ... }\n */\nexport async function image(params: ImageParams): Promise<ImageResult> {\n const { model, prompt } = params;\n\n const runId = generateRunId(\"image\");\n const startedAt = new Date().toISOString();\n const startPerf = performance.now();\n\n const usage: Usage = { input: 0, output: 0, total: 0 };\n let data: ImageData | undefined;\n let error: AIError | undefined;\n let status: ImageReport[\"status\"] = \"completed\";\n let imageCount = 0;\n\n try {\n const response = await model.generate(prompt, {\n count: params.count,\n size: params.size,\n quality: params.quality,\n aspectRatio: params.aspectRatio,\n negativePrompt: params.negativePrompt,\n format: params.format,\n signal: params.signal,\n ...params.options,\n });\n\n // Preserve every usage channel the adapter reported (cached /\n // reasoning / cache-write, and any adapter-supplied `cost`), mirroring\n // how the agent path routes provider usage. Then honor a pre-priced\n // response or compute image cost — `usage.cost ??= …` precedence, same\n // as the agent path.\n Object.assign(usage, response.usage);\n\n if (usage.cost === undefined) {\n const cost = computeImageCost(usage, response.images.length, params.size, model.pricing);\n if (cost !== undefined) {\n usage.cost = cost;\n }\n }\n\n data = { images: response.images };\n imageCount = response.images.length;\n } catch (thrown) {\n error = thrown instanceof AIError ? thrown : new ProviderError(toMessage(thrown), { cause: thrown });\n // A caller-aborted run is \"cancelled\", not \"failed\" — keep the typed\n // cause but distinguish the terminal status for dashboards/retry policy.\n status = params.signal?.aborted ? \"cancelled\" : \"failed\";\n }\n\n const report: ImageReport = {\n runId,\n rootRunId: runId,\n name: params.name ?? \"image\",\n type: \"image\",\n status,\n error,\n startedAt,\n endedAt: new Date().toISOString(),\n duration: performance.now() - startPerf,\n usage,\n children: [],\n model: { name: model.name, provider: model.provider },\n imageCount,\n reportSchemaVersion: REPORT_SCHEMA_VERSION,\n };\n\n stampReportLineage(report, { rootRunId: runId, sessionId: params.sessionId });\n\n await notifyObservers(params.observe, report);\n\n return { type: \"image\", data, error, usage, report };\n}\n\n/** Best-effort message for a non-`AIError` thrown value. */\nfunction toMessage(thrown: unknown): string {\n return thrown instanceof Error ? thrown.message : String(thrown);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,eAAsB,MAAM,QAA2C;CACrE,MAAM,EAAE,OAAO,WAAW;CAE1B,MAAM,QAAQ,cAAc,OAAO;CACnC,MAAM,6BAAY,IAAI,KAAK,EAAC,CAAC,YAAY;CACzC,MAAM,YAAY,YAAY,IAAI;CAElC,MAAM,QAAe;EAAE,OAAO;EAAG,QAAQ;EAAG,OAAO;CAAE;CACrD,IAAI;CACJ,IAAI;CACJ,IAAI,SAAgC;CACpC,IAAI,aAAa;CAEjB,IAAI;EACF,MAAM,WAAW,MAAM,MAAM,SAAS,QAAQ;GAC5C,OAAO,OAAO;GACd,MAAM,OAAO;GACb,SAAS,OAAO;GAChB,aAAa,OAAO;GACpB,gBAAgB,OAAO;GACvB,QAAQ,OAAO;GACf,QAAQ,OAAO;GACf,GAAG,OAAO;EACZ,CAAC;EAOD,OAAO,OAAO,OAAO,SAAS,KAAK;EAEnC,IAAI,MAAM,SAAS,QAAW;GAC5B,MAAM,OAAO,iBAAiB,OAAO,SAAS,OAAO,QAAQ,OAAO,MAAM,MAAM,OAAO;GACvF,IAAI,SAAS,QACX,MAAM,OAAO;EAEjB;EAEA,OAAO,EAAE,QAAQ,SAAS,OAAO;EACjC,aAAa,SAAS,OAAO;CAC/B,SAAS,QAAQ;EACf,QAAQ,kBAAkB,UAAU,SAAS,IAAI,cAAc,UAAU,MAAM,GAAG,EAAE,OAAO,OAAO,CAAC;EAGnG,SAAS,OAAO,QAAQ,UAAU,cAAc;CAClD;CAEA,MAAM,SAAsB;EAC1B;EACA,WAAW;EACX,MAAM,OAAO,QAAQ;EACrB,MAAM;EACN;EACA;EACA;EACA,0BAAS,IAAI,KAAK,EAAC,CAAC,YAAY;EAChC,UAAU,YAAY,IAAI,IAAI;EAC9B;EACA,UAAU,CAAC;EACX,OAAO;GAAE,MAAM,MAAM;GAAM,UAAU,MAAM;EAAS;EACpD;EACA;CACF;CAEA,mBAAmB,QAAQ;EAAE,WAAW;EAAO,WAAW,OAAO;CAAU,CAAC;CAE5E,MAAM,gBAAgB,OAAO,SAAS,MAAM;CAE5C,OAAO;EAAE,MAAM;EAAS;EAAM;EAAO;EAAO;CAAO;AACrD;;AAGA,SAAS,UAAU,QAAyB;CAC1C,OAAO,kBAAkB,QAAQ,OAAO,UAAU,OAAO,MAAM;AACjE"}
|
package/esm/index.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { OutboundPolicy, ResolvedOutboundPolicy } from "./security/outbound-policy.type.mjs";
|
|
2
|
+
import { AttachmentPolicy } from "./contracts/attachment-policy.type.mjs";
|
|
1
3
|
import { Attachment, AttachmentSource, ResolvedAttachment, StorageFileShape } from "./contracts/attachment.type.mjs";
|
|
2
|
-
import { ContentPart, ImageSource } from "./contracts/content-part.type.mjs";
|
|
4
|
+
import { BinarySource, ContentPart, ImageSource } from "./contracts/content-part.type.mjs";
|
|
3
5
|
import { ModelToolCallRequest } from "./contracts/model-tool-call-request.type.mjs";
|
|
4
6
|
import { Message } from "./contracts/conversation-message.type.mjs";
|
|
5
7
|
import { ErrorCategory } from "./errors/error-category.type.mjs";
|
|
@@ -13,7 +15,7 @@ import { BaseReport, REPORT_SCHEMA_VERSION, ReportStatus, ReportType } from "./c
|
|
|
13
15
|
import { FinishReason } from "./contracts/finish-reason.type.mjs";
|
|
14
16
|
import { ToolCall } from "./contracts/result/tool-call.type.mjs";
|
|
15
17
|
import { LLMTrip } from "./contracts/result/llm-trip.type.mjs";
|
|
16
|
-
import { AgentReport, ExecutionReport, ExecutionStatus } from "./contracts/result/execution-report.type.mjs";
|
|
18
|
+
import { AgentReport, CapturedMessage, ExecutionReport, ExecutionStatus } from "./contracts/result/execution-report.type.mjs";
|
|
17
19
|
import { AgentResult } from "./contracts/result/agent-result.type.mjs";
|
|
18
20
|
import { AgentCompletedPayload, AgentErrorPayload, AgentStartingPayload, AgentStreamingPayload, AgentToolCalledPayload, AgentToolCallingFailedPayload, AgentToolCallingPayload, AgentTripCompletedPayload, AgentTripStartedPayload, ToolEventMeta } from "./contracts/events/agent-events.type.mjs";
|
|
19
21
|
import { EventIdentity, WithoutIdentity } from "./contracts/events/event-identity.type.mjs";
|
|
@@ -21,6 +23,7 @@ import { ExecuteResult } from "./contracts/result/execute-result.type.mjs";
|
|
|
21
23
|
import { ExecutableContract } from "./contracts/executable.contract.mjs";
|
|
22
24
|
import { StreamEvent, StreamEventBody } from "./contracts/stream/stream-event.type.mjs";
|
|
23
25
|
import { StreamContract } from "./contracts/stream/stream.contract.mjs";
|
|
26
|
+
import { DatasetContract, DatasetEntry, DatasetOptions } from "./eval/dataset.type.mjs";
|
|
24
27
|
import { EvalCase, EvalCaseResult, EvalJudge, EvalOptions, EvalReport, EvalScore, EvalScorer, EvalScorerContext } from "./contracts/agent/eval.type.mjs";
|
|
25
28
|
import { AgentContract, AgentEventHandler } from "./contracts/agent/agent.contract.mjs";
|
|
26
29
|
import { END, EndSentinel } from "./contracts/end.type.mjs";
|
|
@@ -30,12 +33,13 @@ import { WorkflowReport, WorkflowResult } from "./contracts/result/workflow-resu
|
|
|
30
33
|
import { ToolConfig, ToolContext, ToolMeta, ToolMode } from "./contracts/tool.contract.mjs";
|
|
31
34
|
import { AgentExecutionError } from "./errors/agent-execution-error.mjs";
|
|
32
35
|
import { AgentCancelledError, AgentCancelledErrorOptions } from "./errors/agent-cancelled-error.mjs";
|
|
36
|
+
import { AgentDriftError, AgentDriftErrorOptions } from "./errors/agent-drift-error.mjs";
|
|
33
37
|
import { AgentMaxTripsError, AgentMaxTripsErrorOptions } from "./errors/agent-max-trips-error.mjs";
|
|
34
38
|
import { BudgetExceededError, BudgetExceededErrorOptions, BudgetUnit } from "./errors/budget-exceeded-error.mjs";
|
|
35
39
|
import { ProviderError } from "./errors/provider-error.mjs";
|
|
36
40
|
import { ContentFilterError, ContentFilterErrorOptions } from "./errors/content-filter-error.mjs";
|
|
37
41
|
import { ContextLengthExceededError, ContextLengthExceededErrorOptions } from "./errors/context-length-exceeded-error.mjs";
|
|
38
|
-
import {
|
|
42
|
+
import { GuardrailViolationError, GuardrailViolationErrorOptions } from "./errors/guardrail-violation-error.mjs";
|
|
39
43
|
import { InvalidRequestError } from "./errors/invalid-request-error.mjs";
|
|
40
44
|
import { SupervisorFailedError } from "./errors/supervisor-failed-error.mjs";
|
|
41
45
|
import { MaxIterationsError, MaxIterationsErrorOptions } from "./errors/max-iterations-error.mjs";
|
|
@@ -45,8 +49,10 @@ import { OrchestratorFailedError } from "./errors/orchestrator-failed-error.mjs"
|
|
|
45
49
|
import { OrchestratorCancelledError, OrchestratorCancelledErrorOptions } from "./errors/orchestrator-cancelled-error.mjs";
|
|
46
50
|
import { OrchestratorConfigError } from "./errors/orchestrator-config-error.mjs";
|
|
47
51
|
import { OrchestratorDriftError, OrchestratorDriftErrorOptions } from "./errors/orchestrator-drift-error.mjs";
|
|
52
|
+
import { OutboundPolicyError } from "./errors/outbound-policy-error.mjs";
|
|
48
53
|
import { PlannerFailedError } from "./errors/planner-failed-error.mjs";
|
|
49
54
|
import { PlannerCancelledError, PlannerCancelledErrorOptions } from "./errors/planner-cancelled-error.mjs";
|
|
55
|
+
import { PlannerDriftError, PlannerDriftErrorOptions } from "./errors/planner-drift-error.mjs";
|
|
50
56
|
import { PlannerPlanInvalidError } from "./errors/planner-plan-invalid-error.mjs";
|
|
51
57
|
import { ProviderAuthError } from "./errors/provider-auth-error.mjs";
|
|
52
58
|
import { ProviderRateLimitError, ProviderRateLimitErrorOptions } from "./errors/provider-rate-limit-error.mjs";
|
|
@@ -62,9 +68,11 @@ import { ToolExecutionError, ToolExecutionErrorOptions } from "./errors/tool-exe
|
|
|
62
68
|
import { WorkflowCancelledError, WorkflowCancelledErrorOptions } from "./errors/workflow-cancelled-error.mjs";
|
|
63
69
|
import { WorkflowDriftError, WorkflowDriftErrorOptions } from "./errors/workflow-drift-error.mjs";
|
|
64
70
|
import { ToolContract, ToolInvokeResult, tool } from "./tool/tool.mjs";
|
|
71
|
+
import { Observer } from "./observe/observer.contract.mjs";
|
|
72
|
+
import { FlowObserveOption, resolveObservers } from "./observe/resolve-observers.mjs";
|
|
65
73
|
import { SupervisorInput } from "./contracts/supervisor/supervisor-input.type.mjs";
|
|
66
74
|
import { SupervisorSnapshot, SupervisorSnapshotStatus } from "./contracts/supervisor/supervisor-snapshot.type.mjs";
|
|
67
|
-
import {
|
|
75
|
+
import { SnapshotStore } from "./contracts/orchestrator/snapshot-store.contract.mjs";
|
|
68
76
|
import { NextStepResult } from "./contracts/workflow/next-step-result.type.mjs";
|
|
69
77
|
import { RetryBackoff, RetryConfig } from "./contracts/workflow/retry-config.type.mjs";
|
|
70
78
|
import { WorkflowContext } from "./contracts/workflow/workflow-context.type.mjs";
|
|
@@ -78,7 +86,8 @@ import { MiddlewareState } from "./contracts/middleware/middleware-state.type.mj
|
|
|
78
86
|
import { MiddlewareAgentRef, MiddlewareExecuteContext, MiddlewareModelRef, MiddlewareSupervisorContext, MiddlewareSupervisorRef, MiddlewareToolContext, MiddlewareTripContext } from "./contracts/middleware/middleware-context.type.mjs";
|
|
79
87
|
import { AgentMiddleware, AgentMiddlewareExecuteHooks, AgentMiddlewareSupervisorHooks, AgentMiddlewareToolHooks, AgentMiddlewareTripHooks } from "./contracts/middleware/middleware.contract.mjs";
|
|
80
88
|
import { Placeholders } from "./contracts/placeholders.type.mjs";
|
|
81
|
-
import {
|
|
89
|
+
import { ExportedPrompt, ExportedPromptVersion, ExportedRegistry, PromptDiff, PromptDiffBlock, PromptJudgeCacheLike, PromptTemplateVersion, PromptValidateTarget, PromptValidationResult, PromptsManagerOptions, PromptsValidateOptions } from "./prompts/prompts-manager.type.mjs";
|
|
90
|
+
import { InstructionContract, PersonaContract, SystemPromptBlockContract, SystemPromptContract, SystemPromptMergeOptions, SystemPromptMergeSource, SystemPromptMeta } from "./contracts/system-prompt.contract.mjs";
|
|
82
91
|
import { RouteContext } from "./contracts/supervisor/route-context.type.mjs";
|
|
83
92
|
import { AckCallback, AckConfig, AckEntry, AckRunEntry } from "./contracts/supervisor/ack-entry.type.mjs";
|
|
84
93
|
import { DispatchRawResult, IntentCallback, IntentEntry, IntentRunEntry, SupervisorIntentValue } from "./contracts/supervisor/intent-entry.type.mjs";
|
|
@@ -97,13 +106,16 @@ import { SupervisorAgentCompletedPayload, SupervisorAgentFailedPayload, Supervis
|
|
|
97
106
|
import { WorkflowCancelledPayload, WorkflowCompletedPayload, WorkflowErrorPayload, WorkflowLoopWarningPayload, WorkflowStartingPayload, WorkflowStepCompletedPayload, WorkflowStepFailedPayload, WorkflowStepRetryingPayload, WorkflowStepSkippedPayload, WorkflowStepStartingPayload, WorkflowStepStreamingPayload } from "./contracts/events/workflow-events.type.mjs";
|
|
98
107
|
import { AgentEventMap, SupervisorEventMap, WorkflowEventMap } from "./contracts/events/event-map.type.mjs";
|
|
99
108
|
import { StreamingToolGuardConfig } from "./contracts/streaming-tool-guard-config.type.mjs";
|
|
100
|
-
import { AgentExecuteOptions } from "./contracts/agent/agent-options.type.mjs";
|
|
109
|
+
import { AgentExecuteOptions, AgentResumeOptions } from "./contracts/agent/agent-options.type.mjs";
|
|
110
|
+
import { AgentSnapshot, AgentSnapshotStatus } from "./contracts/agent/agent-snapshot.type.mjs";
|
|
101
111
|
import { EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage } from "./contracts/embedder.contract.mjs";
|
|
112
|
+
import { GeneratedImage, ImageGenerationOptions, ImageGenerationResponse, ImageModelConfig, ImageModelContract, ImageModelPricing } from "./contracts/image-model.contract.mjs";
|
|
102
113
|
import { MemoryItem, MemoryTier, RecalledMemory } from "./contracts/memory/memory-item.type.mjs";
|
|
103
114
|
import { RecallOptions } from "./contracts/memory/recall-options.type.mjs";
|
|
104
115
|
import { MemoryContract } from "./contracts/memory/memory.contract.mjs";
|
|
105
116
|
import { EpisodicMemoryConfig, MemoryConfig, ProceduralMemoryConfig, SemanticMemoryConfig } from "./contracts/memory/memory-config.type.mjs";
|
|
106
117
|
import { CheckpointRecord, CheckpointStore } from "./contracts/orchestrator/checkpoint-store.contract.mjs";
|
|
118
|
+
import { SessionLock } from "./contracts/orchestrator/session-lock.contract.mjs";
|
|
107
119
|
import { OrchestratorCommands } from "./contracts/orchestrator/orchestrator-commands.type.mjs";
|
|
108
120
|
import { OrchestratorEvent, OrchestratorEventHandler, OrchestratorEventHandlers, OrchestratorEventMap, OrchestratorEventName } from "./contracts/orchestrator/orchestrator-event.type.mjs";
|
|
109
121
|
import { OrchestratorExecuteOptions, OrchestratorResumeOptions } from "./contracts/orchestrator/orchestrator-execute-options.type.mjs";
|
|
@@ -111,36 +123,74 @@ import { OrchestratorAsToolOptions, OrchestratorContract, OrchestratorSessionSco
|
|
|
111
123
|
import { OrchestratorConfig, OrchestratorMemoryConfig, SummarizeCallback, SummarizeConfig } from "./contracts/orchestrator/orchestrator-config.type.mjs";
|
|
112
124
|
import { SessionContract } from "./contracts/orchestrator/session.contract.mjs";
|
|
113
125
|
import { PlannerCapability } from "./contracts/planner/planner-capability.type.mjs";
|
|
114
|
-
import { PlannerConfig } from "./contracts/planner/planner-config.type.mjs";
|
|
115
|
-
import { PlannerExecuteOptions } from "./contracts/planner/planner-execute-options.type.mjs";
|
|
116
126
|
import { PlannerPlan, PlannerStep } from "./contracts/planner/planner-plan.type.mjs";
|
|
117
127
|
import { PlannerReport, PlannerReportType, PlannerResult, PlannerStepSnapshot } from "./contracts/planner/planner-result.type.mjs";
|
|
128
|
+
import { PlannerSnapshot, PlannerSnapshotStatus } from "./contracts/planner/planner-snapshot.type.mjs";
|
|
129
|
+
import { PlannerConfig } from "./contracts/planner/planner-config.type.mjs";
|
|
130
|
+
import { PlannerExecuteOptions, PlannerResumeOptions, PlannerStepDirective } from "./contracts/planner/planner-execute-options.type.mjs";
|
|
118
131
|
import { PlannerContract } from "./contracts/planner/planner.contract.mjs";
|
|
132
|
+
import { GeneratedAudio, SpeechGenerationResponse, SpeechModelConfig, SpeechModelContract, SpeechModelPricing, SpeechOptions } from "./contracts/speech-model.contract.mjs";
|
|
133
|
+
import { AudioInput, TranscribeOptions, TranscriptionModelConfig, TranscriptionModelContract, TranscriptionModelPricing, TranscriptionResponse, TranscriptionSegment } from "./contracts/transcription-model.contract.mjs";
|
|
119
134
|
import { ModelConfig, SDKAdapterContract } from "./contracts/sdk-adapter.contract.mjs";
|
|
120
135
|
import { CompleteEvent } from "./contracts/events/complete-event.type.mjs";
|
|
121
136
|
import { UsageEvent } from "./contracts/events/usage-event.type.mjs";
|
|
137
|
+
import { LoadSkillInput, SkillCatalogEntry, SkillRecord } from "./skills/contracts/skill-record.type.mjs";
|
|
138
|
+
import { SkillsStoreContract } from "./skills/contracts/skills-store.contract.mjs";
|
|
139
|
+
import { SkillAnalyticsEvent, SkillInjectMode, SkillReviewGate, SkillSource, SkillsConfig } from "./skills/contracts/skills-config.type.mjs";
|
|
140
|
+
import { SkillsContract } from "./skills/contracts/skills.contract.mjs";
|
|
141
|
+
import { JUDGE_DEFAULT_REPAIR_ATTEMPTS, JudgeConfig } from "./agent/judge-config.type.mjs";
|
|
122
142
|
import { AgentConfig } from "./agent/agent-config.type.mjs";
|
|
123
|
-
import { agent } from "./agent/agent.mjs";
|
|
143
|
+
import { JudgeAgentConfig, agent } from "./agent/agent.mjs";
|
|
124
144
|
import { StreamController, createAgentStream } from "./agent/agent-stream.mjs";
|
|
125
145
|
import { BudgetContract, BudgetContractDimension, BudgetContractFallback, BudgetContractViolation, BudgetContractViolationMode } from "./middleware/builtins/budget-contract.type.mjs";
|
|
126
146
|
import { BudgetFallbackSignal, BudgetOptions, BudgetPricing, budget, readBudgetFallbackSignal } from "./middleware/builtins/budget.mjs";
|
|
127
147
|
import { SpawnSubAgentSpec, spawnSubAgent } from "./agent/spawn-sub-agent.mjs";
|
|
128
|
-
import { SystemPrompt, systemPrompt } from "./system-prompt/system-prompt.mjs";
|
|
129
|
-
import { judge } from "./eval/judge-scorer.mjs";
|
|
130
|
-
import { EvalPredicate, contains, exact, predicate } from "./eval/scorers.mjs";
|
|
131
|
-
import { runEval } from "./eval/eval-runner.mjs";
|
|
132
|
-
import { evalScorers } from "./eval/index.mjs";
|
|
133
148
|
import { BatchItemHandler, BatchItemResult, BatchItemStatus, BatchOptions, BatchReport, BatchResult } from "./batch/batch.type.mjs";
|
|
134
149
|
import { batch } from "./batch/batch.mjs";
|
|
150
|
+
import { ObjectStreamEvent, StreamObjectParams, collectStreamObject, streamObject } from "./object-stream/stream-object.mjs";
|
|
151
|
+
import { parsePartialJson } from "./object-stream/parse-partial-json.mjs";
|
|
152
|
+
import { SSE_DONE, encodeSSE } from "./serve/sse.mjs";
|
|
153
|
+
import { StreamLike, streamToSSE } from "./serve/stream-to-sse.mjs";
|
|
154
|
+
import { ServableExecutable, ServeOptions, serve } from "./serve/serve.mjs";
|
|
135
155
|
import { memory } from "./checkpoint/memory.mjs";
|
|
136
156
|
import { PgCheckpointOptions, pg } from "./checkpoint/pg.mjs";
|
|
137
157
|
import { RedisCheckpointOptions, redis } from "./checkpoint/redis.mjs";
|
|
138
|
-
import { AIConfig, getAIConfig, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, setAIConfig } from "./config.mjs";
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
158
|
+
import { AIConfig, getAIConfig, onConfigApplied, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, setAIConfig } from "./config.mjs";
|
|
159
|
+
import { judge } from "./eval/judge-scorer.mjs";
|
|
160
|
+
import { fromJSON, toJSON } from "./eval/report-json.mjs";
|
|
161
|
+
import { toJUnit } from "./eval/report-junit.mjs";
|
|
162
|
+
import { EvalPredicate, contains, exact, predicate } from "./eval/scorers.mjs";
|
|
163
|
+
import { runEval } from "./eval/eval-runner.mjs";
|
|
164
|
+
import { dataset } from "./eval/dataset.mjs";
|
|
165
|
+
import { diff } from "./eval/regression.mjs";
|
|
166
|
+
import { evalScorers } from "./eval/index.mjs";
|
|
167
|
+
import { ApprovalDecision, ApprovalDecisionType, ApprovalHandler, ApprovalRequest, ApprovalRequestContext, InterruptPolicy, PolicyContext } from "./human/contracts/approval.type.mjs";
|
|
168
|
+
import { InterruptStore, PendingInterrupt, PendingInterruptStatus, PgClientLike, RedisClientLike } from "./human/contracts/interrupt-store.contract.mjs";
|
|
169
|
+
import { HumanApprovalOptions } from "./human/contracts/human-approval.type.mjs";
|
|
170
|
+
import { ResumeOptions, ResumeResult } from "./human/contracts/resume.type.mjs";
|
|
171
|
+
import { humanApproval } from "./human/human-approval.mjs";
|
|
172
|
+
import { ImageData, ImageParams, ImageReport, ImageResult, image } from "./image/image.mjs";
|
|
173
|
+
import { computeImageCost } from "./image/image-cost.mjs";
|
|
174
|
+
import { SpeechData, SpeechParams, SpeechReport, SpeechResult, speech } from "./speech/speech.mjs";
|
|
175
|
+
import { audioFromBuffer, audioFromFile, audioMediaTypeForFilename } from "./transcribe/audio-input.mjs";
|
|
176
|
+
import { TranscribeParams, TranscriptionData, TranscriptionReport, TranscriptionResult, transcribe } from "./transcribe/transcribe.mjs";
|
|
177
|
+
import { resume } from "./human/resume.mjs";
|
|
178
|
+
import { memory as memory$1 } from "./human/stores/memory.mjs";
|
|
179
|
+
import { PgInterruptOptions, pg as pg$1 } from "./human/stores/pg.mjs";
|
|
180
|
+
import { RedisInterruptOptions, redis as redis$1 } from "./human/stores/redis.mjs";
|
|
181
|
+
import { GuardrailAction, GuardrailMatch, GuardrailPhase, GuardrailVerdict } from "./guard/contracts/verdict.type.mjs";
|
|
182
|
+
import { GuardrailDetector, GuardrailDetectorContext, SyncGuardrailDetector } from "./guard/contracts/guardrail.contract.mjs";
|
|
183
|
+
import { OpenAiClientLike, OpenAiModerationCreateBody, OpenAiModerationResponse, OpenAiModerationResult } from "./guard/contracts/openai-client.contract.mjs";
|
|
184
|
+
import { GuardOptions, GuardrailBlockEvent, GuardrailEscalation, InjectionDetectorOptions, OpenAiModerationOptions, PiiCategory, PiiDetectorOptions, TopicFilterOptions } from "./guard/contracts/guard-options.type.mjs";
|
|
185
|
+
import { GuardrailFactory, guardrail } from "./guard/guardrail.mjs";
|
|
186
|
+
import { memory as memory$2 } from "./memory/memory.mjs";
|
|
187
|
+
import { GuardrailCheck, GuardrailCheckResult, GuardrailOptions } from "./middleware/builtins/guardrail.mjs";
|
|
141
188
|
import { SemanticCacheOptions, semanticCache } from "./middleware/builtins/semantic-cache.mjs";
|
|
142
189
|
import { composeMiddleware } from "./middleware/helpers/compose.mjs";
|
|
143
190
|
import { forTool } from "./middleware/helpers/for-tool.mjs";
|
|
191
|
+
import { MockImageCall, MockImageModel, MockImageResponse } from "./mock/mock-image-model.mjs";
|
|
192
|
+
import { MockSpeechCall, MockSpeechModel, MockSpeechResponse } from "./mock/mock-speech-model.mjs";
|
|
193
|
+
import { MockTranscriptionCall, MockTranscriptionModel, MockTranscriptionResponse } from "./mock/mock-transcription-model.mjs";
|
|
144
194
|
import { MockModelResponse, MockSDKConfig } from "./mock/mock-config.type.mjs";
|
|
145
195
|
import { mockAgent } from "./mock/mock-agent.mjs";
|
|
146
196
|
import { MockModel } from "./mock/mock-model.mjs";
|
|
@@ -156,15 +206,60 @@ import { ResolvedIntentEntry, resolveIntentEntries } from "./supervisor/entries.
|
|
|
156
206
|
import { OrchestratorStreamController, createOrchestratorStream } from "./orchestrator/orchestrator-stream.mjs";
|
|
157
207
|
import { OrchestratorExecution, OrchestratorExecutionParams, runResume, runTurn, streamTurn } from "./orchestrator/execution.mjs";
|
|
158
208
|
import { orchestrator } from "./orchestrator/orchestrator.mjs";
|
|
209
|
+
import { inProcessSessionLock, noopSessionLock } from "./orchestrator/session-lock.mjs";
|
|
159
210
|
import { computeOrchestratorSignature } from "./orchestrator/signature.mjs";
|
|
160
211
|
import { planner } from "./planner/planner.mjs";
|
|
161
212
|
import { planSchema } from "./planner/plan-schema.mjs";
|
|
162
213
|
import { buildPlanSystemPrompt } from "./planner/plan-prompt.mjs";
|
|
163
214
|
import { computeSignature } from "./planner/signature.mjs";
|
|
164
215
|
import { PlannerRunArgs } from "./planner/planner-run.mjs";
|
|
165
|
-
import {
|
|
166
|
-
import {
|
|
167
|
-
import {
|
|
216
|
+
import { PromptsManagerContract, PromptsManagerEntry, PromptsManagerRegisterOptions } from "./prompts/prompts-manager.contract.mjs";
|
|
217
|
+
import { defaultPromptsManager, promptKey, prompts } from "./prompts/prompts-manager.mjs";
|
|
218
|
+
import { Citation, RetrieveOptions, RetrieveResult, RetrievedChunk } from "./rag/contracts/citation.type.mjs";
|
|
219
|
+
import { RagReranker } from "./rag/rerank/reranker.contract.mjs";
|
|
220
|
+
import { Chunk, ChunkOptions, ChunkType } from "./rag/contracts/chunk-options.type.mjs";
|
|
221
|
+
import { RagDocument } from "./rag/contracts/rag-document.type.mjs";
|
|
222
|
+
import { Rag, RagAsToolOptions, RagConfig } from "./rag/contracts/rag-config.type.mjs";
|
|
223
|
+
import { rag } from "./rag/rag.mjs";
|
|
224
|
+
import { chunk } from "./rag/chunk/chunk.mjs";
|
|
225
|
+
import { VectorStore } from "./rag/store/vector-store.contract.mjs";
|
|
226
|
+
import { cacheVectorStore } from "./rag/store/cache-vector-store.mjs";
|
|
227
|
+
import { PgVectorStoreInstance, PgVectorStoreOptions, pgVectorStore, vectorLiteral } from "./rag/store/pg-vector-store.mjs";
|
|
228
|
+
import { LoadHtmlOptions, LoadPdfOptions, LoadTextOptions, LoadWebOptions, RagLoaderMetadata, RagLoaderOptions, RagLoaderResult, RagLoaderType } from "./rag/loaders/loader.type.mjs";
|
|
229
|
+
import { TextInput, loadText } from "./rag/loaders/load-text.mjs";
|
|
230
|
+
import { loadHtml } from "./rag/loaders/load-html.mjs";
|
|
231
|
+
import { loadWeb } from "./rag/loaders/load-web.mjs";
|
|
232
|
+
import { loadPdf } from "./rag/loaders/load-pdf.mjs";
|
|
233
|
+
import { PDF_PARSE_INSTALL_INSTRUCTIONS } from "./rag/loaders/errors.mjs";
|
|
234
|
+
import { KeywordRerankerOptions, keywordReranker } from "./rag/rerank/keyword-reranker.mjs";
|
|
235
|
+
import { LlmRerankerOptions, llmReranker } from "./rag/rerank/llm-reranker.mjs";
|
|
236
|
+
import { RankedItem, reciprocalRankFusion } from "./rag/hybrid/rrf.mjs";
|
|
237
|
+
import { LexicalDoc, bm25Rank } from "./rag/hybrid/bm25.mjs";
|
|
238
|
+
import { hybridRank } from "./rag/hybrid/hybrid-rank.mjs";
|
|
239
|
+
import { MultiQueryOptions, multiQuery } from "./rag/transforms/multi-query.mjs";
|
|
240
|
+
import { skills } from "./skills/skills.mjs";
|
|
241
|
+
import { MockSkillsStore } from "./skills/store/mock-skills-store.mjs";
|
|
242
|
+
import { proceduralSkillStore } from "./skills/store/procedural-skill-store.mjs";
|
|
243
|
+
import { LoadSkillResult, LoadSkillToolDeps, loadSkillTool } from "./skills/load-skill-tool.mjs";
|
|
244
|
+
import { SaveSkillInput, SaveSkillResult, SaveSkillToolDeps, saveSkillTool } from "./skills/save-skill-tool.mjs";
|
|
245
|
+
import { ReviewOutcome, runReviewGate } from "./skills/review-gate.mjs";
|
|
246
|
+
import { directorySource } from "./skills/sources/directory-source.mjs";
|
|
247
|
+
import { urlSource } from "./skills/sources/url-source.mjs";
|
|
248
|
+
import { storeSource } from "./skills/sources/store-source.mjs";
|
|
249
|
+
import { ParsedFrontmatter, parseFrontmatter, parseTags } from "./skills/sources/parse-frontmatter.mjs";
|
|
250
|
+
import { resolveSource } from "./skills/sources/index.mjs";
|
|
251
|
+
import { buildCatalog, loadRecord, renderCatalogPrompt, semanticPreselect } from "./skills/catalog.mjs";
|
|
252
|
+
import { SystemPrompt, systemPrompt } from "./system-prompt/system-prompt.mjs";
|
|
253
|
+
import { PromptEntry, PromptLangfuseSyncOptions, PromptRegistryContract, PromptRegistryOptions, PromptResolveOptions, PromptValidateOptions, PromptValidationNote, PromptValidationReport, PromptValidationSeverity, PromptVersion, ResolvedPrompt } from "./prompt/prompt.type.mjs";
|
|
254
|
+
import { prompt } from "./prompt/prompt.mjs";
|
|
255
|
+
import { PromptNotFoundError, PromptValidationError } from "./prompt/errors.mjs";
|
|
256
|
+
import { Cassette, CassetteEntry, VcrMode, VcrModel, VcrOptions } from "./vcr/vcr.type.mjs";
|
|
257
|
+
import { vcr } from "./vcr/vcr.mjs";
|
|
258
|
+
import { VcrCassetteMissError, VcrCassetteMissErrorOptions } from "./vcr/errors.mjs";
|
|
259
|
+
import { DEFAULT_HASH_OPTIONS, hashRequest } from "./vcr/hash-request.mjs";
|
|
260
|
+
import { memory as memory$3 } from "./snapshot/memory.mjs";
|
|
261
|
+
import { PgSnapshotStoreOptions, pg as pg$2 } from "./snapshot/pg.mjs";
|
|
262
|
+
import { RedisSnapshotStoreOptions, redis as redis$2 } from "./snapshot/redis.mjs";
|
|
168
263
|
import { asTool as asTool$1 } from "./supervisor/as-tool.mjs";
|
|
169
264
|
import { createCancelledError } from "./supervisor/cancellation.mjs";
|
|
170
265
|
import { SupervisorEmitter } from "./supervisor/emitter.mjs";
|
|
@@ -176,21 +271,37 @@ import { buildRouterContextMessage } from "./supervisor/router-prompt.mjs";
|
|
|
176
271
|
import { computeSignature as computeSignature$2 } from "./supervisor/signature.mjs";
|
|
177
272
|
import { loadSnapshotForResume, persistSupervisorSnapshot } from "./supervisor/snapshot.mjs";
|
|
178
273
|
import { supervisor } from "./supervisor/supervisor.mjs";
|
|
274
|
+
import { TeamConfig, TeamGate, TeamGateFn, TeamMemberValue } from "./contracts/team/team-config.type.mjs";
|
|
275
|
+
import { team } from "./team/team.mjs";
|
|
179
276
|
import { Instruction, instruction } from "./system-prompt/instruction.mjs";
|
|
180
277
|
import { Persona, persona } from "./system-prompt/persona.mjs";
|
|
181
278
|
import { step } from "./workflow/step.mjs";
|
|
182
279
|
import { workflow } from "./workflow/workflow.mjs";
|
|
183
|
-
import { ai } from "./ai.mjs";
|
|
280
|
+
import { Ai, ai } from "./ai.mjs";
|
|
281
|
+
import { PolicyVerdict, evaluatePolicy } from "./human/policy.mjs";
|
|
282
|
+
import { ApprovalRejectedError, ApprovalRejectedErrorOptions, HumanErrorCode, InterruptSuspendedError, InterruptSuspendedErrorOptions } from "./human/errors.mjs";
|
|
283
|
+
import { FlagRecord, guard } from "./guard/guard.mjs";
|
|
284
|
+
import { injection } from "./guard/detectors/injection.mjs";
|
|
285
|
+
import { pii } from "./guard/detectors/pii.mjs";
|
|
286
|
+
import { topic } from "./guard/detectors/topic.mjs";
|
|
287
|
+
import { moderation } from "./guard/detectors/moderation.mjs";
|
|
288
|
+
import { OPENAI_INSTALL_INSTRUCTIONS } from "./guard/errors.mjs";
|
|
184
289
|
import { MiddlewareContextByLevel, MiddlewareLevel, runPipeline } from "./middleware/pipeline.mjs";
|
|
185
290
|
import { extractUserText } from "./middleware/utils/extract-user-text.mjs";
|
|
186
291
|
import { NamespacedStateAccessor, namespacedState } from "./middleware/utils/namespaced-state.mjs";
|
|
292
|
+
import { getObservers, isObserveAll, registerObserver, setObserveAll } from "./observe/observer-registry.mjs";
|
|
293
|
+
import { assertUrlAllowed, fetchTextWithPolicy, guardedFetch, readTextCapped, resolveOutboundPolicy } from "./security/outbound-policy.mjs";
|
|
294
|
+
import { isPrivateOrReservedIp } from "./security/private-ip.mjs";
|
|
295
|
+
import { DEFAULT_SENSITIVE_KEYS, RedactOptions, RedactedError, SENSITIVE_HEADERS, redact, redactError, redactHeaders, scrubSecrets } from "./security/redact.mjs";
|
|
187
296
|
import { renderPlaceholders } from "./system-prompt/render-placeholders.mjs";
|
|
188
|
-
import { accumulateCost, computeCost } from "./utils/compute-cost.mjs";
|
|
297
|
+
import { accumulateCost, computeCost, mergeUsage } from "./utils/compute-cost.mjs";
|
|
298
|
+
import { extractJsonLenient } from "./utils/extract-json-lenient.mjs";
|
|
189
299
|
import { extractJsonPayload } from "./utils/extract-json-payload.mjs";
|
|
190
300
|
import { generateRunId } from "./utils/generate-run-id.mjs";
|
|
191
|
-
import { extractJsonSchema } from "./utils/json-schema.mjs";
|
|
301
|
+
import { ExtractJsonSchemaOptions, JsonSchemaTarget, extractJsonSchema } from "./utils/json-schema.mjs";
|
|
192
302
|
import { prepareAttachmentPart } from "./utils/prepare-attachment-part.mjs";
|
|
193
303
|
import { resolveAttachment } from "./utils/resolve-attachment.mjs";
|
|
304
|
+
import { RunFrame, captureChildReport, currentRunFrame, withRunFrame, withoutRunFrame } from "./utils/run-context.mjs";
|
|
194
305
|
import { safeJsonParse } from "./utils/safe-json-parse.mjs";
|
|
195
306
|
import { LineageStamp, stampReportLineage } from "./utils/stamp-report-lineage.mjs";
|
|
196
307
|
import { approximateTokenCount } from "./utils/token-count.mjs";
|
|
@@ -198,5 +309,7 @@ import { computeSignature as computeSignature$1 } from "./workflow/signature.mjs
|
|
|
198
309
|
import { MatcherVerdict, matchConverge, matchOutputShape, matchPassStep, matchRouteTo } from "./testing/matcher-logic.mjs";
|
|
199
310
|
import { AiMatchers } from "./testing/matchers.mjs";
|
|
200
311
|
import { registerAiMatchers } from "./testing/register-lazy.mjs";
|
|
201
|
-
export { AIConfig, AIError, type AIErrorCode, type AIErrorOptions, type AckCallback, type AckConfig, type AckEntry, type AckRunEntry, type AckSnapshot, type AgentBranchSnapshot, AgentCancelledError, type AgentCancelledErrorOptions, type AgentCompletedPayload, type AgentConfig, type AgentContract, type AgentErrorPayload, type AgentEventHandler, type AgentEventMap, type AgentExecuteOptions, AgentExecutionError, AgentMaxTripsError, type AgentMaxTripsErrorOptions, type AgentMiddleware, type AgentMiddlewareExecuteHooks, type AgentMiddlewareSupervisorHooks, type AgentMiddlewareToolHooks, type AgentMiddlewareTripHooks, type AgentReport, type AgentResult, type AgentStartingPayload, type AgentStreamingPayload, type AgentToolCalledPayload, type AgentToolCallingFailedPayload, type AgentToolCallingPayload, type AgentToolEntry, type AgentTripCompletedPayload, type AgentTripStartedPayload, type AiMatchers, Attachment, AttachmentSource, type AttemptEntry, type BaseReport, type BaseResult, type BatchItemHandler, type BatchItemResult, type BatchItemStatus, type BatchOptions, type BatchReport, type BatchResult, type BudgetContract, type BudgetContractDimension, type BudgetContractFallback, type BudgetContractViolation, type BudgetContractViolationMode, BudgetExceededError, type BudgetExceededErrorOptions, type BudgetFallbackSignal, type BudgetOptions, type BudgetPricing, type BudgetUnit, type CheckpointRecord, type CheckpointStore, type ClassifierAgentEntry, type ClassifierCallback, type ClassifierConfig, type ClassifierContext, type ClassifierOutput, type ClassifierRefineContext, type ClassifierRefineResult, type ClassifierRunEntry, type ClassifierSnapshot, type CompactionResult, type CompleteEvent, ContentFilterError, type ContentFilterErrorOptions, ContentPart, ContextLengthExceededError, type ContextLengthExceededErrorOptions, type DecisionSource, type DispatchContext, type DispatchRawResult, END, EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage, EndSentinel, type EpisodicMemoryConfig, type ErrorCategory, type EvalCase, type EvalCaseResult, type EvalJudge, type EvalOptions, type EvalPredicate, type EvalReport, type EvalScore, type EvalScorer, type EvalScorerContext, type EvaluateBranchResult, type EvaluateContext, type EvaluateResult, type EventIdentity, ExecutableContract, type ExecutableTool, type ExecuteResult, type ExecutionReport, type ExecutionStatus, type FallbackAttempt, type FallbackModelContract, type FallbackModelOptions, type FallbackRetryPredicate, type FanOutOptions, type FanOutUnit, FinishReason, type GuardrailCheck, type GuardrailCheckResult, type GuardrailOptions, type GuardrailPhase, GuardrailViolationError, type GuardrailViolationErrorOptions, ImageSource, Instruction, InstructionContract, type IntentCallback, type IntentEntry, type IntentRunEntry, type IntentRunner, type IntentRunnerMap, InvalidRequestError, type IterationDecision, type IterationSnapshot, type LLMTrip, type LineageStamp, type MatcherVerdict, MaxIterationsError, type MaxIterationsErrorOptions, MaxStepsExceededError, type MaxStepsExceededErrorOptions, type MemoryConfig, type MemoryContract, type MemoryItem, type MemoryTier, Message, type MiddlewareAgentRef, type MiddlewareContextByLevel, type MiddlewareExecuteContext, type MiddlewareLevel, type MiddlewareModelRef, type MiddlewareState, type MiddlewareSupervisorContext, type MiddlewareSupervisorRef, type MiddlewareToolContext, type MiddlewareTripContext, MockModel, type MockModelResponse, type MockRouterDecision, type MockRouterExhaustion, type MockRouterOptions, MockSDK, type MockSDKConfig, ModelCallOptions, ModelCapabilities, ModelConfig, ModelContract, type ModelPricing, ModelResponse, ModelStreamChunk, ModelToolCallRequest, type NamespacedStateAccessor, type Next, type NextStepResult, type OrchestratorAsToolOptions, type OrchestratorAwaitingStatus, OrchestratorCancelledError, type OrchestratorCancelledErrorOptions, type OrchestratorCommandHandlers, type OrchestratorCommands, type OrchestratorConfig, OrchestratorConfigError, type OrchestratorContract, OrchestratorDriftError, type OrchestratorDriftErrorOptions, OrchestratorEmitter, type OrchestratorEvent, type OrchestratorEventHandler, type OrchestratorEventHandlers, type OrchestratorEventMap, type OrchestratorEventName, type OrchestratorExecuteOptions, OrchestratorExecution, type OrchestratorExecutionParams, OrchestratorFailedError, type OrchestratorMemoryConfig, type OrchestratorReport, type OrchestratorReportStatus, type OrchestratorReportType, type OrchestratorResult, type OrchestratorResumeOptions, type OrchestratorSessionScope, type OrchestratorStreamController, Persona, PersonaContract, type PgCheckpointOptions, type PgClientLike, type PgSnapshotStoreOptions, Placeholders, PlannerCancelledError, type PlannerCancelledErrorOptions, type PlannerCapability, type PlannerConfig, type PlannerContract, type PlannerExecuteOptions, PlannerFailedError, type PlannerPlan, PlannerPlanInvalidError, type PlannerReport, type PlannerReportType, type PlannerResult, type PlannerRunArgs, type PlannerStep, type PlannerStepSnapshot, type ProceduralMemoryConfig, ProviderAuthError, ProviderError, ProviderRateLimitError, type ProviderRateLimitErrorOptions, ProviderTimeoutError, QuotaExceededError, REPORT_SCHEMA_VERSION, ReasoningEffort, type RecallOptions, type RecalledMemory, type RedisCheckpointOptions, type RedisClientLike, type RedisSnapshotStoreOptions, type ReportStatus, type ReportType, ResolvedAttachment, type ResolvedIntentEntry, type ResolvedOrchestratorMemory, type RetryBackoff, type RetryConfig, type RouteContext, type RouterConfig, type RouterEntry, type RouterIntents, type RouterOutput, RoutingError, type RoutingErrorOptions, SDKAdapterContract, SchemaValidationError, type SchemaValidationErrorOptions, type SemanticCacheOptions, type SemanticMemoryConfig, type SessionContextOverrides, type SessionContract, type SessionSendResult, type SnapshotStore, type SpawnSubAgentSpec, type StepAgentInput, type StepDefinition, StepFailedError, type StepFailedErrorOptions, type StepLocalEvents, type StepOutputSpec, type StepSnapshot, StorageFileShape, type StreamContract, type StreamController, type StreamEvent, type StreamEventBody, StreamingToolGuardConfig, type SummarizeCallback, type SummarizeConfig, type SupervisorAgentCompletedPayload, type SupervisorAgentFailedPayload, type SupervisorAgentStartingPayload, type SupervisorAgentStreamingPayload, type SupervisorAsToolOptions, SupervisorCancelledError, type SupervisorCancelledErrorOptions, type SupervisorCancelledPayload, type SupervisorCompletedPayload, type SupervisorConfig, type SupervisorContract, SupervisorDriftError, type SupervisorDriftErrorOptions, SupervisorEmitter, type SupervisorErrorPayload, type SupervisorEvaluateVerdictPayload, type SupervisorEventHandler, type SupervisorEventHandlers, type SupervisorEventMap, type SupervisorExecuteOptions, SupervisorExecution, SupervisorFailedError, type SupervisorInput, type SupervisorIntentValue, type SupervisorIterationCompletedPayload, type SupervisorIterationStartingPayload, type SupervisorReport, type SupervisorResult, type SupervisorResumeOptions, type SupervisorRouterDecidedPayload, type SupervisorRouterDecidingPayload, SupervisorRoutingError, type SupervisorRoutingErrorOptions, type SupervisorSnapshot, type SupervisorSnapshotStatus, type SupervisorStartingPayload, type SupervisorStreamController, type SupervisorStreamEvent, type SupervisorTerminatedBy, SystemPrompt, SystemPromptBlockContract, SystemPromptContract, type ToolCall, ToolConfig, ToolContext, type ToolContract, type ToolEventMeta, ToolExecutionError, type ToolExecutionErrorOptions, type ToolInvokeResult, ToolMeta, ToolMode, type TurnSnapshot, type Usage, type UsageEvent, type WithoutIdentity, WorkflowCancelledError, type WorkflowCancelledErrorOptions, type WorkflowCancelledPayload, type WorkflowCompletedPayload, type WorkflowContext, type WorkflowDefinition, WorkflowDriftError, type WorkflowDriftErrorOptions, WorkflowError, type WorkflowErrorPayload, type WorkflowEventHandler, type WorkflowEventHandlers, type WorkflowEventMap, type WorkflowExecuteOptions, type WorkflowInstance, type WorkflowLoopWarningPayload, type WorkflowReport, type WorkflowResult, type WorkflowResumeOptions, type WorkflowRunOptions, type WorkflowSnapshot, type WorkflowStartingPayload, type WorkflowStepCompletedPayload, type WorkflowStepFailedPayload, type WorkflowStepRetryingPayload, type WorkflowStepSkippedPayload, type WorkflowStepStartingPayload, type WorkflowStepStreamingPayload, accumulateCost, agent, ai, approximateTokenCount, batch, budget, buildPlanSystemPrompt, buildRouterContextMessage, memory as checkpointMemory, pg as checkpointPg, redis as checkpointRedis, composeMiddleware, computeCost, computeOrchestratorSignature, computeSignature as computePlannerSignature, computeSignature$1 as computeSignature, computeSignature$2 as computeSupervisorSignature, contains, createAgentStream, createCommandDispatcher as createOrchestratorCommandDispatcher, createOrchestratorStream, createCancelledError as createSupervisorCancelledError, createSupervisorStream, evalScorers, exact, executableToTool, extractJsonPayload, extractJsonSchema, extractUserText, fallbackModel, fanOut, forTool, generateRunId, getAIConfig, guardrail, injectMemories as injectOrchestratorMemories, instruction, isExecutableTool, judge, loadSnapshotForResume as loadSupervisorSnapshotForResume, matchConverge, matchOutputShape, matchPassStep, matchRouteTo, memory$1 as memory, mockAgent, mockRouter, namespacedState, normalizeAgentTools, orchestrator, asTool as orchestratorAsTool, memoryQueryFromInput as orchestratorMemoryQueryFromInput, outcomeTextFromTurn as orchestratorOutcomeTextFromTurn, persistSupervisorSnapshot, persona, planSchema, planner, predicate, prepareAttachmentPart, readBudgetFallbackSignal, recallForTurn as recallOrchestratorMemory, registerAiMatchers, rememberTurnOutcome as rememberOrchestratorTurnOutcome, renderPlaceholders, resolveAttachment, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, resolveIntentEntries, resolveOrchestratorMemory, router, runEval, runResume as runOrchestratorResume, runTurn as runOrchestratorTurn, runPipeline, safeJsonParse, semanticCache, setAIConfig, memory$2 as snapshotMemory, pg$1 as snapshotPg, redis$1 as snapshotRedis, spawnSubAgent, stampReportLineage, step, streamTurn as streamOrchestratorTurn, supervisor, asTool$1 as supervisorAsTool, systemPrompt, tool, workflow };
|
|
312
|
+
export { AIConfig, AIError, type AIErrorCode, type AIErrorOptions, type AckCallback, type AckConfig, type AckEntry, type AckRunEntry, type AckSnapshot, type AgentBranchSnapshot, AgentCancelledError, type AgentCancelledErrorOptions, type AgentCompletedPayload, type AgentConfig, type AgentContract, AgentDriftError, type AgentDriftErrorOptions, type AgentErrorPayload, type AgentEventHandler, type AgentEventMap, type AgentExecuteOptions, AgentExecutionError, AgentMaxTripsError, type AgentMaxTripsErrorOptions, type AgentMiddleware, type AgentMiddlewareExecuteHooks, type AgentMiddlewareSupervisorHooks, type AgentMiddlewareToolHooks, type AgentMiddlewareTripHooks, type AgentReport, type AgentResult, type AgentResumeOptions, type AgentSnapshot, type AgentSnapshotStatus, type AgentStartingPayload, type AgentStreamingPayload, type AgentToolCalledPayload, type AgentToolCallingFailedPayload, type AgentToolCallingPayload, type AgentToolEntry, type AgentTripCompletedPayload, type AgentTripStartedPayload, type Ai, type AiMatchers, type ApprovalDecision, type ApprovalDecisionType, type ApprovalHandler, ApprovalRejectedError, type ApprovalRejectedErrorOptions, type ApprovalRequest, type ApprovalRequestContext, Attachment, AttachmentPolicy, AttachmentSource, type AttemptEntry, AudioInput, type BaseReport, type BaseResult, type BatchItemHandler, type BatchItemResult, type BatchItemStatus, type BatchOptions, type BatchReport, type BatchResult, BinarySource, type BudgetContract, type BudgetContractDimension, type BudgetContractFallback, type BudgetContractViolation, type BudgetContractViolationMode, BudgetExceededError, type BudgetExceededErrorOptions, type BudgetFallbackSignal, type BudgetOptions, type BudgetPricing, type BudgetUnit, type CapturedMessage, type Cassette, type CassetteEntry, type CheckpointRecord, type CheckpointStore, type Chunk, type ChunkOptions, type ChunkType, type Citation, type ClassifierAgentEntry, type ClassifierCallback, type ClassifierConfig, type ClassifierContext, type ClassifierOutput, type ClassifierRefineContext, type ClassifierRefineResult, type ClassifierRunEntry, type ClassifierSnapshot, type CompactionResult, type CompleteEvent, ContentFilterError, type ContentFilterErrorOptions, ContentPart, ContextLengthExceededError, type ContextLengthExceededErrorOptions, DEFAULT_HASH_OPTIONS, DEFAULT_SENSITIVE_KEYS, type DatasetContract, type DatasetEntry, type DatasetOptions, type DecisionSource, type DispatchContext, type DispatchRawResult, END, EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage, EndSentinel, type EpisodicMemoryConfig, type ErrorCategory, type EvalCase, type EvalCaseResult, type EvalJudge, type EvalOptions, type EvalPredicate, type EvalReport, type EvalScore, type EvalScorer, type EvalScorerContext, type EvaluateBranchResult, type EvaluateContext, type EvaluateResult, type EventIdentity, ExecutableContract, type ExecutableTool, type ExecuteResult, type ExecutionReport, type ExecutionStatus, type ExportedPrompt, type ExportedPromptVersion, type ExportedRegistry, type ExtractJsonSchemaOptions, type FallbackAttempt, type FallbackModelContract, type FallbackModelOptions, type FallbackRetryPredicate, type FanOutOptions, type FanOutUnit, FinishReason, type FlagRecord, type FlowObserveOption, GeneratedAudio, GeneratedImage, type GuardOptions, type GuardrailAction, type GuardrailBlockEvent, type GuardrailCheck, type GuardrailCheckResult, type GuardrailDetector, type GuardrailDetectorContext, type GuardrailEscalation, type GuardrailFactory, type GuardrailMatch, type GuardrailOptions, type GuardrailPhase, type GuardrailVerdict, GuardrailViolationError, type GuardrailViolationErrorOptions, type HumanApprovalOptions, type HumanErrorCode, type ImageData, ImageGenerationOptions, ImageGenerationResponse, ImageModelConfig, ImageModelContract, ImageModelPricing, type ImageParams, type ImageReport, type ImageResult, ImageSource, type InjectionDetectorOptions, Instruction, InstructionContract, type IntentCallback, type IntentEntry, type IntentRunEntry, type IntentRunner, type IntentRunnerMap, type InterruptPolicy, type InterruptStore, InterruptSuspendedError, type InterruptSuspendedErrorOptions, InvalidRequestError, type IterationDecision, type IterationSnapshot, JUDGE_DEFAULT_REPAIR_ATTEMPTS, type JsonSchemaTarget, type JudgeAgentConfig, type JudgeConfig, type KeywordRerankerOptions, type LLMTrip, type LexicalDoc, type LineageStamp, type LlmRerankerOptions, type LoadHtmlOptions, type LoadPdfOptions, type LoadSkillInput, type LoadSkillResult, type LoadSkillToolDeps, type LoadTextOptions, type LoadWebOptions, type MatcherVerdict, MaxIterationsError, type MaxIterationsErrorOptions, MaxStepsExceededError, type MaxStepsExceededErrorOptions, type MemoryConfig, type MemoryContract, type MemoryItem, type MemoryTier, Message, type MiddlewareAgentRef, type MiddlewareContextByLevel, type MiddlewareExecuteContext, type MiddlewareLevel, type MiddlewareModelRef, type MiddlewareState, type MiddlewareSupervisorContext, type MiddlewareSupervisorRef, type MiddlewareToolContext, type MiddlewareTripContext, type MockImageCall, MockImageModel, type MockImageResponse, MockModel, type MockModelResponse, type MockRouterDecision, type MockRouterExhaustion, type MockRouterOptions, MockSDK, type MockSDKConfig, MockSkillsStore, type MockSpeechCall, MockSpeechModel, type MockSpeechResponse, type MockTranscriptionCall, MockTranscriptionModel, type MockTranscriptionResponse, ModelCallOptions, ModelCapabilities, ModelConfig, ModelContract, type ModelPricing, ModelResponse, ModelStreamChunk, ModelToolCallRequest, type MultiQueryOptions, type NamespacedStateAccessor, type Next, type NextStepResult, OPENAI_INSTALL_INSTRUCTIONS, type ObjectStreamEvent, type Observer, type OpenAiClientLike, type OpenAiModerationCreateBody, type OpenAiModerationOptions, type OpenAiModerationResponse, type OpenAiModerationResult, type OrchestratorAsToolOptions, type OrchestratorAwaitingStatus, OrchestratorCancelledError, type OrchestratorCancelledErrorOptions, type OrchestratorCommandHandlers, type OrchestratorCommands, type OrchestratorConfig, OrchestratorConfigError, type OrchestratorContract, OrchestratorDriftError, type OrchestratorDriftErrorOptions, OrchestratorEmitter, type OrchestratorEvent, type OrchestratorEventHandler, type OrchestratorEventHandlers, type OrchestratorEventMap, type OrchestratorEventName, type OrchestratorExecuteOptions, OrchestratorExecution, type OrchestratorExecutionParams, OrchestratorFailedError, type OrchestratorMemoryConfig, type OrchestratorReport, type OrchestratorReportStatus, type OrchestratorReportType, type OrchestratorResult, type OrchestratorResumeOptions, type OrchestratorSessionScope, type OrchestratorStreamController, type OutboundPolicy, OutboundPolicyError, PDF_PARSE_INSTALL_INSTRUCTIONS, type ParsedFrontmatter, type PendingInterrupt, type PendingInterruptStatus, Persona, PersonaContract, type PgCheckpointOptions, type PgClientLike, type PgInterruptOptions, type PgSnapshotStoreOptions, type PgVectorStoreInstance, type PgVectorStoreOptions, type PiiCategory, type PiiDetectorOptions, Placeholders, PlannerCancelledError, type PlannerCancelledErrorOptions, type PlannerCapability, type PlannerConfig, type PlannerContract, PlannerDriftError, type PlannerDriftErrorOptions, type PlannerExecuteOptions, PlannerFailedError, type PlannerPlan, PlannerPlanInvalidError, type PlannerReport, type PlannerReportType, type PlannerResult, type PlannerResumeOptions, type PlannerRunArgs, type PlannerSnapshot, type PlannerSnapshotStatus, type PlannerStep, type PlannerStepDirective, type PlannerStepSnapshot, type PolicyContext, type PolicyVerdict, type ProceduralMemoryConfig, type PromptDiff, type PromptDiffBlock, type PromptEntry, type PromptJudgeCacheLike, type PromptLangfuseSyncOptions, PromptNotFoundError, type PromptRegistryContract, type PromptRegistryOptions, type PromptResolveOptions, type PromptTemplateVersion, type PromptValidateOptions, type PromptValidateTarget, PromptValidationError, type PromptValidationNote, type PromptValidationReport, type PromptValidationResult, type PromptValidationSeverity, type PromptVersion, type PromptsManagerContract, type PromptsManagerEntry, type PromptsManagerOptions, type PromptsManagerRegisterOptions, type PromptsValidateOptions, ProviderAuthError, ProviderError, ProviderRateLimitError, type ProviderRateLimitErrorOptions, ProviderTimeoutError, QuotaExceededError, REPORT_SCHEMA_VERSION, type Rag, type RagAsToolOptions, type RagConfig, type RagDocument, type RagLoaderMetadata, type RagLoaderOptions, type RagLoaderResult, type RagLoaderType, type RagReranker, type RankedItem, ReasoningEffort, type RecallOptions, type RecalledMemory, type RedactOptions, type RedactedError, type RedisCheckpointOptions, type RedisClientLike, type RedisInterruptOptions, type RedisSnapshotStoreOptions, type ReportStatus, type ReportType, ResolvedAttachment, type ResolvedIntentEntry, type ResolvedOrchestratorMemory, type ResolvedOutboundPolicy, type ResolvedPrompt, type ResumeOptions, type ResumeResult, type RetrieveOptions, type RetrieveResult, type RetrievedChunk, type RetryBackoff, type RetryConfig, type ReviewOutcome, type RouteContext, type RouterConfig, type RouterEntry, type RouterIntents, type RouterOutput, RoutingError, type RoutingErrorOptions, type RunFrame, SDKAdapterContract, SENSITIVE_HEADERS, SSE_DONE, type SaveSkillInput, type SaveSkillResult, type SaveSkillToolDeps, SchemaValidationError, type SchemaValidationErrorOptions, type SemanticCacheOptions, type SemanticMemoryConfig, type ServableExecutable, type ServeOptions, type SessionContextOverrides, type SessionContract, type SessionLock, type SessionSendResult, type SkillAnalyticsEvent, type SkillCatalogEntry, type SkillInjectMode, type SkillRecord, type SkillReviewGate, type SkillSource, type SkillsConfig, type SkillsContract, type SkillsStoreContract, type SnapshotStore, type SpawnSubAgentSpec, type SpeechData, SpeechGenerationResponse, SpeechModelConfig, SpeechModelContract, SpeechModelPricing, SpeechOptions, type SpeechParams, type SpeechReport, type SpeechResult, type StepAgentInput, type StepDefinition, StepFailedError, type StepFailedErrorOptions, type StepLocalEvents, type StepOutputSpec, type StepSnapshot, StorageFileShape, type StreamContract, type StreamController, type StreamEvent, type StreamEventBody, type StreamLike, type StreamObjectParams, StreamingToolGuardConfig, type SummarizeCallback, type SummarizeConfig, type SupervisorAgentCompletedPayload, type SupervisorAgentFailedPayload, type SupervisorAgentStartingPayload, type SupervisorAgentStreamingPayload, type SupervisorAsToolOptions, SupervisorCancelledError, type SupervisorCancelledErrorOptions, type SupervisorCancelledPayload, type SupervisorCompletedPayload, type SupervisorConfig, type SupervisorContract, SupervisorDriftError, type SupervisorDriftErrorOptions, SupervisorEmitter, type SupervisorErrorPayload, type SupervisorEvaluateVerdictPayload, type SupervisorEventHandler, type SupervisorEventHandlers, type SupervisorEventMap, type SupervisorExecuteOptions, SupervisorExecution, SupervisorFailedError, type SupervisorInput, type SupervisorIntentValue, type SupervisorIterationCompletedPayload, type SupervisorIterationStartingPayload, type SupervisorReport, type SupervisorResult, type SupervisorResumeOptions, type SupervisorRouterDecidedPayload, type SupervisorRouterDecidingPayload, SupervisorRoutingError, type SupervisorRoutingErrorOptions, type SupervisorSnapshot, type SupervisorSnapshotStatus, type SupervisorStartingPayload, type SupervisorStreamController, type SupervisorStreamEvent, type SupervisorTerminatedBy, type SyncGuardrailDetector, SystemPrompt, SystemPromptBlockContract, SystemPromptContract, SystemPromptMergeOptions, SystemPromptMergeSource, SystemPromptMeta, type TeamConfig, type TeamGate, type TeamGateFn, type TeamMemberValue, type TextInput, type ToolCall, ToolConfig, ToolContext, type ToolContract, type ToolEventMeta, ToolExecutionError, type ToolExecutionErrorOptions, type ToolInvokeResult, ToolMeta, ToolMode, type TopicFilterOptions, TranscribeOptions, type TranscribeParams, type TranscriptionData, TranscriptionModelConfig, TranscriptionModelContract, TranscriptionModelPricing, type TranscriptionReport, TranscriptionResponse, type TranscriptionResult, TranscriptionSegment, type TurnSnapshot, type Usage, type UsageEvent, VcrCassetteMissError, type VcrCassetteMissErrorOptions, type VcrMode, type VcrModel, type VcrOptions, type VectorStore, type WithoutIdentity, WorkflowCancelledError, type WorkflowCancelledErrorOptions, type WorkflowCancelledPayload, type WorkflowCompletedPayload, type WorkflowContext, type WorkflowDefinition, WorkflowDriftError, type WorkflowDriftErrorOptions, WorkflowError, type WorkflowErrorPayload, type WorkflowEventHandler, type WorkflowEventHandlers, type WorkflowEventMap, type WorkflowExecuteOptions, type WorkflowInstance, type WorkflowLoopWarningPayload, type WorkflowReport, type WorkflowResult, type WorkflowResumeOptions, type WorkflowRunOptions, type WorkflowSnapshot, type WorkflowStartingPayload, type WorkflowStepCompletedPayload, type WorkflowStepFailedPayload, type WorkflowStepRetryingPayload, type WorkflowStepSkippedPayload, type WorkflowStepStartingPayload, type WorkflowStepStreamingPayload, accumulateCost, agent, ai, approximateTokenCount, assertUrlAllowed, audioFromBuffer, audioFromFile, audioMediaTypeForFilename, batch, bm25Rank, budget, buildCatalog, buildPlanSystemPrompt, buildRouterContextMessage, cacheVectorStore, captureChildReport, memory as checkpointMemory, pg as checkpointPg, redis as checkpointRedis, chunk, collectStreamObject, composeMiddleware, computeCost, computeImageCost, computeOrchestratorSignature, computeSignature as computePlannerSignature, computeSignature$1 as computeSignature, computeSignature$2 as computeSupervisorSignature, contains, createAgentStream, createCommandDispatcher as createOrchestratorCommandDispatcher, createOrchestratorStream, createCancelledError as createSupervisorCancelledError, createSupervisorStream, currentRunFrame, dataset, defaultPromptsManager, diff, directorySource, encodeSSE, evalScorers, evaluatePolicy, exact, executableToTool, extractJsonLenient, extractJsonPayload, extractJsonSchema, extractUserText, fallbackModel, fanOut, fetchTextWithPolicy, forTool, fromJSON, generateRunId, getAIConfig, getObservers, guard, guardedFetch, guardrail, hashRequest, humanApproval, hybridRank, image, inProcessSessionLock, injectMemories as injectOrchestratorMemories, injection, instruction, memory$1 as interruptMemory, pg$1 as interruptPg, redis$1 as interruptRedis, isExecutableTool, isObserveAll, isPrivateOrReservedIp, judge, keywordReranker, llmReranker, loadHtml, loadPdf, loadRecord, loadSkillTool, loadSnapshotForResume as loadSupervisorSnapshotForResume, loadText, loadWeb, matchConverge, matchOutputShape, matchPassStep, matchRouteTo, memory$2 as memory, mergeUsage, mockAgent, mockRouter, moderation, multiQuery, namespacedState, noopSessionLock, normalizeAgentTools, onConfigApplied, orchestrator, asTool as orchestratorAsTool, memoryQueryFromInput as orchestratorMemoryQueryFromInput, outcomeTextFromTurn as orchestratorOutcomeTextFromTurn, parseFrontmatter, parsePartialJson, parseTags, persistSupervisorSnapshot, persona, pgVectorStore, pii, planSchema, planner, predicate, prepareAttachmentPart, proceduralSkillStore, prompt, promptKey, prompts, rag, readBudgetFallbackSignal, readTextCapped, recallForTurn as recallOrchestratorMemory, reciprocalRankFusion, redact, redactError, redactHeaders, registerAiMatchers, registerObserver, rememberTurnOutcome as rememberOrchestratorTurnOutcome, renderCatalogPrompt, renderPlaceholders, resolveAttachment, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, resolveIntentEntries, resolveObservers, resolveOrchestratorMemory, resolveOutboundPolicy, resolveSource, resume, router, runEval, runResume as runOrchestratorResume, runTurn as runOrchestratorTurn, runPipeline, runReviewGate, safeJsonParse, saveSkillTool, scrubSecrets, semanticCache, semanticPreselect, serve, setAIConfig, setObserveAll, skills, memory$3 as snapshotMemory, pg$2 as snapshotPg, redis$2 as snapshotRedis, spawnSubAgent, speech, stampReportLineage, step, storeSource, streamObject, streamTurn as streamOrchestratorTurn, streamToSSE, supervisor, asTool$1 as supervisorAsTool, systemPrompt, team, toJSON, toJUnit, tool, topic, transcribe, urlSource, vcr, vectorLiteral, withRunFrame, withoutRunFrame, workflow };
|
|
313
|
+
import "./ai.mjs";
|
|
314
|
+
import "./config.mjs";
|
|
202
315
|
import "./testing/matchers.mjs";
|