@repo-os/repoos 0.5.45
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/LICENSE.md +110 -0
- package/README.md +272 -0
- package/dist/.build-info.json +4 -0
- package/dist/.build-stamp.json +3 -0
- package/dist/cli/colors.d.ts +13 -0
- package/dist/cli/colors.js +37 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +221 -0
- package/dist/commands/check.d.ts +170 -0
- package/dist/commands/check.js +1227 -0
- package/dist/commands/docs.d.ts +2 -0
- package/dist/commands/docs.js +70 -0
- package/dist/commands/gc.d.ts +1 -0
- package/dist/commands/gc.js +57 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.js +699 -0
- package/dist/commands/screenshots.d.ts +7 -0
- package/dist/commands/screenshots.js +77 -0
- package/dist/commands/serve.d.ts +55 -0
- package/dist/commands/serve.js +204 -0
- package/dist/commands/status.d.ts +140 -0
- package/dist/commands/status.js +569 -0
- package/dist/commands/stop.d.ts +1 -0
- package/dist/commands/stop.js +59 -0
- package/dist/commands/tasks.d.ts +47 -0
- package/dist/commands/tasks.js +334 -0
- package/dist/commands/tunnel.d.ts +1 -0
- package/dist/commands/tunnel.js +1271 -0
- package/dist/commands/ui-harness.d.ts +53 -0
- package/dist/commands/ui-harness.js +62 -0
- package/dist/commands/ui-smoke.d.ts +6 -0
- package/dist/commands/ui-smoke.js +220 -0
- package/dist/commands/upgrade.d.ts +15 -0
- package/dist/commands/upgrade.js +188 -0
- package/dist/core/auth-store.d.ts +81 -0
- package/dist/core/auth-store.js +530 -0
- package/dist/core/auth.d.ts +75 -0
- package/dist/core/auth.js +124 -0
- package/dist/core/bootstrap.d.ts +41 -0
- package/dist/core/bootstrap.js +236 -0
- package/dist/core/build.d.ts +92 -0
- package/dist/core/build.js +249 -0
- package/dist/core/canary.d.ts +10 -0
- package/dist/core/canary.js +14 -0
- package/dist/core/check-failure-summary.d.ts +10 -0
- package/dist/core/check-failure-summary.js +34 -0
- package/dist/core/config.d.ts +160 -0
- package/dist/core/config.js +1288 -0
- package/dist/core/context-pack.d.ts +74 -0
- package/dist/core/context-pack.js +778 -0
- package/dist/core/db.d.ts +236 -0
- package/dist/core/db.js +747 -0
- package/dist/core/detect.d.ts +69 -0
- package/dist/core/detect.js +251 -0
- package/dist/core/docs.d.ts +76 -0
- package/dist/core/docs.js +225 -0
- package/dist/core/frontmatter.d.ts +29 -0
- package/dist/core/frontmatter.js +215 -0
- package/dist/core/git.d.ts +505 -0
- package/dist/core/git.js +1453 -0
- package/dist/core/indexer.d.ts +33 -0
- package/dist/core/indexer.js +282 -0
- package/dist/core/input.d.ts +66 -0
- package/dist/core/input.js +222 -0
- package/dist/core/logger.d.ts +70 -0
- package/dist/core/logger.js +138 -0
- package/dist/core/models.d.ts +45 -0
- package/dist/core/models.js +291 -0
- package/dist/core/net-probe.d.ts +4 -0
- package/dist/core/net-probe.js +20 -0
- package/dist/core/providers/deepinfra.d.ts +23 -0
- package/dist/core/providers/deepinfra.js +44 -0
- package/dist/core/providers/index.d.ts +24 -0
- package/dist/core/providers/index.js +59 -0
- package/dist/core/providers/openrouter.d.ts +28 -0
- package/dist/core/providers/openrouter.js +82 -0
- package/dist/core/providers/spend.d.ts +86 -0
- package/dist/core/providers/spend.js +286 -0
- package/dist/core/providers/types.d.ts +56 -0
- package/dist/core/providers/types.js +39 -0
- package/dist/core/repoos.d.ts +59 -0
- package/dist/core/repoos.js +221 -0
- package/dist/core/runtime.d.ts +35 -0
- package/dist/core/runtime.js +167 -0
- package/dist/core/skills-registry.d.ts +39 -0
- package/dist/core/skills-registry.js +148 -0
- package/dist/core/skills-registry.test.d.ts +1 -0
- package/dist/core/skills-registry.test.js +52 -0
- package/dist/core/sysmem.d.ts +7 -0
- package/dist/core/sysmem.js +55 -0
- package/dist/core/tailscale.d.ts +2 -0
- package/dist/core/tailscale.js +19 -0
- package/dist/core/task.d.ts +53 -0
- package/dist/core/task.js +310 -0
- package/dist/core/toml-line.d.ts +20 -0
- package/dist/core/toml-line.js +52 -0
- package/dist/core/toml-validate.d.ts +44 -0
- package/dist/core/toml-validate.js +335 -0
- package/dist/core/tunnel-assistant.d.ts +30 -0
- package/dist/core/tunnel-assistant.js +65 -0
- package/dist/core/tunnel-registry.d.ts +96 -0
- package/dist/core/tunnel-registry.js +267 -0
- package/dist/core/tunnel-registry.test.d.ts +1 -0
- package/dist/core/tunnel-registry.test.js +309 -0
- package/dist/core/tunnel.d.ts +103 -0
- package/dist/core/tunnel.js +320 -0
- package/dist/core/types.d.ts +811 -0
- package/dist/core/types.js +27 -0
- package/dist/core/worktree-gc.d.ts +57 -0
- package/dist/core/worktree-gc.js +194 -0
- package/dist/server/__tests__/integration-job.test.d.ts +1 -0
- package/dist/server/__tests__/integration-job.test.js +129 -0
- package/dist/server/agents.d.ts +1020 -0
- package/dist/server/agents.js +4070 -0
- package/dist/server/attachments.d.ts +51 -0
- package/dist/server/attachments.js +130 -0
- package/dist/server/auto-engineering.d.ts +45 -0
- package/dist/server/auto-engineering.js +275 -0
- package/dist/server/branchless-release.d.ts +22 -0
- package/dist/server/branchless-release.js +67 -0
- package/dist/server/built-in-agents.d.ts +305 -0
- package/dist/server/built-in-agents.js +1838 -0
- package/dist/server/cto-monitor.d.ts +35 -0
- package/dist/server/cto-monitor.js +281 -0
- package/dist/server/cto.d.ts +125 -0
- package/dist/server/cto.js +590 -0
- package/dist/server/deployments.d.ts +119 -0
- package/dist/server/deployments.js +325 -0
- package/dist/server/diff-snapshot.d.ts +20 -0
- package/dist/server/diff-snapshot.js +73 -0
- package/dist/server/done.d.ts +160 -0
- package/dist/server/done.js +488 -0
- package/dist/server/freeform.d.ts +55 -0
- package/dist/server/freeform.js +179 -0
- package/dist/server/handoff.d.ts +99 -0
- package/dist/server/handoff.js +575 -0
- package/dist/server/hetzner.d.ts +45 -0
- package/dist/server/hetzner.js +117 -0
- package/dist/server/icons.d.ts +8 -0
- package/dist/server/icons.js +195 -0
- package/dist/server/integration-job.d.ts +75 -0
- package/dist/server/integration-job.js +144 -0
- package/dist/server/integration-orchestrator.d.ts +211 -0
- package/dist/server/integration-orchestrator.js +1299 -0
- package/dist/server/integration-status.d.ts +48 -0
- package/dist/server/integration-status.js +71 -0
- package/dist/server/live-index.d.ts +295 -0
- package/dist/server/live-index.js +452 -0
- package/dist/server/model-test.d.ts +20 -0
- package/dist/server/model-test.js +100 -0
- package/dist/server/ntfy.d.ts +57 -0
- package/dist/server/ntfy.js +112 -0
- package/dist/server/pm-attachments.d.ts +35 -0
- package/dist/server/pm-attachments.js +181 -0
- package/dist/server/pm-runs.d.ts +58 -0
- package/dist/server/pm-runs.js +80 -0
- package/dist/server/preview.d.ts +174 -0
- package/dist/server/preview.js +641 -0
- package/dist/server/release.d.ts +88 -0
- package/dist/server/release.js +449 -0
- package/dist/server/reload.d.ts +194 -0
- package/dist/server/reload.js +586 -0
- package/dist/server/remote-validation.d.ts +132 -0
- package/dist/server/remote-validation.js +478 -0
- package/dist/server/repo-lock.d.ts +36 -0
- package/dist/server/repo-lock.js +141 -0
- package/dist/server/review-guard.d.ts +14 -0
- package/dist/server/review-guard.js +159 -0
- package/dist/server/review.d.ts +243 -0
- package/dist/server/review.js +1211 -0
- package/dist/server/routes/agents.d.ts +6 -0
- package/dist/server/routes/agents.js +28 -0
- package/dist/server/routes/auth.d.ts +60 -0
- package/dist/server/routes/auth.js +755 -0
- package/dist/server/routes/config.d.ts +20 -0
- package/dist/server/routes/config.js +347 -0
- package/dist/server/routes/debugger.d.ts +33 -0
- package/dist/server/routes/debugger.js +360 -0
- package/dist/server/routes/deployments.d.ts +3 -0
- package/dist/server/routes/deployments.js +16 -0
- package/dist/server/routes/docs.d.ts +8 -0
- package/dist/server/routes/docs.js +135 -0
- package/dist/server/routes/helpers.d.ts +21 -0
- package/dist/server/routes/helpers.js +171 -0
- package/dist/server/routes/index.d.ts +19 -0
- package/dist/server/routes/index.js +18 -0
- package/dist/server/routes/info.d.ts +17 -0
- package/dist/server/routes/info.js +177 -0
- package/dist/server/routes/inputs.d.ts +7 -0
- package/dist/server/routes/inputs.js +125 -0
- package/dist/server/routes/model-providers.d.ts +27 -0
- package/dist/server/routes/model-providers.js +94 -0
- package/dist/server/routes/models.d.ts +3 -0
- package/dist/server/routes/models.js +36 -0
- package/dist/server/routes/notify.d.ts +2 -0
- package/dist/server/routes/notify.js +17 -0
- package/dist/server/routes/playground.d.ts +29 -0
- package/dist/server/routes/playground.js +81 -0
- package/dist/server/routes/release.d.ts +20 -0
- package/dist/server/routes/release.js +86 -0
- package/dist/server/routes/router.d.ts +12 -0
- package/dist/server/routes/router.js +32 -0
- package/dist/server/routes/skill-registry.d.ts +5 -0
- package/dist/server/routes/skill-registry.js +51 -0
- package/dist/server/routes/tasks.d.ts +58 -0
- package/dist/server/routes/tasks.js +1442 -0
- package/dist/server/routes/transcribe.d.ts +2 -0
- package/dist/server/routes/transcribe.js +124 -0
- package/dist/server/routes/types.d.ts +68 -0
- package/dist/server/routes/types.js +1 -0
- package/dist/server/routes/ui.d.ts +5 -0
- package/dist/server/routes/ui.js +81 -0
- package/dist/server/routes/utils.d.ts +3 -0
- package/dist/server/routes/utils.js +23 -0
- package/dist/server/serve-reaper.d.ts +135 -0
- package/dist/server/serve-reaper.js +491 -0
- package/dist/server/server.d.ts +49 -0
- package/dist/server/server.js +2171 -0
- package/dist/server/supervisor.d.ts +89 -0
- package/dist/server/supervisor.js +231 -0
- package/dist/server/system.d.ts +198 -0
- package/dist/server/system.js +480 -0
- package/dist/server/task-check.d.ts +45 -0
- package/dist/server/task-check.js +71 -0
- package/dist/server/task-transitions.d.ts +51 -0
- package/dist/server/task-transitions.js +78 -0
- package/dist/server/task-watchdog.d.ts +158 -0
- package/dist/server/task-watchdog.js +681 -0
- package/dist/server/test-run.d.ts +28 -0
- package/dist/server/test-run.js +81 -0
- package/dist/server/watcher.d.ts +21 -0
- package/dist/server/watcher.js +194 -0
- package/dist/server/write.d.ts +94 -0
- package/dist/server/write.js +345 -0
- package/dist/ui/assets/AgentsView-CF4wRvHh.css +1 -0
- package/dist/ui/assets/AgentsView-D-myL-kA.js +1 -0
- package/dist/ui/assets/ContextView-D3TC-RSp.css +1 -0
- package/dist/ui/assets/ContextView-DsOqAdyE.js +4 -0
- package/dist/ui/assets/DashboardView-BOhsIJqO.js +1 -0
- package/dist/ui/assets/DashboardView-Ck9o0RP2.css +1 -0
- package/dist/ui/assets/DeploymentsView--iIUVfEH.css +1 -0
- package/dist/ui/assets/DeploymentsView-DXu_FYR2.js +1 -0
- package/dist/ui/assets/InputsView-24HVbVPk.js +1 -0
- package/dist/ui/assets/InputsView-BLb7GHtx.css +1 -0
- package/dist/ui/assets/LoginView-6QlGg6cx.css +1 -0
- package/dist/ui/assets/LoginView-BqupI0Lt.js +1 -0
- package/dist/ui/assets/ReleasesView-BEG1A0YH.css +1 -0
- package/dist/ui/assets/ReleasesView-CAgMuxpe.js +3 -0
- package/dist/ui/assets/SettingsView-CA-NYSMK.css +1 -0
- package/dist/ui/assets/SettingsView-O3iZSnjg.js +3 -0
- package/dist/ui/assets/WorkView-D8Tl6qwy.js +1 -0
- package/dist/ui/assets/WorkView-DMYL2s3W.css +1 -0
- package/dist/ui/assets/abnfDiagram-VCTEODGH-J5lkSnEE.js +1 -0
- package/dist/ui/assets/arc-BHZnmhhM.js +1 -0
- package/dist/ui/assets/architecture-7GRP2DOG-pLdFt-xS.js +1 -0
- package/dist/ui/assets/architectureDiagram-5GKGNRK7-C3k89uKX.js +36 -0
- package/dist/ui/assets/array-BifhSqXX.js +1 -0
- package/dist/ui/assets/blockDiagram-I7D4REHJ-AWNoBzop.js +129 -0
- package/dist/ui/assets/button-lbikqSph.js +1 -0
- package/dist/ui/assets/c4Diagram-7LVT6UL2-DKG1D5gd.js +38 -0
- package/dist/ui/assets/channel-gA4qBv3A.js +1 -0
- package/dist/ui/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/ui/assets/chunk-4HAMMTFA-D1YR8lF_.js +62 -0
- package/dist/ui/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/ui/assets/chunk-75Z2AOVW-5GuBxfsL.js +2 -0
- package/dist/ui/assets/chunk-DU6HZSFF-DfdNNqwa.js +127 -0
- package/dist/ui/assets/chunk-F27PBJKO-BPZzinQ4.js +1 -0
- package/dist/ui/assets/chunk-FOHPRMQF-l2z4K2jD.js +161 -0
- package/dist/ui/assets/chunk-GMAD6QVW-DGWvSKj5.js +72 -0
- package/dist/ui/assets/chunk-GVQU2GXP-D6Aw75wJ.js +1 -0
- package/dist/ui/assets/chunk-IMKFNOWR-B8mMBKCW.js +231 -0
- package/dist/ui/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/ui/assets/chunk-L3NEJ4N5-D5OJuXYE.js +1 -0
- package/dist/ui/assets/chunk-OSK3NFVY-B7r9w2UW.js +10 -0
- package/dist/ui/assets/chunk-P2QGCYS3-C74X4AQX.js +1 -0
- package/dist/ui/assets/chunk-POPQ4Y6H-C5_u1gUS.js +1 -0
- package/dist/ui/assets/chunk-PWAF6VOD-DfoTLtxn.js +1 -0
- package/dist/ui/assets/chunk-SHT3W25Y-D40m2eqz.js +168 -0
- package/dist/ui/assets/chunk-SVP7TREG-euxi0Kap.js +88 -0
- package/dist/ui/assets/chunk-TICWLB2K-fkdxngzN.js +206 -0
- package/dist/ui/assets/chunk-XXDRQBXY-DFBUG-OT.js +1 -0
- package/dist/ui/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/ui/assets/classDiagram-ZZMXUADV-BzW8bq2P.js +1 -0
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-BzW8bq2P.js +1 -0
- package/dist/ui/assets/cose-bilkent-JH36ORCC-BTcgMon1.js +1 -0
- package/dist/ui/assets/cynefin-OW5HDTMX-B5m_COsS.js +1 -0
- package/dist/ui/assets/cynefinDiagram-5FMLGOSQ-C-AG6CGe.js +62 -0
- package/dist/ui/assets/cytoscape.esm-FBntH-9t.js +321 -0
- package/dist/ui/assets/dagre-GXQ25YYZ-DDfDnp8L.js +4 -0
- package/dist/ui/assets/dagre-PrKaheQc.js +1 -0
- package/dist/ui/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dist/ui/assets/diagram-S7CK7UJ4-DjQZAlEY.js +30 -0
- package/dist/ui/assets/diagram-UQ7AKVKN-DAZ9yp1B.js +41 -0
- package/dist/ui/assets/diagram-VSXAHHWV-BWepUKJD.js +3 -0
- package/dist/ui/assets/diagram-VX7I27RA-EcV1J81b.js +24 -0
- package/dist/ui/assets/diagram-Z3DM3KII-Dbz7XU_K.js +24 -0
- package/dist/ui/assets/dist-DTg6UBE_.js +1 -0
- package/dist/ui/assets/ebnfDiagram-PWID7BFC-BUyQw8Mm.js +1 -0
- package/dist/ui/assets/erDiagram-RLTQ6QDP-WVf8ukKt.js +99 -0
- package/dist/ui/assets/eventmodeling-NTZA5JFV-DHqyLOAn.js +1 -0
- package/dist/ui/assets/flowDiagram-HODETNUW-CYk_ze5K.js +1 -0
- package/dist/ui/assets/ganttDiagram-EL5Y4UJY-rB4MZuB-.js +292 -0
- package/dist/ui/assets/gitGraph-4MIJSDKK-BOTWM8dY.js +1 -0
- package/dist/ui/assets/gitGraphDiagram-WWUBYQGX-eYscuhtP.js +106 -0
- package/dist/ui/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/ui/assets/index-BACBfnga.css +1 -0
- package/dist/ui/assets/index-BOQ-ust6.js +26 -0
- package/dist/ui/assets/info-A6RAGUB7-_67wOORe.js +1 -0
- package/dist/ui/assets/infoDiagram-27XIBGKW-XVXbddTA.js +2 -0
- package/dist/ui/assets/init-C-OQMol4.js +1 -0
- package/dist/ui/assets/ishikawaDiagram-5VMMS53U-ClLNiEru.js +70 -0
- package/dist/ui/assets/journeyDiagram-3NMN7TZE-NRawjR6i.js +139 -0
- package/dist/ui/assets/kanban-definition-UXKFOSKX-BgSzBfIx.js +89 -0
- package/dist/ui/assets/katex-DolUETbr.js +257 -0
- package/dist/ui/assets/line-KAyfuul4.js +1 -0
- package/dist/ui/assets/linear-cCCPOpu7.js +1 -0
- package/dist/ui/assets/mermaid-parser.core-CgXZk1iN.js +7 -0
- package/dist/ui/assets/mermaid.core-BUUkChHW.js +44 -0
- package/dist/ui/assets/mindmap-definition-YA3MSWOX-Cpn7vW4r.js +96 -0
- package/dist/ui/assets/ordinal-BDEzSJ7C.js +1 -0
- package/dist/ui/assets/packet-AYTQ26CC-0lZwM-d6.js +1 -0
- package/dist/ui/assets/path-COt_16Va.js +1 -0
- package/dist/ui/assets/pegDiagram-XKGWAZYB-impy0inn.js +1 -0
- package/dist/ui/assets/pie-WAS4IAKB-CqfdGHYg.js +1 -0
- package/dist/ui/assets/pieDiagram-E7YTZNPT-CxjL4I1h.js +39 -0
- package/dist/ui/assets/quadrantDiagram-AXDQQJYC-Cjd1QMIe.js +7 -0
- package/dist/ui/assets/radar-RG4KPBEZ-CRkQIwiv.js +1 -0
- package/dist/ui/assets/railroad-74A4TZTK-i67XSWTB.js +1 -0
- package/dist/ui/assets/railroad-abnf-HS5TGJTU-Cv9m5aS3.js +1 -0
- package/dist/ui/assets/railroad-ebnf-LZEXJU2U-C5ZIn-Jh.js +1 -0
- package/dist/ui/assets/railroad-peg-WCYAUIDC-CGra9Oq-.js +1 -0
- package/dist/ui/assets/railroadDiagram-O6MQD6OU-_pK0qyaY.js +1 -0
- package/dist/ui/assets/releases-B0WNV-SY.js +1 -0
- package/dist/ui/assets/repoos-cto-square.webp +0 -0
- package/dist/ui/assets/repoos-helpful-pm-square.webp +0 -0
- package/dist/ui/assets/repoos-orchestrator-square.webp +0 -0
- package/dist/ui/assets/repoos-performance-agent-square.webp +0 -0
- package/dist/ui/assets/repoos-ross-from-friends-square.webp +0 -0
- package/dist/ui/assets/repoos-tech-debt-agent-square.webp +0 -0
- package/dist/ui/assets/requirementDiagram-BXWQKSXE-CRrFX-yw.js +84 -0
- package/dist/ui/assets/rough.esm-By172zw-.js +1 -0
- package/dist/ui/assets/sankeyDiagram-P5KCCOFB-X_xFRj9E.js +40 -0
- package/dist/ui/assets/sequenceDiagram-WJ2MYXX4-Byb49lKf.js +162 -0
- package/dist/ui/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- package/dist/ui/assets/src-BH-TyZbA.js +1 -0
- package/dist/ui/assets/stateDiagram-D77RDMKH-CzaPrqYF.js +1 -0
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-BCXckz7K.js +1 -0
- package/dist/ui/assets/swimlanes-42K2YHIH-Cx_1lnqr.js +1 -0
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-54qsKi6A.js +8 -0
- package/dist/ui/assets/timeline-definition-24CTP7MA-B1IbZPQ-.js +120 -0
- package/dist/ui/assets/treeView-Q6P3EWNA-DFWhVE3d.js +1 -0
- package/dist/ui/assets/treemap-WGGIJYW6-BmbYPThn.js +1 -0
- package/dist/ui/assets/vendor-ui-DPm7zLxi.js +3 -0
- package/dist/ui/assets/vendor-vue-CobgyEJp.js +1 -0
- package/dist/ui/assets/vennDiagram-4TSXK5OY-Ae2AtRpt.js +34 -0
- package/dist/ui/assets/wardley-WFR3VGLG-BtD4X4tL.js +1 -0
- package/dist/ui/assets/wardleyDiagram-VM6X3IG4-B3YN2fTd.js +78 -0
- package/dist/ui/assets/xychartDiagram-S5SC5T6Z-CIzJfMKA.js +7 -0
- package/dist/ui/favicon.svg +11 -0
- package/dist/ui/index.html +49 -0
- package/dist/ui/sw.js +48 -0
- package/package.json +91 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrates individual close-out jobs through their lifecycle. Each job:
|
|
3
|
+
* 1. Validates the candidate away from live main (temporary worktree/branch)
|
|
4
|
+
* 2. Checks for main SHA drift and rebuilds if needed
|
|
5
|
+
* 3. Publishes only a green candidate while holding the repo lock
|
|
6
|
+
* 4. Cleans up the candidate and task resources
|
|
7
|
+
*
|
|
8
|
+
* Phases track recovery: if interrupted mid-flight, retry resumes from the current phase.
|
|
9
|
+
*/
|
|
10
|
+
import type { RepoOSConfig, Task } from "../core/types.js";
|
|
11
|
+
import type { JobCoordinator } from "./integration-job.js";
|
|
12
|
+
import type { RepositoryLock, RootLock } from "./repo-lock.js";
|
|
13
|
+
import type { Logger } from "../core/logger.js";
|
|
14
|
+
import type { DoneStep } from "./done.js";
|
|
15
|
+
import type { RemoteValidator } from "./remote-validation.js";
|
|
16
|
+
import type { TaskCheckManager, TaskCheckListener } from "./task-check.js";
|
|
17
|
+
/**
|
|
18
|
+
* The merge that just ran left the candidate at exactly base main — it added
|
|
19
|
+
* nothing. That is legitimate when the feature branch was already fully
|
|
20
|
+
* integrated (a re-run of a close-out, a branch cherry-picked onto main
|
|
21
|
+
* earlier): the close-out is idempotent and the task genuinely has nothing
|
|
22
|
+
* left to land.
|
|
23
|
+
*
|
|
24
|
+
* It is a BUG when the branch still carries commits main lacks and the merge —
|
|
25
|
+
* or, far more often, the conflict auto-resolution in `mergeBranch` — silently
|
|
26
|
+
* dropped them. Left unguarded, the gate then runs `build` + `check` against
|
|
27
|
+
* what is effectively bare main (which trivially passes) and the task publishes
|
|
28
|
+
* as `done` with none of its code integrated. This bit #0306/#0307/#0309/#0312.
|
|
29
|
+
*
|
|
30
|
+
* Returns an actionable failure reason in the bug case, `null` when the no-op
|
|
31
|
+
* is legitimate (or when git errored and a downstream step should surface it).
|
|
32
|
+
*/
|
|
33
|
+
export declare function detectDroppedMerge(root: string, mainBranch: string, featureBranch: string, postMergeHead: string, baseMainSha: string): Promise<string | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Make main's `<workDir>/*.md` state authoritative for every task file the
|
|
36
|
+
* merged candidate changed that is NOT the closing task's own file, and commit
|
|
37
|
+
* the restore.
|
|
38
|
+
*
|
|
39
|
+
* A feature branch can carry stale edits to other tasks' files — a concurrent
|
|
40
|
+
* board write, a `repoos` CLI call in the worktree, a partial merge — that git
|
|
41
|
+
* folds in without a conflict (main untouched since the merge-base), so the
|
|
42
|
+
* close-out's conflict-only `autoResolveOurs` never catches them and the stale
|
|
43
|
+
* version publishes to main. This closes that gap: a foreign file modified or
|
|
44
|
+
* deleted by the branch is restored to main's copy; one the branch newly added
|
|
45
|
+
* is removed (a close-out never creates another task's file). Returns the paths
|
|
46
|
+
* touched (empty when there were none); throws only if the git ops fail.
|
|
47
|
+
*
|
|
48
|
+
* Exported for tests.
|
|
49
|
+
*/
|
|
50
|
+
export declare function resetForeignWorkFiles(opts: {
|
|
51
|
+
candidateWtPath: string;
|
|
52
|
+
baseMainSha: string;
|
|
53
|
+
workDir: string;
|
|
54
|
+
ownWorkFile: string | null;
|
|
55
|
+
}): Promise<string[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Whether a candidate's merged diff is documentation-only, so the expensive
|
|
58
|
+
* build + check gate in `validateCandidate` can be skipped (#0355).
|
|
59
|
+
*
|
|
60
|
+
* Deliberately literal and mechanical: a path qualifies only if it lives under
|
|
61
|
+
* `docs/` or `user-docs/`, or ends in `.md`. The closing task's own
|
|
62
|
+
* `work/<id>-*.md` file is the common `.md` case — it always changes, and
|
|
63
|
+
* `resetForeignWorkFiles` has already restored every OTHER task's work file to
|
|
64
|
+
* main's copy before this runs, so no foreign task file reaches this check.
|
|
65
|
+
* Anything else — `repoos.toml`, `package.json`, `src/`, `scripts/`,
|
|
66
|
+
* `.github/`, … — disqualifies the fast path. No scoring, no "mostly docs".
|
|
67
|
+
*
|
|
68
|
+
* An empty path list is vacuously docs-only: a legitimate no-op merge (the
|
|
69
|
+
* branch was already fully integrated) leaves nothing for build/test to
|
|
70
|
+
* examine, and the dropped-merge guard in `validateCandidate` runs earlier and
|
|
71
|
+
* already rejects an empty merge that actually swallowed real branch work.
|
|
72
|
+
*/
|
|
73
|
+
export declare function isDocsOnlyChange(paths: string[]): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* The useful part of a failed command's combined output. bun/npm wrap a child
|
|
76
|
+
* failure with a generic trailing line (`error: script "repoos" exited with
|
|
77
|
+
* code 1`) that is useless as a reason on its own, so keep the last several
|
|
78
|
+
* meaningful lines — the real cause (a failing test, a compiler error) sits
|
|
79
|
+
* just above the wrapper.
|
|
80
|
+
*
|
|
81
|
+
* The reason is persisted to `.repoos/integration-jobs/<id>.json` and shown
|
|
82
|
+
* verbatim in the UI, so it must be free of ANSI escapes (the gate's test
|
|
83
|
+
* output is colored) and of anything that looks like a credential. When the
|
|
84
|
+
* excerpt exceeds the character cap it is cut from the front at a WORD
|
|
85
|
+
* boundary — cutting mid-word produced reasons like `check failed: …eletion
|
|
86
|
+
* detected by…` (0215) that read as garbage.
|
|
87
|
+
*/
|
|
88
|
+
export declare function tailLine(stdout: string, stderr: string): string;
|
|
89
|
+
/** Candidate validation and publication orchestrator for one job. */
|
|
90
|
+
export declare class CloseOutOrchestrator {
|
|
91
|
+
private config;
|
|
92
|
+
private coordinator;
|
|
93
|
+
private repoLock?;
|
|
94
|
+
private rootLock?;
|
|
95
|
+
private getTask?;
|
|
96
|
+
private onProgress?;
|
|
97
|
+
private logger?;
|
|
98
|
+
/**
|
|
99
|
+
* Fired when `validating` fails on a REAL, named merge conflict (never
|
|
100
|
+
* for the task's own bookkeeping file or generated paths, which
|
|
101
|
+
* auto-resolve; never for infra failures). The job itself is still
|
|
102
|
+
* marked `failed` as before — this is a separate, best-effort trigger
|
|
103
|
+
* to auto-resume the engineer to fix it and resubmit (#0271 follow-up).
|
|
104
|
+
*/
|
|
105
|
+
private onMergeConflict?;
|
|
106
|
+
/**
|
|
107
|
+
* Runs the expensive half of the gate (build + test) on a cloud VM when
|
|
108
|
+
* `config.remoteValidation.enabled` — see validateCandidate. Undefined
|
|
109
|
+
* disables remote validation regardless of config.
|
|
110
|
+
*/
|
|
111
|
+
private remoteValidator?;
|
|
112
|
+
/** Records the MTD merge-gate `repoos check` run for the Debug tab (0310). */
|
|
113
|
+
private taskChecks?;
|
|
114
|
+
private onTaskCheckEvent?;
|
|
115
|
+
constructor(config: RepoOSConfig, coordinator: JobCoordinator, repoLock?: RepositoryLock | undefined, rootLock?: RootLock | undefined, getTask?: ((taskId: string) => Task | null) | undefined, onProgress?: ((step: DoneStep) => void) | undefined, logger?: Logger | undefined,
|
|
116
|
+
/**
|
|
117
|
+
* Fired when `validating` fails on a REAL, named merge conflict (never
|
|
118
|
+
* for the task's own bookkeeping file or generated paths, which
|
|
119
|
+
* auto-resolve; never for infra failures). The job itself is still
|
|
120
|
+
* marked `failed` as before — this is a separate, best-effort trigger
|
|
121
|
+
* to auto-resume the engineer to fix it and resubmit (#0271 follow-up).
|
|
122
|
+
*/
|
|
123
|
+
onMergeConflict?: ((taskId: string, reason: string) => void) | undefined,
|
|
124
|
+
/**
|
|
125
|
+
* Runs the expensive half of the gate (build + test) on a cloud VM when
|
|
126
|
+
* `config.remoteValidation.enabled` — see validateCandidate. Undefined
|
|
127
|
+
* disables remote validation regardless of config.
|
|
128
|
+
*/
|
|
129
|
+
remoteValidator?: RemoteValidator | undefined,
|
|
130
|
+
/** Records the MTD merge-gate `repoos check` run for the Debug tab (0310). */
|
|
131
|
+
taskChecks?: TaskCheckManager | undefined, onTaskCheckEvent?: TaskCheckListener | undefined);
|
|
132
|
+
/**
|
|
133
|
+
* Whether the task is, on disk, already `done`. The live index is an
|
|
134
|
+
* in-memory cache that can lag the actual file (a duplicate/stale close-out
|
|
135
|
+
* — #0289 — can run right after the first successful publish, before the
|
|
136
|
+
* index rebuilds), so this reads the authoritative task file directly,
|
|
137
|
+
* falling back to the index only when the file cannot be located or parsed.
|
|
138
|
+
*/
|
|
139
|
+
private taskIsDone;
|
|
140
|
+
/**
|
|
141
|
+
* Record a close-out job failure, OR reconcile it away when it is moot.
|
|
142
|
+
*
|
|
143
|
+
* A failure is moot when the task is already `done`: the failing job is a
|
|
144
|
+
* duplicate/stale enqueue against a task that already finished successfully
|
|
145
|
+
* through an earlier job (#0289). That earlier close-out's cleanup deleted
|
|
146
|
+
* the worktree/branch, which is exactly why a later redundant enqueue fails
|
|
147
|
+
* (e.g. "worktree not found"). There is no gate failure here needing a
|
|
148
|
+
* human's attention, and the failed job record would otherwise sit forever
|
|
149
|
+
* with no path to resolution, so it is dropped instead.
|
|
150
|
+
*
|
|
151
|
+
* Returns the `{ ok, reason }` the caller should return: `ok: true` for a
|
|
152
|
+
* reconciled (moot) failure so the pipeline treats it as a normal completion
|
|
153
|
+
* and never surfaces it as an actionable error; `ok: false` for a genuine
|
|
154
|
+
* failure, which is recorded as `failed` (and `onRecorded`, e.g. the merge-
|
|
155
|
+
* conflict retry, runs) so the UI and status bar can surface it.
|
|
156
|
+
*/
|
|
157
|
+
/**
|
|
158
|
+
* Tear down the `repoos/integrate/<id>` candidate worktree + branch. Safe to
|
|
159
|
+
* call whether or not the candidate exists. The candidate is a throwaway
|
|
160
|
+
* scratch area rebuilt from scratch on the next run, so its branch is
|
|
161
|
+
* force-deleted (git will not see it as merged after a failed job).
|
|
162
|
+
*
|
|
163
|
+
* Runs on EVERY terminal job outcome — success (`cleanup`), genuine failure,
|
|
164
|
+
* and moot/reconciled — so a candidate never outlives its job. Without this,
|
|
165
|
+
* every failed close-out leaked a worktree that inflated cold-boot `git
|
|
166
|
+
* status` fan-out until someone ran gc.
|
|
167
|
+
*/
|
|
168
|
+
private removeCandidate;
|
|
169
|
+
private failOrReconcile;
|
|
170
|
+
/**
|
|
171
|
+
* Process the next job in the queue: validate and publish it.
|
|
172
|
+
* Phases are atomic; a retry at any phase resumes from that phase.
|
|
173
|
+
* May return early if the job transitions back to an earlier phase (e.g., on main drift).
|
|
174
|
+
*/
|
|
175
|
+
processNext(): Promise<{
|
|
176
|
+
ok: boolean;
|
|
177
|
+
reason?: string;
|
|
178
|
+
requiresRetry?: boolean;
|
|
179
|
+
}>;
|
|
180
|
+
private processJob;
|
|
181
|
+
/**
|
|
182
|
+
* Cheap, non-destructive pre-flight (#0358): would merging the task's feature
|
|
183
|
+
* branch into current main hit a REAL (non-auto-resolvable) conflict?
|
|
184
|
+
*
|
|
185
|
+
* Runs BEFORE any candidate worktree exists, in the feature branch's own
|
|
186
|
+
* worktree (`worktreePathForBranch`, already checked out and cheap to use)
|
|
187
|
+
* against the CURRENT main SHA, reusing `mergeBranch`'s dry-run mode so the
|
|
188
|
+
* classification is literally the real merge's — never a second, drifting
|
|
189
|
+
* definition of "a real conflict". Returns the conflict reason in the exact
|
|
190
|
+
* format `validateCandidate` uses, or `null` when there is no real conflict.
|
|
191
|
+
*
|
|
192
|
+
* Fail-open by construction: a missing feature worktree, any git error, or a
|
|
193
|
+
* dry-run that cannot run cleanly all return `null`, so the caller falls
|
|
194
|
+
* through to the existing sync/validate flow rather than blocking on a broken
|
|
195
|
+
* optimization.
|
|
196
|
+
*/
|
|
197
|
+
private preflightConflict;
|
|
198
|
+
private syncCandidate;
|
|
199
|
+
/**
|
|
200
|
+
* Merge the feature branch into the candidate, then run the gate on it.
|
|
201
|
+
*
|
|
202
|
+
* `retryable: false` marks a failure that cannot possibly resolve on a second
|
|
203
|
+
* identical run — a merge conflict is the same conflict every time — so the
|
|
204
|
+
* caller can skip its retry instead of spending another few minutes proving
|
|
205
|
+
* the point. Everything else defaults to retryable: build and check failures
|
|
206
|
+
* are where genuine flakiness lives.
|
|
207
|
+
*/
|
|
208
|
+
private validateCandidate;
|
|
209
|
+
private publishCandidate;
|
|
210
|
+
private cleanup;
|
|
211
|
+
}
|