nolzu 0.0.1 → 0.1.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/LICENSE +105 -0
- package/README.md +24 -7
- package/build/client/_app/immutable/assets/0.SPD4wYkc.css +1 -0
- package/build/client/_app/immutable/assets/1.BRilEoOO.css +1 -0
- package/build/client/_app/immutable/assets/10.DwLiBGDj.css +1 -0
- package/build/client/_app/immutable/assets/11.D_TtWT3D.css +1 -0
- package/build/client/_app/immutable/assets/12.CSVGmtUY.css +1 -0
- package/build/client/_app/immutable/assets/13.qTa7IHbg.css +1 -0
- package/build/client/_app/immutable/assets/19.CbCFXKb8.css +1 -0
- package/build/client/_app/immutable/assets/2.CfHhgI77.css +1 -0
- package/build/client/_app/immutable/assets/20.C5CSZhyT.css +1 -0
- package/build/client/_app/immutable/assets/21.BBpYkZcc.css +1 -0
- package/build/client/_app/immutable/assets/22.C9RgY9kl.css +1 -0
- package/build/client/_app/immutable/assets/23.B6Dp9RJO.css +1 -0
- package/build/client/_app/immutable/assets/24.C7g2abUW.css +1 -0
- package/build/client/_app/immutable/assets/26.DTMI6ROV.css +1 -0
- package/build/client/_app/immutable/assets/27.AxXMpDkB.css +1 -0
- package/build/client/_app/immutable/assets/28.939ac-98.css +1 -0
- package/build/client/_app/immutable/assets/3.3lqex1t-.css +1 -0
- package/build/client/_app/immutable/assets/4.C52MzO_d.css +1 -0
- package/build/client/_app/immutable/assets/5.CsfJAwvS.css +1 -0
- package/build/client/_app/immutable/assets/8.ByspUp-s.css +1 -0
- package/build/client/_app/immutable/assets/9.BCSFZmce.css +1 -0
- package/build/client/_app/immutable/assets/Banner.DDqfpWLD.css +1 -0
- package/build/client/_app/immutable/assets/BoardOff.mpX08-Be.css +1 -0
- package/build/client/_app/immutable/assets/Button.BlwsEgUc.css +1 -0
- package/build/client/_app/immutable/assets/Chip.qAAa6_e5.css +1 -0
- package/build/client/_app/immutable/assets/Dialog.D5Ln60a8.css +1 -0
- package/build/client/_app/immutable/assets/FeaturePanels.DZ_Mth5M.css +1 -0
- package/build/client/_app/immutable/assets/FolderBrowser.DBmRWDCH.css +1 -0
- package/build/client/_app/immutable/assets/Geist-Variable.Bj2R_7yk.woff2 +0 -0
- package/build/client/_app/immutable/assets/GeistMono-Variable.Dispecij.woff2 +0 -0
- package/build/client/_app/immutable/assets/HelpTip.DF6T9nns.css +1 -0
- package/build/client/_app/immutable/assets/InfoBox.CpavOykF.css +1 -0
- package/build/client/_app/immutable/assets/KeyCaps.D2t-lY-8.css +1 -0
- package/build/client/_app/immutable/assets/LogLine.Bu4feLn5.css +1 -0
- package/build/client/_app/immutable/assets/Markdown.DI6AtWAc.css +1 -0
- package/build/client/_app/immutable/assets/ModelPicker.DQzj7Nj8.css +1 -0
- package/build/client/_app/immutable/assets/OptionButtons.BYiyOXOE.css +1 -0
- package/build/client/_app/immutable/assets/PeekPanel.DzMdHoqg.css +1 -0
- package/build/client/_app/immutable/assets/ScoutPage.CVIiLy5c.css +1 -0
- package/build/client/_app/immutable/assets/SetupSteps.B6pZP1Bk.css +1 -0
- package/build/client/_app/immutable/assets/Skeleton.BC-1_U5d.css +1 -0
- package/build/client/_app/immutable/assets/SlotsMeter.Dq7GGYlD.css +1 -0
- package/build/client/_app/immutable/assets/StartConfirm.DxNN2AOb.css +1 -0
- package/build/client/_app/immutable/assets/StatePill.CGWFVUUg.css +1 -0
- package/build/client/_app/immutable/assets/Streamed.DpZ6wgO2.css +1 -0
- package/build/client/_app/immutable/assets/card-pulls.C5uGMuAh.css +1 -0
- package/build/client/_app/immutable/assets/next-step.CKg1w06J.css +1 -0
- package/build/client/_app/immutable/chunks/-B5EclhK.js +1 -0
- package/build/client/_app/immutable/chunks/-Q3zApAy.js +1 -0
- package/build/client/_app/immutable/chunks/6-hwN_Ik.js +3 -0
- package/build/client/_app/immutable/chunks/B16UF4PA.js +11 -0
- package/build/client/_app/immutable/chunks/B1V3h1VF.js +1 -0
- package/build/client/_app/immutable/chunks/B2d2Mkuz.js +68 -0
- package/build/client/_app/immutable/chunks/B2yzhiEa.js +1 -0
- package/build/client/_app/immutable/chunks/B5zDDQUU.js +2 -0
- package/build/client/_app/immutable/chunks/B8DHSiWf.js +1 -0
- package/build/client/_app/immutable/chunks/B8z33EzI.js +1 -0
- package/build/client/_app/immutable/chunks/BCRkrH6c.js +1 -0
- package/build/client/_app/immutable/chunks/BCScjOxu.js +1 -0
- package/build/client/_app/immutable/chunks/BMUQtCEC.js +1 -0
- package/build/client/_app/immutable/chunks/BNnfkvZM.js +1 -0
- package/build/client/_app/immutable/chunks/BelWyZaW.js +1 -0
- package/build/client/_app/immutable/chunks/BhZpqODT.js +1 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/build/client/_app/immutable/chunks/BmafI-Bs.js +1 -0
- package/build/client/_app/immutable/chunks/BvRk9kiK.js +0 -0
- package/build/client/_app/immutable/chunks/C4i6bdQg.js +1 -0
- package/build/client/_app/immutable/chunks/C8u5TyIB.js +1 -0
- package/build/client/_app/immutable/chunks/CFs2xhoy.js +1 -0
- package/build/client/_app/immutable/chunks/CIm2DioU.js +1 -0
- package/build/client/_app/immutable/chunks/CONqGBXC.js +1 -0
- package/build/client/_app/immutable/chunks/CSOz40qO.js +1 -0
- package/build/client/_app/immutable/chunks/CXxuD1ef.js +3 -0
- package/build/client/_app/immutable/chunks/CarrGsZA.js +2 -0
- package/build/client/_app/immutable/chunks/CdrmTD44.js +1 -0
- package/build/client/_app/immutable/chunks/CfJRH9gh.js +2 -0
- package/build/client/_app/immutable/chunks/Ci7C9Cki.js +1 -0
- package/build/client/_app/immutable/chunks/CkOTL1vK.js +1 -0
- package/build/client/_app/immutable/chunks/CngTtGc_.js +1 -0
- package/build/client/_app/immutable/chunks/Cp3A1zR8.js +1 -0
- package/build/client/_app/immutable/chunks/CwtMnwNL.js +3 -0
- package/build/client/_app/immutable/chunks/Cy7f_oXg.js +1 -0
- package/build/client/_app/immutable/chunks/D-wwLm5t.js +1 -0
- package/build/client/_app/immutable/chunks/D2imbgaf.js +1 -0
- package/build/client/_app/immutable/chunks/D32mip60.js +1 -0
- package/build/client/_app/immutable/chunks/D46Vk19W.js +1 -0
- package/build/client/_app/immutable/chunks/DCUUgo-6.js +1 -0
- package/build/client/_app/immutable/chunks/DFjnjJjy.js +1 -0
- package/build/client/_app/immutable/chunks/DHMbSbMg.js +1 -0
- package/build/client/_app/immutable/chunks/DJOFx2wx.js +1 -0
- package/build/client/_app/immutable/chunks/DV4tvxHp.js +3 -0
- package/build/client/_app/immutable/chunks/DXk_5YEw.js +1 -0
- package/build/client/_app/immutable/chunks/DjgnRLJt.js +1 -0
- package/build/client/_app/immutable/chunks/DlWlQ_vP.js +1 -0
- package/build/client/_app/immutable/chunks/DpIAei2y.js +2 -0
- package/build/client/_app/immutable/chunks/Dt-HX3Vu.js +1 -0
- package/build/client/_app/immutable/chunks/DuSthUWX.js +1 -0
- package/build/client/_app/immutable/chunks/Ecfl8TOn.js +2 -0
- package/build/client/_app/immutable/chunks/ITHE99Aa.js +1 -0
- package/build/client/_app/immutable/chunks/Khdge0KS.js +1 -0
- package/build/client/_app/immutable/chunks/LMEKNlm0.js +1 -0
- package/build/client/_app/immutable/chunks/OnIeaiuO.js +1 -0
- package/build/client/_app/immutable/chunks/VFQLu55q.js +1 -0
- package/build/client/_app/immutable/chunks/ZsUxKnQw.js +1 -0
- package/build/client/_app/immutable/chunks/aWP8DVhV.js +1 -0
- package/build/client/_app/immutable/chunks/bB04Xp1f.js +1 -0
- package/build/client/_app/immutable/chunks/eylBqhv8.js +3 -0
- package/build/client/_app/immutable/chunks/hx0ssLL_.js +2 -0
- package/build/client/_app/immutable/chunks/mumDj17t.js +1 -0
- package/build/client/_app/immutable/chunks/pZYp3_TE.js +1 -0
- package/build/client/_app/immutable/chunks/tImwjqWn.js +1 -0
- package/build/client/_app/immutable/chunks/uBIymjUX.js +1 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/build/client/_app/immutable/entry/app.DVZ1wE36.js +2 -0
- package/build/client/_app/immutable/entry/start.DluCc61B.js +1 -0
- package/build/client/_app/immutable/nodes/0.CwNFevXf.js +1 -0
- package/build/client/_app/immutable/nodes/1.BR6FYiC-.js +1 -0
- package/build/client/_app/immutable/nodes/10.wNwBFtom.js +2 -0
- package/build/client/_app/immutable/nodes/11.DpoIbMNF.js +2 -0
- package/build/client/_app/immutable/nodes/12.CWdUJ8l3.js +2 -0
- package/build/client/_app/immutable/nodes/13.CZ2uTvNS.js +1 -0
- package/build/client/_app/immutable/nodes/14.CzgyXuvL.js +1 -0
- package/build/client/_app/immutable/nodes/15.CzgyXuvL.js +1 -0
- package/build/client/_app/immutable/nodes/16.odL9eB2N.js +1 -0
- package/build/client/_app/immutable/nodes/17.B-RnUeVU.js +1 -0
- package/build/client/_app/immutable/nodes/18.BLYKxyq2.js +1 -0
- package/build/client/_app/immutable/nodes/19.CgyFfPqF.js +3 -0
- package/build/client/_app/immutable/nodes/2.CCWT41Qr.js +1 -0
- package/build/client/_app/immutable/nodes/20.BBk5-krg.js +1 -0
- package/build/client/_app/immutable/nodes/21.CJoU3s1A.js +2 -0
- package/build/client/_app/immutable/nodes/22.CoRvPh8m.js +1 -0
- package/build/client/_app/immutable/nodes/23.zXO3NjnM.js +3 -0
- package/build/client/_app/immutable/nodes/24.CmO27TED.js +1 -0
- package/build/client/_app/immutable/nodes/26.TVKNr_xX.js +18 -0
- package/build/client/_app/immutable/nodes/27.RojtGU_o.js +1 -0
- package/build/client/_app/immutable/nodes/28.CVTdeeSI.js +2 -0
- package/build/client/_app/immutable/nodes/3.Cgib7Vi6.js +1 -0
- package/build/client/_app/immutable/nodes/4.CnMwOCec.js +1 -0
- package/build/client/_app/immutable/nodes/5.-NqYtQj_.js +1 -0
- package/build/client/_app/immutable/nodes/6.D5xk-UBM.js +1 -0
- package/build/client/_app/immutable/nodes/7.IL4b-DII.js +1 -0
- package/build/client/_app/immutable/nodes/8.DJrguHjO.js +11 -0
- package/build/client/_app/immutable/nodes/9.DTUSzWiK.js +1 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/favicon.svg +7 -0
- package/build/env.js +70 -0
- package/build/handler.js +26 -0
- package/build/index.js +149 -0
- package/build/server/chunks/chunks/Banner.js-D4mtxUfF.js +17 -0
- package/build/server/chunks/chunks/BoardOff.js-Dg5-LoR3.js +1627 -0
- package/build/server/chunks/chunks/Button.js-Buh9rnpu.js +43 -0
- package/build/server/chunks/chunks/Chip.js-xZ7vFkHx.js +12 -0
- package/build/server/chunks/chunks/Dialog.js-CGpwdpM-.js +60 -0
- package/build/server/chunks/chunks/FeaturePanels.js-B2sKozgF.js +84 -0
- package/build/server/chunks/chunks/FolderBrowser.js-DUHFhDaX.js +28 -0
- package/build/server/chunks/chunks/HelpTip.js-CzemvmjC.js +19 -0
- package/build/server/chunks/chunks/InfoBox.js-BJiVzZgw.js +10 -0
- package/build/server/chunks/chunks/KeyCaps.js-BMI2Hrh2.js +37 -0
- package/build/server/chunks/chunks/LogLine.js-2b7uX__H.js +35 -0
- package/build/server/chunks/chunks/Markdown.js-Clud88KU.js +4233 -0
- package/build/server/chunks/chunks/ModelPicker.js-FuBgyKIA.js +141 -0
- package/build/server/chunks/chunks/OptionButtons.js-LQKrAwUX.js +28 -0
- package/build/server/chunks/chunks/PeekPanel.js-aZ-r_v3N.js +375 -0
- package/build/server/chunks/chunks/ScoutPage.js-2DcNia96.js +733 -0
- package/build/server/chunks/chunks/SetupSteps.js-D7TAF7xa.js +66 -0
- package/build/server/chunks/chunks/Skeleton.js-diCP2sd5.js +30 -0
- package/build/server/chunks/chunks/SlotsMeter.js-BV_sAGf5.js +18 -0
- package/build/server/chunks/chunks/StartConfirm.js-CzEdFtbO.js +124 -0
- package/build/server/chunks/chunks/StatePill.js-CM7-HXNM.js +27 -0
- package/build/server/chunks/chunks/Streamed.js-_NgwNMMs.js +43 -0
- package/build/server/chunks/chunks/_page.server.js-BaGoctEY.js +1419 -0
- package/build/server/chunks/chunks/activity.js-CSoPUQLq.js +84 -0
- package/build/server/chunks/chunks/add-repo.js-DtHEobfm.js +305 -0
- package/build/server/chunks/chunks/app-header.js-CCflgeEQ.js +13 -0
- package/build/server/chunks/chunks/app.js-CuPn8jtk.js +12 -0
- package/build/server/chunks/chunks/bin.js-Cyb2cYLc.js +58 -0
- package/build/server/chunks/chunks/board-keys.js-CW3qw-MC.js +32 -0
- package/build/server/chunks/chunks/board-page.js-D0tdsE9J.js +860 -0
- package/build/server/chunks/chunks/board.js-BxL3CjB1.js +203 -0
- package/build/server/chunks/chunks/browser-test.js-DJEpOoVz.js +170 -0
- package/build/server/chunks/chunks/card-pulls.js-d_uGmBB3.js +229 -0
- package/build/server/chunks/chunks/card-repos.js-QaMCxiyV.js +59 -0
- package/build/server/chunks/chunks/chain-store.js-D42m8DUo.js +91 -0
- package/build/server/chunks/chunks/chain.js-CJFRywIC.js +52 -0
- package/build/server/chunks/chunks/changes.js-D8ITRMgU.js +513 -0
- package/build/server/chunks/chunks/checkout.js-Ys5L_gA4.js +319 -0
- package/build/server/chunks/chunks/client.js-B7jIMDuS.js +68 -0
- package/build/server/chunks/chunks/clipboard.js-qXskOBim.js +12 -0
- package/build/server/chunks/chunks/cloud-status.js-hy-9zUVX.js +95 -0
- package/build/server/chunks/chunks/coach.js-BhNB14rV.js +296 -0
- package/build/server/chunks/chunks/comments.js-1nWJQptB.js +311 -0
- package/build/server/chunks/chunks/commit-message.js-CMcNZUZw.js +8 -0
- package/build/server/chunks/chunks/create-card.js-DKtprMG6.js +498 -0
- package/build/server/chunks/chunks/db.js-pqoVpAzG.js +80 -0
- package/build/server/chunks/chunks/diff-comments.js-BSCuay_U.js +95 -0
- package/build/server/chunks/chunks/discussion.js-rJ5OMfvX.js +355 -0
- package/build/server/chunks/chunks/display.js-Bf-vGQ7Q.js +61 -0
- package/build/server/chunks/chunks/elapsed.js-DikkNhaD.js +27 -0
- package/build/server/chunks/chunks/engine.js-DS5zUwsE.js +115 -0
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
- package/build/server/chunks/chunks/estimate.js-BHTYVTaQ.js +2484 -0
- package/build/server/chunks/chunks/evidence-timeline.js-Dk0dTZIy.js +253 -0
- package/build/server/chunks/chunks/evidence.js-CT3tWdbB.js +257 -0
- package/build/server/chunks/chunks/exports.js-Hn-WQRMB.js +150 -0
- package/build/server/chunks/chunks/features.svelte.js-DNsFmFZb.js +10 -0
- package/build/server/chunks/chunks/files.js-V46lE0-6.js +46 -0
- package/build/server/chunks/chunks/filter.js-CsmCtJMd.js +11 -0
- package/build/server/chunks/chunks/forms.js-03E8qnFz.js +35 -0
- package/build/server/chunks/chunks/gate.js-Cbqo8Yy0.js +82 -0
- package/build/server/chunks/chunks/getting-started.js-DKbHofN5.js +55 -0
- package/build/server/chunks/chunks/git.js-l43vBHqs.js +16 -0
- package/build/server/chunks/chunks/home-path.js-BXgrl3TP.js +11 -0
- package/build/server/chunks/chunks/hub-link.js-B5kjLyyd.js +1532 -0
- package/build/server/chunks/chunks/internal.js-DaSBO6jY.js +1239 -0
- package/build/server/chunks/chunks/internal2.js-D6AKyUgY.js +27 -0
- package/build/server/chunks/chunks/knowledge-page.js-D2ALB3v9.js +292 -0
- package/build/server/chunks/chunks/knowledge-revert.js-2eyN9Lcb.js +109 -0
- package/build/server/chunks/chunks/knowledge.js--eAgdzNx.js +394 -0
- package/build/server/chunks/chunks/last-board.js-BemeiK3t.js +23 -0
- package/build/server/chunks/chunks/log.js-R2zUph6T.js +228 -0
- package/build/server/chunks/chunks/loop.js-D3guWKLp.js +4038 -0
- package/build/server/chunks/chunks/loop2.js-B_Qd2m4y.js +67 -0
- package/build/server/chunks/chunks/navigation.js-DQJMz-SM.js +2 -0
- package/build/server/chunks/chunks/new-project.js-DNcr9JpB.js +305 -0
- package/build/server/chunks/chunks/next-step.js-B8Kl0Iv9.js +522 -0
- package/build/server/chunks/chunks/node.js-Bz2jT5wt.js +3381 -0
- package/build/server/chunks/chunks/now-live.svelte.js-hIaDgjJ3.js +13 -0
- package/build/server/chunks/chunks/now-snapshot.js-zGKLIzox.js +207 -0
- package/build/server/chunks/chunks/now.js-Dfm-o0Ha.js +765 -0
- package/build/server/chunks/chunks/onboard.js-LBqPOxyU.js +1525 -0
- package/build/server/chunks/chunks/ordinal.js-Bm_9QEBD.js +12 -0
- package/build/server/chunks/chunks/overview.js-C32iHkXD.js +1108 -0
- package/build/server/chunks/chunks/page-keys.svelte.js-D8vXA_8Z.js +14 -0
- package/build/server/chunks/chunks/patch.js-Bl7vwsUj.js +62 -0
- package/build/server/chunks/chunks/paths.js-DVRjNYFW.js +19 -0
- package/build/server/chunks/chunks/peek.js-D9sSjT9t.js +95 -0
- package/build/server/chunks/chunks/plan.js-DFq5ntMM.js +143 -0
- package/build/server/chunks/chunks/project-files-notice.js-CcqcBgUP.js +19 -0
- package/build/server/chunks/chunks/project-files.js-DTC4jUxy.js +52 -0
- package/build/server/chunks/chunks/project-folder.js-CoKgPiM0.js +22 -0
- package/build/server/chunks/chunks/projects.js-bw2V11od.js +989 -0
- package/build/server/chunks/chunks/prs.js-CLfImauu.js +118 -0
- package/build/server/chunks/chunks/publish.js-D2vWpIJU.js +195 -0
- package/build/server/chunks/chunks/pull-list.js-BCIBJdyz.js +691 -0
- package/build/server/chunks/chunks/qa-ask.svelte.js-8Hf1JWW2.js +47 -0
- package/build/server/chunks/chunks/qa-setup.js-DFOEcNxH.js +1241 -0
- package/build/server/chunks/chunks/quiet.js-1GKY40Ay.js +104 -0
- package/build/server/chunks/chunks/rail.js-BePBwOqZ.js +135 -0
- package/build/server/chunks/chunks/review.js-MPqnq9Gy.js +98 -0
- package/build/server/chunks/chunks/routing.js-B8s1QwSP.js +265 -0
- package/build/server/chunks/chunks/run-log.js-CnN2jOcg.js +94 -0
- package/build/server/chunks/chunks/run.js-COSejjLl.js +34 -0
- package/build/server/chunks/chunks/scout-findings.js-CqJti10a.js +940 -0
- package/build/server/chunks/chunks/scout.js-Bm7wQLX2.js +62 -0
- package/build/server/chunks/chunks/sentinels.js-BXvpnzr3.js +13 -0
- package/build/server/chunks/chunks/server.js-BR0D07DR.js +3803 -0
- package/build/server/chunks/chunks/settings-sections.js-V70W7BkZ.js +103 -0
- package/build/server/chunks/chunks/shared.js-BgfCUZUJ.js +776 -0
- package/build/server/chunks/chunks/sign-in.js-O-pBhi19.js +14 -0
- package/build/server/chunks/chunks/snapshot.js-BekzL_He.js +38 -0
- package/build/server/chunks/chunks/spend.js-BabnR69T.js +63 -0
- package/build/server/chunks/chunks/src.js-Cm8RAH_q.js +609 -0
- package/build/server/chunks/chunks/src2.js-CV8tsClO.js +1186 -0
- package/build/server/chunks/chunks/src3.js-h9tTEbVb.js +11222 -0
- package/build/server/chunks/chunks/stack.js-CMWXhMZS.js +13 -0
- package/build/server/chunks/chunks/standup.js-D-qBnMx4.js +103 -0
- package/build/server/chunks/chunks/state.js-BTDrgu7s.js +71 -0
- package/build/server/chunks/chunks/stream.js-D6r6iqjD.js +66 -0
- package/build/server/chunks/chunks/terms.js-DPZztSEn.js +88 -0
- package/build/server/chunks/chunks/ticket-system.js-Dj9R3XJw.js +147 -0
- package/build/server/chunks/chunks/ticket.js-6sj-2ZEM.js +110 -0
- package/build/server/chunks/chunks/timesheet.js-DfhIokoE.js +212 -0
- package/build/server/chunks/chunks/timesheet2.js-Cu95ddl3.js +84 -0
- package/build/server/chunks/chunks/to-workspace.js-DiOJP59J.js +308 -0
- package/build/server/chunks/chunks/toast-stack.svelte.js-CXIg3_KT.js +10 -0
- package/build/server/chunks/chunks/uneval.js-VnZcgzZr.js +488 -0
- package/build/server/chunks/chunks/utils.js-DQTBh7_6.js +1006 -0
- package/build/server/chunks/chunks/when-said.js-0F9asAma.js +35 -0
- package/build/server/chunks/chunks/workspace.js-BBdJRon9.js +212 -0
- package/build/server/chunks/entries/endpoints/api/board/_server.ts.js-BlYC_lpV.js +69 -0
- package/build/server/chunks/entries/endpoints/api/board/minimize/_server.ts.js-Wddt9YPR.js +68 -0
- package/build/server/chunks/entries/endpoints/api/board/move/_server.ts.js-BwZpCKx0.js +68 -0
- package/build/server/chunks/entries/endpoints/api/board/promote/_server.ts.js-Cw6kvkMq.js +68 -0
- package/build/server/chunks/entries/endpoints/api/board/pulls/_server.ts.js-DFhpbiMo.js +71 -0
- package/build/server/chunks/entries/endpoints/api/board/stop/_server.ts.js-D5eylDMw.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/answer/_server.ts.js-CG8xh52y.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/branch/_server.ts.js-a5_P9voA.js +40 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/chain/_server.ts.js-tJvQy6RK.js +70 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/checkouts/_server.ts.js-B2_gx6vF.js +41 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/choice/_server.ts.js-pmAdIQkK.js +34 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_id_/_server.ts.js-C5NxGWw3.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_server.ts.js-0rw7UNv8.js +64 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/commit/_server.ts.js-_yXWCOlQ.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/commit-diff/_server.ts.js-CRPV3z-g.js +61 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/commit-message/_server.ts.js-CO9mD3u6.js +82 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/context/_server.ts.js-7kzrigFz.js +42 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/delete/_server.ts.js-DH0nO9wG.js +516 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/file/_server.ts.js-D80SvJDi.js +35 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/files/_...path_/_server.ts.js-GxFjb2H0.js +34 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/fix/_server.ts.js-B-HAB050.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/knowledge/_server.ts.js-D4fN-j7X.js +81 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/link/_other_/_server.ts.js-C00pQDCu.js +42 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/log/_server.ts.js-BXW_tG-I.js +32 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/log/raw/_server.ts.js-pT8StZGR.js +32 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/message/_server.ts.js-ZMno2Hu6.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/models/_server.ts.js-DEZVpqO3.js +73 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/patch/_server.ts.js-BxfLi-Zs.js +61 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/peek/_server.ts.js-CsTKWIP_.js +169 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/_server.ts.js-CsOeAXkf.js +53 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/comments/_server.ts.js-DZ2XHOhF.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discuss/_server.ts.js-CO8eM0e8.js +72 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discussions/_server.ts.js-Lp7l0Yqv.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix/_server.ts.js-CeIhjpQ4.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix-all/_server.ts.js-D-DKoCpQ.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/links/_server.ts.js-B_q3jUP3.js +72 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/qa/_server.ts.js-BulVcJY9.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/seen/_server.ts.js-Z06A6MS1.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pr/triage/_server.ts.js-qADU4URF.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/pull/_server.ts.js-CHnTH9WK.js +58 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/push/_server.ts.js-BPdPwPo2.js +83 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/repos/_server.ts.js-Bjqa3Uoo.js +73 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/research/_server.ts.js-DzQjoHOZ.js +138 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/retry/_server.ts.js-CAodrXqd.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/send-back/_server.ts.js-CmJSnvTx.js +68 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/stack/_server.ts.js-DjI8S94J.js +82 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/tasks/_server.ts.js-BzX_nNJk.js +71 -0
- package/build/server/chunks/entries/endpoints/api/card/_key_/thread/_server.ts.js-Dn36Guxk.js +33 -0
- package/build/server/chunks/entries/endpoints/api/cards/_server.ts.js-DPMOBsvp.js +77 -0
- package/build/server/chunks/entries/endpoints/api/cards/context/_server.ts.js-D6y-g2O-.js +52 -0
- package/build/server/chunks/entries/endpoints/api/cards/next/_server.ts.js-C2se67rf.js +55 -0
- package/build/server/chunks/entries/endpoints/api/chain/_server.ts.js-DKO5Q8GV.js +70 -0
- package/build/server/chunks/entries/endpoints/api/clones/_server.ts.js-Bgcc_Beg.js +56 -0
- package/build/server/chunks/entries/endpoints/api/current-project/_server.ts.js-DZCtSlXs.js +81 -0
- package/build/server/chunks/entries/endpoints/api/evidence/timesheet/_server.ts.js-xJwzSrcl.js +32 -0
- package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-BdcE7k8S.js +83 -0
- package/build/server/chunks/entries/endpoints/api/gh/_server.ts.js-CGvM8fn7.js +66 -0
- package/build/server/chunks/entries/endpoints/api/gh/name/_server.ts.js-CHh3tAu7.js +36 -0
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-DLUfrHo6.js +22 -0
- package/build/server/chunks/entries/endpoints/api/login-item/_server.ts.js-Cya7S7W6.js +77 -0
- package/build/server/chunks/entries/endpoints/api/notes/_server.ts.js-DaUFVqSM.js +26 -0
- package/build/server/chunks/entries/endpoints/api/notifications/_server.ts.js-DK6NFnII.js +76 -0
- package/build/server/chunks/entries/endpoints/api/now/_server.ts.js-xW0jeJdy.js +83 -0
- package/build/server/chunks/entries/endpoints/api/package/entry/_server.ts.js-DQyZanpo.js +35 -0
- package/build/server/chunks/entries/endpoints/api/projects/_server.ts.js-CzXJTj_l.js +58 -0
- package/build/server/chunks/entries/endpoints/api/qa-setup/_server.ts.js-DujrYbEP.js +76 -0
- package/build/server/chunks/entries/endpoints/api/remove-check/_server.ts.js-1KAi9LDi.js +58 -0
- package/build/server/chunks/entries/endpoints/api/setup/_server.ts.js-D0MKtjR7.js +69 -0
- package/build/server/chunks/entries/endpoints/api/tickets/jira/_server.ts.js-Z2LdOr5l.js +39 -0
- package/build/server/chunks/entries/endpoints/api/tickets/read/_server.ts.js-BziHtc8Y.js +68 -0
- package/build/server/chunks/entries/endpoints/api/tools/_server.ts.js-oyvq8i1y.js +30 -0
- package/build/server/chunks/entries/endpoints/api/workspace/_server.ts.js-CMGBL5cX.js +58 -0
- package/build/server/chunks/entries/endpoints/api/workspace/commit/_server.ts.js-BZQQJ1YG.js +66 -0
- package/build/server/chunks/entries/endpoints/api/workspace/patch/_server.ts.js-xrjgHECx.js +64 -0
- package/build/server/chunks/entries/endpoints/api/workspace/push/_server.ts.js-CTdia7Uz.js +66 -0
- package/build/server/chunks/entries/hooks.server.js-B0jE-ELC.js +211 -0
- package/build/server/chunks/entries/pages/_error.svelte.js-DPcKI5sX.js +25 -0
- package/build/server/chunks/entries/pages/_layout.server.ts.js-Jj3i2Th9.js +134 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-Cu3ghN80.js +1251 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-DEYydBCm.js +662 -0
- package/build/server/chunks/entries/pages/accept/_page.server.ts.js-BF7MrA5s.js +29 -0
- package/build/server/chunks/entries/pages/accept/_page.svelte.js-8yPsedd-.js +54 -0
- package/build/server/chunks/entries/pages/b/_board_/_page.svelte.js-S9acLF3f.js +68 -0
- package/build/server/chunks/entries/pages/b/_board_/_page.ts.js-BcKdG_Tp.js +21 -0
- package/build/server/chunks/entries/pages/b/research/_page.svelte.js-FW6Hw9g5.js +68 -0
- package/build/server/chunks/entries/pages/b/research/_page.ts.js-Ds2AjFFK.js +13 -0
- package/build/server/chunks/entries/pages/evidence/_page.server.ts.js-uwu2X7bA.js +1382 -0
- package/build/server/chunks/entries/pages/evidence/_page.svelte.js-DBCjiT59.js +594 -0
- package/build/server/chunks/entries/pages/f/_...path_/_page.svelte.js-DxwJaJzh.js +58 -0
- package/build/server/chunks/entries/pages/knowledge/_page.server.ts.js-BAUvFEcM.js +80 -0
- package/build/server/chunks/entries/pages/knowledge/_page.svelte.js-D9117gHM.js +732 -0
- package/build/server/chunks/entries/pages/new/_page.server.ts.js-BNCQQpyw.js +110 -0
- package/build/server/chunks/entries/pages/new/_page.svelte.js-Ben8-N_h.js +503 -0
- package/build/server/chunks/entries/pages/new/idea/_page.server.ts.js-jssA29y3.js +46 -0
- package/build/server/chunks/entries/pages/new/idea/_page.svelte.js-XoKspqAc.js +210 -0
- package/build/server/chunks/entries/pages/new/task/_page.server.ts.js-CmZgfvyt.js +66 -0
- package/build/server/chunks/entries/pages/new/task/_page.svelte.js-BKpERKvm.js +169 -0
- package/build/server/chunks/entries/pages/onboard/_page.server.ts.js-pmc_pXvs.js +12 -0
- package/build/server/chunks/entries/pages/onboard/_page.svelte.js-C7LNK-ba.js +5 -0
- package/build/server/chunks/entries/pages/projects/_page.server.ts.js-BEhLRfJ_.js +12 -0
- package/build/server/chunks/entries/pages/projects/_page.svelte.js-OraOjsyb.js +5 -0
- package/build/server/chunks/entries/pages/scout/_page.server.ts.js-hQYnMHwY.js +10 -0
- package/build/server/chunks/entries/pages/scout/_page.svelte.js-7q4d044Z.js +40 -0
- package/build/server/chunks/entries/pages/scout/f/_id_/_page.server.ts.js-BN4TnSpB.js +22 -0
- package/build/server/chunks/entries/pages/scout/f/_id_/_page.svelte.js-GzpLhARi.js +40 -0
- package/build/server/chunks/entries/pages/settings/_layout.server.ts.js-B5LgqMMT.js +12 -0
- package/build/server/chunks/entries/pages/settings/_layout.svelte.js-CSCpV6qA.js +81 -0
- package/build/server/chunks/entries/pages/settings/_page.svelte.js-DNpsNFo0.js +25 -0
- package/build/server/chunks/entries/pages/settings/_section_/_page.server.ts.js-nRDEV3i_.js +348 -0
- package/build/server/chunks/entries/pages/settings/_section_/_page.svelte.js-BihUf-nY.js +1052 -0
- package/build/server/chunks/entries/pages/settings/integrations/_page.server.ts.js-BTuRpg8m.js +58 -0
- package/build/server/chunks/entries/pages/settings/integrations/_page.svelte.js-C8i8ZmZR.js +161 -0
- package/build/server/chunks/entries/pages/settings/mcp/_page.server.ts.js-TFISfO1a.js +925 -0
- package/build/server/chunks/entries/pages/settings/mcp/_page.svelte.js-D1X0TNOm.js +433 -0
- package/build/server/chunks/entries/pages/settings/phases/_page.server.ts.js-CgK7MTZf.js +48 -0
- package/build/server/chunks/entries/pages/settings/phases/_page.svelte.js-u-sTQ-ue.js +80 -0
- package/build/server/chunks/entries/pages/settings/project/_page.server.ts.js-CCnk9WbO.js +363 -0
- package/build/server/chunks/entries/pages/settings/project/_page.svelte.js-MxvNqYlQ.js +1269 -0
- package/build/server/chunks/entries/pages/settings/wall/_page.server.ts.js-Bt5siY_N.js +12 -0
- package/build/server/chunks/entries/pages/settings/wall/_page.svelte.js-CMR4zSAt.js +43 -0
- package/build/server/chunks/entries/pages/t/_key_/_layout.server.ts.js-W6YPvOCA.js +124 -0
- package/build/server/chunks/entries/pages/t/_key_/_layout.svelte.js-CK0PiWsz.js +543 -0
- package/build/server/chunks/entries/pages/t/_key_/_page.server.ts.js-CdB7v0WX.js +15 -0
- package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.server.ts.js-Bksaje8R.js +75 -0
- package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.svelte.js-9OQ2eQxu.js +4607 -0
- package/build/server/chunks/entries/pages/team/_page.svelte.js-BdUSXC04.js +18 -0
- package/build/server/chunks/entries/pages/team/_page.ts.js-DfhJmoZI.js +20 -0
- package/build/server/chunks/entries/pages/workspace/_page.svelte.js-DLaWe23r.js +579 -0
- package/build/server/chunks/handler-Dlwmumt5.js +1735 -0
- package/build/server/chunks/index.js-BX0fZD5G.js +3701 -0
- package/build/server/chunks/manifest.js-B2Of6Dj7.js +761 -0
- package/build/server/chunks/nodes/0.js-DSzhdY0D.js +87 -0
- package/build/server/chunks/nodes/1.js-j4osL1br.js +9 -0
- package/build/server/chunks/nodes/10.js-jkvevEFY.js +75 -0
- package/build/server/chunks/nodes/11.js-plyiDP2n.js +72 -0
- package/build/server/chunks/nodes/12.js-DwtvDAyM.js +78 -0
- package/build/server/chunks/nodes/13.js-BpxwqFh4.js +72 -0
- package/build/server/chunks/nodes/14.js-B5iNIKGy.js +15 -0
- package/build/server/chunks/nodes/15.js-CXCAqUsG.js +15 -0
- package/build/server/chunks/nodes/16.js-oxkLEH0n.js +76 -0
- package/build/server/chunks/nodes/17.js-B-ZJEo9K.js +76 -0
- package/build/server/chunks/nodes/18.js-C0OUCEux.js +9 -0
- package/build/server/chunks/nodes/19.js-M8EAQJdW.js +76 -0
- package/build/server/chunks/nodes/2.js-ZedduK-3.js +33 -0
- package/build/server/chunks/nodes/20.js-BHvsLNjD.js +72 -0
- package/build/server/chunks/nodes/21.js-eOaW4si1.js +76 -0
- package/build/server/chunks/nodes/22.js-CbJ6tQSs.js +38 -0
- package/build/server/chunks/nodes/23.js-DXk8ejlx.js +81 -0
- package/build/server/chunks/nodes/24.js-C4qGJc4X.js +33 -0
- package/build/server/chunks/nodes/25.js-Cal8uT5V.js +21 -0
- package/build/server/chunks/nodes/26.js-Cp5jBcrN.js +80 -0
- package/build/server/chunks/nodes/27.js-Do55o_cb.js +17 -0
- package/build/server/chunks/nodes/28.js-SNz3QVix.js +9 -0
- package/build/server/chunks/nodes/3.js-DyivQ5dN.js +75 -0
- package/build/server/chunks/nodes/4.js-BGgTTQFR.js +9 -0
- package/build/server/chunks/nodes/5.js-DQYA2BBI.js +31 -0
- package/build/server/chunks/nodes/6.js-BVTi2KFL.js +24 -0
- package/build/server/chunks/nodes/7.js-CnprIn3p.js +12 -0
- package/build/server/chunks/nodes/8.js-Bdicn369.js +50 -0
- package/build/server/chunks/nodes/9.js-DVclPGXf.js +9 -0
- package/build/shims.js +33 -0
- package/dist/THIRD-PARTY-NOTICES.md +659 -0
- package/dist/detect-BmI_gskA.js +585 -0
- package/dist/fonts/OFL.txt +92 -0
- package/dist/nolzu.js +48 -0
- package/dist/package-vezZOzhD.js +181 -0
- package/dist/shared/finish.md +110 -0
- package/dist/shared/knowledge.md +72 -0
- package/dist/shared/verdict.md +42 -0
- package/dist/skills/.gitkeep +0 -0
- package/dist/skills/nolzu-architecture/SKILL.md +140 -0
- package/dist/skills/nolzu-architecture/finish.md +110 -0
- package/dist/skills/nolzu-assess/SKILL.md +99 -0
- package/dist/skills/nolzu-assess/finish.md +110 -0
- package/dist/skills/nolzu-design/SKILL.md +115 -0
- package/dist/skills/nolzu-design/finish.md +110 -0
- package/dist/skills/nolzu-feedback/SKILL.md +107 -0
- package/dist/skills/nolzu-feedback/finish.md +110 -0
- package/dist/skills/nolzu-implement/SKILL.md +138 -0
- package/dist/skills/nolzu-implement/finish.md +110 -0
- package/dist/skills/nolzu-investigate/SKILL.md +139 -0
- package/dist/skills/nolzu-investigate/finish.md +110 -0
- package/dist/skills/nolzu-learn-repo/SKILL.md +115 -0
- package/dist/skills/nolzu-learn-repo/finish.md +110 -0
- package/dist/skills/nolzu-learn-repo/knowledge.md +72 -0
- package/dist/skills/nolzu-optimize/SKILL.md +82 -0
- package/dist/skills/nolzu-optimize/finish.md +110 -0
- package/dist/skills/nolzu-optimize/knowledge.md +72 -0
- package/dist/skills/nolzu-orient/SKILL.md +115 -0
- package/dist/skills/nolzu-orient/finish.md +110 -0
- package/dist/skills/nolzu-orient/knowledge.md +72 -0
- package/dist/skills/nolzu-plan/SKILL.md +165 -0
- package/dist/skills/nolzu-plan/finish.md +110 -0
- package/dist/skills/nolzu-pr-review/SKILL.md +150 -0
- package/dist/skills/nolzu-pr-review/finish.md +110 -0
- package/dist/skills/nolzu-qa/SKILL.md +177 -0
- package/dist/skills/nolzu-qa/finish.md +110 -0
- package/dist/skills/nolzu-qa/verdict.md +42 -0
- package/dist/skills/nolzu-refine/SKILL.md +145 -0
- package/dist/skills/nolzu-refine/finish.md +110 -0
- package/dist/skills/nolzu-research/SKILL.md +140 -0
- package/dist/skills/nolzu-research/finish.md +110 -0
- package/dist/skills/nolzu-wrapup/SKILL.md +126 -0
- package/dist/skills/nolzu-wrapup/finish.md +110 -0
- package/dist/skills/nolzu-wrapup/knowledge.md +72 -0
- package/dist/src-BG8LaXLS.js +723 -0
- package/dist/src-DPfcvRqs.js +4 -0
- package/dist/start-ItZOcBtM.js +362 -0
- package/package.json +49 -9
- package/bin/nolzu.js +0 -8
|
@@ -0,0 +1,2484 @@
|
|
|
1
|
+
import { D as DEFAULT_PROFILE, i as isEngineName, a as isProfileId, e as effortInId, m as missingProfileText, b as ENGINE_NAMES } from './engine.js-DS5zUwsE.js';
|
|
2
|
+
import { i as isBoardKind, a as isResearchKind, B as BOARD_LABELS, b as isPass, p as phaseLabel, R as RESEARCH_KINDS, c as RESEARCH_PREFIXES } from './board.js-BxL3CjB1.js';
|
|
3
|
+
import { r as reportedCost, f as formatCost } from './spend.js-BabnR69T.js';
|
|
4
|
+
import { r as readProjectList } from './src.js-Cm8RAH_q.js';
|
|
5
|
+
|
|
6
|
+
var minutes = (ms) => Math.max(1, Math.round(ms / 6e4));
|
|
7
|
+
function timeText(estimate) {
|
|
8
|
+
const low = minutes(estimate.lowMs);
|
|
9
|
+
const high = Math.max(low, minutes(estimate.highMs));
|
|
10
|
+
return estimate.highMs < 6e4 ? "under a minute" : low === high ? `${low} min` : `${low} to ${high} min`;
|
|
11
|
+
}
|
|
12
|
+
var costText = (usd) => usd < .01 ? "under $0.01" : `about ${formatCost(usd)}`;
|
|
13
|
+
function estimateText(estimate) {
|
|
14
|
+
const time = timeText(estimate);
|
|
15
|
+
return estimate.costUsd === null ? time : `${costText(estimate.costUsd)} · ${time}`;
|
|
16
|
+
}
|
|
17
|
+
function learnEstimateText(starts) {
|
|
18
|
+
if (starts.estimate !== void 0) return `${estimateText(starts.estimate)} per repository, ${estimateFrom(starts.estimate)}.`;
|
|
19
|
+
if (starts.like !== void 0) return `No Learn run measured yet. A Refine run on this model and effort is ${estimateText(starts.like)}, and a Learn run reads more files, so expect more per repository.`;
|
|
20
|
+
return "No estimate yet: this project has no measured run of this kind.";
|
|
21
|
+
}
|
|
22
|
+
function estimateShort(estimate) {
|
|
23
|
+
return estimate.costUsd === null ? timeText(estimate) : costText(estimate.costUsd);
|
|
24
|
+
}
|
|
25
|
+
function estimateBrief(estimate) {
|
|
26
|
+
if (estimate.costUsd === null) return timeText(estimate);
|
|
27
|
+
return estimate.costUsd < .01 ? costText(estimate.costUsd) : `~${formatCost(estimate.costUsd)}`;
|
|
28
|
+
}
|
|
29
|
+
function estimateFrom(estimate) {
|
|
30
|
+
return estimate.from === "history" ? `from ${estimate.runs} runs in this project` : `from the preset, until this project has 5 runs of this phase on this model and effort`;
|
|
31
|
+
}
|
|
32
|
+
function estimateSum(first, second) {
|
|
33
|
+
if (first === void 0 || second === void 0) return void 0;
|
|
34
|
+
return {
|
|
35
|
+
costUsd: first.costUsd === null || second.costUsd === null ? null : first.costUsd + second.costUsd,
|
|
36
|
+
lowMs: first.lowMs + second.lowMs,
|
|
37
|
+
highMs: first.highMs + second.highMs,
|
|
38
|
+
from: first.from === "history" && second.from === "history" ? "history" : "preset",
|
|
39
|
+
runs: Math.min(first.runs, second.runs)
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region ../../packages/protocol/src/setup.ts
|
|
44
|
+
/**
|
|
45
|
+
* Set up the project (T39): the steps the app owns, per project, as pure rules the server and the
|
|
46
|
+
* screens share.
|
|
47
|
+
*
|
|
48
|
+
* A step is required, recommended or optional. The banner on the boards and on Now shows each open
|
|
49
|
+
* required and recommended step, the first task screen lists every step, and the one required step holds the
|
|
50
|
+
* first run back until it is done or the person says they will write it themselves.
|
|
51
|
+
*/
|
|
52
|
+
var SETUP_STEPS = [
|
|
53
|
+
"learn",
|
|
54
|
+
"commands",
|
|
55
|
+
"qa",
|
|
56
|
+
"tickets"
|
|
57
|
+
];
|
|
58
|
+
var SETUP_MARKS = [
|
|
59
|
+
"done",
|
|
60
|
+
"self",
|
|
61
|
+
"dismissed"
|
|
62
|
+
];
|
|
63
|
+
var WRITE_IT_MYSELF = "Runs will not know what each repository is for or how to install, run and test it until you write that in Knowledge, in the repository.md of each repository and in run-recipe.md.";
|
|
64
|
+
var STEPS = [
|
|
65
|
+
{
|
|
66
|
+
id: "learn",
|
|
67
|
+
need: "required",
|
|
68
|
+
title: "Learn your repositories",
|
|
69
|
+
says: "An agent reads each README, CI and stack file and writes how to run, test and build it, and the rules the code keeps, for your review.",
|
|
70
|
+
go: "Learn on Knowledge"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "commands",
|
|
74
|
+
need: "recommended",
|
|
75
|
+
title: "Confirm the run commands",
|
|
76
|
+
says: "The commands Implement and QA may run, read from your repositories. Check the list once.",
|
|
77
|
+
go: "Check the list"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "qa",
|
|
81
|
+
need: "recommended",
|
|
82
|
+
title: "Set up the QA browser",
|
|
83
|
+
says: "Lets QA open your app in Chrome and take screenshots of what changed.",
|
|
84
|
+
go: "Set it up"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "tickets",
|
|
88
|
+
need: "optional",
|
|
89
|
+
title: "Connect a ticket system",
|
|
90
|
+
says: "Read cards from Jira. Cards made in Nolzu work without it.",
|
|
91
|
+
go: "Open Tickets"
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
function stateOf(need, mark, fact) {
|
|
95
|
+
if (fact || mark === "done" || mark === "self") return "done";
|
|
96
|
+
return mark === "dismissed" && need !== "required" ? "dismissed" : "open";
|
|
97
|
+
}
|
|
98
|
+
function setupSteps(facts) {
|
|
99
|
+
const fact = {
|
|
100
|
+
learn: facts.learned,
|
|
101
|
+
commands: false,
|
|
102
|
+
qa: facts.browser,
|
|
103
|
+
tickets: facts.tickets
|
|
104
|
+
};
|
|
105
|
+
return STEPS.map((step) => ({
|
|
106
|
+
...step,
|
|
107
|
+
state: stateOf(step.need, facts.marks[step.id], fact[step.id])
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
function bannerSteps(steps) {
|
|
111
|
+
return steps.filter((step) => step.need !== "optional" && step.state === "open");
|
|
112
|
+
}
|
|
113
|
+
var learnGates = (steps, started) => !started && steps.some((step) => step.id === "learn" && step.state === "open");
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region ../../packages/core/src/phase-policy.ts
|
|
116
|
+
var CHANGE_TOOLS = ["Bash"];
|
|
117
|
+
var READ_AND_SEARCH = [
|
|
118
|
+
"Read",
|
|
119
|
+
"Grep",
|
|
120
|
+
"Glob"
|
|
121
|
+
];
|
|
122
|
+
var READ_AND_NOTE = [
|
|
123
|
+
...READ_AND_SEARCH,
|
|
124
|
+
"Write",
|
|
125
|
+
"Edit"
|
|
126
|
+
];
|
|
127
|
+
var READ_GIT_COMMANDS = [
|
|
128
|
+
"git diff",
|
|
129
|
+
"git diff *",
|
|
130
|
+
"git status",
|
|
131
|
+
"git status *",
|
|
132
|
+
"git log",
|
|
133
|
+
"git log *",
|
|
134
|
+
"git show *"
|
|
135
|
+
];
|
|
136
|
+
var PHASE_POLICIES = {
|
|
137
|
+
refine: {
|
|
138
|
+
tools: READ_AND_NOTE,
|
|
139
|
+
readOnly: true
|
|
140
|
+
},
|
|
141
|
+
plan: {
|
|
142
|
+
tools: READ_AND_NOTE,
|
|
143
|
+
readOnly: true
|
|
144
|
+
},
|
|
145
|
+
implement: {
|
|
146
|
+
tools: [...READ_AND_NOTE, ...CHANGE_TOOLS],
|
|
147
|
+
readOnly: false
|
|
148
|
+
},
|
|
149
|
+
qa: {
|
|
150
|
+
tools: [...READ_AND_NOTE, "Bash"],
|
|
151
|
+
readOnly: true,
|
|
152
|
+
commands: true,
|
|
153
|
+
readGit: true
|
|
154
|
+
},
|
|
155
|
+
wrapup: {
|
|
156
|
+
tools: READ_AND_NOTE,
|
|
157
|
+
readOnly: true,
|
|
158
|
+
knowledge: true
|
|
159
|
+
},
|
|
160
|
+
optimize: {
|
|
161
|
+
tools: READ_AND_NOTE,
|
|
162
|
+
readOnly: true,
|
|
163
|
+
knowledge: true
|
|
164
|
+
},
|
|
165
|
+
orient: {
|
|
166
|
+
tools: READ_AND_NOTE,
|
|
167
|
+
readOnly: true,
|
|
168
|
+
knowledge: true,
|
|
169
|
+
alwaysHeld: true
|
|
170
|
+
},
|
|
171
|
+
"learn-repo": {
|
|
172
|
+
tools: READ_AND_NOTE,
|
|
173
|
+
readOnly: true,
|
|
174
|
+
knowledge: true,
|
|
175
|
+
alwaysHeld: true
|
|
176
|
+
},
|
|
177
|
+
architecture: {
|
|
178
|
+
tools: READ_AND_NOTE,
|
|
179
|
+
readOnly: true
|
|
180
|
+
},
|
|
181
|
+
design: {
|
|
182
|
+
tools: READ_AND_NOTE,
|
|
183
|
+
readOnly: true
|
|
184
|
+
},
|
|
185
|
+
investigate: {
|
|
186
|
+
tools: READ_AND_NOTE,
|
|
187
|
+
readOnly: true
|
|
188
|
+
},
|
|
189
|
+
research: {
|
|
190
|
+
tools: READ_AND_NOTE,
|
|
191
|
+
readOnly: true
|
|
192
|
+
},
|
|
193
|
+
"pr-review": {
|
|
194
|
+
tools: READ_AND_NOTE,
|
|
195
|
+
readOnly: true
|
|
196
|
+
},
|
|
197
|
+
feedback: {
|
|
198
|
+
tools: READ_AND_NOTE,
|
|
199
|
+
readOnly: true
|
|
200
|
+
},
|
|
201
|
+
assess: {
|
|
202
|
+
tools: READ_AND_NOTE,
|
|
203
|
+
readOnly: true
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
var EXTRACT_SUMMARY_POLICY = {
|
|
207
|
+
tools: ["Read"],
|
|
208
|
+
readOnly: true
|
|
209
|
+
};
|
|
210
|
+
var ASK_POLICY = {
|
|
211
|
+
tools: READ_AND_SEARCH,
|
|
212
|
+
readOnly: true
|
|
213
|
+
};
|
|
214
|
+
var RUNS_OUTSIDE_GIT = ["claude-code"];
|
|
215
|
+
/**
|
|
216
|
+
* Why this vendor cannot run this phase here, or null when it can.
|
|
217
|
+
*
|
|
218
|
+
* It lives here rather than in each spawn function, because the screen that offers a phase on
|
|
219
|
+
* another profile has to read the same rule the spawn enforces. An offer the spawn would refuse
|
|
220
|
+
* costs the person a click and a card that fails for a reason nobody could see coming.
|
|
221
|
+
*
|
|
222
|
+
* Where the wall starts, every engine runs every phase. Where it cannot, Claude Code still runs
|
|
223
|
+
* every phase under its guard, Codex runs every phase under its own sandbox, and Cursor runs
|
|
224
|
+
* Implement only. The sentence names the check that failed.
|
|
225
|
+
*/
|
|
226
|
+
function vendorRefusal(vendor, phase, place) {
|
|
227
|
+
if (place.outsideGit && !RUNS_OUTSIDE_GIT.includes(vendor)) return "The project folder is not a git repository, and Claude Code is the one engine known to run in a folder like that. Run this phase on a Claude Code profile.";
|
|
228
|
+
if (place.wall.ready) return null;
|
|
229
|
+
const policy = policyFor(phase);
|
|
230
|
+
const missing = place.wall.reason;
|
|
231
|
+
if (vendor === "cursor" && policy.readOnly) return `The ${phaseLabel(phase)} phase may not change the project, and only Nolzu's wall holds Cursor to reading, because a run in plan mode can write. The wall cannot start here. ${missing} Until then, run this phase on a Claude Code profile.`;
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* True when this vendor runs this phase from the card folder instead of the card's checkout.
|
|
236
|
+
*
|
|
237
|
+
* Only Codex under its own sandbox does. Codex has no read-only mode that leaves the card folder
|
|
238
|
+
* writable: `-s read-only` refuses every write. Starting in the card folder under
|
|
239
|
+
* `-s workspace-write` gives the same limit from the other side, because the sandbox makes the
|
|
240
|
+
* working folder the writable area and the project lies outside it. Measured on 2026-09-26 and
|
|
241
|
+
* written up in `docs/engines/codex.md`. The runs that write knowledge add the knowledge folder as a
|
|
242
|
+
* writable root. QA runs the project's own checks, which write caches, so it starts in its throwaway
|
|
243
|
+
* copy instead, with the card folder added.
|
|
244
|
+
*
|
|
245
|
+
* `ownSandbox` is `ownSandbox` in the runner: the Codex row of `ENGINE_WALLS`, or a wall that cannot
|
|
246
|
+
* start on this machine. While it is false, Codex runs inside Nolzu's wall like every other engine,
|
|
247
|
+
* the wall makes the card folder writable, and every phase starts in the checkout.
|
|
248
|
+
*
|
|
249
|
+
* The prompt and the spawn both read this, because the paths the prompt names are relative to the
|
|
250
|
+
* folder the process starts in. A resume reads where its session started instead, so a run made
|
|
251
|
+
* under the other setting still resumes in its own folder. The summary pass writes nothing, so it
|
|
252
|
+
* keeps the read-only sandbox in the checkout.
|
|
253
|
+
*/
|
|
254
|
+
function startsInCardFolder(vendor, phase, ownSandbox) {
|
|
255
|
+
if (vendor !== "codex" || !ownSandbox) return false;
|
|
256
|
+
const policy = policyFor(phase);
|
|
257
|
+
if (policy.commands === true) return false;
|
|
258
|
+
return policy.readOnly && policy.tools.some((tool) => tool === "Write" || tool === "Edit");
|
|
259
|
+
}
|
|
260
|
+
/** The policy a phase runs under. */
|
|
261
|
+
function policyFor(phase) {
|
|
262
|
+
if (isPass(phase)) return EXTRACT_SUMMARY_POLICY;
|
|
263
|
+
if (phase === "ask") return ASK_POLICY;
|
|
264
|
+
const row = Object.hasOwn(PHASE_POLICIES, phase) ? PHASE_POLICIES[phase] : void 0;
|
|
265
|
+
if (row === void 0) throw new Error(`The phase ${JSON.stringify(phase)} has no row in PHASE_POLICIES. Add one there, rather than letting a run inherit write access.`);
|
|
266
|
+
return row;
|
|
267
|
+
}
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region ../../packages/core/src/models.ts
|
|
270
|
+
var PRESET_NAMES = [
|
|
271
|
+
"light",
|
|
272
|
+
"default",
|
|
273
|
+
"heavy"
|
|
274
|
+
];
|
|
275
|
+
var ACTIONS = [
|
|
276
|
+
"refine",
|
|
277
|
+
"plan",
|
|
278
|
+
"implement",
|
|
279
|
+
"qa",
|
|
280
|
+
"wrapup",
|
|
281
|
+
"architecture",
|
|
282
|
+
"design",
|
|
283
|
+
"investigate",
|
|
284
|
+
"research",
|
|
285
|
+
"pr-review",
|
|
286
|
+
"feedback",
|
|
287
|
+
"optimize",
|
|
288
|
+
"orient",
|
|
289
|
+
"learn-repo",
|
|
290
|
+
"assess",
|
|
291
|
+
"ask",
|
|
292
|
+
"extract-summary"
|
|
293
|
+
];
|
|
294
|
+
var refusedPhases = (vendor, wall) => ACTIONS.filter((action) => vendorRefusal(vendor, action, {
|
|
295
|
+
outsideGit: false,
|
|
296
|
+
wall
|
|
297
|
+
}) !== null);
|
|
298
|
+
var everyPhaseEngines = (wall) => ENGINE_NAMES.filter((vendor) => refusedPhases(vendor, wall).length === 0);
|
|
299
|
+
var CLAUDE_CODE = {
|
|
300
|
+
light: {
|
|
301
|
+
refine: {
|
|
302
|
+
model: "haiku",
|
|
303
|
+
effort: "low"
|
|
304
|
+
},
|
|
305
|
+
plan: {
|
|
306
|
+
model: "sonnet",
|
|
307
|
+
effort: "medium"
|
|
308
|
+
},
|
|
309
|
+
implement: {
|
|
310
|
+
model: "sonnet",
|
|
311
|
+
effort: "low"
|
|
312
|
+
},
|
|
313
|
+
qa: {
|
|
314
|
+
model: "sonnet",
|
|
315
|
+
effort: "low"
|
|
316
|
+
},
|
|
317
|
+
wrapup: {
|
|
318
|
+
model: "haiku",
|
|
319
|
+
effort: "low"
|
|
320
|
+
},
|
|
321
|
+
architecture: {
|
|
322
|
+
model: "sonnet",
|
|
323
|
+
effort: "medium"
|
|
324
|
+
},
|
|
325
|
+
design: {
|
|
326
|
+
model: "sonnet",
|
|
327
|
+
effort: "low"
|
|
328
|
+
},
|
|
329
|
+
investigate: {
|
|
330
|
+
model: "sonnet",
|
|
331
|
+
effort: "low"
|
|
332
|
+
},
|
|
333
|
+
research: {
|
|
334
|
+
model: "sonnet",
|
|
335
|
+
effort: "low"
|
|
336
|
+
},
|
|
337
|
+
"pr-review": {
|
|
338
|
+
model: "sonnet",
|
|
339
|
+
effort: "low"
|
|
340
|
+
},
|
|
341
|
+
feedback: {
|
|
342
|
+
model: "haiku",
|
|
343
|
+
effort: "low"
|
|
344
|
+
},
|
|
345
|
+
optimize: {
|
|
346
|
+
model: "haiku",
|
|
347
|
+
effort: "low"
|
|
348
|
+
},
|
|
349
|
+
orient: {
|
|
350
|
+
model: "haiku",
|
|
351
|
+
effort: "low"
|
|
352
|
+
},
|
|
353
|
+
"learn-repo": {
|
|
354
|
+
model: "haiku",
|
|
355
|
+
effort: "low"
|
|
356
|
+
},
|
|
357
|
+
assess: {
|
|
358
|
+
model: "haiku",
|
|
359
|
+
effort: "low"
|
|
360
|
+
},
|
|
361
|
+
ask: {
|
|
362
|
+
model: "haiku",
|
|
363
|
+
effort: "low"
|
|
364
|
+
},
|
|
365
|
+
"extract-summary": {
|
|
366
|
+
model: "sonnet",
|
|
367
|
+
effort: "low"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
default: {
|
|
371
|
+
refine: {
|
|
372
|
+
model: "haiku",
|
|
373
|
+
effort: "low"
|
|
374
|
+
},
|
|
375
|
+
plan: {
|
|
376
|
+
model: "sonnet",
|
|
377
|
+
effort: "medium"
|
|
378
|
+
},
|
|
379
|
+
implement: {
|
|
380
|
+
model: "sonnet",
|
|
381
|
+
effort: "medium"
|
|
382
|
+
},
|
|
383
|
+
qa: {
|
|
384
|
+
model: "sonnet",
|
|
385
|
+
effort: "medium"
|
|
386
|
+
},
|
|
387
|
+
wrapup: {
|
|
388
|
+
model: "sonnet",
|
|
389
|
+
effort: "low"
|
|
390
|
+
},
|
|
391
|
+
architecture: {
|
|
392
|
+
model: "sonnet",
|
|
393
|
+
effort: "medium"
|
|
394
|
+
},
|
|
395
|
+
design: {
|
|
396
|
+
model: "sonnet",
|
|
397
|
+
effort: "medium"
|
|
398
|
+
},
|
|
399
|
+
investigate: {
|
|
400
|
+
model: "sonnet",
|
|
401
|
+
effort: "medium"
|
|
402
|
+
},
|
|
403
|
+
research: {
|
|
404
|
+
model: "sonnet",
|
|
405
|
+
effort: "medium"
|
|
406
|
+
},
|
|
407
|
+
"pr-review": {
|
|
408
|
+
model: "sonnet",
|
|
409
|
+
effort: "medium"
|
|
410
|
+
},
|
|
411
|
+
feedback: {
|
|
412
|
+
model: "haiku",
|
|
413
|
+
effort: "low"
|
|
414
|
+
},
|
|
415
|
+
optimize: {
|
|
416
|
+
model: "sonnet",
|
|
417
|
+
effort: "low"
|
|
418
|
+
},
|
|
419
|
+
orient: {
|
|
420
|
+
model: "sonnet",
|
|
421
|
+
effort: "low"
|
|
422
|
+
},
|
|
423
|
+
"learn-repo": {
|
|
424
|
+
model: "haiku",
|
|
425
|
+
effort: "low"
|
|
426
|
+
},
|
|
427
|
+
assess: {
|
|
428
|
+
model: "haiku",
|
|
429
|
+
effort: "low"
|
|
430
|
+
},
|
|
431
|
+
ask: {
|
|
432
|
+
model: "haiku",
|
|
433
|
+
effort: "low"
|
|
434
|
+
},
|
|
435
|
+
"extract-summary": {
|
|
436
|
+
model: "sonnet",
|
|
437
|
+
effort: "low"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
heavy: {
|
|
441
|
+
refine: {
|
|
442
|
+
model: "sonnet",
|
|
443
|
+
effort: "medium"
|
|
444
|
+
},
|
|
445
|
+
plan: {
|
|
446
|
+
model: "opus",
|
|
447
|
+
effort: "high"
|
|
448
|
+
},
|
|
449
|
+
implement: {
|
|
450
|
+
model: "opus",
|
|
451
|
+
effort: "high"
|
|
452
|
+
},
|
|
453
|
+
qa: {
|
|
454
|
+
model: "opus",
|
|
455
|
+
effort: "high"
|
|
456
|
+
},
|
|
457
|
+
wrapup: {
|
|
458
|
+
model: "sonnet",
|
|
459
|
+
effort: "medium"
|
|
460
|
+
},
|
|
461
|
+
architecture: {
|
|
462
|
+
model: "opus",
|
|
463
|
+
effort: "high"
|
|
464
|
+
},
|
|
465
|
+
design: {
|
|
466
|
+
model: "opus",
|
|
467
|
+
effort: "high"
|
|
468
|
+
},
|
|
469
|
+
investigate: {
|
|
470
|
+
model: "opus",
|
|
471
|
+
effort: "high"
|
|
472
|
+
},
|
|
473
|
+
research: {
|
|
474
|
+
model: "opus",
|
|
475
|
+
effort: "high"
|
|
476
|
+
},
|
|
477
|
+
"pr-review": {
|
|
478
|
+
model: "opus",
|
|
479
|
+
effort: "high"
|
|
480
|
+
},
|
|
481
|
+
feedback: {
|
|
482
|
+
model: "sonnet",
|
|
483
|
+
effort: "low"
|
|
484
|
+
},
|
|
485
|
+
optimize: {
|
|
486
|
+
model: "sonnet",
|
|
487
|
+
effort: "medium"
|
|
488
|
+
},
|
|
489
|
+
orient: {
|
|
490
|
+
model: "sonnet",
|
|
491
|
+
effort: "medium"
|
|
492
|
+
},
|
|
493
|
+
"learn-repo": {
|
|
494
|
+
model: "haiku",
|
|
495
|
+
effort: "low"
|
|
496
|
+
},
|
|
497
|
+
assess: {
|
|
498
|
+
model: "sonnet",
|
|
499
|
+
effort: "medium"
|
|
500
|
+
},
|
|
501
|
+
ask: {
|
|
502
|
+
model: "haiku",
|
|
503
|
+
effort: "low"
|
|
504
|
+
},
|
|
505
|
+
"extract-summary": {
|
|
506
|
+
model: "sonnet",
|
|
507
|
+
effort: "low"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
/**
|
|
512
|
+
* The rows each vendor ships for the three built-in presets.
|
|
513
|
+
*
|
|
514
|
+
* Per vendor, because a model name means nothing under another one. A row moved to a Codex login
|
|
515
|
+
* with no model of its own used to fall through to a Claude alias, read as gone, and refuse the
|
|
516
|
+
* drop until somebody picked a model by hand.
|
|
517
|
+
*
|
|
518
|
+
* A built-in preset names no engine profile. It answers under the profile each row already has,
|
|
519
|
+
* which is how it keeps the rule that a built-in preset never carries somebody's second login onto
|
|
520
|
+
* a machine where that login is not configured.
|
|
521
|
+
*/
|
|
522
|
+
var PRESETS = {
|
|
523
|
+
"claude-code": CLAUDE_CODE,
|
|
524
|
+
codex: {
|
|
525
|
+
light: {
|
|
526
|
+
refine: {
|
|
527
|
+
model: "gpt-5.6-luna",
|
|
528
|
+
effort: "low"
|
|
529
|
+
},
|
|
530
|
+
plan: {
|
|
531
|
+
model: "gpt-5.6-terra",
|
|
532
|
+
effort: "medium"
|
|
533
|
+
},
|
|
534
|
+
implement: {
|
|
535
|
+
model: "gpt-5.6-terra",
|
|
536
|
+
effort: "low"
|
|
537
|
+
},
|
|
538
|
+
qa: {
|
|
539
|
+
model: "gpt-5.6-terra",
|
|
540
|
+
effort: "low"
|
|
541
|
+
},
|
|
542
|
+
wrapup: {
|
|
543
|
+
model: "gpt-5.6-luna",
|
|
544
|
+
effort: "low"
|
|
545
|
+
},
|
|
546
|
+
architecture: {
|
|
547
|
+
model: "gpt-5.6-terra",
|
|
548
|
+
effort: "medium"
|
|
549
|
+
},
|
|
550
|
+
design: {
|
|
551
|
+
model: "gpt-5.6-terra",
|
|
552
|
+
effort: "low"
|
|
553
|
+
},
|
|
554
|
+
investigate: {
|
|
555
|
+
model: "gpt-5.6-terra",
|
|
556
|
+
effort: "low"
|
|
557
|
+
},
|
|
558
|
+
research: {
|
|
559
|
+
model: "gpt-5.6-terra",
|
|
560
|
+
effort: "low"
|
|
561
|
+
},
|
|
562
|
+
"pr-review": {
|
|
563
|
+
model: "gpt-5.6-terra",
|
|
564
|
+
effort: "low"
|
|
565
|
+
},
|
|
566
|
+
feedback: {
|
|
567
|
+
model: "gpt-5.6-luna",
|
|
568
|
+
effort: "low"
|
|
569
|
+
},
|
|
570
|
+
optimize: {
|
|
571
|
+
model: "gpt-5.6-luna",
|
|
572
|
+
effort: "low"
|
|
573
|
+
},
|
|
574
|
+
orient: {
|
|
575
|
+
model: "gpt-5.6-luna",
|
|
576
|
+
effort: "low"
|
|
577
|
+
},
|
|
578
|
+
"learn-repo": {
|
|
579
|
+
model: "gpt-5.6-luna",
|
|
580
|
+
effort: "low"
|
|
581
|
+
},
|
|
582
|
+
assess: {
|
|
583
|
+
model: "gpt-5.6-luna",
|
|
584
|
+
effort: "low"
|
|
585
|
+
},
|
|
586
|
+
ask: {
|
|
587
|
+
model: "gpt-5.6-luna",
|
|
588
|
+
effort: "low"
|
|
589
|
+
},
|
|
590
|
+
"extract-summary": {
|
|
591
|
+
model: "gpt-5.6-terra",
|
|
592
|
+
effort: "low"
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
default: {
|
|
596
|
+
refine: {
|
|
597
|
+
model: "gpt-5.6-luna",
|
|
598
|
+
effort: "low"
|
|
599
|
+
},
|
|
600
|
+
plan: {
|
|
601
|
+
model: "gpt-5.6-terra",
|
|
602
|
+
effort: "medium"
|
|
603
|
+
},
|
|
604
|
+
implement: {
|
|
605
|
+
model: "gpt-5.6-terra",
|
|
606
|
+
effort: "medium"
|
|
607
|
+
},
|
|
608
|
+
qa: {
|
|
609
|
+
model: "gpt-5.6-terra",
|
|
610
|
+
effort: "medium"
|
|
611
|
+
},
|
|
612
|
+
wrapup: {
|
|
613
|
+
model: "gpt-5.6-terra",
|
|
614
|
+
effort: "low"
|
|
615
|
+
},
|
|
616
|
+
architecture: {
|
|
617
|
+
model: "gpt-5.6-terra",
|
|
618
|
+
effort: "medium"
|
|
619
|
+
},
|
|
620
|
+
design: {
|
|
621
|
+
model: "gpt-5.6-terra",
|
|
622
|
+
effort: "medium"
|
|
623
|
+
},
|
|
624
|
+
investigate: {
|
|
625
|
+
model: "gpt-5.6-terra",
|
|
626
|
+
effort: "medium"
|
|
627
|
+
},
|
|
628
|
+
research: {
|
|
629
|
+
model: "gpt-5.6-terra",
|
|
630
|
+
effort: "medium"
|
|
631
|
+
},
|
|
632
|
+
"pr-review": {
|
|
633
|
+
model: "gpt-5.6-terra",
|
|
634
|
+
effort: "medium"
|
|
635
|
+
},
|
|
636
|
+
feedback: {
|
|
637
|
+
model: "gpt-5.6-luna",
|
|
638
|
+
effort: "low"
|
|
639
|
+
},
|
|
640
|
+
optimize: {
|
|
641
|
+
model: "gpt-5.6-terra",
|
|
642
|
+
effort: "low"
|
|
643
|
+
},
|
|
644
|
+
orient: {
|
|
645
|
+
model: "gpt-5.6-terra",
|
|
646
|
+
effort: "low"
|
|
647
|
+
},
|
|
648
|
+
"learn-repo": {
|
|
649
|
+
model: "gpt-5.6-luna",
|
|
650
|
+
effort: "low"
|
|
651
|
+
},
|
|
652
|
+
assess: {
|
|
653
|
+
model: "gpt-5.6-luna",
|
|
654
|
+
effort: "low"
|
|
655
|
+
},
|
|
656
|
+
ask: {
|
|
657
|
+
model: "gpt-5.6-luna",
|
|
658
|
+
effort: "low"
|
|
659
|
+
},
|
|
660
|
+
"extract-summary": {
|
|
661
|
+
model: "gpt-5.6-terra",
|
|
662
|
+
effort: "low"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
heavy: {
|
|
666
|
+
refine: {
|
|
667
|
+
model: "gpt-5.6-terra",
|
|
668
|
+
effort: "medium"
|
|
669
|
+
},
|
|
670
|
+
plan: {
|
|
671
|
+
model: "gpt-5.6-sol",
|
|
672
|
+
effort: "high"
|
|
673
|
+
},
|
|
674
|
+
implement: {
|
|
675
|
+
model: "gpt-5.6-sol",
|
|
676
|
+
effort: "high"
|
|
677
|
+
},
|
|
678
|
+
qa: {
|
|
679
|
+
model: "gpt-5.6-sol",
|
|
680
|
+
effort: "high"
|
|
681
|
+
},
|
|
682
|
+
wrapup: {
|
|
683
|
+
model: "gpt-5.6-terra",
|
|
684
|
+
effort: "medium"
|
|
685
|
+
},
|
|
686
|
+
architecture: {
|
|
687
|
+
model: "gpt-5.6-sol",
|
|
688
|
+
effort: "high"
|
|
689
|
+
},
|
|
690
|
+
design: {
|
|
691
|
+
model: "gpt-5.6-sol",
|
|
692
|
+
effort: "high"
|
|
693
|
+
},
|
|
694
|
+
investigate: {
|
|
695
|
+
model: "gpt-5.6-sol",
|
|
696
|
+
effort: "high"
|
|
697
|
+
},
|
|
698
|
+
research: {
|
|
699
|
+
model: "gpt-5.6-sol",
|
|
700
|
+
effort: "high"
|
|
701
|
+
},
|
|
702
|
+
"pr-review": {
|
|
703
|
+
model: "gpt-5.6-sol",
|
|
704
|
+
effort: "high"
|
|
705
|
+
},
|
|
706
|
+
feedback: {
|
|
707
|
+
model: "gpt-5.6-terra",
|
|
708
|
+
effort: "low"
|
|
709
|
+
},
|
|
710
|
+
optimize: {
|
|
711
|
+
model: "gpt-5.6-terra",
|
|
712
|
+
effort: "medium"
|
|
713
|
+
},
|
|
714
|
+
orient: {
|
|
715
|
+
model: "gpt-5.6-terra",
|
|
716
|
+
effort: "medium"
|
|
717
|
+
},
|
|
718
|
+
"learn-repo": {
|
|
719
|
+
model: "gpt-5.6-luna",
|
|
720
|
+
effort: "low"
|
|
721
|
+
},
|
|
722
|
+
assess: {
|
|
723
|
+
model: "gpt-5.6-terra",
|
|
724
|
+
effort: "medium"
|
|
725
|
+
},
|
|
726
|
+
ask: {
|
|
727
|
+
model: "gpt-5.6-luna",
|
|
728
|
+
effort: "low"
|
|
729
|
+
},
|
|
730
|
+
"extract-summary": {
|
|
731
|
+
model: "gpt-5.6-terra",
|
|
732
|
+
effort: "low"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
cursor: {
|
|
737
|
+
light: {
|
|
738
|
+
refine: {
|
|
739
|
+
model: "composer-2.5",
|
|
740
|
+
effort: "low"
|
|
741
|
+
},
|
|
742
|
+
plan: {
|
|
743
|
+
model: "gpt-5.3-codex",
|
|
744
|
+
effort: "medium"
|
|
745
|
+
},
|
|
746
|
+
implement: {
|
|
747
|
+
model: "gpt-5.3-codex",
|
|
748
|
+
effort: "low"
|
|
749
|
+
},
|
|
750
|
+
qa: {
|
|
751
|
+
model: "gpt-5.3-codex",
|
|
752
|
+
effort: "low"
|
|
753
|
+
},
|
|
754
|
+
wrapup: {
|
|
755
|
+
model: "composer-2.5",
|
|
756
|
+
effort: "low"
|
|
757
|
+
},
|
|
758
|
+
architecture: {
|
|
759
|
+
model: "gpt-5.3-codex",
|
|
760
|
+
effort: "medium"
|
|
761
|
+
},
|
|
762
|
+
design: {
|
|
763
|
+
model: "gpt-5.3-codex",
|
|
764
|
+
effort: "low"
|
|
765
|
+
},
|
|
766
|
+
investigate: {
|
|
767
|
+
model: "gpt-5.3-codex",
|
|
768
|
+
effort: "low"
|
|
769
|
+
},
|
|
770
|
+
research: {
|
|
771
|
+
model: "gpt-5.3-codex",
|
|
772
|
+
effort: "low"
|
|
773
|
+
},
|
|
774
|
+
"pr-review": {
|
|
775
|
+
model: "gpt-5.3-codex",
|
|
776
|
+
effort: "low"
|
|
777
|
+
},
|
|
778
|
+
feedback: {
|
|
779
|
+
model: "composer-2.5",
|
|
780
|
+
effort: "low"
|
|
781
|
+
},
|
|
782
|
+
optimize: {
|
|
783
|
+
model: "composer-2.5",
|
|
784
|
+
effort: "low"
|
|
785
|
+
},
|
|
786
|
+
orient: {
|
|
787
|
+
model: "composer-2.5",
|
|
788
|
+
effort: "low"
|
|
789
|
+
},
|
|
790
|
+
"learn-repo": {
|
|
791
|
+
model: "composer-2.5",
|
|
792
|
+
effort: "low"
|
|
793
|
+
},
|
|
794
|
+
assess: {
|
|
795
|
+
model: "composer-2.5",
|
|
796
|
+
effort: "low"
|
|
797
|
+
},
|
|
798
|
+
ask: {
|
|
799
|
+
model: "composer-2.5",
|
|
800
|
+
effort: "low"
|
|
801
|
+
},
|
|
802
|
+
"extract-summary": {
|
|
803
|
+
model: "gpt-5.3-codex",
|
|
804
|
+
effort: "low"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
default: {
|
|
808
|
+
refine: {
|
|
809
|
+
model: "composer-2.5",
|
|
810
|
+
effort: "low"
|
|
811
|
+
},
|
|
812
|
+
plan: {
|
|
813
|
+
model: "gpt-5.3-codex",
|
|
814
|
+
effort: "medium"
|
|
815
|
+
},
|
|
816
|
+
implement: {
|
|
817
|
+
model: "gpt-5.3-codex",
|
|
818
|
+
effort: "medium"
|
|
819
|
+
},
|
|
820
|
+
qa: {
|
|
821
|
+
model: "gpt-5.3-codex",
|
|
822
|
+
effort: "medium"
|
|
823
|
+
},
|
|
824
|
+
wrapup: {
|
|
825
|
+
model: "gpt-5.3-codex",
|
|
826
|
+
effort: "low"
|
|
827
|
+
},
|
|
828
|
+
architecture: {
|
|
829
|
+
model: "gpt-5.3-codex",
|
|
830
|
+
effort: "medium"
|
|
831
|
+
},
|
|
832
|
+
design: {
|
|
833
|
+
model: "gpt-5.3-codex",
|
|
834
|
+
effort: "medium"
|
|
835
|
+
},
|
|
836
|
+
investigate: {
|
|
837
|
+
model: "gpt-5.3-codex",
|
|
838
|
+
effort: "medium"
|
|
839
|
+
},
|
|
840
|
+
research: {
|
|
841
|
+
model: "gpt-5.3-codex",
|
|
842
|
+
effort: "medium"
|
|
843
|
+
},
|
|
844
|
+
"pr-review": {
|
|
845
|
+
model: "gpt-5.3-codex",
|
|
846
|
+
effort: "medium"
|
|
847
|
+
},
|
|
848
|
+
feedback: {
|
|
849
|
+
model: "composer-2.5",
|
|
850
|
+
effort: "low"
|
|
851
|
+
},
|
|
852
|
+
optimize: {
|
|
853
|
+
model: "gpt-5.3-codex",
|
|
854
|
+
effort: "low"
|
|
855
|
+
},
|
|
856
|
+
orient: {
|
|
857
|
+
model: "gpt-5.3-codex",
|
|
858
|
+
effort: "low"
|
|
859
|
+
},
|
|
860
|
+
"learn-repo": {
|
|
861
|
+
model: "composer-2.5",
|
|
862
|
+
effort: "low"
|
|
863
|
+
},
|
|
864
|
+
assess: {
|
|
865
|
+
model: "composer-2.5",
|
|
866
|
+
effort: "low"
|
|
867
|
+
},
|
|
868
|
+
ask: {
|
|
869
|
+
model: "composer-2.5",
|
|
870
|
+
effort: "low"
|
|
871
|
+
},
|
|
872
|
+
"extract-summary": {
|
|
873
|
+
model: "gpt-5.3-codex",
|
|
874
|
+
effort: "low"
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
heavy: {
|
|
878
|
+
refine: {
|
|
879
|
+
model: "gpt-5.3-codex",
|
|
880
|
+
effort: "medium"
|
|
881
|
+
},
|
|
882
|
+
plan: {
|
|
883
|
+
model: "claude-opus-5-5-high",
|
|
884
|
+
effort: "high"
|
|
885
|
+
},
|
|
886
|
+
implement: {
|
|
887
|
+
model: "claude-opus-5-5-high",
|
|
888
|
+
effort: "high"
|
|
889
|
+
},
|
|
890
|
+
qa: {
|
|
891
|
+
model: "claude-opus-5-5-high",
|
|
892
|
+
effort: "high"
|
|
893
|
+
},
|
|
894
|
+
wrapup: {
|
|
895
|
+
model: "gpt-5.3-codex",
|
|
896
|
+
effort: "medium"
|
|
897
|
+
},
|
|
898
|
+
architecture: {
|
|
899
|
+
model: "claude-opus-5-5-high",
|
|
900
|
+
effort: "high"
|
|
901
|
+
},
|
|
902
|
+
design: {
|
|
903
|
+
model: "claude-opus-5-5-high",
|
|
904
|
+
effort: "high"
|
|
905
|
+
},
|
|
906
|
+
investigate: {
|
|
907
|
+
model: "claude-opus-5-5-high",
|
|
908
|
+
effort: "high"
|
|
909
|
+
},
|
|
910
|
+
research: {
|
|
911
|
+
model: "claude-opus-5-5-high",
|
|
912
|
+
effort: "high"
|
|
913
|
+
},
|
|
914
|
+
"pr-review": {
|
|
915
|
+
model: "claude-opus-5-5-high",
|
|
916
|
+
effort: "high"
|
|
917
|
+
},
|
|
918
|
+
feedback: {
|
|
919
|
+
model: "gpt-5.3-codex",
|
|
920
|
+
effort: "low"
|
|
921
|
+
},
|
|
922
|
+
optimize: {
|
|
923
|
+
model: "gpt-5.3-codex",
|
|
924
|
+
effort: "medium"
|
|
925
|
+
},
|
|
926
|
+
orient: {
|
|
927
|
+
model: "gpt-5.3-codex",
|
|
928
|
+
effort: "medium"
|
|
929
|
+
},
|
|
930
|
+
"learn-repo": {
|
|
931
|
+
model: "composer-2.5",
|
|
932
|
+
effort: "low"
|
|
933
|
+
},
|
|
934
|
+
assess: {
|
|
935
|
+
model: "gpt-5.3-codex",
|
|
936
|
+
effort: "medium"
|
|
937
|
+
},
|
|
938
|
+
ask: {
|
|
939
|
+
model: "composer-2.5",
|
|
940
|
+
effort: "low"
|
|
941
|
+
},
|
|
942
|
+
"extract-summary": {
|
|
943
|
+
model: "gpt-5.3-codex",
|
|
944
|
+
effort: "low"
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
function presetRows(preset, vendor) {
|
|
950
|
+
return ((vendor === void 0 ? void 0 : PRESETS[vendor]) ?? CLAUDE_CODE)[preset];
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* The models a preset model gives way to when the vendor's list on this machine lacks it, strongest
|
|
954
|
+
* first. The first pattern the list holds wins, and `*` stands for any part of an id, so a newer
|
|
955
|
+
* version of the same family counts; among several matches the highest version wins.
|
|
956
|
+
*
|
|
957
|
+
* Accounts differ: a work Cursor account can have a frontier model turned off (owner finding T30).
|
|
958
|
+
* The same family comes first, then a model of the same tier, then the preset's next step down.
|
|
959
|
+
* Claude Code is not here, because its list is kept by hand and holds every alias the presets name.
|
|
960
|
+
*/
|
|
961
|
+
var STAND_INS = {
|
|
962
|
+
codex: {
|
|
963
|
+
"gpt-5.6-sol": ["gpt-*-sol", "gpt-5.6-terra"],
|
|
964
|
+
"gpt-5.6-terra": ["gpt-*-terra", "gpt-5.6-luna"],
|
|
965
|
+
"gpt-5.6-luna": ["gpt-*-luna"]
|
|
966
|
+
},
|
|
967
|
+
cursor: {
|
|
968
|
+
"claude-opus-5-5-high": [
|
|
969
|
+
"claude-opus-*-high",
|
|
970
|
+
"claude-opus-*",
|
|
971
|
+
"gpt-*-codex-high",
|
|
972
|
+
"gemini-*-pro",
|
|
973
|
+
"gpt-5.3-codex"
|
|
974
|
+
],
|
|
975
|
+
"gpt-5.3-codex": ["gpt-*-codex", "composer-2.5"],
|
|
976
|
+
"composer-2.5": ["composer-*"]
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
var glob = (pattern) => new RegExp(`^${pattern.split("*").map((part) => part.replace(/[.+?^${}()|[\]\\]/g, "\\$&")).join(".*")}$`);
|
|
980
|
+
var newestFirst = (a, b) => b.localeCompare(a, "en", { numeric: true });
|
|
981
|
+
function presetStandIn(vendor, model, known) {
|
|
982
|
+
if (vendor === void 0 || known === void 0 || known.includes(model)) return null;
|
|
983
|
+
for (const pattern of STAND_INS[vendor]?.[model] ?? []) {
|
|
984
|
+
const found = known.filter((one) => glob(pattern).test(one)).sort(newestFirst)[0];
|
|
985
|
+
if (found !== void 0) return found;
|
|
986
|
+
}
|
|
987
|
+
return null;
|
|
988
|
+
}
|
|
989
|
+
function presetModels(vendor) {
|
|
990
|
+
return [...new Set(PRESET_NAMES.flatMap((preset) => ACTIONS.map((action) => presetRows(preset, vendor)[action].model)))];
|
|
991
|
+
}
|
|
992
|
+
var REFINE_HAIKU_LOW = {
|
|
993
|
+
costUsd: .048,
|
|
994
|
+
lowMs: 21e3,
|
|
995
|
+
highMs: 21e3
|
|
996
|
+
};
|
|
997
|
+
var RANGES = { "claude-code": {
|
|
998
|
+
light: { refine: REFINE_HAIKU_LOW },
|
|
999
|
+
default: { refine: REFINE_HAIKU_LOW }
|
|
1000
|
+
} };
|
|
1001
|
+
/**
|
|
1002
|
+
* The measured range of the built-in preset row this start matches, or null.
|
|
1003
|
+
*
|
|
1004
|
+
* Matched on the vendor's own rows and not on `presetRows`, which answers an unknown vendor with the
|
|
1005
|
+
* Claude Code rows. A card or a project that picks exactly what a preset row runs gets that row's
|
|
1006
|
+
* range, because it is the same run. Any other pick has no honest number.
|
|
1007
|
+
*/
|
|
1008
|
+
function presetRange(vendor, action, model, effort) {
|
|
1009
|
+
if (vendor === void 0) return null;
|
|
1010
|
+
for (const preset of PRESET_NAMES) {
|
|
1011
|
+
const row = PRESETS[vendor]?.[preset][action];
|
|
1012
|
+
const range = RANGES[vendor]?.[preset]?.[action];
|
|
1013
|
+
if (range !== void 0 && row?.model === model && row.effort === effort) return range;
|
|
1014
|
+
}
|
|
1015
|
+
return null;
|
|
1016
|
+
}
|
|
1017
|
+
var isAction = (value) => ACTIONS.includes(value);
|
|
1018
|
+
/**
|
|
1019
|
+
* A stored table with the Design row under its old name, `mockups`, read under the new one.
|
|
1020
|
+
*
|
|
1021
|
+
* A project, a saved preset or a card may hold a row from before the rename. Left as it was, the
|
|
1022
|
+
* table fails `validateModelTable` and reads as nothing stored, which drops every row of it. A table
|
|
1023
|
+
* that has both keeps the new one. Anything that is not a table goes back as it came.
|
|
1024
|
+
*/
|
|
1025
|
+
function renamedActions(value) {
|
|
1026
|
+
if (typeof value !== "object" || value === null || Array.isArray(value) || !Object.hasOwn(value, "mockups")) return value;
|
|
1027
|
+
const { mockups, ...rest } = value;
|
|
1028
|
+
return Object.hasOwn(rest, "design") ? rest : {
|
|
1029
|
+
...rest,
|
|
1030
|
+
design: mockups
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
var goneText = (model) => `${model} is gone.`;
|
|
1034
|
+
var ENGINE = DEFAULT_PROFILE.id;
|
|
1035
|
+
var EFFORTS = [
|
|
1036
|
+
"low",
|
|
1037
|
+
"medium",
|
|
1038
|
+
"high"
|
|
1039
|
+
];
|
|
1040
|
+
/**
|
|
1041
|
+
* The profiles with the main login of the project's preset engine first.
|
|
1042
|
+
*
|
|
1043
|
+
* `resolveModels` gives every row with no engine of its own to the first profile, so this is how
|
|
1044
|
+
* "Heavy on Cursor" reaches every run. The main login is the one under the bare vendor id, else the
|
|
1045
|
+
* first one of that vendor: a built-in preset never runs on a second login (decided 2026-09-25),
|
|
1046
|
+
* which a phase change or a saved preset still reaches. Null, or an engine with no login here, keeps
|
|
1047
|
+
* the stored order.
|
|
1048
|
+
*/
|
|
1049
|
+
function presetProfiles(profiles, engine) {
|
|
1050
|
+
const main = engine === null ? void 0 : profiles.find((one) => one.id === engine) ?? profiles.find((one) => one.vendor === engine);
|
|
1051
|
+
return main === void 0 || main === profiles[0] ? profiles : [main, ...profiles.filter((one) => one !== main)];
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Card over global over preset, field by field.
|
|
1055
|
+
*
|
|
1056
|
+
* `profiles` is every login this machine holds, and the first one is what an action with no
|
|
1057
|
+
* engine of its own inherits. It has no default on purpose: a default let three screens resolve
|
|
1058
|
+
* against one profile while the job builder resolved against the stored list, and they would have
|
|
1059
|
+
* disagreed the moment a second profile existed.
|
|
1060
|
+
*
|
|
1061
|
+
* `models` is what each vendor offers today. `gone` is asked of a row against the list of the
|
|
1062
|
+
* vendor its own profile runs, because a model name means nothing under another vendor. A vendor
|
|
1063
|
+
* with no list is left alone: nothing here can tell whether its model is real.
|
|
1064
|
+
*
|
|
1065
|
+
* `onProfile` pins the whole table to one profile, which is what a resume does: the session lives
|
|
1066
|
+
* inside that login, so the model has to be one that login can run. A stored row of another
|
|
1067
|
+
* profile is skipped and the level below it answers instead, because that row's model belongs to
|
|
1068
|
+
* another vendor. Null resolves the table as the action list stores it.
|
|
1069
|
+
*
|
|
1070
|
+
* `place` says whether the project folder is a git repository and whether the wall starts on this
|
|
1071
|
+
* machine, so `refusal` names the engines that cannot run there and a drop or a row says so before
|
|
1072
|
+
* the click. Left out, no refusal is worked out, for a caller that shows none.
|
|
1073
|
+
*/
|
|
1074
|
+
function resolveModels(card, global, preset, models, profiles, onProfile = null, place) {
|
|
1075
|
+
const table = {};
|
|
1076
|
+
const fallback = profiles[0]?.id ?? ENGINE;
|
|
1077
|
+
const pinned = (row) => onProfile === null || (row?.engine ?? fallback) === onProfile ? row ?? {} : {};
|
|
1078
|
+
for (const action of ACTIONS) {
|
|
1079
|
+
const own = pinned(card?.[action]);
|
|
1080
|
+
const project = pinned(global[action]);
|
|
1081
|
+
const engine = onProfile ?? own.engine ?? project.engine ?? fallback;
|
|
1082
|
+
const profile = profiles.find((one) => one.id === engine);
|
|
1083
|
+
const known = profile === void 0 ? void 0 : models[profile.vendor];
|
|
1084
|
+
const base = presetRows(preset, profile?.vendor)[action];
|
|
1085
|
+
const standIn = presetStandIn(profile?.vendor, base.model, known);
|
|
1086
|
+
const model = own.model ?? project.model ?? standIn ?? base.model;
|
|
1087
|
+
const inId = effortInId(profile?.vendor);
|
|
1088
|
+
table[action] = {
|
|
1089
|
+
engine,
|
|
1090
|
+
model,
|
|
1091
|
+
effort: inId ? base.effort : own.effort ?? project.effort ?? base.effort,
|
|
1092
|
+
from: {
|
|
1093
|
+
model: own.model !== void 0 ? "card" : project.model !== void 0 ? "global" : "preset",
|
|
1094
|
+
effort: !inId && own.effort !== void 0 ? "card" : !inId && project.effort !== void 0 ? "global" : "preset"
|
|
1095
|
+
},
|
|
1096
|
+
gone: known !== void 0 && !known.includes(model),
|
|
1097
|
+
...standIn !== null && own.model === void 0 && project.model === void 0 ? { insteadOf: base.model } : {},
|
|
1098
|
+
missingProfile: profile === void 0,
|
|
1099
|
+
refusal: profile === void 0 || place === void 0 ? null : vendorRefusal(profile.vendor, action, place)
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
return table;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* The profiles a row may be set to: the ones whose vendor this version has an adapter for.
|
|
1106
|
+
*
|
|
1107
|
+
* A profile of a vendor Nolzu cannot spawn would take the row and then refuse every run of it, so
|
|
1108
|
+
* it is not offered. The profile stays on the Engines screen, where a person keeps their logins.
|
|
1109
|
+
*/
|
|
1110
|
+
function profileChoices(profiles, models) {
|
|
1111
|
+
return profiles.filter((one) => models[one.vendor] !== void 0).map((one) => ({
|
|
1112
|
+
id: one.id,
|
|
1113
|
+
label: one.label
|
|
1114
|
+
}));
|
|
1115
|
+
}
|
|
1116
|
+
var NO_MODELS_REASON = "No models answered. Settings, Engines shows whether its command is installed and signed in.";
|
|
1117
|
+
/**
|
|
1118
|
+
* Every profile for the combined picker, each with its models, and a reason on one that has none.
|
|
1119
|
+
*
|
|
1120
|
+
* A profile whose vendor answered no models (a command not installed, a lapsed login, terms not
|
|
1121
|
+
* accepted) cannot take a row. Left out, it vanished from the picker with no word, so it stays in,
|
|
1122
|
+
* closed, with the reason.
|
|
1123
|
+
*/
|
|
1124
|
+
function pickerProfiles(profiles, models) {
|
|
1125
|
+
return profiles.map((one) => {
|
|
1126
|
+
const list = models[one.vendor] ?? [];
|
|
1127
|
+
return list.length > 0 ? {
|
|
1128
|
+
id: one.id,
|
|
1129
|
+
label: one.label,
|
|
1130
|
+
models: list
|
|
1131
|
+
} : {
|
|
1132
|
+
id: one.id,
|
|
1133
|
+
label: one.label,
|
|
1134
|
+
models: [],
|
|
1135
|
+
reason: NO_MODELS_REASON
|
|
1136
|
+
};
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* The models one profile offers, which are the ones of its vendor.
|
|
1141
|
+
*
|
|
1142
|
+
* Empty for a profile this machine does not hold and for a vendor this version cannot run. A
|
|
1143
|
+
* screen then offers no model for that row, which is the truth: nothing here knows what that CLI
|
|
1144
|
+
* takes.
|
|
1145
|
+
*/
|
|
1146
|
+
function modelsOfProfile(profile, profiles, models) {
|
|
1147
|
+
const vendor = profiles.find((one) => one.id === profile)?.vendor;
|
|
1148
|
+
return (vendor === void 0 ? void 0 : models[vendor]) ?? [];
|
|
1149
|
+
}
|
|
1150
|
+
function modelsForPick(resolved, profiles, models) {
|
|
1151
|
+
return modelsOfProfile(profileForPick(resolved, profiles), profiles, models);
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* The profile a row should carry after a person picks a model for it.
|
|
1155
|
+
*
|
|
1156
|
+
* A model name belongs to a profile, so the pick has to write one. The row keeps the profile it
|
|
1157
|
+
* already resolves to when this machine holds it. When it does not, the pick is what repairs the
|
|
1158
|
+
* row, so it moves to the first profile: writing the missing id back would leave the row refused
|
|
1159
|
+
* the moment the person thought they had fixed it.
|
|
1160
|
+
*/
|
|
1161
|
+
function profileForPick(resolved, profiles) {
|
|
1162
|
+
return resolved.missingProfile ? profiles[0]?.id ?? ENGINE : resolved.engine;
|
|
1163
|
+
}
|
|
1164
|
+
function diffModels(chosen, inherited) {
|
|
1165
|
+
const table = {};
|
|
1166
|
+
for (const action of ACTIONS) {
|
|
1167
|
+
const want = chosen[action];
|
|
1168
|
+
if (want === void 0) continue;
|
|
1169
|
+
const base = inherited[action];
|
|
1170
|
+
if (want.engine !== void 0 && want.engine !== base.engine) {
|
|
1171
|
+
table[action] = want;
|
|
1172
|
+
continue;
|
|
1173
|
+
}
|
|
1174
|
+
const row = {};
|
|
1175
|
+
if (want.model !== void 0 && want.model !== base.model) row.model = want.model;
|
|
1176
|
+
if (want.effort !== void 0 && want.effort !== base.effort) row.effort = want.effort;
|
|
1177
|
+
if (Object.keys(row).length > 0) table[action] = {
|
|
1178
|
+
engine: want.engine ?? base.engine,
|
|
1179
|
+
...row
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
return Object.keys(table).length === 0 ? null : table;
|
|
1183
|
+
}
|
|
1184
|
+
var MAX_NAME = 40;
|
|
1185
|
+
/**
|
|
1186
|
+
* The sentence that refuses a preset name, or null when it is fine.
|
|
1187
|
+
*
|
|
1188
|
+
* `taken` holds the names in use, and the caller puts the built-in three in it: two presets called
|
|
1189
|
+
* Default would draw two buttons a person cannot tell apart. A name with a slash in it is refused
|
|
1190
|
+
* because it reads as a folder, and a preset is not a file.
|
|
1191
|
+
*/
|
|
1192
|
+
function presetNameProblem(name, taken) {
|
|
1193
|
+
const trimmed = name.trim();
|
|
1194
|
+
if (trimmed === "") return "A preset needs a name.";
|
|
1195
|
+
if (trimmed.length > MAX_NAME) return `A preset name is ${MAX_NAME} characters or less.`;
|
|
1196
|
+
if (/[/\\]/.test(trimmed)) return "A preset name cannot hold a slash.";
|
|
1197
|
+
if (taken.some((one) => one.trim().toLowerCase() === trimmed.toLowerCase())) return `There is already a preset called ${trimmed}.`;
|
|
1198
|
+
return null;
|
|
1199
|
+
}
|
|
1200
|
+
function validateModelTable(value) {
|
|
1201
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return "The models are a table of actions.";
|
|
1202
|
+
for (const [action, row] of Object.entries(value)) {
|
|
1203
|
+
if (!isAction(action)) return `There is no action ${action}. The actions are ${ACTIONS.join(", ")}.`;
|
|
1204
|
+
if (typeof row !== "object" || row === null) return `The ${action} row is not a model, an effort and an engine.`;
|
|
1205
|
+
const { engine, model, effort } = row;
|
|
1206
|
+
if (engine !== void 0 && (typeof engine !== "string" || !isProfileId(engine))) return `The engine for ${action} is ${String(engine)}, which is not an engine profile id. One looks like ${ENGINE} or codex#work.`;
|
|
1207
|
+
if (model !== void 0 && (typeof model !== "string" || model.trim() === "")) return `The model for ${action} is not a model name.`;
|
|
1208
|
+
if (effort !== void 0 && !EFFORTS.includes(effort)) return `The effort for ${action} is one of ${EFFORTS.join(", ")}.`;
|
|
1209
|
+
}
|
|
1210
|
+
return null;
|
|
1211
|
+
}
|
|
1212
|
+
//#endregion
|
|
1213
|
+
//#region ../../packages/core/src/board.ts
|
|
1214
|
+
function deliveryBoard(flow) {
|
|
1215
|
+
return {
|
|
1216
|
+
kind: "delivery",
|
|
1217
|
+
stages: [
|
|
1218
|
+
{
|
|
1219
|
+
id: "inbox",
|
|
1220
|
+
label: "Inbox",
|
|
1221
|
+
role: "you"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
id: "refine",
|
|
1225
|
+
label: "Refine",
|
|
1226
|
+
role: "agent",
|
|
1227
|
+
phase: "refine"
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
id: "plan",
|
|
1231
|
+
label: "Plan",
|
|
1232
|
+
role: "agent",
|
|
1233
|
+
phase: "plan"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
id: "implement",
|
|
1237
|
+
label: "Implement",
|
|
1238
|
+
role: "agent",
|
|
1239
|
+
phase: "implement"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
id: "qa",
|
|
1243
|
+
label: "QA",
|
|
1244
|
+
role: "agent",
|
|
1245
|
+
phase: "qa",
|
|
1246
|
+
advanceOn: "review"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
id: "review",
|
|
1250
|
+
label: "Review",
|
|
1251
|
+
role: "you"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
id: "pr-watch",
|
|
1255
|
+
label: "Pull request",
|
|
1256
|
+
role: "auto"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
id: "wrapup",
|
|
1260
|
+
label: "Wrap-up",
|
|
1261
|
+
role: "agent",
|
|
1262
|
+
phase: "wrapup",
|
|
1263
|
+
advanceOn: "closed"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
id: "closed",
|
|
1267
|
+
label: "Closed",
|
|
1268
|
+
role: "archive"
|
|
1269
|
+
}
|
|
1270
|
+
]
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* The four boards that are not Delivery, as data.
|
|
1275
|
+
*
|
|
1276
|
+
* Their stage lists are `PRODUCT-BRIEF.md` 7.2 and a test in this package holds the two together by
|
|
1277
|
+
* writing them out again. Keeping a board as data is what lets one page, one drag rule and one
|
|
1278
|
+
* route serve five of them, and what later allows a board builder.
|
|
1279
|
+
*
|
|
1280
|
+
* Every agent stage names the phase a forward drop starts. A phase name is not the stage id here:
|
|
1281
|
+
* Epics reuses Delivery's refine and plan rather than growing two skills that would say the same
|
|
1282
|
+
* thing, an investigation runs `investigate` on the stage called Research, and Agent pre-review runs
|
|
1283
|
+
* `pr-review`.
|
|
1284
|
+
*
|
|
1285
|
+
* An `advanceOn` row is where a finished run of the stage takes its card by itself (`chainTo`), and
|
|
1286
|
+
* every row here lands on a person's column or the archive, where nothing starts. A chain onto an
|
|
1287
|
+
* agent column would have to start that run, which costs money, so Epics keeps refine through design
|
|
1288
|
+
* manual and a person drags those cards. The chain a person may allow in advance (`PRODUCT-BRIEF.md`
|
|
1289
|
+
* 3.1) is `smallChain` below, and it covers Delivery's Plan alone.
|
|
1290
|
+
*/
|
|
1291
|
+
function researchStages(phase) {
|
|
1292
|
+
return [
|
|
1293
|
+
{
|
|
1294
|
+
id: "inbox",
|
|
1295
|
+
label: "Inbox",
|
|
1296
|
+
role: "you"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
id: "research",
|
|
1300
|
+
label: "Research",
|
|
1301
|
+
role: "agent",
|
|
1302
|
+
phase,
|
|
1303
|
+
advanceOn: "review"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
id: "review",
|
|
1307
|
+
label: "Review",
|
|
1308
|
+
role: "you"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
id: "wrapup",
|
|
1312
|
+
label: "Wrap-up",
|
|
1313
|
+
role: "agent",
|
|
1314
|
+
phase: "wrapup",
|
|
1315
|
+
advanceOn: "done"
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
id: "done",
|
|
1319
|
+
label: "Done",
|
|
1320
|
+
role: "archive"
|
|
1321
|
+
}
|
|
1322
|
+
];
|
|
1323
|
+
}
|
|
1324
|
+
var OTHER_BOARDS = {
|
|
1325
|
+
epics: [
|
|
1326
|
+
{
|
|
1327
|
+
id: "inbox",
|
|
1328
|
+
label: "Inbox",
|
|
1329
|
+
role: "you"
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
id: "refine",
|
|
1333
|
+
label: "Refine",
|
|
1334
|
+
role: "agent",
|
|
1335
|
+
phase: "refine"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
id: "architecture",
|
|
1339
|
+
label: "Architecture",
|
|
1340
|
+
role: "agent",
|
|
1341
|
+
phase: "architecture"
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
id: "design",
|
|
1345
|
+
label: "Design",
|
|
1346
|
+
role: "agent",
|
|
1347
|
+
phase: "design"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
id: "plan",
|
|
1351
|
+
label: "Plan",
|
|
1352
|
+
role: "agent",
|
|
1353
|
+
phase: "plan",
|
|
1354
|
+
advanceOn: "review"
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
id: "review",
|
|
1358
|
+
label: "Review",
|
|
1359
|
+
role: "you"
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
id: "in-delivery",
|
|
1363
|
+
label: "In delivery",
|
|
1364
|
+
role: "auto"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
id: "wrapup",
|
|
1368
|
+
label: "Wrap-up",
|
|
1369
|
+
role: "agent",
|
|
1370
|
+
phase: "wrapup",
|
|
1371
|
+
advanceOn: "done"
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
id: "done",
|
|
1375
|
+
label: "Done",
|
|
1376
|
+
role: "archive"
|
|
1377
|
+
}
|
|
1378
|
+
],
|
|
1379
|
+
investigations: researchStages("investigate"),
|
|
1380
|
+
questions: researchStages("research"),
|
|
1381
|
+
prreview: [
|
|
1382
|
+
{
|
|
1383
|
+
id: "incoming",
|
|
1384
|
+
label: "Incoming",
|
|
1385
|
+
role: "you"
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
id: "pre-review",
|
|
1389
|
+
label: "Agent pre-review",
|
|
1390
|
+
role: "agent",
|
|
1391
|
+
phase: "pr-review",
|
|
1392
|
+
advanceOn: "my-review"
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
id: "my-review",
|
|
1396
|
+
label: "My review",
|
|
1397
|
+
role: "you"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
id: "awaiting-author",
|
|
1401
|
+
label: "Awaiting author",
|
|
1402
|
+
role: "auto"
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
id: "approved",
|
|
1406
|
+
label: "Approved",
|
|
1407
|
+
role: "you"
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
id: "wrapup",
|
|
1411
|
+
label: "Wrap-up",
|
|
1412
|
+
role: "agent",
|
|
1413
|
+
phase: "wrapup",
|
|
1414
|
+
advanceOn: "closed"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
id: "closed",
|
|
1418
|
+
label: "Closed",
|
|
1419
|
+
role: "archive"
|
|
1420
|
+
}
|
|
1421
|
+
]
|
|
1422
|
+
};
|
|
1423
|
+
/**
|
|
1424
|
+
* The line under the name of a person's column or an auto column, as the redesign draws it.
|
|
1425
|
+
*
|
|
1426
|
+
* Kept apart from the stage rows, which the board test holds to the brief one field at a time. An
|
|
1427
|
+
* agent column says what a drop starts, which the models decide, and an archive column says nothing.
|
|
1428
|
+
*/
|
|
1429
|
+
var SAYS = {
|
|
1430
|
+
delivery: {
|
|
1431
|
+
inbox: "you pick what goes next",
|
|
1432
|
+
review: "you read the change, then push",
|
|
1433
|
+
"pr-watch": "waits on GitHub"
|
|
1434
|
+
},
|
|
1435
|
+
epics: {
|
|
1436
|
+
inbox: "you pick what goes next",
|
|
1437
|
+
review: "you read, then send the tasks",
|
|
1438
|
+
"in-delivery": "follows its tasks on Delivery"
|
|
1439
|
+
},
|
|
1440
|
+
investigations: {
|
|
1441
|
+
inbox: "you pick what goes next",
|
|
1442
|
+
review: "you read the answer or the report"
|
|
1443
|
+
},
|
|
1444
|
+
questions: {
|
|
1445
|
+
inbox: "you pick what goes next",
|
|
1446
|
+
review: "you read the answer or the report"
|
|
1447
|
+
},
|
|
1448
|
+
prreview: {
|
|
1449
|
+
incoming: "you pick what to review",
|
|
1450
|
+
"my-review": "you read the findings, then post",
|
|
1451
|
+
"awaiting-author": "back to Incoming on a new push, on to Approved when you approve",
|
|
1452
|
+
approved: "waits for the author to merge"
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
function stageSays(kind, stage) {
|
|
1456
|
+
return Object.hasOwn(SAYS[kind], stage) ? SAYS[kind][stage] : void 0;
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* The board of one kind.
|
|
1460
|
+
*
|
|
1461
|
+
* Delivery is the one kind that takes a flow, so every caller asks this rather than knowing which
|
|
1462
|
+
* board needs one. `PROJECT.md` calls the table `BOARDS[kind]`, and the flow is why it is a
|
|
1463
|
+
* function here.
|
|
1464
|
+
*/
|
|
1465
|
+
function boardFor(kind, flow) {
|
|
1466
|
+
if (kind === "delivery") return deliveryBoard();
|
|
1467
|
+
return {
|
|
1468
|
+
kind,
|
|
1469
|
+
stages: OTHER_BOARDS[kind]
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
var indexOf = (board, id) => board.stages.findIndex((stage) => stage.id === id);
|
|
1473
|
+
function canMove(board, card, to) {
|
|
1474
|
+
if (card.state === "queued" || card.state === "running") return false;
|
|
1475
|
+
const from = indexOf(board, card.stage);
|
|
1476
|
+
const target = indexOf(board, to);
|
|
1477
|
+
if (from < 0 || target < 0 || target === from) return false;
|
|
1478
|
+
return target < from || target === from + 1;
|
|
1479
|
+
}
|
|
1480
|
+
function phaseOnEnter(board, from, to) {
|
|
1481
|
+
const origin = indexOf(board, from);
|
|
1482
|
+
const target = indexOf(board, to);
|
|
1483
|
+
if (origin < 0 || target <= origin) return void 0;
|
|
1484
|
+
return board.stages[target]?.phase;
|
|
1485
|
+
}
|
|
1486
|
+
function nextStage(board, from) {
|
|
1487
|
+
const origin = indexOf(board, from);
|
|
1488
|
+
return origin < 0 ? void 0 : board.stages[origin + 1];
|
|
1489
|
+
}
|
|
1490
|
+
function startsLabel(board, from, to, stages) {
|
|
1491
|
+
if (phaseOnEnter(board, from, to) === void 0) return void 0;
|
|
1492
|
+
const starts = stages.find((stage) => stage.id === to)?.starts ?? null;
|
|
1493
|
+
if (starts === null) return void 0;
|
|
1494
|
+
if (starts.modelState === "no-profile") return `${missingProfileText(starts.engine)} Set the row back to inherit in the card settings, or in Settings, Models.`;
|
|
1495
|
+
if (starts.refusal !== null) return starts.refusal;
|
|
1496
|
+
if (starts.modelState === "gone") return `${goneText(starts.model)} Pick another model in the card settings, or in Settings, Models.`;
|
|
1497
|
+
return `Starts: /${starts.phase} · ${starts.model} · ${starts.effort}`;
|
|
1498
|
+
}
|
|
1499
|
+
function advanceTo(board, from, outcome) {
|
|
1500
|
+
return board.stages[indexOf(board, from)]?.advanceOn;
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Where a finished run takes its card by itself, or undefined when the card stays where it ran.
|
|
1504
|
+
*
|
|
1505
|
+
* One stage on, by the stage's `advanceOn`, and only onto a person's column or the archive: nothing
|
|
1506
|
+
* starts there, so the move needs no run behind it. Only a run that ended ready, and only the run of
|
|
1507
|
+
* the stage's own phase: a message on the refine thread runs refine while the card sits on Plan. QA
|
|
1508
|
+
* goes on with a PASS alone. `waits` says the run left something the person still has to act on, such
|
|
1509
|
+
* as a knowledge change waiting for review, and the archive would hide it, so that card stays.
|
|
1510
|
+
*/
|
|
1511
|
+
function chainTo(board, stage, run) {
|
|
1512
|
+
const from = board.stages[indexOf(board, stage)];
|
|
1513
|
+
if (from === void 0 || run.state !== "ready" || from.phase !== run.phase) return void 0;
|
|
1514
|
+
if (run.phase === "qa" && run.verdict !== "PASS") return void 0;
|
|
1515
|
+
const to = board.stages.find((one) => one.id === advanceTo(board, stage));
|
|
1516
|
+
if (to?.role === "archive" && run.waits) return void 0;
|
|
1517
|
+
return to?.role === "you" || to?.role === "archive" ? to.id : void 0;
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* The one chain a person may allow in advance (`PRODUCT-BRIEF.md` 3.1): on a board they turned it on
|
|
1521
|
+
* for, a card they ticked "Go on to Implement after Plan" on goes on from Plan to Implement by itself.
|
|
1522
|
+
* The tick is stored as the size small, and a card with no tick stores no size, so it never chains
|
|
1523
|
+
* (owner question 60, T46).
|
|
1524
|
+
*
|
|
1525
|
+
* Kept apart from the `advanceOn` rows, which never land on an agent column. This one does, so whoever
|
|
1526
|
+
* fires it starts that run too, through the path a drop takes. Each chain is one step onto
|
|
1527
|
+
* an agent stage, so it never passes a stage that waits for a person.
|
|
1528
|
+
*/
|
|
1529
|
+
var SMALL_CHAINS = { delivery: {
|
|
1530
|
+
from: "plan",
|
|
1531
|
+
to: "implement"
|
|
1532
|
+
} };
|
|
1533
|
+
function smallChain(board, card, phase, allowed) {
|
|
1534
|
+
const chain = Object.hasOwn(SMALL_CHAINS, board.kind) ? SMALL_CHAINS[board.kind] : void 0;
|
|
1535
|
+
if (chain === void 0 || card.size !== "small" || card.stage !== chain.from || !allowed.includes(board.kind)) return void 0;
|
|
1536
|
+
return board.stages.find((stage) => stage.id === chain.from)?.phase === phase ? chain.to : void 0;
|
|
1537
|
+
}
|
|
1538
|
+
//#endregion
|
|
1539
|
+
//#region ../../packages/core/src/allowed-commands.ts
|
|
1540
|
+
/**
|
|
1541
|
+
* The shell commands a project lets the agent run.
|
|
1542
|
+
*
|
|
1543
|
+
* Claude Code runs with `--permission-mode acceptEdits`, which refuses every shell command in a
|
|
1544
|
+
* background run, because nobody is there to approve one. Each command here reaches the engine as
|
|
1545
|
+
* one `Bash(<command>)` entry of `--allowedTools`. An empty list allows no command, as before.
|
|
1546
|
+
*/
|
|
1547
|
+
var LOCKFILES = [
|
|
1548
|
+
["pnpm-lock.yaml", "pnpm"],
|
|
1549
|
+
["yarn.lock", "yarn"],
|
|
1550
|
+
["bun.lock", "bun"],
|
|
1551
|
+
["bun.lockb", "bun"],
|
|
1552
|
+
["package-lock.json", "npm"]
|
|
1553
|
+
];
|
|
1554
|
+
var lockfileOf = (files) => LOCKFILES.find(([file]) => files.includes(file));
|
|
1555
|
+
var scriptCommand = (manager, script) => script === "test" && manager !== "bun" ? `${manager} test` : `${manager} run ${script}`;
|
|
1556
|
+
var STACKS = [
|
|
1557
|
+
{
|
|
1558
|
+
when: ["deno.json", "deno.jsonc"],
|
|
1559
|
+
commands: [
|
|
1560
|
+
["Test", "deno test"],
|
|
1561
|
+
["Lint", "deno lint"],
|
|
1562
|
+
["Lint", "deno fmt --check"]
|
|
1563
|
+
]
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
when: ["uv.lock"],
|
|
1567
|
+
group: "python",
|
|
1568
|
+
run: "uv run ",
|
|
1569
|
+
commands: [["Install", "uv sync"], ["Test", "uv run pytest"]]
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
when: ["poetry.lock"],
|
|
1573
|
+
group: "python",
|
|
1574
|
+
run: "poetry run ",
|
|
1575
|
+
commands: [["Install", "poetry install"], ["Test", "poetry run pytest"]]
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
when: ["requirements.txt"],
|
|
1579
|
+
group: "python",
|
|
1580
|
+
run: "",
|
|
1581
|
+
commands: [["Install", "pip install -r requirements.txt"], ["Test", "python -m pytest"]]
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
when: ["pyproject.toml", "setup.py"],
|
|
1585
|
+
group: "python",
|
|
1586
|
+
run: "",
|
|
1587
|
+
commands: [["Install", "pip install -e ."], ["Test", "python -m pytest"]]
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
when: ["ruff.toml", ".ruff.toml"],
|
|
1591
|
+
commands: [["Lint", "{run}ruff check"], ["Lint", "{run}ruff format --check"]]
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
when: ["manage.py"],
|
|
1595
|
+
commands: [["Test", "{run}python manage.py test"], ["Start", "{run}python manage.py runserver"]]
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
when: ["Cargo.toml"],
|
|
1599
|
+
commands: [
|
|
1600
|
+
["Build", "cargo build"],
|
|
1601
|
+
["Test", "cargo test"],
|
|
1602
|
+
["Lint", "cargo clippy"],
|
|
1603
|
+
["Lint", "cargo fmt --check"],
|
|
1604
|
+
["Start", "cargo run"]
|
|
1605
|
+
]
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
when: ["go.mod"],
|
|
1609
|
+
commands: [
|
|
1610
|
+
["Install", "go mod download"],
|
|
1611
|
+
["Build", "go build ./..."],
|
|
1612
|
+
["Test", "go test ./..."],
|
|
1613
|
+
["Lint", "go vet ./..."],
|
|
1614
|
+
["Start", "go run ."]
|
|
1615
|
+
]
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
when: [".golangci.yml", ".golangci.yaml"],
|
|
1619
|
+
commands: [["Lint", "golangci-lint run"]]
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
when: ["gradlew"],
|
|
1623
|
+
group: "gradle",
|
|
1624
|
+
commands: [["Build", "./gradlew build"], ["Test", "./gradlew test"]]
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
when: ["build.gradle", "build.gradle.kts"],
|
|
1628
|
+
group: "gradle",
|
|
1629
|
+
commands: [["Build", "gradle build"], ["Test", "gradle test"]]
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
when: ["mvnw"],
|
|
1633
|
+
group: "maven",
|
|
1634
|
+
commands: [["Test", "./mvnw test"], ["Build", "./mvnw package"]]
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
when: ["pom.xml"],
|
|
1638
|
+
group: "maven",
|
|
1639
|
+
commands: [["Test", "mvn test"], ["Build", "mvn package"]]
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
when: [
|
|
1643
|
+
"*.sln",
|
|
1644
|
+
"*.csproj",
|
|
1645
|
+
"*.fsproj"
|
|
1646
|
+
],
|
|
1647
|
+
commands: [
|
|
1648
|
+
["Install", "dotnet restore"],
|
|
1649
|
+
["Build", "dotnet build"],
|
|
1650
|
+
["Test", "dotnet test"],
|
|
1651
|
+
["Lint", "dotnet format --verify-no-changes"],
|
|
1652
|
+
["Start", "dotnet run"]
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
when: ["Gemfile"],
|
|
1657
|
+
commands: [["Install", "bundle install"]]
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
when: ["bin/rails"],
|
|
1661
|
+
commands: [["Test", "bin/rails test"], ["Start", "bin/rails server"]]
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
when: [".rubocop.yml"],
|
|
1665
|
+
commands: [["Lint", "bundle exec rubocop"]]
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
when: [".rspec"],
|
|
1669
|
+
commands: [["Test", "bundle exec rspec"]]
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
when: ["composer.json"],
|
|
1673
|
+
commands: [["Install", "composer install"]]
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
when: ["bin/phpunit"],
|
|
1677
|
+
group: "phpunit",
|
|
1678
|
+
commands: [["Test", "bin/phpunit"]]
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
when: [
|
|
1682
|
+
"phpunit.xml.dist",
|
|
1683
|
+
"phpunit.xml",
|
|
1684
|
+
"vendor/bin/phpunit"
|
|
1685
|
+
],
|
|
1686
|
+
group: "phpunit",
|
|
1687
|
+
commands: [["Test", "vendor/bin/phpunit"]]
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
when: ["bin/console"],
|
|
1691
|
+
commands: [
|
|
1692
|
+
["Lint", "bin/console lint:container"],
|
|
1693
|
+
["Lint", "bin/console lint:yaml config"],
|
|
1694
|
+
["Lint", "bin/console lint:twig templates"]
|
|
1695
|
+
]
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
when: ["public/index.php"],
|
|
1699
|
+
commands: [["Start", "php -S localhost:8000 -t public"]]
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
when: ["artisan"],
|
|
1703
|
+
commands: [["Test", "php artisan test"], ["Start", "php artisan serve"]]
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
when: [
|
|
1707
|
+
"phpstan.neon",
|
|
1708
|
+
"phpstan.neon.dist",
|
|
1709
|
+
"phpstan.dist.neon"
|
|
1710
|
+
],
|
|
1711
|
+
commands: [["Lint", "vendor/bin/phpstan analyse"]]
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
when: [".php-cs-fixer.php", ".php-cs-fixer.dist.php"],
|
|
1715
|
+
commands: [["Lint", "vendor/bin/php-cs-fixer fix --dry-run --diff"]]
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
when: ["mix.exs"],
|
|
1719
|
+
commands: [
|
|
1720
|
+
["Install", "mix deps.get"],
|
|
1721
|
+
["Build", "mix compile"],
|
|
1722
|
+
["Test", "mix test"],
|
|
1723
|
+
["Lint", "mix format --check-formatted"]
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
when: ["Package.swift"],
|
|
1728
|
+
commands: [
|
|
1729
|
+
["Build", "swift build"],
|
|
1730
|
+
["Test", "swift test"],
|
|
1731
|
+
["Start", "swift run"]
|
|
1732
|
+
]
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
when: [".metadata"],
|
|
1736
|
+
also: "pubspec.yaml",
|
|
1737
|
+
group: "dart",
|
|
1738
|
+
commands: [
|
|
1739
|
+
["Install", "flutter pub get"],
|
|
1740
|
+
["Test", "flutter test"],
|
|
1741
|
+
["Lint", "flutter analyze"],
|
|
1742
|
+
["Start", "flutter run"]
|
|
1743
|
+
]
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
when: ["pubspec.yaml"],
|
|
1747
|
+
group: "dart",
|
|
1748
|
+
commands: [
|
|
1749
|
+
["Install", "dart pub get"],
|
|
1750
|
+
["Test", "dart test"],
|
|
1751
|
+
["Lint", "dart analyze"],
|
|
1752
|
+
["Start", "dart run"]
|
|
1753
|
+
]
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
when: ["CMakeLists.txt"],
|
|
1757
|
+
commands: [
|
|
1758
|
+
["Build", "cmake -B build"],
|
|
1759
|
+
["Build", "cmake --build build"],
|
|
1760
|
+
["Test", "ctest --test-dir build"]
|
|
1761
|
+
]
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
when: [
|
|
1765
|
+
"Makefile",
|
|
1766
|
+
"makefile",
|
|
1767
|
+
"GNUmakefile"
|
|
1768
|
+
],
|
|
1769
|
+
commands: [["Test", "make test"]]
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
when: [
|
|
1773
|
+
"justfile",
|
|
1774
|
+
"Justfile",
|
|
1775
|
+
".justfile"
|
|
1776
|
+
],
|
|
1777
|
+
commands: [["Test", "just test"]]
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
when: ["Taskfile.yml", "Taskfile.yaml"],
|
|
1781
|
+
commands: [["Test", "task test"]]
|
|
1782
|
+
}
|
|
1783
|
+
];
|
|
1784
|
+
var DEEP_FILES = [...new Set(STACKS.flatMap((stack) => stack.when.filter((file) => file.includes("/"))))];
|
|
1785
|
+
var found = (files, name) => name.startsWith("*.") ? files.find((file) => file.endsWith(name.slice(1))) : files.includes(name) ? name : void 0;
|
|
1786
|
+
/** Every command the rows of `STACKS` offer for these files, in the table's order. */
|
|
1787
|
+
function stackCommands(files) {
|
|
1788
|
+
const commands = [];
|
|
1789
|
+
const taken = /* @__PURE__ */ new Set();
|
|
1790
|
+
let run = "";
|
|
1791
|
+
for (const stack of STACKS) {
|
|
1792
|
+
if (stack.group !== void 0 && taken.has(stack.group)) continue;
|
|
1793
|
+
const file = stack.when.map((name) => found(files, name)).find((one) => one !== void 0);
|
|
1794
|
+
if (file === void 0 || stack.also !== void 0 && found(files, stack.also) === void 0) continue;
|
|
1795
|
+
if (stack.group !== void 0) taken.add(stack.group);
|
|
1796
|
+
if (stack.run !== void 0) run = stack.run;
|
|
1797
|
+
for (const [step, command] of stack.commands) commands.push({
|
|
1798
|
+
step,
|
|
1799
|
+
command: command.replace("{run}", run),
|
|
1800
|
+
file
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
return commands;
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* The first list for one repository, from its `package.json` scripts and the files at its top.
|
|
1807
|
+
*
|
|
1808
|
+
* For Node: install, test, lint and build, and only the scripts the project has. Each one runs
|
|
1809
|
+
* whatever `package.json` holds, and implement may edit that file, so the list trusts the project's
|
|
1810
|
+
* own scripts and no more. Every other stack comes from `STACKS`, all but its Start commands. A
|
|
1811
|
+
* repository with no file any row knows is offered nothing.
|
|
1812
|
+
*/
|
|
1813
|
+
function proposeAllowedCommands(scripts, files) {
|
|
1814
|
+
const proposed = [];
|
|
1815
|
+
if (scripts !== null && scripts !== void 0) {
|
|
1816
|
+
const manager = lockfileOf(files)?.[1] ?? "npm";
|
|
1817
|
+
const names = Object.keys(scripts);
|
|
1818
|
+
proposed.push(`${manager} install`, ...[
|
|
1819
|
+
"test",
|
|
1820
|
+
"lint",
|
|
1821
|
+
"build"
|
|
1822
|
+
].filter((name) => names.includes(name)).map((name) => scriptCommand(manager, name)));
|
|
1823
|
+
}
|
|
1824
|
+
return [...proposed, ...stackCommands(files).filter(({ step }) => step !== "Start").map(({ command }) => command)];
|
|
1825
|
+
}
|
|
1826
|
+
/**
|
|
1827
|
+
* Why a command cannot be allowed, or null when it can.
|
|
1828
|
+
*
|
|
1829
|
+
* The command has to start with a name. A leading `*` would be `Bash(*)`, which allows every
|
|
1830
|
+
* command, the one thing an empty list must never turn into. A parenthesis would close the pattern
|
|
1831
|
+
* early, and a new line would hide a second command behind the first.
|
|
1832
|
+
*
|
|
1833
|
+
* Variables set in front, as in `PORT=4320 npm *`, are fine with a fixed value and a command after
|
|
1834
|
+
* them. The engine matches a rule against the whole text and its `*` spans spaces, so `PORT=* npm *`
|
|
1835
|
+
* matches `PORT=1 rm -rf ~ npm`, and `PORT=4320 *` matches any command at all.
|
|
1836
|
+
*/
|
|
1837
|
+
var ASSIGNMENT = /^[A-Za-z_][A-Za-z0-9_]*=/;
|
|
1838
|
+
function allowedCommandProblem(command) {
|
|
1839
|
+
const typed = command.trim();
|
|
1840
|
+
if (typed === "") return "A command cannot be empty.";
|
|
1841
|
+
if (typed.startsWith("*")) return `${typed} names no command. Start with the command itself, such as npm test.`;
|
|
1842
|
+
if (typed.startsWith("-")) return `${typed} starts with a dash. Start with the command itself, such as npm test.`;
|
|
1843
|
+
if (/[()]/.test(typed)) return `${typed} holds a parenthesis, which the engine reads as the end of the pattern. Leave it out.`;
|
|
1844
|
+
if (/[\r\n]/.test(typed)) return "A command is one line.";
|
|
1845
|
+
const words = typed.split(/\s+/);
|
|
1846
|
+
const first = words.findIndex((word) => !ASSIGNMENT.test(word));
|
|
1847
|
+
const variables = first === -1 ? words : words.slice(0, first);
|
|
1848
|
+
if (variables.some((word) => /[*?[]/.test(word))) return `${typed} puts a wildcard in a variable, and the engine lets it match a whole other command, such as PORT=1 rm -rf ~ npm. Write the value out, such as PORT=4320 npm *.`;
|
|
1849
|
+
if (variables.some((word) => /["'\\]/.test(word))) return `${typed} quotes or escapes a variable's value, which can hide what the command is. Use a value with no spaces, such as PORT=4320 npm *.`;
|
|
1850
|
+
const named = first === -1 ? void 0 : words[first];
|
|
1851
|
+
if (named === void 0 || named.startsWith("*") || named.startsWith("-")) return `${typed} names no command after its variables, so it would allow any command. Name the command, such as PORT=4320 npm *.`;
|
|
1852
|
+
return null;
|
|
1853
|
+
}
|
|
1854
|
+
var CONTAINER_TOOLS = [
|
|
1855
|
+
"docker",
|
|
1856
|
+
"docker-compose",
|
|
1857
|
+
"podman",
|
|
1858
|
+
"nerdctl"
|
|
1859
|
+
];
|
|
1860
|
+
/** Whether an allowed command starts a container tool, after any `NAME=value` words in front. */
|
|
1861
|
+
function needsContainerDaemon(command) {
|
|
1862
|
+
const named = command.trim().split(/\s+/).find((word) => !ASSIGNMENT.test(word));
|
|
1863
|
+
return named !== void 0 && CONTAINER_TOOLS.includes(named);
|
|
1864
|
+
}
|
|
1865
|
+
/** A list of commands, one per line, as a list or the first line it refuses. */
|
|
1866
|
+
function parseAllowedCommands(text) {
|
|
1867
|
+
const lines = text.split(/\r?\n/);
|
|
1868
|
+
const value = [];
|
|
1869
|
+
for (const [index, line] of lines.entries()) {
|
|
1870
|
+
const typed = line.trim();
|
|
1871
|
+
if (typed === "") continue;
|
|
1872
|
+
const problem = allowedCommandProblem(typed);
|
|
1873
|
+
if (problem !== null) return {
|
|
1874
|
+
ok: false,
|
|
1875
|
+
message: `Line ${index + 1}: ${problem}`
|
|
1876
|
+
};
|
|
1877
|
+
if (!value.includes(typed)) value.push(typed);
|
|
1878
|
+
}
|
|
1879
|
+
return {
|
|
1880
|
+
ok: true,
|
|
1881
|
+
value
|
|
1882
|
+
};
|
|
1883
|
+
}
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region ../../packages/core/src/onboarding.ts
|
|
1886
|
+
var START = { done: false };
|
|
1887
|
+
function needsOnboarding(settings) {
|
|
1888
|
+
return settings.projectPath === null;
|
|
1889
|
+
}
|
|
1890
|
+
function validateProgress(value) {
|
|
1891
|
+
if (typeof value !== "object" || value === null) return "The first run progress is whether New project is done.";
|
|
1892
|
+
if (typeof value.done !== "boolean") return "Whether New project is done is yes or no.";
|
|
1893
|
+
return null;
|
|
1894
|
+
}
|
|
1895
|
+
function proposePrefix(folder) {
|
|
1896
|
+
const last = folder.split(/[^A-Za-z]+/).filter((word) => word.length >= 2).at(-1)?.toUpperCase();
|
|
1897
|
+
if (last === void 0) return "PROJ";
|
|
1898
|
+
const proposed = last.length <= 6 ? last : last.slice(0, 4);
|
|
1899
|
+
return researchKindOf(proposed) === void 0 ? proposed : "PROJ";
|
|
1900
|
+
}
|
|
1901
|
+
var researchKindOf = (prefix) => RESEARCH_KINDS.find((kind) => RESEARCH_PREFIXES[kind] === prefix);
|
|
1902
|
+
function prefixProblem(prefix, used, current) {
|
|
1903
|
+
if (!/^[A-Z]{2,6}$/.test(prefix)) return "The key prefix is two to six capital letters, such as APP.";
|
|
1904
|
+
const kind = researchKindOf(prefix);
|
|
1905
|
+
if (kind !== void 0) return `${prefix} is the key prefix of ${BOARD_LABELS[kind]} on Research. Pick another prefix.`;
|
|
1906
|
+
if (prefix !== current && used.includes(prefix)) return `${prefix} is in use by another project's tickets. Pick another prefix.`;
|
|
1907
|
+
return null;
|
|
1908
|
+
}
|
|
1909
|
+
var START_SCRIPTS = [
|
|
1910
|
+
"dev",
|
|
1911
|
+
"start",
|
|
1912
|
+
"serve",
|
|
1913
|
+
"up"
|
|
1914
|
+
];
|
|
1915
|
+
function proposeStart(scripts) {
|
|
1916
|
+
if (scripts === null || scripts === void 0) return null;
|
|
1917
|
+
const names = Object.keys(scripts);
|
|
1918
|
+
const start = START_SCRIPTS.find((name) => names.includes(name));
|
|
1919
|
+
return start === void 0 ? null : {
|
|
1920
|
+
command: `npm run ${start}`,
|
|
1921
|
+
from: start
|
|
1922
|
+
};
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* The address of an app a person started, as QA checks against it, or null for anything that is not
|
|
1926
|
+
* one http or https address. A bare `localhost:5173` gets `http://` in front, because that is how
|
|
1927
|
+
* people write the address of their own dev server.
|
|
1928
|
+
*/
|
|
1929
|
+
function appAddress(typed) {
|
|
1930
|
+
const text = typed.trim();
|
|
1931
|
+
if (text === "" || /\s/.test(text)) return null;
|
|
1932
|
+
const full = /^[a-z][a-z0-9+.-]*:\/\//i.test(text) ? text : `http://${text}`;
|
|
1933
|
+
try {
|
|
1934
|
+
const url = new URL(full);
|
|
1935
|
+
return (url.protocol === "http:" || url.protocol === "https:") && url.hostname !== "" ? full : null;
|
|
1936
|
+
} catch {
|
|
1937
|
+
return null;
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
var PLAYWRIGHT_PACKAGES = [
|
|
1941
|
+
"playwright",
|
|
1942
|
+
"@playwright/test",
|
|
1943
|
+
"@playwright/mcp"
|
|
1944
|
+
];
|
|
1945
|
+
/**
|
|
1946
|
+
* Whether one repository uses Playwright: a dependency in its `package.json`, or a Playwright config
|
|
1947
|
+
* file at its top. A script that only names it proves nothing, because the package may not be there.
|
|
1948
|
+
*/
|
|
1949
|
+
function usesPlaywright(manifest, files) {
|
|
1950
|
+
if (files.some((file) => /^playwright\.config\.[cm]?[jt]s$/.test(file))) return true;
|
|
1951
|
+
if (typeof manifest !== "object" || manifest === null) return false;
|
|
1952
|
+
return ["dependencies", "devDependencies"].some((field) => {
|
|
1953
|
+
const listed = manifest[field];
|
|
1954
|
+
return typeof listed === "object" && listed !== null && PLAYWRIGHT_PACKAGES.some((name) => Object.hasOwn(listed, name));
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
function scriptPort(script) {
|
|
1958
|
+
const found = /(?:^|\s)(?:--port[=\s]|-p\s)\s*(\d{2,5})\b/.exec(script ?? "");
|
|
1959
|
+
return found === null ? null : Number(found[1]);
|
|
1960
|
+
}
|
|
1961
|
+
//#endregion
|
|
1962
|
+
//#region ../../packages/core/src/jira-site.ts
|
|
1963
|
+
/**
|
|
1964
|
+
* The account email and the API token as one Basic header.
|
|
1965
|
+
*
|
|
1966
|
+
* The bytes come from `TextEncoder` and not from `Buffer`, because this package runs on Workers and
|
|
1967
|
+
* a Worker has no `Buffer`. `btoa` reads one byte per character, so the bytes are spelled out as
|
|
1968
|
+
* characters first. Without that step `btoa` does not fail loudly on an email with an accent in it:
|
|
1969
|
+
* it sends `é` as one byte instead of two, Jira answers 401, and nothing says why. It throws only
|
|
1970
|
+
* from U+0100 up. Checked against the `Buffer` version this replaced: the same base64 for an ascii
|
|
1971
|
+
* email and for an accented one.
|
|
1972
|
+
*/
|
|
1973
|
+
var basicAuth = (email, token) => {
|
|
1974
|
+
let characters = "";
|
|
1975
|
+
for (const byte of new TextEncoder().encode(`${email}:${token}`)) characters += String.fromCharCode(byte);
|
|
1976
|
+
return `Basic ${btoa(characters)}`;
|
|
1977
|
+
};
|
|
1978
|
+
/**
|
|
1979
|
+
* The site address a person typed, as an origin.
|
|
1980
|
+
*
|
|
1981
|
+
* https only: Basic auth over http would put the token on the wire in the clear. A user name or a
|
|
1982
|
+
* password in the address is refused rather than used, because the token belongs in the keychain.
|
|
1983
|
+
* The path is dropped, because every call names a full path of its own.
|
|
1984
|
+
*/
|
|
1985
|
+
function siteOrigin(value) {
|
|
1986
|
+
let url;
|
|
1987
|
+
try {
|
|
1988
|
+
url = new URL(value.trim());
|
|
1989
|
+
} catch {
|
|
1990
|
+
throw new Error("That is not a site address. A Jira site address looks like https://your-site.atlassian.net.");
|
|
1991
|
+
}
|
|
1992
|
+
if (url.protocol !== "https:") throw new Error("A Jira site address starts with https, so the API token is never sent in the clear.");
|
|
1993
|
+
if (url.username !== "" || url.password !== "") throw new Error("A Jira site address carries no user name and no password. The API token goes into the keychain.");
|
|
1994
|
+
return new URL(url.origin);
|
|
1995
|
+
}
|
|
1996
|
+
var TICKET_SYSTEMS = ["local", "jira"];
|
|
1997
|
+
var GETTING_STARTED_STEPS = ["summary", "push"];
|
|
1998
|
+
var NEW_PROJECT_BRANCH_TEMPLATE = "{type}/{key}/{desc}";
|
|
1999
|
+
var DEFAULTS = {
|
|
2000
|
+
agentSlots: 3,
|
|
2001
|
+
runTimeoutMs: 18e5,
|
|
2002
|
+
quietAfterMs: 3e5,
|
|
2003
|
+
retryWaitsMs: [
|
|
2004
|
+
12e4,
|
|
2005
|
+
3e5,
|
|
2006
|
+
9e5
|
|
2007
|
+
],
|
|
2008
|
+
keepAwake: true,
|
|
2009
|
+
modelPreset: "default",
|
|
2010
|
+
models: {},
|
|
2011
|
+
savedPresets: [],
|
|
2012
|
+
presetEngine: null,
|
|
2013
|
+
savedPreset: null,
|
|
2014
|
+
presetChosen: false,
|
|
2015
|
+
presetChoices: null,
|
|
2016
|
+
engineProfiles: [DEFAULT_PROFILE],
|
|
2017
|
+
engineLimits: {},
|
|
2018
|
+
deliveryFlow: "pull-request",
|
|
2019
|
+
baseBranch: "main",
|
|
2020
|
+
repos: null,
|
|
2021
|
+
workspace: null,
|
|
2022
|
+
branchTemplate: NEW_PROJECT_BRANCH_TEMPLATE,
|
|
2023
|
+
offBoards: [],
|
|
2024
|
+
chainBoards: [],
|
|
2025
|
+
chainNotNow: 0,
|
|
2026
|
+
ticketSystem: "local",
|
|
2027
|
+
jiraSite: null,
|
|
2028
|
+
jiraEmail: null,
|
|
2029
|
+
jiraKeyClash: null,
|
|
2030
|
+
localKeyPrefix: "APP",
|
|
2031
|
+
qaMcpConfigPath: null,
|
|
2032
|
+
qaApp: null,
|
|
2033
|
+
allowedCommands: null,
|
|
2034
|
+
wallLists: {
|
|
2035
|
+
hidden: [],
|
|
2036
|
+
exceptions: [],
|
|
2037
|
+
writable: []
|
|
2038
|
+
},
|
|
2039
|
+
knowledgeDir: null,
|
|
2040
|
+
reviewKnowledge: false,
|
|
2041
|
+
projectPath: null,
|
|
2042
|
+
clientName: null,
|
|
2043
|
+
hourlyRate: null,
|
|
2044
|
+
currency: "USD",
|
|
2045
|
+
billingAsked: false,
|
|
2046
|
+
projectId: null,
|
|
2047
|
+
teamProjectId: null,
|
|
2048
|
+
exportProjectId: null,
|
|
2049
|
+
hubJobDone: 0,
|
|
2050
|
+
teamHubJobDone: 0,
|
|
2051
|
+
accountProjects: null,
|
|
2052
|
+
syncPaused: false,
|
|
2053
|
+
onboarding: START,
|
|
2054
|
+
seenNotes: [],
|
|
2055
|
+
gettingStarted: null,
|
|
2056
|
+
currentProject: null,
|
|
2057
|
+
scoutSeen: null,
|
|
2058
|
+
pullsReadAt: null,
|
|
2059
|
+
pullsAskOnly: false,
|
|
2060
|
+
setupSteps: null,
|
|
2061
|
+
afterLearn: [],
|
|
2062
|
+
termsAccepted: null
|
|
2063
|
+
};
|
|
2064
|
+
var MACHINE_KEYS = [
|
|
2065
|
+
"agentSlots",
|
|
2066
|
+
"runTimeoutMs",
|
|
2067
|
+
"retryWaitsMs",
|
|
2068
|
+
"keepAwake",
|
|
2069
|
+
"engineProfiles",
|
|
2070
|
+
"engineLimits",
|
|
2071
|
+
"hubJobDone",
|
|
2072
|
+
"accountProjects",
|
|
2073
|
+
"syncPaused",
|
|
2074
|
+
"onboarding",
|
|
2075
|
+
"seenNotes",
|
|
2076
|
+
"gettingStarted",
|
|
2077
|
+
"currentProject",
|
|
2078
|
+
"jiraSite",
|
|
2079
|
+
"jiraEmail",
|
|
2080
|
+
"termsAccepted"
|
|
2081
|
+
];
|
|
2082
|
+
var isMachineKey = (key) => MACHINE_KEYS.includes(key);
|
|
2083
|
+
/**
|
|
2084
|
+
* The sentence that refuses a saved preset list, or null when it is fine.
|
|
2085
|
+
*
|
|
2086
|
+
* The same rules the screen refuses a typed name with, so a hand edited database cannot hold a
|
|
2087
|
+
* name the screen would not take. A row of a profile this machine no longer holds passes, because
|
|
2088
|
+
* applying such a preset marks that row and writes the rest.
|
|
2089
|
+
*/
|
|
2090
|
+
function validateSavedPresets(value) {
|
|
2091
|
+
if (!Array.isArray(value)) return "The saved presets are a list.";
|
|
2092
|
+
const taken = [];
|
|
2093
|
+
for (const row of value) {
|
|
2094
|
+
if (typeof row !== "object" || row === null || Array.isArray(row)) return "A saved preset is a name and a table of actions.";
|
|
2095
|
+
const { name, models } = row;
|
|
2096
|
+
if (typeof name !== "string") return "A saved preset needs a name.";
|
|
2097
|
+
const refusedName = presetNameProblem(name, [...PRESET_NAMES, ...taken]);
|
|
2098
|
+
if (refusedName !== null) return refusedName;
|
|
2099
|
+
const refused = validateModelTable(models);
|
|
2100
|
+
if (refused !== null) return refused;
|
|
2101
|
+
taken.push(name.trim());
|
|
2102
|
+
}
|
|
2103
|
+
return null;
|
|
2104
|
+
}
|
|
2105
|
+
var RETIRED_VENDORS = ["antigravity"];
|
|
2106
|
+
var retired = (row) => typeof row === "object" && row !== null && RETIRED_VENDORS.includes(String(row.vendor));
|
|
2107
|
+
/**
|
|
2108
|
+
* The sentence that refuses a profile list, or null when it is fine.
|
|
2109
|
+
*
|
|
2110
|
+
* An empty list is refused rather than filled in: the list is what every action with no engine of
|
|
2111
|
+
* its own inherits from, so an empty one would make every drop fail with a message about a
|
|
2112
|
+
* profile nobody removed on purpose.
|
|
2113
|
+
*/
|
|
2114
|
+
function validateProfiles(value) {
|
|
2115
|
+
if (!Array.isArray(value)) return "The engine profiles are a list.";
|
|
2116
|
+
if (value.length === 0) return "There has to be at least one engine profile.";
|
|
2117
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2118
|
+
const vendors = /* @__PURE__ */ new Map();
|
|
2119
|
+
for (const row of value) {
|
|
2120
|
+
if (typeof row !== "object" || row === null || Array.isArray(row)) return "An engine profile is an id, a label, a vendor and a config folder.";
|
|
2121
|
+
const { id, label, vendor, configDir } = row;
|
|
2122
|
+
if (typeof id !== "string" || !isProfileId(id)) return `${String(id)} is not an engine profile id. One looks like claude-code or codex#work.`;
|
|
2123
|
+
if (seen.has(id)) return `There are two engine profiles with the id ${id}.`;
|
|
2124
|
+
seen.add(id);
|
|
2125
|
+
if (typeof label !== "string" || label.trim() === "") return `The profile ${id} needs a label.`;
|
|
2126
|
+
if (typeof vendor !== "string" || !isEngineName(vendor)) return `The profile ${id} names the vendor ${String(vendor)}, which this version does not know.`;
|
|
2127
|
+
if (configDir !== null && typeof configDir !== "string") return `The config folder of ${id} is a path, or nothing for the vendor's own place.`;
|
|
2128
|
+
if (typeof configDir === "string") {
|
|
2129
|
+
if (!configDir.startsWith("/") && !/^[A-Za-z]:[\\/]/.test(configDir)) return `The config folder of ${id} is not a full path. A path starting with ~ is not expanded, so write the folder out in full.`;
|
|
2130
|
+
}
|
|
2131
|
+
const place = `${vendor}\u0000${configDir ?? ""}`;
|
|
2132
|
+
const sharing = vendors.get(place);
|
|
2133
|
+
if (sharing !== void 0) return configDir === null ? `The profiles ${sharing} and ${id} are both ${vendor} with no config folder, so they would share one login. Give the second one a folder of its own.` : `The profiles ${sharing} and ${id} are both ${vendor} on the config folder ${configDir}, so they would share one login. Give the second one a folder of its own.`;
|
|
2134
|
+
vendors.set(place, id);
|
|
2135
|
+
}
|
|
2136
|
+
return null;
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* The sentence that refuses a stored limit state, or null when it is fine.
|
|
2140
|
+
*
|
|
2141
|
+
* Nothing but a run writes this, so a person never reads these sentences. It is checked all the
|
|
2142
|
+
* same, because a hand edited database would otherwise draw a share of NaN on the Engines screen,
|
|
2143
|
+
* and every field here is one an engine may leave out.
|
|
2144
|
+
*/
|
|
2145
|
+
function validateLimits(value) {
|
|
2146
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return "The engine limit states are one entry per profile id.";
|
|
2147
|
+
for (const [id, seen] of Object.entries(value)) {
|
|
2148
|
+
if (!isProfileId(id)) return `${id} is not an engine profile id.`;
|
|
2149
|
+
if (typeof seen !== "object" || seen === null || Array.isArray(seen)) return `The limit state of ${id} is the time it was seen and a list of windows.`;
|
|
2150
|
+
const { seenAt, windows } = seen;
|
|
2151
|
+
if (typeof seenAt !== "number" || !Number.isFinite(seenAt)) return `The limit state of ${id} needs the time it was seen.`;
|
|
2152
|
+
if (!Array.isArray(windows)) return `The limit state of ${id} holds a list of usage windows.`;
|
|
2153
|
+
for (const window of windows) {
|
|
2154
|
+
if (typeof window !== "object" || window === null || Array.isArray(window)) return `A usage window of ${id} is a name, a share, a reset time and a status.`;
|
|
2155
|
+
const { name, used, resetsAt, status } = window;
|
|
2156
|
+
if (typeof name !== "string" || name.trim() === "") return `A usage window of ${id} needs the name the engine gave it.`;
|
|
2157
|
+
if (used !== null && !(typeof used === "number" && Number.isFinite(used))) return `The share of the ${name} window of ${id} is a number, or nothing when the engine reported none.`;
|
|
2158
|
+
if (resetsAt !== null && !(typeof resetsAt === "number" && Number.isFinite(resetsAt))) return `The reset time of the ${name} window of ${id} is unix seconds, or nothing when the engine reported none.`;
|
|
2159
|
+
if (status !== null && typeof status !== "string") return `The status of the ${name} window of ${id} is the engine's own word, or nothing.`;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
return null;
|
|
2163
|
+
}
|
|
2164
|
+
var NOLZU_FOLDERS = [
|
|
2165
|
+
"worktrees",
|
|
2166
|
+
".tasks",
|
|
2167
|
+
".nolzu"
|
|
2168
|
+
];
|
|
2169
|
+
var isNolzuFolder = (value) => NOLZU_FOLDERS.includes(value.toLowerCase());
|
|
2170
|
+
var QA_APP_REFUSED = "QA gets the app by a start command in one repository, by your own commands, at an address the person runs, or not at all.";
|
|
2171
|
+
var optionalCommand = (value) => value === void 0 || value === null ? null : typeof value === "string" ? value.trim() || null : void 0;
|
|
2172
|
+
function qaAppOf(value) {
|
|
2173
|
+
const app = typeof value === "object" && value !== null ? value : {};
|
|
2174
|
+
if (app.mode === "code") return { mode: "code" };
|
|
2175
|
+
if (app.mode === "own") {
|
|
2176
|
+
const stop = optionalCommand(app.stop);
|
|
2177
|
+
const status = optionalCommand(app.status);
|
|
2178
|
+
const start = typeof app.start === "string" ? app.start.trim() : "";
|
|
2179
|
+
return start === "" || stop === void 0 || status === void 0 ? null : {
|
|
2180
|
+
mode: "own",
|
|
2181
|
+
start,
|
|
2182
|
+
stop,
|
|
2183
|
+
status
|
|
2184
|
+
};
|
|
2185
|
+
}
|
|
2186
|
+
if (app.mode === "running") {
|
|
2187
|
+
const address = typeof app.address === "string" ? appAddress(app.address) : null;
|
|
2188
|
+
return address === null ? null : {
|
|
2189
|
+
mode: "running",
|
|
2190
|
+
address
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2193
|
+
if (app.mode === "dev" && typeof app.command === "string" && app.command.trim() !== "" && typeof app.repo === "string" && (app.repo === "." || isFolderName(app.repo))) {
|
|
2194
|
+
const scripts = typeof app.scripts === "string" && /^[0-9a-f]{64}$/.test(app.scripts) ? { scripts: app.scripts } : {};
|
|
2195
|
+
if (app.folder !== void 0 && (typeof app.folder !== "string" || !isFolderName(app.folder))) return null;
|
|
2196
|
+
return {
|
|
2197
|
+
mode: "dev",
|
|
2198
|
+
command: app.command.trim(),
|
|
2199
|
+
repo: app.repo,
|
|
2200
|
+
...app.folder === void 0 ? {} : { folder: app.folder },
|
|
2201
|
+
...scripts
|
|
2202
|
+
};
|
|
2203
|
+
}
|
|
2204
|
+
return null;
|
|
2205
|
+
}
|
|
2206
|
+
var isFolderName = (value) => value !== "" && !value.startsWith("-") && !isNolzuFolder(value) && value !== "." && value !== ".." && value.toLowerCase() !== ".git" && ![...value].some((character) => {
|
|
2207
|
+
const code = character.codePointAt(0) ?? 0;
|
|
2208
|
+
return code < 32 || code === 127 || character === "/" || character === "\\";
|
|
2209
|
+
});
|
|
2210
|
+
/**
|
|
2211
|
+
* The sentence that refuses a repository list, or null when it is fine.
|
|
2212
|
+
*
|
|
2213
|
+
* "." comes first because its checkout is the card's root folder, and the other checkouts are made
|
|
2214
|
+
* inside it. A workspace list may be empty, and never holds ".".
|
|
2215
|
+
*/
|
|
2216
|
+
function validateRepos(value, workspace = false) {
|
|
2217
|
+
if (!Array.isArray(value)) return "The repositories are a list of folders, or nothing for one repository at the project folder.";
|
|
2218
|
+
if (value.length === 0 && !workspace) return "The repository list is empty. Leave it unset for one repository at the project folder.";
|
|
2219
|
+
const taken = /* @__PURE__ */ new Set();
|
|
2220
|
+
for (const [index, row] of value.entries()) {
|
|
2221
|
+
if (typeof row !== "object" || row === null || Array.isArray(row)) return "A repository is a folder and a base branch.";
|
|
2222
|
+
const { path, base } = row;
|
|
2223
|
+
if (typeof path !== "string") return "A repository needs a folder.";
|
|
2224
|
+
const name = JSON.stringify(path);
|
|
2225
|
+
if (path === "." && workspace) return "A workspace is never a repository a card changes, so \".\" is not in its list.";
|
|
2226
|
+
if (isNolzuFolder(path)) return `The folder ${name} is where Nolzu keeps its own files, so it cannot be a repository.`;
|
|
2227
|
+
if (path.startsWith("-")) return `The repository folder ${name} starts with "-", which git would read as an option.`;
|
|
2228
|
+
if (path !== "." && !isFolderName(path)) return `The repository folder ${name} is not "." or one folder name inside the project.`;
|
|
2229
|
+
if (taken.has(path.toLowerCase())) return `The repository ${name} is in the list twice.`;
|
|
2230
|
+
if (path === "." && index !== 0) return "The project folder \".\" comes first in the repository list.";
|
|
2231
|
+
if (base !== null && typeof base !== "string") return `The base branch of ${name} is not a branch name.`;
|
|
2232
|
+
if (typeof base === "string" && base.trim() === "") return `The base branch of ${name} is empty. Name a branch, or leave it unset to use the project's base branch.`;
|
|
2233
|
+
taken.add(path.toLowerCase());
|
|
2234
|
+
}
|
|
2235
|
+
return null;
|
|
2236
|
+
}
|
|
2237
|
+
var projectRepos = (settings) => (settings.repos ?? [{
|
|
2238
|
+
path: ".",
|
|
2239
|
+
base: null
|
|
2240
|
+
}]).map(({ path, base }) => ({
|
|
2241
|
+
path,
|
|
2242
|
+
base: base ?? settings.baseBranch
|
|
2243
|
+
}));
|
|
2244
|
+
var NO_REPOSITORY = "This project has no repository yet. Add one in Project settings.";
|
|
2245
|
+
var ok = (value) => ({
|
|
2246
|
+
ok: true,
|
|
2247
|
+
value
|
|
2248
|
+
});
|
|
2249
|
+
var no = (message) => ({
|
|
2250
|
+
ok: false,
|
|
2251
|
+
message
|
|
2252
|
+
});
|
|
2253
|
+
var isWholeNumber = (value) => typeof value === "number" && Number.isInteger(value);
|
|
2254
|
+
var AGENT_SLOTS = {
|
|
2255
|
+
min: 1,
|
|
2256
|
+
max: 20
|
|
2257
|
+
};
|
|
2258
|
+
var VALIDATORS = {
|
|
2259
|
+
agentSlots: (value) => isWholeNumber(value) && value >= AGENT_SLOTS.min && value <= AGENT_SLOTS.max ? ok(value) : no(`Agent slots must be a whole number from ${AGENT_SLOTS.min} to ${AGENT_SLOTS.max}.`),
|
|
2260
|
+
runTimeoutMs: (value) => typeof value === "number" && value >= 6e4 ? ok(value) : no("The run timeout must be at least one minute, in milliseconds."),
|
|
2261
|
+
quietAfterMs: (value) => isWholeNumber(value) && value >= 6e4 && value % 6e4 === 0 ? ok(value) : no("The quiet time must be whole minutes, at least one, given in milliseconds."),
|
|
2262
|
+
retryWaitsMs: (value) => Array.isArray(value) && value.every((wait) => typeof wait === "number" && wait > 0) ? ok(value) : no("The retry waits are a list of millisecond numbers above zero, or an empty list for no retry."),
|
|
2263
|
+
keepAwake: (value) => typeof value === "boolean" ? ok(value) : no("Keep awake is either on or off."),
|
|
2264
|
+
modelPreset: (value) => value === "light" || value === "default" || value === "heavy" ? ok(value) : no("The model preset is light, default or heavy."),
|
|
2265
|
+
models: (value) => {
|
|
2266
|
+
const table = renamedActions(value);
|
|
2267
|
+
const refused = validateModelTable(table);
|
|
2268
|
+
return refused === null ? ok(table) : no(refused);
|
|
2269
|
+
},
|
|
2270
|
+
savedPresets: (value) => {
|
|
2271
|
+
const list = Array.isArray(value) ? value.map((row) => typeof row === "object" && row !== null && !Array.isArray(row) ? {
|
|
2272
|
+
...row,
|
|
2273
|
+
models: renamedActions(row.models)
|
|
2274
|
+
} : row) : value;
|
|
2275
|
+
const refused = validateSavedPresets(list);
|
|
2276
|
+
return refused === null ? ok(list) : no(refused);
|
|
2277
|
+
},
|
|
2278
|
+
presetEngine: (value) => value === null || typeof value === "string" && isEngineName(value) ? ok(value) : no("The preset engine is an engine name, or none."),
|
|
2279
|
+
savedPreset: (value) => value === null || typeof value === "string" && value.trim() !== "" ? ok(value) : no("The chosen preset is a saved preset name, or none."),
|
|
2280
|
+
presetChosen: (value) => typeof value === "boolean" ? ok(value) : no("Whether a preset was chosen is either on or off."),
|
|
2281
|
+
presetChoices: (value) => {
|
|
2282
|
+
if (value === null) return ok(value);
|
|
2283
|
+
if (typeof value !== "object" || Array.isArray(value)) return no("The phases changed per preset are a table by preset and engine.");
|
|
2284
|
+
const tables = Object.fromEntries(Object.entries(value).filter(([key]) => !RETIRED_VENDORS.includes(key.split(":")[1] ?? "")).map(([key, table]) => [key, renamedActions(table)]));
|
|
2285
|
+
for (const [key, table] of Object.entries(tables)) {
|
|
2286
|
+
const [preset, engine] = key.split(":");
|
|
2287
|
+
if (!PRESET_NAMES.includes(preset ?? "") || !isEngineName(engine ?? "")) return no(`${key} is not a preset and an engine, such as heavy:cursor.`);
|
|
2288
|
+
const refused = validateModelTable(table);
|
|
2289
|
+
if (refused !== null) return no(refused);
|
|
2290
|
+
}
|
|
2291
|
+
return ok(tables);
|
|
2292
|
+
},
|
|
2293
|
+
engineProfiles: (value) => {
|
|
2294
|
+
const list = Array.isArray(value) ? value.filter((row) => !retired(row)) : value;
|
|
2295
|
+
const refused = validateProfiles(list);
|
|
2296
|
+
return refused === null ? ok(list) : no(refused);
|
|
2297
|
+
},
|
|
2298
|
+
engineLimits: (value) => {
|
|
2299
|
+
const refused = validateLimits(value);
|
|
2300
|
+
return refused === null ? ok(value) : no(refused);
|
|
2301
|
+
},
|
|
2302
|
+
deliveryFlow: (value) => value === "pull-request" ? ok(value) : no("The Delivery flow is pull-request."),
|
|
2303
|
+
baseBranch: (value) => typeof value === "string" && value.trim() !== "" ? ok(value) : no("The base branch cannot be empty."),
|
|
2304
|
+
repos: (value, workspace) => {
|
|
2305
|
+
if (value === null) return ok(value);
|
|
2306
|
+
const refused = validateRepos(value, workspace);
|
|
2307
|
+
return refused === null ? ok(value.map(({ path, base }) => ({
|
|
2308
|
+
path,
|
|
2309
|
+
base
|
|
2310
|
+
}))) : no(refused);
|
|
2311
|
+
},
|
|
2312
|
+
workspace: (value) => value === true || value === null ? ok(value) : no("The workspace setting is true for a workspace, or unset for an ordinary project."),
|
|
2313
|
+
branchTemplate: (value) => typeof value === "string" && value.includes("{key}") ? ok(value) : no("The branch template must carry {key}, so the branch name carries the card key."),
|
|
2314
|
+
offBoards: (value) => {
|
|
2315
|
+
if (!Array.isArray(value) || !value.every((one) => typeof one === "string")) return no("The boards that are off are a list of board names.");
|
|
2316
|
+
const refused = value.find((one, index) => one === "delivery" || !isBoardKind(one) || value.indexOf(one) !== index);
|
|
2317
|
+
const research = value.filter((one) => isResearchKind(one));
|
|
2318
|
+
if (refused === void 0) return ok(research.length === 1 ? value.filter((one) => !isResearchKind(one)) : value);
|
|
2319
|
+
if (refused === "delivery") return no("The Delivery board cannot be turned off.");
|
|
2320
|
+
return isBoardKind(refused) ? no(`The ${BOARD_LABELS[refused]} board is in the list twice.`) : no(`There is no ${refused} board.`);
|
|
2321
|
+
},
|
|
2322
|
+
chainBoards: (value) => {
|
|
2323
|
+
if (!Array.isArray(value) || !value.every((one) => typeof one === "string")) return no("The boards with a chain turned on are a list of board names.");
|
|
2324
|
+
const refused = value.find((one, index) => !isBoardKind(one) || value.indexOf(one) !== index);
|
|
2325
|
+
if (refused === void 0) return ok(value);
|
|
2326
|
+
return isBoardKind(refused) ? no(`The ${BOARD_LABELS[refused]} board is in the list twice.`) : no(`There is no ${refused} board.`);
|
|
2327
|
+
},
|
|
2328
|
+
chainNotNow: (value) => isWholeNumber(value) && value >= 0 ? ok(value) : no("The Not now mark is a card move id, zero or more."),
|
|
2329
|
+
ticketSystem: (value) => TICKET_SYSTEMS.includes(value) ? ok(value) : no("The ticket system is local or jira."),
|
|
2330
|
+
jiraSite: (value) => {
|
|
2331
|
+
if (value === null) return ok(value);
|
|
2332
|
+
if (typeof value !== "string") return no("A Jira site address looks like https://your-site.atlassian.net.");
|
|
2333
|
+
try {
|
|
2334
|
+
return ok(siteOrigin(value).origin);
|
|
2335
|
+
} catch (error) {
|
|
2336
|
+
return no(error.message);
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2339
|
+
jiraEmail: (value) => value === null || typeof value === "string" && /^[^\s@]+@[^\s@]+$/.test(value.trim()) ? ok(typeof value === "string" ? value.trim() : value) : no("The Jira account email is the address you sign in to Jira with, such as you@example.com."),
|
|
2340
|
+
jiraKeyClash: (value) => {
|
|
2341
|
+
const clash = value;
|
|
2342
|
+
if (clash === null) return ok(null);
|
|
2343
|
+
return typeof clash === "object" && typeof clash.prefix === "string" && typeof clash.site === "string" && (clash.suggestion === null || typeof clash.suggestion === "string") ? ok({
|
|
2344
|
+
prefix: clash.prefix,
|
|
2345
|
+
site: clash.site,
|
|
2346
|
+
suggestion: clash.suggestion
|
|
2347
|
+
}) : no("The Jira key clash is a prefix, a site and a suggestion, or nothing.");
|
|
2348
|
+
},
|
|
2349
|
+
localKeyPrefix: (value) => typeof value === "string" && /^[A-Z]{2,6}$/.test(value) ? ok(value) : no("The local key prefix is two to six uppercase letters, such as APP."),
|
|
2350
|
+
qaMcpConfigPath: (value) => value === null || typeof value === "string" && (value.startsWith("/") || /^[A-Za-z]:[\\/]/.test(value) || value.startsWith("\\\\")) ? ok(value) : no("The browser config is a full path to a file, such as /home/you/.nolzu/playwright-mcp.json, or nothing."),
|
|
2351
|
+
qaApp: (value) => {
|
|
2352
|
+
if (value === null) return ok(value);
|
|
2353
|
+
if (typeof value !== "object" || Array.isArray(value)) return no(QA_APP_REFUSED);
|
|
2354
|
+
const map = value;
|
|
2355
|
+
if ("mode" in map) {
|
|
2356
|
+
const one = qaAppOf(map);
|
|
2357
|
+
return one === null ? no(QA_APP_REFUSED) : ok({ [one.mode === "dev" ? one.repo : "*"]: one });
|
|
2358
|
+
}
|
|
2359
|
+
const apps = {};
|
|
2360
|
+
for (const [repo, answer] of Object.entries(map)) {
|
|
2361
|
+
const one = qaAppOf(answer);
|
|
2362
|
+
if (one === null || repo !== "*" && repo !== "." && !isFolderName(repo) || one.mode === "dev" && one.repo !== repo) return no(QA_APP_REFUSED);
|
|
2363
|
+
apps[repo] = one;
|
|
2364
|
+
}
|
|
2365
|
+
return ok(Object.keys(apps).length === 0 ? null : apps);
|
|
2366
|
+
},
|
|
2367
|
+
allowedCommands: (value) => {
|
|
2368
|
+
if (value === null) return ok(value);
|
|
2369
|
+
if (!Array.isArray(value) || !value.every((command) => typeof command === "string")) return no("The allowed commands are a list of commands.");
|
|
2370
|
+
return ok(value.filter((command) => allowedCommandProblem(command) === null));
|
|
2371
|
+
},
|
|
2372
|
+
wallLists: (value) => {
|
|
2373
|
+
const lists = value;
|
|
2374
|
+
const isList = (list) => Array.isArray(list) && list.every((entry) => typeof entry === "string");
|
|
2375
|
+
return typeof lists === "object" && lists !== null && isList(lists.hidden) && isList(lists.exceptions) && isList(lists.writable) ? ok({
|
|
2376
|
+
hidden: lists.hidden,
|
|
2377
|
+
exceptions: lists.exceptions,
|
|
2378
|
+
writable: lists.writable
|
|
2379
|
+
}) : no("The wall lists are three lists of paths: hidden, exceptions and writable.");
|
|
2380
|
+
},
|
|
2381
|
+
knowledgeDir: (value) => value === null || typeof value === "string" && (value.startsWith("/") || /^[A-Za-z]:[\\/]/.test(value) || value.startsWith("\\\\")) ? ok(value) : no("The knowledge folder is a full folder path, or nothing."),
|
|
2382
|
+
reviewKnowledge: (value) => typeof value === "boolean" ? ok(value) : no("Reviewing knowledge changes is either on or off."),
|
|
2383
|
+
projectPath: (value) => value === null || typeof value === "string" && (value.startsWith("/") || /^[A-Za-z]:[\\/]/.test(value) || value.startsWith("\\\\")) ? ok(value) : no("The project path is a full folder path, such as /home/you/recipes, or nothing."),
|
|
2384
|
+
clientName: (value) => value === null || typeof value === "string" && value.trim() !== "" ? ok(value) : no("The client name is a name, or nothing at all."),
|
|
2385
|
+
hourlyRate: (value) => value === null || typeof value === "number" && Number.isFinite(value) && value >= 0 ? ok(value) : no("The hourly rate is a number, such as 80, or nothing at all."),
|
|
2386
|
+
currency: (value) => typeof value === "string" && /^[A-Z]{3}$/.test(value) ? ok(value) : no("The currency is a three-letter code, such as USD."),
|
|
2387
|
+
billingAsked: (value) => typeof value === "boolean" ? ok(value) : no("Whether Evidence asked about billing is either yes or no."),
|
|
2388
|
+
projectId: (value) => value === null || typeof value === "string" && value.trim() !== "" ? ok(value) : no("The project id is the id this machine was registered with, or nothing at all."),
|
|
2389
|
+
teamProjectId: (value) => value === null || typeof value === "string" && value.trim() !== "" ? ok(value) : no("The team project id is the id the team hub minted, or nothing at all."),
|
|
2390
|
+
exportProjectId: (value) => value === null || typeof value === "string" && value.trim() !== "" ? ok(value) : no("The export project id is the id this machine minted at its first export, or nothing at all."),
|
|
2391
|
+
hubJobDone: (value) => isWholeNumber(value) && value >= 0 ? ok(value) : no("The last finished hub job is a whole number, zero or more."),
|
|
2392
|
+
teamHubJobDone: (value) => isWholeNumber(value) && value >= 0 ? ok(value) : no("The last finished team hub job is a whole number, zero or more."),
|
|
2393
|
+
accountProjects: (value) => {
|
|
2394
|
+
if (value === null) return ok(value);
|
|
2395
|
+
try {
|
|
2396
|
+
return ok(readProjectList({ projects: value }).projects);
|
|
2397
|
+
} catch (error) {
|
|
2398
|
+
return no(error instanceof Error ? error.message : String(error));
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
syncPaused: (value) => typeof value === "boolean" ? ok(value) : no("Sync after a cloud data delete is either paused or not."),
|
|
2402
|
+
onboarding: (value) => {
|
|
2403
|
+
const refused = validateProgress(value);
|
|
2404
|
+
return refused === null ? ok({ done: value.done }) : no(refused);
|
|
2405
|
+
},
|
|
2406
|
+
seenNotes: (value) => Array.isArray(value) && value.every((note) => typeof note === "string" && /^[a-z][a-z0-9-]*$/.test(note)) ? ok(value) : no("The closed coach notes are a list of note names, such as first-drag."),
|
|
2407
|
+
gettingStarted: (value) => value === null || Array.isArray(value) && value.every((step) => GETTING_STARTED_STEPS.includes(step)) && new Set(value).size === value.length ? ok(value) : no("The steps of Getting started that are done are a list of summary and push, each once."),
|
|
2408
|
+
currentProject: (value) => value === null || isWholeNumber(value) && value >= 1 ? ok(value) : no("The current project is the id of a project on this machine, or nothing."),
|
|
2409
|
+
scoutSeen: (value) => value === null || typeof value === "string" && !Number.isNaN(Date.parse(value)) ? ok(value) : no("The Scout seen marker is the time a finding was first seen."),
|
|
2410
|
+
pullsReadAt: (value) => value === null || typeof value === "string" && !Number.isNaN(Date.parse(value)) ? ok(value) : no("The pull request read time is a time, or nothing before the first read."),
|
|
2411
|
+
pullsAskOnly: (value) => typeof value === "boolean" ? ok(value) : no("The pull request read rule is on or off."),
|
|
2412
|
+
setupSteps: (value) => value === null || typeof value === "object" && value !== null && !Array.isArray(value) && Object.entries(value).every(([step, mark]) => SETUP_STEPS.includes(step) && SETUP_MARKS.includes(mark)) ? ok(value) : no("The setup steps are a step name, such as learn, with done, self or dismissed."),
|
|
2413
|
+
afterLearn: (value) => Array.isArray(value) && value.every((one) => typeof one === "object" && one !== null && typeof one.key === "string" && typeof one.to === "string" && typeof one.at === "string" && !Number.isNaN(Date.parse(one.at))) ? ok(value) : no("The moves after Learn are a list of a card key, the column it goes to and the time of the press."),
|
|
2414
|
+
termsAccepted: (value) => {
|
|
2415
|
+
if (value === null) return ok(value);
|
|
2416
|
+
const terms = value;
|
|
2417
|
+
return typeof value === "object" && typeof terms.version === "string" && terms.version !== "" && typeof terms.at === "string" && !Number.isNaN(Date.parse(terms.at)) ? ok({
|
|
2418
|
+
version: terms.version,
|
|
2419
|
+
at: terms.at
|
|
2420
|
+
}) : no("The accepted terms are a version and the time they were accepted, or nothing.");
|
|
2421
|
+
}
|
|
2422
|
+
};
|
|
2423
|
+
function validateSetting(key, value, workspace = false) {
|
|
2424
|
+
return VALIDATORS[key](value, workspace);
|
|
2425
|
+
}
|
|
2426
|
+
function readSetting(key, raw, workspace = false) {
|
|
2427
|
+
const fallback = key === "repos" && workspace ? [] : DEFAULTS[key];
|
|
2428
|
+
if (raw === void 0) return {
|
|
2429
|
+
value: fallback,
|
|
2430
|
+
fellBack: false
|
|
2431
|
+
};
|
|
2432
|
+
let parsed;
|
|
2433
|
+
try {
|
|
2434
|
+
parsed = JSON.parse(raw);
|
|
2435
|
+
} catch {
|
|
2436
|
+
return {
|
|
2437
|
+
value: fallback,
|
|
2438
|
+
fellBack: true
|
|
2439
|
+
};
|
|
2440
|
+
}
|
|
2441
|
+
const result = validateSetting(key, parsed, workspace);
|
|
2442
|
+
if (!result.ok) return {
|
|
2443
|
+
value: fallback,
|
|
2444
|
+
fellBack: true
|
|
2445
|
+
};
|
|
2446
|
+
return {
|
|
2447
|
+
value: result.value === null ? fallback : result.value,
|
|
2448
|
+
fellBack: false
|
|
2449
|
+
};
|
|
2450
|
+
}
|
|
2451
|
+
//#endregion
|
|
2452
|
+
//#region ../../packages/core/src/estimate.ts
|
|
2453
|
+
function quantile(sorted, p) {
|
|
2454
|
+
const at = (sorted.length - 1) * p;
|
|
2455
|
+
const below = Math.floor(at);
|
|
2456
|
+
const low = sorted[below] ?? 0;
|
|
2457
|
+
return low + ((sorted[Math.min(below + 1, sorted.length - 1)] ?? low) - low) * (at - below);
|
|
2458
|
+
}
|
|
2459
|
+
var ascending = (a, b) => a - b;
|
|
2460
|
+
function historyEstimate(samples) {
|
|
2461
|
+
if (samples.length < 5) return null;
|
|
2462
|
+
const walls = samples.map((one) => one.wallMs).sort(ascending);
|
|
2463
|
+
const costs = samples.flatMap((one) => {
|
|
2464
|
+
const cost = reportedCost(one.costUsd);
|
|
2465
|
+
return cost === null ? [] : [cost];
|
|
2466
|
+
});
|
|
2467
|
+
return {
|
|
2468
|
+
costUsd: costs.length < 5 ? null : quantile(costs.sort(ascending), .5),
|
|
2469
|
+
lowMs: quantile(walls, .25),
|
|
2470
|
+
highMs: quantile(walls, .75),
|
|
2471
|
+
from: "history",
|
|
2472
|
+
runs: samples.length
|
|
2473
|
+
};
|
|
2474
|
+
}
|
|
2475
|
+
function estimateOf(samples, range) {
|
|
2476
|
+
return historyEstimate(samples) ?? (range === null ? null : {
|
|
2477
|
+
...range,
|
|
2478
|
+
from: "preset",
|
|
2479
|
+
runs: 0
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
export { usesPlaywright as $, ACTIONS as A, allowedCommandProblem as B, basicAuth as C, DEEP_FILES as D, proposeAllowedCommands as E, needsOnboarding as F, prefixProblem as G, NO_REPOSITORY as H, DEFAULTS as I, PRESET_NAMES as J, profileForPick as K, modelsOfProfile as L, MACHINE_KEYS as M, NOLZU_FOLDERS as N, EFFORTS as O, PHASE_POLICIES as P, diffModels as Q, pickerProfiles as R, START_SCRIPTS as S, modelsForPick as T, presetNameProblem as U, goneText as V, presetRows as W, presetStandIn as X, profileChoices as Y, appAddress as Z, scriptPort as _, renamedActions as a, proposeStart as a0, learnGates as a1, setupSteps as a2, SETUP_STEPS as a3, SETUP_MARKS as a4, nextStage as a5, READ_GIT_COMMANDS as a6, chainTo as a7, smallChain as a8, startsLabel as a9, EXTRACT_SUMMARY_POLICY as aa, presetModels as ab, parseAllowedCommands as ac, SMALL_CHAINS as ad, estimateFrom as ae, estimateText as af, proposePrefix as ag, NEW_PROJECT_BRANCH_TEMPLATE as ah, everyPhaseEngines as ai, estimateShort as aj, refusedPhases as ak, bannerSteps as al, WRITE_IT_MYSELF as am, estimateBrief as an, learnEstimateText as ao, AGENT_SLOTS as ap, needsContainerDaemon as aq, validateModelTable as b, resolveModels as c, stageSays as d, projectRepos as e, canMove as f, phaseOnEnter as g, boardFor as h, isMachineKey as i, isAction as j, presetRange as k, estimateOf as l, historyEstimate as m, estimateSum as n, siteOrigin as o, presetProfiles as p, validateRepos as q, readSetting as r, startsInCardFolder as s, isFolderName as t, stackCommands as u, validateSetting as v, lockfileOf as w, scriptCommand as x, policyFor as y, vendorRefusal as z };
|
|
2484
|
+
//# sourceMappingURL=estimate.js-BHTYVTaQ.js.map
|