@apralabs/apra-fleet 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +145 -7
- package/dist/agents/backlog-groomer.md +17 -1
- package/dist/agents/ci-watcher.md +13 -1
- package/dist/agents/deployer.md +15 -3
- package/dist/agents/doer.md +35 -1
- package/dist/agents/harvester.md +22 -3
- package/dist/agents/integ-test-runner.md +18 -2
- package/dist/agents/kb-reconciler.md +216 -0
- package/dist/agents/plan-reviewer.md +14 -1
- package/dist/agents/planner.md +88 -5
- package/dist/agents/regression-test-runner.md +19 -1
- package/dist/agents/reviewer.md +104 -3
- 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 +2 -2
- package/dist/agents/schemas/kb-reconciler-output.json +87 -0
- package/dist/agents/schemas/planner-output.json +65 -0
- package/dist/agents/schemas/reviewer-output.json +105 -8
- package/dist/cli/install.d.ts +1 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +136 -5
- 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/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +11 -0
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/watch.d.ts +53 -4
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +118 -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/linux.d.ts +1 -0
- package/dist/os/linux.d.ts.map +1 -1
- package/dist/os/linux.js +18 -1
- package/dist/os/linux.js.map +1 -1
- package/dist/os/os-commands.d.ts +5 -0
- package/dist/os/os-commands.d.ts.map +1 -1
- package/dist/os/windows.d.ts +35 -0
- package/dist/os/windows.d.ts.map +1 -1
- package/dist/os/windows.js +67 -31
- package/dist/os/windows.js.map +1 -1
- package/dist/providers/agy.d.ts +12 -1
- package/dist/providers/agy.d.ts.map +1 -1
- package/dist/providers/agy.js +134 -9
- package/dist/providers/agy.js.map +1 -1
- package/dist/providers/claude.d.ts +11 -1
- package/dist/providers/claude.d.ts.map +1 -1
- package/dist/providers/claude.js +47 -19
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts +11 -1
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +29 -6
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/copilot.d.ts +11 -1
- package/dist/providers/copilot.d.ts.map +1 -1
- package/dist/providers/copilot.js +26 -6
- 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/gemini.d.ts +11 -1
- package/dist/providers/gemini.d.ts.map +1 -1
- package/dist/providers/gemini.js +38 -4
- package/dist/providers/gemini.js.map +1 -1
- package/dist/providers/none.d.ts +11 -1
- package/dist/providers/none.d.ts.map +1 -1
- package/dist/providers/none.js +21 -0
- package/dist/providers/none.js.map +1 -1
- package/dist/providers/opencode.d.ts +11 -1
- package/dist/providers/opencode.d.ts.map +1 -1
- package/dist/providers/opencode.js +55 -4
- package/dist/providers/opencode.js.map +1 -1
- package/dist/providers/provider.d.ts +77 -0
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/provider.js +44 -0
- package/dist/providers/provider.js.map +1 -1
- package/dist/services/agent-provisioner.d.ts.map +1 -1
- package/dist/services/agent-provisioner.js +3 -6
- package/dist/services/agent-provisioner.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/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 +256 -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/orphan-recovery.d.ts +5 -2
- package/dist/services/orphan-recovery.d.ts.map +1 -1
- package/dist/services/orphan-recovery.js +19 -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/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/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 +134 -2
- package/dist/services/stall/stall-poller.js.map +1 -1
- package/dist/services/strategy.d.ts.map +1 -1
- package/dist/services/strategy.js +2 -2
- 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/vcs/github.d.ts.map +1 -1
- package/dist/services/vcs/github.js +32 -1
- package/dist/services/vcs/github.js.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 +13 -2
- package/dist/skills/pm/beads.md +6 -0
- package/dist/skills/pm/fleet-addendum.md +6 -0
- 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 +242 -0
- package/dist/tools/check-status.js.map +1 -1
- package/dist/tools/child-id-allocator.d.ts +2 -2
- 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 +244 -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 +86 -16
- 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 +257 -45
- 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/member-detail.d.ts.map +1 -1
- package/dist/tools/member-detail.js +8 -0
- package/dist/tools/member-detail.js.map +1 -1
- package/dist/tools/monitor-task.d.ts.map +1 -1
- package/dist/tools/monitor-task.js +21 -3
- 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 +10 -3
- package/dist/tools/provision-auth.js.map +1 -1
- package/dist/tools/register-member.d.ts +3 -0
- package/dist/tools/register-member.d.ts.map +1 -1
- package/dist/tools/register-member.js +30 -1
- 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 +17 -3
- 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/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 +2 -0
- package/dist/tools/setup-ssh-key.js.map +1 -1
- package/dist/tools/update-member.d.ts +3 -0
- package/dist/tools/update-member.d.ts.map +1 -1
- package/dist/tools/update-member.js +25 -1
- package/dist/tools/update-member.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.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/workflows/auto-sprint.js +546 -6
- package/package.json +7 -4
- package/packages/apra-fleet-client/src/client/api.mjs +118 -4
- package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +17 -1
- package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +13 -1
- package/packages/apra-fleet-se/apra-pm/agents/deployer.md +15 -3
- package/packages/apra-fleet-se/apra-pm/agents/doer.md +35 -1
- package/packages/apra-fleet-se/apra-pm/agents/harvester.md +22 -3
- package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +18 -2
- package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +216 -0
- package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +14 -1
- package/packages/apra-fleet-se/apra-pm/agents/planner.md +88 -5
- package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +19 -1
- package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +104 -3
- 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 +2 -2
- 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/reviewer-output.json +105 -8
- package/packages/apra-fleet-se/apra-pm/skills/pm/beads.md +6 -0
- package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +6 -0
- 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 +7 -0
- package/packages/apra-fleet-se/bin/serve.mjs +14 -2
- package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +31 -5
- package/packages/apra-fleet-se/fleet-sprint/docs/README.md +1 -1
- package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +23 -151
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +256 -0
- package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +1482 -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/dolt-settle.mjs +972 -0
- package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +167 -101
- package/packages/apra-fleet-se/fleet-sprint/errors.mjs +50 -6
- package/packages/apra-fleet-se/fleet-sprint/runner.js +1416 -116
- package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +13 -2
- 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-providers/github.mjs +30 -17
- package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +62 -2
- package/packages/apra-fleet-se/package.json +1 -0
- package/packages/apra-fleet-workflow/src/viewer/index.mjs +127 -13
- package/packages/apra-fleet-workflow/src/viewer/run-title.mjs +60 -0
- package/packages/apra-fleet-workflow/src/workflow/index.mjs +8 -4
- package/skills/fleet/knowledge-agent.md +66 -0
- package/skills/fleet/permissions.md +28 -4
- 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/version.json +1 -1
- 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
|
@@ -5,14 +5,71 @@
|
|
|
5
5
|
"title": "harvester output",
|
|
6
6
|
"description": "Canonical machine-readable output contract for the harvester role. See agents/harvester.md Step 7 for the prose contract this mirrors.",
|
|
7
7
|
"type": "object",
|
|
8
|
-
"required": [
|
|
8
|
+
"required": [
|
|
9
|
+
"status",
|
|
10
|
+
"notes"
|
|
11
|
+
],
|
|
9
12
|
"properties": {
|
|
10
13
|
"status": {
|
|
11
14
|
"type": "string",
|
|
12
|
-
"enum": [
|
|
15
|
+
"enum": [
|
|
16
|
+
"OK",
|
|
17
|
+
"FAILED"
|
|
18
|
+
]
|
|
13
19
|
},
|
|
14
20
|
"notes": {
|
|
15
21
|
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"kb_captures": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"description": "Durable knowledge this role verified during its run. The engine makes the kb_capture calls; the role only decides. Optional -- omit or send [] to capture nothing.",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": [
|
|
29
|
+
"type",
|
|
30
|
+
"title",
|
|
31
|
+
"summary",
|
|
32
|
+
"content",
|
|
33
|
+
"source_files"
|
|
34
|
+
],
|
|
35
|
+
"properties": {
|
|
36
|
+
"type": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"knowledge",
|
|
40
|
+
"learning",
|
|
41
|
+
"runbook"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"title": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 8
|
|
47
|
+
},
|
|
48
|
+
"summary": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 20
|
|
51
|
+
},
|
|
52
|
+
"content": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Full detail of the entry. REQUIRED -- kbCaptureSchema declares content as z.string().min(1), so a capture without it is rejected at the MCP boundary and persists nothing (apra-fleet-23c).",
|
|
55
|
+
"minLength": 40
|
|
56
|
+
},
|
|
57
|
+
"source_files": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"description": "Files that make this claim checkable. At least one is REQUIRED -- SqliteProvider.capture() rejects an entry with no basis, because the freshness sweep can never stale it.",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"minItems": 1
|
|
64
|
+
},
|
|
65
|
+
"symbols": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
16
73
|
}
|
|
17
74
|
}
|
|
18
75
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"verifySetClosed": {
|
|
31
31
|
"type": "array",
|
|
32
32
|
"items": { "type": "string" },
|
|
33
|
-
"description": "
|
|
33
|
+
"description": "Verify-set bead ids (any issue_type, Step 1b) closed this run. Optional for backward compatibility -- absent/omitted on a dispatch that named no verify-set ids."
|
|
34
34
|
},
|
|
35
35
|
"verifySetLeftOpen": {
|
|
36
36
|
"type": "array",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"reason": { "type": "string" }
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
"description": "
|
|
45
|
+
"description": "Verify-set bead ids (Step 1b) left open this run, with why (gap bug filed, or inconclusive). Optional for backward compatibility."
|
|
46
46
|
},
|
|
47
47
|
"observedFailures": {
|
|
48
48
|
"type": "array",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "apra-pm/kb-reconciler-output@1",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"title": "kb-reconciler output",
|
|
6
|
+
"description": "Canonical machine-readable output contract for the kb-reconciler role. See agents/kb-reconciler.md for the prose contract this mirrors.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"pairsReceived",
|
|
10
|
+
"codeDecided",
|
|
11
|
+
"tierDecided",
|
|
12
|
+
"deferred",
|
|
13
|
+
"resolutions",
|
|
14
|
+
"deferredPairs",
|
|
15
|
+
"bibleCommitted"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"pairsReceived": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"description": "Count of contradiction pairs received in the dispatch prompt."
|
|
21
|
+
},
|
|
22
|
+
"codeDecided": {
|
|
23
|
+
"type": "number",
|
|
24
|
+
"description": "Count of pairs whose winner was determined by reading the merged code."
|
|
25
|
+
},
|
|
26
|
+
"tierDecided": {
|
|
27
|
+
"type": "number",
|
|
28
|
+
"description": "Count of pairs where the code was silent and the trust-tier tiebreak (CONFIRMED > INFERRED > UNVERIFIED) decided the winner."
|
|
29
|
+
},
|
|
30
|
+
"deferred": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"description": "Count of pairs left flagged: active user-directives, or genuinely undecidable (same tier, code silent)."
|
|
33
|
+
},
|
|
34
|
+
"resolutions": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"description": "Every pair actually resolved via kb_resolve_contradiction, code-decided or tier-decided alike.",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": [
|
|
40
|
+
"winnerId",
|
|
41
|
+
"loserId",
|
|
42
|
+
"evidence"
|
|
43
|
+
],
|
|
44
|
+
"properties": {
|
|
45
|
+
"winnerId": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"loserId": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"evidence": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "For code-decided wins: a real file path + symbol actually read. For tier-decided wins: the trust-tier tiebreak reasoning."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"deferredPairs": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"description": "Pairs left flagged, unresolved, with a reason.",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": [
|
|
64
|
+
"originalId",
|
|
65
|
+
"challengerId",
|
|
66
|
+
"reason"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"originalId": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"challengerId": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"reason": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "\"active-directive\" or an explanation of why the pair stayed undecided."
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"bibleCommitted": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"description": "The committed value returned by kb_export's result after Step 8."
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "apra-pm/planner-output@1",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"title": "planner output",
|
|
6
|
+
"description": "Canonical machine-readable output contract for the planner role. See agents/planner.md Step 4 (Validate your own DAG) and Step 0 (Knowledge Bank) for the prose contract this mirrors. The planner previously had no schema at all -- its dispatch ended 'Confirm with any text when done' -- so this is the contract that makes its output routable rather than free prose.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["status", "notes"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"status": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": ["OK", "BLOCKED"]
|
|
13
|
+
},
|
|
14
|
+
"notes": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"featureIds": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"description": "Feature-level bead ids created or updated this round.",
|
|
20
|
+
"items": { "type": "string" }
|
|
21
|
+
},
|
|
22
|
+
"taskIds": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "Task-level bead ids created or updated this round.",
|
|
25
|
+
"items": { "type": "string" }
|
|
26
|
+
},
|
|
27
|
+
"kb_captures": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "Durable knowledge this role verified during its run. The engine makes the kb_capture calls; the role only decides. Optional -- omit or send [] to capture nothing.",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["type", "title", "summary", "content", "source_files"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"type": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["knowledge", "learning", "runbook"]
|
|
37
|
+
},
|
|
38
|
+
"title": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 8
|
|
41
|
+
},
|
|
42
|
+
"summary": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 20
|
|
45
|
+
},
|
|
46
|
+
"content": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Full detail of the entry. REQUIRED -- kbCaptureSchema declares content as z.string().min(1), so a capture without it is rejected at the MCP boundary and persists nothing (apra-fleet-23c).",
|
|
49
|
+
"minLength": 40
|
|
50
|
+
},
|
|
51
|
+
"source_files": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"description": "Files that make this claim checkable. At least one is REQUIRED -- SqliteProvider.capture() rejects an entry with no basis, because the freshness sweep can never stale it.",
|
|
54
|
+
"items": { "type": "string" },
|
|
55
|
+
"minItems": 1
|
|
56
|
+
},
|
|
57
|
+
"symbols": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "type": "string" }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -5,32 +5,129 @@
|
|
|
5
5
|
"title": "reviewer output",
|
|
6
6
|
"description": "Canonical machine-readable output contract for the reviewer role. See agents/reviewer.md Step 5 for the prose contract this mirrors.",
|
|
7
7
|
"type": "object",
|
|
8
|
-
"required": [
|
|
8
|
+
"required": [
|
|
9
|
+
"verdict",
|
|
10
|
+
"notes",
|
|
11
|
+
"reopenIds",
|
|
12
|
+
"newTasks"
|
|
13
|
+
],
|
|
9
14
|
"properties": {
|
|
10
15
|
"verdict": {
|
|
11
16
|
"type": "string",
|
|
12
|
-
"enum": [
|
|
17
|
+
"enum": [
|
|
18
|
+
"APPROVED",
|
|
19
|
+
"CHANGES_NEEDED"
|
|
20
|
+
]
|
|
13
21
|
},
|
|
14
22
|
"notes": {
|
|
15
23
|
"type": "string"
|
|
16
24
|
},
|
|
17
25
|
"reopenIds": {
|
|
18
26
|
"type": "array",
|
|
19
|
-
"items": {
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
20
30
|
},
|
|
21
31
|
"replanIds": {
|
|
22
32
|
"type": "array",
|
|
23
|
-
"items": {
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
}
|
|
24
36
|
},
|
|
25
37
|
"newTasks": {
|
|
26
38
|
"type": "array",
|
|
27
39
|
"items": {
|
|
28
40
|
"type": "object",
|
|
29
|
-
"required": [
|
|
41
|
+
"required": [
|
|
42
|
+
"title",
|
|
43
|
+
"description",
|
|
44
|
+
"priority"
|
|
45
|
+
],
|
|
46
|
+
"properties": {
|
|
47
|
+
"title": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Plain text only: letters, digits, space, and . , : ; ! ? ( ) ' _ / [ ] - -- nothing else. No backticks, double quotes, $, or backslash (the title is interpolated into a shell command downstream). Do NOT wrap a command/flag/filename in backticks here -- write it plain (e.g. \"Surface the Windows service registration mode in apra-fleet status\") or move the formatted detail into description instead, which has no such restriction. NOT enforced as a hard schema constraint here (deliberately no \"pattern\"): a single out-of-allowlist newTask title must never make ajv reject/retry the WHOLE structured verdict (verdict, notes, reopenIds, and the other newTasks) -- see validateNewTask() in fleet-sprint/runner.js, the actual (per-item, non-fatal) enforcement point, applied after parsing."
|
|
50
|
+
},
|
|
51
|
+
"description": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"priority": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"kb_promotions": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"description": "Entries this reviewer VERIFIED against the tree and is promoting to CONFIRMED. Reviewer-only: promotion is the sole path that mints CONFIRMED, and widening capture does not widen promotion. The engine makes the kb_promote calls.",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": [
|
|
66
|
+
"id",
|
|
67
|
+
"reason"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"id": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "The entry id, copied verbatim from the 'KNOWLEDGE BANK -- promotion candidates' block in your dispatch prompt. That block is the ONLY source of promotable ids -- do not call a kb_* tool to find one, and never invent one.",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"reason": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "The evidence for this promotion -- what you actually checked. kb_promote refuses a trivial reason.",
|
|
78
|
+
"minLength": 20
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"kb_captures": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"description": "Durable knowledge this role verified during its run. The engine makes the kb_capture calls; the role only decides. Optional -- omit or send [] to capture nothing.",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"required": [
|
|
89
|
+
"type",
|
|
90
|
+
"title",
|
|
91
|
+
"summary",
|
|
92
|
+
"content",
|
|
93
|
+
"source_files"
|
|
94
|
+
],
|
|
30
95
|
"properties": {
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
96
|
+
"type": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"enum": [
|
|
99
|
+
"knowledge",
|
|
100
|
+
"learning",
|
|
101
|
+
"runbook"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"title": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 8
|
|
107
|
+
},
|
|
108
|
+
"summary": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 20
|
|
111
|
+
},
|
|
112
|
+
"content": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Full detail of the entry. REQUIRED -- kbCaptureSchema declares content as z.string().min(1), so a capture without it is rejected at the MCP boundary and persists nothing (apra-fleet-23c).",
|
|
115
|
+
"minLength": 40
|
|
116
|
+
},
|
|
117
|
+
"source_files": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"description": "Files that make this claim checkable. At least one is REQUIRED -- SqliteProvider.capture() rejects an entry with no basis, because the freshness sweep can never stale it.",
|
|
120
|
+
"items": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"minItems": 1
|
|
124
|
+
},
|
|
125
|
+
"symbols": {
|
|
126
|
+
"type": "array",
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
34
131
|
}
|
|
35
132
|
}
|
|
36
133
|
}
|
package/dist/cli/install.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ interface AssetManifest {
|
|
|
35
35
|
builtinWorkflows?: Record<string, string>;
|
|
36
36
|
autoSprintArgsSkill?: Record<string, string>;
|
|
37
37
|
fleetSprintCliSkill?: Record<string, string>;
|
|
38
|
+
fleetSupervisorSkill?: Record<string, string>;
|
|
38
39
|
}
|
|
39
40
|
export declare function buildDevManifest(root: string): AssetManifest;
|
|
40
41
|
/** Inject a manifest for tests - avoids SEA asset extraction. Pass null to restore default. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAQA,OAAO,EASL,qBAAqB,EACtB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAQA,OAAO,EASL,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoBvE,MAAM,WAAW,YAAY;IAC3B,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,UAAU,EAAE,OAAO,UAAU,CAAC;CAC/B;AAGD,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAEvE;AACD,uEAAuE;AACvE,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AASD,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAAsB;AAE9E,wBAAgB,KAAK,IAAI,OAAO,CAQ/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAe5C;AAkCD,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAIlC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAG1C,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAG7C,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAG7C,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAiID,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAwH5D;AAGD,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAA2B;AAE9F;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAmC;AAWxG;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAoB7E;AA0GD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAgBzE;AAwID,wBAAgB,kBAAkB,IAAI,OAAO,CAoB5C;AAED,wBAAgB,aAAa,CAAC,MAAM,GAAE,SAAS,GAAG,SAAqB,GAAG,IAAI,CAU7E;AAWD,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAQD,gHAAgH;AAChH,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,IAAI,CAEjF;AAMD;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAgB5D;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAUlE;AAyBD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6vB9D"}
|
package/dist/cli/install.js
CHANGED
|
@@ -7,6 +7,7 @@ import { DEFAULT_PORT, LOG_FILE_PATH } from '../paths.js';
|
|
|
7
7
|
import { getServiceManager } from '../services/service-manager/index.js';
|
|
8
8
|
import { BIN_DIR, HOOKS_DIR, SCRIPTS_DIR, getProviderInstallConfig, readConfig, writeConfig, writeInstallConfig, PROVIDER_STANDARD_MODELS } from './config.js';
|
|
9
9
|
import { transformAgentForOpenCode, transformAgentForAgy } from './agent-transform.js';
|
|
10
|
+
import { FLEET_DIR } from '../paths.js';
|
|
10
11
|
import { extractWorkflowSubsystemAssets } from './workflow-assets.js';
|
|
11
12
|
import { downloadAndExtractDolt, verifyDolt } from './dolt-install.js';
|
|
12
13
|
import { classifyRunningServer, getInstallDataDir } from './install-guard.js';
|
|
@@ -89,6 +90,11 @@ const AUTO_SPRINT_ARGS_SKILL_NAME = 'auto-sprint-args';
|
|
|
89
90
|
// as the pm and fleet skills).
|
|
90
91
|
const FLEET_SPRINT_CLI_SKILL_NAME = 'fleet-sprint-cli';
|
|
91
92
|
const FLEET_SPRINT_CLI_SKILL_VENDOR_BASE = 'packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli';
|
|
93
|
+
// Helper skill for driving fleet-sprints via the supervisor HTTP API
|
|
94
|
+
// (start/check/kill), as opposed to FLEET_SPRINT_CLI_SKILL_NAME above (direct
|
|
95
|
+
// CLI invocation). Ships alongside it, same provider-agnostic rationale.
|
|
96
|
+
const FLEET_SUPERVISOR_SKILL_NAME = 'fleet-supervisor';
|
|
97
|
+
const FLEET_SUPERVISOR_SKILL_VENDOR_BASE = 'packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor';
|
|
92
98
|
import { fileURLToPath } from 'url';
|
|
93
99
|
import { dirname } from 'path';
|
|
94
100
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -255,6 +261,16 @@ export function buildDevManifest(root) {
|
|
|
255
261
|
? FLEET_SPRINT_CLI_SKILL_VENDOR_BASE
|
|
256
262
|
: `dist/skills/${FLEET_SPRINT_CLI_SKILL_NAME}`;
|
|
257
263
|
const fleetSprintCliSkill = collectFilesRec(cliSkillDir, cliSkillBase, cliSkillBase);
|
|
264
|
+
// fleet-supervisor helper skill (ships inside the fleet-sprint package;
|
|
265
|
+
// documents the supervisor HTTP API contract for starting/checking/killing
|
|
266
|
+
// sprints). Provider-agnostic -- installed for every LLM provider.
|
|
267
|
+
const vendorSupervisorSkill = path.join(root, ...FLEET_SUPERVISOR_SKILL_VENDOR_BASE.split('/'));
|
|
268
|
+
const distSupervisorSkill = path.join(root, 'dist', 'skills', FLEET_SUPERVISOR_SKILL_NAME);
|
|
269
|
+
const supervisorSkillDir = fs.existsSync(vendorSupervisorSkill) ? vendorSupervisorSkill : distSupervisorSkill;
|
|
270
|
+
const supervisorSkillBase = fs.existsSync(vendorSupervisorSkill)
|
|
271
|
+
? FLEET_SUPERVISOR_SKILL_VENDOR_BASE
|
|
272
|
+
: `dist/skills/${FLEET_SUPERVISOR_SKILL_NAME}`;
|
|
273
|
+
const fleetSupervisorSkill = collectFilesRec(supervisorSkillDir, supervisorSkillBase, supervisorSkillBase);
|
|
258
274
|
// Collect auto-sprint.js from apra-pm/.claude/workflows (or dist/workflows fallback)
|
|
259
275
|
const vendorWorkflows = path.join(root, 'packages', 'apra-fleet-se', 'apra-pm', '.claude', 'workflows');
|
|
260
276
|
const workflowsSrc = fs.existsSync(vendorWorkflows)
|
|
@@ -308,7 +324,7 @@ export function buildDevManifest(root) {
|
|
|
308
324
|
return {
|
|
309
325
|
version: vf.version, hooks, scripts, skills, fleetSkills, agents, workflows,
|
|
310
326
|
workflowRuntime, agentSchemas, builtinWorkflows, autoSprintArgsSkill,
|
|
311
|
-
fleetSprintCliSkill,
|
|
327
|
+
fleetSprintCliSkill, fleetSupervisorSkill,
|
|
312
328
|
};
|
|
313
329
|
}
|
|
314
330
|
let _manifestOverride = null;
|
|
@@ -681,6 +697,29 @@ export function writeAgyWorkspaceOverlays(workFolder) {
|
|
|
681
697
|
fs.writeFileSync(filePath, '', { mode: 0o644 });
|
|
682
698
|
}
|
|
683
699
|
}
|
|
700
|
+
// T3.4 (F9b, D8): copy the repo's committed .fleet/kb-canonical-global.json
|
|
701
|
+
// (when present) into the shared global KB data dir
|
|
702
|
+
// (~/.apra-fleet/data/knowledge/global/kb-canonical-global.json) so EVERY
|
|
703
|
+
// project on this machine can see the platform-level global bible without
|
|
704
|
+
// carrying it in its own repo. NON-FATAL on every path: absent source file ->
|
|
705
|
+
// skip silently (not an error -- most repos never carry this file); any
|
|
706
|
+
// read/copy failure (permissions, disk full, malformed path) -> warn and
|
|
707
|
+
// continue. The installer must never fail because of the bible.
|
|
708
|
+
function copyGlobalBible(repoCwd) {
|
|
709
|
+
try {
|
|
710
|
+
const srcPath = path.join(repoCwd, '.fleet', 'kb-canonical-global.json');
|
|
711
|
+
if (!fs.existsSync(srcPath))
|
|
712
|
+
return;
|
|
713
|
+
const destDir = path.join(FLEET_DIR, 'knowledge', 'global');
|
|
714
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
715
|
+
const destPath = path.join(destDir, 'kb-canonical-global.json');
|
|
716
|
+
fs.copyFileSync(srcPath, destPath);
|
|
717
|
+
console.log(' [OK] Global knowledge bible copied to ' + destDir);
|
|
718
|
+
}
|
|
719
|
+
catch (err) {
|
|
720
|
+
console.warn(' [WARN] Global knowledge bible copy skipped:', err instanceof Error ? err.message : String(err));
|
|
721
|
+
}
|
|
722
|
+
}
|
|
684
723
|
export async function runInstall(args) {
|
|
685
724
|
// --help / -h guard - must come first, before any side effects (#142)
|
|
686
725
|
if (args.includes('--help') || args.includes('-h')) {
|
|
@@ -843,6 +882,7 @@ Options:
|
|
|
843
882
|
if (installWorkflows)
|
|
844
883
|
totalSteps++; // workflow-subsystem runtime/schemas/built-ins step
|
|
845
884
|
totalSteps++; // dolt CLI install step (apra-fleet-ire.3) -- unconditional, mirrors Beads step
|
|
885
|
+
totalSteps++; // KB + code intelligence setup -- unconditional, runs after Beads
|
|
846
886
|
if (serviceStep)
|
|
847
887
|
totalSteps++;
|
|
848
888
|
if (llm === 'gemini' && (installFleet || installPm)) {
|
|
@@ -1194,6 +1234,40 @@ ${process.platform === 'win32' ? ' taskkill /F /IM apra-fleet.exe' : ' pki
|
|
|
1194
1234
|
console.warn(` [!] ${FLEET_SPRINT_CLI_SKILL_NAME} skill source not found -- skill not installed`);
|
|
1195
1235
|
}
|
|
1196
1236
|
}
|
|
1237
|
+
// --- fleet-supervisor helper skill (all providers) ---
|
|
1238
|
+
// Documents the supervisor HTTP API contract for starting/checking/killing
|
|
1239
|
+
// sprints. Same gating as fleet-sprint-cli above.
|
|
1240
|
+
if (installFleet || installPm) {
|
|
1241
|
+
const supervisorSkillDest = path.join(paths.configDir, 'skills', FLEET_SUPERVISOR_SKILL_NAME);
|
|
1242
|
+
const supervisorSkillEntries = isSea()
|
|
1243
|
+
? Object.entries(manifest.fleetSupervisorSkill ?? {}).map(([relPath, assetKey]) => ({
|
|
1244
|
+
relPath,
|
|
1245
|
+
content: extractAsset(assetKey),
|
|
1246
|
+
}))
|
|
1247
|
+
: (() => {
|
|
1248
|
+
const root = findProjectRoot();
|
|
1249
|
+
const vendorSupervisorSkill = path.join(root, ...FLEET_SUPERVISOR_SKILL_VENDOR_BASE.split('/'));
|
|
1250
|
+
const distSupervisorSkill = path.join(root, 'dist', 'skills', FLEET_SUPERVISOR_SKILL_NAME);
|
|
1251
|
+
const supervisorSkillSrc = fs.existsSync(vendorSupervisorSkill) ? vendorSupervisorSkill : distSupervisorSkill;
|
|
1252
|
+
const supervisorSkillBase = fs.existsSync(vendorSupervisorSkill)
|
|
1253
|
+
? FLEET_SUPERVISOR_SKILL_VENDOR_BASE
|
|
1254
|
+
: `dist/skills/${FLEET_SUPERVISOR_SKILL_NAME}`;
|
|
1255
|
+
const collected = collectFilesRec(supervisorSkillSrc, supervisorSkillBase, supervisorSkillBase);
|
|
1256
|
+
return Object.entries(collected).map(([relPath, rootRelativeLabel]) => ({
|
|
1257
|
+
relPath,
|
|
1258
|
+
content: fs.readFileSync(path.join(root, rootRelativeLabel), 'utf-8'),
|
|
1259
|
+
}));
|
|
1260
|
+
})();
|
|
1261
|
+
if (supervisorSkillEntries.length > 0) {
|
|
1262
|
+
clearDirSync(supervisorSkillDest);
|
|
1263
|
+
for (const { relPath, content } of supervisorSkillEntries) {
|
|
1264
|
+
writeAssetFile(path.join(supervisorSkillDest, relPath), content);
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
console.warn(` [!] ${FLEET_SUPERVISOR_SKILL_NAME} skill source not found -- skill not installed`);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1197
1271
|
if (!installFleet && !installPm) {
|
|
1198
1272
|
console.log(` Skipping skills (use --skill all to install, or omit --skill for default)`);
|
|
1199
1273
|
}
|
|
@@ -1221,7 +1295,7 @@ ${process.platform === 'win32' ? ' taskkill /F /IM apra-fleet.exe' : ' pki
|
|
|
1221
1295
|
// See docs/workflow-subsystem-plan.md Section 6 / Section 2.1 for the layout.
|
|
1222
1296
|
if (installWorkflows) {
|
|
1223
1297
|
// Two steps follow workflows (dolt, then Beads) before the optional service step.
|
|
1224
|
-
const workflowsStepNum = serviceStep ? totalSteps -
|
|
1298
|
+
const workflowsStepNum = serviceStep ? totalSteps - 4 : totalSteps - 3;
|
|
1225
1299
|
console.log(` [${workflowsStepNum}/${totalSteps}] Installing workflow runtime...`);
|
|
1226
1300
|
// Extraction itself (node_modules / schemas / built-in workflows / .installed.json)
|
|
1227
1301
|
// lives in workflow-assets.ts -- the SAME code path workflow.ts's self-heal
|
|
@@ -1237,7 +1311,7 @@ ${process.platform === 'win32' ? ' taskkill /F /IM apra-fleet.exe' : ' pki
|
|
|
1237
1311
|
// Mirrors the Beads install step immediately below: already-installed check
|
|
1238
1312
|
// first, download+extract+verify otherwise. NON-FATAL, same as Beads -- a
|
|
1239
1313
|
// missing/broken dolt must never fail "apra-fleet install".
|
|
1240
|
-
const doltStep = serviceStep ? totalSteps -
|
|
1314
|
+
const doltStep = serviceStep ? totalSteps - 3 : totalSteps - 2;
|
|
1241
1315
|
console.log(` [${doltStep}/${totalSteps}] Installing Dolt CLI...`);
|
|
1242
1316
|
let doltVersion = 'not available';
|
|
1243
1317
|
if (doltStepEnabled()) {
|
|
@@ -1271,7 +1345,9 @@ ${process.platform === 'win32' ? ' taskkill /F /IM apra-fleet.exe' : ' pki
|
|
|
1271
1345
|
// --- Beads install step ---
|
|
1272
1346
|
// shell:true required on Windows - npm global packages install as .cmd wrappers
|
|
1273
1347
|
// that cannot be directly spawned by Node without a shell
|
|
1274
|
-
|
|
1348
|
+
// KB + code intelligence is the final step (before the optional service step),
|
|
1349
|
+
// so Beads sits one slot earlier than it does on main.
|
|
1350
|
+
const beadsStep = serviceStep ? totalSteps - 2 : totalSteps - 1;
|
|
1275
1351
|
console.log(` [${beadsStep}/${totalSteps}] Installing Beads task tracker...`);
|
|
1276
1352
|
try {
|
|
1277
1353
|
// Check if already installed
|
|
@@ -1281,13 +1357,68 @@ ${process.platform === 'win32' ? ' taskkill /F /IM apra-fleet.exe' : ' pki
|
|
|
1281
1357
|
}
|
|
1282
1358
|
catch {
|
|
1283
1359
|
// not installed - install it
|
|
1284
|
-
execFileSync('npm', ['install', '-g', '@beads/bd@1.
|
|
1360
|
+
execFileSync('npm', ['install', '-g', '@beads/bd@1.1.2'], { stdio: 'inherit', shell: true });
|
|
1285
1361
|
}
|
|
1286
1362
|
}
|
|
1287
1363
|
catch (err) {
|
|
1288
1364
|
// non-fatal: warn but don't fail the install
|
|
1289
1365
|
console.warn(' - Beads install skipped - npm not available or install failed');
|
|
1290
1366
|
}
|
|
1367
|
+
// --- KB + code intelligence setup step ---
|
|
1368
|
+
// Only runs when the installer is invoked from inside a git repository.
|
|
1369
|
+
const kbStep = serviceStep ? totalSteps - 1 : totalSteps;
|
|
1370
|
+
console.log(` [${kbStep}/${totalSteps}] Setting up Knowledge Bank and code intelligence...`);
|
|
1371
|
+
const repoCwd = process.cwd();
|
|
1372
|
+
if (fs.existsSync(path.join(repoCwd, '.git'))) {
|
|
1373
|
+
// Clean up prior installs: remove legacy gitnexus entry from .mcp.json if present
|
|
1374
|
+
try {
|
|
1375
|
+
const mcpJsonPath = path.join(repoCwd, '.mcp.json');
|
|
1376
|
+
if (fs.existsSync(mcpJsonPath)) {
|
|
1377
|
+
const existing = JSON.parse(fs.readFileSync(mcpJsonPath, 'utf-8'));
|
|
1378
|
+
if (existing.mcpServers?.gitnexus) {
|
|
1379
|
+
delete existing.mcpServers.gitnexus;
|
|
1380
|
+
fs.writeFileSync(mcpJsonPath, JSON.stringify(existing, null, 2));
|
|
1381
|
+
console.log(' [OK] Removed legacy gitnexus entry from .mcp.json');
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
catch (err) {
|
|
1386
|
+
console.warn(' ⚠ .mcp.json cleanup skipped:', err instanceof Error ? err.message : String(err));
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
else {
|
|
1390
|
+
console.log(' Skipped: not in a git repository. Run apra-fleet install from your project root to set up KB.');
|
|
1391
|
+
}
|
|
1392
|
+
// T3.4 (F9b, D8): distribute the committed global bible (if this repo
|
|
1393
|
+
// carries one) to every project on the machine via the shared global KB
|
|
1394
|
+
// data dir. Independent of the .git check above -- the source file's own
|
|
1395
|
+
// presence is the only gate, and the step is fully non-fatal.
|
|
1396
|
+
copyGlobalBible(repoCwd);
|
|
1397
|
+
// Write code intelligence provider config (provider-agnostic; fleet serves code intelligence tools)
|
|
1398
|
+
try {
|
|
1399
|
+
const ciConfigDir = path.join(os.homedir(), '.apra-fleet', 'data', 'code-intelligence');
|
|
1400
|
+
fs.mkdirSync(ciConfigDir, { recursive: true });
|
|
1401
|
+
fs.writeFileSync(path.join(ciConfigDir, 'config.json'), JSON.stringify({ provider: 'gitnexus' }, null, 2));
|
|
1402
|
+
console.log(' [OK] Code intelligence provider config written');
|
|
1403
|
+
}
|
|
1404
|
+
catch (err) {
|
|
1405
|
+
console.warn(' ⚠ Code intelligence config skipped:', err instanceof Error ? err.message : String(err));
|
|
1406
|
+
}
|
|
1407
|
+
// Write code intelligence routing instruction to ~/.claude/CLAUDE.md
|
|
1408
|
+
try {
|
|
1409
|
+
const claudeMdPath = path.join(os.homedir(), '.claude', 'CLAUDE.md');
|
|
1410
|
+
const sentinel = '<!-- apra-fleet:code-intelligence -->';
|
|
1411
|
+
const block = `\n${sentinel}\nWhen code_graph, code_impact, code_query, or code_context tools are available,\nuse them for symbol lookups, call chain tracing, and impact analysis.\nNever use grep or file reads for structural questions when these tools are present.\n<!-- /apra-fleet:code-intelligence -->\n`;
|
|
1412
|
+
const existing = fs.existsSync(claudeMdPath) ? fs.readFileSync(claudeMdPath, 'utf-8') : '';
|
|
1413
|
+
if (!existing.includes(sentinel)) {
|
|
1414
|
+
fs.mkdirSync(path.dirname(claudeMdPath), { recursive: true });
|
|
1415
|
+
fs.appendFileSync(claudeMdPath, block);
|
|
1416
|
+
console.log(' [OK] Code intelligence routing instruction written to ~/.claude/CLAUDE.md');
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
catch (err) {
|
|
1420
|
+
console.warn(' ⚠ ~/.claude/CLAUDE.md update skipped:', err instanceof Error ? err.message : String(err));
|
|
1421
|
+
}
|
|
1291
1422
|
// OpenCode uses --dangerously-skip-permissions and per-agent permission: frontmatter;
|
|
1292
1423
|
// a top-level "permissions" key is invalid in opencode.json
|
|
1293
1424
|
if (llm !== 'opencode') {
|