@cleocode/cleo 2026.10.3 → 2026.10.5-rc.ci.672
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/bin/cleo.js +11 -1
- package/dist/cli/adapter-OUQRSFZL.js +159 -0
- package/dist/cli/add-4SRRJL4U.js +443 -0
- package/dist/cli/add-batch-TSWICA5J.js +164 -0
- package/dist/cli/admin-L3F6CDYH.js +1428 -0
- package/dist/cli/admin-YMU55YCU.js +341 -0
- package/dist/cli/adr-XESRMFMP.js +172 -0
- package/dist/cli/agent-TAFPIYUU.js +2404 -0
- package/dist/cli/agent-outputs-HVJJIPS4.js +84 -0
- package/dist/cli/analyze-YQ22QVGW.js +49 -0
- package/dist/cli/archive-W5XX6AH7.js +65 -0
- package/dist/cli/archive-stats-HP2KPAJU.js +101 -0
- package/dist/cli/attention-7JBDCRZX.js +124 -0
- package/dist/cli/attention-ZXZANHKC.js +168 -0
- package/dist/cli/audit-ICA2SEFN.js +122 -0
- package/dist/cli/auth-DXIG5OG7.js +491 -0
- package/dist/cli/backfill-LBSYBWLR.js +156 -0
- package/dist/cli/backup-NUGBZ7NA.js +588 -0
- package/dist/cli/backup-inspect-PDRXI45A.js +26 -0
- package/dist/cli/backup-recover-TVKAPERB.js +29 -0
- package/dist/cli/blockers-ZOPCGHDW.js +55 -0
- package/dist/cli/brain-EJOBKL4A.js +397 -0
- package/dist/cli/briefing-RDQJ6WHS.js +213 -0
- package/dist/cli/caamp-Z3XPKEHB.js +181 -0
- package/dist/cli/cancel-S7EHLCJN.js +85 -0
- package/dist/cli/canon-NPF5RODM.js +142 -0
- package/dist/cli/canon-docs-2GTOLF7Y.js +26 -0
- package/dist/cli/cant-CHNN6O57.js +239 -0
- package/dist/cli/changeset-RYPHPN2B.js +246 -0
- package/dist/cli/check-C67YAU7W.js +759 -0
- package/dist/cli/check-DHMURGHC.js +924 -0
- package/dist/cli/checkpoint-UWDFOGYQ.js +128 -0
- package/dist/cli/chunk-22YPFZYB.js +91 -0
- package/dist/cli/chunk-2MGFDMDF.js +272 -0
- package/dist/cli/chunk-47JYZAMS.js +30 -0
- package/dist/cli/chunk-4JYHPP4C.js +76 -0
- package/dist/cli/chunk-4PEODTHY.js +278 -0
- package/dist/cli/chunk-4RGSNUUP.js +950 -0
- package/dist/cli/chunk-4VASFLUW.js +35 -0
- package/dist/cli/chunk-5PNI276X.js +124 -0
- package/dist/cli/chunk-6JSJNYH2.js +114 -0
- package/dist/cli/chunk-6N6WGLXE.js +63 -0
- package/dist/cli/chunk-75UH3BLS.js +210 -0
- package/dist/cli/chunk-7ACK4EIN.js +92 -0
- package/dist/cli/chunk-7NMKLVMI.js +107 -0
- package/dist/cli/chunk-7SINJXB6.js +110 -0
- package/dist/cli/chunk-7UARFJYS.js +46 -0
- package/dist/cli/chunk-7ZYPQV4N.js +90 -0
- package/dist/cli/chunk-AQCYT3L4.js +72 -0
- package/dist/cli/chunk-BQK6XTOH.js +57 -0
- package/dist/cli/chunk-C3B7C43W.js +16 -0
- package/dist/cli/chunk-CAPAGD5E.js +98 -0
- package/dist/cli/chunk-CHGEDCKG.js +77 -0
- package/dist/cli/chunk-COXFJ3PT.js +74 -0
- package/dist/cli/chunk-D7BAQNV2.js +55 -0
- package/dist/cli/chunk-EIUXVHNF.js +258 -0
- package/dist/cli/chunk-EUGB6P5V.js +173 -0
- package/dist/cli/chunk-EW2CKNNZ.js +304 -0
- package/dist/cli/chunk-FSKN4DWC.js +108 -0
- package/dist/cli/chunk-FVKLULL7.js +48 -0
- package/dist/cli/chunk-GAGUBU4Z.js +280 -0
- package/dist/cli/chunk-GKRFH2YG.js +171 -0
- package/dist/cli/chunk-GRU74UE4.js +270 -0
- package/dist/cli/chunk-GZFVDR44.js +320 -0
- package/dist/cli/chunk-HFLLZE6A.js +83 -0
- package/dist/cli/chunk-HXRXT3XU.js +78 -0
- package/dist/cli/chunk-IIOGUY3B.js +258 -0
- package/dist/cli/chunk-ILWWL462.js +60 -0
- package/dist/cli/chunk-J5USPJKZ.js +48 -0
- package/dist/cli/chunk-KEQS36GD.js +88 -0
- package/dist/cli/chunk-L7ONYSV6.js +2497 -0
- package/dist/cli/chunk-LVGIFMCV.js +163 -0
- package/dist/cli/chunk-NEFMQYLE.js +656 -0
- package/dist/cli/chunk-NU6CQQVB.js +4501 -0
- package/dist/cli/chunk-OILHT47L.js +252 -0
- package/dist/cli/chunk-PKKZPOOP.js +352 -0
- package/dist/cli/chunk-PN4WW5VX.js +66 -0
- package/dist/cli/chunk-PSJ33WVO.js +56 -0
- package/dist/cli/chunk-QA6T2LQ5.js +71 -0
- package/dist/cli/chunk-QJJWWCIC.js +288 -0
- package/dist/cli/chunk-QKMBWYAS.js +93 -0
- package/dist/cli/chunk-QWNKLLLG.js +84 -0
- package/dist/cli/chunk-QWUFFDL3.js +85 -0
- package/dist/cli/chunk-QY76BRUZ.js +35 -0
- package/dist/cli/chunk-R45KVF5Y.js +117 -0
- package/dist/cli/chunk-RRKP7HLU.js +66 -0
- package/dist/cli/chunk-SXXOC6KZ.js +209 -0
- package/dist/cli/chunk-T6GZJYL3.js +108 -0
- package/dist/cli/chunk-TLQ37HRE.js +67 -0
- package/dist/cli/chunk-TPTNEJZJ.js +52 -0
- package/dist/cli/chunk-TYC7G5LF.js +100 -0
- package/dist/cli/chunk-UWCZY52R.js +766 -0
- package/dist/cli/chunk-VB3LDPL5.js +46 -0
- package/dist/cli/chunk-VLEYOOPH.js +31 -0
- package/dist/cli/chunk-W3JLYKKY.js +140 -0
- package/dist/cli/chunk-WWCYZYSN.js +56 -0
- package/dist/cli/chunk-XA5WISNV.js +52 -0
- package/dist/cli/chunk-XHRZ7OYZ.js +132 -0
- package/dist/cli/chunk-XLPMIGJJ.js +148 -0
- package/dist/cli/chunk-YY66LFZF.js +29 -0
- package/dist/cli/chunk-ZMGDZMSJ.js +210 -0
- package/dist/cli/claim-IGOG2QOC.js +97 -0
- package/dist/cli/classify-MG4N7GMQ.js +117 -0
- package/dist/cli/cli-A23Q335V.js +51 -0
- package/dist/cli/cloud-SILYJVKO.js +731 -0
- package/dist/cli/cockpit-RZKLGYPN.js +790 -0
- package/dist/cli/code-H2FQCVMW.js +178 -0
- package/dist/cli/complete-JLX7NBI4.js +35 -0
- package/dist/cli/complexity-OKV7PVZH.js +57 -0
- package/dist/cli/compliance-QMGZHJNQ.js +277 -0
- package/dist/cli/conduit-4H32UYEA.js +308 -0
- package/dist/cli/conduit-EY54WTZA.js +535 -0
- package/dist/cli/config-TDYOC7XO.js +519 -0
- package/dist/cli/consensus-4XCOFPPT.js +122 -0
- package/dist/cli/context-FN4YTGHD.js +142 -0
- package/dist/cli/contribution-7RWFBJLC.js +112 -0
- package/dist/cli/curator-HKZJCVRL.js +139 -0
- package/dist/cli/current-B2NU7V3G.js +43 -0
- package/dist/cli/daemon-GBD4TVCD.js +452 -0
- package/dist/cli/dash-IGDANIE5.js +71 -0
- package/dist/cli/decide-26SXC2V6.js +416 -0
- package/dist/cli/decompose-LQ76TEZG.js +78 -0
- package/dist/cli/decomposition-WFRWNUSJ.js +122 -0
- package/dist/cli/delete-T5DUQHOX.js +69 -0
- package/dist/cli/deps-UTPZJBXL.js +462 -0
- package/dist/cli/detect-FFZSMVDT.js +46 -0
- package/dist/cli/detect-drift-TVCJOFYJ.js +408 -0
- package/dist/cli/diagnostics-GN5CVD3N.js +93 -0
- package/dist/cli/diagnostics-ZNBKH6GX.js +133 -0
- package/dist/cli/docs-CLQKEEUK.js +1710 -0
- package/dist/cli/docs-DPPDFTWR.js +3098 -0
- package/dist/cli/doctor-GPENOP4N.js +1270 -0
- package/dist/cli/doctor-ac-bindings-S3IOEFP4.js +26 -0
- package/dist/cli/doctor-acceptance-drift-VNFKPBSQ.js +26 -0
- package/dist/cli/doctor-credentials-A5H4JMTF.js +26 -0
- package/dist/cli/doctor-db-substrate-FGCISE4Z.js +27 -0
- package/dist/cli/doctor-dep-cycles-BKKKHHYG.js +26 -0
- package/dist/cli/doctor-exodus-ND2DH2KP.js +26 -0
- package/dist/cli/doctor-exodus-residue-4EMRYMEQ.js +26 -0
- package/dist/cli/doctor-fk-check-VY3RIQV3.js +26 -0
- package/dist/cli/doctor-global-delivery-JN6IGHUL.js +26 -0
- package/dist/cli/doctor-heavy-command-hook-XSN44WXU.js +26 -0
- package/dist/cli/doctor-legacy-backups-QAG5NHYP.js +26 -0
- package/dist/cli/doctor-legacy-reaper-CIRGFE6R.js +26 -0
- package/dist/cli/doctor-malformed-ids-WL7HT4TB.js +26 -0
- package/dist/cli/doctor-manifest-rows-SMQCKJ2T.js +26 -0
- package/dist/cli/doctor-memory-guard-LJDOJG76.js +26 -0
- package/dist/cli/doctor-migrations-ETQPFNUP.js +26 -0
- package/dist/cli/doctor-nexus-residency-A4JMKBEJ.js +26 -0
- package/dist/cli/doctor-project-identity-FFQJ5LNX.js +26 -0
- package/dist/cli/doctor-projects-MFUTKRHP.js +30 -0
- package/dist/cli/doctor-projects-registry-76X6VTGM.js +26 -0
- package/dist/cli/doctor-release-readiness-QJCOPFTK.js +26 -0
- package/dist/cli/doctor-repair-AU76FIKY.js +26 -0
- package/dist/cli/doctor-row-identity-KW6JYZQE.js +26 -0
- package/dist/cli/doctor-skill-fixtures-G3T7JUHS.js +26 -0
- package/dist/cli/doctor-split-brain-FUW6L7FS.js +26 -0
- package/dist/cli/doctor-superseded-store-DUHGSBLC.js +26 -0
- package/dist/cli/doctor-sync-journal-SXMUIKF7.js +26 -0
- package/dist/cli/doctor-sync-triggers-6WNJZFRM.js +26 -0
- package/dist/cli/doctor-tool-locks-66LSLUBN.js +26 -0
- package/dist/cli/doctor-twin-collapse-AYBYBFC4.js +26 -0
- package/dist/cli/doctor-worktree-stores-C5XEH5OG.js +26 -0
- package/dist/cli/done-R64XRZ32.js +196 -0
- package/dist/cli/dynamic-RR4HB7BB.js +29 -0
- package/dist/cli/entities-3JIHDIOK.js +361 -0
- package/dist/cli/event-45KEWV5H.js +372 -0
- package/dist/cli/exists-BEDZS5RI.js +65 -0
- package/dist/cli/exodus-DUX62344.js +401 -0
- package/dist/cli/export-C5PQIQ5O.js +93 -0
- package/dist/cli/export-tasks-CUXDZPJB.js +97 -0
- package/dist/cli/federation-ESM35EGG.js +145 -0
- package/dist/cli/find-5EUZHHQJ.js +178 -0
- package/dist/cli/focus-6AH4KLRO.js +368 -0
- package/dist/cli/focus-ANKAIRO5.js +56 -0
- package/dist/cli/gateway-2GW2KTK3.js +77 -0
- package/dist/cli/gateway-auto-start-EDK7XI6E.js +36 -0
- package/dist/cli/gc-CTOQLUSA.js +291 -0
- package/dist/cli/go-YJPNHHYT.js +206 -0
- package/dist/cli/goal-4GW4G77D.js +213 -0
- package/dist/cli/grade-25WSZH4X.js +57 -0
- package/dist/cli/graph-JUO3TMF3.js +879 -0
- package/dist/cli/history-NACNUQTC.js +138 -0
- package/dist/cli/hook-UF7J7R6D.js +57 -0
- package/dist/cli/hook-entry.js +244 -19
- package/dist/cli/hygiene-3QZ2NI7P.js +55 -0
- package/dist/cli/import-7ESGL5SS.js +89 -0
- package/dist/cli/import-tasks-FLE2RPBR.js +109 -0
- package/dist/cli/index.js +601 -94637
- package/dist/cli/init-AN4DZ2XO.js +40 -0
- package/dist/cli/inject-HQWA5GWY.js +83 -0
- package/dist/cli/install-global-YQV4W5OG.js +95 -0
- package/dist/cli/intelligence-OFFNQGHE.js +238 -0
- package/dist/cli/intelligence-QIC4SN4X.js +182 -0
- package/dist/cli/issue-P5RNMRDG.js +159 -0
- package/dist/cli/janitor-ZNCFQ7E3.js +111 -0
- package/dist/cli/labels-ORBM3T57.js +88 -0
- package/dist/cli/lifecycle-MHR22TVI.js +273 -0
- package/dist/cli/list-LB6GCYYU.js +109 -0
- package/dist/cli/llm-H7LZWQKX.js +130 -0
- package/dist/cli/llm-OTJWPMGI.js +704 -0
- package/dist/cli/llm-cost-MLMXEAR4.js +25 -0
- package/dist/cli/llm-stream-AAEUNKRP.js +27 -0
- package/dist/cli/log-W2A5M2NA.js +76 -0
- package/dist/cli/login-SIXFFZSP.js +45 -0
- package/dist/cli/logout-G3KVLQQM.js +74 -0
- package/dist/cli/manifest-G4T6EBSI.js +354 -0
- package/dist/cli/map-VU5M72TK.js +53 -0
- package/dist/cli/memory-2E27G2G5.js +1952 -0
- package/dist/cli/memory-IAEYKXG6.js +1895 -0
- package/dist/cli/migrate-agents-v2-A52QIYNJ.js +33 -0
- package/dist/cli/migrate-claude-mem-TPDW3R4Z.js +206 -0
- package/dist/cli/next-SVH4LIDY.js +57 -0
- package/dist/cli/nexus-FPQV2EAF.js +1059 -0
- package/dist/cli/nexus-XSFXN5E6.js +2924 -0
- package/dist/cli/ops-K6LHY5J6.js +52 -0
- package/dist/cli/orchestrate-CZ2J6W3L.js +1650 -0
- package/dist/cli/orchestrate-HURUCQFT.js +950 -0
- package/dist/cli/otel-JCNPVJLZ.js +188 -0
- package/dist/cli/phase-VDFRASSO.js +221 -0
- package/dist/cli/pipeline-TCZPOEDR.js +697 -0
- package/dist/cli/pivot-V5MSQZ7L.js +88 -0
- package/dist/cli/plan-SQUGCKSM.js +49 -0
- package/dist/cli/playbook-L47GLDQD.js +230 -0
- package/dist/cli/playbook-NJVO4R6P.js +33 -0
- package/dist/cli/project-YZEC7GYF.js +331 -0
- package/dist/cli/promote-FINF4HVK.js +53 -0
- package/dist/cli/provenance-3TUWVBFR.js +141 -0
- package/dist/cli/provenance-YZG33JGM.js +129 -0
- package/dist/cli/provider-23JVLLG3.js +213 -0
- package/dist/cli/reason-FHN54O7O.js +138 -0
- package/dist/cli/reconcile-MOM5T4AX.js +128 -0
- package/dist/cli/refresh-memory-3OSTRAVK.js +45 -0
- package/dist/cli/relates-6FWUFUS2.js +260 -0
- package/dist/cli/release-G2DPSG5M.js +347 -0
- package/dist/cli/release-URX6JHZ2.js +525 -0
- package/dist/cli/remote-VIULU2T5.js +279 -0
- package/dist/cli/renderers-TGSW77J4.js +37 -0
- package/dist/cli/reorder-UIPN6TQY.js +87 -0
- package/dist/cli/reparent-ALOWWUIU.js +59 -0
- package/dist/cli/req-RH2Y3H7A.js +130 -0
- package/dist/cli/research-G2Y72HRC.js +366 -0
- package/dist/cli/restore-VBR5XNML.js +470 -0
- package/dist/cli/revert-32LDNSGP.js +240 -0
- package/dist/cli/roadmap-LFU3AG7D.js +62 -0
- package/dist/cli/run-HXRILSR7.js +245 -0
- package/dist/cli/safestop-Z5UC7NGQ.js +89 -0
- package/dist/cli/saga-Y6FZS6AM.js +286 -0
- package/dist/cli/schema-OOOKLWUE.js +195 -0
- package/dist/cli/self-update-26SOTJMH.js +504 -0
- package/dist/cli/selfimprove-4SMOCLUV.js +89 -0
- package/dist/cli/selfimprove-EB4RQLP4.js +139 -0
- package/dist/cli/sentient-QPETVE53.js +254 -0
- package/dist/cli/sentient-RGMWR4XJ.js +1088 -0
- package/dist/cli/sequence-H7DSAJPF.js +94 -0
- package/dist/cli/service-EK5MGB2D.js +156 -0
- package/dist/cli/service-GLOMZWPQ.js +437 -0
- package/dist/cli/session-HYUXAQGC.js +708 -0
- package/dist/cli/session-N5ISU56W.js +568 -0
- package/dist/cli/setup-L3YYV53D.js +323 -0
- package/dist/cli/show-364V3KY2.js +123 -0
- package/dist/cli/skill-F2KR6HW5.js +84 -0
- package/dist/cli/skills-FS3DCP6E.js +929 -0
- package/dist/cli/smoke-provider-SKUFMZXU.js +218 -0
- package/dist/cli/snapshot-EGXEQ5PR.js +120 -0
- package/dist/cli/src-LYLXHXHH.js +80 -0
- package/dist/cli/start-6DXOCCKL.js +68 -0
- package/dist/cli/stats-UVUQEGYC.js +96 -0
- package/dist/cli/status-XLKYLN42.js +157 -0
- package/dist/cli/sticky-VSTQ2I2O.js +264 -0
- package/dist/cli/sticky-XZXZDCFW.js +339 -0
- package/dist/cli/stop-VNOAFWNB.js +43 -0
- package/dist/cli/sync-YYPARW3A.js +155 -0
- package/dist/cli/tasks-C24KHTFF.js +1118 -0
- package/dist/cli/tasks-LBJC7CZV.js +175 -0
- package/dist/cli/telemetry-CU7W5WAY.js +120 -0
- package/dist/cli/templates-G42JBUY4.js +609 -0
- package/dist/cli/testing-HSRITHEY.js +147 -0
- package/dist/cli/token-J74E7TSU.js +221 -0
- package/dist/cli/tools-BI74W7VE.js +652 -0
- package/dist/cli/transcript-RGK7RSGQ.js +440 -0
- package/dist/cli/tui-BPUFHYKK.js +51 -0
- package/dist/cli/update-2KQWA27S.js +478 -0
- package/dist/cli/update-check-entry.js +124 -0
- package/dist/cli/update-notice-6SQ6WPQG.js +68 -0
- package/dist/cli/upgrade-E2MJAPC7.js +136 -0
- package/dist/cli/upgrade-XRSQ4RWH.js +243 -0
- package/dist/cli/verify-WASRGDBA.js +191 -0
- package/dist/cli/web-NJ3P67EU.js +275 -0
- package/dist/cli/workgraph-OHJ2VKJD.js +232 -0
- package/dist/cli/worktree-FVQLORFY.js +371 -0
- package/dist/cli/worktree-ZJ6JTQNG.js +287 -0
- package/package.json +13 -13
- package/studio-dist/client/_app/immutable/chunks/{DMj27Pxj.js → AH7dIemv.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{Dc2owyvE.js → BDgH40i3.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/BXDCSJ7U.js +1 -0
- package/studio-dist/client/_app/immutable/chunks/{qq3pe1aT.js → Gg4iYl59.js} +1 -1
- package/studio-dist/client/_app/immutable/entry/{app.CHWXLeE9.js → app.DUDNK-37.js} +2 -2
- package/studio-dist/client/_app/immutable/entry/start.DNmZ0pA4.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{0.DmKQGvFh.js → 0.DWqP3ail.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{1.DqJk_REO.js → 1.CZGVUP5B.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{15.GUy6kdW1.js → 15.DGaflZRS.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{16.CcnKZ8f9.js → 16.uYlarGXl.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{17.DAlQF3lQ.js → 17.CZMR0E47.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{18.vQFr-vFj.js → 18.CBC-AKH_.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{20.GVOj5j_r.js → 20.BGi43MvQ.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{24.2-wC6DOh.js → 24.Dv8ftCyR.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/25.DQPVlTDQ.js +39 -0
- package/studio-dist/client/_app/immutable/nodes/{26.C3rNqzZF.js → 26.Cl800304.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{3.b-7pzc3M.js → 3.D_fQKj9f.js} +1 -1
- package/studio-dist/client/_app/version.json +1 -1
- package/studio-dist/server/chunks/{0-BaCce-O1.js → 0-BpOagOst.js} +3 -3
- package/studio-dist/server/chunks/1-D0oRGR-C.js +9 -0
- package/studio-dist/server/chunks/{15-DRMOSIC9.js → 15-BcjHz7Tv.js} +3 -3
- package/studio-dist/server/chunks/{16-BulXhoZZ.js → 16-CXm8TUk7.js} +3 -3
- package/studio-dist/server/chunks/{17-DUEOCM0H.js → 17-mSgUK-cp.js} +3 -3
- package/studio-dist/server/chunks/{18-DP7Q8zPs.js → 18-BtfnIw1d.js} +3 -3
- package/studio-dist/server/chunks/{20-9ta6MI7q.js → 20-By1e4QDS.js} +3 -3
- package/studio-dist/server/chunks/{24-DysdL1ab.js → 24-0i2YLVxG.js} +3 -3
- package/studio-dist/server/chunks/{dist-CdoCt9zT.js → 25-DPsrqbrh.js} +797 -10736
- package/studio-dist/server/chunks/{26-Df4YXgg0.js → 26-P0XkOibm.js} +3 -3
- package/studio-dist/server/chunks/{3-BEhOhYpL.js → 3-WudjUK7e.js} +3 -3
- package/studio-dist/server/chunks/{_layout.svelte-CnLcXYG-.js → _layout.svelte-D9m81Rle.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-DGhXqeRc.js → _page.svelte-2PDLOF83.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-Dv8tmDEC.js → _page.svelte-BjE3jm2K.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-C0qgUvzA.js → _page.svelte-Clc0vmiZ.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-ui7LnWkL.js → _page.svelte-DABdRT3h.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-HUqTICJR.js → _page.svelte-DG3PjiHj.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DzcZljiy.js → _page.svelte-Edy9CaE8.js} +20 -7
- package/studio-dist/server/chunks/{_page.svelte-DOl0DGOO.js → _page.svelte-Hrf3-ZR8.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-Da4q5l93.js → _page.svelte-VB4O4Nl5.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-CbyEPj2j.js → _page.svelte-d3jEgjsI.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-P4wVVksg.js → _server.ts-BcRFsyo3.js} +4 -5
- package/studio-dist/server/chunks/{_server.ts-Cr57EKWf.js → _server.ts-CEWpIFrj.js} +6 -5
- package/studio-dist/server/chunks/{_server.ts-CnKVmf_s.js → _server.ts-CLVdVIF9.js} +2 -2
- package/studio-dist/server/chunks/{_server.ts-C0evMKCk.js → _server.ts-D_j7aSy5.js} +6 -5
- package/studio-dist/server/chunks/{_server.ts-2BazvYRP.js → _server.ts-QEZF8h2q.js} +4 -5
- package/studio-dist/server/chunks/{client-CPM4LrO2.js → client-Kp1dP1od.js} +2 -2
- package/studio-dist/server/chunks/{error.svelte-ShcZo43D.js → error.svelte-WOCioJVX.js} +3 -3
- package/studio-dist/server/chunks/{hooks.server-D2qbf3Zp.js → hooks.server-DH9zkIrJ.js} +3 -1
- package/studio-dist/server/chunks/{http-BiQjEmVU.js → http-DT5kxaWk.js} +5 -4
- package/studio-dist/server/chunks/{internal-Cgsrya1j.js → internal-z0vqd5_u.js} +3 -3
- package/studio-dist/server/chunks/operations-registry-DdzmYzqX.js +10584 -0
- package/studio-dist/server/chunks/{stores-BGrpEDMK.js → stores-s2kaL315.js} +2 -2
- package/studio-dist/server/index.js +1 -1
- package/studio-dist/server/manifest.js +17 -17
- package/studio-dist/client/_app/immutable/chunks/Bw6J8NDM.js +0 -1
- package/studio-dist/client/_app/immutable/entry/start.C9bwPpvc.js +0 -1
- package/studio-dist/client/_app/immutable/nodes/25.D1vYaH8g.js +0 -39
- package/studio-dist/server/chunks/1-CVo7Nk6d.js +0 -9
- package/studio-dist/server/chunks/25-CYsps38R.js +0 -366
|
@@ -0,0 +1,1118 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const _installed = Symbol.for('cleocode.cli.sqliteWarningFilter');
|
|
3
|
+
if (globalThis[_installed]) return;
|
|
4
|
+
globalThis[_installed] = true;
|
|
5
|
+
const _origEmitWarning = process.emitWarning;
|
|
6
|
+
process.emitWarning = function(warning, type, code, ctor) {
|
|
7
|
+
if (typeof warning === 'object' && warning.name === 'ExperimentalWarning' && typeof warning.message === 'string' && /SQLite is an experimental feature/i.test(warning.message)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof warning === 'string' && /SQLite is an experimental feature/i.test(warning)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return _origEmitWarning.call(process, warning, type, code, ctor);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import {
|
|
17
|
+
defineTypedHandler,
|
|
18
|
+
lafsError,
|
|
19
|
+
lafsSuccess,
|
|
20
|
+
typedDispatch,
|
|
21
|
+
wrapCoreResult
|
|
22
|
+
} from "./chunk-QWNKLLLG.js";
|
|
23
|
+
import {
|
|
24
|
+
lazyOperation
|
|
25
|
+
} from "./chunk-TYC7G5LF.js";
|
|
26
|
+
import {
|
|
27
|
+
envelopeToEngineResult,
|
|
28
|
+
errorResult,
|
|
29
|
+
handleErrorResult,
|
|
30
|
+
unsupportedOp,
|
|
31
|
+
wrapResult
|
|
32
|
+
} from "./chunk-XHRZ7OYZ.js";
|
|
33
|
+
|
|
34
|
+
// packages/cleo/src/dispatch/domains/tasks.ts
|
|
35
|
+
import { TASKS_SUGGESTED_NEXT_BUILDERS } from "@cleocode/core/dispatch/suggested-next";
|
|
36
|
+
import { getLogger } from "@cleocode/core/logger";
|
|
37
|
+
import { getProjectRoot } from "@cleocode/core/project-scope";
|
|
38
|
+
var coreSagaAdd = lazyOperation(async () => (await import("@cleocode/core/sagas")).sagaAdd);
|
|
39
|
+
var coreSagaCreate = lazyOperation(async () => (await import("@cleocode/core/sagas")).sagaCreate);
|
|
40
|
+
var coreSagaDetach = lazyOperation(
|
|
41
|
+
async () => (await import("@cleocode/core/sagas")).detachSagaMember
|
|
42
|
+
);
|
|
43
|
+
var coreSagaList = lazyOperation(async () => (await import("@cleocode/core/sagas")).sagaList);
|
|
44
|
+
var coreSagaMembers = lazyOperation(
|
|
45
|
+
async () => (await import("@cleocode/core/sagas")).sagaMembers
|
|
46
|
+
);
|
|
47
|
+
var coreSagaReconcile = lazyOperation(
|
|
48
|
+
async () => (await import("@cleocode/core/sagas")).reconcileSaga
|
|
49
|
+
);
|
|
50
|
+
var coreSagaRepair = lazyOperation(async () => (await import("@cleocode/core/sagas")).repairSaga);
|
|
51
|
+
var coreSagaRollup = lazyOperation(async () => (await import("@cleocode/core/sagas")).sagaRollup);
|
|
52
|
+
var taskCurrentGet = lazyOperation(
|
|
53
|
+
async () => (await import("@cleocode/core/session/task-current")).taskCurrentGet
|
|
54
|
+
);
|
|
55
|
+
var taskStart = lazyOperation(
|
|
56
|
+
async () => (await import("@cleocode/core/session/engine-ops")).taskStart
|
|
57
|
+
);
|
|
58
|
+
var taskStop = lazyOperation(
|
|
59
|
+
async () => (await import("@cleocode/core/session/engine-ops")).taskStop
|
|
60
|
+
);
|
|
61
|
+
var taskWorkHistory = lazyOperation(
|
|
62
|
+
async () => (await import("@cleocode/core/session/engine-ops")).taskWorkHistory
|
|
63
|
+
);
|
|
64
|
+
var reqAdd = lazyOperation(async () => (await import("@cleocode/core/tasks/req")).reqAdd);
|
|
65
|
+
var reqList = lazyOperation(async () => (await import("@cleocode/core/tasks/req")).reqList);
|
|
66
|
+
var reqMigrate = lazyOperation(async () => (await import("@cleocode/core/tasks/req")).reqMigrate);
|
|
67
|
+
var tasksAddBatchOp = lazyOperation(
|
|
68
|
+
async () => (await import("@cleocode/core/tasks/add-batch")).tasksAddBatchOp
|
|
69
|
+
);
|
|
70
|
+
var taskArchive = lazyOperation(
|
|
71
|
+
async () => (await import("@cleocode/core/tasks/archive")).taskArchive
|
|
72
|
+
);
|
|
73
|
+
var completeTaskStrict = lazyOperation(
|
|
74
|
+
async () => (await import("@cleocode/core/tasks/complete")).completeTaskStrict
|
|
75
|
+
);
|
|
76
|
+
var taskDecompose = lazyOperation(
|
|
77
|
+
async () => (await import("@cleocode/core/tasks/decompose")).taskDecompose
|
|
78
|
+
);
|
|
79
|
+
var taskDelete = lazyOperation(
|
|
80
|
+
async () => (await import("@cleocode/core/tasks/delete")).taskDelete
|
|
81
|
+
);
|
|
82
|
+
var taskAnalyze = lazyOperation(
|
|
83
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskAnalyze
|
|
84
|
+
);
|
|
85
|
+
var taskAssignee = lazyOperation(
|
|
86
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskAssignee
|
|
87
|
+
);
|
|
88
|
+
var taskBlockers = lazyOperation(
|
|
89
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskBlockers
|
|
90
|
+
);
|
|
91
|
+
var taskBulkMove = lazyOperation(
|
|
92
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskBulkMove
|
|
93
|
+
);
|
|
94
|
+
var taskCancel = lazyOperation(
|
|
95
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskCancel
|
|
96
|
+
);
|
|
97
|
+
var taskImpact = lazyOperation(
|
|
98
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskImpact
|
|
99
|
+
);
|
|
100
|
+
var taskNext = lazyOperation(
|
|
101
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskNext
|
|
102
|
+
);
|
|
103
|
+
var taskRelates = lazyOperation(
|
|
104
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskRelates
|
|
105
|
+
);
|
|
106
|
+
var taskRelatesAdd = lazyOperation(
|
|
107
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskRelatesAdd
|
|
108
|
+
);
|
|
109
|
+
var taskRelatesAddBatch = lazyOperation(
|
|
110
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskRelatesAddBatch
|
|
111
|
+
);
|
|
112
|
+
var taskRelatesFind = lazyOperation(
|
|
113
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskRelatesFind
|
|
114
|
+
);
|
|
115
|
+
var taskRelatesRemove = lazyOperation(
|
|
116
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskRelatesRemove
|
|
117
|
+
);
|
|
118
|
+
var taskReopen = lazyOperation(
|
|
119
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskReopen
|
|
120
|
+
);
|
|
121
|
+
var taskReorder = lazyOperation(
|
|
122
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskReorder
|
|
123
|
+
);
|
|
124
|
+
var taskReorderRank = lazyOperation(
|
|
125
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskReorderRank
|
|
126
|
+
);
|
|
127
|
+
var taskReparent = lazyOperation(
|
|
128
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskReparent
|
|
129
|
+
);
|
|
130
|
+
var taskRestore = lazyOperation(
|
|
131
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskRestore
|
|
132
|
+
);
|
|
133
|
+
var taskTree = lazyOperation(
|
|
134
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskTree
|
|
135
|
+
);
|
|
136
|
+
var taskUnarchive = lazyOperation(
|
|
137
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap")).taskUnarchive
|
|
138
|
+
);
|
|
139
|
+
var taskClaim = lazyOperation(
|
|
140
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskClaim
|
|
141
|
+
);
|
|
142
|
+
var taskComplexityEstimate = lazyOperation(
|
|
143
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskComplexityEstimate
|
|
144
|
+
);
|
|
145
|
+
var taskContext = lazyOperation(
|
|
146
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskContext
|
|
147
|
+
);
|
|
148
|
+
var taskDepends = lazyOperation(
|
|
149
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskDepends
|
|
150
|
+
);
|
|
151
|
+
var taskDepsCycles = lazyOperation(
|
|
152
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskDepsCycles
|
|
153
|
+
);
|
|
154
|
+
var taskDepsOverview = lazyOperation(
|
|
155
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskDepsOverview
|
|
156
|
+
);
|
|
157
|
+
var taskDepsTree = lazyOperation(
|
|
158
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskDepsTree
|
|
159
|
+
);
|
|
160
|
+
var taskDepsValidate = lazyOperation(
|
|
161
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskDepsValidate
|
|
162
|
+
);
|
|
163
|
+
var taskHistory = lazyOperation(
|
|
164
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskHistory
|
|
165
|
+
);
|
|
166
|
+
var taskRankingHistory = lazyOperation(
|
|
167
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskRankingHistory
|
|
168
|
+
);
|
|
169
|
+
var taskRankingRevert = lazyOperation(
|
|
170
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskRankingRevert
|
|
171
|
+
);
|
|
172
|
+
var taskSlice = lazyOperation(
|
|
173
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskSlice
|
|
174
|
+
);
|
|
175
|
+
var taskUnclaim = lazyOperation(
|
|
176
|
+
async () => (await import("@cleocode/core/tasks/engine-wrap-ops")).taskUnclaim
|
|
177
|
+
);
|
|
178
|
+
var taskFind = lazyOperation(async () => (await import("@cleocode/core/tasks/find")).taskFind);
|
|
179
|
+
var taskLabelList = lazyOperation(
|
|
180
|
+
async () => (await import("@cleocode/core/tasks/labels")).taskLabelList
|
|
181
|
+
);
|
|
182
|
+
var taskList = lazyOperation(async () => (await import("@cleocode/core/tasks/list")).taskList);
|
|
183
|
+
var taskPlan = lazyOperation(async () => (await import("@cleocode/core/tasks/plan")).taskPlan);
|
|
184
|
+
var taskReconcileScope = lazyOperation(
|
|
185
|
+
async () => (await import("@cleocode/core/tasks/reconcile-scope")).taskReconcileScope
|
|
186
|
+
);
|
|
187
|
+
var addTaskWithSessionScope = lazyOperation(
|
|
188
|
+
async () => (await import("@cleocode/core/tasks/session-scope")).addTaskWithSessionScope
|
|
189
|
+
);
|
|
190
|
+
var taskShowOperation = lazyOperation(
|
|
191
|
+
async () => (await import("@cleocode/core/tasks/show")).taskShowOperation
|
|
192
|
+
);
|
|
193
|
+
var taskSyncLinks = lazyOperation(
|
|
194
|
+
async () => (await import("@cleocode/core/tasks/sync-ops")).taskSyncLinks
|
|
195
|
+
);
|
|
196
|
+
var taskSyncLinksRemove = lazyOperation(
|
|
197
|
+
async () => (await import("@cleocode/core/tasks/sync-ops")).taskSyncLinksRemove
|
|
198
|
+
);
|
|
199
|
+
var taskSyncReconcile = lazyOperation(
|
|
200
|
+
async () => (await import("@cleocode/core/tasks/sync-ops")).taskSyncReconcile
|
|
201
|
+
);
|
|
202
|
+
var taskUpdate = lazyOperation(
|
|
203
|
+
async () => (await import("@cleocode/core/tasks/update")).taskUpdate
|
|
204
|
+
);
|
|
205
|
+
var _tasksTypedHandler = defineTypedHandler("tasks", {
|
|
206
|
+
// -------------------------------------------------------------------------
|
|
207
|
+
// Query ops
|
|
208
|
+
// -------------------------------------------------------------------------
|
|
209
|
+
show: async (params) => {
|
|
210
|
+
const projectRoot = getProjectRoot();
|
|
211
|
+
return wrapCoreResult(await taskShowOperation(projectRoot, params), "show");
|
|
212
|
+
},
|
|
213
|
+
list: async (params) => {
|
|
214
|
+
const projectRoot = getProjectRoot();
|
|
215
|
+
const result = await taskList(projectRoot, {
|
|
216
|
+
parent: params.parent,
|
|
217
|
+
status: params.status,
|
|
218
|
+
priority: params.priority,
|
|
219
|
+
type: params.type,
|
|
220
|
+
// T12120 (GH #1245/#1246) — these two axes were missing here as well as
|
|
221
|
+
// at every other layer of the relay; omitting them here silently drops
|
|
222
|
+
// the filter after the CLI has already accepted it.
|
|
223
|
+
severity: params.severity,
|
|
224
|
+
kind: params.kind,
|
|
225
|
+
phase: params.phase,
|
|
226
|
+
label: params.label,
|
|
227
|
+
children: params.children,
|
|
228
|
+
limit: params.limit,
|
|
229
|
+
offset: params.offset,
|
|
230
|
+
compact: params.compact,
|
|
231
|
+
includeArchive: params.includeArchive
|
|
232
|
+
});
|
|
233
|
+
if (!result.success) {
|
|
234
|
+
return lafsError(
|
|
235
|
+
String(result.error?.code ?? "E_INTERNAL"),
|
|
236
|
+
result.error?.message ?? "Unknown error",
|
|
237
|
+
"list"
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
if (result.page) {
|
|
241
|
+
return { success: true, data: result.data, page: result.page };
|
|
242
|
+
}
|
|
243
|
+
return lafsSuccess(result.data, "list");
|
|
244
|
+
},
|
|
245
|
+
find: async (params) => {
|
|
246
|
+
const projectRoot = getProjectRoot();
|
|
247
|
+
return wrapCoreResult(
|
|
248
|
+
await taskFind(projectRoot, params.query, params.limit, {
|
|
249
|
+
id: params.id,
|
|
250
|
+
exact: params.exact,
|
|
251
|
+
fuzzy: params.fuzzy,
|
|
252
|
+
field: params.field,
|
|
253
|
+
status: params.status,
|
|
254
|
+
includeArchive: params.includeArchive,
|
|
255
|
+
offset: params.offset,
|
|
256
|
+
fields: params.fields,
|
|
257
|
+
verbose: params.verbose,
|
|
258
|
+
// T944/T9072: kind filter
|
|
259
|
+
kind: params.kind,
|
|
260
|
+
// T9905: unified urgency surface
|
|
261
|
+
urgent: params.urgent,
|
|
262
|
+
// T9904: label filter — `cleo find --label <name>` (closes GH#393).
|
|
263
|
+
label: params.label,
|
|
264
|
+
// T10108: parent filter — `cleo find --parent <id>`. Saga-aware via
|
|
265
|
+
// resolveSagaMemberIds (ADR-073 §1) so saga members surface through
|
|
266
|
+
// the same routing as `cleo list --parent`.
|
|
267
|
+
parent: params.parent
|
|
268
|
+
}),
|
|
269
|
+
"find"
|
|
270
|
+
);
|
|
271
|
+
},
|
|
272
|
+
tree: async (params) => {
|
|
273
|
+
const projectRoot = getProjectRoot();
|
|
274
|
+
return wrapCoreResult(await taskTree(projectRoot, params.taskId, params.withBlockers), "tree");
|
|
275
|
+
},
|
|
276
|
+
blockers: async (params) => {
|
|
277
|
+
const projectRoot = getProjectRoot();
|
|
278
|
+
return wrapCoreResult(await taskBlockers(projectRoot, params), "blockers");
|
|
279
|
+
},
|
|
280
|
+
depends: async (params) => {
|
|
281
|
+
const projectRoot = getProjectRoot();
|
|
282
|
+
if (params.action === "overview") {
|
|
283
|
+
return wrapCoreResult(await taskDepsOverview(projectRoot), "depends");
|
|
284
|
+
}
|
|
285
|
+
if (params.action === "cycles") {
|
|
286
|
+
return wrapCoreResult(await taskDepsCycles(projectRoot), "depends");
|
|
287
|
+
}
|
|
288
|
+
if (!params.taskId) {
|
|
289
|
+
return lafsError(
|
|
290
|
+
"E_INVALID_INPUT",
|
|
291
|
+
"taskId is required (or use action: overview|cycles)",
|
|
292
|
+
"depends"
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
return wrapCoreResult(
|
|
296
|
+
await taskDepends(projectRoot, params.taskId, params.direction, params.tree),
|
|
297
|
+
"depends"
|
|
298
|
+
);
|
|
299
|
+
},
|
|
300
|
+
slice: async (params) => {
|
|
301
|
+
const projectRoot = getProjectRoot();
|
|
302
|
+
return wrapCoreResult(
|
|
303
|
+
await taskSlice(projectRoot, params.taskId, {
|
|
304
|
+
radius: params.radius,
|
|
305
|
+
depth: params.depth,
|
|
306
|
+
budget: params.budget,
|
|
307
|
+
direction: params.direction,
|
|
308
|
+
includeRelates: params.includeRelates
|
|
309
|
+
}),
|
|
310
|
+
"slice"
|
|
311
|
+
);
|
|
312
|
+
},
|
|
313
|
+
context: async (params) => {
|
|
314
|
+
const projectRoot = getProjectRoot();
|
|
315
|
+
return wrapCoreResult(await taskContext(projectRoot, params), "context");
|
|
316
|
+
},
|
|
317
|
+
"deps.validate": async (params) => {
|
|
318
|
+
const projectRoot = getProjectRoot();
|
|
319
|
+
return wrapCoreResult(
|
|
320
|
+
await taskDepsValidate(projectRoot, params.epicId, params.scope),
|
|
321
|
+
"deps.validate"
|
|
322
|
+
);
|
|
323
|
+
},
|
|
324
|
+
"deps.tree": async (params) => {
|
|
325
|
+
const projectRoot = getProjectRoot();
|
|
326
|
+
if (!params.epicId) {
|
|
327
|
+
return lafsError("E_INVALID_INPUT", "epicId is required for deps.tree", "deps.tree");
|
|
328
|
+
}
|
|
329
|
+
return wrapCoreResult(
|
|
330
|
+
await taskDepsTree(projectRoot, params.epicId, params.format),
|
|
331
|
+
"deps.tree"
|
|
332
|
+
);
|
|
333
|
+
},
|
|
334
|
+
analyze: async (params) => {
|
|
335
|
+
const projectRoot = getProjectRoot();
|
|
336
|
+
return wrapCoreResult(
|
|
337
|
+
await taskAnalyze(projectRoot, params.taskId, { tierLimit: params.tierLimit }),
|
|
338
|
+
"analyze"
|
|
339
|
+
);
|
|
340
|
+
},
|
|
341
|
+
impact: async (params) => {
|
|
342
|
+
const projectRoot = getProjectRoot();
|
|
343
|
+
return wrapCoreResult(
|
|
344
|
+
await taskImpact(projectRoot, params.change, params.matchLimit),
|
|
345
|
+
"impact"
|
|
346
|
+
);
|
|
347
|
+
},
|
|
348
|
+
next: async (params) => {
|
|
349
|
+
const projectRoot = getProjectRoot();
|
|
350
|
+
return wrapCoreResult(await taskNext(projectRoot, params), "next");
|
|
351
|
+
},
|
|
352
|
+
plan: async (_params) => {
|
|
353
|
+
const projectRoot = getProjectRoot();
|
|
354
|
+
return wrapCoreResult(await taskPlan(projectRoot), "plan");
|
|
355
|
+
},
|
|
356
|
+
relates: async (params) => {
|
|
357
|
+
const projectRoot = getProjectRoot();
|
|
358
|
+
if (params.mode) {
|
|
359
|
+
return wrapCoreResult(
|
|
360
|
+
await taskRelatesFind(projectRoot, params.taskId, {
|
|
361
|
+
mode: params.mode,
|
|
362
|
+
threshold: params.threshold
|
|
363
|
+
}),
|
|
364
|
+
"relates"
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
return wrapCoreResult(
|
|
368
|
+
await taskRelates(projectRoot, params.taskId, {
|
|
369
|
+
direction: params.direction,
|
|
370
|
+
type: params.type,
|
|
371
|
+
includeDependencies: params.includeDependencies
|
|
372
|
+
}),
|
|
373
|
+
"relates"
|
|
374
|
+
);
|
|
375
|
+
},
|
|
376
|
+
"complexity.estimate": async (params) => {
|
|
377
|
+
const projectRoot = getProjectRoot();
|
|
378
|
+
return wrapCoreResult(
|
|
379
|
+
await taskComplexityEstimate(projectRoot, { taskId: params.taskId }),
|
|
380
|
+
"complexity.estimate"
|
|
381
|
+
);
|
|
382
|
+
},
|
|
383
|
+
history: async (params) => {
|
|
384
|
+
const projectRoot = getProjectRoot();
|
|
385
|
+
if (params.taskId && params.ranking) {
|
|
386
|
+
return wrapCoreResult(
|
|
387
|
+
await taskRankingHistory(projectRoot, params.taskId, params.limit),
|
|
388
|
+
"history"
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
if (params.taskId) {
|
|
392
|
+
return wrapCoreResult(await taskHistory(projectRoot, params.taskId, params.limit), "history");
|
|
393
|
+
}
|
|
394
|
+
return wrapCoreResult(await taskWorkHistory(projectRoot), "history");
|
|
395
|
+
},
|
|
396
|
+
current: async (_params) => {
|
|
397
|
+
const projectRoot = getProjectRoot();
|
|
398
|
+
return wrapCoreResult(await taskCurrentGet(projectRoot), "current");
|
|
399
|
+
},
|
|
400
|
+
"label.list": async (_params) => {
|
|
401
|
+
const projectRoot = getProjectRoot();
|
|
402
|
+
return wrapCoreResult(await taskLabelList(projectRoot), "label.list");
|
|
403
|
+
},
|
|
404
|
+
"sync.links": async (params) => {
|
|
405
|
+
const projectRoot = getProjectRoot();
|
|
406
|
+
return wrapCoreResult(await taskSyncLinks(projectRoot, params), "sync.links");
|
|
407
|
+
},
|
|
408
|
+
// -------------------------------------------------------------------------
|
|
409
|
+
// Mutate ops
|
|
410
|
+
// -------------------------------------------------------------------------
|
|
411
|
+
"add-batch": async (params) => {
|
|
412
|
+
const projectRoot = getProjectRoot();
|
|
413
|
+
return wrapCoreResult(
|
|
414
|
+
await tasksAddBatchOp(projectRoot, {
|
|
415
|
+
tasks: params.tasks ?? [],
|
|
416
|
+
defaultParent: typeof params.defaultParent === "string" ? params.defaultParent : void 0,
|
|
417
|
+
dryRun: typeof params.dryRun === "boolean" ? params.dryRun : void 0
|
|
418
|
+
}),
|
|
419
|
+
"add-batch"
|
|
420
|
+
);
|
|
421
|
+
},
|
|
422
|
+
add: async (params) => {
|
|
423
|
+
const projectRoot = getProjectRoot();
|
|
424
|
+
return wrapCoreResult(
|
|
425
|
+
await addTaskWithSessionScope(projectRoot, {
|
|
426
|
+
...params,
|
|
427
|
+
description: typeof params.description === "string" ? params.description : void 0
|
|
428
|
+
}),
|
|
429
|
+
"add"
|
|
430
|
+
);
|
|
431
|
+
},
|
|
432
|
+
update: async (params) => {
|
|
433
|
+
const projectRoot = getProjectRoot();
|
|
434
|
+
const { taskId, ...updates } = params;
|
|
435
|
+
return wrapCoreResult(await taskUpdate(projectRoot, taskId, updates), "update");
|
|
436
|
+
},
|
|
437
|
+
complete: async (params) => {
|
|
438
|
+
const projectRoot = getProjectRoot();
|
|
439
|
+
if (params.force !== void 0) {
|
|
440
|
+
return lafsError(
|
|
441
|
+
"E_FLAG_REMOVED",
|
|
442
|
+
"--force has been removed. Use evidence-based `cleo verify --gate \u2026 --evidence \u2026` or set CLEO_OWNER_OVERRIDE=1 on verify for emergency bypass (audited). See ADR-051.",
|
|
443
|
+
"complete"
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
const result = await completeTaskStrict(projectRoot, params.taskId, {
|
|
447
|
+
notes: params.notes,
|
|
448
|
+
overrideReason: params.overrideReason,
|
|
449
|
+
acknowledgeRisk: params.acknowledgeRisk,
|
|
450
|
+
// T10509 — AC-coverage gate waiver path
|
|
451
|
+
waiveAc: params.waiveAc,
|
|
452
|
+
waiveReason: params.waiveReason,
|
|
453
|
+
// T10538 — cancelled-child waiver (PM-Core V2 agent-trust)
|
|
454
|
+
cancelledChildWaiverReason: params.cancelledChildWaiverReason,
|
|
455
|
+
// T11954 (DHQ-071) — depends-edge waiver for stale/over-specified deps
|
|
456
|
+
waiveDependsReason: params.waiveDependsReason,
|
|
457
|
+
// T12503 — optimistic concurrency (--if-match)
|
|
458
|
+
expectedUpdatedAt: params.expectedUpdatedAt
|
|
459
|
+
});
|
|
460
|
+
setImmediate(async () => {
|
|
461
|
+
try {
|
|
462
|
+
const { trackMemoryUsage } = await import("@cleocode/core/memory/quality-feedback");
|
|
463
|
+
await trackMemoryUsage(projectRoot, params.taskId, true, params.taskId, "success");
|
|
464
|
+
} catch {
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
return wrapCoreResult(result, "complete");
|
|
468
|
+
},
|
|
469
|
+
cancel: async (params) => {
|
|
470
|
+
const projectRoot = getProjectRoot();
|
|
471
|
+
return wrapCoreResult(
|
|
472
|
+
await taskCancel(projectRoot, params.taskId, {
|
|
473
|
+
reason: params.reason,
|
|
474
|
+
children: params.children,
|
|
475
|
+
reparentTo: params.reparentTo,
|
|
476
|
+
force: params.force,
|
|
477
|
+
cascadeThreshold: params.cascadeThreshold,
|
|
478
|
+
allowCascade: params.allowCascade
|
|
479
|
+
}),
|
|
480
|
+
"cancel"
|
|
481
|
+
);
|
|
482
|
+
},
|
|
483
|
+
"reconcile-scope": async (params) => {
|
|
484
|
+
const projectRoot = getProjectRoot();
|
|
485
|
+
return wrapCoreResult(
|
|
486
|
+
await taskReconcileScope(projectRoot, {
|
|
487
|
+
rootId: params.rootId,
|
|
488
|
+
apply: params.apply,
|
|
489
|
+
threshold: params.threshold
|
|
490
|
+
}),
|
|
491
|
+
"reconcile-scope"
|
|
492
|
+
);
|
|
493
|
+
},
|
|
494
|
+
decompose: async (params) => {
|
|
495
|
+
const projectRoot = getProjectRoot();
|
|
496
|
+
return wrapCoreResult(
|
|
497
|
+
await taskDecompose(projectRoot, {
|
|
498
|
+
taskId: params.taskId,
|
|
499
|
+
childTitle: params.childTitle,
|
|
500
|
+
childDescription: params.childDescription,
|
|
501
|
+
dryRun: params.dryRun
|
|
502
|
+
}),
|
|
503
|
+
"decompose"
|
|
504
|
+
);
|
|
505
|
+
},
|
|
506
|
+
delete: async (params) => {
|
|
507
|
+
const projectRoot = getProjectRoot();
|
|
508
|
+
return wrapCoreResult(
|
|
509
|
+
await taskDelete(projectRoot, params.taskId, params.force, params.cascade),
|
|
510
|
+
"delete"
|
|
511
|
+
);
|
|
512
|
+
},
|
|
513
|
+
archive: async (params) => {
|
|
514
|
+
const projectRoot = getProjectRoot();
|
|
515
|
+
return wrapCoreResult(
|
|
516
|
+
await taskArchive(projectRoot, params.taskId, params.before, {
|
|
517
|
+
taskIds: params.taskIds,
|
|
518
|
+
includeCancelled: params.includeCancelled,
|
|
519
|
+
dryRun: params.dryRun
|
|
520
|
+
}),
|
|
521
|
+
"archive"
|
|
522
|
+
);
|
|
523
|
+
},
|
|
524
|
+
restore: async (params) => {
|
|
525
|
+
const projectRoot = getProjectRoot();
|
|
526
|
+
if (params.from === "done") {
|
|
527
|
+
return wrapCoreResult(
|
|
528
|
+
await taskReopen(projectRoot, params.taskId, {
|
|
529
|
+
status: params.status,
|
|
530
|
+
reason: params.reason
|
|
531
|
+
}),
|
|
532
|
+
"restore"
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
if (params.from === "archived") {
|
|
536
|
+
return wrapCoreResult(
|
|
537
|
+
await taskUnarchive(projectRoot, params.taskId, {
|
|
538
|
+
status: params.status,
|
|
539
|
+
preserveStatus: params.preserveStatus
|
|
540
|
+
}),
|
|
541
|
+
"restore"
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
return wrapCoreResult(
|
|
545
|
+
await taskRestore(projectRoot, params.taskId, {
|
|
546
|
+
cascade: params.cascade,
|
|
547
|
+
notes: params.notes
|
|
548
|
+
}),
|
|
549
|
+
"restore"
|
|
550
|
+
);
|
|
551
|
+
},
|
|
552
|
+
reparent: async (params) => {
|
|
553
|
+
const projectRoot = getProjectRoot();
|
|
554
|
+
return wrapCoreResult(
|
|
555
|
+
await taskReparent(projectRoot, params.taskId, params.newParentId ?? null),
|
|
556
|
+
"reparent"
|
|
557
|
+
);
|
|
558
|
+
},
|
|
559
|
+
reorder: async (params) => {
|
|
560
|
+
const projectRoot = getProjectRoot();
|
|
561
|
+
return wrapCoreResult(
|
|
562
|
+
await taskReorder(projectRoot, params.taskId, params.position),
|
|
563
|
+
"reorder"
|
|
564
|
+
);
|
|
565
|
+
},
|
|
566
|
+
// T11786 (epic T11556) — within-column re-rank from an explicit ID order.
|
|
567
|
+
"reorder-rank": async (params) => {
|
|
568
|
+
const projectRoot = getProjectRoot();
|
|
569
|
+
return wrapCoreResult(
|
|
570
|
+
await taskReorderRank(projectRoot, params.orderedIds ?? []),
|
|
571
|
+
"reorder-rank"
|
|
572
|
+
);
|
|
573
|
+
},
|
|
574
|
+
// T11786 (epic T11556) — atomic multi-task status/stage move.
|
|
575
|
+
"bulk-move": async (params) => {
|
|
576
|
+
const projectRoot = getProjectRoot();
|
|
577
|
+
return wrapCoreResult(
|
|
578
|
+
await taskBulkMove(projectRoot, params.taskIds ?? [], {
|
|
579
|
+
status: params.status,
|
|
580
|
+
pipelineStage: params.pipelineStage
|
|
581
|
+
}),
|
|
582
|
+
"bulk-move"
|
|
583
|
+
);
|
|
584
|
+
},
|
|
585
|
+
// T11786 (epic T11556) — first-class assignee set/clear (distinct from claim).
|
|
586
|
+
assignee: async (params) => {
|
|
587
|
+
const projectRoot = getProjectRoot();
|
|
588
|
+
return wrapCoreResult(
|
|
589
|
+
await taskAssignee(projectRoot, params.taskId, params.assignee),
|
|
590
|
+
"assignee"
|
|
591
|
+
);
|
|
592
|
+
},
|
|
593
|
+
"relates.add": async (params) => {
|
|
594
|
+
const projectRoot = getProjectRoot();
|
|
595
|
+
const relatedId = params.relatedId ?? params.targetId;
|
|
596
|
+
if (!relatedId) {
|
|
597
|
+
return lafsError("E_INVALID_INPUT", "relatedId (or targetId) is required", "relates.add");
|
|
598
|
+
}
|
|
599
|
+
return wrapCoreResult(
|
|
600
|
+
await taskRelatesAdd(projectRoot, params.taskId, relatedId, params.type, params.reason),
|
|
601
|
+
"relates.add"
|
|
602
|
+
);
|
|
603
|
+
},
|
|
604
|
+
"ranking.revert": async (params) => {
|
|
605
|
+
if (!params.entryId) {
|
|
606
|
+
return lafsError("E_INVALID_INPUT", "entryId is required", "ranking.revert");
|
|
607
|
+
}
|
|
608
|
+
return wrapCoreResult(
|
|
609
|
+
await taskRankingRevert(getProjectRoot(), {
|
|
610
|
+
entryId: params.entryId,
|
|
611
|
+
...params.reason !== void 0 ? { reason: params.reason } : {},
|
|
612
|
+
...params.force ? { force: true } : {}
|
|
613
|
+
}),
|
|
614
|
+
"ranking.revert"
|
|
615
|
+
);
|
|
616
|
+
},
|
|
617
|
+
"relates.add-batch": async (params) => {
|
|
618
|
+
const projectRoot = getProjectRoot();
|
|
619
|
+
return wrapCoreResult(await taskRelatesAddBatch(projectRoot, params), "relates.add-batch");
|
|
620
|
+
},
|
|
621
|
+
"relates.remove": async (params) => {
|
|
622
|
+
const projectRoot = getProjectRoot();
|
|
623
|
+
if (!params.relatedId) {
|
|
624
|
+
return lafsError("E_INVALID_INPUT", "relatedId is required", "relates.remove");
|
|
625
|
+
}
|
|
626
|
+
return wrapCoreResult(
|
|
627
|
+
await taskRelatesRemove(projectRoot, params.taskId, params.relatedId, params.type),
|
|
628
|
+
"relates.remove"
|
|
629
|
+
);
|
|
630
|
+
},
|
|
631
|
+
start: async (params) => {
|
|
632
|
+
const projectRoot = getProjectRoot();
|
|
633
|
+
return wrapCoreResult(
|
|
634
|
+
await taskStart(projectRoot, params.taskId, {
|
|
635
|
+
takeOver: params.takeOver === true,
|
|
636
|
+
forceClaim: params.forceClaim === true
|
|
637
|
+
}),
|
|
638
|
+
"start"
|
|
639
|
+
);
|
|
640
|
+
},
|
|
641
|
+
stop: async (_params) => {
|
|
642
|
+
const projectRoot = getProjectRoot();
|
|
643
|
+
return wrapCoreResult(await taskStop(projectRoot), "stop");
|
|
644
|
+
},
|
|
645
|
+
"sync.reconcile": async (params) => {
|
|
646
|
+
const projectRoot = getProjectRoot();
|
|
647
|
+
return wrapCoreResult(
|
|
648
|
+
await taskSyncReconcile(projectRoot, {
|
|
649
|
+
providerId: params.providerId,
|
|
650
|
+
externalTasks: params.externalTasks,
|
|
651
|
+
dryRun: params.dryRun,
|
|
652
|
+
conflictPolicy: params.conflictPolicy,
|
|
653
|
+
defaultPhase: params.defaultPhase,
|
|
654
|
+
defaultLabels: params.defaultLabels
|
|
655
|
+
}),
|
|
656
|
+
"sync.reconcile"
|
|
657
|
+
);
|
|
658
|
+
},
|
|
659
|
+
"sync.links.remove": async (params) => {
|
|
660
|
+
const projectRoot = getProjectRoot();
|
|
661
|
+
return wrapCoreResult(
|
|
662
|
+
await taskSyncLinksRemove(projectRoot, params.providerId),
|
|
663
|
+
"sync.links.remove"
|
|
664
|
+
);
|
|
665
|
+
},
|
|
666
|
+
claim: async (params) => {
|
|
667
|
+
const projectRoot = getProjectRoot();
|
|
668
|
+
return wrapCoreResult(await taskClaim(projectRoot, params), "claim");
|
|
669
|
+
},
|
|
670
|
+
unclaim: async (params) => {
|
|
671
|
+
const projectRoot = getProjectRoot();
|
|
672
|
+
return wrapCoreResult(await taskUnclaim(projectRoot, params), "unclaim");
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
var QUERY_OPS = /* @__PURE__ */ new Set([
|
|
676
|
+
"show",
|
|
677
|
+
"list",
|
|
678
|
+
"find",
|
|
679
|
+
"tree",
|
|
680
|
+
"blockers",
|
|
681
|
+
"depends",
|
|
682
|
+
// T11787 (epic T11556 · CRUD-parity audit) — `slice` and `context` had
|
|
683
|
+
// typed handlers but were ABSENT from this gate, so dispatch rejected them
|
|
684
|
+
// with E_UNSUPPORTED_OPERATION before reaching the handler (registered +
|
|
685
|
+
// implemented but not reachable). Adding them closes the parity gap.
|
|
686
|
+
"slice",
|
|
687
|
+
"context",
|
|
688
|
+
"deps.validate",
|
|
689
|
+
"deps.tree",
|
|
690
|
+
"analyze",
|
|
691
|
+
"impact",
|
|
692
|
+
"next",
|
|
693
|
+
"plan",
|
|
694
|
+
"relates",
|
|
695
|
+
"complexity.estimate",
|
|
696
|
+
"history",
|
|
697
|
+
"current",
|
|
698
|
+
"label.list",
|
|
699
|
+
"sync.links",
|
|
700
|
+
// Saga sub-domain (ADR-073)
|
|
701
|
+
"saga.list",
|
|
702
|
+
"saga.members",
|
|
703
|
+
"saga.rollup",
|
|
704
|
+
"req.list",
|
|
705
|
+
"req.migrate.preview"
|
|
706
|
+
]);
|
|
707
|
+
var MUTATE_OPS = /* @__PURE__ */ new Set([
|
|
708
|
+
"add",
|
|
709
|
+
"add-batch",
|
|
710
|
+
"update",
|
|
711
|
+
"complete",
|
|
712
|
+
"cancel",
|
|
713
|
+
"decompose",
|
|
714
|
+
"reconcile-scope",
|
|
715
|
+
"delete",
|
|
716
|
+
"archive",
|
|
717
|
+
"restore",
|
|
718
|
+
"reparent",
|
|
719
|
+
"reorder",
|
|
720
|
+
// T11786 (epic T11556) — bulk task mutate ops Studio's interactive Kanban binds to.
|
|
721
|
+
"reorder-rank",
|
|
722
|
+
"bulk-move",
|
|
723
|
+
"assignee",
|
|
724
|
+
"relates.add",
|
|
725
|
+
// T11575 — without this entry the domain mutate() gate rejects the op with
|
|
726
|
+
// E_INVALID_OPERATION even though the handler exists below. Mirrors the
|
|
727
|
+
// OperationDef registered in @cleocode/contracts operations-registry.
|
|
728
|
+
"relates.add-batch",
|
|
729
|
+
"relates.remove",
|
|
730
|
+
// T12693 (D11161) — undo one audited ranking change.
|
|
731
|
+
"ranking.revert",
|
|
732
|
+
"start",
|
|
733
|
+
"stop",
|
|
734
|
+
"sync.reconcile",
|
|
735
|
+
"sync.links.remove",
|
|
736
|
+
"claim",
|
|
737
|
+
"unclaim",
|
|
738
|
+
// Saga sub-domain (ADR-073)
|
|
739
|
+
"saga.create",
|
|
740
|
+
"saga.add",
|
|
741
|
+
// T10117 — repair an I5-violating saga (detach parentId, write groups edge).
|
|
742
|
+
"saga.repair",
|
|
743
|
+
// T10118 — repair verb for ADR-073 §1.2 I7 violations (detach saga member).
|
|
744
|
+
"saga.detach",
|
|
745
|
+
// T10121 — idempotent cron-safe auto-close repair (supersedes T10098 scope).
|
|
746
|
+
"saga.reconcile",
|
|
747
|
+
"req.add",
|
|
748
|
+
"req.migrate"
|
|
749
|
+
]);
|
|
750
|
+
async function sagaCreate(params) {
|
|
751
|
+
const title = typeof params.title === "string" ? params.title : "";
|
|
752
|
+
const description = typeof params.description === "string" ? params.description : void 0;
|
|
753
|
+
const acceptance = Array.isArray(params.acceptance) ? params.acceptance : void 0;
|
|
754
|
+
const dryRun = params.dryRun === true;
|
|
755
|
+
return wrapCoreResult(
|
|
756
|
+
await coreSagaCreate(getProjectRoot(), { title, description, acceptance, dryRun }),
|
|
757
|
+
"saga.create"
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
async function sagaAdd(params) {
|
|
761
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
762
|
+
const epicId = typeof params.epicId === "string" ? params.epicId : "";
|
|
763
|
+
return wrapCoreResult(await coreSagaAdd(getProjectRoot(), { sagaId, epicId }), "saga.add");
|
|
764
|
+
}
|
|
765
|
+
async function sagaDetach(params) {
|
|
766
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
767
|
+
const memberId = typeof params.memberId === "string" ? params.memberId : "";
|
|
768
|
+
const reason = typeof params.reason === "string" ? params.reason : void 0;
|
|
769
|
+
return wrapCoreResult(
|
|
770
|
+
await coreSagaDetach(getProjectRoot(), { sagaId, memberId, reason }),
|
|
771
|
+
"saga.detach"
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
async function sagaList() {
|
|
775
|
+
return wrapCoreResult(await coreSagaList(getProjectRoot()), "saga.list");
|
|
776
|
+
}
|
|
777
|
+
async function sagaMembers(params) {
|
|
778
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
779
|
+
return wrapCoreResult(await coreSagaMembers(getProjectRoot(), { sagaId }), "saga.members");
|
|
780
|
+
}
|
|
781
|
+
async function sagaRollup(params) {
|
|
782
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
783
|
+
return wrapCoreResult(await coreSagaRollup(getProjectRoot(), { sagaId }), "saga.rollup");
|
|
784
|
+
}
|
|
785
|
+
async function sagaRepair(params) {
|
|
786
|
+
const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
|
|
787
|
+
return wrapCoreResult(await coreSagaRepair(getProjectRoot(), { sagaId }), "saga.repair");
|
|
788
|
+
}
|
|
789
|
+
async function sagaReconcile(params) {
|
|
790
|
+
const sagaId = typeof params.sagaId === "string" && params.sagaId.length > 0 ? params.sagaId : void 0;
|
|
791
|
+
const dryRun = params.dryRun === true;
|
|
792
|
+
return wrapCoreResult(
|
|
793
|
+
await coreSagaReconcile(getProjectRoot(), { sagaId, dryRun }),
|
|
794
|
+
"saga.reconcile"
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
function stampSuggestedNext(response, operation, params) {
|
|
798
|
+
if (!response.success) return response;
|
|
799
|
+
const builder = TASKS_SUGGESTED_NEXT_BUILDERS[operation];
|
|
800
|
+
if (!builder) return response;
|
|
801
|
+
let suggestions;
|
|
802
|
+
try {
|
|
803
|
+
suggestions = builder(params, response.data);
|
|
804
|
+
} catch {
|
|
805
|
+
return response;
|
|
806
|
+
}
|
|
807
|
+
if (suggestions.length === 0) return response;
|
|
808
|
+
return {
|
|
809
|
+
...response,
|
|
810
|
+
meta: {
|
|
811
|
+
...response.meta,
|
|
812
|
+
suggestedNext: suggestions
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
var TasksHandler = class {
|
|
817
|
+
// -----------------------------------------------------------------------
|
|
818
|
+
// Query
|
|
819
|
+
// -----------------------------------------------------------------------
|
|
820
|
+
/**
|
|
821
|
+
* Execute a read-only tasks query operation.
|
|
822
|
+
*
|
|
823
|
+
* @param operation - The tasks query op name (e.g. 'show', 'list').
|
|
824
|
+
* @param params - Raw params from the dispatcher (narrowed internally).
|
|
825
|
+
*/
|
|
826
|
+
async query(operation, params) {
|
|
827
|
+
const startTime = Date.now();
|
|
828
|
+
if (!QUERY_OPS.has(operation)) {
|
|
829
|
+
return unsupportedOp("query", "tasks", operation, startTime);
|
|
830
|
+
}
|
|
831
|
+
if (operation === "impact" && !params?.change) {
|
|
832
|
+
return errorResult(
|
|
833
|
+
"query",
|
|
834
|
+
"tasks",
|
|
835
|
+
operation,
|
|
836
|
+
"E_INVALID_INPUT",
|
|
837
|
+
"change is required (free-text description of the proposed change)",
|
|
838
|
+
startTime
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
try {
|
|
842
|
+
if (operation === "req.list" || operation === "req.migrate.preview") {
|
|
843
|
+
if (typeof params?.taskId !== "string" || !params.taskId.trim()) {
|
|
844
|
+
return errorResult(
|
|
845
|
+
"query",
|
|
846
|
+
"tasks",
|
|
847
|
+
operation,
|
|
848
|
+
"E_INVALID_INPUT",
|
|
849
|
+
"taskId is required",
|
|
850
|
+
startTime
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
if (operation === "req.migrate.preview" && params.apply !== void 0 && params.apply !== false) {
|
|
854
|
+
return errorResult(
|
|
855
|
+
"query",
|
|
856
|
+
"tasks",
|
|
857
|
+
operation,
|
|
858
|
+
"E_INVALID_INPUT",
|
|
859
|
+
"Migration query requires apply=false; use the mutate gateway with apply=true to write",
|
|
860
|
+
startTime
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
const root = getProjectRoot();
|
|
864
|
+
const data = operation === "req.list" ? await reqList(root, params.taskId) : await reqMigrate(root, params.taskId, false);
|
|
865
|
+
return wrapResult({ success: true, data }, "query", "tasks", operation, startTime);
|
|
866
|
+
}
|
|
867
|
+
if (operation === "saga.list") {
|
|
868
|
+
const envelope = await sagaList();
|
|
869
|
+
return wrapResult(envelopeToEngineResult(envelope), "query", "tasks", operation, startTime);
|
|
870
|
+
}
|
|
871
|
+
if (operation === "saga.members") {
|
|
872
|
+
const envelope = await sagaMembers(params ?? {});
|
|
873
|
+
return wrapResult(envelopeToEngineResult(envelope), "query", "tasks", operation, startTime);
|
|
874
|
+
}
|
|
875
|
+
if (operation === "saga.rollup") {
|
|
876
|
+
const envelope = await sagaRollup(params ?? {});
|
|
877
|
+
return wrapResult(envelopeToEngineResult(envelope), "query", "tasks", operation, startTime);
|
|
878
|
+
}
|
|
879
|
+
} catch (error) {
|
|
880
|
+
getLogger("domain:tasks").error(
|
|
881
|
+
{ gateway: "query", domain: "tasks", operation, err: error },
|
|
882
|
+
error instanceof Error ? error.message : String(error)
|
|
883
|
+
);
|
|
884
|
+
return handleErrorResult("query", "tasks", operation, error, startTime);
|
|
885
|
+
}
|
|
886
|
+
try {
|
|
887
|
+
const envelope = await typedDispatch(
|
|
888
|
+
_tasksTypedHandler,
|
|
889
|
+
operation,
|
|
890
|
+
params ?? {}
|
|
891
|
+
);
|
|
892
|
+
const response = wrapResult(
|
|
893
|
+
envelopeToEngineResult(envelope),
|
|
894
|
+
"query",
|
|
895
|
+
"tasks",
|
|
896
|
+
operation,
|
|
897
|
+
startTime
|
|
898
|
+
);
|
|
899
|
+
return stampSuggestedNext(response, operation, params ?? {});
|
|
900
|
+
} catch (error) {
|
|
901
|
+
getLogger("domain:tasks").error(
|
|
902
|
+
{ gateway: "query", domain: "tasks", operation, err: error },
|
|
903
|
+
error instanceof Error ? error.message : String(error)
|
|
904
|
+
);
|
|
905
|
+
return handleErrorResult("query", "tasks", operation, error, startTime);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
// -----------------------------------------------------------------------
|
|
909
|
+
// Mutate
|
|
910
|
+
// -----------------------------------------------------------------------
|
|
911
|
+
/**
|
|
912
|
+
* Execute a state-modifying tasks mutation operation.
|
|
913
|
+
*
|
|
914
|
+
* @param operation - The tasks mutate op name (e.g. 'add', 'update').
|
|
915
|
+
* @param params - Raw params from the dispatcher (narrowed internally).
|
|
916
|
+
*/
|
|
917
|
+
async mutate(operation, params) {
|
|
918
|
+
const startTime = Date.now();
|
|
919
|
+
if (!MUTATE_OPS.has(operation)) {
|
|
920
|
+
return unsupportedOp("mutate", "tasks", operation, startTime);
|
|
921
|
+
}
|
|
922
|
+
try {
|
|
923
|
+
if (operation === "req.add" || operation === "req.migrate") {
|
|
924
|
+
if (typeof params?.taskId !== "string" || !params.taskId.trim()) {
|
|
925
|
+
return errorResult(
|
|
926
|
+
"mutate",
|
|
927
|
+
"tasks",
|
|
928
|
+
operation,
|
|
929
|
+
"E_INVALID_INPUT",
|
|
930
|
+
"taskId is required",
|
|
931
|
+
startTime
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
if (operation === "req.add") {
|
|
935
|
+
if (typeof params.gate !== "string") {
|
|
936
|
+
return errorResult(
|
|
937
|
+
"mutate",
|
|
938
|
+
"tasks",
|
|
939
|
+
operation,
|
|
940
|
+
"E_INVALID_INPUT",
|
|
941
|
+
"gate must be AcceptanceGate JSON text; use req add --gate",
|
|
942
|
+
startTime
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
const { parseGateJson } = await import("@cleocode/core/tasks/req");
|
|
946
|
+
const gate = parseGateJson(params.gate);
|
|
947
|
+
const data2 = await reqAdd(getProjectRoot(), params.taskId, gate);
|
|
948
|
+
return wrapResult({ success: true, data: data2 }, "mutate", "tasks", operation, startTime);
|
|
949
|
+
}
|
|
950
|
+
if (params.apply !== true) {
|
|
951
|
+
return errorResult(
|
|
952
|
+
"mutate",
|
|
953
|
+
"tasks",
|
|
954
|
+
operation,
|
|
955
|
+
"E_INVALID_INPUT",
|
|
956
|
+
"Migration writes require apply=true; use the query gateway for preview",
|
|
957
|
+
startTime
|
|
958
|
+
);
|
|
959
|
+
}
|
|
960
|
+
const data = await reqMigrate(getProjectRoot(), params.taskId, true);
|
|
961
|
+
return wrapResult({ success: true, data }, "mutate", "tasks", operation, startTime);
|
|
962
|
+
}
|
|
963
|
+
if (operation === "saga.create") {
|
|
964
|
+
const envelope = await sagaCreate(params ?? {});
|
|
965
|
+
return wrapResult(
|
|
966
|
+
envelopeToEngineResult(envelope),
|
|
967
|
+
"mutate",
|
|
968
|
+
"tasks",
|
|
969
|
+
operation,
|
|
970
|
+
startTime
|
|
971
|
+
);
|
|
972
|
+
}
|
|
973
|
+
if (operation === "saga.add") {
|
|
974
|
+
const envelope = await sagaAdd(params ?? {});
|
|
975
|
+
return wrapResult(
|
|
976
|
+
envelopeToEngineResult(envelope),
|
|
977
|
+
"mutate",
|
|
978
|
+
"tasks",
|
|
979
|
+
operation,
|
|
980
|
+
startTime
|
|
981
|
+
);
|
|
982
|
+
}
|
|
983
|
+
if (operation === "saga.repair") {
|
|
984
|
+
const envelope = await sagaRepair(params ?? {});
|
|
985
|
+
return wrapResult(
|
|
986
|
+
envelopeToEngineResult(envelope),
|
|
987
|
+
"mutate",
|
|
988
|
+
"tasks",
|
|
989
|
+
operation,
|
|
990
|
+
startTime
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
if (operation === "saga.detach") {
|
|
994
|
+
const envelope = await sagaDetach(params ?? {});
|
|
995
|
+
return wrapResult(
|
|
996
|
+
envelopeToEngineResult(envelope),
|
|
997
|
+
"mutate",
|
|
998
|
+
"tasks",
|
|
999
|
+
operation,
|
|
1000
|
+
startTime
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
if (operation === "saga.reconcile") {
|
|
1004
|
+
const envelope = await sagaReconcile(params ?? {});
|
|
1005
|
+
return wrapResult(
|
|
1006
|
+
envelopeToEngineResult(envelope),
|
|
1007
|
+
"mutate",
|
|
1008
|
+
"tasks",
|
|
1009
|
+
operation,
|
|
1010
|
+
startTime
|
|
1011
|
+
);
|
|
1012
|
+
}
|
|
1013
|
+
} catch (error) {
|
|
1014
|
+
getLogger("domain:tasks").error(
|
|
1015
|
+
{ gateway: "mutate", domain: "tasks", operation, err: error },
|
|
1016
|
+
error instanceof Error ? error.message : String(error)
|
|
1017
|
+
);
|
|
1018
|
+
return handleErrorResult("mutate", "tasks", operation, error, startTime);
|
|
1019
|
+
}
|
|
1020
|
+
try {
|
|
1021
|
+
const envelope = await typedDispatch(
|
|
1022
|
+
_tasksTypedHandler,
|
|
1023
|
+
operation,
|
|
1024
|
+
params ?? {}
|
|
1025
|
+
);
|
|
1026
|
+
const response = wrapResult(
|
|
1027
|
+
envelopeToEngineResult(envelope),
|
|
1028
|
+
"mutate",
|
|
1029
|
+
"tasks",
|
|
1030
|
+
operation,
|
|
1031
|
+
startTime
|
|
1032
|
+
);
|
|
1033
|
+
return stampSuggestedNext(response, operation, params ?? {});
|
|
1034
|
+
} catch (error) {
|
|
1035
|
+
getLogger("domain:tasks").error(
|
|
1036
|
+
{ gateway: "mutate", domain: "tasks", operation, err: error },
|
|
1037
|
+
error instanceof Error ? error.message : String(error)
|
|
1038
|
+
);
|
|
1039
|
+
return handleErrorResult("mutate", "tasks", operation, error, startTime);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
// -----------------------------------------------------------------------
|
|
1043
|
+
// Supported operations
|
|
1044
|
+
// -----------------------------------------------------------------------
|
|
1045
|
+
/** Declared operations for introspection and validation. */
|
|
1046
|
+
getSupportedOperations() {
|
|
1047
|
+
return {
|
|
1048
|
+
query: [
|
|
1049
|
+
"show",
|
|
1050
|
+
"list",
|
|
1051
|
+
"find",
|
|
1052
|
+
"tree",
|
|
1053
|
+
"blockers",
|
|
1054
|
+
"depends",
|
|
1055
|
+
// T11787 (epic T11556) — slice/context: registered + implemented; now gated-in.
|
|
1056
|
+
"slice",
|
|
1057
|
+
"context",
|
|
1058
|
+
"deps.validate",
|
|
1059
|
+
"deps.tree",
|
|
1060
|
+
"analyze",
|
|
1061
|
+
"impact",
|
|
1062
|
+
"next",
|
|
1063
|
+
"plan",
|
|
1064
|
+
"relates",
|
|
1065
|
+
"complexity.estimate",
|
|
1066
|
+
"history",
|
|
1067
|
+
"current",
|
|
1068
|
+
"label.list",
|
|
1069
|
+
"sync.links",
|
|
1070
|
+
// Saga sub-domain (ADR-073)
|
|
1071
|
+
"saga.list",
|
|
1072
|
+
"saga.members",
|
|
1073
|
+
"saga.rollup",
|
|
1074
|
+
"req.list",
|
|
1075
|
+
"req.migrate.preview"
|
|
1076
|
+
],
|
|
1077
|
+
mutate: [
|
|
1078
|
+
"add",
|
|
1079
|
+
"update",
|
|
1080
|
+
"complete",
|
|
1081
|
+
"cancel",
|
|
1082
|
+
"delete",
|
|
1083
|
+
"archive",
|
|
1084
|
+
"restore",
|
|
1085
|
+
"reparent",
|
|
1086
|
+
"reorder",
|
|
1087
|
+
// T11786 (epic T11556) — bulk task mutate ops Studio's Kanban binds to.
|
|
1088
|
+
"reorder-rank",
|
|
1089
|
+
"bulk-move",
|
|
1090
|
+
"assignee",
|
|
1091
|
+
"relates.add",
|
|
1092
|
+
"relates.remove",
|
|
1093
|
+
"ranking.revert",
|
|
1094
|
+
"start",
|
|
1095
|
+
"stop",
|
|
1096
|
+
"sync.reconcile",
|
|
1097
|
+
"sync.links.remove",
|
|
1098
|
+
"claim",
|
|
1099
|
+
"unclaim",
|
|
1100
|
+
// Saga sub-domain (ADR-073)
|
|
1101
|
+
"saga.create",
|
|
1102
|
+
"saga.add",
|
|
1103
|
+
// T10117 — repair an I5-violating saga.
|
|
1104
|
+
"saga.repair",
|
|
1105
|
+
// T10118 — repair verb for ADR-073 §1.2 I7 violations
|
|
1106
|
+
"saga.detach",
|
|
1107
|
+
// T10121 — idempotent cron-safe auto-close repair.
|
|
1108
|
+
"saga.reconcile",
|
|
1109
|
+
"req.add",
|
|
1110
|
+
"req.migrate"
|
|
1111
|
+
]
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
export {
|
|
1116
|
+
TasksHandler
|
|
1117
|
+
};
|
|
1118
|
+
//# sourceMappingURL=tasks-C24KHTFF.js.map
|