zob-harness 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/adapters/registry.json +103 -0
- package/.pi/agents/architecture-cartographer.md +53 -0
- package/.pi/agents/chief-vision.md +39 -0
- package/.pi/agents/clarifier.md +58 -0
- package/.pi/agents/context-steward.md +52 -0
- package/.pi/agents/doc-steward.md +34 -0
- package/.pi/agents/explore.md +49 -0
- package/.pi/agents/factory.md +41 -0
- package/.pi/agents/implementer.md +44 -0
- package/.pi/agents/librarian.md +32 -0
- package/.pi/agents/oracle-merge.md +50 -0
- package/.pi/agents/oracle.md +55 -0
- package/.pi/agents/pattern-miner.md +53 -0
- package/.pi/agents/planner.md +39 -0
- package/.pi/agents/project-dna-golden-evaluator.md +32 -0
- package/.pi/agents/project-dna-ontology-steward.md +30 -0
- package/.pi/agents/project-dna-oracle.md +56 -0
- package/.pi/agents/project-dna-orchestrator.md +60 -0
- package/.pi/agents/project-dna-query-steward.md +38 -0
- package/.pi/agents/project-dna-safety-preflight.md +54 -0
- package/.pi/agents/project-dna-test-linker.md +27 -0
- package/.pi/agents/qa.md +38 -0
- package/.pi/agents/refactor-cartographer.md +28 -0
- package/.pi/agents/refactor-mover.md +31 -0
- package/.pi/agents/refactor-oracle.md +49 -0
- package/.pi/agents/repo-scout.md +60 -0
- package/.pi/agents/sample-architect.md +48 -0
- package/.pi/agents/specifier.md +57 -0
- package/.pi/agents/symbol-range-curator.md +41 -0
- package/.pi/agents/synthesis.md +52 -0
- package/.pi/agents/temp-agent-creator.md +35 -0
- package/.pi/autonomy-policy.json +67 -0
- package/.pi/budget-policy.json +54 -0
- package/.pi/capabilities/zob-public-runtime-capabilities.json +1700 -0
- package/.pi/chains/explore-plan-oracle.json +78 -0
- package/.pi/chains/explore-spec-clarify-plan-oracle.json +64 -0
- package/.pi/chains/explore-spec-plan-oracle.json +53 -0
- package/.pi/chains/spec-clarify-plan-oracle.json +53 -0
- package/.pi/chains/spec-factory-oracle.json +42 -0
- package/.pi/chains/spec-plan-oracle.json +42 -0
- package/.pi/compute-profiles/defaults.json +19 -0
- package/.pi/compute-profiles/overrides.json +13 -0
- package/.pi/compute-profiles/risk-rules.json +16 -0
- package/.pi/daemon-policy.json +80 -0
- package/.pi/damage-control-rules.json +45 -0
- package/.pi/extensions/zob-child-safety/index.ts +212 -0
- package/.pi/extensions/zob-harness/AGENTS.md +28 -0
- package/.pi/extensions/zob-harness/index.ts +391 -0
- package/.pi/extensions/zob-harness/src/AGENTS.md +25 -0
- package/.pi/extensions/zob-harness/src/agents.ts +82 -0
- package/.pi/extensions/zob-harness/src/autonomous-runtime.ts +2912 -0
- package/.pi/extensions/zob-harness/src/autonomy-readiness.ts +778 -0
- package/.pi/extensions/zob-harness/src/budget-policy.ts +308 -0
- package/.pi/extensions/zob-harness/src/capabilities.ts +249 -0
- package/.pi/extensions/zob-harness/src/child-runner.ts +249 -0
- package/.pi/extensions/zob-harness/src/chronicle.ts +262 -0
- package/.pi/extensions/zob-harness/src/compute-profile.ts +602 -0
- package/.pi/extensions/zob-harness/src/compute-workflow-shape.ts +168 -0
- package/.pi/extensions/zob-harness/src/coms-v2/AGENTS.md +16 -0
- package/.pi/extensions/zob-harness/src/coms-v2/envelope.ts +121 -0
- package/.pi/extensions/zob-harness/src/coms-v2/identity.ts +53 -0
- package/.pi/extensions/zob-harness/src/coms-v2/ledger-bridge.ts +67 -0
- package/.pi/extensions/zob-harness/src/coms-v2/local-transport.ts +147 -0
- package/.pi/extensions/zob-harness/src/coms-v2/pending-replies.ts +80 -0
- package/.pi/extensions/zob-harness/src/coms-v2/policy.ts +125 -0
- package/.pi/extensions/zob-harness/src/coms-v2/presence.ts +55 -0
- package/.pi/extensions/zob-harness/src/coms-v2/registry.ts +113 -0
- package/.pi/extensions/zob-harness/src/coms-v2/response-capture.ts +50 -0
- package/.pi/extensions/zob-harness/src/coms-v2/transcript-capture.ts +164 -0
- package/.pi/extensions/zob-harness/src/coms-v2/types.ts +149 -0
- package/.pi/extensions/zob-harness/src/coms-v2/zpeer-profile.ts +140 -0
- package/.pi/extensions/zob-harness/src/coms-v2/zpeer.ts +452 -0
- package/.pi/extensions/zob-harness/src/constants.ts +108 -0
- package/.pi/extensions/zob-harness/src/context-gbrain.ts +465 -0
- package/.pi/extensions/zob-harness/src/daemon-policy.ts +223 -0
- package/.pi/extensions/zob-harness/src/daemon-readiness.ts +134 -0
- package/.pi/extensions/zob-harness/src/daemon-runtime.ts +393 -0
- package/.pi/extensions/zob-harness/src/factory/AGENTS.md +24 -0
- package/.pi/extensions/zob-harness/src/factory/agentic-plan.ts +65 -0
- package/.pi/extensions/zob-harness/src/factory/quarantine.ts +319 -0
- package/.pi/extensions/zob-harness/src/factory/run.ts +520 -0
- package/.pi/extensions/zob-harness/src/factory/validation.ts +454 -0
- package/.pi/extensions/zob-harness/src/factory-selector.ts +318 -0
- package/.pi/extensions/zob-harness/src/full-autonomy-test.ts +226 -0
- package/.pi/extensions/zob-harness/src/git-ops.ts +868 -0
- package/.pi/extensions/zob-harness/src/goal-room.ts +178 -0
- package/.pi/extensions/zob-harness/src/goal-runtime.ts +1569 -0
- package/.pi/extensions/zob-harness/src/goal-todo-imports.ts +111 -0
- package/.pi/extensions/zob-harness/src/goal-todo-types.ts +231 -0
- package/.pi/extensions/zob-harness/src/goal-todos.ts +1410 -0
- package/.pi/extensions/zob-harness/src/goal.ts +152 -0
- package/.pi/extensions/zob-harness/src/governed-requests.ts +436 -0
- package/.pi/extensions/zob-harness/src/interactive-autonomy.ts +595 -0
- package/.pi/extensions/zob-harness/src/launch-apply.ts +313 -0
- package/.pi/extensions/zob-harness/src/merge-queue.ts +290 -0
- package/.pi/extensions/zob-harness/src/mission-control.ts +573 -0
- package/.pi/extensions/zob-harness/src/model-availability.ts +52 -0
- package/.pi/extensions/zob-harness/src/model-routing.ts +429 -0
- package/.pi/extensions/zob-harness/src/orchestration/AGENTS.md +23 -0
- package/.pi/extensions/zob-harness/src/orchestration/adaptive-delegation.ts +547 -0
- package/.pi/extensions/zob-harness/src/orchestration/adaptive-workflow.ts +585 -0
- package/.pi/extensions/zob-harness/src/orchestration/lead-plan.ts +192 -0
- package/.pi/extensions/zob-harness/src/orchestration/plan.ts +168 -0
- package/.pi/extensions/zob-harness/src/orchestration/room.ts +346 -0
- package/.pi/extensions/zob-harness/src/orchestration/run.ts +134 -0
- package/.pi/extensions/zob-harness/src/orchestration/supervised-readonly.ts +1147 -0
- package/.pi/extensions/zob-harness/src/orchestration/widget-readers.ts +132 -0
- package/.pi/extensions/zob-harness/src/output-contracts.ts +656 -0
- package/.pi/extensions/zob-harness/src/project-dna.ts +533 -0
- package/.pi/extensions/zob-harness/src/promotion/AGENTS.md +24 -0
- package/.pi/extensions/zob-harness/src/promotion/candidate.ts +336 -0
- package/.pi/extensions/zob-harness/src/promotion/coms.ts +127 -0
- package/.pi/extensions/zob-harness/src/promotion/documentation.ts +142 -0
- package/.pi/extensions/zob-harness/src/promotion/factory.ts +107 -0
- package/.pi/extensions/zob-harness/src/promotion/ledger.ts +2 -0
- package/.pi/extensions/zob-harness/src/promotion/temp-agent.ts +151 -0
- package/.pi/extensions/zob-harness/src/promotion/types.ts +149 -0
- package/.pi/extensions/zob-harness/src/promotion/validate.ts +6 -0
- package/.pi/extensions/zob-harness/src/promotion/write-lane.ts +162 -0
- package/.pi/extensions/zob-harness/src/prompt-packs.ts +239 -0
- package/.pi/extensions/zob-harness/src/queue.ts +386 -0
- package/.pi/extensions/zob-harness/src/rules.ts +225 -0
- package/.pi/extensions/zob-harness/src/runtime/AGENTS.md +26 -0
- package/.pi/extensions/zob-harness/src/runtime/adaptive-zmode.ts +116 -0
- package/.pi/extensions/zob-harness/src/runtime/auto-compaction.ts +715 -0
- package/.pi/extensions/zob-harness/src/runtime/commands.ts +1315 -0
- package/.pi/extensions/zob-harness/src/runtime/compaction-policy.ts +516 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-click-markers.ts +141 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-feed.ts +415 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-markdown.ts +97 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-monitor.ts +553 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-mouse.ts +205 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-overlay.ts +434 -0
- package/.pi/extensions/zob-harness/src/runtime/events.ts +736 -0
- package/.pi/extensions/zob-harness/src/runtime/goal-todo-overlay.ts +214 -0
- package/.pi/extensions/zob-harness/src/runtime/mode-intent.ts +144 -0
- package/.pi/extensions/zob-harness/src/runtime/plan-capture.ts +270 -0
- package/.pi/extensions/zob-harness/src/runtime/state.ts +403 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-autonomous.ts +117 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-compute.ts +136 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-coms.ts +365 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-context.ts +70 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-delegation.ts +1854 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-factory.ts +810 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-goal-room.ts +46 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-governed-requests.ts +38 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-merge-queue.ts +61 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-mission-control.ts +77 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-orchestration.ts +106 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-project-dna.ts +123 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-worker-pool.ts +93 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-workspace-claims.ts +62 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-zcommit.ts +147 -0
- package/.pi/extensions/zob-harness/src/runtime/widget.ts +353 -0
- package/.pi/extensions/zob-harness/src/runtime/zobHarness.ts +60 -0
- package/.pi/extensions/zob-harness/src/safety.ts +338 -0
- package/.pi/extensions/zob-harness/src/sandbox.ts +1508 -0
- package/.pi/extensions/zob-harness/src/schemas-project-dna.ts +47 -0
- package/.pi/extensions/zob-harness/src/schemas.ts +695 -0
- package/.pi/extensions/zob-harness/src/telemetry.ts +373 -0
- package/.pi/extensions/zob-harness/src/topology/AGENTS.md +22 -0
- package/.pi/extensions/zob-harness/src/topology/chains.ts +236 -0
- package/.pi/extensions/zob-harness/src/topology/coms.ts +211 -0
- package/.pi/extensions/zob-harness/src/topology/orchestration-profiles.ts +204 -0
- package/.pi/extensions/zob-harness/src/topology/teams.ts +113 -0
- package/.pi/extensions/zob-harness/src/types/core.ts +47 -0
- package/.pi/extensions/zob-harness/src/types.ts +939 -0
- package/.pi/extensions/zob-harness/src/utils/AGENTS.md +22 -0
- package/.pi/extensions/zob-harness/src/utils/formatting.ts +34 -0
- package/.pi/extensions/zob-harness/src/utils/hashing.ts +11 -0
- package/.pi/extensions/zob-harness/src/utils/json.ts +28 -0
- package/.pi/extensions/zob-harness/src/utils/paths.ts +54 -0
- package/.pi/extensions/zob-harness/src/utils/records.ts +25 -0
- package/.pi/extensions/zob-harness/src/utils/resources.ts +38 -0
- package/.pi/extensions/zob-harness/src/worker-pool.ts +672 -0
- package/.pi/extensions/zob-harness/src/workspace-claims.ts +297 -0
- package/.pi/extensions/zob-switch/index.ts +180 -0
- package/.pi/factories/budget-preflight-dry-run/batch-manifest.json +59 -0
- package/.pi/factories/budget-preflight-dry-run/factory.json +94 -0
- package/.pi/factories/budget-preflight-dry-run/pilot-manifest.json +50 -0
- package/.pi/factories/budget-preflight-dry-run/smoke-manifest.json +43 -0
- package/.pi/factories/code-review-matrix/batch-manifest.json +61 -0
- package/.pi/factories/code-review-matrix/factory.json +163 -0
- package/.pi/factories/code-review-matrix/pilot-manifest.json +41 -0
- package/.pi/factories/code-review-matrix/smoke-manifest.json +35 -0
- package/.pi/factories/factory-forge/batch-manifest.json +56 -0
- package/.pi/factories/factory-forge/factory.json +84 -0
- package/.pi/factories/factory-forge/pilot-manifest.json +32 -0
- package/.pi/factories/factory-forge/smoke-manifest.json +19 -0
- package/.pi/factories/opencode-pattern-canonizer/batch-manifest.json +54 -0
- package/.pi/factories/opencode-pattern-canonizer/factory.json +86 -0
- package/.pi/factories/opencode-pattern-canonizer/pilot-manifest.json +39 -0
- package/.pi/factories/opencode-pattern-canonizer/smoke-manifest.json +26 -0
- package/.pi/factories/project-dna/README.md +182 -0
- package/.pi/factories/project-dna/batch-manifest.json +37 -0
- package/.pi/factories/project-dna/example-project-dna-manifest-v2.json +80 -0
- package/.pi/factories/project-dna/example-project-dna-manifest.json +58 -0
- package/.pi/factories/project-dna/factory.json +131 -0
- package/.pi/factories/project-dna/golden-cases-smoke.json +62 -0
- package/.pi/factories/project-dna/pi-agentic-ontology.json +88 -0
- package/.pi/factories/project-dna/pilot-manifest.json +32 -0
- package/.pi/factories/project-dna/schemas/benchmark-suite.schema.json +27 -0
- package/.pi/factories/project-dna/schemas/code-knowledge-graph.schema.json +97 -0
- package/.pi/factories/project-dna/schemas/context-pack.schema.json +43 -0
- package/.pi/factories/project-dna/schemas/golden-case.schema.json +36 -0
- package/.pi/factories/project-dna/schemas/manifest-v2.schema.json +128 -0
- package/.pi/factories/project-dna/schemas/manifest.schema.json +77 -0
- package/.pi/factories/project-dna/schemas/ontology.schema.json +45 -0
- package/.pi/factories/project-dna/schemas/project-fingerprint.schema.json +28 -0
- package/.pi/factories/project-dna/schemas/query-steward-report.schema.json +52 -0
- package/.pi/factories/project-dna/smoke-manifest.json +27 -0
- package/.pi/factories/roadmap-smoke-lots/batch-manifest.json +49 -0
- package/.pi/factories/roadmap-smoke-lots/factory.json +89 -0
- package/.pi/factories/roadmap-smoke-lots/pilot-manifest.json +50 -0
- package/.pi/factories/roadmap-smoke-lots/smoke-manifest.json +35 -0
- package/.pi/git-policy.json +120 -0
- package/.pi/mission-control/zob_coms_transport.json +64 -0
- package/.pi/model-catalog.example.json +345 -0
- package/.pi/model-economy.example.json +196 -0
- package/.pi/model-routing.json +86 -0
- package/.pi/orchestrations/adaptive-chief-vision.json +193 -0
- package/.pi/orchestrations/ceo-feature-build.json +182 -0
- package/.pi/orchestrations/readonly-dynamic-smoke.json +75 -0
- package/.pi/output-contracts/agent-event.v1.json +19 -0
- package/.pi/output-contracts/base.v1.json +24 -0
- package/.pi/output-contracts/brain-lookup.v1.json +21 -0
- package/.pi/output-contracts/clarification.v1.json +21 -0
- package/.pi/output-contracts/context-pack.v1.json +20 -0
- package/.pi/output-contracts/context-request.v1.json +21 -0
- package/.pi/output-contracts/context-steward.v1.json +19 -0
- package/.pi/output-contracts/context-writeback-proposal.v1.json +18 -0
- package/.pi/output-contracts/delegation-request.v1.json +21 -0
- package/.pi/output-contracts/explore.v1.json +52 -0
- package/.pi/output-contracts/factory.v1.json +48 -0
- package/.pi/output-contracts/guidance-steward.v1.json +18 -0
- package/.pi/output-contracts/implement.v1.json +40 -0
- package/.pi/output-contracts/launch-authorization.v1.json +21 -0
- package/.pi/output-contracts/lead-plan.v1.json +22 -0
- package/.pi/output-contracts/mission-readiness.v1.json +20 -0
- package/.pi/output-contracts/oracle-merge.v1.json +44 -0
- package/.pi/output-contracts/oracle-request.v1.json +20 -0
- package/.pi/output-contracts/oracle.v1.json +44 -0
- package/.pi/output-contracts/orchestration-profile.v1.json +22 -0
- package/.pi/output-contracts/plan.v1.json +48 -0
- package/.pi/output-contracts/prompt-pack.v1.json +20 -0
- package/.pi/output-contracts/qa.v1.json +40 -0
- package/.pi/output-contracts/research.v1.json +36 -0
- package/.pi/output-contracts/spec.v1.json +22 -0
- package/.pi/output-contracts/synthesis.v1.json +44 -0
- package/.pi/output-contracts/temp-agent-card.v1.json +23 -0
- package/.pi/output-contracts/todo-child-result.v1.json +20 -0
- package/.pi/output-contracts/todo-child-result.v2.json +22 -0
- package/.pi/output-contracts/todo-claim-validation.v1.json +22 -0
- package/.pi/output-contracts/todo-split-request.v1.json +20 -0
- package/.pi/prompts/adaptive-workflow.md +63 -0
- package/.pi/prompts/autonomous-runtime.md +15 -0
- package/.pi/prompts/benchmark-contender.md +15 -0
- package/.pi/prompts/benchmark-judge.md +19 -0
- package/.pi/prompts/clarify-spec.md +20 -0
- package/.pi/prompts/compute-plan.md +36 -0
- package/.pi/prompts/compute-preview.md +42 -0
- package/.pi/prompts/contract.md +29 -0
- package/.pi/prompts/explore.md +13 -0
- package/.pi/prompts/factory-run.md +36 -0
- package/.pi/prompts/factory.md +20 -0
- package/.pi/prompts/implement.md +27 -0
- package/.pi/prompts/model-catalog.md +68 -0
- package/.pi/prompts/model-economy.md +64 -0
- package/.pi/prompts/oracle-merge.md +18 -0
- package/.pi/prompts/oracle.md +13 -0
- package/.pi/prompts/orchestrator.md +48 -0
- package/.pi/prompts/parallel-review.md +21 -0
- package/.pi/prompts/plan.md +21 -0
- package/.pi/prompts/project-dna.md +90 -0
- package/.pi/prompts/refactor-oracle.md +23 -0
- package/.pi/prompts/refactor-slice.md +24 -0
- package/.pi/prompts/research.md +20 -0
- package/.pi/prompts/spec.md +19 -0
- package/.pi/prompts/synthesis.md +18 -0
- package/.pi/rules/always.md +38 -0
- package/.pi/rules/docs.md +32 -0
- package/.pi/rules/factory.md +44 -0
- package/.pi/rules/oracle.md +34 -0
- package/.pi/rules/orchestration.md +44 -0
- package/.pi/rules/project.md +34 -0
- package/.pi/rules/prompts.md +43 -0
- package/.pi/rules/runtime.md +43 -0
- package/.pi/rules/sandbox.md +43 -0
- package/.pi/settings.json +28 -0
- package/.pi/skills/zob-agentic-access/SKILL.md +20 -0
- package/.pi/skills/zob-autonomous-runtime/SKILL.md +41 -0
- package/.pi/skills/zob-commit/SKILL.md +79 -0
- package/.pi/skills/zob-compaction-policy/SKILL.md +92 -0
- package/.pi/skills/zob-compute-profile/SKILL.md +108 -0
- package/.pi/skills/zob-coms-safety/SKILL.md +54 -0
- package/.pi/skills/zob-coms-v2-live/SKILL.md +47 -0
- package/.pi/skills/zob-delegation-routing/SKILL.md +82 -0
- package/.pi/skills/zob-factory/SKILL.md +28 -0
- package/.pi/skills/zob-goal-todo-tree/SKILL.md +279 -0
- package/.pi/skills/zob-harness/SKILL.md +68 -0
- package/.pi/skills/zob-mission-control-coms/SKILL.md +39 -0
- package/.pi/skills/zob-oracle/SKILL.md +21 -0
- package/.pi/skills/zob-owner-pool-drill-writer/SKILL.md +244 -0
- package/.pi/skills/zob-owner-pool-launcher/SKILL.md +261 -0
- package/.pi/skills/zob-project-dna/SKILL.md +275 -0
- package/.pi/skills/zob-sandbox/SKILL.md +29 -0
- package/.pi/skills/zob-spec/SKILL.md +25 -0
- package/.pi/skills/zob-split-refactor/SKILL.md +39 -0
- package/.pi/skills/zob-tool-router/SKILL.md +104 -0
- package/.pi/teams/zob-core.json +122 -0
- package/AGENTS.md +89 -0
- package/CONTRIBUTING.md +56 -0
- package/LICENSE +21 -0
- package/README.md +360 -0
- package/SECURITY.md +35 -0
- package/SOURCE_INDEX.md +46 -0
- package/package.json +135 -0
- package/scripts/README.md +57 -0
- package/scripts/autonomy/mission-readiness-secret-smoke.mjs +90 -0
- package/scripts/compute-profile/plan-workflow.mjs +85 -0
- package/scripts/compute-profile/preview.mjs +242 -0
- package/scripts/compute-profile/regression-smoke.mjs +38 -0
- package/scripts/compute-profile/summarize.mjs +72 -0
- package/scripts/compute-profile/validate-policy.mjs +50 -0
- package/scripts/compute-profile/validate-preview.mjs +95 -0
- package/scripts/compute-profile/validate-workflow.mjs +58 -0
- package/scripts/git-ops/commit-policy-smoke.mjs +221 -0
- package/scripts/goal-todo/child-goal-ref-smoke.mjs +252 -0
- package/scripts/harness-switch/static-smoke.mjs +43 -0
- package/scripts/model-catalog/validate-economy.mjs +223 -0
- package/scripts/model-catalog/validate.mjs +199 -0
- package/scripts/package-surface/validate-script-refs.mjs +190 -0
- package/scripts/path-policy/validate-smoke.mjs +103 -0
- package/scripts/project-dna/bench-smoke.mjs +217 -0
- package/scripts/project-dna/build-capsules.mjs +207 -0
- package/scripts/project-dna/build-sample-spec.mjs +140 -0
- package/scripts/project-dna/emit-golden-cases.mjs +75 -0
- package/scripts/project-dna/emit-ontology.mjs +75 -0
- package/scripts/project-dna/generate-sample.mjs +302 -0
- package/scripts/project-dna/oracle-review-smoke.mjs +157 -0
- package/scripts/project-dna/plan-workflow.mjs +289 -0
- package/scripts/project-dna/query-context.mjs +276 -0
- package/scripts/project-dna/query-steward.mjs +149 -0
- package/scripts/project-dna/scan.mjs +553 -0
- package/scripts/project-dna/validate-5of5.mjs +159 -0
- package/scripts/project-dna/validate-golden-cases.mjs +78 -0
- package/scripts/project-dna/validate-ontology.mjs +97 -0
- package/scripts/project-dna/validate-sample-project.mjs +105 -0
- package/scripts/project-dna/validate-scaffold.mjs +383 -0
- package/scripts/project-dna/validate-scan-artifacts.mjs +187 -0
- package/scripts/project-dna/validate-workflow.mjs +166 -0
- package/scripts/start-pi.sh +4 -0
- package/scripts/worker-pool/static-smoke.mjs +54 -0
- package/scripts/zpeer-local-e2e-smoke.mjs +395 -0
- package/scripts/zpeer-static-smoke.mjs +129 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,939 @@
|
|
|
1
|
+
import type { ChildChangedPathRef, ModeName } from "./types/core.js";
|
|
2
|
+
|
|
3
|
+
export type {
|
|
4
|
+
AgentScope,
|
|
5
|
+
AssistantLikeMessage,
|
|
6
|
+
ChildChangedPathRef,
|
|
7
|
+
ChildThinkingLevel,
|
|
8
|
+
HarnessAgent,
|
|
9
|
+
JsonEvent,
|
|
10
|
+
ModeName,
|
|
11
|
+
TextBlock,
|
|
12
|
+
} from "./types/core.js";
|
|
13
|
+
|
|
14
|
+
export interface DamageRule {
|
|
15
|
+
pattern: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
ask?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DamageRules {
|
|
21
|
+
bashToolPatterns: DamageRule[];
|
|
22
|
+
zeroAccessPaths: string[];
|
|
23
|
+
readOnlyPaths: string[];
|
|
24
|
+
noDeletePaths: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type RuleEnforcementLevel = "advisory" | "warn" | "preflight_fail" | "block" | "no_ship" | "human_approval";
|
|
28
|
+
export type RuleOracleRequirement = boolean | "conditional";
|
|
29
|
+
|
|
30
|
+
export interface RuleAppliesTo {
|
|
31
|
+
paths?: string[];
|
|
32
|
+
modes?: ModeName[];
|
|
33
|
+
task_types?: string[];
|
|
34
|
+
profiles?: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface RulePack {
|
|
38
|
+
schema: "zob.rule-pack.v1";
|
|
39
|
+
id: string;
|
|
40
|
+
description: string;
|
|
41
|
+
applies_to: RuleAppliesTo;
|
|
42
|
+
must_do: string[];
|
|
43
|
+
must_not_do: string[];
|
|
44
|
+
allowed_tools?: string[];
|
|
45
|
+
required_validation: string[];
|
|
46
|
+
oracle_required: RuleOracleRequirement;
|
|
47
|
+
no_ship_conditions: string[];
|
|
48
|
+
enforcement: RuleEnforcementLevel;
|
|
49
|
+
sourcePath?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface RuleResolverInput {
|
|
53
|
+
repoRoot: string;
|
|
54
|
+
mode?: ModeName;
|
|
55
|
+
paths?: string[];
|
|
56
|
+
taskText?: string;
|
|
57
|
+
profile?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface RuleResolution {
|
|
61
|
+
schema: "zob.rule-resolution.v1";
|
|
62
|
+
profile: string;
|
|
63
|
+
rulePacks: string[];
|
|
64
|
+
allowedTools: string[];
|
|
65
|
+
requiredValidation: string[];
|
|
66
|
+
oracleRequired: RuleOracleRequirement;
|
|
67
|
+
noShipConditions: string[];
|
|
68
|
+
mustDo: string[];
|
|
69
|
+
mustNotDo: string[];
|
|
70
|
+
enforcement: RuleEnforcementLevel[];
|
|
71
|
+
errors: string[];
|
|
72
|
+
promptBodiesStored: false;
|
|
73
|
+
outputBodiesStored: false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type DelegationFailureKind = "preflight" | "config" | "output_gate" | "child_runtime" | "aborted";
|
|
77
|
+
|
|
78
|
+
export interface ChildResult {
|
|
79
|
+
agent: string;
|
|
80
|
+
task: string;
|
|
81
|
+
exitCode: number;
|
|
82
|
+
output: string;
|
|
83
|
+
stderr: string;
|
|
84
|
+
model?: string;
|
|
85
|
+
sessionPath?: string;
|
|
86
|
+
ledgerRunId?: string;
|
|
87
|
+
outputContract?: string;
|
|
88
|
+
contractErrors?: string[];
|
|
89
|
+
gateErrors?: string[];
|
|
90
|
+
gatePassed?: boolean;
|
|
91
|
+
failureKind?: DelegationFailureKind;
|
|
92
|
+
stopReason?: string;
|
|
93
|
+
stopCondition?: ChildStopCondition;
|
|
94
|
+
errorMessage?: string;
|
|
95
|
+
childChangedPaths?: ChildChangedPathRef[];
|
|
96
|
+
usage: {
|
|
97
|
+
turns: number;
|
|
98
|
+
input: number;
|
|
99
|
+
output: number;
|
|
100
|
+
cacheRead: number;
|
|
101
|
+
cacheWrite: number;
|
|
102
|
+
cost: number;
|
|
103
|
+
contextTokens: number;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface DelegationDetails {
|
|
108
|
+
mode: "single" | "parallel" | "chain";
|
|
109
|
+
results: ChildResult[];
|
|
110
|
+
agents: string[];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface GoalState {
|
|
114
|
+
originalUserAsk: string;
|
|
115
|
+
activeGoal: string;
|
|
116
|
+
constraints: string;
|
|
117
|
+
expectedOutput: string;
|
|
118
|
+
validationEvidence: string;
|
|
119
|
+
setAt: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface BudgetSidecar {
|
|
123
|
+
mode: "advisory";
|
|
124
|
+
advisory: true;
|
|
125
|
+
budgetEnforced: false;
|
|
126
|
+
strictRequested: boolean;
|
|
127
|
+
strictEnabled: false;
|
|
128
|
+
raw?: string;
|
|
129
|
+
maxCostUsd?: number;
|
|
130
|
+
maxRuns?: number;
|
|
131
|
+
maxDurationMs?: number;
|
|
132
|
+
maxParallelChildren?: number;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface BillableJobIntake {
|
|
136
|
+
schema: "zob.billable-job-intake.v1";
|
|
137
|
+
goal: GoalState;
|
|
138
|
+
budget?: BudgetSidecar;
|
|
139
|
+
budgetEnforced: false;
|
|
140
|
+
parsedAt: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface OutputRequirement {
|
|
144
|
+
name: string;
|
|
145
|
+
pattern: string;
|
|
146
|
+
message: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface OutputContract {
|
|
150
|
+
id: string;
|
|
151
|
+
description: string;
|
|
152
|
+
agentNames: string[];
|
|
153
|
+
required: OutputRequirement[];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface FactoryStage {
|
|
157
|
+
name: string;
|
|
158
|
+
type: "map" | "reduce" | "validate";
|
|
159
|
+
agent: string;
|
|
160
|
+
outputContract: string;
|
|
161
|
+
requiredTools: string[];
|
|
162
|
+
promptTemplate: string;
|
|
163
|
+
expectedOutcome?: string;
|
|
164
|
+
mustDo?: string[];
|
|
165
|
+
mustNotDo?: string[];
|
|
166
|
+
context?: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface FactoryDefinition {
|
|
170
|
+
name: string;
|
|
171
|
+
version: string;
|
|
172
|
+
description: string;
|
|
173
|
+
defaultMode?: "smoke" | "pilot" | "batch";
|
|
174
|
+
expectedArtifacts?: string[];
|
|
175
|
+
requiredStages?: string[];
|
|
176
|
+
stages?: FactoryStage[];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface FactoryManifestItem {
|
|
180
|
+
id: string;
|
|
181
|
+
path: string;
|
|
182
|
+
metadata?: Record<string, unknown>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface FactoryInputManifest {
|
|
186
|
+
factory: string;
|
|
187
|
+
description?: string;
|
|
188
|
+
items: FactoryManifestItem[];
|
|
189
|
+
expectedArtifacts?: string[];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type FactoryExecutionMode = "deterministic" | "plan_only" | "agentic";
|
|
193
|
+
|
|
194
|
+
export interface FactoryOracleGate {
|
|
195
|
+
verdict?: "PASS" | "FAIL" | "WARN";
|
|
196
|
+
no_ship?: boolean;
|
|
197
|
+
evidence?: string;
|
|
198
|
+
reviewer?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface FactoryOracleReview {
|
|
202
|
+
schema?: string;
|
|
203
|
+
verdict?: "PASS" | "FAIL" | "WARN";
|
|
204
|
+
no_ship?: boolean;
|
|
205
|
+
evidence?: string;
|
|
206
|
+
reviewer?: string;
|
|
207
|
+
reviewedRunId?: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface FactoryRunBudgetInput extends BudgetPreflightDryRunCaps {
|
|
211
|
+
strictEnabled?: boolean;
|
|
212
|
+
strictRequested?: boolean;
|
|
213
|
+
estimatedCostUsd?: number;
|
|
214
|
+
estimatedRuns?: number;
|
|
215
|
+
estimatedDurationMs?: number;
|
|
216
|
+
estimatedParallelChildren?: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export type ComputeProfileName = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
220
|
+
|
|
221
|
+
export interface ComputeCapsInput {
|
|
222
|
+
maxAgents?: number;
|
|
223
|
+
maxDelegationDepth?: number;
|
|
224
|
+
maxParallel?: number;
|
|
225
|
+
maxIterations?: number;
|
|
226
|
+
maxDurationMs?: number;
|
|
227
|
+
maxCostUsd?: number;
|
|
228
|
+
maxContextTokens?: number;
|
|
229
|
+
strictBudgetRequired?: boolean;
|
|
230
|
+
oracleRequired?: boolean;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface FactoryRunModelRoutingInput {
|
|
234
|
+
enabled?: boolean;
|
|
235
|
+
modelByClass?: Record<string, string>;
|
|
236
|
+
risk?: "low" | "medium" | "high" | string;
|
|
237
|
+
contextTokens?: number;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface FactoryAdaptiveDispatchGateInput {
|
|
241
|
+
enabled?: boolean;
|
|
242
|
+
liveReadOnlyProofEnabled?: boolean;
|
|
243
|
+
proofRunId?: string;
|
|
244
|
+
proofReviewHash?: string;
|
|
245
|
+
approvedBy?: string;
|
|
246
|
+
approvedAt?: string;
|
|
247
|
+
approvalId?: string;
|
|
248
|
+
scope?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface FactoryAdaptiveDispatchGate {
|
|
252
|
+
schema: "zob.factory-adaptive-dispatch-gate.v1";
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
liveReadOnlyProofEnabled: boolean;
|
|
255
|
+
proofRunIdHash?: string;
|
|
256
|
+
proofReviewHash?: string;
|
|
257
|
+
approvedByHash?: string;
|
|
258
|
+
approvedAt?: string;
|
|
259
|
+
approvalIdHash?: string;
|
|
260
|
+
scopeHash?: string;
|
|
261
|
+
liveFactoryAdaptiveDispatchEnabled: boolean;
|
|
262
|
+
parentOwnedDispatch: true;
|
|
263
|
+
childDirectDispatch: false;
|
|
264
|
+
productionWritesPerformed: false;
|
|
265
|
+
autoApply: false;
|
|
266
|
+
bodyStored: false;
|
|
267
|
+
promptBodiesStored: false;
|
|
268
|
+
outputBodiesStored: false;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export type AdaptiveDelegationMode = "off" | "advisory_only" | "when_pertinent";
|
|
272
|
+
export type AdaptiveDelegationOracleMode = "off" | "conditional" | "always";
|
|
273
|
+
export type AdaptiveDelegationRisk = "low" | "medium" | "high";
|
|
274
|
+
|
|
275
|
+
export interface AdaptiveDelegationSandboxGateInput {
|
|
276
|
+
enabled?: boolean;
|
|
277
|
+
mode?: "off" | "proposal_only";
|
|
278
|
+
sandboxRunId?: string;
|
|
279
|
+
diffReviewGateHash?: string;
|
|
280
|
+
applyReadinessHash?: string;
|
|
281
|
+
approvalHash?: string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export interface AdaptiveDelegationSandboxGate {
|
|
285
|
+
schema: "zob.adaptive-delegation-sandbox-gate.v1";
|
|
286
|
+
enabled: boolean;
|
|
287
|
+
mode: "off" | "proposal_only";
|
|
288
|
+
sandboxRunIdHash?: string;
|
|
289
|
+
diffReviewGateHash?: string;
|
|
290
|
+
applyReadinessHash?: string;
|
|
291
|
+
approvalHash?: string;
|
|
292
|
+
liveWriteDispatchEnabled: false;
|
|
293
|
+
productionWritesPerformed: false;
|
|
294
|
+
autoApply: false;
|
|
295
|
+
bodyStored: false;
|
|
296
|
+
promptBodiesStored: false;
|
|
297
|
+
outputBodiesStored: false;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface AdaptiveDelegationScaleApprovalInput {
|
|
301
|
+
approvedBy?: string;
|
|
302
|
+
approvedAt?: string;
|
|
303
|
+
approvalId?: string;
|
|
304
|
+
scope?: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface AdaptiveDelegationScaleApproval {
|
|
308
|
+
schema: "zob.adaptive-delegation-scale-approval.v1";
|
|
309
|
+
approvedByHash?: string;
|
|
310
|
+
approvedAt?: string;
|
|
311
|
+
approvalIdHash?: string;
|
|
312
|
+
scopeHash?: string;
|
|
313
|
+
bodyStored: false;
|
|
314
|
+
promptBodiesStored: false;
|
|
315
|
+
outputBodiesStored: false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface AdaptiveDelegationPolicyInput {
|
|
319
|
+
enabled?: boolean;
|
|
320
|
+
mode?: AdaptiveDelegationMode;
|
|
321
|
+
dispatch?: boolean;
|
|
322
|
+
recordDecisionsOnly?: boolean;
|
|
323
|
+
configuredMaxDepth?: number;
|
|
324
|
+
runtimeMaxDepth?: number;
|
|
325
|
+
rootFanoutMax?: number;
|
|
326
|
+
nodeFanoutMax?: number;
|
|
327
|
+
globalParallelMax?: number;
|
|
328
|
+
maxTotalAgents?: number;
|
|
329
|
+
maxTotalAgentsWithOracle?: number;
|
|
330
|
+
ttlPerRequest?: number;
|
|
331
|
+
minApprovalScore?: number;
|
|
332
|
+
oracle?: AdaptiveDelegationOracleMode;
|
|
333
|
+
strictBudgetRequired?: boolean;
|
|
334
|
+
sandboxGate?: AdaptiveDelegationSandboxGateInput;
|
|
335
|
+
scaleApproval?: AdaptiveDelegationScaleApprovalInput;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface AdaptiveDelegationPolicy {
|
|
339
|
+
schema: "zob.adaptive-delegation-policy.v1";
|
|
340
|
+
enabled: boolean;
|
|
341
|
+
mode: AdaptiveDelegationMode;
|
|
342
|
+
dispatch: boolean;
|
|
343
|
+
recordDecisionsOnly: boolean;
|
|
344
|
+
configuredMaxDepth: number;
|
|
345
|
+
runtimeMaxDepth: number;
|
|
346
|
+
rootFanoutMax: number;
|
|
347
|
+
nodeFanoutMax: number;
|
|
348
|
+
globalParallelMax: number;
|
|
349
|
+
maxTotalAgents: number;
|
|
350
|
+
maxTotalAgentsWithOracle: number;
|
|
351
|
+
ttlPerRequest: number;
|
|
352
|
+
minApprovalScore: number;
|
|
353
|
+
oracle: AdaptiveDelegationOracleMode;
|
|
354
|
+
strictBudgetRequired: boolean;
|
|
355
|
+
sandboxGate?: AdaptiveDelegationSandboxGate;
|
|
356
|
+
scaleApproval?: AdaptiveDelegationScaleApproval;
|
|
357
|
+
parentOwnedDispatch: true;
|
|
358
|
+
childDirectDispatch: false;
|
|
359
|
+
bodyStored: false;
|
|
360
|
+
promptBodiesStored: false;
|
|
361
|
+
outputBodiesStored: false;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export interface DelegationRequestProposal {
|
|
365
|
+
schema: "zob.delegation-request.v1";
|
|
366
|
+
requesterRole: string;
|
|
367
|
+
referentRole: string;
|
|
368
|
+
requestedAgent: string;
|
|
369
|
+
requestedOutputContract: string;
|
|
370
|
+
requiredTools: string[];
|
|
371
|
+
requesterDepth: number;
|
|
372
|
+
targetDepth: number;
|
|
373
|
+
ttlRequested?: number;
|
|
374
|
+
evidenceRefs: string[];
|
|
375
|
+
targetFileSet?: string[];
|
|
376
|
+
estimatedTokensIfAlone?: number;
|
|
377
|
+
estimatedTokensWithDelegation?: number;
|
|
378
|
+
estimatedCostUsd?: number;
|
|
379
|
+
estimatedDurationMs?: number;
|
|
380
|
+
estimatedSuccessIfAlone?: number;
|
|
381
|
+
estimatedSuccessWithDelegation?: number;
|
|
382
|
+
risk: AdaptiveDelegationRisk;
|
|
383
|
+
proposedTaskHash?: string;
|
|
384
|
+
proposedContextHash?: string;
|
|
385
|
+
rationaleHash?: string;
|
|
386
|
+
bodyStored: false;
|
|
387
|
+
promptBodiesStored: false;
|
|
388
|
+
outputBodiesStored: false;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface DelegationScore {
|
|
392
|
+
schema: "zob.delegation-score.v1";
|
|
393
|
+
relevance: number;
|
|
394
|
+
evidenceQuality: number;
|
|
395
|
+
costBenefit: number;
|
|
396
|
+
safety: number;
|
|
397
|
+
novelty: number;
|
|
398
|
+
urgency: number;
|
|
399
|
+
total: number;
|
|
400
|
+
decisionHint: "approve" | "deny" | "defer" | "oracle_required";
|
|
401
|
+
reasons: string[];
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export interface GovernorDecision {
|
|
405
|
+
schema: "zob.governor-decision.v1";
|
|
406
|
+
parentAssignedRequestId: string;
|
|
407
|
+
parentComputedLineageHash: string;
|
|
408
|
+
parentComputedNormalizedTaskHash: string;
|
|
409
|
+
requesterRole: string;
|
|
410
|
+
referentRole: string;
|
|
411
|
+
requesterDepth: number;
|
|
412
|
+
targetDepth: number;
|
|
413
|
+
ttlRemaining: number;
|
|
414
|
+
hardGateStatus: "passed" | "blocked";
|
|
415
|
+
hardGateErrors: string[];
|
|
416
|
+
score?: DelegationScore;
|
|
417
|
+
status: "approved" | "denied" | "deferred" | "oracle_required" | "blocked";
|
|
418
|
+
dispatchAllowed: boolean;
|
|
419
|
+
noShip: boolean;
|
|
420
|
+
reasons: string[];
|
|
421
|
+
bodyStored: false;
|
|
422
|
+
promptBodiesStored: false;
|
|
423
|
+
outputBodiesStored: false;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface ParentDispatchContract {
|
|
427
|
+
schema: "zob.parent-dispatch-contract.v1";
|
|
428
|
+
requestId: string;
|
|
429
|
+
runId: string;
|
|
430
|
+
parentTaskId: string;
|
|
431
|
+
agent: string;
|
|
432
|
+
taskHash: string;
|
|
433
|
+
contextHash?: string;
|
|
434
|
+
rationaleHash?: string;
|
|
435
|
+
outputContract: string;
|
|
436
|
+
requiredTools: string[];
|
|
437
|
+
allowedPaths?: string[];
|
|
438
|
+
forbiddenPaths?: string[];
|
|
439
|
+
requesterDepth: number;
|
|
440
|
+
targetDepth: number;
|
|
441
|
+
referentRole: string;
|
|
442
|
+
dispatcher: "parent";
|
|
443
|
+
status?: "queued_not_dispatched" | "dispatching" | "completed" | "failed" | "blocked";
|
|
444
|
+
dispatchGate?: string;
|
|
445
|
+
liveDispatched?: boolean;
|
|
446
|
+
mocked?: boolean;
|
|
447
|
+
dispatcherKind?: string;
|
|
448
|
+
outputHash?: string | null;
|
|
449
|
+
outputContractValidated?: boolean;
|
|
450
|
+
bodyStored: false;
|
|
451
|
+
promptBodiesStored?: false;
|
|
452
|
+
outputBodiesStored?: false;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export interface AdaptiveDelegationGovernorState {
|
|
456
|
+
schema: "zob.adaptive-delegation-governor-state.v1";
|
|
457
|
+
runId: string;
|
|
458
|
+
rootGoalHash: string;
|
|
459
|
+
policyHash: string;
|
|
460
|
+
totalRequested: number;
|
|
461
|
+
totalApproved: number;
|
|
462
|
+
totalDispatched: number;
|
|
463
|
+
totalDenied: number;
|
|
464
|
+
totalDeferred: number;
|
|
465
|
+
totalOracleRequired: number;
|
|
466
|
+
maxDepthObserved: number;
|
|
467
|
+
fanoutByRequester: Record<string, number>;
|
|
468
|
+
requestIds: string[];
|
|
469
|
+
lineageHashes: string[];
|
|
470
|
+
paused: boolean;
|
|
471
|
+
stopped: boolean;
|
|
472
|
+
bodyStored: false;
|
|
473
|
+
promptBodiesStored: false;
|
|
474
|
+
outputBodiesStored: false;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface FactoryRunInput {
|
|
478
|
+
factory: string;
|
|
479
|
+
input_manifest: string;
|
|
480
|
+
run_id?: string;
|
|
481
|
+
mode?: "smoke" | "pilot" | "batch";
|
|
482
|
+
max_items?: number;
|
|
483
|
+
resume?: boolean;
|
|
484
|
+
execution?: FactoryExecutionMode;
|
|
485
|
+
model?: string;
|
|
486
|
+
prerequisite_smoke_run_id?: string;
|
|
487
|
+
prerequisite_pilot_run_id?: string;
|
|
488
|
+
oracle_review_path?: string;
|
|
489
|
+
batch_concurrency?: number;
|
|
490
|
+
budget?: FactoryRunBudgetInput;
|
|
491
|
+
compute_profile?: ComputeProfileName;
|
|
492
|
+
compute_caps?: ComputeCapsInput;
|
|
493
|
+
model_routing?: FactoryRunModelRoutingInput;
|
|
494
|
+
adaptive_factory_dispatch_gate?: FactoryAdaptiveDispatchGateInput;
|
|
495
|
+
oracle_gate?: FactoryOracleGate;
|
|
496
|
+
adaptive_delegation?: AdaptiveDelegationPolicyInput;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export interface FactoryRunResult {
|
|
500
|
+
runId: string;
|
|
501
|
+
runDir: string;
|
|
502
|
+
status: "done" | "planned" | "failed_preflight" | "failed_validation" | "agentic_failed";
|
|
503
|
+
processed: number;
|
|
504
|
+
failed: number;
|
|
505
|
+
artifacts: string[];
|
|
506
|
+
errors: string[];
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface FactoryQuarantineReviewInput {
|
|
510
|
+
run_id: string;
|
|
511
|
+
generated_factory: string;
|
|
512
|
+
review_id?: string;
|
|
513
|
+
oracle_verdict?: "PASS" | "FAIL" | "WARN";
|
|
514
|
+
approval?: {
|
|
515
|
+
approvedBy?: string;
|
|
516
|
+
approvedAt?: string;
|
|
517
|
+
approvalId?: string;
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export interface FactoryQuarantineReviewResult {
|
|
522
|
+
runId: string;
|
|
523
|
+
reviewId: string;
|
|
524
|
+
reviewDir: string;
|
|
525
|
+
status: "review_required" | "ready_for_manual_activation";
|
|
526
|
+
activationReady: boolean;
|
|
527
|
+
activationPerformed: false;
|
|
528
|
+
generatedFactoryRegistered: boolean;
|
|
529
|
+
localChecksPassed: boolean;
|
|
530
|
+
oraclePassed: boolean;
|
|
531
|
+
approvalPresent: boolean;
|
|
532
|
+
artifacts: string[];
|
|
533
|
+
errors: string[];
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export interface FactoryQuarantineActivateInput {
|
|
537
|
+
run_id: string;
|
|
538
|
+
generated_factory: string;
|
|
539
|
+
review_id: string;
|
|
540
|
+
confirmation_phrase: string;
|
|
541
|
+
activation_id?: string;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export interface FactoryQuarantineActivateResult {
|
|
545
|
+
runId: string;
|
|
546
|
+
reviewId: string;
|
|
547
|
+
activationId: string;
|
|
548
|
+
generatedFactory: string;
|
|
549
|
+
status: "activated" | "failed_preflight";
|
|
550
|
+
activationPerformed: boolean;
|
|
551
|
+
confirmationMatched: boolean;
|
|
552
|
+
targetDir: string;
|
|
553
|
+
journalPath: string;
|
|
554
|
+
copiedFiles: string[];
|
|
555
|
+
errors: string[];
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export interface FactoryQuarantineVerifyActivationInput {
|
|
559
|
+
run_id: string;
|
|
560
|
+
generated_factory: string;
|
|
561
|
+
activation_id: string;
|
|
562
|
+
verification_id?: string;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export interface FactoryQuarantineVerifyActivationResult {
|
|
566
|
+
runId: string;
|
|
567
|
+
activationId: string;
|
|
568
|
+
verificationId: string;
|
|
569
|
+
generatedFactory: string;
|
|
570
|
+
status: "verified" | "failed_preflight" | "failed_verification";
|
|
571
|
+
verificationDir: string;
|
|
572
|
+
journalPath: string;
|
|
573
|
+
factoryRunId: string;
|
|
574
|
+
factoryRunDir: string;
|
|
575
|
+
artifacts: string[];
|
|
576
|
+
errors: string[];
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export type OrchestrateExecutionMode = "plan_only" | "supervised_smoke" | "supervised_readonly";
|
|
580
|
+
export type ChainExecutionMode = "plan_only";
|
|
581
|
+
|
|
582
|
+
export interface TeamRoleBase {
|
|
583
|
+
id: string;
|
|
584
|
+
agent: string;
|
|
585
|
+
description?: string;
|
|
586
|
+
requiredTools: string[];
|
|
587
|
+
outputContract: string;
|
|
588
|
+
model?: string;
|
|
589
|
+
responsibilities?: string[];
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export interface TeamLead extends TeamRoleBase {
|
|
593
|
+
workerIds?: string[];
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
export interface TeamWorker extends TeamRoleBase {
|
|
597
|
+
leadId: string;
|
|
598
|
+
taskTemplate?: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface TeamDefinition {
|
|
602
|
+
name: string;
|
|
603
|
+
version: string;
|
|
604
|
+
description: string;
|
|
605
|
+
orchestrator: TeamRoleBase;
|
|
606
|
+
leads: TeamLead[];
|
|
607
|
+
workers: TeamWorker[];
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface OrchestrationModelClass {
|
|
611
|
+
description?: string;
|
|
612
|
+
defaultModel?: string;
|
|
613
|
+
thinking?: string;
|
|
614
|
+
downgradeAllowed?: boolean;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export interface OrchestrationProfileRole {
|
|
618
|
+
id: string;
|
|
619
|
+
roleType: "orchestrator" | "lead" | "worker" | "validator" | string;
|
|
620
|
+
agent: string;
|
|
621
|
+
modelClass?: string;
|
|
622
|
+
leadId?: string;
|
|
623
|
+
canDelegateTo?: string[];
|
|
624
|
+
requiredTools?: string[];
|
|
625
|
+
tools?: string[];
|
|
626
|
+
allowedPaths?: string[];
|
|
627
|
+
forbiddenPaths?: string[];
|
|
628
|
+
outputContract: string;
|
|
629
|
+
rules?: string[];
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export interface OrchestrationProfilePhase {
|
|
633
|
+
id: string;
|
|
634
|
+
type: string;
|
|
635
|
+
run?: string[];
|
|
636
|
+
required?: boolean;
|
|
637
|
+
requiresOutputContract?: string;
|
|
638
|
+
modelClassOverride?: string;
|
|
639
|
+
noShipOnFail?: boolean;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
export interface OrchestrationProfileDefinition {
|
|
643
|
+
schema?: string;
|
|
644
|
+
name: string;
|
|
645
|
+
version: string;
|
|
646
|
+
description?: string;
|
|
647
|
+
goalPolicy?: string;
|
|
648
|
+
modelPolicy?: { classes?: Record<string, OrchestrationModelClass> };
|
|
649
|
+
orchestrator: OrchestrationProfileRole;
|
|
650
|
+
roles: OrchestrationProfileRole[];
|
|
651
|
+
edges: Array<[string, string]>;
|
|
652
|
+
phases: OrchestrationProfilePhase[];
|
|
653
|
+
finalReportRole?: string;
|
|
654
|
+
completionGate?: Record<string, unknown>;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
export interface OrchestrateRunInput {
|
|
658
|
+
team?: string;
|
|
659
|
+
profile?: string;
|
|
660
|
+
goal: string;
|
|
661
|
+
original_user_ask?: string;
|
|
662
|
+
goal_id?: string;
|
|
663
|
+
todo_id?: string;
|
|
664
|
+
run_id?: string;
|
|
665
|
+
execution?: OrchestrateExecutionMode;
|
|
666
|
+
resume?: boolean;
|
|
667
|
+
max_workers?: number;
|
|
668
|
+
compute_profile?: ComputeProfileName;
|
|
669
|
+
compute_caps?: ComputeCapsInput;
|
|
670
|
+
adaptive_delegation?: AdaptiveDelegationPolicyInput;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export interface OrchestrateRunResult {
|
|
674
|
+
runId: string;
|
|
675
|
+
runDir: string;
|
|
676
|
+
status: "planned" | "failed_preflight";
|
|
677
|
+
tasks: number;
|
|
678
|
+
artifacts: string[];
|
|
679
|
+
errors: string[];
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export interface SupervisedReadonlyDispatchContract {
|
|
683
|
+
runId: string;
|
|
684
|
+
msgId: string;
|
|
685
|
+
taskId: string;
|
|
686
|
+
workerId: string;
|
|
687
|
+
leadId: string;
|
|
688
|
+
agent: string;
|
|
689
|
+
task: string;
|
|
690
|
+
expectedOutcome: string;
|
|
691
|
+
requiredTools: string[];
|
|
692
|
+
outputContract: string;
|
|
693
|
+
mustDo: string[];
|
|
694
|
+
mustNotDo: string[];
|
|
695
|
+
context: string;
|
|
696
|
+
allowedTools: string[];
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface SupervisedReadonlyDispatchResult {
|
|
700
|
+
status?: "completed" | "failed";
|
|
701
|
+
outputHash?: string;
|
|
702
|
+
output?: string;
|
|
703
|
+
error?: string;
|
|
704
|
+
dispatcher?: "external_mockable_boundary" | "live_child_pi" | string;
|
|
705
|
+
mocked?: boolean;
|
|
706
|
+
sessionPath?: string;
|
|
707
|
+
outputContractValidated?: boolean;
|
|
708
|
+
gatePassed?: boolean;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export type SupervisedReadonlyDispatcher = (contract: SupervisedReadonlyDispatchContract) => SupervisedReadonlyDispatchResult | Promise<SupervisedReadonlyDispatchResult>;
|
|
712
|
+
|
|
713
|
+
export interface ChainStepDefinition {
|
|
714
|
+
id: string;
|
|
715
|
+
agent: string;
|
|
716
|
+
task: string;
|
|
717
|
+
expectedOutcome: string;
|
|
718
|
+
requiredTools: string[];
|
|
719
|
+
outputContract: string;
|
|
720
|
+
mustDo: string[];
|
|
721
|
+
mustNotDo: string[];
|
|
722
|
+
context: string;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
export interface ChainDefinition {
|
|
726
|
+
name: string;
|
|
727
|
+
version: string;
|
|
728
|
+
description: string;
|
|
729
|
+
readOnly?: boolean;
|
|
730
|
+
defaultExecution?: ChainExecutionMode;
|
|
731
|
+
steps: ChainStepDefinition[];
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export interface ChainRunInput {
|
|
735
|
+
chain: string;
|
|
736
|
+
goal: string;
|
|
737
|
+
original_user_ask?: string;
|
|
738
|
+
run_id?: string;
|
|
739
|
+
execution?: ChainExecutionMode;
|
|
740
|
+
resume?: boolean;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export interface ChainRunResult {
|
|
744
|
+
runId: string;
|
|
745
|
+
runDir: string;
|
|
746
|
+
status: "planned" | "failed_preflight";
|
|
747
|
+
chain?: string;
|
|
748
|
+
steps: number;
|
|
749
|
+
artifacts: string[];
|
|
750
|
+
errors: string[];
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export type ZobComsBodyPolicy = "hash_only" | "redacted";
|
|
754
|
+
|
|
755
|
+
export interface ZobComsMessageInput {
|
|
756
|
+
runId: string;
|
|
757
|
+
sender: string;
|
|
758
|
+
receiver: string;
|
|
759
|
+
kind?: string;
|
|
760
|
+
taskId?: string;
|
|
761
|
+
parentId?: string;
|
|
762
|
+
taskHash?: string;
|
|
763
|
+
outputHash?: string | null;
|
|
764
|
+
status?: string;
|
|
765
|
+
ack?: string;
|
|
766
|
+
metadata?: Record<string, unknown>;
|
|
767
|
+
body?: string;
|
|
768
|
+
bodyPolicy?: ZobComsBodyPolicy;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export interface DelegationTelemetryInput {
|
|
772
|
+
runId: string;
|
|
773
|
+
source: "delegate_agent" | "delegate_task";
|
|
774
|
+
mode: ModeName;
|
|
775
|
+
agent: string;
|
|
776
|
+
model?: string;
|
|
777
|
+
cwd?: string;
|
|
778
|
+
tools: string[];
|
|
779
|
+
taskHash?: string;
|
|
780
|
+
outputHash?: string;
|
|
781
|
+
outputContract?: string;
|
|
782
|
+
status: string;
|
|
783
|
+
gatePassed?: boolean;
|
|
784
|
+
gateErrors?: string[];
|
|
785
|
+
failureKind?: DelegationFailureKind;
|
|
786
|
+
assistantTurnSeen?: boolean;
|
|
787
|
+
outputCaptured?: boolean;
|
|
788
|
+
outputValidated?: boolean;
|
|
789
|
+
evidenceChecked?: boolean;
|
|
790
|
+
stopCondition?: ChildStopCondition;
|
|
791
|
+
usage?: ChildResult["usage"];
|
|
792
|
+
latencyMs: number;
|
|
793
|
+
startedAt: string;
|
|
794
|
+
endedAt: string;
|
|
795
|
+
sessionPath?: string;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export interface FactoryTelemetryInput {
|
|
799
|
+
runId: string;
|
|
800
|
+
runDir?: string;
|
|
801
|
+
factory: string;
|
|
802
|
+
mode: string;
|
|
803
|
+
execution: FactoryExecutionMode;
|
|
804
|
+
status: string;
|
|
805
|
+
itemCount: number;
|
|
806
|
+
processed: number;
|
|
807
|
+
failed: number;
|
|
808
|
+
expectedArtifacts: string[];
|
|
809
|
+
generatedArtifacts: string[];
|
|
810
|
+
stageCount: number;
|
|
811
|
+
agenticTasks: number;
|
|
812
|
+
failuresByStage: Record<string, number>;
|
|
813
|
+
retryCount: number;
|
|
814
|
+
usage?: ChildResult["usage"];
|
|
815
|
+
wallTimeMs: number;
|
|
816
|
+
startedAt: string;
|
|
817
|
+
endedAt: string;
|
|
818
|
+
errors?: string[];
|
|
819
|
+
budgetEnforced?: boolean;
|
|
820
|
+
modelRouterUsed?: boolean;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export interface BudgetPreflightDryRunCaps {
|
|
824
|
+
maxCostUsd?: number;
|
|
825
|
+
maxRuns?: number;
|
|
826
|
+
maxDurationMs?: number;
|
|
827
|
+
maxParallelChildren?: number;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export interface BudgetPreflightDryRunInput {
|
|
831
|
+
costUsd?: number;
|
|
832
|
+
runs?: number;
|
|
833
|
+
durationMs?: number;
|
|
834
|
+
parallelChildren?: number;
|
|
835
|
+
caps?: BudgetPreflightDryRunCaps;
|
|
836
|
+
strictRequested?: boolean;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export interface ChildStopConditionInput {
|
|
840
|
+
status?: string;
|
|
841
|
+
agent?: string;
|
|
842
|
+
outputContract?: string;
|
|
843
|
+
output?: string;
|
|
844
|
+
assistantTurnSeen?: boolean;
|
|
845
|
+
outputHash?: string;
|
|
846
|
+
outputCaptured?: boolean;
|
|
847
|
+
outputValidated?: boolean;
|
|
848
|
+
evidenceChecked?: boolean;
|
|
849
|
+
timedOut?: boolean;
|
|
850
|
+
blocked?: boolean;
|
|
851
|
+
scopeViolation?: boolean;
|
|
852
|
+
preflightPassed?: boolean;
|
|
853
|
+
agenticFailed?: boolean;
|
|
854
|
+
failLoopExceeded?: boolean;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export interface RunawayGuardInput {
|
|
858
|
+
recentStatuses?: string[];
|
|
859
|
+
failures?: number;
|
|
860
|
+
failLoopThreshold?: number;
|
|
861
|
+
budgetWouldExceed?: boolean;
|
|
862
|
+
budgetEnforced?: boolean;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export type QueueState = "pending" | "running" | "done" | "failed";
|
|
866
|
+
export type ReadOnlyQueueJobType = "docs_watch" | "repo_audit_readonly" | "todo_risk_report" | "session_analysis";
|
|
867
|
+
|
|
868
|
+
export interface ReadOnlyQueueJob {
|
|
869
|
+
schema?: string;
|
|
870
|
+
id: string;
|
|
871
|
+
type: ReadOnlyQueueJobType | string;
|
|
872
|
+
readOnly?: boolean;
|
|
873
|
+
paths?: string[];
|
|
874
|
+
adapters?: string[];
|
|
875
|
+
budget?: BudgetPreflightDryRunCaps & { strictRequested?: boolean; strictEnabled?: boolean; observedCostUsd?: number; observedRuns?: number; observedDurationMs?: number; observedParallelChildren?: number; estimatedCostUsd?: number; estimatedRuns?: number; estimatedDurationMs?: number; estimatedParallelChildren?: number };
|
|
876
|
+
createdAt?: string;
|
|
877
|
+
attempts?: number;
|
|
878
|
+
maxRetries?: number;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface QueueTickResult {
|
|
882
|
+
schema: "zob.queue-tick-result.v1";
|
|
883
|
+
claimed: boolean;
|
|
884
|
+
jobId?: string;
|
|
885
|
+
jobType?: string;
|
|
886
|
+
status: "idle" | "done" | "failed";
|
|
887
|
+
claimedPath?: string;
|
|
888
|
+
finalPath?: string;
|
|
889
|
+
errors: string[];
|
|
890
|
+
stopCondition: ChildStopCondition;
|
|
891
|
+
lease?: Record<string, unknown>;
|
|
892
|
+
heartbeat?: Record<string, unknown>;
|
|
893
|
+
staleRecovered?: number;
|
|
894
|
+
killSwitch?: Record<string, unknown>;
|
|
895
|
+
maxWorkers?: number;
|
|
896
|
+
retryPolicy?: Record<string, unknown>;
|
|
897
|
+
strictBudgetGate?: Record<string, unknown>;
|
|
898
|
+
budgetEnforced: boolean;
|
|
899
|
+
promptBodiesStored: false;
|
|
900
|
+
outputBodiesStored: false;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
export type ChildStopCondition =
|
|
904
|
+
| "none"
|
|
905
|
+
| "failed_preflight"
|
|
906
|
+
| "incomplete_no_assistant_turn"
|
|
907
|
+
| "incomplete_no_evidence"
|
|
908
|
+
| "failed_validation"
|
|
909
|
+
| "timeout"
|
|
910
|
+
| "blocked"
|
|
911
|
+
| "scope_violation"
|
|
912
|
+
| "agentic_failed"
|
|
913
|
+
| "oracle_fail"
|
|
914
|
+
| "no_ship"
|
|
915
|
+
| "fail_loop";
|
|
916
|
+
|
|
917
|
+
export type ChronicleRunKind = "delegation" | "factory" | "orchestration";
|
|
918
|
+
|
|
919
|
+
export interface ChronicleClassifyInput {
|
|
920
|
+
kind: ChronicleRunKind;
|
|
921
|
+
runId: string;
|
|
922
|
+
status?: string;
|
|
923
|
+
taskHash?: string;
|
|
924
|
+
outputHash?: string;
|
|
925
|
+
evidencePaths?: string[];
|
|
926
|
+
assistantTurnSeen?: boolean;
|
|
927
|
+
outputCaptured?: boolean;
|
|
928
|
+
outputValidated?: boolean;
|
|
929
|
+
evidenceChecked?: boolean;
|
|
930
|
+
stopCondition?: ChildStopCondition;
|
|
931
|
+
preflightPassed?: boolean;
|
|
932
|
+
scopeViolation?: boolean;
|
|
933
|
+
timedOut?: boolean;
|
|
934
|
+
blocked?: boolean;
|
|
935
|
+
agenticFailed?: boolean;
|
|
936
|
+
planned?: boolean;
|
|
937
|
+
budget?: { enforced?: boolean; advisory?: boolean };
|
|
938
|
+
errors?: string[];
|
|
939
|
+
}
|