@pheem49/mint 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1012 -69
- package/Cargo.toml +5 -2
- package/LICENSE +21 -654
- package/README.md +92 -817
- package/Release_Note.md +53 -560
- package/apps/mint-companion/src-tauri/Cargo.toml +20 -0
- package/apps/mint-companion/src-tauri/build.rs +3 -0
- package/apps/mint-companion/src-tauri/src/main.rs +468 -0
- package/apps/mint-companion/tsconfig.json +20 -0
- package/apps/mint-companion/vite.config.ts +3 -0
- package/components.json +19 -0
- package/crates/mint-cli/Cargo.toml +6 -0
- package/crates/mint-cli/src/agent/live_status.rs +187 -39
- package/crates/mint-cli/src/agent.rs +323 -95
- package/crates/mint-cli/src/commands/agent.rs +69 -55
- package/crates/mint-cli/src/commands/integrations.rs +7 -0
- package/crates/mint-cli/src/commands/knowledge.rs +12 -32
- package/crates/mint-cli/src/commands/mod.rs +44 -0
- package/crates/mint-cli/src/image.rs +31 -33
- package/crates/mint-cli/src/interactive/chat_tui.rs +3594 -483
- package/crates/mint-cli/src/interactive/input_box.rs +56 -6
- package/crates/mint-cli/src/interactive/slash_commands.rs +208 -56
- package/crates/mint-cli/src/interactive/tool_activity.rs +328 -0
- package/crates/mint-cli/src/interactive.rs +64 -40
- package/crates/mint-cli/src/main.rs +13 -7
- package/crates/mint-cli/src/mcp.rs +5 -0
- package/crates/mint-cli/src/mod_host.rs +6 -0
- package/crates/mint-cli/src/mods_cli.rs +62 -0
- package/crates/mint-cli/src/mods_ui.rs +187 -0
- package/crates/mint-cli/src/onboard.rs +5 -31
- package/crates/mint-cli/src/terminal_theme.rs +3 -1
- package/crates/mint-cli/src/updater.rs +56 -2
- package/crates/mint-cli/tests/library_intake.rs +77 -0
- package/crates/mint-cli/tests/mods_testing.rs +133 -0
- package/crates/mint-companion-protocol/Cargo.toml +10 -0
- package/crates/mint-companion-protocol/src/lib.rs +163 -0
- package/crates/mint-core/Cargo.toml +6 -3
- package/crates/mint-core/build.rs +26 -0
- package/crates/mint-core/src/agent/chat.rs +167 -39
- package/crates/mint-core/src/agent/code_tools.rs +15 -0
- package/crates/mint-core/src/agent/memory/sources.rs +240 -0
- package/crates/mint-core/src/agent/memory.rs +147 -13
- package/crates/mint-core/src/agent/skill_inventory.rs +325 -0
- package/crates/mint-core/src/agent/skills.rs +437 -90
- package/crates/mint-core/src/agent.rs +1 -0
- package/crates/mint-core/src/api_server/routes/background_jobs.rs +310 -0
- package/crates/mint-core/src/api_server/routes/chat.rs +216 -199
- package/crates/mint-core/src/api_server/routes/html_preview.rs +77 -0
- package/crates/mint-core/src/api_server/routes/library.rs +97 -0
- package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
- package/crates/mint-core/src/api_server/routes/misc.rs +104 -107
- package/crates/mint-core/src/api_server/routes/mod.rs +6 -0
- package/crates/mint-core/src/api_server/routes/mods.rs +31 -0
- package/crates/mint-core/src/api_server/routes/sessions.rs +41 -0
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +12 -42
- package/crates/mint-core/src/api_server/routes/slash.rs +50 -1
- package/crates/mint-core/src/api_server/routes/sources.rs +101 -0
- package/crates/mint-core/src/api_server.rs +118 -9
- package/crates/mint-core/src/avatar_bridge.rs +11 -2
- package/crates/mint-core/src/browser/session.rs +52 -0
- package/crates/mint-core/src/companion.rs +716 -0
- package/crates/mint-core/src/cron/scheduler.rs +34 -2
- package/crates/mint-core/src/integrations/channels.rs +87 -345
- package/crates/mint-core/src/integrations/mcp.rs +397 -50
- package/crates/mint-core/src/integrations/mcp_calls.rs +823 -0
- package/crates/mint-core/src/integrations/mcp_catalog.rs +267 -0
- package/crates/mint-core/src/integrations/mcp_device.rs +319 -0
- package/crates/mint-core/src/integrations/mcp_result.rs +356 -0
- package/crates/mint-core/src/integrations/webhooks.rs +539 -0
- package/crates/mint-core/src/integrations.rs +2 -0
- package/crates/mint-core/src/lib.rs +85 -26
- package/crates/mint-core/src/media/gemini_live.rs +134 -14
- package/crates/mint-core/src/media/image_models.rs +3 -27
- package/crates/mint-core/src/media/image_workflow.rs +216 -0
- package/crates/mint-core/src/media/library/intake.rs +144 -0
- package/crates/mint-core/src/media/library/migration.rs +56 -0
- package/crates/mint-core/src/media/library/removal.rs +55 -0
- package/crates/mint-core/src/media/library/tests.rs +730 -0
- package/crates/mint-core/src/media/library/thumbnails.rs +72 -0
- package/crates/mint-core/src/media/library.rs +545 -0
- package/crates/mint-core/src/media/model_catalog.rs +375 -0
- package/crates/mint-core/src/media/pictures.rs +79 -222
- package/crates/mint-core/src/media/video_models.rs +3 -22
- package/crates/mint-core/src/media.rs +3 -0
- package/crates/mint-core/src/mods/manager.rs +1124 -0
- package/crates/mint-core/src/mods/mod.rs +569 -0
- package/crates/mint-core/src/mods/operations.rs +204 -0
- package/crates/mint-core/src/mods/session.rs +146 -0
- package/crates/mint-core/src/mods/slash.rs +59 -0
- package/crates/mint-core/src/mods/telemetry.rs +306 -0
- package/crates/mint-core/src/orchestration/approvals.rs +344 -0
- package/crates/mint-core/src/orchestration/context_render.rs +104 -0
- package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +104 -32
- package/crates/mint-core/src/orchestration/mod.rs +2139 -244
- package/crates/mint-core/src/orchestration/mod_authoring_regressions.rs +209 -0
- package/crates/mint-core/src/orchestration/progress_clock.rs +80 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +116 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +449 -0
- package/crates/mint-core/src/orchestration/run_control.rs +196 -0
- package/crates/mint-core/src/orchestration/tools/files.rs +161 -14
- package/crates/mint-core/src/orchestration/tools/media.rs +37 -41
- package/crates/mint-core/src/orchestration/tools/misc.rs +3 -2
- package/crates/mint-core/src/orchestration/tools/mod.rs +2 -0
- package/crates/mint-core/src/orchestration/tools/mods.rs +161 -0
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +303 -71
- package/crates/mint-core/src/orchestration/tools/shell.rs +95 -2
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +4 -1
- package/crates/mint-core/src/prompts/agent.rs +17 -2
- package/crates/mint-core/src/prompts/tool_catalog.rs +28 -2
- package/crates/mint-core/src/search/knowledge.rs +7 -1
- package/crates/mint-core/src/search/linked_folders/index.rs +177 -13
- package/crates/mint-core/src/search/linked_folders.rs +83 -2
- package/crates/mint-core/src/slash/catalog.rs +1 -1
- package/crates/mint-core/src/slash/mod.rs +174 -11
- package/crates/mint-core/src/slash/mods.rs +155 -0
- package/crates/mint-core/src/system/bg_shell.rs +1129 -95
- package/crates/mint-core/src/system/config.rs +5 -10
- package/crates/mint-core/src/system/html_preview.rs +398 -0
- package/crates/mint-core/src/system/mint_web.rs +164 -0
- package/crates/mint-core/src/system/release_notes.rs +18 -0
- package/crates/mint-core/src/system/shell.rs +21 -6
- package/crates/mint-core/src/system/workspace.rs +72 -8
- package/crates/mint-core/src/system/workspace_history.rs +604 -0
- package/crates/mint-core/src/system.rs +4 -0
- package/crates/mint-core/tests/background_retention.rs +34 -0
- package/crates/mint-core/tests/background_shutdown.rs +24 -0
- package/crates/mint-core/tests/library_http.rs +209 -0
- package/crates/mint-core/tests/mcp_contract.rs +283 -0
- package/crates/mint-core/tests/mcp_stdio.rs +11 -10
- package/crates/mint-core/tests/media_model_catalog_http.rs +403 -0
- package/crates/mint-core/tests/mods_http.rs +215 -0
- package/crates/mint-core/tests/terminal_shutdown.rs +109 -0
- package/crates/mint-mod-runtime/Cargo.toml +18 -0
- package/crates/mint-mod-runtime/src/lib.rs +507 -0
- package/crates/mint-mod-runtime/src/sdk.js +56 -0
- package/crates/mint-mod-runtime/src/test_sdk.js +32 -0
- package/crates/mint-mod-runtime/src/testing.rs +94 -0
- package/crates/mint-mod-runtime/tests/runtime.rs +156 -0
- package/docs/mods/AUTHORING.md +61 -0
- package/docs/mods/README.md +139 -0
- package/docs/mods/TESTING.md +56 -0
- package/docs/mods/mint-mods.d.ts +66 -0
- package/examples/device-mcp/README.md +22 -0
- package/examples/device-mcp/contract.md +49 -0
- package/examples/device-mcp/mock-device.mjs +66 -0
- package/examples/device-mcp/server.mjs +48 -0
- package/examples/device-mcp/server.test.mjs +78 -0
- package/examples/mods/task-checklist/README.md +1 -0
- package/examples/mods/task-checklist/main.ts +17 -0
- package/examples/mods/task-checklist/manifest.json +1 -0
- package/examples/mods/task-checklist/tests/checklist.test.ts +15 -0
- package/examples/mods/token-meter/README.md +1 -0
- package/examples/mods/token-meter/main.ts +8 -0
- package/examples/mods/token-meter/manifest.json +1 -0
- package/examples/mods/tool-guard/README.md +1 -0
- package/examples/mods/tool-guard/main.ts +9 -0
- package/examples/mods/tool-guard/manifest.json +1 -0
- package/out/web/assets/CliSessionsView-CtzUJpK_.css +1 -0
- package/out/web/assets/CliSessionsView-D7hw0Mgj.js +1 -0
- package/out/web/assets/CodeReviewPage-C7bEOJfd.js +4 -0
- package/out/web/assets/CodeReviewPage-Dte9uLiL.css +1 -0
- package/out/web/assets/CommandPalette-0RrF-AOT.js +1 -0
- package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +1 -0
- package/out/web/assets/LibraryPage--Qfisp6D.js +2 -0
- package/out/web/assets/LibraryPage-DAxUTAg7.css +1 -0
- package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +1 -0
- package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +1 -0
- package/out/web/assets/McpServersView-slfQJzNB.js +1 -0
- package/out/web/assets/MintDashboard-BSR5XpXh.js +25 -0
- package/out/web/assets/MintDashboard-CWUcCGhd.css +1 -0
- package/out/web/assets/PluginsView-l7LSm503.js +1 -0
- package/out/web/assets/ScheduledTasksView-CttmLbq1.js +1 -0
- package/out/web/assets/SettingsWindow-BCMLYvEV.js +4 -0
- package/out/web/assets/SettingsWindow-DcMVmU9u.css +1 -0
- package/out/web/assets/SkillsView-rNs1qr_U.js +2 -0
- package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +37 -0
- package/out/web/assets/ToolSurfacePage-CTfgggF2.css +1 -0
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +4 -0
- package/out/web/assets/WorkspaceSelector-B2xIp04D.js +1 -0
- package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +1 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-ByMyfanq.js → abnfDiagram-VCTEODGH-CD0CjoGl.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CLq2kEOB.js → architecture-7GRP2DOG-RKV83OeZ.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-6PoVSmNG.js → architectureDiagram-5GKGNRK7-nN_HAFct.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-cKw9mAKi.js → blockDiagram-NRAW4CY4-BrrqzHW5.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-Cqy8N5Ge.js → c4Diagram-UCG6FXSJ-DTdV8_zE.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-3qybijF5.js → chunk-75Z2AOVW-_M0z5olV.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-CndDQkww.js → chunk-CLGD4ZFX-D54yGvGS.js} +1 -1
- package/out/web/assets/{chunk-DSNCTWBM-Cc4NxvgD.js → chunk-DSNCTWBM-C-gvT2ru.js} +1 -1
- package/out/web/assets/{chunk-DU6HZSFF-drzh6GsU.js → chunk-DU6HZSFF-CnFngIhW.js} +1 -1
- package/out/web/assets/{chunk-F27PBJKO-FiY35l4v.js → chunk-F27PBJKO-BqtWrnEO.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-Bjt9Il4A.js → chunk-G27WJ6UU-Ckoq5mi2.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-Bppi3Ctd.js → chunk-GMAD6QVW-BuhEcgHq.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-DGg5kcEV.js → chunk-JQ64N6SF-CF8T7GiZ.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-CCYcjd7p.js → chunk-LCL6LL3I-BhXV9zyH.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-DJeNil5M.js → chunk-OBVCFTLP-CRIkunUB.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-lRzkRjBB.js → chunk-P2QGCYS3-UFEU6BxZ.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-DouASMBW.js → chunk-POPQ4Y6H-CQcrNbjr.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-DMmD1vVf.js → chunk-PWAF6VOD-Cc2uVDsG.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CYLA5UC5.js → chunk-R7TYR2AO-DiCxzdAY.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-BiXwEcUT.js → chunk-RHFEMEQ7-b7hnPmrR.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-BV-zPslF.js → chunk-SVP7TREG-Bu_yYb-V.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-B2RGEohZ.js → chunk-TEH6E4GO-G4Cdlyrt.js} +1 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +1 -0
- package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +1 -0
- package/out/web/assets/config-CnvCChUM.js +2 -0
- package/out/web/assets/config-DM6oIVO3.css +1 -0
- package/out/web/assets/core-DsKkQ7ig.js +1 -0
- package/out/web/assets/{cynefin-OW5HDTMX-Cas4csHM.js → cynefin-OW5HDTMX-CnzQfOGp.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-Bbpj66Y3.js → cynefinDiagram-5FMLGOSQ-DVtQnfpm.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-B0-2RDEd.js → dagre-3AP2YEHR-DG76_k5_.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-BdzEjUyH.js → diagram-S7CK7UJ4-CaouUoze.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-CJDwyPxF.js → diagram-UQ7AKVKN-B4bEc26B.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-BxaG1r_B.js → diagram-VSXAHHWV-BJ86Ov2Y.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-BMmUqm8f.js → diagram-VX7I27RA-7hH5IPYf.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-CFtd03eE.js → diagram-Z3DM3KII-CCM4clo8.js} +1 -1
- package/out/web/assets/dist-js-BkYNznHX.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-DwAen1hO.js → ebnfDiagram-PWID7BFC-Da7WAM3k.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-BCZSHACj.js → erDiagram-SSCWMZ5O-CzzmnZWT.js} +1 -1
- package/out/web/assets/{event-ChBVpRy0.js → event-Cdt7Byyj.js} +1 -1
- package/out/web/assets/{eventmodeling-NTZA5JFV-XHStE4E_.js → eventmodeling-NTZA5JFV-xcfsA0XD.js} +1 -1
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-BAEu1Cql.js → ganttDiagram-EL5Y4UJY-B3ClFGmL.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-r32Vyper.js → gitGraph-4MIJSDKK-BZ_y_cDU.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-z9o9qt6V.js → gitGraphDiagram-WWUBYQGX-drhRSYm3.js} +1 -1
- package/out/web/assets/index-BZ9xgmMP.css +1 -0
- package/out/web/assets/index-Ca8cCS4h.js +168 -0
- package/out/web/assets/{info-A6RAGUB7-BvLaC2cw.js → info-A6RAGUB7-B7I3K0F1.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-Be6WAXXw.js → infoDiagram-RXCK75RN-deX_1MPh.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-DZjoHJHC.js → ishikawaDiagram-5VMMS53U-s38yo28y.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-CtVkjkGm.js → journeyDiagram-EYS64GPL-CZn2kB8b.js} +1 -1
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-CW5FMv1w.js → kanban-definition-3QL26DDD-DodjgySL.js} +1 -1
- package/out/web/assets/markdown-CMhYIcWB.js +39 -0
- package/out/web/assets/{mermaid-parser.core-aUgCqsZ5.js → mermaid-parser.core-Whu2rlJC.js} +3 -3
- package/out/web/assets/{mermaid.core-D57sEiSL.js → mermaid.core-CKyPo8VH.js} +4 -4
- package/out/web/assets/{mindmap-definition-FBJOCRG2-DAmSpM3a.js → mindmap-definition-FBJOCRG2-260WBDxZ.js} +1 -1
- package/out/web/assets/modelManager-CUaGWMWu.js +2 -0
- package/out/web/assets/{oauthManager-9jxicDWJ.js → oauthManager-DlNhXJr6.js} +1 -1
- package/out/web/assets/{packet-AYTQ26CC-DJ27iIoJ.js → packet-AYTQ26CC-CEeIRKRG.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-Bj3ii-gS.js → pegDiagram-XKGWAZYB-BYadI-KO.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-DG5mCUbc.js → pie-WAS4IAKB-D8uf4dh5.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-BrJLPnDA.js → pieDiagram-E7YTZNPT-CjSDy4hO.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-3x_TmF3j.js → quadrantDiagram-AXDQQJYC-B8D3gU5d.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-CrXaTTuV.js → radar-RG4KPBEZ-DZJxnokY.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-BpqMH9BE.js → railroad-74A4TZTK-DBysUiUi.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-DHI0uLlV.js → railroad-abnf-HS5TGJTU-CHWxoJYg.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-CQCb316y.js → railroad-ebnf-LZEXJU2U-DDv7X6bY.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-Ph1giKkH.js → railroad-peg-WCYAUIDC-DpfcYYNJ.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-BRq6wIxx.js → railroadDiagram-O6MQD6OU-CYtyv0t3.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DIJj6G1g.js → requirementDiagram-EFPCY7ZU-D2X-Ewik.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-DZajSryq.js → sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DxJCWyZS.js → sequenceDiagram-WJ2MYXX4-BvFLKtPd.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-k6voi8Vf.js → stateDiagram-HBIQ2CUA-Bx0GWeaY.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-igYhTjXB.js → swimlanes-XN3QIQJK-CCma0T7L.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-Dke2p93p.js → timeline-definition-24CTP7MA-iCRhhJ7C.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-hNELnXUs.js → treeView-Q6P3EWNA-DZ-y08qp.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-D2B6wDsx.js → treemap-WGGIJYW6-De0CxzMx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-CDkW7rUP.js → vennDiagram-4TSXK5OY-w_7aZ6xe.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-BECdXETi.js → wardley-WFR3VGLG-DT0y0xJ4.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-B5BycpQ4.js → wardleyDiagram-VM6X3IG4-DAdXELbQ.js} +1 -1
- package/out/web/assets/window-BJCVtyET.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-CtJS3b--.js → xychartDiagram-S5SC5T6Z-IZIXf3Vo.js} +1 -1
- package/out/web/index-web.html +3 -2
- package/out/web/index.html +3 -2
- package/package.json +71 -22
- package/shared-modules/.github/workflows/ci.yml +120 -0
- package/shared-modules/.github/workflows/update.yaml +28 -0
- package/slash-commands.json +7 -2
- package/src/bin/auto-build.js +66 -0
- package/src/bin/desktop.js +113 -0
- package/src/bin/desktop.test.js +113 -0
- package/src/bin/index.js +18 -25
- package/src/bin/index.test.js +89 -0
- package/src/bin/measure-effects.mjs +53 -0
- package/src/bin/package.test.js +28 -0
- package/src/bin/release-notes.test.js +84 -0
- package/src/bin/styles.test.js +20 -0
- package/src/bin/web.js +5 -0
- package/src/bin/web.test.js +39 -0
- package/src/renderer/index.html +0 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +33 -0
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +3 -2
- package/src/renderer/shared/components/AgentActivityTable.tsx +1 -1
- package/src/renderer/shared/components/ApprovalCard.test.tsx +24 -0
- package/src/renderer/shared/components/ApprovalCard.tsx +10 -3
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +88 -37
- package/src/renderer/shared/components/AuthGate.tsx +75 -39
- package/src/renderer/shared/components/BackgroundTerminals.tsx +181 -0
- package/src/renderer/shared/components/ChatCodeBlock.tsx +8 -4
- package/src/renderer/shared/components/ChatMessageItem.test.tsx +68 -0
- package/src/renderer/shared/components/ChatMessageItem.tsx +36 -16
- package/src/renderer/shared/components/ChatPanel.test.tsx +21 -0
- package/src/renderer/shared/components/ChatPanel.tsx +294 -272
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +4 -102
- package/src/renderer/shared/components/CliSessionsView.test.tsx +125 -0
- package/src/renderer/shared/components/CliSessionsView.tsx +61 -13
- package/src/renderer/shared/components/CodeReviewPage.tsx +111 -8
- package/src/renderer/shared/components/CollapsiblePasteInput.tsx +90 -0
- package/src/renderer/shared/components/ContextCompactionStatus.tsx +17 -0
- package/src/renderer/shared/components/DashboardSidebar.tsx +15 -128
- package/src/renderer/shared/components/DesktopTitlebar.tsx +45 -19
- package/src/renderer/shared/components/ErrorNotice.tsx +29 -0
- package/src/renderer/shared/components/FormattedMessage.tsx +11 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.css +86 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.test.tsx +24 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.tsx +85 -101
- package/src/renderer/shared/components/GlideSelect.css +138 -0
- package/src/renderer/shared/components/GlideSelect.d.ts +31 -0
- package/src/renderer/shared/components/GlideSelect.jsx +266 -0
- package/src/renderer/shared/components/ImageSearchCard.tsx +46 -56
- package/src/renderer/shared/components/ImageStudioPanel.tsx +9 -8
- package/src/renderer/shared/components/LibraryItemCard.tsx +72 -0
- package/src/renderer/shared/components/LibraryPage.tsx +165 -0
- package/src/renderer/shared/components/LibraryPreview.tsx +59 -0
- package/src/renderer/shared/components/McpServersView.tsx +27 -8
- package/src/renderer/shared/components/McpToolAllowlist.tsx +2 -4
- package/src/renderer/shared/components/McpToolResults.tsx +99 -0
- package/src/renderer/shared/components/MintDashboard.tsx +308 -770
- package/src/renderer/shared/components/ModSessionControls.tsx +8 -0
- package/src/renderer/shared/components/ModUi.test.tsx +65 -0
- package/src/renderer/shared/components/ModUi.tsx +26 -0
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +14 -7
- package/src/renderer/shared/components/ModsPanel.tsx +156 -0
- package/src/renderer/shared/components/ProgressActivity.tsx +17 -0
- package/src/renderer/shared/components/ReviewHistory.tsx +42 -0
- package/src/renderer/shared/components/RewindModal.tsx +5 -12
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +6 -12
- package/src/renderer/shared/components/ScheduledTasksView.tsx +7 -6
- package/src/renderer/shared/components/SelectField.test.tsx +27 -0
- package/src/renderer/shared/components/SelectField.tsx +38 -0
- package/src/renderer/shared/components/SessionSources.tsx +48 -0
- package/src/renderer/shared/components/SessionSourcesPopover.tsx +61 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +7 -6
- package/src/renderer/shared/components/Settings/AudioTab.tsx +8 -7
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +2 -2
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +33 -32
- package/src/renderer/shared/components/Settings/MemoryTab.test.tsx +37 -0
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +71 -31
- package/src/renderer/shared/components/Settings/NotificationsTab.test.tsx +15 -0
- package/src/renderer/shared/components/Settings/NotificationsTab.tsx +84 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +19 -11
- package/src/renderer/shared/components/SlashChoicePanel.tsx +88 -0
- package/src/renderer/shared/components/SlashSuggestions.test.tsx +33 -0
- package/src/renderer/shared/components/SlashSuggestions.tsx +38 -10
- package/src/renderer/shared/components/SourcesBlock.tsx +12 -20
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +32 -0
- package/src/renderer/shared/components/ToolSurfacePage.tsx +59 -11
- package/src/renderer/shared/components/ToolsPanelToggle.tsx +13 -0
- package/src/renderer/shared/components/VeoStudioPanel.tsx +9 -8
- package/src/renderer/shared/components/ViewedImages.tsx +36 -0
- package/src/renderer/shared/components/VirtualChatHistory.tsx +82 -0
- package/src/renderer/shared/components/VoicePill.css +85 -0
- package/src/renderer/shared/components/VoicePill.d.ts +12 -0
- package/src/renderer/shared/components/VoicePill.jsx +190 -0
- package/src/renderer/shared/components/VoicePill.test.tsx +22 -0
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +20 -15
- package/src/renderer/shared/components/WorkspacePaneResizer.tsx +92 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.test.tsx +44 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.tsx +19 -0
- package/src/renderer/shared/components/WorkspaceSelector.tsx +13 -8
- package/src/renderer/shared/components/background-terminals.css +292 -0
- package/src/renderer/shared/components/ui/README.md +52 -0
- package/src/renderer/shared/components/ui/button.tsx +37 -0
- package/src/renderer/shared/components/ui/demo.tsx +26 -0
- package/src/renderer/shared/components/ui/error-recovery.css +35 -0
- package/src/renderer/shared/components/ui/error-recovery.tsx +35 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.css +6 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.tsx +374 -0
- package/src/renderer/shared/components/workspace-selector.css +248 -0
- package/src/renderer/shared/constants/config.ts +30 -1
- package/src/renderer/shared/constants/slashCommands.ts +1 -1
- package/src/renderer/shared/conversation/lifecycle.test.ts +362 -0
- package/src/renderer/shared/conversation/lifecycle.ts +418 -0
- package/src/renderer/shared/conversation/projectNavigation.test.ts +105 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +39 -0
- package/src/renderer/shared/conversation/sourcesTransport.ts +27 -0
- package/src/renderer/shared/conversation/syncView.test.ts +1 -34
- package/src/renderer/shared/conversation/syncView.ts +0 -37
- package/src/renderer/shared/conversation/transport.test.ts +163 -0
- package/src/renderer/shared/conversation/transport.ts +159 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +30 -72
- package/src/renderer/shared/css/agent-observability.css +20 -21
- package/src/renderer/shared/css/auth-gate.css +112 -13
- package/src/renderer/shared/css/code-review.css +33 -0
- package/src/renderer/shared/css/code-sessions.css +27 -0
- package/src/renderer/shared/css/collapsed-paste.css +35 -0
- package/src/renderer/shared/css/effects.css +15 -0
- package/src/renderer/shared/css/error-notice.css +60 -0
- package/src/renderer/shared/css/library.css +476 -0
- package/src/renderer/shared/css/management-views.css +138 -0
- package/src/renderer/shared/css/mcp-results.css +11 -0
- package/src/renderer/shared/css/model-selector.css +163 -105
- package/src/renderer/shared/css/mods.css +77 -0
- package/src/renderer/shared/css/notification-notice.css +28 -0
- package/src/renderer/shared/css/session-sources-popover.css +9 -0
- package/src/renderer/shared/css/session-sources.css +23 -0
- package/src/renderer/shared/css/settings/memory.css +154 -0
- package/src/renderer/shared/css/settings/notifications.css +11 -0
- package/src/renderer/shared/css/settings/theme.css +5 -0
- package/src/renderer/shared/css/slash-choice.css +95 -0
- package/src/renderer/shared/css/slash-suggestions.css +68 -0
- package/src/renderer/shared/css/sources-block.css +91 -0
- package/src/renderer/shared/css/thinking-status.css +46 -0
- package/src/renderer/shared/css/tools-panel.css +7 -0
- package/src/renderer/shared/css/ui-tailwind.css +19 -0
- package/src/renderer/shared/css/viewed-images.css +15 -0
- package/src/renderer/shared/fonts.css +46 -0
- package/src/renderer/shared/fonts.ts +3 -12
- package/src/renderer/shared/lib/utils.ts +6 -0
- package/src/renderer/shared/library/controller.test.ts +61 -0
- package/src/renderer/shared/library/controller.ts +57 -0
- package/src/renderer/shared/library/transport.test.ts +26 -0
- package/src/renderer/shared/library/transport.ts +60 -0
- package/src/renderer/shared/library/useLibraryFile.ts +38 -0
- package/src/renderer/shared/mods.ts +58 -0
- package/src/renderer/shared/platform.test.ts +57 -1
- package/src/renderer/shared/platform.ts +46 -1
- package/src/renderer/shared/theme/themeManager.test.ts +43 -0
- package/src/renderer/shared/theme/themeManager.ts +17 -4
- package/src/renderer/shared/types.ts +56 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +75 -0
- package/src/renderer/shared/utils/agentActivity.ts +42 -3
- package/src/renderer/shared/utils/approval.tsx +7 -0
- package/src/renderer/shared/utils/artifactBrowser.test.ts +80 -0
- package/src/renderer/shared/utils/artifactBrowser.ts +41 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +48 -0
- package/src/renderer/shared/utils/contextCompaction.ts +21 -0
- package/src/renderer/shared/utils/effectVisibility.ts +9 -0
- package/src/renderer/shared/utils/markdown.tsx +3 -3
- package/src/renderer/shared/utils/mcpResults.test.tsx +91 -0
- package/src/renderer/shared/utils/modViewport.ts +7 -0
- package/src/renderer/shared/utils/nativeRecordingSession.test.ts +61 -0
- package/src/renderer/shared/utils/nativeRecordingSession.ts +46 -0
- package/src/renderer/shared/utils/notificationSettings.test.ts +14 -0
- package/src/renderer/shared/utils/notificationSettings.ts +23 -0
- package/src/renderer/shared/utils/notifications.test.ts +51 -0
- package/src/renderer/shared/utils/notifications.ts +54 -0
- package/src/renderer/shared/utils/pastedText.test.ts +20 -0
- package/src/renderer/shared/utils/pastedText.ts +13 -0
- package/src/renderer/shared/utils/progressCache.test.ts +32 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +31 -0
- package/src/renderer/shared/utils/sessionSources.ts +34 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +1 -1
- package/src/renderer/shared/utils/sourceAttachments.ts +28 -0
- package/src/renderer/shared/utils/speech.ts +51 -9
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +22 -0
- package/src/renderer/shared/utils/syntaxHighlight.tsx +26 -0
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +49 -5
- package/src/renderer/shared/utils/useLatestCallback.ts +9 -0
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +80 -72
- package/src/renderer/shared/utils/useSessionSources.ts +33 -0
- package/src/renderer/shared/utils/viewedImages.ts +26 -0
- package/src/renderer/shared/utils/workspacePane.test.ts +33 -0
- package/src/renderer/shared/utils/workspacePane.ts +20 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +24 -0
- package/src/renderer/shared/utils/workspacePreview.ts +16 -0
- package/src/renderer/shared/utils/workspaceSnapshot.test.ts +49 -0
- package/src/renderer/shared/utils/workspaceSnapshot.ts +26 -0
- package/src/renderer/shared/utils/workspaces.ts +10 -0
- package/src/renderer/shared/workspaceUndo.ts +88 -0
- package/src/renderer/src/App.tsx +9 -1
- package/src/renderer/src/components/LiveTranslateControls.tsx +65 -0
- package/src/renderer/src/components/PicturesLibrary.tsx +2 -288
- package/src/renderer/src/components/ScreenPicker.css +67 -30
- package/src/renderer/src/components/ScreenPicker.tsx +201 -60
- package/src/renderer/src/components/SettingsWindow.tsx +10 -5
- package/src/renderer/src/components/WorkspacePanel.tsx +222 -32
- package/src/renderer/src/components/browser-shell.css +1 -1
- package/src/renderer/src/components/browser-suggestions-popup.css +1 -1
- package/src/renderer/src/components/liveTranslateFrames.test.ts +26 -5
- package/src/renderer/src/components/liveTranslateFrames.ts +18 -7
- package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
- package/src/renderer/src/css/app-shell.css +52 -137
- package/src/renderer/src/css/chat.css +21 -495
- package/src/renderer/src/css/desktop-tools.css +199 -1
- package/src/renderer/src/css/misc.css +0 -52
- package/src/renderer/src/css/pictures.css +2 -415
- package/src/renderer/src/css/settings/base.css +50 -47
- package/src/renderer/src/css/sidebar-workspace.css +151 -94
- package/src/renderer/src/css/tool-surfaces.css +65 -9
- package/src/renderer/src/css/widget.css +1 -1
- package/src/renderer/src/env.d.ts +1 -9
- package/src/renderer/src/index.css +1 -1
- package/src/renderer/src/main.tsx +2 -1
- package/src/renderer/src/proactiveSuggestions.ts +29 -0
- package/src/renderer/src/tauri.ts +122 -330
- package/src/renderer/src/voiceInput.ts +2 -1
- package/src/renderer/src-web/components/PicturesLibrary.tsx +2 -285
- package/src/renderer/src-web/components/PullToRefresh.tsx +1 -1
- package/src/renderer/src-web/components/SettingsWindow.tsx +10 -5
- package/src/renderer/src-web/css/app-shell.css +24 -121
- package/src/renderer/src-web/css/chat.css +21 -495
- package/src/renderer/src-web/css/misc.css +0 -52
- package/src/renderer/src-web/css/mobile.css +15 -14
- package/src/renderer/src-web/css/pictures.css +2 -462
- package/src/renderer/src-web/css/settings/base.css +50 -47
- package/src/renderer/src-web/css/sidebar-workspace.css +9 -95
- package/src/renderer/src-web/css/widget.css +1 -1
- package/src/renderer/src-web/env.d.ts +1 -12
- package/src/renderer/src-web/index.css +1 -1
- package/src/renderer/src-web/main.tsx +2 -1
- package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
- package/src/renderer/src-web/tauri.ts +129 -354
- package/src/renderer/tests/backgroundTerminals.browser.html +81 -0
- package/src/renderer/tests/chatPanelFixture.ts +23 -0
- package/src/renderer/tests/chatPerformance.browser.html +71 -0
- package/src/renderer/tests/cliSessions.browser.html +82 -0
- package/src/renderer/tests/collapsedPaste.browser.html +70 -0
- package/src/renderer/tests/composerMenus.browser.html +116 -0
- package/src/renderer/tests/contextCompaction.browser.html +17 -0
- package/src/renderer/tests/conversationLifecycle.browser.html +70 -0
- package/src/renderer/tests/effectsPerformance.browser.html +13 -0
- package/src/renderer/tests/errorRecovery.browser.html +21 -0
- package/src/renderer/tests/glideSelect.browser.html +71 -0
- package/src/renderer/tests/glideSelect.preview.html +27 -0
- package/src/renderer/tests/library.browser.html +1 -0
- package/src/renderer/tests/library.browser.tsx +78 -0
- package/src/renderer/tests/liveOrb.browser.html +49 -0
- package/src/renderer/tests/liveVoice.browser.html +29 -0
- package/src/renderer/tests/modInput.browser.html +22 -0
- package/src/renderer/tests/sessionSources.browser.html +1 -0
- package/src/renderer/tests/sessionSources.browser.tsx +107 -0
- package/src/renderer/tests/skills.browser.html +24 -0
- package/src/renderer/tests/toolsPanel.browser.html +1 -0
- package/src/renderer/tests/toolsPanel.browser.tsx +113 -0
- package/src/renderer/tests/viewedImages.browser.html +1 -0
- package/src/renderer/tests/viewedImages.browser.tsx +93 -0
- package/src/renderer/tests/voicePill.browser.html +80 -0
- package/src/renderer/tests/voicePill.preview.html +34 -0
- package/src/renderer/tests/webSources.browser.html +1 -0
- package/src/renderer/tests/webSources.browser.tsx +98 -0
- package/src/renderer/tests/workspaceUndo.browser.html +92 -0
- package/src-tauri/Cargo.toml +40 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/src/app/lifecycle.rs +277 -0
- package/src-tauri/src/app/mod.rs +4 -0
- package/src-tauri/src/app/shortcuts.rs +40 -0
- package/src-tauri/src/app/tray.rs +52 -0
- package/src-tauri/src/background/events.rs +70 -0
- package/src-tauri/src/background/headless.rs +230 -0
- package/src-tauri/src/background/mod.rs +4 -0
- package/src-tauri/src/background/proactive.rs +262 -0
- package/src-tauri/src/commands/approvals.rs +20 -0
- package/src-tauri/src/commands/auth.rs +127 -0
- package/src-tauri/src/commands/conversation.rs +642 -0
- package/src-tauri/src/commands/integrations.rs +157 -0
- package/src-tauri/src/commands/media.rs +179 -0
- package/src-tauri/src/commands/mod.rs +11 -0
- package/src-tauri/src/commands/mods.rs +6 -0
- package/src-tauri/src/commands/settings.rs +141 -0
- package/src-tauri/src/commands/voice.rs +153 -0
- package/src-tauri/src/commands/workspace.rs +501 -0
- package/src-tauri/src/lib.rs +10 -0
- package/src-tauri/src/main.rs +3 -0
- package/src-tauri/src/native/actions.rs +206 -0
- package/src-tauri/src/native/browser.rs +252 -0
- package/src-tauri/src/native/capture.rs +695 -0
- package/src-tauri/src/native/discord_rpc.rs +99 -0
- package/src-tauri/src/native/integrations.rs +126 -0
- package/src-tauri/src/native/mod.rs +12 -0
- package/src-tauri/src/native/notifications.rs +51 -0
- package/src-tauri/src/native/plugins.rs +14 -0
- package/src-tauri/src/native/system.rs +250 -0
- package/src-tauri/src/native/terminal.rs +201 -0
- package/src-tauri/src/native/updater.rs +148 -0
- package/src-tauri/src/native/windows.rs +143 -0
- package/tsconfig.json +2 -0
- package/vite.config.ts +4 -1
- package/vite.config.web.ts +4 -0
- package/.cargo/config.toml +0 -13
- package/.claude/settings.local.json +0 -182
- package/.codex +0 -0
- package/CLAUDE.md +0 -102
- package/ROADMAP.md +0 -30
- package/mint-presentation-demo.mp4 +0 -0
- package/out/web/Live2DCubismCore.js +0 -9
- package/out/web/assets/CliSessionsView-BxUVWEEL.js +0 -1
- package/out/web/assets/CliSessionsView-CBDTXuQv.css +0 -1
- package/out/web/assets/CodeReviewPage-DkMgfcos.css +0 -1
- package/out/web/assets/CodeReviewPage-jKlmLJwT.js +0 -3
- package/out/web/assets/CommandPalette-DnwPA5hy.js +0 -1
- package/out/web/assets/ImageStudioPanel-BR1XFwhR.js +0 -1
- package/out/web/assets/LinkedFoldersView-bi-CWQ-I.js +0 -1
- package/out/web/assets/McpRegistryPicker-D5tEFnyq.js +0 -1
- package/out/web/assets/McpServersView-BGG1dhFM.js +0 -1
- package/out/web/assets/MintDashboard-BIglDEWX.js +0 -20
- package/out/web/assets/MintDashboard-DSMywSgs.css +0 -1
- package/out/web/assets/ModelPanel-CbJ1PFoZ.js +0 -1
- package/out/web/assets/PicturesLibrary-CQP0fLP1.css +0 -1
- package/out/web/assets/PicturesLibrary-DoYN7T1p.js +0 -1
- package/out/web/assets/PluginsView-CU1HWXGk.js +0 -1
- package/out/web/assets/ScheduledTasksView-Bnl36y2N.js +0 -1
- package/out/web/assets/SettingsWindow-DhWLAn9T.css +0 -1
- package/out/web/assets/SettingsWindow-Dw8L01pw.js +0 -2
- package/out/web/assets/SkillsView-cnl8aY5p.js +0 -2
- package/out/web/assets/ToolSurfacePage-CgsQw6l5.css +0 -1
- package/out/web/assets/ToolSurfacePage-Cz2VJAPZ.js +0 -37
- package/out/web/assets/VeoStudioPanel-D4JnERWR.js +0 -4
- package/out/web/assets/chunk-CKBBP62Z-cIrXq6jN.js +0 -2
- package/out/web/assets/classDiagram-DTDB5LWJ-Dq0smRWk.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-Dq0smRWk.js +0 -1
- package/out/web/assets/config-C-ZFtipU.css +0 -1
- package/out/web/assets/config-eEDngJXO.js +0 -1
- package/out/web/assets/core-hQ2VA9Ti.js +0 -1
- package/out/web/assets/dist-js-Bf2bhoku.js +0 -1
- package/out/web/assets/flowDiagram-A5DVABFB-BLg7nEcd.js +0 -1
- package/out/web/assets/index-Btsf4L8M.css +0 -1
- package/out/web/assets/index-D8D9MeRA.js +0 -11
- package/out/web/assets/lucide-react-Ip3L6Jtn.js +0 -1
- package/out/web/assets/markdown-BSeeUbJH.js +0 -38
- package/out/web/assets/modelManager-tMVmJVAW.js +0 -2
- package/out/web/assets/prompt-latin-400-normal-BQ9zjSN8.woff2 +0 -0
- package/out/web/assets/prompt-latin-400-normal-CxU4ec_r.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-B1edBDQ9.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-CxzxEHZc.woff2 +0 -0
- package/out/web/assets/prompt-latin-600-normal-CSDDLorv.woff +0 -0
- package/out/web/assets/prompt-latin-600-normal-hKZWXsc1.woff2 +0 -0
- package/out/web/assets/prompt-latin-700-normal-BfbftDSq.woff +0 -0
- package/out/web/assets/prompt-latin-700-normal-I2gc831J.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-BrkKv8cO.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-DJypnfr3.woff +0 -0
- package/out/web/assets/prompt-thai-500-normal-C18pDUoL.woff2 +0 -0
- package/out/web/assets/prompt-thai-500-normal-D7YNqUJD.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-CYPViXds.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-MrdfU7zR.woff2 +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cb5ilR-c.woff +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cg4aQ0Nn.woff2 +0 -0
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-DeEc0lGZ.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-DpVik9v7.js +0 -8
- package/out/web/assets/window-5qYXKoW7.js +0 -1
- package/skills-lock.json +0 -77
- package/src/renderer/public/Live2DCubismCore.js +0 -9
- package/src/renderer/src/companionWidget.ts +0 -95
- package/src/renderer/src/components/Live2DStage.tsx +0 -412
- package/src/renderer/src/components/ModelPanel.tsx +0 -155
- package/src/renderer/src/css/model.css +0 -628
- package/src/renderer/src-web/companionWidget.ts +0 -37
- package/src/renderer/src-web/components/ModelPanel.tsx +0 -12
- package/src/renderer/src-web/css/model.css +0 -628
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
//! Compact terminal tool cards, with unmodified input and output for review.
|
|
2
|
+
use mint_core::integrations::mcp_result::ToolStatus;
|
|
3
|
+
use ratatui::{
|
|
4
|
+
style::{Color, Style},
|
|
5
|
+
text::{Line, Span},
|
|
6
|
+
};
|
|
7
|
+
use serde_json::Value;
|
|
8
|
+
use std::time::{Duration, Instant};
|
|
9
|
+
use unicode_width::{UnicodeWidthChar, UnicodeWidthStr};
|
|
10
|
+
|
|
11
|
+
#[derive(Debug)]
|
|
12
|
+
pub(super) struct ToolActivity {
|
|
13
|
+
pub entry: usize,
|
|
14
|
+
pub call_id: Option<String>,
|
|
15
|
+
pub action: String,
|
|
16
|
+
pub input: Value,
|
|
17
|
+
pub subagent: Option<String>,
|
|
18
|
+
pub started: Instant,
|
|
19
|
+
pub elapsed: Option<Duration>,
|
|
20
|
+
pub result: Option<String>,
|
|
21
|
+
pub status: Option<ToolStatus>,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
impl ToolActivity {
|
|
25
|
+
pub fn running(&self) -> bool {
|
|
26
|
+
self.status.is_none()
|
|
27
|
+
}
|
|
28
|
+
pub fn shell(&self) -> bool {
|
|
29
|
+
matches!(
|
|
30
|
+
self.action.as_str(),
|
|
31
|
+
"run_shell" | "shell_output" | "kill_shell"
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
pub fn matches(
|
|
35
|
+
&self,
|
|
36
|
+
call_id: Option<&str>,
|
|
37
|
+
action: &str,
|
|
38
|
+
input: &Value,
|
|
39
|
+
subagent: Option<&str>,
|
|
40
|
+
) -> bool {
|
|
41
|
+
if let Some(id) = call_id {
|
|
42
|
+
self.call_id.as_deref() == Some(id) && self.subagent.as_deref() == subagent
|
|
43
|
+
} else {
|
|
44
|
+
self.action == action && self.input == *input && self.subagent.as_deref() == subagent
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
pub fn finish(&mut self, result: &str, status: Option<ToolStatus>) {
|
|
48
|
+
self.elapsed = Some(self.started.elapsed());
|
|
49
|
+
self.result = Some(result.to_owned());
|
|
50
|
+
self.status = Some(status.unwrap_or_else(|| {
|
|
51
|
+
if result
|
|
52
|
+
.trim_start()
|
|
53
|
+
.to_ascii_lowercase()
|
|
54
|
+
.starts_with("user denied")
|
|
55
|
+
{
|
|
56
|
+
return ToolStatus::Cancelled;
|
|
57
|
+
}
|
|
58
|
+
if result.lines().any(|line| {
|
|
59
|
+
line.strip_prefix("exit: ")
|
|
60
|
+
.is_some_and(|code| !matches!(code.trim(), "0" | "unknown"))
|
|
61
|
+
}) || ["error:", "blocked:", "blocked by hook:"]
|
|
62
|
+
.iter()
|
|
63
|
+
.any(|prefix| result.trim_start().to_ascii_lowercase().starts_with(prefix))
|
|
64
|
+
{
|
|
65
|
+
ToolStatus::Failed
|
|
66
|
+
} else {
|
|
67
|
+
ToolStatus::Success
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
pub fn heading(&self) -> String {
|
|
72
|
+
let name = if self.shell() {
|
|
73
|
+
"Shell".to_owned()
|
|
74
|
+
} else {
|
|
75
|
+
self.action.replace('_', " ")
|
|
76
|
+
};
|
|
77
|
+
let (icon, status) = match self.status {
|
|
78
|
+
None => ("●", "running"),
|
|
79
|
+
Some(ToolStatus::Success) => ("✓", "completed"),
|
|
80
|
+
Some(ToolStatus::Failed) => ("✗", "failed"),
|
|
81
|
+
Some(ToolStatus::TimedOut) => ("✗", "timed out"),
|
|
82
|
+
Some(ToolStatus::Cancelled)
|
|
83
|
+
if self
|
|
84
|
+
.result
|
|
85
|
+
.as_deref()
|
|
86
|
+
.is_some_and(|text| text.starts_with("Interrupted")) =>
|
|
87
|
+
{
|
|
88
|
+
("○", "interrupted")
|
|
89
|
+
}
|
|
90
|
+
Some(ToolStatus::Cancelled) => ("○", "cancelled"),
|
|
91
|
+
};
|
|
92
|
+
let elapsed = if self.running() {
|
|
93
|
+
Some(self.started.elapsed())
|
|
94
|
+
} else {
|
|
95
|
+
self.elapsed
|
|
96
|
+
};
|
|
97
|
+
let duration = elapsed
|
|
98
|
+
.map(|elapsed| format!("{:.1}s", elapsed.as_secs_f64()))
|
|
99
|
+
.unwrap_or_else(|| "time unavailable".into());
|
|
100
|
+
let mut title = format!("{icon} {name} {status} · {duration}");
|
|
101
|
+
if let Some(result) = &self.result {
|
|
102
|
+
let codes: Vec<_> = result
|
|
103
|
+
.lines()
|
|
104
|
+
.filter_map(|line| line.strip_prefix("exit: "))
|
|
105
|
+
.collect();
|
|
106
|
+
if !codes.is_empty() {
|
|
107
|
+
title.push_str(&format!(" · exit {}", codes.join(", ")));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if let Some(agent) = &self.subagent {
|
|
111
|
+
title.push_str(&format!(" · {agent}"));
|
|
112
|
+
}
|
|
113
|
+
title
|
|
114
|
+
}
|
|
115
|
+
pub fn subject(&self) -> String {
|
|
116
|
+
for key in [
|
|
117
|
+
"description",
|
|
118
|
+
"command",
|
|
119
|
+
"cmd",
|
|
120
|
+
"path",
|
|
121
|
+
"query",
|
|
122
|
+
"pattern",
|
|
123
|
+
"url",
|
|
124
|
+
] {
|
|
125
|
+
if let Some(value) = self.input.get(key).and_then(Value::as_str) {
|
|
126
|
+
if let Some(line) = value.lines().find(|line| !line.trim().is_empty()) {
|
|
127
|
+
return line.trim().to_owned();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
self.input.to_string()
|
|
132
|
+
}
|
|
133
|
+
pub fn lines(&self, width: u16) -> Vec<Line<'static>> {
|
|
134
|
+
let color = match self.status {
|
|
135
|
+
None => crate::terminal_theme::TEXT,
|
|
136
|
+
Some(ToolStatus::Success) => crate::terminal_theme::ACCENT,
|
|
137
|
+
Some(ToolStatus::Cancelled) => crate::terminal_theme::WARNING,
|
|
138
|
+
_ => Color::Red,
|
|
139
|
+
};
|
|
140
|
+
let output = self
|
|
141
|
+
.result
|
|
142
|
+
.as_ref()
|
|
143
|
+
.map(|result| format!("Output · {} lines · ", result.lines().count()))
|
|
144
|
+
.unwrap_or_default();
|
|
145
|
+
vec![
|
|
146
|
+
Line::styled(
|
|
147
|
+
clip(&self.heading(), width as usize),
|
|
148
|
+
Style::default().fg(color),
|
|
149
|
+
),
|
|
150
|
+
Line::styled(
|
|
151
|
+
clip(&format!(" {}", self.subject()), width as usize),
|
|
152
|
+
Style::default().fg(crate::terminal_theme::TEXT),
|
|
153
|
+
),
|
|
154
|
+
Line::from(vec![
|
|
155
|
+
Span::styled(
|
|
156
|
+
format!(" {output}"),
|
|
157
|
+
Style::default().fg(crate::terminal_theme::MUTED),
|
|
158
|
+
),
|
|
159
|
+
Span::styled(
|
|
160
|
+
"Ctrl+O details",
|
|
161
|
+
Style::default().fg(crate::terminal_theme::BLUE),
|
|
162
|
+
),
|
|
163
|
+
]),
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
pub fn details(&self) -> String {
|
|
167
|
+
let command = self
|
|
168
|
+
.input
|
|
169
|
+
.get("command")
|
|
170
|
+
.or_else(|| self.input.get("cmd"))
|
|
171
|
+
.and_then(Value::as_str);
|
|
172
|
+
let input = command
|
|
173
|
+
.map(str::to_owned)
|
|
174
|
+
.unwrap_or_else(|| serde_json::to_string_pretty(&self.input).unwrap_or_default());
|
|
175
|
+
format!(
|
|
176
|
+
"{}\nTool: {}\n\n{}\n{}\n\nOutput\n{}",
|
|
177
|
+
self.heading(),
|
|
178
|
+
self.action,
|
|
179
|
+
if command.is_some() {
|
|
180
|
+
"Command"
|
|
181
|
+
} else {
|
|
182
|
+
"Input"
|
|
183
|
+
},
|
|
184
|
+
input,
|
|
185
|
+
self.result.as_deref().unwrap_or("Waiting for result…")
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/// Pinned status: counts plus the newest running calls, independent of transcript scrolling.
|
|
191
|
+
pub(super) fn running_lines(tools: &[ToolActivity], width: usize, tick: usize) -> Vec<String> {
|
|
192
|
+
let Some(summary) = running_summary(tools) else {
|
|
193
|
+
return Vec::new();
|
|
194
|
+
};
|
|
195
|
+
let frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
196
|
+
let spinner = frames[tick % frames.len()];
|
|
197
|
+
let mut lines = vec![clip(&format!("● {summary}"), width)];
|
|
198
|
+
let mut running: Vec<_> = tools
|
|
199
|
+
.iter()
|
|
200
|
+
.rev()
|
|
201
|
+
.filter(|tool| tool.running())
|
|
202
|
+
.take(2)
|
|
203
|
+
.collect();
|
|
204
|
+
running.reverse();
|
|
205
|
+
for tool in running {
|
|
206
|
+
let prefix = format!(" {spinner} [{}] ", tool.action);
|
|
207
|
+
let suffix = format!(" ({:.1}s)", tool.started.elapsed().as_secs_f64());
|
|
208
|
+
let available = width.saturating_sub(
|
|
209
|
+
UnicodeWidthStr::width(prefix.as_str()) + UnicodeWidthStr::width(suffix.as_str()),
|
|
210
|
+
);
|
|
211
|
+
let line = format!("{prefix}{}{suffix}", clip(&tool.subject(), available));
|
|
212
|
+
lines.push(clip(&line, width));
|
|
213
|
+
}
|
|
214
|
+
lines
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
pub(super) fn running_summary(tools: &[ToolActivity]) -> Option<String> {
|
|
218
|
+
let shells = tools
|
|
219
|
+
.iter()
|
|
220
|
+
.filter(|tool| tool.running() && tool.shell())
|
|
221
|
+
.count();
|
|
222
|
+
let other = tools
|
|
223
|
+
.iter()
|
|
224
|
+
.filter(|tool| tool.running() && !tool.shell())
|
|
225
|
+
.count();
|
|
226
|
+
let shell_label = format!(
|
|
227
|
+
"{shells} shell command{}",
|
|
228
|
+
if shells == 1 { "" } else { "s" }
|
|
229
|
+
);
|
|
230
|
+
let other_label = format!("{other} tool{}", if other == 1 { "" } else { "s" });
|
|
231
|
+
match (shells, other) {
|
|
232
|
+
(0, 0) => None,
|
|
233
|
+
(_, 0) => Some(format!("Running {shell_label}")),
|
|
234
|
+
(0, _) => Some(format!("Running {other_label}")),
|
|
235
|
+
_ => Some(format!(
|
|
236
|
+
"Running {} tasks · {shell_label} · {other_label}",
|
|
237
|
+
shells + other
|
|
238
|
+
)),
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
fn clip(text: &str, width: usize) -> String {
|
|
243
|
+
if UnicodeWidthStr::width(text) <= width {
|
|
244
|
+
return text.to_owned();
|
|
245
|
+
}
|
|
246
|
+
let mut used = 0;
|
|
247
|
+
let mut clipped = String::new();
|
|
248
|
+
for ch in text.chars() {
|
|
249
|
+
let next = ch.width().unwrap_or(0);
|
|
250
|
+
if used + next > width.saturating_sub(1) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
used += next;
|
|
254
|
+
clipped.push(ch);
|
|
255
|
+
}
|
|
256
|
+
if width > 0 {
|
|
257
|
+
clipped.push('…');
|
|
258
|
+
}
|
|
259
|
+
clipped
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
#[cfg(test)]
|
|
263
|
+
mod tests {
|
|
264
|
+
use super::*;
|
|
265
|
+
#[test]
|
|
266
|
+
fn pinned_running_status_animates_and_clips_commands_without_losing_timer() {
|
|
267
|
+
let mut tool = ToolActivity {
|
|
268
|
+
entry: 0,
|
|
269
|
+
call_id: None,
|
|
270
|
+
action: "run_shell".into(),
|
|
271
|
+
input: serde_json::json!({"command":"x".repeat(300)}),
|
|
272
|
+
subagent: None,
|
|
273
|
+
started: Instant::now() - Duration::from_secs(3),
|
|
274
|
+
elapsed: None,
|
|
275
|
+
result: None,
|
|
276
|
+
status: None,
|
|
277
|
+
};
|
|
278
|
+
let first = running_lines(std::slice::from_ref(&tool), 60, 0);
|
|
279
|
+
let next = running_lines(std::slice::from_ref(&tool), 60, 1);
|
|
280
|
+
assert!(first[1].contains('⠋'));
|
|
281
|
+
assert!(next[1].contains('⠙'));
|
|
282
|
+
assert!(first[1].ends_with("(3.0s)"));
|
|
283
|
+
assert!(UnicodeWidthStr::width(first[1].as_str()) <= 60);
|
|
284
|
+
tool.finish("exit: 0", None);
|
|
285
|
+
assert!(running_lines(&[tool], 60, 2).is_empty());
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
#[test]
|
|
289
|
+
fn blocked_tools_are_failed_instead_of_successful() {
|
|
290
|
+
for result in ["Blocked: pinned server", "Blocked by hook: denied"] {
|
|
291
|
+
let mut tool = ToolActivity {
|
|
292
|
+
entry: 0,
|
|
293
|
+
call_id: None,
|
|
294
|
+
action: "read_file".into(),
|
|
295
|
+
input: serde_json::json!({"path":"example"}),
|
|
296
|
+
subagent: None,
|
|
297
|
+
started: Instant::now(),
|
|
298
|
+
elapsed: None,
|
|
299
|
+
result: None,
|
|
300
|
+
status: None,
|
|
301
|
+
};
|
|
302
|
+
tool.finish(result, None);
|
|
303
|
+
assert!(matches!(tool.status, Some(ToolStatus::Failed)), "{result}");
|
|
304
|
+
assert_eq!(tool.lines(80)[0].style.fg, Some(Color::Red));
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
#[test]
|
|
309
|
+
fn denied_shell_command_is_cancelled_and_keeps_the_denial_in_details() {
|
|
310
|
+
let mut tool = ToolActivity {
|
|
311
|
+
entry: 0,
|
|
312
|
+
call_id: None,
|
|
313
|
+
action: "run_shell".into(),
|
|
314
|
+
input: serde_json::json!({"command":"echo example"}),
|
|
315
|
+
subagent: None,
|
|
316
|
+
started: Instant::now(),
|
|
317
|
+
elapsed: None,
|
|
318
|
+
result: None,
|
|
319
|
+
status: None,
|
|
320
|
+
};
|
|
321
|
+
tool.finish("User denied shell command: echo example", None);
|
|
322
|
+
assert!(matches!(tool.status, Some(ToolStatus::Cancelled)));
|
|
323
|
+
assert!(
|
|
324
|
+
tool.details()
|
|
325
|
+
.contains("User denied shell command: echo example")
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
@@ -18,9 +18,12 @@ mod picker;
|
|
|
18
18
|
mod resume_picker;
|
|
19
19
|
mod slash_commands;
|
|
20
20
|
mod thought_viewer;
|
|
21
|
+
mod tool_activity;
|
|
21
22
|
|
|
22
23
|
pub(crate) use chat_tui::TuiHandle;
|
|
23
24
|
pub(crate) use chat_tui::restore_terminal;
|
|
25
|
+
#[cfg(test)]
|
|
26
|
+
pub(crate) use chat_tui::{ChatTui, ChatViewState};
|
|
24
27
|
pub use command_ui::*;
|
|
25
28
|
pub use commands::*;
|
|
26
29
|
pub use confirm::*;
|
|
@@ -94,6 +97,7 @@ async fn run_interactive_agent_turn(
|
|
|
94
97
|
plan_mode: session.plan_mode,
|
|
95
98
|
queueing: true,
|
|
96
99
|
pinned_mcp_server,
|
|
100
|
+
image_name: None,
|
|
97
101
|
chat_id: Some(session.chat_id.clone()),
|
|
98
102
|
tui: None,
|
|
99
103
|
};
|
|
@@ -443,16 +447,7 @@ pub async fn run_interactive_chat_with_session(
|
|
|
443
447
|
}
|
|
444
448
|
}
|
|
445
449
|
|
|
446
|
-
let mut
|
|
447
|
-
if let Some((current, latest)) = crate::updater::get_cached_update_notice() {
|
|
448
|
-
if let Some((_, _, handle)) = tui.as_mut() {
|
|
449
|
-
handle.push_notice(crate::updater::format_tui_update_notice(¤t, &latest));
|
|
450
|
-
} else {
|
|
451
|
-
crate::updater::print_update_notice(¤t, &latest);
|
|
452
|
-
}
|
|
453
|
-
printed_update = true;
|
|
454
|
-
}
|
|
455
|
-
|
|
450
|
+
let mut startup_update = crate::updater::get_cached_update_notice();
|
|
456
451
|
let mut update_handle = if crate::updater::should_check_for_update() {
|
|
457
452
|
Some(tokio::task::spawn_blocking(
|
|
458
453
|
crate::updater::check_for_update_quietly,
|
|
@@ -461,6 +456,53 @@ pub async fn run_interactive_chat_with_session(
|
|
|
461
456
|
None
|
|
462
457
|
};
|
|
463
458
|
|
|
459
|
+
// Offer the menu only at startup. A slow registry must not interrupt a
|
|
460
|
+
// conversation later; its result will use the passive notice below.
|
|
461
|
+
if startup_update.is_none()
|
|
462
|
+
&& let (Some((terminal, state, handle)), Some(check)) =
|
|
463
|
+
(tui.as_mut(), update_handle.as_mut())
|
|
464
|
+
{
|
|
465
|
+
handle.set_status(vec!["Checking for updates…".into()]);
|
|
466
|
+
if let Ok(state) = state.lock() {
|
|
467
|
+
terminal.draw_state(&state)?;
|
|
468
|
+
}
|
|
469
|
+
let result = tokio::time::timeout(std::time::Duration::from_secs(2), check).await;
|
|
470
|
+
handle.clear_status();
|
|
471
|
+
if let Ok(result) = result {
|
|
472
|
+
startup_update = result.ok().flatten();
|
|
473
|
+
update_handle = None;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
let mut printed_update = false;
|
|
478
|
+
if let Some((current, latest)) = startup_update {
|
|
479
|
+
if let Some((terminal, _, handle)) = tui.as_mut() {
|
|
480
|
+
match terminal.prompt_update(handle, ¤t, &latest)? {
|
|
481
|
+
Some(0) => {
|
|
482
|
+
terminal.suspend();
|
|
483
|
+
match crate::updater::run(false, false, true) {
|
|
484
|
+
Ok(()) => return Ok(()),
|
|
485
|
+
Err(error) => {
|
|
486
|
+
terminal.resume()?;
|
|
487
|
+
handle.push_notice(format!(
|
|
488
|
+
"Update failed: {error}. Run `mint update --approve` to retry."
|
|
489
|
+
));
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
Some(2) => {
|
|
494
|
+
if let Err(error) = crate::updater::skip_version(&latest) {
|
|
495
|
+
handle.push_notice(format!("Could not save skipped version: {error}"));
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
_ => {}
|
|
499
|
+
}
|
|
500
|
+
} else {
|
|
501
|
+
crate::updater::print_update_notice(¤t, &latest);
|
|
502
|
+
}
|
|
503
|
+
printed_update = true;
|
|
504
|
+
}
|
|
505
|
+
|
|
464
506
|
// Follow-up messages typed while an agent turn is still running (into the
|
|
465
507
|
// queueing box `agent::run_code_agent_with_options` keeps on screen) come
|
|
466
508
|
// back out via `run_code_agent_with_saved_image`'s return value. They're
|
|
@@ -670,13 +712,13 @@ pub async fn run_interactive_chat_with_session(
|
|
|
670
712
|
|
|
671
713
|
let task_with_skill = format!(
|
|
672
714
|
"=== ACTIVATED SKILL: {} ===\n\
|
|
673
|
-
{}\n\
|
|
715
|
+
Description: {}\nPath: {}\nRead this skill file through read_file before using it.\n\
|
|
674
716
|
===========================\n\n\
|
|
675
717
|
Task: {}",
|
|
676
|
-
skill.name, skill.
|
|
718
|
+
skill.name, description, skill.source_path, final_task
|
|
677
719
|
);
|
|
678
720
|
|
|
679
|
-
ui.push_notice(format!("
|
|
721
|
+
ui.push_notice(format!("Selected skill: {}", skill.name));
|
|
680
722
|
drop(ui);
|
|
681
723
|
|
|
682
724
|
match run_interactive_agent_turn(
|
|
@@ -811,33 +853,15 @@ pub fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> std::io::Re
|
|
|
811
853
|
Ok(())
|
|
812
854
|
}
|
|
813
855
|
pub fn load_all_available_skills(current_dir: &Path) -> Vec<mint_core::LearnedSkill> {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
let global_skills_path = home.join(".config").join("mint").join("mint-skills");
|
|
824
|
-
mint_core::skills::load_skills_from_dir(&global_skills_path, &mut skills);
|
|
825
|
-
}
|
|
826
|
-
let workspace_agents_path1 = current_dir.join(".agents").join("AGENTS.md");
|
|
827
|
-
mint_core::skills::load_agent_rules_file(&workspace_agents_path1, &mut skills);
|
|
828
|
-
let workspace_agents_path2 = current_dir.join("AGENTS.md");
|
|
829
|
-
mint_core::skills::load_agent_rules_file(&workspace_agents_path2, &mut skills);
|
|
830
|
-
|
|
831
|
-
let workspace_skills_path1 = current_dir.join(".agents").join("skills");
|
|
832
|
-
mint_core::skills::load_skills_from_dir(&workspace_skills_path1, &mut skills);
|
|
833
|
-
let workspace_skills_path2 = current_dir.join("skills");
|
|
834
|
-
mint_core::skills::load_skills_from_dir(&workspace_skills_path2, &mut skills);
|
|
835
|
-
|
|
836
|
-
let mut unique_skills = std::collections::BTreeMap::new();
|
|
837
|
-
for skill in skills {
|
|
838
|
-
unique_skills.insert(skill.name.clone(), skill);
|
|
839
|
-
}
|
|
840
|
-
unique_skills.into_values().collect()
|
|
856
|
+
MemoryStore::open_default()
|
|
857
|
+
.ok()
|
|
858
|
+
.and_then(|memory| {
|
|
859
|
+
mint_core::skill_inventory::list_available_skills(&memory, Some(current_dir)).ok()
|
|
860
|
+
})
|
|
861
|
+
.unwrap_or_default()
|
|
862
|
+
.into_iter()
|
|
863
|
+
.map(|entry| entry.skill)
|
|
864
|
+
.collect()
|
|
841
865
|
}
|
|
842
866
|
|
|
843
867
|
#[cfg(test)]
|
|
@@ -46,9 +46,6 @@ pub(crate) async fn run_code_agent_with_saved_image(
|
|
|
46
46
|
video_data_uri: Option<String>,
|
|
47
47
|
options: agent::AgentOptions,
|
|
48
48
|
) -> Result<(Vec<String>, Option<String>)> {
|
|
49
|
-
let sent_image = image_data_uri.clone();
|
|
50
|
-
let sent_video = video_data_uri.clone();
|
|
51
|
-
let tui_handle = options.tui.clone();
|
|
52
49
|
// Follow-up messages the user typed into the queueing box while this
|
|
53
50
|
// turn was still running (see `agent::run_code_agent_with_options`)
|
|
54
51
|
// land here; the caller is responsible for dispatching them. On error
|
|
@@ -95,9 +92,6 @@ pub(crate) async fn run_code_agent_with_saved_image(
|
|
|
95
92
|
{
|
|
96
93
|
mint_core::live_sync::note_own_interaction(row.id);
|
|
97
94
|
}
|
|
98
|
-
// Save any attached images and videos that were sent with the task
|
|
99
|
-
image::save_sent_image_after_send(sent_image.as_deref(), task, tui_handle.as_ref());
|
|
100
|
-
image::save_sent_image_after_send(sent_video.as_deref(), task, tui_handle.as_ref());
|
|
101
95
|
let queued = queue
|
|
102
96
|
.lock()
|
|
103
97
|
.map(|mut q| std::mem::take(&mut *q))
|
|
@@ -172,6 +166,9 @@ pub(crate) async fn run_oneshot_agent_task(
|
|
|
172
166
|
queueing: false,
|
|
173
167
|
pinned_mcp_server,
|
|
174
168
|
chat_id: None,
|
|
169
|
+
image_name: image_path
|
|
170
|
+
.and_then(|path| path.file_name())
|
|
171
|
+
.map(|name| name.to_string_lossy().into_owned()),
|
|
175
172
|
tui: None,
|
|
176
173
|
};
|
|
177
174
|
|
|
@@ -212,7 +209,6 @@ pub(crate) async fn run_oneshot_agent_task(
|
|
|
212
209
|
mint_core::live_sync::note_own_interaction(row.id);
|
|
213
210
|
}
|
|
214
211
|
|
|
215
|
-
image::save_sent_image_after_send(image_data_uri.as_deref(), task, None);
|
|
216
212
|
Ok(())
|
|
217
213
|
}
|
|
218
214
|
|
|
@@ -323,6 +319,10 @@ fn log_panic_to_file(message: &str) {
|
|
|
323
319
|
|
|
324
320
|
#[tokio::main]
|
|
325
321
|
async fn main() -> Result<()> {
|
|
322
|
+
if std::env::args().nth(1).as_deref() == Some("--mint-mod-host") {
|
|
323
|
+
return mint_mod_runtime::worker_main().map_err(anyhow::Error::msg);
|
|
324
|
+
}
|
|
325
|
+
let _background_shutdown = mint_core::bg_shell::ShutdownGuard;
|
|
326
326
|
install_panic_hook();
|
|
327
327
|
let mut cli = Cli::parse();
|
|
328
328
|
|
|
@@ -331,6 +331,7 @@ async fn main() -> Result<()> {
|
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
let mut config = load_config()?;
|
|
334
|
+
mint_core::companion::start();
|
|
334
335
|
if let Some(ref m) = cli.model {
|
|
335
336
|
apply_temporary_model_override(&mut config, m);
|
|
336
337
|
}
|
|
@@ -379,6 +380,7 @@ async fn main() -> Result<()> {
|
|
|
379
380
|
// its shutdown signal) funnels back here on a clean exit. `SESSIONS` is a
|
|
380
381
|
// `static`, so `McpSession::Drop` won't run at process teardown — do it
|
|
381
382
|
// explicitly so we don't leave orphaned MCP server processes behind.
|
|
383
|
+
mint_core::companion::shutdown();
|
|
382
384
|
mint_core::close_all_mcp_sessions();
|
|
383
385
|
Ok(())
|
|
384
386
|
}
|
|
@@ -530,3 +532,7 @@ mod cli_tests {
|
|
|
530
532
|
}
|
|
531
533
|
}
|
|
532
534
|
}
|
|
535
|
+
|
|
536
|
+
mod mods_cli;
|
|
537
|
+
|
|
538
|
+
mod mods_ui;
|
|
@@ -61,6 +61,11 @@ pub fn edit(
|
|
|
61
61
|
Ok(update_mcp_server(name, command, args, env, icon)?)
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
pub fn set_timeout(name: &str, value: &str) -> Result<bool> {
|
|
65
|
+
let seconds = mint_core::mcp::parse_mcp_timeout(value)?;
|
|
66
|
+
Ok(mint_core::mcp::set_mcp_timeout(name, seconds)?)
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
pub fn registry() -> &'static [McpRegistryEntry] {
|
|
65
70
|
mcp_registry()
|
|
66
71
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
use anyhow::{Result, bail};
|
|
2
|
+
|
|
3
|
+
pub(crate) async fn run(chat: &str, args: &[String]) -> Result<()> {
|
|
4
|
+
let root = std::env::current_dir()?;
|
|
5
|
+
let action = args.first().map(String::as_str).unwrap_or("list");
|
|
6
|
+
let id = args.get(1).map(String::as_str).unwrap_or("");
|
|
7
|
+
match action {
|
|
8
|
+
"test" => {
|
|
9
|
+
let report = mint_core::mods::test_mod(&root, id).map_err(anyhow::Error::msg)?;
|
|
10
|
+
println!("{}", serde_json::to_string_pretty(&report)?);
|
|
11
|
+
if report["failed"].as_u64().unwrap_or(0) > 0 {
|
|
12
|
+
bail!("Mod tests failed");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
"hot-reload" => bail!("Use /mods hot-reload on|off inside an interactive Mint session"),
|
|
16
|
+
"run-tools" => {
|
|
17
|
+
let chat = mint_core::scoped_chat_id(chat, Some(&root.to_string_lossy()));
|
|
18
|
+
let requests =
|
|
19
|
+
mint_core::mods::pending_requests(&root, &chat).map_err(anyhow::Error::msg)?;
|
|
20
|
+
for request in requests {
|
|
21
|
+
println!(
|
|
22
|
+
"{} requests {}\n{}\nRun this request? [y/N]",
|
|
23
|
+
request["modId"],
|
|
24
|
+
request["action"],
|
|
25
|
+
serde_json::to_string_pretty(&request["input"])?
|
|
26
|
+
);
|
|
27
|
+
let mut answer = String::new();
|
|
28
|
+
std::io::stdin().read_line(&mut answer)?;
|
|
29
|
+
if !answer.trim().eq_ignore_ascii_case("y") {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
let op = serde_json::from_value(
|
|
33
|
+
serde_json::json!({"workspacePath":root,"chatId":chat,"action":"run_request","command":request["id"],"grantPermissions":true}),
|
|
34
|
+
)?;
|
|
35
|
+
mint_core::mods::operate_async(op)
|
|
36
|
+
.await
|
|
37
|
+
.map_err(anyhow::Error::msg)?;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_ => {
|
|
41
|
+
if action == "enable" && id.is_empty() {
|
|
42
|
+
bail!("Usage: mint mods enable <id> [chat|workspace|global] [--grant-permissions]");
|
|
43
|
+
}
|
|
44
|
+
println!(
|
|
45
|
+
"{}",
|
|
46
|
+
mint_core::mods::slash(
|
|
47
|
+
&root,
|
|
48
|
+
chat,
|
|
49
|
+
&format!(
|
|
50
|
+
"/mods {}",
|
|
51
|
+
args.iter()
|
|
52
|
+
.map(|arg| format!("'{}'", arg.replace('\'', "'\"'\"'")))
|
|
53
|
+
.collect::<Vec<_>>()
|
|
54
|
+
.join(" ")
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
.map_err(anyhow::Error::msg)?
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
Ok(())
|
|
62
|
+
}
|