@pheem49/mint 1.17.0 → 1.18.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 +6 -6
- package/Cargo.toml +2 -2
- package/README.md +8 -2
- package/Release_Note.md +222 -71
- package/crates/mint-cli/src/agent/diff_render.rs +66 -44
- package/crates/mint-cli/src/agent/live_status.rs +21 -4
- package/crates/mint-cli/src/agent/markdown_render.rs +342 -5
- package/crates/mint-cli/src/agent.rs +25 -10
- package/crates/mint-cli/src/commands/agent.rs +4 -92
- package/crates/mint-cli/src/commands/browser.rs +2 -15
- package/crates/mint-cli/src/commands/integrations.rs +3 -3
- package/crates/mint-cli/src/commands/mod.rs +0 -3
- package/crates/mint-cli/src/commands/tailnet_web.rs +1 -0
- package/crates/mint-cli/src/interactive/chat_tui/dialog.rs +572 -0
- package/crates/mint-cli/src/interactive/chat_tui/mod.rs +1427 -0
- package/crates/mint-cli/src/interactive/chat_tui/render.rs +1524 -0
- package/crates/mint-cli/src/interactive/chat_tui/selection.rs +401 -0
- package/crates/mint-cli/src/interactive/chat_tui/state.rs +1833 -0
- package/crates/mint-cli/src/interactive/chat_tui/tests.rs +3414 -0
- package/crates/mint-cli/src/interactive/chat_tui/thought.rs +202 -0
- package/crates/mint-cli/src/interactive/chat_tui/transcript.rs +728 -0
- package/crates/mint-cli/src/interactive/chat_tui/watermark.rs +148 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +53 -5
- package/crates/mint-cli/src/interactive/composer.rs +186 -0
- package/crates/mint-cli/src/interactive/format.rs +78 -3
- package/crates/mint-cli/src/interactive/input_box.rs +61 -1
- package/crates/mint-cli/src/interactive/resume_picker.rs +367 -25
- package/crates/mint-cli/src/interactive/slash_commands.rs +648 -371
- package/crates/mint-cli/src/interactive/tool_activity.rs +93 -20
- package/crates/mint-cli/src/interactive.rs +37 -0
- package/crates/mint-cli/src/main.rs +6 -3
- package/crates/mint-cli/src/markdown.rs +2 -37
- package/crates/mint-cli/src/onboard.rs +700 -282
- package/crates/mint-cli/src/setup.rs +1342 -624
- package/crates/mint-cli/src/terminal_theme.rs +159 -35
- package/crates/mint-cli/tests/library_intake.rs +1 -0
- package/crates/mint-core/src/agent/chat/anthropic.rs +318 -0
- package/crates/mint-core/src/agent/chat/custom.rs +149 -0
- package/crates/mint-core/src/agent/chat/gemini.rs +518 -0
- package/crates/mint-core/src/agent/chat/mod.rs +857 -0
- package/crates/mint-core/src/agent/chat/ollama.rs +321 -0
- package/crates/mint-core/src/agent/chat/openai.rs +582 -0
- package/crates/mint-core/src/agent/chat/streaming.rs +469 -0
- package/crates/mint-core/src/agent/chat/tests.rs +1479 -0
- package/crates/mint-core/src/agent/memory.rs +56 -2
- package/crates/mint-core/src/agent/tasks.rs +2 -2
- package/crates/mint-core/src/api_server/routes/chat.rs +24 -2
- package/crates/mint-core/src/api_server/routes/gemini_live.rs +14 -1
- package/crates/mint-core/src/api_server/routes/html_preview.rs +1 -8
- package/crates/mint-core/src/api_server/routes/sessions.rs +21 -0
- package/crates/mint-core/src/avatar_bridge.rs +0 -22
- package/crates/mint-core/src/browser/cdp.rs +10 -4
- package/crates/mint-core/src/browser/headless.rs +582 -0
- package/crates/mint-core/src/browser/input.rs +7 -62
- package/crates/mint-core/src/browser/interact.rs +0 -14
- package/crates/mint-core/src/browser/mod.rs +8 -29
- package/crates/mint-core/src/browser/navigate.rs +2 -36
- package/crates/mint-core/src/browser/runtime.rs +2 -4
- package/crates/mint-core/src/browser/session.rs +50 -466
- package/crates/mint-core/src/browser/workflow.rs +142 -32
- package/crates/mint-core/src/cron/store.rs +2 -2
- package/crates/mint-core/src/integrations/mcp.rs +6 -8
- package/crates/mint-core/src/lib.rs +0 -5
- package/crates/mint-core/src/media/gemini_live.rs +636 -86
- package/crates/mint-core/src/media/library/migration.rs +26 -0
- package/crates/mint-core/src/media/library/tests.rs +1 -1
- package/crates/mint-core/src/media/library/thumbnails.rs +8 -2
- package/crates/mint-core/src/media/pictures.rs +1 -1
- package/crates/mint-core/src/media/tool_images.rs +92 -1
- package/crates/mint-core/src/mods/manager.rs +101 -35
- package/crates/mint-core/src/orchestration/context_render.rs +441 -24
- package/crates/mint-core/src/orchestration/decision_parsing.rs +531 -16
- package/crates/mint-core/src/orchestration/full_skill_result_tests.rs +12 -0
- package/crates/mint-core/src/orchestration/loop_guard.rs +145 -0
- package/crates/mint-core/src/orchestration/mcp_outcome_tests.rs +864 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +88 -28
- package/crates/mint-core/src/orchestration/mod.rs +320 -4249
- package/crates/mint-core/src/orchestration/reliability.rs +67 -27
- package/crates/mint-core/src/orchestration/review_regressions.rs +5 -0
- package/crates/mint-core/src/orchestration/tests.rs +1665 -0
- package/crates/mint-core/src/orchestration/tools/dispatch.rs +967 -0
- package/crates/mint-core/src/orchestration/tools/files.rs +1 -0
- package/crates/mint-core/src/orchestration/tools/mod.rs +5 -1
- package/crates/mint-core/src/orchestration/tools/planning.rs +102 -42
- package/crates/mint-core/src/orchestration/tools/shell.rs +129 -58
- package/crates/mint-core/src/orchestration/truncation.rs +170 -13
- package/crates/mint-core/src/orchestration/types.rs +648 -0
- package/crates/mint-core/src/orchestration/verification.rs +0 -3
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +24 -6
- package/crates/mint-core/src/prompts/agent.rs +52 -76
- package/crates/mint-core/src/prompts/tool_catalog.rs +8 -151
- package/crates/mint-core/src/search/files.rs +20 -0
- package/crates/mint-core/src/slash/mod.rs +228 -265
- package/crates/mint-core/src/slash/models.rs +6 -1
- package/crates/mint-core/src/system/bg_shell.rs +1 -0
- package/crates/mint-core/src/system/config.rs +176 -34
- package/crates/mint-mod-runtime/src/lib.rs +37 -23
- package/out/web/assets/ArtifactPreviewPanel-Cx6BVOOF.js +2 -0
- package/out/web/assets/CalculationCard-D2E74u5q.js +1 -0
- package/out/web/assets/CliSessionsView-ZbdtSjvK.css +1 -0
- package/out/web/assets/{CliSessionsView-MI8kXMAb.js → CliSessionsView-z5i6qGyb.js} +1 -1
- package/out/web/assets/CodeReviewPage-BK2bOScd.css +1 -0
- package/out/web/assets/CodeReviewPage-Dp6zHuHu.js +2 -0
- package/out/web/assets/{CommandPalette-BD8SlTE5.js → CommandPalette-DaKlzbKs.js} +1 -1
- package/out/web/assets/ImageGenCard-BMCJHP9O.js +1 -0
- package/out/web/assets/ImageSearchCard-Cld_SOUg.js +1 -0
- package/out/web/assets/{ImageStudioPanel-BP7N4rLr.js → ImageStudioPanel-B5N7TjeB.js} +1 -1
- package/out/web/assets/LibraryPage-CMB89rJ0.css +1 -0
- package/out/web/assets/LibraryPage-DbZEi4W_.js +2 -0
- package/out/web/assets/LinkedFoldersView-9B9DIPoZ.js +1 -0
- package/out/web/assets/{McpRegistryPicker-CoS83vtc.js → McpRegistryPicker-DnXPlzI7.js} +1 -1
- package/out/web/assets/McpServersView-CiNBNUl4.js +1 -0
- package/out/web/assets/MermaidCard-BBDNEXbY.js +2 -0
- package/out/web/assets/MintDashboard-C_UYPoNV.js +119 -0
- package/out/web/assets/MintDashboard-DTd8C_c8.css +1 -0
- package/out/web/assets/PlanCard-C2x5pajq.js +1 -0
- package/out/web/assets/{PluginsView-jBYmcKh4.js → PluginsView-DoTg9MVa.js} +1 -1
- package/out/web/assets/RewindModal-B5oowrR0.js +1 -0
- package/out/web/assets/{ScheduledTasksView-5uw9-V9H.js → ScheduledTasksView-BD5DVPkZ.js} +1 -1
- package/out/web/assets/{SelectField-DXBQtrUK.js → SelectField-Cy6CghrU.js} +1 -1
- package/out/web/assets/SettingsWindow-BYl_oCFh.js +4 -0
- package/out/web/assets/SettingsWindow-Ckcgnjt8.css +1 -0
- package/out/web/assets/{SkillsView-C-gp9J7m.js → SkillsView-CIeWwq5z.js} +1 -1
- package/out/web/assets/StockCard-DxUciKyp.js +1 -0
- package/out/web/assets/ToolSurfacePage-qBgs_VHq.css +1 -0
- package/out/web/assets/ToolSurfacePage-saVbVrkE.js +38 -0
- package/out/web/assets/{UiFeatureCard-6BwxTOCe.js → UiFeatureCard-CdY0hGWy.js} +1 -1
- package/out/web/assets/{UiGridCard-DvZcLNxb.js → UiGridCard-BBK3I5hC.js} +1 -1
- package/out/web/assets/UiMockupWidget-CpR9EDuc.js +1 -0
- package/out/web/assets/{VeoStudioPanel-DOj7_WR3.css → VeoStudioPanel-9kU9YLEN.css} +1 -1
- package/out/web/assets/{VeoStudioPanel-DfsOJKv0.js → VeoStudioPanel-Co6-wEWM.js} +2 -2
- package/out/web/assets/WeatherCard-Buzi7Vfu.js +1 -0
- package/out/web/assets/WorkspacePdfPreview-Bi8Zzyir.js +2 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-BOo3Ckng.js → abnfDiagram-VCTEODGH-CMfR95N2.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-ZOwheW3n.js → architecture-7GRP2DOG-DhAM4HyO.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-DC2FDzVd.js → architectureDiagram-5GKGNRK7-Yk3TUJ_F.js} +1 -1
- package/out/web/assets/{blockDiagram-I7D4REHJ-BrKFWdAH.js → blockDiagram-I7D4REHJ-X9fBgJik.js} +1 -1
- package/out/web/assets/{c4Diagram-7LVT6UL2-BHTHK1Yd.js → c4Diagram-7LVT6UL2-Bk9x7N-8.js} +1 -1
- package/out/web/assets/{chunk-4HAMMTFA-BYFkZwNj.js → chunk-4HAMMTFA-Dx5fk1_0.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-BSKfSKSA.js → chunk-75Z2AOVW-BszTQoM4.js} +1 -1
- package/out/web/assets/{chunk-DU6HZSFF-vIhsiW6n.js → chunk-DU6HZSFF-DK-As3rk.js} +1 -1
- package/out/web/assets/{chunk-F27PBJKO-BlYpW9xq.js → chunk-F27PBJKO-LmncZZIS.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-BIBz_Ug5.js → chunk-GMAD6QVW-DSQ_sDRJ.js} +1 -1
- package/out/web/assets/{chunk-GVQU2GXP-NPSHxeqC.js → chunk-GVQU2GXP-Cno3ulje.js} +1 -1
- package/out/web/assets/{chunk-IMKFNOWR-YlJK8_Fp.js → chunk-IMKFNOWR-bIzfY9Jc.js} +1 -1
- package/out/web/assets/{chunk-L3NEJ4N5-DMYi4-af.js → chunk-L3NEJ4N5-Dl6eOa0D.js} +1 -1
- package/out/web/assets/{chunk-OSK3NFVY-Begd3-jA.js → chunk-OSK3NFVY-BaUGJ-cM.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-D1I4xFHN.js → chunk-P2QGCYS3-_066ndhH.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-CafZZzNE.js → chunk-POPQ4Y6H-YT1AKhTv.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-Dwh6_Lnt.js → chunk-PWAF6VOD-CrEgDsxh.js} +1 -1
- package/out/web/assets/{chunk-SHT3W25Y-B0XrCSEb.js → chunk-SHT3W25Y-_KwaRLOl.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CxLsddxC.js → chunk-SVP7TREG-BQ1qb32L.js} +1 -1
- package/out/web/assets/{chunk-TICWLB2K-y156QInb.js → chunk-TICWLB2K-BDyehCtg.js} +1 -1
- package/out/web/assets/classDiagram-ZZMXUADV-BoSpzRCJ.js +1 -0
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BoSpzRCJ.js +1 -0
- package/out/web/assets/{config-DqXJXeZM.css → config-2suVFPZg.css} +1 -1
- package/out/web/assets/config-CkRCdkxn.js +2 -0
- package/out/web/assets/{cynefin-OW5HDTMX-SMVvrLf-.js → cynefin-OW5HDTMX-Dl_31aaN.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-rZznN24T.js → cynefinDiagram-5FMLGOSQ-Bpir8jha.js} +1 -1
- package/out/web/assets/{dagre-GXQ25YYZ-BOToydFu.js → dagre-GXQ25YYZ-D9xu3nsq.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-TMVaGQEJ.js → diagram-S7CK7UJ4-DeveoEeB.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-C2JK-GP2.js → diagram-UQ7AKVKN-p4xWRESV.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-Cw8VSi2K.js → diagram-VSXAHHWV-C7qz9NDF.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-DXp4fKk9.js → diagram-VX7I27RA-DRiCa3Vd.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-CzSicYiW.js → diagram-Z3DM3KII-Bt7zduQX.js} +1 -1
- package/out/web/assets/{ebnfDiagram-PWID7BFC-Dqj-zqPu.js → ebnfDiagram-PWID7BFC-DV9WpwdR.js} +1 -1
- package/out/web/assets/{erDiagram-RLTQ6QDP-DZwFZAuD.js → erDiagram-RLTQ6QDP-BJ_nwG2m.js} +1 -1
- package/out/web/assets/{eventmodeling-NTZA5JFV-C0O-Lvgp.js → eventmodeling-NTZA5JFV-BTBMrfVa.js} +1 -1
- package/out/web/assets/flowDiagram-HODETNUW-Cdlq3cJL.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-Da4ULXTl.js → ganttDiagram-EL5Y4UJY-DQLdsXrC.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-B9wNFZIP.js → gitGraph-4MIJSDKK-CL1OEOQ_.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-RjrhB0MP.js → gitGraphDiagram-WWUBYQGX-8cSi42H7.js} +1 -1
- package/out/web/assets/index-BocxnrDG.js +168 -0
- package/out/web/assets/index-yeh_r55a.css +1 -0
- package/out/web/assets/{info-A6RAGUB7-B3dfCpeY.js → info-A6RAGUB7-C1zsX5sc.js} +1 -1
- package/out/web/assets/{infoDiagram-27XIBGKW-QVWkLVx7.js → infoDiagram-27XIBGKW-DsRYtIyI.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-CLFNIRI9.js → ishikawaDiagram-5VMMS53U-B2crwIXj.js} +1 -1
- package/out/web/assets/{journeyDiagram-3NMN7TZE-fgOQadYF.js → journeyDiagram-3NMN7TZE-BTH-GyVR.js} +1 -1
- package/out/web/assets/{kanban-definition-UXKFOSKX-G3Q_9g9O.js → kanban-definition-UXKFOSKX-BeRfCnuA.js} +1 -1
- package/out/web/assets/{mermaid-parser.core-v3Jm7nco.js → mermaid-parser.core-BJwgCBBc.js} +3 -3
- package/out/web/assets/{mermaid.core-DTEjLUA1.js → mermaid.core-CsDDodN8.js} +4 -4
- package/out/web/assets/{mindmap-definition-YA3MSWOX-C_D42_fF.js → mindmap-definition-YA3MSWOX-B42efOQ1.js} +1 -1
- package/out/web/assets/{modelManager-BPLycQrN.js → modelManager-B3ZFMh8v.js} +2 -2
- package/out/web/assets/{oauthManager-BUK7ic7q.js → oauthManager-Ch5Du2fF.js} +1 -1
- package/out/web/assets/{packet-AYTQ26CC-B-R-SHlF.js → packet-AYTQ26CC-B6xUyE6r.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-Da2q_giz.js → pegDiagram-XKGWAZYB-1LabVycL.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-BC8F0N7-.js → pie-WAS4IAKB-DJwo-nf_.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-Iy9REJNC.js → pieDiagram-E7YTZNPT-icmAqzy4.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-ztsiYw7h.js → quadrantDiagram-AXDQQJYC-CZ-wEx41.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-B_1P8Z_z.js → radar-RG4KPBEZ-D7d-Xriw.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-DuTqczSo.js → railroad-74A4TZTK-viuhdYbs.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-Df29WLmp.js → railroad-abnf-HS5TGJTU-DNXiCNea.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-ePFMo-qp.js → railroad-ebnf-LZEXJU2U-nkSu1-0C.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-DYXLW4_E.js → railroad-peg-WCYAUIDC-BhbMeQzz.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-LStnZf2S.js → railroadDiagram-O6MQD6OU-CLpG1jUX.js} +1 -1
- package/out/web/assets/{requirementDiagram-BXWQKSXE-DmzonMH-.js → requirementDiagram-BXWQKSXE-kRDrvWrc.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B8vjmUU1.js → sankeyDiagram-P5KCCOFB-DxAwmq4x.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-CTnplOAX.js → sequenceDiagram-WJ2MYXX4-aLgY-6Wz.js} +1 -1
- package/out/web/assets/{stateDiagram-D77RDMKH-BFrIaLdI.js → stateDiagram-D77RDMKH-D5QWfOhp.js} +1 -1
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-D6OiZoAP.js +1 -0
- package/out/web/assets/{swimlanes-42K2YHIH-BXGngUNU.js → swimlanes-42K2YHIH-CRs5UyA-.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-UgEXIsV0.js +8 -0
- package/out/web/assets/syntaxHighlight-C-wAGT84.js +3 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CegH7n43.js → timeline-definition-24CTP7MA-Denqd9qb.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-DTpJv2Tw.js → treeView-Q6P3EWNA-0my3Z3s4.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-i8M9iJU6.js → treemap-WGGIJYW6-B_EjkLYq.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-Dpzo1S8U.js → vennDiagram-4TSXK5OY-DxVg3Ewr.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-BrNsgtfw.js → wardley-WFR3VGLG-CGD-Tj4p.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-lQ92LFE1.js → wardleyDiagram-VM6X3IG4-CmfS39Xm.js} +1 -1
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-BaOaEoBd.js → xychartDiagram-S5SC5T6Z-BVM9bKis.js} +1 -1
- package/out/web/index-web.html +2 -2
- package/out/web/index.html +2 -2
- package/package.json +2 -2
- package/shared-modules/CODEOWNERS +3 -3
- package/shared-modules/SDL2/SDL2_mixer.json +27 -0
- package/shared-modules/appstream/README.md +13 -0
- package/shared-modules/appstream/appstream-compose.json +111 -0
- package/shared-modules/dbus-glib/dbus-glib.json +2 -2
- package/shared-modules/libportal/libportal.json +23 -0
- package/shared-modules/linux-audio/fluidsynth2-static.json +2 -2
- package/shared-modules/linux-audio/fluidsynth2.json +2 -2
- package/shared-modules/linux-audio/libinstpatch.json +2 -2
- package/shared-modules/linux-audio/liblo-static.json +3 -0
- package/shared-modules/luajit/luajit.json +2 -2
- package/shared-modules/squashfs-tools/squashfs-tools.json +0 -3
- package/slash-commands.json +7 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +51 -3
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +2 -56
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +15 -1
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +25 -12
- package/src/renderer/shared/components/Settings/ThemeTab.test.tsx +45 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +106 -3
- package/src/renderer/shared/components/activity/AgentActivityDrawer.tsx +67 -17
- package/src/renderer/shared/components/activity/AgentActivityTable.tsx +376 -134
- package/src/renderer/shared/components/activity/AskUserActivityCard.test.tsx +122 -0
- package/src/renderer/shared/components/activity/AskUserActivityCard.tsx +70 -0
- package/src/renderer/shared/components/activity/McpToolResults.tsx +39 -2
- package/src/renderer/shared/components/activity/SubagentDagView.tsx +7 -7
- package/src/renderer/shared/components/activity/ViewedImages.tsx +41 -2
- package/src/renderer/shared/components/app/ChunkErrorBoundary.tsx +3 -3
- package/src/renderer/shared/components/app/CommandPalette.tsx +7 -7
- package/src/renderer/shared/components/app/DesktopTitlebar.tsx +2 -2
- package/src/renderer/shared/components/app/MintDashboard.tsx +27 -17
- package/src/renderer/shared/components/app/ModalErrorBoundary.tsx +3 -3
- package/src/renderer/shared/components/cards/CalculationCard.tsx +3 -3
- package/src/renderer/shared/components/cards/ImageGenCard.tsx +2 -2
- package/src/renderer/shared/components/cards/ImageSearchCard.tsx +2 -2
- package/src/renderer/shared/components/cards/MermaidCard.tsx +1 -1
- package/src/renderer/shared/components/cards/PlanCard.test.tsx +41 -0
- package/src/renderer/shared/components/cards/PlanCard.tsx +32 -0
- package/src/renderer/shared/components/cards/ReleaseNotesCard.test.tsx +29 -0
- package/src/renderer/shared/components/cards/ReleaseNotesCard.tsx +137 -0
- package/src/renderer/shared/components/cards/StockCard.tsx +7 -7
- package/src/renderer/shared/components/cards/ToolResultCards.tsx +11 -3
- package/src/renderer/shared/components/cards/UiMockupWidget.tsx +4 -4
- package/src/renderer/shared/components/cards/WeatherCard.tsx +5 -5
- package/src/renderer/shared/components/chat/ApprovalCard.test.tsx +11 -0
- package/src/renderer/shared/components/chat/ApprovalCard.tsx +21 -2
- package/src/renderer/shared/components/chat/ArtifactCards.test.tsx +69 -0
- package/src/renderer/shared/components/chat/ArtifactCards.tsx +238 -0
- package/src/renderer/shared/components/chat/AttachedDocumentCard.test.tsx +39 -0
- package/src/renderer/shared/components/chat/AttachedDocumentCard.tsx +220 -0
- package/src/renderer/shared/components/chat/ChatCodeBlock.test.tsx +33 -0
- package/src/renderer/shared/components/chat/ChatCodeBlock.tsx +15 -1
- package/src/renderer/shared/components/chat/ChatMessageItem.test.tsx +40 -2
- package/src/renderer/shared/components/chat/ChatMessageItem.tsx +180 -34
- package/src/renderer/shared/components/chat/ChatModeSelector.css +227 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.test.tsx +45 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.tsx +198 -0
- package/src/renderer/shared/components/chat/ChatPanel.test.tsx +22 -0
- package/src/renderer/shared/components/chat/ChatPanel.tsx +227 -53
- package/src/renderer/shared/components/chat/DiffReviewModal.tsx +6 -6
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.test.tsx +142 -1
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.tsx +45 -3
- package/src/renderer/shared/components/chat/ModelSelectorPopover.tsx +42 -14
- package/src/renderer/shared/components/chat/RewindModal.tsx +10 -10
- package/src/renderer/shared/components/chat/SlashSuggestions.test.tsx +14 -0
- package/src/renderer/shared/components/chat/SourcesBlock.test.tsx +53 -0
- package/src/renderer/shared/components/chat/SourcesBlock.tsx +236 -90
- package/src/renderer/shared/components/chat/TurnFileChanges.test.tsx +45 -1
- package/src/renderer/shared/components/chat/TurnFileChanges.tsx +202 -169
- package/src/renderer/shared/components/extensions/CliSessionsView.tsx +5 -4
- package/src/renderer/shared/components/extensions/McpRegistryPicker.tsx +3 -3
- package/src/renderer/shared/components/studio/LibraryPage.tsx +48 -5
- package/src/renderer/shared/components/workspace/ArtifactPreviewPanel.tsx +125 -13
- package/src/renderer/shared/components/workspace/CodeReviewPage.test.tsx +50 -0
- package/src/renderer/shared/components/workspace/CodeReviewPage.tsx +77 -16
- package/src/renderer/shared/components/workspace/GitBranchSelector.tsx +78 -22
- package/src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx +13 -0
- package/src/renderer/shared/components/workspace/ToolSurfacePage.tsx +48 -28
- package/src/renderer/shared/components/workspace/WorkspacePdfPreview.tsx +266 -47
- package/src/renderer/shared/components/workspace/WorkspacePreviewActions.test.tsx +18 -6
- package/src/renderer/shared/components/workspace/background-terminals.css +11 -11
- package/src/renderer/shared/constants/config.ts +1 -5
- package/src/renderer/shared/constants/models.test.ts +51 -0
- package/src/renderer/shared/constants/models.ts +139 -32
- package/src/renderer/shared/conversation/lifecycle.test.ts +91 -3
- package/src/renderer/shared/conversation/lifecycle.ts +104 -5
- package/src/renderer/shared/conversation/progressiveStream.test.ts +83 -0
- package/src/renderer/shared/conversation/progressiveStream.ts +219 -0
- package/src/renderer/shared/css/agent-observability.css +133 -0
- package/src/renderer/shared/css/chat-ui-cards.css +13 -13
- package/src/renderer/shared/css/code-review.css +63 -34
- package/src/renderer/shared/css/code-sessions.css +47 -18
- package/src/renderer/shared/css/collapsed-paste.css +1 -1
- package/src/renderer/shared/css/error-notice.css +1 -1
- package/src/renderer/shared/css/file-changes.css +165 -80
- package/src/renderer/shared/css/library.css +105 -10
- package/src/renderer/shared/css/management-views.css +1 -1
- package/src/renderer/shared/css/mcp-results.css +5 -5
- package/src/renderer/shared/css/model-selector.css +18 -18
- package/src/renderer/shared/css/mods.css +7 -7
- package/src/renderer/shared/css/notification-notice.css +2 -2
- package/src/renderer/shared/css/queued-messages.css +5 -5
- package/src/renderer/shared/css/settings/general.css +18 -13
- package/src/renderer/shared/css/settings/profile.css +5 -5
- package/src/renderer/shared/css/settings/theme.css +5 -5
- package/src/renderer/shared/css/slash-choice.css +2 -2
- package/src/renderer/shared/css/slash-suggestions.css +3 -3
- package/src/renderer/shared/css/sources-block.css +41 -2
- package/src/renderer/shared/css/tools-panel.css +2 -2
- package/src/renderer/shared/css/ui-tailwind.css +8 -0
- package/src/renderer/shared/css/veo-studio.css +2 -2
- package/src/renderer/shared/css/viewed-images.css +7 -7
- package/src/renderer/shared/platform.ts +2 -1
- package/src/renderer/shared/theme/themeManager.test.ts +17 -0
- package/src/renderer/shared/theme/themeManager.ts +21 -4
- package/src/renderer/shared/theme/themes.ts +54 -0
- package/src/renderer/shared/theme/tokens.css +6 -4
- package/src/renderer/shared/types.ts +1 -1
- package/src/renderer/shared/utils/agentActivity.test.ts +468 -2
- package/src/renderer/shared/utils/agentActivity.ts +602 -35
- package/src/renderer/shared/utils/artifactBrowser.test.ts +37 -32
- package/src/renderer/shared/utils/artifactBrowser.ts +17 -19
- package/src/renderer/shared/utils/attachedDocument.test.ts +73 -0
- package/src/renderer/shared/utils/attachedDocument.ts +49 -0
- package/src/renderer/shared/utils/fileIcons.test.ts +59 -0
- package/src/renderer/shared/utils/fileIcons.ts +149 -16
- package/src/renderer/shared/utils/markdown.tsx +72 -19
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +16 -0
- package/src/renderer/shared/utils/mcpResults.test.tsx +29 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +4 -1
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +11 -1
- package/src/renderer/shared/utils/syntaxHighlight.tsx +51 -3
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +324 -51
- package/src/renderer/shared/utils/workspaceDrag.test.ts +153 -0
- package/src/renderer/shared/utils/workspaceDrag.ts +142 -0
- package/src/renderer/shared/utils/workspaceMedia.ts +10 -2
- package/src/renderer/src/App.tsx +14 -8
- package/src/renderer/src/agentProgress.ts +1 -0
- package/src/renderer/src/components/ScreenPicker.css +1 -1
- package/src/renderer/src/components/WorkspacePanel.tsx +6 -5
- package/src/renderer/src/css/app-shell.css +4 -4
- package/src/renderer/src/css/chat.css +1261 -241
- package/src/renderer/src/css/desktop-tools.css +11 -11
- package/src/renderer/src/css/sidebar-workspace.css +2 -2
- package/src/renderer/src/css/tool-surfaces.css +12 -12
- package/src/renderer/src/index.css +38 -20
- package/src/renderer/src/tauri.ts +22 -2
- package/src/renderer/src-web/App.tsx +14 -0
- package/src/renderer/src-web/agentProgress.ts +1 -0
- package/src/renderer/src-web/css/app-shell.css +4 -4
- package/src/renderer/src-web/css/chat.css +1278 -190
- package/src/renderer/src-web/css/mobile.css +29 -13
- package/src/renderer/src-web/css/settings/mobile.css +2 -2
- package/src/renderer/src-web/css/sidebar-workspace.css +1 -1
- package/src/renderer/src-web/index.css +38 -20
- package/src/renderer/src-web/tauri.ts +22 -2
- package/src/renderer/tests/browserArtifacts.browser.tsx +1 -1
- package/src/renderer/tests/library.browser.tsx +3 -0
- package/src/renderer/tests/liveVoice.browser.html +1 -0
- package/src/renderer/tests/workspaceDrop.browser.tsx +1 -1
- package/src-tauri/src/app/lifecycle.rs +1 -14
- package/src-tauri/src/background/headless.rs +14 -8
- package/src-tauri/src/commands/conversation.rs +38 -0
- package/src-tauri/src/native/mod.rs +0 -1
- package/src-tauri/src/native/system.rs +4 -47
- package/crates/mint-cli/src/interactive/chat_tui.rs +0 -8855
- package/crates/mint-core/src/agent/chat.rs +0 -4394
- package/crates/mint-core/src/browser/lifecycle.rs +0 -291
- package/crates/mint-core/src/browser/logging.rs +0 -20
- package/crates/mint-core/src/orchestration/tools/browser.rs +0 -31
- package/out/web/assets/ArtifactPreviewPanel-S0dPfYFx.js +0 -2
- package/out/web/assets/CalculationCard-CRjP3E1j.js +0 -1
- package/out/web/assets/CliSessionsView-C3Br2v5Y.css +0 -1
- package/out/web/assets/CodeReviewPage-CUJceQme.css +0 -1
- package/out/web/assets/CodeReviewPage-VCUgPla_.js +0 -2
- package/out/web/assets/ImageGenCard-BCXxkVJX.js +0 -1
- package/out/web/assets/ImageSearchCard-N3yQOr8Z.js +0 -1
- package/out/web/assets/LibraryPage-DAxUTAg7.css +0 -1
- package/out/web/assets/LibraryPage-WlviRdR8.js +0 -2
- package/out/web/assets/LinkedFoldersView-CKRgroWK.js +0 -1
- package/out/web/assets/McpServersView-D3wHnuHg.js +0 -1
- package/out/web/assets/MermaidCard-NqrHdyJW.js +0 -2
- package/out/web/assets/MintDashboard-B2DJsDDO.css +0 -1
- package/out/web/assets/MintDashboard-COw_xol7.js +0 -63
- package/out/web/assets/RewindModal-DempuDod.js +0 -1
- package/out/web/assets/SettingsWindow-2YP3yj7s.js +0 -4
- package/out/web/assets/SettingsWindow-Dz8LQVgD.css +0 -1
- package/out/web/assets/StockCard-BDMCe7mx.js +0 -1
- package/out/web/assets/ToolSurfacePage-B0J_q0Jl.js +0 -38
- package/out/web/assets/ToolSurfacePage-CRIQ1owD.css +0 -1
- package/out/web/assets/UiMockupWidget-DD73QWg1.js +0 -1
- package/out/web/assets/WeatherCard-CPucIfq8.js +0 -1
- package/out/web/assets/WorkspacePdfPreview-Dx_lkjNu.js +0 -2
- package/out/web/assets/classDiagram-ZZMXUADV-BgJ5WtSp.js +0 -1
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BgJ5WtSp.js +0 -1
- package/out/web/assets/config-CvIO5hkn.js +0 -2
- package/out/web/assets/flowDiagram-HODETNUW-uqCHJond.js +0 -1
- package/out/web/assets/index-BmpulIkg.js +0 -168
- package/out/web/assets/index-CkvBwhX_.css +0 -1
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-uf3kdNW4.js +0 -1
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-Y8q5bQce.js +0 -8
- package/shared-modules/libsecret/libsecret.json +0 -23
- package/shared-modules/libusb/libusb.json +0 -27
- package/shared-modules/lzo/lzo.json +0 -27
- package/src/renderer/src/components/BrowserShell.tsx +0 -108
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +0 -91
- package/src/renderer/src/components/browser-shell.css +0 -185
- package/src-tauri/src/native/browser.rs +0 -252
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
use super::persona;
|
|
2
2
|
use crate::MintConfig;
|
|
3
3
|
|
|
4
|
-
pub(crate) fn browser_tools_enabled(config: &MintConfig) -> bool {
|
|
5
|
-
config
|
|
6
|
-
.extra
|
|
7
|
-
.get("browserAutomationEnabled")
|
|
8
|
-
.and_then(serde_json::Value::as_bool)
|
|
9
|
-
!= Some(false)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
4
|
pub(crate) const PLAN_MODE_ALLOWED_ACTIONS: &[&str] = &[
|
|
13
5
|
"list_files",
|
|
14
6
|
"read_file",
|
|
@@ -146,10 +138,6 @@ pub fn build_system_prompt(
|
|
|
146
138
|
) -> String {
|
|
147
139
|
let mut allowed_actions = base_allowed_actions();
|
|
148
140
|
|
|
149
|
-
if browser_tools_enabled(config) {
|
|
150
|
-
allowed_actions.extend_from_slice(crate::browser::BROWSER_TOOLS);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
141
|
if !config.avatar_token.is_empty() {
|
|
154
142
|
allowed_actions.push("avatar_signal");
|
|
155
143
|
}
|
|
@@ -236,34 +224,6 @@ pub fn build_system_prompt(
|
|
|
236
224
|
if allowed_actions.contains(&"calculation") {
|
|
237
225
|
input_formats.push("- calculation: {\"expression\":\"math or percentage expression e.g. 25% of 8500 or 100 * 3.5\"}");
|
|
238
226
|
}
|
|
239
|
-
if allowed_actions.contains(&"browser_open") {
|
|
240
|
-
input_formats.push("- browser_open: {\"url\":\"https://example.com\"}");
|
|
241
|
-
}
|
|
242
|
-
if allowed_actions.contains(&"browser_observe") {
|
|
243
|
-
input_formats.push("- browser_observe: {textOffset?:number,elementOffset?:number,takeoverComplete?:boolean}; browser_tabs: {operation:list|open|select|close,tabId?:string,url?:string}; browser_fill: {elementRef?:string,selector?:string,text:string}; browser_select: {elementRef?:string,selector?:string,value:string}; browser_scroll: {elementRef?:string,selector?:string,x?:number,y?:number}; browser_wait: {condition:url|text|visible|hidden,value?:string,elementRef?:string,selector?:string,timeoutMs?:number}. browser_click/browser_type also accept elementRef instead of selector.");
|
|
244
|
-
}
|
|
245
|
-
if allowed_actions.contains(&"browser_click") {
|
|
246
|
-
input_formats.push("- browser_click: {\"selector\":\"button.submit-btn\"} (CSS selector, or text=Login, contains=Submit, xpath=//button)");
|
|
247
|
-
}
|
|
248
|
-
if allowed_actions.contains(&"browser_type") {
|
|
249
|
-
input_formats
|
|
250
|
-
.push("- browser_type: {\"selector\":\"input.search-bar\", \"text\":\"search query\"} (CSS selector, or text=Placeholder, contains=Label)");
|
|
251
|
-
}
|
|
252
|
-
if allowed_actions.contains(&"browser_read") {
|
|
253
|
-
input_formats.push("- browser_read: {}");
|
|
254
|
-
}
|
|
255
|
-
if allowed_actions.contains(&"browser_mouse_move") {
|
|
256
|
-
input_formats.push("- browser_mouse_move: {\"x\":640,\"y\":360}");
|
|
257
|
-
}
|
|
258
|
-
if allowed_actions.contains(&"browser_mouse_click") {
|
|
259
|
-
input_formats.push("- browser_mouse_click: {\"x\":640,\"y\":360,\"button\":\"left\"}");
|
|
260
|
-
}
|
|
261
|
-
if allowed_actions.contains(&"browser_key_press") {
|
|
262
|
-
input_formats.push("- browser_key_press: {\"key\":\"Enter\"} (keys: Enter,Tab,Escape,Backspace,Delete,ArrowUp,ArrowDown,ArrowLeft,ArrowRight,F1-F12,Space)");
|
|
263
|
-
}
|
|
264
|
-
if allowed_actions.contains(&"browser_screenshot") {
|
|
265
|
-
input_formats.push("- browser_screenshot: {mode?:viewport|fullPage|element,selector?:string,elementRef?:string}");
|
|
266
|
-
}
|
|
267
227
|
if allowed_actions.contains(&"memory_recall") {
|
|
268
228
|
input_formats.push("- memory_recall: {\"query\":\"what did user say about X\"}");
|
|
269
229
|
}
|
|
@@ -489,7 +449,7 @@ pub fn build_system_prompt(
|
|
|
489
449
|
rules.push("4. Shell commands and file edits require user approval. Mint handles approval after you request the tool.");
|
|
490
450
|
rules.push("4a. SKILL CHANGES: Create or edit reusable skills only when the user asks for that work. Otherwise complete the current task and suggest the skill in your summary. Use write_file or apply_patch for skill files so Mint can show the concrete diff and request approval for each change. A general file or session permission does not authorize changing persistent skill instructions. After approval, report the saved skill path and what changed.");
|
|
491
451
|
}
|
|
492
|
-
rules.push("Execution evidence: distinguish succeeded, failed, running, cancelled and unknown. Inspect background jobs with shell_output before claiming completion. Retry a command after relevant changes or with retryReason, but observe ambiguous side effects before repeating them. finish.completionStatus must be verified, unverified, blocked or failed; a verification explanation cannot override failed or pending checks. When checks cannot run, finish honestly with unverified/blocked and the reason. Opening a browser or starting a process completes only that step, not the user's entire task.");
|
|
452
|
+
rules.push("Execution evidence: distinguish succeeded, failed, running, cancelled and unknown. Inspect background jobs with shell_output before claiming completion. When a command reports running_in_background, the process is actively executing — do not restart or retry it with an alternative approach. Retry a command after relevant changes or with retryReason, but observe ambiguous side effects before repeating them. finish.completionStatus must be verified, unverified, blocked or failed; a verification explanation cannot override failed or pending checks. When checks cannot run, finish honestly with unverified/blocked and the reason. Opening a browser or starting a process completes only that step, not the user's entire task.");
|
|
493
453
|
if allowed_actions.contains(&"run_shell") {
|
|
494
454
|
rules.push("5. Shell commands are classified as readOnly, test, network, or mutating. Only policy-allowed modes may run after approval. Never request destructive commands such as rm -rf, git reset --hard, git checkout --, or git clean -f.");
|
|
495
455
|
}
|
|
@@ -497,7 +457,9 @@ pub fn build_system_prompt(
|
|
|
497
457
|
rules.push("6. Verify code changes when possible. If compile or test commands fail (exit status is not 0), analyze the stdout/stderr to locate the bug, edit the code to fix it, and verify again. Do not stop or give up until the errors are resolved.");
|
|
498
458
|
}
|
|
499
459
|
if allowed_actions.contains(&"web_search") {
|
|
500
|
-
rules.push("7. Use web_search when the user asks to look something up online or needs current information
|
|
460
|
+
rules.push("7. Use web_search when the user asks to look something up online or needs current information.\n\
|
|
461
|
+
- Information Sufficiency: If web_search results already contain the direct answer, official links, social profiles, or overview the user asked for, synthesize the final answer and call `finish` immediately. Do NOT run redundant searches or launch headless Chrome.\n\
|
|
462
|
+
- Follow-up Gate: If search results are incomplete, ambiguous, or if further research could be explored, DO NOT run arbitrary loops or crawl pages autonomously. Instead, summarize what you found so far and call `ask_user` with clear options to confirm whether the user wants to search further and what specific topics or links to explore next.");
|
|
501
463
|
}
|
|
502
464
|
if allowed_actions.contains(&"image_search") {
|
|
503
465
|
rules.push("7i. Use image_search when the user explicitly wants to see, browse, or find pictures/photos of something. Do NOT use it just to decorate a text answer — web_search already attaches a thumbnail automatically when relevant. ALWAYS copy the ```image_search_json ... ``` block from the tool observation into your final summary text so the UI card renders.");
|
|
@@ -517,37 +479,8 @@ pub fn build_system_prompt(
|
|
|
517
479
|
if allowed_actions.contains(&"avatar_signal") {
|
|
518
480
|
rules.push("7v. A Project Avatar is connected. Call avatar_signal when your reply carries an emotional beat the automatic tool-based reactions can't express — greeting, joking, apologizing, thinking something over. Don't call it for routine tool-driven turns (shell, browser, image/video generation); those already react on their own.");
|
|
519
481
|
}
|
|
520
|
-
if allowed_actions.contains(&"run_shell")
|
|
521
|
-
rules.push("7a.
|
|
522
|
-
}
|
|
523
|
-
if allowed_actions.contains(&"browser_open") {
|
|
524
|
-
rules.push("7a. Use browser_open to open websites; Mint starts an isolated browser session automatically (headless by default). Inspect the returned page observation, then use browser_observe/browser_read to read the page or browser_screenshot for visual inspection; verify the requested URL/content with browser_wait before finishing. A successful browser_open already opens the website for the user: do not also launch it through run_shell, xdg-open, open, Start-Process, or another browser. Keep website navigation and interaction in the automation browser. If the user explicitly requests an external browser, use that route instead of first opening the website in automation. If automation is unavailable or blocked, report that and ask the user before switching browsers. For a predefined command-line workflow, write a JSON steps file and run mint browser run --file <file> through run_shell; --headed explicitly shows its window. Use the shared engine rather than hand-written browser scripts. Web scraping restriction: NEVER write ad-hoc Python scripts (e.g., using urllib, requests, BeautifulSoup) or raw curl commands to scrape or inspect web pages. Modern websites require JavaScript rendering via the browser engine. Always prioritize browser_open when given a web URL.");
|
|
525
|
-
}
|
|
526
|
-
if allowed_actions.contains(&"browser_click") {
|
|
527
|
-
rules.push("7b. Use browser_click to click elements. Selector can be: CSS selector (button.class, #id, [attr=val]), text=ExactText to find by visible text, contains=PartialText for partial match, or xpath=//expr for XPath. Prefer text= or contains= when the element has visible text but no unique CSS class.");
|
|
528
|
-
}
|
|
529
|
-
if allowed_actions.contains(&"browser_type") {
|
|
530
|
-
rules.push("7c. Use browser_type to enter text into form fields or search boxes. Selector supports the same formats as browser_click.");
|
|
531
|
-
}
|
|
532
|
-
if allowed_actions.contains(&"browser_read") {
|
|
533
|
-
rules.push(
|
|
534
|
-
"7d. Use browser_read to read the text content of the active page to analyze it.",
|
|
535
|
-
);
|
|
536
|
-
}
|
|
537
|
-
if allowed_actions.contains(&"browser_mouse_move") {
|
|
538
|
-
rules.push("7e. Use browser_mouse_move to move the real mouse cursor to absolute (x,y) coordinates.");
|
|
539
|
-
}
|
|
540
|
-
if allowed_actions.contains(&"browser_mouse_click") {
|
|
541
|
-
rules.push("7f. Use browser_mouse_click to perform a native mouse click at (x,y) coordinates. Use browser_screenshot first to find the target position.");
|
|
542
|
-
}
|
|
543
|
-
if allowed_actions.contains(&"browser_key_press") {
|
|
544
|
-
rules.push("7g. Use browser_key_press to press a keyboard key (e.g. Enter, Tab, Escape, ArrowDown). Use after browser_type or browser_mouse_click to interact with focused elements.");
|
|
545
|
-
}
|
|
546
|
-
if allowed_actions.contains(&"browser_screenshot") {
|
|
547
|
-
rules.push("7h. Use browser_screenshot to capture the page as a durable image artifact, shown in chat and attached to the model. Use it to inspect the visual state of the page before deciding where to click, and to capture visual verification of page content for the user.");
|
|
548
|
-
}
|
|
549
|
-
if allowed_actions.contains(&"browser_observe") {
|
|
550
|
-
rules.push("7i. Browser workflow: browser_observe -> action -> inspect the returned observation -> verify the expected result with browser_wait. Each run starts in its own tab. Use browser_tabs to list/open/select/close tabs; select new popup tabs explicitly. Prefer elementRef from the most recent observation over guessing selectors. Old refs expire after observation refresh, navigation, removed nodes, or tab selection. browser_fill replaces text; browser_type appends. browser_select handles native dropdowns; browser_scroll scrolls the viewport or a target. browser_wait accepts condition url/text/visible/hidden, value or target, and timeoutMs (default 10000, maximum 30000). Observations support textOffset and elementOffset pagination. Coordinate actions require a screenshot of the selected tab within 30 seconds. Never retry an ambiguous click or submission automatically; observe and check the result first. input_dispatched is not task completion. Cite observed URL/text/field evidence in finish.verification, or say the task is unverified/blocked. Age Gate & Cookie Consent Handling: If an age gate (18+ confirmation), cookie banner, or disclaimer modal blocks page content, locate standard confirmation buttons (e.g. \"I am 18 or older\", \"Enter Site\", \"Yes\", \"Agree\", \"Accept\") and dismiss it using browser_click. If the overlay presents sensitive warnings requiring explicit user discretion or consent, capture a browser_screenshot and use ask_user to confirm before proceeding. If blocked by login, CAPTCHA, or repeated lack of progress, ask_user for manual takeover; only after user confirmation call browser_observe with takeoverComplete=true.");
|
|
482
|
+
if allowed_actions.contains(&"run_shell") {
|
|
483
|
+
rules.push("7a. Headless Chrome through run_shell is for deep webpage inspection or rendering, NOT for routine web searches. Use it ONLY when: (a) the user explicitly requests inspecting, reading, or scraping a specific webpage/URL, (b) web_search snippets were blocked or insufficient and direct page reading is required, or (c) rendering local HTML. Never recursively crawl external links found on a page. Mint adds the reliability flags, a throw-away profile and a timeout for you, so write the plain command. (1) Read a page first with `google-chrome --dump-dom <url>` (runs JavaScript, so SPAs work; far cheaper than an image). (2) Only when the visual layout matters: `google-chrome --screenshot=<file>.png <url>` (add --window-size=W,H for a tall or narrow view), then call view_image with that path exactly once per image; a repeated image is not attached again. (3) Never capture the same URL with the same options twice in a turn; Mint refuses repeats unless you pass retryReason because the page really changed. If a result is not what you need, change the URL or options instead of repeating. (4) For clicking, typing or multi-step flows, write a JSON steps file and run `mint browser run --file <file>`. Do NOT scrape modern pages with ad-hoc Python (urllib, requests) or raw curl.");
|
|
551
484
|
}
|
|
552
485
|
if allowed_actions.contains(&"memory_recall") {
|
|
553
486
|
rules.push("8. Use memory_recall to search past interactions before asking the user to repeat context.");
|
|
@@ -591,14 +524,13 @@ For every JSON-backed card, ensure all properties stay inside their intended obj
|
|
|
591
524
|
- Feature showcases: use fenced ```ui-card with JSON array:\n```ui-card\n[{\"title\": \"...\", \"subtitle\": \"...\", \"icon\": \"file-text\", \"badge\": \"...\", \"details\": {\"Key\": \"Value\"}}]\n```\n\
|
|
592
525
|
- UI Prototypes: use fenced ```ui-mockup with JSON object:\n```ui-mockup\n{\"title\": \"...\", \"subtitle\": \"...\", \"dropzoneText\": \"...\", \"metrics\": {...}}\n```\n\
|
|
593
526
|
- Key insights / alerts: use GitHub callouts (> [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING]). Always converse naturally and smoothly; never prefix conversational phrases or greetings with artificial status tags or badge pills. Always put opening and closing ``` fences on their own separate lines.");
|
|
594
|
-
if
|
|
595
|
-
rules.push("12. Shell commands may open local files/folders or launch apps when requested. For websites, follow rule 7a and verify the automation browser's observed page; a shell launch is not evidence that a browser task is complete.");
|
|
596
|
-
} else if native {
|
|
527
|
+
if native {
|
|
597
528
|
rules.push("12. Commands that open URLs, files, folders, or launch apps (e.g. xdg-open, open) run in the background. Once they succeed (exit: 0), you are done. Use the finish tool immediately.");
|
|
598
529
|
} else {
|
|
599
530
|
rules.push("12. Commands that open URLs, files, folders, or launch apps (e.g. xdg-open, open) run in the background. Once they succeed (exit: 0), you are done. Use the 'finish' action immediately.");
|
|
600
531
|
}
|
|
601
532
|
rules.push("12a. Development servers and watchers must use run_shell with background: true so the tool returns a job_id immediately. For Python use python3 -u -m http.server <port>. Inspect shell_output and verify an HTTP response before claiming a server is ready; a job_id alone only proves it started. Keep existing background jobs alive when finishing a response or cancelling AI work, unless the user asks to stop them. Use kill_shell to stop only the requested job.");
|
|
533
|
+
rules.push("12b. When a command is moved to the background or reports running_in_background, the process is actively executing. NEVER rerun, rewrite, or switch approaches. You must use shell_output to await its completion.");
|
|
602
534
|
let mature_rule = format!("13. {}", persona::MATURE_CONTENT_POLICY);
|
|
603
535
|
rules.push(&mature_rule);
|
|
604
536
|
|
|
@@ -640,3 +572,47 @@ For every JSON-backed card, ensure all properties stay inside their intended obj
|
|
|
640
572
|
}
|
|
641
573
|
prompt
|
|
642
574
|
}
|
|
575
|
+
|
|
576
|
+
#[cfg(test)]
|
|
577
|
+
mod headless_playbook_tests {
|
|
578
|
+
use super::*;
|
|
579
|
+
|
|
580
|
+
fn shell_mode_prompt() -> String {
|
|
581
|
+
let config = MintConfig::default();
|
|
582
|
+
build_system_prompt(&config, false, false, None, None)
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
#[test]
|
|
586
|
+
fn shell_mode_teaches_the_headless_chrome_playbook() {
|
|
587
|
+
let prompt = shell_mode_prompt();
|
|
588
|
+
for needle in [
|
|
589
|
+
"--dump-dom",
|
|
590
|
+
"--screenshot=",
|
|
591
|
+
"view_image",
|
|
592
|
+
"once per image",
|
|
593
|
+
"same URL",
|
|
594
|
+
"mint browser run",
|
|
595
|
+
] {
|
|
596
|
+
assert!(prompt.contains(needle), "playbook is missing {needle:?}");
|
|
597
|
+
}
|
|
598
|
+
assert!(
|
|
599
|
+
!prompt.contains("browser_open"),
|
|
600
|
+
"no browser_* tools in shell mode"
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
#[test]
|
|
605
|
+
fn web_search_playbook_enforces_information_sufficiency_and_ask_user_gate() {
|
|
606
|
+
let prompt = shell_mode_prompt();
|
|
607
|
+
for needle in [
|
|
608
|
+
"Information Sufficiency",
|
|
609
|
+
"call `ask_user` with clear options",
|
|
610
|
+
"Never recursively crawl",
|
|
611
|
+
] {
|
|
612
|
+
assert!(
|
|
613
|
+
prompt.contains(needle),
|
|
614
|
+
"web search playbook is missing {needle:?}"
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
@@ -12,7 +12,7 @@ use std::path::Path;
|
|
|
12
12
|
|
|
13
13
|
use serde_json::{Value, json};
|
|
14
14
|
|
|
15
|
-
use super::agent::{PLAN_MODE_ALLOWED_ACTIONS, base_allowed_actions
|
|
15
|
+
use super::agent::{PLAN_MODE_ALLOWED_ACTIONS, base_allowed_actions};
|
|
16
16
|
use crate::MintConfig;
|
|
17
17
|
use crate::chat::ToolSpec;
|
|
18
18
|
use crate::subagents::list_subagents;
|
|
@@ -54,9 +54,6 @@ pub fn tool_catalog(
|
|
|
54
54
|
allow_subagent_dispatch: bool,
|
|
55
55
|
) -> Vec<ToolSpec> {
|
|
56
56
|
let mut allowed = base_allowed_actions();
|
|
57
|
-
if browser_tools_enabled(config) {
|
|
58
|
-
allowed.extend_from_slice(crate::browser::BROWSER_TOOLS);
|
|
59
|
-
}
|
|
60
57
|
if !config.avatar_token.is_empty() && !config.avatar_signal_disabled {
|
|
61
58
|
allowed.push("avatar_signal");
|
|
62
59
|
}
|
|
@@ -356,121 +353,6 @@ fn all_tools() -> Vec<ToolSpec> {
|
|
|
356
353
|
&["expression"],
|
|
357
354
|
),
|
|
358
355
|
),
|
|
359
|
-
tool(
|
|
360
|
-
"browser_open",
|
|
361
|
-
"Navigate the automation browser to a URL.",
|
|
362
|
-
schema(json!({ "url": { "type": "string" } }), &["url"]),
|
|
363
|
-
),
|
|
364
|
-
tool(
|
|
365
|
-
"browser_click",
|
|
366
|
-
"Click an observed element. Provide elementRef or selector, not both.",
|
|
367
|
-
schema(
|
|
368
|
-
json!({"elementRef":{"type":"string"},"selector":{"type":"string"}}),
|
|
369
|
-
&[],
|
|
370
|
-
),
|
|
371
|
-
),
|
|
372
|
-
tool(
|
|
373
|
-
"browser_type",
|
|
374
|
-
"Append text to a field. Provide elementRef or selector, not both.",
|
|
375
|
-
schema(
|
|
376
|
-
json!({"elementRef":{"type":"string"},"selector":{"type":"string"},"text":{"type":"string"}}),
|
|
377
|
-
&["text"],
|
|
378
|
-
),
|
|
379
|
-
),
|
|
380
|
-
tool(
|
|
381
|
-
"browser_fill",
|
|
382
|
-
"Replace a field's value and verify it.",
|
|
383
|
-
schema(
|
|
384
|
-
json!({"elementRef":{"type":"string"},"selector":{"type":"string"},"text":{"type":"string"}}),
|
|
385
|
-
&["text"],
|
|
386
|
-
),
|
|
387
|
-
),
|
|
388
|
-
tool(
|
|
389
|
-
"browser_select",
|
|
390
|
-
"Select a native dropdown option by value.",
|
|
391
|
-
schema(
|
|
392
|
-
json!({"elementRef":{"type":"string"},"selector":{"type":"string"},"value":{"type":"string"}}),
|
|
393
|
-
&["value"],
|
|
394
|
-
),
|
|
395
|
-
),
|
|
396
|
-
tool(
|
|
397
|
-
"browser_observe",
|
|
398
|
-
"Read structured page state and fresh element references. Confirm takeover only after the user has completed it.",
|
|
399
|
-
schema(
|
|
400
|
-
json!({"textOffset":{"type":"integer","minimum":0},"elementOffset":{"type":"integer","minimum":0},"takeoverComplete":{"type":"boolean"}}),
|
|
401
|
-
&[],
|
|
402
|
-
),
|
|
403
|
-
),
|
|
404
|
-
tool(
|
|
405
|
-
"browser_tabs",
|
|
406
|
-
"List/open/select/close tabs. Selection and closure require explicit tabId; popups are never auto-selected.",
|
|
407
|
-
schema(
|
|
408
|
-
json!({"operation":{"type":"string","enum":["list","open","select","close"]},"tabId":{"type":"string"},"url":{"type":"string"}}),
|
|
409
|
-
&["operation"],
|
|
410
|
-
),
|
|
411
|
-
),
|
|
412
|
-
tool(
|
|
413
|
-
"browser_scroll",
|
|
414
|
-
"Scroll the viewport or an observed element by pixels.",
|
|
415
|
-
schema(
|
|
416
|
-
json!({"elementRef":{"type":"string"},"selector":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"}}),
|
|
417
|
-
&[],
|
|
418
|
-
),
|
|
419
|
-
),
|
|
420
|
-
tool(
|
|
421
|
-
"browser_wait",
|
|
422
|
-
"Wait for a URL, text, or element visibility condition; at most 30 seconds.",
|
|
423
|
-
schema(
|
|
424
|
-
json!({"condition":{"type":"string","enum":["url","text","visible","hidden"]},"value":{"type":"string"},"elementRef":{"type":"string"},"selector":{"type":"string"},"timeoutMs":{"type":"integer","minimum":1,"maximum":30000}}),
|
|
425
|
-
&["condition"],
|
|
426
|
-
),
|
|
427
|
-
),
|
|
428
|
-
tool(
|
|
429
|
-
"browser_read",
|
|
430
|
-
"Read the text content of the active browser page.",
|
|
431
|
-
schema(json!({}), &[]),
|
|
432
|
-
),
|
|
433
|
-
tool(
|
|
434
|
-
"browser_mouse_move",
|
|
435
|
-
"Move the browser cursor to viewport (x, y) coordinates.",
|
|
436
|
-
schema(
|
|
437
|
-
json!({ "x": { "type": "number" }, "y": { "type": "number" } }),
|
|
438
|
-
&["x", "y"],
|
|
439
|
-
),
|
|
440
|
-
),
|
|
441
|
-
tool(
|
|
442
|
-
"browser_mouse_click",
|
|
443
|
-
"Perform a native mouse click at (x, y). Use browser_screenshot first to find the target position.",
|
|
444
|
-
schema(
|
|
445
|
-
json!({
|
|
446
|
-
"x": { "type": "number" },
|
|
447
|
-
"y": { "type": "number" },
|
|
448
|
-
"button": { "type": "string", "description": "left | right | middle. Defaults to left." }
|
|
449
|
-
}),
|
|
450
|
-
&["x", "y"],
|
|
451
|
-
),
|
|
452
|
-
),
|
|
453
|
-
tool(
|
|
454
|
-
"browser_key_press",
|
|
455
|
-
"Press a keyboard key in the automation browser.",
|
|
456
|
-
schema(
|
|
457
|
-
json!({
|
|
458
|
-
"key": {
|
|
459
|
-
"type": "string",
|
|
460
|
-
"description": "Enter, Tab, Escape, Backspace, Delete, ArrowUp/Down/Left/Right, F1-F12, Space, ..."
|
|
461
|
-
}
|
|
462
|
-
}),
|
|
463
|
-
&["key"],
|
|
464
|
-
),
|
|
465
|
-
),
|
|
466
|
-
tool(
|
|
467
|
-
"browser_screenshot",
|
|
468
|
-
"Capture the current automation browser page as an image.",
|
|
469
|
-
schema(
|
|
470
|
-
json!({"mode":{"type":"string","enum":["viewport","fullPage","element"]},"selector":{"type":"string"},"elementRef":{"type":"string"}}),
|
|
471
|
-
&[],
|
|
472
|
-
),
|
|
473
|
-
),
|
|
474
356
|
tool(
|
|
475
357
|
"memory_recall",
|
|
476
358
|
"Search past interactions/memory before asking the user to repeat context.",
|
|
@@ -1101,42 +983,17 @@ fn all_tools() -> Vec<ToolSpec> {
|
|
|
1101
983
|
mod browser_startup_tests {
|
|
1102
984
|
use super::*;
|
|
1103
985
|
#[test]
|
|
1104
|
-
fn
|
|
1105
|
-
let
|
|
986
|
+
fn browser_tools_are_superseded_by_shell_playbook() {
|
|
987
|
+
let config = MintConfig::default();
|
|
1106
988
|
let default_tools = tool_catalog(&config, false, Path::new("."), false);
|
|
1107
|
-
//
|
|
1108
|
-
assert!(default_tools.iter().any(|tool| tool.name == "browser_open"));
|
|
1109
|
-
|
|
1110
|
-
// Explicitly disabling browser automation removes browser tools.
|
|
1111
|
-
config
|
|
1112
|
-
.extra
|
|
1113
|
-
.insert("browserAutomationEnabled".into(), json!(false));
|
|
1114
|
-
let disabled_tools = tool_catalog(&config, false, Path::new("."), false);
|
|
1115
|
-
assert!(
|
|
1116
|
-
!disabled_tools
|
|
1117
|
-
.iter()
|
|
1118
|
-
.any(|tool| tool.name == "browser_open")
|
|
1119
|
-
);
|
|
1120
|
-
|
|
1121
|
-
config
|
|
1122
|
-
.extra
|
|
1123
|
-
.insert("browserAutomationEnabled".into(), json!(true));
|
|
1124
|
-
config.extra.insert(
|
|
1125
|
-
"browserDebugUrl".into(),
|
|
1126
|
-
json!("http://127.0.0.1:1/json/list"),
|
|
1127
|
-
);
|
|
1128
|
-
let tools = tool_catalog(&config, false, Path::new("."), false);
|
|
1129
|
-
assert!(tools.iter().any(|tool| tool.name == "browser_open"));
|
|
1130
|
-
assert!(
|
|
1131
|
-
crate::prompts::agent::build_system_prompt(&config, false, false, None, None)
|
|
1132
|
-
.contains("browser_open")
|
|
1133
|
-
);
|
|
1134
|
-
config.disabled_tools.push("browser_open".into());
|
|
989
|
+
// Agent browser_* tools are removed; web browsing is done via run_shell
|
|
990
|
+
assert!(!default_tools.iter().any(|tool| tool.name == "browser_open"));
|
|
1135
991
|
assert!(
|
|
1136
|
-
!
|
|
992
|
+
!default_tools
|
|
1137
993
|
.iter()
|
|
1138
|
-
.any(|tool| tool.name == "
|
|
994
|
+
.any(|tool| tool.name == "browser_screenshot")
|
|
1139
995
|
);
|
|
996
|
+
assert!(default_tools.iter().any(|tool| tool.name == "run_shell"));
|
|
1140
997
|
}
|
|
1141
998
|
}
|
|
1142
999
|
|
|
@@ -108,6 +108,17 @@ pub fn resolve_readable_path(target: &str, workspace: Option<&Path>) -> PathBuf
|
|
|
108
108
|
candidates.push(ws.join(&norm_slash));
|
|
109
109
|
}
|
|
110
110
|
candidates.push(ws.join(trimmed));
|
|
111
|
+
|
|
112
|
+
// Defensively recover from duplicated workspace prefixes (e.g. /workspace/workspace/file)
|
|
113
|
+
let ws_norm = ws.to_string_lossy().replace('\\', "/");
|
|
114
|
+
let ws_clean = ws_norm.trim_end_matches('/');
|
|
115
|
+
if let Some(rest) = norm_slash.strip_prefix(ws_clean) {
|
|
116
|
+
let inner = rest.trim_start_matches('/');
|
|
117
|
+
if !inner.is_empty() {
|
|
118
|
+
candidates.push(PathBuf::from(format!("/{}", inner)));
|
|
119
|
+
candidates.push(PathBuf::from(inner));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
111
122
|
}
|
|
112
123
|
}
|
|
113
124
|
|
|
@@ -304,6 +315,15 @@ mod tests {
|
|
|
304
315
|
let resolved_win = resolve_readable_path("sub\\sample.md", Some(&temp_dir));
|
|
305
316
|
assert_eq!(resolved_win, test_file);
|
|
306
317
|
|
|
318
|
+
// Duplicated workspace prefix recovery
|
|
319
|
+
let duplicated = format!(
|
|
320
|
+
"{}/{}",
|
|
321
|
+
temp_dir.to_string_lossy(),
|
|
322
|
+
test_file.to_string_lossy().trim_start_matches('/')
|
|
323
|
+
);
|
|
324
|
+
let resolved_dup = resolve_readable_path(&duplicated, Some(&temp_dir));
|
|
325
|
+
assert_eq!(resolved_dup, test_file);
|
|
326
|
+
|
|
307
327
|
// Non-existent path returns fallback joined with workspace
|
|
308
328
|
let missing = resolve_readable_path("missing.md", Some(&temp_dir));
|
|
309
329
|
assert_eq!(missing, temp_dir.join("missing.md"));
|