agent-nuvira 3.3.1 → 3.3.4
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 +18 -13
- package/dist/agent-sdk/src/agent.d.ts +2 -0
- package/dist/agent-sdk/src/agent.d.ts.map +1 -1
- package/dist/agent-sdk/src/define.d.ts +64 -0
- package/dist/agent-sdk/src/define.d.ts.map +1 -0
- package/dist/agent-sdk/src/define.js +76 -0
- package/dist/agent-sdk/src/define.js.map +1 -0
- package/dist/agent-sdk/src/index.d.ts +9 -0
- package/dist/agent-sdk/src/index.d.ts.map +1 -1
- package/dist/agent-sdk/src/index.js +9 -0
- package/dist/agent-sdk/src/index.js.map +1 -1
- package/dist/agent-sdk/src/scaffold.d.ts +11 -0
- package/dist/agent-sdk/src/scaffold.d.ts.map +1 -1
- package/dist/agent-sdk/src/scaffold.js +16 -6
- package/dist/agent-sdk/src/scaffold.js.map +1 -1
- package/dist/agents/agents/runner.d.ts +9 -0
- package/dist/agents/agents/runner.d.ts.map +1 -1
- package/dist/agents/agents/runner.js +34 -12
- package/dist/agents/agents/runner.js.map +1 -1
- package/dist/agents/agents/writer-tool-calling.d.ts.map +1 -1
- package/dist/agents/agents/writer-tool-calling.js +7 -2
- package/dist/agents/agents/writer-tool-calling.js.map +1 -1
- package/dist/agents/agents/writer.d.ts.map +1 -1
- package/dist/agents/agents/writer.js +7 -1
- package/dist/agents/agents/writer.js.map +1 -1
- package/dist/agents/artifact-verification.d.ts +102 -0
- package/dist/agents/artifact-verification.d.ts.map +1 -0
- package/dist/agents/artifact-verification.js +216 -0
- package/dist/agents/artifact-verification.js.map +1 -0
- package/dist/agents/checkpoint-store.d.ts +73 -0
- package/dist/agents/checkpoint-store.d.ts.map +1 -1
- package/dist/agents/checkpoint-store.js +161 -0
- package/dist/agents/checkpoint-store.js.map +1 -1
- package/dist/agents/credential-store.d.ts +120 -0
- package/dist/agents/credential-store.d.ts.map +1 -1
- package/dist/agents/credential-store.js +358 -19
- package/dist/agents/credential-store.js.map +1 -1
- package/dist/agents/long-form-plan.d.ts.map +1 -1
- package/dist/agents/long-form-plan.js +2 -1
- package/dist/agents/long-form-plan.js.map +1 -1
- package/dist/agents/orchestrator.d.ts +10 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/orchestrator.js +239 -79
- package/dist/agents/orchestrator.js.map +1 -1
- package/dist/agents/phase-engine.d.ts +61 -0
- package/dist/agents/phase-engine.d.ts.map +1 -1
- package/dist/agents/phase-engine.js +68 -2
- package/dist/agents/phase-engine.js.map +1 -1
- package/dist/agents/prompt-assembly.d.ts +11 -0
- package/dist/agents/prompt-assembly.d.ts.map +1 -1
- package/dist/agents/prompt-assembly.js +17 -0
- package/dist/agents/prompt-assembly.js.map +1 -1
- package/dist/agents/release-preflight.d.ts +121 -0
- package/dist/agents/release-preflight.d.ts.map +1 -0
- package/dist/agents/release-preflight.js +259 -0
- package/dist/agents/release-preflight.js.map +1 -0
- package/dist/agents/release-runner.d.ts +157 -0
- package/dist/agents/release-runner.d.ts.map +1 -0
- package/dist/agents/release-runner.js +719 -0
- package/dist/agents/release-runner.js.map +1 -0
- package/dist/agents/step-handoff.d.ts +190 -0
- package/dist/agents/step-handoff.d.ts.map +1 -0
- package/dist/agents/step-handoff.js +443 -0
- package/dist/agents/step-handoff.js.map +1 -0
- package/dist/cli/agent.d.ts +2 -2
- package/dist/cli/agent.js +10 -10
- package/dist/cli/benchmark.d.ts.map +1 -1
- package/dist/cli/benchmark.js +11 -4
- package/dist/cli/benchmark.js.map +1 -1
- package/dist/cli/chat.d.ts +94 -0
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +379 -24
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/cli-program.d.ts.map +1 -1
- package/dist/cli/cli-program.js +8 -0
- package/dist/cli/cli-program.js.map +1 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +9 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/credentials.d.ts +28 -0
- package/dist/cli/credentials.d.ts.map +1 -0
- package/dist/cli/credentials.js +213 -0
- package/dist/cli/credentials.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +3 -2
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/edit.js +2 -2
- package/dist/cli/eval.d.ts +17 -0
- package/dist/cli/eval.d.ts.map +1 -1
- package/dist/cli/eval.js +105 -2
- package/dist/cli/eval.js.map +1 -1
- package/dist/cli/execute.d.ts +16 -1
- package/dist/cli/execute.d.ts.map +1 -1
- package/dist/cli/execute.js +192 -22
- package/dist/cli/execute.js.map +1 -1
- package/dist/cli/failover-runner.d.ts.map +1 -1
- package/dist/cli/failover-runner.js +9 -3
- package/dist/cli/failover-runner.js.map +1 -1
- package/dist/cli/loop-executor.d.ts +55 -0
- package/dist/cli/loop-executor.d.ts.map +1 -1
- package/dist/cli/loop-executor.js +285 -19
- package/dist/cli/loop-executor.js.map +1 -1
- package/dist/cli/model.d.ts.map +1 -1
- package/dist/cli/model.js +9 -8
- package/dist/cli/model.js.map +1 -1
- package/dist/cli/models.d.ts +1 -1
- package/dist/cli/models.js +4 -4
- package/dist/cli/nlu.d.ts.map +1 -1
- package/dist/cli/nlu.js +8 -2
- package/dist/cli/nlu.js.map +1 -1
- package/dist/cli/parity.d.ts +85 -0
- package/dist/cli/parity.d.ts.map +1 -0
- package/dist/cli/parity.js +506 -0
- package/dist/cli/parity.js.map +1 -0
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +2 -1
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/publish.d.ts +22 -0
- package/dist/cli/publish.d.ts.map +1 -1
- package/dist/cli/publish.js +109 -13
- package/dist/cli/publish.js.map +1 -1
- package/dist/cli/retrieval.d.ts.map +1 -1
- package/dist/cli/retrieval.js +5 -4
- package/dist/cli/retrieval.js.map +1 -1
- package/dist/cli/sdk.js +4 -4
- package/dist/cli/sdk.js.map +1 -1
- package/dist/cli/trace.d.ts.map +1 -1
- package/dist/cli/trace.js +2 -1
- package/dist/cli/trace.js.map +1 -1
- package/dist/cli/workflow.js +2 -2
- package/dist/cli/workflow.js.map +1 -1
- package/dist/config/live-credentials.d.ts +57 -0
- package/dist/config/live-credentials.d.ts.map +1 -0
- package/dist/config/live-credentials.js +126 -0
- package/dist/config/live-credentials.js.map +1 -0
- package/dist/config/paths.d.ts +18 -0
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +25 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/config/types.d.ts +44 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/federation/a2a-types.js +1 -1
- package/dist/federation/a2a-types.js.map +1 -1
- package/dist/findings/verdicts.d.ts +241 -0
- package/dist/findings/verdicts.d.ts.map +1 -0
- package/dist/findings/verdicts.js +284 -0
- package/dist/findings/verdicts.js.map +1 -0
- package/dist/gateway/adapters.d.ts +65 -0
- package/dist/gateway/adapters.d.ts.map +1 -1
- package/dist/gateway/adapters.js +216 -10
- package/dist/gateway/adapters.js.map +1 -1
- package/dist/gateway/channel-directory.d.ts +31 -0
- package/dist/gateway/channel-directory.d.ts.map +1 -1
- package/dist/gateway/channel-directory.js +40 -0
- package/dist/gateway/channel-directory.js.map +1 -1
- package/dist/gateway/gateway-log.d.ts +1 -1
- package/dist/gateway/gateway-log.d.ts.map +1 -1
- package/dist/gateway/gateway-log.js.map +1 -1
- package/dist/gateway/hooks.d.ts +87 -19
- package/dist/gateway/hooks.d.ts.map +1 -1
- package/dist/gateway/hooks.js +62 -23
- package/dist/gateway/hooks.js.map +1 -1
- package/dist/gateway/inbound-media.d.ts +147 -0
- package/dist/gateway/inbound-media.d.ts.map +1 -0
- package/dist/gateway/inbound-media.js +317 -0
- package/dist/gateway/inbound-media.js.map +1 -0
- package/dist/gateway/inbox.d.ts +8 -1
- package/dist/gateway/inbox.d.ts.map +1 -1
- package/dist/gateway/inbox.js.map +1 -1
- package/dist/gateway/platform-config.d.ts +14 -0
- package/dist/gateway/platform-config.d.ts.map +1 -1
- package/dist/gateway/platform-config.js +26 -8
- package/dist/gateway/platform-config.js.map +1 -1
- package/dist/gateway/realtime.d.ts +114 -0
- package/dist/gateway/realtime.d.ts.map +1 -0
- package/dist/gateway/realtime.js +402 -0
- package/dist/gateway/realtime.js.map +1 -0
- package/dist/gateway/registry.d.ts +31 -0
- package/dist/gateway/registry.d.ts.map +1 -1
- package/dist/gateway/registry.js +224 -4
- package/dist/gateway/registry.js.map +1 -1
- package/dist/gateway/whatsapp/baileys-bridge.d.ts +11 -1
- package/dist/gateway/whatsapp/baileys-bridge.d.ts.map +1 -1
- package/dist/gateway/whatsapp/baileys-bridge.js +123 -4
- package/dist/gateway/whatsapp/baileys-bridge.js.map +1 -1
- package/dist/gateway/whatsapp/bridge.d.ts +6 -2
- package/dist/gateway/whatsapp/bridge.d.ts.map +1 -1
- package/dist/gateway/whatsapp/bridge.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/inference/factory.d.ts +14 -0
- package/dist/inference/factory.d.ts.map +1 -1
- package/dist/inference/factory.js +17 -0
- package/dist/inference/factory.js.map +1 -1
- package/dist/inference/groq-adapter.d.ts +2 -0
- package/dist/inference/groq-adapter.d.ts.map +1 -1
- package/dist/inference/groq-adapter.js +16 -6
- package/dist/inference/groq-adapter.js.map +1 -1
- package/dist/inference/model-validator.d.ts +6 -1
- package/dist/inference/model-validator.d.ts.map +1 -1
- package/dist/inference/model-validator.js +7 -2
- package/dist/inference/model-validator.js.map +1 -1
- package/dist/inference/route-resolver.d.ts +116 -0
- package/dist/inference/route-resolver.d.ts.map +1 -0
- package/dist/inference/route-resolver.js +159 -0
- package/dist/inference/route-resolver.js.map +1 -0
- package/dist/inference/tools.d.ts.map +1 -1
- package/dist/inference/tools.js +29 -0
- package/dist/inference/tools.js.map +1 -1
- package/dist/learning/autonomy-policy.d.ts +18 -0
- package/dist/learning/autonomy-policy.d.ts.map +1 -1
- package/dist/learning/autonomy-policy.js +35 -0
- package/dist/learning/autonomy-policy.js.map +1 -1
- package/dist/learning/benchmark.d.ts.map +1 -1
- package/dist/learning/benchmark.js +3 -2
- package/dist/learning/benchmark.js.map +1 -1
- package/dist/learning/continuation.d.ts.map +1 -1
- package/dist/learning/continuation.js +2 -1
- package/dist/learning/continuation.js.map +1 -1
- package/dist/learning/cost-tracker.d.ts.map +1 -1
- package/dist/learning/cost-tracker.js +2 -1
- package/dist/learning/cost-tracker.js.map +1 -1
- package/dist/learning/deferred-task.d.ts.map +1 -1
- package/dist/learning/deferred-task.js +13 -4
- package/dist/learning/deferred-task.js.map +1 -1
- package/dist/learning/eval-framework.d.ts.map +1 -1
- package/dist/learning/eval-framework.js +2 -1
- package/dist/learning/eval-framework.js.map +1 -1
- package/dist/learning/long-form.d.ts.map +1 -1
- package/dist/learning/long-form.js +2 -1
- package/dist/learning/long-form.js.map +1 -1
- package/dist/learning/model-registry.d.ts.map +1 -1
- package/dist/learning/model-registry.js +2 -1
- package/dist/learning/model-registry.js.map +1 -1
- package/dist/learning/reasoning-cache.d.ts.map +1 -1
- package/dist/learning/reasoning-cache.js +2 -1
- package/dist/learning/reasoning-cache.js.map +1 -1
- package/dist/learning/reasoning-trace.d.ts +38 -2
- package/dist/learning/reasoning-trace.d.ts.map +1 -1
- package/dist/learning/reasoning-trace.js +91 -1
- package/dist/learning/reasoning-trace.js.map +1 -1
- package/dist/learning/resilient-call.d.ts.map +1 -1
- package/dist/learning/resilient-call.js +31 -18
- package/dist/learning/resilient-call.js.map +1 -1
- package/dist/learning/retrieval.d.ts.map +1 -1
- package/dist/learning/retrieval.js +2 -1
- package/dist/learning/retrieval.js.map +1 -1
- package/dist/learning/seeded-benchmark.d.ts +160 -0
- package/dist/learning/seeded-benchmark.d.ts.map +1 -0
- package/dist/learning/seeded-benchmark.js +321 -0
- package/dist/learning/seeded-benchmark.js.map +1 -0
- package/dist/learning/seeded-bugs.d.ts +142 -0
- package/dist/learning/seeded-bugs.d.ts.map +1 -0
- package/dist/learning/seeded-bugs.js +535 -0
- package/dist/learning/seeded-bugs.js.map +1 -0
- package/dist/learning/skill-store.d.ts.map +1 -1
- package/dist/learning/skill-store.js +30 -9
- package/dist/learning/skill-store.js.map +1 -1
- package/dist/learning/step-checkpoint.d.ts +127 -0
- package/dist/learning/step-checkpoint.d.ts.map +1 -0
- package/dist/learning/step-checkpoint.js +244 -0
- package/dist/learning/step-checkpoint.js.map +1 -0
- package/dist/mcp/catalog.js +2 -3
- package/dist/mcp/catalog.js.map +1 -1
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +5 -3
- package/dist/mcp/manager.js.map +1 -1
- package/dist/nlu/intent-confirm.d.ts +23 -1
- package/dist/nlu/intent-confirm.d.ts.map +1 -1
- package/dist/nlu/intent-confirm.js +85 -2
- package/dist/nlu/intent-confirm.js.map +1 -1
- package/dist/nlu/learnings.d.ts +7 -0
- package/dist/nlu/learnings.d.ts.map +1 -1
- package/dist/nlu/learnings.js +7 -0
- package/dist/nlu/learnings.js.map +1 -1
- package/dist/observability/debug-log.d.ts +250 -0
- package/dist/observability/debug-log.d.ts.map +1 -0
- package/dist/observability/debug-log.js +500 -0
- package/dist/observability/debug-log.js.map +1 -0
- package/dist/observability/event-bus.d.ts.map +1 -1
- package/dist/observability/event-bus.js +4 -1
- package/dist/observability/event-bus.js.map +1 -1
- package/dist/observability/otel.d.ts +278 -0
- package/dist/observability/otel.d.ts.map +1 -0
- package/dist/observability/otel.js +590 -0
- package/dist/observability/otel.js.map +1 -0
- package/dist/parity/drivers.d.ts +99 -0
- package/dist/parity/drivers.d.ts.map +1 -0
- package/dist/parity/drivers.js +1362 -0
- package/dist/parity/drivers.js.map +1 -0
- package/dist/parity/graph.d.ts +73 -0
- package/dist/parity/graph.d.ts.map +1 -0
- package/dist/parity/graph.js +162 -0
- package/dist/parity/graph.js.map +1 -0
- package/dist/parity/matrix.d.ts +105 -0
- package/dist/parity/matrix.d.ts.map +1 -0
- package/dist/parity/matrix.js +352 -0
- package/dist/parity/matrix.js.map +1 -0
- package/dist/parity/observation.d.ts +444 -0
- package/dist/parity/observation.d.ts.map +1 -0
- package/dist/parity/observation.js +333 -0
- package/dist/parity/observation.js.map +1 -0
- package/dist/parity/scenarios.d.ts +229 -0
- package/dist/parity/scenarios.d.ts.map +1 -0
- package/dist/parity/scenarios.js +175 -0
- package/dist/parity/scenarios.js.map +1 -0
- package/dist/parity/surfaces.d.ts +122 -0
- package/dist/parity/surfaces.d.ts.map +1 -0
- package/dist/parity/surfaces.js +190 -0
- package/dist/parity/surfaces.js.map +1 -0
- package/dist/runtime/fault-injection.d.ts +173 -0
- package/dist/runtime/fault-injection.d.ts.map +1 -0
- package/dist/runtime/fault-injection.js +281 -0
- package/dist/runtime/fault-injection.js.map +1 -0
- package/dist/skills/secret-capture.d.ts.map +1 -1
- package/dist/skills/secret-capture.js +9 -4
- package/dist/skills/secret-capture.js.map +1 -1
- package/dist/tools/child-agent-entry.d.ts +23 -0
- package/dist/tools/child-agent-entry.d.ts.map +1 -0
- package/dist/tools/child-agent-entry.js +129 -0
- package/dist/tools/child-agent-entry.js.map +1 -0
- package/dist/tools/child-agent-runtime.d.ts +124 -0
- package/dist/tools/child-agent-runtime.d.ts.map +1 -0
- package/dist/tools/child-agent-runtime.js +704 -0
- package/dist/tools/child-agent-runtime.js.map +1 -0
- package/dist/tools/coding-tools.d.ts.map +1 -1
- package/dist/tools/coding-tools.js +82 -10
- package/dist/tools/coding-tools.js.map +1 -1
- package/dist/tools/credentials-tool.d.ts +24 -0
- package/dist/tools/credentials-tool.d.ts.map +1 -0
- package/dist/tools/credentials-tool.js +125 -0
- package/dist/tools/credentials-tool.js.map +1 -0
- package/dist/tools/delegation-system.d.ts +31 -0
- package/dist/tools/delegation-system.d.ts.map +1 -1
- package/dist/tools/delegation-system.js +70 -9
- package/dist/tools/delegation-system.js.map +1 -1
- package/dist/tools/extract/docx.d.ts +27 -0
- package/dist/tools/extract/docx.d.ts.map +1 -0
- package/dist/tools/extract/docx.js +48 -0
- package/dist/tools/extract/docx.js.map +1 -0
- package/dist/tools/extract/html-text.d.ts +27 -0
- package/dist/tools/extract/html-text.d.ts.map +1 -0
- package/dist/tools/extract/html-text.js +86 -0
- package/dist/tools/extract/html-text.js.map +1 -0
- package/dist/tools/extract/pdf-ocr.d.ts +58 -0
- package/dist/tools/extract/pdf-ocr.d.ts.map +1 -0
- package/dist/tools/extract/pdf-ocr.js +116 -0
- package/dist/tools/extract/pdf-ocr.js.map +1 -0
- package/dist/tools/extract/pdf.d.ts +65 -0
- package/dist/tools/extract/pdf.d.ts.map +1 -0
- package/dist/tools/extract/pdf.js +197 -0
- package/dist/tools/extract/pdf.js.map +1 -0
- package/dist/tools/extract/pptx.d.ts +32 -0
- package/dist/tools/extract/pptx.d.ts.map +1 -0
- package/dist/tools/extract/pptx.js +77 -0
- package/dist/tools/extract/pptx.js.map +1 -0
- package/dist/tools/extract/xlsx.d.ts +47 -0
- package/dist/tools/extract/xlsx.d.ts.map +1 -0
- package/dist/tools/extract/xlsx.js +111 -0
- package/dist/tools/extract/xlsx.js.map +1 -0
- package/dist/tools/finding-tool.d.ts +76 -0
- package/dist/tools/finding-tool.d.ts.map +1 -0
- package/dist/tools/finding-tool.js +125 -0
- package/dist/tools/finding-tool.js.map +1 -0
- package/dist/tools/git-tool.d.ts +25 -7
- package/dist/tools/git-tool.d.ts.map +1 -1
- package/dist/tools/git-tool.js +155 -15
- package/dist/tools/git-tool.js.map +1 -1
- package/dist/tools/loop-project-context.d.ts.map +1 -1
- package/dist/tools/loop-project-context.js +16 -0
- package/dist/tools/loop-project-context.js.map +1 -1
- package/dist/tools/loop-route-feed.d.ts +57 -0
- package/dist/tools/loop-route-feed.d.ts.map +1 -0
- package/dist/tools/loop-route-feed.js +101 -0
- package/dist/tools/loop-route-feed.js.map +1 -0
- package/dist/tools/messaging-tools.d.ts +41 -11
- package/dist/tools/messaging-tools.d.ts.map +1 -1
- package/dist/tools/messaging-tools.js +104 -55
- package/dist/tools/messaging-tools.js.map +1 -1
- package/dist/tools/neutts-synth.d.ts +27 -3
- package/dist/tools/neutts-synth.d.ts.map +1 -1
- package/dist/tools/neutts-synth.js +57 -13
- package/dist/tools/neutts-synth.js.map +1 -1
- package/dist/tools/pipeline-tool.d.ts +43 -1
- package/dist/tools/pipeline-tool.d.ts.map +1 -1
- package/dist/tools/pipeline-tool.js +21 -4
- package/dist/tools/pipeline-tool.js.map +1 -1
- package/dist/tools/publish-tool.d.ts.map +1 -1
- package/dist/tools/publish-tool.js +76 -10
- package/dist/tools/publish-tool.js.map +1 -1
- package/dist/tools/read-extract.d.ts +116 -45
- package/dist/tools/read-extract.d.ts.map +1 -1
- package/dist/tools/read-extract.js +494 -158
- package/dist/tools/read-extract.js.map +1 -1
- package/dist/tools/registry.d.ts +23 -3
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +196 -29
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/run-terminal.d.ts +9 -0
- package/dist/tools/run-terminal.d.ts.map +1 -1
- package/dist/tools/run-terminal.js +80 -2
- package/dist/tools/run-terminal.js.map +1 -1
- package/dist/tools/subagent-refusal.d.ts +15 -0
- package/dist/tools/subagent-refusal.d.ts.map +1 -0
- package/dist/tools/subagent-refusal.js +18 -0
- package/dist/tools/subagent-refusal.js.map +1 -0
- package/dist/tools/subagent-spawner.d.ts +122 -0
- package/dist/tools/subagent-spawner.d.ts.map +1 -1
- package/dist/tools/subagent-spawner.js +249 -28
- package/dist/tools/subagent-spawner.js.map +1 -1
- package/dist/tools/tool-hooks.d.ts +177 -0
- package/dist/tools/tool-hooks.d.ts.map +1 -0
- package/dist/tools/tool-hooks.js +427 -0
- package/dist/tools/tool-hooks.js.map +1 -0
- package/dist/tools/tool-loop.d.ts +94 -5
- package/dist/tools/tool-loop.d.ts.map +1 -1
- package/dist/tools/tool-loop.js +315 -9
- package/dist/tools/tool-loop.js.map +1 -1
- package/dist/tools/tool-refusal.d.ts +68 -0
- package/dist/tools/tool-refusal.d.ts.map +1 -0
- package/dist/tools/tool-refusal.js +78 -0
- package/dist/tools/tool-refusal.js.map +1 -0
- package/dist/tools/toolsets.d.ts +8 -0
- package/dist/tools/toolsets.d.ts.map +1 -1
- package/dist/tools/toolsets.js +14 -4
- package/dist/tools/toolsets.js.map +1 -1
- package/dist/tools/vision-tools.d.ts +88 -83
- package/dist/tools/vision-tools.d.ts.map +1 -1
- package/dist/tools/vision-tools.js +134 -103
- package/dist/tools/vision-tools.js.map +1 -1
- package/dist/tools/worktree.d.ts +210 -0
- package/dist/tools/worktree.d.ts.map +1 -0
- package/dist/tools/worktree.js +374 -0
- package/dist/tools/worktree.js.map +1 -0
- package/dist/utils/format.d.ts +3 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +32 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/web-dashboard/attachment-extract.d.ts +64 -0
- package/dist/web-dashboard/attachment-extract.d.ts.map +1 -0
- package/dist/web-dashboard/attachment-extract.js +154 -0
- package/dist/web-dashboard/attachment-extract.js.map +1 -0
- package/dist/web-dashboard/chat-console.d.ts +108 -1
- package/dist/web-dashboard/chat-console.d.ts.map +1 -1
- package/dist/web-dashboard/chat-console.js +36 -0
- package/dist/web-dashboard/chat-console.js.map +1 -1
- package/dist/web-dashboard/hub-data.d.ts +37 -0
- package/dist/web-dashboard/hub-data.d.ts.map +1 -1
- package/dist/web-dashboard/hub-data.js +61 -1
- package/dist/web-dashboard/hub-data.js.map +1 -1
- package/dist/web-dashboard/server.d.ts +14 -0
- package/dist/web-dashboard/server.d.ts.map +1 -1
- package/dist/web-dashboard/server.js +247 -13
- package/dist/web-dashboard/server.js.map +1 -1
- package/dist/web-dashboard/src/types.d.ts +196 -48
- package/dist/web-dashboard/src/types.d.ts.map +1 -1
- package/dist/workflow/registry.js +1 -1
- package/dist/workflow/registry.js.map +1 -1
- package/package.json +22 -6
- package/src/web-dashboard/public/assets/{index-Cyd6tIew.css → index-XJjj2cBX.css} +1 -1
- package/src/web-dashboard/public/assets/index-YWF9FpwQ.js +207 -0
- package/src/web-dashboard/public/assets/index-YWF9FpwQ.js.map +1 -0
- package/src/web-dashboard/public/index.html +2 -2
- package/dist/tools/child-agent-worker.js +0 -212
- package/src/web-dashboard/public/assets/index-CjvoBhlz.js +0 -207
- package/src/web-dashboard/public/assets/index-CjvoBhlz.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAWH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAgBrD,OAAO,KAAK,EAAwC,QAAQ,EAAe,MAAM,YAAY,CAAC;AAyB9F,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAgB9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAuB,KAAK,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAS/F,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,4BAA4B,CAAC;AA0DpC,iDAAiD;AACjD,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IA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AAO,CAAC,wBAAwB;IA+BhC;;;;;;;;;OASG;IACH,OAAO,CAAC,yBAAyB;IAKjC;;;;;;;;;OASG;IACH;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAqChC,OAAO,CAAC,kBAAkB;IA4C1B,gEAAgE;IAChE,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,+BAA+B;IA4JvC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,4BAA4B;IAiBpC;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB;IAgC/B,0EAA0E;IAC1E,OAAO,CAAC,mBAAmB,CAAS;IAEpC,yEAAyE;IACzE,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,2BAA2B;IA0BnC;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAkDpB,OAAO,CAAC,gBAAgB;IAqBxB,2DAA2D;IAC3D,OAAO,CAAC,YAAY,CAAkC;IAEtD;;;OAGG;IACH,OAAO,CAAC,WAAW,CAAC,CAAc;IAElC;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY,CAAsD;IAE1E,OAAO,CAAC,iBAAiB;IAuBzB,8DAA8D;IAC9D,OAAO,CAAC,UAAU,CAA0D;IAE5E,gFAAgF;IAChF,OAAO,CAAC,aAAa,CAAqB;IAE1C;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAgGpB;;;;;;;;OAQG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IA4BtB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,WAAW;CAqCpB"}
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
* Called by the `agent-nuvira execute` CLI command.
|
|
18
18
|
*/
|
|
19
19
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, statSync } from 'node:fs';
|
|
20
|
+
import { verifyArtifacts } from './artifact-verification.js';
|
|
21
|
+
import { formatCount } from '../utils/format.js';
|
|
20
22
|
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
21
23
|
import { spawnSync } from 'node:child_process';
|
|
22
24
|
import { pushDAGUpdate, updateDAGNode, resetDAG } from '../observability/dag-bridge.js';
|
|
@@ -27,7 +29,7 @@ import { showModelPicker } from '../cli/model-picker.js';
|
|
|
27
29
|
import { shouldPromptWeakModel, promptWeakModelChoice } from '../cli/weak-model-prompt.js';
|
|
28
30
|
import { logger } from '../utils/logger.js';
|
|
29
31
|
import { ContextVault } from './context-vault.js';
|
|
30
|
-
import { saveCheckpoint, loadCheckpoint, checkpointIdFor } from './checkpoint-store.js';
|
|
32
|
+
import { saveCheckpoint, loadCheckpoint, checkpointIdFor, findRelatedCheckpointFor, reconcileTaskPlan, planHasPendingWork, } from './checkpoint-store.js';
|
|
31
33
|
import { buildLongFormPlan, isContinuationAsk, } from './long-form-plan.js';
|
|
32
34
|
import { buildCompositePlan } from './composite-plan.js';
|
|
33
35
|
import { assembleDocument, countWords, findInProgressJob, formatProgress, jobProgress, recordSectionOutcome, } from '../learning/long-form.js';
|
|
@@ -69,12 +71,13 @@ import { recordActionFailure } from '../learning/failure-bookkeeping.js';
|
|
|
69
71
|
import { sweepTransientFailures, sessionRevivalStore } from '../learning/provider-revival.js';
|
|
70
72
|
import { resolveContextBudget, resolveContextFileBudget, resolveMaxOutputTokens } from '../learning/context-budget.js';
|
|
71
73
|
import { clampMaxTokens, learnMaxTokensLimitFromError } from '../learning/provider-limits.js';
|
|
72
|
-
import {
|
|
74
|
+
import { resolveRoute } from '../inference/route-resolver.js';
|
|
73
75
|
import { refreshModelRegistry } from '../inference/model-probe.js';
|
|
74
76
|
import { recordRoutingDecision } from '../learning/routing-history.js';
|
|
75
77
|
import { getQuotaLedger } from '../learning/quota-ledger.js';
|
|
76
78
|
import { withTraceCapture, beginTrace, endTrace } from '../learning/reasoning-trace.js';
|
|
77
79
|
import { recordWorkingState } from '../learning/working-state.js';
|
|
80
|
+
import { clearStepHandoff, deliverablesNamedIn, recordStepHandoff, stepKeyFor } from './step-handoff.js';
|
|
78
81
|
import { createResilientCallLLM } from '../learning/resilient-call.js';
|
|
79
82
|
import { createReviewFromResult } from '../team/review.js';
|
|
80
83
|
import { indexFiles, retrieve, recordRetrievalStats, retrievalOptionsFromConfig, estimateTokens as retrievalEstimateTokens } from '../learning/retrieval.js';
|
|
@@ -383,33 +386,88 @@ export class Orchestrator {
|
|
|
383
386
|
const checkpointEnabled = options.checkpoint === true ||
|
|
384
387
|
!!options.resumeCheckpointId ||
|
|
385
388
|
options.resumeRequested === true;
|
|
386
|
-
//
|
|
387
|
-
//
|
|
388
|
-
//
|
|
389
|
-
//
|
|
389
|
+
// ── The work ledger is LOADED AND RECONCILED ON EVERY RUN ────────────────
|
|
390
|
+
// v1.62.4 loaded it only on an explicit `--resume`, and that gate was
|
|
391
|
+
// justified by a real hazard: silently re-entering a COMPLETED plan would
|
|
392
|
+
// skip every task. The hazard is real, but the gate treated the checkpoint's
|
|
393
|
+
// own `completed` flags as proof — and the live NVDA-addon checkpoint said
|
|
394
|
+
// `5/5 completed` while three of those steps had produced nothing, so the
|
|
395
|
+
// one run that should have resumed was the one run forbidden from it. The
|
|
396
|
+
// same plan was then re-planned 18 times.
|
|
397
|
+
//
|
|
398
|
+
// The fix is to make the flags verifiable rather than to keep ignoring them:
|
|
399
|
+
// `reconcileTaskPlan` demotes a "completed" step whose DECLARED files are not
|
|
400
|
+
// on disk, and only then is the checkpoint consulted without being asked.
|
|
401
|
+
//
|
|
402
|
+
// * explicit --resume → load whatever is there, reconciled.
|
|
403
|
+
// * same goal, no --resume → load the auto-id checkpoint, reconciled;
|
|
404
|
+
// continue only if work is genuinely left.
|
|
405
|
+
// * REWORDED goal → the auto-id misses (it hashes goal + cwd),
|
|
406
|
+
// so fall back to the newest checkpoint for
|
|
407
|
+
// this PROJECT. This is what makes "do that
|
|
408
|
+
// addon thing again" resume instead of
|
|
409
|
+
// re-planning from zero.
|
|
410
|
+
// * everything verified done → start fresh (the old guard, now earned).
|
|
390
411
|
const resumeWanted = options.resumeRequested === true || !!options.resumeCheckpointId;
|
|
391
412
|
let resumed = false;
|
|
392
413
|
let vault;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
414
|
+
{
|
|
415
|
+
let saved = loadCheckpoint(resumeId);
|
|
416
|
+
let source = 'goal';
|
|
417
|
+
if (!saved && !resumeWanted) {
|
|
418
|
+
// A reworded ask hashes to a different id — look for the same ask
|
|
419
|
+
// recorded differently. The goal test is required: taking the newest
|
|
420
|
+
// checkpoint in the directory would hand this run the plan of an
|
|
421
|
+
// unrelated run that merely shared a folder.
|
|
422
|
+
try {
|
|
423
|
+
saved = findRelatedCheckpointFor(process.cwd(), goal, { excludeId: resumeId });
|
|
424
|
+
if (saved)
|
|
425
|
+
source = 'project';
|
|
426
|
+
}
|
|
427
|
+
catch {
|
|
428
|
+
saved = null;
|
|
401
429
|
}
|
|
402
430
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
431
|
+
if (!saved) {
|
|
432
|
+
if (resumeWanted) {
|
|
433
|
+
// Resume explicitly requested but no checkpoint found — warn (a
|
|
434
|
+
// reworded goal silently misses the auto id) and start fresh with
|
|
435
|
+
// checkpointing on, so a later crash can still be resumed.
|
|
436
|
+
logger.warn(` ⚠️ No checkpoint found for '${resumeId}' — starting a fresh pipeline (run with --checkpoint to save one)`);
|
|
437
|
+
}
|
|
408
438
|
vault = new ContextVault(goal, process.cwd());
|
|
409
439
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
440
|
+
else {
|
|
441
|
+
const firstStep = saved.context.taskPlan.length;
|
|
442
|
+
const { context: reconciledContext, demoted } = reconcileTaskPlan(saved.context, process.cwd());
|
|
443
|
+
const workLeft = demoted.length > 0 || planHasPendingWork(reconciledContext);
|
|
444
|
+
// An explicit resume always continues. An automatic one continues only
|
|
445
|
+
// when reconciliation found real work — a plan that verifies as finished
|
|
446
|
+
// must not be re-entered (that is the hazard the old gate guarded).
|
|
447
|
+
if (resumeWanted || workLeft) {
|
|
448
|
+
vault = ContextVault.fromSnapshot(reconciledContext);
|
|
449
|
+
resumed = true;
|
|
450
|
+
const done = reconciledContext.taskPlan.filter((s) => s.status === 'completed').length;
|
|
451
|
+
if (demoted.length > 0) {
|
|
452
|
+
// Named, never silent: the checkpoint claimed these were done and
|
|
453
|
+
// the filesystem disagrees. That gap IS the bug being fixed.
|
|
454
|
+
logger.warn(` ♻️ Re-opened ${demoted.length} of ${firstStep} step(s) from checkpoint '${saved.id}' — "completed" but the deliverable is not on disk:`);
|
|
455
|
+
for (const d of demoted)
|
|
456
|
+
logger.warn(` ⛔ ${d.id}: ${d.reason}`);
|
|
457
|
+
}
|
|
458
|
+
if (options.verbose || demoted.length > 0) {
|
|
459
|
+
logger.info(` ♻️ ${source === 'project' ? 'Continuing this project\'s' : 'Resumed from'} checkpoint '${saved.id}' — ${done}/${reconciledContext.taskPlan.length} steps verified complete`);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
// Every declared artifact is on disk — the plan is genuinely finished,
|
|
464
|
+
// so a fresh run starts fresh rather than skipping work it should do.
|
|
465
|
+
if (options.verbose) {
|
|
466
|
+
logger.info(` ℹ️ Checkpoint '${saved.id}' verifies as complete — starting a fresh plan`);
|
|
467
|
+
}
|
|
468
|
+
vault = new ContextVault(goal, process.cwd());
|
|
469
|
+
}
|
|
470
|
+
}
|
|
413
471
|
}
|
|
414
472
|
// ── Transparency channel ─────────────────────────────────────────────
|
|
415
473
|
// Agents call context.onAgentUpdate() (via Agent.report()) to stream
|
|
@@ -1181,7 +1239,28 @@ export class Orchestrator {
|
|
|
1181
1239
|
// the COMPLETED state (including the final batch). Without this, the last
|
|
1182
1240
|
// saved checkpoint would show the final step still 'pending', and a
|
|
1183
1241
|
// --resume after a successful run would re-execute it.
|
|
1184
|
-
|
|
1242
|
+
//
|
|
1243
|
+
// ALSO saved when the run ends with work UNFINISHED, whether or not the user
|
|
1244
|
+
// opted into checkpoints. A failed step, or a "completed" step whose declared
|
|
1245
|
+
// deliverable is not on disk (see `reconcileTaskPlan`), means the ledger is
|
|
1246
|
+
// the only thing standing between this run and the next one re-deriving the
|
|
1247
|
+
// whole plan — which is exactly what happened 18 times on the live NVDA
|
|
1248
|
+
// add-on ask. Bounded on purpose: a run that finished cleanly and opted out
|
|
1249
|
+
// writes nothing, so the store does not grow on every invocation.
|
|
1250
|
+
let persistLedger = checkpointEnabled;
|
|
1251
|
+
if (!persistLedger) {
|
|
1252
|
+
try {
|
|
1253
|
+
const { demoted } = reconcileTaskPlan(vault.context, process.cwd());
|
|
1254
|
+
persistLedger = vault.hasFailedTasks || demoted.length > 0;
|
|
1255
|
+
if (persistLedger && options.verbose) {
|
|
1256
|
+
logger.info(` 💾 Work is unfinished (${vault.hasFailedTasks ? 'a step failed' : `${demoted.length} step(s) missing their deliverable`}) — saving the ledger for the next run`);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
catch {
|
|
1260
|
+
// Best-effort — the ledger must never break result delivery.
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
if (persistLedger) {
|
|
1185
1264
|
try {
|
|
1186
1265
|
const cid = saveCheckpoint(vault.context, resumeId);
|
|
1187
1266
|
if (cid && options.verbose) {
|
|
@@ -1637,19 +1716,33 @@ export class Orchestrator {
|
|
|
1637
1716
|
// Resolve it to the provider's configured model (or best available) so
|
|
1638
1717
|
// planner/memory/rate-limit-switch calls never crash with "no auto model".
|
|
1639
1718
|
let requestedModel = options.model || inferenceOptions?.model || config.model;
|
|
1640
|
-
//
|
|
1641
|
-
//
|
|
1642
|
-
//
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1719
|
+
// 'auto' is a DIRECTIVE, not a model id: resolve it to the provider's
|
|
1720
|
+
// configured model BEFORE validating, so the validator is never asked to
|
|
1721
|
+
// repair a sentinel and the 'auto is not available on X' warning is not
|
|
1722
|
+
// printed for a value the user never chose as a model.
|
|
1723
|
+
if (isAutoModel(requestedModel)) {
|
|
1724
|
+
requestedModel = config.model || undefined;
|
|
1725
|
+
}
|
|
1726
|
+
// ALWAYS validate the pair — the model against THIS provider instance,
|
|
1727
|
+
// which is the one that will serve the call.
|
|
1728
|
+
//
|
|
1729
|
+
// This used to run only when the model was empty or the literal 'default',
|
|
1730
|
+
// which skipped the validator in exactly the case it was written for: a
|
|
1731
|
+
// real, non-empty model id that does not belong to this provider (issue
|
|
1732
|
+
// #10). A stale or foreign pin then went straight to the API and 404'd —
|
|
1733
|
+
// `Groq API error (404): The model 'gemini-3.1-flash-lite' does not exist`
|
|
1734
|
+
// — with the repair machinery sitting right there, unused.
|
|
1735
|
+
//
|
|
1736
|
+
// resolveRoute also owns the reporting: a substitution is printed and
|
|
1737
|
+
// recorded rather than made silently, and NUVIRA_STRICT_MODEL=1 refuses to
|
|
1738
|
+
// substitute at all (issue #11).
|
|
1739
|
+
const route = await resolveRoute({
|
|
1740
|
+
providerType,
|
|
1741
|
+
provider,
|
|
1742
|
+
model: requestedModel,
|
|
1743
|
+
source: 'orchestrator',
|
|
1744
|
+
});
|
|
1745
|
+
const servedModel = route.model;
|
|
1653
1746
|
const mergedOptions = {
|
|
1654
1747
|
...inferenceOptions,
|
|
1655
1748
|
model: servedModel,
|
|
@@ -2457,26 +2550,61 @@ export class Orchestrator {
|
|
|
2457
2550
|
else if (firstFailed) {
|
|
2458
2551
|
stats.recoveredFailures += 1;
|
|
2459
2552
|
}
|
|
2460
|
-
//
|
|
2461
|
-
//
|
|
2462
|
-
//
|
|
2463
|
-
//
|
|
2464
|
-
//
|
|
2465
|
-
//
|
|
2466
|
-
//
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2553
|
+
// ── The step's OWN writes reach disk BEFORE anything judges them ───────
|
|
2554
|
+
// Ordering, and the reason it is load-bearing: the deliverable check just
|
|
2555
|
+
// below asks whether the declared artifacts EXIST on disk. A writer's
|
|
2556
|
+
// output only reaches disk in `applyFileChanges`, which used to run at the
|
|
2557
|
+
// END of this block — after the check. So the check asked about a file the
|
|
2558
|
+
// pipeline had not written yet, every creating writer step was reported as
|
|
2559
|
+
// "step claimed success but the artifact is not there", and because the
|
|
2560
|
+
// later apply is gated on `result.success` (now false) the write was then
|
|
2561
|
+
// SKIPPED as well: the step failed itself AND lost its work. Both real
|
|
2562
|
+
// long-form E2E tests caught it as "only unit 1 exists on disk".
|
|
2563
|
+
if (result.success && !options.dryRun && (effectiveAgentType === 'writer' || effectiveAgentType === 'debugger')) {
|
|
2564
|
+
const applied = this.applyFileChanges(vault);
|
|
2565
|
+
if (applied > 0 && options.verbose) {
|
|
2566
|
+
logger.info(` 💾 Applied ${applied} file change${applied !== 1 ? 's' : ''} to disk` +
|
|
2567
|
+
(effectiveAgentType === 'debugger' ? ' (debug fix)' : ''));
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
// Deliverable verification: a step that declares files must produce them
|
|
2571
|
+
// ON DISK. Two holes in the v1.62.4 version of this guard let the live
|
|
2572
|
+
// NVDA-addon failure through, and both are closed here.
|
|
2573
|
+
//
|
|
2574
|
+
// 1. It accepted the agent's own REPORT of what it wrote. That run's
|
|
2575
|
+
// `fileChanges` claimed .../kuttaaddon/installTasks.py was `created`
|
|
2576
|
+
// and the file did not exist — but the claim satisfied the check, so
|
|
2577
|
+
// the disk test never ran. A claim is not an artifact: only the
|
|
2578
|
+
// filesystem counts now, and a path that was reported as written while
|
|
2579
|
+
// being absent is named explicitly, because that discrepancy IS the
|
|
2580
|
+
// bug rather than a side note.
|
|
2581
|
+
// 2. It only ran for `writer` steps. The step that fabricated the empty
|
|
2582
|
+
// package was a `runner` (`zip -r kuttaaddon.nvda-addon …`), so the one
|
|
2583
|
+
// step whose whole job was to produce the deliverable was structurally
|
|
2584
|
+
// exempt from the check. Any step may declare expectedFiles, so any
|
|
2585
|
+
// step is verified.
|
|
2586
|
+
//
|
|
2587
|
+
// The test is also no longer existence-only: an empty file is not a
|
|
2588
|
+
// deliverable, and a zip holding zero entries is not a package (see
|
|
2589
|
+
// artifact-verification.ts for how an empty archive is detected). Checked
|
|
2590
|
+
// BEFORE the result is recorded so agentResults, the task status and the
|
|
2591
|
+
// checkpoint all reflect the corrected outcome.
|
|
2592
|
+
if (result.success && task.expectedFiles && task.expectedFiles.length > 0) {
|
|
2593
|
+
const root = vault.context.workingDirectory || process.cwd();
|
|
2594
|
+
const check = verifyArtifacts(task.expectedFiles, root);
|
|
2595
|
+
if (!check.ok) {
|
|
2596
|
+
const reported = new Set(vault.context.fileChanges
|
|
2597
|
+
.filter((c) => c.status === 'created' || c.status === 'modified')
|
|
2598
|
+
.map((c) => normalizeSlash(c.path)));
|
|
2599
|
+
const claimedButAbsent = check.missing.filter((f) => reported.has(normalizeSlash(f)));
|
|
2600
|
+
const msg = [
|
|
2601
|
+
`Deliverable mismatch — step claimed success but the artifact is not there: ${check.reason}`,
|
|
2602
|
+
claimedButAbsent.length
|
|
2603
|
+
? `(reported as written but absent from disk: ${claimedButAbsent.join(', ')})`
|
|
2604
|
+
: '',
|
|
2605
|
+
]
|
|
2606
|
+
.filter(Boolean)
|
|
2607
|
+
.join(' ');
|
|
2480
2608
|
logger.warn(` ⚠️ ${msg}`);
|
|
2481
2609
|
result = {
|
|
2482
2610
|
success: false,
|
|
@@ -2485,6 +2613,42 @@ export class Orchestrator {
|
|
|
2485
2613
|
};
|
|
2486
2614
|
}
|
|
2487
2615
|
}
|
|
2616
|
+
// ── DURABLE HAND-OFF: this step's outcome survives the run ─────────────
|
|
2617
|
+
// A failed step writes down what it must produce and what is already on
|
|
2618
|
+
// disk; a succeeded step CLEARS its own entry. That pairing is the whole
|
|
2619
|
+
// mechanism — the live NVDA-addon run had no such record, so the next
|
|
2620
|
+
// attempt inherited nothing and re-derived the same plan (18 times), and
|
|
2621
|
+
// a step that finally succeeded would have stayed on the outstanding list
|
|
2622
|
+
// forever without the clear.
|
|
2623
|
+
//
|
|
2624
|
+
// Keyed on the step's DECLARED artifacts when it has them, so the same
|
|
2625
|
+
// deliverable asked for in different words maps to one hand-off. Root is
|
|
2626
|
+
// the vault's own working directory — the same root the deliverable check
|
|
2627
|
+
// above used, so the two can never disagree about where "on disk" means.
|
|
2628
|
+
try {
|
|
2629
|
+
const handoffRoot = vault.context.workingDirectory || process.cwd();
|
|
2630
|
+
const declared = (task.expectedFiles ?? []).filter((f) => f && f.trim());
|
|
2631
|
+
const runGoal = vault.context.goal;
|
|
2632
|
+
if (result.success) {
|
|
2633
|
+
if (declared.length > 0)
|
|
2634
|
+
clearStepHandoff(handoffRoot, stepKeyFor({ declared }));
|
|
2635
|
+
}
|
|
2636
|
+
else {
|
|
2637
|
+
const named = declared.length > 0 ? declared : deliverablesNamedIn(`${runGoal} ${task.description}`);
|
|
2638
|
+
recordStepHandoff({
|
|
2639
|
+
projectPath: handoffRoot,
|
|
2640
|
+
goal: runGoal,
|
|
2641
|
+
stepDescription: task.description,
|
|
2642
|
+
declared: named,
|
|
2643
|
+
route: effectiveAgentType,
|
|
2644
|
+
kind: result.error && /refus|denied|outside the workspace/i.test(result.error) ? 'refused' : 'failed',
|
|
2645
|
+
reason: result.error || result.summary,
|
|
2646
|
+
});
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
catch {
|
|
2650
|
+
// Best-effort — the hand-off ledger must never break the pipeline.
|
|
2651
|
+
}
|
|
2488
2652
|
vault.updateTaskStatus(task.id, result.success ? 'completed' : 'failed', result.summary);
|
|
2489
2653
|
await tryUpdateDAGNode(task.id, {
|
|
2490
2654
|
status: result.success ? 'completed' : 'failed',
|
|
@@ -2531,25 +2695,10 @@ export class Orchestrator {
|
|
|
2531
2695
|
vault.setMeta('sandboxPath', testResult.sandboxPath);
|
|
2532
2696
|
}
|
|
2533
2697
|
}
|
|
2534
|
-
//
|
|
2535
|
-
//
|
|
2536
|
-
//
|
|
2537
|
-
// fixes must be on disk before the runner executes.
|
|
2538
|
-
if (effectiveAgentType === 'debugger' && result.success && !options.dryRun) {
|
|
2539
|
-
const applied = this.applyFileChanges(vault);
|
|
2540
|
-
if (applied > 0 && options.verbose) {
|
|
2541
|
-
logger.info(` 💾 Applied ${applied} debug fix(es) to disk`);
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
// After writer step: write files to disk immediately and sync into artifacts
|
|
2545
|
-
// IMPORTANT: files MUST be on disk before the RunnerAgent tries to execute them
|
|
2698
|
+
// ── Writer artifacts sync (writer/debugger writes were applied ABOVE,
|
|
2699
|
+
// before the deliverable check, so a runner following this step still
|
|
2700
|
+
// finds them on disk) ─────────────────────────────────────────────────
|
|
2546
2701
|
if (effectiveAgentType === 'writer' && result.success) {
|
|
2547
|
-
if (!options.dryRun) {
|
|
2548
|
-
const applied = this.applyFileChanges(vault);
|
|
2549
|
-
if (applied > 0 && options.verbose) {
|
|
2550
|
-
logger.info(` 💾 Applied ${applied} file change${applied !== 1 ? 's' : ''} to disk`);
|
|
2551
|
-
}
|
|
2552
|
-
}
|
|
2553
2702
|
const newArtifacts = vault.context.fileChanges
|
|
2554
2703
|
.filter((c) => c.status === 'created' || c.status === 'modified')
|
|
2555
2704
|
.filter((c) => c.newContent)
|
|
@@ -2604,7 +2753,7 @@ export class Orchestrator {
|
|
|
2604
2753
|
if (ok) {
|
|
2605
2754
|
const assembled = assembleDocument(job);
|
|
2606
2755
|
if (assembled) {
|
|
2607
|
-
logger.success(` 📖 Document assembled: ${assembled.path} — ${assembled.words
|
|
2756
|
+
logger.success(` 📖 Document assembled: ${assembled.path} — ${formatCount(assembled.words)} words (~${assembled.pages} pages, ${assembled.files} units)`);
|
|
2608
2757
|
}
|
|
2609
2758
|
}
|
|
2610
2759
|
}
|
|
@@ -3108,7 +3257,18 @@ export class Orchestrator {
|
|
|
3108
3257
|
try {
|
|
3109
3258
|
const { config } = this.configManager.getProviderConfig(decision.provider);
|
|
3110
3259
|
const adapter = ProviderFactory.createProvider(decision.provider, config);
|
|
3111
|
-
|
|
3260
|
+
// resolveRoute, not resolveWorkingModel: identical repair policy, but
|
|
3261
|
+
// the pair is validated against the adapter that will serve the call
|
|
3262
|
+
// and a substitution is printed + recorded instead of silent.
|
|
3263
|
+
const route = await resolveRoute({
|
|
3264
|
+
providerType: decision.provider,
|
|
3265
|
+
provider: adapter,
|
|
3266
|
+
model: decision.model,
|
|
3267
|
+
source: 'orchestrator',
|
|
3268
|
+
agentType: task.agentType,
|
|
3269
|
+
task: task.description,
|
|
3270
|
+
});
|
|
3271
|
+
workingModel = route.model;
|
|
3112
3272
|
}
|
|
3113
3273
|
catch {
|
|
3114
3274
|
workingModel = decision.model;
|
|
@@ -3475,7 +3635,7 @@ export class Orchestrator {
|
|
|
3475
3635
|
if (plan.steps.length === 0) {
|
|
3476
3636
|
const assembled = assembleDocument(plan.job);
|
|
3477
3637
|
if (assembled) {
|
|
3478
|
-
logger.success(` 📖 Nothing left to write — assembled ${assembled.path} (${assembled.words
|
|
3638
|
+
logger.success(` 📖 Nothing left to write — assembled ${assembled.path} (${formatCount(assembled.words)} words, ~${assembled.pages} pages)`);
|
|
3479
3639
|
}
|
|
3480
3640
|
return null;
|
|
3481
3641
|
}
|
|
@@ -3570,10 +3730,10 @@ export class Orchestrator {
|
|
|
3570
3730
|
if (progress.complete) {
|
|
3571
3731
|
const presence = artifactsPresence(job.projectPath, pending?.expectedArtifacts);
|
|
3572
3732
|
if (presence.total > 0 && presence.present < presence.total) {
|
|
3573
|
-
return (`✅ All ${progress.total} content units written — ${progress.words
|
|
3733
|
+
return (`✅ All ${progress.total} content units written — ${formatCount(progress.words)} words. ` +
|
|
3574
3734
|
`Still to produce: ${presence.missing.join(', ')}. Continuing automatically.`);
|
|
3575
3735
|
}
|
|
3576
|
-
return `✅ All ${progress.total} units written — ${progress.words
|
|
3736
|
+
return `✅ All ${progress.total} units written — ${formatCount(progress.words)} words (~${progress.pagesTarget} pages).`;
|
|
3577
3737
|
}
|
|
3578
3738
|
return (`${formatProgress(job)} — continuing automatically; ` +
|
|
3579
3739
|
`${progress.total - progress.done} unit(s) left, no reply needed.`);
|