@apralabs/apra-fleet 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -12
- package/dist/agents/backlog-groomer.md +42 -21
- package/dist/agents/ci-watcher.md +14 -0
- package/dist/agents/deployer.md +59 -46
- package/dist/agents/doer.md +157 -134
- package/dist/agents/harvester.md +31 -32
- package/dist/agents/integ-test-runner.md +92 -113
- package/dist/agents/kb-reconciler.md +40 -42
- package/dist/agents/plan-reviewer.md +139 -63
- package/dist/agents/planner.md +176 -100
- package/dist/agents/regression-test-runner.md +77 -81
- package/dist/agents/reviewer.md +69 -85
- package/dist/agents/schemas/integ-test-runner-output.json +1 -1
- package/dist/agents/schemas/plan-reviewer-output.json +37 -0
- package/dist/agents/schemas/regression-test-runner-output.json +4 -17
- package/dist/cli/agent-transform.d.ts +83 -2
- package/dist/cli/agent-transform.d.ts.map +1 -1
- package/dist/cli/agent-transform.js +266 -21
- package/dist/cli/agent-transform.js.map +1 -1
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +29 -11
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/config.d.ts +7 -5
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +44 -43
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/install.d.ts +33 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +294 -61
- package/dist/cli/install.js.map +1 -1
- package/dist/cli/kb-directives.d.ts.map +1 -1
- package/dist/cli/kb-directives.js +2 -1
- package/dist/cli/kb-directives.js.map +1 -1
- package/dist/cli/register-member.d.ts.map +1 -1
- package/dist/cli/register-member.js +7 -3
- package/dist/cli/register-member.js.map +1 -1
- package/dist/cli/start.d.ts.map +1 -1
- package/dist/cli/start.js +7 -0
- package/dist/cli/start.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +5 -3
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/watch.d.ts +26 -3
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +41 -9
- package/dist/cli/watch.js.map +1 -1
- package/dist/commands/kb-server.d.ts +3 -0
- package/dist/commands/kb-server.d.ts.map +1 -1
- package/dist/commands/kb-server.js +43 -3
- package/dist/commands/kb-server.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/os/git-bash-candidates.d.ts +35 -0
- package/dist/os/git-bash-candidates.d.ts.map +1 -0
- package/dist/os/git-bash-candidates.js +46 -0
- package/dist/os/git-bash-candidates.js.map +1 -0
- package/dist/os/index.d.ts +13 -4
- package/dist/os/index.d.ts.map +1 -1
- package/dist/os/index.js +17 -2
- package/dist/os/index.js.map +1 -1
- package/dist/os/linux.d.ts +6 -0
- package/dist/os/linux.d.ts.map +1 -1
- package/dist/os/linux.js +36 -3
- package/dist/os/linux.js.map +1 -1
- package/dist/os/os-commands.d.ts +68 -2
- package/dist/os/os-commands.d.ts.map +1 -1
- package/dist/os/os-commands.js.map +1 -1
- package/dist/os/windows-gitbash.d.ts +98 -0
- package/dist/os/windows-gitbash.d.ts.map +1 -0
- package/dist/os/windows-gitbash.js +259 -0
- package/dist/os/windows-gitbash.js.map +1 -0
- package/dist/os/windows.d.ts +6 -0
- package/dist/os/windows.d.ts.map +1 -1
- package/dist/os/windows.js +73 -8
- package/dist/os/windows.js.map +1 -1
- package/dist/providers/agy.d.ts +118 -8
- package/dist/providers/agy.d.ts.map +1 -1
- package/dist/providers/agy.js +580 -55
- package/dist/providers/agy.js.map +1 -1
- package/dist/providers/claude.d.ts +83 -4
- package/dist/providers/claude.d.ts.map +1 -1
- package/dist/providers/claude.js +365 -12
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts +7 -4
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +24 -4
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/copilot.d.ts +7 -4
- package/dist/providers/copilot.d.ts.map +1 -1
- package/dist/providers/copilot.js +27 -4
- package/dist/providers/copilot.js.map +1 -1
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +0 -3
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/none.d.ts +7 -4
- package/dist/providers/none.d.ts.map +1 -1
- package/dist/providers/none.js +22 -4
- package/dist/providers/none.js.map +1 -1
- package/dist/providers/opencode.d.ts +6 -3
- package/dist/providers/opencode.d.ts.map +1 -1
- package/dist/providers/opencode.js +27 -4
- package/dist/providers/opencode.js.map +1 -1
- package/dist/providers/provider.d.ts +215 -11
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/provider.js +58 -2
- package/dist/providers/provider.js.map +1 -1
- package/dist/services/agent-provisioner.js +2 -2
- package/dist/services/agent-provisioner.js.map +1 -1
- package/dist/services/agy-project.d.ts +102 -0
- package/dist/services/agy-project.d.ts.map +1 -0
- package/dist/services/agy-project.js +356 -0
- package/dist/services/agy-project.js.map +1 -0
- package/dist/services/auth-socket.js +4 -4
- package/dist/services/auth-web.js +1 -1
- package/dist/services/cloud/activity.js +2 -2
- package/dist/services/cloud/activity.js.map +1 -1
- package/dist/services/cloud/lifecycle.d.ts.map +1 -1
- package/dist/services/cloud/lifecycle.js +33 -4
- package/dist/services/cloud/lifecycle.js.map +1 -1
- package/dist/services/context-admission.d.ts.map +1 -1
- package/dist/services/context-admission.js +9 -7
- package/dist/services/context-admission.js.map +1 -1
- package/dist/services/credential-cleanup.d.ts.map +1 -1
- package/dist/services/credential-cleanup.js +47 -10
- package/dist/services/credential-cleanup.js.map +1 -1
- package/dist/services/exit-drain.d.ts +44 -0
- package/dist/services/exit-drain.d.ts.map +1 -0
- package/dist/services/exit-drain.js +52 -0
- package/dist/services/exit-drain.js.map +1 -0
- package/dist/services/github-app.d.ts.map +1 -1
- package/dist/services/github-app.js +32 -4
- package/dist/services/github-app.js.map +1 -1
- package/dist/services/http-transport.d.ts +1 -0
- package/dist/services/http-transport.d.ts.map +1 -1
- package/dist/services/http-transport.js +48 -1
- package/dist/services/http-transport.js.map +1 -1
- package/dist/services/knowledge/kb-config.d.ts +42 -0
- package/dist/services/knowledge/kb-config.d.ts.map +1 -0
- package/dist/services/knowledge/kb-config.js +54 -0
- package/dist/services/knowledge/kb-config.js.map +1 -0
- package/dist/services/knowledge/kb-providers.d.ts +7 -1
- package/dist/services/knowledge/kb-providers.d.ts.map +1 -1
- package/dist/services/knowledge/kb-providers.js +191 -17
- package/dist/services/knowledge/kb-providers.js.map +1 -1
- package/dist/services/knowledge/require-sqlite-project.d.ts +32 -0
- package/dist/services/knowledge/require-sqlite-project.d.ts.map +1 -0
- package/dist/services/knowledge/require-sqlite-project.js +38 -0
- package/dist/services/knowledge/require-sqlite-project.js.map +1 -0
- package/dist/services/member-home.d.ts +1 -1
- package/dist/services/member-home.d.ts.map +1 -1
- package/dist/services/member-home.js +15 -12
- package/dist/services/member-home.js.map +1 -1
- package/dist/services/model-pricing.d.ts.map +1 -1
- package/dist/services/model-pricing.js +7 -8
- package/dist/services/model-pricing.js.map +1 -1
- package/dist/services/orphan-recovery.d.ts +6 -3
- package/dist/services/orphan-recovery.d.ts.map +1 -1
- package/dist/services/orphan-recovery.js +17 -14
- package/dist/services/orphan-recovery.js.map +1 -1
- package/dist/services/preflight-check.js +2 -2
- package/dist/services/preflight-check.js.map +1 -1
- package/dist/services/secret-token.d.ts +38 -0
- package/dist/services/secret-token.d.ts.map +1 -0
- package/dist/services/secret-token.js +51 -0
- package/dist/services/secret-token.js.map +1 -0
- package/dist/services/service-manager/types.d.ts +3 -1
- package/dist/services/service-manager/types.d.ts.map +1 -1
- package/dist/services/service-manager/windows.d.ts +14 -2
- package/dist/services/service-manager/windows.d.ts.map +1 -1
- package/dist/services/service-manager/windows.js +65 -7
- package/dist/services/service-manager/windows.js.map +1 -1
- package/dist/services/shell-probe.d.ts +131 -0
- package/dist/services/shell-probe.d.ts.map +1 -0
- package/dist/services/shell-probe.js +210 -0
- package/dist/services/shell-probe.js.map +1 -0
- package/dist/services/singleton.d.ts +2 -0
- package/dist/services/singleton.d.ts.map +1 -1
- package/dist/services/singleton.js +1 -1
- package/dist/services/singleton.js.map +1 -1
- package/dist/services/ssh.d.ts.map +1 -1
- package/dist/services/ssh.js +60 -4
- package/dist/services/ssh.js.map +1 -1
- package/dist/services/stall/find-log-file.d.ts.map +1 -1
- package/dist/services/stall/find-log-file.js +22 -16
- package/dist/services/stall/find-log-file.js.map +1 -1
- package/dist/services/stall/read-log-tail.d.ts.map +1 -1
- package/dist/services/stall/read-log-tail.js +26 -15
- package/dist/services/stall/read-log-tail.js.map +1 -1
- package/dist/services/stall/stall-detector.d.ts +53 -4
- package/dist/services/stall/stall-detector.d.ts.map +1 -1
- package/dist/services/stall/stall-detector.js +212 -34
- package/dist/services/stall/stall-detector.js.map +1 -1
- package/dist/services/stall/stall-poller.d.ts.map +1 -1
- package/dist/services/stall/stall-poller.js +35 -42
- package/dist/services/stall/stall-poller.js.map +1 -1
- package/dist/services/strategy.d.ts +9 -0
- package/dist/services/strategy.d.ts.map +1 -1
- package/dist/services/strategy.js +119 -8
- package/dist/services/strategy.js.map +1 -1
- package/dist/services/substitution-engine.js +2 -2
- package/dist/services/substitution-engine.js.map +1 -1
- package/dist/services/tool-registry.d.ts.map +1 -1
- package/dist/services/tool-registry.js +5 -3
- package/dist/services/tool-registry.js.map +1 -1
- package/dist/services/user-config.js +1 -1
- package/dist/services/user-config.js.map +1 -1
- package/dist/services/vcs/azure-devops.d.ts +67 -2
- package/dist/services/vcs/azure-devops.d.ts.map +1 -1
- package/dist/services/vcs/azure-devops.js +281 -15
- package/dist/services/vcs/azure-devops.js.map +1 -1
- package/dist/services/vcs/bitbucket.d.ts.map +1 -1
- package/dist/services/vcs/bitbucket.js +16 -0
- package/dist/services/vcs/bitbucket.js.map +1 -1
- package/dist/services/vcs/github.d.ts.map +1 -1
- package/dist/services/vcs/github.js +24 -0
- package/dist/services/vcs/github.js.map +1 -1
- package/dist/services/vcs/types.d.ts +123 -2
- package/dist/services/vcs/types.d.ts.map +1 -1
- package/dist/skills/fleet-sprint-cli/SKILL.md +20 -1
- package/dist/skills/pm/SKILL.md +1 -2
- package/dist/skills/pm/cost.md +0 -4
- package/dist/skills/pm/fleet-addendum.md +2 -3
- package/dist/tools/check-status.d.ts +7 -4
- package/dist/tools/check-status.d.ts.map +1 -1
- package/dist/tools/check-status.js +5 -3
- package/dist/tools/check-status.js.map +1 -1
- package/dist/tools/cloud-control.js +2 -2
- package/dist/tools/cloud-control.js.map +1 -1
- package/dist/tools/compose-permissions.d.ts +6 -0
- package/dist/tools/compose-permissions.d.ts.map +1 -1
- package/dist/tools/compose-permissions.js +211 -50
- package/dist/tools/compose-permissions.js.map +1 -1
- package/dist/tools/credential-store-set.js +1 -1
- package/dist/tools/execute-command.d.ts.map +1 -1
- package/dist/tools/execute-command.js +56 -29
- package/dist/tools/execute-command.js.map +1 -1
- package/dist/tools/execute-prompt.d.ts +15 -2
- package/dist/tools/execute-prompt.d.ts.map +1 -1
- package/dist/tools/execute-prompt.js +1214 -873
- package/dist/tools/execute-prompt.js.map +1 -1
- package/dist/tools/kb-capture.d.ts +2 -2
- package/dist/tools/kb-capture.d.ts.map +1 -1
- package/dist/tools/kb-capture.js +29 -5
- package/dist/tools/kb-capture.js.map +1 -1
- package/dist/tools/kb-export.d.ts +2 -2
- package/dist/tools/kb-export.d.ts.map +1 -1
- package/dist/tools/kb-export.js +3 -28
- package/dist/tools/kb-export.js.map +1 -1
- package/dist/tools/kb-feedback.d.ts.map +1 -1
- package/dist/tools/kb-feedback.js +3 -1
- package/dist/tools/kb-feedback.js.map +1 -1
- package/dist/tools/kb-freshness-sweep.d.ts.map +1 -1
- package/dist/tools/kb-freshness-sweep.js +3 -1
- package/dist/tools/kb-freshness-sweep.js.map +1 -1
- package/dist/tools/kb-import.d.ts.map +1 -1
- package/dist/tools/kb-import.js +2 -1
- package/dist/tools/kb-import.js.map +1 -1
- package/dist/tools/kb-list.d.ts.map +1 -1
- package/dist/tools/kb-list.js +3 -1
- package/dist/tools/kb-list.js.map +1 -1
- package/dist/tools/kb-query.d.ts +2 -2
- package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -1
- package/dist/tools/kb-reconcile-prefilter.js +3 -1
- package/dist/tools/kb-reconcile-prefilter.js.map +1 -1
- package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -1
- package/dist/tools/kb-resolve-contradiction.js +3 -1
- package/dist/tools/kb-resolve-contradiction.js.map +1 -1
- package/dist/tools/kb-setup.d.ts.map +1 -1
- package/dist/tools/kb-setup.js +125 -20
- package/dist/tools/kb-setup.js.map +1 -1
- package/dist/tools/kb-stats.d.ts.map +1 -1
- package/dist/tools/kb-stats.js +64 -43
- package/dist/tools/kb-stats.js.map +1 -1
- package/dist/tools/list-members.d.ts +2 -2
- package/dist/tools/list-members.d.ts.map +1 -1
- package/dist/tools/list-members.js +7 -2
- package/dist/tools/list-members.js.map +1 -1
- package/dist/tools/member-detail.d.ts +2 -2
- package/dist/tools/member-detail.d.ts.map +1 -1
- package/dist/tools/member-detail.js +22 -3
- package/dist/tools/member-detail.js.map +1 -1
- package/dist/tools/member-reservation.d.ts +58 -1
- package/dist/tools/member-reservation.d.ts.map +1 -1
- package/dist/tools/member-reservation.js +71 -18
- package/dist/tools/member-reservation.js.map +1 -1
- package/dist/tools/monitor-task.d.ts.map +1 -1
- package/dist/tools/monitor-task.js +17 -2
- package/dist/tools/monitor-task.js.map +1 -1
- package/dist/tools/provision-auth.d.ts +80 -1
- package/dist/tools/provision-auth.d.ts.map +1 -1
- package/dist/tools/provision-auth.js +147 -59
- package/dist/tools/provision-auth.js.map +1 -1
- package/dist/tools/provision-vcs-auth.d.ts +96 -3
- package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
- package/dist/tools/provision-vcs-auth.js +254 -88
- package/dist/tools/provision-vcs-auth.js.map +1 -1
- package/dist/tools/register-member.d.ts +21 -12
- package/dist/tools/register-member.d.ts.map +1 -1
- package/dist/tools/register-member.js +141 -16
- package/dist/tools/register-member.js.map +1 -1
- package/dist/tools/remove-member.d.ts.map +1 -1
- package/dist/tools/remove-member.js +29 -4
- package/dist/tools/remove-member.js.map +1 -1
- package/dist/tools/revoke-vcs-auth.js +2 -2
- package/dist/tools/revoke-vcs-auth.js.map +1 -1
- package/dist/tools/send-email.d.ts +2 -2
- package/dist/tools/setup-git-app.d.ts.map +1 -1
- package/dist/tools/setup-git-app.js +11 -7
- package/dist/tools/setup-git-app.js.map +1 -1
- package/dist/tools/setup-ssh-key.d.ts.map +1 -1
- package/dist/tools/setup-ssh-key.js +2 -1
- package/dist/tools/setup-ssh-key.js.map +1 -1
- package/dist/tools/shutdown-server.d.ts +2 -0
- package/dist/tools/shutdown-server.d.ts.map +1 -1
- package/dist/tools/shutdown-server.js +23 -1
- package/dist/tools/shutdown-server.js.map +1 -1
- package/dist/tools/stop-prompt.js +2 -2
- package/dist/tools/stop-prompt.js.map +1 -1
- package/dist/tools/update-agent-cli.js +2 -2
- package/dist/tools/update-agent-cli.js.map +1 -1
- package/dist/tools/update-member.d.ts +21 -12
- package/dist/tools/update-member.d.ts.map +1 -1
- package/dist/tools/update-member.js +61 -12
- package/dist/tools/update-member.js.map +1 -1
- package/dist/tools/vcs-credential-exec.d.ts +127 -0
- package/dist/tools/vcs-credential-exec.d.ts.map +1 -0
- package/dist/tools/vcs-credential-exec.js +197 -0
- package/dist/tools/vcs-credential-exec.js.map +1 -0
- package/dist/types.d.ts +24 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/agent-helpers.d.ts +36 -0
- package/dist/utils/agent-helpers.d.ts.map +1 -1
- package/dist/utils/agent-helpers.js +39 -1
- package/dist/utils/agent-helpers.js.map +1 -1
- package/dist/utils/log-helpers.d.ts.map +1 -1
- package/dist/utils/log-helpers.js +2 -2
- package/dist/utils/log-helpers.js.map +1 -1
- package/dist/utils/platform.d.ts +7 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +11 -1
- package/dist/utils/platform.js.map +1 -1
- package/dist/utils/prompt-errors.d.ts.map +1 -1
- package/dist/utils/prompt-errors.js +7 -1
- package/dist/utils/prompt-errors.js.map +1 -1
- package/dist/utils/shell-escape.d.ts +16 -0
- package/dist/utils/shell-escape.d.ts.map +1 -1
- package/dist/utils/shell-escape.js +22 -2
- package/dist/utils/shell-escape.js.map +1 -1
- package/dist/utils/vcs-provider-detect.d.ts +65 -0
- package/dist/utils/vcs-provider-detect.d.ts.map +1 -0
- package/dist/utils/vcs-provider-detect.js +109 -0
- package/dist/utils/vcs-provider-detect.js.map +1 -0
- package/dist/utils/workspace-trust.d.ts +20 -17
- package/dist/utils/workspace-trust.d.ts.map +1 -1
- package/dist/utils/workspace-trust.js +91 -1
- package/dist/utils/workspace-trust.js.map +1 -1
- package/dist/workflows/auto-sprint.js +180 -32
- package/package.json +7 -5
- package/packages/apra-fleet-client/src/client/api.mjs +403 -12
- package/packages/apra-fleet-client/src/client/errors.mjs +6 -2
- package/packages/apra-fleet-se/apra-pm/agents/_shared/GRAPH-SEMANTICS.md +10 -2
- package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +42 -21
- package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +14 -0
- package/packages/apra-fleet-se/apra-pm/agents/deployer.md +59 -46
- package/packages/apra-fleet-se/apra-pm/agents/doer.md +157 -134
- package/packages/apra-fleet-se/apra-pm/agents/harvester.md +31 -32
- package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +92 -113
- package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +40 -42
- package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +139 -63
- package/packages/apra-fleet-se/apra-pm/agents/planner.md +176 -100
- package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +77 -81
- package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +69 -85
- package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +1 -1
- package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-output.json +37 -0
- package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +4 -17
- package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +1 -2
- package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -4
- package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +2 -3
- package/packages/apra-fleet-se/bin/cli.mjs +280 -3
- package/packages/apra-fleet-se/bin/serve.mjs +114 -5
- package/packages/apra-fleet-se/fleet-sprint/abort.mjs +481 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-children.mjs +491 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-identity-check.mjs +282 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-identity.mjs +208 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-scope.mjs +638 -0
- package/packages/apra-fleet-se/fleet-sprint/beads-transitions.mjs +301 -0
- package/packages/apra-fleet-se/fleet-sprint/branch-ensure.mjs +96 -0
- package/packages/apra-fleet-se/fleet-sprint/conflict-ladder.mjs +8 -0
- package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +199 -34
- package/packages/apra-fleet-se/fleet-sprint/coordination.mjs +516 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-failure.mjs +184 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-role.mjs +1121 -0
- package/packages/apra-fleet-se/fleet-sprint/dispatch-safety-guard.mjs +216 -4
- package/packages/apra-fleet-se/fleet-sprint/docs/README.md +23 -8
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +10 -8
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +285 -4
- package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +3 -3
- package/packages/apra-fleet-se/fleet-sprint/docs/run-sprint-cycle-prelude-decision.md +215 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +12 -12
- package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +14 -4
- package/packages/apra-fleet-se/fleet-sprint/dolt-literal-guard.mjs +56 -1
- package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +275 -99
- package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +1054 -39
- package/packages/apra-fleet-se/fleet-sprint/errors.mjs +308 -0
- package/packages/apra-fleet-se/fleet-sprint/explicit-id-create-guard.mjs +501 -0
- package/packages/apra-fleet-se/fleet-sprint/fatal-diagnostics.mjs +134 -0
- package/packages/apra-fleet-se/fleet-sprint/full-db-fetch-guard.mjs +102 -0
- package/packages/apra-fleet-se/fleet-sprint/git-sync.mjs +556 -0
- package/packages/apra-fleet-se/fleet-sprint/git-topology.mjs +495 -0
- package/packages/apra-fleet-se/fleet-sprint/guarded-modules.mjs +564 -0
- package/packages/apra-fleet-se/fleet-sprint/inline-ladder-guard.mjs +216 -0
- package/packages/apra-fleet-se/fleet-sprint/kb.mjs +728 -0
- package/packages/apra-fleet-se/fleet-sprint/mcp-result.mjs +75 -0
- package/packages/apra-fleet-se/fleet-sprint/member-provisioning.mjs +252 -0
- package/packages/apra-fleet-se/fleet-sprint/member-sync.mjs +581 -0
- package/packages/apra-fleet-se/fleet-sprint/member-target.mjs +93 -0
- package/packages/apra-fleet-se/fleet-sprint/newtask-text.mjs +266 -0
- package/packages/apra-fleet-se/fleet-sprint/parent-notes-staleness.mjs +201 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/deploy.mjs +136 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/develop.mjs +822 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/ensure-sprint-branch.mjs +294 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/final-review.mjs +403 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/harvest.mjs +180 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/integ-test.mjs +358 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/plan.mjs +390 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/publish-pr.mjs +323 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/re-review.mjs +232 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/regression-test.mjs +174 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/replan.mjs +197 -0
- package/packages/apra-fleet-se/fleet-sprint/phases/review.mjs +305 -0
- package/packages/apra-fleet-se/fleet-sprint/prompts.mjs +559 -0
- package/packages/apra-fleet-se/fleet-sprint/role-policies.mjs +1416 -0
- package/packages/apra-fleet-se/fleet-sprint/round-session.mjs +100 -0
- package/packages/apra-fleet-se/fleet-sprint/runner.js +1672 -9072
- package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +134 -0
- package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +159 -0
- package/packages/apra-fleet-se/fleet-sprint/se-windows-gitbash.mjs +97 -0
- package/packages/apra-fleet-se/fleet-sprint/se-windows.mjs +143 -0
- package/packages/apra-fleet-se/fleet-sprint/shell-command-guard.mjs +304 -0
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +20 -1
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +21 -2
- package/packages/apra-fleet-se/fleet-sprint/sprint-args.mjs +454 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-report.mjs +239 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-state.mjs +163 -0
- package/packages/apra-fleet-se/fleet-sprint/unbracketed-push-guard.mjs +234 -0
- package/packages/apra-fleet-se/fleet-sprint/usage-limit-controller.mjs +211 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-auth.mjs +1279 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +204 -19
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +707 -12
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/bitbucket.mjs +28 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +33 -4
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +191 -43
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +333 -6
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +165 -0
- package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +167 -37
- package/packages/apra-fleet-se/fleet-sprint/worklists.mjs +559 -0
- package/packages/apra-fleet-se/package.json +1 -1
- package/packages/apra-fleet-workflow/src/viewer/index.mjs +178 -1
- package/packages/apra-fleet-workflow/src/workflow/index.mjs +478 -32
- package/skills/fleet/SKILL.md +27 -16
- package/skills/fleet/auth-azdevops.md +57 -7
- package/skills/fleet/auth-bitbucket.md +5 -5
- package/skills/fleet/auth-github.md +7 -6
- package/skills/fleet/beads-conflict-resolution.md +141 -0
- package/skills/fleet/beads.md +16 -12
- package/skills/fleet/onboarding.md +6 -6
- package/skills/fleet/permissions.md +11 -7
- package/skills/fleet/profiles/node.json +1 -1
- package/skills/fleet/skill-matrix.md +1 -1
- package/skills/fleet/troubleshooting.md +4 -3
- package/version.json +1 -1
- package/dist/providers/gemini.d.ts +0 -52
- package/dist/providers/gemini.d.ts.map +0 -1
- package/dist/providers/gemini.js +0 -236
- package/dist/providers/gemini.js.map +0 -1
- package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +0 -23
|
@@ -1277,6 +1277,123 @@ function worktreeNamesFor(sprintBranch, taskId, worktreeRoot) {
|
|
|
1277
1277
|
};
|
|
1278
1278
|
}
|
|
1279
1279
|
|
|
1280
|
+
// EXPORT SHRINK GUARD (my-beads-db-27m.12): replaces the unguarded
|
|
1281
|
+
// `git -C "${repo}" add .beads/issues.jsonl` step. Compares the id set of the freshly
|
|
1282
|
+
// written .beads/issues.jsonl against the ids committed at HEAD BEFORE staging it, so a
|
|
1283
|
+
// `bd export` run against a workspace whose Dolt DB has diverged from the repo's
|
|
1284
|
+
// committed export cannot silently clobber the committed id set (a line-count/size
|
|
1285
|
+
// check would miss this: the file can grow while still dropping most committed ids).
|
|
1286
|
+
// Mirrors the kb-export.ts shrink guard (src/tools/kb-export.ts, maybeAutoCommitBible):
|
|
1287
|
+
// written to disk but NOT staged/committed unless AUTO_SPRINT_ALLOW_EXPORT_SHRINK=1 is
|
|
1288
|
+
// set as an explicit operator opt-in.
|
|
1289
|
+
//
|
|
1290
|
+
// DUPLICATED (intentionally) from lib/export-shrink-guard.mjs's runExportShrinkGuard, so
|
|
1291
|
+
// this stays a single self-contained shell command -- the dispatched agent runs inside
|
|
1292
|
+
// an arbitrary target repo's checkout, not this monorepo, and cannot `require()` that
|
|
1293
|
+
// file. Keep both in sync when changing the algorithm (same convention as
|
|
1294
|
+
// lib/parse-sprint-args.mjs). Pure -- no I/O, just builds a command string -- so it lives
|
|
1295
|
+
// in this PURE_FUNCTIONS block and test/export-shrink-guard.test.mjs can extract and call
|
|
1296
|
+
// it the same way test/sprint-cost.test.mjs extracts computeSprintQuote.
|
|
1297
|
+
// repoPath is passed as a shell argument (process.argv[1]), NOT interpolated into the JS
|
|
1298
|
+
// source: node -e "code" runs inside an outer double-quoted shell string, and
|
|
1299
|
+
// JSON.stringify(repoPath) emits its own double quotes that terminate that string early,
|
|
1300
|
+
// leaving the shell to hand node a broken program (my-beads-db-27m.12 round-2 reopen).
|
|
1301
|
+
// Quoting the trailing "${repoPath}" argument matches every other `-C "${repo}"` call in
|
|
1302
|
+
// this file.
|
|
1303
|
+
//
|
|
1304
|
+
// DESIGN DECISION (predicate is "any dropped id", deliberately, not "loud warning" only):
|
|
1305
|
+
// the guard refuses to stage on ANY committed id missing from the fresh export, with no
|
|
1306
|
+
// narrower allowance for legitimate removals (compaction, deletion, an id moved out of
|
|
1307
|
+
// scope). A legitimate removal therefore looks identical to corruption from here and
|
|
1308
|
+
// stops the export from being committed on every later sprint until an operator notices
|
|
1309
|
+
// the EXPORT_GUARD_REFUSED line and either investigates or sets
|
|
1310
|
+
// AUTO_SPRINT_ALLOW_EXPORT_SHRINK=1. This is intentional: refusing (and requiring a human
|
|
1311
|
+
// to look) is judged safer than guessing which drops are legitimate, mirroring the
|
|
1312
|
+
// kb-export.ts shrink guard's same all-or-nothing predicate. The refusal is non-fatal to
|
|
1313
|
+
// the sprint, but it is NOT silent: both call sites pass their dispatch result through
|
|
1314
|
+
// detectExportGuardIssue() and log exportGuardLogLine() to the sprint log. If it ever
|
|
1315
|
+
// needs to be louder still (e.g. failing the sprint), change this predicate and its
|
|
1316
|
+
// counterpart in lib/export-shrink-guard.mjs together.
|
|
1317
|
+
//
|
|
1318
|
+
// FAIL CLOSED: the committed file is read with maxBuffer=256 MB (the 1 MB default threw
|
|
1319
|
+
// ENOBUFS on real backlogs and the old empty catch waved everything through). Whether
|
|
1320
|
+
// the export is tracked at HEAD is decided separately via `git ls-tree` (unborn HEAD ->
|
|
1321
|
+
// `rev-parse --verify -q HEAD` exits 1): only "not tracked" means an empty committed set.
|
|
1322
|
+
// Any other read failure prints EXPORT_GUARD_ERROR and stages nothing. git is invoked via
|
|
1323
|
+
// execFileSync argv arrays (no inner shell), so no extra quoting layer is involved.
|
|
1324
|
+
function buildExportShrinkGuardCmd(repoPath) {
|
|
1325
|
+
return `node -e "` +
|
|
1326
|
+
`const{execFileSync}=require('child_process');` +
|
|
1327
|
+
`const fs=require('fs');` +
|
|
1328
|
+
`const repo=process.argv[1];` +
|
|
1329
|
+
`const P='.beads/issues.jsonl';` +
|
|
1330
|
+
`function git(a,mb){return execFileSync('git',a,{cwd:repo,encoding:'utf8',stdio:['ignore','pipe','pipe'],maxBuffer:1048576*(mb||16)});}` +
|
|
1331
|
+
`function why(e){return String((e&&(e.stderr||e.code||e.message))||e).trim().split(/\\n/)[0];}` +
|
|
1332
|
+
`function fail(m){console.log('EXPORT_GUARD_ERROR: '+m+'. .beads/issues.jsonl NOT staged/committed (guard fails closed).');process.exit(0);}` +
|
|
1333
|
+
`function ids(t){const s=new Set();for(const l of String(t||'').split(/\\n/)){const x=l.trim();if(!x)continue;try{const o=JSON.parse(x);if(o&&o.id)s.add(o.id);}catch(e){}}return s;}` +
|
|
1334
|
+
`let tracked=false;` +
|
|
1335
|
+
`try{tracked=git(['ls-tree','--name-only','HEAD','--',P]).trim()!=='';}catch(e){let unborn=false;try{git(['rev-parse','--verify','-q','HEAD']);}catch(e2){unborn=!!e2&&e2.status===1;}if(!unborn)fail('cannot list HEAD tree: '+why(e));}` +
|
|
1336
|
+
`let before='';` +
|
|
1337
|
+
`if(tracked){try{before=git(['show','HEAD:'+P],256);}catch(e){fail('cannot read committed HEAD:'+P+': '+why(e));}}` +
|
|
1338
|
+
`const committed=ids(before);` +
|
|
1339
|
+
`let after='';try{after=fs.readFileSync(repo+'/'+P,'utf8');}catch(e){after='';}` +
|
|
1340
|
+
`const fresh=ids(after);` +
|
|
1341
|
+
`const dropped=[...committed].filter(id=>!fresh.has(id));` +
|
|
1342
|
+
`const allow=process.env.AUTO_SPRINT_ALLOW_EXPORT_SHRINK==='1';` +
|
|
1343
|
+
`if(dropped.length>0&&!allow){` +
|
|
1344
|
+
`console.log('EXPORT_GUARD_REFUSED: '+dropped.length+' committed id(s) missing from new export (e.g. '+dropped.slice(0,5).join(', ')+'). Written to disk but NOT staged/committed. Set AUTO_SPRINT_ALLOW_EXPORT_SHRINK=1 to override.');` +
|
|
1345
|
+
`process.exit(0);` +
|
|
1346
|
+
`}` +
|
|
1347
|
+
`try{git(['add',P]);}catch(e){fail('git add failed: '+why(e));}` +
|
|
1348
|
+
`console.log('EXPORT_GUARD_OK: staged .beads/issues.jsonl'+(dropped.length?' (override used, '+dropped.length+' dropped)':''));` +
|
|
1349
|
+
`" "${repoPath}"`;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
// Orchestrator-side detection of the guard's outcome in a dispatch result, so a refusal
|
|
1353
|
+
// or fail-closed error reaches the sprint log instead of dying in a Haiku transcript.
|
|
1354
|
+
// Accepts whatever dispatch()/dispatchShell() returned: a string, a {outputs:[...]}
|
|
1355
|
+
// shell result, or any object (nested strings are scanned). Returns
|
|
1356
|
+
// { kind: 'REFUSED'|'ERROR'|'OK', line } -- REFUSED/ERROR win over OK -- or null when no
|
|
1357
|
+
// EXPORT_GUARD_* marker is present. Pure.
|
|
1358
|
+
function detectExportGuardIssue(result) {
|
|
1359
|
+
const texts = [];
|
|
1360
|
+
const walk = (v, depth) => {
|
|
1361
|
+
if (v == null || depth > 6) return;
|
|
1362
|
+
if (typeof v === 'string') { texts.push(v); return; }
|
|
1363
|
+
if (Array.isArray(v)) { v.forEach(x => walk(x, depth + 1)); return; }
|
|
1364
|
+
if (typeof v === 'object') Object.keys(v).forEach(k => walk(v[k], depth + 1));
|
|
1365
|
+
};
|
|
1366
|
+
walk(result, 0);
|
|
1367
|
+
const text = texts.join('\n');
|
|
1368
|
+
const bad = text.match(/EXPORT_GUARD_(REFUSED|ERROR):[^\r\n]*/);
|
|
1369
|
+
if (bad) return { kind: bad[1], line: bad[0].trim() };
|
|
1370
|
+
const ok = text.match(/EXPORT_GUARD_OK:[^\r\n]*/);
|
|
1371
|
+
if (ok) return { kind: 'OK', line: ok[0].trim() };
|
|
1372
|
+
return null;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// Operator-facing sprint-log line for a detectExportGuardIssue() result, or null when
|
|
1376
|
+
// nothing needs flagging (OK). stepLabel names the call site (e.g. "plan-commit-c2").
|
|
1377
|
+
// A missing marker is flagged too, since the guard's outcome is then unknown. Pure.
|
|
1378
|
+
function exportGuardLogLine(detected, stepLabel) {
|
|
1379
|
+
const where = stepLabel || 'beads export';
|
|
1380
|
+
if (!detected) {
|
|
1381
|
+
return `WARN: [export-guard] ${where}: no EXPORT_GUARD_* result seen -- cannot confirm ` +
|
|
1382
|
+
`.beads/issues.jsonl was committed; check that dispatch's transcript.`;
|
|
1383
|
+
}
|
|
1384
|
+
if (detected.kind === 'REFUSED') {
|
|
1385
|
+
return `WARNING: [export-guard] ${where}: beads export NOT committed -- ${detected.line} ` +
|
|
1386
|
+
`Every later sprint will keep refusing until resolved. If the dropped ids were removed ` +
|
|
1387
|
+
`on purpose (bd delete, compaction), rerun with AUTO_SPRINT_ALLOW_EXPORT_SHRINK=1 to ` +
|
|
1388
|
+
`commit the smaller export; otherwise investigate the beads DB divergence.`;
|
|
1389
|
+
}
|
|
1390
|
+
if (detected.kind === 'ERROR') {
|
|
1391
|
+
return `WARNING: [export-guard] ${where}: beads export NOT committed (guard failed closed) -- ` +
|
|
1392
|
+
`${detected.line}`;
|
|
1393
|
+
}
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1280
1397
|
// PURE_FUNCTIONS_END
|
|
1281
1398
|
|
|
1282
1399
|
// ROLE_SCHEMAS_GENERATED_BEGIN -- do not hand-edit; run `node scripts/gen-auto-sprint-schemas.mjs` to regenerate from agents/schemas/*.json
|
|
@@ -1449,6 +1566,47 @@ const PLAN_REVIEW_SCHEMA = {
|
|
|
1449
1566
|
"notes": {
|
|
1450
1567
|
"type": "string"
|
|
1451
1568
|
},
|
|
1569
|
+
"findings": {
|
|
1570
|
+
"type": "array",
|
|
1571
|
+
"description": "Machine-readable per-bead findings: one entry per bead that must change, so a caller can route a CHANGES_NEEDED verdict without parsing notes. Populate on every CHANGES_NEEDED verdict. Return an empty array when the objection is genuinely plan-wide and names no individual bead -- an empty array is the explicit 'plan-wide' signal. Omit or return an empty array on APPROVED. Optional, and deliberately absent-tolerant for one release: a verdict produced against the previous contract still validates, and a caller may fall back to reading notes. notes stays the narration channel.",
|
|
1572
|
+
"items": {
|
|
1573
|
+
"type": "object",
|
|
1574
|
+
"required": [
|
|
1575
|
+
"id",
|
|
1576
|
+
"kind",
|
|
1577
|
+
"detail"
|
|
1578
|
+
],
|
|
1579
|
+
"properties": {
|
|
1580
|
+
"id": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"description": "The bead this finding concerns, written exactly as it appears in taskAssignments (e.g. BD-14)."
|
|
1583
|
+
},
|
|
1584
|
+
"kind": {
|
|
1585
|
+
"type": "string",
|
|
1586
|
+
"description": "Which quality criterion failed, as a closed vocabulary mirroring the numbered criteria in the prose contract's Step 2. Use other only when no listed kind fits, and explain it in detail.",
|
|
1587
|
+
"enum": [
|
|
1588
|
+
"coverage",
|
|
1589
|
+
"missing_test_task",
|
|
1590
|
+
"acceptance_criteria",
|
|
1591
|
+
"task_size",
|
|
1592
|
+
"dependency_wiring",
|
|
1593
|
+
"scope_creep",
|
|
1594
|
+
"duplicate_work",
|
|
1595
|
+
"feasibility",
|
|
1596
|
+
"ready_work",
|
|
1597
|
+
"model_metadata",
|
|
1598
|
+
"lane_cohesion",
|
|
1599
|
+
"other"
|
|
1600
|
+
]
|
|
1601
|
+
},
|
|
1602
|
+
"detail": {
|
|
1603
|
+
"type": "string",
|
|
1604
|
+
"minLength": 1,
|
|
1605
|
+
"description": "The human explanation for this bead: what is wrong and what would make it pass."
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1452
1610
|
"taskAssignments": {
|
|
1453
1611
|
"type": "array",
|
|
1454
1612
|
"items": {
|
|
@@ -1612,7 +1770,7 @@ const INTEG_RUN_SCHEMA = {
|
|
|
1612
1770
|
},
|
|
1613
1771
|
"deployedSha": {
|
|
1614
1772
|
"type": "string",
|
|
1615
|
-
"description": "The
|
|
1773
|
+
"description": "The git commit the verification actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md Step 4."
|
|
1616
1774
|
},
|
|
1617
1775
|
"verifySetClosed": {
|
|
1618
1776
|
"type": "array",
|
|
@@ -1689,7 +1847,7 @@ const REGRESSION_RUN_SCHEMA = {
|
|
|
1689
1847
|
},
|
|
1690
1848
|
"smokePassed": {
|
|
1691
1849
|
"type": "boolean",
|
|
1692
|
-
"description": "Result of playbook Part 2 -- the
|
|
1850
|
+
"description": "Result of playbook Part 2 -- the sandbox smoke test."
|
|
1693
1851
|
},
|
|
1694
1852
|
"bugsFiled": {
|
|
1695
1853
|
"type": "array",
|
|
@@ -1704,21 +1862,8 @@ const REGRESSION_RUN_SCHEMA = {
|
|
|
1704
1862
|
},
|
|
1705
1863
|
"smokeEvidence": {
|
|
1706
1864
|
"type": "object",
|
|
1707
|
-
"
|
|
1708
|
-
"
|
|
1709
|
-
"versionStdout": {
|
|
1710
|
-
"type": "string",
|
|
1711
|
-
"description": "Verbatim stdout of running the toy CLI's --version on the sprint branch."
|
|
1712
|
-
},
|
|
1713
|
-
"canaryStatus": {
|
|
1714
|
-
"type": "string",
|
|
1715
|
-
"description": "The status field from `bd show gh-toy-4ef` (e.g. \"closed\")."
|
|
1716
|
-
},
|
|
1717
|
-
"toyRepoHeadSha": {
|
|
1718
|
-
"type": "string",
|
|
1719
|
-
"description": "The toy repo's head commit SHA after the toy sprint."
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1865
|
+
"additionalProperties": true,
|
|
1866
|
+
"description": "Optional structured evidence from Part 2 (the target repo's own smoke test), so the result is machine-checkable instead of self-reported prose. This schema does not define its shape -- the target repo's regression-test-playbook.md (Part 2 / smoke test section) does. Omit if that playbook defines no structured evidence."
|
|
1722
1867
|
}
|
|
1723
1868
|
}
|
|
1724
1869
|
};
|
|
@@ -2995,14 +3140,18 @@ while (cycleCount < maxCycles) {
|
|
|
2995
3140
|
`doer_tokens=${t.doerTokens} reviewer_tokens=${t.reviewerTokens} output_usd=${t.outputUsd.toFixed(4)}"`
|
|
2996
3141
|
),
|
|
2997
3142
|
`bd export -o "${repo}/.beads/issues.jsonl"`,
|
|
2998
|
-
|
|
3143
|
+
buildExportShrinkGuardCmd(repo),
|
|
2999
3144
|
`git -C "${repo}" -c user.name='pm' -c user.email='pm@pm.local' commit --allow-empty -m "plan: approve task DAG"`,
|
|
3000
3145
|
`git -C "${repo}" push origin ${branch}`,
|
|
3001
3146
|
];
|
|
3002
|
-
await dispatchShell(planCommitCmds, {
|
|
3147
|
+
const planCommitRes = await dispatchShell(planCommitCmds, {
|
|
3003
3148
|
model: MODEL_HAIKU, label: `plan-commit-c${cycleCount}`, phase: 'Plan',
|
|
3004
3149
|
maxTurns: planCommitCmds.length + 2,
|
|
3005
3150
|
});
|
|
3151
|
+
// Surface an export-guard refusal/error in the sprint log (non-fatal).
|
|
3152
|
+
const planGuardLine = exportGuardLogLine(
|
|
3153
|
+
detectExportGuardIssue(planCommitRes?.outputs ?? planCommitRes), `plan-commit-c${cycleCount}`);
|
|
3154
|
+
if (planGuardLine) log(planGuardLine);
|
|
3006
3155
|
} else {
|
|
3007
3156
|
planFeedback = (planReview && planReview.notes) || '';
|
|
3008
3157
|
log(`Plan needs changes: ${planFeedback.slice(0, 120)}`);
|
|
@@ -3747,11 +3896,6 @@ if (!harvestResult || harvestResult.status !== 'OK') {
|
|
|
3747
3896
|
const updatedCalibration = computeUpdatedCalibration(calibration, sprintAnalysis, effectiveStartedAt, taskAssignments, logEntries);
|
|
3748
3897
|
const calibrationJson = JSON.stringify(updatedCalibration, null, 2);
|
|
3749
3898
|
|
|
3750
|
-
const tokenEstimates = {
|
|
3751
|
-
averages: Object.values(updatedCalibration.historical?.tuple_averages || {})
|
|
3752
|
-
};
|
|
3753
|
-
const tokenEstimatesJson = JSON.stringify(tokenEstimates).replace(/"/g, '\\"');
|
|
3754
|
-
|
|
3755
3899
|
await parallel([
|
|
3756
3900
|
dispatch(
|
|
3757
3901
|
`Write updated calibration file and commit.\n\n` +
|
|
@@ -3761,8 +3905,6 @@ await parallel([
|
|
|
3761
3905
|
`Step 3: Commit the file:\n` +
|
|
3762
3906
|
` git -C "${repo}" add sprint-logs/calibration.json\n` +
|
|
3763
3907
|
` git -C "${repo}" commit -m "chore: update sprint calibration after ${cycleCount} cycle(s) on ${branch}"\n\n` +
|
|
3764
|
-
`Step 4: Update token estimates memory:\n` +
|
|
3765
|
-
` bd remember "${tokenEstimatesJson}" --key token-estimates-json\n\n` +
|
|
3766
3908
|
`If the file content is unchanged, the commit may be a no-op -- that is fine.\n` +
|
|
3767
3909
|
`Return "OK" when done.`,
|
|
3768
3910
|
{ model: MODEL_HAIKU, label: 'calibration-update', phase: 'Harvest' }
|
|
@@ -3782,7 +3924,7 @@ await parallel([
|
|
|
3782
3924
|
// Also remove sprint process files (requirements.md, feedback.md) from the PR net diff.
|
|
3783
3925
|
// Step 1 stages any sprint-log entries written by fire-and-forget appendNewEntries
|
|
3784
3926
|
// calls so the final cycle's JSONL lines are captured even when no later doer runs.
|
|
3785
|
-
await dispatch(
|
|
3927
|
+
const exportCleanupRes = await dispatch(
|
|
3786
3928
|
`Persist beads state and clean sprint scaffolding from the PR diff.\n\n` +
|
|
3787
3929
|
`Step 1 -- Stage sprint-logs and evict scaffold files from the working tree (unconditional):\n` +
|
|
3788
3930
|
` git -C "${repo}" add sprint-logs/\n` +
|
|
@@ -3790,9 +3932,13 @@ await dispatch(
|
|
|
3790
3932
|
` rm -f "${repo}/feedback.md" "${repo}/requirements.md" 2>/dev/null || true\n\n` +
|
|
3791
3933
|
`Step 2 -- Export beads state:\n` +
|
|
3792
3934
|
` bd export -o "${repo}/.beads/issues.jsonl"\n` +
|
|
3793
|
-
`
|
|
3935
|
+
` ${buildExportShrinkGuardCmd(repo)}\n` +
|
|
3794
3936
|
` git -C "${repo}" diff --cached --quiet || git -C "${repo}" -c user.name='pm' -c user.email='pm@pm.local' commit -m "chore: export beads state"\n` +
|
|
3795
|
-
` (The "diff --cached --quiet || commit" pattern only commits if something actually changed
|
|
3937
|
+
` (The "diff --cached --quiet || commit" pattern only commits if something actually changed.\n` +
|
|
3938
|
+
` The guard step above prints exactly one line starting with EXPORT_GUARD_OK,\n` +
|
|
3939
|
+
` EXPORT_GUARD_REFUSED or EXPORT_GUARD_ERROR. On REFUSED/ERROR nothing is staged, so the\n` +
|
|
3940
|
+
` commit is skipped; do not try to work around it -- continue with Step 3.\n` +
|
|
3941
|
+
` You MUST copy that EXPORT_GUARD_* line verbatim into your final reply.)\n\n` +
|
|
3796
3942
|
`Step 3 -- Check what process files are still in the PR diff:\n` +
|
|
3797
3943
|
` git -C "${repo}" diff --name-only ${base_branch}...${branch}\n\n` +
|
|
3798
3944
|
`Step 4 -- For each of requirements.md, feedback.md that appears in the diff:\n` +
|
|
@@ -3809,9 +3955,12 @@ await dispatch(
|
|
|
3809
3955
|
` The output must NOT contain requirements.md or feedback.md. If it does, repeat Step 4.\n\n` +
|
|
3810
3956
|
`Step 6 -- Push all local commits to remote:\n` +
|
|
3811
3957
|
` git -C "${repo}" push origin ${branch}\n\n` +
|
|
3812
|
-
`Return "OK" when done.`,
|
|
3958
|
+
`Return "OK" when done, followed on its own line by the EXPORT_GUARD_* line from Step 2, verbatim.`,
|
|
3813
3959
|
{ model: MODEL_HAIKU, label: 'beads-export-cleanup', phase: 'Harvest' }
|
|
3814
3960
|
);
|
|
3961
|
+
// Surface an export-guard refusal/error in the sprint log (non-fatal).
|
|
3962
|
+
const harvestGuardLine = exportGuardLogLine(detectExportGuardIssue(exportCleanupRes), 'beads-export-cleanup');
|
|
3963
|
+
if (harvestGuardLine) log(harvestGuardLine);
|
|
3815
3964
|
|
|
3816
3965
|
// ------------------------------------------------------------------ DOLT PUSH
|
|
3817
3966
|
|
|
@@ -3846,8 +3995,7 @@ const harvestPr = await dispatch(
|
|
|
3846
3995
|
` - Sprint goal: ${goal} -- ${goalMet ? 'MET' : 'NOT MET (partial delivery)'}\n` +
|
|
3847
3996
|
` - Cycles run: ${cycleCount}\n` +
|
|
3848
3997
|
` - Open items carried forward (if any): bd list --status=open and summarise\n` +
|
|
3849
|
-
` - Final review notes: ${(finalReview && finalReview.notes) || '(none)'}\n` +
|
|
3850
|
-
` - Token cost summary from: bd recall token-estimates-json\n\n` +
|
|
3998
|
+
` - Final review notes: ${(finalReview && finalReview.notes) || '(none)'}\n\n` +
|
|
3851
3999
|
`After creating the PR, return its number as prNumber (integer).`,
|
|
3852
4000
|
{ model: MODEL_SONNET, label: 'harvest-pr', phase: 'Harvest',
|
|
3853
4001
|
schema: { type: 'object', required: ['prNumber'], properties: { prNumber: { type: 'number' }, prUrl: { type: 'string' } } } }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apralabs/apra-fleet",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "MCP server for orchestrating multiple agentic AI instances (Claude, Gemini, Codex, Copilot, AGY) across machines via SSH",
|
|
5
5
|
"author": "Apra Labs",
|
|
6
6
|
"homepage": "https://github.com/Apra-Labs/apra-fleet",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"apra-fleet": "dist/index.js"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": ">=22.
|
|
26
|
+
"node": ">=22.16.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist/",
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "npm run build:contract && tsc",
|
|
55
55
|
"build:contract": "npm run build --workspace=@apralabs/fleet-api-contract",
|
|
56
|
+
"contract:generate": "node memory-contract/v1/generate-contract.mjs",
|
|
57
|
+
"contract:check": "node memory-contract/v1/generate-contract.mjs --check",
|
|
56
58
|
"gen:openapi": "npm run gen:openapi --workspace=@apralabs/fleet-api-contract",
|
|
57
59
|
"dist-pm": "node scripts/dist-pm.mjs",
|
|
58
60
|
"build:sea": "node scripts/build-sea.mjs",
|
|
@@ -90,7 +92,6 @@
|
|
|
90
92
|
"@inquirer/password": "^5.0.11",
|
|
91
93
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
92
94
|
"ajv": "^8.12.0",
|
|
93
|
-
"better-sqlite3": "^9.6.0",
|
|
94
95
|
"pg": "^8.22.0",
|
|
95
96
|
"smol-toml": "^1.6.1",
|
|
96
97
|
"ssh2": "^1.17.0",
|
|
@@ -100,7 +101,6 @@
|
|
|
100
101
|
},
|
|
101
102
|
"devDependencies": {
|
|
102
103
|
"@apralabs/fleet-api-contract": "^0.1.0",
|
|
103
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
104
104
|
"@types/node": "^22.0.0",
|
|
105
105
|
"@types/pg": "^8.20.0",
|
|
106
106
|
"@types/ssh2": "^1.15.0",
|
|
@@ -109,6 +109,8 @@
|
|
|
109
109
|
"pg-mem": "^3.0.14",
|
|
110
110
|
"postject": "^1.0.0-alpha.6",
|
|
111
111
|
"typescript": "^5.5.0",
|
|
112
|
-
"vitest": "^4.0.18"
|
|
112
|
+
"vitest": "^4.0.18",
|
|
113
|
+
"yaml": "^2.9.0",
|
|
114
|
+
"zod-to-json-schema": "^3.25.1"
|
|
113
115
|
}
|
|
114
116
|
}
|