@runcofactor/cli 0.57.0 → 0.58.0
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 +40 -0
- package/dist/{account-S7VHLHYX.js → account-CWSADXJD.js} +5 -5
- package/dist/{alert-DZUI3JEU.js → alert-VEZZJPIH.js} +8 -8
- package/dist/{api-catalog-WP6AQYUG.js → api-catalog-OBE6ITCJ.js} +5 -5
- package/dist/{api-key-U57EC2YF.js → api-key-265DBPSR.js} +5 -5
- package/dist/{attachment-MICVVXUW.js → attachment-QE65VNDG.js} +5 -5
- package/dist/{auth-UDD77PG6.js → auth-DG6RD4UA.js} +3 -3
- package/dist/{benchmark-Q5BVGQ3I.js → benchmark-3R75GENH.js} +5 -5
- package/dist/billing-AGY6VUCA.js +64 -0
- package/dist/billing-AGY6VUCA.js.map +1 -0
- package/dist/{blackcat-TZNSDQAC.js → blackcat-EKZS3TBD.js} +3 -3
- package/dist/{chunk-AHS2HMEH.js → chunk-4KFJQPJF.js} +3 -3
- package/dist/{chunk-LP4X7TWI.js → chunk-56WV7CFM.js} +2 -2
- package/dist/{chunk-3EKIGWMN.js → chunk-A6VDLUMH.js} +3 -3
- package/dist/{chunk-XQZJWDM4.js → chunk-B7G4TOYC.js} +5 -5
- package/dist/{chunk-U3MXJTTD.js → chunk-BDPNJKUZ.js} +10 -10
- package/dist/{chunk-IIDQM4MY.js → chunk-BMFD4OPC.js} +2 -2
- package/dist/{chunk-EYHJ5FIA.js → chunk-C6SNLHVE.js} +10 -1
- package/dist/chunk-C6SNLHVE.js.map +1 -0
- package/dist/{chunk-T5MU76RA.js → chunk-C77XIO2W.js} +4 -4
- package/dist/{chunk-FBEQNW2P.js → chunk-DFN2NH37.js} +2 -2
- package/dist/{chunk-4SQKKD3R.js → chunk-EDX47DXT.js} +2 -2
- package/dist/{chunk-BSCEOIYX.js → chunk-FQ6P522C.js} +2 -2
- package/dist/{chunk-6IMNRYC3.js → chunk-GQSW6ZY3.js} +5 -5
- package/dist/{chunk-4GDEKB5S.js → chunk-GVNSCSIC.js} +4 -4
- package/dist/{chunk-W4P6BGJ7.js → chunk-IN3AF6LI.js} +4 -4
- package/dist/{chunk-CZOYFKTY.js → chunk-IVJU3LP6.js} +3 -3
- package/dist/{chunk-H2K3ABPO.js → chunk-K54XL64A.js} +6 -6
- package/dist/{chunk-T6ZNIMI4.js → chunk-LRIP5IQD.js} +3 -3
- package/dist/chunk-LRIP5IQD.js.map +1 -0
- package/dist/{chunk-T6KTBHWD.js → chunk-LZLSRN5Q.js} +6 -6
- package/dist/{chunk-YILSW5ZY.js → chunk-MCJOF3JX.js} +4 -4
- package/dist/{chunk-SBQLD7X6.js → chunk-PN5IK7CJ.js} +2 -2
- package/dist/{chunk-K3MG2ZMH.js → chunk-RIBSXEAM.js} +2 -2
- package/dist/{chunk-DTB5HUD2.js → chunk-SPTLZJOF.js} +5 -4
- package/dist/chunk-SPTLZJOF.js.map +1 -0
- package/dist/{chunk-K2USFSTX.js → chunk-T7NZHHC5.js} +3 -3
- package/dist/{chunk-5MFHNT56.js → chunk-TWPCN4DV.js} +2 -2
- package/dist/chunk-UPP4F2BE.js +519 -0
- package/dist/chunk-UPP4F2BE.js.map +1 -0
- package/dist/{chunk-KD7VGZX7.js → chunk-UZZ5OHXT.js} +7 -7
- package/dist/{chunk-N55RKCGR.js → chunk-V22CGGHO.js} +6 -1
- package/dist/chunk-V22CGGHO.js.map +1 -0
- package/dist/{chunk-YFXTMFYB.js → chunk-V6OC2WQL.js} +5 -5
- package/dist/{chunk-YV4RASGX.js → chunk-W43YGZOP.js} +18 -6
- package/dist/chunk-W43YGZOP.js.map +1 -0
- package/dist/{chunk-TG32WC4J.js → chunk-W6TPKE5S.js} +2 -2
- package/dist/{chunk-72Y65NWI.js → chunk-WY4R4IL5.js} +3 -3
- package/dist/{chunk-XGGHOHZS.js → chunk-XD3PSGFG.js} +3 -3
- package/dist/chunk-XD3PSGFG.js.map +1 -0
- package/dist/{chunk-ETXIGTS7.js → chunk-XKR275VJ.js} +3 -3
- package/dist/{credential-HM4THJOS.js → credential-DPUCDGYC.js} +5 -5
- package/dist/{credential-template-JBV3FZBY.js → credential-template-67RQWMH2.js} +5 -5
- package/dist/{dev-D2HS5XXN.js → dev-MU45HWAN.js} +456 -170
- package/dist/dev-MU45HWAN.js.map +1 -0
- package/dist/{digest-54VJ7KTF.js → digest-4PABSK2F.js} +8 -8
- package/dist/{docs-PPQSNRP6.js → docs-ZL5QOHCB.js} +5 -5
- package/dist/{doctor-CXFGSPWH.js → doctor-J5X2HSLJ.js} +3 -3
- package/dist/{environment-6MXRQV5L.js → environment-7Q6WDKMM.js} +7 -7
- package/dist/{eval-HCDXL4QT.js → eval-37P36M53.js} +51 -358
- package/dist/eval-37P36M53.js.map +1 -0
- package/dist/{exploration-U2WMYBZ3.js → exploration-7PHVC753.js} +5 -5
- package/dist/{exploratory-test-FD7VGUKE.js → exploratory-test-NE7ECFWS.js} +6 -6
- package/dist/{external-run-THSD26B7.js → external-run-KZGHVSHY.js} +134 -11
- package/dist/external-run-KZGHVSHY.js.map +1 -0
- package/dist/{feature-flag-D5IZ6OEG.js → feature-flag-YFWCPWIR.js} +5 -5
- package/dist/{feedback-6YCQMQQ3.js → feedback-HVR7LMFL.js} +6 -6
- package/dist/{flow-OVEA7273.js → flow-M6QBA4WR.js} +5 -5
- package/dist/{github-L2AFIEVN.js → github-HUBAWWFS.js} +6 -6
- package/dist/index.js +87 -80
- package/dist/index.js.map +1 -1
- package/dist/{init-ADOE2D6R.js → init-5A7VDZU4.js} +5 -5
- package/dist/{install-SB6NLXDQ.js → install-HM3USHVU.js} +5 -5
- package/dist/{issues-V2DSZXAN.js → issues-W6WIQ4RX.js} +8 -8
- package/dist/{knobs-MR4H55EB.js → knobs-NR52HEAL.js} +5 -5
- package/dist/{landing-KTYDL7QJ.js → landing-FHE7RWCR.js} +7 -7
- package/dist/{list-DFBHWU77.js → list-6J6BCU2L.js} +5 -5
- package/dist/{local-QXSTGDFN.js → local-DNRUTJBN.js} +7 -7
- package/dist/{login-KGIZAZCR.js → login-K7CNO4QS.js} +5 -5
- package/dist/{mcp-EDYHUOFI.js → mcp-G72SEYO5.js} +10 -10
- package/dist/mcp-eval-X4AGPFWW.js +450 -0
- package/dist/mcp-eval-X4AGPFWW.js.map +1 -0
- package/dist/{metrics-JUONV7EL.js → metrics-WXQPVDQY.js} +5 -5
- package/dist/{monitor-F7F7EJAL.js → monitor-URPOJOER.js} +5 -5
- package/dist/{perf-L2YL4Z2L.js → perf-WG6DAZBT.js} +11 -11
- package/dist/{product-UBLNRF5Y.js → product-TGOCFPCC.js} +5 -5
- package/dist/{product-map-7K5I5TVU.js → product-map-PKDPF2FB.js} +7 -7
- package/dist/{prompts-3JNN4M46.js → prompts-63KKMXLZ.js} +5 -5
- package/dist/{proofs-MJ7MGBCW.js → proofs-XRQ3BMM2.js} +9 -9
- package/dist/{property-TCDBREZL.js → property-O3PMHQLJ.js} +6 -6
- package/dist/{psql-YD54GQMP.js → psql-SUE2TORV.js} +5 -5
- package/dist/{record-OWBURAZ4.js → record-C245ESQA.js} +6 -6
- package/dist/{redis-3SIKQULP.js → redis-CAOX2ODS.js} +5 -5
- package/dist/{release-DMCBRVA5.js → release-ALUGJZTN.js} +5 -5
- package/dist/{runbook-ZRKWCLZE.js → runbook-63HBD7WH.js} +5 -5
- package/dist/{sandbox-HMZR6SKM.js → sandbox-IC5E53CC.js} +9 -9
- package/dist/{scenarios-2QHT5A4F.js → scenarios-JR2H7SZC.js} +5 -5
- package/dist/{schedule-4L7LOUDB.js → schedule-FHMCSKPL.js} +8 -8
- package/dist/{session-JHLYECKM.js → session-BKHVVZS3.js} +9 -9
- package/dist/{skill-ARJSVWCZ.js → skill-TZE27TIN.js} +3 -3
- package/dist/{slack-T7CR4SAU.js → slack-3BQ2T3ZS.js} +6 -6
- package/dist/{spec-RDNTNUE2.js → spec-PCAK2BX5.js} +5 -5
- package/dist/{src-DJETLMXP.js → src-BCJZMHSQ.js} +3 -3
- package/dist/{src-H7IBLPDW.js → src-BPKBSXKX.js} +4 -4
- package/dist/{src-DPJGVNYG.js → src-PNV4HGUY.js} +3 -3
- package/dist/{src-UKPMEXXT.js → src-ZJGBNWYB.js} +5 -5
- package/dist/{start-NR7W2LIP.js → start-BA5UEI3W.js} +5 -5
- package/dist/{status-UDNXR5GK.js → status-TUXK57H4.js} +5 -5
- package/dist/{tag-ADP2MZ3V.js → tag-IBDEJZM7.js} +6 -6
- package/dist/{task-KQOUTIJU.js → task-WXZQM4BW.js} +6 -6
- package/dist/{teams-D4QXSVDA.js → teams-656T2IHZ.js} +7 -7
- package/dist/{test-suite-DYMY4YAG.js → test-suite-ETXWE5HB.js} +12 -12
- package/dist/{tickets-BX3LFWUS.js → tickets-LWP3XIHG.js} +5 -5
- package/dist/{trace-MBRU6DLE.js → trace-RNEY6XCJ.js} +8 -8
- package/dist/{triage-IXAU73VL.js → triage-VZIIN7KB.js} +6 -6
- package/dist/{trigger-CHSWCUV3.js → trigger-KTTSNSRU.js} +10 -10
- package/dist/{update-check-LLETICM4.js → update-check-SLGKNOUC.js} +4 -4
- package/dist/{upgrade-35WVNUEG.js → upgrade-2KSYA4GE.js} +5 -5
- package/dist/{usage-YUYXUNF2.js → usage-SC4NWQ5A.js} +99 -14
- package/dist/usage-SC4NWQ5A.js.map +1 -0
- package/dist/{utilities-MOHIKBBF.js → utilities-O4VVADHM.js} +6 -6
- package/dist/{visual-RNYERKX4.js → visual-ZWQTVXTM.js} +5 -5
- package/dist/{workflow-NM5IC7ZQ.js → workflow-7HKA2WKO.js} +30 -30
- package/dist/{workflow-cache-JNN7BS2K.js → workflow-cache-FDN2N5HH.js} +18 -18
- package/dist/{workflow-cache-convergence-resolve-4SO2MP7T.js → workflow-cache-convergence-resolve-BGEUM7WV.js} +5 -5
- package/dist/{workflow-debug-E7BXSSOG.js → workflow-debug-KNE7SVXQ.js} +11 -11
- package/dist/{workflow-feedback-EWAK45AB.js → workflow-feedback-YY2FZTV4.js} +5 -5
- package/dist/{workflow-fork-NO5IFBD4.js → workflow-fork-FH5KBVWP.js} +5 -5
- package/dist/{workflow-promotion-NWIZNAR4.js → workflow-promotion-RRI53FB6.js} +5 -5
- package/dist/{workflow-proposals-XMAZJT3X.js → workflow-proposals-5XGCOTEU.js} +5 -5
- package/dist/{workflow-revisions-4EQMLZGY.js → workflow-revisions-M6WPGXAT.js} +5 -5
- package/dist/{workflow-status-AZMXQZLC.js → workflow-status-I5BSSWHY.js} +5 -5
- package/package.json +2 -2
- package/dist/chunk-DTB5HUD2.js.map +0 -1
- package/dist/chunk-EYHJ5FIA.js.map +0 -1
- package/dist/chunk-N55RKCGR.js.map +0 -1
- package/dist/chunk-T6ZNIMI4.js.map +0 -1
- package/dist/chunk-XGGHOHZS.js.map +0 -1
- package/dist/chunk-YV4RASGX.js.map +0 -1
- package/dist/dev-D2HS5XXN.js.map +0 -1
- package/dist/eval-HCDXL4QT.js.map +0 -1
- package/dist/external-run-THSD26B7.js.map +0 -1
- package/dist/mcp-eval-YT2RFIC5.js +0 -196
- package/dist/mcp-eval-YT2RFIC5.js.map +0 -1
- package/dist/usage-YUYXUNF2.js.map +0 -1
- /package/dist/{account-S7VHLHYX.js.map → account-CWSADXJD.js.map} +0 -0
- /package/dist/{alert-DZUI3JEU.js.map → alert-VEZZJPIH.js.map} +0 -0
- /package/dist/{api-catalog-WP6AQYUG.js.map → api-catalog-OBE6ITCJ.js.map} +0 -0
- /package/dist/{api-key-U57EC2YF.js.map → api-key-265DBPSR.js.map} +0 -0
- /package/dist/{attachment-MICVVXUW.js.map → attachment-QE65VNDG.js.map} +0 -0
- /package/dist/{auth-UDD77PG6.js.map → auth-DG6RD4UA.js.map} +0 -0
- /package/dist/{benchmark-Q5BVGQ3I.js.map → benchmark-3R75GENH.js.map} +0 -0
- /package/dist/{blackcat-TZNSDQAC.js.map → blackcat-EKZS3TBD.js.map} +0 -0
- /package/dist/{chunk-AHS2HMEH.js.map → chunk-4KFJQPJF.js.map} +0 -0
- /package/dist/{chunk-LP4X7TWI.js.map → chunk-56WV7CFM.js.map} +0 -0
- /package/dist/{chunk-3EKIGWMN.js.map → chunk-A6VDLUMH.js.map} +0 -0
- /package/dist/{chunk-XQZJWDM4.js.map → chunk-B7G4TOYC.js.map} +0 -0
- /package/dist/{chunk-U3MXJTTD.js.map → chunk-BDPNJKUZ.js.map} +0 -0
- /package/dist/{chunk-IIDQM4MY.js.map → chunk-BMFD4OPC.js.map} +0 -0
- /package/dist/{chunk-T5MU76RA.js.map → chunk-C77XIO2W.js.map} +0 -0
- /package/dist/{chunk-FBEQNW2P.js.map → chunk-DFN2NH37.js.map} +0 -0
- /package/dist/{chunk-4SQKKD3R.js.map → chunk-EDX47DXT.js.map} +0 -0
- /package/dist/{chunk-BSCEOIYX.js.map → chunk-FQ6P522C.js.map} +0 -0
- /package/dist/{chunk-6IMNRYC3.js.map → chunk-GQSW6ZY3.js.map} +0 -0
- /package/dist/{chunk-4GDEKB5S.js.map → chunk-GVNSCSIC.js.map} +0 -0
- /package/dist/{chunk-W4P6BGJ7.js.map → chunk-IN3AF6LI.js.map} +0 -0
- /package/dist/{chunk-CZOYFKTY.js.map → chunk-IVJU3LP6.js.map} +0 -0
- /package/dist/{chunk-H2K3ABPO.js.map → chunk-K54XL64A.js.map} +0 -0
- /package/dist/{chunk-T6KTBHWD.js.map → chunk-LZLSRN5Q.js.map} +0 -0
- /package/dist/{chunk-YILSW5ZY.js.map → chunk-MCJOF3JX.js.map} +0 -0
- /package/dist/{chunk-SBQLD7X6.js.map → chunk-PN5IK7CJ.js.map} +0 -0
- /package/dist/{chunk-K3MG2ZMH.js.map → chunk-RIBSXEAM.js.map} +0 -0
- /package/dist/{chunk-K2USFSTX.js.map → chunk-T7NZHHC5.js.map} +0 -0
- /package/dist/{chunk-5MFHNT56.js.map → chunk-TWPCN4DV.js.map} +0 -0
- /package/dist/{chunk-KD7VGZX7.js.map → chunk-UZZ5OHXT.js.map} +0 -0
- /package/dist/{chunk-YFXTMFYB.js.map → chunk-V6OC2WQL.js.map} +0 -0
- /package/dist/{chunk-TG32WC4J.js.map → chunk-W6TPKE5S.js.map} +0 -0
- /package/dist/{chunk-72Y65NWI.js.map → chunk-WY4R4IL5.js.map} +0 -0
- /package/dist/{chunk-ETXIGTS7.js.map → chunk-XKR275VJ.js.map} +0 -0
- /package/dist/{credential-HM4THJOS.js.map → credential-DPUCDGYC.js.map} +0 -0
- /package/dist/{credential-template-JBV3FZBY.js.map → credential-template-67RQWMH2.js.map} +0 -0
- /package/dist/{digest-54VJ7KTF.js.map → digest-4PABSK2F.js.map} +0 -0
- /package/dist/{docs-PPQSNRP6.js.map → docs-ZL5QOHCB.js.map} +0 -0
- /package/dist/{doctor-CXFGSPWH.js.map → doctor-J5X2HSLJ.js.map} +0 -0
- /package/dist/{environment-6MXRQV5L.js.map → environment-7Q6WDKMM.js.map} +0 -0
- /package/dist/{exploration-U2WMYBZ3.js.map → exploration-7PHVC753.js.map} +0 -0
- /package/dist/{exploratory-test-FD7VGUKE.js.map → exploratory-test-NE7ECFWS.js.map} +0 -0
- /package/dist/{feature-flag-D5IZ6OEG.js.map → feature-flag-YFWCPWIR.js.map} +0 -0
- /package/dist/{feedback-6YCQMQQ3.js.map → feedback-HVR7LMFL.js.map} +0 -0
- /package/dist/{flow-OVEA7273.js.map → flow-M6QBA4WR.js.map} +0 -0
- /package/dist/{github-L2AFIEVN.js.map → github-HUBAWWFS.js.map} +0 -0
- /package/dist/{init-ADOE2D6R.js.map → init-5A7VDZU4.js.map} +0 -0
- /package/dist/{install-SB6NLXDQ.js.map → install-HM3USHVU.js.map} +0 -0
- /package/dist/{issues-V2DSZXAN.js.map → issues-W6WIQ4RX.js.map} +0 -0
- /package/dist/{knobs-MR4H55EB.js.map → knobs-NR52HEAL.js.map} +0 -0
- /package/dist/{landing-KTYDL7QJ.js.map → landing-FHE7RWCR.js.map} +0 -0
- /package/dist/{list-DFBHWU77.js.map → list-6J6BCU2L.js.map} +0 -0
- /package/dist/{local-QXSTGDFN.js.map → local-DNRUTJBN.js.map} +0 -0
- /package/dist/{login-KGIZAZCR.js.map → login-K7CNO4QS.js.map} +0 -0
- /package/dist/{mcp-EDYHUOFI.js.map → mcp-G72SEYO5.js.map} +0 -0
- /package/dist/{metrics-JUONV7EL.js.map → metrics-WXQPVDQY.js.map} +0 -0
- /package/dist/{monitor-F7F7EJAL.js.map → monitor-URPOJOER.js.map} +0 -0
- /package/dist/{perf-L2YL4Z2L.js.map → perf-WG6DAZBT.js.map} +0 -0
- /package/dist/{product-UBLNRF5Y.js.map → product-TGOCFPCC.js.map} +0 -0
- /package/dist/{product-map-7K5I5TVU.js.map → product-map-PKDPF2FB.js.map} +0 -0
- /package/dist/{prompts-3JNN4M46.js.map → prompts-63KKMXLZ.js.map} +0 -0
- /package/dist/{proofs-MJ7MGBCW.js.map → proofs-XRQ3BMM2.js.map} +0 -0
- /package/dist/{property-TCDBREZL.js.map → property-O3PMHQLJ.js.map} +0 -0
- /package/dist/{psql-YD54GQMP.js.map → psql-SUE2TORV.js.map} +0 -0
- /package/dist/{record-OWBURAZ4.js.map → record-C245ESQA.js.map} +0 -0
- /package/dist/{redis-3SIKQULP.js.map → redis-CAOX2ODS.js.map} +0 -0
- /package/dist/{release-DMCBRVA5.js.map → release-ALUGJZTN.js.map} +0 -0
- /package/dist/{runbook-ZRKWCLZE.js.map → runbook-63HBD7WH.js.map} +0 -0
- /package/dist/{sandbox-HMZR6SKM.js.map → sandbox-IC5E53CC.js.map} +0 -0
- /package/dist/{scenarios-2QHT5A4F.js.map → scenarios-JR2H7SZC.js.map} +0 -0
- /package/dist/{schedule-4L7LOUDB.js.map → schedule-FHMCSKPL.js.map} +0 -0
- /package/dist/{session-JHLYECKM.js.map → session-BKHVVZS3.js.map} +0 -0
- /package/dist/{skill-ARJSVWCZ.js.map → skill-TZE27TIN.js.map} +0 -0
- /package/dist/{slack-T7CR4SAU.js.map → slack-3BQ2T3ZS.js.map} +0 -0
- /package/dist/{spec-RDNTNUE2.js.map → spec-PCAK2BX5.js.map} +0 -0
- /package/dist/{src-DJETLMXP.js.map → src-BCJZMHSQ.js.map} +0 -0
- /package/dist/{src-H7IBLPDW.js.map → src-BPKBSXKX.js.map} +0 -0
- /package/dist/{src-DPJGVNYG.js.map → src-PNV4HGUY.js.map} +0 -0
- /package/dist/{src-UKPMEXXT.js.map → src-ZJGBNWYB.js.map} +0 -0
- /package/dist/{start-NR7W2LIP.js.map → start-BA5UEI3W.js.map} +0 -0
- /package/dist/{status-UDNXR5GK.js.map → status-TUXK57H4.js.map} +0 -0
- /package/dist/{tag-ADP2MZ3V.js.map → tag-IBDEJZM7.js.map} +0 -0
- /package/dist/{task-KQOUTIJU.js.map → task-WXZQM4BW.js.map} +0 -0
- /package/dist/{teams-D4QXSVDA.js.map → teams-656T2IHZ.js.map} +0 -0
- /package/dist/{test-suite-DYMY4YAG.js.map → test-suite-ETXWE5HB.js.map} +0 -0
- /package/dist/{tickets-BX3LFWUS.js.map → tickets-LWP3XIHG.js.map} +0 -0
- /package/dist/{trace-MBRU6DLE.js.map → trace-RNEY6XCJ.js.map} +0 -0
- /package/dist/{triage-IXAU73VL.js.map → triage-VZIIN7KB.js.map} +0 -0
- /package/dist/{trigger-CHSWCUV3.js.map → trigger-KTTSNSRU.js.map} +0 -0
- /package/dist/{update-check-LLETICM4.js.map → update-check-SLGKNOUC.js.map} +0 -0
- /package/dist/{upgrade-35WVNUEG.js.map → upgrade-2KSYA4GE.js.map} +0 -0
- /package/dist/{utilities-MOHIKBBF.js.map → utilities-O4VVADHM.js.map} +0 -0
- /package/dist/{visual-RNYERKX4.js.map → visual-ZWQTVXTM.js.map} +0 -0
- /package/dist/{workflow-NM5IC7ZQ.js.map → workflow-7HKA2WKO.js.map} +0 -0
- /package/dist/{workflow-cache-JNN7BS2K.js.map → workflow-cache-FDN2N5HH.js.map} +0 -0
- /package/dist/{workflow-cache-convergence-resolve-4SO2MP7T.js.map → workflow-cache-convergence-resolve-BGEUM7WV.js.map} +0 -0
- /package/dist/{workflow-debug-E7BXSSOG.js.map → workflow-debug-KNE7SVXQ.js.map} +0 -0
- /package/dist/{workflow-feedback-EWAK45AB.js.map → workflow-feedback-YY2FZTV4.js.map} +0 -0
- /package/dist/{workflow-fork-NO5IFBD4.js.map → workflow-fork-FH5KBVWP.js.map} +0 -0
- /package/dist/{workflow-promotion-NWIZNAR4.js.map → workflow-promotion-RRI53FB6.js.map} +0 -0
- /package/dist/{workflow-proposals-XMAZJT3X.js.map → workflow-proposals-5XGCOTEU.js.map} +0 -0
- /package/dist/{workflow-revisions-4EQMLZGY.js.map → workflow-revisions-M6WPGXAT.js.map} +0 -0
- /package/dist/{workflow-status-AZMXQZLC.js.map → workflow-status-I5BSSWHY.js.map} +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { createRequire as __cr } from "module"; import { fileURLToPath as __fup } from "url"; import { dirname as __dn } from "path"; const require = __cr(import.meta.url); const __filename = __fup(import.meta.url); const __dirname = __dn(__filename);
|
|
2
|
+
import {
|
|
3
|
+
printServedGuide
|
|
4
|
+
} from "./chunk-W43YGZOP.js";
|
|
2
5
|
import {
|
|
3
6
|
ProcessExitSignal
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RIBSXEAM.js";
|
|
5
8
|
import {
|
|
6
9
|
apiRequest,
|
|
7
10
|
getPositionalArg
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WY4R4IL5.js";
|
|
9
12
|
import "./chunk-W7CFLOEI.js";
|
|
10
13
|
import "./chunk-S3Q7MDCS.js";
|
|
11
14
|
import {
|
|
@@ -14,11 +17,11 @@ import {
|
|
|
14
17
|
getArgValue,
|
|
15
18
|
hasFlag,
|
|
16
19
|
resolveConfig
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BMFD4OPC.js";
|
|
18
21
|
import {
|
|
19
22
|
writeRawOutput
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-LRIP5IQD.js";
|
|
24
|
+
import "./chunk-C6SNLHVE.js";
|
|
22
25
|
import "./chunk-TOWZAG3I.js";
|
|
23
26
|
|
|
24
27
|
// src/dev-aws.ts
|
|
@@ -424,6 +427,9 @@ if ! gh auth status --hostname github.com >/dev/null 2>&1; then
|
|
|
424
427
|
exit 1
|
|
425
428
|
fi
|
|
426
429
|
|
|
430
|
+
# Persist the helper: the agent\u2019s ordinary git push must use the same HTTPS login.
|
|
431
|
+
gh auth setup-git --hostname github.com
|
|
432
|
+
|
|
427
433
|
template=/etc/cofactor/ade/template.json
|
|
428
434
|
session=$(jq -er '.sessionId' /run/cofactor/ade/session.json)
|
|
429
435
|
[[ $session =~ ^ades_([1-9A-HJ-NP-Za-km-z]{8}) ]] || { echo "ade-sync-repos: invalid session id" >&2; exit 2; }
|
|
@@ -887,6 +893,15 @@ import os2 from "os";
|
|
|
887
893
|
import path2 from "path";
|
|
888
894
|
import { createInterface as createInterface3 } from "readline/promises";
|
|
889
895
|
import { stripVTControlCharacters } from "util";
|
|
896
|
+
var FILE_GROUPS = [
|
|
897
|
+
"claude-settings",
|
|
898
|
+
"claude-skills",
|
|
899
|
+
"claude-memory",
|
|
900
|
+
"codex-config",
|
|
901
|
+
"shell"
|
|
902
|
+
];
|
|
903
|
+
var configDir = () => path2.join(os2.homedir(), ".config/cofactor/ade");
|
|
904
|
+
var capture = (command2, args) => spawnSync3(command2, args, { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
|
|
890
905
|
function readJson(file) {
|
|
891
906
|
try {
|
|
892
907
|
return JSON.parse(readFileSync3(file, "utf8"));
|
|
@@ -894,8 +909,11 @@ function readJson(file) {
|
|
|
894
909
|
throw new Error(`Could not read ADE setup JSON at ${file}`);
|
|
895
910
|
}
|
|
896
911
|
}
|
|
897
|
-
|
|
898
|
-
|
|
912
|
+
function privateJson(file, value) {
|
|
913
|
+
mkdirSync2(path2.dirname(file), { recursive: true, mode: 448 });
|
|
914
|
+
if (existsSync2(file)) chmodSync(file, 384);
|
|
915
|
+
writeFileSync3(file, JSON.stringify(value), { mode: 384 });
|
|
916
|
+
}
|
|
899
917
|
async function ask(question, yes) {
|
|
900
918
|
const input = createInterface3({ input: process.stdin, output: process.stdout });
|
|
901
919
|
try {
|
|
@@ -905,11 +923,6 @@ async function ask(question, yes) {
|
|
|
905
923
|
input.close();
|
|
906
924
|
}
|
|
907
925
|
}
|
|
908
|
-
function privateJson(file, value) {
|
|
909
|
-
mkdirSync2(path2.dirname(file), { recursive: true, mode: 448 });
|
|
910
|
-
if (existsSync2(file)) chmodSync(file, 384);
|
|
911
|
-
writeFileSync3(file, JSON.stringify(value), { mode: 384 });
|
|
912
|
-
}
|
|
913
926
|
function collect(relative, destination = relative) {
|
|
914
927
|
let ancestor = os2.homedir();
|
|
915
928
|
for (const part of relative.split("/")) {
|
|
@@ -925,6 +938,212 @@ function collect(relative, destination = relative) {
|
|
|
925
938
|
const stat = lstatSync2(file);
|
|
926
939
|
return stat.isFile() && stat.nlink === 1 ? [{ source: relative, path: destination, size: stat.size }] : [];
|
|
927
940
|
}
|
|
941
|
+
function fileGroups() {
|
|
942
|
+
const repo = capture("git", ["worktree", "list", "--porcelain"]).stdout.split("\n").find((line) => line.startsWith("worktree "))?.slice(9);
|
|
943
|
+
const remote = capture("git", ["remote", "get-url", "origin"]).stdout.trim();
|
|
944
|
+
const repoName = remote.match(/\/([^/]+?)(?:\.git)?$/)?.[1];
|
|
945
|
+
return {
|
|
946
|
+
"claude-settings": collect(".claude/settings.json"),
|
|
947
|
+
"claude-skills": collect(".claude/skills"),
|
|
948
|
+
"claude-memory": repo && repoName ? collect(
|
|
949
|
+
`.claude/projects/${repo.replace(/[^a-zA-Z0-9]/g, "-")}/memory`,
|
|
950
|
+
`.claude/projects/-workspace-${repoName}/memory`
|
|
951
|
+
) : [],
|
|
952
|
+
"codex-config": [...collect(".codex/config.toml"), ...collect(".codex/AGENTS.md")],
|
|
953
|
+
shell: [".bashrc", ".bash_profile", ".zshrc", ".profile", ".inputrc"].flatMap(
|
|
954
|
+
(file) => collect(file)
|
|
955
|
+
)
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
function claudeToken() {
|
|
959
|
+
if (process.env.CLAUDE_CODE_OAUTH_TOKEN) return process.env.CLAUDE_CODE_OAUTH_TOKEN;
|
|
960
|
+
const file = path2.join(configDir(), "claude-setup-token.json");
|
|
961
|
+
if (!existsSync2(file)) return null;
|
|
962
|
+
const cached = readJson(file);
|
|
963
|
+
return typeof cached === "object" && cached !== null && "token" in cached && typeof cached.token === "string" && cached.token ? cached.token : null;
|
|
964
|
+
}
|
|
965
|
+
function gitIdentity() {
|
|
966
|
+
const name = capture("git", ["config", "--global", "user.name"]).stdout.trim();
|
|
967
|
+
const email = capture("git", ["config", "--global", "user.email"]).stdout.trim();
|
|
968
|
+
return name && email ? { name, email } : null;
|
|
969
|
+
}
|
|
970
|
+
function inspectLaptopSetup(template) {
|
|
971
|
+
const saved = savedChoices();
|
|
972
|
+
const github = capture("gh", ["auth", "status", "--hostname", "github.com"]).status === 0;
|
|
973
|
+
const claude = Boolean(claudeToken());
|
|
974
|
+
const identity = Boolean(gitIdentity());
|
|
975
|
+
const groups = fileGroups();
|
|
976
|
+
const option = (value, flag, consequence) => ({
|
|
977
|
+
value,
|
|
978
|
+
flag,
|
|
979
|
+
consequence
|
|
980
|
+
});
|
|
981
|
+
const plan = {
|
|
982
|
+
template,
|
|
983
|
+
decisions: [
|
|
984
|
+
{
|
|
985
|
+
id: "github",
|
|
986
|
+
current: saved?.github ?? null,
|
|
987
|
+
question: "Use your existing GitHub login to clone and push repositories in the ADE?",
|
|
988
|
+
found: [
|
|
989
|
+
github ? "GitHub CLI is signed in on this laptop (credential hidden)." : "No usable GitHub CLI login found."
|
|
990
|
+
],
|
|
991
|
+
recommendedDefault: github ? "token" : "none",
|
|
992
|
+
options: [
|
|
993
|
+
option(
|
|
994
|
+
"token",
|
|
995
|
+
"--github=token",
|
|
996
|
+
"Send the existing gh token privately to ~/.config/gh/hosts.yml. Clone and push over HTTPS with gh auth git-credential; no new GitHub key or deploy key is created."
|
|
997
|
+
),
|
|
998
|
+
option(
|
|
999
|
+
"none",
|
|
1000
|
+
"--github=none",
|
|
1001
|
+
"Send no GitHub token. Sign in with a browser inside the ADE before private repositories can clone or push."
|
|
1002
|
+
)
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
id: "claude",
|
|
1007
|
+
current: saved?.claude ?? null,
|
|
1008
|
+
question: "Use a dedicated Claude token to avoid signing in again inside the ADE?",
|
|
1009
|
+
found: [
|
|
1010
|
+
claude ? "Dedicated Claude token found in CLAUDE_CODE_OAUTH_TOKEN or the local ADE cache (value hidden)." : "No dedicated Claude token found in the environment or ADE cache."
|
|
1011
|
+
],
|
|
1012
|
+
recommendedDefault: claude ? "token" : "in-box",
|
|
1013
|
+
options: [
|
|
1014
|
+
option(
|
|
1015
|
+
"token",
|
|
1016
|
+
"--claude=token",
|
|
1017
|
+
"Send the dedicated token privately to ~/.config/cofactor/ade-env.sh. Browser approval is needed on the laptop if no token is available. Laptop OAuth refresh credentials are excluded."
|
|
1018
|
+
),
|
|
1019
|
+
option(
|
|
1020
|
+
"in-box",
|
|
1021
|
+
"--claude=in-box",
|
|
1022
|
+
"Send no Claude token. Complete browser sign-in from the attached ADE when Claude needs it."
|
|
1023
|
+
)
|
|
1024
|
+
]
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
id: "codex-key",
|
|
1028
|
+
current: saved ? saved.codexKey ? "yes" : "no" : null,
|
|
1029
|
+
question: "Send the explicit OpenAI API key for Codex API billing?",
|
|
1030
|
+
found: [
|
|
1031
|
+
process.env.OPENAI_API_KEY ? "OPENAI_API_KEY is present (value hidden)." : "OPENAI_API_KEY is absent."
|
|
1032
|
+
],
|
|
1033
|
+
recommendedDefault: "no",
|
|
1034
|
+
options: [
|
|
1035
|
+
option(
|
|
1036
|
+
"yes",
|
|
1037
|
+
"--codex-key=yes",
|
|
1038
|
+
"Send OPENAI_API_KEY privately to ~/.config/cofactor/ade-env.sh. Codex uses API billing; requires the key in this command\u2019s environment."
|
|
1039
|
+
),
|
|
1040
|
+
option(
|
|
1041
|
+
"no",
|
|
1042
|
+
"--codex-key=no",
|
|
1043
|
+
"Send no API key. Use browser sign-in inside the ADE if Codex is selected. Codex OAuth auth.json is never copied."
|
|
1044
|
+
)
|
|
1045
|
+
]
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
id: "git-identity",
|
|
1049
|
+
current: saved ? saved.gitIdentity ? "yes" : "no" : null,
|
|
1050
|
+
question: "Use the laptop\u2019s global git author name and email for commits in the ADE?",
|
|
1051
|
+
found: [
|
|
1052
|
+
identity ? "Both global git user.name and user.email are configured." : "Global git user.name or user.email is missing."
|
|
1053
|
+
],
|
|
1054
|
+
recommendedDefault: identity ? "yes" : "no",
|
|
1055
|
+
options: [
|
|
1056
|
+
option(
|
|
1057
|
+
"yes",
|
|
1058
|
+
"--git-identity=yes",
|
|
1059
|
+
"Write the global author name and email to the guest ~/.gitconfig. This does not authenticate GitHub or create a key."
|
|
1060
|
+
),
|
|
1061
|
+
option(
|
|
1062
|
+
"no",
|
|
1063
|
+
"--git-identity=no",
|
|
1064
|
+
"Send no identity. Configure git user.name and user.email inside the ADE before committing."
|
|
1065
|
+
)
|
|
1066
|
+
]
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
id: "include",
|
|
1070
|
+
current: saved ? saved.include.join(",") || "none" : null,
|
|
1071
|
+
question: "Which optional settings and dotfiles should be copied to each new ADE home?",
|
|
1072
|
+
found: FILE_GROUPS.map(
|
|
1073
|
+
(group) => `${group}: ${groups[group].length ? groups[group].map((file) => `~/${file.source} \u2192 guest ~/${file.path} (${file.size} bytes)`).join("; ") : "no eligible files found"}`
|
|
1074
|
+
),
|
|
1075
|
+
recommendedDefault: "none",
|
|
1076
|
+
options: [
|
|
1077
|
+
option("none", "--include=none", "Copy no optional files; use the template defaults."),
|
|
1078
|
+
...FILE_GROUPS.map(
|
|
1079
|
+
(group) => option(
|
|
1080
|
+
group,
|
|
1081
|
+
`--include=${group}`,
|
|
1082
|
+
`Copy ${group} files listed above (combine groups with commas). Review their contents locally first: they may contain secrets or machine-specific commands. Claude settings.env is removed; symlinks and hardlinks are excluded.`
|
|
1083
|
+
)
|
|
1084
|
+
)
|
|
1085
|
+
]
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
needsYou: [
|
|
1089
|
+
...!github ? [
|
|
1090
|
+
{
|
|
1091
|
+
id: "github",
|
|
1092
|
+
reason: "Browser required only if you choose --github=token; otherwise sign in inside the ADE.",
|
|
1093
|
+
command: "!gh auth login --hostname github.com --git-protocol https --web"
|
|
1094
|
+
}
|
|
1095
|
+
] : [],
|
|
1096
|
+
...!claude ? [
|
|
1097
|
+
{
|
|
1098
|
+
id: "claude",
|
|
1099
|
+
reason: "Browser required only if you choose --claude=token. Run locally, then export the dedicated token as CLAUDE_CODE_OAUTH_TOKEN in the setup command\u2019s environment. Keep the value out of chat and logs.",
|
|
1100
|
+
command: "!claude setup-token"
|
|
1101
|
+
}
|
|
1102
|
+
] : []
|
|
1103
|
+
]
|
|
1104
|
+
};
|
|
1105
|
+
return {
|
|
1106
|
+
...plan,
|
|
1107
|
+
suggestedCommand: `cofactor dev setup --yes ${plan.decisions.map((decision) => `--${decision.id}=${decision.current ?? decision.recommendedDefault}`).join(" ")}`
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
function savedChoices() {
|
|
1111
|
+
const file = path2.join(configDir(), "setup-answers.json");
|
|
1112
|
+
if (!existsSync2(file)) return null;
|
|
1113
|
+
const saved = readJson(file);
|
|
1114
|
+
if (typeof saved !== "object" || saved === null || Array.isArray(saved))
|
|
1115
|
+
throw new Error("Invalid saved ADE choices; run `cofactor dev setup --plan`.");
|
|
1116
|
+
const s = saved;
|
|
1117
|
+
if (typeof s.github === "boolean" && typeof s.claude === "boolean") {
|
|
1118
|
+
const oldGroups = {
|
|
1119
|
+
claudeSettings: "claude-settings",
|
|
1120
|
+
claudeSkills: "claude-skills",
|
|
1121
|
+
claudeMemory: "claude-memory",
|
|
1122
|
+
codexConfig: "codex-config",
|
|
1123
|
+
shell: "shell"
|
|
1124
|
+
};
|
|
1125
|
+
return {
|
|
1126
|
+
github: s.github ? "token" : "none",
|
|
1127
|
+
claude: s.claude ? "token" : "in-box",
|
|
1128
|
+
codexKey: s.codexKey === true,
|
|
1129
|
+
gitIdentity: s.identity === true,
|
|
1130
|
+
include: Object.entries(oldGroups).flatMap(
|
|
1131
|
+
([key, group]) => s[key] === true ? [group] : []
|
|
1132
|
+
)
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
if (s.github !== "token" && s.github !== "none" || s.claude !== "token" && s.claude !== "in-box" || typeof s.codexKey !== "boolean" || typeof s.gitIdentity !== "boolean" || !Array.isArray(s.include) || !s.include.every(
|
|
1136
|
+
(group) => typeof group === "string" && FILE_GROUPS.some((allowed) => allowed === group)
|
|
1137
|
+
))
|
|
1138
|
+
throw new Error("Invalid saved ADE choices; run `cofactor dev setup --plan`.");
|
|
1139
|
+
return {
|
|
1140
|
+
github: s.github,
|
|
1141
|
+
claude: s.claude,
|
|
1142
|
+
codexKey: s.codexKey,
|
|
1143
|
+
gitIdentity: s.gitIdentity,
|
|
1144
|
+
include: s.include
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
928
1147
|
async function setupToken() {
|
|
929
1148
|
console.log(
|
|
930
1149
|
"Creating a dedicated Claude token on this laptop. Complete the browser approval locally."
|
|
@@ -970,169 +1189,111 @@ async function setupToken() {
|
|
|
970
1189
|
});
|
|
971
1190
|
});
|
|
972
1191
|
}
|
|
973
|
-
async function prepareLaptopSetup(
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1192
|
+
async function prepareLaptopSetup(options = {}) {
|
|
1193
|
+
let choices = options.choices ?? (!options.edit ? savedChoices() : null);
|
|
1194
|
+
const interactive = !choices;
|
|
1195
|
+
if (!choices) {
|
|
1196
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
1197
|
+
if (options.edit)
|
|
1198
|
+
throw new Error(
|
|
1199
|
+
"No terminal: run `cofactor dev setup --plan`, then `cofactor dev setup --yes` with every decision flag."
|
|
1200
|
+
);
|
|
1201
|
+
console.log(
|
|
1202
|
+
"ADE: no saved laptop choices; run `cofactor dev setup --plan` to prepare unattended. Attach will offer browser sign-in inside the ADE."
|
|
1203
|
+
);
|
|
1204
|
+
return null;
|
|
1205
|
+
}
|
|
1206
|
+
const plan = inspectLaptopSetup({ name: "claim", repos: [] });
|
|
1207
|
+
const saved = savedChoices();
|
|
1208
|
+
const answers = {};
|
|
1209
|
+
for (const decision of plan.decisions.filter((d) => d.id !== "include")) {
|
|
1210
|
+
console.log(`
|
|
1211
|
+
${decision.question}`);
|
|
1212
|
+
for (const found of decision.found) console.log(` ${found}`);
|
|
1213
|
+
for (const option of decision.options) console.log(` ${option.flag}: ${option.consequence}`);
|
|
1214
|
+
const prior = decision.id === "github" ? saved ? saved.github === "token" : void 0 : decision.id === "claude" ? saved ? saved.claude === "token" : void 0 : decision.id === "codex-key" ? saved?.codexKey : saved?.gitIdentity;
|
|
1215
|
+
answers[decision.id] = await ask(
|
|
1216
|
+
`Choose ${decision.options[0].flag}?`,
|
|
1217
|
+
prior ?? decision.recommendedDefault === decision.options[0].value
|
|
1218
|
+
);
|
|
1219
|
+
}
|
|
1220
|
+
const include = [];
|
|
1221
|
+
const files = plan.decisions.find((d) => d.id === "include");
|
|
988
1222
|
console.log(`
|
|
989
|
-
${
|
|
990
|
-
for (const
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1223
|
+
${files.question}`);
|
|
1224
|
+
for (const group of FILE_GROUPS) {
|
|
1225
|
+
console.log(` ${files.found.find((found) => found.startsWith(`${group}:`))}`);
|
|
1226
|
+
if (await ask(
|
|
1227
|
+
`${files.options.find((option) => option.value === group).consequence} Include ${group}?`,
|
|
1228
|
+
saved?.include.includes(group) ?? false
|
|
1229
|
+
))
|
|
1230
|
+
include.push(group);
|
|
994
1231
|
}
|
|
995
|
-
choices
|
|
996
|
-
|
|
997
|
-
|
|
1232
|
+
choices = {
|
|
1233
|
+
github: answers.github ? "token" : "none",
|
|
1234
|
+
claude: answers.claude ? "token" : "in-box",
|
|
1235
|
+
codexKey: answers["codex-key"],
|
|
1236
|
+
gitIdentity: answers["git-identity"],
|
|
1237
|
+
include
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
998
1240
|
const result = { files: [], env: {}, githubToken: null, git: null };
|
|
999
|
-
|
|
1000
|
-
"Prepare your ADE from this laptop. Secret values are hidden. Nothing is copied until the final preview is confirmed."
|
|
1001
|
-
);
|
|
1002
|
-
if (await choose(
|
|
1003
|
-
"github",
|
|
1004
|
-
"GitHub login",
|
|
1005
|
-
["Current gh login \u2192 ~/.config/gh/hosts.yml (token hidden)"],
|
|
1006
|
-
true
|
|
1007
|
-
)) {
|
|
1241
|
+
if (choices.github === "token") {
|
|
1008
1242
|
let status = capture("gh", ["auth", "status", "--hostname", "github.com"]);
|
|
1009
|
-
if (status.status !== 0 && await ask("
|
|
1243
|
+
if (interactive && status.status !== 0 && await ask("Browser required: sign in to GitHub on this laptop now?", true))
|
|
1010
1244
|
status = spawnSync3(
|
|
1011
1245
|
"gh",
|
|
1012
1246
|
["auth", "login", "--hostname", "github.com", "--git-protocol", "https", "--web"],
|
|
1013
1247
|
{ encoding: "utf8", stdio: "inherit" }
|
|
1014
1248
|
);
|
|
1015
|
-
|
|
1016
|
-
if (status
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
}
|
|
1020
|
-
if (!result.githubToken)
|
|
1021
|
-
console.log(
|
|
1022
|
-
"GitHub login unavailable locally; the box will offer browser-forwarded sign-in."
|
|
1249
|
+
const token = status.status === 0 ? capture("gh", ["auth", "token", "--hostname", "github.com"]) : null;
|
|
1250
|
+
if (token?.status !== 0 || !token.stdout.trim())
|
|
1251
|
+
throw new Error(
|
|
1252
|
+
"GitHub token unavailable. Run `cofactor dev setup --plan` for the browser sign-in command or choose --github=none."
|
|
1023
1253
|
);
|
|
1254
|
+
result.githubToken = token.stdout.trim();
|
|
1024
1255
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
"claude",
|
|
1032
|
-
"Claude dedicated token",
|
|
1033
|
-
[
|
|
1034
|
-
"Dedicated setup-token \u2192 ~/.config/cofactor/ade-env.sh",
|
|
1035
|
-
"Laptop OAuth refresh credentials are excluded"
|
|
1036
|
-
],
|
|
1037
|
-
true
|
|
1038
|
-
)) {
|
|
1039
|
-
let token = process.env.CLAUDE_CODE_OAUTH_TOKEN ?? null;
|
|
1040
|
-
if (!token && existsSync2(tokenFile)) {
|
|
1041
|
-
const cached = readJson(tokenFile);
|
|
1042
|
-
if (typeof cached === "object" && cached !== null && "token" in cached && typeof cached.token === "string")
|
|
1043
|
-
token = cached.token;
|
|
1044
|
-
}
|
|
1045
|
-
if (!token && await ask("Create and cache a dedicated Claude token on this laptop?", true)) {
|
|
1256
|
+
if (choices.claude === "token") {
|
|
1257
|
+
let token = claudeToken();
|
|
1258
|
+
if (!token && interactive && await ask(
|
|
1259
|
+
"Browser required: create and cache a dedicated Claude token on this laptop?",
|
|
1260
|
+
true
|
|
1261
|
+
)) {
|
|
1046
1262
|
token = await setupToken();
|
|
1047
|
-
if (token) privateJson(
|
|
1263
|
+
if (token) privateJson(path2.join(configDir(), "claude-setup-token.json"), { token });
|
|
1048
1264
|
}
|
|
1049
|
-
if (token)
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
"Claude token unavailable locally; the box will offer browser-forwarded sign-in."
|
|
1265
|
+
if (!token)
|
|
1266
|
+
throw new Error(
|
|
1267
|
+
"Claude dedicated token unavailable. Run `cofactor dev setup --plan` for browser approval instructions or choose --claude=in-box."
|
|
1053
1268
|
);
|
|
1269
|
+
result.env.CLAUDE_CODE_OAUTH_TOKEN = token;
|
|
1054
1270
|
}
|
|
1055
|
-
if (
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
"Codex OAuth auth.json is excluded"
|
|
1061
|
-
],
|
|
1062
|
-
false
|
|
1063
|
-
))
|
|
1271
|
+
if (choices.codexKey) {
|
|
1272
|
+
if (!process.env.OPENAI_API_KEY)
|
|
1273
|
+
throw new Error(
|
|
1274
|
+
"OPENAI_API_KEY is missing. Run `cofactor dev setup --plan`, supply it privately in the environment or choose --codex-key=no."
|
|
1275
|
+
);
|
|
1064
1276
|
result.env.OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
|
1065
|
-
else if (!process.env.OPENAI_API_KEY)
|
|
1066
|
-
console.log(
|
|
1067
|
-
"Codex: no explicit OPENAI_API_KEY is available; subscription refresh credentials will not be copied."
|
|
1068
|
-
);
|
|
1069
|
-
const repo = capture("git", ["worktree", "list", "--porcelain"]).stdout.split("\n").find((line) => line.startsWith("worktree "))?.slice(9) ?? "";
|
|
1070
|
-
const remote = capture("git", ["remote", "get-url", "origin"]).stdout.trim();
|
|
1071
|
-
const repoName = remote.match(/\/([^/]+?)(?:\.git)?$/)?.[1];
|
|
1072
|
-
const groups = [
|
|
1073
|
-
{
|
|
1074
|
-
key: "claudeSettings",
|
|
1075
|
-
label: "Claude settings",
|
|
1076
|
-
files: collect(".claude/settings.json"),
|
|
1077
|
-
yes: false
|
|
1078
|
-
},
|
|
1079
|
-
{ key: "claudeSkills", label: "Claude skills", files: collect(".claude/skills"), yes: false },
|
|
1080
|
-
{
|
|
1081
|
-
key: "claudeMemory",
|
|
1082
|
-
label: "Claude repo memory",
|
|
1083
|
-
files: repo && repoName ? collect(
|
|
1084
|
-
`.claude/projects/${repo.replace(/[^a-zA-Z0-9]/g, "-")}/memory`,
|
|
1085
|
-
`.claude/projects/-workspace-${repoName}/memory`
|
|
1086
|
-
) : [],
|
|
1087
|
-
yes: false
|
|
1088
|
-
},
|
|
1089
|
-
{
|
|
1090
|
-
key: "codexConfig",
|
|
1091
|
-
label: "Codex config",
|
|
1092
|
-
files: [...collect(".codex/config.toml"), ...collect(".codex/AGENTS.md")],
|
|
1093
|
-
yes: false
|
|
1094
|
-
},
|
|
1095
|
-
{
|
|
1096
|
-
key: "shell",
|
|
1097
|
-
label: "Shell dotfiles",
|
|
1098
|
-
files: [".bashrc", ".bash_profile", ".zshrc", ".profile", ".inputrc"].flatMap(
|
|
1099
|
-
(file) => collect(file)
|
|
1100
|
-
),
|
|
1101
|
-
yes: false
|
|
1102
|
-
},
|
|
1103
|
-
{
|
|
1104
|
-
key: "ssh",
|
|
1105
|
-
label: "SSH keys and config",
|
|
1106
|
-
files: collect(".ssh").filter(
|
|
1107
|
-
(file) => /^\.ssh\/(config|config\.d\/.+|id_[a-zA-Z0-9_.-]+)$/.test(file.path)
|
|
1108
|
-
),
|
|
1109
|
-
yes: false
|
|
1110
|
-
}
|
|
1111
|
-
];
|
|
1112
|
-
const selected = [];
|
|
1113
|
-
for (const group of groups) {
|
|
1114
|
-
if (!group.files.length) continue;
|
|
1115
|
-
if (await choose(
|
|
1116
|
-
group.key,
|
|
1117
|
-
group.label,
|
|
1118
|
-
group.files.map((file) => `~/${file.source} \u2192 guest ~/${file.path}`),
|
|
1119
|
-
group.yes
|
|
1120
|
-
))
|
|
1121
|
-
selected.push(...group.files);
|
|
1122
1277
|
}
|
|
1278
|
+
if (choices.gitIdentity) {
|
|
1279
|
+
result.git = gitIdentity();
|
|
1280
|
+
if (!result.git)
|
|
1281
|
+
throw new Error(
|
|
1282
|
+
"Global git identity is incomplete. Run `cofactor dev setup --plan`, configure git user.name and user.email or choose --git-identity=no."
|
|
1283
|
+
);
|
|
1284
|
+
}
|
|
1285
|
+
const groups = fileGroups();
|
|
1286
|
+
const selected = choices.include.flatMap((group) => groups[group]);
|
|
1123
1287
|
console.log("\nTransfer preview (your own new session only; files mode 0600):");
|
|
1124
|
-
if (result.githubToken)
|
|
1125
|
-
|
|
1288
|
+
if (result.githubToken)
|
|
1289
|
+
console.log(" gh login \u2192 guest ~/.config/gh/hosts.yml (token hidden; HTTPS clone and push)");
|
|
1290
|
+
if (result.git) console.log(" global git author \u2192 guest ~/.gitconfig");
|
|
1126
1291
|
for (const key of Object.keys(result.env))
|
|
1127
|
-
console.log(` ~/.config/cofactor/ade-env.sh
|
|
1292
|
+
console.log(` ${key} \u2192 guest ~/.config/cofactor/ade-env.sh (value hidden)`);
|
|
1128
1293
|
for (const file of selected)
|
|
1129
|
-
console.log(
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
console.log(
|
|
1133
|
-
" Managed ADE startup/browser helpers \u2192 ~/.local/share/cofactor/bin/ (executables mode 0700)"
|
|
1134
|
-
);
|
|
1135
|
-
if (!await ask("Send these items to each new ADE session using these choices?", true))
|
|
1294
|
+
console.log(` ~/${file.source} \u2192 guest ~/${file.path} (${file.size} bytes)`);
|
|
1295
|
+
console.log(" Managed startup/browser helpers \u2192 guest ~/.local/share/cofactor/bin/ (0700)");
|
|
1296
|
+
if (interactive && !await ask("Send these items to each new ADE session using these choices?", true))
|
|
1136
1297
|
return null;
|
|
1137
1298
|
for (const file of selected) {
|
|
1138
1299
|
let content = readFileSync3(path2.join(os2.homedir(), file.source));
|
|
@@ -1145,10 +1306,106 @@ ${label}:`);
|
|
|
1145
1306
|
}
|
|
1146
1307
|
result.files.push({ path: file.path, content: content.toString("base64") });
|
|
1147
1308
|
}
|
|
1148
|
-
privateJson(
|
|
1309
|
+
privateJson(path2.join(configDir(), "setup-answers.json"), choices);
|
|
1149
1310
|
return result;
|
|
1150
1311
|
}
|
|
1151
1312
|
|
|
1313
|
+
// src/dev-setup.ts
|
|
1314
|
+
function parseSetupArgs(argv) {
|
|
1315
|
+
const values = /* @__PURE__ */ new Map();
|
|
1316
|
+
const switches = /* @__PURE__ */ new Set();
|
|
1317
|
+
const decisionFlags = ["--github", "--claude", "--codex-key", "--git-identity", "--include"];
|
|
1318
|
+
function invalid(reason) {
|
|
1319
|
+
throw new Error(
|
|
1320
|
+
`${reason} Run \`cofactor dev setup --plan\` to review decisions and exact flags.`
|
|
1321
|
+
);
|
|
1322
|
+
}
|
|
1323
|
+
for (let i = 0; i < argv.length; i++) {
|
|
1324
|
+
const arg = argv[i];
|
|
1325
|
+
const equals = arg.indexOf("=");
|
|
1326
|
+
const flag = equals === -1 ? arg : arg.slice(0, equals);
|
|
1327
|
+
if (["--plan", "--json", "--yes"].includes(flag)) {
|
|
1328
|
+
if (equals !== -1 || switches.has(flag)) invalid("Invalid or duplicate setup switch.");
|
|
1329
|
+
switches.add(flag);
|
|
1330
|
+
} else if ([...GLOBAL_VALUE_FLAGS, "--template", ...decisionFlags].includes(flag)) {
|
|
1331
|
+
if (values.has(flag)) invalid("Duplicate setup flag.");
|
|
1332
|
+
const value = equals === -1 ? argv[++i] : arg.slice(equals + 1);
|
|
1333
|
+
if (!value || value.startsWith("--")) invalid("A setup flag requires a value.");
|
|
1334
|
+
values.set(flag, value);
|
|
1335
|
+
} else invalid("Unknown setup option.");
|
|
1336
|
+
}
|
|
1337
|
+
const plan = switches.has("--plan");
|
|
1338
|
+
const yes = switches.has("--yes");
|
|
1339
|
+
if (plan && (yes || decisionFlags.some((flag) => values.has(flag))))
|
|
1340
|
+
invalid("--plan cannot apply decisions.");
|
|
1341
|
+
if (switches.has("--json") && !plan) invalid("--json requires --plan.");
|
|
1342
|
+
if (!yes && decisionFlags.some((flag) => values.has(flag)))
|
|
1343
|
+
invalid("Decision flags require --yes.");
|
|
1344
|
+
if (!yes) return { plan, json: switches.has("--json") };
|
|
1345
|
+
for (const flag of decisionFlags)
|
|
1346
|
+
if (!values.has(flag)) invalid(`Missing required decision ${flag}.`);
|
|
1347
|
+
const github = values.get("--github");
|
|
1348
|
+
const claude = values.get("--claude");
|
|
1349
|
+
const codexKey = values.get("--codex-key");
|
|
1350
|
+
const identity = values.get("--git-identity");
|
|
1351
|
+
if (github !== "token" && github !== "none") invalid("--github accepts token or none.");
|
|
1352
|
+
if (claude !== "token" && claude !== "in-box") invalid("--claude accepts token or in-box.");
|
|
1353
|
+
if (codexKey !== "yes" && codexKey !== "no") invalid("--codex-key accepts yes or no.");
|
|
1354
|
+
if (identity !== "yes" && identity !== "no") invalid("--git-identity accepts yes or no.");
|
|
1355
|
+
const include = values.get("--include") === "none" ? [] : values.get("--include").split(",");
|
|
1356
|
+
if (!include.every(
|
|
1357
|
+
(group) => FILE_GROUPS.some((allowed) => group === allowed)
|
|
1358
|
+
) || new Set(include).size !== include.length)
|
|
1359
|
+
invalid(`--include accepts none or a comma-separated list of ${FILE_GROUPS.join(", ")}.`);
|
|
1360
|
+
return {
|
|
1361
|
+
plan,
|
|
1362
|
+
json: false,
|
|
1363
|
+
choices: {
|
|
1364
|
+
github,
|
|
1365
|
+
claude,
|
|
1366
|
+
codexKey: codexKey === "yes",
|
|
1367
|
+
gitIdentity: identity === "yes",
|
|
1368
|
+
include
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1372
|
+
async function runLaptopSetup(args, template) {
|
|
1373
|
+
if (args.plan) {
|
|
1374
|
+
const plan = inspectLaptopSetup(template);
|
|
1375
|
+
if (args.json) console.log(JSON.stringify(plan, null, 2));
|
|
1376
|
+
else {
|
|
1377
|
+
console.log(
|
|
1378
|
+
`ADE setup plan for ${template.name} (read-only; no files sent or choices saved).`
|
|
1379
|
+
);
|
|
1380
|
+
console.log(`Repositories: ${template.repos.join(", ")} (HTTPS via GitHub login)`);
|
|
1381
|
+
for (const decision of plan.decisions) {
|
|
1382
|
+
console.log(`
|
|
1383
|
+
${decision.question} [${decision.id}]`);
|
|
1384
|
+
for (const found of decision.found) console.log(` Found: ${found}`);
|
|
1385
|
+
console.log(` Current: ${decision.current ?? "no saved choice"}`);
|
|
1386
|
+
console.log(` Recommended: ${decision.recommendedDefault}`);
|
|
1387
|
+
for (const option of decision.options)
|
|
1388
|
+
console.log(` ${option.flag}: ${option.consequence}`);
|
|
1389
|
+
}
|
|
1390
|
+
for (const step of plan.needsYou)
|
|
1391
|
+
console.log(`
|
|
1392
|
+
Needs you (${step.id}): ${step.reason}
|
|
1393
|
+
${step.command}`);
|
|
1394
|
+
console.log(
|
|
1395
|
+
`
|
|
1396
|
+
Suggested command (saved choices when present, otherwise recommended defaults):
|
|
1397
|
+
${plan.suggestedCommand}
|
|
1398
|
+
Ask the user to review and edit the choices before applying. Keep the same org, environment and template selectors. Read \`cofactor dev guide\` for the agent procedure.`
|
|
1399
|
+
);
|
|
1400
|
+
}
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
const setup = await prepareLaptopSetup({ edit: true, choices: args.choices });
|
|
1404
|
+
console.log(
|
|
1405
|
+
setup ? "ADE laptop setup choices saved for new homes; subsequent claims use them without prompts. Prepared homes reuse their saved files." : "ADE setup cancelled; choices were not saved."
|
|
1406
|
+
);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1152
1409
|
// src/dev-home-transfer.ts
|
|
1153
1410
|
import { spawnSync as spawnSync4 } from "child_process";
|
|
1154
1411
|
var RECEIVE = String.raw`
|
|
@@ -1158,7 +1415,7 @@ try { input = JSON.parse(fs.readFileSync(0, 'utf8')); } catch { console.error('A
|
|
|
1158
1415
|
process.umask(0o077);
|
|
1159
1416
|
const home = os.homedir();
|
|
1160
1417
|
function write(relative, bytes, mode = 0o600) {
|
|
1161
|
-
if (typeof relative !== 'string' || relative.startsWith('/') || relative.split('/').some(x => !x || x === '.' || x === '..')) throw Error('invalid home destination');
|
|
1418
|
+
if (typeof relative !== 'string' || relative.startsWith('/') || relative.split('/')[0] === '.ssh' || relative.split('/').some(x => !x || x === '.' || x === '..')) throw Error('invalid home destination');
|
|
1162
1419
|
let current = home;
|
|
1163
1420
|
for (const part of relative.split('/')) {
|
|
1164
1421
|
current = path.join(current, part);
|
|
@@ -1205,13 +1462,24 @@ try {
|
|
|
1205
1462
|
`;
|
|
1206
1463
|
var quote = (value) => `'${value.replaceAll("'", `'\\''`)}'`;
|
|
1207
1464
|
function deliverLaptopSetup(alias, setup) {
|
|
1208
|
-
const stop = spawnSync4("ssh", ["-T", alias, "tmux kill-session -t ade 2>/dev/null || true"], {
|
|
1209
|
-
|
|
1465
|
+
const stop = spawnSync4("ssh", ["-T", alias, "tmux kill-session -t ade 2>/dev/null || true"], {
|
|
1466
|
+
stdio: ["ignore", "ignore", "inherit"]
|
|
1467
|
+
});
|
|
1468
|
+
if (stop.status !== 0)
|
|
1469
|
+
throw new Error("Could not prepare the new ADE terminal for laptop setup.");
|
|
1210
1470
|
const received = spawnSync4("ssh", ["-T", alias, `node -e ${quote(RECEIVE)}`], {
|
|
1211
|
-
input: JSON.stringify({
|
|
1471
|
+
input: JSON.stringify({
|
|
1472
|
+
...setup,
|
|
1473
|
+
browser: ADE_OPEN_SCRIPT,
|
|
1474
|
+
start: ADE_START_SCRIPT,
|
|
1475
|
+
sync: ADE_SYNC_SCRIPT
|
|
1476
|
+
}),
|
|
1212
1477
|
stdio: ["pipe", "inherit", "inherit"]
|
|
1213
1478
|
});
|
|
1214
|
-
if (received.status !== 0)
|
|
1479
|
+
if (received.status !== 0)
|
|
1480
|
+
console.error(
|
|
1481
|
+
"ADE: laptop delivery is incomplete; continuing with browser-forwarded setup in the box."
|
|
1482
|
+
);
|
|
1215
1483
|
return received.status === 0;
|
|
1216
1484
|
}
|
|
1217
1485
|
|
|
@@ -1228,7 +1496,9 @@ function printHelp() {
|
|
|
1228
1496
|
"",
|
|
1229
1497
|
"Sub-commands:",
|
|
1230
1498
|
" (none) [--template <name>] Claim a session and attach when its home is mounted (sign-in/setup may still need you). --template is required when the org has several",
|
|
1231
|
-
" setup
|
|
1499
|
+
" setup [--plan [--json]] Inspect laptop setup read-only; show decisions and browser-only steps",
|
|
1500
|
+
" setup --yes <decisions> Save explicit choices without prompts (see --plan for exact flags)",
|
|
1501
|
+
" guide [section] [--json] Agent guide: plan, ask the user, apply choices, then claim",
|
|
1232
1502
|
" attach [<id>] SSH into a session (your only live one by default) from this machine. Makes",
|
|
1233
1503
|
" ~/.config/cofactor/ade/id_ed25519 (no passphrase) once; each grant lasts 12 h",
|
|
1234
1504
|
" proxy <id> The SSH ProxyCommand `cofactor dev attach` writes; not run by hand",
|
|
@@ -1419,10 +1689,12 @@ function printSession(session) {
|
|
|
1419
1689
|
` ended: ${session.endReason}${session.endDetail ? ` (${session.endDetail})` : ""}`
|
|
1420
1690
|
);
|
|
1421
1691
|
}
|
|
1422
|
-
async function templateToClaim(argv, apiUrl, token) {
|
|
1692
|
+
async function templateToClaim(argv, apiUrl, token, templates) {
|
|
1423
1693
|
const given = getArgValue(argv, "--template");
|
|
1424
1694
|
if (given) return given;
|
|
1425
|
-
const names = new Set(
|
|
1695
|
+
const names = new Set(
|
|
1696
|
+
(templates ?? await allTemplates(apiUrl, token)).map((template) => template.name)
|
|
1697
|
+
);
|
|
1426
1698
|
if (names.size === 1) return [...names][0];
|
|
1427
1699
|
if (names.size === 0)
|
|
1428
1700
|
fail(
|
|
@@ -1574,17 +1846,31 @@ async function runDev(argv) {
|
|
|
1574
1846
|
await awsCredentials(argv.slice(1));
|
|
1575
1847
|
return;
|
|
1576
1848
|
}
|
|
1577
|
-
if (group === "
|
|
1578
|
-
await
|
|
1579
|
-
console.log(
|
|
1580
|
-
"ADE laptop setup choices saved for new homes; prepared homes reuse their saved files."
|
|
1581
|
-
);
|
|
1849
|
+
if (group === "guide") {
|
|
1850
|
+
await printServedGuide("dev", argv.slice(1));
|
|
1582
1851
|
return;
|
|
1583
1852
|
}
|
|
1584
1853
|
if (group === "help" || hasFlag(argv, "--help", "-h")) {
|
|
1585
1854
|
printHelp();
|
|
1586
1855
|
return;
|
|
1587
1856
|
}
|
|
1857
|
+
if (group === "setup") {
|
|
1858
|
+
const args = argv.slice(1);
|
|
1859
|
+
const setupArgs = parseSetupArgs(args);
|
|
1860
|
+
const { apiUrl: apiUrl2, token: token2 } = await resolveConfig(args);
|
|
1861
|
+
const templates = await allTemplates(apiUrl2, token2);
|
|
1862
|
+
const name = await templateToClaim(args, apiUrl2, token2, templates);
|
|
1863
|
+
const template = templates.find(
|
|
1864
|
+
(template2) => template2.name === name && template2.status === "ready"
|
|
1865
|
+
);
|
|
1866
|
+
if (!template) fail("No ready version of the selected ADE template.");
|
|
1867
|
+
if (!Array.isArray(template.repos))
|
|
1868
|
+
fail(
|
|
1869
|
+
"The ADE API must be updated to provide template repositories before setup can be planned."
|
|
1870
|
+
);
|
|
1871
|
+
await runLaptopSetup(setupArgs, { name, repos: template.repos });
|
|
1872
|
+
return;
|
|
1873
|
+
}
|
|
1588
1874
|
if (group === void 0 || group.startsWith("--")) {
|
|
1589
1875
|
const { apiUrl: apiUrl2, token: token2 } = await resolveConfig(argv);
|
|
1590
1876
|
await claim(argv, apiUrl2, token2);
|
|
@@ -1627,4 +1913,4 @@ async function runDev(argv) {
|
|
|
1627
1913
|
export {
|
|
1628
1914
|
runDev
|
|
1629
1915
|
};
|
|
1630
|
-
//# sourceMappingURL=dev-
|
|
1916
|
+
//# sourceMappingURL=dev-MU45HWAN.js.map
|