@runfusion/fusion 0.77.0-beta.5 → 0.77.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/bin.js +42668 -39363
  2. package/dist/child-process-worker.js +7647 -4857
  3. package/dist/client/.vite/manifest.json +259 -322
  4. package/dist/client/assets/{AgentDetailView-CSK_Rnlk.js → AgentDetailView-C1eh_vXv.js} +4 -4
  5. package/dist/client/assets/{AgentPermissionPolicyEditor-kG44Adcm.js → AgentPermissionPolicyEditor-CeKsO1LR.js} +2 -2
  6. package/dist/client/assets/{AgentsView-ClKwKWnU.js → AgentsView-BNe2ABOc.js} +4 -4
  7. package/dist/client/assets/CommandCenter-BuREM-G1.js +102 -0
  8. package/dist/client/assets/DevServerView-D0i1b-QO.js +1 -0
  9. package/dist/client/assets/DirectoryPicker-VOx91hQt.js +1 -0
  10. package/dist/client/assets/DocumentsView-CO5W_WVb.js +1 -0
  11. package/dist/client/assets/EvalsView-BqSINSrZ.js +1 -0
  12. package/dist/client/assets/ExperimentalAgentOnboardingModal-DEcFgONi.js +1 -0
  13. package/dist/client/assets/{GoalsView-ysh3X2x6.js → GoalsView-DZ57wXmJ.js} +1 -1
  14. package/dist/client/assets/{InsightsView-BbMjCu7J.js → InsightsView-DSWfXG7Q.js} +3 -3
  15. package/dist/client/assets/{MemoryView-B3IgA8Bx.js → MemoryView-BEX10uhl.js} +1 -1
  16. package/dist/client/assets/{PiExtensionsManager-CZlIw7C3.js → PiExtensionsManager-DcAmXXoR.js} +2 -2
  17. package/dist/client/assets/PluginManager-BU0omQUv.js +1 -0
  18. package/dist/client/assets/{PullRequestView-DhhsJV8I.js → PullRequestView-B-JL_8Kk.js} +2 -2
  19. package/dist/client/assets/{ReportModal-CQMn4i1y.js → ReportModal-DxggF_RH.js} +5 -5
  20. package/dist/client/assets/{ResearchView-CVwfs4l3.js → ResearchView-CnwTXfQO.js} +1 -1
  21. package/dist/client/assets/{SecretsView-CrJfHle9.js → SecretsView-BDvzsLFz.js} +1 -1
  22. package/dist/client/assets/SettingsModal-801eFQ9u.js +21 -0
  23. package/dist/client/assets/{SettingsModal-B6U5Umru.js → SettingsModal-BZHeQ3ED.js} +1 -1
  24. package/dist/client/assets/{SettingsTextareaRow-O7-u9uMC.js → SettingsTextareaRow-B0rTuelr.js} +1 -1
  25. package/dist/client/assets/SetupWizardModal-CoExPwIn.js +2 -0
  26. package/dist/client/assets/{SkillsView-CoWAjvWU.js → SkillsView-WVP25LPj.js} +1 -1
  27. package/dist/client/assets/WorkflowNodeEditor-pCMyKcnS.js +8 -0
  28. package/dist/client/assets/{agent-import-generation-BqDmtTur.js → agent-import-generation-M_hKtjgN.js} +1 -1
  29. package/dist/client/assets/{agentsOrgChartLayout-C4cLqlV6.js → agentsOrgChartLayout-DjvIMhFD.js} +1 -1
  30. package/dist/client/assets/{app-C_PTWuI1.js → app-BOvA34XN.js} +3 -3
  31. package/dist/client/assets/{app-BBSLJDbV.js → app-Bic4iWXQ.js} +3 -3
  32. package/dist/client/assets/{app-Bvr57EZQ.js → app-BlbH7Tir.js} +2 -2
  33. package/dist/client/assets/{app-DwvelD-n.js → app-C6TctczU.js} +3 -3
  34. package/dist/client/assets/{app-DRW5hIgr.js → app-D3qZmEIu.js} +3 -3
  35. package/dist/client/assets/{app-BKwOvuxE.js → app-DLnMkUt5.js} +2 -2
  36. package/dist/client/assets/{app-DKx18PHE.js → app-mNy0DeDM.js} +3 -3
  37. package/dist/client/assets/{architectureDiagram-3BPJPVTR-CdxcwdRe.js → architectureDiagram-3BPJPVTR-CkzEm8i9.js} +1 -1
  38. package/dist/client/assets/{blockDiagram-GPEHLZMM-CfQrRfHR.js → blockDiagram-GPEHLZMM-Dc-dUMjY.js} +1 -1
  39. package/dist/client/assets/{c4Diagram-AAUBKEIU-Cx7-2SOm.js → c4Diagram-AAUBKEIU-DnYjsrR0.js} +1 -1
  40. package/dist/client/assets/channel-CxQ40s_U.js +1 -0
  41. package/dist/client/assets/{chunk-2J33WTMH-D8jvgP3M.js → chunk-2J33WTMH-0E1GEFEr.js} +1 -1
  42. package/dist/client/assets/{chunk-4BX2VUAB-B5tBx_s_.js → chunk-4BX2VUAB-Dj5oZd51.js} +1 -1
  43. package/dist/client/assets/{chunk-55IACEB6-C-F-HQ5Z.js → chunk-55IACEB6-DfNT0s8E.js} +1 -1
  44. package/dist/client/assets/{chunk-727SXJPM-BP8Ln-8C.js → chunk-727SXJPM-BnFjhiIQ.js} +1 -1
  45. package/dist/client/assets/{chunk-AQP2D5EJ-DMnTmRmn.js → chunk-AQP2D5EJ-DR84wSqR.js} +1 -1
  46. package/dist/client/assets/{chunk-FMBD7UC4-D_YdfnNc.js → chunk-FMBD7UC4-IjByNOrR.js} +1 -1
  47. package/dist/client/assets/{chunk-ND2GUHAM-CULXyuXq.js → chunk-ND2GUHAM-By0q_jZm.js} +1 -1
  48. package/dist/client/assets/{chunk-QZHKN3VN-CT1BWEJL.js → chunk-QZHKN3VN-BELcl3N5.js} +1 -1
  49. package/dist/client/assets/classDiagram-4FO5ZUOK-C2ARdiRL.js +1 -0
  50. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C2ARdiRL.js +1 -0
  51. package/dist/client/assets/{common-13IRj_PO.js → common-BsNuuNOe.js} +1 -1
  52. package/dist/client/assets/{common-BBynATth.js → common-CASsTuSW.js} +1 -1
  53. package/dist/client/assets/{common-BG-vw0tL.js → common-CfyFt5OG.js} +1 -1
  54. package/dist/client/assets/{common-DSo46rnH.js → common-DS98trLj.js} +1 -1
  55. package/dist/client/assets/common-DeoHWJCq.js +1 -0
  56. package/dist/client/assets/common-PpMdoH5r.js +1 -0
  57. package/dist/client/assets/{common-vpHuuvkd.js → common-cN--mrmm.js} +1 -1
  58. package/dist/client/assets/{cose-bilkent-S5V4N54A-M-3DXa6e.js → cose-bilkent-S5V4N54A-D4cCw9-_.js} +1 -1
  59. package/dist/client/assets/{dagre-BM42HDAG-Bsiqvroz.js → dagre-BM42HDAG-JJp5dVeY.js} +1 -1
  60. package/dist/client/assets/dashboard-view-6zPJm9zC.js +1 -0
  61. package/dist/client/assets/{dashboard-view-BEBh_Ei5.js → dashboard-view-Bl9CPhxE.js} +1 -1
  62. package/dist/client/assets/{dashboard-view-CnFFG3cW.js → dashboard-view-C5Nt8cvY.js} +1 -1
  63. package/dist/client/assets/{dashboard-view-DAHn20ph.js → dashboard-view-MAC_LHDX.js} +2 -2
  64. package/dist/client/assets/{diagram-2AECGRRQ-CZiHoXo5.js → diagram-2AECGRRQ-D4L7j_t_.js} +1 -1
  65. package/dist/client/assets/{diagram-5GNKFQAL-BoJVz4Or.js → diagram-5GNKFQAL-VAGFaXqG.js} +1 -1
  66. package/dist/client/assets/{diagram-KO2AKTUF-DivGQuAL.js → diagram-KO2AKTUF-hqXSggfW.js} +1 -1
  67. package/dist/client/assets/{diagram-LMA3HP47-DkMK7OJp.js → diagram-LMA3HP47-B3eAIuy8.js} +1 -1
  68. package/dist/client/assets/{diagram-OG6HWLK6-DFFvRcpW.js → diagram-OG6HWLK6-BGufp0RK.js} +1 -1
  69. package/dist/client/assets/{erDiagram-TEJ5UH35--217vrom.js → erDiagram-TEJ5UH35-DplXdx8w.js} +1 -1
  70. package/dist/client/assets/{flowDiagram-I6XJVG4X-CQgWO3xf.js → flowDiagram-I6XJVG4X-C1Ms2bko.js} +1 -1
  71. package/dist/client/assets/{folder-open-DR6cRcNR.js → folder-open-nMraSDXu.js} +1 -1
  72. package/dist/client/assets/{ganttDiagram-6RSMTGT7-BjDMUrS3.js → ganttDiagram-6RSMTGT7-DVgxMtXb.js} +1 -1
  73. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-gKUcDnln.js → gitGraphDiagram-PVQCEYII-DH2_n0J8.js} +1 -1
  74. package/dist/client/assets/index-BJc-A7eB.css +1 -0
  75. package/dist/client/assets/index-CBFPgFTp.js +2787 -0
  76. package/dist/client/assets/{infoDiagram-5YYISTIA-BA91T8S5.js → infoDiagram-5YYISTIA-DmZdWVcU.js} +1 -1
  77. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-0BY5xe-c.js → ishikawaDiagram-YF4QCWOH-DsEIHSXr.js} +1 -1
  78. package/dist/client/assets/{journeyDiagram-JHISSGLW-B_OwenbQ.js → journeyDiagram-JHISSGLW-CsfIWmu1.js} +1 -1
  79. package/dist/client/assets/{kanban-definition-UN3LZRKU-GLabUTKp.js → kanban-definition-UN3LZRKU-CQKqeZvc.js} +1 -1
  80. package/dist/client/assets/{mermaid.core-BXo4rxYI.js → mermaid.core-DkC_dr4-.js} +4 -4
  81. package/dist/client/assets/{mindmap-definition-RKZ34NQL-DZl6LPoE.js → mindmap-definition-RKZ34NQL-RnmE-NUe.js} +1 -1
  82. package/dist/client/assets/{pieDiagram-4H26LBE5-DtHq-4py.js → pieDiagram-4H26LBE5-DPu6FPc4.js} +1 -1
  83. package/dist/client/assets/{puzzle-OVm-I1L4.js → puzzle-DwhHOf32.js} +1 -1
  84. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BdjXhd5d.js → quadrantDiagram-W4KKPZXB-CYbypO2p.js} +1 -1
  85. package/dist/client/assets/{requirementDiagram-4Y6WPE33-BoFVjELN.js → requirementDiagram-4Y6WPE33-DFk1vK_N.js} +1 -1
  86. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-B0qyJh-P.js → sankeyDiagram-5OEKKPKP-CkUY1Zzu.js} +1 -1
  87. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-ByY62Eqp.js → sequenceDiagram-3UESZ5HK-CFivaLOO.js} +1 -1
  88. package/dist/client/assets/{standing-instructions-template-BsnnRlwm.js → standing-instructions-template-BbqKGAC1.js} +2 -2
  89. package/dist/client/assets/{stateDiagram-AJRCARHV-CwJ-_Phi.js → stateDiagram-AJRCARHV-BPeD5PwG.js} +1 -1
  90. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-Cfvhq8mV.js → stateDiagram-v2-BHNVJYJU-DduiCPMb.js} +1 -1
  91. package/dist/client/assets/{timeline-definition-PNZ67QCA-Co8VfGN9.js → timeline-definition-PNZ67QCA-CGUNNVro.js} +1 -1
  92. package/dist/client/assets/{upload-CkqDbEeE.js → upload-BS96H1o7.js} +1 -1
  93. package/dist/client/assets/{users-B8DkpbXD.js → users--irrWoyU.js} +1 -1
  94. package/dist/client/assets/{vennDiagram-CIIHVFJN-XSJteQrL.js → vennDiagram-CIIHVFJN-CybTaJJH.js} +1 -1
  95. package/dist/client/assets/{wardley-L42UT6IY-Btc0FRfF.js → wardley-L42UT6IY-DSxaSCGi.js} +1 -1
  96. package/dist/client/assets/{wardleyDiagram-YWT4CUSO--IcDNmrf.js → wardleyDiagram-YWT4CUSO-YFb0AxNt.js} +1 -1
  97. package/dist/client/assets/{xychartDiagram-2RQKCTM6-CZW93G6X.js → xychartDiagram-2RQKCTM6-Cv6zlMJC.js} +1 -1
  98. package/dist/client/index.html +2 -2
  99. package/dist/client/version.json +1 -1
  100. package/dist/droid-cli/package.json +1 -1
  101. package/dist/extension.js +37513 -34387
  102. package/dist/migrations/0065_fn_149_review_convergence_stage.sql +3 -0
  103. package/dist/pi-claude-cli/package.json +1 -1
  104. package/dist/plugin-sdk/index.d.ts +66 -10
  105. package/dist/plugin-sdk/index.js +103 -33
  106. package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +158 -36
  107. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  108. package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +103 -33
  109. package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
  110. package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +103 -33
  111. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  112. package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +103 -33
  113. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  114. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +103 -33
  115. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  116. package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +103 -33
  117. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  118. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +103 -33
  119. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  120. package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +103 -33
  121. package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
  122. package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +103 -33
  123. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  124. package/dist/plugins/fusion-plugin-linear-import/bundled.js +103 -33
  125. package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
  126. package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +103 -33
  127. package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
  128. package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +103 -33
  129. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  130. package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +103 -33
  131. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  132. package/dist/plugins/fusion-plugin-quality/bundled.js +103 -33
  133. package/dist/plugins/fusion-plugin-quality/package.json +1 -1
  134. package/dist/plugins/fusion-plugin-reports/bundled.js +103 -33
  135. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  136. package/dist/plugins/fusion-plugin-roadmap/bundled.js +103 -33
  137. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  138. package/dist/plugins/fusion-plugin-todos/bundled.js +103 -33
  139. package/dist/plugins/fusion-plugin-todos/package.json +1 -1
  140. package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +103 -33
  141. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  142. package/package.json +1 -1
  143. package/skill/fusion/references/engine-tools.md +5 -5
  144. package/dist/client/assets/ChatView-DS4XiCm_.css +0 -1
  145. package/dist/client/assets/ChatView-DoOqgkPX.js +0 -13
  146. package/dist/client/assets/CommandCenter-CJxvPbgn.js +0 -102
  147. package/dist/client/assets/DevServerView-C4nyLONX.js +0 -1
  148. package/dist/client/assets/DirectoryPicker-BIvXWIB5.js +0 -1
  149. package/dist/client/assets/DocumentsView-DH_aZysM.js +0 -1
  150. package/dist/client/assets/EvalsView-klRK-GJQ.js +0 -1
  151. package/dist/client/assets/ExperimentalAgentOnboardingModal-CgBmukIm.js +0 -1
  152. package/dist/client/assets/PluginManager-vy0YZ2Nx.js +0 -1
  153. package/dist/client/assets/SessionTerminal-2ZSXmOkG.css +0 -1
  154. package/dist/client/assets/SessionTerminal-BRI8W1-G.js +0 -2
  155. package/dist/client/assets/SettingsModal-h1A_aFqD.js +0 -21
  156. package/dist/client/assets/SetupWizardModal-nXfJp8cA.js +0 -2
  157. package/dist/client/assets/WorkflowNodeEditor-BFMM3RF_.js +0 -8
  158. package/dist/client/assets/channel-B4WN1jC_.js +0 -1
  159. package/dist/client/assets/classDiagram-4FO5ZUOK-CKE8RSOv.js +0 -1
  160. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CKE8RSOv.js +0 -1
  161. package/dist/client/assets/common-DbOCE-0i.js +0 -1
  162. package/dist/client/assets/common-DnXF4Jmj.js +0 -1
  163. package/dist/client/assets/dashboard-view-Bo_gFjdO.js +0 -1
  164. package/dist/client/assets/index-Dki2LBAp.css +0 -1
  165. package/dist/client/assets/index-oxnX59eO.js +0 -2774
  166. package/dist/client/assets/shield-alert-CDy69fl7.js +0 -6
  167. package/dist/client/assets/useDiscoveredSkillsCache-BHUasRiZ.js +0 -1
