@iowarp/clio-coder 0.4.6 → 0.4.7
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/.claude-plugin/marketplace.json +283 -0
- package/CHANGELOG.md +50 -0
- package/CONTRIBUTING.md +102 -29
- package/NOTICE +8 -0
- package/README.md +37 -5
- package/dist/{acp-UVEVWSDL.js → acp-W3Y3TRHD.js} +12 -12
- package/dist/{agents-VWY37DTK.js → agents-J4ICNLQ3.js} +52 -52
- package/dist/assets/codewiki.json +1 -1
- package/dist/assets/tui-notices/get-east-asian-width-LICENSE +9 -0
- package/dist/assets/tui-notices/marked-LICENSE +44 -0
- package/dist/assets/tui-notices/pi-tui-LICENSE +21 -0
- package/dist/{auth-PCV2XQDV.js → auth-X2UJUMOC.js} +24 -24
- package/dist/{builtins-PD652MTK.js → builtins-XLXWWSRF.js} +6 -6
- package/dist/{chunk-DZK63TZJ.js → chunk-24S3DN22.js} +336 -612
- package/dist/{chunk-NTK3WTHM.js → chunk-24TOGHPO.js} +2 -2
- package/dist/{chunk-M6TAYK66.js → chunk-2O2LVQQK.js} +11 -4
- package/dist/{chunk-OQM5IVJY.js → chunk-34XHRVKG.js} +3 -3
- package/dist/{chunk-LY4N4TTL.js → chunk-3LXJOICS.js} +2 -2
- package/dist/{chunk-3BJGMT2D.js → chunk-3XE4NRLF.js} +1 -1
- package/dist/{chunk-N2OKBREN.js → chunk-4MFBBY2Z.js} +3 -3
- package/dist/{chunk-5VTJP36Q.js → chunk-4N2RZ4TO.js} +2 -2
- package/dist/{chunk-WNGF5AJX.js → chunk-4QKAITQT.js} +3 -3
- package/dist/chunk-4UHVS5T7.js +207 -0
- package/dist/{chunk-GLYBJ4RQ.js → chunk-5AJPUR72.js} +6 -6
- package/dist/{chunk-5CY4Q6QI.js → chunk-5EQO5NWP.js} +105 -3
- package/dist/{chunk-6HAO6X5B.js → chunk-65BGHOUR.js} +8 -5
- package/dist/{chunk-6VRRJT7L.js → chunk-6CA2BHOR.js} +2 -2
- package/dist/{chunk-HL26ADLH.js → chunk-6CB2IL4N.js} +2 -1
- package/dist/{chunk-E7RF4KBO.js → chunk-6LRLOJHQ.js} +3 -3
- package/dist/{chunk-HXHFDHB6.js → chunk-6TAATXXH.js} +6 -6
- package/dist/{chunk-P6M7RKMI.js → chunk-6YHPAAZR.js} +3 -3
- package/dist/{chunk-5QRX7SLS.js → chunk-7EEGBKV4.js} +7 -7
- package/dist/{chunk-BS4GAMUB.js → chunk-A67NR5AT.js} +2 -2
- package/dist/{chunk-WJIMKGD6.js → chunk-BAU36233.js} +8 -8
- package/dist/{chunk-PZN2LQY6.js → chunk-BO4XV5VX.js} +4 -4
- package/dist/{chunk-I2K2NCZQ.js → chunk-BQQ5MXUC.js} +6 -6
- package/dist/{chunk-X3BI7HTV.js → chunk-C3G5PNUO.js} +21 -21
- package/dist/{chunk-SRZOW5L2.js → chunk-C6GEXX4L.js} +1 -1
- package/dist/{chunk-6RYDAVQT.js → chunk-CE64C5K5.js} +219 -64
- package/dist/chunk-CP3HIR5H.js +2119 -0
- package/dist/{chunk-BBV5TKE6.js → chunk-CPXGJI2A.js} +2 -2
- package/dist/{chunk-IGLVVNEG.js → chunk-CULVKYTK.js} +4 -4
- package/dist/{chunk-DXLUVUD4.js → chunk-D2T66PDV.js} +5 -5
- package/dist/{chunk-NF3BK5WR.js → chunk-DACXIVVF.js} +5 -5
- package/dist/{chunk-IKRWLEDA.js → chunk-DLIYANB7.js} +20 -15
- package/dist/{chunk-RGZNQ5CT.js → chunk-DO7M3LSX.js} +9 -9
- package/dist/{chunk-2QPI3TR3.js → chunk-DVJL77SO.js} +2 -2
- package/dist/{chunk-ODUTYZIU.js → chunk-EUEXGXXR.js} +5 -5
- package/dist/{chunk-WKUYQBCG.js → chunk-EUZRMP4Y.js} +18 -16
- package/dist/{chunk-JMPL7NUB.js → chunk-G4LGUTOE.js} +4 -4
- package/dist/{chunk-CBSKDFWL.js → chunk-GEVQNST4.js} +2 -2
- package/dist/{chunk-NNWJYUNO.js → chunk-GFQ7P2UF.js} +7 -7
- package/dist/{chunk-SXQKNKRA.js → chunk-GI5RRMAH.js} +14 -14
- package/dist/{chunk-HPTJF6DG.js → chunk-GVZFCJHE.js} +336 -83
- package/dist/{chunk-ACCKVSHU.js → chunk-GXIWHXDB.js} +3 -3
- package/dist/{chunk-LUL5Z66S.js → chunk-HOX4YZ2K.js} +6 -5
- package/dist/chunk-HRAKUPIH.js +57 -0
- package/dist/{chunk-F5Z7EWMN.js → chunk-IJMW64DX.js} +50 -50
- package/dist/{chunk-QNWRHOMF.js → chunk-IMOD2YPV.js} +16 -9
- package/dist/{chunk-HZ2T2YED.js → chunk-IQCNVLO6.js} +28 -8
- package/dist/{chunk-HZFBVU5X.js → chunk-ISNCCX42.js} +8 -8
- package/dist/{chunk-7JSSKXG2.js → chunk-IZYTT3CD.js} +7 -3
- package/dist/chunk-KKEYGFX4.js +915 -0
- package/dist/{chunk-HHVJNVUJ.js → chunk-KS7ETA3P.js} +2 -2
- package/dist/{chunk-BLTEAUCB.js → chunk-L3Z5ANCV.js} +7 -7
- package/dist/{chunk-4VMV6OS6.js → chunk-LBFQMYS3.js} +2 -2
- package/dist/{chunk-URBGEOH3.js → chunk-M6Z2V6YU.js} +5 -5
- package/dist/{chunk-BT7HGDOX.js → chunk-MBJO5VNZ.js} +12 -12
- package/dist/chunk-MNQN3X6Y.js +595 -0
- package/dist/{chunk-3QKXHCGS.js → chunk-MZHXENL7.js} +5 -5
- package/dist/chunk-MZNWZUJM.js +1801 -0
- package/dist/{chunk-7YJWEF2L.js → chunk-N37QC5FV.js} +5 -5
- package/dist/{chunk-TJFDL26W.js → chunk-NCCQ6DVS.js} +7 -7
- package/dist/{chunk-P5JMBPDJ.js → chunk-NO7J45X6.js} +162 -47
- package/dist/chunk-OH3YYA3B.js +15 -0
- package/dist/{chunk-22PQ4TX4.js → chunk-P4DL2LM5.js} +16 -77
- package/dist/{chunk-LIN2K3EL.js → chunk-PFLOULP3.js} +4 -4
- package/dist/{chunk-QXFBABFJ.js → chunk-QKWL7SYE.js} +11 -11
- package/dist/chunk-RFCKPS2V.js +26 -0
- package/dist/{chunk-ZS43Y2FT.js → chunk-RTLNFZMD.js} +12 -4
- package/dist/{chunk-U7H5WRG5.js → chunk-RXFPB32E.js} +8 -6
- package/dist/{chunk-Q7NNUHQV.js → chunk-SEDI5K5B.js} +16 -16
- package/dist/{chunk-WV6TDAPN.js → chunk-SELG4SUR.js} +7 -7
- package/dist/{chunk-3WBALRQH.js → chunk-SER7RRAE.js} +27 -832
- package/dist/{chunk-K2HL3GBL.js → chunk-T4TY5GG3.js} +165 -15
- package/dist/chunk-T7QQBNLH.js +691 -0
- package/dist/{chunk-6OII3LOK.js → chunk-TLTGZTXI.js} +3 -3
- package/dist/chunk-TZ6UVP2H.js +637 -0
- package/dist/{chunk-3JLFK5MW.js → chunk-TZHN5ITX.js} +13 -41
- package/dist/{chunk-VANN3GDP.js → chunk-U3TPUXOQ.js} +399 -234
- package/dist/{chunk-VHMX7SXF.js → chunk-UA3W4FGC.js} +6 -6
- package/dist/{chunk-3O2ZAUGQ.js → chunk-UA6W4XFJ.js} +2 -2
- package/dist/chunk-UWD3JD5X.js +709 -0
- package/dist/chunk-V4ZKOKRB.js +13433 -0
- package/dist/{chunk-NC4KV7EL.js → chunk-VCRVEDUC.js} +5 -5
- package/dist/{chunk-4DU2TVI4.js → chunk-VMATUZB6.js} +12 -10
- package/dist/{chunk-J2FYEQ5L.js → chunk-VTYHHQ57.js} +2 -2
- package/dist/chunk-WB7POC6M.js +891 -0
- package/dist/{chunk-3HQVBIKD.js → chunk-WBVKKTUT.js} +2 -2
- package/dist/{chunk-EHOSNVVM.js → chunk-WLHX3MM5.js} +6 -2
- package/dist/{chunk-24T2YZ7A.js → chunk-WN552PKN.js} +553 -298
- package/dist/{chunk-4U4TKZFR.js → chunk-WT5TRMO4.js} +51 -26
- package/dist/{chunk-XWMSPJYN.js → chunk-WURGVOZJ.js} +56 -12
- package/dist/{chunk-7WUZEB2M.js → chunk-XR3XJN2M.js} +2 -2
- package/dist/chunk-XW2UZICE.js +372 -0
- package/dist/{chunk-2AKYFREM.js → chunk-XZ6UFQ52.js} +11 -11
- package/dist/chunk-Y3JU5RPK.js +8 -0
- package/dist/chunk-YKRJTYNP.js +1143 -0
- package/dist/{chunk-PWWSIB2A.js → chunk-ZGIGW4ZG.js} +5 -5
- package/dist/cli/index.js +34 -36
- package/dist/{clio-QQCMTUZE.js → clio-L2P7S2R2.js} +9 -9
- package/dist/{code-nav-GUPM6766.js → code-nav-B5LNX4KU.js} +25 -25
- package/dist/{components-TNIKXCBH.js → components-63MMQKUT.js} +6 -6
- package/dist/{config-IIM7YOD3.js → config-YXARKGTX.js} +70 -67
- package/dist/{configure-4ZM5HWJX.js → configure-LMVQJ46J.js} +47 -35
- package/dist/{context-OL5P3HEP.js → context-7HJEWTTP.js} +87 -44
- package/dist/{context-44BZLJ3J.js → context-XSZKKFBW.js} +14 -14
- package/dist/{context-AIDVQKMW.js → context-YG2LZDYZ.js} +60 -58
- package/dist/{context-clear-OQV76MYP.js → context-clear-AC5NXHM2.js} +57 -55
- package/dist/{context-index-HP2JFUWA.js → context-index-KKTPRV5G.js} +3 -3
- package/dist/{context-map-INTXD54D.js → context-map-T7ROR5D5.js} +4 -4
- package/dist/{context-working-set-ZUW3EGLS.js → context-working-set-F4Q4J3NS.js} +12 -10
- package/dist/{detail-UXPWRANG.js → detail-H73BEF2N.js} +58 -56
- package/dist/{dispatch-runner-P3ZW6G77.js → dispatch-runner-3RY5FSJC.js} +74 -72
- package/dist/{doctor-JJVGPZWT.js → doctor-EQYJOGUG.js} +44 -30
- package/dist/{eval-V2RTN3UH.js → eval-4P7O6CCE.js} +109 -46
- package/dist/{evidence-35PYWGSO.js → evidence-D6GUSYJW.js} +57 -55
- package/dist/{evidence-CIGGKI6J.js → evidence-O76QF7TZ.js} +62 -59
- package/dist/{evolve-33SM3NJP.js → evolve-H47BCETS.js} +58 -56
- package/dist/{extensions-YVRHX6ZI.js → extensions-NNL3ZOCU.js} +98 -20
- package/dist/{fleet-LFO7SIPC.js → fleet-KMNS6NOM.js} +106 -99
- package/dist/{fleet-commands-RLK72GU3.js → fleet-commands-DOWSYCBX.js} +14 -14
- package/dist/{fleet-decisions-3SBSCTCW.js → fleet-decisions-S3PTZV2D.js} +9 -9
- package/dist/{fleet-graph-JZIBCGMW.js → fleet-graph-F2DE2TME.js} +26 -24
- package/dist/{fleet-inspect-2L5YGGZJ.js → fleet-inspect-EN2Q6IVB.js} +60 -57
- package/dist/{fleet-preflight-QRSHIIDE.js → fleet-preflight-FRLETDD3.js} +3 -3
- package/dist/{fleet-validate-LIAVKDUU.js → fleet-validate-B2XDLS57.js} +28 -29
- package/dist/{fleet-verify-JIK3OQZR.js → fleet-verify-4JKUWGJ7.js} +57 -55
- package/dist/{fleet-view-IWHYGQKK.js → fleet-view-BHJFW26B.js} +60 -57
- package/dist/{init-NJEDOTQW.js → init-XAT5N5YM.js} +79 -74
- package/dist/interop-FVECHFKG.js +246 -0
- package/dist/{inventory-74UL7UHU.js → inventory-7KFQGLCV.js} +60 -57
- package/dist/library-NY2XOT75.js +492 -0
- package/dist/library-QAPAO23R.js +306 -0
- package/dist/library-import-5Y6MAS3R.js +183 -0
- package/dist/library-inventory-JT6HWITQ.js +56 -0
- package/dist/library-validation-EQUH25DC.js +42 -0
- package/dist/{memory-I76I5VUH.js → memory-DYVTTCP6.js} +58 -56
- package/dist/{models-D4YDIQZQ.js → models-MASFJ6Y2.js} +48 -36
- package/dist/{monitor-NKVD55HX.js → monitor-YMP4NXJJ.js} +64 -61
- package/dist/{orchestrator-I6OATVPK.js → orchestrator-AFQRRTEI.js} +3685 -1841
- package/dist/{panes-7BTYH3XQ.js → panes-D3Y2KFG5.js} +4 -4
- package/dist/{panes-WPOMEMRH.js → panes-NICTHQCV.js} +7 -7
- package/dist/{paths-J3KN7UAO.js → paths-PSFAUIGO.js} +5 -5
- package/dist/{preload-EJAWJEIO.js → preload-5Q7VXRFJ.js} +57 -55
- package/dist/{reset-4XMQKDNZ.js → reset-7NKZK7JN.js} +9 -9
- package/dist/{resources-TVYVXK3Q.js → resources-NILSIZAT.js} +94 -38
- package/dist/{run-OWQNNSJU.js → run-BPZGEBZV.js} +121 -105
- package/dist/{share-NPZZMUXG.js → share-EZ6ERBMH.js} +31 -28
- package/dist/skills-BTVVNYVM.js +100 -0
- package/dist/{skills-eval-J5TCKSJA.js → skills-eval-UY34MNK7.js} +110 -72
- package/dist/{skills-inventory-7II4DM57.js → skills-inventory-JDHSIA7I.js} +30 -25
- package/dist/{slash-commands-MDSDSWYF.js → slash-commands-K4FNQ2AT.js} +49 -46
- package/dist/{steer-S7D7IKPU.js → steer-2B3EQGFH.js} +4 -4
- package/dist/{support-5VAEC32W.js → support-L2SOL3IE.js} +7 -7
- package/dist/{targets-KILZEOCE.js → targets-44VKGFLN.js} +64 -58
- package/dist/{tasks-R6P6OV22.js → tasks-3KODKFU7.js} +12 -12
- package/dist/{terminal-lease-LZCG2KN3.js → terminal-lease-LXA7MMPO.js} +32 -19
- package/dist/{tools-6OCQ6SVB.js → tools-3UB7TEVR.js} +7 -7
- package/dist/{trace-JHLXWUMN.js → trace-TAMIU4OJ.js} +5 -4
- package/dist/{tui-primitives-RCY2HN7G.js → tui-primitives-A6MUW32V.js} +3 -2
- package/dist/{uninstall-FXYMFFRT.js → uninstall-QYVRPEM4.js} +9 -9
- package/dist/{upgrade-D2OZH6IQ.js → upgrade-7PMKM2JH.js} +15 -16
- package/dist/{usage-PIASNUS4.js → usage-6EQV7EQK.js} +70 -67
- package/dist/{verifiers-LTHUY2PX.js → verifiers-JLITWSHU.js} +15 -15
- package/dist/{verify-HYF7KBVE.js → verify-T7NAEVIG.js} +13 -13
- package/dist/{web-fetch-MQN4FH3X.js → web-fetch-W4TNW4Q7.js} +4 -4
- package/dist/{wiki-generate-RK7JQ5NP.js → wiki-generate-T2TJQJUA.js} +81 -76
- package/dist/{with-panes-OFTNAR4Y.js → with-panes-CHFC7HGI.js} +4 -4
- package/dist/worker/entry.js +283 -76
- package/docs/README.md +43 -0
- package/docs/architecture/architecture.md +8 -7
- package/docs/architecture/artifact-versions.md +3 -3
- package/docs/architecture/context-engine.md +35 -1
- package/docs/architecture/library.md +32 -0
- package/docs/architecture/middleware-and-components.md +1 -1
- package/docs/architecture/model-catalog.md +21 -1
- package/docs/architecture/pi-boundary.md +18 -0
- package/docs/architecture/prompt-envelope-and-tools.md +5 -5
- package/docs/architecture/safety-model.md +21 -2
- package/docs/architecture/session-lifecycle.md +12 -1
- package/docs/architecture/tui-design.md +108 -9
- package/docs/architecture/worker-context.md +106 -0
- package/docs/guide/authoring-plugins.md +160 -0
- package/docs/guide/built-in-agents.md +5 -5
- package/docs/guide/commands-and-modes.md +161 -56
- package/docs/guide/configuration-and-targets.md +1 -1
- package/docs/guide/configuration-reference.md +27 -34
- package/docs/guide/environment-variables.md +2 -2
- package/docs/guide/exit-codes-and-output.md +1 -1
- package/docs/guide/extensions-and-sharing.md +93 -53
- package/docs/guide/fleet-dispatch.md +31 -4
- package/docs/guide/glossary.md +1 -1
- package/docs/guide/harness-extensions.md +291 -0
- package/docs/guide/installation-and-lifecycle.md +9 -9
- package/docs/guide/interop.md +243 -0
- package/docs/guide/panes-and-files.md +3 -3
- package/docs/guide/plugins.md +80 -0
- package/docs/guide/resource-library.md +111 -45
- package/docs/guide/skills-marketplace.md +35 -72
- package/docs/guide/tool-usage.md +19 -7
- package/docs/guide/troubleshooting.md +1 -1
- package/docs/process/development-pipeline.md +14 -14
- package/docs/process/documentation-coverage.md +28 -1
- package/docs/process/documentation-guide.md +15 -7
- package/docs/process/eval-runner.md +8 -3
- package/docs/process/performance-methodology.md +1 -1
- package/docs/process/release-cut-checklist.md +4 -0
- package/docs/process/scientific-validation.md +23 -0
- package/evals/scalar-decision-machinery.ts +1 -1
- package/examples/extensions/README.md +67 -0
- package/examples/extensions/lab-status/clio-coder-extension.json +14 -0
- package/examples/extensions/lab-status/extension.mjs +68 -0
- package/examples/extensions/lab-status/jobs.synthetic.json +9 -0
- package/examples/extensions/measurements/clio-coder-extension.json +28 -0
- package/examples/extensions/measurements/summarize.cjs +23 -0
- package/library/README.md +109 -0
- package/library/_authoring/templates/agent/README.md +28 -0
- package/library/_authoring/templates/agent/agents/benchmark-scout.md +30 -0
- package/library/_authoring/templates/agent/plugin.json +23 -0
- package/library/_authoring/templates/fleet/README.md +29 -0
- package/library/_authoring/templates/fleet/fleets/pipeline-review.md +31 -0
- package/library/_authoring/templates/fleet/plugin.json +23 -0
- package/library/_authoring/templates/plugin/README.md +37 -0
- package/library/_authoring/templates/plugin/agents/data-curator.md +31 -0
- package/library/_authoring/templates/plugin/assets/curation-guide.md +22 -0
- package/library/_authoring/templates/plugin/plugin.json +42 -0
- package/library/_authoring/templates/plugin/prompts/inspect-dataset.md +15 -0
- package/library/_authoring/templates/plugin/skills/dataset-curation/SKILL.md +36 -0
- package/library/_authoring/templates/plugin/skills/dataset-curation/evals.md +17 -0
- package/library/_authoring/templates/prompt/README.md +28 -0
- package/library/_authoring/templates/prompt/plugin.json +23 -0
- package/library/_authoring/templates/prompt/prompts/paper-summary.md +26 -0
- package/library/_authoring/templates/skill/README.md +24 -0
- package/library/_authoring/templates/skill/SKILL.md +39 -0
- package/library/_authoring/templates/skill/evals.md +30 -0
- package/library/_authoring/templates/skill/plugin.json +23 -0
- package/library/agents/README.md +7 -0
- package/library/fleets/README.md +7 -0
- package/library/plugins/materio/README.md +137 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-lab-definer.md +208 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-literature-reviewer.md +308 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-research-explorer.md +249 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-task-executor.md +416 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-task-verifier.md +60 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-workflow-planner.md +238 -0
- package/library/plugins/materio/ai.iowarp.clio/fleets/materio-execute-task.md +50 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/add-task.md +66 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/archive-task.md +65 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/checkpoint.md +26 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/define-research-tasks.md +230 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/define-virtual-lab.md +181 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/execute-task.md +292 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/help.md +129 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/identify-research.md +206 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/literature-review.md +201 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/pause-research.md +12 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/progress.md +105 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/remove-task.md +63 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/resume-research.md +64 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/settings.md +16 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/status.md +92 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/upload-data.md +104 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/wtfp.md +145 -0
- package/library/plugins/materio/ai.iowarp.clio/references/execution.md +56 -0
- package/library/plugins/materio/ai.iowarp.portability/provenance.json +9 -0
- package/library/plugins/materio/assets/actions/add-task.md +86 -0
- package/library/plugins/materio/assets/actions/archive-task.md +84 -0
- package/library/plugins/materio/assets/actions/checkpoint.md +47 -0
- package/library/plugins/materio/assets/actions/define-research-tasks.md +228 -0
- package/library/plugins/materio/assets/actions/define-virtual-lab.md +179 -0
- package/library/plugins/materio/assets/actions/execute-task.md +290 -0
- package/library/plugins/materio/assets/actions/help.md +140 -0
- package/library/plugins/materio/assets/actions/identify-research.md +204 -0
- package/library/plugins/materio/assets/actions/literature-review.md +199 -0
- package/library/plugins/materio/assets/actions/pause-research.md +34 -0
- package/library/plugins/materio/assets/actions/progress.md +125 -0
- package/library/plugins/materio/assets/actions/remove-task.md +82 -0
- package/library/plugins/materio/assets/actions/resume-research.md +84 -0
- package/library/plugins/materio/assets/actions/settings.md +38 -0
- package/library/plugins/materio/assets/actions/status.md +112 -0
- package/library/plugins/materio/assets/actions/upload-data.md +123 -0
- package/library/plugins/materio/assets/actions/wtfp.md +179 -0
- package/library/plugins/materio/assets/references/research-domains.md +134 -0
- package/library/plugins/materio/assets/references/research-policy.md +77 -0
- package/library/plugins/materio/assets/references/traditional-workflows.md +146 -0
- package/library/plugins/materio/assets/scripts/check_physics.py +271 -0
- package/library/plugins/materio/assets/scripts/check_scripts.py +248 -0
- package/library/plugins/materio/assets/scripts/project_plugin.py +165 -0
- package/library/plugins/materio/assets/scripts/research_state.py +400 -0
- package/library/plugins/materio/assets/scripts/verify_citations.py +616 -0
- package/library/plugins/materio/assets/templates/RESEARCH.md +39 -0
- package/library/plugins/materio/assets/templates/VIRTUAL-LAB.md +120 -0
- package/library/plugins/materio/assets/templates/WORKFLOW.md +42 -0
- package/library/plugins/materio/assets/templates/config.json +5 -0
- package/library/plugins/materio/evals/scripts.yaml +29 -0
- package/library/plugins/materio/plugin.json +530 -0
- package/library/plugins/materio/skills/materio-lab-definer/SKILL.md +74 -0
- package/library/plugins/materio/skills/materio-literature-reviewer/SKILL.md +64 -0
- package/library/plugins/materio/skills/materio-research-explorer/SKILL.md +74 -0
- package/library/plugins/materio/skills/materio-task-executor/SKILL.md +214 -0
- package/library/plugins/materio/skills/materio-task-verifier/SKILL.md +46 -0
- package/library/plugins/materio/skills/materio-workflow-planner/SKILL.md +79 -0
- package/library/plugins/materio/tests/test_check_physics.py +139 -0
- package/library/plugins/materio/tests/test_check_scripts.py +140 -0
- package/library/plugins/materio/tests/test_research_state.py +291 -0
- package/library/plugins/materio/tests/test_verify_citations.py +337 -0
- package/library/prompts/README.md +7 -0
- package/library/registry.yaml +921 -0
- package/library/skills/README.md +120 -0
- package/{skills → library/skills}/coding/ast-grep/SKILL.md +1 -1
- package/{skills → library/skills}/coding/ast-grep/evals.md +1 -1
- package/library/skills/coding/ast-grep/plugin.json +23 -0
- package/{skills → library/skills}/coding/coding-standards/SKILL.md +1 -1
- package/{skills → library/skills}/coding/coding-standards/evals.md +1 -1
- package/library/skills/coding/coding-standards/plugin.json +23 -0
- package/{skills → library/skills}/coding/prototype/SKILL.md +1 -1
- package/{skills → library/skills}/coding/prototype/evals.md +1 -1
- package/library/skills/coding/prototype/plugin.json +23 -0
- package/{skills → library/skills}/coding/tdd/SKILL.md +1 -1
- package/{skills → library/skills}/coding/tdd/evals.md +1 -1
- package/library/skills/coding/tdd/plugin.json +23 -0
- package/{skills → library/skills}/context/context-handoff/SKILL.md +1 -1
- package/{skills → library/skills}/context/context-handoff/evals.md +1 -1
- package/library/skills/context/context-handoff/plugin.json +23 -0
- package/{skills → library/skills}/context/context-prime/SKILL.md +1 -1
- package/{skills → library/skills}/context/context-prime/evals.md +1 -1
- package/library/skills/context/context-prime/plugin.json +23 -0
- package/{skills → library/skills}/git/branch-closeout/SKILL.md +1 -1
- package/library/skills/git/branch-closeout/plugin.json +23 -0
- package/{skills → library/skills}/git/file-ticket/SKILL.md +1 -1
- package/library/skills/git/file-ticket/plugin.json +23 -0
- package/{skills → library/skills}/git/fix-issue/SKILL.md +1 -1
- package/library/skills/git/fix-issue/plugin.json +23 -0
- package/{skills → library/skills}/git/resolve-merge-conflicts/SKILL.md +1 -1
- package/{skills → library/skills}/git/resolve-merge-conflicts/evals.md +1 -1
- package/library/skills/git/resolve-merge-conflicts/plugin.json +23 -0
- package/{skills → library/skills}/git/ship/SKILL.md +1 -1
- package/library/skills/git/ship/plugin.json +23 -0
- package/{skills → library/skills}/git/worktree-create/SKILL.md +1 -1
- package/library/skills/git/worktree-create/plugin.json +23 -0
- package/{skills → library/skills}/git/worktree-merge/SKILL.md +1 -1
- package/library/skills/git/worktree-merge/plugin.json +23 -0
- package/{skills → library/skills}/meta/clio-coder-dev/SKILL.md +1 -1
- package/{skills → library/skills}/meta/clio-coder-dev/evals.md +1 -1
- package/library/skills/meta/clio-coder-dev/plugin.json +23 -0
- package/{skills → library/skills}/meta/clio-coder-test/SKILL.md +1 -1
- package/{skills → library/skills}/meta/clio-coder-test/evals.md +1 -1
- package/library/skills/meta/clio-coder-test/plugin.json +23 -0
- package/{skills → library/skills}/meta/credentials/SKILL.md +1 -1
- package/{skills → library/skills}/meta/credentials/evals.md +1 -1
- package/library/skills/meta/credentials/plugin.json +23 -0
- package/library/skills/meta/find-skills/SKILL.md +85 -0
- package/library/skills/meta/find-skills/evals.md +65 -0
- package/library/skills/meta/find-skills/plugin.json +23 -0
- package/{skills → library/skills}/meta/herdr/SKILL.md +1 -1
- package/{skills → library/skills}/meta/herdr/evals.md +1 -1
- package/library/skills/meta/herdr/plugin.json +23 -0
- package/{skills → library/skills}/meta/skill-craft/SKILL.md +23 -9
- package/{skills → library/skills}/meta/skill-craft/evals.md +11 -3
- package/library/skills/meta/skill-craft/plugin.json +23 -0
- package/{skills → library/skills}/planning/archify/SKILL.md +13 -13
- package/library/skills/planning/archify/plugin.json +23 -0
- package/{skills → library/skills}/planning/architecture/SKILL.md +1 -1
- package/{skills → library/skills}/planning/architecture/evals.md +1 -1
- package/library/skills/planning/architecture/plugin.json +23 -0
- package/{skills → library/skills}/planning/backlog/SKILL.md +1 -1
- package/{skills → library/skills}/planning/backlog/evals.md +1 -1
- package/library/skills/planning/backlog/plugin.json +23 -0
- package/{skills → library/skills}/planning/prd/SKILL.md +1 -1
- package/{skills → library/skills}/planning/prd/evals.md +1 -1
- package/library/skills/planning/prd/plugin.json +23 -0
- package/{skills → library/skills}/planning/product-intent/SKILL.md +1 -1
- package/{skills → library/skills}/planning/product-intent/evals.md +1 -1
- package/library/skills/planning/product-intent/plugin.json +23 -0
- package/{skills → library/skills}/planning/tech-spec/SKILL.md +1 -1
- package/{skills → library/skills}/planning/tech-spec/evals.md +1 -1
- package/library/skills/planning/tech-spec/plugin.json +23 -0
- package/{skills → library/skills}/registry.yaml +7 -7
- package/{skills → library/skills}/remote.yaml +1 -1
- package/{skills → library/skills}/research/arxiv-literature/SKILL.md +1 -1
- package/{skills → library/skills}/research/arxiv-literature/evals.md +1 -1
- package/library/skills/research/arxiv-literature/plugin.json +23 -0
- package/{skills → library/skills}/research/experiment-protocol/SKILL.md +1 -1
- package/{skills → library/skills}/research/experiment-protocol/evals.md +1 -1
- package/library/skills/research/experiment-protocol/plugin.json +23 -0
- package/{skills → library/skills}/research/scientific-debugging/SKILL.md +1 -1
- package/{skills → library/skills}/research/scientific-debugging/evals.md +1 -1
- package/library/skills/research/scientific-debugging/plugin.json +23 -0
- package/{skills → library/skills}/research/scientific-modernization/SKILL.md +1 -1
- package/{skills → library/skills}/research/scientific-modernization/evals.md +1 -1
- package/library/skills/research/scientific-modernization/plugin.json +23 -0
- package/{skills → library/skills}/skill-marketplace.json +37 -37
- package/{skills → library/skills}/workflow/cut-it/SKILL.md +1 -1
- package/{skills → library/skills}/workflow/cut-it/evals.md +1 -1
- package/library/skills/workflow/cut-it/plugin.json +23 -0
- package/{skills → library/skills}/workflow/design-council/SKILL.md +1 -1
- package/{skills → library/skills}/workflow/design-council/evals.md +1 -1
- package/library/skills/workflow/design-council/plugin.json +23 -0
- package/{skills → library/skills}/workflow/grill-me/SKILL.md +1 -1
- package/{skills → library/skills}/workflow/grill-me/evals.md +1 -1
- package/library/skills/workflow/grill-me/plugin.json +23 -0
- package/{skills → library/skills}/workflow/workflow-distiller/SKILL.md +14 -11
- package/{skills → library/skills}/workflow/workflow-distiller/evals.md +14 -6
- package/library/skills/workflow/workflow-distiller/plugin.json +23 -0
- package/package.json +12 -5
- package/src/cli/agents.ts +1 -1
- package/src/cli/config-inspect.ts +1 -1
- package/src/cli/configure.ts +2 -2
- package/src/cli/eval.ts +40 -6
- package/src/cli/extensions.ts +74 -8
- package/src/cli/fleet-preflight.ts +2 -0
- package/src/cli/fleet.ts +2 -0
- package/src/cli/index.ts +1 -3
- package/src/cli/interop-inspect.ts +61 -33
- package/src/cli/interop.ts +79 -9
- package/src/cli/library-import.ts +139 -0
- package/src/cli/library.ts +418 -120
- package/src/cli/run.ts +26 -9
- package/src/cli/skills-eval.ts +43 -6
- package/src/cli/skills-inventory.ts +6 -2
- package/src/cli/skills.ts +44 -491
- package/src/core/bus-events.ts +5 -0
- package/src/core/defaults.ts +1 -1
- package/src/core/recent-models.ts +2 -2
- package/src/core/session-routing.ts +3 -3
- package/src/core/state-file-lock.ts +1 -1
- package/src/core/tool-names.ts +5 -0
- package/src/domains/agents/extension.ts +42 -6
- package/src/domains/agents/fleet-commands.ts +92 -1
- package/src/domains/agents/fleet-contract.ts +87 -19
- package/src/domains/agents/recipe.ts +5 -4
- package/src/domains/agents/registry.ts +80 -24
- package/src/domains/config/keybindings.ts +155 -95
- package/src/domains/context/worker/contract.ts +91 -0
- package/src/domains/context/worker/pressure.ts +120 -0
- package/src/domains/context/worker/recall.ts +62 -0
- package/src/domains/context/worker/select.ts +164 -0
- package/src/domains/context/worker/snapshot.ts +35 -0
- package/src/domains/context/worker/store.ts +16 -0
- package/src/domains/context/working-set/replay/synthetic.ts +2 -1
- package/src/domains/dispatch/active-route-planner.ts +2 -0
- package/src/domains/dispatch/backoff.ts +1 -0
- package/src/domains/dispatch/code-step.ts +12 -2
- package/src/domains/dispatch/contract.ts +3 -0
- package/src/domains/dispatch/execution-plan.ts +2 -0
- package/src/domains/dispatch/extension.ts +109 -27
- package/src/domains/dispatch/fleet-plan.ts +10 -0
- package/src/domains/dispatch/fleet-run.ts +1 -0
- package/src/domains/dispatch/orphan-recovery.ts +1 -0
- package/src/domains/dispatch/receipt-integrity.ts +4 -0
- package/src/domains/dispatch/state.ts +1 -0
- package/src/domains/dispatch/types.ts +5 -0
- package/src/domains/dispatch/validation.ts +12 -0
- package/src/domains/dispatch/workspace-checkpoint.ts +1 -1
- package/src/domains/evidence/failure-attribution.ts +1 -0
- package/src/domains/evidence/trust-status.ts +22 -3
- package/src/domains/extensions/command-schema.ts +145 -0
- package/src/domains/extensions/command-tools.ts +15 -0
- package/src/domains/extensions/compatibility.ts +7 -0
- package/src/domains/extensions/contract.ts +0 -4
- package/src/domains/extensions/discovery.ts +69 -205
- package/src/domains/extensions/extension.ts +0 -4
- package/src/domains/extensions/index.ts +1 -5
- package/src/domains/extensions/manager.ts +1 -6
- package/src/domains/extensions/operator-commands.ts +29 -0
- package/src/domains/extensions/operator-runtime.ts +483 -0
- package/src/domains/extensions/public-api.ts +53 -0
- package/src/domains/extensions/runtime-child.mjs +114 -0
- package/src/domains/extensions/runtime-process.ts +306 -0
- package/src/domains/extensions/runtime-schema.ts +146 -0
- package/src/domains/extensions/{resources.ts → snapshot-access.ts} +1 -17
- package/src/domains/extensions/snapshot.ts +4 -32
- package/src/domains/extensions/state.ts +5 -83
- package/src/domains/extensions/types.ts +33 -34
- package/src/domains/interop/adopt.ts +546 -0
- package/src/domains/interop/detect.ts +50 -12
- package/src/domains/interop/foreign.ts +554 -0
- package/src/domains/interop/import.ts +277 -0
- package/src/domains/interop/index.ts +24 -0
- package/src/domains/interop/install.ts +6 -0
- package/src/domains/interop/inventory.ts +351 -0
- package/src/domains/interop/projection.ts +360 -0
- package/src/domains/interop/registry.ts +106 -3
- package/src/domains/interop/types.ts +51 -0
- package/src/domains/lifecycle/migrations/index.ts +0 -2
- package/src/domains/lifecycle/naming-resources.ts +1 -1
- package/src/domains/middleware/marketplace-offer.ts +1 -1
- package/src/domains/mux/contract.ts +1 -1
- package/src/domains/plugins/catalog.ts +204 -0
- package/src/domains/plugins/contract.ts +24 -0
- package/src/domains/plugins/discovery.ts +316 -0
- package/src/domains/plugins/extension.ts +40 -0
- package/src/domains/plugins/index.ts +77 -0
- package/src/domains/plugins/integrity.ts +6 -0
- package/src/domains/plugins/manifest.ts +3 -0
- package/src/domains/plugins/resources.ts +102 -0
- package/src/domains/plugins/state.ts +753 -0
- package/src/domains/plugins/types.ts +217 -0
- package/src/domains/prompts/extension.ts +9 -2
- package/src/domains/prompts/fragments/operating/skills.md +10 -10
- package/src/domains/resources/common-loader.ts +9 -6
- package/src/domains/resources/index.ts +67 -0
- package/src/domains/resources/library-actions.ts +836 -0
- package/src/domains/resources/library-evals.ts +38 -0
- package/src/domains/resources/library-inventory.ts +1048 -0
- package/src/domains/resources/library-types.ts +50 -0
- package/src/domains/resources/library-validation.ts +634 -0
- package/src/domains/resources/library.ts +437 -156
- package/src/domains/resources/package-references.ts +66 -0
- package/src/domains/resources/prompts/loader.ts +75 -41
- package/src/domains/resources/skills/install.ts +2 -2
- package/src/domains/resources/skills/loader.ts +77 -22
- package/src/domains/resources/skills/marketplace.ts +48 -57
- package/src/domains/resources/skills/promotion.ts +2 -2
- package/src/domains/resources/skills/provenance-pin.ts +17 -4
- package/src/domains/safety/action-classifier.ts +2 -2
- package/src/domains/safety/default-path-policy.ts +3 -1
- package/src/domains/safety/policy-engine.ts +1 -1
- package/src/domains/safety/protected-artifacts.ts +21 -5
- package/src/domains/safety/skill-authority.ts +5 -2
- package/src/domains/share/archive.ts +1 -1
- package/src/engine/apis/openai-completions.ts +52 -2
- package/src/engine/notices/pi-tui-LICENSE +21 -0
- package/src/engine/tui.ts +3 -0
- package/src/engine/worker-runtime.ts +58 -14
- package/src/engine/worker-tools.ts +5 -0
- package/src/entry/orchestrator.ts +26 -5
- package/src/entry/plugin-reload.ts +18 -0
- package/src/interactive/application-controller.ts +67 -21
- package/src/interactive/chat-loop.ts +32 -5
- package/src/interactive/chat-panel.ts +5 -1
- package/src/interactive/clio-editor.ts +53 -21
- package/src/interactive/command-output.ts +56 -1
- package/src/interactive/editor-submit.ts +65 -28
- package/src/interactive/fleet-run-preview.ts +2 -0
- package/src/interactive/follow-up-queue-panel.ts +3 -3
- package/src/interactive/footer/dashboard.ts +4 -1
- package/src/interactive/footer/notifications.ts +2 -2
- package/src/interactive/footer/widgets.ts +2 -2
- package/src/interactive/interactive-application.ts +209 -21
- package/src/interactive/interactive-input-runtime.ts +254 -7
- package/src/interactive/interactive-presentation.ts +41 -12
- package/src/interactive/interactive-slash-runtime.ts +37 -8
- package/src/interactive/keybinding-manager.ts +156 -79
- package/src/interactive/keyboard-owner.ts +37 -0
- package/src/interactive/leader-key.ts +49 -102
- package/src/interactive/leader-menu.ts +45 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +9 -1
- package/src/interactive/overlay-frame.ts +15 -0
- package/src/interactive/overlay-key-routing.ts +46 -47
- package/src/interactive/overlay-lifecycle.ts +30 -15
- package/src/interactive/overlay-resource-openers.ts +56 -46
- package/src/interactive/overlays/ask-user.ts +630 -556
- package/src/interactive/overlays/extension-panel.ts +70 -0
- package/src/interactive/overlays/extensions.ts +28 -5
- package/src/interactive/overlays/fleet-run-approval.ts +7 -3
- package/src/interactive/overlays/help-reference.ts +89 -40
- package/src/interactive/overlays/interop.ts +122 -3
- package/src/interactive/overlays/keybinding-detail.ts +2 -2
- package/src/interactive/overlays/library-lifecycle.ts +90 -0
- package/src/interactive/overlays/library-model.ts +574 -0
- package/src/interactive/overlays/library-review.ts +557 -0
- package/src/interactive/overlays/library-tabs.ts +3 -15
- package/src/interactive/overlays/library.ts +602 -0
- package/src/interactive/overlays/list-overlay.ts +218 -39
- package/src/interactive/overlays/model-selector.ts +28 -25
- package/src/interactive/overlays/session-selector.ts +9 -3
- package/src/interactive/overlays/settings.ts +25 -18
- package/src/interactive/overlays/tree-selector.ts +16 -11
- package/src/interactive/permission-hint.ts +13 -0
- package/src/interactive/permission-overlay.ts +77 -28
- package/src/interactive/prompt-source-label.ts +21 -0
- package/src/interactive/renderers/reference-card.ts +35 -0
- package/src/interactive/renderers/worker-entry.ts +35 -3
- package/src/interactive/slash-autocomplete.ts +99 -1
- package/src/interactive/slash-commands.ts +390 -67
- package/src/interactive/slash-spec.ts +0 -1
- package/src/interactive/terminal-lease.ts +44 -12
- package/src/interactive/turn-queues.ts +8 -7
- package/src/interactive/turn-runtime.ts +1 -1
- package/src/interactive/view/view-overlay.ts +19 -14
- package/src/interactive/welcome-dashboard.ts +525 -408
- package/src/tools/bootstrap.ts +8 -0
- package/src/tools/builtin-tool-catalog.ts +7 -2
- package/src/tools/context/index.ts +58 -5
- package/src/tools/context/library.ts +465 -0
- package/src/tools/context/surface.ts +20 -6
- package/src/tools/core-bootstrap.ts +3 -0
- package/src/tools/dispatch-admission.ts +24 -1
- package/src/tools/dispatch-arguments.ts +8 -0
- package/src/tools/dispatch-plan.ts +32 -0
- package/src/tools/dispatch-schema.ts +31 -1
- package/src/tools/dispatch-types.ts +3 -0
- package/src/tools/dispatch.ts +1 -1
- package/src/tools/harness-extensions.ts +169 -0
- package/src/tools/observation.ts +4 -0
- package/src/tools/policy.ts +7 -1
- package/src/tools/registry.ts +19 -1
- package/src/tools/worker-evidence.ts +5 -0
- package/src/worker/context-seed.ts +192 -0
- package/src/worker/entry.ts +1 -0
- package/src/worker/spec-contract.ts +8 -1
- package/dist/chunk-3UW3KU4A.js +0 -21
- package/dist/chunk-536HXRFE.js +0 -1257
- package/dist/chunk-B3MOMLJ4.js +0 -433
- package/dist/chunk-CXQ37WJH.js +0 -45
- package/dist/chunk-KTFSFCVN.js +0 -46
- package/dist/chunk-QCOV5DFY.js +0 -911
- package/dist/chunk-QRFXEO6Y.js +0 -17
- package/dist/chunk-VAHLPXPY.js +0 -399
- package/dist/interop-RVCAYECG.js +0 -115
- package/dist/library-CTKZA7K3.js +0 -226
- package/dist/skills-OXFEAWMT.js +0 -510
- package/skills/README.md +0 -418
- package/skills/meta/find-skills/SKILL.md +0 -78
- package/skills/meta/find-skills/evals.md +0 -47
- package/src/domains/extensions/resource-path.ts +0 -27
- package/src/domains/lifecycle/migrations/2026-09-01-extension-install-digests.ts +0 -27
- package/src/interactive/overlays/agents.ts +0 -70
- package/src/interactive/overlays/library-install-confirm.ts +0 -152
- package/src/interactive/overlays/prompts.ts +0 -89
- package/src/interactive/overlays/skills-hub.ts +0 -615
- /package/{skills → library/skills}/coding/ast-grep/references/rule_reference.md +0 -0
- /package/{skills → library/skills}/coding/prototype/references/LOGIC.md +0 -0
- /package/{skills → library/skills}/coding/prototype/references/UI.md +0 -0
- /package/{skills → library/skills}/coding/tdd/references/mocking.md +0 -0
- /package/{skills → library/skills}/coding/tdd/references/tests.md +0 -0
- /package/{skills → library/skills}/context/context-handoff/scripts/new-handoff.sh +0 -0
- /package/{skills → library/skills}/git/branch-closeout/evals.md +0 -0
- /package/{skills → library/skills}/git/branch-closeout/references/closeout-checklist.md +0 -0
- /package/{skills → library/skills}/git/file-ticket/assets/issue-template.md +0 -0
- /package/{skills → library/skills}/git/file-ticket/evals.md +0 -0
- /package/{skills → library/skills}/git/file-ticket/references/issue-discovery.md +0 -0
- /package/{skills → library/skills}/git/fix-issue/evals.md +0 -0
- /package/{skills → library/skills}/git/fix-issue/references/diagnosis-and-rca.md +0 -0
- /package/{skills → library/skills}/git/resolve-merge-conflicts/references/conflict-matrix.md +0 -0
- /package/{skills → library/skills}/git/ship/assets/pr-template.md +0 -0
- /package/{skills → library/skills}/git/ship/evals.md +0 -0
- /package/{skills → library/skills}/git/ship/references/remote-and-branch-policy.md +0 -0
- /package/{skills → library/skills}/git/worktree-create/evals.md +0 -0
- /package/{skills → library/skills}/git/worktree-create/references/worktree-setup.md +0 -0
- /package/{skills → library/skills}/git/worktree-merge/evals.md +0 -0
- /package/{skills → library/skills}/git/worktree-merge/references/merge-strategies.md +0 -0
- /package/{skills → library/skills}/meta/clio-coder-test/references/harness.md +0 -0
- /package/{skills → library/skills}/meta/clio-coder-test/references/test-map.md +0 -0
- /package/{skills → library/skills}/planning/archify/evals.md +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ExtensionPanel } from "../../domains/extensions/public-api.js";
|
|
2
|
+
import { extensionPanelText } from "../../domains/extensions/runtime-schema.js";
|
|
3
|
+
import {
|
|
4
|
+
type Component,
|
|
5
|
+
matchesKey,
|
|
6
|
+
type OverlayHandle,
|
|
7
|
+
type TUI,
|
|
8
|
+
truncateToWidth,
|
|
9
|
+
wrapTextWithAnsi,
|
|
10
|
+
} from "../../engine/tui.js";
|
|
11
|
+
import { buildHint, showClioOverlayFrame } from "../overlay-frame.js";
|
|
12
|
+
|
|
13
|
+
/** Host-owned plain-text rendering. Extension code supplies no components or input handlers. */
|
|
14
|
+
export class ExtensionPanelView implements Component {
|
|
15
|
+
private offset = 0;
|
|
16
|
+
private text: string;
|
|
17
|
+
constructor(
|
|
18
|
+
panel: ExtensionPanel,
|
|
19
|
+
private valid: () => boolean,
|
|
20
|
+
private refresh: () => void,
|
|
21
|
+
private close: () => void = () => {},
|
|
22
|
+
) {
|
|
23
|
+
this.text = extensionPanelText(panel);
|
|
24
|
+
}
|
|
25
|
+
render(width: number): string[] {
|
|
26
|
+
if (!this.valid()) return [truncateToWidth("Extension panel expired. Close it and invoke the command again.", width)];
|
|
27
|
+
const lines = this.text.split("\n").flatMap((line) => wrapTextWithAnsi(line, Math.max(1, width)));
|
|
28
|
+
this.offset = Math.min(this.offset, Math.max(0, lines.length - 12));
|
|
29
|
+
return lines.slice(this.offset, this.offset + 12).map((line) => truncateToWidth(line, width));
|
|
30
|
+
}
|
|
31
|
+
handleInput(data: string): void {
|
|
32
|
+
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c")) {
|
|
33
|
+
this.close();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (matchesKey(data, "down") || matchesKey(data, "pageDown")) this.offset += 5;
|
|
37
|
+
if (matchesKey(data, "up") || matchesKey(data, "pageUp")) this.offset = Math.max(0, this.offset - 5);
|
|
38
|
+
this.refresh();
|
|
39
|
+
}
|
|
40
|
+
invalidate(): void {}
|
|
41
|
+
}
|
|
42
|
+
export function openExtensionPanel(
|
|
43
|
+
tui: TUI,
|
|
44
|
+
owner: string,
|
|
45
|
+
panel: ExtensionPanel,
|
|
46
|
+
valid: () => boolean,
|
|
47
|
+
onClose?: () => void,
|
|
48
|
+
): OverlayHandle {
|
|
49
|
+
let handle: OverlayHandle;
|
|
50
|
+
handle = showClioOverlayFrame(
|
|
51
|
+
tui,
|
|
52
|
+
new ExtensionPanelView(
|
|
53
|
+
panel,
|
|
54
|
+
valid,
|
|
55
|
+
() => tui.requestRender(),
|
|
56
|
+
() => {
|
|
57
|
+
if (onClose) onClose();
|
|
58
|
+
else handle.hide();
|
|
59
|
+
},
|
|
60
|
+
),
|
|
61
|
+
{
|
|
62
|
+
anchor: "center",
|
|
63
|
+
width: 88,
|
|
64
|
+
markerId: "extension-panel",
|
|
65
|
+
title: `Extension: ${owner}`,
|
|
66
|
+
footerHint: buildHint([{ key: "Up/Down", verb: "scroll" }]),
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
return handle;
|
|
70
|
+
}
|
|
@@ -17,12 +17,13 @@ export function openExtensionsOverlay(tui: TUI, ctx: SlashCommandContext, onClos
|
|
|
17
17
|
: !ext.enabled
|
|
18
18
|
? "disabled"
|
|
19
19
|
: ext.loadable
|
|
20
|
-
? "
|
|
20
|
+
? "eligible"
|
|
21
21
|
: `shadowed:${ext.overriddenBy ?? "higher"}`;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const runtime = ctx.operatorExtensions?.entries().find((entry) => entry.id === ext.id && entry.scope === ext.scope);
|
|
24
|
+
let meta = ext.runtime ? `${state}; runtime ${runtime?.state ?? "not started"}` : state;
|
|
25
|
+
if (state === "eligible") {
|
|
26
|
+
meta = clioTheme().fg("success", meta);
|
|
26
27
|
} else if (state === "disabled") {
|
|
27
28
|
meta = clioTheme().fg("dim", "disabled");
|
|
28
29
|
} else {
|
|
@@ -35,7 +36,7 @@ export function openExtensionsOverlay(tui: TUI, ctx: SlashCommandContext, onClos
|
|
|
35
36
|
id: ext.id,
|
|
36
37
|
label,
|
|
37
38
|
meta,
|
|
38
|
-
group: "
|
|
39
|
+
group: "Harness extensions",
|
|
39
40
|
detail: () => {
|
|
40
41
|
const lines = [
|
|
41
42
|
`# Extension: ${ext.id}`,
|
|
@@ -44,6 +45,28 @@ export function openExtensionsOverlay(tui: TUI, ctx: SlashCommandContext, onClos
|
|
|
44
45
|
`**Description:** ${ext.description}`,
|
|
45
46
|
`**State:** ${state}`,
|
|
46
47
|
];
|
|
48
|
+
if (ext.runtime) {
|
|
49
|
+
lines.push(
|
|
50
|
+
`**Operator runtime:** ${runtime?.state ?? "not started"}; generation ${runtime?.generation ?? 0}`,
|
|
51
|
+
"Runtime code executes on interactive startup/reload after installation. It has your user account's authority; it is not an OS sandbox.",
|
|
52
|
+
);
|
|
53
|
+
if (runtime?.reason) lines.push(runtime.reason);
|
|
54
|
+
if (runtime?.status) lines.push(`**Status:** ${runtime.status.text}`);
|
|
55
|
+
for (const command of ctx.operatorExtensions
|
|
56
|
+
?.commands(ctx.listPrompts().items.map((prompt) => prompt.name))
|
|
57
|
+
.filter((row) => row.extensionId === ext.id) ?? [])
|
|
58
|
+
lines.push(`/${command.invocation}: ${command.description} (${command.available ? "ready" : command.reason})`);
|
|
59
|
+
}
|
|
60
|
+
if (ext.capabilities?.tools.length)
|
|
61
|
+
lines.push(`**Tool evidence:** ${runtime?.toolEvidence ?? "registry binding unknown in this view"}`);
|
|
62
|
+
for (const reason of runtime?.newSessionReasons ?? []) lines.push(reason);
|
|
63
|
+
lines.push(`Manage this copy: clio-coder extensions enable|disable|remove ${ext.id} --${ext.scope}`);
|
|
64
|
+
if (ext.capabilities?.tools.length)
|
|
65
|
+
lines.push(
|
|
66
|
+
`**Command tools:** ${ext.capabilities.tools.map((tool) => tool.name).join(", ")}`,
|
|
67
|
+
"Restart the session after changes to refresh tool schemas.",
|
|
68
|
+
);
|
|
69
|
+
for (const diagnostic of ext.diagnostics) lines.push(`**${diagnostic.type}:** ${diagnostic.message}`);
|
|
47
70
|
if (ext.overriddenBy) {
|
|
48
71
|
lines.push(`**Overridden By:** ${ext.overriddenBy}`);
|
|
49
72
|
}
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
matchesKey,
|
|
18
18
|
type OverlayHandle,
|
|
19
19
|
type TUI,
|
|
20
|
-
truncateToWidth,
|
|
21
20
|
wrapTextWithAnsi,
|
|
22
21
|
} from "../../engine/tui.js";
|
|
23
22
|
import type { FleetRunPreview, FleetRunPreviewStep } from "../fleet-run-preview.js";
|
|
@@ -96,7 +95,7 @@ export function formatBudgetLine(preview: FleetRunPreview): string {
|
|
|
96
95
|
* Render the body. Waves in order, each step with its facts, then the argv a
|
|
97
96
|
* code step will actually run, and last the budget the run is admitted under.
|
|
98
97
|
*/
|
|
99
|
-
function formatFleetRunApprovalBody(subject: FleetRunApprovalSubject, width: number, scroll: number): string[] {
|
|
98
|
+
export function formatFleetRunApprovalBody(subject: FleetRunApprovalSubject, width: number, scroll: number): string[] {
|
|
100
99
|
const theme = clioTheme();
|
|
101
100
|
const contentWidth = Math.max(1, Math.floor(width));
|
|
102
101
|
const rows: string[] = [];
|
|
@@ -120,7 +119,12 @@ function formatFleetRunApprovalBody(subject: FleetRunApprovalSubject, width: num
|
|
|
120
119
|
rows.push(line);
|
|
121
120
|
}
|
|
122
121
|
if (step.argv !== undefined) {
|
|
123
|
-
rows.push(
|
|
122
|
+
rows.push(
|
|
123
|
+
...wrapTextWithAnsi(
|
|
124
|
+
theme.fg("dim", ` argv ${step.argv.map((arg) => JSON.stringify(arg)).join(" ")}`),
|
|
125
|
+
contentWidth,
|
|
126
|
+
),
|
|
127
|
+
);
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { ExtensionCommandRow } from "../../domains/extensions/operator-commands.js";
|
|
1
2
|
import type { OverlayHandle, TUI } from "../../engine/tui.js";
|
|
3
|
+
import { CLOSED_ACTION_ORDER, GLOBAL_ACTION_ORDER } from "../application-controller.js";
|
|
2
4
|
import type { ClioKeybindingManager } from "../keybinding-manager.js";
|
|
3
5
|
import { commandReference, SLASH_COMMAND_GROUPS } from "../slash-commands.js";
|
|
4
6
|
import { formatKeybindingDetailBodyLines } from "./keybinding-detail.js";
|
|
@@ -25,6 +27,7 @@ export function openHelpOverlay(
|
|
|
25
27
|
manager: ClioKeybindingManager,
|
|
26
28
|
onClose: () => void,
|
|
27
29
|
initialFilter?: string,
|
|
30
|
+
extensionCommands: readonly ExtensionCommandRow[] = [],
|
|
28
31
|
): OverlayHandle {
|
|
29
32
|
// Commands are grouped by the verb they perform, in SLASH_COMMAND_GROUPS
|
|
30
33
|
// order, and keep registry order inside each group.
|
|
@@ -46,54 +49,92 @@ export function openHelpOverlay(
|
|
|
46
49
|
return item;
|
|
47
50
|
});
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
commands.push(
|
|
53
|
+
...extensionCommands.map((row) => ({
|
|
54
|
+
id: `extension:${row.invocation}`,
|
|
55
|
+
label: `/${row.invocation} ${row.description}`,
|
|
56
|
+
group: "Operator extensions",
|
|
57
|
+
meta: row.available ? "ready" : "unavailable",
|
|
58
|
+
detail: () => [
|
|
59
|
+
`# /${row.invocation}`,
|
|
60
|
+
`Owner: ${row.extensionId} (${row.scope}); operator generation ${row.generation}`,
|
|
61
|
+
row.available ? "Runs installed operator code; results stay local to you." : (row.reason ?? "Runtime unavailable"),
|
|
62
|
+
],
|
|
63
|
+
})),
|
|
64
|
+
);
|
|
54
65
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
const keyItems = (): ListOverlayItem[] => {
|
|
67
|
+
const conflicts = manager.getConflicts();
|
|
68
|
+
const keys: ListOverlayItem[] = manager.hotkeyEntries().map((row) => {
|
|
69
|
+
const formattedKeys = formatKey(manager.actionLabel(row.id));
|
|
70
|
+
const keysPart = formattedKeys.length >= 24 ? `${formattedKeys} ` : formattedKeys.padEnd(24);
|
|
71
|
+
const label = `${keysPart}${row.description}`;
|
|
72
|
+
|
|
73
|
+
const item: ListOverlayItem = {
|
|
74
|
+
id: row.id,
|
|
75
|
+
label,
|
|
76
|
+
group: "Keys",
|
|
77
|
+
detail: (width) => {
|
|
78
|
+
const warnings = manager
|
|
79
|
+
.platformWarnings()
|
|
80
|
+
.filter((w) => w.id === row.id)
|
|
81
|
+
.map((w) => `${w.keys.map(formatKey).join(" / ")} may not fire: ${w.reason}`);
|
|
82
|
+
for (const conflict of conflicts.filter((entry) => entry.keybindings.includes(row.id))) {
|
|
83
|
+
const appOrder = ["clio-coder.leader", ...CLOSED_ACTION_ORDER, ...GLOBAL_ACTION_ORDER].filter((id) =>
|
|
84
|
+
conflict.keybindings.includes(id),
|
|
85
|
+
);
|
|
86
|
+
warnings.push(
|
|
87
|
+
`${conflict.key}: ${conflict.keybindings.join(", ")}. Cancellation and the menu trigger take priority; outside the menu, the focused dialog owns input. Composer history precedes other application actions, then editing.${appOrder.length > 1 ? ` Composer app precedence: ${appOrder.join(" before ")}.` : ""}`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
const detailEntry = {
|
|
91
|
+
id: row.id,
|
|
92
|
+
keys: formattedKeys,
|
|
93
|
+
action: row.description,
|
|
94
|
+
source: row.source,
|
|
95
|
+
warnings,
|
|
96
|
+
};
|
|
97
|
+
return formatKeybindingDetailBodyLines(detailEntry, width);
|
|
98
|
+
},
|
|
99
|
+
};
|
|
74
100
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
101
|
+
const metaParts: string[] = [];
|
|
102
|
+
if (row.source === "user") metaParts.push("user");
|
|
103
|
+
const hasConflict = conflicts.some((c) => c.keybindings.includes(row.id));
|
|
104
|
+
if (hasConflict) metaParts.push("conflict");
|
|
105
|
+
if (metaParts.length > 0) {
|
|
106
|
+
item.meta = metaParts.join(", ");
|
|
107
|
+
}
|
|
82
108
|
|
|
83
|
-
|
|
84
|
-
|
|
109
|
+
return item;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
return keys;
|
|
113
|
+
};
|
|
85
114
|
|
|
86
115
|
// Static concept topics. Unlike commands and keys these are not generated
|
|
87
116
|
// from a registry; keep each detail consistent with the enforced behavior
|
|
88
117
|
// and with the live footer hints on the surface it documents.
|
|
89
118
|
const topics: ListOverlayItem[] = [
|
|
119
|
+
{
|
|
120
|
+
id: "topic-keyboard-migration",
|
|
121
|
+
label: "keyboard migration Defaults, action menu, editing and explicit overrides",
|
|
122
|
+
group: "Topics",
|
|
123
|
+
detail: () => [
|
|
124
|
+
"# Keyboard migration",
|
|
125
|
+
"Default keys: Alt+L Library, Alt+M model, Shift+Tab effort, Ctrl+Q follow-up, Alt+Q recovery. Alt+B/D and Home/End now edit the composer.",
|
|
126
|
+
`The persistent action menu is ${manager.actionLabel("clio-coder.leader")}. Fixed suffixes work independently of direct key overrides; arrows and Enter reach every available entry.`,
|
|
127
|
+
"Existing configured action IDs are preserved. Explicit [] disables an action's direct and menu routes. This help lists your effective keys; settings are never rewritten.",
|
|
128
|
+
"Pasted slash and bang text remains literal until a deliberate submit. Ctrl+R searches the fullscreen transcript; Ctrl+C closes focused search or a dialog before cancelling other work.",
|
|
129
|
+
],
|
|
130
|
+
},
|
|
90
131
|
{
|
|
91
132
|
id: "topic-fleet-runs",
|
|
92
133
|
label: `${"fleet runs & steering".padEnd(30)}Inspect, guide, and cancel delegated workers`,
|
|
93
134
|
group: "Topics",
|
|
94
135
|
detail: () => [
|
|
95
136
|
"# Fleet runs & steering",
|
|
96
|
-
|
|
137
|
+
`**Fleet Runs board**: ${manager.actionLabel("clio-coder.dispatchBoard.toggle")}. Use Up/Down or j/k to select a live or recent run.`,
|
|
97
138
|
"**Enter**: on a live run in a `--with-panes` session, Enter opens (or retargets) the watch pane beside Clio, rendering that run's stream; the arrow keys then move it between runs. On a finished run, or without panes, Enter toggles the inline worker-progress detail instead.",
|
|
98
139
|
"**Steer**: press `s` on a live native run to close the board and prefill `@<runId> `. Add guidance and submit it normally. The first notice means queued; a received notice confirms worker delivery.",
|
|
99
140
|
"**Cancel**: press `x` on a running, stale, queued, or retry-waiting run. The row changes to cancelling while the worker or retry is being stopped.",
|
|
@@ -108,7 +149,7 @@ export function openHelpOverlay(
|
|
|
108
149
|
detail: () => [
|
|
109
150
|
"# Panes & files",
|
|
110
151
|
"**Where it works**: a session started inside a herdr pane with `clio-coder --with-panes` (or `interface.panes.enabled: auto`). Outside herdr `/files` still works as a full-screen pick that returns to the composer; `/panes open logs|shell` do not.",
|
|
111
|
-
|
|
152
|
+
`**Files pane**: /files or ${manager.actionLabel("clio-coder.files.toggle")} opens Yazi from Clio focus. Yazi and the host own keys until Ctrl+Y returns selected paths and focus. Close the pane from Clio with the same action. /files pick borrows it for one selection.`,
|
|
112
153
|
"**Picking**: navigate, select with Space for several, then Ctrl+Y (or Enter in pick mode). The paths land in the composer as `@file` mentions and the keyboard returns to the composer.",
|
|
113
154
|
"**Logs and shell**: `/panes open logs` follows the newest dispatched run's journal; `/panes open shell` opens a shell in the workspace. A second open focuses the pane that is already there. `/panes close <name|all>` closes them; `/quit` closes the docks it manages (files, workers), leaves a shell or logs pane you opened, and prints which panes it left and how to close them.",
|
|
114
155
|
"**Engine**: the files pane runs a vendored file manager installed with `clio-coder tools install yazi`; `clio-coder doctor` and `/panes` say whether it resolved.",
|
|
@@ -122,10 +163,10 @@ export function openHelpOverlay(
|
|
|
122
163
|
"# Steering modes",
|
|
123
164
|
"While Clio is running, the key that submits a message chooses when it lands. The default is next slot.",
|
|
124
165
|
"**Next slot** (Enter): the message is delivered between tool batches, mid-run. The agent keeps going and reads it before its next model call.",
|
|
125
|
-
|
|
126
|
-
|
|
166
|
+
`**End of turn** (${manager.actionLabel("clio-coder.message.followUp")}): wait until the whole run settles, then start the next round.`,
|
|
167
|
+
`**Interrupt** (${manager.actionLabel("clio-coder.message.interrupt")} or /interrupt <text>): settle active work and deliver a fresh prompt. Queued messages return ahead of any newer draft.`,
|
|
127
168
|
"**Interrupt is refused** while an attached dispatch is running (the abort would kill the worker's run with no receipt; steer it with `@<agent>` or cancel it with Esc) and while a permission ask is parked (it is already waiting on you). In both cases the message is queued for the next slot and a notice says why.",
|
|
128
|
-
|
|
169
|
+
`**Recover queues**: ${manager.actionLabel("clio-coder.message.dequeue")}. Workers accept next-slot steering through @<agent>.`,
|
|
129
170
|
],
|
|
130
171
|
},
|
|
131
172
|
{
|
|
@@ -151,9 +192,9 @@ export function openHelpOverlay(
|
|
|
151
192
|
},
|
|
152
193
|
];
|
|
153
194
|
|
|
154
|
-
const items = [...commands, ...
|
|
195
|
+
const items = [...commands, ...keyItems(), ...topics];
|
|
155
196
|
|
|
156
|
-
|
|
197
|
+
const handle = openListOverlay(tui, {
|
|
157
198
|
markerId: "help",
|
|
158
199
|
title: "Help Center",
|
|
159
200
|
items,
|
|
@@ -161,4 +202,12 @@ export function openHelpOverlay(
|
|
|
161
202
|
...(initialFilter ? { initialFilter } : {}),
|
|
162
203
|
onClose,
|
|
163
204
|
});
|
|
205
|
+
const unsubscribe = manager.onReload(() => handle.setItems([...commands, ...keyItems(), ...topics]));
|
|
206
|
+
return {
|
|
207
|
+
...handle,
|
|
208
|
+
hide() {
|
|
209
|
+
unsubscribe();
|
|
210
|
+
handle.hide();
|
|
211
|
+
},
|
|
212
|
+
};
|
|
164
213
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { InteropAgentId, InteropContract, InteropProposal, InteropReport } from "../../domains/interop/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type AdoptionKind,
|
|
4
|
+
applyInteropAdoption,
|
|
5
|
+
detectInteropAgents,
|
|
6
|
+
INHERITED_PROJECT_CONTEXT,
|
|
7
|
+
type InteropAdoptionPlan,
|
|
8
|
+
planInteropAdoption,
|
|
9
|
+
renderProposalEntry,
|
|
10
|
+
} from "../../domains/interop/index.js";
|
|
3
11
|
import type { OverlayHandle, TUI } from "../../engine/tui.js";
|
|
4
12
|
import type { SlashCommandContext } from "../slash-commands.js";
|
|
5
13
|
import { clioTheme } from "../theme/index.js";
|
|
@@ -9,6 +17,7 @@ import { type ListOverlayHandle, type ListOverlayItem, openListOverlay } from ".
|
|
|
9
17
|
export const INTEROP_EMPTY =
|
|
10
18
|
"no other coding agents detected on this machine. install one, then `/interop` proposes it as a delegation peer.";
|
|
11
19
|
|
|
20
|
+
const GROUP_INVENTORY = "Inventory";
|
|
12
21
|
const GROUP_DETECTED = "Detected";
|
|
13
22
|
const GROUP_CONFIGURED = "Configured";
|
|
14
23
|
const GROUP_DECLINED = "Declined";
|
|
@@ -101,14 +110,83 @@ function buildItems(deps: InteropOverlayDeps): ListOverlayItem[] {
|
|
|
101
110
|
detail: () => [`# ${agent.kind}`, "Declined. Clio proposes it again when its binary version or path changes."],
|
|
102
111
|
});
|
|
103
112
|
}
|
|
113
|
+
for (const agent of report?.agents ?? []) {
|
|
114
|
+
if (!agent.inventory) continue;
|
|
115
|
+
const counts = agent.inventory.items.reduce<Record<string, number>>((out, item) => {
|
|
116
|
+
out[item.kind] = (out[item.kind] ?? 0) + 1;
|
|
117
|
+
return out;
|
|
118
|
+
}, {});
|
|
119
|
+
items.push({
|
|
120
|
+
id: `inventory:${agent.kind}`,
|
|
121
|
+
label: agent.kind,
|
|
122
|
+
group: GROUP_INVENTORY,
|
|
123
|
+
meta: `${agent.inventory.items.length} resources`,
|
|
124
|
+
detail: () => [
|
|
125
|
+
`# What would you like to adopt from ${agent.kind}?`,
|
|
126
|
+
`Presence: ${agent.presence}. Version: ${agent.version ?? "unknown"}. Inventory: ${agent.inventory?.status}.`,
|
|
127
|
+
...Object.entries(counts).map(([kind, count]) => `${count} ${kind}`),
|
|
128
|
+
"Press i to review an adoption plan. Press p for project destination, u for user, c to change the kind filter.",
|
|
129
|
+
...(agent.inventory?.items.map((item) => `${item.scope} ${item.kind}: ${item.name}`) ?? []),
|
|
130
|
+
...(agent.inventory?.diagnostics ?? []),
|
|
131
|
+
],
|
|
132
|
+
});
|
|
133
|
+
}
|
|
104
134
|
return items;
|
|
105
135
|
}
|
|
106
136
|
|
|
107
137
|
export function openInteropOverlay(tui: TUI, ctx: SlashCommandContext, onClose: () => void): OverlayHandle {
|
|
138
|
+
let closed = false;
|
|
139
|
+
let fresh: InteropReport | undefined;
|
|
140
|
+
let pending: InteropAdoptionPlan | undefined;
|
|
141
|
+
let scope: "user" | "project" = "user";
|
|
142
|
+
let filter: AdoptionKind | undefined;
|
|
108
143
|
const surface = ctx.interop;
|
|
109
144
|
const deps: InteropOverlayDeps = surface
|
|
110
145
|
? { ...surface, onClose }
|
|
111
146
|
: { report: () => null, proposals: () => [], configured: () => [], accept: () => {}, decline: () => {}, onClose };
|
|
147
|
+
const originalReport = deps.report;
|
|
148
|
+
deps.report = () => fresh ?? originalReport();
|
|
149
|
+
const close = (): void => {
|
|
150
|
+
closed = true;
|
|
151
|
+
pending = undefined;
|
|
152
|
+
onClose();
|
|
153
|
+
};
|
|
154
|
+
const reset = (): void => {
|
|
155
|
+
pending = undefined;
|
|
156
|
+
handle.setItems(buildItems(deps));
|
|
157
|
+
};
|
|
158
|
+
const preview = (item: ListOverlayItem): void => {
|
|
159
|
+
const host = item.id.replace(/^inventory:/, "") as InteropAgentId;
|
|
160
|
+
const inventory = deps.report()?.agents.find((agent) => agent.kind === host)?.inventory;
|
|
161
|
+
if (!inventory) return;
|
|
162
|
+
pending = planInteropAdoption({ host, inventory, scope, ...(filter ? { kind: filter } : {}) });
|
|
163
|
+
handle.setItems([
|
|
164
|
+
{
|
|
165
|
+
id: "approval",
|
|
166
|
+
label: `Adopt ${pending.entries.filter((entry) => entry.action === "install").length} resources?`,
|
|
167
|
+
meta: scope,
|
|
168
|
+
detail: () => [
|
|
169
|
+
"# Install this reviewed plan?",
|
|
170
|
+
"Press y to approve. Press b to return without installing.",
|
|
171
|
+
"Host files are unchanged. Foreign resources keep the project-import trust gate.",
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
...pending.entries.map((entry, index) => ({
|
|
175
|
+
id: `plan:${index}`,
|
|
176
|
+
label: `${entry.action}: ${entry.item.name}`,
|
|
177
|
+
meta: entry.item.kind,
|
|
178
|
+
detail: () => [
|
|
179
|
+
`# ${entry.action} ${entry.item.name}`,
|
|
180
|
+
`Source: ${entry.item.path}`,
|
|
181
|
+
`Source scope: ${entry.item.scope}`,
|
|
182
|
+
...(entry.destination ? [`Destination: ${entry.destination}`, `SHA-256: ${entry.digest}`] : []),
|
|
183
|
+
entry.reason,
|
|
184
|
+
...(entry.requirements?.length ? [`Requires installed packages: ${entry.requirements.join(", ")}`] : []),
|
|
185
|
+
...(entry.omitted ?? []).map((file) => `Skip ${file}: executable, host-specific, or non-text data.`),
|
|
186
|
+
],
|
|
187
|
+
})),
|
|
188
|
+
]);
|
|
189
|
+
};
|
|
112
190
|
const decide = (item: ListOverlayItem, action: (kind: InteropAgentId) => void): void => {
|
|
113
191
|
if (item.group !== GROUP_DETECTED) return;
|
|
114
192
|
action(item.id as InteropAgentId);
|
|
@@ -121,20 +199,61 @@ export function openInteropOverlay(tui: TUI, ctx: SlashCommandContext, onClose:
|
|
|
121
199
|
|
|
122
200
|
const handle: ListOverlayHandle = openListOverlay(tui, {
|
|
123
201
|
markerId: "interop",
|
|
124
|
-
title: "
|
|
202
|
+
title: "What would you like to adopt or connect?",
|
|
125
203
|
items: buildItems(deps),
|
|
126
204
|
filterable: true,
|
|
205
|
+
explicitSearch: true,
|
|
127
206
|
layout: "split",
|
|
128
207
|
emptyMessage: INTEROP_EMPTY,
|
|
129
208
|
hints: [
|
|
209
|
+
{ key: "c", verb: "kind filter" },
|
|
210
|
+
{ key: "i", verb: "plan adoption" },
|
|
211
|
+
{ key: "y", verb: "approve plan" },
|
|
212
|
+
{ key: "b", verb: "back" },
|
|
130
213
|
{ key: "a", verb: "connect" },
|
|
131
214
|
{ key: "d", verb: "decline" },
|
|
132
215
|
],
|
|
133
216
|
actions: {
|
|
217
|
+
i: preview,
|
|
218
|
+
p: () => {
|
|
219
|
+
scope = "project";
|
|
220
|
+
reset();
|
|
221
|
+
ctx.notice("info", "Adoption destination: project.");
|
|
222
|
+
},
|
|
223
|
+
u: () => {
|
|
224
|
+
scope = "user";
|
|
225
|
+
reset();
|
|
226
|
+
ctx.notice("info", "Adoption destination: user.");
|
|
227
|
+
},
|
|
228
|
+
c: () => {
|
|
229
|
+
const kinds: Array<AdoptionKind | undefined> = [undefined, "skill", "agent", "prompt", "plugin"];
|
|
230
|
+
filter = kinds[(kinds.indexOf(filter) + 1) % kinds.length];
|
|
231
|
+
reset();
|
|
232
|
+
ctx.notice("info", `Adoption kind: ${filter ?? "all"}.`);
|
|
233
|
+
},
|
|
234
|
+
b: reset,
|
|
235
|
+
y: () => {
|
|
236
|
+
if (!pending) return;
|
|
237
|
+
const plan = pending;
|
|
238
|
+
pending = undefined;
|
|
239
|
+
const result = applyInteropAdoption(plan, true);
|
|
240
|
+
for (const id of result.installed) ctx.notice("info", `Installed ${id}.`);
|
|
241
|
+
for (const diagnostic of result.diagnostics) ctx.notice("warn", diagnostic);
|
|
242
|
+
reset();
|
|
243
|
+
},
|
|
134
244
|
a: (item) => decide(item, deps.accept),
|
|
135
245
|
d: (item) => decide(item, deps.decline),
|
|
136
246
|
},
|
|
137
|
-
onClose,
|
|
247
|
+
onClose: close,
|
|
138
248
|
});
|
|
249
|
+
void detectInteropAgents({ inventory: true, probeVersion: true })
|
|
250
|
+
.then((report) => {
|
|
251
|
+
if (closed) return;
|
|
252
|
+
fresh = report;
|
|
253
|
+
if (!pending) handle.setItems(buildItems(deps));
|
|
254
|
+
})
|
|
255
|
+
.catch((error) => {
|
|
256
|
+
if (!closed) ctx.notice("warn", `Inventory unavailable: ${String(error)}`);
|
|
257
|
+
});
|
|
139
258
|
return handle;
|
|
140
259
|
}
|
|
@@ -72,12 +72,12 @@ export function formatKeybindingDetailBodyLines(entry: KeybindingDetailEntry, co
|
|
|
72
72
|
lines.push("");
|
|
73
73
|
for (const detail of row(
|
|
74
74
|
"Change",
|
|
75
|
-
"Edit settings.yaml under keybindings
|
|
75
|
+
"Edit settings.yaml under interface.keybindings; changes reload live. [] disables direct and leader access; commands remain. Fixed leader suffixes do not follow direct remaps.",
|
|
76
76
|
contentWidth,
|
|
77
77
|
)) {
|
|
78
78
|
lines.push(detail);
|
|
79
79
|
}
|
|
80
|
-
if (entry.id.startsWith("clio.")) {
|
|
80
|
+
if (entry.id.startsWith("clio-coder.")) {
|
|
81
81
|
const example = `${entry.id}: "alt+<key>"`;
|
|
82
82
|
lines.push(...row("Example", example, contentWidth));
|
|
83
83
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The browser's binding to the package lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* The overlay never calls a writer directly. It builds a plan, renders it, and
|
|
5
|
+
* either applies or releases it, which is what keeps "cancel wrote nothing" a
|
|
6
|
+
* property of the code rather than a promise in a docstring.
|
|
7
|
+
*
|
|
8
|
+
* Types and functions come from `src/domains/resources` unchanged. The UI adds
|
|
9
|
+
* no lifecycle semantics of its own: no second planner, no fallback writer, and
|
|
10
|
+
* no shape it maintains in parallel with the domain.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type {
|
|
14
|
+
LibraryApplyResult,
|
|
15
|
+
LibraryLifecyclePlan,
|
|
16
|
+
LibraryLifecycleRequest,
|
|
17
|
+
LibraryRefreshHost,
|
|
18
|
+
LibraryRefreshResult,
|
|
19
|
+
} from "../../domains/resources/index.js";
|
|
20
|
+
import {
|
|
21
|
+
applyLibraryLifecycle,
|
|
22
|
+
planLibraryLifecycle,
|
|
23
|
+
releaseLibraryLifecycle,
|
|
24
|
+
retryLibraryRefresh,
|
|
25
|
+
} from "../../domains/resources/index.js";
|
|
26
|
+
|
|
27
|
+
export type {
|
|
28
|
+
LibraryApplyResult,
|
|
29
|
+
LibraryLifecyclePlan,
|
|
30
|
+
LibraryLifecycleRequest,
|
|
31
|
+
LibraryOperation,
|
|
32
|
+
LibraryPackageIdentity,
|
|
33
|
+
LibraryPlanStep,
|
|
34
|
+
LibraryRefreshHost,
|
|
35
|
+
LibraryRefreshResult,
|
|
36
|
+
LibraryStepOutcome,
|
|
37
|
+
} from "../../domains/resources/index.js";
|
|
38
|
+
|
|
39
|
+
/** What the browser needs from the lifecycle domain, and nothing more. */
|
|
40
|
+
export interface LibraryLifecyclePort {
|
|
41
|
+
plan(request: LibraryLifecycleRequest): LibraryLifecyclePlan;
|
|
42
|
+
apply(plan: LibraryLifecyclePlan): LibraryApplyResult;
|
|
43
|
+
/** Cancel: release staged sources, write nothing. */
|
|
44
|
+
release(plan: LibraryLifecyclePlan): void;
|
|
45
|
+
/** Refresh only. Never repeats a committed install or removal. */
|
|
46
|
+
retryRefresh(cwd: string): LibraryRefreshResult;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Bind the port for an interactive session.
|
|
51
|
+
*
|
|
52
|
+
* `refresh` is the active host's resource reload. It runs once after the last
|
|
53
|
+
* committed step and its result is reported separately, so a failed refresh
|
|
54
|
+
* never restates a successful write as a failure, and retrying it never
|
|
55
|
+
* re-applies the plan.
|
|
56
|
+
*/
|
|
57
|
+
export function createLibraryLifecycle(refresh: LibraryRefreshHost): LibraryLifecyclePort {
|
|
58
|
+
return {
|
|
59
|
+
plan: (request) => planLibraryLifecycle(request),
|
|
60
|
+
apply: (plan) => applyLibraryLifecycle(plan, { refresh }),
|
|
61
|
+
release: (plan) => releaseLibraryLifecycle(plan),
|
|
62
|
+
retryRefresh: (cwd) => retryLibraryRefresh(cwd, refresh),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The active session's resource refresh, as a lifecycle refresh host.
|
|
68
|
+
*
|
|
69
|
+
* A session without a reload seam says so rather than reporting a refresh that
|
|
70
|
+
* never happened, and a reload that throws is a failed refresh beside committed
|
|
71
|
+
* writes that still stand.
|
|
72
|
+
*/
|
|
73
|
+
export function libraryRefreshHost(reload?: () => { generation: number }): LibraryRefreshHost {
|
|
74
|
+
if (!reload)
|
|
75
|
+
return () => ({
|
|
76
|
+
status: "not-applicable",
|
|
77
|
+
reason: "this session has no resource reload; restart to pick up installed changes",
|
|
78
|
+
});
|
|
79
|
+
let previous = 0;
|
|
80
|
+
return () => {
|
|
81
|
+
try {
|
|
82
|
+
const next = reload().generation;
|
|
83
|
+
const changed = previous === 0 || next !== previous;
|
|
84
|
+
previous = next;
|
|
85
|
+
return { status: "refreshed", generation: next, changed };
|
|
86
|
+
} catch (error) {
|
|
87
|
+
return { status: "failed", error: error instanceof Error ? error.message : String(error) };
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|