@runfusion/fusion 0.73.0-beta.2 → 0.73.0-beta.4
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/agent-browser.mjs +8 -0
- package/dist/bin.js +7664 -11386
- package/dist/child-process-worker.js +4292 -8374
- package/dist/client/.vite/manifest.json +266 -256
- package/dist/client/assets/{AgentDetailView-CUoHZPZr.js → AgentDetailView-BBOL6AgZ.js} +3 -3
- package/dist/client/assets/{AgentPermissionPolicyEditor-DKoHJIlF.js → AgentPermissionPolicyEditor-DV7OPUhR.js} +1 -1
- package/dist/client/assets/{AgentsView-CaBo-FHV.js → AgentsView-B6xoAHyV.js} +4 -4
- package/dist/client/assets/ChatView-DwVjnxM8.js +8 -0
- package/dist/client/assets/{CommandCenter-wgiEIVuC.js → CommandCenter-DYWaoYFD.js} +9 -9
- package/dist/client/assets/DevServerView-BY5up-NA.js +1 -0
- package/dist/client/assets/{DirectoryPicker-B7YwgF53.js → DirectoryPicker-fM8MJa2r.js} +1 -1
- package/dist/client/assets/DocumentsView-D2KxsPG_.js +1 -0
- package/dist/client/assets/{EvalsView-BjyqxMS_.js → EvalsView-U8dOvTRM.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-_PMSa_gN.js → ExperimentalAgentOnboardingModal-C27y8Y-1.js} +1 -1
- package/dist/client/assets/{GoalsView-BzLA8GX9.js → GoalsView-D-2wmy-O.js} +1 -1
- package/dist/client/assets/{InsightsView-Cb_tUr1V.js → InsightsView-zLyuQL_l.js} +2 -2
- package/dist/client/assets/{MemoryView-CRxOPCQq.js → MemoryView-D-tSn48u.js} +2 -2
- package/dist/client/assets/{PiExtensionsManager-XQ5rWJT3.js → PiExtensionsManager-DvwmvGEY.js} +2 -2
- package/dist/client/assets/PluginManager-BACOwQAN.js +1 -0
- package/dist/client/assets/{PullRequestView-CX6fScVe.js → PullRequestView-DULyv21u.js} +2 -2
- package/dist/client/assets/{ReportModal-BSCk5ER1.css → ReportModal-BuhhqtXJ.css} +1 -1
- package/dist/client/assets/ReportModal-CUlKMFWa.js +21 -0
- package/dist/client/assets/{ResearchView-DgKzxRUL.js → ResearchView-DM_O3IFc.js} +2 -2
- package/dist/client/assets/{SecretsView-C83SIrjR.js → SecretsView-Bq3u_nAf.js} +1 -1
- package/dist/client/assets/SessionTerminal-D00ByR6U.js +2 -0
- package/dist/client/assets/SettingsModal-Bb3pIxiX.js +21 -0
- package/dist/client/assets/SettingsModal-CMLHZBhX.css +1 -0
- package/dist/client/assets/SettingsModal-QRaBE1ds.js +1 -0
- package/dist/client/assets/{SettingsTextareaRow-BKGsmZ7C.js → SettingsTextareaRow-CHOJ-qHz.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-DIb4q-VT.js → SetupWizardModal-DriQyd81.js} +2 -2
- package/dist/client/assets/{SkillsView-D1Zxh1iX.js → SkillsView-BtDyujiZ.js} +1 -1
- package/dist/client/assets/{TodoView-CGIcE6Yr.js → TodoView-BNHUnz50.js} +2 -2
- package/dist/client/assets/{WorkflowNodeEditor-BtWrziOX.css → WorkflowNodeEditor-BNgkFJ_P.css} +1 -1
- package/dist/client/assets/WorkflowNodeEditor-BXikFpra.js +8 -0
- package/dist/client/assets/agent-import-generation-B2kYEm1O.js +1 -0
- package/dist/client/assets/app-B_HrdDXZ.js +13 -0
- package/dist/client/assets/{app-BsIXfnu-.js → app-C6yo-M_n.js} +1 -1
- package/dist/client/assets/{app-B-IdUeIu.js → app-CH8ZgPm4.js} +1 -1
- package/dist/client/assets/{app-D9ktpVhR.js → app-D4DpgDss.js} +1 -1
- package/dist/client/assets/{app-nBTNvNKK.js → app-Qv0blCyY.js} +1 -1
- package/dist/client/assets/{app-C8muVNUU.js → app-kFdtajPy.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-Dv83GkUE.js → architectureDiagram-3BPJPVTR-B-Efjj4Z.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-B_j-RJOz.js → blockDiagram-GPEHLZMM-CaOVxrlM.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-Cy3f-SD1.js → c4Diagram-AAUBKEIU-D8aYt5F1.js} +1 -1
- package/dist/client/assets/channel-5bPK6pTS.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-CPolddUJ.js → chunk-2J33WTMH-VSDT0J0r.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-BAGPgwkc.js → chunk-4BX2VUAB-Chx1wQgD.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-dzYFOH0q.js → chunk-55IACEB6-MlqjhIJg.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-ul9hGhiR.js → chunk-727SXJPM-BheQNUi8.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-C75yqe4-.js → chunk-AQP2D5EJ-C5EoJhfJ.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-BwiLAyup.js → chunk-FMBD7UC4-B8_8qP3j.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-CVv1sLhy.js → chunk-ND2GUHAM-BuglCGRx.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-D1c-k3xL.js → chunk-QZHKN3VN-B7_06dxp.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-Dv9RQDqG.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-Dv9RQDqG.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-DosMsFd6.js → cose-bilkent-S5V4N54A-Cm-ZOycx.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-9os-QBXe.js → dagre-BM42HDAG-Dj_Gwjpv.js} +1 -1
- package/dist/client/assets/{dashboard-view-CNVTxyWE.js → dashboard-view-B4CRL5Fy.js} +1 -1
- package/dist/client/assets/{dashboard-view-Bn7iL770.js → dashboard-view-noD9p0Zs.js} +1 -1
- package/dist/client/assets/{dashboard-view-iwAS1HTp.js → dashboard-view-pXXSUxG9.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-ChjuJgA6.js → diagram-2AECGRRQ-C_9BfShy.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-Cq10aB4z.js → diagram-5GNKFQAL-Cmg2qpCj.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-CKjyrzjg.js → diagram-KO2AKTUF-2FNo2HXb.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-DxCc1BsH.js → diagram-LMA3HP47-DgnVeCp-.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-DJWEkDsR.js → diagram-OG6HWLK6-iAIR50HH.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-gVkDYC92.js → erDiagram-TEJ5UH35-Da4I04eN.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-1lw1mQRQ.js → flowDiagram-I6XJVG4X-Bv9r2T0m.js} +1 -1
- package/dist/client/assets/{folder-open-Nmr7nRmN.js → folder-open-CwWtrDh6.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-Yzq4WZRo.js → ganttDiagram-6RSMTGT7-BMeO84U_.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-cFR9Gv8n.js → gitGraphDiagram-PVQCEYII-CWDh_RIb.js} +1 -1
- package/dist/client/assets/index-CB3mYxAB.css +1 -0
- package/dist/client/assets/index-CE7C_XsS.js +2661 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-BbRiTnD3.js → infoDiagram-5YYISTIA-BAE4KtCL.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DD4i2Znk.js → ishikawaDiagram-YF4QCWOH-C_iXAuOy.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-qHPO2M-C.js → journeyDiagram-JHISSGLW-BnxSHwDo.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-EuFfgxUv.js → kanban-definition-UN3LZRKU-DYNRm3Nu.js} +1 -1
- package/dist/client/assets/{mermaid.core-Cru9Vzsy.js → mermaid.core-B3hvDDep.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-mCvtfapj.js → mindmap-definition-RKZ34NQL-s7KBEuPD.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-BSc_a5Dz.js → pieDiagram-4H26LBE5-Cy1_IPUD.js} +1 -1
- package/dist/client/assets/{puzzle-Cz66CEWW.js → puzzle-DWc6gFQ7.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Um2SLb_d.js → quadrantDiagram-W4KKPZXB-DqgVGp41.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-B94evN7g.js → requirementDiagram-4Y6WPE33-CA5-TDeF.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BH7NLX-K.js → sankeyDiagram-5OEKKPKP-Cuvi3RgE.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DusrBGQp.js → sequenceDiagram-3UESZ5HK-Da3GfmGP.js} +1 -1
- package/dist/client/assets/{shield-alert-CcQuaRHN.js → shield-alert-_iY63ED4.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-CVnY93Xy.js → standing-instructions-template-CCd2YY9c.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-GRjL9YlX.js → stateDiagram-AJRCARHV-CZ_I9ENR.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-BBsv6ppQ.js → stateDiagram-v2-BHNVJYJU-BomoRVhY.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-DC6UeqjY.js → timeline-definition-PNZ67QCA-C3CYvIuR.js} +1 -1
- package/dist/client/assets/{upload-CjJp7lEX.js → upload-D0RrO65v.js} +1 -1
- package/dist/client/assets/{users-DgimRYHz.js → users-CGszBY2v.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-C272zK9h.js → vennDiagram-CIIHVFJN-By9fi8NW.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-KkRF-2j9.js → wardley-L42UT6IY-DErnXPkI.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-B4brtKRt.js → wardleyDiagram-YWT4CUSO-DFfXZVPk.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6--PFSKt1s.js → xychartDiagram-2RQKCTM6-9Y5oZ5mi.js} +1 -1
- package/dist/client/index.html +4 -2
- package/dist/client/version.json +1 -1
- package/dist/extension.js +4516 -8539
- package/dist/migrations/0000_initial.sql +2 -0
- package/dist/migrations/0026_bigint_counters.sql +85 -14
- package/dist/migrations/0033_fn-8505_wedge_notification.sql +5 -0
- package/dist/plugin-sdk/index.js +1 -0
- package/dist/plugins/.fusion-ce-agents/.fusion-ce-upstream-provenance.json +7 -0
- package/dist/plugins/.fusion-ce-agents/ce-adversarial-document-reviewer.md +115 -0
- package/dist/plugins/.fusion-ce-agents/ce-adversarial-reviewer.md +111 -0
- package/dist/plugins/.fusion-ce-agents/ce-agent-native-planning-strategist.md +71 -0
- package/dist/plugins/.fusion-ce-agents/ce-agent-native-reviewer.md +181 -0
- package/dist/plugins/.fusion-ce-agents/ce-ankane-readme-writer.md +50 -0
- package/dist/plugins/.fusion-ce-agents/ce-api-contract-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-architecture-strategist.md +53 -0
- package/dist/plugins/.fusion-ce-agents/ce-best-practices-researcher.md +122 -0
- package/dist/plugins/.fusion-ce-agents/ce-code-simplicity-reviewer.md +87 -0
- package/dist/plugins/.fusion-ce-agents/ce-coherence-reviewer.md +73 -0
- package/dist/plugins/.fusion-ce-agents/ce-correctness-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-data-integrity-guardian.md +75 -0
- package/dist/plugins/.fusion-ce-agents/ce-data-migration-reviewer.md +119 -0
- package/dist/plugins/.fusion-ce-agents/ce-deployment-verification-agent.md +164 -0
- package/dist/plugins/.fusion-ce-agents/ce-design-implementation-reviewer.md +94 -0
- package/dist/plugins/.fusion-ce-agents/ce-design-iterator.md +197 -0
- package/dist/plugins/.fusion-ce-agents/ce-design-lens-reviewer.md +56 -0
- package/dist/plugins/.fusion-ce-agents/ce-feasibility-reviewer.md +65 -0
- package/dist/plugins/.fusion-ce-agents/ce-figma-design-sync.md +172 -0
- package/dist/plugins/.fusion-ce-agents/ce-framework-docs-researcher.md +100 -0
- package/dist/plugins/.fusion-ce-agents/ce-git-history-analyzer.md +47 -0
- package/dist/plugins/.fusion-ce-agents/ce-issue-intelligence-analyst.md +207 -0
- package/dist/plugins/.fusion-ce-agents/ce-julik-frontend-races-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-learnings-researcher.md +254 -0
- package/dist/plugins/.fusion-ce-agents/ce-maintainability-reviewer.md +77 -0
- package/dist/plugins/.fusion-ce-agents/ce-pattern-recognition-specialist.md +62 -0
- package/dist/plugins/.fusion-ce-agents/ce-performance-oracle.md +115 -0
- package/dist/plugins/.fusion-ce-agents/ce-performance-reviewer.md +54 -0
- package/dist/plugins/.fusion-ce-agents/ce-pr-comment-resolver.md +63 -0
- package/dist/plugins/.fusion-ce-agents/ce-previous-comments-reviewer.md +68 -0
- package/dist/plugins/.fusion-ce-agents/ce-product-lens-reviewer.md +92 -0
- package/dist/plugins/.fusion-ce-agents/ce-project-standards-reviewer.md +84 -0
- package/dist/plugins/.fusion-ce-agents/ce-reliability-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-repo-research-analyst.md +263 -0
- package/dist/plugins/.fusion-ce-agents/ce-scope-guardian-reviewer.md +79 -0
- package/dist/plugins/.fusion-ce-agents/ce-security-lens-reviewer.md +48 -0
- package/dist/plugins/.fusion-ce-agents/ce-security-reviewer.md +54 -0
- package/dist/plugins/.fusion-ce-agents/ce-security-sentinel.md +98 -0
- package/dist/plugins/.fusion-ce-agents/ce-session-historian.md +89 -0
- package/dist/plugins/.fusion-ce-agents/ce-slack-researcher.md +133 -0
- package/dist/plugins/.fusion-ce-agents/ce-spec-flow-analyzer.md +87 -0
- package/dist/plugins/.fusion-ce-agents/ce-swift-ios-reviewer.md +107 -0
- package/dist/plugins/.fusion-ce-agents/ce-testing-reviewer.md +52 -0
- package/dist/plugins/.fusion-ce-agents/ce-web-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/.fusion-ce-upstream-provenance.json +7 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/SKILL.md +318 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/brainstorm-sections.md +354 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/handoff.md +172 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/html-rendering.md +662 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/markdown-rendering.md +236 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/synthesis-summary.md +271 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/universal-brainstorming.md +71 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/references/visual-probes.md +128 -0
- package/dist/plugins/.fusion-ce-skills/ce-brainstorm/scripts/visual-probe-server.js +419 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/SKILL.md +821 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/action-class-rubric.md +26 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/bulk-preview.md +112 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/cross-model-review.md +63 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/diff-scope.md +41 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/findings-schema.json +137 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/persona-catalog.md +63 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/adversarial-reviewer.md +102 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/agent-native-reviewer.md +173 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/api-contract-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/correctness-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/data-migration-reviewer.md +111 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/deployment-verification-agent.md +157 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/julik-frontend-races-reviewer.md +44 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/learnings-researcher.md +247 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/maintainability-reviewer.md +68 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/performance-reviewer.md +45 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/previous-comments-reviewer.md +59 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/project-standards-reviewer.md +75 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/reliability-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/security-reviewer.md +45 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/swift-ios-reviewer.md +99 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/personas/testing-reviewer.md +43 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/review-output-template.md +170 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/subagent-template.md +199 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/tracker-defer.md +149 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/validator-template.md +89 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/references/walkthrough.md +249 -0
- package/dist/plugins/.fusion-ce-skills/ce-code-review/scripts/cross-model-adversarial-review.sh +218 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit/SKILL.md +105 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit-push-pr/SKILL.md +134 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit-push-pr/references/branch-creation.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-commit-push-pr/references/pr-description-writing.md +115 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/SKILL.md +712 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/assets/resolution-template.md +94 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/performance-oracle.md +108 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/security-sentinel.md +91 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/agents/session-historian.md +83 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/concepts-vocabulary.md +78 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/schema.yaml +231 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/references/yaml-schema.md +118 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/discover-sessions.sh +130 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-errors.py +254 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-metadata.py +456 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/session-history/extract-skeleton.py +570 -0
- package/dist/plugins/.fusion-ce-skills/ce-compound/scripts/validate-frontmatter.py +137 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/SKILL.md +257 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/references/anti-patterns.md +91 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/references/defense-in-depth.md +35 -0
- package/dist/plugins/.fusion-ce-skills/ce-debug/references/investigation-techniques.md +374 -0
- package/dist/plugins/.fusion-ce-skills/ce-doc-review/SKILL.md +70 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/SKILL.md +401 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/issue-intelligence-analyst.md +200 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/slack-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/agents/web-researcher.md +121 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/divergent-ideation.md +89 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/html-rendering.md +662 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/ideation-sections.md +191 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/markdown-rendering.md +236 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/post-ideation-workflow.md +166 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/universal-ideation.md +107 -0
- package/dist/plugins/.fusion-ce-skills/ce-ideate/references/web-research-cache.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/SKILL.md +858 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/agent-native-planning-strategist.md +62 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/architecture-strategist.md +46 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/best-practices-researcher.md +114 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/data-migration-reviewer.md +103 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/deployment-verification-agent.md +157 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/framework-docs-researcher.md +93 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/learnings-researcher.md +247 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/performance-oracle.md +108 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/repo-research-analyst.md +256 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/security-sentinel.md +91 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/slack-researcher.md +127 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/spec-flow-analyzer.md +80 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/agents/web-researcher.md +121 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/approach-altitude.md +55 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/deepening-workflow.md +259 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/html-rendering.md +668 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/markdown-rendering.md +236 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/plan-handoff.md +126 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/plan-sections.md +405 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/synthesis-summary.md +396 -0
- package/dist/plugins/.fusion-ce-skills/ce-plan/references/universal-planning.md +168 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/SKILL.md +53 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/agents/pr-comment-resolver.md +56 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/evaluation-rubric.md +106 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/full-mode.md +283 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/references/targeted-mode.md +45 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/get-pr-comments +159 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/get-thread-for-comment +76 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread +33 -0
- package/dist/plugins/.fusion-ce-skills/ce-resolve-pr-feedback/scripts/resolve-pr-thread +23 -0
- package/dist/plugins/.fusion-ce-skills/ce-strategy/SKILL.md +97 -0
- package/dist/plugins/.fusion-ce-skills/ce-strategy/references/interview.md +143 -0
- package/dist/plugins/.fusion-ce-skills/ce-strategy/references/strategy-template.md +89 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/SKILL.md +429 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/agents/figma-design-sync.md +165 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/execution-engines.md +85 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/non-code-execution.md +23 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/review-findings-followup.md +104 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/shipping-workflow.md +133 -0
- package/dist/plugins/.fusion-ce-skills/ce-work/references/tracker-defer.md +149 -0
- package/dist/plugins/fusion-plugin-compound-engineering/.bundled.reload-3.js +11266 -0
- package/dist/plugins/fusion-plugin-compound-engineering/.bundled.reload-4.js +11266 -0
- package/dist/plugins/fusion-plugin-dependency-graph/.bundled.reload-1.js +8206 -0
- package/dist/plugins/fusion-plugin-grok-runtime/.bundled.reload-2.js +26623 -0
- package/package.json +6 -3
- package/skill/fusion/references/engine-tools.md +6 -2
- package/dist/client/assets/ChatView-Bv0J5p5U.js +0 -8
- package/dist/client/assets/DevServerView-Ue9XG_4H.js +0 -1
- package/dist/client/assets/DocumentsView-C1Ptwcv5.js +0 -1
- package/dist/client/assets/PluginManager-CXPSlWxs.js +0 -1
- package/dist/client/assets/ReportModal-JhZZXZlj.js +0 -21
- package/dist/client/assets/SessionTerminal-BrK3psiC.js +0 -2
- package/dist/client/assets/SettingsModal-Bby9vLGx.js +0 -21
- package/dist/client/assets/SettingsModal-DVLqY1-7.js +0 -1
- package/dist/client/assets/SettingsModal-DXArgTTx.css +0 -1
- package/dist/client/assets/WorkflowNodeEditor-BXUC0lim.js +0 -8
- package/dist/client/assets/app-DUszvars.js +0 -13
- package/dist/client/assets/channel-BuhC8kaT.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-vpRR5WOg.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-vpRR5WOg.js +0 -1
- package/dist/client/assets/index-Cg9ahVtV.js +0 -2661
- package/dist/client/assets/index-uhXHk1ek.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./vendor-react-SZ_qB27O.js";import{a9 as He,b8 as Ve,b9 as Qe,ba as pe,bb as Je,X as me,aO as Ke,bc as Ye,aG as he,P as be,aZ as ye,v as xe,R as fe,aJ as Xe,U as Ze,bd as es,be as ss,bf as ns,bg as is,bh as je,bi as ts,bj as as,bk as M,bl as ls,bm as rs}from"./index-Cg9ahVtV.js";import{D as os}from"./DirectoryPicker-B7YwgF53.js";import{u as us}from"./vendor-i18n-GF3RlKbq.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-reactflow-9C3XTE7_.js";import"./vendor-xterm-BNq00GSj.js";import"./folder-open-Nmr7nRmN.js";const cs="/api/plugins/fusion-plugin-whatsapp-chat",ds=/^\d+$/;function Q(r,c){const n=c?`?projectId=${encodeURIComponent(c)}`:"";return`${cs}${r}${n}`}function gs({projectId:r,settings:c}){const[n,j]=d.useState(null),[b,C]=d.useState(null),[D,_]=d.useState(()=>String(c?.pairingPhoneNumber??"")),[F,S]=d.useState(null),[P,k]=d.useState(null),w=d.useCallback(async()=>{try{const l=await fetch(Q("/status",r)),y=await l.json();if(!l.ok)throw new Error(y.error??"WhatsApp pairing is unavailable. Enable the plugin and try again.");j(y),C(null)}catch(l){C(l instanceof Error?l.message:String(l))}},[r]);d.useEffect(()=>{w();const l=window.setInterval(()=>void w(),5e3);return()=>window.clearInterval(l)},[w]);const O=async()=>{const l=D.trim();if(!l||!ds.test(l)){S("Enter an E.164 phone number using digits only, without +.");return}k("code"),S(null);try{const y=await fetch(Q("/pair-code",r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phoneNumber:l,...r?{projectId:r}:{}})}),p=await y.json();if(!y.ok)throw new Error(p.error??"Could not request a pairing code.");j(x=>({status:"awaiting-code",...x,pairingCode:p.pairingCode})),await w()}catch(y){S(y instanceof Error?y.message:String(y))}finally{k(null)}},U=async()=>{k("logout"),S(null);try{const l=await fetch(Q("/logout",r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r?{projectId:r}:{})});if(!l.ok){const y=await l.json();throw new Error(y.error??"Could not log out from WhatsApp.")}await w()}catch(l){S(l instanceof Error?l.message:String(l))}finally{k(null)}},B=c?.pairingMode==="code"?"code":"qr",R=n?.status??"starting";return e.jsxs("section",{className:"whatsapp-pairing-panel","aria-labelledby":"whatsapp-pairing-heading",children:[e.jsxs("div",{className:"whatsapp-pairing-heading-row",children:[e.jsxs("div",{children:[e.jsx("h5",{id:"whatsapp-pairing-heading",className:"plugin-detail-section-heading",children:"WhatsApp pairing"}),e.jsx("p",{className:"whatsapp-pairing-description",children:"Pair and monitor this project's WhatsApp connection here."})]}),e.jsx("button",{className:"btn btn-secondary btn-sm",type:"button",onClick:()=>void w(),children:"Refresh status"})]}),e.jsxs("div",{className:`whatsapp-pairing-status whatsapp-pairing-status--${R}`,role:"status","data-testid":"whatsapp-pairing-status",children:[e.jsxs("strong",{children:["Status: ",R]}),n?.jid&&e.jsxs("span",{children:["Connected as ",n.jid]}),(n?.lastError||b)&&e.jsx("span",{className:"field-error",children:n?.lastError??b})]}),R==="awaiting-qr"&&e.jsx("div",{className:"whatsapp-pairing-qr","data-testid":"whatsapp-pairing-qr",children:n?.qrDataUrl?e.jsx("img",{src:n.qrDataUrl,alt:"WhatsApp pairing QR code",className:"whatsapp-pairing-qr-image"}):e.jsx("p",{className:"text-muted",children:"Waiting for a fresh QR code. Keep this panel open and refresh if needed."})}),(B==="code"||R==="awaiting-code")&&e.jsxs("div",{className:"whatsapp-pairing-code",children:[e.jsx("label",{htmlFor:"whatsapp-pairing-phone",children:"Phone number (E.164 digits without +)"}),e.jsxs("div",{className:"whatsapp-pairing-code-controls",children:[e.jsx("input",{id:"whatsapp-pairing-phone",className:"input",value:D,onChange:l=>_(l.target.value),inputMode:"numeric"}),e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>void O(),disabled:P!==null,children:P==="code"?"Requesting code...":"Request pairing code"})]}),n?.pairingCode&&e.jsx("output",{className:"whatsapp-pairing-code-output",children:n.pairingCode})]}),R==="connected"&&e.jsx("p",{className:"whatsapp-pairing-success",children:"WhatsApp is paired and ready to receive messages from allowed senders."}),F&&e.jsx("p",{className:"field-error",children:F}),e.jsx("button",{className:"btn btn-danger",type:"button",onClick:()=>void U(),disabled:P!==null,"data-testid":"whatsapp-pairing-logout",children:P==="logout"?"Logging out...":"Logout and re-pair"}),e.jsxs("aside",{className:"whatsapp-pairing-instructions","aria-label":"WhatsApp pairing instructions","data-testid":"whatsapp-pairing-instructions",children:[e.jsx("h6",{children:"Pairing and configuration"}),e.jsxs("ol",{children:[e.jsx("li",{children:"Install and enable this plugin, then keep this settings panel open."}),e.jsxs("li",{children:["Set ",e.jsx("strong",{children:"Allowed WhatsApp Senders"}),"; an empty list blocks all inbound messages."]}),e.jsxs("li",{children:["Choose ",e.jsx("strong",{children:"QR"})," to scan in WhatsApp Linked Devices, or ",e.jsx("strong",{children:"code"})," to enter a phone number and request a pairing code."]}),e.jsxs("li",{children:["Wait for the status above to become ",e.jsx("strong",{children:"connected"}),"."]}),e.jsx("li",{children:"Use Logout and re-pair to start over. If QR is still pending, wait briefly or refresh status for a new code."})]})]})]})}const Pe="fusion-plugin-agent-browser",Ne={enabled:{type:"boolean",label:"Enable Agent Browser",group:"General"},installChannel:{type:"enum",label:"Install Channel",enumValues:["stable","beta","nightly"],defaultValue:"stable",group:"General"},commandTimeoutMs:{type:"number",label:"Command Timeout (ms)",defaultValue:12e4,group:"General"},headlessMode:{type:"boolean",label:"Headless Mode",defaultValue:!0,group:"Browser"},allowedDomains:{type:"array",label:"Allowed Domains",itemType:"string",group:"Browser"},promptExecutorSystem:{type:"string",label:"Executor System Prompt",multiline:!0,group:"Prompt Contributions"},promptExecutorTask:{type:"string",label:"Executor Task Prompt",multiline:!0,group:"Prompt Contributions"},promptTriage:{type:"string",label:"Triage Prompt",multiline:!0,group:"Prompt Contributions"},promptReviewer:{type:"string",label:"Reviewer Prompt",multiline:!0,group:"Prompt Contributions"},promptHeartbeat:{type:"string",label:"Heartbeat Prompt",multiline:!0,group:"Prompt Contributions"},skillExposure:{type:"enum",label:"Skill Exposure",enumValues:["none","selected","all"],defaultValue:"selected",group:"Skills"}},Se={General:"plugins.agentBrowser.groupGeneral",Browser:"plugins.agentBrowser.groupBrowser","Prompt Contributions":"plugins.agentBrowser.groupPromptContributions",Skills:"plugins.agentBrowser.groupSkills"},we={"Enable Agent Browser":"plugins.agentBrowser.labelEnabled","Install Channel":"plugins.agentBrowser.labelInstallChannel","Command Timeout (ms)":"plugins.agentBrowser.labelCommandTimeoutMs","Headless Mode":"plugins.agentBrowser.labelHeadlessMode","Allowed Domains":"plugins.agentBrowser.labelAllowedDomains","Executor System Prompt":"plugins.agentBrowser.labelPromptExecutorSystem","Executor Task Prompt":"plugins.agentBrowser.labelPromptExecutorTask","Triage Prompt":"plugins.agentBrowser.labelPromptTriage","Reviewer Prompt":"plugins.agentBrowser.labelPromptReviewer","Heartbeat Prompt":"plugins.agentBrowser.labelPromptHeartbeat","Skill Exposure":"plugins.agentBrowser.labelSkillExposure"},ve=[{id:"fusion-plugin-hermes-runtime",name:"Hermes Runtime",description:"Runtime provider for Hermes CLI-backed execution.",category:"runtime",path:"./plugins/fusion-plugin-hermes-runtime",experimental:!0},{id:"fusion-plugin-paperclip-runtime",name:"Paperclip Runtime",description:"Runtime provider for Paperclip agent connections.",category:"runtime",path:"./plugins/fusion-plugin-paperclip-runtime"},{id:"fusion-plugin-openclaw-runtime",name:"OpenClaw Runtime",description:"Runtime provider for OpenClaw execution.",category:"runtime",path:"./plugins/fusion-plugin-openclaw-runtime",experimental:!0},{id:"fusion-plugin-droid-runtime",name:"Droid Runtime",description:"Runtime provider for Droid CLI execution.",category:"runtime",path:"./plugins/fusion-plugin-droid-runtime",experimental:!0},{id:"fusion-plugin-dependency-graph",name:"Dependency Graph",description:"Dashboard plugin for task dependency graph visualization.",category:"integration",path:"./plugins/fusion-plugin-dependency-graph"},{id:"fusion-plugin-reports",name:"Reports",description:"View report history, compare runs side-by-side, and export standalone HTML summaries.",category:"integration",path:"./plugins/fusion-plugin-reports"},{id:"fusion-plugin-whatsapp-chat",name:"WhatsApp Chat",description:"Pairs to WhatsApp Web (multi-device) with QR or pairing code, then bridges direct chats to a Fusion agent.",category:"integration",path:"./plugins/fusion-plugin-whatsapp-chat"},{id:"fusion-plugin-cli-printing-press",name:"CLI Printing Press",description:"Guided wizard for drafting external service CLI definitions.",category:"integration",path:"./plugins/fusion-plugin-cli-printing-press"},{id:"fusion-plugin-compound-engineering",name:"Compound Engineering",description:"A dedicated dashboard surface for compound-engineering artifacts and interactive ce-* sessions.",category:"integration",path:"./plugins/fusion-plugin-compound-engineering"},{id:"fusion-plugin-quality",name:"Quality",description:"Task QA tab and Quality hub: preview servers, test runs, reports, screenshots, and suggested cases.",category:"integration",path:"./plugins/fusion-plugin-quality"},{id:"fusion-plugin-linear-import",name:"Linear Import",description:"Browse Linear issues and import selected issues as Fusion triage tasks through plugin-owned settings.",category:"integration",path:"./plugins/fusion-plugin-linear-import"},{id:Pe,name:"Agent Browser",description:"Built-in integration metadata. Package install support lands in FN-3101.",category:"integration",hasSetup:!0}],T={started:"var(--color-success)",loaded:"var(--color-warning)",error:"var(--color-error)",stopped:"var(--color-muted)",installed:"var(--color-info)"};function ps(r){const c=r.settingsSchema,n=c&&Object.keys(c).length>0;return r.id!==Pe?n?c:void 0:n?{...Ne,...c}:Ne}function ms(r){const c=new Map,n=[];for(const[j,b]of Object.entries(r))if(b.group){const C=c.get(b.group)??[];C.push([j,b]),c.set(b.group,C)}else n.push([j,b]);return{grouped:c,ungrouped:n}}function Ce(r,c="plugin-error-text"){return r.state!=="error"||!r.error?null:e.jsx("p",{className:c,title:r.error,children:r.error})}function vs({addToast:r,projectId:c}){const{t:n}=us("app"),[j,b]=d.useState([]),[C,D]=d.useState(!0),[_,F]=d.useState(!1),[S,P]=d.useState(""),[k,w]=d.useState(!1),[O,U]=d.useState(!1),[B,R]=d.useState(null),[l,y]=d.useState(null),[p,x]=d.useState({}),[Re,J]=d.useState(!1),[K,Y]=d.useState(null),[X,Ee]=d.useState([]),[Ie,Z]=d.useState(!0),[ee,se]=d.useState(null),[f,ke]=d.useState(""),[N,Be]=d.useState(""),[Ae,ne]=d.useState(null),q=d.useRef(null),[Fe,z]=d.useState({}),[Le,ie]=d.useState(null),[$,te]=d.useState(null),[De,ae]=d.useState(null),{confirm:qe}=He(),h=d.useCallback(async(s=!1,i)=>{try{s||D(!0);const a=await Ve(c);b(i?a.some(o=>o.id===i.id)?a.map(o=>o.id===i.id?i:o):[...a,i]:a)}catch(a){r(n("plugins.loadFailed","Failed to load plugins: {{error}}",{error:a instanceof Error?a.message:String(a)}),"error")}finally{s||D(!1)}},[c,r]),E=d.useCallback(async(s=f,i=N)=>{try{Z(!0),se(null);const a=await Qe(s,i||void 0,c);Ee(a)}catch(a){const o=a instanceof Error?a.message:String(a);se(o)}finally{Z(!1)}},[c,N,f]);d.useEffect(()=>{h()},[h]),d.useEffect(()=>(q.current&&clearTimeout(q.current),q.current=setTimeout(()=>{E(f,N)},300),()=>{q.current&&clearTimeout(q.current)}),[E,N,f]),d.useEffect(()=>{const s=ve.filter(a=>a.hasSetup&&j.some(o=>o.id===a.id));if(s.length===0)return;let i=!1;return Promise.all(s.map(async a=>{try{const o=await pe(a.id,c);if(i)return;z(g=>({...g,[a.id]:o}))}catch{if(i)return;z(o=>({...o,[a.id]:{hasSetup:!0,setupCheckDeferred:!0,deferredReason:"plugin-not-started",pluginState:"installed"}}))}})),()=>{i=!0}},[j,c]);const Ge=d.useRef([]);Ge.current=j,d.useEffect(()=>{const s=c?`?projectId=${encodeURIComponent(c)}`:"",i=a=>{try{const o=JSON.parse(a.data);if(o.scope==="project"&&(o.projectId??c)!==c)return;switch(o.transition){case"installing":case"enabled":case"disabled":case"settings-updated":E(f,N),b(g=>{const u=g.findIndex(t=>t.id===o.pluginId);if(u>=0){const t=[...g];return t[u]={...t[u],enabled:o.enabled,state:o.state,settings:o.settings,error:o.error},t}else return h(),g});break;case"state-changed":b(g=>{const u=g.findIndex(t=>t.id===o.pluginId);if(u>=0){const t=[...g];return t[u]={...t[u],state:o.state,error:o.error},t}return g});break;case"uninstalled":b(g=>g.filter(u=>u.id!==o.pluginId)),E(f,N);break;case"error":b(g=>{const u=g.findIndex(t=>t.id===o.pluginId);if(u>=0){const t=[...g];return t[u]={...t[u],state:o.state,error:o.error},t}return g});break}}catch{}};return Je(`/api/events${s}`,{events:{"plugin:lifecycle":i},onReconnect:()=>{h(),E(f,N)}})},[c,h,E,N,f]);const le=async()=>{if(!S.trim()){r(n("plugins.installPathRequired","Please enter a plugin path"),"error");return}try{w(!0),await M({path:S,...O?{aiScanOnLoad:!0}:{}},c),r(n("plugins.installedGlobally","Plugin installed globally"),"success"),F(!1),P(""),U(!1),await h()}catch(s){r(n("plugins.installFailed","Failed to install plugin: {{error}}",{error:s instanceof Error?s.message:String(s)}),"error")}finally{w(!1)}},Oe=async s=>{if(!s.path){r(n("plugins.builtinNoPackage","{{name}} is built in and does not have an installable package yet",{name:s.name}),"warning");return}try{Y(s.id),await M({path:s.path},c),r(n("plugins.builtinInstalledGlobally","{{name}} installed globally",{name:s.name}),"success"),await h()}catch(i){r(n("plugins.builtinInstallFailed","Failed to install {{name}}: {{error}}",{name:s.name,error:i instanceof Error?i.message:String(i)}),"error")}finally{Y(null)}},Ue=async s=>{if(!s.path){r(n("plugins.registryNotInstallable","{{name}} is not available for one-click install yet",{name:s.name}),"warning");return}try{ne(s.id),await M({path:s.path},c),r(n("plugins.registryInstalled","{{name}} installed and enabled",{name:s.name}),"success"),await h(),await E(f,N)}catch(i){r(n("plugins.registryInstallFailed","Failed to install {{name}}: {{error}}",{name:s.name,error:i instanceof Error?i.message:String(i)}),"error")}finally{ne(null)}},re=async s=>{try{te(s.id);const i=await rs(s.id,c);if(!i.success){r(n("plugins.setupInstallFailed","Failed to install {{name}} setup: {{error}}",{name:s.name,error:i.error??n("plugins.unknownError","unknown error")}),"error");return}r(n("plugins.setupInstalled","{{name}} setup installed",{name:s.name}),"success"),ie(s.id);const a=await pe(s.id,c);z(o=>({...o,[s.id]:a}))}catch(i){r(n("plugins.setupInstallFailed","Failed to install {{name}} setup: {{error}}",{name:s.name,error:i instanceof Error?i.message:String(i)}),"error")}finally{te(null),ie(null)}},H=async s=>{try{const i=await ts(s.id,c);if(b(a=>a.map(o=>o.id===i.id?i:o)),i.state==="error"){r(n("plugins.enableFailed","Failed to enable {{name}}: {{error}}",{name:s.name,error:i.error??n("plugins.unknownError","unknown error")}),"error"),await h();return}r(n("plugins.enabledForProject","{{name}} enabled for this project",{name:s.name}),"success"),await h(!0,i)}catch(i){r(n("plugins.enablePluginFailed","Failed to enable plugin: {{error}}",{error:i instanceof Error?i.message:String(i)}),"error")}},V=async s=>{try{const i=await je(s.id,c);b(a=>a.map(o=>o.id===i.id?i:o)),r(n("plugins.disabledForProject","{{name}} disabled for this project",{name:s.name}),"success"),await h(!0,i)}catch(i){r(n("plugins.disablePluginFailed","Failed to disable plugin: {{error}}",{error:i instanceof Error?i.message:String(i)}),"error")}},$e=async(s,i)=>{if(i){i.enabled?await V(i):await H(i);return}if(!s.path){r(n("plugins.builtinNoPackage","{{name}} is built in and does not have an installable package yet",{name:s.name}),"warning");return}try{ae(s.id);const a=await M({path:s.path},c);await je(a.id,c),r(n("plugins.disabledForProject","{{name}} disabled for this project",{name:s.name}),"success"),await h()}catch(a){r(n("plugins.disablePluginFailed","Failed to disable plugin: {{error}}",{error:a instanceof Error?a.message:String(a)}),"error")}finally{ae(null)}},oe=async s=>{try{R(s.id),await is(s.id,c),r(n("plugins.reloaded","{{name}} reloaded",{name:s.name}),"success"),await h()}catch(i){r(n("plugins.reloadFailed","Failed to reload plugin: {{error}}",{error:i instanceof Error?i.message:String(i)}),"error")}finally{R(null)}},ue=async s=>{if(await qe({title:n("plugins.uninstallTitle","Uninstall Plugin Globally"),message:n("plugins.uninstallConfirm",'Are you sure you want to uninstall "{{name}}" globally (all projects)?',{name:s.name}),danger:!0}))try{await as(s.id,c),r(n("plugins.uninstalledGlobally","{{name}} uninstalled globally",{name:s.name}),"success"),await h(),y(null)}catch(a){r(n("plugins.uninstallFailed","Failed to uninstall plugin: {{error}}",{error:a instanceof Error?a.message:String(a)}),"error")}},We=async(s,i)=>{try{await es(s.id,{aiScanOnLoad:i},c),r(i?n("plugins.aiScanEnabled","AI scan on load enabled"):n("plugins.aiScanDisabled","AI scan on load disabled"),"success"),await h()}catch(a){r(n("plugins.updateFailed","Failed to update plugin: {{error}}",{error:a instanceof Error?a.message:String(a)}),"error")}},Me=async s=>{try{await ss(s.id,c),r(n("plugins.rescanned","{{name}} rescanned",{name:s.name}),"success"),await h()}catch(i){r(n("plugins.rescanFailed","Failed to rescan plugin: {{error}}",{error:i instanceof Error?i.message:String(i)}),"error")}},W=async s=>{y(s);try{J(!0);const i=await ls(s.id,c);x(i)}catch{x({})}finally{J(!1)}},Te=async()=>{if(l)try{await ns(l.id,p,c),r(n("plugins.settingsSaved","Settings saved"),"success")}catch(s){r(n("plugins.saveSettingsFailed","Failed to save settings: {{error}}",{error:s instanceof Error?s.message:String(s)}),"error")}};if(l)return e.jsxs("div",{className:"plugin-manager-detail","data-testid":"plugin-manager-detail",children:[e.jsxs("div",{className:"plugin-manager-detail-header",children:[e.jsx("button",{className:"btn-icon",onClick:()=>y(null),"aria-label":n("plugins.backToList","Back to plugin list"),children:e.jsx(me,{size:16})}),e.jsxs("div",{className:"plugin-detail-title",children:[e.jsxs("div",{className:"plugin-detail-title-copy",children:[e.jsx("h4",{className:"plugin-detail-name",children:l.name}),Ce(l,"plugin-error-text plugin-error-text--detail")]}),e.jsx("span",{className:"plugin-state-badge",style:{color:T[l.state]||T.installed},children:l.state})]})]}),e.jsxs("div",{className:"plugin-detail-content",children:[e.jsxs("div",{className:"plugin-detail-card",children:[l.description&&e.jsx("p",{className:"plugin-description",children:l.description}),l.author&&e.jsxs("p",{className:"plugin-detail-meta-row",children:[e.jsx("span",{className:"text-muted",children:n("plugins.author","Author:")}),l.author]}),l.homepage&&e.jsxs("p",{className:"plugin-detail-meta-row plugin-homepage",children:[e.jsx("span",{className:"text-muted",children:n("plugins.homepage","Homepage:")}),e.jsxs("a",{href:l.homepage,target:"_blank",rel:"noopener noreferrer",children:[l.homepage,e.jsx(Ke,{size:12})]})]}),e.jsxs("p",{className:"plugin-detail-meta-row",children:[e.jsx("span",{className:"text-muted",children:n("plugins.version","Version:")}),l.version]})]}),e.jsxs("div",{className:"plugin-detail-card",children:[e.jsx("h5",{className:"plugin-detail-section-heading",children:n("plugins.securityScan","Security Scan")}),e.jsxs("div",{className:"plugin-security-row",children:[e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:!!l.aiScanOnLoad,onChange:s=>void We(l,s.target.checked)}),n("plugins.enableAiScanBeforeLoad","Enable AI scan before load/reload")]}),e.jsxs("button",{className:"btn btn-secondary btn-sm",onClick:()=>void Me(l),children:[e.jsx(Ye,{size:14})," ",n("plugins.rescanAndReload","Rescan and Reload")]})]}),e.jsx("p",{className:"text-muted",children:n("plugins.aiScanHint","Turning this on only updates configuration. Use Rescan and Reload to run it now.")}),l.lastSecurityScan?e.jsxs("div",{className:"plugin-security-results",children:[e.jsxs("div",{className:"plugin-security-header",children:[e.jsx("span",{className:`plugin-state-badge plugin-security-badge plugin-security-badge--${l.lastSecurityScan.verdict}`,children:l.lastSecurityScan.verdict}),e.jsx("span",{className:"text-muted",children:l.lastSecurityScan.scannedAt})]}),e.jsx("p",{className:"plugin-security-summary",children:l.lastSecurityScan.summary}),e.jsxs("details",{children:[e.jsx("summary",{children:n("plugins.findings","Findings ({{count}})",{count:l.lastSecurityScan.findings.length})}),e.jsx("ul",{className:"plugin-security-findings",children:l.lastSecurityScan.findings.map((s,i)=>e.jsxs("li",{children:[e.jsx("strong",{children:s.severity})," ",s.category," — ",s.file,": ",s.reason]},`${s.file}-${i}`))})]})]}):e.jsx("p",{className:"text-muted",children:n("plugins.noSecurityScan","No security scan has been run yet.")})]}),e.jsxs("div",{className:"plugin-detail-card",children:[e.jsx("h5",{className:"plugin-detail-section-heading",children:n("plugins.settings","Settings")}),l.id==="fusion-plugin-whatsapp-chat"&&e.jsx(gs,{projectId:c,settings:p}),Re?e.jsx("p",{className:"text-muted",children:e.jsx(he,{label:n("plugins.loading","Loading...")})}):(()=>{const s=ps(l);return s&&Object.keys(s).length>0?e.jsxs("div",{className:"plugin-settings-form",children:[(()=>{const{grouped:i,ungrouped:a}=ms(s),o=[];a.length>0&&o.push({title:null,entries:a});for(const[g,u]of i.entries())o.push({title:g,entries:u});return o.map(g=>e.jsxs("div",{className:g.title?"plugin-settings-group":void 0,children:[g.title&&e.jsx("h6",{className:"plugin-settings-group-heading",children:Se[g.title]?n(Se[g.title],g.title):g.title}),g.entries.map(([u,t])=>{const I=`setting-${u}-help`,G=t.label?we[t.label]?n(we[t.label],t.label):t.label:u;return e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:`setting-${u}`,children:[G,t.required&&" *"]}),t.type==="string"&&!t.multiline&&e.jsx("input",{className:"input",type:"text",id:`setting-${u}`,value:p[u]??"",onChange:m=>x({...p,[u]:m.target.value}),placeholder:t.description,"aria-describedby":t.description&&!t.required?I:void 0}),t.type==="string"&&t.multiline&&e.jsx("textarea",{className:"input",id:`setting-${u}`,rows:4,value:p[u]??"",onChange:m=>x({...p,[u]:m.target.value}),placeholder:t.description,"aria-describedby":t.description&&!t.required?I:void 0}),t.type==="password"&&e.jsx("input",{className:"input",type:"password",id:`setting-${u}`,value:p[u]??"",onChange:m=>x({...p,[u]:m.target.value}),placeholder:t.description,"aria-describedby":t.description&&!t.required?I:void 0}),t.type==="number"&&e.jsx("input",{className:"input",type:"number",id:`setting-${u}`,value:p[u]??"",onChange:m=>x({...p,[u]:Number(m.target.value)}),"aria-describedby":t.description&&!t.required?I:void 0}),t.type==="boolean"&&e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:p[u]??!1,onChange:m=>x({...p,[u]:m.target.checked})}),t.description]}),t.type==="enum"&&e.jsxs("select",{className:"select",id:`setting-${u}`,value:p[u]??"",onChange:m=>x({...p,[u]:m.target.value}),"aria-describedby":t.description&&!t.required?I:void 0,children:[e.jsx("option",{value:"",children:n("plugins.selectOption","Select...")}),t.enumValues?.map(m=>e.jsx("option",{value:m,children:m},m))]}),t.type==="array"&&e.jsxs("div",{className:"plugin-settings-array",children:[p[u]?.map((m,v)=>e.jsxs("div",{className:"plugin-settings-array-item",children:[e.jsx("input",{className:"input",type:t.itemType==="number"?"number":"text",value:m??"",onChange:L=>{const A=L.target.value,ge=[...p[u]||[]];ge[v]=t.itemType==="number"?Number(A):A,x({...p,[u]:ge})}}),e.jsx("button",{className:"btn-icon",onClick:()=>{const A=[...p[u]||[]];A.splice(v,1),x({...p,[u]:A})},"aria-label":n("plugins.removeItem","Remove item"),children:e.jsx(me,{size:14})})]},v)),e.jsxs("button",{className:"btn btn-secondary",onClick:()=>{const m=p[u]||[],v=t.itemType==="number"?0:"";x({...p,[u]:[...m,v]})},children:[e.jsx(be,{size:14})," ",n("plugins.addItem","Add Item")]})]}),t.description&&!t.required&&!t.multiline&&e.jsx("span",{id:I,className:"form-help",children:t.description})]},u)})]},g.title??"ungrouped"))})(),e.jsx("button",{className:"btn btn-primary",onClick:Te,children:n("plugins.saveSettings","Save Settings")})]}):e.jsx("p",{className:"text-muted",children:n("plugins.noConfigurableSettings","No configurable settings.")})})()]}),e.jsxs("div",{className:"plugin-detail-actions",children:[l.state==="started"&&e.jsxs("button",{className:"btn btn-secondary",onClick:()=>oe(l),disabled:B===l.id,children:[e.jsx(ye,{size:14,className:B===l.id?"spin":""}),B===l.id?n("plugins.reloading","Reloading..."):n("plugins.reload","Reload")]}),l.enabled?e.jsx("button",{className:"btn btn-secondary",onClick:()=>V(l),children:n("plugins.disableInProject","Disable in Project")}):e.jsx("button",{className:"btn btn-primary",onClick:()=>H(l),children:n("plugins.enableInProject","Enable in Project")}),e.jsxs("button",{className:"btn btn-danger",onClick:()=>ue(l),children:[e.jsx(xe,{size:14})," ",n("plugins.uninstallGlobally","Uninstall Globally")]})]})]})]});const ce=new Map(j.map(s=>[s.id,s])),de=j,_e=()=>e.jsxs("section",{className:"plugin-registry-section","aria-label":n("plugins.browseRegistry","Browse Registry"),children:[e.jsxs("div",{className:"plugin-registry-header",children:[e.jsxs("div",{className:"plugin-registry-heading-copy",children:[e.jsx("h4",{className:"plugin-registry-heading",children:n("plugins.browseRegistry","Browse Registry")}),e.jsx("p",{className:"plugin-registry-description",children:n("plugins.registryDescription","Discover curated runtimes and integrations that can be added to this Fusion workspace.")})]}),e.jsxs("div",{className:"plugin-registry-controls",children:[e.jsxs("label",{className:"plugin-registry-category-label",children:[e.jsx("span",{className:"sr-only",children:n("plugins.registryCategory","Registry category")}),e.jsxs("select",{className:"select plugin-registry-category-select",value:N,onChange:s=>Be(s.target.value),"aria-label":n("plugins.registryCategory","Registry category"),children:[e.jsx("option",{value:"",children:n("plugins.registryCategoryAll","All Categories")}),e.jsx("option",{value:"runtime",children:n("plugins.registryCategoryRuntime","Runtime")}),e.jsx("option",{value:"integration",children:n("plugins.registryCategoryIntegration","Integration")})]})]}),e.jsxs("label",{className:"plugin-registry-search-label",children:[e.jsx("span",{className:"sr-only",children:n("plugins.searchRegistry","Search registry")}),e.jsx("input",{className:"input plugin-registry-search-input",type:"search",value:f,onChange:s=>ke(s.target.value),placeholder:n("plugins.searchRegistryPlaceholder","Search registry plugins")})]})]})]}),Ie?e.jsxs("div",{className:"plugin-registry-state",role:"status",children:[e.jsx(fe,{size:14,className:"spin"}),n("plugins.registryLoading","Loading registry...")]}):ee?e.jsxs("div",{className:"plugin-registry-state plugin-registry-state--error",role:"alert",children:[e.jsx("span",{children:n("plugins.registryLoadFailed","Failed to load registry: {{error}}",{error:ee})}),e.jsx("button",{className:"btn btn-secondary btn-sm plugin-registry-retry",onClick:()=>void E(f,N),children:n("plugins.retry","Retry")})]}):X.length===0?e.jsx("div",{className:"plugin-registry-state",children:f.trim()?n("plugins.registryEmptySearch","No registry plugins match your search."):n("plugins.registryEmpty","No registry plugins are available.")}):e.jsx("div",{className:"plugin-registry-list","aria-label":n("plugins.registryPluginResults","Registry plugin results"),children:X.map(s=>{const i=ce.get(s.id),a=Ae===s.id;return e.jsxs("div",{className:"plugin-registry-item",children:[e.jsxs("div",{className:"plugin-registry-meta",children:[e.jsxs("div",{className:"plugin-registry-title-row",children:[e.jsx("span",{className:"plugin-registry-name",children:s.name}),e.jsxs("span",{className:"plugin-registry-version",children:["v",s.version]}),e.jsx("span",{className:"plugin-registry-badge",children:s.category}),s.installed&&e.jsxs("span",{className:"plugin-registry-status plugin-registry-status--installed",children:[n("plugins.statusInstalled","Installed"),s.installedVersion&&s.installedVersion!==s.version?` · v${s.installedVersion}`:""]})]}),e.jsx("span",{className:"plugin-registry-description-text",children:s.description}),e.jsx("span",{className:"plugin-registry-author",children:n("plugins.registryByAuthor","By {{author}}",{author:s.author})})]}),e.jsx("div",{className:"plugin-registry-actions",children:s.installed?e.jsx("button",{className:"btn btn-secondary btn-sm plugin-registry-action",onClick:()=>{i?W(i):h()},children:n("plugins.manage","Manage")}):s.canInstall?e.jsx("button",{className:"btn btn-primary btn-sm plugin-registry-action",onClick:()=>void Ue(s),disabled:a,children:a?n("plugins.installing","Installing..."):n("plugins.installFromRegistry","Install")}):e.jsx("span",{className:"plugin-registry-coming-soon",children:n("plugins.registryComingSoon","Coming Soon")})})]},s.id)})})]}),ze=()=>e.jsxs("section",{className:"plugin-builtins-section","aria-label":n("plugins.builtinPlugins","Built-in Plugins"),children:[e.jsxs("div",{className:"plugin-builtins-header",children:[e.jsx("h4",{className:"plugin-builtins-heading",children:n("plugins.builtinPlugins","Built-in Plugins")}),e.jsx("p",{className:"plugin-builtins-description",children:n("plugins.builtinPluginsCatalog","Built-in plugin catalog for runtimes and integrations.")})]}),e.jsx("div",{className:"plugin-builtins-list","aria-label":n("plugins.builtinPluginRecommendations","Built-in plugin recommendations"),children:ve.map(s=>{const i=ce.get(s.id),a=!!i,o=Fe[s.id],g=!!(o&&"setupCheckDeferred"in o&&o.setupCheckDeferred),u=o&&"status"in o?o.status:void 0,t=a&&s.hasSetup&&o?.hasSetup&&!g&&i?.state==="started"&&(u==="not-installed"||u==="error"),I=a&&o?.hasSetup&&u==="installed",G=Le===s.id,m=!s.path,v=s.category==="runtime",L=i?i.enabled:!0,A=De===s.id;return e.jsxs("div",{className:"plugin-builtins-item",children:[e.jsxs("div",{className:"plugin-builtins-meta",children:[e.jsx("span",{className:"plugin-builtins-name",children:s.name}),s.experimental&&e.jsx("span",{className:"plugin-builtins-runtime-badge",children:n("plugins.experimental","Experimental")}),e.jsx("span",{className:"plugin-builtins-runtime-badge",children:s.category}),e.jsx("span",{className:`plugin-builtins-status ${a?"plugin-builtins-status--installed":"plugin-builtins-status--available"}`,children:a?n("plugins.statusInstalled","Installed"):m?n("plugins.statusBuiltIn","Built in"):n("plugins.statusNotInstalled","Not installed")}),v&&!L&&e.jsx("span",{className:"plugin-builtins-setup-status plugin-builtins-setup-status--warning",children:n("plugins.builtinDisabled","Disabled")}),t&&e.jsx("span",{className:"plugin-builtins-setup-status plugin-builtins-setup-status--warning",children:n("plugins.setupRequired","Setup required")}),I&&e.jsx("span",{className:"plugin-builtins-setup-status plugin-builtins-setup-status--ready",children:n("plugins.setupReady","Setup ready")}),G&&e.jsx("span",{className:"plugin-builtins-setup-status plugin-builtins-setup-status--pending",children:n("plugins.checkingSetup","Checking setup...")}),g&&e.jsx("span",{className:"plugin-builtins-setup-status plugin-builtins-setup-status--deferred",children:n("plugins.startPluginToCheckSetup","Start plugin to check setup")}),e.jsx("span",{className:"plugin-builtins-description-text",children:s.description})]}),e.jsxs("div",{className:"plugin-builtins-actions",children:[v&&e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:L,onChange:()=>void $e(s,i),disabled:A,"aria-label":L?n("plugins.disablePlugin","Disable {{name}}",{name:s.name}):n("plugins.enablePlugin","Enable {{name}}",{name:s.name})}),e.jsx("span",{className:"toggle-slider"})]}),m?a&&t?e.jsx("button",{className:"btn btn-primary btn-sm",onClick:()=>void re(s),disabled:$===s.id||G,children:$===s.id?n("plugins.settingUp","Setting up..."):n("plugins.installSetup","Install Setup")}):a&&i?e.jsx("button",{className:"btn btn-secondary btn-sm",onClick:()=>void W(i),children:n("plugins.manage","Manage")}):v?null:e.jsx("span",{className:"plugin-builtins-metadata-only",children:n("plugins.builtinMetadataOnly","Built-in metadata only")}):e.jsx("button",{className:`btn ${a&&!t?"btn-secondary":"btn-primary"} btn-sm`,onClick:()=>{if(!a){Oe(s);return}if(t){re(s);return}i&&W(i)},disabled:K===s.id||$===s.id||G,children:a?t?$===s.id?n("plugins.settingUp","Setting up..."):n("plugins.installSetup","Install Setup"):n("plugins.manage","Manage"):K===s.id?n("plugins.installing","Installing..."):n("plugins.installNamed","Install {{name}}",{name:s.name})})]})]},s.id)})})]});return e.jsxs("div",{className:"plugin-manager","data-testid":"plugin-manager",children:[e.jsxs("div",{className:"plugin-manager-header",children:[e.jsx("span",{className:"plugin-manager-header-title",children:n("plugins.installedPlugins","Installed Plugins")}),e.jsxs("div",{className:"plugin-manager-actions",children:[e.jsxs("button",{className:"btn btn-sm",onClick:()=>void h(),title:n("plugins.refresh","Refresh"),"aria-label":n("plugins.refreshPluginList","Refresh plugin list"),children:[e.jsx(fe,{size:14,className:C?"spin":""}),n("plugins.refresh","Refresh")]}),e.jsxs("button",{className:"btn btn-primary btn-sm",onClick:()=>F(!0),children:[e.jsx(be,{size:14})," ",n("plugins.install","Install")]})]})]}),_&&e.jsxs("div",{className:"plugin-install-form",children:[e.jsx("p",{className:"plugin-install-hint",children:n("plugins.installHint","Browse to a plugin package root (contains manifest.json) or a built dist directory.")}),e.jsx(os,{value:S,onChange:P,placeholder:n("plugins.installPathPlaceholder","Absolute path to plugin directory or dist folder"),onInputKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),le())}}),e.jsxs("label",{className:"checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:O,onChange:s=>U(s.target.checked)}),n("plugins.enableAiSecurityScan","Enable AI security scan on load")]}),e.jsxs("div",{className:"plugin-install-actions",children:[e.jsx("button",{className:"btn btn-primary",onClick:le,disabled:k||!S.trim(),children:k?n("plugins.installing","Installing..."):n("plugins.installPluginGlobally","Install Plugin Globally")}),e.jsx("button",{className:"btn btn-secondary",onClick:()=>{F(!1),P("")},children:n("plugins.cancel","Cancel")})]})]}),C?e.jsx("div",{className:"settings-empty-state",children:e.jsx(he,{label:n("plugins.loadingPlugins","Loading plugins...")})}):e.jsxs(e.Fragment,{children:[de.length===0?e.jsxs("div",{className:"settings-empty-state",children:[e.jsx(Xe,{size:32,className:"text-muted"}),e.jsx("p",{children:n("plugins.noPluginsInstalled","No plugins installed.")}),e.jsx("p",{className:"text-muted",children:n("plugins.noPluginsHint","Install a plugin to get started, or use the built-in catalog below.")})]}):e.jsx("div",{className:"plugin-list",children:de.map(s=>e.jsxs("div",{className:"plugin-item",children:[e.jsx("div",{className:"plugin-info",children:e.jsxs("div",{className:"plugin-copy",children:[e.jsxs("div",{className:"plugin-copy-header",children:[e.jsx("span",{className:"plugin-name",children:s.name}),e.jsxs("span",{className:"plugin-version text-muted",children:["v",s.version]}),e.jsx("span",{className:"plugin-state-badge",style:{color:T[s.state]||T.installed},children:s.state})]}),Ce(s)]})}),e.jsxs("div",{className:"plugin-actions",children:[s.state==="started"&&e.jsx("button",{className:"btn-icon",onClick:()=>oe(s),disabled:B===s.id,title:n("plugins.reload","Reload"),children:e.jsx(ye,{size:14,className:B===s.id?"spin":""})}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:s.enabled,onChange:()=>s.enabled?V(s):H(s),"aria-label":s.enabled?n("plugins.disablePlugin","Disable {{name}}",{name:s.name}):n("plugins.enablePlugin","Enable {{name}}",{name:s.name})}),e.jsx("span",{className:"toggle-slider"})]}),e.jsx("button",{className:"btn-icon",onClick:()=>W(s),title:n("plugins.settings","Settings"),children:e.jsx(Ze,{size:14})}),e.jsx("button",{className:"btn-icon",onClick:()=>ue(s),title:n("plugins.uninstallGloballyTitle","Uninstall globally"),children:e.jsx(xe,{size:14})})]})]},s.id))}),ze(),_e()]})]})}export{Ne as AGENT_BROWSER_SETTINGS_SCHEMA,Pe as BUILTIN_AGENT_BROWSER_PLUGIN_ID,ve as BUILTIN_PLUGINS,vs as PluginManager,T as STATE_COLORS};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{r as h,j as e,b as H}from"./vendor-react-SZ_qB27O.js";import{c as D,dc as V,df as O,a8 as U,C as B,dg as W,dh as q,p as K,a$ as Y,bt as J,di as z,dj as Z,dk as A}from"./index-Cg9ahVtV.js";import{u as P}from"./vendor-i18n-GF3RlKbq.js";/**
|
|
2
|
-
* @license lucide-react v1.7.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Q=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],X=D("bug",Q);/**
|
|
7
|
-
* @license lucide-react v1.7.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const ee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],ae=D("life-buoy",ee);/**
|
|
12
|
-
* @license lucide-react v1.7.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const te=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],se=D("moon",te);/**
|
|
17
|
-
* @license lucide-react v1.7.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const re=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],le=D("sun",re);async function T(s,c){const r=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!r.ok)throw new Error((await r.json().catch(()=>({error:r.statusText}))).error??r.statusText);return r.json()}function ne(s){return T("/api/report/draft",s)}function oe(s){return T("/api/report/file",s)}function ce(s){return T("/api/report/help",{question:s})}async function ie(s){const c=new FormData;c.append("screenshot",s,"report-screenshot.png");const r=await fetch("/api/report/attachment",{method:"POST",body:c});if(!r.ok)throw new Error((await r.json().catch(()=>({error:r.statusText}))).error??r.statusText);return r.json()}async function fe(){const s=await fetch("/api/report/discussion-categories");if(!s.ok)throw new Error((await s.json().catch(()=>({error:s.statusText}))).error??s.statusText);return s.json()}function ye(s){const c=new URLSearchParams(s.search),r=s.hash.match(/^#\/tasks\/([^/?#]+)/),i=r?.[1]?decodeURIComponent(r[1]):c.get("taskId")??void 0,d=c.get("agentId")??void 0;return i||d?{taskId:i,agentId:d}:void 0}const G=[{value:"light",label:"Light",icon:le},{value:"dark",label:"Dark",icon:se},{value:"system",label:"System",icon:V}],N=[{value:"default",label:"Fusion Legacy",className:"theme-swatch-default"},{value:"ocean",label:"Ocean",className:"theme-swatch-ocean"},{value:"forest",label:"Forest",className:"theme-swatch-forest"},{value:"sunset",label:"Sunset",className:"theme-swatch-sunset"},{value:"zen",label:"Zen",className:"theme-swatch-zen"},{value:"berry",label:"Berry",className:"theme-swatch-berry"},{value:"high-contrast",label:"High Contrast",className:"theme-swatch-high-contrast"},{value:"industrial",label:"Industrial",className:"theme-swatch-industrial"},{value:"monochrome",label:"Mono",className:"theme-swatch-monochrome"},{value:"slate",label:"Slate",className:"theme-swatch-slate"},{value:"ash",label:"Ash",className:"theme-swatch-ash"},{value:"air",label:"Air",className:"theme-swatch-air"},{value:"graphite",label:"Graphite",className:"theme-swatch-graphite"},{value:"silver",label:"Silver",className:"theme-swatch-silver"},{value:"solarized",label:"Solarized",className:"theme-swatch-solarized"},{value:"factory",label:"Factory",className:"theme-swatch-factory"},{value:"factory-mono",label:"Factory Mono",className:"theme-swatch-factory-mono"},{value:"ayu",label:"Ayu",className:"theme-swatch-ayu"},{value:"one-dark",label:"One Dark",className:"theme-swatch-one-dark"},{value:"nord",label:"Nord",className:"theme-swatch-nord"},{value:"dracula",label:"Dracula",className:"theme-swatch-dracula"},{value:"gruvbox",label:"Gruvbox",className:"theme-swatch-gruvbox"},{value:"tokyo-night",label:"Tokyo Night",className:"theme-swatch-tokyo-night"},{value:"catppuccin-mocha",label:"Catppuccin Mocha",className:"theme-swatch-catppuccin-mocha"},{value:"github-dark",label:"GitHub Dark",className:"theme-swatch-github-dark"},{value:"everforest",label:"Everforest",className:"theme-swatch-everforest"},{value:"rose-pine",label:"Rosé Pine",className:"theme-swatch-rose-pine"},{value:"kanagawa",label:"Kanagawa",className:"theme-swatch-kanagawa"},{value:"night-owl",label:"Night Owl",className:"theme-swatch-night-owl"},{value:"palenight",label:"Palenight",className:"theme-swatch-palenight"},{value:"monokai-pro",label:"Monokai Pro",className:"theme-swatch-monokai-pro"},{value:"slime",label:"Slime",className:"theme-swatch-slime"},{value:"brutalist",label:"Brutalist",className:"theme-swatch-brutalist"},{value:"neon-city",label:"Neon City",className:"theme-swatch-neon-city"},{value:"parchment",label:"Parchment",className:"theme-swatch-parchment"},{value:"terminal",label:"Terminal",className:"theme-swatch-terminal"},{value:"glass",label:"Glass",className:"theme-swatch-glass"},{value:"glass-silver",label:"Glass Silver",className:"theme-swatch-glass-silver"},{value:"horizon",label:"Horizon",className:"theme-swatch-horizon"},{value:"vitesse",label:"Vitesse",className:"theme-swatch-vitesse"},{value:"outrun",label:"Outrun",className:"theme-swatch-outrun"},{value:"snazzy",label:"Snazzy",className:"theme-swatch-snazzy"},{value:"porple",label:"Porple",className:"theme-swatch-porple"},{value:"espresso",label:"Espresso",className:"theme-swatch-espresso"},{value:"mars",label:"Mars",className:"theme-swatch-mars"},{value:"poimandres",label:"Poimandres",className:"theme-swatch-poimandres"},{value:"ember",label:"Ember",className:"theme-swatch-ember"},{value:"rust",label:"Rust",className:"theme-swatch-rust"},{value:"copper",label:"Copper",className:"theme-swatch-copper"},{value:"foundry",label:"Foundry",className:"theme-swatch-foundry"},{value:"carbon",label:"Carbon",className:"theme-swatch-carbon"},{value:"sandstone",label:"Sandstone",className:"theme-swatch-sandstone"},{value:"lagoon",label:"Lagoon",className:"theme-swatch-lagoon"},{value:"frost",label:"Frost",className:"theme-swatch-frost"},{value:"lavender",label:"Lavender",className:"theme-swatch-lavender"},{value:"neon-bloom",label:"Neon Bloom",className:"theme-swatch-neon-bloom"},{value:"sepia",label:"Sepia",className:"theme-swatch-sepia"},{value:"cobalt",label:"Cobalt",className:"theme-swatch-cobalt"},{value:"clay",label:"Clay",className:"theme-swatch-clay"},{value:"moss",label:"Moss",className:"theme-swatch-moss"},{value:"aurora",label:"Aurora",className:"theme-swatch-aurora"},{value:"calm",label:"Calm",className:"theme-swatch-calm"},{value:"dawn",label:"Dawn",className:"theme-swatch-dawn"},{value:"shadcn",label:"Shadcn",className:"theme-swatch-shadcn"},{value:"shadcn-ember",label:"Shadcn Ember (Default)",className:"theme-swatch-shadcn-ember"},{value:"shadcn-custom",label:"Shadcn Custom",className:"theme-swatch-shadcn-custom"},{value:"shadcn-blue",label:"Shadcn Blue",className:"theme-swatch-shadcn-blue"},{value:"shadcn-green",label:"Shadcn Green",className:"theme-swatch-shadcn-green"},{value:"shadcn-red",label:"Shadcn Red",className:"theme-swatch-shadcn-red"},{value:"shadcn-purple",label:"Shadcn Purple",className:"theme-swatch-shadcn-purple"},{value:"shadcn-pink",label:"Shadcn Pink",className:"theme-swatch-shadcn-pink"},{value:"shadcn-orange",label:"Shadcn Orange",className:"theme-swatch-shadcn-orange"},{value:"shadcn-yellow",label:"Shadcn Yellow",className:"theme-swatch-shadcn-yellow"},{value:"shadcn-mono",label:"Shadcn Mono",className:"theme-swatch-shadcn-mono"},{value:"shadcn-mono-red",label:"Shadcn Mono Red",className:"theme-swatch-shadcn-mono-red"},{value:"shadcn-mono-blue",label:"Shadcn Mono Blue",className:"theme-swatch-shadcn-mono-blue"},{value:"shadcn-mono-green",label:"Shadcn Mono Green",className:"theme-swatch-shadcn-mono-green"},{value:"shadcn-mono-purple",label:"Shadcn Mono Purple",className:"theme-swatch-shadcn-mono-purple"},{value:"shadcn-mono-pink",label:"Shadcn Mono Pink",className:"theme-swatch-shadcn-mono-pink"},{value:"shadcn-mono-orange",label:"Shadcn Mono Orange",className:"theme-swatch-shadcn-mono-orange"},{value:"shadcn-mono-yellow",label:"Shadcn Mono Yellow",className:"theme-swatch-shadcn-mono-yellow"},{value:"shadcn-black",label:"Shadcn Black",className:"theme-swatch-shadcn-black"},{value:"shadcn-gray",label:"Shadcn Gray",className:"theme-swatch-shadcn-gray"},{value:"shadcn-gray-blue",label:"Shadcn Gray Blue",className:"theme-swatch-shadcn-gray-blue"}];function he(s){const c=s.trim();if(/^#[\da-f]{6}$/i.test(c))return c;if(/^#[\da-f]{3}$/i.test(c)){const[,r,i,d]=c;return`#${r}${r}${i}${i}${d}${d}`}return"#000000"}function de({value:s={},onChange:c,resolvedThemeMode:r="dark"}){const{t:i}=P("app"),[d,v]=h.useState(!1),t=h.useId(),u=h.useMemo(()=>O(s),[s]),m=(n,p)=>{c(O({...u,[n]:p}))},l=d?i("theme.shadcnCustom.collapse","Collapse custom colors"):i("theme.shadcnCustom.show","Show custom colors"),w=d?U:B;return e.jsxs("section",{className:"shadcn-color-picker card","data-testid":"shadcn-color-picker","aria-labelledby":"shadcn-color-picker-title",children:[e.jsxs("div",{className:"shadcn-color-picker-header",children:[e.jsxs("div",{className:"shadcn-color-picker-heading",children:[e.jsx("h3",{id:"shadcn-color-picker-title",className:"shadcn-color-picker-title",children:i("theme.shadcnCustom.title","Custom shadcn colors")}),e.jsx("p",{className:"shadcn-color-picker-description",children:i("theme.shadcnCustom.description","Override shadcn design tokens with hex colors. Blank tokens use the theme defaults.")})]}),e.jsx("button",{type:"button",className:"btn btn-icon btn-sm shadcn-color-picker-toggle","aria-expanded":d,"aria-controls":t,"aria-label":l,title:l,onClick:()=>v(n=>!n),children:e.jsx(w,{size:16,"aria-hidden":"true"})})]}),d?e.jsxs("div",{id:t,className:"shadcn-color-picker-controls-panel","data-testid":"shadcn-color-picker-controls",children:[e.jsx("div",{className:"shadcn-color-picker-actions",children:e.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>c({}),children:i("theme.shadcnCustom.reset","Reset custom colors")})}),e.jsx("div",{className:"shadcn-color-picker-grid",children:W.map(n=>{const p=q(n,r),y=u[n.cssVar]??p,x=`shadcn-color-${n.cssVar.replace(/^--/,"").replace(/[^a-z0-9]+/gi,"-")}`;return e.jsxs("div",{className:"shadcn-color-picker-row","data-testid":`shadcn-color-${n.cssVar}`,children:[e.jsxs("label",{className:"shadcn-color-picker-label",htmlFor:x,children:[e.jsx("span",{children:i(`theme.shadcnCustom.token.${n.cssVar}`,n.label)}),e.jsx("code",{children:n.cssVar})]}),e.jsxs("div",{className:"shadcn-color-picker-controls",children:[e.jsx("input",{"aria-label":i("theme.shadcnCustom.colorInput","Pick {{label}} color",{label:n.label}),className:"shadcn-color-picker-native",type:"color",value:he(y),onChange:f=>m(n.cssVar,f.currentTarget.value)}),e.jsx("input",{id:x,"aria-label":i("theme.shadcnCustom.hexInput","{{label}} hex color",{label:n.label}),className:"input shadcn-color-picker-hex",type:"text",inputMode:"text",spellCheck:!1,value:y,onChange:f=>m(n.cssVar,f.currentTarget.value)})]})]},n.cssVar)})})]}):null]})}function ue(s){return N.find(c=>c.value===s)??N[0]}function L({className:s}){return e.jsxs("span",{className:`theme-option-swatch ${s}`,"aria-hidden":"true",children:[e.jsx("span",{className:"theme-option-swatch-sample theme-option-swatch-sample-1"}),e.jsx("span",{className:"theme-option-swatch-sample theme-option-swatch-sample-2"}),e.jsx("span",{className:"theme-option-swatch-sample theme-option-swatch-sample-3"}),e.jsx("span",{className:"theme-option-swatch-sample theme-option-swatch-sample-4"})]})}function xe({colorTheme:s,onColorThemeChange:c,themeMode:r,shadcnCustomColors:i={},resolvedThemeMode:d=r==="light"?"light":"dark",onThemeModeChange:v,onShadcnCustomColorsChange:t=()=>{},triggerVariant:u="compact"}){const{t:m}=P("app"),[l,w]=h.useState(!1),[n,p]=h.useState(()=>Math.max(0,N.findIndex(a=>a.value===s))),y=h.useRef(null),x=h.useRef([]),f=h.useMemo(()=>ue(s),[s]),j=r==="system"?d:r,E=G.find(a=>a.value===j)?.icon,g=r==="system"?m("theme.system","System"):m(`theme.${r}`,r?`${r.charAt(0).toUpperCase()}${r.slice(1)}`:"Dark"),C=m(`theme.colorTheme.${f.value}`,f.label),S=`${m("theme.currentTheme","Current theme")} ${g} / ${C}`,R="theme-dropdown-listbox";h.useEffect(()=>{if(!l)return;const a=b=>{y.current&&!y.current.contains(b.target)&&w(!1)};return document.addEventListener("pointerdown",a),()=>document.removeEventListener("pointerdown",a)},[l]),h.useEffect(()=>{p(Math.max(0,N.findIndex(a=>a.value===s)))},[s]),h.useEffect(()=>{l&&x.current[n]?.focus()},[n,l]);const M=a=>{c(a),w(!1)},$=a=>{if(a.key==="ArrowDown"||a.key==="ArrowUp"||a.key==="Enter"||a.key===" "){a.preventDefault();const b=Math.max(0,N.findIndex(k=>k.value===s));p(a.key==="ArrowUp"?Math.max(0,b-1):b),w(!0)}},o=(a,b,k)=>{if(a.key==="Escape"){a.preventDefault(),w(!1);return}if(a.key==="ArrowDown"||a.key==="ArrowUp"){a.preventDefault();const I=a.key==="ArrowDown"?1:-1;p((b+I+N.length)%N.length);return}if(a.key==="Home"){a.preventDefault(),p(0);return}if(a.key==="End"){a.preventDefault(),p(N.length-1);return}(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),M(k))};return e.jsxs("div",{className:`theme-dropdown${u==="current-row"?" theme-dropdown--current-row":""}${l?" open":""}`,ref:y,children:[e.jsxs("button",{type:"button",className:`theme-dropdown-trigger btn${u==="current-row"?" theme-dropdown-trigger--current-row":""}`,"aria-label":u==="current-row"?S:void 0,"aria-haspopup":"listbox","aria-expanded":l,"aria-controls":R,onClick:()=>w(a=>!a),onKeyDown:$,children:[u==="current-row"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"theme-dropdown-current-row-icon","aria-hidden":"true",children:E?e.jsx(E,{size:20}):null}),e.jsxs("span",{className:"theme-dropdown-current-row-info",children:[e.jsx("span",{className:"theme-dropdown-current-row-label",children:m("theme.currentTheme","Current theme")}),e.jsxs("span",{className:"theme-dropdown-current-row-value",children:[g," / ",C]})]}),e.jsx(L,{className:f.className})]}):e.jsxs(e.Fragment,{children:[e.jsx(L,{className:f.className}),e.jsx("span",{className:"theme-dropdown-trigger-label",children:C})]}),e.jsx(B,{size:16,"aria-hidden":"true"})]}),r&&v?e.jsx("div",{className:"theme-dropdown-modes",role:"radiogroup","aria-label":m("theme.modeLabel","Theme mode"),children:G.map(({value:a,label:b,icon:k})=>e.jsxs("button",{type:"button",className:`theme-dropdown-mode-btn btn btn-sm${r===a?" active":""}`,"aria-pressed":r===a,onClick:()=>v(a),title:m(`theme.${a}Mode`,`${b} mode`),children:[e.jsx(k,{size:16,"aria-hidden":"true"}),e.jsx("span",{children:m(`theme.${a}`,b)})]},a))}):null,s==="shadcn-custom"?e.jsx(de,{value:i,onChange:t,resolvedThemeMode:d}):null,l?e.jsx("div",{className:"theme-dropdown-popover",role:"presentation",children:e.jsx("div",{id:R,className:"theme-dropdown-list",role:"listbox","aria-label":m("theme.colorThemeLabel","Color theme"),children:N.map(({value:a,label:b,className:k},I)=>{const _=s===a;return e.jsxs("button",{ref:F=>{x.current[I]=F},type:"button",className:`theme-dropdown-option${_?" active":""}`,role:"option","aria-selected":_,tabIndex:I===n?0:-1,onClick:()=>M(a),onKeyDown:F=>o(F,I,a),children:[e.jsx(L,{className:k}),e.jsx("span",{className:"theme-dropdown-option-label",children:m(`theme.colorTheme.${a}`,b)}),_?e.jsx(K,{size:16,"aria-hidden":"true"}):null]},a)})})}):null]})}const me=[{type:"bug",label:"Report bug",Icon:X},{type:"feedback",label:"Send feedback",Icon:Y},{type:"idea",label:"Share idea",Icon:J},{type:"help",label:"Get help",Icon:ae}];function Ne({onSelect:s}){const[c,r]=h.useState(!1),[i,d]=h.useState(),v=h.useRef(null),t=h.useRef(null),u=h.useCallback(()=>{const l=v.current?.getBoundingClientRect();l&&d({top:l.bottom,left:l.left,right:window.innerWidth-l.right})},[]);h.useEffect(()=>{if(!c)return;u();const l=()=>u();return window.addEventListener("resize",l),window.addEventListener("scroll",l,!0),()=>{window.removeEventListener("resize",l),window.removeEventListener("scroll",l,!0)}},[c,u]),h.useEffect(()=>{if(!c)return;const l=n=>{const p=n.target;v.current?.contains(p)||t.current?.contains(p)||r(!1)},w=n=>{n.key==="Escape"&&(r(!1),v.current?.focus())};return document.addEventListener("mousedown",l),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",w)}},[c]);const m=c&&i&&typeof document<"u"?H.createPortal(e.jsx("div",{ref:t,className:"report-action-menu__list report-action-menu__list--portal",role:"menu",style:{top:i.top,left:i.left,right:i.right},children:me.map(({type:l,label:w,Icon:n})=>e.jsxs("button",{className:"report-action-menu__item",type:"button",role:"menuitem",onClick:()=>{r(!1),s(l)},children:[e.jsx(n,{"aria-hidden":"true"}),w]},l))}),document.body):null;return e.jsxs("div",{className:"report-action-menu",children:[e.jsx("button",{ref:v,className:"btn btn-secondary",type:"button","aria-haspopup":"menu","aria-expanded":c,onClick:()=>r(l=>!l),children:"Report"}),m]})}const pe={bug:"What went wrong?",feedback:"What would you like to share?",idea:"What would you like Fusion to do?",help:"What would you like help with?"};function ge({actionType:s,onClose:c,contextRefs:r}){const{t:i}=P("app"),[d,v]=h.useState(""),[t,u]=h.useState(),[m,l]=h.useState(!1),[w,n]=h.useState(),[p,y]=h.useState(!1),[x,f]=h.useState(),[j,E]=h.useState(),[g,C]=h.useState(!1),S=h.useRef(0),R=async o=>{l(!0),n(void 0);try{const a=await Z();if(!a)throw new Error("Screen capture was unavailable or denied.");const{artifactId:b}=await ie(a);if(S.current!==o)return;E(b)}catch(a){if(S.current!==o)return;y(!1),n(a instanceof Error?a.message:"We could not capture the current screen.")}finally{S.current===o&&l(!1)}},M=async()=>{if(d.trim()){if(p&&(!j||!g)){n("Capture and confirm local screenshot retention before continuing, or turn attachment off.");return}l(!0),n(void 0);try{if(A("report"),s==="help"){const o=await ce(d);if(o.answered){u({kind:"help",answer:o.answer});return}}u(await ne({actionType:s,targetType:x,userPrompt:d,contextRefs:r,activityTrace:z(),screenshotArtifactId:p&&g?j:void 0}))}catch{n("We could not prepare your report. Check your connection and try again.")}finally{l(!1)}}},$=async(o,a,b)=>{if(t?.report){l(!0),n(void 0);try{A("report"),u(await oe({actionType:s,targetType:x,report:t.report,endorseIssueNumber:o,endorseDiscussionId:a,endorseRoadmapIssueNumber:b,activityTrace:z(),screenshotArtifactId:p&&g?j:void 0}))}catch{n("We could not send your report. Your draft is still here; try again.")}finally{l(!1)}}};return e.jsx("div",{className:"report-modal-backdrop",role:"presentation",children:e.jsxs("section",{className:"card report-modal",role:"dialog","aria-modal":"true","aria-label":`${s} report`,children:[e.jsx("button",{className:"btn-icon report-modal__close",type:"button","aria-label":"Close report",onClick:c,children:"×"}),w&&e.jsx("p",{className:"report-modal__error",role:"alert",children:w}),!t&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{children:s[0].toUpperCase()+s.slice(1)}),e.jsx("label",{htmlFor:"report-prompt",children:pe[s]}),e.jsx("textarea",{id:"report-prompt",className:"input",value:d,onChange:o=>v(o.target.value),maxLength:4e3}),e.jsxs("label",{className:"report-modal__screenshot-option",children:[e.jsx("input",{type:"checkbox",checked:p,onChange:o=>{const a=o.target.checked,b=++S.current;y(a),E(void 0),C(!1),a?R(b):l(!1)}})," Store a screenshot locally"]}),p&&e.jsx("div",{className:"report-modal__screenshot-preview",children:j?e.jsxs("label",{className:"report-modal__screenshot-option",children:[e.jsx("input",{type:"checkbox",checked:g,onChange:o=>C(o.target.checked)})," I confirm Fusion may retain this screenshot locally for this report."]}):e.jsx("p",{children:"Capturing and storing locally…"})}),e.jsx("label",{htmlFor:"report-target",children:i("report.targetLabel","Filing target")}),e.jsxs("select",{id:"report-target",className:"input",value:x??"",onChange:o=>f(o.target.value||void 0),children:[e.jsx("option",{value:"",children:i("report.targetInherit","Use configured action target")}),e.jsx("option",{value:"issue",children:i("report.targetIssue","GitHub Issue")}),e.jsx("option",{value:"discussion",children:i("report.targetDiscussion","GitHub Discussion")})]}),e.jsxs("details",{className:"report-modal__activity-trace",children:[e.jsx("summary",{children:"Activity trace to send"}),e.jsx("ul",{children:z().map((o,a)=>e.jsx("li",{children:o},`${o}-${a}`))})]}),e.jsx("button",{className:"btn btn-primary",type:"button",disabled:!d.trim()||m,onClick:()=>void M(),children:w?"Retry":"Continue"})]}),t?.kind==="draft-ready"&&t.report&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{children:"Review your report"}),e.jsx("label",{htmlFor:"report-review-prompt",children:"Report summary"}),e.jsx("textarea",{id:"report-review-prompt",className:"input",value:t.report.userPrompt,onChange:o=>{const a=o.target.value;u({...t,report:{...t.report,userPrompt:a}})}}),e.jsx("label",{htmlFor:"report-review-body",children:"Structured report"}),e.jsx("textarea",{id:"report-review-body",className:"input",value:t.report.body??"",onChange:o=>u({...t,report:{...t.report,body:o.target.value}})}),e.jsx("button",{className:"btn btn-primary",type:"button",disabled:m,onClick:()=>void $(),children:"File report"})]}),t?.kind==="duplicate-found"&&t.issue&&t.report&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{children:t.issue.roadmap?i("report.roadmapDuplicate.title","Already on the roadmap — add your data point?"):"Review data point for a similar open issue"}),e.jsx("a",{href:t.issue.url,target:"_blank",rel:"noreferrer",children:t.issue.title}),e.jsx("label",{htmlFor:"report-duplicate-prompt",children:"Report summary"}),e.jsx("textarea",{id:"report-duplicate-prompt",className:"input",value:t.report.userPrompt,onChange:o=>{const a=o.target.value;u({...t,report:{...t.report,userPrompt:a}})}}),e.jsx("label",{htmlFor:"report-duplicate-body",children:"Structured data point"}),e.jsx("textarea",{id:"report-duplicate-body",className:"input",value:t.report.body??"",onChange:o=>u({...t,report:{...t.report,body:o.target.value}})}),e.jsx("button",{className:"btn btn-primary",type:"button",disabled:m,onClick:()=>void $(t.issue.discussionId||t.issue.roadmap?void 0:t.issue.number,t.issue.discussionId,t.issue.roadmap?t.issue.number:void 0),children:"Confirm and add data point"})]}),(t?.kind==="filed"||t?.kind==="endorsed")&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{children:t.kind==="filed"&&t.destination==="issue"?"Report filed as an Issue":"Report sent"}),e.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer",children:"View on GitHub"}),t.report?.body&&e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"filed-report",children:"Final report"}),e.jsx("textarea",{id:"filed-report",className:"input",value:t.report.body,readOnly:!0})]})]}),t?.kind==="help"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{children:"Suggested help"}),e.jsx("p",{children:t.answer?.summary??t.answer?.content})]}),t?.kind==="unavailable"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{role:"alert",children:t.message}),e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>{u(void 0),n(void 0)},children:"Return to prompt"})]})]})})}export{X as B,Ne as R,G as T,xe as a,ge as b,fe as l,ye as r};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-xterm-BNq00GSj.js","assets/vendor-react-SZ_qB27O.js","assets/vendor-xterm-LZoznX6r.css","assets/addon-fit-C1WQXRvu.js","assets/addon-unicode11-BVmNDUBM.js","assets/addon-webgl-uLc0RKcC.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{H as ge,I as A,J as le,K as V,N as ce,O as B,Q as xe,U as Ne,o as Re,W as Pe,Y as J,_ as je,$ as Me,a0 as De,a1 as I,a2 as Le,a3 as Oe}from"./index-Cg9ahVtV.js";import{r as i,j as t}from"./vendor-react-SZ_qB27O.js";import"./vendor-xterm-BNq00GSj.js";import{u as Ae}from"./vendor-i18n-GF3RlKbq.js";import{S as ze}from"./shield-alert-CcQuaRHN.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-reactflow-9C3XTE7_.js";const Fe=32*1024,Be=100,Ie="\x1B",Ke=" ",We="",$e="\x1B[A",Ue="\x1B[B",Qe="\x1B[C",Ve="\x1B[D",K={ctrl:"Ctrl",escape:"Esc",tab:"Tab",ctrlC:"^C"};function de(u){if(u.length!==1)return null;const o=u.toUpperCase().charCodeAt(0);return o>=64&&o<=95?String.fromCharCode(o&31):null}function Je(){const[u,f]=i.useState(()=>J());return i.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const o=window.matchMedia(je),a=window.visualViewport,y=()=>f(J());return y(),typeof a?.addEventListener=="function"&&a.addEventListener("resize",y),typeof o.addEventListener=="function"?(o.addEventListener("change",y),()=>{o.removeEventListener("change",y),typeof a?.removeEventListener=="function"&&a.removeEventListener("resize",y)}):(o.addListener(y),()=>{o.removeListener(y),typeof a?.removeEventListener=="function"&&a.removeEventListener("resize",y)})},[]),u}function Ye(u,f){if(typeof window>"u")return"";const a=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/cli-sessions/ws?sessionId=${encodeURIComponent(u)}&ticket=${encodeURIComponent(f)}`;return Oe(a)}function He(){return/Mac|iPhone|iPad|iPod/i.test(navigator.platform)}function Ge(u){if(typeof window<"u"&&typeof window.atob=="function"){const f=window.atob(u),o=new Uint8Array(f.length);for(let a=0;a<f.length;a++)o[a]=f.charCodeAt(a);return new TextDecoder("utf-8").decode(o)}return Buffer.from(u,"base64").toString("utf8")}function at({sessionId:u,readOnly:f=!1,posture:o,mode:a="live",projectId:y,onConfirmAdvance:E,showConfirmAdvance:W=!1,onOpenAdapterSettings:Y}){const{t:r}=Ae("app"),C=i.useRef(null),T=i.useRef(null),j=i.useRef(null),S=i.useRef(null),[H,G]=i.useState(!1),[ue,$]=i.useState(!1),[q,Z]=i.useState(!1),g=Je(),{keyboardOpen:z,keyboardOverlap:me}=ge({enabled:g}),fe=i.useRef(null),[_,X]=i.useState(""),[x,M]=i.useState(!1),[pe,ye]=i.useState(()=>A().customShortcuts),[ee,te]=i.useState(null),ne=f||ee===!0,D=!f&&ee===!1&&a==="live",b=i.useCallback(e=>{if(!e||!D)return;const n=S.current;n?.readyState===WebSocket.OPEN&&n.send(JSON.stringify({type:"input",data:e}))},[D]),N=i.useCallback(e=>{if(x){const n=de(e);if(M(!1),n){b(n);return}}b(e)},[x,b]),l=i.useCallback(e=>{e.preventDefault()},[]),be=i.useCallback(e=>{e?.preventDefault?.(),_&&b(_),b("\r"),X("")},[_,b]),he=i.useCallback(e=>{if(x&&e.length>_.length){const n=e.slice(_.length,_.length+1),d=de(n);if(M(!1),d){b(d);return}}X(e)},[x,_,b]);i.useEffect(()=>{W&&$(!1)},[W,u]);const L=i.useCallback((e,n)=>{const d=S.current;d?.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"resize",cols:e,rows:n}))},[]),ie=i.useCallback(()=>{const e=T.current;if(!e)return;const n=A(),d=le(n.fontFamily);e.options.fontFamily=d,C.current?.style.setProperty("--terminal-glyph-font-family",V(n.fontFamily)),e.options.fontSize=n.fontSize,e.options.cursorStyle=n.cursorStyle,e.options.cursorBlink=n.cursorBlink&&D;try{j.current?.fit?.(),L(e.cols,e.rows)}catch{}ce(n.fontSize,d).then(R=>{if(!(!R||T.current!==e||e.options.fontSize!==n.fontSize||e.options.fontFamily!==d)){B(e,d),e.options.fontSize=n.fontSize;try{j.current?.fit?.(),L(e.cols,e.rows),B(e,d),e.refresh(0,Math.max(0,e.rows-1))}catch{}}},()=>{})},[D,L]);i.useEffect(()=>{if(typeof window>"u")return;const e=n=>{n.key===Me&&(ie(),ye(A().customShortcuts))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[ie]),i.useEffect(()=>{if(!u||typeof window>"u")return;let e=!1,n=null,d=null,R=0;te(null);const U=L,ke=p=>{if(R+=p,R<Fe)return;const h=S.current;h?.readyState===WebSocket.OPEN&&h.send(JSON.stringify({type:"ack",bytes:R})),R=0};return(async()=>{let p;try{p=await De(`/cli-sessions/${encodeURIComponent(u)}/attach-ticket`,{method:"POST",body:JSON.stringify(y?{projectId:y}:{})})}catch{return}if(e)return;te(p.readOnly);const h=!f&&!p.readOnly&&a==="live",[{Terminal:ve},{FitAddon:Ee},{Unicode11Addon:Ce}]=await Promise.all([I(()=>import("./vendor-xterm-BNq00GSj.js").then(c=>c.x),__vite__mapDeps([0,1,2])),I(()=>import("./addon-fit-C1WQXRvu.js").then(c=>c.a),__vite__mapDeps([3,1])),I(()=>import("./addon-unicode11-BVmNDUBM.js").then(c=>c.a),__vite__mapDeps([4,1]))]);if(e||!C.current)return;const w=A(),O=le(w.fontFamily);C.current.style.setProperty("--terminal-glyph-font-family",V(w.fontFamily));const s=new ve({convertEol:!1,cursorBlink:w.cursorBlink&&h,cursorStyle:w.cursorStyle,disableStdin:!h,scrollback:1e4,fontFamily:O,fontSize:w.fontSize}),P=new Ee;s.loadAddon(P);const Te=new Ce;if(s.loadAddon(Te),s.unicode.activeVersion="11",Le(()=>{s.open(C.current)}),T.current=s,j.current=P,w.renderer==="auto"&&!J())try{const{WebglAddon:c}=await I(async()=>{const{WebglAddon:m}=await import("./addon-webgl-uLc0RKcC.js").then(k=>k.a);return{WebglAddon:m}},__vite__mapDeps([5,1]));if(!e){const m=new c;m.onContextLoss(()=>{try{m.dispose()}catch{}}),s.loadAddon(m)}}catch{}try{P.fit()}catch{}(async()=>{if(!(!await ce(w.fontSize,O)||e||T.current!==s||j.current!==P||s.options.fontSize!==w.fontSize||s.options.fontFamily!==O))try{B(s,O),s.options.fontSize=w.fontSize,P.fit(),U(s.cols,s.rows),B(s,O),s.refresh(0,Math.max(0,s.rows-1))}catch{}})(),h&&(s.onData(c=>{const m=S.current;m?.readyState===WebSocket.OPEN&&m.send(JSON.stringify({type:"input",data:c}))}),s.attachCustomKeyEventHandler(c=>{if(c.type!=="keydown"||!(He()?c.metaKey:c.ctrlKey)||c.altKey||c.shiftKey)return!0;const k=c.key.toLowerCase();if(k==="c"){const v=s.hasSelection()?s.getSelection():"";return v?(navigator.clipboard?.writeText(v).catch(()=>{}),!1):!0}if(k==="v"){const v=navigator.clipboard?.readText;return v&&v.call(navigator.clipboard).then(ae=>{if(!ae)return;const re=S.current;re?.readyState===WebSocket.OPEN&&re.send(JSON.stringify({type:"input",data:ae}))}).catch(()=>{}),!1}return!0})),n=new ResizeObserver(()=>{d&&clearTimeout(d),d=setTimeout(()=>{try{P.fit(),U(s.cols,s.rows)}catch{}},Be)}),n.observe(C.current);const Q=new WebSocket(Ye(u,p.ticket));S.current=Q,Q.onopen=()=>{U(s.cols,s.rows)},Q.onmessage=c=>{let m;try{m=JSON.parse(typeof c.data=="string"?c.data:"")}catch{return}switch(m.type){case"scrollback":case"data":{if(typeof m.data!="string")return;const k=Ge(m.data),v=k.length;s.write(k,()=>ke(v));break}}}})(),()=>{e=!0,d&&clearTimeout(d),n&&n.disconnect();const p=S.current;if(p){p.onopen=null,p.onmessage=null,p.onclose=null,p.onerror=null;try{p.close()}catch{}S.current=null}const h=T.current;if(h){try{h.dispose()}catch{}T.current=null}j.current=null}},[u,f,a,y,L]);const se=i.useMemo(()=>a==="idle"?r("cliTerminal.replayIdle","Session idle"):a==="ended"?r("cliTerminal.replayEnded","Session ended"):null,[a,r]),we=i.useCallback(async()=>{if(E){Z(!0);try{await E("advance"),$(!0)}finally{Z(!1)}}},[E]),Se=i.useCallback(async()=>{E&&await E("not-yet"),$(!0)},[E]),F=!!o?.elevated,oe=o?.elevatedFlags?.join(", "),_e={"--terminal-glyph-font-family":V(A().fontFamily)};return t.jsxs("div",{className:`cli-session-terminal${g?" cli-session-terminal--mobile":""}${g&&z?" cli-session-terminal--keyboard-open":""}`,"data-mode":a,"data-read-only":ne,"data-mobile":g,"data-keyboard-open":g&&z,children:[t.jsxs("header",{className:"cli-session-terminal__header",children:[o&&t.jsxs("div",{className:"cli-session-terminal__posture-wrap",children:[t.jsxs("button",{type:"button",className:`cli-posture-chip${F?" cli-posture-chip--elevated":""}`,"data-elevated":F,"aria-expanded":H,onClick:()=>G(e=>!e),children:[F?t.jsx(ze,{size:13,"aria-hidden":"true"}):t.jsx(xe,{size:13,"aria-hidden":"true"}),t.jsx("span",{className:"cli-posture-chip__name",children:o.adapterName}),o.mode&&t.jsx("span",{className:"cli-posture-chip__mode",children:o.mode}),F&&oe&&t.jsx("span",{className:"cli-posture-chip__flag",children:oe})]}),H&&t.jsxs("div",{className:"cli-posture-tooltip",role:"tooltip",children:[t.jsx("p",{className:"cli-posture-tooltip__title",children:r("cliTerminal.postureResolved","Resolved posture")}),t.jsxs("ul",{className:"cli-posture-tooltip__list",children:[(o.resolved??[]).map((e,n)=>t.jsx("li",{children:e},n)),(o.resolved??[]).length===0&&t.jsx("li",{children:o.mode??r("cliTerminal.postureBaseline","Baseline")})]}),Y&&t.jsxs("button",{type:"button",className:"cli-posture-tooltip__settings",onClick:()=>{G(!1),Y()},children:[t.jsx(Ne,{size:12,"aria-hidden":"true"}),r("cliTerminal.adapterSettings","Adapter settings")]})]})]}),ne&&t.jsxs("span",{className:"cli-session-terminal__readonly-badge",children:[t.jsx(Re,{size:12,"aria-hidden":"true"}),r("cliTerminal.readOnly","Read-only")]}),se&&t.jsx("span",{className:"cli-session-terminal__replay-badge","data-replay-mode":a,children:se})]}),t.jsx("div",{className:"cli-session-terminal__viewport",ref:C,"data-testid":"cli-terminal-viewport",style:_e}),W&&!ue&&t.jsxs("div",{className:"cli-session-terminal__advance-strip",role:"region",children:[t.jsx("span",{className:"cli-session-terminal__advance-copy",children:r("cliTerminal.advancePrompt","This session looks idle — advance to review?")}),t.jsxs("div",{className:"cli-session-terminal__advance-actions",children:[t.jsx("button",{type:"button",className:"cli-session-terminal__advance-btn",disabled:q,onClick:we,children:r("cliTerminal.advance","Advance")}),t.jsx("button",{type:"button",className:"cli-session-terminal__advance-btn cli-session-terminal__advance-btn--secondary",disabled:q,onClick:Se,children:r("cliTerminal.notYet","Not yet")})]})]}),g&&D&&t.jsxs("div",{className:`cli-session-terminal__mobile-bar${z?" cli-session-terminal__mobile-bar--keyboard-open":""}`,"data-testid":"cli-terminal-mobile-bar",style:z?{bottom:`${me}px`}:void 0,children:[t.jsxs("div",{className:"cli-session-terminal__key-row","data-testid":"cli-terminal-key-bar",children:[t.jsx("button",{type:"button",className:`cli-terminal-key cli-terminal-key--ctrl${x?" cli-terminal-key--active":""}`,"data-testid":"cli-key-ctrl","aria-label":r("cliTerminal.mobileKeyCtrl","Sticky Ctrl modifier"),"aria-pressed":x,onPointerDown:l,onMouseDown:l,onClick:()=>M(e=>!e),children:K.ctrl}),t.jsx("button",{type:"button",className:"cli-terminal-key","data-testid":"cli-key-esc","aria-label":r("cliTerminal.mobileKeyEsc","Send Escape"),onPointerDown:l,onMouseDown:l,onClick:()=>N(Ie),children:K.escape}),t.jsx("button",{type:"button",className:"cli-terminal-key","data-testid":"cli-key-tab","aria-label":r("cliTerminal.mobileKeyTab","Send Tab"),onPointerDown:l,onMouseDown:l,onClick:()=>N(Ke),children:K.tab}),t.jsx("button",{type:"button",className:"cli-terminal-key cli-terminal-key--ctrlc","data-testid":"cli-key-ctrl-c","aria-label":r("cliTerminal.mobileKeyCtrlC","Send Ctrl-C"),onPointerDown:l,onMouseDown:l,onClick:()=>{M(!1),b(We)},children:K.ctrlC}),t.jsx("button",{type:"button",className:"cli-terminal-key","data-testid":"cli-key-arrow-up","aria-label":r("cliTerminal.mobileKeyArrowUp","Cursor up"),onPointerDown:l,onMouseDown:l,onClick:()=>N($e),children:"↑"}),t.jsx("button",{type:"button",className:"cli-terminal-key","data-testid":"cli-key-arrow-down","aria-label":r("cliTerminal.mobileKeyArrowDown","Cursor down"),onPointerDown:l,onMouseDown:l,onClick:()=>N(Ue),children:"↓"}),t.jsx("button",{type:"button",className:"cli-terminal-key","data-testid":"cli-key-arrow-left","aria-label":r("cliTerminal.mobileKeyArrowLeft","Cursor left"),onPointerDown:l,onMouseDown:l,onClick:()=>N(Ve),children:"←"}),t.jsx("button",{type:"button",className:"cli-terminal-key","data-testid":"cli-key-arrow-right","aria-label":r("cliTerminal.mobileKeyArrowRight","Cursor right"),onPointerDown:l,onMouseDown:l,onClick:()=>N(Qe),children:"→"}),pe.map(e=>t.jsx("button",{type:"button",className:"cli-terminal-key cli-terminal-key--custom","data-testid":`cli-terminal-custom-shortcut-${e.id}`,title:e.label,"aria-label":e.label,onPointerDown:l,onMouseDown:l,onClick:()=>{M(!1),b(Pe(e.value))},children:e.label},e.id))]}),t.jsxs("form",{className:"cli-session-terminal__input-row",onSubmit:be,children:[t.jsx("input",{ref:fe,type:"text",className:"cli-session-terminal__mobile-input","data-testid":"cli-terminal-mobile-input",value:_,placeholder:r("cliTerminal.mobileInputPlaceholder","Type to send to the session…"),autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,onChange:e=>he(e.target.value)}),t.jsx("button",{type:"submit",className:"cli-session-terminal__mobile-send","data-testid":"cli-terminal-mobile-send","aria-label":r("cliTerminal.mobileSend","Send"),onPointerDown:l,onMouseDown:l,children:r("cliTerminal.mobileSend","Send")})]})]})]})}export{at as SessionTerminal};
|