@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
|
@@ -37,6 +37,8 @@ import {
|
|
|
37
37
|
getVcsProvider,
|
|
38
38
|
resolveVcsProviderChain,
|
|
39
39
|
resolveVcsProviderForHost,
|
|
40
|
+
resolveVcsAuthProviderForHost,
|
|
41
|
+
isAuthBackend,
|
|
40
42
|
} from './vcs-providers/index.mjs';
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -70,9 +72,44 @@ function buildVcsCommand(action, params) {
|
|
|
70
72
|
return builder(params);
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Deterministic hard cap on a PR description's length (apra-fleet PR-body
|
|
77
|
+
* length fix): Azure DevOps rejects/fails to raise a pull request whose
|
|
78
|
+
* description is too long, and the LLM role that drafts a PR description is
|
|
79
|
+
* only ever prompted to respect a limit -- it can and does ignore that
|
|
80
|
+
* guidance. This constant is the single source of truth for the cap, shared
|
|
81
|
+
* by every provider's create-pull-request path (buildCreatePrCommand below)
|
|
82
|
+
* rather than a magic number duplicated per provider.
|
|
83
|
+
* @type {number}
|
|
84
|
+
*/
|
|
85
|
+
export const PR_DESCRIPTION_MAX_LENGTH = 3500;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Build a "raise a PR" command for the given provider.
|
|
89
|
+
*
|
|
90
|
+
* Enforces PR_DESCRIPTION_MAX_LENGTH on `params.body` DETERMINISTICALLY,
|
|
91
|
+
* regardless of provider (GitHub, Azure DevOps, ...) and regardless of
|
|
92
|
+
* whether the LLM that drafted the description obeyed the prompt guidance to
|
|
93
|
+
* stay under the limit. A body over the limit is truncated to exactly its
|
|
94
|
+
* first PR_DESCRIPTION_MAX_LENGTH characters before it reaches the provider's
|
|
95
|
+
* own command builder, so a PR can always be raised.
|
|
96
|
+
*
|
|
97
|
+
* This module stays pure (no I/O, no logging of its own -- see the header
|
|
98
|
+
* doc): a truncation is reported back to the caller as the returned
|
|
99
|
+
* `descriptionTruncated` field ({ originalLength, maxLength }, or `null` when
|
|
100
|
+
* no truncation occurred) so the caller (runner.js's raiseVcsPrForMember) can
|
|
101
|
+
* log/emit the warning through its own logging convention.
|
|
102
|
+
*/
|
|
74
103
|
export function buildCreatePrCommand(params) {
|
|
75
|
-
|
|
104
|
+
const { body } = params || {};
|
|
105
|
+
let effectiveBody = body;
|
|
106
|
+
let descriptionTruncated = null;
|
|
107
|
+
if (typeof body === 'string' && body.length > PR_DESCRIPTION_MAX_LENGTH) {
|
|
108
|
+
descriptionTruncated = { originalLength: body.length, maxLength: PR_DESCRIPTION_MAX_LENGTH };
|
|
109
|
+
effectiveBody = body.slice(0, PR_DESCRIPTION_MAX_LENGTH);
|
|
110
|
+
}
|
|
111
|
+
const built = buildVcsCommand('create-pull-request', { ...params, body: effectiveBody });
|
|
112
|
+
return descriptionTruncated ? { ...built, descriptionTruncated } : { ...built, descriptionTruncated: null };
|
|
76
113
|
}
|
|
77
114
|
|
|
78
115
|
// ---------------------------------------------------------------------------
|
|
@@ -117,6 +154,21 @@ export function buildCreatePrCommand(params) {
|
|
|
117
154
|
* @param {{ fleetApi: { memberDetail: (opts: { member_name: string, format?: string }) => Promise<any> } }} opts
|
|
118
155
|
* @returns {Promise<{ provider: string, authMode: string|null }>}
|
|
119
156
|
*/
|
|
157
|
+
/**
|
|
158
|
+
* The `code` resolveProvider() stamps on the ONE failure that means "this
|
|
159
|
+
* member simply has no usable registered VCS provider" -- as opposed to a
|
|
160
|
+
* member_detail RPC failure, an unresolvable member name, or a malformed
|
|
161
|
+
* response, all of which resolveProvider() also throws for.
|
|
162
|
+
*
|
|
163
|
+
* A caller that wants to self-heal ONLY that case (runner.js's dispatch-time
|
|
164
|
+
* VCS-provider fallback) must be able to tell them apart: applying a
|
|
165
|
+
* git-remote-derived guess after a network blip would paper over a real
|
|
166
|
+
* failure with a possibly-wrong provider. Matching on the message text would
|
|
167
|
+
* make that wording load-bearing, so the signal is a stable property instead.
|
|
168
|
+
* @type {string}
|
|
169
|
+
*/
|
|
170
|
+
export const VCS_NO_REGISTERED_PROVIDER = 'VCS_NO_REGISTERED_PROVIDER';
|
|
171
|
+
|
|
120
172
|
export async function resolveProvider(member, { fleetApi } = {}) {
|
|
121
173
|
if (!fleetApi || typeof fleetApi.memberDetail !== 'function') {
|
|
122
174
|
throw new Error(`ERROR: VCSModule: resolveProvider requires an injected fleetApi.memberDetail() -- cannot resolve a VCS provider for member '${member}' without one.`);
|
|
@@ -149,7 +201,12 @@ export async function resolveProvider(member, { fleetApi } = {}) {
|
|
|
149
201
|
|
|
150
202
|
const provider = parsed && typeof parsed.vcsProvider === 'string' ? parsed.vcsProvider : null;
|
|
151
203
|
if (!provider || !known.includes(provider)) {
|
|
152
|
-
|
|
204
|
+
// shell-guard-allow: nested backtick template (${provider ? `"${provider}"` : ...}) is JS interpolation resolved before this Error is thrown, never dispatched as a command string -- shell-command-guard's segment tracker mis-classifies the nested backtick as surviving expansion.
|
|
205
|
+
const err = new Error(`ERROR: VCSModule: resolveProvider: member '${member}' has no registered VCS provider (vcsProvider: ${provider ? `"${provider}"` : '(absent)'}) -- known providers: ${known.join(', ')}. Provision one via provision_vcs_auth with an explicit 'provider' before relying on resolveProvider.`);
|
|
206
|
+
// See VCS_NO_REGISTERED_PROVIDER above: this is the only failure a
|
|
207
|
+
// caller may self-heal from, so it is the only one that carries a code.
|
|
208
|
+
err.code = VCS_NO_REGISTERED_PROVIDER;
|
|
209
|
+
throw err;
|
|
153
210
|
}
|
|
154
211
|
|
|
155
212
|
const impl = getVcsProvider(provider);
|
|
@@ -197,6 +254,19 @@ export function buildCommentCommand(params) {
|
|
|
197
254
|
// the least dangerous to under-match. A provider may override the order with
|
|
198
255
|
// its own `precedence` array (dolt's classifier, for example, promotes
|
|
199
256
|
// no-remote to first) without any change here.
|
|
257
|
+
//
|
|
258
|
+
// PERMISSION SCOPE (a REFINEMENT of AUTH_DENIED, not a new kind). A provider
|
|
259
|
+
// may declare `permissionScope.rules` for the texts that mean "the identity
|
|
260
|
+
// was understood and the PRINCIPAL lacks the granted permission" (see
|
|
261
|
+
// ./vcs-providers/index.mjs's descriptor contract and ./vcs-providers/
|
|
262
|
+
// github.mjs's workflow-file refusal). Those rules are checked BEFORE the
|
|
263
|
+
// precedence loop and their match is the verdict outright -- because such a
|
|
264
|
+
// refusal typically arrives wrapped in the host's generic rejection tail,
|
|
265
|
+
// which a higher-precedence kind (DIVERGED) already claims. The match also
|
|
266
|
+
// travels on the result as `permissionScope: true`, which is what lets the
|
|
267
|
+
// self-heal gate (git-topology.mjs's runGitStep) tell "re-minting cannot
|
|
268
|
+
// possibly help" apart from every other AUTH_DENIED, WITHOUT re-reading
|
|
269
|
+
// stderr at the call site.
|
|
200
270
|
|
|
201
271
|
const KIND_PRECEDENCE = Object.freeze([
|
|
202
272
|
VCS_FAILURE_KINDS.DIVERGED,
|
|
@@ -227,30 +297,76 @@ const KIND_PRECEDENCE = Object.freeze([
|
|
|
227
297
|
* @param {{ provider?: string }} [opts] - provider selects the rule chain;
|
|
228
298
|
* defaults to DEFAULT_VCS_PROVIDER ('github'), which reproduces runner.js's
|
|
229
299
|
* full auth pattern set exactly.
|
|
230
|
-
* @returns {{ kind: string, providerCode: string|null, retryable: boolean, raw: string }}
|
|
231
|
-
* `kind` is the ONLY field control flow may branch on
|
|
300
|
+
* @returns {{ kind: string, providerCode: string|null, retryable: boolean, permissionScope: boolean, operatorReferral: string|null, raw: string }}
|
|
301
|
+
* `kind` is the ONLY field control flow may branch on, with ONE declared
|
|
302
|
+
* exception: `permissionScope` (see below), which is a REFINEMENT of
|
|
303
|
+
* AUTH_DENIED, not a parallel vocabulary. `providerCode` is the
|
|
232
304
|
* provider-specific token (e.g. an HTTP status, or an Azure DevOps
|
|
233
|
-
* 'TF401019') carried as a DIAGNOSTIC detail. `
|
|
234
|
-
*
|
|
305
|
+
* 'TF401019') carried as a DIAGNOSTIC detail. `permissionScope` is true when
|
|
306
|
+
* a provider's `permissionScope.rules` matched: the identity was understood
|
|
307
|
+
* and the PRINCIPAL lacks the granted permission, so re-minting the same
|
|
308
|
+
* credential cannot help and the caller must NOT self-heal or retry.
|
|
309
|
+
* `operatorReferral` is the provider's own operator-facing remedy text for
|
|
310
|
+
* that case (null otherwise), so a shared caller can surface WHICH resource
|
|
311
|
+
* and WHICH missing permission without carrying a vendor wording itself.
|
|
312
|
+
* `raw` is the input, normalized to a string, so a caller can log the
|
|
313
|
+
* evidence behind the verdict.
|
|
235
314
|
*/
|
|
236
315
|
export function classifyFailure(rawStderr, opts = {}) {
|
|
237
316
|
const raw = String(rawStderr == null ? '' : rawStderr);
|
|
238
317
|
const providerName = (opts && opts.provider) || DEFAULT_VCS_PROVIDER;
|
|
239
318
|
const chain = resolveVcsProviderChain(providerName);
|
|
240
319
|
|
|
320
|
+
// PERMISSION-SCOPE RULES ARE CHECKED FIRST, ahead of KIND_PRECEDENCE.
|
|
321
|
+
//
|
|
322
|
+
// A host's permission refusal almost always arrives wrapped in that host's
|
|
323
|
+
// GENERIC rejection tail -- for git, "error: failed to push some refs to
|
|
324
|
+
// ...", which is emitted for EVERY rejected push and which GenericGitVCS
|
|
325
|
+
// matches as DIVERGED, the highest-precedence kind. Running the normal
|
|
326
|
+
// precedence loop first would therefore read a permission refusal as a
|
|
327
|
+
// divergence and send the caller into a doomed pull --rebase. The
|
|
328
|
+
// alternative -- reordering the provider's whole `precedence` array to put
|
|
329
|
+
// AUTH_DENIED first -- would silently re-read every OTHER ambiguous text
|
|
330
|
+
// for that provider too (a publickey refusal that also mentions a
|
|
331
|
+
// non-fast-forward, a GitLab "Access denied" that also carries git's
|
|
332
|
+
// generic "Authentication failed" tail), which is exactly the kind of
|
|
333
|
+
// collateral verdict change this taxonomy exists to prevent. So the
|
|
334
|
+
// override is per-RULE and opt-in per provider, not per provider-wide
|
|
335
|
+
// ordering. Most-derived provider first, same as the precedence loop.
|
|
336
|
+
let permissionScope = false;
|
|
337
|
+
let operatorReferral = null;
|
|
338
|
+
for (const provider of chain) {
|
|
339
|
+
const scope = provider.permissionScope;
|
|
340
|
+
if (!scope || !Array.isArray(scope.rules)) continue;
|
|
341
|
+
if (!scope.rules.some((re) => re.test(raw))) continue;
|
|
342
|
+
permissionScope = true;
|
|
343
|
+
if (typeof scope.describe === 'function') {
|
|
344
|
+
const described = scope.describe(raw);
|
|
345
|
+
operatorReferral = typeof described === 'string' && described.trim() ? described : null;
|
|
346
|
+
}
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
|
|
241
350
|
const precedence = chain.find((p) => Array.isArray(p.precedence))?.precedence || KIND_PRECEDENCE;
|
|
242
351
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
352
|
+
// A permission-scope match IS the verdict: identity understood, principal
|
|
353
|
+
// refused (errors.mjs's AUTH_DENIED, word for word). The precedence loop
|
|
354
|
+
// is skipped entirely in that case -- running it could only re-read the
|
|
355
|
+
// host's generic rejection tail as something else.
|
|
356
|
+
let kind = VCS_FAILURE_KINDS.AUTH_DENIED;
|
|
357
|
+
if (!permissionScope) {
|
|
358
|
+
kind = VCS_FAILURE_KINDS.UNKNOWN;
|
|
359
|
+
outer:
|
|
360
|
+
for (const candidate of precedence) {
|
|
361
|
+
// Most-derived provider first within each kind, so a provider can
|
|
362
|
+
// sharpen a base verdict without editing the base.
|
|
363
|
+
for (const provider of chain) {
|
|
364
|
+
const patterns = (provider.rules && provider.rules[candidate]) || [];
|
|
365
|
+
for (const re of patterns) {
|
|
366
|
+
if (re.test(raw)) {
|
|
367
|
+
kind = candidate;
|
|
368
|
+
break outer;
|
|
369
|
+
}
|
|
254
370
|
}
|
|
255
371
|
}
|
|
256
372
|
}
|
|
@@ -264,7 +380,7 @@ export function classifyFailure(rawStderr, opts = {}) {
|
|
|
264
380
|
}
|
|
265
381
|
}
|
|
266
382
|
|
|
267
|
-
return { kind, providerCode, retryable: VCS_RETRYABLE_KINDS.has(kind), raw };
|
|
383
|
+
return { kind, providerCode, retryable: VCS_RETRYABLE_KINDS.has(kind), permissionScope, operatorReferral, raw };
|
|
268
384
|
}
|
|
269
385
|
|
|
270
386
|
/**
|
|
@@ -404,8 +520,59 @@ export function capabilities(remoteUrl) {
|
|
|
404
520
|
return { hasRemote: true, canOpenPullRequest: !!providerCaps.canOpenPullRequest, host: parsed.host };
|
|
405
521
|
}
|
|
406
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Resolve a git remote URL into the repository coordinates its OWN provider
|
|
525
|
+
* defines, by dispatching to that provider's optional parseRepoRef() hook
|
|
526
|
+
* (apra-fleet-5co8.1.2). This is the shared half of the remote-URL axis: the
|
|
527
|
+
* host is parsed here, the provider is chosen by the registry, and every
|
|
528
|
+
* provider-specific rule -- which URL shapes are legal, what the coordinates
|
|
529
|
+
* are called, what shape to tell the operator to use -- lives in the provider
|
|
530
|
+
* file, so no caller (runner.js in particular) needs a provider conditional.
|
|
531
|
+
*
|
|
532
|
+
* Three outcomes, deliberately distinct so a caller can tell "not my business"
|
|
533
|
+
* apart from "your remote is wrong":
|
|
534
|
+
* - null no provider claims this host, or the claiming provider
|
|
535
|
+
* has no parseRepoRef hook. The caller keeps its own
|
|
536
|
+
* generic owner/repo parse -- behavior unchanged for
|
|
537
|
+
* GitHub and every other provider.
|
|
538
|
+
* - { canonical, ref, provider }
|
|
539
|
+
* the provider recognized the remote; `canonical` is its
|
|
540
|
+
* display/identity key (e.g. org/project/repo for Azure
|
|
541
|
+
* DevOps) and `ref` the full coordinate object.
|
|
542
|
+
* - { error } the provider CLAIMS this host but does not recognize the
|
|
543
|
+
* URL -- a malformed remote, not an unknown one. A typed
|
|
544
|
+
* 'ERROR: ' string naming the shape the provider expects
|
|
545
|
+
* (its optional `repoRefHint`), for the caller to surface
|
|
546
|
+
* as a preflight failure rather than proceeding with
|
|
547
|
+
* half-parsed coordinates.
|
|
548
|
+
*
|
|
549
|
+
* @param {unknown} remoteUrl
|
|
550
|
+
* @returns {{ canonical: string, ref: object, provider: string }|{ error: string }|null}
|
|
551
|
+
*/
|
|
552
|
+
export function parseProviderRepoRef(remoteUrl) {
|
|
553
|
+
const url = String(remoteUrl ?? '').trim();
|
|
554
|
+
const parsed = parseRemote(url);
|
|
555
|
+
if (!parsed || !parsed.host) return null;
|
|
556
|
+
|
|
557
|
+
const provider = resolveVcsProviderForHost(parsed.host);
|
|
558
|
+
if (!provider || typeof provider.parseRepoRef !== 'function') return null;
|
|
559
|
+
|
|
560
|
+
const ref = provider.parseRepoRef(url);
|
|
561
|
+
if (ref && typeof ref.canonical === 'string' && ref.canonical) {
|
|
562
|
+
return { canonical: ref.canonical, ref, provider: provider.name };
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
const hint = (typeof provider.repoRefHint === 'string' && provider.repoRefHint.trim())
|
|
566
|
+
? provider.repoRefHint.trim()
|
|
567
|
+
: '(this provider documents no expected remote shape)';
|
|
568
|
+
return {
|
|
569
|
+
error: `ERROR: git remote '${url}' is claimed by VCS provider '${provider.name}' but is not a repository URL it recognizes; expected the shape ${hint}`,
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
|
|
407
573
|
export const VCSModule = {
|
|
408
574
|
buildCreatePrCommand,
|
|
575
|
+
parseProviderRepoRef,
|
|
409
576
|
buildCommentCommand,
|
|
410
577
|
classifyFailure,
|
|
411
578
|
toGitVerdict,
|
|
@@ -418,7 +585,12 @@ export const VCSModule = {
|
|
|
418
585
|
listVcsProviders,
|
|
419
586
|
listVcsAuthProviders,
|
|
420
587
|
getVcsProvider,
|
|
588
|
+
resolveVcsProviderForHost,
|
|
589
|
+
resolveVcsAuthProviderForHost,
|
|
590
|
+
isAuthBackend,
|
|
591
|
+
VCS_NO_REGISTERED_PROVIDER,
|
|
421
592
|
DEFAULT_VCS_PROVIDER,
|
|
593
|
+
PR_DESCRIPTION_MAX_LENGTH,
|
|
422
594
|
};
|
|
423
595
|
|
|
424
596
|
export {
|
|
@@ -430,6 +602,19 @@ export {
|
|
|
430
602
|
listVcsProviders,
|
|
431
603
|
listVcsAuthProviders,
|
|
432
604
|
getVcsProvider,
|
|
605
|
+
// apra-fleet-5oo: re-exported so runner.js can ask "which registered
|
|
606
|
+
// provider claims this remote host?" without reaching past this module
|
|
607
|
+
// into ./vcs-providers/index.mjs directly -- same seam every other
|
|
608
|
+
// provider-registry helper above is reached through.
|
|
609
|
+
resolveVcsProviderForHost,
|
|
610
|
+
// apra-fleet-5oo review fix: the credential-provisioning sibling of the
|
|
611
|
+
// above (anchored host matching, auth backends only), plus the predicate
|
|
612
|
+
// that defines "auth backend" -- reached through this same seam rather
|
|
613
|
+
// than runner.js reaching past it into ./vcs-providers/index.mjs.
|
|
614
|
+
resolveVcsAuthProviderForHost,
|
|
615
|
+
isAuthBackend,
|
|
616
|
+
// VCS_NO_REGISTERED_PROVIDER is already exported at its `export const`
|
|
617
|
+
// declaration above -- listing it again here is a duplicate-export error.
|
|
433
618
|
};
|
|
434
619
|
|
|
435
620
|
export default VCSModule;
|