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
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WS0 (#22) — what "the same experience on every surface" means, in code.
|
|
3
|
+
*
|
|
4
|
+
* A parity test is only worth having if its comparison can FAIL for the right
|
|
5
|
+
* reason and PASS for the right reason. Two traps:
|
|
6
|
+
*
|
|
7
|
+
* 1. Comparing everything. Turn ids, timestamps, durations, the working
|
|
8
|
+
* directory and token counts differ on every invocation by construction, so
|
|
9
|
+
* a byte comparison would fail for surfaces that behave identically and
|
|
10
|
+
* teach everyone to ignore it.
|
|
11
|
+
* 2. Comparing nothing that matters. If the projection drops the tool calls
|
|
12
|
+
* and the error taxonomy, every surface "passes" while one of them silently
|
|
13
|
+
* answers without touching a file.
|
|
14
|
+
*
|
|
15
|
+
* So the projection here is deliberate: WHAT THE TURN DID (status, the ordered
|
|
16
|
+
* tool calls, the terminal answer, the typed refusal/error code) and WHICH
|
|
17
|
+
* BACKEND DID IT (provider, model, transport) are compared; identity and timing
|
|
18
|
+
* are not. `compare` names each difference and which surface it came from,
|
|
19
|
+
* because a parity failure that does not say "gateway" is not actionable.
|
|
20
|
+
*
|
|
21
|
+
* A THIRD TRAP, found by measurement rather than reasoning: comparing turns that
|
|
22
|
+
* never reached a model. The response cache is shared and on-disk
|
|
23
|
+
* (`src/context/cache.ts`, enabled for `answerOnce` at `src/cli/chat.ts:690`),
|
|
24
|
+
* so an identical message on the second surface of a run is served from the
|
|
25
|
+
* first one's cache entry — same answer, no model call, no tool lifecycle. Two
|
|
26
|
+
* such replays agree perfectly and mean nothing. `modelCalls` records whether
|
|
27
|
+
* the turn was real, and both `compare` and the runner refuse to read a zero as
|
|
28
|
+
* agreement.
|
|
29
|
+
*/
|
|
30
|
+
import type { EngineMode } from '../learning/engine-router.js';
|
|
31
|
+
import type { WireFinding } from '../findings/verdicts.js';
|
|
32
|
+
import type { SurfaceId } from './surfaces.js';
|
|
33
|
+
/** How a turn ended, in the taxonomy every surface already reports. */
|
|
34
|
+
export type TurnStatus = 'completed' | 'failed' | 'refused';
|
|
35
|
+
/**
|
|
36
|
+
* The turn's status, read the same way for every surface. WS6 (#28).
|
|
37
|
+
*
|
|
38
|
+
* `generationFailed` OUTRANKS `ok` whenever both are present, and a declared
|
|
39
|
+
* provider fault is why this exists. The dashboard console and the command report
|
|
40
|
+
* `ok` for "the request was served" while carrying `generationFailed: true` for
|
|
41
|
+
* "the model produced no answer" — two different facts, and the first version of
|
|
42
|
+
* this projection read `ok` first, so a backend that failed every call was called
|
|
43
|
+
* a COMPLETION on two of the five surfaces while the CLI and the gateway called it
|
|
44
|
+
* a failure.
|
|
45
|
+
*
|
|
46
|
+
* That divergence was invisible until a fault row existed, because no earlier
|
|
47
|
+
* scenario ever produced a failed generation: every other row either succeeds or
|
|
48
|
+
* fails at the TOOL level, and a failed tool still leaves a completed turn. What
|
|
49
|
+
* the surfaces must agree on is the TURN's outcome, so that is what is read — and
|
|
50
|
+
* a surface that reports neither flag is read as completed, which is the honest
|
|
51
|
+
* default for a surface that produced an answer.
|
|
52
|
+
*/
|
|
53
|
+
export declare function turnStatus(answer: {
|
|
54
|
+
ok?: boolean;
|
|
55
|
+
generationFailed?: boolean;
|
|
56
|
+
}): TurnStatus;
|
|
57
|
+
/** Volatile per-invocation values. Recorded for the failure report, never compared. */
|
|
58
|
+
/**
|
|
59
|
+
* One tool call, as an observer sees it.
|
|
60
|
+
*
|
|
61
|
+
* Deliberately not a bare tool name. A call that SUCCEEDED on one surface and
|
|
62
|
+
* FAILED on another is not agreement, and comparing names alone would report it
|
|
63
|
+
* as a pass — which is the same class of mistake as the tool descriptions this
|
|
64
|
+
* repo has spent a workstream fixing (a call reported as done when it was not).
|
|
65
|
+
* `ok` is optional because a surface may report the call without an outcome yet
|
|
66
|
+
* (the `started` phase); an absent `ok` never equals `false`.
|
|
67
|
+
*/
|
|
68
|
+
export interface ToolCallObs {
|
|
69
|
+
tool: string;
|
|
70
|
+
ok?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface ObservationNoise {
|
|
73
|
+
turnId?: string;
|
|
74
|
+
sessionId?: string;
|
|
75
|
+
at?: number;
|
|
76
|
+
durationMs?: number;
|
|
77
|
+
cwd?: string;
|
|
78
|
+
tokens?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* WS2 — the session debug log a surface produced for the turn, reduced to what
|
|
82
|
+
* the attachable header carries.
|
|
83
|
+
*
|
|
84
|
+
* `written` is separate from the backend on purpose: "this surface wrote no log"
|
|
85
|
+
* and "this surface wrote a log that names no backend" are different failures,
|
|
86
|
+
* and collapsing them would let a surface that produces NOTHING read as one that
|
|
87
|
+
* produces an honest `unknown`. The backend triple is what a bug report cannot
|
|
88
|
+
* be reconstructed without, so it is what is compared — the file's path, size
|
|
89
|
+
* and timestamps differ per run by construction (the same reason `turnId` and
|
|
90
|
+
* `at` are noise).
|
|
91
|
+
*/
|
|
92
|
+
export interface DebugLogObs {
|
|
93
|
+
/** True when the surface actually wrote a log file for this turn. */
|
|
94
|
+
written: boolean;
|
|
95
|
+
/** The provider named in the log's header (null = not named). */
|
|
96
|
+
provider: string | null;
|
|
97
|
+
/** The model named in the log's header. */
|
|
98
|
+
model: string | null;
|
|
99
|
+
/** The transport named in the log's header (`native`/`json`/`none`). */
|
|
100
|
+
transport: string | null;
|
|
101
|
+
}
|
|
102
|
+
/** The honest "this surface produced no log" value. Fresh each call. */
|
|
103
|
+
export declare function noDebugLog(): DebugLogObs;
|
|
104
|
+
/**
|
|
105
|
+
* WS3 — the span tree a surface exported, as its OTLP collector received it.
|
|
106
|
+
*
|
|
107
|
+
* WHY A COLLECTOR AND NOT A MOCK. The claim is "this surface ships its turn over
|
|
108
|
+
* OTLP", and only the wire can settle that: a mocked exporter proves the calls
|
|
109
|
+
* were made, not that a collector could read them. The driver boots a real
|
|
110
|
+
* loopback HTTP collector and reads the request bodies it received, so
|
|
111
|
+
* "exported" means spans that left the process and were parsed.
|
|
112
|
+
*
|
|
113
|
+
* WHY THE SPANS ARE SORTED. A collector receives spans in COMPLETION order
|
|
114
|
+
* (measured: a probe turn arrived model-less, tool, then turn), so comparing the
|
|
115
|
+
* arrival order would fail on a surface that merely closed its spans in a
|
|
116
|
+
* different sequence. The comparison is over the tree's SHAPE — the set of names
|
|
117
|
+
* and the parent→child edges — which is the part every surface must agree on.
|
|
118
|
+
*
|
|
119
|
+
* `traceId` and `remoteParent` are RECORDED, NOT COMPARED, and that is a stated
|
|
120
|
+
* decision rather than an oversight: they differ per run by construction, and a
|
|
121
|
+
* forked child legitimately continues a trace its parent began — where an
|
|
122
|
+
* in-process surface has no remote parent at all. Comparing them would report
|
|
123
|
+
* the child's correct behaviour as a divergence and force every other surface to
|
|
124
|
+
* invent a parent to match. They are kept for the failure report and for the
|
|
125
|
+
* scenario's own assertions (the child DOES join one trace), which is where a
|
|
126
|
+
* fact that is true of only one surface belongs.
|
|
127
|
+
*/
|
|
128
|
+
export interface OtelExportObs {
|
|
129
|
+
/** True when the collector received at least one span from this surface. */
|
|
130
|
+
exported: boolean;
|
|
131
|
+
/** Sorted span names received. The tree's vocabulary. */
|
|
132
|
+
spans: readonly string[];
|
|
133
|
+
/** Sorted `parent → child` name pairs. The tree's shape. */
|
|
134
|
+
edges: readonly string[];
|
|
135
|
+
/** How many `nuvira.turn` spans arrived (exactly one per turn, or the tree is wrong). */
|
|
136
|
+
turnSpans: number;
|
|
137
|
+
/** Sorted tool span names (`nuvira.tool.<name>`) — the calls that actually ran. */
|
|
138
|
+
toolSpans: readonly string[];
|
|
139
|
+
/** Every span received shares ONE trace id (the tree is one trace, not several). */
|
|
140
|
+
singleTrace: boolean;
|
|
141
|
+
/** The `service.name` the resource attributes carried (the SDK's own rendering). */
|
|
142
|
+
serviceName: string | null;
|
|
143
|
+
/** The trace id every span shares, or null. RECORDED, never compared. */
|
|
144
|
+
traceId: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* The turn span's parent id when that parent is NOT in this collector — a
|
|
147
|
+
* genuine remote parent, i.e. this process continued another one's trace.
|
|
148
|
+
* RECORDED, never compared (see the interface note).
|
|
149
|
+
*/
|
|
150
|
+
remoteParent: string | null;
|
|
151
|
+
}
|
|
152
|
+
/** The honest "this surface exported nothing" value. Fresh each call. */
|
|
153
|
+
export declare function noOtelExport(): OtelExportObs;
|
|
154
|
+
/**
|
|
155
|
+
* WS4 (#26) — the operator's tool hooks, as they were seen from OUTSIDE the
|
|
156
|
+
* surface: the hook the harness declared is a real command, and it recorded every
|
|
157
|
+
* payload it was handed.
|
|
158
|
+
*
|
|
159
|
+
* WHY THE HOOK DOES THE RECORDING. The claim is "every surface runs the
|
|
160
|
+
* operator's declared hook for a tool call, with the same payload, and honours a
|
|
161
|
+
* veto", and the only witness to that which is not the surface grading itself is
|
|
162
|
+
* the operator's own command. So the harness writes one hook script (see
|
|
163
|
+
* `src/parity/drivers.ts`), points it at a log file, and reads back the
|
|
164
|
+
* invocations it actually received — the same "read the artifact" rule the debug
|
|
165
|
+
* log and the OTLP collector follow.
|
|
166
|
+
*
|
|
167
|
+
* `vetoReported` and `vetoLeaked` ARE DERIVED FROM TWO INDEPENDENT WITNESSES, and
|
|
168
|
+
* that is why they are worth comparing: the hook says which tool it denied, and
|
|
169
|
+
* the SURFACE's own tool lifecycle says what happened to that call. A veto that
|
|
170
|
+
* reached the hook but not the loop reads as `vetoReported: false`; a verdict that
|
|
171
|
+
* was returned but ignored, so the tool ran anyway, reads as `vetoLeaked: true`.
|
|
172
|
+
* Either one alone would be a story told by one side.
|
|
173
|
+
*
|
|
174
|
+
* `surfacesSeen` is RECORDED, NEVER COMPARED, for the same reason `traceId` is:
|
|
175
|
+
* the label is the surface's own identity, so by construction it differs between
|
|
176
|
+
* the two observations being compared — and it is kept because "the hook was told
|
|
177
|
+
* WHICH surface called" is exactly the fact a per-turn policy needs, so the
|
|
178
|
+
* scenario asserts it per surface rather than comparing it across them.
|
|
179
|
+
*/
|
|
180
|
+
export interface ToolHooksObs {
|
|
181
|
+
/** Every hook invocation as `phase:tool`, sorted and deduplicated. */
|
|
182
|
+
invocations: readonly string[];
|
|
183
|
+
/** Tools a `before` hook VETOED, sorted. Empty when nothing was denied. */
|
|
184
|
+
denied: readonly string[];
|
|
185
|
+
/** Every denied call is reported by the surface as a FAILED call. */
|
|
186
|
+
vetoReported: boolean;
|
|
187
|
+
/** A denied tool ran anyway (its call reported success). Always false; a leak. */
|
|
188
|
+
vetoLeaked: boolean;
|
|
189
|
+
/** The surface labels the hook itself saw, sorted. RECORDED, never compared. */
|
|
190
|
+
surfacesSeen: readonly string[];
|
|
191
|
+
}
|
|
192
|
+
/** The honest "this surface ran no hook" value. Fresh each call. */
|
|
193
|
+
export declare function noToolHooks(): ToolHooksObs;
|
|
194
|
+
/**
|
|
195
|
+
* WS5 (#27) — the isolation a turn had, and what it changed.
|
|
196
|
+
*
|
|
197
|
+
* `asked` is the HARNESS's own declaration (the scenario asked for isolation) and
|
|
198
|
+
* the rest is the SURFACE's report, and keeping both is what makes the comparison
|
|
199
|
+
* mean something: a surface that ignored the request reports `isolated: false`
|
|
200
|
+
* against an `asked: true`, which is a divergence — whereas a field derived from
|
|
201
|
+
* the request alone could never disagree with itself. Five surfaces agreeing that
|
|
202
|
+
* no isolation happened when nobody asked would be agreement about nothing, which
|
|
203
|
+
* is why the scenario that declares `asked` is the only one that proves the row.
|
|
204
|
+
*
|
|
205
|
+
* `base` is RECORDED, NEVER COMPARED, for the same reason `traceId` is: it is a
|
|
206
|
+
* commit sha, so it differs per run by construction. It is kept because "the diff
|
|
207
|
+
* is against a real commit" is the fact the row is about, and a failure report
|
|
208
|
+
* that shows two different shas proves both runs were real.
|
|
209
|
+
*/
|
|
210
|
+
export interface IsolationObs {
|
|
211
|
+
/** True when the turn was asked to run isolated (the scenario declared it). */
|
|
212
|
+
asked: boolean;
|
|
213
|
+
/** True when the surface reported a turn that actually ran in a worktree. */
|
|
214
|
+
isolated: boolean;
|
|
215
|
+
/** Sorted paths the isolated turn changed, against its base commit. */
|
|
216
|
+
files: readonly string[];
|
|
217
|
+
/** True when the surface reported removing the worktree afterwards. */
|
|
218
|
+
removed: boolean;
|
|
219
|
+
/** The base commit the diff is against (`''` when there was none). RECORDED. */
|
|
220
|
+
base: string;
|
|
221
|
+
}
|
|
222
|
+
/** The honest "this turn was not isolated" value. Fresh each call. */
|
|
223
|
+
export declare function noIsolation(): IsolationObs;
|
|
224
|
+
/**
|
|
225
|
+
* WS5 (#27) — what a RESUMED turn replayed instead of paying for.
|
|
226
|
+
*
|
|
227
|
+
* Read from a SECOND turn against a record the FIRST one wrote, because "reuses
|
|
228
|
+
* unchanged steps instead of re-paying for every model call" is a claim about a
|
|
229
|
+
* pair of runs and cannot be observed in one. `modelCalls` here is the resumed
|
|
230
|
+
* turn's own count — the turn that is compared for everything else is the first
|
|
231
|
+
* one (a fully replayed turn reaches no model at all, and the runner refuses to
|
|
232
|
+
* compare a turn that never did).
|
|
233
|
+
*
|
|
234
|
+
* `asked`/`resuming` are separated so a failure says WHICH half broke: a surface
|
|
235
|
+
* that never opened a record reads as `resuming: false` while `asked: true`, and a
|
|
236
|
+
* surface that opened one but replayed nothing reads as `replayed: 0` with a
|
|
237
|
+
* `modelCalls` equal to the whole turn.
|
|
238
|
+
*/
|
|
239
|
+
export interface ResumeObs {
|
|
240
|
+
/** True when the harness asked this surface to resume (the scenario declared it). */
|
|
241
|
+
asked: boolean;
|
|
242
|
+
/** True when the surface reported a resume at all (it read a record). */
|
|
243
|
+
resuming: boolean;
|
|
244
|
+
/** Steps the resumed turn replayed from the record. */
|
|
245
|
+
replayed: number;
|
|
246
|
+
/** Model calls the RESUMED turn still made (0 = every step came from the record). */
|
|
247
|
+
modelCalls: number;
|
|
248
|
+
/** True when the resumed turn could write the record back for the next run. */
|
|
249
|
+
saved: boolean;
|
|
250
|
+
}
|
|
251
|
+
/** The honest "this turn was not resumed" value. Fresh each call. */
|
|
252
|
+
export declare function noResume(): ResumeObs;
|
|
253
|
+
/**
|
|
254
|
+
* WS6 (#28) — a DECLARED fault, and whether its effect is visible in this
|
|
255
|
+
* surface's own turn.
|
|
256
|
+
*
|
|
257
|
+
* WHY `took` IS DERIVED FROM THE OBSERVATION rather than read from a counter. The
|
|
258
|
+
* fault is declared for the whole run, and the claim is not "the harness fired a
|
|
259
|
+
* fault" (that is the harness grading itself) but "this surface's turn shows the
|
|
260
|
+
* consequence". For a provider fault that means the turn did NOT complete; for a
|
|
261
|
+
* tool fault it means the named call is reported FAILED. A surface that swallowed
|
|
262
|
+
* the fault reads `took: false` against every other surface's `true`, which is a
|
|
263
|
+
* divergence — and one that could not be seen any other way, because a swallowed
|
|
264
|
+
* fault leaves no other trace.
|
|
265
|
+
*
|
|
266
|
+
* The counter the injector keeps is real (`FaultInjector.fired`) and used in the
|
|
267
|
+
* seam's own tests, but it cannot cross the fork: the child is a separate process,
|
|
268
|
+
* so the parent has no injector to read. Deriving the effect per surface is what
|
|
269
|
+
* lets ONE field be compared on all five, the forked child included.
|
|
270
|
+
*/
|
|
271
|
+
export interface FaultObs {
|
|
272
|
+
/** True when the scenario declared a fault for this turn. */
|
|
273
|
+
asked: boolean;
|
|
274
|
+
/** The declared site (`provider`/`tool`/`ipc`), or null. */
|
|
275
|
+
site: string | null;
|
|
276
|
+
/** The declared kind (`error`/`malformed`/`unavailable`), or null. */
|
|
277
|
+
kind: string | null;
|
|
278
|
+
/** True when this surface's own turn shows the declared fault's effect. */
|
|
279
|
+
took: boolean;
|
|
280
|
+
}
|
|
281
|
+
/** The honest "no fault was declared" value. Fresh each call. */
|
|
282
|
+
export declare function noFault(): FaultObs;
|
|
283
|
+
/**
|
|
284
|
+
* One surface's view of one turn. Fields the surface does not report stay
|
|
285
|
+
* `undefined` — and `compare` treats "absent on one surface, present on another"
|
|
286
|
+
* as a difference, because a surface that cannot say which model served a turn
|
|
287
|
+
* is exactly the gap WS1-WS5 are closing.
|
|
288
|
+
*/
|
|
289
|
+
export interface TurnObservation {
|
|
290
|
+
surface: SurfaceId;
|
|
291
|
+
engine: EngineMode;
|
|
292
|
+
status: TurnStatus;
|
|
293
|
+
/**
|
|
294
|
+
* How many times this turn reached the model.
|
|
295
|
+
*
|
|
296
|
+
* EXACTLY ZERO IS NOT "no model needed" — it means the turn was served
|
|
297
|
+
* without one: a response-cache replay, or a surface that answered from a
|
|
298
|
+
* shortcut. Such a turn carries no routing, no tool loop and no work, so it
|
|
299
|
+
* cannot be evidence of parity in either direction. Recorded as a required
|
|
300
|
+
* field so a driver cannot forget to say, and refused by the runner rather
|
|
301
|
+
* than compared.
|
|
302
|
+
*/
|
|
303
|
+
modelCalls: number;
|
|
304
|
+
/** Provider that served the turn (the child reports this on failure too). */
|
|
305
|
+
provider?: string;
|
|
306
|
+
model?: string;
|
|
307
|
+
transport?: 'native' | 'json' | 'none';
|
|
308
|
+
/** Tool calls in call order, with the outcome each surface reported. Order is part of the behaviour. */
|
|
309
|
+
toolCalls: readonly ToolCallObs[];
|
|
310
|
+
/**
|
|
311
|
+
* WS2 — the session debug log this surface wrote for the turn.
|
|
312
|
+
*
|
|
313
|
+
* REQUIRED, for the reason `modelCalls` and `findings` are: the capability is
|
|
314
|
+
* "every surface produces an attachable log whose header names the backend",
|
|
315
|
+
* and an optional field would let a surface that produces nothing go on
|
|
316
|
+
* reading as at-par. `noDebugLog()` is the honest answer when logging is off
|
|
317
|
+
* or the surface wrote nothing — the harness turns logging ON for the run, so
|
|
318
|
+
* a `written: false` there is a failure, not a neutral value.
|
|
319
|
+
*/
|
|
320
|
+
debugLog: DebugLogObs;
|
|
321
|
+
/**
|
|
322
|
+
* WS3 — the span tree this surface exported over OTLP, as a real collector
|
|
323
|
+
* received it.
|
|
324
|
+
*
|
|
325
|
+
* REQUIRED, for the same reason `debugLog` and `modelCalls` are: the row is
|
|
326
|
+
* "every surface ships the turn's spans", and an optional field would let a
|
|
327
|
+
* surface that exports nothing go on reading as at-par. The harness turns
|
|
328
|
+
* export ON for the run and hands every surface a collector, so `exported:
|
|
329
|
+
* false` there is a failure rather than a neutral value.
|
|
330
|
+
*/
|
|
331
|
+
otel: OtelExportObs;
|
|
332
|
+
/**
|
|
333
|
+
* WS4 — the operator's tool hooks this surface ran for the turn.
|
|
334
|
+
*
|
|
335
|
+
* REQUIRED, for the reason `debugLog` and `otel` are: the row is "every surface
|
|
336
|
+
* runs the operator's declared hooks, and honours a veto", and an optional field
|
|
337
|
+
* would let a surface that fires nothing go on reading as at-par. The harness
|
|
338
|
+
* declares the hooks for the scenario and always hands the driver a log to
|
|
339
|
+
* read, so `invocations: []` on a scenario that declared hooks is a failure
|
|
340
|
+
* rather than a neutral value.
|
|
341
|
+
*/
|
|
342
|
+
hooks: ToolHooksObs;
|
|
343
|
+
/**
|
|
344
|
+
* WS5 (#27) — the isolation this turn had, and what it changed.
|
|
345
|
+
*
|
|
346
|
+
* REQUIRED, for the reason `otel` and `hooks` are: the row is "an investigation
|
|
347
|
+
* can be isolated and returns a diff against the base", and an optional field
|
|
348
|
+
* would let a surface that runs in the real tree go on reading as at-par. The
|
|
349
|
+
* harness asks for isolation on the scenario that declares it, so `isolated:
|
|
350
|
+
* false` there is a failure rather than a neutral value.
|
|
351
|
+
*/
|
|
352
|
+
isolation: IsolationObs;
|
|
353
|
+
/**
|
|
354
|
+
* WS5 (#27) — what this surface's resumed turn replayed instead of paying for.
|
|
355
|
+
*
|
|
356
|
+
* REQUIRED, for the same reason: the row is "a resumed run reuses unchanged
|
|
357
|
+
* steps", and a surface that quietly paid for every model call must not read as
|
|
358
|
+
* at-par. The driver wrapper runs the second turn and replaces this field with
|
|
359
|
+
* what the RESUMED turn did (`src/parity/drivers.ts`), so an ordinary scenario
|
|
360
|
+
* carries the honest "not asked" value rather than a missing one.
|
|
361
|
+
*/
|
|
362
|
+
resume: ResumeObs;
|
|
363
|
+
/**
|
|
364
|
+
* WS6 (#28) — the fault this turn had declared for it, and whether the turn
|
|
365
|
+
* shows its effect.
|
|
366
|
+
*
|
|
367
|
+
* REQUIRED, for the reason `otel` and `hooks` are: the row is "an injected
|
|
368
|
+
* failure is reported honestly on every surface", and an optional field would
|
|
369
|
+
* let a surface that never saw the fault go on reading as at-par. A scenario
|
|
370
|
+
* that declares nothing carries the honest "not asked" value.
|
|
371
|
+
*/
|
|
372
|
+
fault: FaultObs;
|
|
373
|
+
/**
|
|
374
|
+
* WS1 — the findings the turn recorded, in call order, in the shared wire
|
|
375
|
+
* form (`findings/verdicts.ts`).
|
|
376
|
+
*
|
|
377
|
+
* REQUIRED, for the reason `modelCalls` is: a surface that cannot report its
|
|
378
|
+
* verdicts is precisely the gap this row closes, and an optional field would
|
|
379
|
+
* let it go on being silent while still reading as at-par. `[]` is the honest
|
|
380
|
+
* answer for a turn that recorded none — not the same statement as "this
|
|
381
|
+
* surface does not say". Compared in ORDER and by VALUE, because the verdict
|
|
382
|
+
* (CONFIRMED vs PLAUSIBLE) and the evidence behind it are the whole point: two
|
|
383
|
+
* surfaces agreeing that a finding exists while disagreeing about whether it
|
|
384
|
+
* was checked have not agreed on anything.
|
|
385
|
+
*/
|
|
386
|
+
findings: readonly WireFinding[];
|
|
387
|
+
/** Terminal answer text. Compared exactly: parity runs use one stub provider. */
|
|
388
|
+
answer?: string;
|
|
389
|
+
/** Typed refusal code (no provider, unreachable backend, tools on a non-tool provider). */
|
|
390
|
+
refusalCode?: string;
|
|
391
|
+
/** Typed error code for a failure that is not a refusal. */
|
|
392
|
+
errorCode?: string;
|
|
393
|
+
noise?: ObservationNoise;
|
|
394
|
+
}
|
|
395
|
+
/** The compared projection: no identity, no timing. */
|
|
396
|
+
export interface ComparableObservation {
|
|
397
|
+
engine: EngineMode;
|
|
398
|
+
status: TurnStatus;
|
|
399
|
+
modelCalls: number;
|
|
400
|
+
provider: string | null;
|
|
401
|
+
model: string | null;
|
|
402
|
+
transport: string | null;
|
|
403
|
+
toolCalls: readonly ToolCallObs[];
|
|
404
|
+
findings: readonly WireFinding[];
|
|
405
|
+
debugLog: DebugLogObs;
|
|
406
|
+
otel: OtelExportObs;
|
|
407
|
+
hooks: ToolHooksObs;
|
|
408
|
+
isolation: IsolationObs;
|
|
409
|
+
resume: ResumeObs;
|
|
410
|
+
fault: FaultObs;
|
|
411
|
+
answer: string | null;
|
|
412
|
+
refusalCode: string | null;
|
|
413
|
+
errorCode: string | null;
|
|
414
|
+
}
|
|
415
|
+
/** Strip everything that legitimately differs between two runs of the same turn. */
|
|
416
|
+
export declare function comparableOf(observation: TurnObservation): ComparableObservation;
|
|
417
|
+
/** Stable serialisation, so a failure report can show both sides and their digest. */
|
|
418
|
+
export declare function serialize(value: ComparableObservation): string;
|
|
419
|
+
/**
|
|
420
|
+
* Every difference between two observations, each named with the field and both
|
|
421
|
+
* surfaces. Empty array means parity for this pair.
|
|
422
|
+
*
|
|
423
|
+
* Deliberately granular on `toolCalls`: "both called 3 tools" is not the
|
|
424
|
+
* question; "which call came first and did the other one make it at all" is.
|
|
425
|
+
*/
|
|
426
|
+
export declare function compare(a: TurnObservation, b: TurnObservation): string[];
|
|
427
|
+
/** True when the two observations are interchangeable as far as a user can tell. */
|
|
428
|
+
export declare function isAtPar(a: TurnObservation, b: TurnObservation): boolean;
|
|
429
|
+
/**
|
|
430
|
+
* True when the turn actually reached a model.
|
|
431
|
+
*
|
|
432
|
+
* Separate from `status === 'completed'` on purpose: a cache replay completes.
|
|
433
|
+
* A caller that wants a parity verdict must require this on every surface (the
|
|
434
|
+
* runner does), and a caller that wants to prove a surface *did* the work must
|
|
435
|
+
* assert it rather than infer it from an answer it likes the look of.
|
|
436
|
+
*/
|
|
437
|
+
export declare function reachedModel(observation: TurnObservation): boolean;
|
|
438
|
+
/**
|
|
439
|
+
* A one-block report for a failing parity case: both projections plus the named
|
|
440
|
+
* differences. Kept here rather than in the test so the wording is consistent
|
|
441
|
+
* across every workstream that adds a case.
|
|
442
|
+
*/
|
|
443
|
+
export declare function reportParityFailure(observations: readonly TurnObservation[], differences: readonly string[]): string;
|
|
444
|
+
//# sourceMappingURL=observation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../../src/parity/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,uEAAuE;AACvE,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,EAAE,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,UAAU,CAG3F;AAED,uFAAuF;AACvF;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAW;IAC1B,qEAAqE;IACrE,O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