zob-harness 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/capabilities/zob-public-runtime-capabilities.json +4 -4
- package/.pi/extensions/zob-child-safety/AGENTS.md +12 -0
- package/.pi/extensions/zob-child-safety/index.ts +4 -105
- package/.pi/extensions/zob-child-safety/src/AGENTS.md +10 -0
- package/.pi/extensions/zob-child-safety/src/policy.ts +106 -0
- package/.pi/extensions/zob-harness/AGENTS.md +2 -0
- package/.pi/extensions/zob-harness/index.ts +94 -94
- package/.pi/extensions/zob-harness/src/AGENTS.md +4 -0
- package/.pi/extensions/zob-harness/src/core/AGENTS.md +24 -0
- package/.pi/extensions/zob-harness/src/{constants.ts → core/constants.ts} +10 -1
- package/.pi/extensions/zob-harness/src/core/utils/AGENTS.md +23 -0
- package/.pi/extensions/zob-harness/src/{utils → core/utils}/formatting.ts +1 -1
- package/.pi/extensions/zob-harness/src/{utils → core/utils}/records.ts +1 -1
- package/.pi/extensions/zob-harness/src/{utils → core/utils}/resources.ts +1 -1
- package/.pi/extensions/zob-harness/src/domains/AGENTS.md +23 -0
- package/.pi/extensions/zob-harness/src/domains/autonomy/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{autonomous-runtime.ts → domains/autonomy/autonomous-runtime.ts} +22 -22
- package/.pi/extensions/zob-harness/src/{autonomy-readiness.ts → domains/autonomy/autonomy-readiness.ts} +18 -18
- package/.pi/extensions/zob-harness/src/{daemon-policy.ts → domains/autonomy/daemon-policy.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{daemon-readiness.ts → domains/autonomy/daemon-readiness.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{daemon-runtime.ts → domains/autonomy/daemon-runtime.ts} +2 -2
- package/.pi/extensions/zob-harness/src/{full-autonomy-test.ts → domains/autonomy/full-autonomy-test.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{interactive-autonomy.ts → domains/autonomy/interactive-autonomy.ts} +2 -2
- package/.pi/extensions/zob-harness/src/{compute-profile.ts → domains/compute/compute-profile.ts} +3 -3
- package/.pi/extensions/zob-harness/src/{compute-workflow-shape.ts → domains/compute/compute-workflow-shape.ts} +3 -3
- package/.pi/extensions/zob-harness/src/domains/coms/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/envelope.ts +2 -2
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/identity.ts +3 -3
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/ledger-bridge.ts +2 -2
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/local-transport.ts +1 -1
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/policy.ts +3 -3
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/presence.ts +1 -1
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/registry.ts +47 -4
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/response-capture.ts +1 -1
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/transcript-capture.ts +2 -2
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/zpeer-profile.ts +3 -3
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/zpeer.ts +35 -7
- package/.pi/extensions/zob-harness/src/{mission-control.ts → domains/coms/mission-control.ts} +12 -9
- package/.pi/extensions/zob-harness/src/{zagents.ts → domains/coms/zagents.ts} +86 -4
- package/.pi/extensions/zob-harness/src/domains/context/AGENTS.md +20 -0
- package/.pi/extensions/zob-harness/src/{context-gbrain.ts → domains/context/context-gbrain.ts} +4 -4
- package/.pi/extensions/zob-harness/src/domains/delegation/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{agents.ts → domains/delegation/agents.ts} +2 -2
- package/.pi/extensions/zob-harness/src/{capabilities.ts → domains/delegation/capabilities.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{child-runner.ts → domains/delegation/child-runner.ts} +8 -8
- package/.pi/extensions/zob-harness/src/{output-contracts.ts → domains/delegation/output-contracts.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{prompt-packs.ts → domains/delegation/prompt-packs.ts} +4 -4
- package/.pi/extensions/zob-harness/src/domains/factory/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/agentic-plan.ts +1 -1
- package/.pi/extensions/zob-harness/src/{factory-selector.ts → domains/factory/factory-selector.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/quarantine.ts +5 -5
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/run.ts +5 -5
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/validation.ts +10 -10
- package/.pi/extensions/zob-harness/src/domains/git/AGENTS.md +20 -0
- package/.pi/extensions/zob-harness/src/{git-ops.ts → domains/git/git-ops.ts} +3 -3
- package/.pi/extensions/zob-harness/src/domains/goal/AGENTS.md +22 -0
- package/.pi/extensions/zob-harness/src/{goal-room.ts → domains/goal/goal-room.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{goal-todo-imports.ts → domains/goal/goal-todo-imports.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{goal-todo-types.ts → domains/goal/goal-todo-types.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{goal-todos.ts → domains/goal/goal-todos.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{goal.ts → domains/goal/goal.ts} +1 -1
- package/.pi/extensions/zob-harness/src/domains/governance/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{budget-policy.ts → domains/governance/budget-policy.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{governed-requests.ts → domains/governance/governed-requests.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{launch-apply.ts → domains/governance/launch-apply.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{merge-queue.ts → domains/governance/merge-queue.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{rules.ts → domains/governance/rules.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{safety.ts → domains/governance/safety.ts} +3 -3
- package/.pi/extensions/zob-harness/src/{sandbox.ts → domains/governance/sandbox.ts} +5 -5
- package/.pi/extensions/zob-harness/src/{worker-pool.ts → domains/governance/worker-pool.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{workspace-claims.ts → domains/governance/workspace-claims.ts} +6 -6
- package/.pi/extensions/zob-harness/src/domains/models/AGENTS.md +20 -0
- package/.pi/extensions/zob-harness/src/{model-availability.ts → domains/models/model-availability.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{model-routing.ts → domains/models/model-routing.ts} +6 -6
- package/.pi/extensions/zob-harness/src/domains/orchestration/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/adaptive-delegation.ts +8 -8
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/adaptive-workflow.ts +4 -4
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/lead-plan.ts +5 -5
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/plan.ts +5 -5
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/room.ts +4 -4
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/run.ts +6 -6
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/supervised-readonly.ts +6 -6
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/widget-readers.ts +2 -2
- package/.pi/extensions/zob-harness/src/domains/project-dna/AGENTS.md +19 -0
- package/.pi/extensions/zob-harness/src/{project-dna.ts → domains/project-dna/project-dna.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/candidate.ts +5 -5
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/coms.ts +3 -3
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/documentation.ts +4 -4
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/factory.ts +2 -2
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/temp-agent.ts +4 -4
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/write-lane.ts +3 -3
- package/.pi/extensions/zob-harness/src/domains/telemetry/AGENTS.md +19 -0
- package/.pi/extensions/zob-harness/src/{chronicle.ts → domains/telemetry/chronicle.ts} +3 -3
- package/.pi/extensions/zob-harness/src/{queue.ts → domains/telemetry/queue.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{telemetry.ts → domains/telemetry/telemetry.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/chains.ts +10 -10
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/coms.ts +3 -3
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/orchestration-profiles.ts +8 -8
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/teams.ts +8 -8
- package/.pi/extensions/zob-harness/src/runtime/adaptive-zmode.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/auto-compaction.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/commands.ts +51 -29
- package/.pi/extensions/zob-harness/src/runtime/compaction-policy.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/delegation-feed.ts +1 -1
- package/.pi/extensions/zob-harness/src/runtime/delegation-monitor.ts +1 -1
- package/.pi/extensions/zob-harness/src/runtime/events.ts +53 -37
- package/.pi/extensions/zob-harness/src/{goal-runtime.ts → runtime/goal-runtime.ts} +9 -9
- package/.pi/extensions/zob-harness/src/runtime/goal-todo-overlay.ts +1 -1
- package/.pi/extensions/zob-harness/src/runtime/plan-capture.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/state.ts +15 -13
- package/.pi/extensions/zob-harness/src/runtime/tools-autonomous.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/tools-compute.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-coms.ts +15 -12
- package/.pi/extensions/zob-harness/src/runtime/tools-context.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/tools-delegation.ts +13 -13
- package/.pi/extensions/zob-harness/src/runtime/tools-factory.ts +19 -19
- package/.pi/extensions/zob-harness/src/runtime/tools-goal-room.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-governed-requests.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-merge-queue.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-mission-control.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-orchestration.ts +9 -9
- package/.pi/extensions/zob-harness/src/runtime/tools-project-dna.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/tools-worker-pool.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-workspace-claims.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-zcommit.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/widget.ts +27 -10
- package/.pi/extensions/zob-harness/src/runtime/zobHarness.ts +1 -1
- package/.pi/extensions/zob-harness/src/types.ts +2 -2
- package/.pi/extensions/zob-switch/AGENTS.md +9 -0
- package/.pi/extensions/zob-switch/index.ts +9 -121
- package/.pi/extensions/zob-switch/src/AGENTS.md +8 -0
- package/.pi/extensions/zob-switch/src/autocomplete.ts +12 -0
- package/.pi/extensions/zob-switch/src/paths.ts +8 -0
- package/.pi/extensions/zob-switch/src/settings.ts +25 -0
- package/.pi/extensions/zob-switch/src/snapshot.ts +34 -0
- package/.pi/extensions/zob-switch/src/state.ts +57 -0
- package/.pi/factories/agentic-spec-team/README.md +35 -0
- package/.pi/factories/agentic-spec-team/batch-manifest.json +11 -0
- package/.pi/factories/agentic-spec-team/example-agentic-spec-manifest.json +19 -0
- package/.pi/factories/agentic-spec-team/factory.json +98 -0
- package/.pi/factories/agentic-spec-team/pilot-manifest.json +11 -0
- package/.pi/factories/agentic-spec-team/schemas/final-report.schema.json +15 -0
- package/.pi/factories/agentic-spec-team/schemas/manifest.schema.json +14 -0
- package/.pi/factories/agentic-spec-team/schemas/question.schema.json +18 -0
- package/.pi/factories/agentic-spec-team/schemas/source-register.schema.json +11 -0
- package/.pi/factories/agentic-spec-team/schemas/traceability.schema.json +11 -0
- package/.pi/factories/agentic-spec-team/smoke-manifest.json +11 -0
- package/.pi/skills/zob-agentic-spec-team/SKILL.md +148 -0
- package/.pi/skills/zob-coms-safety/SKILL.md +13 -0
- package/.pi/skills/zob-coms-v2-live/SKILL.md +11 -0
- package/.pi/skills/zob-factory/SKILL.md +21 -0
- package/.pi/skills/zob-harness/SKILL.md +14 -0
- package/.pi/skills/zob-split-refactor/SKILL.md +1 -1
- package/.pi/skills/zob-zagent-creator/SKILL.md +266 -12
- package/.pi/zagents/agent-factory-pacman-chief.json +22 -0
- package/.pi/zagents/agent-factory-pacman-engine-builder.json +21 -0
- package/.pi/zagents/agent-factory-pacman-frontend-builder.json +21 -0
- package/.pi/zagents/agent-factory-pacman-game-architect.json +21 -0
- package/.pi/zagents/agent-factory-pacman-game-designer.json +21 -0
- package/.pi/zagents/agent-factory-pacman-qa-oracle.json +21 -0
- package/.pi/zagents/bdd-writer.json +20 -0
- package/.pi/zagents/data-profile-analyst.json +20 -0
- package/.pi/zagents/domain-modeler.json +20 -0
- package/.pi/zagents/planner-handoff-writer.json +20 -0
- package/.pi/zagents/prompts/agent-factory-pacman-chief.md +53 -0
- package/.pi/zagents/prompts/agent-factory-pacman-engine-builder.md +41 -0
- package/.pi/zagents/prompts/agent-factory-pacman-frontend-builder.md +40 -0
- package/.pi/zagents/prompts/agent-factory-pacman-game-architect.md +41 -0
- package/.pi/zagents/prompts/agent-factory-pacman-game-designer.md +43 -0
- package/.pi/zagents/prompts/agent-factory-pacman-qa-oracle.md +51 -0
- package/.pi/zagents/prompts/agentic-spec-run-role.md +30 -0
- package/.pi/zagents/source-intake-steward.json +20 -0
- package/.pi/zagents/spec-chief.json +21 -0
- package/.pi/zagents/spec-oracle.json +20 -0
- package/.pi/zagents/spec-writer.json +20 -0
- package/.pi/zagents/ux-flow-analyst.json +20 -0
- package/.pi/zteams/agent-factory-pacman-multiplayer-runtime.mjs +384 -0
- package/.pi/zteams/agent-factory-pacman-multiplayer.json +42 -0
- package/.pi/zteams/agent-factory-pacman-multiplayer.tmux.sh +256 -0
- package/.pi/zteams/agentic-spec-run.json +42 -0
- package/.pi/zteams/agentic-spec-run.tmux.sh +134 -0
- package/.pi/zteams/templates/agent-factory-pacman-chief-kickoff.template.md +71 -0
- package/.pi/zteams/templates/agent-factory-pacman-worker-kickoff.template.md +59 -0
- package/README.md +183 -110
- package/SOURCE_INDEX.md +5 -1
- package/examples/agent-factory-mission-control/AGENTS.md +10 -0
- package/examples/agent-factory-mission-control/README.md +17 -0
- package/examples/agent-factory-mission-control/apps/api/AGENTS.md +3 -0
- package/examples/agent-factory-mission-control/apps/dashboard/AGENTS.md +3 -0
- package/examples/agent-factory-mission-control/mission.md +3 -0
- package/examples/agent-factory-mission-control/output-contract.md +3 -0
- package/examples/agent-factory-mission-control/packages/domain/AGENTS.md +3 -0
- package/examples/agent-factory-mission-control/packages/snapshot-reader/AGENTS.md +3 -0
- package/examples/agent-factory-pacman-multiplayer/AGENTS.md +27 -0
- package/examples/agent-factory-pacman-multiplayer/README.md +84 -0
- package/examples/agent-factory-pacman-multiplayer/mission.md +43 -0
- package/examples/agent-factory-pacman-multiplayer/output-contract.md +58 -0
- package/examples/agent-factory-tmux-comms/README.md +146 -0
- package/examples/agent-factory-tmux-comms/chief-kickoff.template.md +54 -0
- package/examples/agent-factory-tmux-comms/simple-agent-factory.team.json +92 -0
- package/examples/agent-factory-tmux-comms/simple-agent-factory.tmux.sh +248 -0
- package/examples/agent-factory-tmux-comms/worker-kickoff.template.md +43 -0
- package/package.json +17 -3
- package/scripts/README.md +1 -1
- package/scripts/agentic-spec-team/validate-bdd.mjs +13 -0
- package/scripts/agentic-spec-team/validate-final-report.mjs +14 -0
- package/scripts/agentic-spec-team/validate-manifest.mjs +14 -0
- package/scripts/agentic-spec-team/validate-oracle-ready.mjs +13 -0
- package/scripts/agentic-spec-team/validate-question-loop.mjs +15 -0
- package/scripts/agentic-spec-team/validate-run.mjs +11 -0
- package/scripts/agentic-spec-team/validate-source-register.mjs +17 -0
- package/scripts/agentic-spec-team/validate-traceability.mjs +20 -0
- package/scripts/agentic-spec-team/validate-workgraph.mjs +13 -0
- package/scripts/autonomy/mission-readiness-secret-smoke.mjs +5 -5
- package/scripts/git-ops/commit-policy-smoke.mjs +5 -4
- package/scripts/goal-todo/child-goal-ref-smoke.mjs +2 -2
- package/scripts/path-policy/validate-smoke.mjs +3 -3
- package/scripts/project-dna/AGENTS.md +39 -0
- package/scripts/project-dna/{validate-scaffold.mjs → validation/validate-scaffold.mjs} +7 -7
- package/scripts/spec-run.mjs +365 -0
- package/scripts/worker-pool/static-smoke.mjs +5 -5
- package/scripts/zagent-static-smoke.mjs +35 -6
- package/scripts/zpeer-local-e2e-smoke.mjs +12 -5
- package/scripts/zpeer-static-smoke.mjs +17 -17
- /package/.pi/extensions/zob-harness/src/{types → core/types}/core.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{utils → core/utils}/hashing.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{utils → core/utils}/json.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{utils → core/utils}/paths.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/AGENTS.md +0 -0
- /package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/pending-replies.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/types.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/ledger.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/types.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/validate.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{schemas-project-dna.ts → runtime/schemas-project-dna.ts} +0 -0
- /package/.pi/extensions/zob-harness/src/{schemas.ts → runtime/schemas.ts} +0 -0
- /package/scripts/project-dna/{bench-smoke.mjs → benchmark/bench-smoke.mjs} +0 -0
- /package/scripts/project-dna/{build-capsules.mjs → capsules/build-capsules.mjs} +0 -0
- /package/scripts/project-dna/{emit-golden-cases.mjs → emit/emit-golden-cases.mjs} +0 -0
- /package/scripts/project-dna/{emit-ontology.mjs → emit/emit-ontology.mjs} +0 -0
- /package/scripts/project-dna/{oracle-review-smoke.mjs → oracle/oracle-review-smoke.mjs} +0 -0
- /package/scripts/project-dna/{query-context.mjs → query/query-context.mjs} +0 -0
- /package/scripts/project-dna/{query-steward.mjs → query/query-steward.mjs} +0 -0
- /package/scripts/project-dna/{build-sample-spec.mjs → sample/build-sample-spec.mjs} +0 -0
- /package/scripts/project-dna/{generate-sample.mjs → sample/generate-sample.mjs} +0 -0
- /package/scripts/project-dna/{validate-sample-project.mjs → sample/validate-sample-project.mjs} +0 -0
- /package/scripts/project-dna/{scan.mjs → scan/scan.mjs} +0 -0
- /package/scripts/project-dna/{validate-scan-artifacts.mjs → scan/validate-scan-artifacts.mjs} +0 -0
- /package/scripts/project-dna/{validate-5of5.mjs → validation/validate-5of5.mjs} +0 -0
- /package/scripts/project-dna/{validate-golden-cases.mjs → validation/validate-golden-cases.mjs} +0 -0
- /package/scripts/project-dna/{validate-ontology.mjs → validation/validate-ontology.mjs} +0 -0
- /package/scripts/project-dna/{plan-workflow.mjs → workflow/plan-workflow.mjs} +0 -0
- /package/scripts/project-dna/{validate-workflow.mjs → workflow/validate-workflow.mjs} +0 -0
package/.pi/extensions/zob-harness/src/{launch-apply.ts → domains/governance/launch-apply.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_RULES } from "
|
|
2
|
-
import { sha256 } from "
|
|
3
|
-
import { pathMatches, resolveRepoPath, safeFileStem } from "
|
|
4
|
-
import { isRecord } from "
|
|
1
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
2
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
3
|
+
import { pathMatches, resolveRepoPath, safeFileStem } from "../../core/utils/paths.js";
|
|
4
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
5
5
|
|
|
6
6
|
export type WorkerPoolLaneKind = "context" | "factory" | "implement" | "qa" | "oracle";
|
|
7
7
|
export type ApplyGateStatus = "eligible_not_applied" | "blocked";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { appendFileSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { DEFAULT_RULES } from "
|
|
5
|
-
import type { TeamDefinition } from "
|
|
6
|
-
import { sha256 } from "
|
|
7
|
-
import { readJsonl } from "
|
|
8
|
-
import { pathMatches, resolveRepoPath, safeFileStem } from "
|
|
9
|
-
import { isRecord } from "
|
|
4
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
5
|
+
import type { TeamDefinition } from "../../types.js";
|
|
6
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
7
|
+
import { readJsonl } from "../../core/utils/json.js";
|
|
8
|
+
import { pathMatches, resolveRepoPath, safeFileStem } from "../../core/utils/paths.js";
|
|
9
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
10
10
|
|
|
11
11
|
export type MergeCandidatePriority = "low" | "normal" | "high" | "critical";
|
|
12
12
|
export type MergeCandidateRisk = "low" | "medium" | "high";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
2
|
import { basename, join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import type { ModeName, RuleEnforcementLevel, RuleOracleRequirement, RulePack, RuleResolution, RuleResolverInput } from "
|
|
5
|
-
import { pathMatches, safeFileStem } from "
|
|
6
|
-
import { isRecord } from "
|
|
4
|
+
import type { ModeName, RuleEnforcementLevel, RuleOracleRequirement, RulePack, RuleResolution, RuleResolverInput } from "../../types.js";
|
|
5
|
+
import { pathMatches, safeFileStem } from "../../core/utils/paths.js";
|
|
6
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
7
7
|
|
|
8
8
|
const RULE_PACK_SCHEMA = "zob.rule-pack.v1";
|
|
9
9
|
const RULE_RESOLUTION_SCHEMA = "zob.rule-resolution.v1";
|
|
@@ -12,11 +12,11 @@ const MODE_NAMES = new Set<ModeName>(["explore", "plan", "implement", "oracle",
|
|
|
12
12
|
const ENFORCEMENT_LEVELS = new Set<RuleEnforcementLevel>(["advisory", "warn", "preflight_fail", "block", "no_ship", "human_approval"]);
|
|
13
13
|
|
|
14
14
|
const PROFILE_PATHS: Array<{ profile: string; patterns: string[] }> = [
|
|
15
|
-
{ profile: "factory-engineer", patterns: [".pi/extensions/zob-harness/src/factory/**", ".pi/factories/**", "reports/factory-runs/**"] },
|
|
16
|
-
{ profile: "orchestration-engineer", patterns: [".pi/extensions/zob-harness/src/orchestration/**", ".pi/extensions/zob-harness/src/topology/**", ".pi/teams/**", ".pi/orchestrations/**", "reports/orchestrations/**"] },
|
|
15
|
+
{ profile: "factory-engineer", patterns: [".pi/extensions/zob-harness/src/domains/factory/**", ".pi/factories/**", "reports/factory-runs/**"] },
|
|
16
|
+
{ profile: "orchestration-engineer", patterns: [".pi/extensions/zob-harness/src/domains/orchestration/**", ".pi/extensions/zob-harness/src/domains/topology/**", ".pi/teams/**", ".pi/orchestrations/**", "reports/orchestrations/**"] },
|
|
17
17
|
{ profile: "prompt-ops", patterns: [".pi/agents/**", ".pi/prompts/**", ".pi/skills/**", ".pi/output-contracts/**", ".pi/chains/**"] },
|
|
18
|
-
{ profile: "sandbox-engineer", patterns: ["reports/sandbox-runs/**", ".pi/extensions/zob-harness/src/safety.ts", ".pi/extensions/zob-harness/src/child-runner.ts"] },
|
|
19
|
-
{ profile: "runtime-maintainer", patterns: [".pi/extensions/zob-harness/index.ts", ".pi/extensions/zob-harness/src/runtime/**", ".pi/extensions/zob-harness/src/schemas.ts", ".pi/extensions/zob-harness/src/types.ts", ".pi/extensions/zob-harness/src/rules.ts"] },
|
|
18
|
+
{ profile: "sandbox-engineer", patterns: ["reports/sandbox-runs/**", ".pi/extensions/zob-harness/src/domains/governance/safety.ts", ".pi/extensions/zob-harness/src/domains/delegation/child-runner.ts"] },
|
|
19
|
+
{ profile: "runtime-maintainer", patterns: [".pi/extensions/zob-harness/index.ts", ".pi/extensions/zob-harness/src/runtime/**", ".pi/extensions/zob-harness/src/runtime/schemas.ts", ".pi/extensions/zob-harness/src/types.ts", ".pi/extensions/zob-harness/src/domains/governance/rules.ts"] },
|
|
20
20
|
{ profile: "docs-maintainer", patterns: ["docs/**", "README.md", "AGENTS.md"] },
|
|
21
21
|
];
|
|
22
22
|
|
|
@@ -2,9 +2,9 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
3
|
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
|
|
5
|
-
import { DEFAULT_RULES } from "
|
|
6
|
-
import type { BudgetSidecar, DamageRules, HarnessAgent } from "
|
|
7
|
-
import { expandHome, pathMatches } from "
|
|
5
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
6
|
+
import type { BudgetSidecar, DamageRules, HarnessAgent } from "../../types.js";
|
|
7
|
+
import { expandHome, pathMatches } from "../../core/utils/paths.js";
|
|
8
8
|
|
|
9
9
|
function loadDamageRules(cwd: string): DamageRules {
|
|
10
10
|
const candidates = [join(cwd, ".pi", "damage-control-rules.json"), join(getAgentDir(), "damage-control-rules.json")];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join, resolve } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { DEFAULT_RULES } from "
|
|
4
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
5
5
|
import { createDiffGateResult, createRollbackMetadata, createSandboxMetadata, validateRuntimeWritePolicy } from "./safety.js";
|
|
6
|
-
import { sha256 } from "
|
|
7
|
-
import { parseJsonFile } from "
|
|
8
|
-
import { pathMatches, resolveRepoPath, safeFileStem, safeRunId } from "
|
|
9
|
-
import { isRecord } from "
|
|
6
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
7
|
+
import { parseJsonFile } from "../../core/utils/json.js";
|
|
8
|
+
import { pathMatches, resolveRepoPath, safeFileStem, safeRunId } from "../../core/utils/paths.js";
|
|
9
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
10
10
|
|
|
11
11
|
export type SandboxWriteAction = "create" | "update";
|
|
12
12
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { DEFAULT_RULES } from "
|
|
5
|
-
import { appendGoalRoomMessage } from "
|
|
6
|
-
import type { TeamDefinition } from "
|
|
7
|
-
import { sha256 } from "
|
|
8
|
-
import { readJsonl } from "
|
|
9
|
-
import { newRunId, pathMatches, resolveRepoPath, safeFileStem } from "
|
|
10
|
-
import { isRecord } from "
|
|
4
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
5
|
+
import { appendGoalRoomMessage } from "../goal/goal-room.js";
|
|
6
|
+
import type { TeamDefinition } from "../../types.js";
|
|
7
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
8
|
+
import { readJsonl } from "../../core/utils/json.js";
|
|
9
|
+
import { newRunId, pathMatches, resolveRepoPath, safeFileStem } from "../../core/utils/paths.js";
|
|
10
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
11
11
|
import { listWorkspaceClaims, type WorkspaceClaimRecord } from "./workspace-claims.js";
|
|
12
12
|
|
|
13
13
|
export type WorkerPoolCommunicationPolicyMode = "goal_room_only" | "goal_room_with_optional_live";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { DEFAULT_RULES } from "
|
|
5
|
-
import type { TeamDefinition } from "
|
|
6
|
-
import { sha256 } from "
|
|
7
|
-
import { readJsonl } from "
|
|
8
|
-
import { pathMatches, resolveRepoPath, safeFileStem } from "
|
|
9
|
-
import { isRecord } from "
|
|
4
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
5
|
+
import type { TeamDefinition } from "../../types.js";
|
|
6
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
7
|
+
import { readJsonl } from "../../core/utils/json.js";
|
|
8
|
+
import { pathMatches, resolveRepoPath, safeFileStem } from "../../core/utils/paths.js";
|
|
9
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
10
10
|
|
|
11
11
|
export type WorkspaceClaimMode = "read" | "write";
|
|
12
12
|
export type WorkspaceClaimStatus = "active" | "blocked_conflict";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Models domain guardrail
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
- Model routing, model availability validation, model catalog/economy helpers.
|
|
6
|
+
|
|
7
|
+
## MUST DO
|
|
8
|
+
|
|
9
|
+
- Preserve explicit model override validation and configured/runtime availability distinctions.
|
|
10
|
+
- Keep budget and routing decisions evidence-backed.
|
|
11
|
+
|
|
12
|
+
## MUST NOT
|
|
13
|
+
|
|
14
|
+
- Do not treat desired/configured/catalogued models as runtime availability proof.
|
|
15
|
+
- Do not import from `index.ts` or `index.js`.
|
|
16
|
+
|
|
17
|
+
## Validation
|
|
18
|
+
|
|
19
|
+
- `npm run check -- --pretty false`.
|
|
20
|
+
- Run model catalog validation scripts when model policy files or helpers move.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { evaluateBudgetPreflightDryRun } from "
|
|
5
|
-
import type { BudgetPreflightDryRunCaps, FactoryRunModelRoutingInput, ModeName } from "
|
|
6
|
-
import { sha256 } from "
|
|
7
|
-
import { parseJsonFile } from "
|
|
8
|
-
import { safeFileStem } from "
|
|
9
|
-
import { isRecord } from "
|
|
4
|
+
import { evaluateBudgetPreflightDryRun } from "../telemetry/chronicle.js";
|
|
5
|
+
import type { BudgetPreflightDryRunCaps, FactoryRunModelRoutingInput, ModeName } from "../../types.js";
|
|
6
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
7
|
+
import { parseJsonFile } from "../../core/utils/json.js";
|
|
8
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
9
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
10
10
|
|
|
11
11
|
export type ModelRiskLevel = "low" | "medium" | "high";
|
|
12
12
|
export type ModelClass = "cheap_scout" | "balanced_worker" | "strong_reasoning" | "strong_oracle" | "high_context";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Orchestration domain compatibility guardrail
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
- Future home for orchestration domain files and compatibility wrappers around `src/orchestration/**`.
|
|
6
|
+
- Existing `src/orchestration/AGENTS.md` remains authoritative for current internals until moved.
|
|
7
|
+
|
|
8
|
+
## MUST DO
|
|
9
|
+
|
|
10
|
+
- Preserve plan-only/read-only supervised semantics, parent-owned dispatch, room artifact names, and no child-spawns-child policy.
|
|
11
|
+
|
|
12
|
+
## MUST NOT
|
|
13
|
+
|
|
14
|
+
- Do not make plan-only flows produce completion sentinels.
|
|
15
|
+
- Do not launch live children from supervised_readonly by moving code.
|
|
16
|
+
- Do not import from `index.ts` or `index.js`.
|
|
17
|
+
|
|
18
|
+
## Validation
|
|
19
|
+
|
|
20
|
+
- `npm run check -- --pretty false`.
|
|
21
|
+
- `npm run smoke:harness` after orchestration moves.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { discoverAgents } from "../agents.js";
|
|
5
|
-
import { DEFAULT_RULES, SUPERVISED_READONLY_CHILD_TOOLS } from "
|
|
6
|
-
import { validateOutputContractId } from "../output-contracts.js";
|
|
7
|
-
import { validateAllowedPathPolicy } from "../safety.js";
|
|
4
|
+
import { discoverAgents } from "../delegation/agents.js";
|
|
5
|
+
import { DEFAULT_RULES, SUPERVISED_READONLY_CHILD_TOOLS } from "../../core/constants.js";
|
|
6
|
+
import { validateOutputContractId } from "../delegation/output-contracts.js";
|
|
7
|
+
import { validateAllowedPathPolicy } from "../governance/safety.js";
|
|
8
8
|
import type {
|
|
9
9
|
AdaptiveDelegationGovernorState,
|
|
10
10
|
AdaptiveDelegationPolicy,
|
|
@@ -17,10 +17,10 @@ import type {
|
|
|
17
17
|
DelegationScore,
|
|
18
18
|
GovernorDecision,
|
|
19
19
|
ParentDispatchContract,
|
|
20
|
-
} from "
|
|
21
|
-
import { sha256 } from "
|
|
22
|
-
import { pathMatches } from "
|
|
23
|
-
import { isRecord } from "
|
|
20
|
+
} from "../../types.js";
|
|
21
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
22
|
+
import { pathMatches } from "../../core/utils/paths.js";
|
|
23
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
24
24
|
|
|
25
25
|
const ADAPTIVE_DELEGATION_SCHEMA = "zob.adaptive-delegation-policy.v1" as const;
|
|
26
26
|
const GOVERNOR_STATE_SCHEMA = "zob.adaptive-delegation-governor-state.v1" as const;
|
package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/adaptive-workflow.ts
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import type { AdaptiveDelegationPolicy, OrchestrateExecutionMode, OrchestrateRunInput, OrchestrationProfileDefinition, TeamDefinition, TeamRoleBase, TeamLead, TeamWorker } from "
|
|
5
|
-
import { sha256 } from "
|
|
6
|
-
import { safeFileStem } from "
|
|
7
|
-
import { isRecord } from "
|
|
4
|
+
import type { AdaptiveDelegationPolicy, OrchestrateExecutionMode, OrchestrateRunInput, OrchestrationProfileDefinition, TeamDefinition, TeamRoleBase, TeamLead, TeamWorker } from "../../types.js";
|
|
5
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
6
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
7
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
8
8
|
|
|
9
9
|
const BODY_FREE_SCHEMA_VERSION = "v1";
|
|
10
10
|
const GUIDANCE_SCAN_LIMIT = 200;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { loadProjectAgents } from "../agents.js";
|
|
2
|
-
import { validateOutputContractId } from "../output-contracts.js";
|
|
3
|
-
import { validateAllowedPathPolicy, validateDelegateTaskWriteScope, validateForbiddenPathPolicy, validateToolList } from "../safety.js";
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { isRecord } from "
|
|
1
|
+
import { loadProjectAgents } from "../delegation/agents.js";
|
|
2
|
+
import { validateOutputContractId } from "../delegation/output-contracts.js";
|
|
3
|
+
import { validateAllowedPathPolicy, validateDelegateTaskWriteScope, validateForbiddenPathPolicy, validateToolList } from "../governance/safety.js";
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
6
6
|
|
|
7
7
|
export interface LeadPlanWorkerContract {
|
|
8
8
|
worker_id: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SUPERVISED_READONLY_CHILD_TOOLS, SUPERVISED_SMOKE_CHILD_TOOLS } from "
|
|
2
|
-
import type { OrchestrateExecutionMode, OrchestrateRunInput, TeamDefinition } from "
|
|
1
|
+
import { SUPERVISED_READONLY_CHILD_TOOLS, SUPERVISED_SMOKE_CHILD_TOOLS } from "../../core/constants.js";
|
|
2
|
+
import type { OrchestrateExecutionMode, OrchestrateRunInput, TeamDefinition } from "../../types.js";
|
|
3
3
|
import { normalizeAdaptiveDelegationPolicy } from "./adaptive-delegation.js";
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { safeFileStem } from "
|
|
6
|
-
import { isRecord } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
6
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
7
7
|
|
|
8
8
|
function renderOrchestrationTemplate(template: string, values: Record<string, string>): string {
|
|
9
9
|
return template.replace(/\{([a-zA-Z0-9_.-]+)\}/g, (match, key: string) => values[key] ?? match);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { SUPERVISED_READONLY_CHILD_TOOLS, SUPERVISED_SMOKE_CHILD_TOOLS } from "
|
|
5
|
-
import type { OrchestrateExecutionMode, TeamDefinition } from "
|
|
6
|
-
import { sha256 } from "
|
|
7
|
-
import { isRecord } from "
|
|
4
|
+
import { SUPERVISED_READONLY_CHILD_TOOLS, SUPERVISED_SMOKE_CHILD_TOOLS } from "../../core/constants.js";
|
|
5
|
+
import type { OrchestrateExecutionMode, TeamDefinition } from "../../types.js";
|
|
6
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
7
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
8
8
|
|
|
9
9
|
function orchestrationLedger(runDir: string, entry: Record<string, unknown>): void {
|
|
10
10
|
appendFileSync(join(runDir, "ledger.jsonl"), `${JSON.stringify({ ...entry, timestamp: new Date().toISOString() })}\n`, "utf8");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { resolveComputeProfile } from "../compute-profile.js";
|
|
5
|
-
import { SUPERVISED_SMOKE_CHILD_TOOLS } from "
|
|
6
|
-
import type { OrchestrateExecutionMode, OrchestrateRunInput, OrchestrateRunResult, TeamDefinition } from "
|
|
4
|
+
import { resolveComputeProfile } from "../compute/compute-profile.js";
|
|
5
|
+
import { SUPERVISED_SMOKE_CHILD_TOOLS } from "../../core/constants.js";
|
|
6
|
+
import type { OrchestrateExecutionMode, OrchestrateRunInput, OrchestrateRunResult, TeamDefinition } from "../../types.js";
|
|
7
7
|
import { mirrorOrchestrationToComs } from "../topology/coms.js";
|
|
8
8
|
import { loadOrchestrationProfile, teamDefinitionFromOrchestrationProfile, validateOrchestrateRunInputs } from "../topology/orchestration-profiles.js";
|
|
9
9
|
import { loadTeamDefinition } from "../topology/teams.js";
|
|
10
|
-
import { sha256 } from "
|
|
11
|
-
import { safeRunId } from "
|
|
12
|
-
import { isRecord } from "
|
|
10
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
11
|
+
import { safeRunId } from "../../core/utils/paths.js";
|
|
12
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
13
13
|
import { buildInitialAdaptiveDelegationGovernorState, normalizeAdaptiveDelegationPolicy } from "./adaptive-delegation.js";
|
|
14
14
|
import { writeAdaptiveWorkflowArtifacts } from "./adaptive-workflow.js";
|
|
15
15
|
import { buildOrchestrationPlan, redactBodyLikeFieldsForPersistence, redactOrchestrationPlanForPersistence } from "./plan.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { existsSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { SUPERVISED_READONLY_CHILD_TOOLS } from "
|
|
4
|
+
import { SUPERVISED_READONLY_CHILD_TOOLS } from "../../core/constants.js";
|
|
5
5
|
import { ackZobComsMessage, appendZobComsMessage, getZobComsMessage, listZobComsMessages, replyZobComsMessage, transitionZobComsStatus } from "../topology/coms.js";
|
|
6
|
-
import type { AdaptiveDelegationGovernorState, AdaptiveDelegationPolicy, DelegationRequestProposal, GovernorDecision, OrchestrateRunInput, ParentDispatchContract, SupervisedReadonlyDispatcher, SupervisedReadonlyDispatchResult, TeamDefinition } from "
|
|
7
|
-
import { sha256 } from "
|
|
8
|
-
import { parseJsonFile, readJsonl, readJsonObjectIfPresent } from "
|
|
9
|
-
import { safeRunId } from "
|
|
10
|
-
import { isRecord } from "
|
|
6
|
+
import type { AdaptiveDelegationGovernorState, AdaptiveDelegationPolicy, DelegationRequestProposal, GovernorDecision, OrchestrateRunInput, ParentDispatchContract, SupervisedReadonlyDispatcher, SupervisedReadonlyDispatchResult, TeamDefinition } from "../../types.js";
|
|
7
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
8
|
+
import { parseJsonFile, readJsonl, readJsonObjectIfPresent } from "../../core/utils/json.js";
|
|
9
|
+
import { safeRunId } from "../../core/utils/paths.js";
|
|
10
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
11
11
|
import {
|
|
12
12
|
ADAPTIVE_DELEGATION_HARD_MAX_DEPTH,
|
|
13
13
|
buildInitialAdaptiveDelegationGovernorState,
|
package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/widget-readers.ts
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { parseJsonFile, readJsonObjectIfPresent } from "
|
|
5
|
-
import { isRecord } from "
|
|
4
|
+
import { parseJsonFile, readJsonObjectIfPresent } from "../../core/utils/json.js";
|
|
5
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
6
6
|
|
|
7
7
|
function widgetCounts(value: unknown): string {
|
|
8
8
|
if (!isRecord(value)) return "none";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# ProjectDNA domain guardrail
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
- ProjectDNA query, federated query, workflow planning helpers, schemas, and writeback proposals.
|
|
6
|
+
|
|
7
|
+
## MUST DO
|
|
8
|
+
|
|
9
|
+
- Preserve read-only scan artifact usage, bounded cited context, proposal-only writeback, and quarantine/output path policy.
|
|
10
|
+
|
|
11
|
+
## MUST NOT
|
|
12
|
+
|
|
13
|
+
- Do not scan external projects, import/sync/embed/write to backends, or promote ProjectDNA learnings by moving code.
|
|
14
|
+
- Do not import from `index.ts` or `index.js`.
|
|
15
|
+
|
|
16
|
+
## Validation
|
|
17
|
+
|
|
18
|
+
- `npm run check -- --pretty false`.
|
|
19
|
+
- Run relevant `validate:project-dna*`/smoke scripts when ProjectDNA behavior moves.
|
package/.pi/extensions/zob-harness/src/{project-dna.ts → domains/project-dna/project-dna.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { isRecord } from "
|
|
6
|
-
import { safeRunId } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
6
|
+
import { safeRunId } from "../../core/utils/paths.js";
|
|
7
7
|
|
|
8
8
|
const STOPWORDS = new Set(["the", "and", "for", "with", "how", "does", "this", "that", "dans", "avec", "pour", "comment", "faire", "using", "use", "project", "style"]);
|
|
9
9
|
const DEFAULT_SCAN_DIR = "reports/project-dna-scans/project-dna-factory-smoke";
|
|
@@ -463,7 +463,7 @@ export function buildProjectDnaReadinessAudit(repoRoot: string, input: { scanDir
|
|
|
463
463
|
} catch (error) {
|
|
464
464
|
scanErrors = [error instanceof Error ? error.message : String(error)];
|
|
465
465
|
}
|
|
466
|
-
const p4RuntimeReady = existsSync(resolve(repoRoot, ".pi/extensions/zob-harness/src/project-dna.ts")) && existsSync(resolve(repoRoot, ".pi/extensions/zob-harness/src/runtime/tools-project-dna.ts"));
|
|
466
|
+
const p4RuntimeReady = existsSync(resolve(repoRoot, ".pi/extensions/zob-harness/src/domains/project-dna/project-dna.ts")) && existsSync(resolve(repoRoot, ".pi/extensions/zob-harness/src/runtime/tools-project-dna.ts"));
|
|
467
467
|
const p5FederationReady = p4RuntimeReady;
|
|
468
468
|
const errors = [...missingRepoFiles.map((file) => `missing repo file: ${file}`), ...scanErrors];
|
|
469
469
|
return {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { DEFAULT_RULES } from "
|
|
5
|
-
import { sha256 } from "
|
|
6
|
-
import { readJsonObjectIfPresent } from "
|
|
7
|
-
import { pathMatches, resolveRepoPath, safeFileStem } from "
|
|
8
|
-
import { isRecord } from "
|
|
4
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
5
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
6
|
+
import { readJsonObjectIfPresent } from "../../core/utils/json.js";
|
|
7
|
+
import { pathMatches, resolveRepoPath, safeFileStem } from "../../core/utils/paths.js";
|
|
8
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
9
9
|
import type { PromotionApplyScope, PromotionCandidateInput, PromotionCandidateRecord, PromotionGates, PromotionKind, PromotionStatus, PromotionTransitionInput } from "./types.js";
|
|
10
10
|
import { PROMOTION_APPLY_SCOPES, PROMOTION_KINDS, PROMOTION_STATUSES } from "./types.js";
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { safeFileStem } from "
|
|
6
|
-
import { isRecord } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
6
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
7
7
|
import { promotionCandidateDir, promotionCandidateRef } from "./candidate.js";
|
|
8
8
|
import type { PromotionCandidateRecord, PromotionComsMessageRef, PromotionComsThreadInput, PromotionComsThreadRecord } from "./types.js";
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { resolveRepoPath, safeFileStem } from "
|
|
6
|
-
import { parseJsonFile } from "
|
|
7
|
-
import { isRecord } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { resolveRepoPath, safeFileStem } from "../../core/utils/paths.js";
|
|
6
|
+
import { parseJsonFile } from "../../core/utils/json.js";
|
|
7
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
8
8
|
import { advancePromotionCandidate, createPromotionCandidate, promotionCandidateDir, promotionCandidateRef, validatePromotionCandidate, writePromotionCandidate } from "./candidate.js";
|
|
9
9
|
import type { PromotionCandidateRecord } from "./types.js";
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { isRecord } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
6
6
|
import { advancePromotionCandidate, createPromotionCandidate, promotionCandidateDir, promotionCandidateRef, validatePromotionCandidate, writePromotionCandidate } from "./candidate.js";
|
|
7
7
|
import type { PromotionCandidateRecord } from "./types.js";
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { safeFileStem } from "
|
|
6
|
-
import { parseJsonFile } from "
|
|
7
|
-
import { isRecord } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
6
|
+
import { parseJsonFile } from "../../core/utils/json.js";
|
|
7
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
8
8
|
import { advancePromotionCandidate, createPromotionCandidate, promotionCandidateDir, promotionCandidateRef, validatePromotionCandidate, writePromotionCandidate } from "./candidate.js";
|
|
9
9
|
import type { PromotionCandidateRecord } from "./types.js";
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join, resolve } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { sha256 } from "
|
|
5
|
-
import { safeFileStem } from "
|
|
6
|
-
import { isRecord } from "
|
|
4
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
5
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
6
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
7
7
|
import { advancePromotionCandidate, createPromotionCandidate, promotionCandidateDir, promotionCandidateRef, validatePromotionCandidate, writePromotionCandidate } from "./candidate.js";
|
|
8
8
|
import type { PromotionCandidateRecord } from "./types.js";
|
|
9
9
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Telemetry domain guardrail
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
- Chronicle classification, queue metadata, telemetry summaries, and body-free runtime evidence records.
|
|
6
|
+
|
|
7
|
+
## MUST DO
|
|
8
|
+
|
|
9
|
+
- Preserve completion classifiers, budget preflight dry-run semantics, body-free telemetry, and artifact/ref names.
|
|
10
|
+
|
|
11
|
+
## MUST NOT
|
|
12
|
+
|
|
13
|
+
- Do not persist raw prompts, outputs, diffs, patches, or secrets.
|
|
14
|
+
- Do not import from `index.ts` or `index.js`.
|
|
15
|
+
|
|
16
|
+
## Validation
|
|
17
|
+
|
|
18
|
+
- `npm run check -- --pretty false`.
|
|
19
|
+
- `npm run smoke:harness` after chronicle/queue/runtime-facing moves.
|
|
@@ -9,9 +9,9 @@ import type {
|
|
|
9
9
|
DelegationTelemetryInput,
|
|
10
10
|
FactoryTelemetryInput,
|
|
11
11
|
RunawayGuardInput,
|
|
12
|
-
} from "
|
|
13
|
-
import { sha256 } from "
|
|
14
|
-
import { safeFileStem } from "
|
|
12
|
+
} from "../../types.js";
|
|
13
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
14
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
15
15
|
|
|
16
16
|
export const CHRONICLE_STATES = [
|
|
17
17
|
"created",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { basename, join, resolve } from "node:path";
|
|
3
3
|
|
|
4
|
-
import { evaluateStrictBudgetDispatchGate } from "
|
|
4
|
+
import { evaluateStrictBudgetDispatchGate } from "../governance/budget-policy.js";
|
|
5
5
|
import { classifyChildStopCondition, evaluateBudgetPreflightDryRun } from "./chronicle.js";
|
|
6
|
-
import { DEFAULT_RULES } from "
|
|
6
|
+
import { DEFAULT_RULES } from "../../core/constants.js";
|
|
7
7
|
import { incrementCounter, normalizeDailyTelemetryDate, stringFrom } from "./telemetry.js";
|
|
8
|
-
import type { ChildStopCondition, FactoryRunBudgetInput, QueueState, QueueTickResult, ReadOnlyQueueJob, ReadOnlyQueueJobType } from "
|
|
9
|
-
import { sha256 } from "
|
|
10
|
-
import { parseJsonFile } from "
|
|
11
|
-
import { expandHome, isSafeArtifactName, pathMatches, safeFileStem } from "
|
|
12
|
-
import { isRecord } from "
|
|
8
|
+
import type { ChildStopCondition, FactoryRunBudgetInput, QueueState, QueueTickResult, ReadOnlyQueueJob, ReadOnlyQueueJobType } from "../../types.js";
|
|
9
|
+
import { sha256 } from "../../core/utils/hashing.js";
|
|
10
|
+
import { parseJsonFile } from "../../core/utils/json.js";
|
|
11
|
+
import { expandHome, isSafeArtifactName, pathMatches, safeFileStem } from "../../core/utils/paths.js";
|
|
12
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
13
13
|
|
|
14
14
|
export const READ_ONLY_QUEUE_JOB_TYPES: ReadOnlyQueueJobType[] = ["docs_watch", "repo_audit_readonly", "todo_risk_report", "session_analysis"];
|
|
15
15
|
const QUEUE_STATES: QueueState[] = ["pending", "running", "done", "failed"];
|
|
@@ -2,10 +2,10 @@ import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
4
|
import { classifyDelegationChronicleCompletion, classifyFactoryChronicleCompletion, writeChronicleSnapshot } from "./chronicle.js";
|
|
5
|
-
import type { AssistantLikeMessage, ChildResult, ChildStopCondition, DelegationTelemetryInput, FactoryTelemetryInput } from "
|
|
6
|
-
import { parseJsonFile } from "
|
|
7
|
-
import { safeFileStem } from "
|
|
8
|
-
import { isRecord } from "
|
|
5
|
+
import type { AssistantLikeMessage, ChildResult, ChildStopCondition, DelegationTelemetryInput, FactoryTelemetryInput } from "../../types.js";
|
|
6
|
+
import { parseJsonFile } from "../../core/utils/json.js";
|
|
7
|
+
import { safeFileStem } from "../../core/utils/paths.js";
|
|
8
|
+
import { isRecord } from "../../core/utils/records.js";
|
|
9
9
|
|
|
10
10
|
function usageEmpty(): ChildResult["usage"] {
|
|
11
11
|
return { turns: 0, input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: 0, contextTokens: 0 };
|