@warlock.js/ai 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -0
- package/cjs/index.cjs +8625 -0
- package/cjs/index.cjs.map +1 -0
- package/esm/agent/agent-config.type.d.mts +160 -0
- package/esm/agent/agent-config.type.d.mts.map +1 -0
- package/esm/agent/agent-input-builder.mjs +111 -0
- package/esm/agent/agent-input-builder.mjs.map +1 -0
- package/esm/agent/agent-log-event.mjs +101 -0
- package/esm/agent/agent-log-event.mjs.map +1 -0
- package/esm/agent/agent-stream.d.mts +47 -0
- package/esm/agent/agent-stream.d.mts.map +1 -0
- package/esm/agent/agent-stream.mjs +82 -0
- package/esm/agent/agent-stream.mjs.map +1 -0
- package/esm/agent/agent-to-stream-event.mjs +86 -0
- package/esm/agent/agent-to-stream-event.mjs.map +1 -0
- package/esm/agent/agent.d.mts +38 -0
- package/esm/agent/agent.d.mts.map +1 -0
- package/esm/agent/agent.mjs +974 -0
- package/esm/agent/agent.mjs.map +1 -0
- package/esm/agent/index.d.mts +3 -0
- package/esm/agent/index.mjs +4 -0
- package/esm/agent/json-stream-guard.mjs +400 -0
- package/esm/agent/json-stream-guard.mjs.map +1 -0
- package/esm/ai.d.mts +64 -0
- package/esm/ai.d.mts.map +1 -0
- package/esm/ai.mjs +65 -0
- package/esm/ai.mjs.map +1 -0
- package/esm/config.d.mts +79 -0
- package/esm/config.d.mts.map +1 -0
- package/esm/config.mjs +43 -0
- package/esm/config.mjs.map +1 -0
- package/esm/contracts/agent/agent-options.type.d.mts +132 -0
- package/esm/contracts/agent/agent-options.type.d.mts.map +1 -0
- package/esm/contracts/agent/agent.contract.d.mts +92 -0
- package/esm/contracts/agent/agent.contract.d.mts.map +1 -0
- package/esm/contracts/agent/index.d.mts +2 -0
- package/esm/contracts/attachment.type.d.mts +100 -0
- package/esm/contracts/attachment.type.d.mts.map +1 -0
- package/esm/contracts/content-part.type.d.mts +55 -0
- package/esm/contracts/content-part.type.d.mts.map +1 -0
- package/esm/contracts/conversation-message.type.d.mts +51 -0
- package/esm/contracts/conversation-message.type.d.mts.map +1 -0
- package/esm/contracts/embedder.contract.d.mts +69 -0
- package/esm/contracts/embedder.contract.d.mts.map +1 -0
- package/esm/contracts/end.type.d.mts +53 -0
- package/esm/contracts/end.type.d.mts.map +1 -0
- package/esm/contracts/end.type.mjs +47 -0
- package/esm/contracts/end.type.mjs.map +1 -0
- package/esm/contracts/events/agent-events.type.d.mts +71 -0
- package/esm/contracts/events/agent-events.type.d.mts.map +1 -0
- package/esm/contracts/events/complete-event.type.d.mts +33 -0
- package/esm/contracts/events/complete-event.type.d.mts.map +1 -0
- package/esm/contracts/events/event-identity.type.d.mts +30 -0
- package/esm/contracts/events/event-identity.type.d.mts.map +1 -0
- package/esm/contracts/events/event-map.type.d.mts +80 -0
- package/esm/contracts/events/event-map.type.d.mts.map +1 -0
- package/esm/contracts/events/index.d.mts +7 -0
- package/esm/contracts/events/supervisor-events.type.d.mts +162 -0
- package/esm/contracts/events/supervisor-events.type.d.mts.map +1 -0
- package/esm/contracts/events/usage-event.type.d.mts +39 -0
- package/esm/contracts/events/usage-event.type.d.mts.map +1 -0
- package/esm/contracts/events/workflow-events.type.d.mts +51 -0
- package/esm/contracts/events/workflow-events.type.d.mts.map +1 -0
- package/esm/contracts/executable.contract.d.mts +25 -0
- package/esm/contracts/executable.contract.d.mts.map +1 -0
- package/esm/contracts/finish-reason.type.d.mts +17 -0
- package/esm/contracts/finish-reason.type.d.mts.map +1 -0
- package/esm/contracts/index.d.mts +63 -0
- package/esm/contracts/middleware/index.d.mts +3 -0
- package/esm/contracts/middleware/middleware-context.type.d.mts +99 -0
- package/esm/contracts/middleware/middleware-context.type.d.mts.map +1 -0
- package/esm/contracts/middleware/middleware-state.type.d.mts +34 -0
- package/esm/contracts/middleware/middleware-state.type.d.mts.map +1 -0
- package/esm/contracts/middleware/middleware.contract.d.mts +140 -0
- package/esm/contracts/middleware/middleware.contract.d.mts.map +1 -0
- package/esm/contracts/model-tool-call-request.type.d.mts +58 -0
- package/esm/contracts/model-tool-call-request.type.d.mts.map +1 -0
- package/esm/contracts/model.contract.d.mts +164 -0
- package/esm/contracts/model.contract.d.mts.map +1 -0
- package/esm/contracts/placeholders.type.d.mts +23 -0
- package/esm/contracts/placeholders.type.d.mts.map +1 -0
- package/esm/contracts/result/agent-result.type.d.mts +33 -0
- package/esm/contracts/result/agent-result.type.d.mts.map +1 -0
- package/esm/contracts/result/attempt-entry.type.d.mts +40 -0
- package/esm/contracts/result/attempt-entry.type.d.mts.map +1 -0
- package/esm/contracts/result/base-report.type.d.mts +137 -0
- package/esm/contracts/result/base-report.type.d.mts.map +1 -0
- package/esm/contracts/result/base-report.type.mjs +17 -0
- package/esm/contracts/result/base-report.type.mjs.map +1 -0
- package/esm/contracts/result/base-result.type.d.mts +26 -0
- package/esm/contracts/result/base-result.type.d.mts.map +1 -0
- package/esm/contracts/result/execute-result.type.d.mts +40 -0
- package/esm/contracts/result/execute-result.type.d.mts.map +1 -0
- package/esm/contracts/result/execution-report.type.d.mts +50 -0
- package/esm/contracts/result/execution-report.type.d.mts.map +1 -0
- package/esm/contracts/result/index.d.mts +14 -0
- package/esm/contracts/result/llm-trip.type.d.mts +36 -0
- package/esm/contracts/result/llm-trip.type.d.mts.map +1 -0
- package/esm/contracts/result/model-pricing.type.d.mts +51 -0
- package/esm/contracts/result/model-pricing.type.d.mts.map +1 -0
- package/esm/contracts/result/session-send-result.type.d.mts +29 -0
- package/esm/contracts/result/session-send-result.type.d.mts.map +1 -0
- package/esm/contracts/result/step-result.type.d.mts +43 -0
- package/esm/contracts/result/step-result.type.d.mts.map +1 -0
- package/esm/contracts/result/supervisor-result.type.d.mts +86 -0
- package/esm/contracts/result/supervisor-result.type.d.mts.map +1 -0
- package/esm/contracts/result/tool-call.type.d.mts +44 -0
- package/esm/contracts/result/tool-call.type.d.mts.map +1 -0
- package/esm/contracts/result/usage.type.d.mts +57 -0
- package/esm/contracts/result/usage.type.d.mts.map +1 -0
- package/esm/contracts/result/workflow-result.type.d.mts +45 -0
- package/esm/contracts/result/workflow-result.type.d.mts.map +1 -0
- package/esm/contracts/sdk-adapter.contract.d.mts +77 -0
- package/esm/contracts/sdk-adapter.contract.d.mts.map +1 -0
- package/esm/contracts/stream/stream-event.type.d.mts +68 -0
- package/esm/contracts/stream/stream-event.type.d.mts.map +1 -0
- package/esm/contracts/stream/stream.contract.d.mts +61 -0
- package/esm/contracts/stream/stream.contract.d.mts.map +1 -0
- package/esm/contracts/streaming-tool-guard-config.type.d.mts +78 -0
- package/esm/contracts/streaming-tool-guard-config.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/ack-entry.type.d.mts +97 -0
- package/esm/contracts/supervisor/ack-entry.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/classifier-context.type.d.mts +189 -0
- package/esm/contracts/supervisor/classifier-context.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/dispatch-context.type.d.mts +235 -0
- package/esm/contracts/supervisor/dispatch-context.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/evaluate-context.type.d.mts +124 -0
- package/esm/contracts/supervisor/evaluate-context.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/index.d.mts +16 -0
- package/esm/contracts/supervisor/intent-entry.type.d.mts +254 -0
- package/esm/contracts/supervisor/intent-entry.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/iteration-snapshot.type.d.mts +117 -0
- package/esm/contracts/supervisor/iteration-snapshot.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/next.type.d.mts +25 -0
- package/esm/contracts/supervisor/next.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/route-context.type.d.mts +91 -0
- package/esm/contracts/supervisor/route-context.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/router-entry.type.d.mts +67 -0
- package/esm/contracts/supervisor/router-entry.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor-config.type.d.mts +356 -0
- package/esm/contracts/supervisor/supervisor-config.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts +90 -0
- package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor-input.type.d.mts +24 -0
- package/esm/contracts/supervisor/supervisor-input.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts +49 -0
- package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts +16 -0
- package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts.map +1 -0
- package/esm/contracts/supervisor/supervisor.contract.d.mts +126 -0
- package/esm/contracts/supervisor/supervisor.contract.d.mts.map +1 -0
- package/esm/contracts/system-prompt.contract.d.mts +118 -0
- package/esm/contracts/system-prompt.contract.d.mts.map +1 -0
- package/esm/contracts/tool.contract.d.mts +161 -0
- package/esm/contracts/tool.contract.d.mts.map +1 -0
- package/esm/contracts/workflow/index.d.mts +6 -0
- package/esm/contracts/workflow/next-step-result.type.d.mts +17 -0
- package/esm/contracts/workflow/next-step-result.type.d.mts.map +1 -0
- package/esm/contracts/workflow/retry-config.type.d.mts +19 -0
- package/esm/contracts/workflow/retry-config.type.d.mts.map +1 -0
- package/esm/contracts/workflow/step.contract.d.mts +189 -0
- package/esm/contracts/workflow/step.contract.d.mts.map +1 -0
- package/esm/contracts/workflow/workflow-context.type.d.mts +45 -0
- package/esm/contracts/workflow/workflow-context.type.d.mts.map +1 -0
- package/esm/contracts/workflow/workflow-snapshot.type.d.mts +24 -0
- package/esm/contracts/workflow/workflow-snapshot.type.d.mts.map +1 -0
- package/esm/contracts/workflow/workflow.contract.d.mts +142 -0
- package/esm/contracts/workflow/workflow.contract.d.mts.map +1 -0
- package/esm/errors/agent-cancelled-error.d.mts +49 -0
- package/esm/errors/agent-cancelled-error.d.mts.map +1 -0
- package/esm/errors/agent-cancelled-error.mjs +43 -0
- package/esm/errors/agent-cancelled-error.mjs.map +1 -0
- package/esm/errors/agent-execution-error.d.mts +32 -0
- package/esm/errors/agent-execution-error.d.mts.map +1 -0
- package/esm/errors/agent-execution-error.mjs +35 -0
- package/esm/errors/agent-execution-error.mjs.map +1 -0
- package/esm/errors/agent-max-trips-error.d.mts +45 -0
- package/esm/errors/agent-max-trips-error.d.mts.map +1 -0
- package/esm/errors/agent-max-trips-error.mjs +41 -0
- package/esm/errors/agent-max-trips-error.mjs.map +1 -0
- package/esm/errors/ai-error.d.mts +94 -0
- package/esm/errors/ai-error.d.mts.map +1 -0
- package/esm/errors/ai-error.mjs +68 -0
- package/esm/errors/ai-error.mjs.map +1 -0
- package/esm/errors/budget-exceeded-error.d.mts +41 -0
- package/esm/errors/budget-exceeded-error.d.mts.map +1 -0
- package/esm/errors/budget-exceeded-error.mjs +31 -0
- package/esm/errors/budget-exceeded-error.mjs.map +1 -0
- package/esm/errors/content-filter-error.d.mts +33 -0
- package/esm/errors/content-filter-error.d.mts.map +1 -0
- package/esm/errors/content-filter-error.mjs +28 -0
- package/esm/errors/content-filter-error.mjs.map +1 -0
- package/esm/errors/context-length-exceeded-error.d.mts +38 -0
- package/esm/errors/context-length-exceeded-error.d.mts.map +1 -0
- package/esm/errors/context-length-exceeded-error.mjs +31 -0
- package/esm/errors/context-length-exceeded-error.mjs.map +1 -0
- package/esm/errors/error-category.type.d.mts +30 -0
- package/esm/errors/error-category.type.d.mts.map +1 -0
- package/esm/errors/error-code.type.d.mts +19 -0
- package/esm/errors/error-code.type.d.mts.map +1 -0
- package/esm/errors/guardrail-violation-error.d.mts +55 -0
- package/esm/errors/guardrail-violation-error.d.mts.map +1 -0
- package/esm/errors/guardrail-violation-error.mjs +41 -0
- package/esm/errors/guardrail-violation-error.mjs.map +1 -0
- package/esm/errors/index.d.mts +29 -0
- package/esm/errors/index.mjs +29 -0
- package/esm/errors/invalid-request-error.d.mts +27 -0
- package/esm/errors/invalid-request-error.d.mts.map +1 -0
- package/esm/errors/invalid-request-error.mjs +31 -0
- package/esm/errors/invalid-request-error.mjs.map +1 -0
- package/esm/errors/max-iterations-error.d.mts +31 -0
- package/esm/errors/max-iterations-error.d.mts.map +1 -0
- package/esm/errors/max-iterations-error.mjs +32 -0
- package/esm/errors/max-iterations-error.mjs.map +1 -0
- package/esm/errors/max-steps-exceeded-error.d.mts +20 -0
- package/esm/errors/max-steps-exceeded-error.d.mts.map +1 -0
- package/esm/errors/max-steps-exceeded-error.mjs +21 -0
- package/esm/errors/max-steps-exceeded-error.mjs.map +1 -0
- package/esm/errors/provider-auth-error.d.mts +22 -0
- package/esm/errors/provider-auth-error.d.mts.map +1 -0
- package/esm/errors/provider-auth-error.mjs +26 -0
- package/esm/errors/provider-auth-error.mjs.map +1 -0
- package/esm/errors/provider-error.d.mts +38 -0
- package/esm/errors/provider-error.d.mts.map +1 -0
- package/esm/errors/provider-error.mjs +42 -0
- package/esm/errors/provider-error.mjs.map +1 -0
- package/esm/errors/provider-rate-limit-error.d.mts +34 -0
- package/esm/errors/provider-rate-limit-error.d.mts.map +1 -0
- package/esm/errors/provider-rate-limit-error.mjs +31 -0
- package/esm/errors/provider-rate-limit-error.mjs.map +1 -0
- package/esm/errors/provider-timeout-error.d.mts +22 -0
- package/esm/errors/provider-timeout-error.d.mts.map +1 -0
- package/esm/errors/provider-timeout-error.mjs +26 -0
- package/esm/errors/provider-timeout-error.mjs.map +1 -0
- package/esm/errors/quota-exceeded-error.d.mts +36 -0
- package/esm/errors/quota-exceeded-error.d.mts.map +1 -0
- package/esm/errors/quota-exceeded-error.mjs +40 -0
- package/esm/errors/quota-exceeded-error.mjs.map +1 -0
- package/esm/errors/routing-error.d.mts +23 -0
- package/esm/errors/routing-error.d.mts.map +1 -0
- package/esm/errors/routing-error.mjs +23 -0
- package/esm/errors/routing-error.mjs.map +1 -0
- package/esm/errors/schema-validation-error.d.mts +40 -0
- package/esm/errors/schema-validation-error.d.mts.map +1 -0
- package/esm/errors/schema-validation-error.mjs +37 -0
- package/esm/errors/schema-validation-error.mjs.map +1 -0
- package/esm/errors/step-failed-error.d.mts +20 -0
- package/esm/errors/step-failed-error.d.mts.map +1 -0
- package/esm/errors/step-failed-error.mjs +19 -0
- package/esm/errors/step-failed-error.mjs.map +1 -0
- package/esm/errors/supervisor-cancelled-error.d.mts +29 -0
- package/esm/errors/supervisor-cancelled-error.d.mts.map +1 -0
- package/esm/errors/supervisor-cancelled-error.mjs +29 -0
- package/esm/errors/supervisor-cancelled-error.mjs.map +1 -0
- package/esm/errors/supervisor-drift-error.d.mts +31 -0
- package/esm/errors/supervisor-drift-error.d.mts.map +1 -0
- package/esm/errors/supervisor-drift-error.mjs +30 -0
- package/esm/errors/supervisor-drift-error.mjs.map +1 -0
- package/esm/errors/supervisor-failed-error.d.mts +40 -0
- package/esm/errors/supervisor-failed-error.d.mts.map +1 -0
- package/esm/errors/supervisor-failed-error.mjs +43 -0
- package/esm/errors/supervisor-failed-error.mjs.map +1 -0
- package/esm/errors/supervisor-routing-error.d.mts +44 -0
- package/esm/errors/supervisor-routing-error.d.mts.map +1 -0
- package/esm/errors/supervisor-routing-error.mjs +39 -0
- package/esm/errors/supervisor-routing-error.mjs.map +1 -0
- package/esm/errors/tool-execution-error.d.mts +35 -0
- package/esm/errors/tool-execution-error.d.mts.map +1 -0
- package/esm/errors/tool-execution-error.mjs +32 -0
- package/esm/errors/tool-execution-error.mjs.map +1 -0
- package/esm/errors/workflow-cancelled-error.d.mts +23 -0
- package/esm/errors/workflow-cancelled-error.d.mts.map +1 -0
- package/esm/errors/workflow-cancelled-error.mjs +23 -0
- package/esm/errors/workflow-cancelled-error.mjs.map +1 -0
- package/esm/errors/workflow-drift-error.d.mts +25 -0
- package/esm/errors/workflow-drift-error.d.mts.map +1 -0
- package/esm/errors/workflow-drift-error.mjs +24 -0
- package/esm/errors/workflow-drift-error.mjs.map +1 -0
- package/esm/errors/workflow-error.d.mts +15 -0
- package/esm/errors/workflow-error.d.mts.map +1 -0
- package/esm/errors/workflow-error.mjs +18 -0
- package/esm/errors/workflow-error.mjs.map +1 -0
- package/esm/index.d.mts +137 -0
- package/esm/index.mjs +81 -0
- package/esm/middleware/builtins/budget.d.mts +103 -0
- package/esm/middleware/builtins/budget.d.mts.map +1 -0
- package/esm/middleware/builtins/budget.mjs +100 -0
- package/esm/middleware/builtins/budget.mjs.map +1 -0
- package/esm/middleware/builtins/guardrail.d.mts +92 -0
- package/esm/middleware/builtins/guardrail.d.mts.map +1 -0
- package/esm/middleware/builtins/guardrail.mjs +76 -0
- package/esm/middleware/builtins/guardrail.mjs.map +1 -0
- package/esm/middleware/builtins/semantic-cache.d.mts +106 -0
- package/esm/middleware/builtins/semantic-cache.d.mts.map +1 -0
- package/esm/middleware/builtins/semantic-cache.mjs +149 -0
- package/esm/middleware/builtins/semantic-cache.mjs.map +1 -0
- package/esm/middleware/helpers/compose.d.mts +42 -0
- package/esm/middleware/helpers/compose.d.mts.map +1 -0
- package/esm/middleware/helpers/compose.mjs +52 -0
- package/esm/middleware/helpers/compose.mjs.map +1 -0
- package/esm/middleware/helpers/for-tool.d.mts +55 -0
- package/esm/middleware/helpers/for-tool.d.mts.map +1 -0
- package/esm/middleware/helpers/for-tool.mjs +80 -0
- package/esm/middleware/helpers/for-tool.mjs.map +1 -0
- package/esm/middleware/helpers/index.d.mts +2 -0
- package/esm/middleware/index.d.mts +8 -0
- package/esm/middleware/index.mjs +10 -0
- package/esm/middleware/pipeline.d.mts +70 -0
- package/esm/middleware/pipeline.d.mts.map +1 -0
- package/esm/middleware/pipeline.mjs +100 -0
- package/esm/middleware/pipeline.mjs.map +1 -0
- package/esm/middleware/utils/extract-user-text.d.mts +33 -0
- package/esm/middleware/utils/extract-user-text.d.mts.map +1 -0
- package/esm/middleware/utils/extract-user-text.mjs +40 -0
- package/esm/middleware/utils/extract-user-text.mjs.map +1 -0
- package/esm/middleware/utils/index.d.mts +2 -0
- package/esm/middleware/utils/namespaced-state.d.mts +60 -0
- package/esm/middleware/utils/namespaced-state.d.mts.map +1 -0
- package/esm/middleware/utils/namespaced-state.mjs +60 -0
- package/esm/middleware/utils/namespaced-state.mjs.map +1 -0
- package/esm/mock/index.d.mts +4 -0
- package/esm/mock/index.mjs +5 -0
- package/esm/mock/mock-agent.d.mts +41 -0
- package/esm/mock/mock-agent.d.mts.map +1 -0
- package/esm/mock/mock-agent.mjs +39 -0
- package/esm/mock/mock-agent.mjs.map +1 -0
- package/esm/mock/mock-config.type.d.mts +31 -0
- package/esm/mock/mock-config.type.d.mts.map +1 -0
- package/esm/mock/mock-model.d.mts +94 -0
- package/esm/mock/mock-model.d.mts.map +1 -0
- package/esm/mock/mock-model.mjs +150 -0
- package/esm/mock/mock-model.mjs.map +1 -0
- package/esm/mock/mock-sdk.d.mts +25 -0
- package/esm/mock/mock-sdk.d.mts.map +1 -0
- package/esm/mock/mock-sdk.mjs +37 -0
- package/esm/mock/mock-sdk.mjs.map +1 -0
- package/esm/supervisor/as-tool.d.mts +45 -0
- package/esm/supervisor/as-tool.d.mts.map +1 -0
- package/esm/supervisor/as-tool.mjs +80 -0
- package/esm/supervisor/as-tool.mjs.map +1 -0
- package/esm/supervisor/cancellation.d.mts +12 -0
- package/esm/supervisor/cancellation.d.mts.map +1 -0
- package/esm/supervisor/cancellation.mjs +22 -0
- package/esm/supervisor/cancellation.mjs.map +1 -0
- package/esm/supervisor/decide.mjs +272 -0
- package/esm/supervisor/decide.mjs.map +1 -0
- package/esm/supervisor/emitter.d.mts +27 -0
- package/esm/supervisor/emitter.d.mts.map +1 -0
- package/esm/supervisor/emitter.mjs +47 -0
- package/esm/supervisor/emitter.mjs.map +1 -0
- package/esm/supervisor/entries.d.mts +141 -0
- package/esm/supervisor/entries.d.mts.map +1 -0
- package/esm/supervisor/entries.mjs +206 -0
- package/esm/supervisor/entries.mjs.map +1 -0
- package/esm/supervisor/execution.d.mts +637 -0
- package/esm/supervisor/execution.d.mts.map +1 -0
- package/esm/supervisor/execution.mjs +1868 -0
- package/esm/supervisor/execution.mjs.map +1 -0
- package/esm/supervisor/index.d.mts +11 -0
- package/esm/supervisor/index.mjs +12 -0
- package/esm/supervisor/router-prompt.d.mts +56 -0
- package/esm/supervisor/router-prompt.d.mts.map +1 -0
- package/esm/supervisor/router-prompt.mjs +52 -0
- package/esm/supervisor/router-prompt.mjs.map +1 -0
- package/esm/supervisor/signature.d.mts +28 -0
- package/esm/supervisor/signature.d.mts.map +1 -0
- package/esm/supervisor/signature.mjs +89 -0
- package/esm/supervisor/signature.mjs.map +1 -0
- package/esm/supervisor/snapshot.d.mts +54 -0
- package/esm/supervisor/snapshot.d.mts.map +1 -0
- package/esm/supervisor/snapshot.mjs +77 -0
- package/esm/supervisor/snapshot.mjs.map +1 -0
- package/esm/supervisor/supervisor-stream.d.mts +29 -0
- package/esm/supervisor/supervisor-stream.d.mts.map +1 -0
- package/esm/supervisor/supervisor-stream.mjs +89 -0
- package/esm/supervisor/supervisor-stream.mjs.map +1 -0
- package/esm/supervisor/supervisor.d.mts +27 -0
- package/esm/supervisor/supervisor.d.mts.map +1 -0
- package/esm/supervisor/supervisor.mjs +138 -0
- package/esm/supervisor/supervisor.mjs.map +1 -0
- package/esm/system-prompt/instruction.d.mts +52 -0
- package/esm/system-prompt/instruction.d.mts.map +1 -0
- package/esm/system-prompt/instruction.mjs +57 -0
- package/esm/system-prompt/instruction.mjs.map +1 -0
- package/esm/system-prompt/persona.d.mts +52 -0
- package/esm/system-prompt/persona.d.mts.map +1 -0
- package/esm/system-prompt/persona.mjs +57 -0
- package/esm/system-prompt/persona.mjs.map +1 -0
- package/esm/system-prompt/render-placeholders.d.mts +31 -0
- package/esm/system-prompt/render-placeholders.d.mts.map +1 -0
- package/esm/system-prompt/render-placeholders.mjs +58 -0
- package/esm/system-prompt/render-placeholders.mjs.map +1 -0
- package/esm/system-prompt/system-prompt.d.mts +117 -0
- package/esm/system-prompt/system-prompt.d.mts.map +1 -0
- package/esm/system-prompt/system-prompt.mjs +137 -0
- package/esm/system-prompt/system-prompt.mjs.map +1 -0
- package/esm/tool/index.d.mts +1 -0
- package/esm/tool/index.mjs +3 -0
- package/esm/tool/tool.d.mts +64 -0
- package/esm/tool/tool.d.mts.map +1 -0
- package/esm/tool/tool.mjs +184 -0
- package/esm/tool/tool.mjs.map +1 -0
- package/esm/utils/compute-cost.d.mts +58 -0
- package/esm/utils/compute-cost.d.mts.map +1 -0
- package/esm/utils/compute-cost.mjs +87 -0
- package/esm/utils/compute-cost.mjs.map +1 -0
- package/esm/utils/extract-json-payload.d.mts +33 -0
- package/esm/utils/extract-json-payload.d.mts.map +1 -0
- package/esm/utils/extract-json-payload.mjs +39 -0
- package/esm/utils/extract-json-payload.mjs.map +1 -0
- package/esm/utils/generate-run-id.d.mts +20 -0
- package/esm/utils/generate-run-id.d.mts.map +1 -0
- package/esm/utils/generate-run-id.mjs +23 -0
- package/esm/utils/generate-run-id.mjs.map +1 -0
- package/esm/utils/index.d.mts +9 -0
- package/esm/utils/index.mjs +11 -0
- package/esm/utils/json-schema.d.mts +57 -0
- package/esm/utils/json-schema.d.mts.map +1 -0
- package/esm/utils/json-schema.mjs +89 -0
- package/esm/utils/json-schema.mjs.map +1 -0
- package/esm/utils/prepare-attachment-part.d.mts +36 -0
- package/esm/utils/prepare-attachment-part.d.mts.map +1 -0
- package/esm/utils/prepare-attachment-part.mjs +140 -0
- package/esm/utils/prepare-attachment-part.mjs.map +1 -0
- package/esm/utils/resolve-attachment.d.mts +33 -0
- package/esm/utils/resolve-attachment.d.mts.map +1 -0
- package/esm/utils/resolve-attachment.mjs +73 -0
- package/esm/utils/resolve-attachment.mjs.map +1 -0
- package/esm/utils/safe-json-parse.d.mts +14 -0
- package/esm/utils/safe-json-parse.d.mts.map +1 -0
- package/esm/utils/safe-json-parse.mjs +22 -0
- package/esm/utils/safe-json-parse.mjs.map +1 -0
- package/esm/utils/stamp-report-lineage.d.mts +61 -0
- package/esm/utils/stamp-report-lineage.d.mts.map +1 -0
- package/esm/utils/stamp-report-lineage.mjs +47 -0
- package/esm/utils/stamp-report-lineage.mjs.map +1 -0
- package/esm/utils/token-count.d.mts +15 -0
- package/esm/utils/token-count.d.mts.map +1 -0
- package/esm/utils/token-count.mjs +18 -0
- package/esm/utils/token-count.mjs.map +1 -0
- package/esm/workflow/as-tool.mjs +55 -0
- package/esm/workflow/as-tool.mjs.map +1 -0
- package/esm/workflow/cancellation.mjs +44 -0
- package/esm/workflow/cancellation.mjs.map +1 -0
- package/esm/workflow/emitter.mjs +40 -0
- package/esm/workflow/emitter.mjs.map +1 -0
- package/esm/workflow/engine.mjs +362 -0
- package/esm/workflow/engine.mjs.map +1 -0
- package/esm/workflow/index.d.mts +3 -0
- package/esm/workflow/index.mjs +5 -0
- package/esm/workflow/retry.mjs +32 -0
- package/esm/workflow/retry.mjs.map +1 -0
- package/esm/workflow/router.mjs +56 -0
- package/esm/workflow/router.mjs.map +1 -0
- package/esm/workflow/run-scoped-emitter.mjs +32 -0
- package/esm/workflow/run-scoped-emitter.mjs.map +1 -0
- package/esm/workflow/signature.d.mts +7 -0
- package/esm/workflow/signature.d.mts.map +1 -0
- package/esm/workflow/signature.mjs +34 -0
- package/esm/workflow/signature.mjs.map +1 -0
- package/esm/workflow/snapshot.mjs +71 -0
- package/esm/workflow/snapshot.mjs.map +1 -0
- package/esm/workflow/state.mjs +37 -0
- package/esm/workflow/state.mjs.map +1 -0
- package/esm/workflow/step-runner.mjs +371 -0
- package/esm/workflow/step-runner.mjs.map +1 -0
- package/esm/workflow/step.d.mts +19 -0
- package/esm/workflow/step.d.mts.map +1 -0
- package/esm/workflow/step.mjs +37 -0
- package/esm/workflow/step.mjs.map +1 -0
- package/esm/workflow/workflow.d.mts +12 -0
- package/esm/workflow/workflow.d.mts.map +1 -0
- package/esm/workflow/workflow.mjs +116 -0
- package/esm/workflow/workflow.mjs.map +1 -0
- package/llms-full.txt +2293 -0
- package/llms.txt +20 -0
- package/package.json +37 -0
- package/skills/README.md +53 -0
- package/skills/ai-basics/SKILL.md +95 -0
- package/skills/attach-ai-middleware/SKILL.md +184 -0
- package/skills/define-ai-tool/SKILL.md +186 -0
- package/skills/embed-text/SKILL.md +105 -0
- package/skills/handle-ai-errors/SKILL.md +194 -0
- package/skills/log-ai-calls/SKILL.md +141 -0
- package/skills/persist-ai-data/SKILL.md +207 -0
- package/skills/pick-ai-provider/SKILL.md +164 -0
- package/skills/run-ai-agent/SKILL.md +267 -0
- package/skills/run-ai-workflow/SKILL.md +258 -0
- package/skills/run-supervisor/SKILL.md +309 -0
- package/skills/write-system-prompt/SKILL.md +129 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region ../../@warlock.js/ai/src/contracts/content-part.type.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A single resolved piece of message content.
|
|
4
|
+
*
|
|
5
|
+
* `ContentPart` is the **resolved** form of attachable content — by the
|
|
6
|
+
* time a part reaches a model adapter, every input variant
|
|
7
|
+
* (path, URL, StorageFile, raw base64) has already been collapsed to a
|
|
8
|
+
* provider-ready shape. Adapters never read files or fetch URLs; they
|
|
9
|
+
* map parts directly into their wire format.
|
|
10
|
+
*
|
|
11
|
+
* Multipart content is opt-in: `Message.content` accepts a
|
|
12
|
+
* plain `string` (the common case) or `ContentPart[]` when attachments
|
|
13
|
+
* are present.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const userMessage: Message = {
|
|
17
|
+
* role: "user",
|
|
18
|
+
* content: [
|
|
19
|
+
* { type: "text", text: "What's in this picture?" },
|
|
20
|
+
* { type: "image", source: { url: "https://example.com/cat.jpg" } },
|
|
21
|
+
* ],
|
|
22
|
+
* };
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Local file → base64-encoded by the agent before reaching the adapter
|
|
26
|
+
* const part: ContentPart = {
|
|
27
|
+
* type: "image",
|
|
28
|
+
* source: { base64: "iVBORw0KGgo...", mediaType: "image/png" },
|
|
29
|
+
* };
|
|
30
|
+
*/
|
|
31
|
+
type ContentPart = {
|
|
32
|
+
type: "text";
|
|
33
|
+
text: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: "image";
|
|
36
|
+
source: ImageSource;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Where an image's bytes live in a resolved `ContentPart`.
|
|
40
|
+
*
|
|
41
|
+
* - `{ url }` — remote URL the provider can fetch directly. Used for
|
|
42
|
+
* public URLs and StorageFile entries that already expose a URL.
|
|
43
|
+
* - `{ base64, mediaType }` — inlined base64 bytes with an explicit
|
|
44
|
+
* IANA media type (e.g. `"image/png"`). Used for local file paths
|
|
45
|
+
* and StorageFile entries with only an absolute path.
|
|
46
|
+
*/
|
|
47
|
+
type ImageSource = {
|
|
48
|
+
url: string;
|
|
49
|
+
} | {
|
|
50
|
+
base64: string;
|
|
51
|
+
mediaType: string;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ContentPart, ImageSource };
|
|
55
|
+
//# sourceMappingURL=content-part.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-part.type.d.mts","names":[],"sources":["../../../../../../@warlock.js/ai/src/contracts/content-part.type.ts"],"mappings":";;AA6BA;;;;;;;;;;AAA+F;AAW/F;;;;;;;;AAAuE;;;;;;;;;KAX3D,WAAA;EAAgB,IAAA;EAAc,IAAA;AAAA;EAAmB,IAAA;EAAe,MAAA,EAAQ,WAAW;AAAA;;;;;;;;;;KAWnF,WAAA;EAAgB,GAAA;AAAA;EAAkB,MAAA;EAAgB,SAAA;AAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ContentPart } from "./content-part.type.mjs";
|
|
2
|
+
import { ModelToolCallRequest } from "./model-tool-call-request.type.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/ai/src/contracts/conversation-message.type.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A single message in a conversation history.
|
|
7
|
+
*
|
|
8
|
+
* The `tool` role is used to return a tool's output to the model on the next trip.
|
|
9
|
+
* When the role is `assistant` and the model requested tool calls, `toolCalls`
|
|
10
|
+
* is populated so providers can reconstruct the original tool_calls message.
|
|
11
|
+
*
|
|
12
|
+
* `content` is `string` for plain text (the common case) or `ContentPart[]`
|
|
13
|
+
* when the message carries attachments (vision input, files, etc.). Adapters
|
|
14
|
+
* are expected to handle both shapes.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const messages: Message[] = [
|
|
18
|
+
* { role: "user", content: "What's the weather in Cairo?" },
|
|
19
|
+
* { role: "assistant", content: "", toolCalls: [{ id: "call_1", name: "getWeather", input: { city: "Cairo" } }] },
|
|
20
|
+
* { role: "tool", toolCallId: "call_1", content: '{"temp":82}' },
|
|
21
|
+
* { role: "assistant", content: "It's 82°F in Cairo." },
|
|
22
|
+
* ];
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Multipart user message with an image
|
|
26
|
+
* const visionMessage: Message = {
|
|
27
|
+
* role: "user",
|
|
28
|
+
* content: [
|
|
29
|
+
* { type: "text", text: "Describe this picture" },
|
|
30
|
+
* { type: "image", source: { url: "https://example.com/cat.jpg" } },
|
|
31
|
+
* ],
|
|
32
|
+
* };
|
|
33
|
+
*/
|
|
34
|
+
type Message<User = Record<string, unknown>> = {
|
|
35
|
+
/** Message id */id?: string; /** Who sent this message */
|
|
36
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
37
|
+
/**
|
|
38
|
+
* Message content. A plain string for text-only messages, or a
|
|
39
|
+
* `ContentPart[]` when the message includes attachments. Tool-result
|
|
40
|
+
* messages always use the string form (stringified JSON).
|
|
41
|
+
*/
|
|
42
|
+
content: string | ContentPart[]; /** Provider-generated id — required when role is "tool", links to the assistant's tool_calls */
|
|
43
|
+
toolCallId?: string; /** Tool calls requested by the assistant — present when role is "assistant" and the LLM triggered tools */
|
|
44
|
+
toolCalls?: ModelToolCallRequest[]; /** When this message was created */
|
|
45
|
+
timestamp?: Date; /** Arbitrary metadata for application-level use */
|
|
46
|
+
metadata?: Record<string, unknown>; /** User info */
|
|
47
|
+
user?: User;
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Message };
|
|
51
|
+
//# sourceMappingURL=conversation-message.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-message.type.d.mts","names":[],"sources":["../../../../../../@warlock.js/ai/src/contracts/conversation-message.type.ts"],"mappings":";;;;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAY,OAAA,QAAe,MAAA;mBAEzB,EAAA;EAEA,IAAA;;;;;;EAMA,OAAA,WAAkB,WAAA;EAElB,UAAA;EAEA,SAAA,GAAY,oBAAA;EAEZ,SAAA,GAAY,IAAA;EAEZ,QAAA,GAAW,MAAA;EAEX,IAAA,GAAO,IAAA;AAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region ../../@warlock.js/ai/src/contracts/embedder.contract.d.ts
|
|
2
|
+
/** Token usage returned from an embedding request. */
|
|
3
|
+
type EmbeddingUsage = {
|
|
4
|
+
promptTokens: number;
|
|
5
|
+
totalTokens: number;
|
|
6
|
+
};
|
|
7
|
+
/** Result of embedding a single string input. */
|
|
8
|
+
type EmbeddingResult = {
|
|
9
|
+
vector: number[];
|
|
10
|
+
dimensions: number;
|
|
11
|
+
usage: EmbeddingUsage;
|
|
12
|
+
};
|
|
13
|
+
/** Result of embedding a batch of string inputs. */
|
|
14
|
+
type EmbeddingBatchResult = {
|
|
15
|
+
vectors: number[][];
|
|
16
|
+
dimensions: number;
|
|
17
|
+
usage: EmbeddingUsage;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Configuration passed to `SDKAdapterContract.embedder()`.
|
|
21
|
+
*
|
|
22
|
+
* `dimensions` is an optional override supported by models like
|
|
23
|
+
* `text-embedding-3-*` that allow output truncation. When omitted,
|
|
24
|
+
* the adapter resolves `dimensions` lazily from the first response.
|
|
25
|
+
*/
|
|
26
|
+
type EmbedderConfig = {
|
|
27
|
+
name: string;
|
|
28
|
+
dimensions?: number;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Provider-neutral contract for an embedding model.
|
|
33
|
+
*
|
|
34
|
+
* Single-input and batch are split into separate methods (`embed` vs
|
|
35
|
+
* `embedMany`) rather than one overloaded call — they have different
|
|
36
|
+
* cost profiles, different per-request limits, and different failure
|
|
37
|
+
* modes. Splitting keeps each method's JSDoc narrow and avoids the
|
|
38
|
+
* overload-narrowing trap when callers hold a `string | string[]`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* const embedder = openai.embedder({ name: "text-embedding-3-small" });
|
|
42
|
+
* const { vector, dimensions } = await embedder.embed("Hello world");
|
|
43
|
+
* const { vectors } = await embedder.embedMany(["doc 1", "doc 2"]);
|
|
44
|
+
*/
|
|
45
|
+
interface EmbedderContract {
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly provider: string;
|
|
48
|
+
/**
|
|
49
|
+
* Resolved output dimension count. Starts at `0` when no config
|
|
50
|
+
* override is given, then is set to the response's vector length on
|
|
51
|
+
* the first successful `embed()` / `embedMany()` call and cached.
|
|
52
|
+
*
|
|
53
|
+
* Not declared `readonly` because implementations populate it
|
|
54
|
+
* lazily. Treat the value as a post-first-call snapshot.
|
|
55
|
+
*/
|
|
56
|
+
dimensions: number;
|
|
57
|
+
/** Embed a single string into a vector. */
|
|
58
|
+
embed(input: string): Promise<EmbeddingResult>;
|
|
59
|
+
/**
|
|
60
|
+
* Embed a batch of strings in a single provider call. The whole
|
|
61
|
+
* batch is one request, so total input tokens must fit under the
|
|
62
|
+
* provider's per-request cap. Result `vectors` are returned in the
|
|
63
|
+
* same order as `inputs`.
|
|
64
|
+
*/
|
|
65
|
+
embedMany(inputs: string[]): Promise<EmbeddingBatchResult>;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage };
|
|
69
|
+
//# sourceMappingURL=embedder.contract.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedder.contract.d.mts","names":[],"sources":["../../../../../../@warlock.js/ai/src/contracts/embedder.contract.ts"],"mappings":";;KACY,cAAA;EACV,YAAA;EACA,WAAW;AAAA;AAAA;AAAA,KAID,eAAA;EACV,MAAA;EACA,UAAA;EACA,KAAA,EAAO,cAAc;AAAA;;KAIX,oBAAA;EACV,OAAA;EACA,UAAA;EACA,KAAA,EAAO,cAAc;AAAA;;;;;;;;KAUX,cAAA;EACV,IAAA;EACA,UAAA;EAAA,CACC,GAAA;AAAA;;;;;;AAAW;AAiBd;;;;;;;;UAAiB,gBAAA;EAAA,SACN,IAAA;EAAA,SACA,QAAA;EAST;;;;;;;;EAAA,UAAA;EAWyD;EARzD,KAAA,CAAM,KAAA,WAAgB,OAAA,CAAQ,eAAA;;;;;;;EAQ9B,SAAA,CAAU,MAAA,aAAmB,OAAA,CAAQ,oBAAA;AAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region ../../@warlock.js/ai/src/contracts/end.type.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Framework-global termination sentinel. Emitted by any primitive
|
|
4
|
+
* whose control flow is routed through JSON-serializable strings —
|
|
5
|
+
* supervisor (router agent's `next`, deterministic `route` callback),
|
|
6
|
+
* future planner (plan steps), future orchestrator (session
|
|
7
|
+
* directive), any future primitive that needs to say "stop" across a
|
|
8
|
+
* wire that can't carry `null`.
|
|
9
|
+
*
|
|
10
|
+
* **Why one shared literal.** Consumers learn one word. Cross-
|
|
11
|
+
* primitive pipes — a planner feeding a supervisor, a supervisor
|
|
12
|
+
* nested as a tool inside an orchestrator — can pass the sentinel
|
|
13
|
+
* through without translation.
|
|
14
|
+
*
|
|
15
|
+
* **Why this specific string.** Brand-prefixed (`__warlock:`) so it
|
|
16
|
+
* can't collide with a realistic user-chosen intent / step / route
|
|
17
|
+
* key (`"end"`, `"done"`, `"stop"` are all valid user keys).
|
|
18
|
+
* Underscore-surrounded so it stands out in logs and snapshots.
|
|
19
|
+
* JSON-safe so a router agent emits it verbatim.
|
|
20
|
+
*
|
|
21
|
+
* **Not used by every primitive.** Workflow's `nextStep` returns
|
|
22
|
+
* `null` to end — a callback-level mechanism that predates this
|
|
23
|
+
* sentinel. Workflows keep `null`; the sentinel is for primitives
|
|
24
|
+
* whose "end" must survive a JSON boundary.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* import { END } from "@warlock.js/ai";
|
|
28
|
+
*
|
|
29
|
+
* // Supervisor route callback
|
|
30
|
+
* ai.supervisor({
|
|
31
|
+
* intents: { writer, critic },
|
|
32
|
+
* route: (ctx) => (ctx.iteration >= 5 ? END : "writer"),
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* // Router agent output schema
|
|
36
|
+
* const router = ai.agent({
|
|
37
|
+
* model,
|
|
38
|
+
* output: z.object({
|
|
39
|
+
* next: z.union([z.string(), z.array(z.string()), z.literal(END)]),
|
|
40
|
+
* }),
|
|
41
|
+
* });
|
|
42
|
+
*/
|
|
43
|
+
declare const END: "__warlock:end__";
|
|
44
|
+
/**
|
|
45
|
+
* Value type of `END`. Exposed so consumers building Zod / Standard
|
|
46
|
+
* Schema output schemas can write `z.literal(END)` without
|
|
47
|
+
* hard-coding the string, and so generic helpers that accept "the
|
|
48
|
+
* end sentinel" can type-narrow correctly.
|
|
49
|
+
*/
|
|
50
|
+
type EndSentinel = typeof END;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { END, EndSentinel };
|
|
53
|
+
//# sourceMappingURL=end.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"end.type.d.mts","names":[],"sources":["../../../../../../@warlock.js/ai/src/contracts/end.type.ts"],"mappings":";;AAyCA;;;;AAA6C;AAQ7C;;;;AAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cARvB,GAAA;;;;;;;KAQD,WAAA,UAAqB,GAAG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region ../../@warlock.js/ai/src/contracts/end.type.ts
|
|
2
|
+
/**
|
|
3
|
+
* Framework-global termination sentinel. Emitted by any primitive
|
|
4
|
+
* whose control flow is routed through JSON-serializable strings —
|
|
5
|
+
* supervisor (router agent's `next`, deterministic `route` callback),
|
|
6
|
+
* future planner (plan steps), future orchestrator (session
|
|
7
|
+
* directive), any future primitive that needs to say "stop" across a
|
|
8
|
+
* wire that can't carry `null`.
|
|
9
|
+
*
|
|
10
|
+
* **Why one shared literal.** Consumers learn one word. Cross-
|
|
11
|
+
* primitive pipes — a planner feeding a supervisor, a supervisor
|
|
12
|
+
* nested as a tool inside an orchestrator — can pass the sentinel
|
|
13
|
+
* through without translation.
|
|
14
|
+
*
|
|
15
|
+
* **Why this specific string.** Brand-prefixed (`__warlock:`) so it
|
|
16
|
+
* can't collide with a realistic user-chosen intent / step / route
|
|
17
|
+
* key (`"end"`, `"done"`, `"stop"` are all valid user keys).
|
|
18
|
+
* Underscore-surrounded so it stands out in logs and snapshots.
|
|
19
|
+
* JSON-safe so a router agent emits it verbatim.
|
|
20
|
+
*
|
|
21
|
+
* **Not used by every primitive.** Workflow's `nextStep` returns
|
|
22
|
+
* `null` to end — a callback-level mechanism that predates this
|
|
23
|
+
* sentinel. Workflows keep `null`; the sentinel is for primitives
|
|
24
|
+
* whose "end" must survive a JSON boundary.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* import { END } from "@warlock.js/ai";
|
|
28
|
+
*
|
|
29
|
+
* // Supervisor route callback
|
|
30
|
+
* ai.supervisor({
|
|
31
|
+
* intents: { writer, critic },
|
|
32
|
+
* route: (ctx) => (ctx.iteration >= 5 ? END : "writer"),
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* // Router agent output schema
|
|
36
|
+
* const router = ai.agent({
|
|
37
|
+
* model,
|
|
38
|
+
* output: z.object({
|
|
39
|
+
* next: z.union([z.string(), z.array(z.string()), z.literal(END)]),
|
|
40
|
+
* }),
|
|
41
|
+
* });
|
|
42
|
+
*/
|
|
43
|
+
const END = "__warlock:end__";
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { END };
|
|
47
|
+
//# sourceMappingURL=end.type.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"end.type.mjs","names":[],"sources":["../../../../../../@warlock.js/ai/src/contracts/end.type.ts"],"sourcesContent":["/**\n * Framework-global termination sentinel. Emitted by any primitive\n * whose control flow is routed through JSON-serializable strings —\n * supervisor (router agent's `next`, deterministic `route` callback),\n * future planner (plan steps), future orchestrator (session\n * directive), any future primitive that needs to say \"stop\" across a\n * wire that can't carry `null`.\n *\n * **Why one shared literal.** Consumers learn one word. Cross-\n * primitive pipes — a planner feeding a supervisor, a supervisor\n * nested as a tool inside an orchestrator — can pass the sentinel\n * through without translation.\n *\n * **Why this specific string.** Brand-prefixed (`__warlock:`) so it\n * can't collide with a realistic user-chosen intent / step / route\n * key (`\"end\"`, `\"done\"`, `\"stop\"` are all valid user keys).\n * Underscore-surrounded so it stands out in logs and snapshots.\n * JSON-safe so a router agent emits it verbatim.\n *\n * **Not used by every primitive.** Workflow's `nextStep` returns\n * `null` to end — a callback-level mechanism that predates this\n * sentinel. Workflows keep `null`; the sentinel is for primitives\n * whose \"end\" must survive a JSON boundary.\n *\n * @example\n * import { END } from \"@warlock.js/ai\";\n *\n * // Supervisor route callback\n * ai.supervisor({\n * intents: { writer, critic },\n * route: (ctx) => (ctx.iteration >= 5 ? END : \"writer\"),\n * });\n *\n * // Router agent output schema\n * const router = ai.agent({\n * model,\n * output: z.object({\n * next: z.union([z.string(), z.array(z.string()), z.literal(END)]),\n * }),\n * });\n */\nexport const END = \"__warlock:end__\" as const;\n\n/**\n * Value type of `END`. Exposed so consumers building Zod / Standard\n * Schema output schemas can write `z.literal(END)` without\n * hard-coding the string, and so generic helpers that accept \"the\n * end sentinel\" can type-narrow correctly.\n */\nexport type EndSentinel = typeof END;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,MAAM"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AIError } from "../../errors/ai-error.mjs";
|
|
2
|
+
import { ToolCall } from "../result/tool-call.type.mjs";
|
|
3
|
+
import { LLMTrip } from "../result/llm-trip.type.mjs";
|
|
4
|
+
import { AgentResult } from "../result/agent-result.type.mjs";
|
|
5
|
+
|
|
6
|
+
//#region ../../@warlock.js/ai/src/contracts/events/agent-events.type.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Lightweight tool metadata surfaced on tool-lifecycle events. A
|
|
9
|
+
* deliberately thin slice of `ToolConfig` — name and description
|
|
10
|
+
* for identity, plus the resolved present-progressive `action`
|
|
11
|
+
* string for streaming UX. Wrapped tools may carry heavy state
|
|
12
|
+
* (validated schemas, captured closures, large `meta` blocks); we
|
|
13
|
+
* keep events serializable and cheap by omitting all of that.
|
|
14
|
+
*/
|
|
15
|
+
type ToolEventMeta = {
|
|
16
|
+
/** Tool name as exposed to the LLM. */name: string; /** Tool description (the same string the LLM sees). */
|
|
17
|
+
description: string;
|
|
18
|
+
/**
|
|
19
|
+
* Resolved status string for UI display. The framework resolves
|
|
20
|
+
* `ToolConfig.action` (string or `(input) => string`) into a
|
|
21
|
+
* plain string at emit time so consumers don't have to.
|
|
22
|
+
* `undefined` when the tool didn't declare an `action`.
|
|
23
|
+
*/
|
|
24
|
+
action?: string;
|
|
25
|
+
};
|
|
26
|
+
/** Agent is about to begin execution */
|
|
27
|
+
type AgentStartingPayload = {
|
|
28
|
+
input: string;
|
|
29
|
+
};
|
|
30
|
+
/** A new LLM trip is beginning */
|
|
31
|
+
type AgentTripStartedPayload = {
|
|
32
|
+
tripIndex: number;
|
|
33
|
+
input: string;
|
|
34
|
+
};
|
|
35
|
+
/** Token delta received during streaming */
|
|
36
|
+
type AgentStreamingPayload = {
|
|
37
|
+
delta: string;
|
|
38
|
+
tripIndex: number;
|
|
39
|
+
};
|
|
40
|
+
/** LLM has requested a tool call */
|
|
41
|
+
type AgentToolCallingPayload = {
|
|
42
|
+
tool: ToolEventMeta;
|
|
43
|
+
input: unknown;
|
|
44
|
+
tripIndex: number;
|
|
45
|
+
};
|
|
46
|
+
/** Tool call completed successfully */
|
|
47
|
+
type AgentToolCalledPayload = ToolCall & {
|
|
48
|
+
tool: ToolEventMeta;
|
|
49
|
+
};
|
|
50
|
+
/** Tool call failed with an error */
|
|
51
|
+
type AgentToolCallingFailedPayload = {
|
|
52
|
+
tool: ToolEventMeta;
|
|
53
|
+
input: unknown;
|
|
54
|
+
error: AIError;
|
|
55
|
+
tripIndex: number;
|
|
56
|
+
};
|
|
57
|
+
/** An LLM trip completed */
|
|
58
|
+
type AgentTripCompletedPayload = {
|
|
59
|
+
trip: LLMTrip;
|
|
60
|
+
};
|
|
61
|
+
/** Agent execution completed successfully */
|
|
62
|
+
type AgentCompletedPayload<TOutput = unknown> = {
|
|
63
|
+
result: AgentResult<TOutput>;
|
|
64
|
+
};
|
|
65
|
+
/** Agent execution failed */
|
|
66
|
+
type AgentErrorPayload = {
|
|
67
|
+
error: AIError;
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { AgentCompletedPayload, AgentErrorPayload, AgentStartingPayload, AgentStreamingPayload, AgentToolCalledPayload, AgentToolCallingFailedPayload, AgentToolCallingPayload, AgentTripCompletedPayload, AgentTripStartedPayload, ToolEventMeta };
|
|
71
|
+
//# sourceMappingURL=agent-events.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-events.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/events/agent-events.type.ts"],"mappings":";;;;;;;;AAaA;;;;;;KAAY,aAAA;EAWJ,uCATN,IAAA,UAaU;EAXV,WAAA;;;AAWwC;AAG1C;;;EAPE,MAAA;AAAA;AAUF;AAAA,KANY,oBAAA;EAAyB,KAAK;AAAA;AAMoB;AAAA,KAHlD,uBAAA;EAA4B,SAAA;EAAmB,KAAK;AAAA;;KAGpD,qBAAA;EAA0B,KAAA;EAAe,SAAS;AAAA;AAMnD;AAAA,KAHC,uBAAA;EACV,IAAA,EAAM,aAAa;EACnB,KAAA;EACA,SAAA;AAAA;;KAIU,sBAAA,GAAyB,QAAA;EAAa,IAAA,EAAM,aAAa;AAAA;AAGrE;AAAA,KAAY,6BAAA;EACV,IAAA,EAAM,aAAA;EACN,KAAA;EACA,KAAA,EAAO,OAAO;EACd,SAAA;AAAA;;KAIU,yBAAA;EAA8B,IAAA,EAAM,OAAO;AAAA;AAJ5C;AAAA,KAOC,qBAAA;EACV,MAAA,EAAQ,WAAW,CAAC,OAAA;AAAA;;KAIV,iBAAA;EAAsB,KAAA,EAAO,OAAO;AAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AgentResult } from "../result/agent-result.type.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/ai/src/contracts/events/complete-event.type.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Execution-completion payload for the `onComplete` agent hook (T1
|
|
6
|
+
* of the 2026-05-08 ai-usage/runs/state/cart plan).
|
|
7
|
+
*
|
|
8
|
+
* Fired once at the end of every `agent.execute()` / `agent.stream()`
|
|
9
|
+
* call — regardless of outcome. Audit-log code subscribes here to
|
|
10
|
+
* write one `ai_runs` row per execution with the full report.
|
|
11
|
+
*
|
|
12
|
+
* Distinct from the existing `agent.completed` event: this hook
|
|
13
|
+
* receives a flat payload with the `runId` pre-extracted and the
|
|
14
|
+
* end-to-end duration pre-computed, matching the shape the cost-ledger
|
|
15
|
+
* / audit-log infrastructure consumes. Existing `agent.completed`
|
|
16
|
+
* subscribers are unaffected — both fire.
|
|
17
|
+
*
|
|
18
|
+
* Hook handlers may be sync or async. Errors thrown inside the hook
|
|
19
|
+
* are swallowed so consumer bugs cannot crash the agent loop or
|
|
20
|
+
* interfere with the result returned to the caller.
|
|
21
|
+
*
|
|
22
|
+
* `result.error` is non-null when the run failed — consumers should
|
|
23
|
+
* check it to differentiate completed-vs-failed-vs-cancelled runs
|
|
24
|
+
* (the `result.report.status` field carries the enum).
|
|
25
|
+
*/
|
|
26
|
+
type CompleteEvent<TOutput = unknown> = {
|
|
27
|
+
/** Final result. May carry `error` for failed/cancelled runs. */result: AgentResult<TOutput>; /** Run-scoped identifier (matches `result.report.runId`). */
|
|
28
|
+
runId: string; /** End-to-end wall-clock duration in milliseconds. */
|
|
29
|
+
durationMs: number;
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { CompleteEvent };
|
|
33
|
+
//# sourceMappingURL=complete-event.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete-event.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/events/complete-event.type.ts"],"mappings":";;;;;AAwBA;;;;;;;;;;;AAMY;;;;;;;;;KANA,aAAA;mEAEV,MAAA,EAAQ,WAAW,CAAC,OAAA;EAEpB,KAAA;EAEA,UAAA;AAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region ../../@warlock.js/ai/src/contracts/events/event-identity.type.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Run-scoped identity stamped onto every lifecycle event payload
|
|
4
|
+
* (agent, workflow, supervisor) and every stream event.
|
|
5
|
+
*
|
|
6
|
+
* Every emitted event carries this so consumers correlating events to
|
|
7
|
+
* a run — cost ledgers, trip archives, trace UIs — never need to
|
|
8
|
+
* smuggle the id through an out-of-band closure.
|
|
9
|
+
*
|
|
10
|
+
* - `runId` — id of the run that emitted this event.
|
|
11
|
+
* - `rootRunId` — id of the outermost run this one belongs to. Equal
|
|
12
|
+
* to `runId` for a standalone run; for a run nested under a
|
|
13
|
+
* composite (`asTool`) it points at the top-level run so a flat
|
|
14
|
+
* query can reconstruct the whole tree. (Nested propagation lands
|
|
15
|
+
* in a follow-up; until then `rootRunId === runId` always.)
|
|
16
|
+
*/
|
|
17
|
+
type EventIdentity = {
|
|
18
|
+
runId: string;
|
|
19
|
+
rootRunId: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The payload shape an emitter call site supplies — everything the
|
|
23
|
+
* event carries EXCEPT the run identity, which the central `emit`
|
|
24
|
+
* chokepoint injects. Keeps call sites from hand-threading `runId`
|
|
25
|
+
* on every emission.
|
|
26
|
+
*/
|
|
27
|
+
type WithoutIdentity<T> = Omit<T, keyof EventIdentity>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { EventIdentity, WithoutIdentity };
|
|
30
|
+
//# sourceMappingURL=event-identity.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-identity.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/events/event-identity.type.ts"],"mappings":";;AAeA;;;;AAAsD;AAQtD;;;;;;;;;KARY,aAAA;EAAkB,KAAA;EAAe,SAAS;AAAA;AAQM;;;;;;AAAA,KAAhD,eAAA,MAAqB,IAAA,CAAK,CAAA,QAAS,aAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AgentCompletedPayload, AgentErrorPayload, AgentStartingPayload, AgentStreamingPayload, AgentToolCalledPayload, AgentToolCallingFailedPayload, AgentToolCallingPayload, AgentTripCompletedPayload, AgentTripStartedPayload } from "./agent-events.type.mjs";
|
|
2
|
+
import { EventIdentity } from "./event-identity.type.mjs";
|
|
3
|
+
import { SupervisorAckCompletedPayload, SupervisorAckStreamingPayload, SupervisorAgentCompletedPayload, SupervisorAgentFailedPayload, SupervisorAgentStartingPayload, SupervisorAgentStreamingPayload, SupervisorCancelledPayload, SupervisorClassifierCompletedPayload, SupervisorClassifierFailedPayload, SupervisorClassifierStartingPayload, SupervisorClassifierStreamingPayload, SupervisorCompletedPayload, SupervisorErrorPayload, SupervisorEvaluateVerdictPayload, SupervisorIterationCompletedPayload, SupervisorIterationStartingPayload, SupervisorRouterDecidedPayload, SupervisorRouterDecidingPayload, SupervisorStartingPayload } from "./supervisor-events.type.mjs";
|
|
4
|
+
import { WorkflowCancelledPayload, WorkflowCompletedPayload, WorkflowErrorPayload, WorkflowLoopWarningPayload, WorkflowStartingPayload, WorkflowStepCompletedPayload, WorkflowStepFailedPayload, WorkflowStepRetryingPayload, WorkflowStepSkippedPayload, WorkflowStepStartingPayload, WorkflowStepStreamingPayload } from "./workflow-events.type.mjs";
|
|
5
|
+
|
|
6
|
+
//#region ../../@warlock.js/ai/src/contracts/events/event-map.type.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Apply run identity to every value of an event map. The central
|
|
9
|
+
* `emit` chokepoint of each primitive injects `runId` / `rootRunId`,
|
|
10
|
+
* so subscribers always receive them while call sites stay
|
|
11
|
+
* identity-free (see `WithoutIdentity`).
|
|
12
|
+
*/
|
|
13
|
+
type WithIdentity<TMap> = { [K in keyof TMap]: TMap[K] & EventIdentity };
|
|
14
|
+
/**
|
|
15
|
+
* Event map for agent execution. Keys use dot-notation so every event
|
|
16
|
+
* name is unambiguous across primitives (agent vs workflow vs supervisor)
|
|
17
|
+
* and so consumers can group or filter by prefix (`agent.*`, `agent.tool.*`).
|
|
18
|
+
*
|
|
19
|
+
* Every payload carries `EventIdentity` (`runId` / `rootRunId`),
|
|
20
|
+
* injected centrally by the agent's `emit` so consumers can correlate
|
|
21
|
+
* any event back to its run without an out-of-band closure.
|
|
22
|
+
*/
|
|
23
|
+
type AgentEventMap = WithIdentity<{
|
|
24
|
+
"agent.starting": AgentStartingPayload;
|
|
25
|
+
"agent.trip.started": AgentTripStartedPayload;
|
|
26
|
+
"agent.trip.streaming": AgentStreamingPayload;
|
|
27
|
+
"agent.trip.completed": AgentTripCompletedPayload;
|
|
28
|
+
"agent.tool.calling": AgentToolCallingPayload;
|
|
29
|
+
"agent.tool.called": AgentToolCalledPayload;
|
|
30
|
+
"agent.tool.failed": AgentToolCallingFailedPayload;
|
|
31
|
+
"agent.completed": AgentCompletedPayload;
|
|
32
|
+
"agent.error": AgentErrorPayload;
|
|
33
|
+
}>;
|
|
34
|
+
/** Event map for workflow execution. Every payload carries `EventIdentity`. */
|
|
35
|
+
type WorkflowEventMap = WithIdentity<{
|
|
36
|
+
"workflow.starting": WorkflowStartingPayload;
|
|
37
|
+
"workflow.step.starting": WorkflowStepStartingPayload;
|
|
38
|
+
"workflow.step.streaming": WorkflowStepStreamingPayload;
|
|
39
|
+
"workflow.step.completed": WorkflowStepCompletedPayload;
|
|
40
|
+
"workflow.step.skipped": WorkflowStepSkippedPayload;
|
|
41
|
+
"workflow.step.retrying": WorkflowStepRetryingPayload;
|
|
42
|
+
"workflow.step.failed": WorkflowStepFailedPayload;
|
|
43
|
+
"workflow.loop.warning": WorkflowLoopWarningPayload;
|
|
44
|
+
"workflow.cancelled": WorkflowCancelledPayload;
|
|
45
|
+
"workflow.completed": WorkflowCompletedPayload;
|
|
46
|
+
"workflow.error": WorkflowErrorPayload;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Event map for supervisor execution. Three-tier subscription —
|
|
50
|
+
* definition, instance, per-call — fires in that order on every
|
|
51
|
+
* emission. Router-only events (`supervisor.router.*`) are skipped
|
|
52
|
+
* entirely in deterministic `route`-callback mode.
|
|
53
|
+
*
|
|
54
|
+
* Every payload carries `EventIdentity` (`runId` / `rootRunId`),
|
|
55
|
+
* injected centrally by `SupervisorExecution.emit`.
|
|
56
|
+
*/
|
|
57
|
+
type SupervisorEventMap = WithIdentity<{
|
|
58
|
+
"supervisor.starting": SupervisorStartingPayload;
|
|
59
|
+
"supervisor.iteration.starting": SupervisorIterationStartingPayload;
|
|
60
|
+
"supervisor.router.deciding": SupervisorRouterDecidingPayload;
|
|
61
|
+
"supervisor.router.decided": SupervisorRouterDecidedPayload;
|
|
62
|
+
"supervisor.agent.starting": SupervisorAgentStartingPayload;
|
|
63
|
+
"supervisor.agent.streaming": SupervisorAgentStreamingPayload;
|
|
64
|
+
"supervisor.agent.completed": SupervisorAgentCompletedPayload;
|
|
65
|
+
"supervisor.agent.failed": SupervisorAgentFailedPayload;
|
|
66
|
+
"supervisor.ack.streaming": SupervisorAckStreamingPayload;
|
|
67
|
+
"supervisor.ack.completed": SupervisorAckCompletedPayload;
|
|
68
|
+
"supervisor.classifier.starting": SupervisorClassifierStartingPayload;
|
|
69
|
+
"supervisor.classifier.streaming": SupervisorClassifierStreamingPayload;
|
|
70
|
+
"supervisor.classifier.completed": SupervisorClassifierCompletedPayload;
|
|
71
|
+
"supervisor.classifier.failed": SupervisorClassifierFailedPayload;
|
|
72
|
+
"supervisor.evaluate.verdict": SupervisorEvaluateVerdictPayload;
|
|
73
|
+
"supervisor.iteration.completed": SupervisorIterationCompletedPayload;
|
|
74
|
+
"supervisor.cancelled": SupervisorCancelledPayload;
|
|
75
|
+
"supervisor.completed": SupervisorCompletedPayload;
|
|
76
|
+
"supervisor.error": SupervisorErrorPayload;
|
|
77
|
+
}>;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { AgentEventMap, SupervisorEventMap, WorkflowEventMap };
|
|
80
|
+
//# sourceMappingURL=event-map.type.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-map.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/events/event-map.type.ts"],"mappings":";;;;;;;;AA6CgC;;;;KAQ3B,YAAA,uBAAmC,IAAA,GAAO,IAAA,CAAK,CAAA,IAAK,aAAA;;;;;;;;;;KAW7C,aAAA,GAAgB,YAAA;EAC1B,gBAAA,EAAkB,oBAAA;EAClB,oBAAA,EAAsB,uBAAA;EACtB,sBAAA,EAAwB,qBAAA;EACxB,sBAAA,EAAwB,yBAAA;EACxB,oBAAA,EAAsB,uBAAA;EACtB,mBAAA,EAAqB,sBAAA;EACrB,mBAAA,EAAqB,6BAAA;EACrB,iBAAA,EAAmB,qBAAA;EACnB,aAAA,EAAe,iBAAA;AAAA;;KAIL,gBAAA,GAAmB,YAAA;EAC7B,mBAAA,EAAqB,uBAAA;EACrB,wBAAA,EAA0B,2BAAA;EAC1B,yBAAA,EAA2B,4BAAA;EAC3B,yBAAA,EAA2B,4BAAA;EAC3B,uBAAA,EAAyB,0BAAA;EACzB,wBAAA,EAA0B,2BAAA;EAC1B,sBAAA,EAAwB,yBAAA;EACxB,uBAAA,EAAyB,0BAAA;EACzB,oBAAA,EAAsB,wBAAA;EACtB,oBAAA,EAAsB,wBAAA;EACtB,gBAAA,EAAkB,oBAAA;AAAA;;;;;;;;;;KAYR,kBAAA,GAAqB,YAAA;EAC/B,qBAAA,EAAuB,yBAAA;EACvB,+BAAA,EAAiC,kCAAA;EACjC,4BAAA,EAA8B,+BAAA;EAC9B,2BAAA,EAA6B,8BAAA;EAC7B,2BAAA,EAA6B,8BAAA;EAC7B,4BAAA,EAA8B,+BAAA;EAC9B,4BAAA,EAA8B,+BAAA;EAC9B,yBAAA,EAA2B,4BAAA;EAC3B,0BAAA,EAA4B,6BAAA;EAC5B,0BAAA,EAA4B,6BAAA;EAC5B,gCAAA,EAAkC,mCAAA;EAClC,iCAAA,EAAmC,oCAAA;EACnC,iCAAA,EAAmC,oCAAA;EACnC,8BAAA,EAAgC,iCAAA;EAChC,6BAAA,EAA+B,gCAAA;EAC/B,gCAAA,EAAkC,mCAAA;EAClC,sBAAA,EAAwB,0BAAA;EACxB,sBAAA,EAAwB,0BAAA;EACxB,kBAAA,EAAoB,sBAAA;AAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgentCompletedPayload, AgentErrorPayload, AgentStartingPayload, AgentStreamingPayload, AgentToolCalledPayload, AgentToolCallingFailedPayload, AgentToolCallingPayload, AgentTripCompletedPayload, AgentTripStartedPayload, ToolEventMeta } from "./agent-events.type.mjs";
|
|
2
|
+
import { EventIdentity, WithoutIdentity } from "./event-identity.type.mjs";
|
|
3
|
+
import { SupervisorAgentCompletedPayload, SupervisorAgentFailedPayload, SupervisorAgentStartingPayload, SupervisorAgentStreamingPayload, SupervisorCancelledPayload, SupervisorCompletedPayload, SupervisorErrorPayload, SupervisorEvaluateVerdictPayload, SupervisorIterationCompletedPayload, SupervisorIterationStartingPayload, SupervisorRouterDecidedPayload, SupervisorRouterDecidingPayload, SupervisorStartingPayload } from "./supervisor-events.type.mjs";
|
|
4
|
+
import { WorkflowCancelledPayload, WorkflowCompletedPayload, WorkflowErrorPayload, WorkflowLoopWarningPayload, WorkflowStartingPayload, WorkflowStepCompletedPayload, WorkflowStepFailedPayload, WorkflowStepRetryingPayload, WorkflowStepSkippedPayload, WorkflowStepStartingPayload, WorkflowStepStreamingPayload } from "./workflow-events.type.mjs";
|
|
5
|
+
import { AgentEventMap, SupervisorEventMap, WorkflowEventMap } from "./event-map.type.mjs";
|
|
6
|
+
import { CompleteEvent } from "./complete-event.type.mjs";
|
|
7
|
+
import { UsageEvent } from "./usage-event.type.mjs";
|