@runfusion/fusion 0.55.0 → 0.56.1

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 (127) hide show
  1. package/dist/bin.js +5829 -1357
  2. package/dist/client/.vite/manifest.json +322 -322
  3. package/dist/client/assets/{AgentDetailView-B_VfFSlt.js → AgentDetailView-BICsleMh.js} +1 -1
  4. package/dist/client/assets/{AgentPermissionPolicyEditor-QZhz41AU.js → AgentPermissionPolicyEditor-DQDzCWq_.js} +2 -2
  5. package/dist/client/assets/{AgentsView-hkhJ8SUq.js → AgentsView-DRpFG7gE.js} +6 -6
  6. package/dist/client/assets/ChatView-5vVkIiNh.js +6 -0
  7. package/dist/client/assets/{CommandCenter-B3fAajUO.js → CommandCenter-CZ856YOj.js} +1 -1
  8. package/dist/client/assets/{DevServerView-BR0ngFBw.js → DevServerView-BqsnMChS.js} +1 -1
  9. package/dist/client/assets/DirectoryPicker-cW1rnVoG.js +1 -0
  10. package/dist/client/assets/{DocumentsView-BnRvIUpa.js → DocumentsView-C6a5tuBQ.js} +1 -1
  11. package/dist/client/assets/{EvalsView-Bvx18QyC.js → EvalsView-DZd_TM3I.js} +1 -1
  12. package/dist/client/assets/{ExperimentalAgentOnboardingModal-CKGJcfXI.js → ExperimentalAgentOnboardingModal-cA-aWWsB.js} +1 -1
  13. package/dist/client/assets/{GoalsView-Bj1yVIiv.js → GoalsView-Bzvw1aDV.js} +1 -1
  14. package/dist/client/assets/{InsightsView-DBX8DI60.js → InsightsView-B3WQIXKs.js} +2 -2
  15. package/dist/client/assets/{MemoryView-CqkRH2fa.js → MemoryView-BZ2KwFO5.js} +1 -1
  16. package/dist/client/assets/{PiExtensionsManager-BMMmGWe2.js → PiExtensionsManager-D5x6GZOP.js} +2 -2
  17. package/dist/client/assets/{PluginManager-C1bdfN2W.js → PluginManager-YfHRH24B.js} +1 -1
  18. package/dist/client/assets/{PullRequestView-D0CsXWLl.js → PullRequestView-DX3J4hgm.js} +1 -1
  19. package/dist/client/assets/{ResearchView-CVgmXAlj.js → ResearchView-MZV2S2kT.js} +1 -1
  20. package/dist/client/assets/{SecretsView-Bv_gw5Ix.js → SecretsView--R3u3G4b.js} +1 -1
  21. package/dist/client/assets/SessionTerminal-BQWc1_Ty.js +2 -0
  22. package/dist/client/assets/SettingsModal-CNYosRF3.js +21 -0
  23. package/dist/client/assets/{SettingsModal-D7YgojbV.js → SettingsModal-Coqvlmud.js} +1 -1
  24. package/dist/client/assets/SettingsModal-D8AyVDar.css +1 -0
  25. package/dist/client/assets/SetupWizardModal-CoReXugb.js +2 -0
  26. package/dist/client/assets/{ShadcnColorPicker-DM2fqGwl.js → ShadcnColorPicker-D-u_ECbM.js} +1 -1
  27. package/dist/client/assets/{SkillsView-Bb-JTo99.js → SkillsView-D21ils_G.js} +1 -1
  28. package/dist/client/assets/TodoView-BFZQSkv4.js +6 -0
  29. package/dist/client/assets/WorkflowNodeEditor-E-7d5R9z.js +8 -0
  30. package/dist/client/assets/{agentSkills-DGFyuKuP.js → agentSkills-CM_yYVTx.js} +1 -1
  31. package/dist/client/assets/app-0jcSCRQr.js +13 -0
  32. package/dist/client/assets/app-BPzPEE6G.js +13 -0
  33. package/dist/client/assets/app-BSZU5Uns.js +13 -0
  34. package/dist/client/assets/app-CEtD1B9K.js +13 -0
  35. package/dist/client/assets/app-CVyRSEUX.js +13 -0
  36. package/dist/client/assets/app-DoLz_4Dg.js +13 -0
  37. package/dist/client/assets/{architectureDiagram-3BPJPVTR-DP7vOyXY.js → architectureDiagram-3BPJPVTR-DhgVYwmg.js} +1 -1
  38. package/dist/client/assets/{blockDiagram-GPEHLZMM-Di9v1pV8.js → blockDiagram-GPEHLZMM-AlG0kVWu.js} +1 -1
  39. package/dist/client/assets/{c4Diagram-AAUBKEIU-Dvb8RSfr.js → c4Diagram-AAUBKEIU-BOzpW3F7.js} +1 -1
  40. package/dist/client/assets/channel-DHSVrpL1.js +1 -0
  41. package/dist/client/assets/{chunk-2J33WTMH-gLcAuGjI.js → chunk-2J33WTMH-BAmZfsv0.js} +1 -1
  42. package/dist/client/assets/{chunk-4BX2VUAB-B-B0wjkx.js → chunk-4BX2VUAB-Cs587QhG.js} +1 -1
  43. package/dist/client/assets/{chunk-55IACEB6-XUDeC0Co.js → chunk-55IACEB6-qpIQSO06.js} +1 -1
  44. package/dist/client/assets/{chunk-727SXJPM-1eebiGA2.js → chunk-727SXJPM-DF3vZtMc.js} +1 -1
  45. package/dist/client/assets/{chunk-AQP2D5EJ-D9VOB5QS.js → chunk-AQP2D5EJ-BuETIys5.js} +1 -1
  46. package/dist/client/assets/{chunk-FMBD7UC4-EFNFEaAz.js → chunk-FMBD7UC4-B8D1TSR9.js} +1 -1
  47. package/dist/client/assets/{chunk-ND2GUHAM-CbeQailD.js → chunk-ND2GUHAM-BJv9aIQn.js} +1 -1
  48. package/dist/client/assets/{chunk-QZHKN3VN-D55N6EBz.js → chunk-QZHKN3VN-BJbK2pNR.js} +1 -1
  49. package/dist/client/assets/classDiagram-4FO5ZUOK-CTu3cN1i.js +1 -0
  50. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CTu3cN1i.js +1 -0
  51. package/dist/client/assets/{cose-bilkent-S5V4N54A-B0zbhkX3.js → cose-bilkent-S5V4N54A-BWRikddb.js} +1 -1
  52. package/dist/client/assets/{dagre-BM42HDAG-BL6peXwl.js → dagre-BM42HDAG-DpAxJj7T.js} +1 -1
  53. package/dist/client/assets/{dashboard-view-Db3n_W85.js → dashboard-view-Dw8L8k-2.js} +1 -1
  54. package/dist/client/assets/{dashboard-view-CS1H5SQN.js → dashboard-view-qq3ayA0B.js} +1 -1
  55. package/dist/client/assets/{diagram-2AECGRRQ-cYKwSHk7.js → diagram-2AECGRRQ-DRRIILsg.js} +1 -1
  56. package/dist/client/assets/{diagram-5GNKFQAL-DHIwTGuM.js → diagram-5GNKFQAL-DSOu28ss.js} +1 -1
  57. package/dist/client/assets/{diagram-KO2AKTUF-DfHBJ4aX.js → diagram-KO2AKTUF-CWzbnTBM.js} +1 -1
  58. package/dist/client/assets/{diagram-LMA3HP47-pWhYmB6Z.js → diagram-LMA3HP47-CGqf3bt6.js} +1 -1
  59. package/dist/client/assets/{diagram-OG6HWLK6-GzWqbi_m.js → diagram-OG6HWLK6-C1axXteT.js} +1 -1
  60. package/dist/client/assets/{erDiagram-TEJ5UH35-CCVm5eiR.js → erDiagram-TEJ5UH35-bBdlc4OY.js} +1 -1
  61. package/dist/client/assets/{flowDiagram-I6XJVG4X-CUTdnU6S.js → flowDiagram-I6XJVG4X-BTCJ2J3b.js} +1 -1
  62. package/dist/client/assets/{folder-open-DOCy9GVC.js → folder-open-BN3_NdbL.js} +1 -1
  63. package/dist/client/assets/{ganttDiagram-6RSMTGT7-CW4ENJaC.js → ganttDiagram-6RSMTGT7-CiFY9oBj.js} +1 -1
  64. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-QXXMfSzp.js → gitGraphDiagram-PVQCEYII-CxubcP4l.js} +1 -1
  65. package/dist/client/assets/index-CbmH1ED8.css +1 -0
  66. package/dist/client/assets/index-rfsTNfpA.js +2511 -0
  67. package/dist/client/assets/{infoDiagram-5YYISTIA-CZyHbj0n.js → infoDiagram-5YYISTIA-ToDlIyOV.js} +1 -1
  68. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-Dea84lqZ.js → ishikawaDiagram-YF4QCWOH-BgO681xo.js} +1 -1
  69. package/dist/client/assets/{journeyDiagram-JHISSGLW-Db2iKGU5.js → journeyDiagram-JHISSGLW-OJZ3op9w.js} +1 -1
  70. package/dist/client/assets/{kanban-definition-UN3LZRKU-CB9loIqR.js → kanban-definition-UN3LZRKU-q2OOqX8K.js} +1 -1
  71. package/dist/client/assets/{mermaid.core-CoQ8aCb0.js → mermaid.core-BmDOYmFS.js} +4 -4
  72. package/dist/client/assets/{mindmap-definition-RKZ34NQL-JPb2wF-K.js → mindmap-definition-RKZ34NQL-Dw8JehwG.js} +1 -1
  73. package/dist/client/assets/{pieDiagram-4H26LBE5-pdZzOreP.js → pieDiagram-4H26LBE5-D5Li6GnX.js} +1 -1
  74. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Dh9Ids90.js → quadrantDiagram-W4KKPZXB-B4s-2jdZ.js} +1 -1
  75. package/dist/client/assets/{requirementDiagram-4Y6WPE33-BVPOSvHU.js → requirementDiagram-4Y6WPE33-Drc3rc_E.js} +1 -1
  76. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BqSMUpsx.js → sankeyDiagram-5OEKKPKP-C_R01GQC.js} +1 -1
  77. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-B8nepQ6X.js → sequenceDiagram-3UESZ5HK-gyl7Yhgc.js} +1 -1
  78. package/dist/client/assets/{shield-alert-CtSaIQNY.js → shield-alert-DjhYmFaV.js} +1 -1
  79. package/dist/client/assets/{stateDiagram-AJRCARHV-CQv9RdRp.js → stateDiagram-AJRCARHV-BY53czZh.js} +1 -1
  80. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-C53cIaWg.js +1 -0
  81. package/dist/client/assets/{timeline-definition-PNZ67QCA-CAjwM-Z5.js → timeline-definition-PNZ67QCA-BYwv2FZJ.js} +1 -1
  82. package/dist/client/assets/{upload-0_pT1euA.js → upload-BKpOp-Bn.js} +1 -1
  83. package/dist/client/assets/{users--1B6mnm8.js → users-BUMHTZuX.js} +1 -1
  84. package/dist/client/assets/{vennDiagram-CIIHVFJN-BO3Um3rH.js → vennDiagram-CIIHVFJN-Dt94bP0k.js} +1 -1
  85. package/dist/client/assets/{wardley-L42UT6IY-BzqJcqDA.js → wardley-L42UT6IY-536kdB5p.js} +1 -1
  86. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Bctxc6_5.js → wardleyDiagram-YWT4CUSO-D8iNQ_MW.js} +1 -1
  87. package/dist/client/assets/{xychartDiagram-2RQKCTM6-CgDuiMFR.js → xychartDiagram-2RQKCTM6-CXqp8mzh.js} +1 -1
  88. package/dist/client/index.html +3 -3
  89. package/dist/client/version.json +1 -1
  90. package/dist/droid-cli/package.json +1 -1
  91. package/dist/extension.js +4678 -917
  92. package/dist/pi-claude-cli/package.json +1 -1
  93. package/dist/plugin-sdk/index.d.ts +47 -3
  94. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  95. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  96. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  97. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  98. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  99. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  100. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  101. package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
  102. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  103. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  104. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  105. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  106. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  107. package/package.json +1 -1
  108. package/dist/client/assets/ChatView-B4WnXLYA.js +0 -6
  109. package/dist/client/assets/DirectoryPicker-BiS41Hca.js +0 -1
  110. package/dist/client/assets/SessionTerminal-VLdVV3Ji.js +0 -2
  111. package/dist/client/assets/SettingsModal-4t8rV7rh.css +0 -1
  112. package/dist/client/assets/SettingsModal-gcrh5EOG.js +0 -21
  113. package/dist/client/assets/SetupWizardModal-DvmTlFP_.js +0 -2
  114. package/dist/client/assets/TodoView-bV-7deOh.js +0 -6
  115. package/dist/client/assets/WorkflowNodeEditor-Ui1q_fFI.js +0 -8
  116. package/dist/client/assets/app--OM-ul6R.js +0 -13
  117. package/dist/client/assets/app-BCvqf8qq.js +0 -13
  118. package/dist/client/assets/app-BZqqEiWR.js +0 -13
  119. package/dist/client/assets/app-DQeH1UDD.js +0 -13
  120. package/dist/client/assets/app-FiYwRatp.js +0 -13
  121. package/dist/client/assets/app-rGdYcsAA.js +0 -13
  122. package/dist/client/assets/channel-C5g9M3Sk.js +0 -1
  123. package/dist/client/assets/classDiagram-4FO5ZUOK-B-wdlvD6.js +0 -1
  124. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-B-wdlvD6.js +0 -1
  125. package/dist/client/assets/index-B6ttSchA.js +0 -1336
  126. package/dist/client/assets/index-CPE2Kwra.css +0 -1
  127. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-BZ_mlvie.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as a,j as e}from"./vendor-react-SZ_qB27O.js";import{c as Kt,c7 as qs,c8 as Ks,c9 as Ys,ca as Zs,L as G,R as Pt,bR as os,Z as Qs,bu as Dt,cb as js,J as lt,o as ys,C as Ns,cc as Xs,cd as ea,ce as ta,ae as Ss,cf as sa,cg as aa,bq as _,ch as na,ci as ks,cj as Cs,ck as ia,bp as Mt,cl as zt,ai as wt,bt as ws,f as Rs,cm as Ht,bO as Ft,cn as cs,co as Ze,cp as ra,X as Ms,aJ as ot,cq as la,bs as Fs,cr as As,cs as oa,a3 as ca,H as da,ct as Ps,aj as Ts,bv as Yt,cu as ua,cv as ds,cw as ma,cx as ga,cy as Gt,cz as Es,cA as ha,l as fa,cB as pa,q as Ls,cC as Ds,bd as ba,h as ge,cD as zs,cE as us,cF as ms,cG as xa,cH as va,cI as ja,cJ as ya,cK as ct,F as dt,s as ut,v as mt,aH as Hs,cL as Na,cM as Sa,cN as ka,cO as Ca,cP as gs,bM as wa,cQ as It,cR as Ra,cS as Ma,bQ as Fa,al as Aa,cT as qt,cU as Pa,cV as Ta,cW as Ea,cX as La,cY as Da,cZ as Is,c_ as za,c$ as Ha,d0 as Ia,d1 as Ba,d2 as $a}from"./index-B6ttSchA.js";import{u as Se}from"./vendor-i18n-GF3RlKbq.js";import{f as Bt,S as Oa}from"./agentSkills-DGFyuKuP.js";import{ExperimentalAgentOnboardingModal as _a}from"./ExperimentalAgentOnboardingModal-CKGJcfXI.js";import{B as Ua,A as Va}from"./AgentPermissionPolicyEditor-QZhz41AU.js";import"./vendor-reactflow-CnI7NMXG.js";import"./vendor-xterm-BNq00GSj.js";import"./vendor-codemirror-jBKmHyH0.js";/**
1
+ import{r as a,j as e}from"./vendor-react-SZ_qB27O.js";import{c as Kt,c9 as qs,ca as Ks,cb as Ys,cc as Zs,L as G,R as Pt,bT as os,Z as Qs,bw as Dt,cd as js,J as lt,o as ys,C as Ns,ce as Xs,cf as ea,cg as ta,ag as Ss,ch as sa,ci as aa,bs as _,cj as na,ck as ks,cl as Cs,cm as ia,br as Mt,cn as zt,ak as wt,bv as ws,f as Rs,co as Ht,bQ as Ft,cp as cs,cq as Ze,cr as ra,X as Ms,aL as ot,cs as la,bu as Fs,ct as As,cu as oa,a4 as ca,H as da,cv as Ps,al as Ts,bx as Yt,cw as ua,cx as ds,cy as ma,cz as ga,cA as Gt,cB as Es,cC as ha,l as fa,cD as pa,q as Ls,cE as Ds,bf as ba,h as ge,cF as zs,cG as us,cH as ms,cI as xa,cJ as va,cK as ja,cL as ya,cM as ct,F as dt,s as ut,v as mt,aJ as Hs,cN as Na,cO as Sa,cP as ka,cQ as Ca,cR as gs,bO as wa,cS as It,cT as Ra,cU as Ma,bS as Fa,an as Aa,cV as qt,cW as Pa,cX as Ta,cY as Ea,cZ as La,c_ as Da,c$ as Is,d0 as za,d1 as Ha,d2 as Ia,d3 as Ba,d4 as $a}from"./index-rfsTNfpA.js";import{u as Se}from"./vendor-i18n-GF3RlKbq.js";import{f as Bt,S as Oa}from"./agentSkills-CM_yYVTx.js";import{ExperimentalAgentOnboardingModal as _a}from"./ExperimentalAgentOnboardingModal-cA-aWWsB.js";import{B as Ua,A as Va}from"./AgentPermissionPolicyEditor-DQDzCWq_.js";import"./vendor-reactflow-CnI7NMXG.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,6 +1,6 @@
1
- import{c as F,be as N,bf as O,bg as R}from"./index-B6ttSchA.js";import{r as j,j as e}from"./vendor-react-SZ_qB27O.js";import{u as U}from"./vendor-i18n-GF3RlKbq.js";/**
1
+ import{c as F,bg as N,bh as O,bi as R}from"./index-rfsTNfpA.js";import{r as j,j as e}from"./vendor-react-SZ_qB27O.js";import{u as U}from"./vendor-i18n-GF3RlKbq.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 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=F("book-open",W),P=["allow","require-approval","block"],f=/^[A-Za-z0-9_-]+$/;function X(){const o=new Set(R),a=new Set;for(const c of Object.values(O))for(const n of c)f.test(n)&&!o.has(n)&&a.add(n);return[...a].sort()}function Y(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.")}}}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 B(){return{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"allow"}}const v={unrestricted:{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"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"},"locked-down":{git_write:"block",file_write_delete:"block",command_execution:"block",network_api:"block",task_agent_mutation:"block"}};function $(o){return v[o]}function b(o,a){return N.every(c=>o[c]===a[c])}function z(o){return b(o,v.unrestricted)?"unrestricted":b(o,v["approval-required"])?"approval-required":b(o,v["locked-down"])?"locked-down":"custom"}function J({value:o,projectDefault:a,projectDefaultToolRules:c,mode:n,onChange:p,disabled:u=!1}){const{t:l}=U("app"),E=Y(l),I=j.useMemo(()=>X(),[]),[h,A]=j.useState("fn_task_create"),[w,D]=j.useState("block"),S=o?z(o.rules):"unrestricted",q=n==="agent-override"&&!o?"inherit":o?.presetId==="custom"?S:o?.presetId??"unrestricted",m=o?.rules??B(),g=o?.toolRules??{},_=Object.entries(g).sort(([t],[i])=>t.localeCompare(i)),x=t=>({...t,...Object.keys(g).length>0?{toolRules:{...g}}:{}}),C=t=>{if(n==="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(n==="agent-override"&&i==="inherit"){if(!o)return;const r={...o.rules};r[t]=a?.[t]??"allow",p(x({presetId:"custom",rules:r}));return}const s={...m,[t]:i};p(x({presetId:"custom",rules:s}))},k=(t,i)=>{const s=t.trim();if(!s||!f.test(s))return;const r={...g,[s]:i};p({presetId:"custom",rules:{...m},toolRules:r})},M=t=>{const i={...g};delete i[t],p({presetId:"custom",rules:{...m},...Object.keys(i).length>0?{toolRules:i}:{}})},G=()=>{k(h,w)};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:[n==="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",r=m[t]??"allow",T=n==="agent-override"&&!o?"inherit":r;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:(O[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:[n==="agent-override"?e.jsx("option",{value:"inherit",children:l("agentPolicy.inherit","Inherit")}):null,P.map(d=>e.jsx("option",{value:d,children:y(l,d)},d))]}),n==="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.")})]})}),_.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:_.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:r=>k(t,r.target.value),disabled:u,children:P.map(r=>e.jsx("option",{value:r,children:y(l,r)},r))}),n==="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:h,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:w,onChange:t=>D(t.target.value),disabled:u,"aria-label":l("agentPolicy.toolOverrideDisposition","Tool override disposition"),children:P.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||!f.test(h.trim()),children:g[h.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:R.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=F("book-open",W),P=["allow","require-approval","block"],w=/^[A-Za-z0-9_-]+$/;function X(){const o=new Set(R),a=new Set;for(const c of Object.values(O))for(const n of c)w.test(n)&&!o.has(n)&&a.add(n);return[...a].sort()}function Y(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.")}}}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 B(){return{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"allow"}}const v={unrestricted:{git_write:"allow",file_write_delete:"allow",command_execution:"allow",network_api:"allow",task_agent_mutation:"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"},"locked-down":{git_write:"block",file_write_delete:"block",command_execution:"block",network_api:"block",task_agent_mutation:"block"}};function $(o){return v[o]}function b(o,a){return N.every(c=>o[c]===a[c])}function z(o){return b(o,v.unrestricted)?"unrestricted":b(o,v["approval-required"])?"approval-required":b(o,v["locked-down"])?"locked-down":"custom"}function J({value:o,projectDefault:a,projectDefaultToolRules:c,mode:n,onChange:p,disabled:u=!1}){const{t:l}=U("app"),E=Y(l),I=j.useMemo(()=>X(),[]),[h,A]=j.useState("fn_task_create"),[f,D]=j.useState("block"),S=o?z(o.rules):"unrestricted",q=n==="agent-override"&&!o?"inherit":o?.presetId==="custom"?S:o?.presetId??"unrestricted",m=o?.rules??B(),g=o?.toolRules??{},_=Object.entries(g).sort(([t],[i])=>t.localeCompare(i)),x=t=>({...t,...Object.keys(g).length>0?{toolRules:{...g}}:{}}),C=t=>{if(n==="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(n==="agent-override"&&i==="inherit"){if(!o)return;const r={...o.rules};r[t]=a?.[t]??"allow",p(x({presetId:"custom",rules:r}));return}const s={...m,[t]:i};p(x({presetId:"custom",rules:s}))},k=(t,i)=>{const s=t.trim();if(!s||!w.test(s))return;const r={...g,[s]:i};p({presetId:"custom",rules:{...m},toolRules:r})},M=t=>{const i={...g};delete i[t],p({presetId:"custom",rules:{...m},...Object.keys(i).length>0?{toolRules:i}:{}})},G=()=>{k(h,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:[n==="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",r=m[t]??"allow",T=n==="agent-override"&&!o?"inherit":r;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:(O[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:[n==="agent-override"?e.jsx("option",{value:"inherit",children:l("agentPolicy.inherit","Inherit")}):null,P.map(d=>e.jsx("option",{value:d,children:y(l,d)},d))]}),n==="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.")})]})}),_.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:_.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:r=>k(t,r.target.value),disabled:u,children:P.map(r=>e.jsx("option",{value:r,children:y(l,r)},r))}),n==="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:h,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=>D(t.target.value),disabled:u,"aria-label":l("agentPolicy.toolOverrideDisposition","Tool override disposition"),children:P.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||!w.test(h.trim()),children:g[h.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:R.map(t=>e.jsx("li",{children:e.jsx("code",{children:t})},t))})]})]})}export{J as A,Z as B};