@apralabs/apra-fleet 0.4.0 → 0.4.2
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 +159 -13
- package/dist/agents/backlog-groomer.md +31 -19
- package/dist/agents/ci-watcher.md +16 -1
- package/dist/agents/deployer.md +37 -47
- package/dist/agents/doer.md +147 -114
- package/dist/agents/harvester.md +41 -34
- package/dist/agents/integ-test-runner.md +98 -114
- package/dist/agents/kb-reconciler.md +205 -0
- package/dist/agents/plan-reviewer.md +45 -44
- package/dist/agents/planner.md +121 -50
- package/dist/agents/regression-test-runner.md +84 -81
- package/dist/agents/reviewer.md +118 -44
- package/dist/agents/schemas/doer-output.json +63 -3
- package/dist/agents/schemas/harvester-output.json +59 -2
- package/dist/agents/schemas/integ-test-runner-output.json +3 -3
- package/dist/agents/schemas/kb-reconciler-output.json +87 -0
- package/dist/agents/schemas/planner-output.json +65 -0
- package/dist/agents/schemas/regression-test-runner-output.json +4 -17
- package/dist/agents/schemas/reviewer-output.json +105 -8
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +1 -2
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/config.d.ts +3 -3
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +4 -13
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/install.d.ts +1 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +141 -44
- package/dist/cli/install.js.map +1 -1
- package/dist/cli/join.js +1 -1
- package/dist/cli/join.js.map +1 -1
- package/dist/cli/kb-commit.d.ts +12 -0
- package/dist/cli/kb-commit.d.ts.map +1 -0
- package/dist/cli/kb-commit.js +53 -0
- package/dist/cli/kb-commit.js.map +1 -0
- package/dist/cli/kb-directives.d.ts +17 -0
- package/dist/cli/kb-directives.d.ts.map +1 -0
- package/dist/cli/kb-directives.js +146 -0
- package/dist/cli/kb-directives.js.map +1 -0
- package/dist/cli/kb-import.d.ts +13 -0
- package/dist/cli/kb-import.d.ts.map +1 -0
- package/dist/cli/kb-import.js +56 -0
- package/dist/cli/kb-import.js.map +1 -0
- package/dist/cli/register-member.js +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 +16 -3
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/watch.d.ts +76 -4
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +150 -17
- package/dist/cli/watch.js.map +1 -1
- package/dist/commands/kb-server.d.ts +8 -0
- package/dist/commands/kb-server.d.ts.map +1 -0
- package/dist/commands/kb-server.js +221 -0
- package/dist/commands/kb-server.js.map +1 -0
- package/dist/index.js +77 -2
- package/dist/index.js.map +1 -1
- 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 +1 -0
- package/dist/os/linux.d.ts.map +1 -1
- package/dist/os/linux.js +19 -2
- package/dist/os/linux.js.map +1 -1
- package/dist/os/os-commands.d.ts +12 -0
- 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 +93 -0
- package/dist/os/windows-gitbash.d.ts.map +1 -0
- package/dist/os/windows-gitbash.js +244 -0
- package/dist/os/windows-gitbash.js.map +1 -0
- package/dist/os/windows.d.ts +35 -0
- package/dist/os/windows.d.ts.map +1 -1
- package/dist/os/windows.js +93 -35
- package/dist/os/windows.js.map +1 -1
- package/dist/providers/agy.d.ts +15 -3
- package/dist/providers/agy.d.ts.map +1 -1
- package/dist/providers/agy.js +145 -11
- package/dist/providers/agy.js.map +1 -1
- package/dist/providers/claude.d.ts +14 -3
- package/dist/providers/claude.d.ts.map +1 -1
- package/dist/providers/claude.js +69 -22
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts +14 -3
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +34 -8
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/copilot.d.ts +14 -3
- package/dist/providers/copilot.d.ts.map +1 -1
- package/dist/providers/copilot.js +33 -8
- package/dist/providers/copilot.js.map +1 -1
- package/dist/providers/email/headers.d.ts +15 -0
- package/dist/providers/email/headers.d.ts.map +1 -0
- package/dist/providers/email/headers.js +42 -0
- package/dist/providers/email/headers.js.map +1 -0
- package/dist/providers/email/index.d.ts +18 -0
- package/dist/providers/email/index.d.ts.map +1 -0
- package/dist/providers/email/index.js +60 -0
- package/dist/providers/email/index.js.map +1 -0
- package/dist/providers/email/provider.d.ts +49 -0
- package/dist/providers/email/provider.d.ts.map +1 -0
- package/dist/providers/email/provider.js +2 -0
- package/dist/providers/email/provider.js.map +1 -0
- package/dist/providers/email/sendgrid.d.ts +12 -0
- package/dist/providers/email/sendgrid.d.ts.map +1 -0
- package/dist/providers/email/sendgrid.js +67 -0
- package/dist/providers/email/sendgrid.js.map +1 -0
- package/dist/providers/email/smtp.d.ts +65 -0
- package/dist/providers/email/smtp.d.ts.map +1 -0
- package/dist/providers/email/smtp.js +373 -0
- package/dist/providers/email/smtp.js.map +1 -0
- 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 +14 -3
- package/dist/providers/none.d.ts.map +1 -1
- package/dist/providers/none.js +26 -2
- package/dist/providers/none.js.map +1 -1
- package/dist/providers/opencode.d.ts +14 -3
- package/dist/providers/opencode.d.ts.map +1 -1
- package/dist/providers/opencode.js +60 -6
- package/dist/providers/opencode.js.map +1 -1
- package/dist/providers/provider.d.ts +91 -5
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/provider.js +45 -1
- package/dist/providers/provider.js.map +1 -1
- package/dist/services/agent-provisioner.d.ts.map +1 -1
- package/dist/services/agent-provisioner.js +5 -8
- package/dist/services/agent-provisioner.js.map +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 +3 -0
- package/dist/services/cloud/lifecycle.js.map +1 -1
- package/dist/services/cloud/task-wrapper.d.ts +18 -0
- package/dist/services/cloud/task-wrapper.d.ts.map +1 -1
- package/dist/services/cloud/task-wrapper.js +157 -0
- package/dist/services/cloud/task-wrapper.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 +22 -3
- package/dist/services/credential-cleanup.js.map +1 -1
- package/dist/services/github-app.d.ts.map +1 -1
- package/dist/services/github-app.js +11 -2
- package/dist/services/github-app.js.map +1 -1
- package/dist/services/knowledge/audn.d.ts +37 -0
- package/dist/services/knowledge/audn.d.ts.map +1 -0
- package/dist/services/knowledge/audn.js +219 -0
- package/dist/services/knowledge/audn.js.map +1 -0
- package/dist/services/knowledge/file-hash.d.ts +11 -0
- package/dist/services/knowledge/file-hash.d.ts.map +1 -0
- package/dist/services/knowledge/file-hash.js +123 -0
- package/dist/services/knowledge/file-hash.js.map +1 -0
- package/dist/services/knowledge/http-provider.d.ts +46 -0
- package/dist/services/knowledge/http-provider.d.ts.map +1 -0
- package/dist/services/knowledge/http-provider.js +254 -0
- package/dist/services/knowledge/http-provider.js.map +1 -0
- package/dist/services/knowledge/kb-providers.d.ts +15 -0
- package/dist/services/knowledge/kb-providers.d.ts.map +1 -0
- package/dist/services/knowledge/kb-providers.js +92 -0
- package/dist/services/knowledge/kb-providers.js.map +1 -0
- package/dist/services/knowledge/kb-scope-input.d.ts +5 -0
- package/dist/services/knowledge/kb-scope-input.d.ts.map +1 -0
- package/dist/services/knowledge/kb-scope-input.js +11 -0
- package/dist/services/knowledge/kb-scope-input.js.map +1 -0
- package/dist/services/knowledge/kb-service.d.ts +3 -0
- package/dist/services/knowledge/kb-service.d.ts.map +1 -0
- package/dist/services/knowledge/kb-service.js +2 -0
- package/dist/services/knowledge/kb-service.js.map +1 -0
- package/dist/services/knowledge/path-validation.d.ts +2 -0
- package/dist/services/knowledge/path-validation.d.ts.map +1 -0
- package/dist/services/knowledge/path-validation.js +13 -0
- package/dist/services/knowledge/path-validation.js.map +1 -0
- package/dist/services/knowledge/pre-init.d.ts +14 -0
- package/dist/services/knowledge/pre-init.d.ts.map +1 -0
- package/dist/services/knowledge/pre-init.js +147 -0
- package/dist/services/knowledge/pre-init.js.map +1 -0
- package/dist/services/knowledge/project-slug.d.ts +2 -0
- package/dist/services/knowledge/project-slug.d.ts.map +1 -0
- package/dist/services/knowledge/project-slug.js +49 -0
- package/dist/services/knowledge/project-slug.js.map +1 -0
- package/dist/services/knowledge/sqlite-provider.d.ts +147 -0
- package/dist/services/knowledge/sqlite-provider.d.ts.map +1 -0
- package/dist/services/knowledge/sqlite-provider.js +1646 -0
- package/dist/services/knowledge/sqlite-provider.js.map +1 -0
- package/dist/services/knowledge/types.d.ts +163 -0
- package/dist/services/knowledge/types.d.ts.map +1 -0
- package/dist/services/knowledge/types.js +9 -0
- package/dist/services/knowledge/types.js.map +1 -0
- package/dist/services/member-home.d.ts +89 -0
- package/dist/services/member-home.d.ts.map +1 -0
- package/dist/services/member-home.js +259 -0
- package/dist/services/member-home.js.map +1 -0
- package/dist/services/member-remote-url.d.ts +34 -0
- package/dist/services/member-remote-url.d.ts.map +1 -0
- package/dist/services/member-remote-url.js +39 -0
- package/dist/services/member-remote-url.js.map +1 -0
- package/dist/services/model-pricing.d.ts.map +1 -1
- package/dist/services/model-pricing.js +0 -5
- package/dist/services/model-pricing.js.map +1 -1
- package/dist/services/orphan-recovery.d.ts +9 -3
- package/dist/services/orphan-recovery.d.ts.map +1 -1
- package/dist/services/orphan-recovery.js +22 -8
- package/dist/services/orphan-recovery.js.map +1 -1
- package/dist/services/preflight-check.d.ts +56 -0
- package/dist/services/preflight-check.d.ts.map +1 -0
- package/dist/services/preflight-check.js +277 -0
- package/dist/services/preflight-check.js.map +1 -0
- 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.js +2 -2
- 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/log-path-resolver.d.ts +11 -8
- package/dist/services/stall/log-path-resolver.d.ts.map +1 -1
- package/dist/services/stall/log-path-resolver.js +17 -40
- package/dist/services/stall/log-path-resolver.js.map +1 -1
- package/dist/services/stall/read-log-tail.d.ts.map +1 -1
- package/dist/services/stall/read-log-tail.js +6 -5
- package/dist/services/stall/read-log-tail.js.map +1 -1
- package/dist/services/stall/stall-detector.d.ts +32 -0
- package/dist/services/stall/stall-detector.d.ts.map +1 -1
- package/dist/services/stall/stall-detector.js +149 -6
- package/dist/services/stall/stall-detector.js.map +1 -1
- package/dist/services/stall/stall-poller.d.ts +34 -0
- package/dist/services/stall/stall-poller.d.ts.map +1 -1
- package/dist/services/stall/stall-poller.js +160 -35
- 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 +41 -7
- package/dist/services/strategy.js.map +1 -1
- package/dist/services/tool-registry.d.ts.map +1 -1
- package/dist/services/tool-registry.js +87 -1
- 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 +1 -1
- package/dist/services/vcs/azure-devops.d.ts.map +1 -1
- package/dist/services/vcs/azure-devops.js +105 -10
- 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 +56 -1
- 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/services/version-check.d.ts +22 -0
- package/dist/services/version-check.d.ts.map +1 -0
- package/dist/services/version-check.js +103 -0
- package/dist/services/version-check.js.map +1 -0
- package/dist/skills/fleet-sprint-cli/SKILL.md +15 -3
- package/dist/skills/pm/SKILL.md +0 -1
- package/dist/skills/pm/beads.md +6 -0
- package/dist/skills/pm/cost.md +0 -1
- package/dist/skills/pm/fleet-addendum.md +6 -1
- package/dist/skills/pm/index.md +56 -0
- package/dist/skills/pm/kb-reconcile.md +132 -0
- package/dist/skills/pm/kb-review.md +109 -0
- package/dist/tools/check-status.d.ts +47 -0
- package/dist/tools/check-status.d.ts.map +1 -1
- package/dist/tools/check-status.js +245 -3
- package/dist/tools/check-status.js.map +1 -1
- package/dist/tools/child-id-allocator.d.ts +2 -2
- package/dist/tools/cloud-control.js +2 -2
- package/dist/tools/cloud-control.js.map +1 -1
- package/dist/tools/code-intelligence-codebase-memory.d.ts +11 -0
- package/dist/tools/code-intelligence-codebase-memory.d.ts.map +1 -0
- package/dist/tools/code-intelligence-codebase-memory.js +270 -0
- package/dist/tools/code-intelligence-codebase-memory.js.map +1 -0
- package/dist/tools/code-intelligence-freshness.d.ts +2 -0
- package/dist/tools/code-intelligence-freshness.d.ts.map +1 -0
- package/dist/tools/code-intelligence-freshness.js +26 -0
- package/dist/tools/code-intelligence-freshness.js.map +1 -0
- package/dist/tools/code-intelligence-gitnexus.d.ts +14 -0
- package/dist/tools/code-intelligence-gitnexus.d.ts.map +1 -0
- package/dist/tools/code-intelligence-gitnexus.js +475 -0
- package/dist/tools/code-intelligence-gitnexus.js.map +1 -0
- package/dist/tools/code-intelligence-kb-enrich.d.ts +2 -0
- package/dist/tools/code-intelligence-kb-enrich.d.ts.map +1 -0
- package/dist/tools/code-intelligence-kb-enrich.js +65 -0
- package/dist/tools/code-intelligence-kb-enrich.js.map +1 -0
- package/dist/tools/code-intelligence-reindex.d.ts +7 -0
- package/dist/tools/code-intelligence-reindex.d.ts.map +1 -0
- package/dist/tools/code-intelligence-reindex.js +106 -0
- package/dist/tools/code-intelligence-reindex.js.map +1 -0
- package/dist/tools/code-intelligence-telemetry.d.ts +5 -0
- package/dist/tools/code-intelligence-telemetry.d.ts.map +1 -0
- package/dist/tools/code-intelligence-telemetry.js +52 -0
- package/dist/tools/code-intelligence-telemetry.js.map +1 -0
- package/dist/tools/code-intelligence-tests.d.ts +2 -0
- package/dist/tools/code-intelligence-tests.d.ts.map +1 -0
- package/dist/tools/code-intelligence-tests.js +24 -0
- package/dist/tools/code-intelligence-tests.js.map +1 -0
- package/dist/tools/code-intelligence.d.ts +114 -0
- package/dist/tools/code-intelligence.d.ts.map +1 -0
- package/dist/tools/code-intelligence.js +124 -0
- package/dist/tools/code-intelligence.js.map +1 -0
- package/dist/tools/compose-permissions.d.ts +26 -0
- package/dist/tools/compose-permissions.d.ts.map +1 -1
- package/dist/tools/compose-permissions.js +257 -33
- package/dist/tools/compose-permissions.js.map +1 -1
- package/dist/tools/execute-command.d.ts +2 -0
- package/dist/tools/execute-command.d.ts.map +1 -1
- package/dist/tools/execute-command.js +114 -28
- package/dist/tools/execute-command.js.map +1 -1
- package/dist/tools/execute-prompt.d.ts +13 -1
- package/dist/tools/execute-prompt.d.ts.map +1 -1
- package/dist/tools/execute-prompt.js +310 -61
- package/dist/tools/execute-prompt.js.map +1 -1
- package/dist/tools/kb-capture.d.ts +53 -0
- package/dist/tools/kb-capture.d.ts.map +1 -0
- package/dist/tools/kb-capture.js +130 -0
- package/dist/tools/kb-capture.js.map +1 -0
- package/dist/tools/kb-context.d.ts +17 -0
- package/dist/tools/kb-context.d.ts.map +1 -0
- package/dist/tools/kb-context.js +29 -0
- package/dist/tools/kb-context.js.map +1 -0
- package/dist/tools/kb-export.d.ts +19 -0
- package/dist/tools/kb-export.d.ts.map +1 -0
- package/dist/tools/kb-export.js +344 -0
- package/dist/tools/kb-export.js.map +1 -0
- package/dist/tools/kb-feedback.d.ts +23 -0
- package/dist/tools/kb-feedback.d.ts.map +1 -0
- package/dist/tools/kb-feedback.js +43 -0
- package/dist/tools/kb-feedback.js.map +1 -0
- package/dist/tools/kb-freshness-sweep.d.ts +14 -0
- package/dist/tools/kb-freshness-sweep.d.ts.map +1 -0
- package/dist/tools/kb-freshness-sweep.js +29 -0
- package/dist/tools/kb-freshness-sweep.js.map +1 -0
- package/dist/tools/kb-harvest.d.ts +20 -0
- package/dist/tools/kb-harvest.d.ts.map +1 -0
- package/dist/tools/kb-harvest.js +143 -0
- package/dist/tools/kb-harvest.js.map +1 -0
- package/dist/tools/kb-import.d.ts +44 -0
- package/dist/tools/kb-import.d.ts.map +1 -0
- package/dist/tools/kb-import.js +239 -0
- package/dist/tools/kb-import.js.map +1 -0
- package/dist/tools/kb-invalidate.d.ts +19 -0
- package/dist/tools/kb-invalidate.d.ts.map +1 -0
- package/dist/tools/kb-invalidate.js +34 -0
- package/dist/tools/kb-invalidate.js.map +1 -0
- package/dist/tools/kb-list.d.ts +32 -0
- package/dist/tools/kb-list.d.ts.map +1 -0
- package/dist/tools/kb-list.js +43 -0
- package/dist/tools/kb-list.js.map +1 -0
- package/dist/tools/kb-promote.d.ts +20 -0
- package/dist/tools/kb-promote.d.ts.map +1 -0
- package/dist/tools/kb-promote.js +20 -0
- package/dist/tools/kb-promote.js.map +1 -0
- package/dist/tools/kb-query.d.ts +35 -0
- package/dist/tools/kb-query.d.ts.map +1 -0
- package/dist/tools/kb-query.js +111 -0
- package/dist/tools/kb-query.js.map +1 -0
- package/dist/tools/kb-reconcile-prefilter.d.ts +14 -0
- package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -0
- package/dist/tools/kb-reconcile-prefilter.js +26 -0
- package/dist/tools/kb-reconcile-prefilter.js.map +1 -0
- package/dist/tools/kb-resolve-contradiction.d.ts +23 -0
- package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -0
- package/dist/tools/kb-resolve-contradiction.js +37 -0
- package/dist/tools/kb-resolve-contradiction.js.map +1 -0
- package/dist/tools/kb-session-prime.d.ts +26 -0
- package/dist/tools/kb-session-prime.d.ts.map +1 -0
- package/dist/tools/kb-session-prime.js +392 -0
- package/dist/tools/kb-session-prime.js.map +1 -0
- package/dist/tools/kb-setup.d.ts +20 -0
- package/dist/tools/kb-setup.d.ts.map +1 -0
- package/dist/tools/kb-setup.js +49 -0
- package/dist/tools/kb-setup.js.map +1 -0
- package/dist/tools/kb-stats.d.ts +20 -0
- package/dist/tools/kb-stats.d.ts.map +1 -0
- package/dist/tools/kb-stats.js +115 -0
- package/dist/tools/kb-stats.js.map +1 -0
- package/dist/tools/list-members.d.ts.map +1 -1
- package/dist/tools/list-members.js +6 -2
- package/dist/tools/list-members.js.map +1 -1
- package/dist/tools/member-detail.d.ts.map +1 -1
- package/dist/tools/member-detail.js +13 -3
- package/dist/tools/member-detail.js.map +1 -1
- package/dist/tools/member-reservation.d.ts.map +1 -1
- package/dist/tools/member-reservation.js +13 -1
- 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 +38 -5
- package/dist/tools/monitor-task.js.map +1 -1
- package/dist/tools/provision-auth.d.ts.map +1 -1
- package/dist/tools/provision-auth.js +15 -8
- package/dist/tools/provision-auth.js.map +1 -1
- package/dist/tools/provision-vcs-auth.d.ts +5 -2
- package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
- package/dist/tools/provision-vcs-auth.js +58 -52
- 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 +70 -3
- 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 +19 -5
- package/dist/tools/remove-member.js.map +1 -1
- package/dist/tools/report-status.d.ts.map +1 -1
- package/dist/tools/report-status.js +2 -1
- package/dist/tools/report-status.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 +69 -0
- package/dist/tools/send-email.d.ts.map +1 -0
- package/dist/tools/send-email.js +177 -0
- package/dist/tools/send-email.js.map +1 -0
- package/dist/tools/setup-ssh-key.d.ts.map +1 -1
- package/dist/tools/setup-ssh-key.js +4 -1
- package/dist/tools/setup-ssh-key.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 +43 -2
- package/dist/tools/update-member.js.map +1 -1
- package/dist/types.d.ts +12 -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/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.js +1 -1
- package/dist/utils/prompt-errors.js.map +1 -1
- package/dist/utils/session-caller.d.ts +28 -0
- package/dist/utils/session-caller.d.ts.map +1 -0
- package/dist/utils/session-caller.js +24 -0
- package/dist/utils/session-caller.js.map +1 -0
- package/dist/utils/work-folder-validation.d.ts +39 -0
- package/dist/utils/work-folder-validation.d.ts.map +1 -0
- package/dist/utils/work-folder-validation.js +60 -0
- package/dist/utils/work-folder-validation.js.map +1 -0
- package/dist/utils/workspace-trust.d.ts.map +1 -1
- package/dist/utils/workspace-trust.js +5 -1
- package/dist/utils/workspace-trust.js.map +1 -1
- package/dist/workflows/auto-sprint.js +550 -23
- package/package.json +7 -4
- package/packages/apra-fleet-client/src/client/api.mjs +210 -7
- package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +31 -19
- package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +16 -1
- package/packages/apra-fleet-se/apra-pm/agents/deployer.md +37 -47
- package/packages/apra-fleet-se/apra-pm/agents/doer.md +147 -114
- package/packages/apra-fleet-se/apra-pm/agents/harvester.md +41 -34
- package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +98 -114
- package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +205 -0
- package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +45 -44
- package/packages/apra-fleet-se/apra-pm/agents/planner.md +121 -50
- package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +84 -81
- package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +118 -44
- package/packages/apra-fleet-se/apra-pm/agents/schemas/doer-output.json +63 -3
- package/packages/apra-fleet-se/apra-pm/agents/schemas/harvester-output.json +59 -2
- package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +3 -3
- package/packages/apra-fleet-se/apra-pm/agents/schemas/kb-reconciler-output.json +87 -0
- package/packages/apra-fleet-se/apra-pm/agents/schemas/planner-output.json +65 -0
- package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +4 -17
- package/packages/apra-fleet-se/apra-pm/agents/schemas/reviewer-output.json +105 -8
- package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +0 -1
- package/packages/apra-fleet-se/apra-pm/skills/pm/beads.md +6 -0
- package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -1
- package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +6 -1
- package/packages/apra-fleet-se/apra-pm/skills/pm/index.md +56 -0
- package/packages/apra-fleet-se/apra-pm/skills/pm/kb-reconcile.md +132 -0
- package/packages/apra-fleet-se/apra-pm/skills/pm/kb-review.md +109 -0
- package/packages/apra-fleet-se/bin/cli.mjs +139 -3
- package/packages/apra-fleet-se/bin/serve.mjs +49 -2
- package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +182 -38
- 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 +258 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +1487 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +908 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +399 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +14 -4
- package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +1148 -0
- package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +229 -112
- package/packages/apra-fleet-se/fleet-sprint/errors.mjs +91 -6
- package/packages/apra-fleet-se/fleet-sprint/runner.js +2469 -238
- package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +134 -0
- package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +154 -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/skills/fleet-sprint-cli/SKILL.md +15 -3
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +350 -0
- package/packages/apra-fleet-se/fleet-sprint/sprint-progress.mjs +101 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +51 -0
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +657 -12
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +33 -4
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +60 -30
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +205 -2
- package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +164 -0
- package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +141 -26
- package/packages/apra-fleet-se/package.json +1 -0
- package/packages/apra-fleet-workflow/src/viewer/index.mjs +294 -14
- package/packages/apra-fleet-workflow/src/viewer/run-title.mjs +60 -0
- package/packages/apra-fleet-workflow/src/workflow/index.mjs +443 -35
- package/skills/fleet/SKILL.md +20 -9
- package/skills/fleet/auth-azdevops.md +44 -5
- package/skills/fleet/auth-bitbucket.md +3 -3
- package/skills/fleet/auth-github.md +2 -2
- package/skills/fleet/beads-conflict-resolution.md +141 -0
- package/skills/fleet/beads.md +16 -12
- package/skills/fleet/knowledge-agent.md +66 -0
- package/skills/fleet/onboarding.md +4 -4
- package/skills/fleet/permissions.md +32 -8
- package/skills/fleet/profiles/base-dev.json +10 -1
- package/skills/fleet/profiles/base-reviewer.json +8 -1
- package/skills/fleet/profiles/tag-kb-reconciler.json +20 -0
- package/skills/fleet/skill-matrix.md +1 -1
- package/skills/fleet/troubleshooting.md +2 -1
- package/version.json +1 -1
- package/dist/providers/gemini.d.ts +0 -42
- package/dist/providers/gemini.d.ts.map +0 -1
- package/dist/providers/gemini.js +0 -202
- package/dist/providers/gemini.js.map +0 -1
- package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +0 -151
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-tier2-runbook.md +0 -127
- package/packages/apra-fleet-se/fleet-sprint/dolt-recovery-path-b.mjs +0 -339
- package/packages/apra-fleet-se/fleet-sprint/dolt-recovery-tier2.mjs +0 -360
- package/packages/apra-fleet-se/fleet-sprint/dolt-recovery.mjs +0 -363
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apralabs/apra-fleet",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
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/",
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"overrides": {
|
|
50
|
-
"undici": "^7.29.0"
|
|
50
|
+
"undici": "^7.29.0",
|
|
51
|
+
"fast-uri": "4.1.2"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
54
|
"build": "npm run build:contract && tsc",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"start": "node dist/index.js",
|
|
62
63
|
"dev": "tsc --watch",
|
|
63
64
|
"pretest": "npm run build:contract",
|
|
64
|
-
"test": "
|
|
65
|
+
"test": "node scripts/run-all-tests.mjs",
|
|
65
66
|
"test:watch": "vitest",
|
|
66
67
|
"smoke": "tsc && node dist/smoke-test.js",
|
|
67
68
|
"prepare": "node scripts/install-hooks.mjs",
|
|
@@ -89,6 +90,7 @@
|
|
|
89
90
|
"@inquirer/password": "^5.0.11",
|
|
90
91
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
91
92
|
"ajv": "^8.12.0",
|
|
93
|
+
"better-sqlite3": "^9.6.0",
|
|
92
94
|
"pg": "^8.22.0",
|
|
93
95
|
"smol-toml": "^1.6.1",
|
|
94
96
|
"ssh2": "^1.17.0",
|
|
@@ -98,6 +100,7 @@
|
|
|
98
100
|
},
|
|
99
101
|
"devDependencies": {
|
|
100
102
|
"@apralabs/fleet-api-contract": "^0.1.0",
|
|
103
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
101
104
|
"@types/node": "^22.0.0",
|
|
102
105
|
"@types/pg": "^8.20.0",
|
|
103
106
|
"@types/ssh2": "^1.15.0",
|
|
@@ -7,14 +7,29 @@
|
|
|
7
7
|
* @property {string} [member_id] - UUID of the member
|
|
8
8
|
* @property {string} [member_name] - Friendly name of the member
|
|
9
9
|
* @property {string} [model] - Model tier ("cheap", "standard", "premium") or a specific model ID
|
|
10
|
-
* @property {boolean} [resume] - Resume the previous session if one exists. Defaults to
|
|
10
|
+
* @property {boolean|string} [resume] - Resume the previous session if one exists. Defaults to
|
|
11
11
|
* true at this client/transport layer when the field is omitted entirely. NOTE: the
|
|
12
12
|
* FleetWorkflow.agent() workflow layer (packages/apra-fleet-workflow/src/workflow/index.mjs)
|
|
13
13
|
* always sends this field explicitly, defaulting it to `false` for workflow-authored
|
|
14
14
|
* prompts (see AgentOptions.resume there and apra-fleet-unw.3 / F10) -- so workflow
|
|
15
15
|
* callers effectively opt out of this client-level default unless they ask for resume.
|
|
16
|
+
* @property {string} [session_id] - Optional explicit session ID to resume (shorthand alias for resume: "<sessionId>")
|
|
16
17
|
* @property {Record<string, string>} [substitutions] - Optional map of token name to replacement value
|
|
17
18
|
* @property {number} [timeout_s] - Inactivity timeout in seconds (default: 300)
|
|
19
|
+
* @property {number} [expected_context_tokens] - Optional estimate of how many
|
|
20
|
+
* tokens this dispatch will add to the target session's context. When set (or context_size is
|
|
21
|
+
* set), the server compares it against the session's remaining context-window headroom BEFORE
|
|
22
|
+
* invoking the LLM: too little headroom rejects the call with {reason:
|
|
23
|
+
* "insufficient_context_headroom", detail: {demand, headroom, window}} and no spawn; a fit that
|
|
24
|
+
* lands inside the safety margin still proceeds but attaches a structured contextWarning. Wins
|
|
25
|
+
* over context_size when both are set. Omitting both fields disables the check entirely --
|
|
26
|
+
* pre-existing behavior is unchanged. Matches src/tools/execute-prompt.ts's
|
|
27
|
+
* expected_context_tokens field exactly (number, optional).
|
|
28
|
+
* @property {'S'|'M'|'L'} [context_size] - Optional size-bucket shorthand for
|
|
29
|
+
* expected_context_tokens: S/M/L map to configured token estimates (fleet
|
|
30
|
+
* defaults, overridable via config.json's contextAdmission.sizeBucketTokens). Ignored when
|
|
31
|
+
* expected_context_tokens is also set. Matches src/tools/execute-prompt.ts's context_size field
|
|
32
|
+
* exactly (enum 'S'|'M'|'L', optional).
|
|
18
33
|
* @property {number} [timeoutMs] - Client-side request timeout override (ms). Not sent to
|
|
19
34
|
* the server; consumed locally by McpClient.request(). When omitted, a default is derived
|
|
20
35
|
* from max_total_s/timeout_s (see deriveTimeoutMs in this file).
|
|
@@ -26,7 +41,12 @@
|
|
|
26
41
|
/**
|
|
27
42
|
* @typedef {Object} ExecuteCommandOptions
|
|
28
43
|
* @property {string} command - The shell command to execute
|
|
29
|
-
* @property {boolean} [long_running] - Run as background task
|
|
44
|
+
* @property {boolean} [long_running] - Run as background task. Supported on linux and windows
|
|
45
|
+
* members. Windows launches the task detached via `Invoke-CimMethod Win32_Process.Create`
|
|
46
|
+
* (WMI provider host / session 0), independent of the SSH session's job object, since a plain
|
|
47
|
+
* background launch dies with the SSH channel there. darwin gets an advisory warning (the
|
|
48
|
+
* wrapper script is designed for Linux) but is not blocked. Matches
|
|
49
|
+
* src/tools/execute-command.ts's long_running branch exactly.
|
|
30
50
|
* @property {number} [max_retries] - Max crash retries (long_running only)
|
|
31
51
|
* @property {string} [member_id] - UUID of the member
|
|
32
52
|
* @property {string} [member_name] - Friendly name of the member
|
|
@@ -72,7 +92,7 @@
|
|
|
72
92
|
/**
|
|
73
93
|
* @typedef {Object} RegisterMemberOptions
|
|
74
94
|
* @property {string} friendly_name - Human-friendly name for this member (required)
|
|
75
|
-
* @property {string} work_folder - Working directory on the target machine (required)
|
|
95
|
+
* @property {string} work_folder - Working directory on the target machine (required). For remote members, must be a fully-qualified/absolute path -- "~" and relative paths are rejected.
|
|
76
96
|
* @property {"local" | "remote"} [member_type] - Member type (default: "remote")
|
|
77
97
|
* @property {string} [host] - IP address or hostname of the remote machine
|
|
78
98
|
* @property {string} [username] - SSH username
|
|
@@ -80,10 +100,25 @@
|
|
|
80
100
|
* @property {"password" | "key"} [auth_type] - Authentication method
|
|
81
101
|
* @property {string} [password] - SSH password
|
|
82
102
|
* @property {string} [key_path] - Path to SSH private key
|
|
83
|
-
* @property {
|
|
103
|
+
* @property {"read" | "push" | "admin" | "issues" | "full"} [git_access] - Git access level for this member
|
|
104
|
+
* @property {string[]} [git_repos] - Git repositories this member can access (e.g. ["Apra-Labs/ApraPipes"])
|
|
105
|
+
* @property {"aws"} [cloud_provider] - Cloud provider. When set, cloud_instance_id and key_path are required.
|
|
106
|
+
* @property {string} [cloud_instance_id] - EC2 instance ID (e.g. "i-0abc123def456789a"). Required when cloud_provider is set.
|
|
107
|
+
* @property {string} [cloud_region] - AWS region (default: "us-east-1")
|
|
108
|
+
* @property {string} [cloud_profile] - AWS CLI profile name (e.g. "apra")
|
|
109
|
+
* @property {number} [cloud_idle_timeout_min] - Minutes of inactivity before auto-stop (default: 30)
|
|
110
|
+
* @property {string} [cloud_activity_command] - Custom shell command for workload detection. Must output "busy" or "idle" on stdout.
|
|
111
|
+
* @property {"claude" | "codex" | "copilot" | "agy" | "opencode" | "none"} [llm_provider] - LLM provider for this member (default: "claude")
|
|
112
|
+
* @property {"gpt-oss-120b" | "gpt-120" | "gemini-3.5-flash-lite" | "haiku" | "gpt-5.4-mini"} [model_cheap] - Custom cheap model choice from a curated list
|
|
113
|
+
* @property {"gemini-3.5-flash" | "gpt-oss-120b" | "gpt-120" | "sonnet" | "gpt-5.4"} [model_standard] - Custom standard model choice from a curated list
|
|
114
|
+
* @property {"sonnet" | "opus" | "gpt-oss-120b"} [model_premium] - Custom premium model choice from a curated list
|
|
115
|
+
* @property {{cheap?: string, standard?: string, premium?: string}} [model_tiers] - Per-member model tier map. A single model fills all tiers.
|
|
116
|
+
* @property {"codebase-memory" | "gitnexus" | "none"} [code_intel_provider] - Code-intelligence provider for this member (default: fleet-wide config)
|
|
84
117
|
* @property {string} [category] - Optional group label
|
|
85
118
|
* @property {string[]} [tags] - Optional list of free-form labels
|
|
86
119
|
* @property {"false" | "auto" | "dangerous"} [unattended] - Permission mode for unattended execution
|
|
120
|
+
* @property {boolean} [unreservable] - Mark this member as never exclusively reservable, so it can be shared by more than one sprint at once (e.g. fleet-sprint's shared "orchestrator" role)
|
|
121
|
+
* @property {"gitbash" | "pwsh7" | "powershell5"} [shell] - Override the probed Windows shell for this member. Windows members only -- ignored for non-windows members.
|
|
87
122
|
*/
|
|
88
123
|
|
|
89
124
|
/**
|
|
@@ -91,17 +126,60 @@
|
|
|
91
126
|
* @property {string} [member_id] - UUID of the member
|
|
92
127
|
* @property {string} [member_name] - Friendly name of the member
|
|
93
128
|
* @property {string} [friendly_name] - New friendly name
|
|
94
|
-
* @property {string} [work_folder] - New working directory
|
|
129
|
+
* @property {string} [work_folder] - New working directory. For non-local (remote/relay) members, must be a fully-qualified/absolute path -- "~" and relative paths are rejected.
|
|
95
130
|
* @property {string} [host] - New host
|
|
96
131
|
* @property {string} [username] - New SSH username
|
|
97
132
|
* @property {number} [port] - New SSH port
|
|
98
133
|
* @property {"password" | "key"} [auth_type] - New auth method
|
|
99
134
|
* @property {string} [password] - New SSH password
|
|
135
|
+
* @property {boolean} [rotate_password] - Trigger secure out-of-band password re-entry for a member already using password auth. Ignored if auth_type is not password.
|
|
100
136
|
* @property {string} [key_path] - New SSH private key path
|
|
101
|
-
* @property {
|
|
137
|
+
* @property {"read" | "push" | "admin" | "issues" | "full"} [git_access] - Git access level for this member
|
|
138
|
+
* @property {string[]} [git_repos] - Git repositories this member can access (e.g. ["Apra-Labs/ApraPipes"])
|
|
139
|
+
* @property {string} [icon] - Override the auto-assigned emoji icon. Use named aliases (e.g. blue-circle, green-square) or a raw emoji.
|
|
140
|
+
* @property {string} [cloud_region] - AWS region for the cloud instance
|
|
141
|
+
* @property {string} [cloud_profile] - AWS CLI profile name
|
|
142
|
+
* @property {number} [cloud_idle_timeout_min] - Minutes of inactivity before auto-stop
|
|
143
|
+
* @property {string} [cloud_activity_command] - Custom shell command for workload detection. Must output "busy" or "idle". Pass empty string to clear.
|
|
144
|
+
* @property {"claude" | "codex" | "copilot" | "agy" | "opencode"} [llm_provider] - Change the LLM provider
|
|
145
|
+
* @property {"gpt-oss-120b" | "gpt-120" | "gemini-3.5-flash-lite" | "haiku" | "gpt-5.4-mini"} [model_cheap] - Change custom cheap model
|
|
146
|
+
* @property {"gemini-3.5-flash" | "gpt-oss-120b" | "gpt-120" | "sonnet" | "gpt-5.4"} [model_standard] - Change custom standard model
|
|
147
|
+
* @property {"sonnet" | "opus" | "gpt-oss-120b"} [model_premium] - Change custom premium model
|
|
148
|
+
* @property {{cheap?: string, standard?: string, premium?: string}} [model_tiers] - Per-member model tier map with free-form model IDs. A single model fills all tiers.
|
|
149
|
+
* @property {"codebase-memory" | "gitnexus" | "none"} [code_intel_provider] - Change the code-intelligence provider for this member
|
|
102
150
|
* @property {string} [category] - Group label
|
|
103
151
|
* @property {string[]} [tags] - Free-form labels
|
|
104
152
|
* @property {"false" | "auto" | "dangerous"} [unattended] - Permission mode
|
|
153
|
+
* @property {boolean} [unreservable] - Mark/unmark this member as shared/never exclusively reservable
|
|
154
|
+
* @property {"gitbash" | "pwsh7" | "powershell5"} [shell] - Override the probed Windows shell for this member. Windows members only -- ignored for non-windows members.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Structured result returned by memberDetail() when called with format: 'json'
|
|
159
|
+
* (src/tools/member-detail.ts). When format is 'compact' (the default), memberDetail()
|
|
160
|
+
* instead returns a plain multi-line text summary, not this shape.
|
|
161
|
+
* @typedef {Object} MemberDetailResult
|
|
162
|
+
* @property {string} server_version - Fleet server version string
|
|
163
|
+
* @property {string} name - Friendly name of the member
|
|
164
|
+
* @property {string} icon - Emoji icon for this member
|
|
165
|
+
* @property {string} id - UUID of the member
|
|
166
|
+
* @property {"local" | "remote"} type - Member type
|
|
167
|
+
* @property {string} host - "(local)" for local members, or "host:port" for remote members
|
|
168
|
+
* @property {string} [username] - SSH username (remote members)
|
|
169
|
+
* @property {string} os - Detected/registered operating system
|
|
170
|
+
* @property {"gitbash" | "pwsh7" | "powershell5"} [shell] - Registered Windows shell for this member (Windows members only)
|
|
171
|
+
* @property {string} folder - Working directory on the target machine
|
|
172
|
+
* @property {string} [repo_remote_url] - Origin URL of the git repo in `folder`, when known
|
|
173
|
+
* @property {string} [vcsProvider] - VCS provider configured for this member
|
|
174
|
+
* @property {Object} connectivity - Connectivity check result (status, latencyMs, auth, keyPath, or error)
|
|
175
|
+
* @property {boolean} [offline] - Set when the member could not be reached
|
|
176
|
+
* @property {string} llmProvider - LLM provider for this member (default: "claude")
|
|
177
|
+
* @property {Object} [llm_cli] - LLM CLI info: { version, auth }
|
|
178
|
+
* @property {Object|string} [tokenUsage] - Cumulative token usage, or "compute only" for llmProvider "none"
|
|
179
|
+
* @property {Object} [session] - Session info: { id, lastActivity, lastLlmActivityAt, status, idleSecs }
|
|
180
|
+
* @property {Object} [resources] - System resource snapshot: { cpu, memory, disk, gpu }
|
|
181
|
+
* @property {string} [branch] - Current git branch in `folder`, when it is a git repo
|
|
182
|
+
* @property {Object} [cloud] - Cloud instance details, for cloud-backed members only
|
|
105
183
|
*/
|
|
106
184
|
|
|
107
185
|
/**
|
|
@@ -142,6 +220,35 @@
|
|
|
142
220
|
* @property {string} [org_url] - Azure DevOps organization URL (e.g. https://dev.azure.com/myorg)
|
|
143
221
|
* @property {string} [pat] - Azure DevOps personal access token. Supports {{secure.NAME}}
|
|
144
222
|
* token -- resolved from the credential store server-side before use.
|
|
223
|
+
* @property {string} [pat_expires_at] - ISO 8601 date/time the Azure DevOps PAT expires, as
|
|
224
|
+
* chosen when creating the token. Propagated to the member registry so provisioning can
|
|
225
|
+
* warn when the PAT is nearing expiry. Must be parseable by Date.parse -- the server
|
|
226
|
+
* REJECTS an unparseable value rather than storing it, because a NaN expiry silences the
|
|
227
|
+
* warning and makes the credential-cleanup timer fall back to its 55-minute default.
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @typedef {Object} VcsPullRequestResponseMapping
|
|
232
|
+
* @property {string} idField - Body field carrying the PR identifier
|
|
233
|
+
* (GitHub: 'number', Azure DevOps: 'pullRequestId').
|
|
234
|
+
* @property {string|null} webUrlField - Body field carrying the browsable PR
|
|
235
|
+
* URL, or null when the body carries none (Azure DevOps).
|
|
236
|
+
* @property {string|null} webUrlTemplate - Template to CONSTRUCT the
|
|
237
|
+
* browsable URL when webUrlField is null, or null when the URL is read
|
|
238
|
+
* straight from the body.
|
|
239
|
+
*
|
|
240
|
+
* Mirrors the `pullRequestResponse` descriptor hook (apra-fleet-lzfv.4) from
|
|
241
|
+
* packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs and the
|
|
242
|
+
* canonical src/services/vcs/types.ts `VcsPullRequestResponseMapping`
|
|
243
|
+
* field-for-field, so the fleet-sprint provider registry, the server-side
|
|
244
|
+
* VCS contract and this client never drift. Declaration-only: the
|
|
245
|
+
* executable `map(body, ctx)` the JS descriptor also carries is
|
|
246
|
+
* deliberately NOT restated here, because index.mjs's own contract comment
|
|
247
|
+
* says a mirroring consumer restates `idField`/`webUrlField`/
|
|
248
|
+
* `webUrlTemplate` while `map` stays the single executable source of truth
|
|
249
|
+
* that reads those same declared fields. This typedef is declarative-only
|
|
250
|
+
* today: no MCP tool in this client yet returns a create-pull-request
|
|
251
|
+
* response for a caller to map.
|
|
145
252
|
*/
|
|
146
253
|
|
|
147
254
|
/**
|
|
@@ -154,6 +261,12 @@
|
|
|
154
261
|
* @property {string} [project_folder] - Local project folder containing the
|
|
155
262
|
* permissions.json ledger. Omit to skip ledger merge.
|
|
156
263
|
* @property {string[]} [grant] - Reactive mode: additional permissions to grant.
|
|
264
|
+
* Each entry is checked against the NEVER_AUTO_GRANT denylist, which is
|
|
265
|
+
* wildcard-matched (not exact-matched) against a normalized form of the
|
|
266
|
+
* request: sudo/su/doas, `bash -c`/`sh -c`/eval, env/printenv, nc/nmap,
|
|
267
|
+
* `chmod 777`, any catch-all such as `Bash(*)`, and any payload containing a
|
|
268
|
+
* shell-chaining metacharacter (| ; && backtick $() are rejected outright,
|
|
269
|
+
* for every caller.
|
|
157
270
|
* @property {string} [grant_reason] - Reason for the grant (stored in ledger)
|
|
158
271
|
*/
|
|
159
272
|
|
|
@@ -163,6 +276,25 @@
|
|
|
163
276
|
* @property {string} [member_name] - Friendly name of the member
|
|
164
277
|
*/
|
|
165
278
|
|
|
279
|
+
/**
|
|
280
|
+
* @typedef {Object} SendEmailOptions
|
|
281
|
+
* @property {"sendgrid" | "smtp"} [provider] - Email provider to use (default "sendgrid").
|
|
282
|
+
* Secrets are resolved server-side from the credential store ("sendgrid_api_key" / "smtp_password").
|
|
283
|
+
* @property {string} from - Sender email address (required)
|
|
284
|
+
* @property {string} [host] - SMTP server hostname (required for smtp provider)
|
|
285
|
+
* @property {number} [port] - SMTP server port (default 587, or 465 when secure is true)
|
|
286
|
+
* @property {string} [user] - SMTP username (required for smtp provider)
|
|
287
|
+
* @property {boolean} [secure] - Use implicit TLS, e.g. port 465 (default false).
|
|
288
|
+
* When false, STARTTLS is required; plaintext AUTH is refused.
|
|
289
|
+
* @property {string | string[]} to - Recipient email address, or list of addresses
|
|
290
|
+
* @property {string} subject - Email subject line
|
|
291
|
+
* @property {string} body - Plain-text email body
|
|
292
|
+
* @property {string} [html] - Optional HTML email body
|
|
293
|
+
* @property {string[]} [cc] - CC recipient addresses
|
|
294
|
+
* @property {string[]} [bcc] - BCC recipient addresses
|
|
295
|
+
* @property {{ filename: string, content: string, contentType?: string }[]} [attachments] - Optional file attachments (base64-encoded content)
|
|
296
|
+
*/
|
|
297
|
+
|
|
166
298
|
|
|
167
299
|
// Grace margin added on top of the payload's own timeout hint (timeout_s /
|
|
168
300
|
// max_total_s) so the client doesn't race the server's own deadline -- the
|
|
@@ -204,6 +336,27 @@ export function deriveTimeoutMs(payload = {}) {
|
|
|
204
336
|
return hintSeconds * 1000 + TIMEOUT_GRACE_MS;
|
|
205
337
|
}
|
|
206
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Extract the JSON payload from a raw MCP tool-call result.
|
|
341
|
+
*
|
|
342
|
+
* Every ApraFleet wrapper returns the raw callTool() result --
|
|
343
|
+
* `{ content: [{ type: 'text', text }, ...] }` -- NOT a JSON string, so
|
|
344
|
+
* `JSON.parse(result)` on it throws. Tool results can also carry
|
|
345
|
+
* display-only items (e.g. an `<apra-fleet-display>` onboarding block)
|
|
346
|
+
* AHEAD of the payload, so content[0] is not reliable either. This helper
|
|
347
|
+
* returns the first content item that parses as JSON.
|
|
348
|
+
*
|
|
349
|
+
* @param {{ content?: { text?: string }[] }} result - raw callTool() result
|
|
350
|
+
* @returns {any} the parsed JSON payload
|
|
351
|
+
* @throws {Error} when no content item contains valid JSON
|
|
352
|
+
*/
|
|
353
|
+
export function parseToolJson(result) {
|
|
354
|
+
for (const item of result?.content ?? []) {
|
|
355
|
+
try { return JSON.parse(item.text); } catch { /* not the payload */ }
|
|
356
|
+
}
|
|
357
|
+
throw new Error('No JSON payload in tool result');
|
|
358
|
+
}
|
|
359
|
+
|
|
207
360
|
export class ApraFleet {
|
|
208
361
|
/**
|
|
209
362
|
* @param {{ callTool: (name: string, args: Record<string, any>, opts?: { timeoutMs?: number, signal?: AbortSignal }) => Promise<any> }} mcpClient
|
|
@@ -253,8 +406,10 @@ export class ApraFleet {
|
|
|
253
406
|
}
|
|
254
407
|
|
|
255
408
|
/**
|
|
256
|
-
* Get detailed status for one member: connectivity, session, work folder, provider.
|
|
409
|
+
* Get detailed status for one member: connectivity, session, work folder, provider, registered shell (Windows).
|
|
257
410
|
* @param {{ member_id?: string, member_name?: string, format?: 'compact'|'json' }} options
|
|
411
|
+
* @returns {Promise<string|MemberDetailResult>} A compact text summary when format is
|
|
412
|
+
* "compact" (default), or the structured MemberDetailResult object when format is "json".
|
|
258
413
|
*/
|
|
259
414
|
async memberDetail(options) {
|
|
260
415
|
return this.mcpClient.callTool('member_detail', options);
|
|
@@ -342,6 +497,54 @@ export class ApraFleet {
|
|
|
342
497
|
return this.mcpClient.callTool('setup_ssh_key', options);
|
|
343
498
|
}
|
|
344
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Send an email. Pass provider config inline (provider, from, and for
|
|
502
|
+
* SMTP: host, port, user, secure). Secrets resolve from the credential
|
|
503
|
+
* store (sendgrid_api_key / smtp_password).
|
|
504
|
+
* @param {SendEmailOptions} options
|
|
505
|
+
*/
|
|
506
|
+
async sendEmail(options) {
|
|
507
|
+
return this.mcpClient.callTool('send_email', options);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Collect a secret from the user out-of-band and store it in the fleet
|
|
512
|
+
* credential store. The secret value never passes through the caller.
|
|
513
|
+
* @param {{ name: string, prompt: string, persist?: boolean,
|
|
514
|
+
* network_policy?: 'allow'|'confirm'|'deny', members?: string,
|
|
515
|
+
* ttl_seconds?: number }} options
|
|
516
|
+
*/
|
|
517
|
+
async credentialStoreSet(options) {
|
|
518
|
+
return this.mcpClient.callTool('credential_store_set', options);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* List stored credentials (names and metadata only -- no values).
|
|
523
|
+
* The result payload is a JSON array of { name, scope, ... } entries;
|
|
524
|
+
* extract it with parseToolJson().
|
|
525
|
+
*/
|
|
526
|
+
async credentialStoreList() {
|
|
527
|
+
return this.mcpClient.callTool('credential_store_list', {});
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Delete a named credential from the store.
|
|
532
|
+
* @param {{ name: string }} options
|
|
533
|
+
*/
|
|
534
|
+
async credentialStoreDelete(options) {
|
|
535
|
+
return this.mcpClient.callTool('credential_store_delete', options);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Update metadata (members, TTL, network policy) on an existing
|
|
540
|
+
* credential without re-entering the secret.
|
|
541
|
+
* @param {{ name: string, members?: string, ttl_seconds?: number,
|
|
542
|
+
* network_policy?: 'allow'|'confirm'|'deny' }} options
|
|
543
|
+
*/
|
|
544
|
+
async credentialStoreUpdate(options) {
|
|
545
|
+
return this.mcpClient.callTool('credential_store_update', options);
|
|
546
|
+
}
|
|
547
|
+
|
|
345
548
|
/**
|
|
346
549
|
* Fleet-server-hosted global dolt push mutex (apra-fleet-f34.2,
|
|
347
550
|
* src/tools/dolt-push-mutex.ts). Serializes cross-sprint `bd dolt push`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: backlog-groomer
|
|
3
3
|
description: For one operator's assigned beads, finds what is ready/urgent to sprint next, proposes cohesive sprint sets from interdependencies, finds duplicates, and surfaces high-priority/urgent-sounding items whose content quality is too low to act on. Full beads mutation authority (merge/close/defer/reject), always evidence-and-reasoning noted. Never changes code.
|
|
4
|
-
tools: [Read, Grep, Glob, Bash]
|
|
4
|
+
tools: [Read, Grep, Glob, Bash, ToolSearch]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Backlog Groomer
|
|
@@ -10,6 +10,20 @@ You groom ONE operator's slice of the open beads backlog: what to pick up next,
|
|
|
10
10
|
to sprint together, what's a duplicate, what needs fixing before it's actionable. You
|
|
11
11
|
analyze AND mutate beads directly -- but you never touch code beyond reading it.
|
|
12
12
|
|
|
13
|
+
## Step 0 -- Knowledge Bank (required -- do this BEFORE any grooming decision)
|
|
14
|
+
|
|
15
|
+
1. Run ToolSearch with query `"select:mcp__apra-fleet__kb_session_prime,mcp__apra-fleet__kb_capture"`
|
|
16
|
+
2. Call `mcp__apra-fleet__kb_session_prime` with `repo_path` set to the repo whose backlog
|
|
17
|
+
you are grooming, and `hint_modules` naming the subsystems the assigned beads touch.
|
|
18
|
+
Trust CONFIRMED entries fully. Use INFERRED entries as hints, not facts. This matters
|
|
19
|
+
most for duplicate detection and sprint-set grouping.
|
|
20
|
+
3. When grooming turns up a durable backlog fact -- two ids that are genuinely the same
|
|
21
|
+
work, a dependency between beads that their text does not state, or a recurring reason
|
|
22
|
+
items land unactionable -- call `mcp__apra-fleet__kb_capture` with type "knowledge".
|
|
23
|
+
Do not capture per-sprint churn; capture what stays true.
|
|
24
|
+
|
|
25
|
+
If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
|
|
26
|
+
|
|
13
27
|
## Usage modes
|
|
14
28
|
|
|
15
29
|
- **"Define my sprint"** -> Responsibility 1: ready/urgent items + sprint-set groups.
|
|
@@ -78,24 +92,23 @@ The canonical machine-readable contract lives in the sibling file
|
|
|
78
92
|
|
|
79
93
|
## Beads semantics
|
|
80
94
|
|
|
81
|
-
|
|
95
|
+
Graph semantics (`parent-child` = grouping, `blocks` = ordering, epic rules, `bd epic
|
|
96
|
+
status` gotchas) are canonical in `_shared/GRAPH-SEMANTICS.md`, the sibling file
|
|
97
|
+
installed alongside this one -- read it; do not restate or improvise those rules here.
|
|
98
|
+
Semantics specific to this role:
|
|
99
|
+
|
|
82
100
|
- `assignee` is set explicitly (`bd update <id> --assignee <identity>`) or via
|
|
83
101
|
`bd update <id> --claim` (also flips status to `in_progress`). Fall back to `owner`
|
|
84
|
-
(static, set
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
`open`/`in_progress`.
|
|
88
|
-
- `epic -> feature -> task` is a loose convention. The one hard rule: an epic may
|
|
89
|
-
`blocks` only another epic -- bd does not enforce same-type pairs.
|
|
90
|
-
- `bd epic status <id>` only rolls up correctly when `<id>` is actually typed `epic`;
|
|
91
|
-
on a non-epic id it silently returns unrelated epics.
|
|
102
|
+
(static, set at creation) only when `assignee` is empty.
|
|
103
|
+
- Only three things hide a bead from ready work: an unclosed child, an unmet `blocks`
|
|
104
|
+
dependency, or status not `open`/`in_progress`. `issue_type` never does.
|
|
92
105
|
- `gate` (`bd create --type=gate --await-type=<kind> --await-id=<id>`) blocks dependents
|
|
93
106
|
until an external condition resolves. Documented await-types are GitHub-shaped; when
|
|
94
107
|
recommending a gate, describe the pattern and let the operator pick an await-type
|
|
95
108
|
matching their actual VCS/CI.
|
|
96
|
-
- Title prefixes are convention, not schema, but widely matched on: `[test]` =
|
|
97
|
-
work
|
|
98
|
-
|
|
109
|
+
- Title prefixes are convention, not schema, but widely matched on: `[test]` =
|
|
110
|
+
verification work; `[impl]` = implementation; `[integ]` = filed by an integration
|
|
111
|
+
pass; `[regression][carry-over]` = rolled-over regression bug.
|
|
99
112
|
|
|
100
113
|
## Step 1 -- Load the backlog, scoped to identity
|
|
101
114
|
|
|
@@ -111,9 +124,8 @@ Fall back to non-`--json`/non-`--assignee` forms if unsupported, then filter cli
|
|
|
111
124
|
visibly separate. `bd show <id> --json` before any judgment call -- never flag
|
|
112
125
|
description quality from a summary line alone.
|
|
113
126
|
|
|
114
|
-
If a `bd` JSON payload is too large to read directly, redirect it
|
|
115
|
-
|
|
116
|
-
existing `.beads/` gitignore entry) -- never write scratch JSON to the repo root.
|
|
127
|
+
If a `bd` JSON payload is too large to read directly, redirect it to a gitignored
|
|
128
|
+
scratch path (e.g. `.beads/tmp/<name>.json`) -- never to the repo root.
|
|
117
129
|
|
|
118
130
|
## Step 2 -- Structural deadlock scan (every time)
|
|
119
131
|
|
|
@@ -225,10 +237,10 @@ The canonical machine-readable contract for this output lives in the sibling fil
|
|
|
225
237
|
```json
|
|
226
238
|
{
|
|
227
239
|
"status": "OK",
|
|
228
|
-
"identity": "
|
|
240
|
+
"identity": "dev@example.com",
|
|
229
241
|
"notes": "12 ready, 2 sprint sets proposed, 1 duplicate merged, 3 needing grooming.",
|
|
230
242
|
"ready": [
|
|
231
|
-
{ "id": "BD-14", "type": "task", "priority": "P1", "status": "open", "assignee": "
|
|
243
|
+
{ "id": "BD-14", "type": "task", "priority": "P1", "status": "open", "assignee": "dev@example.com", "ageDays": 4, "size": "M", "rationale": "No blockers, clear AC, feeds the auth epic." }
|
|
232
244
|
],
|
|
233
245
|
"sprintSets": [
|
|
234
246
|
{ "label": "auth-hardening", "beadIds": ["BD-14", "BD-15"], "reason": "Shared parent BD-10, sequential blocks edge." }
|
|
@@ -247,7 +259,7 @@ The canonical machine-readable contract for this output lives in the sibling fil
|
|
|
247
259
|
],
|
|
248
260
|
"notYours": [],
|
|
249
261
|
"stale": [
|
|
250
|
-
{ "id": "BD-60", "type": "bug", "priority": "P1", "status": "open", "assignee": "
|
|
262
|
+
{ "id": "BD-60", "type": "bug", "priority": "P1", "status": "open", "assignee": "dev@example.com", "ageDays": 95, "size": "S", "rationale": "P1, 95 days untouched -- likely dropped, confirm before continuing to carry it." }
|
|
251
263
|
],
|
|
252
264
|
"structuralIssues": [
|
|
253
265
|
{ "kind": "deadlock", "description": "BD-70 blocks its own parent BD-71", "beadIds": ["BD-70", "BD-71"] }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ci-watcher
|
|
3
3
|
description: Polls CI for the sprint HEAD SHA; returns green/red/not_configured/pending.
|
|
4
|
-
tools: [Bash]
|
|
4
|
+
tools: [Bash, ToolSearch]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# CI Status Check
|
|
@@ -22,6 +22,18 @@ Your dispatch prompt must supply ONE of the two scoping forms:
|
|
|
22
22
|
`expectedHeadSha` missing), do not guess or check an arbitrary branch. Return
|
|
23
23
|
`status: "pending"` with `notes` stating which input was missing.
|
|
24
24
|
|
|
25
|
+
## Step 0 -- Knowledge Bank (required -- do this BEFORE any other work)
|
|
26
|
+
|
|
27
|
+
1. Run ToolSearch with query `"select:mcp__apra-fleet__kb_session_prime"`
|
|
28
|
+
2. Call `mcp__apra-fleet__kb_session_prime` with `repo_path` set to the repo whose CI you
|
|
29
|
+
are checking, and `hint_modules` naming its CI workflow files. Trust CONFIRMED entries
|
|
30
|
+
fully. Use INFERRED entries as hints, not facts. Known-flaky tests and known CI failure
|
|
31
|
+
modes are the point here -- they change how you read a red run.
|
|
32
|
+
3. Do NOT capture. You poll a status API; you verify no claim about this repository, so you
|
|
33
|
+
have no basis to write one down.
|
|
34
|
+
|
|
35
|
+
If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
|
|
36
|
+
|
|
25
37
|
## Step 1 -- List recent CI runs
|
|
26
38
|
|
|
27
39
|
Branch-scoped:
|
|
@@ -36,6 +48,9 @@ gh run list --pr <prNumber> --limit 5 --json databaseId,status,conclusion,headSh
|
|
|
36
48
|
(In PR-scoped mode, apply Step 2 to the runs for the PR's head commit instead of
|
|
37
49
|
`expectedHeadSha`.)
|
|
38
50
|
|
|
51
|
+
If `gh` is unavailable or the repo's remote is not GitHub, do not guess at another CI
|
|
52
|
+
system: return `status: "not_configured"` with `notes` naming what was found.
|
|
53
|
+
|
|
39
54
|
## Step 2 -- Interpret the result
|
|
40
55
|
|
|
41
56
|
**No runs returned**: CI has never been triggered on this branch.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deployer
|
|
3
3
|
description: Follows deploy.md to deploy the software onto the target environment and verify it with the smoke test.
|
|
4
|
-
tools: [Read, Bash]
|
|
4
|
+
tools: [Read, Bash, ToolSearch]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Deployment
|
|
@@ -28,29 +28,21 @@ playbook yourself. If `deploy.md` is entirely absent (not just missing a
|
|
|
28
28
|
section), return `deployed: false` with `notes` naming the missing file -- do
|
|
29
29
|
not improvise deploy steps that are not written down in the runbook.
|
|
30
30
|
|
|
31
|
-
## Step
|
|
32
|
-
|
|
33
|
-
Read `deploy.md`.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`.claude/settings.json` (
|
|
37
|
-
`.claude/settings.local.json` (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Run the merge MECHANICALLY, in one command, rather than reading each file
|
|
48
|
-
separately and merging by eye -- two sequential `cat`s invite stopping at the
|
|
49
|
-
first (often-empty) file and never getting to the second, which silently
|
|
50
|
-
reports a real grant as missing (observed live, apra-fleet: `settings.json`
|
|
51
|
-
legitimately carries no `permissions.allow` in this repo's convention -- every
|
|
52
|
-
grant lives in `settings.local.json` -- so a by-eye read that stops at the
|
|
53
|
-
first empty file always concludes "nothing is granted" even when it is):
|
|
31
|
+
## Step 0a -- Check permissions before running anything
|
|
32
|
+
|
|
33
|
+
Read `deploy.md`. If it has a `## Permissions` section, verify each listed
|
|
34
|
+
command prefix is covered by the MERGED effective permission set -- on
|
|
35
|
+
Claude Code, the union of `permissions.allow` from BOTH
|
|
36
|
+
`.claude/settings.json` (team-committed baseline) AND
|
|
37
|
+
`.claude/settings.local.json` (per-checkout, gitignored -- the only file the
|
|
38
|
+
fleet's `compose_permissions` tool writes to; see
|
|
39
|
+
`skills/fleet/permissions.md`). A grant in either file counts; a broader
|
|
40
|
+
prefix counts too (e.g. `Bash(docker:*)` covers `docker compose`). Other
|
|
41
|
+
providers keep the equivalent allowlist in their own native config file.
|
|
42
|
+
|
|
43
|
+
Compute the union MECHANICALLY, in one command -- reading the files
|
|
44
|
+
separately and merging by eye reliably misses grants when the first file is
|
|
45
|
+
empty:
|
|
54
46
|
|
|
55
47
|
```bash
|
|
56
48
|
node -e '
|
|
@@ -67,29 +59,27 @@ console.log(JSON.stringify([...allow], null, 2));
|
|
|
67
59
|
# use your provider's native config file(s) otherwise
|
|
68
60
|
```
|
|
69
61
|
|
|
70
|
-
Check every required
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
effective set is: ask the orchestrator/operator to run `compose_permissions`
|
|
92
|
-
with the missing grant. Do NOT proceed past Step 0 if any permissions are missing.
|
|
62
|
+
Check every required prefix against this one merged list. If any prefix has
|
|
63
|
+
no covering entry, STOP immediately and return `deployed: false`, listing
|
|
64
|
+
every missing entry in `notes` and asking the orchestrator/operator to run
|
|
65
|
+
`compose_permissions` with the missing grant(s), then re-trigger the sprint.
|
|
66
|
+
NEVER add permissions yourself: `.claude/settings.json` changes require a
|
|
67
|
+
team PR, and `.claude/settings.local.json` must be provisioned via the
|
|
68
|
+
`compose_permissions` MCP tool (the provider-agnostic delivery mechanism
|
|
69
|
+
across all supported providers), never hand-edited. Do NOT proceed past
|
|
70
|
+
Step 0a while any permission is missing.
|
|
71
|
+
|
|
72
|
+
## Step 0b -- Knowledge Bank (required -- do this BEFORE any deploy.md operation)
|
|
73
|
+
|
|
74
|
+
1. Run ToolSearch with query `"select:mcp__apra-fleet__kb_session_prime,mcp__apra-fleet__kb_capture"`
|
|
75
|
+
2. Call `mcp__apra-fleet__kb_session_prime` with `repo_path` set to the repo being deployed,
|
|
76
|
+
and `hint_modules` naming the deploy targets in `deploy.md`. Trust CONFIRMED entries
|
|
77
|
+
fully. Use INFERRED entries as hints, not facts.
|
|
78
|
+
3. When a deploy step fails for a non-obvious reason, or a runbook instruction turns out to
|
|
79
|
+
be wrong or incomplete, call `mcp__apra-fleet__kb_capture` with type "runbook" or
|
|
80
|
+
"learning". A deploy gotcha you had to discover is exactly what the next deploy needs.
|
|
81
|
+
|
|
82
|
+
If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
|
|
93
83
|
|
|
94
84
|
## deploy.md operations
|
|
95
85
|
|