@@ -1,6 +1,6 @@
1
- import{c as B,b7 as N,b8 as R,b9 as O}from"./index-oxnX59eO.js";import{r as b,j as e}from"./vendor-react-SZ_qB27O.js";import{u as F}from"./vendor-i18n-Duky4gdQ.js";/**
1
+ import{c as B,aV as N,aW as R,aX as O}from"./index-CBFPgFTp.js";import{r as b,j as e}from"./vendor-react-SZ_qB27O.js";import{u as F}from"./vendor-i18n-Duky4gdQ.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const U=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Z=B("book-open",U),_=["allow","require-approval","block"],P=/^[A-Za-z0-9_-]+$/;function W(){const o=new Set(O),a=new Set;for(const c of Object.values(R))for(const r of c)P.test(r)&&!o.has(r)&&a.add(r);return[...a].sort()}function X(o){return{git_write:{label:o("agentPolicy.category.gitWrite.label","Git writes"),description:o("agentPolicy.category.gitWrite.description","Commits, branch updates, and merge-affecting git changes.")},file_write_delete:{label:o("agentPolicy.category.fileWriteDelete.label","File writes/deletes"),description:o("agentPolicy.category.fileWriteDelete.description","Create, edit, or remove files in the workspace.")},command_execution:{label:o("agentPolicy.category.commandExecution.label","Command execution"),description:o("agentPolicy.category.commandExecution.description","Runs shell commands and scripts.")},network_api:{label:o("agentPolicy.category.networkApi.label","Network/API"),description:o("agentPolicy.category.networkApi.description","Outbound network or API access.")},task_agent_mutation:{label:o("agentPolicy.category.taskAgentMutation.label","Task/agent mutation"),description:o("agentPolicy.category.taskAgentMutation.description","Task state changes, delegation, or agent lifecycle actions.")},review_gate_bypass:{label:o("agentPolicy.category.reviewGateBypass.label","Review gate bypass"),description:o("agentPolicy.category.reviewGateBypass.description","Bypassing a failed pre-merge review step to force a card past the review lane.")},file_scope:{label:o("agentPolicy.category.fileScope.label","File Scope expansion"),description:o("agentPolicy.category.fileScope.description","Extending a task's declared File Scope beyond its initial spec at runtime.")}}}function y(o,a){if(a==="require-approval")return o("agentPolicy.requireApproval","Require approval");if(a==="allow")return o("agentPolicy.allow","Allow");if(a==="block")return o("agentPolicy.block","Block");const c=a;return c.charAt(0).toUpperCase()+c.slice(1)}function Y(){return{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"allow",review_gate_bypass:"require-approval",file_scope:"allow"}}const h={unrestricted:{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"allow",review_gate_bypass:"require-approval",file_scope:"allow"},"approval-required":{git_write:"require-approval",file_write_delete:"require-approval",command_execution:"require-approval",network_api:"require-approval",task_agent_mutation:"require-approval",review_gate_bypass:"require-approval",file_scope:"require-approval"},"locked-down":{git_write:"block",file_write_delete:"block",command_execution:"block",network_api:"block",task_agent_mutation:"block",review_gate_bypass:"block",file_scope:"block"}};function $(o){return h[o]}function w(o,a){return N.every(c=>o[c]===a[c])}function z(o){return w(o,h.unrestricted)?"unrestricted":w(o,h["approval-required"])?"approval-required":w(o,h["locked-down"])?"locked-down":"custom"}function J({value:o,projectDefault:a,projectDefaultToolRules:c,mode:r,onChange:p,disabled:u=!1}){const{t:l}=F("app"),E=X(l),I=b.useMemo(()=>W(),[]),[v,A]=b.useState("fn_task_create"),[f,S]=b.useState("block"),D=o?z(o.rules):"unrestricted",q=r==="agent-override"&&!o?"inherit":o?.presetId==="custom"?D:o?.presetId??"unrestricted",m=o?.rules??Y(),g=o?.toolRules??{},j=Object.entries(g).sort(([t],[i])=>t.localeCompare(i)),x=t=>({...t,...Object.keys(g).length>0?{toolRules:{...g}}:{}}),C=t=>{if(r==="agent-override"&&t==="inherit"){p(void 0);return}if(t==="custom"){p(x({presetId:"custom",rules:{...m}}));return}p(x({presetId:t,rules:$(t)}))},L=(t,i)=>{if(r==="agent-override"&&i==="inherit"){if(!o)return;const n={...o.rules};n[t]=a?.[t]??"allow",p(x({presetId:"custom",rules:n}));return}const s={...m,[t]:i};p(x({presetId:"custom",rules:s}))},k=(t,i)=>{const s=t.trim();if(!s||!P.test(s))return;const n={...g,[s]:i};p({presetId:"custom",rules:{...m},toolRules:n})},M=t=>{const i={...g};delete i[t],p({presetId:"custom",rules:{...m},...Object.keys(i).length>0?{toolRules:i}:{}})},G=()=>{k(v,f)};return e.jsxs("div",{className:"agent-policy-editor card",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"agent-policy-preset",children:l("agentPolicy.preset","Preset")}),e.jsxs("select",{id:"agent-policy-preset",className:"select",value:q,onChange:t=>C(t.target.value),disabled:u,children:[r==="agent-override"?e.jsx("option",{value:"inherit",children:l("agentPolicy.inheritDefault","Inherit project default")}):null,e.jsx("option",{value:"unrestricted",children:l("agentPolicy.unrestricted","Unrestricted")}),e.jsx("option",{value:"approval-required",children:l("agentPolicy.approvalRequired","Approval Required")}),e.jsx("option",{value:"locked-down",children:l("agentPolicy.lockedDown","Locked Down")}),e.jsx("option",{value:"custom",children:l("agentPolicy.custom","Custom")})]})]}),e.jsx("div",{className:"agent-policy-table",role:"table","aria-label":l("agentPolicy.ariaLabel","Permission policy categories"),children:N.map(t=>{const i=E[t]??{label:t,description:""},s=a?.[t]??"allow",n=m[t]??"allow",T=r==="agent-override"&&!o?"inherit":n;return e.jsxs("div",{className:"agent-policy-row",role:"row","data-category":t,children:[e.jsxs("div",{className:"agent-policy-cell",children:[e.jsx("strong",{children:i.label}),e.jsx("div",{className:"agent-policy-description",children:i.description}),e.jsx("ul",{className:"agent-policy-examples","aria-label":l("agentPolicy.categoryExamples","{{label}} examples",{label:i.label}),children:(R[t]??[]).map(d=>e.jsx("li",{children:e.jsx("code",{children:d})},`${t}-${d}`))})]}),e.jsxs("div",{className:"agent-policy-cell",children:[e.jsxs("select",{className:"select",value:T,onChange:d=>L(t,d.target.value),disabled:u,children:[r==="agent-override"?e.jsx("option",{value:"inherit",children:l("agentPolicy.inherit","Inherit")}):null,_.map(d=>e.jsx("option",{value:d,children:y(l,d)},d))]}),r==="agent-override"&&T==="inherit"?e.jsxs("div",{className:"agent-policy-inherit-note",children:[l("agentPolicy.fromProjectDefault","from project default"),": ",y(l,s)]}):null]})]},t)})}),e.jsxs("section",{className:"agent-policy-tool-rules","aria-labelledby":"agent-policy-tool-rules-heading",children:[e.jsx("div",{className:"agent-policy-tool-rules-header",children:e.jsxs("div",{children:[e.jsx("h4",{id:"agent-policy-tool-rules-heading",children:l("agentPolicy.exactToolOverrides","Exact tool overrides")}),e.jsx("p",{children:l("agentPolicy.exactToolOverridesDescription","Override one governed tool by exact name before its category rule. Heartbeat-critical exempt tools stay non-configurable.")})]})}),j.length===0?e.jsx("div",{className:"agent-policy-tool-empty","data-testid":"agent-policy-tool-empty",children:l("agentPolicy.noExactToolOverrides","No exact tool overrides configured.")}):e.jsx("div",{className:"agent-policy-tool-list","data-testid":"agent-policy-tool-list",children:j.map(([t,i])=>{const s=c?.[t];return e.jsxs("div",{className:"agent-policy-tool-row","data-testid":"agent-policy-tool-row",children:[e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolName","Tool name")}),e.jsx("input",{className:"input",value:t,disabled:!0,readOnly:!0})]}),e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolDisposition","Disposition")}),e.jsx("select",{className:"select","aria-label":l("agentPolicy.toolDispositionFor","Disposition for {{toolName}}",{toolName:t}),value:i,onChange:n=>k(t,n.target.value),disabled:u,children:_.map(n=>e.jsx("option",{value:n,children:y(l,n)},n))}),r==="agent-override"&&s?e.jsxs("small",{className:"agent-policy-inherit-note",children:[l("agentPolicy.projectDefaultExactTool","project default exact rule"),": ",y(l,s)]}):null]}),e.jsx("button",{type:"button",className:"btn btn-secondary","aria-label":l("agentPolicy.removeToolOverride","Remove exact override for {{toolName}}",{toolName:t}),onClick:()=>M(t),disabled:u,children:l("agentPolicy.remove","Remove")})]},t)})}),e.jsxs("div",{className:"agent-policy-tool-add","data-testid":"agent-policy-tool-add",children:[e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolName","Tool name")}),e.jsx("input",{className:"input",list:"agent-policy-known-tools",value:v,onChange:t=>A(t.target.value),disabled:u,"aria-label":l("agentPolicy.toolOverrideTool","Tool override tool")}),e.jsx("datalist",{id:"agent-policy-known-tools",children:I.map(t=>e.jsx("option",{value:t},t))})]}),e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolDisposition","Disposition")}),e.jsx("select",{className:"select",value:f,onChange:t=>S(t.target.value),disabled:u,"aria-label":l("agentPolicy.toolOverrideDisposition","Tool override disposition"),children:_.map(t=>e.jsx("option",{value:t,children:y(l,t)},t))})]}),e.jsx("button",{type:"button",className:"btn btn-primary",onClick:G,disabled:u||!P.test(v.trim()),children:g[v.trim()]?l("agentPolicy.updateToolOverride","Update override"):l("agentPolicy.addToolOverride","Add override")})]})]}),e.jsxs("details",{className:"agent-policy-exempt",open:!1,children:[e.jsx("summary",{children:l("agentPolicy.exemptTools","Tools exempt from approval policy")}),e.jsx("p",{children:l("agentPolicy.exemptToolsDescription","These coordination tools bypass approval policy so heartbeats and inter-agent messaging cannot deadlock. They are not user-configurable.")}),e.jsx("ul",{className:"agent-policy-exempt-list",children:O.map(t=>e.jsx("li",{children:e.jsx("code",{children:t})},t))})]})]})}export{J as A,Z as B};
6
+ */const W=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Z=B("book-open",W),_=["allow","require-approval","block"],P=/^[A-Za-z0-9_-]+$/;function X(){const o=new Set(O),a=new Set;for(const c of Object.values(R))for(const r of c)P.test(r)&&!o.has(r)&&a.add(r);return[...a].sort()}function U(o){return{git_write:{label:o("agentPolicy.category.gitWrite.label","Git writes"),description:o("agentPolicy.category.gitWrite.description","Commits, branch updates, and merge-affecting git changes.")},file_write_delete:{label:o("agentPolicy.category.fileWriteDelete.label","File writes/deletes"),description:o("agentPolicy.category.fileWriteDelete.description","Create, edit, or remove files in the workspace.")},command_execution:{label:o("agentPolicy.category.commandExecution.label","Command execution"),description:o("agentPolicy.category.commandExecution.description","Runs shell commands and scripts.")},network_api:{label:o("agentPolicy.category.networkApi.label","Network/API"),description:o("agentPolicy.category.networkApi.description","Outbound network or API access.")},task_agent_mutation:{label:o("agentPolicy.category.taskAgentMutation.label","Task/agent mutation"),description:o("agentPolicy.category.taskAgentMutation.description","Task state changes, delegation, or agent lifecycle actions.")},review_gate_bypass:{label:o("agentPolicy.category.reviewGateBypass.label","Review gate bypass"),description:o("agentPolicy.category.reviewGateBypass.description","Bypassing a failed pre-merge review step to force a card past the review lane.")},file_scope:{label:o("agentPolicy.category.fileScope.label","File Scope expansion"),description:o("agentPolicy.category.fileScope.description","Extending a task's declared File Scope beyond its initial spec at runtime.")}}}function y(o,a){if(a==="require-approval")return o("agentPolicy.requireApproval","Require approval");if(a==="allow")return o("agentPolicy.allow","Allow");if(a==="block")return o("agentPolicy.block","Block");const c=a;return c.charAt(0).toUpperCase()+c.slice(1)}function Y(){return{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"allow",review_gate_bypass:"require-approval",file_scope:"allow"}}const h={unrestricted:{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"allow",review_gate_bypass:"require-approval",file_scope:"allow"},"approval-required":{git_write:"require-approval",file_write_delete:"require-approval",command_execution:"require-approval",network_api:"require-approval",task_agent_mutation:"require-approval",review_gate_bypass:"require-approval",file_scope:"require-approval"},"locked-down":{git_write:"block",file_write_delete:"block",command_execution:"block",network_api:"block",task_agent_mutation:"block",review_gate_bypass:"block",file_scope:"block"}};function V(o){return h[o]}function w(o,a){return N.every(c=>o[c]===a[c])}function $(o){return w(o,h.unrestricted)?"unrestricted":w(o,h["approval-required"])?"approval-required":w(o,h["locked-down"])?"locked-down":"custom"}function J({value:o,projectDefault:a,projectDefaultToolRules:c,mode:r,onChange:p,disabled:u=!1}){const{t:l}=F("app"),E=U(l),I=b.useMemo(()=>X(),[]),[v,A]=b.useState("fn_task_create"),[f,S]=b.useState("block"),D=o?$(o.rules):"unrestricted",q=r==="agent-override"&&!o?"inherit":o?.presetId==="custom"?D:o?.presetId??"unrestricted",m=o?.rules??Y(),g=o?.toolRules??{},j=Object.entries(g).sort(([t],[i])=>t.localeCompare(i)),x=t=>({...t,...Object.keys(g).length>0?{toolRules:{...g}}:{}}),C=t=>{if(r==="agent-override"&&t==="inherit"){p(void 0);return}if(t==="custom"){p(x({presetId:"custom",rules:{...m}}));return}p(x({presetId:t,rules:V(t)}))},L=(t,i)=>{if(r==="agent-override"&&i==="inherit"){if(!o)return;const n={...o.rules};n[t]=a?.[t]??"allow",p(x({presetId:"custom",rules:n}));return}const s={...m,[t]:i};p(x({presetId:"custom",rules:s}))},k=(t,i)=>{const s=t.trim();if(!s||!P.test(s))return;const n={...g,[s]:i};p({presetId:"custom",rules:{...m},toolRules:n})},M=t=>{const i={...g};delete i[t],p({presetId:"custom",rules:{...m},...Object.keys(i).length>0?{toolRules:i}:{}})},G=()=>{k(v,f)};return e.jsxs("div",{className:"agent-policy-editor card",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"agent-policy-preset",children:l("agentPolicy.preset","Preset")}),e.jsxs("select",{id:"agent-policy-preset",className:"select",value:q,onChange:t=>C(t.target.value),disabled:u,children:[r==="agent-override"?e.jsx("option",{value:"inherit",children:l("agentPolicy.inheritDefault","Inherit project default")}):null,e.jsx("option",{value:"unrestricted",children:l("agentPolicy.unrestricted","Unrestricted")}),e.jsx("option",{value:"approval-required",children:l("agentPolicy.approvalRequired","Approval Required")}),e.jsx("option",{value:"locked-down",children:l("agentPolicy.lockedDown","Locked Down")}),e.jsx("option",{value:"custom",children:l("agentPolicy.custom","Custom")})]})]}),e.jsx("div",{className:"agent-policy-table",role:"table","aria-label":l("agentPolicy.ariaLabel","Permission policy categories"),children:N.map(t=>{const i=E[t]??{label:t,description:""},s=a?.[t]??"allow",n=m[t]??"allow",T=r==="agent-override"&&!o?"inherit":n;return e.jsxs("div",{className:"agent-policy-row",role:"row","data-category":t,children:[e.jsxs("div",{className:"agent-policy-cell",children:[e.jsx("strong",{children:i.label}),e.jsx("div",{className:"agent-policy-description",children:i.description}),e.jsx("ul",{className:"agent-policy-examples","aria-label":l("agentPolicy.categoryExamples","{{label}} examples",{label:i.label}),children:(R[t]??[]).map(d=>e.jsx("li",{children:e.jsx("code",{children:d})},`${t}-${d}`))})]}),e.jsxs("div",{className:"agent-policy-cell",children:[e.jsxs("select",{className:"select",value:T,onChange:d=>L(t,d.target.value),disabled:u,children:[r==="agent-override"?e.jsx("option",{value:"inherit",children:l("agentPolicy.inherit","Inherit")}):null,_.map(d=>e.jsx("option",{value:d,children:y(l,d)},d))]}),r==="agent-override"&&T==="inherit"?e.jsxs("div",{className:"agent-policy-inherit-note",children:[l("agentPolicy.fromProjectDefault","from project default"),": ",y(l,s)]}):null]})]},t)})}),e.jsxs("section",{className:"agent-policy-tool-rules","aria-labelledby":"agent-policy-tool-rules-heading",children:[e.jsx("div",{className:"agent-policy-tool-rules-header",children:e.jsxs("div",{children:[e.jsx("h4",{id:"agent-policy-tool-rules-heading",children:l("agentPolicy.exactToolOverrides","Exact tool overrides")}),e.jsx("p",{children:l("agentPolicy.exactToolOverridesDescription","Override one governed tool by exact name before its category rule. Heartbeat-critical exempt tools stay non-configurable.")})]})}),j.length===0?e.jsx("div",{className:"agent-policy-tool-empty","data-testid":"agent-policy-tool-empty",children:l("agentPolicy.noExactToolOverrides","No exact tool overrides configured.")}):e.jsx("div",{className:"agent-policy-tool-list","data-testid":"agent-policy-tool-list",children:j.map(([t,i])=>{const s=c?.[t];return e.jsxs("div",{className:"agent-policy-tool-row","data-testid":"agent-policy-tool-row",children:[e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolName","Tool name")}),e.jsx("input",{className:"input",value:t,disabled:!0,readOnly:!0})]}),e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolDisposition","Disposition")}),e.jsx("select",{className:"select","aria-label":l("agentPolicy.toolDispositionFor","Disposition for {{toolName}}",{toolName:t}),value:i,onChange:n=>k(t,n.target.value),disabled:u,children:_.map(n=>e.jsx("option",{value:n,children:y(l,n)},n))}),r==="agent-override"&&s?e.jsxs("small",{className:"agent-policy-inherit-note",children:[l("agentPolicy.projectDefaultExactTool","project default exact rule"),": ",y(l,s)]}):null]}),e.jsx("button",{type:"button",className:"btn btn-secondary","aria-label":l("agentPolicy.removeToolOverride","Remove exact override for {{toolName}}",{toolName:t}),onClick:()=>M(t),disabled:u,children:l("agentPolicy.remove","Remove")})]},t)})}),e.jsxs("div",{className:"agent-policy-tool-add","data-testid":"agent-policy-tool-add",children:[e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolName","Tool name")}),e.jsx("input",{className:"input",list:"agent-policy-known-tools",value:v,onChange:t=>A(t.target.value),disabled:u,"aria-label":l("agentPolicy.toolOverrideTool","Tool override tool")}),e.jsx("datalist",{id:"agent-policy-known-tools",children:I.map(t=>e.jsx("option",{value:t},t))})]}),e.jsxs("label",{children:[e.jsx("span",{children:l("agentPolicy.toolDisposition","Disposition")}),e.jsx("select",{className:"select",value:f,onChange:t=>S(t.target.value),disabled:u,"aria-label":l("agentPolicy.toolOverrideDisposition","Tool override disposition"),children:_.map(t=>e.jsx("option",{value:t,children:y(l,t)},t))})]}),e.jsx("button",{type:"button",className:"btn btn-primary",onClick:G,disabled:u||!P.test(v.trim()),children:g[v.trim()]?l("agentPolicy.updateToolOverride","Update override"):l("agentPolicy.addToolOverride","Add override")})]})]}),e.jsxs("details",{className:"agent-policy-exempt",open:!1,children:[e.jsx("summary",{children:l("agentPolicy.exemptTools","Tools exempt from approval policy")}),e.jsx("p",{children:l("agentPolicy.exemptToolsDescription","These coordination tools bypass approval policy so heartbeats and inter-agent messaging cannot deadlock. They are not user-configurable.")}),e.jsx("ul",{className:"agent-policy-exempt-list",children:O.map(t=>e.jsx("li",{children:e.jsx("code",{children:t})},t))})]})]})}export{J as A,Z as B};