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,1108 @@
|
|
|
1
|
+
import { e as effortInId, i as isEngineName, E as ENGINE_LABELS, c as engineName, b as ENGINE_NAMES, m as missingProfileText, g as goneProblem } from './engine.js-DS5zUwsE.js';
|
|
2
|
+
import { B as BOARD_LABELS, p as phaseLabel, e as presetLabel, a as isResearchKind, f as RESEARCH_REPORTS } from './board.js-BxL3CjB1.js';
|
|
3
|
+
import { s as spendOf } from './spend.js-BabnR69T.js';
|
|
4
|
+
import { J as PRESET_NAMES, c as resolveModels, j as isAction, A as ACTIONS, K as profileForPick, L as modelsOfProfile, O as EFFORTS, Q as diffModels, h as boardFor, R as pickerProfiles, T as modelsForPick, U as presetNameProblem, V as goneText, W as presetRows, X as presetStandIn, p as presetProfiles, Y as profileChoices, e as projectRepos } from './estimate.js-BHTYVTaQ.js';
|
|
5
|
+
import { n as setExtraContext, u as unlinkCards, q as followPreset, t as followSavedPreset, e as projectProfiles, h as cardBase, v as setCardModels, j as cardModels, x as cardSavedPreset, f as cardPreset, y as projectOutsideGit, z as cardFollowsProject, g as getSetting, A as cardEstimate, w as writeSetting, B as renameCardPresets, N as NOT_A_PASS, C as storedQuestionOptions, D as shownRunState, c as cardRuns, E as readOnlyBreakOf, F as commitWarningOf, G as peekLocalKey, H as relatedCards, I as newCommitsOf, a as allKnowledgeChanges, J as cardRepos, k as startEstimate } from './node.js-Bz2jT5wt.js';
|
|
6
|
+
import { u as decisionLines, d as refinedCriteria, p as parseRound } from './src.js-Cm8RAH_q.js';
|
|
7
|
+
import { z as phaseStrip, k as resolveKnowledgeDir } from './src2.js-CV8tsClO.js';
|
|
8
|
+
import { F as wallHere, j as isPlainName, D as checkoutRoot, t as checkoutPath, a as gitEnv, g as git, H as pushedReason, I as DISCOVERIES_FILE, m as readCardFile, J as SHARE_PLAN_FILE } from './src3.js-h9tTEbVb.js';
|
|
9
|
+
import { f as filesFor, c as cardFolder } from './files.js-V46lE0-6.js';
|
|
10
|
+
import { g as gateFor } from './gate.js-Cbqo8Yy0.js';
|
|
11
|
+
import { i as isClosed, c as cardCheckouts, t as templateBranch } from './checkout.js-Ys5L_gA4.js';
|
|
12
|
+
import { p as parsePlan } from './plan.js-DFq5ntMM.js';
|
|
13
|
+
import { c as commitPatch } from './knowledge-page.js-D2ALB3v9.js';
|
|
14
|
+
import { r as rereviewWhy } from './review.js-MPqnq9Gy.js';
|
|
15
|
+
import { readdirSync, existsSync } from 'node:fs';
|
|
16
|
+
import { join, relative } from 'node:path';
|
|
17
|
+
|
|
18
|
+
//#region src/lib/project-models.ts
|
|
19
|
+
var BUILT_IN_NAMES = PRESET_NAMES.flatMap((name) => [name, presetLabel(name)]);
|
|
20
|
+
var fromPreset = (preset, models, profiles) => resolveModels(null, {}, preset, models, profiles);
|
|
21
|
+
/**
|
|
22
|
+
* The one warning a row shows, or null.
|
|
23
|
+
*
|
|
24
|
+
* In the order of what a person can do about it. A login this machine does not hold comes first,
|
|
25
|
+
* because with no profile nothing knows the vendor. Then the vendor that cannot run the phase, which
|
|
26
|
+
* no model repairs. Then a model the engine stopped offering.
|
|
27
|
+
*/
|
|
28
|
+
function rowWarning(action, resolved) {
|
|
29
|
+
if (resolved.missingProfile) return `${missingProfileText(resolved.engine)} Runs of ${phaseLabel(action)} are refused until another engine profile is picked here.`;
|
|
30
|
+
if (resolved.refusal !== null) return resolved.refusal;
|
|
31
|
+
if (resolved.gone) return goneProblem(phaseLabel(action), resolved.model, resolved.engine);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
function measured(db, action, row, profiles) {
|
|
35
|
+
if (row.gone || row.missingProfile || row.refusal !== null) return void 0;
|
|
36
|
+
return startEstimate(db, {
|
|
37
|
+
phase: action,
|
|
38
|
+
model: row.model,
|
|
39
|
+
effort: row.effort,
|
|
40
|
+
vendor: profiles.find((one) => one.id === row.engine)?.vendor
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function deliverySteps(db) {
|
|
44
|
+
return boardFor("delivery", getSetting(db, "deliveryFlow")).stages.flatMap((stage) => stage.phase !== void 0 && isAction(stage.phase) ? [stage.phase] : []);
|
|
45
|
+
}
|
|
46
|
+
var cardCost = (db, table) => cardEstimate(db, deliverySteps(db).map((action) => ({
|
|
47
|
+
engine: table[action].engine,
|
|
48
|
+
phase: action,
|
|
49
|
+
model: table[action].model,
|
|
50
|
+
effort: table[action].effort
|
|
51
|
+
})));
|
|
52
|
+
var sameRow = (a, b) => a.engine === b.engine && a.model === b.model && a.effort === b.effort;
|
|
53
|
+
var sameTable = (a, b) => ACTIONS.every((action) => sameRow(a[action], b[action]));
|
|
54
|
+
var fullRow = ({ engine, model, effort }, profiles) => effortInId(vendorOf(engine, profiles)) ? {
|
|
55
|
+
engine,
|
|
56
|
+
model
|
|
57
|
+
} : {
|
|
58
|
+
engine,
|
|
59
|
+
model,
|
|
60
|
+
effort
|
|
61
|
+
};
|
|
62
|
+
var vendorOf = (engine, profiles) => profiles.find((one) => one.id === engine)?.vendor ?? engine.split("#")[0] ?? engine;
|
|
63
|
+
var ENGINE_ORDER = [
|
|
64
|
+
"claude-code",
|
|
65
|
+
"codex",
|
|
66
|
+
"cursor"
|
|
67
|
+
];
|
|
68
|
+
var byEngine = (profiles) => [...profiles].sort((a, b) => ENGINE_ORDER.indexOf(a.vendor) - ENGINE_ORDER.indexOf(b.vendor));
|
|
69
|
+
var foundEngines = (profiles, models) => ENGINE_NAMES.filter((vendor) => profiles.some((one) => one.vendor === vendor) && (models[vendor]?.length ?? 0) > 0);
|
|
70
|
+
function stateOf(db, models, place) {
|
|
71
|
+
const profiles = projectProfiles(db);
|
|
72
|
+
const preset = getSetting(db, "modelPreset");
|
|
73
|
+
const saved = getSetting(db, "savedPresets");
|
|
74
|
+
const resolved = resolveModels(null, getSetting(db, "models"), preset, models, profiles, null, place);
|
|
75
|
+
const floor = fromPreset(preset, models, profiles);
|
|
76
|
+
const tableOf = (one) => resolveModels(null, one.models, preset, models, profiles);
|
|
77
|
+
const name = getSetting(db, "savedPreset");
|
|
78
|
+
const matched = name === null && !getSetting(db, "presetChosen") && !sameTable(resolved, floor);
|
|
79
|
+
const chosen = saved.find((one) => one.name === name) ?? (matched ? saved.find((one) => sameTable(tableOf(one), resolved)) : void 0) ?? null;
|
|
80
|
+
return {
|
|
81
|
+
profiles,
|
|
82
|
+
preset,
|
|
83
|
+
saved,
|
|
84
|
+
resolved,
|
|
85
|
+
floor,
|
|
86
|
+
chosen,
|
|
87
|
+
base: chosen === null ? floor : tableOf(chosen),
|
|
88
|
+
key: `${preset}:${profiles[0]?.vendor ?? "claude-code"}`
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
var projectSavedPreset = (db, models) => stateOf(db, models).chosen;
|
|
92
|
+
function modelsFor(db, models, wall = wallHere(), onPath = []) {
|
|
93
|
+
const { profiles, preset, saved, resolved, chosen, base } = stateOf(db, models, {
|
|
94
|
+
outsideGit: projectOutsideGit(db),
|
|
95
|
+
wall
|
|
96
|
+
});
|
|
97
|
+
const label = (id) => profiles.find((one) => one.id === id)?.label ?? engineName(id);
|
|
98
|
+
const presetEngine = profiles[0]?.vendor ?? null;
|
|
99
|
+
const vendors = (table) => ENGINE_ORDER.filter((vendor) => ACTIONS.some((action) => vendorOf(table[action].engine, profiles) === vendor));
|
|
100
|
+
const ready = foundEngines(profiles, models);
|
|
101
|
+
const ordered = byEngine(getSetting(db, "engineProfiles"));
|
|
102
|
+
const stored = getSetting(db, "models");
|
|
103
|
+
const rows = ACTIONS.map((action) => {
|
|
104
|
+
const row = base[action];
|
|
105
|
+
const now = resolved[action];
|
|
106
|
+
return {
|
|
107
|
+
action,
|
|
108
|
+
own: stored[action] ?? {},
|
|
109
|
+
resolved: now,
|
|
110
|
+
base: row,
|
|
111
|
+
changed: chosen === null && stored[action]?.model !== void 0 || !sameRow(now, row),
|
|
112
|
+
picked: now.insteadOf === void 0 ? null : `Nolzu picked ${now.model}: ${now.insteadOf} is not on this account.`,
|
|
113
|
+
baseText: [
|
|
114
|
+
label(row.engine),
|
|
115
|
+
row.model,
|
|
116
|
+
...effortInId(vendorOf(row.engine, profiles)) ? [] : [row.effort]
|
|
117
|
+
].join(" · "),
|
|
118
|
+
models: modelsForPick(resolved[action], profiles, models),
|
|
119
|
+
presetPicks: Object.fromEntries(profiles.map((one) => {
|
|
120
|
+
const built = presetRows(preset, one.vendor)[action];
|
|
121
|
+
return [one.id, one.id === row.engine ? {
|
|
122
|
+
model: row.model,
|
|
123
|
+
effort: row.effort
|
|
124
|
+
} : {
|
|
125
|
+
...built,
|
|
126
|
+
model: presetStandIn(one.vendor, built.model, models[one.vendor]) ?? built.model
|
|
127
|
+
}];
|
|
128
|
+
})),
|
|
129
|
+
warning: rowWarning(action, resolved[action])
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
const mine = saved.map((one) => {
|
|
133
|
+
const table = resolveModels(null, one.models, preset, models, profiles);
|
|
134
|
+
const names = vendors(table).map((vendor) => ENGINE_LABELS[vendor]);
|
|
135
|
+
const runsOn = names.length > 1 ? `${names.slice(0, -1).join(", ")} and ${names.at(-1)}` : names[0] ?? ENGINE_LABELS[presetEngine ?? "claude-code"];
|
|
136
|
+
return {
|
|
137
|
+
name: one.name,
|
|
138
|
+
runsOn,
|
|
139
|
+
active: chosen?.name === one.name,
|
|
140
|
+
estimate: cardCost(db, table)
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
rows,
|
|
145
|
+
preset,
|
|
146
|
+
presets: PRESET_NAMES,
|
|
147
|
+
chosen: chosen?.name ?? null,
|
|
148
|
+
presetEngine,
|
|
149
|
+
changes: rows.filter((one) => one.changed).length,
|
|
150
|
+
saved: saved.map((one) => one.name),
|
|
151
|
+
profiles: profileChoices(ordered, models),
|
|
152
|
+
choices: pickerProfiles(ordered, models).map((one) => ({
|
|
153
|
+
...one,
|
|
154
|
+
effortInName: effortInId(vendorOf(one.id, profiles))
|
|
155
|
+
})),
|
|
156
|
+
efforts: EFFORTS,
|
|
157
|
+
mine,
|
|
158
|
+
grid: ENGINE_ORDER.filter((vendor) => onPath.includes(vendor) || ready.includes(vendor)).map((vendor) => ({
|
|
159
|
+
vendor,
|
|
160
|
+
why: ready.includes(vendor) ? null : !profiles.some((one) => one.vendor === vendor) ? `${ENGINE_LABELS[vendor]} has no login yet.` : `${ENGINE_LABELS[vendor]} answered no models.`,
|
|
161
|
+
cells: PRESET_NAMES.map((name) => {
|
|
162
|
+
const cell = {
|
|
163
|
+
name,
|
|
164
|
+
active: chosen === null && name === preset && vendor === presetEngine
|
|
165
|
+
};
|
|
166
|
+
if (!ready.includes(vendor)) return cell;
|
|
167
|
+
const table = fromPreset(name, models, presetProfiles(profiles, vendor));
|
|
168
|
+
const { model, effort } = table.implement;
|
|
169
|
+
return {
|
|
170
|
+
...cell,
|
|
171
|
+
uses: effortInId(vendor) ? model : `${model} · ${effort}`,
|
|
172
|
+
estimate: cardCost(db, table)
|
|
173
|
+
};
|
|
174
|
+
})
|
|
175
|
+
}))
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
var tableNow = (state) => Object.fromEntries(ACTIONS.map((action) => [action, fullRow(state.resolved[action], state.profiles)]));
|
|
179
|
+
var differing = (state, table) => Object.fromEntries(ACTIONS.filter((action) => !sameRow(state.resolved[action], table[action])).map((action) => [action, fullRow(state.resolved[action], state.profiles)]));
|
|
180
|
+
/**
|
|
181
|
+
* Writes the rows of a built-in preset: what runs, and the same rows kept as the person's under the
|
|
182
|
+
* preset and its engine, so coming back to Heavy on Cursor brings them back.
|
|
183
|
+
*/
|
|
184
|
+
function writeChoices(db, state, rows) {
|
|
185
|
+
writeSetting(db, "models", rows);
|
|
186
|
+
writeSetting(db, "presetChoices", {
|
|
187
|
+
...getSetting(db, "presetChoices") ?? {},
|
|
188
|
+
[state.key]: rows
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The first write after an update that brought `presetChoices`. A built-in preset's stored rows were
|
|
193
|
+
* differences from the built-in list, so a field nobody changed followed that list. Each is written
|
|
194
|
+
* whole now, as the person's choice, and the same rows run as before.
|
|
195
|
+
*/
|
|
196
|
+
function adoptChoices(db, state) {
|
|
197
|
+
if (getSetting(db, "presetChoices") !== null) return;
|
|
198
|
+
if (state.chosen === null) writeChoices(db, state, differing(state, state.floor));
|
|
199
|
+
else writeSetting(db, "presetChoices", {});
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Moves the project to another preset, engine or saved preset in one write.
|
|
203
|
+
*
|
|
204
|
+
* A built-in preset keeps the person's phases under its own name and engine (owner finding T30), so
|
|
205
|
+
* moving onto one brings back what they chose there, and moving off one loses nothing. A saved
|
|
206
|
+
* preset's unsaved changes still go along and are counted again against the new preset (owner,
|
|
207
|
+
* 2026-10-26); on a built-in preset they become the person's own. `keep` false drops them, which is
|
|
208
|
+
* Discard. A saved preset is stored as its differences from the built-in preset on its engine.
|
|
209
|
+
*/
|
|
210
|
+
function moveTo(db, models, change, keep = true) {
|
|
211
|
+
const before = stateOf(db, models);
|
|
212
|
+
const carried = keep && before.chosen !== null ? differing(before, before.base) : {};
|
|
213
|
+
change();
|
|
214
|
+
const after = stateOf(db, models);
|
|
215
|
+
if (after.chosen === null) {
|
|
216
|
+
const kept = getSetting(db, "presetChoices")?.[after.key] ?? {};
|
|
217
|
+
const now = resolveModels(null, carried, after.preset, models, after.profiles);
|
|
218
|
+
const fresh = Object.fromEntries(Object.entries(carried).filter(([action]) => isAction(action) && !sameRow(now[action], after.floor[action])));
|
|
219
|
+
writeChoices(db, after, {
|
|
220
|
+
...kept,
|
|
221
|
+
...fresh
|
|
222
|
+
});
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const table = Object.fromEntries(ACTIONS.map((action) => [action, carried[action] ?? fullRow(after.base[action], after.profiles)]));
|
|
226
|
+
writeSetting(db, "models", diffModels(table, after.floor) ?? {});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* What the project stores after one phase changed. On a built-in preset a phase that differs from it
|
|
230
|
+
* is kept whole as the person's choice, and one that matches it again is dropped, so it follows
|
|
231
|
+
* Nolzu's list once more. On a saved preset it stays a difference from the built-in rows.
|
|
232
|
+
*/
|
|
233
|
+
function writePhase(db, models, state, action, table) {
|
|
234
|
+
if (state.chosen !== null) {
|
|
235
|
+
writeSetting(db, "models", diffModels(table, state.floor) ?? {});
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const row = resolveModels(null, table, state.preset, models, state.profiles)[action];
|
|
239
|
+
const rest = { ...getSetting(db, "models") };
|
|
240
|
+
delete rest[action];
|
|
241
|
+
writeChoices(db, state, sameRow(row, state.floor[action]) ? rest : {
|
|
242
|
+
...rest,
|
|
243
|
+
[action]: fullRow(row, state.profiles)
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function saveProjectModels(db, form, models) {
|
|
247
|
+
const state = stateOf(db, models);
|
|
248
|
+
if (state.chosen !== null && getSetting(db, "savedPreset") === null) writeSetting(db, "savedPreset", state.chosen.name);
|
|
249
|
+
if (!getSetting(db, "presetChosen")) writeSetting(db, "presetChosen", true);
|
|
250
|
+
adoptChoices(db, state);
|
|
251
|
+
const { profiles, preset, saved } = state;
|
|
252
|
+
const asked = form.get("preset")?.toString();
|
|
253
|
+
const engine = form.get("presetEngine")?.toString();
|
|
254
|
+
const notFound = engine === void 0 || isEngineName(engine) && foundEngines(profiles, models).includes(engine) ? null : `Nolzu found no ${isEngineName(engine) ? ENGINE_LABELS[engine] : engine} login with models on this machine. Settings, Engines shows what is missing.`;
|
|
255
|
+
if (asked !== void 0) {
|
|
256
|
+
if (!PRESET_NAMES.includes(asked)) return no(`There is no preset ${asked}. The presets are ${PRESET_NAMES.join(", ")}.`);
|
|
257
|
+
if (notFound !== null) return no(notFound);
|
|
258
|
+
moveTo(db, models, () => {
|
|
259
|
+
writeSetting(db, "modelPreset", asked);
|
|
260
|
+
writeSetting(db, "savedPreset", null);
|
|
261
|
+
if (engine !== void 0) writeSetting(db, "presetEngine", engine);
|
|
262
|
+
});
|
|
263
|
+
return {
|
|
264
|
+
ok: true,
|
|
265
|
+
message: null
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
if (engine !== void 0) {
|
|
269
|
+
if (state.chosen !== null) return no(`${state.chosen.name} keeps the engine it saved for each phase. Pick a built-in preset to put every phase on one engine.`);
|
|
270
|
+
if (notFound !== null) return no(notFound);
|
|
271
|
+
moveTo(db, models, () => writeSetting(db, "presetEngine", engine));
|
|
272
|
+
return {
|
|
273
|
+
ok: true,
|
|
274
|
+
message: null
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
if (form.has("discard")) {
|
|
278
|
+
if (state.chosen === null) writeChoices(db, state, {});
|
|
279
|
+
else moveTo(db, models, () => void 0, false);
|
|
280
|
+
return {
|
|
281
|
+
ok: true,
|
|
282
|
+
message: null
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
const named = form.get("save")?.toString();
|
|
286
|
+
if (named !== void 0) {
|
|
287
|
+
const refused = presetNameProblem(named, [...BUILT_IN_NAMES, ...saved.map((one) => one.name)]);
|
|
288
|
+
if (refused !== null) return no(refused);
|
|
289
|
+
writeSetting(db, "savedPresets", [...saved, {
|
|
290
|
+
name: named.trim(),
|
|
291
|
+
models: tableNow(state)
|
|
292
|
+
}]);
|
|
293
|
+
writeSetting(db, "savedPreset", named.trim());
|
|
294
|
+
if (state.chosen === null) writeSetting(db, "presetChoices", {
|
|
295
|
+
...getSetting(db, "presetChoices") ?? {},
|
|
296
|
+
[state.key]: {}
|
|
297
|
+
});
|
|
298
|
+
return {
|
|
299
|
+
ok: true,
|
|
300
|
+
message: null
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
const rename = form.get("rename")?.toString();
|
|
304
|
+
if (rename !== void 0) {
|
|
305
|
+
if (!saved.some((one) => one.name === rename)) return no(`There is no saved preset ${rename}.`);
|
|
306
|
+
const name = form.get("name")?.toString() ?? "";
|
|
307
|
+
const refused = presetNameProblem(name, [...BUILT_IN_NAMES, ...saved.filter((one) => one.name !== rename).map((one) => one.name)]);
|
|
308
|
+
if (refused !== null) return no(refused);
|
|
309
|
+
writeSetting(db, "savedPresets", saved.map((one) => one.name === rename ? {
|
|
310
|
+
...one,
|
|
311
|
+
name: name.trim()
|
|
312
|
+
} : one));
|
|
313
|
+
if (getSetting(db, "savedPreset") === rename) writeSetting(db, "savedPreset", name.trim());
|
|
314
|
+
renameCardPresets(db, rename, name.trim());
|
|
315
|
+
return {
|
|
316
|
+
ok: true,
|
|
317
|
+
message: null
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
const replace = form.get("replace")?.toString();
|
|
321
|
+
if (replace !== void 0) {
|
|
322
|
+
if (!saved.some((one) => one.name === replace)) return no(`There is no saved preset ${replace}.`);
|
|
323
|
+
writeSetting(db, "savedPresets", saved.map((one) => one.name === replace ? {
|
|
324
|
+
...one,
|
|
325
|
+
models: tableNow(state)
|
|
326
|
+
} : one));
|
|
327
|
+
return {
|
|
328
|
+
ok: true,
|
|
329
|
+
message: null
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
const apply = form.get("apply")?.toString();
|
|
333
|
+
if (apply !== void 0) {
|
|
334
|
+
if (!saved.some((one) => one.name === apply)) return no(`There is no saved preset ${apply}.`);
|
|
335
|
+
moveTo(db, models, () => writeSetting(db, "savedPreset", apply));
|
|
336
|
+
return {
|
|
337
|
+
ok: true,
|
|
338
|
+
message: null
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
const remove = form.get("remove")?.toString();
|
|
342
|
+
if (remove !== void 0) {
|
|
343
|
+
if (!saved.some((one) => one.name === remove)) return no(`There is no saved preset ${remove}.`);
|
|
344
|
+
writeSetting(db, "savedPresets", saved.filter((one) => one.name !== remove));
|
|
345
|
+
if (getSetting(db, "savedPreset") === remove) {
|
|
346
|
+
writeSetting(db, "savedPreset", null);
|
|
347
|
+
const after = stateOf(db, models);
|
|
348
|
+
writeChoices(db, after, differing(after, after.floor));
|
|
349
|
+
}
|
|
350
|
+
renameCardPresets(db, remove, null);
|
|
351
|
+
return {
|
|
352
|
+
ok: true,
|
|
353
|
+
message: null
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
const action = form.get("action")?.toString() ?? "";
|
|
357
|
+
const field = form.get("field")?.toString() ?? "";
|
|
358
|
+
const value = form.get("value")?.toString() ?? "";
|
|
359
|
+
if (!isAction(action)) return no(`There is no action ${action}. The actions are ${ACTIONS.join(", ")}.`);
|
|
360
|
+
const stored = getSetting(db, "models");
|
|
361
|
+
if (form.has("reset")) {
|
|
362
|
+
writePhase(db, models, state, action, {
|
|
363
|
+
...stored,
|
|
364
|
+
[action]: fullRow(state.base[action], profiles)
|
|
365
|
+
});
|
|
366
|
+
return {
|
|
367
|
+
ok: true,
|
|
368
|
+
message: null
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
const picked = form.get("engine")?.toString();
|
|
372
|
+
if (picked !== void 0) {
|
|
373
|
+
const model = form.get("model")?.toString() ?? "";
|
|
374
|
+
const refused = picked === "" ? "Pick an engine with the model." : refuseProfile(picked, profiles, models);
|
|
375
|
+
if (refused !== null) return no(refused);
|
|
376
|
+
if (model === "") return no("Pick a model with the engine. A model name means nothing under another engine.");
|
|
377
|
+
const known = modelsOfProfile(picked, profiles, models);
|
|
378
|
+
if (!known.includes(model)) return no(`${goneText(model)} The engine offers ${known.join(", ")}.`);
|
|
379
|
+
const effort = form.get("effort")?.toString();
|
|
380
|
+
if (effort !== void 0 && !EFFORTS.includes(effort)) return no(`The effort is one of ${EFFORTS.join(", ")}.`);
|
|
381
|
+
const row = {
|
|
382
|
+
...stored[action],
|
|
383
|
+
engine: picked,
|
|
384
|
+
model,
|
|
385
|
+
...effort === void 0 ? {} : { effort }
|
|
386
|
+
};
|
|
387
|
+
if (effortInId(vendorOf(picked, profiles))) delete row.effort;
|
|
388
|
+
writePhase(db, models, state, action, {
|
|
389
|
+
...stored,
|
|
390
|
+
[action]: row
|
|
391
|
+
});
|
|
392
|
+
return {
|
|
393
|
+
ok: true,
|
|
394
|
+
message: null
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
if (field !== "engine" && field !== "model" && field !== "effort") return no(`There is no ${field} to set on a model row.`);
|
|
398
|
+
if (field === "effort" && value !== "" && !EFFORTS.includes(value)) return no(`The effort is one of ${EFFORTS.join(", ")}.`);
|
|
399
|
+
const table = { ...stored };
|
|
400
|
+
const row = { ...table[action] ?? {} };
|
|
401
|
+
const resolved = resolveModels(null, table, preset, models, profiles)[action];
|
|
402
|
+
if (field === "engine") {
|
|
403
|
+
const refused = refuseProfile(value, profiles, models);
|
|
404
|
+
if (refused !== null) return no(refused);
|
|
405
|
+
row.engine = value === "" ? void 0 : value;
|
|
406
|
+
if (vendorOf(value === "" ? profiles[0]?.id ?? "" : value, profiles) !== vendorOf(resolved.engine, profiles)) delete row.model;
|
|
407
|
+
}
|
|
408
|
+
if (field === "model") {
|
|
409
|
+
const known = modelsForPick(resolved, profiles, models);
|
|
410
|
+
const target = profileForPick(resolved, profiles);
|
|
411
|
+
if (value !== "" && known.length === 0) return no(noModels(target, profiles));
|
|
412
|
+
if (value !== "" && !known.includes(value)) return no(`${goneText(value)} The engine offers ${known.join(", ")}.`);
|
|
413
|
+
row.model = value === "" ? void 0 : value;
|
|
414
|
+
row.engine = target;
|
|
415
|
+
}
|
|
416
|
+
if (field === "effort") row.effort = value === "" ? void 0 : value;
|
|
417
|
+
table[action] = row;
|
|
418
|
+
writePhase(db, models, state, action, table);
|
|
419
|
+
return {
|
|
420
|
+
ok: true,
|
|
421
|
+
message: null
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
function refuseProfile(value, profiles, models) {
|
|
425
|
+
if (value === "") return null;
|
|
426
|
+
const profile = profiles.find((one) => one.id === value);
|
|
427
|
+
if (profile === void 0) return `There is no engine profile ${value} on this machine.`;
|
|
428
|
+
return models[profile.vendor] === void 0 ? noModels(value, profiles) : null;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Why a profile offers no model.
|
|
432
|
+
*
|
|
433
|
+
* Every vendor a stored profile can name has an adapter now, so an empty list is a command this
|
|
434
|
+
* machine does not have, and installing it repairs the row. Saying Nolzu cannot run the engine
|
|
435
|
+
* would send the person away to wait for something that is already here.
|
|
436
|
+
*
|
|
437
|
+
* Named apart, because the model picker and the profile picker both reach it.
|
|
438
|
+
*/
|
|
439
|
+
var noModels = (id, profiles) => {
|
|
440
|
+
const vendor = profiles.find((one) => one.id === id)?.vendor;
|
|
441
|
+
return `Nolzu found no ${vendor === void 0 ? id : ENGINE_LABELS[vendor]} command on this machine, so no row can be set to ${id}. Install it, then open this screen again.`;
|
|
442
|
+
};
|
|
443
|
+
var no = (message) => ({
|
|
444
|
+
ok: false,
|
|
445
|
+
message
|
|
446
|
+
});
|
|
447
|
+
//#endregion
|
|
448
|
+
//#region src/lib/card-models.ts
|
|
449
|
+
var startsNot = (row) => row.gone || row.missingProfile || row.refusal !== null;
|
|
450
|
+
function settingsFor(db, key, models, wall = wallHere()) {
|
|
451
|
+
const card = db.prepare("SELECT board FROM cards WHERE key = ?").get(key);
|
|
452
|
+
if (card === void 0) return null;
|
|
453
|
+
const own = cardModels(db, key);
|
|
454
|
+
const saved = cardSavedPreset(db, key);
|
|
455
|
+
const global = cardBase(db, key);
|
|
456
|
+
const preset = cardPreset(db, key);
|
|
457
|
+
const profiles = projectProfiles(db);
|
|
458
|
+
const place = {
|
|
459
|
+
outsideGit: projectOutsideGit(db),
|
|
460
|
+
wall
|
|
461
|
+
};
|
|
462
|
+
const project = saved === null && cardFollowsProject(db, key) ? projectSavedPreset(db, models) : null;
|
|
463
|
+
const projectTable = project === null ? null : resolveModels(null, project.models, preset, models, profiles);
|
|
464
|
+
const fromSaved = (table) => saved === null && projectTable === null ? table : Object.fromEntries(ACTIONS.map((action) => {
|
|
465
|
+
const { from, engine, model, effort } = table[action];
|
|
466
|
+
const kept = projectTable?.[action];
|
|
467
|
+
if (kept !== void 0 && (kept.engine !== engine || kept.model !== model || kept.effort !== effort)) return [action, table[action]];
|
|
468
|
+
return [action, {
|
|
469
|
+
...table[action],
|
|
470
|
+
from: {
|
|
471
|
+
model: from.model === "global" ? "preset" : from.model,
|
|
472
|
+
effort: from.effort === "global" ? "preset" : from.effort
|
|
473
|
+
}
|
|
474
|
+
}];
|
|
475
|
+
}));
|
|
476
|
+
const inherited = fromSaved(resolveModels(null, global, preset, models, profiles));
|
|
477
|
+
const follows = fromSaved(resolveModels(null, global, preset, models, profiles, null, place));
|
|
478
|
+
const resolved = fromSaved(resolveModels(own, global, preset, models, profiles, null, place));
|
|
479
|
+
const steps = /* @__PURE__ */ new Map();
|
|
480
|
+
for (const stage of boardFor(card.board, getSetting(db, "deliveryFlow")).stages) if (stage.phase !== void 0 && !steps.has(stage.phase)) steps.set(stage.phase, stage.label);
|
|
481
|
+
const actions = [...steps.keys()].filter(isAction);
|
|
482
|
+
const presets = {};
|
|
483
|
+
const cost = (name, table) => {
|
|
484
|
+
const estimate = cardEstimate(db, actions.map((action) => ({
|
|
485
|
+
engine: table[action].engine,
|
|
486
|
+
phase: action,
|
|
487
|
+
model: table[action].model,
|
|
488
|
+
effort: table[action].effort
|
|
489
|
+
})));
|
|
490
|
+
if (estimate !== void 0) presets[name] = estimate;
|
|
491
|
+
};
|
|
492
|
+
for (const name of PRESET_NAMES) cost(name, resolveModels(null, getSetting(db, "models"), name, models, profiles, null, place));
|
|
493
|
+
const savedPresets = getSetting(db, "savedPresets");
|
|
494
|
+
for (const one of savedPresets) cost(one.name, resolveModels(null, one.models, getSetting(db, "modelPreset"), models, profiles, null, place));
|
|
495
|
+
return {
|
|
496
|
+
rows: ACTIONS.map((action) => ({
|
|
497
|
+
action,
|
|
498
|
+
label: steps.get(action) ?? phaseLabel(action),
|
|
499
|
+
step: steps.has(action),
|
|
500
|
+
own: own?.[action] ?? {},
|
|
501
|
+
inherited: own?.[action]?.engine === void 0 ? inherited[action] : fromSaved(resolveModels(null, global, preset, models, profiles, own[action].engine))[action],
|
|
502
|
+
inheritEngine: inherited[action].engine,
|
|
503
|
+
resolved: resolved[action],
|
|
504
|
+
models: modelsForPick(resolved[action], profiles, models),
|
|
505
|
+
follows: follows[action],
|
|
506
|
+
estimate: measured(db, action, resolved[action], profiles),
|
|
507
|
+
followsEstimate: measured(db, action, follows[action], profiles),
|
|
508
|
+
stepEstimate: startsNot(resolved[action]) ? void 0 : cardEstimate(db, [{
|
|
509
|
+
engine: resolved[action].engine,
|
|
510
|
+
phase: action,
|
|
511
|
+
model: resolved[action].model,
|
|
512
|
+
effort: resolved[action].effort
|
|
513
|
+
}])
|
|
514
|
+
})),
|
|
515
|
+
preset,
|
|
516
|
+
saved: saved?.name ?? project?.name ?? null,
|
|
517
|
+
savedPresets: savedPresets.map((one) => one.name),
|
|
518
|
+
presetEngine: profiles[0]?.vendor ?? null,
|
|
519
|
+
presets,
|
|
520
|
+
board: BOARD_LABELS[card.board],
|
|
521
|
+
profiles: pickerProfiles(profiles, models).map((one) => ({
|
|
522
|
+
...one,
|
|
523
|
+
effortInName: effortInId(vendorOf(one.id, profiles))
|
|
524
|
+
}))
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
var answer$1 = (status, body) => new Response(JSON.stringify(body), {
|
|
528
|
+
status,
|
|
529
|
+
headers: { "content-type": "application/json" }
|
|
530
|
+
});
|
|
531
|
+
/**
|
|
532
|
+
* One action's engine and model, its effort, a reset, or the card's preset.
|
|
533
|
+
*
|
|
534
|
+
* An engine comes with its model in one write, because a model name means nothing under another
|
|
535
|
+
* engine. `{ reset: true }` removes the card's own value of one action, so it follows the preset again.
|
|
536
|
+
* A preset is a built-in one or one of the project's saved presets by name, and clears every value the
|
|
537
|
+
* card set (owner question 25). The card stores only what differs from
|
|
538
|
+
* what it follows, so a later change to the preset still reaches the rest. A run that is going keeps
|
|
539
|
+
* the values it started with; this changes the next one.
|
|
540
|
+
*/
|
|
541
|
+
async function saveCardModels(db, key, request, models) {
|
|
542
|
+
let asked;
|
|
543
|
+
try {
|
|
544
|
+
const parsed = await request.json();
|
|
545
|
+
asked = typeof parsed === "object" && parsed !== null ? parsed : {};
|
|
546
|
+
} catch {
|
|
547
|
+
asked = {};
|
|
548
|
+
}
|
|
549
|
+
const current = settingsFor(db, key, models);
|
|
550
|
+
if (current === null) return answer$1(404, { message: `There is no card ${key}, so it has no models to set.` });
|
|
551
|
+
if (asked.preset !== void 0) {
|
|
552
|
+
if (typeof asked.preset === "string" && PRESET_NAMES.includes(asked.preset)) followPreset(db, key, asked.preset);
|
|
553
|
+
else if (typeof asked.preset === "string" && current.savedPresets.includes(asked.preset)) followSavedPreset(db, key, asked.preset);
|
|
554
|
+
else return answer$1(400, { message: `There is no preset ${String(asked.preset)}. The presets are light, default, heavy and the ones saved on Settings, Models.` });
|
|
555
|
+
return answer$1(200, { ok: true });
|
|
556
|
+
}
|
|
557
|
+
const inherited = resolveModels(null, cardBase(db, key), current.preset, models, projectProfiles(db));
|
|
558
|
+
const profiles = projectProfiles(db);
|
|
559
|
+
const { action, engine, model, effort } = asked;
|
|
560
|
+
if (typeof action !== "string" || !isAction(action)) return answer$1(400, { message: `There is no action ${String(action)}. The actions are ${ACTIONS.join(", ")}.` });
|
|
561
|
+
const others = Object.fromEntries(current.rows.filter((one) => one.action !== action && Object.keys(one.own).length > 0).map((one) => [one.action, one.own]));
|
|
562
|
+
const row = current.rows.find((one) => one.action === action);
|
|
563
|
+
let kept;
|
|
564
|
+
if (asked.reset === true) kept = void 0;
|
|
565
|
+
else {
|
|
566
|
+
const resolved = row?.resolved ?? inherited[action];
|
|
567
|
+
if (engine !== void 0 && engine !== null) {
|
|
568
|
+
const refused = typeof engine === "string" ? refuseProfile(engine, profiles, models) : `There is no engine profile ${String(engine)} on this machine.`;
|
|
569
|
+
if (refused !== null) return answer$1(400, { message: refused });
|
|
570
|
+
if (typeof model !== "string") return answer$1(400, { message: "Pick a model with the engine. A model name means nothing under another engine." });
|
|
571
|
+
}
|
|
572
|
+
let target = profileForPick(resolved, profiles);
|
|
573
|
+
if (typeof engine === "string" && engine !== "") target = engine;
|
|
574
|
+
else if (engine === null) target = profileForPick(inherited[action], profiles);
|
|
575
|
+
const known = modelsOfProfile(target, profiles, models);
|
|
576
|
+
if (model !== void 0 && model !== null && (typeof model !== "string" || !known.includes(model))) return answer$1(400, { message: `The engine does not offer ${String(model)}. It offers ${known.join(", ")}.` });
|
|
577
|
+
if (effort !== void 0 && effort !== null && !EFFORTS.includes(effort)) return answer$1(400, { message: `The effort is one of ${EFFORTS.join(", ")}.` });
|
|
578
|
+
const mine = { ...row?.own ?? {} };
|
|
579
|
+
if (engine !== void 0) mine.engine = engine === null ? void 0 : engine;
|
|
580
|
+
if (model !== void 0) {
|
|
581
|
+
mine.engine = target;
|
|
582
|
+
mine.model = model === null ? void 0 : model;
|
|
583
|
+
}
|
|
584
|
+
if (effort !== void 0) mine.effort = effort === null ? void 0 : effort;
|
|
585
|
+
kept = diffModels({ [action]: mine }, inherited)?.[action];
|
|
586
|
+
}
|
|
587
|
+
const table = kept === void 0 ? others : {
|
|
588
|
+
...others,
|
|
589
|
+
[action]: kept
|
|
590
|
+
};
|
|
591
|
+
setCardModels(db, key, Object.keys(table).length === 0 ? null : table);
|
|
592
|
+
return answer$1(200, { ok: true });
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region src/lib/review.ts
|
|
596
|
+
var ROUND_FILE = /^round(?:-(\d+))?\.md$/;
|
|
597
|
+
var roundNumber = (digits) => {
|
|
598
|
+
if (digits === void 0) return 1;
|
|
599
|
+
const number = Number(digits);
|
|
600
|
+
return number < 2 || digits !== String(number) ? null : number;
|
|
601
|
+
};
|
|
602
|
+
function roundsIn(dir) {
|
|
603
|
+
let names;
|
|
604
|
+
try {
|
|
605
|
+
names = readdirSync(join(dir, "pr-review"));
|
|
606
|
+
} catch {
|
|
607
|
+
return [];
|
|
608
|
+
}
|
|
609
|
+
return names.flatMap((name) => {
|
|
610
|
+
const found = ROUND_FILE.exec(name);
|
|
611
|
+
const number = found === null ? null : roundNumber(found[1]);
|
|
612
|
+
return number === null ? [] : [{
|
|
613
|
+
number,
|
|
614
|
+
file: `pr-review/${name}`
|
|
615
|
+
}];
|
|
616
|
+
}).sort((one, other) => one.number - other.number);
|
|
617
|
+
}
|
|
618
|
+
function readRound(dir, round) {
|
|
619
|
+
const read = readCardFile(dir, round.file);
|
|
620
|
+
if (!read.ok) return {
|
|
621
|
+
ok: false,
|
|
622
|
+
problem: read.reason
|
|
623
|
+
};
|
|
624
|
+
return parseRound(read.bytes.toString("utf8"));
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* A card's review rounds, and where the review stands.
|
|
628
|
+
*
|
|
629
|
+
* The round the URL asks for, or the newest one. A number the card has no round for falls back to
|
|
630
|
+
* the newest, the same way an unknown tab falls back to the overview. Every round is read, because the
|
|
631
|
+
* tab compares the shown one with all before it; a round file is small and a card has a few.
|
|
632
|
+
*/
|
|
633
|
+
function reviewFor(db, key, asked, env = process.env) {
|
|
634
|
+
const row = db.prepare("SELECT pr_author AS author, pr_decision AS decision, pr_draft AS draft, pr_round, pr_seen_sha, pr_seen_commits, pr_head_sha, pr_head_commits FROM cards WHERE key = ?").get(key);
|
|
635
|
+
const reviewer = {
|
|
636
|
+
decision: row?.decision ?? null,
|
|
637
|
+
author: row?.author ?? null,
|
|
638
|
+
draft: row?.draft === 1
|
|
639
|
+
};
|
|
640
|
+
const dir = cardFolder(db, key, env);
|
|
641
|
+
const rounds = dir === null ? [] : roundsIn(dir);
|
|
642
|
+
const shown = rounds.find((round) => String(round.number) === asked) ?? rounds.at(-1) ?? null;
|
|
643
|
+
const parsed = dir === null ? [] : rounds.map((round) => ({
|
|
644
|
+
round,
|
|
645
|
+
found: readRound(dir, round)
|
|
646
|
+
}));
|
|
647
|
+
const read = parsed.flatMap(({ round, found }) => found.ok ? [{
|
|
648
|
+
number: round.number,
|
|
649
|
+
blocks: found.blocks
|
|
650
|
+
}] : []);
|
|
651
|
+
const round = row?.pr_round ?? null;
|
|
652
|
+
const pushed = row === void 0 || row.pr_head_sha === null || row.pr_seen_sha === null ? null : newCommitsOf(row) ?? 0;
|
|
653
|
+
const open = read.find((one) => one.number === round)?.blocks.filter((block) => block.label !== "praise").length ?? 0;
|
|
654
|
+
const why = rereviewWhy({
|
|
655
|
+
author: reviewer.author,
|
|
656
|
+
round,
|
|
657
|
+
pushed,
|
|
658
|
+
open
|
|
659
|
+
});
|
|
660
|
+
const found = parsed.find((one) => one.round === shown)?.found ?? null;
|
|
661
|
+
if (shown === null || found === null) return {
|
|
662
|
+
rounds,
|
|
663
|
+
current: null,
|
|
664
|
+
blocks: [],
|
|
665
|
+
problem: null,
|
|
666
|
+
read,
|
|
667
|
+
reviewer,
|
|
668
|
+
head: null,
|
|
669
|
+
why
|
|
670
|
+
};
|
|
671
|
+
return {
|
|
672
|
+
rounds,
|
|
673
|
+
current: shown.number,
|
|
674
|
+
blocks: found.ok ? found.blocks : [],
|
|
675
|
+
problem: found.ok ? null : found.problem,
|
|
676
|
+
read,
|
|
677
|
+
reviewer,
|
|
678
|
+
head: shown.number === round && row?.pr_head_sha != null ? row.pr_head_sha.slice(0, 7) : null,
|
|
679
|
+
why
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
//#endregion
|
|
683
|
+
//#region src/lib/overview.ts
|
|
684
|
+
var SOURCE_WORDS = {
|
|
685
|
+
local: "local",
|
|
686
|
+
github: "GitHub",
|
|
687
|
+
jira: "Jira",
|
|
688
|
+
linear: "Linear"
|
|
689
|
+
};
|
|
690
|
+
var DOC_NAMES = [
|
|
691
|
+
"solution.md",
|
|
692
|
+
"architecture.md",
|
|
693
|
+
"plan.md"
|
|
694
|
+
];
|
|
695
|
+
/**
|
|
696
|
+
* The document chips of an epic and the excerpt of its architecture, read off the card folder as
|
|
697
|
+
* the Files tab lists it. No skill writes a `solution.md`, so the excerpt comes from `architecture.md`.
|
|
698
|
+
*/
|
|
699
|
+
function epicDocs(db, key, env) {
|
|
700
|
+
const files = filesFor(db, key, env).flatMap((group) => group.files);
|
|
701
|
+
const docs = DOC_NAMES.flatMap((name) => {
|
|
702
|
+
const file = files.find((one) => one.name === name);
|
|
703
|
+
return file === void 0 ? [] : [{
|
|
704
|
+
label: name,
|
|
705
|
+
path: file.path,
|
|
706
|
+
screens: null
|
|
707
|
+
}];
|
|
708
|
+
});
|
|
709
|
+
for (const [folder, label] of [["design", "Design"], ["mockups", "Mockups"]]) {
|
|
710
|
+
const screens = files.filter((file) => file.path.startsWith(`${folder}/`) && file.name.endsWith(".html"));
|
|
711
|
+
if (screens.length > 0) docs.push({
|
|
712
|
+
label,
|
|
713
|
+
path: files.find((file) => file.path === `${folder}/${folder}.md`)?.path ?? screens[0].path,
|
|
714
|
+
screens: screens.length
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
const at = docs.find((doc) => doc.label === "architecture.md")?.path;
|
|
718
|
+
const folder = at === void 0 ? null : cardFolder(db, key, env);
|
|
719
|
+
const read = folder === null || at === void 0 ? null : readCardFile(folder, at);
|
|
720
|
+
return {
|
|
721
|
+
docs,
|
|
722
|
+
solution: read?.ok ? architectureExcerpt(read.bytes.toString("utf8")) : null
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* The first bullet of the review block, where the phase says what it concluded. An architecture
|
|
727
|
+
* written before the review block existed gives the first paragraph of `## The shape` instead.
|
|
728
|
+
*/
|
|
729
|
+
function architectureExcerpt(text) {
|
|
730
|
+
const section = (heading) => {
|
|
731
|
+
const at = text.split("\n").findIndex((line) => line.trim() === heading);
|
|
732
|
+
if (at === -1) return null;
|
|
733
|
+
const lines = text.split("\n").slice(at + 1);
|
|
734
|
+
const end = lines.findIndex((line) => line.startsWith("#"));
|
|
735
|
+
return (end === -1 ? lines : lines.slice(0, end)).join("\n");
|
|
736
|
+
};
|
|
737
|
+
const review = section("## Before you approve")?.split("\n").find((line) => line.startsWith("- "));
|
|
738
|
+
if (review !== void 0) return review.slice(2).trim() || null;
|
|
739
|
+
return section("## The shape")?.split(/\n\s*\n/).map((part) => part.trim()).find((part) => part !== "") ?? null;
|
|
740
|
+
}
|
|
741
|
+
var MOVER = {
|
|
742
|
+
you: "you",
|
|
743
|
+
auto: "Nolzu"
|
|
744
|
+
};
|
|
745
|
+
/**
|
|
746
|
+
* Whether the card is past Plan on its own board: in a later stage, the archive too, or in the plan
|
|
747
|
+
* stage with the plan done. A card that never reached Plan, or whose board has none, has no plan to
|
|
748
|
+
* show. A closed card that never planned has no file, so it shows none either.
|
|
749
|
+
*/
|
|
750
|
+
function pastPlan(stages, stage, state) {
|
|
751
|
+
const plan = stages.findIndex((one) => one.phase === "plan");
|
|
752
|
+
const at = stages.findIndex((one) => one.id === stage);
|
|
753
|
+
if (plan === -1 || at < plan) return false;
|
|
754
|
+
return at > plan || state === "ready";
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* The Delivery cards linked to an epic, oldest first.
|
|
758
|
+
*
|
|
759
|
+
* Ordered by rowid and not by key: a key sorts as text, so APP-10 would land before APP-2. Done is
|
|
760
|
+
* the Delivery board's archive stage, read off the board the way the board card's count reads it.
|
|
761
|
+
*/
|
|
762
|
+
function epicTasks(db, key, flow) {
|
|
763
|
+
const closed = boardFor("delivery").stages.find((stage) => stage.role === "archive")?.id ?? "closed";
|
|
764
|
+
return db.prepare(`SELECT c.key, c.title, c.stage, l.step FROM card_links l
|
|
765
|
+
JOIN cards c ON c.key = CASE WHEN l.a = ? THEN l.b ELSE l.a END AND c.board = 'delivery'
|
|
766
|
+
WHERE l.a = ? OR l.b = ? ORDER BY c.rowid`).all(key, key, key).map((row) => ({
|
|
767
|
+
key: row.key,
|
|
768
|
+
title: row.title,
|
|
769
|
+
done: row.stage === closed,
|
|
770
|
+
...row.step === null ? {} : { step: row.step }
|
|
771
|
+
}));
|
|
772
|
+
}
|
|
773
|
+
function planText(folder) {
|
|
774
|
+
const read = readCardFile(folder, "plan/plan.md");
|
|
775
|
+
return read.ok ? read.bytes.toString("utf8") : null;
|
|
776
|
+
}
|
|
777
|
+
function reportSources(report) {
|
|
778
|
+
const heading = /^##[ \t]+Sources[ \t]*$/m.exec(report);
|
|
779
|
+
if (heading === null) return {
|
|
780
|
+
body: report,
|
|
781
|
+
sources: []
|
|
782
|
+
};
|
|
783
|
+
const rest = report.slice(heading.index + heading[0].length);
|
|
784
|
+
const after = rest.search(/^#{1,2}[ \t]/m);
|
|
785
|
+
const sources = (after === -1 ? rest : rest.slice(0, after)).split("\n").flatMap((line) => {
|
|
786
|
+
const item = /^[ \t]*[-*][ \t]+`?([^`\s,]*[^`\s,:])`?[,:]?[ \t]*(.*)$/.exec(line);
|
|
787
|
+
if (item === null) return [];
|
|
788
|
+
const note = item[2].replace(/^[-\u2013\u2014][ \t]*/, "").trim();
|
|
789
|
+
return [{
|
|
790
|
+
at: item[1],
|
|
791
|
+
note: note === "" ? null : note
|
|
792
|
+
}];
|
|
793
|
+
});
|
|
794
|
+
const before = report.slice(0, heading.index).trimEnd();
|
|
795
|
+
return {
|
|
796
|
+
body: after === -1 ? before : `${before}\n\n${rest.slice(after)}`,
|
|
797
|
+
sources
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
function researchReport(folder, board) {
|
|
801
|
+
if (!isResearchKind(board)) return void 0;
|
|
802
|
+
const file = RESEARCH_REPORTS[board];
|
|
803
|
+
const read = readCardFile(folder, file);
|
|
804
|
+
return read.ok ? {
|
|
805
|
+
title: board === "questions" ? "The answer" : "The report",
|
|
806
|
+
file,
|
|
807
|
+
...reportSources(read.bytes.toString("utf8"))
|
|
808
|
+
} : void 0;
|
|
809
|
+
}
|
|
810
|
+
function sharePlan(folder) {
|
|
811
|
+
const read = readCardFile(folder, SHARE_PLAN_FILE);
|
|
812
|
+
return read.ok ? read.bytes.toString("utf8") : null;
|
|
813
|
+
}
|
|
814
|
+
function epicSeed(folder, key) {
|
|
815
|
+
const text = (path) => {
|
|
816
|
+
const read = readCardFile(folder, path);
|
|
817
|
+
return read.ok ? read.bytes.toString("utf8") : "";
|
|
818
|
+
};
|
|
819
|
+
return {
|
|
820
|
+
key,
|
|
821
|
+
criteria: refinedCriteria(text("refine/refined.md")),
|
|
822
|
+
decisions: decisionLines(`${text("architecture/architecture.md")}\n${text("plan/plan.md")}`)
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
function discoveriesIn(folder) {
|
|
826
|
+
const read = readCardFile(folder, DISCOVERIES_FILE);
|
|
827
|
+
return read.ok ? read.bytes.toString("utf8").split(/\r?\n/).filter((line) => /^[-*] /.test(line)).length : 0;
|
|
828
|
+
}
|
|
829
|
+
function planSteps(db, key, env = process.env) {
|
|
830
|
+
const folder = cardFolder(db, key, env);
|
|
831
|
+
const text = folder === null ? null : planText(folder);
|
|
832
|
+
return text === null ? null : parsePlan(text)?.steps?.map((step) => step.text) ?? null;
|
|
833
|
+
}
|
|
834
|
+
function overviewFor(db, key, env = process.env) {
|
|
835
|
+
const card = db.prepare("SELECT state, stage, summary, extra_context, board, source FROM cards WHERE key = ?").get(key);
|
|
836
|
+
if (card === void 0) return null;
|
|
837
|
+
const newest = db.prepare("SELECT plain_summary, phase, ended_at FROM runs WHERE card_key = ? AND plain_summary IS NOT NULL ORDER BY id DESC LIMIT 1").get(key);
|
|
838
|
+
const built = db.prepare("SELECT plain_summary AS summary, phase, ended_at FROM runs WHERE card_key = ? AND plain_summary IS NOT NULL AND phase <> 'qa' ORDER BY id DESC LIMIT 1").get(key);
|
|
839
|
+
const asked = card.state === "blocked" ? db.prepare(`SELECT id, question, question_options, session_id, phase, engine, coalesce(asked_model, model) AS model, effort FROM runs WHERE card_key = ? AND ${NOT_A_PASS} ORDER BY id DESC LIMIT 1`).get(key) : void 0;
|
|
840
|
+
const options = storedQuestionOptions(asked?.question_options ?? null);
|
|
841
|
+
const shown = shownRunState(db);
|
|
842
|
+
const runs = cardRuns(db, key).map((run) => ({
|
|
843
|
+
...run,
|
|
844
|
+
state: shown(run.state)
|
|
845
|
+
}));
|
|
846
|
+
getSetting(db, "deliveryFlow");
|
|
847
|
+
const stages = boardFor(card.board).stages;
|
|
848
|
+
const closed = isClosed(card.board, card.stage);
|
|
849
|
+
const events = db.prepare("SELECT from_stage, to_stage, who, at, started_phase, reason FROM card_events WHERE card_key = ? ORDER BY id").all(key);
|
|
850
|
+
const folder = cardFolder(db, key, env);
|
|
851
|
+
const refined = db.prepare("SELECT ended_at FROM runs WHERE card_key = ? AND phase = 'refine' AND ended_at IS NOT NULL ORDER BY id DESC LIMIT 1").get(key);
|
|
852
|
+
const epic = card.board === "epics" ? epicDocs(db, key, env) : null;
|
|
853
|
+
const broke = readOnlyBreakOf(db, key);
|
|
854
|
+
const phase = stages.find((one) => one.id === card.stage)?.phase;
|
|
855
|
+
const shared = card.board === "epics" && folder !== null ? sharePlan(folder) : null;
|
|
856
|
+
const research = folder === null ? void 0 : researchReport(folder, card.board);
|
|
857
|
+
return {
|
|
858
|
+
...research === void 0 ? {} : { research },
|
|
859
|
+
...card.board === "epics" && folder !== null ? { seed: epicSeed(folder, key) } : {},
|
|
860
|
+
...shared === null ? {} : { sharePlan: shared },
|
|
861
|
+
...card.board === "epics" ? { linkSystem: getSetting(db, "ticketSystem") === "jira" ? "Jira" : "GitHub" } : {},
|
|
862
|
+
summary: newest?.plain_summary ?? null,
|
|
863
|
+
summaryPhase: newest?.phase ?? null,
|
|
864
|
+
built: built === void 0 ? null : {
|
|
865
|
+
summary: built.summary,
|
|
866
|
+
phase: built.phase,
|
|
867
|
+
at: built.ended_at
|
|
868
|
+
},
|
|
869
|
+
ticketSource: SOURCE_WORDS[card.source] ?? card.source,
|
|
870
|
+
refinedAt: refined?.ended_at ?? null,
|
|
871
|
+
docs: epic?.docs ?? null,
|
|
872
|
+
solution: epic?.solution ?? null,
|
|
873
|
+
summaryFrom: newest === void 0 ? null : closed && newest.phase === "wrapup" ? "The whole card, written at wrap-up" : `Written after ${phaseLabel(newest.phase)}`,
|
|
874
|
+
summaryAt: newest?.ended_at ?? null,
|
|
875
|
+
plan: folder !== null && pastPlan(stages, card.stage, card.state) ? planText(folder) : null,
|
|
876
|
+
planOpen: phase === "plan" || phase === "implement",
|
|
877
|
+
ticket: card.summary,
|
|
878
|
+
extra: card.extra_context,
|
|
879
|
+
related: relatedCards(db, key),
|
|
880
|
+
tasks: card.board === "epics" ? epicTasks(db, key) : null,
|
|
881
|
+
...card.board === "epics" ? { nextKey: peekLocalKey(db, 1, getSetting(db, "localKeyPrefix")).key } : {},
|
|
882
|
+
blocked: asked === void 0 ? null : {
|
|
883
|
+
runId: asked.id,
|
|
884
|
+
question: asked.question ?? "",
|
|
885
|
+
sessionId: asked.session_id,
|
|
886
|
+
...options === null ? {} : { options },
|
|
887
|
+
phase: asked.phase,
|
|
888
|
+
engine: asked.engine,
|
|
889
|
+
model: asked.model,
|
|
890
|
+
effort: asked.effort
|
|
891
|
+
},
|
|
892
|
+
strip: phaseStrip(boardFor(card.board), runs),
|
|
893
|
+
spend: spendOf(runs),
|
|
894
|
+
readOnlyBreak: broke === null ? null : {
|
|
895
|
+
...broke,
|
|
896
|
+
phase: phaseLabel(broke.phase),
|
|
897
|
+
engine: engineName(broke.engine)
|
|
898
|
+
},
|
|
899
|
+
commitWarning: commitWarningOf(db, key),
|
|
900
|
+
gate: closed ? null : gateFor(db, key, env),
|
|
901
|
+
moves: events.map((event, index) => {
|
|
902
|
+
const at = (id) => stages.findIndex((stage) => stage.id === id);
|
|
903
|
+
const approved = event.to_stage === "review" ? events.find((later, after) => after > index && later.from_stage === "review") : void 0;
|
|
904
|
+
const onward = approved !== void 0 && at(approved.to_stage) > at("review") ? approved : void 0;
|
|
905
|
+
return {
|
|
906
|
+
label: stages.find((stage) => stage.id === event.to_stage)?.label ?? event.to_stage,
|
|
907
|
+
...onward === void 0 ? {
|
|
908
|
+
said: `moved by ${MOVER[event.who] ?? event.who}`,
|
|
909
|
+
at: event.at
|
|
910
|
+
} : {
|
|
911
|
+
said: `approved by ${MOVER[onward.who] ?? onward.who}`,
|
|
912
|
+
at: onward.at
|
|
913
|
+
},
|
|
914
|
+
phase: event.started_phase,
|
|
915
|
+
...event.reason === null ? {} : {
|
|
916
|
+
reason: event.reason,
|
|
917
|
+
from: stages.find((stage) => stage.id === event.from_stage)?.phase ?? null
|
|
918
|
+
},
|
|
919
|
+
...event.reason !== null && at(event.to_stage) < at(event.from_stage) ? { back: true } : {}
|
|
920
|
+
};
|
|
921
|
+
})
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* The knowledge change a closed card's wrap-up made: the files of its newest run that touched any,
|
|
926
|
+
* each with the patch its commit made. One git call per file, and a card's wrap-up touches few. With
|
|
927
|
+
* `patches` false git is not asked, so the card page draws the rows at once and streams the patches.
|
|
928
|
+
*/
|
|
929
|
+
async function cardKnowledge(db, key, env = process.env, patches = true) {
|
|
930
|
+
const mine = allKnowledgeChanges(db).filter((row) => row.cardKey === key);
|
|
931
|
+
const run = Math.max(...mine.map((row) => row.runId));
|
|
932
|
+
const folder = resolveKnowledgeDir({
|
|
933
|
+
knowledgeDir: getSetting(db, "knowledgeDir"),
|
|
934
|
+
projectPath: getSetting(db, "projectPath")
|
|
935
|
+
});
|
|
936
|
+
const lines = [];
|
|
937
|
+
for (const row of mine.filter((one) => one.runId === run)) {
|
|
938
|
+
const said = patches && folder !== null && existsSync(folder) && row.commitSha !== null && row.movedFrom === null ? await commitPatch(folder, row.commitSha ?? "", row.filePath, env) : null;
|
|
939
|
+
lines.push({
|
|
940
|
+
id: row.id,
|
|
941
|
+
path: row.filePath,
|
|
942
|
+
status: row.status,
|
|
943
|
+
summary: row.summary,
|
|
944
|
+
diff: said?.diff ?? null,
|
|
945
|
+
applied: said?.committedAt ?? null
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
return lines;
|
|
949
|
+
}
|
|
950
|
+
var SOURCES = {
|
|
951
|
+
local: "local ticket",
|
|
952
|
+
github: "GitHub",
|
|
953
|
+
"github-pr": "GitHub",
|
|
954
|
+
jira: "Jira",
|
|
955
|
+
linear: "Linear"
|
|
956
|
+
};
|
|
957
|
+
/**
|
|
958
|
+
* The ticket a card came from, with the address of its page where Nolzu can build it: a Jira key on
|
|
959
|
+
* the project's site, the way Jira does (`<site>/browse/PROJ-123`), and a GitHub issue or pull request
|
|
960
|
+
* kept as `owner/repo#42`. A Linear page needs the workspace name and a GitLab one the host, and the
|
|
961
|
+
* card keeps neither, so those show the key alone, as a Jira key does on a project with no site.
|
|
962
|
+
*/
|
|
963
|
+
function sourceTicket(source, ref, jiraSite) {
|
|
964
|
+
if (source === "local" || ref === null || ref === "") return null;
|
|
965
|
+
if (source === "jira") return {
|
|
966
|
+
key: ref,
|
|
967
|
+
href: jiraSite === null ? null : `${jiraSite}/browse/${encodeURIComponent(ref)}`
|
|
968
|
+
};
|
|
969
|
+
const github = /^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+)#(\d+)$/.exec(ref);
|
|
970
|
+
if ((source === "github" || source === "github-pr") && github !== null) return {
|
|
971
|
+
key: ref,
|
|
972
|
+
href: `https://github.com/${github[1]}/${github[2]}/${source === "github-pr" ? "pull" : "issues"}/${github[3]}`
|
|
973
|
+
};
|
|
974
|
+
return {
|
|
975
|
+
key: ref,
|
|
976
|
+
href: null
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* The facts under the trail on the overview: the branch, on a closed card the repositories it worked
|
|
981
|
+
* in, the checkout, the newest session of each phase, the engine, how many discoveries the card wrote
|
|
982
|
+
* and where the ticket came from. The branch is read off the checkout with one git call. An open card
|
|
983
|
+
* with no checkout shows the name its first run will take, so the person can change it before then. A
|
|
984
|
+
* pushed branch is locked. The engine is the newest run's, or with `models` the next step's on a card
|
|
985
|
+
* that never ran.
|
|
986
|
+
*/
|
|
987
|
+
async function cardFacts(db, key, env, models) {
|
|
988
|
+
const card = db.prepare("SELECT source, source_ref, board, stage FROM cards WHERE key = ?").get(key);
|
|
989
|
+
if (card === void 0) return [];
|
|
990
|
+
const facts = [];
|
|
991
|
+
getSetting(db, "deliveryFlow");
|
|
992
|
+
const closed = isClosed(card.board, card.stage);
|
|
993
|
+
const repos = closed ? cardRepos(db, key)?.repos : void 0;
|
|
994
|
+
const repoFact = repos === void 0 ? [] : [{
|
|
995
|
+
label: repos.length === 1 ? "Repository" : "Repositories",
|
|
996
|
+
value: repos.join(", ")
|
|
997
|
+
}];
|
|
998
|
+
const project = getSetting(db, "projectPath");
|
|
999
|
+
if (project !== null && isPlainName(key)) {
|
|
1000
|
+
const at = checkoutRoot(project, key);
|
|
1001
|
+
const held = projectRepos({
|
|
1002
|
+
repos: getSetting(db, "repos"),
|
|
1003
|
+
baseBranch: getSetting(db, "baseBranch")
|
|
1004
|
+
}).map((repo) => checkoutPath(project, key, repo.path)).find((path) => existsSync(join(path, ".git")));
|
|
1005
|
+
if (held !== void 0) {
|
|
1006
|
+
const forGit = gitEnv(env);
|
|
1007
|
+
const branch = (await git(["branch", "--show-current"], {
|
|
1008
|
+
cwd: held,
|
|
1009
|
+
env: forGit
|
|
1010
|
+
})).stdout.trim();
|
|
1011
|
+
if (branch !== "") {
|
|
1012
|
+
let locked = closed ? "A closed card keeps its branch." : null;
|
|
1013
|
+
for (const one of cardCheckouts(db, key)) locked ??= await pushedReason((args) => git(args, {
|
|
1014
|
+
cwd: one.path,
|
|
1015
|
+
env: forGit
|
|
1016
|
+
}), branch);
|
|
1017
|
+
facts.push({
|
|
1018
|
+
label: "Branch",
|
|
1019
|
+
value: branch,
|
|
1020
|
+
edit: { locked }
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
facts.push(...repoFact, {
|
|
1024
|
+
label: "Checkout",
|
|
1025
|
+
value: relative(project, at)
|
|
1026
|
+
});
|
|
1027
|
+
} else {
|
|
1028
|
+
if (!closed) try {
|
|
1029
|
+
facts.push({
|
|
1030
|
+
label: "Branch",
|
|
1031
|
+
value: templateBranch(db, key),
|
|
1032
|
+
edit: { locked: null }
|
|
1033
|
+
});
|
|
1034
|
+
} catch {}
|
|
1035
|
+
facts.push(...repoFact, {
|
|
1036
|
+
label: "Checkout",
|
|
1037
|
+
value: closed ? "none" : "none yet"
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
} else facts.push(...repoFact);
|
|
1041
|
+
const stages = boardFor(card.board).stages;
|
|
1042
|
+
const phases = new Set(stages.map((stage) => stage.phase));
|
|
1043
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
1044
|
+
const runs = cardRuns(db, key).filter((run) => phases.has(run.phase));
|
|
1045
|
+
for (const run of runs) if (run.sessionId !== null) sessions.set(run.phase, run.sessionId);
|
|
1046
|
+
for (const [phase, id] of sessions) facts.push({
|
|
1047
|
+
label: `${phaseLabel(phase)} session`,
|
|
1048
|
+
value: id.slice(0, 8)
|
|
1049
|
+
});
|
|
1050
|
+
const next = stages.slice(stages.findIndex((stage) => stage.id === card.stage) + 1).find((stage) => stage.phase !== void 0)?.phase;
|
|
1051
|
+
const engine = runs.at(-1)?.engine ?? (models === void 0 || next === void 0 ? void 0 : settingsFor(db, key, models)?.rows.find((row) => row.action === next)?.resolved.engine);
|
|
1052
|
+
if (engine !== void 0) facts.push({
|
|
1053
|
+
label: "Engine",
|
|
1054
|
+
value: engineName(engine)
|
|
1055
|
+
});
|
|
1056
|
+
const folder = project === null ? null : cardFolder(db, key, env);
|
|
1057
|
+
const discoveries = folder === null ? 0 : discoveriesIn(folder);
|
|
1058
|
+
if (discoveries > 0) facts.push({
|
|
1059
|
+
label: "Discoveries",
|
|
1060
|
+
value: String(discoveries),
|
|
1061
|
+
file: DISCOVERIES_FILE
|
|
1062
|
+
});
|
|
1063
|
+
const ticket = sourceTicket(card.source, card.source_ref, getSetting(db, "jiraSite"));
|
|
1064
|
+
facts.push({
|
|
1065
|
+
label: "Source",
|
|
1066
|
+
value: SOURCES[card.source] ?? card.source,
|
|
1067
|
+
...ticket === null ? {} : { ticket }
|
|
1068
|
+
});
|
|
1069
|
+
return facts;
|
|
1070
|
+
}
|
|
1071
|
+
function tabCounts(db, key, env = process.env) {
|
|
1072
|
+
const files = filesFor(db, key, env).reduce((sum, group) => sum + group.files.length, 0);
|
|
1073
|
+
const said = db.prepare("SELECT COUNT(*) AS n FROM messages WHERE card_key = ?").get(key).n;
|
|
1074
|
+
const findings = reviewFor(db, key, null, env).blocks.length;
|
|
1075
|
+
const runs = db.prepare("SELECT COUNT(*) AS n FROM runs WHERE card_key = ?").get(key).n;
|
|
1076
|
+
return {
|
|
1077
|
+
...files > 0 ? { files: String(files) } : {},
|
|
1078
|
+
...said > 0 ? { discussion: String(said) } : {},
|
|
1079
|
+
...findings > 0 ? { review: String(findings) } : {},
|
|
1080
|
+
...runs > 0 ? { log: runs === 1 ? "1 run" : `${runs} runs` } : {}
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
var CONTEXT_LIMIT = 64e3;
|
|
1084
|
+
var answer = (status, body) => new Response(JSON.stringify(body), {
|
|
1085
|
+
status,
|
|
1086
|
+
headers: { "content-type": "application/json" }
|
|
1087
|
+
});
|
|
1088
|
+
async function saveContext(db, key, request) {
|
|
1089
|
+
const tooLarge = answer(413, { message: `The extra context is over ${CONTEXT_LIMIT / 1e3} kB, which is the limit. Shorten it and save again.` });
|
|
1090
|
+
if (Number(request.headers.get("content-length") ?? 0) > 512e3) return tooLarge;
|
|
1091
|
+
let text;
|
|
1092
|
+
try {
|
|
1093
|
+
text = (await request.json()).text;
|
|
1094
|
+
} catch {
|
|
1095
|
+
text = void 0;
|
|
1096
|
+
}
|
|
1097
|
+
if (typeof text !== "string") return answer(400, { message: "The extra context needs a text, which can be empty to clear it." });
|
|
1098
|
+
if (Buffer.byteLength(text, "utf8") > 64e3) return tooLarge;
|
|
1099
|
+
if (!setExtraContext(db, key, text)) return answer(404, { message: `There is no card ${key} here, so there is nothing to add context to.` });
|
|
1100
|
+
return answer(200, { ok: true });
|
|
1101
|
+
}
|
|
1102
|
+
function unlink(db, key, other) {
|
|
1103
|
+
if (!unlinkCards(db, key, other)) return answer(404, { message: `${key} and ${other} are not linked.` });
|
|
1104
|
+
return answer(200, { ok: true });
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
export { CONTEXT_LIMIT as C, measured as a, refuseProfile as b, saveProjectModels as c, reviewFor as d, cardKnowledge as e, cardFacts as f, saveContext as g, saveCardModels as h, modelsFor as m, overviewFor as o, planSteps as p, roundsIn as r, settingsFor as s, tabCounts as t, unlink as u };
|
|
1108
|
+
//# sourceMappingURL=overview.js-C32iHkXD.js.map
|