@repo-os/repoos 0.5.65 → 0.5.66
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/dist/.build-info.json +2 -2
- package/dist/.build-stamp.json +1 -1
- package/dist/cli/help.js +22 -4
- package/dist/cli/index.js +9 -2
- package/dist/commands/check.js +103 -73
- package/dist/commands/docs-io.d.ts +19 -0
- package/dist/commands/docs-io.js +66 -0
- package/dist/commands/docs.d.ts +9 -0
- package/dist/commands/docs.js +49 -0
- package/dist/commands/init.d.ts +85 -1
- package/dist/commands/init.js +628 -82
- package/dist/commands/service.js +22 -3
- package/dist/commands/tasks.d.ts +13 -0
- package/dist/commands/tasks.js +174 -20
- package/dist/core/approval-policy.d.ts +28 -0
- package/dist/core/approval-policy.js +106 -0
- package/dist/core/attention.d.ts +83 -0
- package/dist/core/attention.js +256 -0
- package/dist/core/check-store.d.ts +4 -0
- package/dist/core/check-store.js +10 -4
- package/dist/core/close-out-failure.d.ts +4 -11
- package/dist/core/close-out-failure.js +20 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.js +444 -48
- package/dist/core/db.d.ts +6 -4
- package/dist/core/db.js +15 -10
- package/dist/core/dependency-install.d.ts +67 -0
- package/dist/core/dependency-install.js +283 -0
- package/dist/core/doctor.js +71 -0
- package/dist/core/indexer.js +7 -2
- package/dist/core/input.js +26 -19
- package/dist/core/models.d.ts +2 -0
- package/dist/core/models.js +79 -4
- package/dist/core/needs-input.js +7 -1
- package/dist/core/page-browser-gate.d.ts +50 -0
- package/dist/core/page-browser-gate.js +130 -0
- package/dist/core/process-group.d.ts +20 -0
- package/dist/core/process-group.js +85 -0
- package/dist/core/project-docs.d.ts +96 -0
- package/dist/core/project-docs.js +544 -0
- package/dist/core/providers/harness-auth.d.ts +21 -0
- package/dist/core/providers/harness-auth.js +87 -0
- package/dist/core/repoos.js +4 -0
- package/dist/core/review-findings.d.ts +2 -0
- package/dist/core/review-findings.js +43 -0
- package/dist/core/review-passes.d.ts +16 -0
- package/dist/core/review-passes.js +76 -0
- package/dist/core/review-report-sections.d.ts +14 -0
- package/dist/core/review-report-sections.js +59 -0
- package/dist/core/shot-plan.d.ts +35 -0
- package/dist/core/shot-plan.js +44 -26
- package/dist/core/storage/index.d.ts +11 -0
- package/dist/core/storage/index.js +11 -0
- package/dist/core/storage/local.d.ts +11 -0
- package/dist/core/storage/local.js +118 -0
- package/dist/core/storage/registry.d.ts +65 -0
- package/dist/core/storage/registry.js +127 -0
- package/dist/core/storage/types.d.ts +94 -0
- package/dist/core/storage/types.js +23 -0
- package/dist/core/story-context.d.ts +31 -0
- package/dist/core/story-context.js +201 -0
- package/dist/core/task-dependencies.js +6 -0
- package/dist/core/task-fields.d.ts +19 -0
- package/dist/core/task-fields.js +48 -0
- package/dist/core/task-selection.d.ts +97 -0
- package/dist/core/task-selection.js +151 -0
- package/dist/core/task-underspecified.d.ts +20 -1
- package/dist/core/task-underspecified.js +50 -2
- package/dist/core/task.js +35 -0
- package/dist/core/types.d.ts +217 -7
- package/dist/core/ui-verification-config.d.ts +6 -0
- package/dist/core/ui-verification-config.js +11 -0
- package/dist/server/__tests__/integration-job.test.js +14 -1
- package/dist/server/agents.d.ts +98 -13
- package/dist/server/agents.js +400 -64
- package/dist/server/approval-policy.d.ts +11 -0
- package/dist/server/approval-policy.js +69 -0
- package/dist/server/attachments.d.ts +14 -1
- package/dist/server/attachments.js +36 -13
- package/dist/server/attention-events.d.ts +8 -0
- package/dist/server/attention-events.js +88 -0
- package/dist/server/attention-feed.d.ts +21 -0
- package/dist/server/attention-feed.js +41 -0
- package/dist/server/attention-notify.d.ts +15 -0
- package/dist/server/attention-notify.js +51 -0
- package/dist/server/auto-engineering.d.ts +27 -1
- package/dist/server/auto-engineering.js +152 -122
- package/dist/server/config-watch.d.ts +41 -0
- package/dist/server/config-watch.js +169 -0
- package/dist/server/cto-monitor.js +8 -1
- package/dist/server/cto.js +28 -7
- package/dist/server/engineer-remote-self-check.d.ts +48 -0
- package/dist/server/engineer-remote-self-check.js +182 -0
- package/dist/server/handoff.d.ts +8 -2
- package/dist/server/handoff.js +53 -15
- package/dist/server/integration-job.d.ts +2 -0
- package/dist/server/integration-job.js +6 -3
- package/dist/server/integration-orchestrator.d.ts +14 -12
- package/dist/server/integration-orchestrator.js +91 -87
- package/dist/server/live-index.d.ts +23 -0
- package/dist/server/live-index.js +13 -1
- package/dist/server/model-test.d.ts +12 -1
- package/dist/server/model-test.js +56 -6
- package/dist/server/pre-review-remote-gate.d.ts +4 -2
- package/dist/server/pre-review-remote-gate.js +16 -7
- package/dist/server/preview.d.ts +63 -0
- package/dist/server/preview.js +209 -24
- package/dist/server/remote-validation.js +1 -0
- package/dist/server/request-close-out.d.ts +36 -0
- package/dist/server/request-close-out.js +153 -0
- package/dist/server/review.d.ts +13 -2
- package/dist/server/review.js +115 -64
- package/dist/server/routes/attention.d.ts +3 -0
- package/dist/server/routes/attention.js +20 -0
- package/dist/server/routes/config.js +41 -5
- package/dist/server/routes/hub.js +3 -2
- package/dist/server/routes/index.d.ts +1 -0
- package/dist/server/routes/index.js +1 -0
- package/dist/server/routes/model-providers.d.ts +8 -3
- package/dist/server/routes/model-providers.js +11 -5
- package/dist/server/routes/release.d.ts +4 -0
- package/dist/server/routes/release.js +11 -0
- package/dist/server/routes/tasks.d.ts +8 -0
- package/dist/server/routes/tasks.js +295 -18
- package/dist/server/routes/types.d.ts +3 -0
- package/dist/server/server.js +111 -6
- package/dist/server/shot-capture.js +6 -0
- package/dist/server/task-underspecified-flag.d.ts +17 -0
- package/dist/server/task-underspecified-flag.js +35 -2
- package/dist/server/task-watchdog.js +5 -0
- package/dist/server/telegram/commands.js +2 -2
- package/dist/server/ui-handoff-gate.d.ts +53 -0
- package/dist/server/ui-handoff-gate.js +255 -0
- package/dist/server/write.d.ts +18 -0
- package/dist/server/write.js +39 -0
- package/dist/ui/assets/{AgentModelModal-B8ihisnq.js → AgentModelModal-IyhQlgi_.js} +1 -1
- package/dist/ui/assets/{AgentsView-B-VbBCBQ.css → AgentsView-BUCXPt-0.css} +1 -1
- package/dist/ui/assets/AgentsView-D8wSbWRE.js +1 -0
- package/dist/ui/assets/{ChecksView-DwfZfOc9.js → ChecksView-C_94-h2D.js} +0 -0
- package/dist/ui/assets/ContextView-C9qd90E1.js +4 -0
- package/dist/ui/assets/{DashboardView-AGzNLRGm.css → DashboardView-Ca3kwSow.css} +1 -1
- package/dist/ui/assets/DashboardView-D0lWbddW.js +1 -0
- package/dist/ui/assets/{DeleteConfirmDialog-C8JmtQyq.js → DeleteConfirmDialog-B7_fR8N6.js} +1 -1
- package/dist/ui/assets/{DeploymentsView-DuhTjFqk.js → DeploymentsView-oXkw2BSL.js} +1 -1
- package/dist/ui/assets/DiffView-BbfRdnyi.js +4 -0
- package/dist/ui/assets/DiffView-CcApcT6t.css +1 -0
- package/dist/ui/assets/{FailedTestsList-Dr_4RX1g.js → FailedTestsList-CcmaaJc3.js} +1 -1
- package/dist/ui/assets/InputsView-Pm38FTsm.js +1 -0
- package/dist/ui/assets/{LoginView-BrQXEW51.js → LoginView-UddKfAab.js} +1 -1
- package/dist/ui/assets/{ReleasesView-BQYf9YdH.js → ReleasesView-CgTRWJn7.js} +2 -2
- package/dist/ui/assets/SettingsView-05j5GTG5.js +4 -0
- package/dist/ui/assets/{SettingsView-C7KstbuH.css → SettingsView-BlDj5TRt.css} +1 -1
- package/dist/ui/assets/StoriesView-Bhr88XmF.js +1 -0
- package/dist/ui/assets/{VoiceDictate-DlhkQVor.js → VoiceDictate-CLPxhrXb.js} +1 -1
- package/dist/ui/assets/WorkView-BBpCR84p.js +2 -0
- package/dist/ui/assets/{WorkView-bYMFgM5P.css → WorkView-vT6nLFuM.css} +1 -1
- package/dist/ui/assets/{abnfDiagram-VCTEODGH-D7K5xY21.js → abnfDiagram-VCTEODGH-C35Cb3us.js} +1 -1
- package/dist/ui/assets/architecture-7GRP2DOG-C8l6_Iv0.js +1 -0
- package/dist/ui/assets/{architectureDiagram-5GKGNRK7-B_BA-0Uq.js → architectureDiagram-5GKGNRK7-nMYcnnYD.js} +1 -1
- package/dist/ui/assets/{blockDiagram-I7D4REHJ-Cpb81UDE.js → blockDiagram-I7D4REHJ-B7tWmthB.js} +1 -1
- package/dist/ui/assets/{button-Q8k6lD-C.js → button-uIODk23A.js} +1 -1
- package/dist/ui/assets/{c4Diagram-7LVT6UL2-V3L4erkN.js → c4Diagram-7LVT6UL2-CnY_QO67.js} +1 -1
- package/dist/ui/assets/channel-CseWx8gd.js +1 -0
- package/dist/ui/assets/{checkbox-Cx8SQV7s.js → checkbox-EUK8itx1.js} +1 -1
- package/dist/ui/assets/{chunk-4HAMMTFA-DEg9Tw-P.js → chunk-4HAMMTFA-C-gVk_3z.js} +1 -1
- package/dist/ui/assets/{chunk-75Z2AOVW-B3NLZ27i.js → chunk-75Z2AOVW-D-vfikH_.js} +1 -1
- package/dist/ui/assets/{chunk-DU6HZSFF-DL1X-Drb.js → chunk-DU6HZSFF-BiXVQhaB.js} +1 -1
- package/dist/ui/assets/{chunk-F27PBJKO-CtsVl7e2.js → chunk-F27PBJKO-5-2deQrd.js} +1 -1
- package/dist/ui/assets/{chunk-GMAD6QVW-DVbfeU88.js → chunk-GMAD6QVW-CLC7oF0o.js} +1 -1
- package/dist/ui/assets/{chunk-GVQU2GXP-DrRVvPhy.js → chunk-GVQU2GXP-Cr61GTQu.js} +1 -1
- package/dist/ui/assets/{chunk-IMKFNOWR-D9x4VaSZ.js → chunk-IMKFNOWR-B1lalIwa.js} +1 -1
- package/dist/ui/assets/{chunk-L3NEJ4N5-CQ838V5P.js → chunk-L3NEJ4N5-BnlSzplF.js} +1 -1
- package/dist/ui/assets/{chunk-OSK3NFVY-CscJ3Ugl.js → chunk-OSK3NFVY-r9ZRDaqv.js} +1 -1
- package/dist/ui/assets/{chunk-P2QGCYS3-Dn_74uGA.js → chunk-P2QGCYS3-C23cpE-P.js} +1 -1
- package/dist/ui/assets/{chunk-POPQ4Y6H-BWQVTVVG.js → chunk-POPQ4Y6H-DI_FkXN2.js} +1 -1
- package/dist/ui/assets/{chunk-PWAF6VOD-BEip3UPe.js → chunk-PWAF6VOD-CGfzxALl.js} +1 -1
- package/dist/ui/assets/{chunk-SHT3W25Y-BBhLU2Ko.js → chunk-SHT3W25Y-DoJGrPBk.js} +1 -1
- package/dist/ui/assets/{chunk-SVP7TREG-BAIckYL1.js → chunk-SVP7TREG-DyU7jawq.js} +1 -1
- package/dist/ui/assets/{chunk-TICWLB2K-DL38vvUq.js → chunk-TICWLB2K-D9vYWbet.js} +1 -1
- package/dist/ui/assets/classDiagram-ZZMXUADV-Bs8Gifp6.js +1 -0
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-Bs8Gifp6.js +1 -0
- package/dist/ui/assets/config-CSMVq0tG.js +1 -0
- package/dist/ui/assets/{cynefin-OW5HDTMX-BtNk2QXI.js → cynefin-OW5HDTMX-DhmDBTIi.js} +1 -1
- package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-C1RB8hg-.js → cynefinDiagram-5FMLGOSQ-DgNCoeoy.js} +1 -1
- package/dist/ui/assets/{dagre-GXQ25YYZ-BK1Ciodj.js → dagre-GXQ25YYZ-B7mYz05F.js} +1 -1
- package/dist/ui/assets/{diagram-S7CK7UJ4-C0Kgo7tc.js → diagram-S7CK7UJ4-Ddyyvm7S.js} +1 -1
- package/dist/ui/assets/{diagram-UQ7AKVKN-B64zLMX6.js → diagram-UQ7AKVKN-DUmEoGKb.js} +1 -1
- package/dist/ui/assets/{diagram-VSXAHHWV-CzrxcSQH.js → diagram-VSXAHHWV-BPHi15wT.js} +1 -1
- package/dist/ui/assets/{diagram-VX7I27RA-yjdIqP0q.js → diagram-VX7I27RA-KXaNOSYt.js} +1 -1
- package/dist/ui/assets/{diagram-Z3DM3KII-DOyxmmRK.js → diagram-Z3DM3KII-VY-1gBHG.js} +1 -1
- package/dist/ui/assets/{ebnfDiagram-PWID7BFC-igftIl5p.js → ebnfDiagram-PWID7BFC-DS8pCZ-o.js} +1 -1
- package/dist/ui/assets/{erDiagram-RLTQ6QDP-D1YF1lZ2.js → erDiagram-RLTQ6QDP-CMWkdSPJ.js} +1 -1
- package/dist/ui/assets/eventmodeling-NTZA5JFV-CnRce4Ft.js +1 -0
- package/dist/ui/assets/flowDiagram-HODETNUW-Bl6RGQnG.js +1 -0
- package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-7cJOmpvL.js → ganttDiagram-EL5Y4UJY-BpirkJ4v.js} +1 -1
- package/dist/ui/assets/{gitGraph-4MIJSDKK-vTrxvPkn.js → gitGraph-4MIJSDKK-CXSKWh2Z.js} +1 -1
- package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-BzFDa_ja.js → gitGraphDiagram-WWUBYQGX-yjxrBf9P.js} +1 -1
- package/dist/ui/assets/index-Dz1V2IY7.css +1 -0
- package/dist/ui/assets/index-elTUWd7x.js +54 -0
- package/dist/ui/assets/{info-A6RAGUB7-DZ5p-DTt.js → info-A6RAGUB7-CHSw1OnI.js} +1 -1
- package/dist/ui/assets/{infoDiagram-27XIBGKW-Dt9fTB-K.js → infoDiagram-27XIBGKW-XIzCq4Td.js} +1 -1
- package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-DzWqCZwA.js → ishikawaDiagram-5VMMS53U-CwTM6Xqe.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-3NMN7TZE-DPqO0nTE.js → journeyDiagram-3NMN7TZE-uqHyan0n.js} +1 -1
- package/dist/ui/assets/{kanban-definition-UXKFOSKX-Csmtd8-e.js → kanban-definition-UXKFOSKX-WHidT1Vi.js} +1 -1
- package/dist/ui/assets/{line-BhE0sIdC.js → line-VhTFB16m.js} +1 -1
- package/dist/ui/assets/{mermaid-parser.core-DXuNQalk.js → mermaid-parser.core-CnnWRcLv.js} +3 -3
- package/dist/ui/assets/{mermaid.core-CBbbhK6t.js → mermaid.core-CMAk9c7e.js} +4 -4
- package/dist/ui/assets/{mindmap-definition-YA3MSWOX-DVfGFieO.js → mindmap-definition-YA3MSWOX-CgXnpPZI.js} +1 -1
- package/dist/ui/assets/{packet-AYTQ26CC-B1T01rik.js → packet-AYTQ26CC-D79SEu1K.js} +1 -1
- package/dist/ui/assets/{pegDiagram-XKGWAZYB-DX3MmX7k.js → pegDiagram-XKGWAZYB-D57a204j.js} +1 -1
- package/dist/ui/assets/{pie-WAS4IAKB-CYWT14Ey.js → pie-WAS4IAKB-eJ29qTHN.js} +1 -1
- package/dist/ui/assets/{pieDiagram-E7YTZNPT-CnZwSuIL.js → pieDiagram-E7YTZNPT-Cmu79QgL.js} +1 -1
- package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-TlCorrVm.js → quadrantDiagram-AXDQQJYC-DkJ_lByB.js} +1 -1
- package/dist/ui/assets/{radar-RG4KPBEZ-zD8NcNrm.js → radar-RG4KPBEZ-BvmFiqNf.js} +1 -1
- package/dist/ui/assets/{railroad-74A4TZTK-CZZJ_fBU.js → railroad-74A4TZTK-D8y71XD7.js} +1 -1
- package/dist/ui/assets/railroad-abnf-HS5TGJTU-Br6QWckP.js +1 -0
- package/dist/ui/assets/railroad-ebnf-LZEXJU2U-DZ3Kdv94.js +1 -0
- package/dist/ui/assets/railroad-peg-WCYAUIDC-DS-utPYa.js +1 -0
- package/dist/ui/assets/{railroadDiagram-O6MQD6OU-CcUsh2xT.js → railroadDiagram-O6MQD6OU-DVICUmxm.js} +1 -1
- package/dist/ui/assets/repo-DJOMdIgK.js +2 -0
- package/dist/ui/assets/{requirementDiagram-BXWQKSXE-BRs-m-IN.js → requirementDiagram-BXWQKSXE-C-H3_t75.js} +1 -1
- package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-DZr6ULrz.js → sankeyDiagram-P5KCCOFB-BW8dwgDY.js} +1 -1
- package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-DG3jgNAD.js → sequenceDiagram-WJ2MYXX4-DKdAg21Q.js} +1 -1
- package/dist/ui/assets/{stateDiagram-D77RDMKH-BdOc9c8v.js → stateDiagram-D77RDMKH-CNl6WXRR.js} +1 -1
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-BbU_pRfJ.js +1 -0
- package/dist/ui/assets/{swimlanes-42K2YHIH-CNGoL8K1.js → swimlanes-42K2YHIH-CLrwIems.js} +1 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-UcPzpukO.js +8 -0
- package/dist/ui/assets/{timeline-definition-24CTP7MA-22MZfL5_.js → timeline-definition-24CTP7MA-DUaCoZTg.js} +1 -1
- package/dist/ui/assets/{title-DRn1SiDB.js → title-ClcAtTzM.js} +1 -1
- package/dist/ui/assets/{treeView-Q6P3EWNA-BD4hTxfi.js → treeView-Q6P3EWNA-Da6faho-.js} +1 -1
- package/dist/ui/assets/{treemap-WGGIJYW6-Cemii_iW.js → treemap-WGGIJYW6-BZ2UeOx0.js} +1 -1
- package/dist/ui/assets/{vendor-ui-DvMtGHLC.js → vendor-ui-DsOjPSxk.js} +2 -2
- package/dist/ui/assets/{vennDiagram-4TSXK5OY-NxbwfKSB.js → vennDiagram-4TSXK5OY-bsrbi5iL.js} +1 -1
- package/dist/ui/assets/{wardley-WFR3VGLG-CAkXWtRC.js → wardley-WFR3VGLG-1ye_cK6w.js} +1 -1
- package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-Ukj6iPYI.js → wardleyDiagram-VM6X3IG4-BI_0k668.js} +1 -1
- package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-ESpPlWUQ.js → xychartDiagram-S5SC5T6Z-ClQRAIHf.js} +1 -1
- package/dist/ui/index.html +10 -9
- package/dist/ui/sw.js +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/AgentsView-DC2kfIH_.js +0 -1
- package/dist/ui/assets/ContextView-2tUPHg0-.js +0 -4
- package/dist/ui/assets/DashboardView-BHv_FI1_.js +0 -1
- package/dist/ui/assets/DiffView-DphAy_We.js +0 -4
- package/dist/ui/assets/DiffView-gEzzmiij.css +0 -1
- package/dist/ui/assets/InputsView-YBZYQo72.js +0 -1
- package/dist/ui/assets/SettingsView-CwgTYYnZ.js +0 -4
- package/dist/ui/assets/StoriesView-DHA8hQcu.js +0 -1
- package/dist/ui/assets/WorkView-DYpJLDv-.js +0 -2
- package/dist/ui/assets/architecture-7GRP2DOG-BILS7kzQ.js +0 -1
- package/dist/ui/assets/channel-C2fJCoOG.js +0 -1
- package/dist/ui/assets/classDiagram-ZZMXUADV-D2HbZ8pG.js +0 -1
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-D2HbZ8pG.js +0 -1
- package/dist/ui/assets/config-Brg64iOP.js +0 -1
- package/dist/ui/assets/eventmodeling-NTZA5JFV-Cq__3onz.js +0 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-oqazLecl.js +0 -1
- package/dist/ui/assets/index-BzQofiD_.js +0 -54
- package/dist/ui/assets/index-CjufFN0L.css +0 -1
- package/dist/ui/assets/railroad-abnf-HS5TGJTU-CfWwDqoE.js +0 -1
- package/dist/ui/assets/railroad-ebnf-LZEXJU2U-BHW-SzuB.js +0 -1
- package/dist/ui/assets/railroad-peg-WCYAUIDC-DqepkVj5.js +0 -1
- package/dist/ui/assets/repo-CMEa_Ho-.js +0 -2
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-C-B8vQtJ.js +0 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-l739H5Fp.js +0 -8
package/dist/.build-info.json
CHANGED
package/dist/.build-stamp.json
CHANGED
package/dist/cli/help.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* usage line lives in per-command help rather than inline.
|
|
9
9
|
*/
|
|
10
10
|
import { readVersion } from "../core/version.js";
|
|
11
|
+
import { PRIORITIES, TASK_TYPES } from "../core/types.js";
|
|
11
12
|
import { c } from "./colors.js";
|
|
12
13
|
import { table, termWidth, visibleWidth, wrap } from "./layout.js";
|
|
13
14
|
/** Commands whose own argument parser already handles `--help`. */
|
|
@@ -18,8 +19,9 @@ const GROUPS = [
|
|
|
18
19
|
commands: [
|
|
19
20
|
{
|
|
20
21
|
name: "init",
|
|
21
|
-
usage: "init [name]",
|
|
22
|
+
usage: "init [name|--dir <path>] [--new --description <text>|--description-file <path>|- --areas a,b --commit|--no-commit --launch|--no-launch --json] [--docs-from <dir|file|.zip>] [--starter vision|codebase] [--force]",
|
|
22
23
|
desc: "Scaffold work/, repoos.toml, AGENTS.md; guided flow for a new project",
|
|
24
|
+
flags: "new-project (--new/--yes): --description · --description-file · --areas · --layout · --commit/--no-commit · --launch/--no-launch · --preview-stub/--no-preview-stub · --dir · --force · --json. Any init: --docs-from <dir|file|.zip> · --starter vision|codebase · --force. Existing-repo init takes none of the new-project flags.",
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
name: "upgrade",
|
|
@@ -46,15 +48,21 @@ const GROUPS = [
|
|
|
46
48
|
{ name: "show", usage: "show <id>", desc: "Show a task's full spec" },
|
|
47
49
|
{
|
|
48
50
|
name: "new",
|
|
49
|
-
usage:
|
|
51
|
+
usage: `new "<title>" [--ai --type ${TASK_TYPES.join("|")} --area <a> --priority ${PRIORITIES.join("|")} --body <b>]`,
|
|
50
52
|
desc: "Create a task",
|
|
51
|
-
flags:
|
|
53
|
+
flags: `--ai · --type · --area · --priority · --body`,
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
56
|
name: "new-doc",
|
|
55
57
|
usage: 'new-doc "<desc>"',
|
|
56
58
|
desc: "Create a document from a description via the PM agent",
|
|
57
59
|
},
|
|
60
|
+
{
|
|
61
|
+
name: "docs",
|
|
62
|
+
usage: "docs <import|scaffold> [path] [--force] [--dry-run]",
|
|
63
|
+
desc: "Import an existing doc set, or scaffold starter project docs",
|
|
64
|
+
flags: "--force · --dry-run",
|
|
65
|
+
},
|
|
58
66
|
{
|
|
59
67
|
name: "note",
|
|
60
68
|
usage: 'note <id> "<text>"',
|
|
@@ -66,11 +74,17 @@ const GROUPS = [
|
|
|
66
74
|
desc: "Move a task to a new status — never merges code",
|
|
67
75
|
flags: '--note "..." · --force-not-merged',
|
|
68
76
|
},
|
|
77
|
+
{
|
|
78
|
+
name: "rm",
|
|
79
|
+
usage: "rm <id> --yes",
|
|
80
|
+
desc: "Delete a task file from the repo (same as the UI Delete button)",
|
|
81
|
+
flags: "--yes",
|
|
82
|
+
},
|
|
69
83
|
{
|
|
70
84
|
name: "update",
|
|
71
85
|
usage: "update <id> [flags]",
|
|
72
86
|
desc: "Edit a task's metadata or body",
|
|
73
|
-
flags:
|
|
87
|
+
flags: `--title · --area · --priority ${PRIORITIES.join("|")} · --type ${TASK_TYPES.join("|")} · --body · --branch · --assigned-to`,
|
|
74
88
|
},
|
|
75
89
|
{
|
|
76
90
|
name: "index",
|
|
@@ -171,6 +185,10 @@ const GROUPS = [
|
|
|
171
185
|
const EXAMPLES = [
|
|
172
186
|
{ cmd: "repoos init" },
|
|
173
187
|
{ cmd: "repoos init myproject", comment: "guided new-project flow outside a git repo" },
|
|
188
|
+
{
|
|
189
|
+
cmd: 'repoos init myproject --new --description "A tiny social app" --areas web,api --no-launch',
|
|
190
|
+
comment: "non-interactive new project (no TTY, e.g. an agent)",
|
|
191
|
+
},
|
|
174
192
|
{
|
|
175
193
|
cmd: 'repoos new "Add company dashboard" --ai --type feature --area web,server --priority p1',
|
|
176
194
|
},
|
package/dist/cli/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Dependency-free arg routing — no commander/yargs needed for Stage 1.
|
|
5
5
|
*/
|
|
6
6
|
import { cmdInit } from "../commands/init.js";
|
|
7
|
-
import { cmdList, cmdShow, cmdMv, cmdUpdate, cmdNew, cmdIndex, cmdNote, } from "../commands/tasks.js";
|
|
8
|
-
import { cmdNewDoc } from "../commands/docs.js";
|
|
7
|
+
import { cmdList, cmdShow, cmdMv, cmdRm, cmdUpdate, cmdNew, cmdIndex, cmdNote, } from "../commands/tasks.js";
|
|
8
|
+
import { cmdDocs, cmdNewDoc } from "../commands/docs.js";
|
|
9
9
|
import { cmdGc } from "../commands/gc.js";
|
|
10
10
|
import { cmdOutline } from "../commands/outline.js";
|
|
11
11
|
import { cmdCheck } from "../commands/check.js";
|
|
@@ -152,6 +152,10 @@ function main() {
|
|
|
152
152
|
case "note":
|
|
153
153
|
cmdNote(rest);
|
|
154
154
|
break;
|
|
155
|
+
case "rm":
|
|
156
|
+
case "delete":
|
|
157
|
+
cmdRm(rest);
|
|
158
|
+
break;
|
|
155
159
|
case "update":
|
|
156
160
|
cmdUpdate(rest);
|
|
157
161
|
break;
|
|
@@ -162,6 +166,9 @@ function main() {
|
|
|
162
166
|
case "new-doc":
|
|
163
167
|
void cmdNewDoc(rest);
|
|
164
168
|
break;
|
|
169
|
+
case "docs":
|
|
170
|
+
void cmdDocs(rest);
|
|
171
|
+
break;
|
|
165
172
|
case "index":
|
|
166
173
|
case "reindex":
|
|
167
174
|
cmdIndex(rest);
|
package/dist/commands/check.js
CHANGED
|
@@ -43,6 +43,7 @@ import { extractFailedTests } from "../core/check-failure-summary.js";
|
|
|
43
43
|
import { envToRunContext, getCheckStore, localMachineName, } from "../core/check-store.js";
|
|
44
44
|
import { mainCheckoutRoot } from "../core/git.js";
|
|
45
45
|
import { Logger } from "../core/logger.js";
|
|
46
|
+
import { boardRootForEngineerRemote, boardTaskAbsPath, commitWipCheckpointForRemoteGate, isManagedEngineerCheck, runEngineerRemoteSelfCheckGate, } from "../server/engineer-remote-self-check.js";
|
|
46
47
|
import { createRemoteValidator } from "../server/remote-validation.js";
|
|
47
48
|
import { runRemotePreReviewGate, standaloneCliCanUseRemote, remoteValidationAlreadyAttempted, uncommittedFilesBlockingRemoteGate, shouldRunCliRemotePreReviewGate, } from "../server/pre-review-remote-gate.js";
|
|
48
49
|
/**
|
|
@@ -1391,7 +1392,10 @@ async function stepTests(ctx) {
|
|
|
1391
1392
|
// A full unscoped run is ~10min healthy and can legitimately reach ~25min on
|
|
1392
1393
|
// a slow box; a too-tight cap SIGTERMs a green suite (exit 143). Vitest's own
|
|
1393
1394
|
// per-test timeout fails a genuine hang fast — this is the outer backstop.
|
|
1394
|
-
|
|
1395
|
+
// Scoped runs still execute the full wrapped suite (main pass + boot-timing);
|
|
1396
|
+
// on a laptop that legitimately finishes in ~5–6 minutes, a 300s cap SIGTERMs
|
|
1397
|
+
// a green run (exit 143) — see AGENTS.md debugging-check-failures.
|
|
1398
|
+
const timeoutMs = changedRef ? 420_000 : 1_500_000;
|
|
1395
1399
|
const res = await runCommand({ command, cwd: ctx.cwd, timeoutMs, env });
|
|
1396
1400
|
if (res.status === "passed") {
|
|
1397
1401
|
return {
|
|
@@ -1811,7 +1815,7 @@ export async function cmdCheck(argv = []) {
|
|
|
1811
1815
|
}
|
|
1812
1816
|
if (cfg.remoteValidation?.enabled &&
|
|
1813
1817
|
!standaloneCliCanUseRemote(cfg) &&
|
|
1814
|
-
!
|
|
1818
|
+
!isManagedEngineerCheck(process.env) &&
|
|
1815
1819
|
!opts.localTestsOnly &&
|
|
1816
1820
|
!remoteValidationAlreadyAttempted(process.env)) {
|
|
1817
1821
|
console.log(c.dim(" · remote validation: the Hetzner runner is owned by the server, so a standalone " +
|
|
@@ -1819,15 +1823,26 @@ export async function cmdCheck(argv = []) {
|
|
|
1819
1823
|
}
|
|
1820
1824
|
let runRemoteGate = shouldRunCliRemotePreReviewGate(cfg, { ...opts, changedRef }, process.env);
|
|
1821
1825
|
if (runRemoteGate) {
|
|
1822
|
-
// The runner tests a bundle of HEAD. Uncommitted work would be skipped by it
|
|
1823
|
-
// and then unverified locally (tests are skipped after a remote pass), so
|
|
1824
|
-
// test the working tree locally instead and say why.
|
|
1825
1826
|
const uncommitted = await uncommittedFilesBlockingRemoteGate(repoRoot, cfg);
|
|
1826
1827
|
if (uncommitted.length > 0) {
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1828
|
+
if (isManagedEngineerCheck(process.env)) {
|
|
1829
|
+
const taskId = process.env.REPOOS_TASK_ID.trim();
|
|
1830
|
+
const wipErr = await commitWipCheckpointForRemoteGate(repoRoot, cfg, taskId);
|
|
1831
|
+
if (wipErr) {
|
|
1832
|
+
runRemoteGate = false;
|
|
1833
|
+
console.log(c.yellow(` ⚠ uncommitted changes — could not commit a WIP checkpoint (${wipErr}); ` +
|
|
1834
|
+
"running the full local gate on the working tree instead\n"));
|
|
1835
|
+
}
|
|
1836
|
+
else {
|
|
1837
|
+
console.log(c.dim(" · uncommitted work committed as a WIP checkpoint so the remote runner tests this tree\n"));
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
else {
|
|
1841
|
+
runRemoteGate = false;
|
|
1842
|
+
const shown = uncommitted.slice(0, 5).join(", ");
|
|
1843
|
+
console.log(c.yellow(` ⚠ uncommitted changes (${shown}${uncommitted.length > 5 ? ", …" : ""}) — the remote ` +
|
|
1844
|
+
"gate tests committed HEAD only, so running the full local gate on the working tree instead\n"));
|
|
1845
|
+
}
|
|
1831
1846
|
}
|
|
1832
1847
|
}
|
|
1833
1848
|
// The plan never runs when the remote gate fails, so the normal end-of-run
|
|
@@ -1858,83 +1873,98 @@ export async function cmdCheck(argv = []) {
|
|
|
1858
1873
|
};
|
|
1859
1874
|
if (runRemoteGate) {
|
|
1860
1875
|
heading("Remote validation");
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
if (
|
|
1869
|
-
console.log(c.red(`\n ✗ ${
|
|
1870
|
-
persistRemoteFailure(
|
|
1871
|
-
// The runner never dispatched, so nothing else will record this
|
|
1872
|
-
// failed remote attempt in the history (#0564). Record it here —
|
|
1873
|
-
// machine unknown (no host was ever chosen), remote half only.
|
|
1874
|
-
recordRunHistoryRow({
|
|
1875
|
-
root: checkStoreRoot,
|
|
1876
|
-
cacheDir: cfg.cacheDir,
|
|
1877
|
-
scope: "full",
|
|
1878
|
-
startedAt: new Date().toISOString(),
|
|
1879
|
-
durationMs: 0,
|
|
1880
|
-
outcome: "fail",
|
|
1881
|
-
failedStep: "remote-validation",
|
|
1882
|
-
skippedSteps: [],
|
|
1883
|
-
detail: msg,
|
|
1884
|
-
});
|
|
1876
|
+
const managed = isManagedEngineerCheck(process.env);
|
|
1877
|
+
const taskId = process.env.REPOOS_TASK_ID?.trim() || "pre-review";
|
|
1878
|
+
const remoteStartedAt = new Date();
|
|
1879
|
+
let remoteOutput = "";
|
|
1880
|
+
const prevStoreRoot = process.env.REPOOS_CHECK_STORE_ROOT;
|
|
1881
|
+
process.env.REPOOS_CHECK_STORE_ROOT = checkStoreRoot;
|
|
1882
|
+
const applyRemoteGateOutcome = (gate) => {
|
|
1883
|
+
if (gate.kind === "fail") {
|
|
1884
|
+
console.log(c.red(`\n ✗ ${gate.detail}\n`));
|
|
1885
|
+
persistRemoteFailure(gate.detail, remoteOutput, remoteStartedAt);
|
|
1885
1886
|
process.exit(1);
|
|
1886
1887
|
}
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
const
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
// a pre-review pass for that task; otherwise a bare CLI run.
|
|
1903
|
-
const { phase: runPhase } = envToRunContext(process.env);
|
|
1904
|
-
const gate = await runRemotePreReviewGate({
|
|
1905
|
-
config: cfg,
|
|
1906
|
-
remoteValidator,
|
|
1888
|
+
if (gate.kind === "local-only" && gate.skipTests) {
|
|
1889
|
+
process.env.REPOOS_SKIP_TESTS = "1";
|
|
1890
|
+
console.log(c.green(" ✔ remote gate passed — running local guards only\n"));
|
|
1891
|
+
}
|
|
1892
|
+
else if (gate.kind === "local-only") {
|
|
1893
|
+
console.log(c.yellow(" ⚠ remote unavailable — running the full local gate\n"));
|
|
1894
|
+
}
|
|
1895
|
+
};
|
|
1896
|
+
try {
|
|
1897
|
+
if (managed) {
|
|
1898
|
+
const boardRoot = boardRootForEngineerRemote(repoRoot);
|
|
1899
|
+
const gateConfig = loadConfig(boardRoot);
|
|
1900
|
+
const taskAbsPath = /^\d+$/.test(taskId) ? boardTaskAbsPath(gateConfig, taskId) : undefined;
|
|
1901
|
+
const gate = await runEngineerRemoteSelfCheckGate({
|
|
1902
|
+
worktreeConfig: cfg,
|
|
1907
1903
|
worktreePath: repoRoot,
|
|
1908
1904
|
taskId,
|
|
1909
|
-
|
|
1905
|
+
taskAbsPath,
|
|
1910
1906
|
onChunk: (chunk) => {
|
|
1911
1907
|
remoteOutput += chunk;
|
|
1912
1908
|
process.stdout.write(chunk);
|
|
1913
1909
|
},
|
|
1914
1910
|
});
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
process.exit(1);
|
|
1911
|
+
applyRemoteGateOutcome(gate);
|
|
1912
|
+
}
|
|
1913
|
+
else {
|
|
1914
|
+
const logger = new Logger({ root: repoRoot });
|
|
1915
|
+
let remoteValidator;
|
|
1916
|
+
try {
|
|
1917
|
+
remoteValidator = createRemoteValidator(cfg, logger);
|
|
1923
1918
|
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1919
|
+
catch (e) {
|
|
1920
|
+
const msg = `remote validation init failed: ${e.message}`;
|
|
1921
|
+
if (!cfg.remoteValidation?.fallbackToLocal) {
|
|
1922
|
+
console.log(c.red(`\n ✗ ${msg}\n`));
|
|
1923
|
+
persistRemoteFailure(msg, "", new Date());
|
|
1924
|
+
recordRunHistoryRow({
|
|
1925
|
+
root: checkStoreRoot,
|
|
1926
|
+
cacheDir: cfg.cacheDir,
|
|
1927
|
+
scope: "full",
|
|
1928
|
+
startedAt: new Date().toISOString(),
|
|
1929
|
+
durationMs: 0,
|
|
1930
|
+
outcome: "fail",
|
|
1931
|
+
failedStep: "remote-validation",
|
|
1932
|
+
skippedSteps: [],
|
|
1933
|
+
detail: msg,
|
|
1934
|
+
});
|
|
1935
|
+
process.exit(1);
|
|
1936
|
+
}
|
|
1937
|
+
console.log(c.yellow(` ⚠ ${msg} — running the full local gate\n`));
|
|
1927
1938
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1939
|
+
if (remoteValidator) {
|
|
1940
|
+
try {
|
|
1941
|
+
const { phase: runPhase } = envToRunContext(process.env);
|
|
1942
|
+
const gate = await runRemotePreReviewGate({
|
|
1943
|
+
config: cfg,
|
|
1944
|
+
remoteValidator,
|
|
1945
|
+
worktreePath: repoRoot,
|
|
1946
|
+
taskId,
|
|
1947
|
+
phase: runPhase,
|
|
1948
|
+
onChunk: (chunk) => {
|
|
1949
|
+
remoteOutput += chunk;
|
|
1950
|
+
process.stdout.write(chunk);
|
|
1951
|
+
},
|
|
1952
|
+
});
|
|
1953
|
+
await remoteValidator.dispose().catch(() => { });
|
|
1954
|
+
applyRemoteGateOutcome(gate);
|
|
1955
|
+
}
|
|
1956
|
+
catch (e) {
|
|
1957
|
+
await remoteValidator.dispose().catch(() => { });
|
|
1958
|
+
throw e;
|
|
1959
|
+
}
|
|
1930
1960
|
}
|
|
1931
1961
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1962
|
+
}
|
|
1963
|
+
finally {
|
|
1964
|
+
if (prevStoreRoot === undefined)
|
|
1965
|
+
delete process.env.REPOOS_CHECK_STORE_ROOT;
|
|
1966
|
+
else
|
|
1967
|
+
process.env.REPOOS_CHECK_STORE_ROOT = prevStoreRoot;
|
|
1938
1968
|
}
|
|
1939
1969
|
}
|
|
1940
1970
|
const runStartedAt = new Date();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type DocsImportResult } from "../core/project-docs.js";
|
|
2
|
+
/** Print an import result (shared by `docs import` and `init --docs-from`). */
|
|
3
|
+
export declare function reportDocsImport(result: DocsImportResult, dryRun: boolean): void;
|
|
4
|
+
/**
|
|
5
|
+
* Copy a doc set into a repo's docsDir and report it. Never throws: a bad
|
|
6
|
+
* source prints a clear error and returns false, so init still completes with
|
|
7
|
+
* the scaffold it already wrote.
|
|
8
|
+
*/
|
|
9
|
+
export declare function importDocsInto(root: string, docsDir: string, source: string, opts?: {
|
|
10
|
+
force?: boolean;
|
|
11
|
+
dryRun?: boolean;
|
|
12
|
+
}): boolean;
|
|
13
|
+
/** Write the opt-in starter skeleton into docsDir and report it. */
|
|
14
|
+
export declare function scaffoldDocsInto(root: string, docsDir: string): void;
|
|
15
|
+
/** Resolve a repo's docsDir from the current working directory. */
|
|
16
|
+
export declare function currentDocsDir(): {
|
|
17
|
+
root: string;
|
|
18
|
+
docsDir: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CLI helpers for the opt-in project-docs flow (#0673). Both
|
|
3
|
+
* `repoos docs ...` and `repoos init --docs-from` use these, so the reporting
|
|
4
|
+
* lives here rather than in either command and init never has to import the
|
|
5
|
+
* PM-agent-backed `docs.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { findRepoRoot, loadConfig } from "../core/config.js";
|
|
9
|
+
import { expandHome, importProjectDocs, scaffoldStarterDocs, } from "../core/project-docs.js";
|
|
10
|
+
import { c } from "../cli/colors.js";
|
|
11
|
+
/** Print an import result (shared by `docs import` and `init --docs-from`). */
|
|
12
|
+
export function reportDocsImport(result, dryRun) {
|
|
13
|
+
const verb = dryRun ? "would copy" : "copied";
|
|
14
|
+
if (result.note)
|
|
15
|
+
console.log(c.dim(" " + result.note));
|
|
16
|
+
for (const e of result.created)
|
|
17
|
+
console.log(" " + c.green(verb + " ") + e.path);
|
|
18
|
+
for (const e of result.overwritten)
|
|
19
|
+
console.log(" " + c.yellow("overwrote ") + e.path + c.dim(" (--force)"));
|
|
20
|
+
for (const e of result.skipped)
|
|
21
|
+
console.log(" " + c.dim("exists " + e.path));
|
|
22
|
+
const total = result.created.length + result.overwritten.length;
|
|
23
|
+
if (total === 0 && result.skipped.length === 0) {
|
|
24
|
+
console.log(c.dim(" nothing to copy"));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
console.log(" " + c.dim(`${total} file${total === 1 ? "" : "s"} ${verb}`));
|
|
28
|
+
}
|
|
29
|
+
if (result.skipped.length > 0 && !dryRun) {
|
|
30
|
+
console.log(c.dim(" Re-run with --force to overwrite the existing files."));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Copy a doc set into a repo's docsDir and report it. Never throws: a bad
|
|
35
|
+
* source prints a clear error and returns false, so init still completes with
|
|
36
|
+
* the scaffold it already wrote.
|
|
37
|
+
*/
|
|
38
|
+
export function importDocsInto(root, docsDir, source, opts = {}) {
|
|
39
|
+
const expanded = expandHome(source.trim());
|
|
40
|
+
try {
|
|
41
|
+
const result = importProjectDocs(expanded, join(root, docsDir), opts);
|
|
42
|
+
reportDocsImport(result, opts.dryRun === true);
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
console.error(c.red(" " + err.message));
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Write the opt-in starter skeleton into docsDir and report it. */
|
|
51
|
+
export function scaffoldDocsInto(root, docsDir) {
|
|
52
|
+
const result = scaffoldStarterDocs(join(root, docsDir));
|
|
53
|
+
for (const f of result.created)
|
|
54
|
+
console.log(" " + c.green("created ") + f);
|
|
55
|
+
for (const f of result.skipped)
|
|
56
|
+
console.log(" " + c.dim("exists " + f));
|
|
57
|
+
if (result.created.length === 0) {
|
|
58
|
+
console.log(c.dim(` ${docsDir}/ already has the starter files.`));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Resolve a repo's docsDir from the current working directory. */
|
|
62
|
+
export function currentDocsDir() {
|
|
63
|
+
const root = findRepoRoot(process.cwd());
|
|
64
|
+
const config = loadConfig(root);
|
|
65
|
+
return { root, docsDir: config.docsDir };
|
|
66
|
+
}
|
package/dist/commands/docs.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
/** `repoos new-doc "<description>"` or `repoos new-doc --path docs/foo.md --content-file x.md` */
|
|
2
2
|
export declare function cmdNewDoc(args: string[]): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* `repoos docs import <dir|file|.zip> [--force] [--dry-run]`
|
|
5
|
+
* `repoos docs scaffold`
|
|
6
|
+
*
|
|
7
|
+
* Opt-in helpers around `docsDir` (#0673): copy an existing doc set, or write a
|
|
8
|
+
* minimal starter skeleton. Neither runs on its own, and scaffold never
|
|
9
|
+
* overwrites — an existing file is left exactly as it was.
|
|
10
|
+
*/
|
|
11
|
+
export declare function cmdDocs(args: string[]): Promise<void>;
|
package/dist/commands/docs.js
CHANGED
|
@@ -6,6 +6,7 @@ import { createDocument, createFreeformDocument, docFreeformPrompt, parseGenerat
|
|
|
6
6
|
import { loadConfig } from "../core/config.js";
|
|
7
7
|
import { c } from "../cli/colors.js";
|
|
8
8
|
import { resolvePmAgent, runPrompt, recordOneShotSession } from "../server/agents.js";
|
|
9
|
+
import { currentDocsDir, importDocsInto, scaffoldDocsInto } from "./docs-io.js";
|
|
9
10
|
/** `repoos new-doc "<description>"` or `repoos new-doc --path docs/foo.md --content-file x.md` */
|
|
10
11
|
export async function cmdNewDoc(args) {
|
|
11
12
|
const flags = {};
|
|
@@ -68,3 +69,51 @@ export async function cmdNewDoc(args) {
|
|
|
68
69
|
process.exitCode = 1;
|
|
69
70
|
}
|
|
70
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* `repoos docs import <dir|file|.zip> [--force] [--dry-run]`
|
|
74
|
+
* `repoos docs scaffold`
|
|
75
|
+
*
|
|
76
|
+
* Opt-in helpers around `docsDir` (#0673): copy an existing doc set, or write a
|
|
77
|
+
* minimal starter skeleton. Neither runs on its own, and scaffold never
|
|
78
|
+
* overwrites — an existing file is left exactly as it was.
|
|
79
|
+
*/
|
|
80
|
+
export async function cmdDocs(args) {
|
|
81
|
+
const [sub, ...rest] = args;
|
|
82
|
+
if (sub === "import") {
|
|
83
|
+
let force = false;
|
|
84
|
+
let dryRun = false;
|
|
85
|
+
const positional = [];
|
|
86
|
+
for (const a of rest) {
|
|
87
|
+
if (a === "--force")
|
|
88
|
+
force = true;
|
|
89
|
+
else if (a === "--dry-run")
|
|
90
|
+
dryRun = true;
|
|
91
|
+
else
|
|
92
|
+
positional.push(a);
|
|
93
|
+
}
|
|
94
|
+
const source = positional.join(" ").trim();
|
|
95
|
+
if (!source) {
|
|
96
|
+
console.error(c.red(" Usage: repoos docs import <dir|file|.zip> [--force] [--dry-run]"));
|
|
97
|
+
process.exitCode = 1;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const { root, docsDir } = currentDocsDir();
|
|
101
|
+
if (!importDocsInto(root, docsDir, source, { force, dryRun }))
|
|
102
|
+
process.exitCode = 1;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (sub === "scaffold") {
|
|
106
|
+
if (rest.includes("--force")) {
|
|
107
|
+
console.error(c.red(" repoos docs scaffold never overwrites — remove a file you want rebuilt, then re-run."));
|
|
108
|
+
process.exitCode = 1;
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const { root, docsDir } = currentDocsDir();
|
|
112
|
+
scaffoldDocsInto(root, docsDir);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
console.error(c.red(" Usage: repoos docs <import|scaffold> ..."));
|
|
116
|
+
console.error(c.dim(" repoos docs import <dir|file|.zip> [--force] [--dry-run]"));
|
|
117
|
+
console.error(c.dim(" repoos docs scaffold"));
|
|
118
|
+
process.exitCode = 1;
|
|
119
|
+
}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -29,6 +29,34 @@ export declare function areaVocabularyTomlAddition(areas: string[], previewStub:
|
|
|
29
29
|
type ScaffoldLayout = string;
|
|
30
30
|
/** Which starter task to seed beyond 0001 — a blank project or an existing repo. */
|
|
31
31
|
type ScaffoldKind = "new" | "existing";
|
|
32
|
+
/**
|
|
33
|
+
* Which starter body to seed. `vision` is the new-project starter (flesh out
|
|
34
|
+
* the product vision); `codebase` is the existing-repo one (read the code and
|
|
35
|
+
* propose docs + a backlog). Selected by the repo's content for the
|
|
36
|
+
* non-guided path, overridable via `--starter vision|codebase`.
|
|
37
|
+
*/
|
|
38
|
+
export type StarterChoice = "vision" | "codebase";
|
|
39
|
+
/**
|
|
40
|
+
* True when a single repo-relative path represents real project content, as
|
|
41
|
+
* opposed to RepoOS's scaffold or generic boilerplate. Pure, so the starter
|
|
42
|
+
* decision is unit-testable without a filesystem.
|
|
43
|
+
*/
|
|
44
|
+
export declare function isMeaningfulRepoPath(relPath: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Decide which starter to seed from the repo's content: a repo with no
|
|
47
|
+
* meaningful source files is effectively empty (a fresh `git init`, a README,
|
|
48
|
+
* or only RepoOS's own scaffold), so it gets the product-vision starter; once
|
|
49
|
+
* there is code to read, it gets the read-the-codebase starter.
|
|
50
|
+
*
|
|
51
|
+
* Uses only the path list, so callers can stop walking as soon as they find
|
|
52
|
+
* something meaningful.
|
|
53
|
+
*/
|
|
54
|
+
export declare function repoHasMeaningfulContent(relPaths: string[]): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Walk a repo's tree and report whether it holds any meaningful content.
|
|
57
|
+
* Prunes heavy/generated directories and stops at the first real file.
|
|
58
|
+
*/
|
|
59
|
+
export declare function detectMeaningfulRepoContent(root: string): boolean;
|
|
32
60
|
/**
|
|
33
61
|
* True when the canary counter lives directly inside the root-level `.repoos/`
|
|
34
62
|
* runtime directory (cacheDir of ".repoos", or a cacheDir nested under it).
|
|
@@ -38,9 +66,22 @@ export declare function scaffoldInto(root: string, description: string, layout?:
|
|
|
38
66
|
/** Areas collected at init time (#0583) — real `[[areas]]` rows when given. */
|
|
39
67
|
areas?: string[],
|
|
40
68
|
/** When true, scaffold commented `[[preview.targets]]` stubs for those areas. */
|
|
41
|
-
previewStub?: boolean
|
|
69
|
+
previewStub?: boolean,
|
|
70
|
+
/**
|
|
71
|
+
* Force which starter body to seed. Omitted, a fresh install inside an
|
|
72
|
+
* existing repo picks by content: an effectively empty repo gets the
|
|
73
|
+
* product-vision starter, a repo with real source gets read-the-codebase.
|
|
74
|
+
*/
|
|
75
|
+
starter?: StarterChoice): {
|
|
42
76
|
created: string[];
|
|
43
77
|
skipped: string[];
|
|
78
|
+
starter: StarterChoice;
|
|
79
|
+
};
|
|
80
|
+
/** Split `--docs-from <path>` / `--force` off an init argument list. */
|
|
81
|
+
export declare function parseDocsFromArgs(args: string[]): {
|
|
82
|
+
positional: string[];
|
|
83
|
+
docsFrom: string | null;
|
|
84
|
+
force: boolean;
|
|
44
85
|
};
|
|
45
86
|
/**
|
|
46
87
|
* Validate a user-supplied namespace string. Returns null when the input means
|
|
@@ -49,5 +90,48 @@ previewStub?: boolean): {
|
|
|
49
90
|
* distinguishes valid from error by checking `result.startsWith("!")`.
|
|
50
91
|
*/
|
|
51
92
|
export declare function validateNamespace(input: string): string;
|
|
93
|
+
/**
|
|
94
|
+
* Answers to the guided new-project flow, whether they came from interactive
|
|
95
|
+
* prompts or from CLI flags. Keeping one record means the interactive and
|
|
96
|
+
* non-interactive paths run the exact same scaffolding code — only where the
|
|
97
|
+
* answers come from differs.
|
|
98
|
+
*/
|
|
99
|
+
interface NewProjectOptions {
|
|
100
|
+
/** Parsed from `--new`/`--yes`; required to run non-interactively. */
|
|
101
|
+
nonInteractive: boolean;
|
|
102
|
+
/** Positional name or `--dir`; empty = the current directory. */
|
|
103
|
+
projectDir: string;
|
|
104
|
+
description: string;
|
|
105
|
+
areas: string[];
|
|
106
|
+
/** `--layout` (`repoos` default, `/` for root, or a namespace path). */
|
|
107
|
+
layout: ScaffoldLayout;
|
|
108
|
+
/** `--preview-stub` / `--no-preview-stub`; only meaningful with areas. */
|
|
109
|
+
previewStub: boolean;
|
|
110
|
+
commit: boolean;
|
|
111
|
+
launch: boolean;
|
|
112
|
+
force: boolean;
|
|
113
|
+
json: boolean;
|
|
114
|
+
/** `--docs-from` import source; interactive flow prompts when absent (#0673). */
|
|
115
|
+
docsFrom: string | null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Parse the `repoos init` argument vector. Returns the shared options record
|
|
119
|
+
* plus an error string (prefixed `!`) when a flag is malformed. `--dir` is an
|
|
120
|
+
* alias for the positional name; both name a subdirectory under the cwd.
|
|
121
|
+
*/
|
|
122
|
+
export declare function parseInitFlags(args: string[], tty: boolean): {
|
|
123
|
+
options: NewProjectOptions;
|
|
124
|
+
error: string | null;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Parse `--starter vision|codebase` (also `--starter=vision`) out of `args`,
|
|
128
|
+
* returning the choice (or `undefined` when absent) and the remaining args with
|
|
129
|
+
* the flag removed, so downstream parsing never mistakes it for a project name.
|
|
130
|
+
* An unknown value is rejected loudly rather than silently falling back.
|
|
131
|
+
*/
|
|
132
|
+
export declare function parseStarterOption(args: string[]): {
|
|
133
|
+
starter?: StarterChoice;
|
|
134
|
+
rest: string[];
|
|
135
|
+
};
|
|
52
136
|
export declare function cmdInit(args: string[]): Promise<void>;
|
|
53
137
|
export {};
|