@kingsoftcloud/ksadk-web 0.3.13 → 0.3.15

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 (300) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +3 -3
  3. package/RELEASE_PROVENANCE.json +2 -2
  4. package/dist-ksadk/a2ui/basic-v0_9_1.json +1383 -0
  5. package/dist-ksadk/a2ui/common-types-v0_9.json +305 -0
  6. package/dist-ksadk/a2ui/legacy-seven-components.json +230 -0
  7. package/dist-ksadk/a2ui/manifest.json +86 -0
  8. package/dist-ksadk/a2ui/material-icons-OFL-1.1.txt +93 -0
  9. package/dist-ksadk/assets/{ArtifactsPanel-CILaW-fC.js → ArtifactsPanel-ND1ni01O.js} +1 -1
  10. package/dist-ksadk/assets/{CodeBlock-BVrNVtJC.js → CodeBlock-Bm987IV9.js} +6 -6
  11. package/dist-ksadk/assets/{MathMessageMarkdown-Dp7c4wWD.js → MathMessageMarkdown-m289SxEv.js} +7 -7
  12. package/dist-ksadk/assets/{MermaidBlock-Dxop8Rd7.js → MermaidBlock-Draq-3W4.js} +9 -9
  13. package/dist-ksadk/assets/NativeTerminalPanel-BPKj9OEV.js +1 -0
  14. package/dist-ksadk/assets/OfficialA2uiRenderer-Buvy4tjx.js +16 -0
  15. package/dist-ksadk/assets/{abnfDiagram-VCTEODGH-ckWDmOzw.js → abnfDiagram-VCTEODGH-DSkvfGF3.js} +1 -1
  16. package/dist-ksadk/assets/{arc-DqxJede-.js → arc-D2OD6TRH.js} +1 -1
  17. package/dist-ksadk/assets/architecture-7GRP2DOG-vaJx2f97.js +1 -0
  18. package/dist-ksadk/assets/{architectureDiagram-5GKGNRK7-SEQA4bVi.js → architectureDiagram-5GKGNRK7-BAGaNeP_.js} +1 -1
  19. package/dist-ksadk/assets/{blockDiagram-NRAW4CY4-pM0B-6NJ.js → blockDiagram-NRAW4CY4-CE77-fsa.js} +1 -1
  20. package/dist-ksadk/assets/{c4Diagram-UCG6FXSJ-m2tuCNVq.js → c4Diagram-UCG6FXSJ-QM8LLt8e.js} +1 -1
  21. package/dist-ksadk/assets/channel-qoLBikeO.js +1 -0
  22. package/dist-ksadk/assets/chunk-2Q5K7J3B-OLdkjA_5.js +1 -0
  23. package/dist-ksadk/assets/{chunk-5VM5RSS4-GJHDr9Ww.js → chunk-5VM5RSS4-NBYbb28t.js} +1 -1
  24. package/dist-ksadk/assets/{chunk-F27PBJKO-CbAN45AV.js → chunk-F27PBJKO-xaO4b0PR.js} +1 -1
  25. package/dist-ksadk/assets/{chunk-G27WJ6UU-D5ngbbzF.js → chunk-G27WJ6UU-Bi73NhBu.js} +1 -1
  26. package/dist-ksadk/assets/{chunk-JWPE2WC7-Cc5IwuYC.js → chunk-JWPE2WC7-CngFBp9d.js} +1 -1
  27. package/dist-ksadk/assets/{chunk-LCL6LL3I-CprgDDdJ.js → chunk-LCL6LL3I-BsunO5Rx.js} +1 -1
  28. package/dist-ksadk/assets/{chunk-POPQ4Y6H-CDZhSy82.js → chunk-POPQ4Y6H-ImP4Ew8y.js} +1 -1
  29. package/dist-ksadk/assets/{chunk-RHFEMEQ7-CZchUNro.js → chunk-RHFEMEQ7-CdQmbok4.js} +1 -1
  30. package/dist-ksadk/assets/{chunk-SVP7TREG-BVruqk6T.js → chunk-SVP7TREG-ExibL7Ea.js} +1 -1
  31. package/dist-ksadk/assets/{chunk-XXDRQBXY-4ld9SxPN.js → chunk-XXDRQBXY-Bz850mDu.js} +1 -1
  32. package/dist-ksadk/assets/classDiagram-DTDB5LWJ-DqbkClnv.js +1 -0
  33. package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-DqbkClnv.js +1 -0
  34. package/dist-ksadk/assets/{cose-bilkent-JH36ORCC-Dmyyk_Vp.js → cose-bilkent-JH36ORCC-C0xUJvyH.js} +1 -1
  35. package/dist-ksadk/assets/cynefin-OW5HDTMX-BnPp48kV.js +1 -0
  36. package/dist-ksadk/assets/{cynefinDiagram-5FMLGOSQ-BIyq3EJb.js → cynefinDiagram-5FMLGOSQ-DV2coA_s.js} +1 -1
  37. package/dist-ksadk/assets/{dagre-3AP2YEHR-eBw08Qdk.js → dagre-3AP2YEHR-jEooZQ_X.js} +1 -1
  38. package/dist-ksadk/assets/{dagre-DfvnEf45.js → dagre-ljD7-f9M.js} +1 -1
  39. package/dist-ksadk/assets/{diagram-S7CK7UJ4-CUSrE3Mg.js → diagram-S7CK7UJ4-B5BoTuaY.js} +1 -1
  40. package/dist-ksadk/assets/{diagram-UQ7AKVKN-Dq5Zw2gy.js → diagram-UQ7AKVKN-Cvxn92tK.js} +1 -1
  41. package/dist-ksadk/assets/{diagram-VSXAHHWV-DyUHfNwT.js → diagram-VSXAHHWV-CI86Na4n.js} +1 -1
  42. package/dist-ksadk/assets/{diagram-VX7I27RA-CREmM89O.js → diagram-VX7I27RA-CeZud7ml.js} +1 -1
  43. package/dist-ksadk/assets/{diagram-Z3DM3KII-Dw9zhHUK.js → diagram-Z3DM3KII-GeJxYdqI.js} +1 -1
  44. package/dist-ksadk/assets/{dist-CD4L6ymH.js → dist-BOBeN4EW.js} +1 -1
  45. package/dist-ksadk/assets/{dist-QzbGrED_.js → dist-B_y4v6Vh.js} +1 -1
  46. package/dist-ksadk/assets/{dist-cxTGfdqx.js → dist-BcNp5ouu.js} +1 -1
  47. package/dist-ksadk/assets/{dist-B49GzZDb.js → dist-BgCDfLfr.js} +1 -1
  48. package/dist-ksadk/assets/{dist-DUxO0R99.js → dist-BiarszCa.js} +1 -1
  49. package/dist-ksadk/assets/{dist-CHpW1BHj.js → dist-BtermLVk.js} +1 -1
  50. package/dist-ksadk/assets/{dist-Co68Apq4.js → dist-BxicrSj5.js} +1 -1
  51. package/dist-ksadk/assets/{dist-CVPau3tn.js → dist-C7H9f-JT.js} +1 -1
  52. package/dist-ksadk/assets/{dist-Cp2PaOMY.js → dist-CJuVeKiz.js} +1 -1
  53. package/dist-ksadk/assets/{dist-AEv-vXf-.js → dist-CWaqQiTL.js} +1 -1
  54. package/dist-ksadk/assets/{dist-bupkyEBZ.js → dist-CXo9VOuF.js} +1 -1
  55. package/dist-ksadk/assets/{dist-lOy23y43.js → dist-Cgh3LKbI.js} +1 -1
  56. package/dist-ksadk/assets/{dist-BBsYarrI.js → dist-CmWGM_T9.js} +1 -1
  57. package/dist-ksadk/assets/{dist-BX_-FENW.js → dist-D2IRjZmI.js} +1 -1
  58. package/dist-ksadk/assets/{dist-BQMrUwdI.js → dist-Dig9D26k.js} +1 -1
  59. package/dist-ksadk/assets/{dist-CuR5Bgme.js → dist-Dk6TLega.js} +1 -1
  60. package/dist-ksadk/assets/{dist-hL5p1til.js → dist-IuOndGF_.js} +1 -1
  61. package/dist-ksadk/assets/{dist-0uJ4tdx6.js → dist-XaciJNLw.js} +1 -1
  62. package/dist-ksadk/assets/{dist-pq-nD33R.js → dist-eYoWaedR.js} +1 -1
  63. package/dist-ksadk/assets/{dist-B8Myiet9.js → dist-lHe3BnLM.js} +1 -1
  64. package/dist-ksadk/assets/{dist-DDSyLEOX.js → dist-nOyq5Gq7.js} +1 -1
  65. package/dist-ksadk/assets/{dist-C_qdxcSH.js → dist-ubZkVDhc.js} +1 -1
  66. package/dist-ksadk/assets/{ebnfDiagram-PWID7BFC-BS5LdNoR.js → ebnfDiagram-PWID7BFC-CVnEnD_Y.js} +1 -1
  67. package/dist-ksadk/assets/{erDiagram-SSCWMZ5O-Bv1QtiY-.js → erDiagram-SSCWMZ5O-gaG6xmRn.js} +1 -1
  68. package/dist-ksadk/assets/eventmodeling-NTZA5JFV-BHS_Svvs.js +1 -0
  69. package/dist-ksadk/assets/flowDiagram-A5DVABFB-BkQ0O0Ft.js +1 -0
  70. package/dist-ksadk/assets/{ganttDiagram-EL5Y4UJY-musi-e0G.js → ganttDiagram-EL5Y4UJY-Yov_MdHm.js} +1 -1
  71. package/dist-ksadk/assets/gitGraph-4MIJSDKK-CSW-TIsw.js +1 -0
  72. package/dist-ksadk/assets/{gitGraphDiagram-WWUBYQGX-DH37EGkG.js → gitGraphDiagram-WWUBYQGX-pCt6JiWp.js} +1 -1
  73. package/dist-ksadk/assets/index-DMqhW2cV.css +2 -0
  74. package/dist-ksadk/assets/index-DcQSCIw4.js +1132 -0
  75. package/dist-ksadk/assets/info-A6RAGUB7-2r962Zht.js +1 -0
  76. package/dist-ksadk/assets/{infoDiagram-RXCK75RN-C1kEtv2y.js → infoDiagram-RXCK75RN-Df7QB9IZ.js} +1 -1
  77. package/dist-ksadk/assets/{ishikawaDiagram-5VMMS53U-BCNPyMka.js → ishikawaDiagram-5VMMS53U-BxZM8H3E.js} +1 -1
  78. package/dist-ksadk/assets/{journeyDiagram-EYS64GPL--cDbKnjP.js → journeyDiagram-EYS64GPL-DXJc7vNQ.js} +1 -1
  79. package/dist-ksadk/assets/{kanban-definition-3QL26DDD-R1rAVw2f.js → kanban-definition-3QL26DDD-uGr_y_n5.js} +1 -1
  80. package/dist-ksadk/assets/{katex-BT-X-V7U.js → katex-C34HoTrL.js} +1 -1
  81. package/dist-ksadk/assets/{linear-DTR631iG.js → linear-C7-Mijzq.js} +1 -1
  82. package/dist-ksadk/assets/material-icons-latin-400-normal-kAwBdRge.woff2 +0 -0
  83. package/dist-ksadk/assets/{mermaid-parser.core-DfFzJhX8.js → mermaid-parser.core-DH4-hsMU.js} +2 -2
  84. package/dist-ksadk/assets/{mindmap-definition-FBJOCRG2-D4by_rmk.js → mindmap-definition-FBJOCRG2-5UJYSEer.js} +1 -1
  85. package/dist-ksadk/assets/packet-AYTQ26CC-C8AN0vyj.js +1 -0
  86. package/dist-ksadk/assets/{pegDiagram-XKGWAZYB-xWXPEh0c.js → pegDiagram-XKGWAZYB-BPdl55Nd.js} +1 -1
  87. package/dist-ksadk/assets/pie-WAS4IAKB-D8iGFt9t.js +1 -0
  88. package/dist-ksadk/assets/{pieDiagram-E7YTZNPT-BudBDlCI.js → pieDiagram-E7YTZNPT-cDC3mpF_.js} +1 -1
  89. package/dist-ksadk/assets/{quadrantDiagram-AXDQQJYC-DXZ0PCJF.js → quadrantDiagram-AXDQQJYC-7jhGjy86.js} +1 -1
  90. package/dist-ksadk/assets/radar-RG4KPBEZ-BFDLv34s.js +1 -0
  91. package/dist-ksadk/assets/railroad-74A4TZTK-BCF2fZR0.js +1 -0
  92. package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-Ban_fK3c.js +1 -0
  93. package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-DKxLpd8o.js +1 -0
  94. package/dist-ksadk/assets/railroad-peg-WCYAUIDC-n_o0pjRU.js +1 -0
  95. package/dist-ksadk/assets/{railroadDiagram-O6MQD6OU-BdAYRYB8.js → railroadDiagram-O6MQD6OU-DdTXYjCz.js} +1 -1
  96. package/dist-ksadk/assets/{requirementDiagram-EFPCY7ZU-CBBmaL70.js → requirementDiagram-EFPCY7ZU-BxH5im9j.js} +1 -1
  97. package/dist-ksadk/assets/{sankeyDiagram-P5KCCOFB-Doc3rdwp.js → sankeyDiagram-P5KCCOFB-BrTs-PhV.js} +1 -1
  98. package/dist-ksadk/assets/{sequenceDiagram-WJ2MYXX4-0J8R8hWW.js → sequenceDiagram-WJ2MYXX4-B-GvSk9Z.js} +1 -1
  99. package/dist-ksadk/assets/{sizeCapture-X5ZJPWSS-CfFLlWsK.js → sizeCapture-X5ZJPWSS-CxP3dmNT.js} +1 -1
  100. package/dist-ksadk/assets/{stateDiagram-HBIQ2CUA-jBwkjtTy.js → stateDiagram-HBIQ2CUA-CIw-mH34.js} +1 -1
  101. package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-CFLSAbtQ.js +1 -0
  102. package/dist-ksadk/assets/{swimlanes-XN3QIQJK-B0WxTQf8.js → swimlanes-XN3QIQJK-YZIWfS0x.js} +1 -1
  103. package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-CNHXQSl-.js +8 -0
  104. package/dist-ksadk/assets/{timeline-definition-24CTP7MA-BfCT_75A.js → timeline-definition-24CTP7MA-CJ63qwLI.js} +1 -1
  105. package/dist-ksadk/assets/treeView-Q6P3EWNA-B1wKifn0.js +1 -0
  106. package/dist-ksadk/assets/treemap-WGGIJYW6-DECztlF0.js +1 -0
  107. package/dist-ksadk/assets/{vennDiagram-4TSXK5OY-9gX1VMDC.js → vennDiagram-4TSXK5OY-DimJA1nS.js} +1 -1
  108. package/dist-ksadk/assets/wardley-WFR3VGLG-BSQgLjrP.js +1 -0
  109. package/dist-ksadk/assets/{wardleyDiagram-VM6X3IG4-sEs_BP6O.js → wardleyDiagram-VM6X3IG4-Wf93ZvjN.js} +1 -1
  110. package/dist-ksadk/assets/{xychartDiagram-S5SC5T6Z-Ll4jvUN9.js → xychartDiagram-S5SC5T6Z-B2A1aC7t.js} +1 -1
  111. package/dist-ksadk/index.html +2 -2
  112. package/dist-lib/App.d.ts +2 -0
  113. package/dist-lib/App.d.ts.map +1 -1
  114. package/dist-lib/AttachmentPreview-CPRjbiqd.js +1545 -0
  115. package/dist-lib/{ConnectedComposer-Dd8ZFhfL.js → ConnectedComposer-CKnKpokV.js} +27 -27
  116. package/dist-lib/ConnectedMessageList-Dhudkynn.js +1616 -0
  117. package/dist-lib/OfficialA2uiRenderer-DI49Kpxu.js +8 -0
  118. package/dist-lib/{WorkspacePanelContainer-BDbgHg1_.js → WorkspacePanelContainer-CA59c9AQ.js} +5 -5
  119. package/dist-lib/a2ui/basic-v0_9_1.json +1383 -0
  120. package/dist-lib/a2ui/common-types-v0_9.json +305 -0
  121. package/dist-lib/a2ui/legacy-seven-components.json +230 -0
  122. package/dist-lib/a2ui/manifest.json +86 -0
  123. package/dist-lib/a2ui/material-icons-OFL-1.1.txt +93 -0
  124. package/dist-lib/a2ui-D2QH7eTV.js +1555 -0
  125. package/dist-lib/api/client.d.ts.map +1 -1
  126. package/dist-lib/api/messages.d.ts +3 -2
  127. package/dist-lib/api/messages.d.ts.map +1 -1
  128. package/dist-lib/{capabilities-CXle1R-K.js → capabilities-DAeBY-WO.js} +3 -2
  129. package/dist-lib/capabilities.js +1 -1
  130. package/dist-lib/chat-composer.js +2 -2
  131. package/dist-lib/chat-timeline.js +5 -4
  132. package/dist-lib/components/chat/A2UIActivityMessage.d.ts +10 -3
  133. package/dist-lib/components/chat/A2UIActivityMessage.d.ts.map +1 -1
  134. package/dist-lib/components/chat/ChatMessageList.d.ts +6 -2
  135. package/dist-lib/components/chat/ChatMessageList.d.ts.map +1 -1
  136. package/dist-lib/components/chat/ConnectedMessageList.d.ts +1 -1
  137. package/dist-lib/components/chat/ConnectedMessageList.d.ts.map +1 -1
  138. package/dist-lib/components/chat/InteractionA2uiSurface.d.ts +2 -1
  139. package/dist-lib/components/chat/InteractionA2uiSurface.d.ts.map +1 -1
  140. package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts.map +1 -1
  141. package/dist-lib/components/chat/InteractionTray.d.ts +2 -1
  142. package/dist-lib/components/chat/InteractionTray.d.ts.map +1 -1
  143. package/dist-lib/components/chat/JsonSchemaInputForm.d.ts +16 -0
  144. package/dist-lib/components/chat/JsonSchemaInputForm.d.ts.map +1 -0
  145. package/dist-lib/components/chat/LegacyA2UISurface.d.ts +14 -0
  146. package/dist-lib/components/chat/LegacyA2UISurface.d.ts.map +1 -0
  147. package/dist-lib/components/chat/OfficialA2uiRenderer.d.ts +3 -0
  148. package/dist-lib/components/chat/OfficialA2uiRenderer.d.ts.map +1 -0
  149. package/dist-lib/components/chat/ProcessingBlocksView.d.ts +5 -1
  150. package/dist-lib/components/chat/ProcessingBlocksView.d.ts.map +1 -1
  151. package/dist-lib/components/chat/RunProgressIndicator.d.ts +4 -0
  152. package/dist-lib/components/chat/RunProgressIndicator.d.ts.map +1 -0
  153. package/dist-lib/components/chat/a2ui-response-snapshot.d.ts +25 -0
  154. package/dist-lib/components/chat/a2ui-response-snapshot.d.ts.map +1 -0
  155. package/dist-lib/components/chat/approval-status.d.ts +2 -0
  156. package/dist-lib/components/chat/approval-status.d.ts.map +1 -1
  157. package/dist-lib/components/chat/submitted-interaction-history.d.ts +16 -0
  158. package/dist-lib/components/chat/submitted-interaction-history.d.ts.map +1 -0
  159. package/dist-lib/components/chat/types.d.ts +17 -0
  160. package/dist-lib/components/chat/types.d.ts.map +1 -1
  161. package/dist-lib/components.js +34 -34
  162. package/dist-lib/conversation.js +2 -2
  163. package/dist-lib/core/a2ui/catalog.d.ts +250 -0
  164. package/dist-lib/core/a2ui/catalog.d.ts.map +1 -0
  165. package/dist-lib/core/a2ui/history.d.ts +13 -0
  166. package/dist-lib/core/a2ui/history.d.ts.map +1 -0
  167. package/dist-lib/core/a2ui/linking.d.ts +7 -0
  168. package/dist-lib/core/a2ui/linking.d.ts.map +1 -0
  169. package/dist-lib/core/a2ui/provider.d.ts +8 -0
  170. package/dist-lib/core/a2ui/provider.d.ts.map +1 -0
  171. package/dist-lib/core/a2ui/registry.d.ts +45 -0
  172. package/dist-lib/core/a2ui/registry.d.ts.map +1 -0
  173. package/dist-lib/core/a2ui/snapshot.d.ts +4 -0
  174. package/dist-lib/core/a2ui/snapshot.d.ts.map +1 -0
  175. package/dist-lib/core/a2ui/surfaces.d.ts +23 -0
  176. package/dist-lib/core/a2ui/surfaces.d.ts.map +1 -0
  177. package/dist-lib/core/a2ui/transcript.d.ts +14 -0
  178. package/dist-lib/core/a2ui/transcript.d.ts.map +1 -0
  179. package/dist-lib/core/api/facade.d.ts +7 -1
  180. package/dist-lib/core/api/facade.d.ts.map +1 -1
  181. package/dist-lib/core/api/types.d.ts +7 -1
  182. package/dist-lib/core/api/types.d.ts.map +1 -1
  183. package/dist-lib/core/conversation/hosted.d.ts.map +1 -1
  184. package/dist-lib/core/conversation/presentation.d.ts.map +1 -1
  185. package/dist-lib/core/conversation/runtime-ingress.d.ts.map +1 -1
  186. package/dist-lib/core/interaction/a2ui-validate.d.ts +6 -3
  187. package/dist-lib/core/interaction/a2ui-validate.d.ts.map +1 -1
  188. package/dist-lib/core/interaction/adapters/normalize.d.ts +3 -0
  189. package/dist-lib/core/interaction/adapters/normalize.d.ts.map +1 -1
  190. package/dist-lib/core/interaction/adapters/session-events.d.ts.map +1 -1
  191. package/dist-lib/core/interaction/client.d.ts +2 -1
  192. package/dist-lib/core/interaction/client.d.ts.map +1 -1
  193. package/dist-lib/core/interaction/form-values.d.ts +6 -0
  194. package/dist-lib/core/interaction/form-values.d.ts.map +1 -0
  195. package/dist-lib/core/interaction/index.d.ts +8 -0
  196. package/dist-lib/core/interaction/index.d.ts.map +1 -1
  197. package/dist-lib/core/interaction/response-snapshot.d.ts +13 -0
  198. package/dist-lib/core/interaction/response-snapshot.d.ts.map +1 -0
  199. package/dist-lib/core/interaction/schema.d.ts +15 -0
  200. package/dist-lib/core/interaction/schema.d.ts.map +1 -0
  201. package/dist-lib/core/interaction/store.d.ts.map +1 -1
  202. package/dist-lib/core/interaction/types.d.ts +5 -2
  203. package/dist-lib/core/interaction/types.d.ts.map +1 -1
  204. package/dist-lib/core/run/a2ui.d.ts +6 -1
  205. package/dist-lib/core/run/a2ui.d.ts.map +1 -1
  206. package/dist-lib/core/run/agui.d.ts +14 -0
  207. package/dist-lib/core/run/agui.d.ts.map +1 -1
  208. package/dist-lib/core/run/blocks.d.ts +5 -0
  209. package/dist-lib/core/run/blocks.d.ts.map +1 -1
  210. package/dist-lib/core/run/dispatcher.d.ts.map +1 -1
  211. package/dist-lib/core/run/engine.d.ts.map +1 -1
  212. package/dist-lib/core/run/types.d.ts +17 -0
  213. package/dist-lib/core/run/types.d.ts.map +1 -1
  214. package/dist-lib/core/stream/kernel-events.d.ts.map +1 -1
  215. package/dist-lib/core/stream/types.d.ts +3 -0
  216. package/dist-lib/core/stream/types.d.ts.map +1 -1
  217. package/dist-lib/core/teams/cloudContracts.d.ts +40 -40
  218. package/dist-lib/core/teams/cloudEffects.d.ts +8 -8
  219. package/dist-lib/core/teams/cloudExtendedContracts.d.ts +26 -26
  220. package/dist-lib/core/teams/cloudMaterials.d.ts +1 -1
  221. package/dist-lib/core/teams/contracts.d.ts +12 -12
  222. package/dist-lib/core/teams/workspaceContracts.d.ts +27 -27
  223. package/dist-lib/{feedback-CuC5jRi_.js → feedback-DRgW061h.js} +108 -86
  224. package/dist-lib/hooks/useAgentChat.d.ts +3 -3
  225. package/dist-lib/hooks/useAgentChat.d.ts.map +1 -1
  226. package/dist-lib/hooks/useInteractions.d.ts +3 -2
  227. package/dist-lib/hooks/useInteractions.d.ts.map +1 -1
  228. package/dist-lib/hooks/useRunAgent.d.ts +3 -1
  229. package/dist-lib/hooks/useRunAgent.d.ts.map +1 -1
  230. package/dist-lib/hooks/useSessionLifecycle.d.ts.map +1 -1
  231. package/dist-lib/hooks.js +21 -19
  232. package/dist-lib/{runtime-items-VPq7711E.js → json-value-DnHp0582.js} +22 -1
  233. package/dist-lib/{permission-B2MuVypC.js → permission-CHy_uZD0.js} +1 -1
  234. package/dist-lib/{persisted-session-history-CBk_ypXo.js → persisted-session-history-KtoKbLRA.js} +842 -587
  235. package/dist-lib/public/chat-timeline.d.ts +3 -0
  236. package/dist-lib/public/chat-timeline.d.ts.map +1 -1
  237. package/dist-lib/public/components.d.ts +3 -0
  238. package/dist-lib/public/components.d.ts.map +1 -1
  239. package/dist-lib/public/runtime.d.ts +3 -0
  240. package/dist-lib/public/runtime.d.ts.map +1 -1
  241. package/dist-lib/public/types.d.ts +1 -0
  242. package/dist-lib/public/types.d.ts.map +1 -1
  243. package/dist-lib/runtime.js +287 -282
  244. package/dist-lib/schema-fields-CUpDl1NB.js +41 -0
  245. package/dist-lib/styles.css +1 -1
  246. package/dist-lib/team-components.js +882 -750
  247. package/dist-lib/types/api.d.ts +2 -0
  248. package/dist-lib/types/api.d.ts.map +1 -1
  249. package/dist-lib/types/capabilities.d.ts +2 -0
  250. package/dist-lib/types/capabilities.d.ts.map +1 -1
  251. package/dist-lib/types/json-value.d.ts +6 -0
  252. package/dist-lib/types/json-value.d.ts.map +1 -0
  253. package/dist-lib/{useSessionLifecycle-DS3PPoWK.js → useSessionLifecycle-DNG3Yks2.js} +1680 -1128
  254. package/dist-lib/utils/capabilities.d.ts.map +1 -1
  255. package/dist-lib/utils/history-tool-facts.d.ts +8 -0
  256. package/dist-lib/utils/history-tool-facts.d.ts.map +1 -0
  257. package/dist-lib/utils/interaction-history.d.ts +11 -0
  258. package/dist-lib/utils/interaction-history.d.ts.map +1 -0
  259. package/dist-lib/utils/kernel-run-history.d.ts +9 -0
  260. package/dist-lib/utils/kernel-run-history.d.ts.map +1 -0
  261. package/dist-lib/utils/messages.d.ts +1 -1
  262. package/dist-lib/utils/messages.d.ts.map +1 -1
  263. package/dist-lib/utils/persisted-session-history.d.ts.map +1 -1
  264. package/dist-lib/utils/recovered-run.d.ts.map +1 -1
  265. package/dist-lib/utils/responses-stream.d.ts.map +1 -1
  266. package/dist-lib/utils/run-progress.d.ts +11 -0
  267. package/dist-lib/utils/run-progress.d.ts.map +1 -0
  268. package/dist-lib/utils/session-events.d.ts.map +1 -1
  269. package/dist-lib/utils/transcript-order.d.ts.map +1 -1
  270. package/dist-lib/utils/workspace.d.ts +1 -1
  271. package/package.json +13 -4
  272. package/dist-ksadk/assets/NativeTerminalPanel-Cjjz8B30.js +0 -1
  273. package/dist-ksadk/assets/architecture-7GRP2DOG-pn_DuLy6.js +0 -1
  274. package/dist-ksadk/assets/channel-fySsnkft.js +0 -1
  275. package/dist-ksadk/assets/chunk-2Q5K7J3B-BheGxKRQ.js +0 -1
  276. package/dist-ksadk/assets/classDiagram-DTDB5LWJ-DSfLtNYm.js +0 -1
  277. package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-DSfLtNYm.js +0 -1
  278. package/dist-ksadk/assets/cynefin-OW5HDTMX-PFWIGtvA.js +0 -1
  279. package/dist-ksadk/assets/eventmodeling-NTZA5JFV-DsM4upQX.js +0 -1
  280. package/dist-ksadk/assets/flowDiagram-A5DVABFB-D5NA16k9.js +0 -1
  281. package/dist-ksadk/assets/gitGraph-4MIJSDKK-DUCVz-ih.js +0 -1
  282. package/dist-ksadk/assets/index-CZdkAvsv.js +0 -244
  283. package/dist-ksadk/assets/index-CvXdHgF3.css +0 -2
  284. package/dist-ksadk/assets/info-A6RAGUB7-rw0ZNHZp.js +0 -1
  285. package/dist-ksadk/assets/packet-AYTQ26CC-Ca4Hvki9.js +0 -1
  286. package/dist-ksadk/assets/pie-WAS4IAKB-hwiz6fbw.js +0 -1
  287. package/dist-ksadk/assets/radar-RG4KPBEZ-BR1oZXLM.js +0 -1
  288. package/dist-ksadk/assets/railroad-74A4TZTK-DfgEISfX.js +0 -1
  289. package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-CWOC3rdk.js +0 -1
  290. package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-CiRvHCLY.js +0 -1
  291. package/dist-ksadk/assets/railroad-peg-WCYAUIDC-DSDDyJ2f.js +0 -1
  292. package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-Cw1fPb5w.js +0 -1
  293. package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-Cc3JMBAF.js +0 -8
  294. package/dist-ksadk/assets/treeView-Q6P3EWNA-C05SJHxo.js +0 -1
  295. package/dist-ksadk/assets/treemap-WGGIJYW6-BqNLAhc3.js +0 -1
  296. package/dist-ksadk/assets/wardley-WFR3VGLG-DokNktqB.js +0 -1
  297. package/dist-lib/AttachmentPreview-lufx89xJ.js +0 -535
  298. package/dist-lib/ConnectedMessageList-CzTOJbZU.js +0 -1433
  299. package/dist-lib/InteractionSchemaForm-ChYkHPop.js +0 -174
  300. package/dist-lib/a2ui-DfAshhMK.js +0 -507
@@ -1,17 +1,17 @@
1
- import { n as e, r as t, t as n } from "./InteractionSchemaForm-ChYkHPop.js";
2
- import { t as r } from "./MessageMarkdown-CwMTvgFj.js";
3
- import { Et as i, Ot as a, S as o, i as s, o as c, qt as l, s as u, t as d, v as f } from "./cloudMaterials-D75jTrkQ.js";
4
- import { i as p, n as m, o as h, r as g, s as _, t as v } from "./presentation-yYw7xK60.js";
5
- import { Suspense as y, lazy as b, useCallback as x, useEffect as S, useId as C, useLayoutEffect as w, useMemo as T, useRef as E, useState as D, useSyncExternalStore as O } from "react";
6
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
1
+ import { n as e, t } from "./schema-fields-CUpDl1NB.js";
2
+ import { t as n } from "./MessageMarkdown-CwMTvgFj.js";
3
+ import { Et as r, Ot as i, S as a, i as o, o as s, qt as c, s as l, t as u, v as d } from "./cloudMaterials-D75jTrkQ.js";
4
+ import { i as f, n as p, o as m, r as h, s as g, t as _ } from "./presentation-yYw7xK60.js";
5
+ import { Suspense as v, lazy as y, useCallback as b, useEffect as x, useId as S, useLayoutEffect as C, useMemo as w, useRef as T, useState as E, useSyncExternalStore as D } from "react";
6
+ import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
7
7
  //#region src/components/teams/InteractionMessage.tsx
8
- function M({ message: e }) {
8
+ function j({ message: e }) {
9
9
  let t = null;
10
10
  try {
11
11
  let n = JSON.parse(e);
12
12
  n && typeof n == "object" && "arguments" in n && n.arguments && typeof n.arguments == "object" && !Array.isArray(n.arguments) && (t = n);
13
13
  } catch {}
14
- if (!t) return /* @__PURE__ */ A("p", { children: e });
14
+ if (!t) return /* @__PURE__ */ k("p", { children: e });
15
15
  let n = {
16
16
  path: "文件位置",
17
17
  command: "命令",
@@ -21,15 +21,15 @@ function M({ message: e }) {
21
21
  medium: "中",
22
22
  high: "高"
23
23
  }, i = (e) => typeof e == "string" ? e : JSON.stringify(e, null, 2);
24
- return /* @__PURE__ */ j("div", {
24
+ return /* @__PURE__ */ A("div", {
25
25
  className: "team-approval-details",
26
26
  children: [
27
- /* @__PURE__ */ A("dl", { children: Object.entries(t.arguments).filter(([e]) => e !== "content").map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: n[e] || e }), /* @__PURE__ */ A("dd", { children: /* @__PURE__ */ A("code", { children: i(t) }) })] }, e)) }),
28
- "content" in t.arguments && /* @__PURE__ */ j("details", {
27
+ /* @__PURE__ */ k("dl", { children: Object.entries(t.arguments).filter(([e]) => e !== "content").map(([e, t]) => /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", { children: n[e] || e }), /* @__PURE__ */ k("dd", { children: /* @__PURE__ */ k("code", { children: i(t) }) })] }, e)) }),
28
+ "content" in t.arguments && /* @__PURE__ */ A("details", {
29
29
  className: "team-approval-preview",
30
- children: [/* @__PURE__ */ A("summary", { children: "查看待写入的文件内容" }), /* @__PURE__ */ A("pre", { children: i(t.arguments.content) })]
30
+ children: [/* @__PURE__ */ k("summary", { children: "查看待写入的文件内容" }), /* @__PURE__ */ k("pre", { children: i(t.arguments.content) })]
31
31
  }),
32
- typeof t.risk == "string" && /* @__PURE__ */ j("p", {
32
+ typeof t.risk == "string" && /* @__PURE__ */ A("p", {
33
33
  className: "team-approval-risk",
34
34
  children: ["风险级别:", r[t.risk] || t.risk]
35
35
  })
@@ -38,8 +38,8 @@ function M({ message: e }) {
38
38
  }
39
39
  //#endregion
40
40
  //#region src/components/teams/TeamReconciliation.tsx
41
- function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
42
- let [r, i] = D(null), [a, o] = D({}), [s, c] = D(!1), [l, u] = D("");
41
+ function M({ run: e, onLoadReconciliation: t, onReconcile: n }) {
42
+ let [r, i] = E(null), [a, o] = E({}), [s, c] = E(!1), [l, u] = E("");
43
43
  if (!t || !n || e.leaderStandby?.reason !== "execution_uncertain_fenced") return null;
44
44
  async function d() {
45
45
  c(!0), u("");
@@ -64,13 +64,13 @@ function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
64
64
  c(!1);
65
65
  }
66
66
  }
67
- return /* @__PURE__ */ j("section", {
67
+ return /* @__PURE__ */ A("section", {
68
68
  className: "team-run-budget",
69
69
  "aria-label": "原执行核查",
70
70
  children: [
71
- /* @__PURE__ */ A("h4", { children: "旧执行结果需要核查" }),
72
- /* @__PURE__ */ A("p", { children: "云端已接管,相关分支会等待原单确认。请先核对外部操作和交付物,再决定是否采用结果。" }),
73
- /* @__PURE__ */ A("button", {
71
+ /* @__PURE__ */ k("h4", { children: "旧执行结果需要核查" }),
72
+ /* @__PURE__ */ k("p", { children: "云端已接管,相关分支会等待原单确认。请先核对外部操作和交付物,再决定是否采用结果。" }),
73
+ /* @__PURE__ */ k("button", {
74
74
  type: "button",
75
75
  className: "team-button",
76
76
  disabled: s,
@@ -84,23 +84,23 @@ function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
84
84
  "cancelled",
85
85
  "interrupted"
86
86
  ].includes(t?.run_status || "");
87
- return /* @__PURE__ */ j("article", {
87
+ return /* @__PURE__ */ A("article", {
88
88
  className: "team-observer-item",
89
89
  children: [
90
- /* @__PURE__ */ j("p", { children: [
90
+ /* @__PURE__ */ A("p", { children: [
91
91
  e.taskId ? "成员执行" : "原 Leader 执行",
92
92
  " · ",
93
93
  r ? "已返回结束回执" : "原节点尚未返回结束回执"
94
94
  ] }),
95
- t?.output && /* @__PURE__ */ A("pre", {
95
+ t?.output && /* @__PURE__ */ k("pre", {
96
96
  className: "team-observer-details",
97
97
  children: t.output.slice(0, 1e4)
98
98
  }),
99
- /* @__PURE__ */ j("details", { children: [/* @__PURE__ */ A("summary", { children: "执行引用" }), /* @__PURE__ */ A("code", { children: t?.run_id || e.nativeRunId || e.commandId })] }),
100
- r && /* @__PURE__ */ j(k, { children: [
101
- /* @__PURE__ */ j("label", {
99
+ /* @__PURE__ */ A("details", { children: [/* @__PURE__ */ k("summary", { children: "执行引用" }), /* @__PURE__ */ k("code", { children: t?.run_id || e.nativeRunId || e.commandId })] }),
100
+ r && /* @__PURE__ */ A(O, { children: [
101
+ /* @__PURE__ */ A("label", {
102
102
  className: "team-field",
103
- children: ["核查说明", /* @__PURE__ */ A("textarea", {
103
+ children: ["核查说明", /* @__PURE__ */ k("textarea", {
104
104
  value: n,
105
105
  onChange: (t) => o((n) => ({
106
106
  ...n,
@@ -110,21 +110,21 @@ function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
110
110
  placeholder: "说明已检查哪些原单或外部结果"
111
111
  })]
112
112
  }),
113
- /* @__PURE__ */ A("button", {
113
+ /* @__PURE__ */ k("button", {
114
114
  type: "button",
115
115
  className: "team-button",
116
116
  disabled: s || !n.trim(),
117
117
  onClick: () => void f(e, "confirm_ended"),
118
118
  children: "确认已结束"
119
119
  }),
120
- e.taskId && t?.run_status === "succeeded" && /* @__PURE__ */ A("button", {
120
+ e.taskId && t?.run_status === "succeeded" && /* @__PURE__ */ k("button", {
121
121
  type: "button",
122
122
  className: "team-button",
123
123
  disabled: s || !n.trim(),
124
124
  onClick: () => void f(e, "use_result"),
125
125
  children: "采用已验证成果"
126
126
  }),
127
- /* @__PURE__ */ A("p", {
127
+ /* @__PURE__ */ k("p", {
128
128
  className: "team-muted",
129
129
  children: "确认结束不会自动重新执行;必要时再对相应子任务提出重试。"
130
130
  })
@@ -132,7 +132,7 @@ function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
132
132
  ]
133
133
  }, e.commandId);
134
134
  }),
135
- l && /* @__PURE__ */ A("p", {
135
+ l && /* @__PURE__ */ k("p", {
136
136
  role: "alert",
137
137
  className: "team-inline-error",
138
138
  children: l
@@ -141,8 +141,140 @@ function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
141
141
  });
142
142
  }
143
143
  //#endregion
144
+ //#region src/components/chat/InteractionSchemaForm.tsx
145
+ function N({ schema: n, values: r, onChange: i, disabled: a, onSubmit: o, onCancel: s }) {
146
+ let c = t(n), [l, u] = E(""), d = e();
147
+ return /* @__PURE__ */ A("form", {
148
+ className: "mt-3",
149
+ "data-testid": "interaction-schema-form",
150
+ onKeyDown: (e) => {
151
+ e.key === "Enter" && d(e) && e.preventDefault();
152
+ },
153
+ onSubmit: (e) => {
154
+ if (e.preventDefault(), !a) {
155
+ if (!c.every((e) => {
156
+ let t = r[e.name];
157
+ return !e.required || (Array.isArray(t) ? t.length > 0 : String(t ?? "").trim().length > 0);
158
+ })) {
159
+ u("请回答必填问题后再提交。");
160
+ return;
161
+ }
162
+ u(""), o();
163
+ }
164
+ },
165
+ children: [
166
+ c.map((e) => /* @__PURE__ */ A("div", {
167
+ className: "mb-2 block text-xs text-[var(--ksadk-interaction-muted)]",
168
+ children: [/* @__PURE__ */ A("span", {
169
+ className: "mb-1 block font-medium",
170
+ children: [e.description || e.title || e.name, e.required ? /* @__PURE__ */ k("span", {
171
+ className: "ml-0.5 text-rose-500",
172
+ children: "*"
173
+ }) : null]
174
+ }), e.enumValues && e.enumValues.length > 0 ? /* @__PURE__ */ A("div", {
175
+ className: "space-y-1",
176
+ "data-testid": `interaction-field-${e.name}`,
177
+ children: [e.enumValues.map((t, n) => {
178
+ let o = e.type === "array" ? Array.isArray(r[e.name]) && r[e.name].includes(t) : r[e.name] === t;
179
+ return /* @__PURE__ */ A("label", {
180
+ className: "flex min-h-10 cursor-pointer items-center gap-2 rounded-xl px-2 text-sm text-[var(--ksadk-interaction-foreground)] hover:bg-[var(--ksadk-interaction-muted-background)]",
181
+ children: [
182
+ /* @__PURE__ */ k("span", {
183
+ className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-[var(--ksadk-interaction-muted-background)] text-xs text-[var(--ksadk-interaction-muted)]",
184
+ children: n + 1
185
+ }),
186
+ /* @__PURE__ */ k("input", {
187
+ type: e.type === "array" ? "checkbox" : "radio",
188
+ name: e.name,
189
+ disabled: a,
190
+ checked: !!o,
191
+ onChange: (n) => {
192
+ let a = Array.isArray(r[e.name]) ? r[e.name] : [], o = e.type === "array" ? n.target.checked ? [...a, t] : a.filter((e) => e !== t) : t;
193
+ i({
194
+ ...r,
195
+ [e.name]: o
196
+ });
197
+ },
198
+ className: "h-4 w-4 accent-current"
199
+ }),
200
+ /* @__PURE__ */ k("span", { children: String(t) })
201
+ ]
202
+ }, String(t));
203
+ }), e.allowOther ? /* @__PURE__ */ k("input", {
204
+ "aria-label": `${e.title || e.name}:自定义回答`,
205
+ placeholder: "或填写自己的回答",
206
+ type: e.secret ? "password" : "text",
207
+ disabled: a,
208
+ value: e.type === "array" ? (Array.isArray(r[e.name]) ? r[e.name] : []).filter((t) => !e.enumValues.includes(t)).join("\n") : e.enumValues.includes(r[e.name]) ? "" : String(r[e.name] ?? ""),
209
+ onChange: (t) => {
210
+ let n = t.target.value, a = (Array.isArray(r[e.name]) ? r[e.name] : []).filter((t) => e.enumValues.includes(t));
211
+ i({
212
+ ...r,
213
+ [e.name]: e.type === "array" ? [...a, ...n.trim() ? [n] : []] : n
214
+ });
215
+ },
216
+ className: "w-full rounded-lg border border-[var(--ksadk-interaction-border)] bg-[var(--ksadk-interaction-control-background)] px-3 py-2 text-sm text-[var(--ksadk-interaction-foreground)]"
217
+ }) : null]
218
+ }) : e.type === "boolean" ? /* @__PURE__ */ k("input", {
219
+ type: "checkbox",
220
+ "data-testid": `interaction-field-${e.name}`,
221
+ disabled: a,
222
+ checked: !!r[e.name],
223
+ onChange: (t) => i({
224
+ ...r,
225
+ [e.name]: t.target.checked
226
+ }),
227
+ className: "h-4 w-4"
228
+ }) : e.type === "number" ? /* @__PURE__ */ k("input", {
229
+ type: "number",
230
+ "data-testid": `interaction-field-${e.name}`,
231
+ disabled: a,
232
+ value: r[e.name] === void 0 ? "" : String(r[e.name]),
233
+ onChange: (t) => i({
234
+ ...r,
235
+ [e.name]: t.target.value === "" ? void 0 : Number(t.target.value)
236
+ }),
237
+ className: "w-full rounded-md border border-[var(--ksadk-interaction-border)] bg-[var(--ksadk-interaction-control-background)] px-2 py-1.5 text-sm text-foreground"
238
+ }) : /* @__PURE__ */ k("input", {
239
+ type: e.secret ? "password" : "text",
240
+ "data-testid": `interaction-field-${e.name}`,
241
+ disabled: a,
242
+ value: String(r[e.name] ?? ""),
243
+ onChange: (t) => i({
244
+ ...r,
245
+ [e.name]: t.target.value
246
+ }),
247
+ className: "w-full rounded-md border border-[var(--ksadk-interaction-border)] bg-[var(--ksadk-interaction-control-background)] px-2 py-1.5 text-sm text-foreground"
248
+ })]
249
+ }, e.name)),
250
+ l ? /* @__PURE__ */ k("p", {
251
+ role: "alert",
252
+ className: "mt-2 text-xs text-rose-600",
253
+ children: l
254
+ }) : null,
255
+ /* @__PURE__ */ A("div", {
256
+ className: "mt-2 flex flex-wrap gap-2",
257
+ children: [/* @__PURE__ */ k("button", {
258
+ type: "submit",
259
+ "data-testid": "interaction-submit",
260
+ disabled: a,
261
+ className: "inline-flex min-h-8 items-center rounded-md bg-[var(--ksadk-interaction-primary-background)] px-3 py-1.5 text-xs font-semibold text-[var(--ksadk-interaction-primary-foreground)] disabled:cursor-not-allowed disabled:opacity-55",
262
+ children: "提交"
263
+ }), /* @__PURE__ */ k("button", {
264
+ type: "button",
265
+ "data-testid": "interaction-form-cancel",
266
+ disabled: a,
267
+ onClick: s,
268
+ className: "inline-flex min-h-8 items-center rounded-md px-3 py-1.5 text-xs font-medium text-slate-500 underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-55 dark:text-slate-400",
269
+ children: "取消本次确认"
270
+ })]
271
+ })
272
+ ]
273
+ });
274
+ }
275
+ //#endregion
144
276
  //#region src/components/teams/TeamWorkspace.tsx
145
- var P = b(() => import("./ExecutionTree-v3HexvPo.js").then((e) => e.n).then((e) => ({ default: e.ExecutionTree }))), F = () => `team-${globalThis.crypto.randomUUID()}`, I = {
277
+ var P = y(() => import("./ExecutionTree-v3HexvPo.js").then((e) => e.n).then((e) => ({ default: e.ExecutionTree }))), F = () => `team-${globalThis.crypto.randomUUID()}`, I = {
146
278
  owner: "群主",
147
279
  leader: "Leader",
148
280
  member: "成员",
@@ -162,36 +294,36 @@ var P = b(() => import("./ExecutionTree-v3HexvPo.js").then((e) => e.n).then((e)
162
294
  closed: "未连接"
163
295
  };
164
296
  function z({ name: e }) {
165
- return /* @__PURE__ */ A("span", {
297
+ return /* @__PURE__ */ k("span", {
166
298
  className: "team-avatar",
167
299
  "aria-hidden": "true",
168
300
  children: Array.from(e.trim())[0] || "A"
169
301
  });
170
302
  }
171
303
  function B({ status: e }) {
172
- return /* @__PURE__ */ A("span", {
304
+ return /* @__PURE__ */ k("span", {
173
305
  className: "team-status",
174
306
  "data-status": e,
175
- children: v[e] ?? e
307
+ children: _[e] ?? e
176
308
  });
177
309
  }
178
310
  function V({ goal: e }) {
179
- return e.length <= 100 ? /* @__PURE__ */ A("h3", { children: e }) : /* @__PURE__ */ j("details", {
311
+ return e.length <= 100 ? /* @__PURE__ */ k("h3", { children: e }) : /* @__PURE__ */ A("details", {
180
312
  className: "team-run-goal",
181
- children: [/* @__PURE__ */ j("summary", { children: [/* @__PURE__ */ A("h3", { children: e }), /* @__PURE__ */ A("span", { children: "完整目标" })] }), /* @__PURE__ */ A("p", { children: e })]
313
+ children: [/* @__PURE__ */ A("summary", { children: [/* @__PURE__ */ k("h3", { children: e }), /* @__PURE__ */ k("span", { children: "完整目标" })] }), /* @__PURE__ */ k("p", { children: e })]
182
314
  });
183
315
  }
184
316
  function H({ snapshot: e, connection: t, onMembers: n, onManage: r }) {
185
317
  let i = e.members.filter((e) => e.status !== "removed");
186
- return /* @__PURE__ */ j("header", {
318
+ return /* @__PURE__ */ A("header", {
187
319
  className: "team-header",
188
- children: [/* @__PURE__ */ j("div", {
320
+ children: [/* @__PURE__ */ A("div", {
189
321
  className: "team-header-identity",
190
- children: [/* @__PURE__ */ A("div", {
322
+ children: [/* @__PURE__ */ k("div", {
191
323
  className: "team-avatar-stack",
192
324
  "aria-hidden": "true",
193
- children: i.slice(0, 3).map((e) => /* @__PURE__ */ A(z, { name: e.name }, e.memberId))
194
- }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h1", { children: e.group.name }), /* @__PURE__ */ j("button", {
325
+ children: i.slice(0, 3).map((e) => /* @__PURE__ */ k(z, { name: e.name }, e.memberId))
326
+ }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h1", { children: e.group.name }), /* @__PURE__ */ A("button", {
195
327
  type: "button",
196
328
  className: "team-text-button team-muted",
197
329
  onClick: n,
@@ -201,13 +333,13 @@ function H({ snapshot: e, connection: t, onMembers: n, onManage: r }) {
201
333
  i.find((t) => t.memberId === e.group.leaderMemberId)?.name || "Leader"
202
334
  ]
203
335
  })] })]
204
- }), /* @__PURE__ */ j("div", {
336
+ }), /* @__PURE__ */ A("div", {
205
337
  className: "team-header-actions",
206
- children: [t !== "connected" && /* @__PURE__ */ A("span", {
338
+ children: [t !== "connected" && /* @__PURE__ */ k("span", {
207
339
  className: "team-connection",
208
340
  role: "status",
209
341
  children: R[t]
210
- }), r && /* @__PURE__ */ A("button", {
342
+ }), r && /* @__PURE__ */ k("button", {
211
343
  type: "button",
212
344
  className: "team-button",
213
345
  onClick: r,
@@ -216,9 +348,9 @@ function H({ snapshot: e, connection: t, onMembers: n, onManage: r }) {
216
348
  })]
217
349
  });
218
350
  }
219
- function U({ messages: e, children: t, emptyState: n, focusFinalDelivery: i }) {
220
- let a = E(null), o = E(!0), [s, c] = D(100), l = e.filter((e) => e.visibility === "public");
221
- w(() => {
351
+ function U({ messages: e, children: t, emptyState: r, focusFinalDelivery: i }) {
352
+ let a = T(null), o = T(!0), [s, c] = E(100), l = e.filter((e) => e.visibility === "public");
353
+ C(() => {
222
354
  let e = a.current;
223
355
  if (!o.current || !e) return;
224
356
  let t = i ? e.querySelector(".team-final-delivery") : null;
@@ -232,7 +364,7 @@ function U({ messages: e, children: t, emptyState: n, focusFinalDelivery: i }) {
232
364
  e.scrollTop += e.scrollHeight - t;
233
365
  });
234
366
  }
235
- return /* @__PURE__ */ A("div", {
367
+ return /* @__PURE__ */ k("div", {
236
368
  className: "team-timeline",
237
369
  ref: a,
238
370
  onScroll: () => {
@@ -241,55 +373,55 @@ function U({ messages: e, children: t, emptyState: n, focusFinalDelivery: i }) {
241
373
  },
242
374
  "aria-label": "群聊消息",
243
375
  tabIndex: 0,
244
- children: /* @__PURE__ */ j("div", {
376
+ children: /* @__PURE__ */ A("div", {
245
377
  className: "team-timeline-inner",
246
378
  children: [
247
- l.length > s && /* @__PURE__ */ A("button", {
379
+ l.length > s && /* @__PURE__ */ k("button", {
248
380
  className: "team-button team-history-more",
249
381
  type: "button",
250
382
  onClick: u,
251
383
  children: "查看更早的消息"
252
384
  }),
253
- !l.length && (n ?? /* @__PURE__ */ j("div", {
385
+ !l.length && (r ?? /* @__PURE__ */ A("div", {
254
386
  className: "team-empty",
255
387
  children: [
256
- /* @__PURE__ */ A("span", {
388
+ /* @__PURE__ */ k("span", {
257
389
  className: "team-eyebrow",
258
390
  children: "一起完成一个目标"
259
391
  }),
260
- /* @__PURE__ */ A("h2", { children: "团队已就绪" }),
261
- /* @__PURE__ */ j("p", { children: [
392
+ /* @__PURE__ */ k("h2", { children: "团队已就绪" }),
393
+ /* @__PURE__ */ A("p", { children: [
262
394
  "描述你想得到的成果,Leader 会组织成员分工。",
263
- /* @__PURE__ */ A("br", {}),
395
+ /* @__PURE__ */ k("br", {}),
264
396
  "也可以 @成员,指定由谁参与。"
265
397
  ] })
266
398
  ]
267
399
  })),
268
- l.slice(-s).map((e) => /* @__PURE__ */ j("article", {
400
+ l.slice(-s).map((e) => /* @__PURE__ */ A("article", {
269
401
  className: "team-message",
270
402
  "data-role": e.groupRole,
271
403
  "data-message-id": e.messageId,
272
- children: [e.groupRole !== "owner" && /* @__PURE__ */ A(z, { name: e.senderName }), /* @__PURE__ */ j("div", {
404
+ children: [e.groupRole !== "owner" && /* @__PURE__ */ k(z, { name: e.senderName }), /* @__PURE__ */ A("div", {
273
405
  className: "team-message-main",
274
- children: [/* @__PURE__ */ j("header", { children: [
275
- /* @__PURE__ */ A("strong", { children: e.senderName }),
276
- /* @__PURE__ */ A("span", { children: I[e.groupRole] }),
277
- /* @__PURE__ */ A("time", {
406
+ children: [/* @__PURE__ */ A("header", { children: [
407
+ /* @__PURE__ */ k("strong", { children: e.senderName }),
408
+ /* @__PURE__ */ k("span", { children: I[e.groupRole] }),
409
+ /* @__PURE__ */ k("time", {
278
410
  dateTime: e.createdAt,
279
411
  children: new Date(e.createdAt).toLocaleTimeString([], {
280
412
  hour: "2-digit",
281
413
  minute: "2-digit"
282
414
  })
283
415
  }),
284
- e.intent === "note" && /* @__PURE__ */ A("span", { children: "仅留言" })
285
- ] }), /* @__PURE__ */ A("div", {
416
+ e.intent === "note" && /* @__PURE__ */ k("span", { children: "仅留言" })
417
+ ] }), /* @__PURE__ */ k("div", {
286
418
  className: "team-message-body",
287
- children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */ A(r, { content: e.text }, t) : /* @__PURE__ */ j("span", {
419
+ children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */ k(n, { content: e.text }, t) : /* @__PURE__ */ A("span", {
288
420
  className: "team-attachment",
289
421
  children: [
290
422
  e.name || "附件",
291
423
  " ",
292
- /* @__PURE__ */ A("span", { children: e.mediaType })
424
+ /* @__PURE__ */ k("span", { children: e.mediaType })
293
425
  ]
294
426
  }, e.attachmentRef))
295
427
  })]
@@ -301,69 +433,69 @@ function U({ messages: e, children: t, emptyState: n, focusFinalDelivery: i }) {
301
433
  });
302
434
  }
303
435
  function ee({ run: e, tasks: t, pendingCount: n, onOpen: r, compact: i = !1 }) {
304
- let a = t.filter((e) => e.status === "succeeded").length, o = g(e.status);
305
- return /* @__PURE__ */ j("button", {
436
+ let a = t.filter((e) => e.status === "succeeded").length, o = h(e.status);
437
+ return /* @__PURE__ */ A("button", {
306
438
  type: "button",
307
439
  className: "team-progress-card",
308
440
  "data-active": o || void 0,
309
441
  onClick: r,
310
442
  "aria-label": `查看协作:${e.goal}`,
311
443
  children: [
312
- /* @__PURE__ */ j("span", {
444
+ /* @__PURE__ */ A("span", {
313
445
  className: "team-progress-heading",
314
- children: [/* @__PURE__ */ A("span", {
446
+ children: [/* @__PURE__ */ k("span", {
315
447
  className: "team-eyebrow",
316
448
  children: "本轮协作"
317
- }), /* @__PURE__ */ j("span", {
449
+ }), /* @__PURE__ */ A("span", {
318
450
  className: "team-progress-status",
319
- children: [/* @__PURE__ */ A(B, { status: e.status }), o && /* @__PURE__ */ j("span", {
451
+ children: [/* @__PURE__ */ k(B, { status: e.status }), o && /* @__PURE__ */ A("span", {
320
452
  className: "team-progress-live",
321
453
  role: "status",
322
- children: ["实时处理中", /* @__PURE__ */ j("span", {
454
+ children: ["实时处理中", /* @__PURE__ */ A("span", {
323
455
  "aria-hidden": "true",
324
456
  children: [
325
- /* @__PURE__ */ A("i", {}),
326
- /* @__PURE__ */ A("i", {}),
327
- /* @__PURE__ */ A("i", {})
457
+ /* @__PURE__ */ k("i", {}),
458
+ /* @__PURE__ */ k("i", {}),
459
+ /* @__PURE__ */ k("i", {})
328
460
  ]
329
461
  })]
330
462
  })]
331
463
  })]
332
464
  }),
333
- !i && /* @__PURE__ */ A("strong", { children: e.goal }),
334
- /* @__PURE__ */ j("span", {
465
+ !i && /* @__PURE__ */ k("strong", { children: e.goal }),
466
+ /* @__PURE__ */ A("span", {
335
467
  className: "team-progress-caption",
336
468
  children: [
337
469
  t.length ? `${a} / ${t.length} 项任务已验收` : "正在整理目标与分工",
338
470
  n > 0 ? ` · ${n} 项需要处理` : "",
339
- /* @__PURE__ */ j("span", { children: ["查看协作 ", /* @__PURE__ */ A("span", {
471
+ /* @__PURE__ */ A("span", { children: ["查看协作 ", /* @__PURE__ */ k("span", {
340
472
  "aria-hidden": "true",
341
473
  children: "→"
342
474
  })] })
343
475
  ]
344
476
  }),
345
- e.reason && /* @__PURE__ */ A("span", {
477
+ e.reason && /* @__PURE__ */ k("span", {
346
478
  className: "team-progress-reason",
347
479
  children: e.reason
348
480
  })
349
481
  ]
350
482
  });
351
483
  }
352
- function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabled: o = !1, recipientMemberId: s, onRecipientChange: c, focusRequest: l = 0, artifacts: u = [], referenceArtifacts: d = [], serverAuthority: f = !1 }) {
353
- let p = C(), m = C(), h = C(), _ = n?.teamRunId || "", v = {
484
+ function te({ members: t, activeRun: n, value: r, onChange: i, onSend: a, disabled: o = !1, recipientMemberId: s, onRecipientChange: c, focusRequest: l = 0, artifacts: u = [], referenceArtifacts: d = [], serverAuthority: f = !1 }) {
485
+ let p = S(), m = S(), g = S(), _ = n?.teamRunId || "", v = {
354
486
  attachmentIds: [],
355
487
  note: !1,
356
488
  sourcePath: "",
357
489
  baseRef: "",
358
490
  inputs: "",
359
491
  mode: "auto"
360
- }, [y, b] = D({}), x = y[_] || v, T = (e) => b((t) => ({
492
+ }, [y, b] = E({}), w = y[_] || v, D = (e) => b((t) => ({
361
493
  ...t,
362
494
  [_]: {
363
495
  ...t[_] || v,
364
496
  ...e
365
497
  }
366
- })), { attachmentIds: O, note: M } = x, N = (e) => b((t) => {
498
+ })), { attachmentIds: j, note: M } = w, N = (e) => b((t) => {
367
499
  let n = t[_] || v;
368
500
  return {
369
501
  ...t,
@@ -372,24 +504,24 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
372
504
  attachmentIds: typeof e == "function" ? e(n.attachmentIds) : e
373
505
  }
374
506
  };
375
- }), P = (e) => T({ note: e }), I = [...new Map([...u, ...d].map((e) => [e.artifactId, e])).values()], L = I.filter((e) => O.includes(e.artifactId)), [R, B] = D(""), V = s ?? R, H = (e) => {
507
+ }), P = (e) => D({ note: e }), I = [...new Map([...u, ...d].map((e) => [e.artifactId, e])).values()], L = I.filter((e) => j.includes(e.artifactId)), [R, B] = E(""), V = s ?? R, H = (e) => {
376
508
  B(e), c?.(e);
377
- }, U = E(null);
378
- w(() => {
509
+ }, U = T(null);
510
+ C(() => {
379
511
  let e = U.current;
380
512
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 176)}px`);
381
- }, [r]), S(() => {
513
+ }, [r]), x(() => {
382
514
  l && U.current?.focus();
383
515
  }, [l]);
384
- let [ee, te] = D(0), ne = E(_);
385
- ne.current = _, S(() => {
516
+ let [ee, te] = E(0), ne = T(_);
517
+ ne.current = _, x(() => {
386
518
  G("");
387
519
  }, [_]);
388
- let [W, re] = D(!1), ie = !!(n && g(n.status)), ae = (!!(n && !ie) || n?.status === "cancel_requested") && !M, [oe, G] = D(""), se = t(), K = E(/* @__PURE__ */ new Map()), ce = E(!0);
389
- S(() => (ce.current = !0, () => {
520
+ let [W, re] = E(!1), ie = !!(n && h(n.status)), ae = (!!(n && !ie) || n?.status === "cancel_requested") && !M, [oe, G] = E(""), se = e(), K = T(/* @__PURE__ */ new Map()), ce = T(!0);
521
+ x(() => (ce.current = !0, () => {
390
522
  ce.current = !1;
391
523
  }), []);
392
- let le = /@([^\s@]*)$/u.exec(r)?.[1], q = le === void 0 ? [] : e.filter((e) => e.status === "active" && e.name.toLowerCase().includes(le.toLowerCase()));
524
+ let le = /@([^\s@]*)$/u.exec(r)?.[1], q = le === void 0 ? [] : t.filter((e) => e.status === "active" && e.name.toLowerCase().includes(le.toLowerCase()));
393
525
  async function J() {
394
526
  if (o || W || !r.trim() && !L.length) return;
395
527
  if (ae) {
@@ -410,17 +542,17 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
410
542
  mediaType: e.mediaType,
411
543
  name: e.name
412
544
  }))], l = n?.teamRunId, u = _;
413
- if (t === "start_goal" && !x.sourcePath.trim() && (x.baseRef.trim() || x.inputs.trim())) {
545
+ if (t === "start_goal" && !w.sourcePath.trim() && (w.baseRef.trim() || w.inputs.trim())) {
414
546
  G("请先填写执行节点上的工作目录。");
415
547
  return;
416
548
  }
417
- let d = t === "start_goal" && x.sourcePath.trim() ? {
418
- sourcePath: x.sourcePath.trim(),
419
- mode: x.mode,
420
- ...x.mode === "auto" && x.baseRef.trim() ? { baseRef: x.baseRef.trim() } : {},
421
- inputs: x.inputs.split(/\r?\n/).map((e) => e.trim()).filter(Boolean)
549
+ let d = t === "start_goal" && w.sourcePath.trim() ? {
550
+ sourcePath: w.sourcePath.trim(),
551
+ mode: w.mode,
552
+ ...w.mode === "auto" && w.baseRef.trim() ? { baseRef: w.baseRef.trim() } : {},
553
+ inputs: w.inputs.split(/\r?\n/).map((e) => e.trim()).filter(Boolean)
422
554
  } : void 0;
423
- if (d && f && d.mode === "auto" && !/^(?:[a-fA-F0-9]{40}|[a-fA-F0-9]{64})$/.test(x.baseRef.trim())) {
555
+ if (d && f && d.mode === "auto" && !/^(?:[a-fA-F0-9]{40}|[a-fA-F0-9]{64})$/.test(w.baseRef.trim())) {
424
556
  G("云端协作的 Git 基线需要完整的 40 或 64 位 commit,请在工作目录设置中填写。");
425
557
  return;
426
558
  }
@@ -465,39 +597,39 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
465
597
  function Y(e) {
466
598
  H(e.memberId), i(r.replace(/@([^\s@]*)$/u, `@${e.name} `)), te(0), U.current?.focus();
467
599
  }
468
- return /* @__PURE__ */ j("form", {
600
+ return /* @__PURE__ */ A("form", {
469
601
  className: "team-composer-wrap",
470
602
  onSubmit: (e) => {
471
603
  e.preventDefault(), J();
472
604
  },
473
605
  children: [
474
- oe && /* @__PURE__ */ A("p", {
606
+ oe && /* @__PURE__ */ k("p", {
475
607
  className: "team-inline-error",
476
608
  role: "alert",
477
609
  children: oe
478
610
  }),
479
- !!q.length && /* @__PURE__ */ A("div", {
611
+ !!q.length && /* @__PURE__ */ k("div", {
480
612
  className: "team-mention-options",
481
613
  role: "listbox",
482
614
  "aria-label": "选择要提及的成员",
483
- children: q.map((e, t) => /* @__PURE__ */ j("button", {
615
+ children: q.map((e, t) => /* @__PURE__ */ A("button", {
484
616
  type: "button",
485
617
  role: "option",
486
618
  "aria-selected": t === ee,
487
619
  onClick: () => Y(e),
488
620
  children: [
489
- /* @__PURE__ */ A(z, { name: e.name }),
490
- /* @__PURE__ */ A("span", { children: e.name }),
491
- /* @__PURE__ */ A("small", { children: e.role === "leader" ? "Leader" : "成员" })
621
+ /* @__PURE__ */ k(z, { name: e.name }),
622
+ /* @__PURE__ */ k("span", { children: e.name }),
623
+ /* @__PURE__ */ k("small", { children: e.role === "leader" ? "Leader" : "成员" })
492
624
  ]
493
625
  }, e.memberId))
494
626
  }),
495
- !!L.length && /* @__PURE__ */ A("div", {
627
+ !!L.length && /* @__PURE__ */ k("div", {
496
628
  className: "team-selected-artifacts",
497
629
  "aria-label": "已选择的交付物",
498
- children: L.map((e) => /* @__PURE__ */ j("span", {
630
+ children: L.map((e) => /* @__PURE__ */ A("span", {
499
631
  className: "team-attachment",
500
- children: [e.name, /* @__PURE__ */ A("button", {
632
+ children: [e.name, /* @__PURE__ */ k("button", {
501
633
  type: "button",
502
634
  className: "team-text-button",
503
635
  "aria-label": `移除引用 ${e.name}`,
@@ -507,15 +639,15 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
507
639
  })]
508
640
  }, e.artifactId))
509
641
  }),
510
- /* @__PURE__ */ j("div", {
642
+ /* @__PURE__ */ A("div", {
511
643
  className: "team-composer",
512
644
  children: [
513
- /* @__PURE__ */ A("label", {
645
+ /* @__PURE__ */ k("label", {
514
646
  className: "team-sr-only",
515
647
  htmlFor: p,
516
648
  children: "给团队的消息"
517
649
  }),
518
- /* @__PURE__ */ A("textarea", {
650
+ /* @__PURE__ */ k("textarea", {
519
651
  ref: U,
520
652
  id: p,
521
653
  value: r,
@@ -537,101 +669,101 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
537
669
  e.key === "Enter" && !e.shiftKey && !se(e) && (e.preventDefault(), J());
538
670
  }
539
671
  }),
540
- /* @__PURE__ */ j("div", {
672
+ /* @__PURE__ */ A("div", {
541
673
  className: "team-composer-toolbar",
542
- children: [/* @__PURE__ */ j("div", { children: [
543
- /* @__PURE__ */ A("label", {
674
+ children: [/* @__PURE__ */ A("div", { children: [
675
+ /* @__PURE__ */ k("label", {
544
676
  className: "team-sr-only",
545
677
  htmlFor: m,
546
678
  children: "接收成员"
547
679
  }),
548
- /* @__PURE__ */ j("select", {
680
+ /* @__PURE__ */ A("select", {
549
681
  id: m,
550
682
  value: V,
551
683
  onChange: (e) => H(e.target.value),
552
684
  disabled: o || W,
553
- children: [/* @__PURE__ */ A("option", {
685
+ children: [/* @__PURE__ */ k("option", {
554
686
  value: "",
555
687
  children: "发给 Leader"
556
- }), e.filter((e) => e.status === "active").map((e) => /* @__PURE__ */ j("option", {
688
+ }), t.filter((e) => e.status === "active").map((e) => /* @__PURE__ */ A("option", {
557
689
  value: e.memberId,
558
690
  children: ["@", e.name]
559
691
  }, e.memberId))]
560
692
  }),
561
- /* @__PURE__ */ j("details", {
693
+ /* @__PURE__ */ A("details", {
562
694
  className: "team-composer-more",
563
- children: [/* @__PURE__ */ A("summary", {
695
+ children: [/* @__PURE__ */ k("summary", {
564
696
  "aria-label": "更多消息选项",
565
697
  children: "···"
566
- }), /* @__PURE__ */ j("div", {
698
+ }), /* @__PURE__ */ A("div", {
567
699
  className: "team-composer-menu",
568
- children: [/* @__PURE__ */ j("label", {
700
+ children: [/* @__PURE__ */ A("label", {
569
701
  className: "team-note-toggle",
570
- children: [/* @__PURE__ */ A("input", {
702
+ children: [/* @__PURE__ */ k("input", {
571
703
  type: "checkbox",
572
704
  checked: M,
573
705
  onChange: (e) => P(e.target.checked),
574
706
  disabled: o || W
575
707
  }), "仅留言,不启动执行"]
576
- }), !n && /* @__PURE__ */ j("details", {
708
+ }), !n && /* @__PURE__ */ A("details", {
577
709
  className: "team-workspace-options",
578
710
  children: [
579
- /* @__PURE__ */ j("summary", { children: ["工作目录", x.sourcePath ? " · 已选择" : " · 可选"] }),
580
- /* @__PURE__ */ j("label", {
711
+ /* @__PURE__ */ A("summary", { children: ["工作目录", w.sourcePath ? " · 已选择" : " · 可选"] }),
712
+ /* @__PURE__ */ A("label", {
581
713
  className: "team-field",
582
- children: ["工作目录", /* @__PURE__ */ A("input", {
583
- value: x.sourcePath,
714
+ children: ["工作目录", /* @__PURE__ */ k("input", {
715
+ value: w.sourcePath,
584
716
  maxLength: 4096,
585
- onChange: (e) => T({ sourcePath: e.target.value }),
717
+ onChange: (e) => D({ sourcePath: e.target.value }),
586
718
  placeholder: "执行节点上的目录路径",
587
719
  disabled: W
588
720
  })]
589
721
  }),
590
- /* @__PURE__ */ j("label", {
722
+ /* @__PURE__ */ A("label", {
591
723
  className: "team-field",
592
- children: ["目录类型", /* @__PURE__ */ j("select", {
593
- value: x.mode,
594
- onChange: (e) => T({ mode: e.target.value }),
595
- children: [/* @__PURE__ */ A("option", {
724
+ children: ["目录类型", /* @__PURE__ */ A("select", {
725
+ value: w.mode,
726
+ onChange: (e) => D({ mode: e.target.value }),
727
+ children: [/* @__PURE__ */ k("option", {
596
728
  value: "auto",
597
729
  children: f ? "Git 仓库" : "自动识别 Git"
598
- }), /* @__PURE__ */ A("option", {
730
+ }), /* @__PURE__ */ k("option", {
599
731
  value: "directory",
600
732
  children: "普通目录,仅复制输入文件"
601
733
  })]
602
734
  })]
603
735
  }),
604
- x.mode === "auto" && /* @__PURE__ */ j("label", {
736
+ w.mode === "auto" && /* @__PURE__ */ A("label", {
605
737
  className: "team-field",
606
- children: ["Git 基线", /* @__PURE__ */ A("input", {
607
- value: x.baseRef,
738
+ children: ["Git 基线", /* @__PURE__ */ k("input", {
739
+ value: w.baseRef,
608
740
  maxLength: 256,
609
- onChange: (e) => T({ baseRef: e.target.value }),
741
+ onChange: (e) => D({ baseRef: e.target.value }),
610
742
  placeholder: f ? "完整 commit(40 或 64 位)" : "HEAD",
611
743
  disabled: W
612
744
  })]
613
745
  }),
614
- /* @__PURE__ */ j("label", {
746
+ /* @__PURE__ */ A("label", {
615
747
  className: "team-field",
616
- children: ["输入文件", /* @__PURE__ */ A("textarea", {
748
+ children: ["输入文件", /* @__PURE__ */ k("textarea", {
617
749
  rows: 2,
618
- value: x.inputs,
619
- onChange: (e) => T({ inputs: e.target.value }),
750
+ value: w.inputs,
751
+ onChange: (e) => D({ inputs: e.target.value }),
620
752
  placeholder: "每行一个相对路径(非 Git 目录)",
621
753
  disabled: W
622
754
  })]
623
755
  }),
624
- /* @__PURE__ */ j("p", { children: ["路径须在执行节点可访问。Git 使用提交版本,不带入未提交修改;普通目录只复制列出的输入文件。", f && "云端协作需填写固定 commit,并确保节点可访问相同版本。"] })
756
+ /* @__PURE__ */ A("p", { children: ["路径须在执行节点可访问。Git 使用提交版本,不带入未提交修改;普通目录只复制列出的输入文件。", f && "云端协作需填写固定 commit,并确保节点可访问相同版本。"] })
625
757
  ]
626
758
  })]
627
759
  })]
628
760
  }),
629
- !!I.length && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("label", {
761
+ !!I.length && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("label", {
630
762
  className: "team-sr-only",
631
- htmlFor: h,
763
+ htmlFor: g,
632
764
  children: "引用本群交付物"
633
- }), /* @__PURE__ */ j("select", {
634
- id: h,
765
+ }), /* @__PURE__ */ A("select", {
766
+ id: g,
635
767
  value: "",
636
768
  disabled: o || W || L.length >= 8,
637
769
  onChange: (e) => {
@@ -639,27 +771,27 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
639
771
  t && N((e) => e.includes(t) ? e : [...e, t]);
640
772
  },
641
773
  children: [
642
- /* @__PURE__ */ A("option", {
774
+ /* @__PURE__ */ k("option", {
643
775
  value: "",
644
776
  children: "引用交付物"
645
777
  }),
646
- /* @__PURE__ */ A("optgroup", {
778
+ /* @__PURE__ */ k("optgroup", {
647
779
  label: "当前任务",
648
- children: u.filter((e) => !O.includes(e.artifactId)).map((e) => /* @__PURE__ */ A("option", {
780
+ children: u.filter((e) => !j.includes(e.artifactId)).map((e) => /* @__PURE__ */ k("option", {
649
781
  value: e.artifactId,
650
782
  children: e.name
651
783
  }, e.artifactId))
652
784
  }),
653
- /* @__PURE__ */ A("optgroup", {
785
+ /* @__PURE__ */ k("optgroup", {
654
786
  label: "其他任务(显式引用)",
655
- children: d.filter((e) => !u.some((t) => t.artifactId === e.artifactId) && !O.includes(e.artifactId)).map((e) => /* @__PURE__ */ A("option", {
787
+ children: d.filter((e) => !u.some((t) => t.artifactId === e.artifactId) && !j.includes(e.artifactId)).map((e) => /* @__PURE__ */ k("option", {
656
788
  value: e.artifactId,
657
789
  children: e.name
658
790
  }, e.artifactId))
659
791
  })
660
792
  ]
661
793
  })] })
662
- ] }), /* @__PURE__ */ A("button", {
794
+ ] }), /* @__PURE__ */ k("button", {
663
795
  className: "team-button team-primary",
664
796
  type: "submit",
665
797
  disabled: o || W || ae || !r.trim() && !L.length,
@@ -668,15 +800,15 @@ function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabl
668
800
  })
669
801
  ]
670
802
  }),
671
- /* @__PURE__ */ A("p", {
803
+ /* @__PURE__ */ k("p", {
672
804
  className: "team-composer-help",
673
- children: ae ? n?.status === "cancel_requested" ? "正在停止任务 · 等待执行端确认" : "任务已结束 · 新建任务以继续协作" : /* @__PURE__ */ j(k, { children: ["Enter 发送 · Shift + Enter 换行", M ? " · 留言不会唤醒成员" : ""] })
805
+ children: ae ? n?.status === "cancel_requested" ? "正在停止任务 · 等待执行端确认" : "任务已结束 · 新建任务以继续协作" : /* @__PURE__ */ A(O, { children: ["Enter 发送 · Shift + Enter 换行", M ? " · 留言不会唤醒成员" : ""] })
674
806
  })
675
807
  ]
676
808
  });
677
809
  }
678
810
  function ne({ tasks: e, members: t, selectedTaskId: n, onSelect: r }) {
679
- return e.length ? /* @__PURE__ */ A("div", {
811
+ return e.length ? /* @__PURE__ */ k("div", {
680
812
  className: "team-task-board",
681
813
  children: [
682
814
  ["attention", "需处理"],
@@ -684,54 +816,54 @@ function ne({ tasks: e, members: t, selectedTaskId: n, onSelect: r }) {
684
816
  ["waiting", "等待"],
685
817
  ["done", "已完成"]
686
818
  ].map(([i, a]) => {
687
- let o = e.filter((e) => _(e) === i);
688
- return o.length ? /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h3", { children: [a, /* @__PURE__ */ A("span", { children: o.length })] }), o.map((e) => /* @__PURE__ */ j("button", {
819
+ let o = e.filter((e) => g(e) === i);
820
+ return o.length ? /* @__PURE__ */ A("section", { children: [/* @__PURE__ */ A("h3", { children: [a, /* @__PURE__ */ k("span", { children: o.length })] }), o.map((e) => /* @__PURE__ */ A("button", {
689
821
  className: "team-task-row",
690
822
  type: "button",
691
823
  onClick: () => r(e),
692
824
  "aria-pressed": n === e.taskId,
693
- children: [/* @__PURE__ */ j("span", {
825
+ children: [/* @__PURE__ */ A("span", {
694
826
  className: "team-task-row-main",
695
- children: [/* @__PURE__ */ A("strong", { children: e.title }), /* @__PURE__ */ A(B, { status: e.status })]
696
- }), /* @__PURE__ */ j("span", {
827
+ children: [/* @__PURE__ */ k("strong", { children: e.title }), /* @__PURE__ */ k(B, { status: e.status })]
828
+ }), /* @__PURE__ */ A("span", {
697
829
  className: "team-muted",
698
- children: [t.find((t) => t.memberId === e.ownerMemberId)?.name || "待分派", h(e) ? ` · ${h(e)}` : e.dependencies.length && e.status === "blocked" ? " · 等待前置任务验收" : ""]
830
+ children: [t.find((t) => t.memberId === e.ownerMemberId)?.name || "待分派", m(e) ? ` · ${m(e)}` : e.dependencies.length && e.status === "blocked" ? " · 等待前置任务验收" : ""]
699
831
  })]
700
832
  }, e.taskId))] }, i) : null;
701
833
  })
702
- }) : /* @__PURE__ */ j("div", {
834
+ }) : /* @__PURE__ */ A("div", {
703
835
  className: "team-panel-empty",
704
- children: [/* @__PURE__ */ A("h3", { children: "尚未分派任务" }), /* @__PURE__ */ A("p", { children: "Leader 建立任务后,负责人、依赖与验收进度会出现在这里。" })]
836
+ children: [/* @__PURE__ */ k("h3", { children: "尚未分派任务" }), /* @__PURE__ */ k("p", { children: "Leader 建立任务后,负责人、依赖与验收进度会出现在这里。" })]
705
837
  });
706
838
  }
707
839
  function W({ artifact: e, onOpen: t }) {
708
- let n = p(e.uri);
709
- return /* @__PURE__ */ j("div", {
840
+ let n = f(e.uri);
841
+ return /* @__PURE__ */ A("div", {
710
842
  className: "team-artifact",
711
- children: [t ? /* @__PURE__ */ A("button", {
843
+ children: [t ? /* @__PURE__ */ k("button", {
712
844
  className: "team-text-button",
713
845
  type: "button",
714
846
  onClick: () => t(e),
715
847
  children: e.name
716
- }) : n ? /* @__PURE__ */ A("a", {
848
+ }) : n ? /* @__PURE__ */ k("a", {
717
849
  href: n,
718
850
  target: "_blank",
719
851
  rel: "noopener noreferrer",
720
852
  children: e.name
721
- }) : /* @__PURE__ */ A("span", { children: e.name }), /* @__PURE__ */ j("small", { children: [e.mediaType, e.digest ? ` · ${e.digest.slice(0, 12)}` : ""] })]
853
+ }) : /* @__PURE__ */ k("span", { children: e.name }), /* @__PURE__ */ A("small", { children: [e.mediaType, e.digest ? ` · ${e.digest.slice(0, 12)}` : ""] })]
722
854
  });
723
855
  }
724
- function re({ task: e, members: t, onAction: n, onOpenArtifact: i, onMemberSelect: a }) {
725
- let [o, s] = D(""), [c, l] = D(!1), [u, d] = D(""), [f, p] = D(!1), [m, g] = D(""), _ = e.attempts.find((e) => e.attemptId === o) ?? e.attempts.at(-1), y = t.find((t) => t.memberId === e.ownerMemberId);
856
+ function re({ task: e, members: t, onAction: r, onOpenArtifact: i, onMemberSelect: a }) {
857
+ let [o, s] = E(""), [c, l] = E(!1), [u, d] = E(""), [f, p] = E(!1), [h, g] = E(""), v = e.attempts.find((e) => e.attemptId === o) ?? e.attempts.at(-1), y = t.find((t) => t.memberId === e.ownerMemberId);
726
858
  async function b(t) {
727
- if (!(!n || c)) {
728
- if (t === "reject" && !m.trim()) {
859
+ if (!(!r || c)) {
860
+ if (t === "reject" && !h.trim()) {
729
861
  d("请填写需要修改的内容。");
730
862
  return;
731
863
  }
732
864
  l(!0), d("");
733
865
  try {
734
- await n(e, t, t === "reject" ? m.trim() : void 0), p(!1);
866
+ await r(e, t, t === "reject" ? h.trim() : void 0), p(!1);
735
867
  } catch (e) {
736
868
  d(e instanceof Error ? e.message : "操作失败。");
737
869
  } finally {
@@ -739,84 +871,84 @@ function re({ task: e, members: t, onAction: n, onOpenArtifact: i, onMemberSelec
739
871
  }
740
872
  }
741
873
  }
742
- return /* @__PURE__ */ j("section", {
874
+ return /* @__PURE__ */ A("section", {
743
875
  className: "team-task-detail",
744
876
  children: [
745
- /* @__PURE__ */ A(B, { status: e.status }),
746
- /* @__PURE__ */ A("h3", { children: e.title }),
747
- y && /* @__PURE__ */ j("button", {
877
+ /* @__PURE__ */ k(B, { status: e.status }),
878
+ /* @__PURE__ */ k("h3", { children: e.title }),
879
+ y && /* @__PURE__ */ A("button", {
748
880
  className: "team-member-link",
749
881
  type: "button",
750
882
  onClick: () => a?.(y),
751
883
  disabled: !a,
752
884
  children: [
753
- /* @__PURE__ */ A(z, { name: y.name }),
885
+ /* @__PURE__ */ k(z, { name: y.name }),
754
886
  y.name,
755
- /* @__PURE__ */ A("span", { children: "查看执行" })
887
+ /* @__PURE__ */ k("span", { children: "查看执行" })
756
888
  ]
757
889
  }),
758
- /* @__PURE__ */ A("p", { children: e.description }),
759
- h(e) && /* @__PURE__ */ A("p", {
890
+ /* @__PURE__ */ k("p", { children: e.description }),
891
+ m(e) && /* @__PURE__ */ k("p", {
760
892
  className: "team-detail-reason",
761
- children: h(e)
893
+ children: m(e)
762
894
  }),
763
- /* @__PURE__ */ A("h4", { children: "验收要求" }),
764
- /* @__PURE__ */ A("p", { children: e.acceptanceCriteria || "等待确定验收要求" }),
765
- e.attempts.length > 1 && /* @__PURE__ */ j("label", {
895
+ /* @__PURE__ */ k("h4", { children: "验收要求" }),
896
+ /* @__PURE__ */ k("p", { children: e.acceptanceCriteria || "等待确定验收要求" }),
897
+ e.attempts.length > 1 && /* @__PURE__ */ A("label", {
766
898
  className: "team-field",
767
- children: ["执行记录", /* @__PURE__ */ A("select", {
768
- value: _?.attemptId,
899
+ children: ["执行记录", /* @__PURE__ */ k("select", {
900
+ value: v?.attemptId,
769
901
  onChange: (e) => s(e.target.value),
770
- children: e.attempts.map((e) => /* @__PURE__ */ j("option", {
902
+ children: e.attempts.map((e) => /* @__PURE__ */ A("option", {
771
903
  value: e.attemptId,
772
904
  children: [
773
905
  "第 ",
774
906
  e.attemptNumber,
775
907
  " 次执行 · ",
776
- v[e.status]
908
+ _[e.status]
777
909
  ]
778
910
  }, e.attemptId))
779
911
  })]
780
912
  }),
781
- _?.result && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("h4", { children: "交付结果" }), /* @__PURE__ */ A(r, { content: _.result })] }),
782
- _?.artifacts.map((e) => /* @__PURE__ */ A(W, {
913
+ v?.result && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("h4", { children: "交付结果" }), /* @__PURE__ */ k(n, { content: v.result })] }),
914
+ v?.artifacts.map((e) => /* @__PURE__ */ k(W, {
783
915
  artifact: e,
784
916
  onOpen: i
785
917
  }, e.artifactId)),
786
- f && /* @__PURE__ */ j("label", {
918
+ f && /* @__PURE__ */ A("label", {
787
919
  className: "team-field",
788
920
  children: [
789
921
  "修改意见",
790
- /* @__PURE__ */ A("textarea", {
922
+ /* @__PURE__ */ k("textarea", {
791
923
  rows: 3,
792
924
  maxLength: 2e3,
793
- value: m,
925
+ value: h,
794
926
  onChange: (e) => g(e.target.value)
795
927
  }),
796
- /* @__PURE__ */ A("button", {
928
+ /* @__PURE__ */ k("button", {
797
929
  className: "team-button",
798
930
  type: "button",
799
- disabled: c || !m.trim(),
931
+ disabled: c || !h.trim(),
800
932
  onClick: () => void b("reject"),
801
933
  children: "提交修改意见"
802
934
  })
803
935
  ]
804
936
  }),
805
- n && /* @__PURE__ */ j("div", {
937
+ r && /* @__PURE__ */ A("div", {
806
938
  className: "team-task-actions",
807
- children: [e.status === "awaiting_acceptance" && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
939
+ children: [e.status === "awaiting_acceptance" && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
808
940
  className: "team-button team-primary",
809
941
  type: "button",
810
942
  disabled: c,
811
943
  onClick: () => void b("accept"),
812
944
  children: "验收通过"
813
- }), /* @__PURE__ */ A("button", {
945
+ }), /* @__PURE__ */ k("button", {
814
946
  className: "team-button",
815
947
  type: "button",
816
948
  disabled: c,
817
949
  onClick: () => p(!0),
818
950
  children: "提出修改"
819
- })] }), ["failed", "cancelled"].includes(e.status) && /* @__PURE__ */ A("button", {
951
+ })] }), ["failed", "cancelled"].includes(e.status) && /* @__PURE__ */ k("button", {
820
952
  className: "team-button",
821
953
  type: "button",
822
954
  disabled: c,
@@ -824,7 +956,7 @@ function re({ task: e, members: t, onAction: n, onOpenArtifact: i, onMemberSelec
824
956
  children: "重新执行"
825
957
  })]
826
958
  }),
827
- u && /* @__PURE__ */ A("p", {
959
+ u && /* @__PURE__ */ k("p", {
828
960
  role: "alert",
829
961
  className: "team-inline-error",
830
962
  children: u
@@ -832,101 +964,101 @@ function re({ task: e, members: t, onAction: n, onOpenArtifact: i, onMemberSelec
832
964
  ]
833
965
  });
834
966
  }
835
- function ie({ interaction: e, member: t, onRespond: r }) {
836
- let [i, a] = D({}), [o, s] = D(!1), [c, l] = D(!1), [u, d] = D(""), f = E(null);
837
- async function p(t, n) {
838
- if (o || c) return;
967
+ function ie({ interaction: e, member: t, onRespond: n }) {
968
+ let [r, i] = E({}), [a, o] = E(!1), [s, c] = E(!1), [l, u] = E(""), d = T(null);
969
+ async function f(t, r) {
970
+ if (a || s) return;
839
971
  let i = JSON.stringify([
840
972
  t,
841
- n,
973
+ r,
842
974
  e.revision
843
975
  ]);
844
- f.current?.digest !== i && (f.current = {
976
+ d.current?.digest !== i && (d.current = {
845
977
  digest: i,
846
978
  idempotencyKey: F()
847
- }), s(!0), d("");
979
+ }), o(!0), u("");
848
980
  try {
849
- let i = await r({
981
+ let i = await n({
850
982
  ref: e.ref,
851
983
  expectedRevision: e.revision,
852
984
  action: t,
853
- response: n,
854
- idempotencyKey: f.current.idempotencyKey
985
+ response: r,
986
+ idempotencyKey: d.current.idempotencyKey
855
987
  });
856
988
  if (i?.status === "rejected" || i?.status === "uncertain") throw Error(i.reason || "审批结果尚未确认,请核对后重试。");
857
- l(!0);
989
+ c(!0);
858
990
  } catch (e) {
859
- d(e instanceof Error ? e.message : "审批提交失败。");
991
+ u(e instanceof Error ? e.message : "审批提交失败。");
860
992
  } finally {
861
- s(!1);
993
+ o(!1);
862
994
  }
863
995
  }
864
- return /* @__PURE__ */ j("article", {
996
+ return /* @__PURE__ */ A("article", {
865
997
  className: "team-interaction-card",
866
998
  children: [
867
- /* @__PURE__ */ j("span", {
999
+ /* @__PURE__ */ A("span", {
868
1000
  className: "team-eyebrow",
869
1001
  children: [t?.name || "成员", " · 需要你的确认"]
870
1002
  }),
871
- /* @__PURE__ */ A("h3", { children: e.title }),
872
- /* @__PURE__ */ A(M, { message: e.message }),
873
- c || e.status === "resolving" ? /* @__PURE__ */ A("p", {
1003
+ /* @__PURE__ */ k("h3", { children: e.title }),
1004
+ /* @__PURE__ */ k(j, { message: e.message }),
1005
+ s || e.status === "resolving" ? /* @__PURE__ */ k("p", {
874
1006
  role: "status",
875
1007
  children: "已提交,等待执行端确认"
876
- }) : e.kind === "input" && e.requestSchema ? /* @__PURE__ */ A(n, {
1008
+ }) : e.kind === "input" && e.requestSchema ? /* @__PURE__ */ k(N, {
877
1009
  schema: e.requestSchema,
878
- values: i,
879
- onChange: a,
880
- disabled: o,
881
- onSubmit: () => void p("submit", i),
882
- onCancel: () => void p("cancel", {})
883
- }) : /* @__PURE__ */ j("div", {
1010
+ values: r,
1011
+ onChange: i,
1012
+ disabled: a,
1013
+ onSubmit: () => void f("submit", r),
1014
+ onCancel: () => void f("cancel", {})
1015
+ }) : /* @__PURE__ */ A("div", {
884
1016
  className: "team-task-actions",
885
- children: [/* @__PURE__ */ A("button", {
1017
+ children: [/* @__PURE__ */ k("button", {
886
1018
  type: "button",
887
1019
  className: "team-button",
888
- disabled: o,
889
- onClick: () => void p("reject", { approved: !1 }),
1020
+ disabled: a,
1021
+ onClick: () => void f("reject", { approved: !1 }),
890
1022
  children: "拒绝"
891
- }), /* @__PURE__ */ A("button", {
1023
+ }), /* @__PURE__ */ k("button", {
892
1024
  type: "button",
893
1025
  className: "team-button team-primary",
894
- disabled: o,
895
- onClick: () => void p("approve", { approved: !0 }),
1026
+ disabled: a,
1027
+ onClick: () => void f("approve", { approved: !0 }),
896
1028
  children: "同意"
897
1029
  })]
898
1030
  }),
899
- u && /* @__PURE__ */ A("p", {
1031
+ l && /* @__PURE__ */ k("p", {
900
1032
  role: "alert",
901
1033
  className: "team-inline-error",
902
- children: u
1034
+ children: l
903
1035
  })
904
1036
  ]
905
1037
  });
906
1038
  }
907
1039
  function ae({ interactions: e, members: t, onRespond: n }) {
908
- return /* @__PURE__ */ A("section", {
1040
+ return /* @__PURE__ */ k("section", {
909
1041
  className: "team-interactions",
910
1042
  "aria-label": "团队审批与待处理输入",
911
- children: e.filter((e) => ["pending", "resolving"].includes(e.status)).map((e) => /* @__PURE__ */ A(ie, {
1043
+ children: e.filter((e) => ["pending", "resolving"].includes(e.status)).map((e) => /* @__PURE__ */ k(ie, {
912
1044
  interaction: e,
913
1045
  member: t.find((t) => t.memberId === e.ref.memberId),
914
1046
  onRespond: n
915
- }, i(e.ref)))
1047
+ }, r(e.ref)))
916
1048
  });
917
1049
  }
918
1050
  function oe({ members: e, selectedMemberId: t, onSelect: n }) {
919
- return /* @__PURE__ */ A("div", {
1051
+ return /* @__PURE__ */ k("div", {
920
1052
  className: "team-member-list",
921
- children: e.filter((e) => e.status !== "removed").map((e) => /* @__PURE__ */ j("button", {
1053
+ children: e.filter((e) => e.status !== "removed").map((e) => /* @__PURE__ */ A("button", {
922
1054
  type: "button",
923
1055
  className: "team-member-row",
924
1056
  onClick: () => n(e),
925
1057
  "aria-pressed": t === e.memberId,
926
1058
  children: [
927
- /* @__PURE__ */ A(z, { name: e.name }),
928
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ j("strong", { children: [e.name, /* @__PURE__ */ A("small", { children: e.role === "leader" ? "Leader" : "成员" })] }), /* @__PURE__ */ j("span", { children: [L[e.executionStatus], e.binding.kind === "local_build" ? " · 本地" : " · 云端"] })] }),
929
- /* @__PURE__ */ A("span", {
1059
+ /* @__PURE__ */ k(z, { name: e.name }),
1060
+ /* @__PURE__ */ A("span", { children: [/* @__PURE__ */ A("strong", { children: [e.name, /* @__PURE__ */ k("small", { children: e.role === "leader" ? "Leader" : "成员" })] }), /* @__PURE__ */ A("span", { children: [L[e.executionStatus], e.binding.kind === "local_build" ? " · 本地" : " · 云端"] })] }),
1061
+ /* @__PURE__ */ k("span", {
930
1062
  "aria-hidden": "true",
931
1063
  children: "→"
932
1064
  })
@@ -934,13 +1066,13 @@ function oe({ members: e, selectedMemberId: t, onSelect: n }) {
934
1066
  }, e.memberId))
935
1067
  });
936
1068
  }
937
- function G({ member: e, observation: t, onDirectedMessage: n, onRetry: i, onCancel: a, cancelPending: o = !1, cancelBusy: s = !1 }) {
938
- return /* @__PURE__ */ j("section", {
1069
+ function G({ member: e, observation: t, onDirectedMessage: r, onRetry: i, onCancel: a, cancelPending: o = !1, cancelBusy: s = !1 }) {
1070
+ return /* @__PURE__ */ A("section", {
939
1071
  className: "team-member-inspector",
940
1072
  children: [
941
- /* @__PURE__ */ j("div", {
1073
+ /* @__PURE__ */ A("div", {
942
1074
  className: "team-member-heading",
943
- children: [/* @__PURE__ */ A(z, { name: e.name }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", { children: e.name }), /* @__PURE__ */ j("span", {
1075
+ children: [/* @__PURE__ */ k(z, { name: e.name }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h3", { children: e.name }), /* @__PURE__ */ A("span", {
944
1076
  className: "team-muted",
945
1077
  children: [
946
1078
  e.role === "leader" ? "Leader" : "成员",
@@ -949,18 +1081,18 @@ function G({ member: e, observation: t, onDirectedMessage: n, onRetry: i, onCanc
949
1081
  ]
950
1082
  })] })]
951
1083
  }),
952
- e.responsibility && /* @__PURE__ */ A("p", {
1084
+ e.responsibility && /* @__PURE__ */ k("p", {
953
1085
  className: "team-member-responsibility",
954
1086
  children: e.responsibility
955
1087
  }),
956
- /* @__PURE__ */ j("div", {
1088
+ /* @__PURE__ */ A("div", {
957
1089
  className: "team-member-actions",
958
- children: [n && /* @__PURE__ */ A("button", {
1090
+ children: [r && /* @__PURE__ */ k("button", {
959
1091
  className: "team-button",
960
1092
  type: "button",
961
- onClick: n,
1093
+ onClick: r,
962
1094
  children: "在群内 @成员"
963
- }), a && e.binding.capabilities.cancel && e.activeRunId && /* @__PURE__ */ A("button", {
1095
+ }), a && e.binding.capabilities.cancel && e.activeRunId && /* @__PURE__ */ k("button", {
964
1096
  className: "team-button",
965
1097
  type: "button",
966
1098
  disabled: o || s,
@@ -968,48 +1100,48 @@ function G({ member: e, observation: t, onDirectedMessage: n, onRetry: i, onCanc
968
1100
  children: s ? "正在提交…" : o ? "已请求停止" : "请求停止此执行"
969
1101
  })]
970
1102
  }),
971
- /* @__PURE__ */ A("p", {
1103
+ /* @__PURE__ */ k("p", {
972
1104
  className: "team-observer-note",
973
1105
  children: "执行详情只读。关闭面板不会停止成员。"
974
1106
  }),
975
- t ? /* @__PURE__ */ j(k, { children: [
976
- /* @__PURE__ */ A("span", {
1107
+ t ? /* @__PURE__ */ A(O, { children: [
1108
+ /* @__PURE__ */ k("span", {
977
1109
  className: "team-connection",
978
1110
  role: "status",
979
1111
  children: R[t.connection]
980
1112
  }),
981
- t.error && /* @__PURE__ */ A("p", {
1113
+ t.error && /* @__PURE__ */ k("p", {
982
1114
  role: "alert",
983
1115
  className: "team-inline-error",
984
1116
  children: t.error
985
1117
  }),
986
- t.connection === "offline" && i && /* @__PURE__ */ A("button", {
1118
+ t.connection === "offline" && i && /* @__PURE__ */ k("button", {
987
1119
  className: "team-button",
988
1120
  type: "button",
989
1121
  onClick: i,
990
1122
  children: "重新连接"
991
1123
  }),
992
- /* @__PURE__ */ A("div", {
1124
+ /* @__PURE__ */ k("div", {
993
1125
  className: "team-member-transcript",
994
- children: t.items.filter((e) => e.visibility === "public" && !(e.kind === "progress" && Object.keys(e.payload).length === 0)).map((e) => /* @__PURE__ */ j("article", {
1126
+ children: t.items.filter((e) => e.visibility === "public" && !(e.kind === "progress" && Object.keys(e.payload).length === 0)).map((e) => /* @__PURE__ */ A("article", {
995
1127
  className: "team-observer-item",
996
- children: [/* @__PURE__ */ A("span", {
1128
+ children: [/* @__PURE__ */ k("span", {
997
1129
  className: "team-eyebrow",
998
1130
  children: e.kind === "assistant_text" ? "回复" : e.kind === "user_message" ? "输入" : e.kind === "tool_call" ? "工具调用" : e.kind === "reasoning" ? "执行思考" : e.kind
999
- }), typeof e.payload.text == "string" ? /* @__PURE__ */ A(r, { content: e.payload.text }) : typeof e.payload.error == "string" ? /* @__PURE__ */ A("p", {
1131
+ }), typeof e.payload.text == "string" ? /* @__PURE__ */ k(n, { content: e.payload.text }) : typeof e.payload.error == "string" ? /* @__PURE__ */ k("p", {
1000
1132
  className: "team-inline-error",
1001
1133
  children: e.payload.error
1002
- }) : /* @__PURE__ */ j("details", {
1134
+ }) : /* @__PURE__ */ A("details", {
1003
1135
  className: "team-observer-details",
1004
- children: [/* @__PURE__ */ A("summary", { children: String(e.payload.tool || e.payload.summary || e.payload.title || (e.kind === "tool_call" ? "查看工具结果" : "查看事件详情")) }), /* @__PURE__ */ A("pre", { children: JSON.stringify(e.payload, null, 2) })]
1136
+ children: [/* @__PURE__ */ k("summary", { children: String(e.payload.tool || e.payload.summary || e.payload.title || (e.kind === "tool_call" ? "查看工具结果" : "查看事件详情")) }), /* @__PURE__ */ k("pre", { children: JSON.stringify(e.payload, null, 2) })]
1005
1137
  })]
1006
1138
  }, e.itemId))
1007
1139
  }),
1008
- !t.items.length && /* @__PURE__ */ A("p", {
1140
+ !t.items.length && /* @__PURE__ */ k("p", {
1009
1141
  className: "team-muted",
1010
1142
  children: "尚无可展示的运行事件。"
1011
1143
  })
1012
- ] }) : /* @__PURE__ */ A("p", {
1144
+ ] }) : /* @__PURE__ */ k("p", {
1013
1145
  className: "team-muted",
1014
1146
  children: e.activeRunId ? "正在读取执行详情…" : "当前没有进行中的执行。"
1015
1147
  })
@@ -1017,26 +1149,26 @@ function G({ member: e, observation: t, onDirectedMessage: n, onRetry: i, onCanc
1017
1149
  });
1018
1150
  }
1019
1151
  function se(e) {
1020
- return e.snapshot ? /* @__PURE__ */ A(K, {
1152
+ return e.snapshot ? /* @__PURE__ */ k(K, {
1021
1153
  ...e,
1022
1154
  snapshot: e.snapshot
1023
- }, `${e.snapshot.group.authorityRef}:${e.snapshot.group.groupId}`) : /* @__PURE__ */ A("section", {
1155
+ }, `${e.snapshot.group.authorityRef}:${e.snapshot.group.groupId}`) : /* @__PURE__ */ k("section", {
1024
1156
  className: "ksadk-teams team-workspace",
1025
- children: e.loading ? /* @__PURE__ */ j("div", {
1157
+ children: e.loading ? /* @__PURE__ */ A("div", {
1026
1158
  className: "team-loading",
1027
1159
  role: "status",
1028
1160
  "aria-label": "正在加载群组",
1029
1161
  children: [
1030
- /* @__PURE__ */ A("span", {}),
1031
- /* @__PURE__ */ A("span", {}),
1032
- /* @__PURE__ */ A("span", {})
1162
+ /* @__PURE__ */ k("span", {}),
1163
+ /* @__PURE__ */ k("span", {}),
1164
+ /* @__PURE__ */ k("span", {})
1033
1165
  ]
1034
- }) : /* @__PURE__ */ j("div", {
1166
+ }) : /* @__PURE__ */ A("div", {
1035
1167
  className: "team-empty",
1036
1168
  children: [
1037
- /* @__PURE__ */ A("h2", { children: e.error ? "群组暂不可用" : "选择一个团队,开始协作" }),
1038
- /* @__PURE__ */ A("p", { children: e.error || "创建群组并选择 Leader,让各有所长的 Agent 共同完成目标。" }),
1039
- e.onRetry && /* @__PURE__ */ A("button", {
1169
+ /* @__PURE__ */ k("h2", { children: e.error ? "群组暂不可用" : "选择一个团队,开始协作" }),
1170
+ /* @__PURE__ */ k("p", { children: e.error || "创建群组并选择 Leader,让各有所长的 Agent 共同完成目标。" }),
1171
+ e.onRetry && /* @__PURE__ */ k("button", {
1040
1172
  type: "button",
1041
1173
  className: "team-button",
1042
1174
  onClick: e.onRetry,
@@ -1046,15 +1178,15 @@ function se(e) {
1046
1178
  })
1047
1179
  });
1048
1180
  }
1049
- function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange: i, initialDrafts: a, initialSelection: o, onSelectionChange: s, onSend: c, onRetry: l, error: u, onManage: d, serverAuthority: f, standbyCandidates: p, onConfigureStandby: h, onLoadReconciliation: v, onReconcile: b, onControl: x, onAcceptRun: C, onTaskAction: w, onRespondInteraction: T, onOpenArtifact: O, onMemberSelect: M, renderMember: P, onLoadExecution: F }) {
1050
- let [I, L] = D(a?.[o?.teamRunId || m(e)?.teamRunId || ""] || ""), [R, z] = D(""), [ie, se] = D(0), [K, q] = D(null), [J, Y] = D(!1), [ue, de] = D(o?.taskId ?? ""), [X, fe] = D(o?.teamRunId || m(e)?.teamRunId || ""), [pe, me] = D(!1), [he, ge] = D(""), [_e, ve] = D(), [Z, ye] = D(!1), [be, xe] = D(""), [Se, Ce] = D(!1), [we, Te] = D(""), Ee = E(null), De = E(null), Q = E(new Map(Object.entries(a || {}).map(([e, t]) => [e, {
1181
+ function K({ snapshot: e, connection: t = "connected", draft: r, onDraftChange: i, initialDrafts: a, initialSelection: o, onSelectionChange: s, onSend: c, onRetry: l, error: u, onManage: d, serverAuthority: f, standbyCandidates: m, onConfigureStandby: _, onLoadReconciliation: y, onReconcile: b, onControl: S, onAcceptRun: C, onTaskAction: w, onRespondInteraction: D, onOpenArtifact: j, onMemberSelect: N, renderMember: P, onLoadExecution: F }) {
1182
+ let [I, L] = E(a?.[o?.teamRunId || p(e)?.teamRunId || ""] || ""), [R, z] = E(""), [ie, se] = E(0), [K, q] = E(null), [J, Y] = E(!1), [ue, de] = E(o?.taskId ?? ""), [X, fe] = E(o?.teamRunId || p(e)?.teamRunId || ""), [pe, me] = E(!1), [he, ge] = E(""), [_e, ve] = E(), [Z, ye] = E(!1), [be, xe] = E(""), [Se, Ce] = E(!1), [we, Te] = E(""), Ee = T(null), De = T(null), Q = T(new Map(Object.entries(a || {}).map(([e, t]) => [e, {
1051
1183
  text: t,
1052
1184
  recipient: ""
1053
1185
  }]))), $ = e.teamRuns.find((e) => e.teamRunId === X) ?? null, Oe = !!(X && !$), ke = e.tasks.filter((e) => e.teamRunId === $?.teamRunId);
1054
- S(() => {
1186
+ x(() => {
1055
1187
  $ && me(!1);
1056
1188
  }, [$]);
1057
- let Ae = $ ? e.runMembers?.filter((e) => e.teamRunId === $.teamRunId) : void 0, je = $ && e.runMembers ? Ae || [] : e.members.filter((e) => e.status !== "removed"), Me = ke.find((e) => e.taskId === ue), Ne = je.find((e) => e.memberId === he), Pe = [...e.deliveries.filter((e) => e.teamRunId === $?.teamRunId).map((e) => e.runId), ...ke.flatMap((e) => e.attempts.map((e) => e.source?.runId))].filter(Boolean), Fe = !e.runMembers && e.teamRuns.length === 1, Ie = (e) => !!($ && (Pe.includes(e.runId) || Ae?.some((t) => t.sessionId === e.sessionId) || Fe && je.some((t) => t.sessionId === e.sessionId))), Le = e.interactions.filter((e) => Ie(e.ref)), Re = [...new Map([...(e.artifacts || []).filter((e) => Ie(e.source)), ...ke.flatMap((e) => e.attempts.flatMap((e) => e.artifacts))].filter((t) => t.source.groupId === e.group.groupId && t.source.authorityRef === e.group.authorityRef).map((e) => [e.artifactId, e])).values()], ze = Le.filter((e) => e.status === "pending").length + (($?.policy || e.group.policy)?.taskAcceptance === "leader" ? 0 : ke.filter((e) => _(e) === "attention").length), Be = n ?? I;
1189
+ let Ae = $ ? e.runMembers?.filter((e) => e.teamRunId === $.teamRunId) : void 0, je = $ && e.runMembers ? Ae || [] : e.members.filter((e) => e.status !== "removed"), Me = ke.find((e) => e.taskId === ue), Ne = je.find((e) => e.memberId === he), Pe = [...e.deliveries.filter((e) => e.teamRunId === $?.teamRunId).map((e) => e.runId), ...ke.flatMap((e) => e.attempts.map((e) => e.source?.runId))].filter(Boolean), Fe = !e.runMembers && e.teamRuns.length === 1, Ie = (e) => !!($ && (Pe.includes(e.runId) || Ae?.some((t) => t.sessionId === e.sessionId) || Fe && je.some((t) => t.sessionId === e.sessionId))), Le = e.interactions.filter((e) => Ie(e.ref)), Re = [...new Map([...(e.artifacts || []).filter((e) => Ie(e.source)), ...ke.flatMap((e) => e.attempts.flatMap((e) => e.artifacts))].filter((t) => t.source.groupId === e.group.groupId && t.source.authorityRef === e.group.authorityRef).map((e) => [e.artifactId, e])).values()], ze = Le.filter((e) => e.status === "pending").length + (($?.policy || e.group.policy)?.taskAcceptance === "leader" ? 0 : ke.filter((e) => g(e) === "attention").length), Be = r ?? I;
1058
1190
  function Ve(e) {
1059
1191
  L(e), i?.(e, X), Q.current.set(X, {
1060
1192
  text: e,
@@ -1088,16 +1220,16 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1088
1220
  z(e.memberId), q(null), Y(!1), se((e) => e + 1);
1089
1221
  }
1090
1222
  function qe(e) {
1091
- ve(void 0), ge(e.memberId), q("members"), M?.(e);
1223
+ ve(void 0), ge(e.memberId), q("members"), N?.(e);
1092
1224
  }
1093
- S(() => {
1225
+ x(() => {
1094
1226
  K && Ee.current?.focus();
1095
1227
  }, [K]);
1096
1228
  async function Je(e) {
1097
- if (!(!$ || !x || Z)) {
1229
+ if (!(!$ || !S || Z)) {
1098
1230
  ye(!0), xe("");
1099
1231
  try {
1100
- await x($, e);
1232
+ await S($, e);
1101
1233
  } catch (e) {
1102
1234
  xe(e instanceof Error ? e.message : "操作失败。");
1103
1235
  } finally {
@@ -1131,23 +1263,23 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1131
1263
  taskId: ""
1132
1264
  })), t;
1133
1265
  }
1134
- let Ze = $?.status === "awaiting_acceptance" && C && /* @__PURE__ */ j("section", {
1266
+ let Ze = $?.status === "awaiting_acceptance" && C && /* @__PURE__ */ A("section", {
1135
1267
  className: "team-final-delivery",
1136
1268
  "aria-label": "最终验收",
1137
1269
  children: [
1138
- /* @__PURE__ */ A("span", {
1270
+ /* @__PURE__ */ k("span", {
1139
1271
  className: "team-eyebrow",
1140
1272
  children: "团队已提交成果"
1141
1273
  }),
1142
- /* @__PURE__ */ A("h3", { children: "请确认这次交付" }),
1143
- $.result && /* @__PURE__ */ A("div", {
1274
+ /* @__PURE__ */ k("h3", { children: "请确认这次交付" }),
1275
+ $.result && /* @__PURE__ */ k("div", {
1144
1276
  className: "team-final-summary",
1145
- children: /* @__PURE__ */ A(r, { content: $.result })
1277
+ children: /* @__PURE__ */ k(n, { content: $.result })
1146
1278
  }),
1147
- /* @__PURE__ */ A("p", { children: "验收通过后完成任务;提出修改会交给 Leader 继续推进。" }),
1148
- Se && /* @__PURE__ */ j("label", {
1279
+ /* @__PURE__ */ k("p", { children: "验收通过后完成任务;提出修改会交给 Leader 继续推进。" }),
1280
+ Se && /* @__PURE__ */ A("label", {
1149
1281
  className: "team-field",
1150
- children: ["修改意见", /* @__PURE__ */ A("textarea", {
1282
+ children: ["修改意见", /* @__PURE__ */ k("textarea", {
1151
1283
  value: we,
1152
1284
  onChange: (e) => Te(e.target.value),
1153
1285
  placeholder: "哪些内容需要调整?期望是什么?",
@@ -1156,27 +1288,27 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1156
1288
  disabled: Z
1157
1289
  })]
1158
1290
  }),
1159
- /* @__PURE__ */ A("div", {
1291
+ /* @__PURE__ */ k("div", {
1160
1292
  className: "team-task-actions",
1161
- children: Se ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
1293
+ children: Se ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
1162
1294
  className: "team-button",
1163
1295
  type: "button",
1164
1296
  disabled: Z,
1165
1297
  onClick: () => Ce(!1),
1166
1298
  children: "取消修改"
1167
- }), /* @__PURE__ */ A("button", {
1299
+ }), /* @__PURE__ */ k("button", {
1168
1300
  className: "team-button team-primary",
1169
1301
  type: "button",
1170
1302
  disabled: Z || !we.trim(),
1171
1303
  onClick: () => void Ye(!1),
1172
1304
  children: "提交修改意见"
1173
- })] }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
1305
+ })] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
1174
1306
  className: "team-button",
1175
1307
  type: "button",
1176
1308
  disabled: Z,
1177
1309
  onClick: () => Ce(!0),
1178
1310
  children: "提出修改"
1179
- }), /* @__PURE__ */ A("button", {
1311
+ }), /* @__PURE__ */ k("button", {
1180
1312
  className: "team-button team-primary",
1181
1313
  type: "button",
1182
1314
  disabled: Z,
@@ -1184,72 +1316,72 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1184
1316
  children: "通过验收"
1185
1317
  })] })
1186
1318
  }),
1187
- be && /* @__PURE__ */ A("p", {
1319
+ be && /* @__PURE__ */ k("p", {
1188
1320
  role: "alert",
1189
1321
  className: "team-inline-error",
1190
1322
  children: be
1191
1323
  })
1192
1324
  ]
1193
1325
  });
1194
- return /* @__PURE__ */ j("section", {
1326
+ return /* @__PURE__ */ A("section", {
1195
1327
  className: "ksadk-teams team-workspace",
1196
1328
  "data-panel": K || "closed",
1197
1329
  "data-execution": J ? "open" : "closed",
1198
1330
  children: [
1199
- /* @__PURE__ */ A(H, {
1331
+ /* @__PURE__ */ k(H, {
1200
1332
  snapshot: e,
1201
1333
  connection: t,
1202
1334
  onProgress: () => We("tasks"),
1203
1335
  onMembers: () => We("members"),
1204
1336
  onManage: d
1205
1337
  }),
1206
- u && /* @__PURE__ */ j("div", {
1338
+ u && /* @__PURE__ */ A("div", {
1207
1339
  className: "team-top-error",
1208
1340
  role: "alert",
1209
- children: [u, l && /* @__PURE__ */ A("button", {
1341
+ children: [u, l && /* @__PURE__ */ k("button", {
1210
1342
  className: "team-text-button",
1211
1343
  type: "button",
1212
1344
  onClick: l,
1213
1345
  children: "重新连接"
1214
1346
  })]
1215
1347
  }),
1216
- /* @__PURE__ */ j("div", {
1348
+ /* @__PURE__ */ A("div", {
1217
1349
  className: "team-body",
1218
1350
  children: [
1219
- /* @__PURE__ */ j("nav", {
1351
+ /* @__PURE__ */ A("nav", {
1220
1352
  className: "team-run-directory",
1221
1353
  "aria-label": "团队任务",
1222
- children: [/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("h2", { children: "任务" }), /* @__PURE__ */ A("button", {
1354
+ children: [/* @__PURE__ */ A("header", { children: [/* @__PURE__ */ k("h2", { children: "任务" }), /* @__PURE__ */ k("button", {
1223
1355
  type: "button",
1224
1356
  className: "team-text-button",
1225
1357
  onClick: () => {
1226
1358
  He(""), se((e) => e + 1);
1227
1359
  },
1228
1360
  children: "+ 新任务"
1229
- })] }), /* @__PURE__ */ j("div", {
1361
+ })] }), /* @__PURE__ */ A("div", {
1230
1362
  className: "team-run-list",
1231
- children: [[...e.teamRuns].reverse().map((e) => /* @__PURE__ */ j("button", {
1363
+ children: [[...e.teamRuns].reverse().map((e) => /* @__PURE__ */ A("button", {
1232
1364
  type: "button",
1233
1365
  className: "team-run-item",
1234
1366
  "aria-current": e.teamRunId === X ? "page" : void 0,
1235
1367
  onClick: () => He(e.teamRunId),
1236
- children: [/* @__PURE__ */ A("strong", { children: e.goal }), /* @__PURE__ */ A(B, { status: e.status })]
1237
- }, e.teamRunId)), !e.teamRuns.length && /* @__PURE__ */ A("p", {
1368
+ children: [/* @__PURE__ */ k("strong", { children: e.goal }), /* @__PURE__ */ k(B, { status: e.status })]
1369
+ }, e.teamRunId)), !e.teamRuns.length && /* @__PURE__ */ k("p", {
1238
1370
  className: "team-muted",
1239
1371
  children: "每个目标是一个独立任务。"
1240
1372
  })]
1241
1373
  })]
1242
1374
  }),
1243
- /* @__PURE__ */ j("div", {
1375
+ /* @__PURE__ */ A("div", {
1244
1376
  className: "team-chat-pane",
1245
1377
  "aria-hidden": J || void 0,
1246
1378
  children: [
1247
- /* @__PURE__ */ j("header", {
1379
+ /* @__PURE__ */ A("header", {
1248
1380
  className: "team-task-heading",
1249
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("span", {
1381
+ children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("span", {
1250
1382
  className: "team-eyebrow",
1251
1383
  children: $ ? "当前任务" : "新的目标"
1252
- }), /* @__PURE__ */ A("h2", { children: $?.goal || (Oe ? pe ? "正在同步任务…" : "未找到所选任务" : "希望团队完成什么?") })] }), /* @__PURE__ */ A("button", {
1384
+ }), /* @__PURE__ */ k("h2", { children: $?.goal || (Oe ? pe ? "正在同步任务…" : "未找到所选任务" : "希望团队完成什么?") })] }), /* @__PURE__ */ k("button", {
1253
1385
  type: "button",
1254
1386
  className: "team-button",
1255
1387
  "aria-label": "查看任务详情",
@@ -1257,25 +1389,25 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1257
1389
  children: "详情"
1258
1390
  })]
1259
1391
  }),
1260
- /* @__PURE__ */ j("label", {
1392
+ /* @__PURE__ */ A("label", {
1261
1393
  className: "team-mobile-task-picker team-field",
1262
- children: ["切换任务", /* @__PURE__ */ j("select", {
1394
+ children: ["切换任务", /* @__PURE__ */ A("select", {
1263
1395
  value: X,
1264
1396
  onChange: (e) => He(e.target.value),
1265
- children: [/* @__PURE__ */ A("option", {
1397
+ children: [/* @__PURE__ */ k("option", {
1266
1398
  value: "",
1267
1399
  children: "+ 新任务"
1268
- }), e.teamRuns.map((e) => /* @__PURE__ */ A("option", {
1400
+ }), e.teamRuns.map((e) => /* @__PURE__ */ k("option", {
1269
1401
  value: e.teamRunId,
1270
1402
  children: e.goal
1271
1403
  }, e.teamRunId))]
1272
1404
  })]
1273
1405
  }),
1274
- /* @__PURE__ */ j(U, {
1275
- emptyState: Oe ? /* @__PURE__ */ j("div", {
1406
+ /* @__PURE__ */ A(U, {
1407
+ emptyState: Oe ? /* @__PURE__ */ A("div", {
1276
1408
  className: "team-empty",
1277
1409
  role: "status",
1278
- children: [/* @__PURE__ */ A("p", { children: pe ? "正在读取刚创建的任务,消息已提交。" : "请从任务列表重新选择;当前输入不会发送到其他任务。" }), l && /* @__PURE__ */ A("button", {
1410
+ children: [/* @__PURE__ */ k("p", { children: pe ? "正在读取刚创建的任务,消息已提交。" : "请从任务列表重新选择;当前输入不会发送到其他任务。" }), l && /* @__PURE__ */ k("button", {
1279
1411
  className: "team-button",
1280
1412
  type: "button",
1281
1413
  onClick: l,
@@ -1284,7 +1416,7 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1284
1416
  }) : void 0,
1285
1417
  focusFinalDelivery: Ze ? $?.teamRunId : void 0,
1286
1418
  messages: e.messages.filter((e) => $ ? e.teamRunId === $.teamRunId || Fe && !e.teamRunId : !1),
1287
- children: [$ && /* @__PURE__ */ A(ee, {
1419
+ children: [$ && /* @__PURE__ */ k(ee, {
1288
1420
  compact: !0,
1289
1421
  run: $,
1290
1422
  tasks: ke,
@@ -1292,20 +1424,20 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1292
1424
  onOpen: () => We("tasks")
1293
1425
  }), Ze]
1294
1426
  }, X),
1295
- ze > 0 && /* @__PURE__ */ j("button", {
1427
+ ze > 0 && /* @__PURE__ */ A("button", {
1296
1428
  type: "button",
1297
1429
  className: "team-attention-banner",
1298
1430
  onClick: () => We("tasks"),
1299
1431
  children: [
1300
1432
  ze,
1301
1433
  " 项需要处理 ",
1302
- /* @__PURE__ */ j("span", { children: ["查看 ", /* @__PURE__ */ A("span", {
1434
+ /* @__PURE__ */ A("span", { children: ["查看 ", /* @__PURE__ */ k("span", {
1303
1435
  "aria-hidden": "true",
1304
1436
  children: "→"
1305
1437
  })] })
1306
1438
  ]
1307
1439
  }),
1308
- /* @__PURE__ */ A(te, {
1440
+ /* @__PURE__ */ k(te, {
1309
1441
  serverAuthority: f,
1310
1442
  referenceArtifacts: [...new Map([...e.artifacts || [], ...e.tasks.flatMap((e) => e.attempts.flatMap((e) => e.artifacts))].filter((t) => t.source.groupId === e.group.groupId && t.source.authorityRef === e.group.authorityRef).map((e) => [e.artifactId, e])).values()],
1311
1443
  artifacts: Re,
@@ -1321,7 +1453,7 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1321
1453
  })
1322
1454
  ]
1323
1455
  }),
1324
- K && /* @__PURE__ */ j("aside", {
1456
+ K && /* @__PURE__ */ A("aside", {
1325
1457
  className: "team-sidepanel",
1326
1458
  ref: Ee,
1327
1459
  tabIndex: -1,
@@ -1330,22 +1462,22 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1330
1462
  e.key === "Escape" && (e.stopPropagation(), Ge());
1331
1463
  },
1332
1464
  children: [
1333
- /* @__PURE__ */ j("header", {
1465
+ /* @__PURE__ */ A("header", {
1334
1466
  className: "team-panel-header",
1335
- children: [/* @__PURE__ */ A("nav", {
1467
+ children: [/* @__PURE__ */ k("nav", {
1336
1468
  className: "team-detail-tabs",
1337
1469
  "aria-label": "任务详情分类",
1338
1470
  children: [
1339
1471
  ["tasks", "进度"],
1340
1472
  ["members", "成员"],
1341
1473
  ["artifacts", "交付物"]
1342
- ].map(([e, t]) => /* @__PURE__ */ A("button", {
1474
+ ].map(([e, t]) => /* @__PURE__ */ k("button", {
1343
1475
  type: "button",
1344
1476
  "aria-pressed": K === e,
1345
1477
  onClick: () => We(e),
1346
1478
  children: t
1347
1479
  }, e))
1348
- }), /* @__PURE__ */ A("button", {
1480
+ }), /* @__PURE__ */ k("button", {
1349
1481
  type: "button",
1350
1482
  className: "team-button team-icon-button",
1351
1483
  "aria-label": "关闭详情",
@@ -1353,24 +1485,24 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1353
1485
  children: "×"
1354
1486
  })]
1355
1487
  }),
1356
- /* @__PURE__ */ A("div", {
1488
+ /* @__PURE__ */ k("div", {
1357
1489
  className: "team-panel-scroll",
1358
- children: K === "tasks" ? /* @__PURE__ */ j(k, { children: [
1359
- $ && /* @__PURE__ */ j("div", {
1490
+ children: K === "tasks" ? /* @__PURE__ */ A(O, { children: [
1491
+ $ && /* @__PURE__ */ A("div", {
1360
1492
  className: "team-run-overview",
1361
1493
  children: [
1362
- /* @__PURE__ */ A(B, { status: $.status }),
1363
- /* @__PURE__ */ A(V, { goal: $.goal }),
1364
- $.reason && /* @__PURE__ */ A("p", { children: $.reason }),
1365
- x && g($.status) && /* @__PURE__ */ j("div", {
1494
+ /* @__PURE__ */ k(B, { status: $.status }),
1495
+ /* @__PURE__ */ k(V, { goal: $.goal }),
1496
+ $.reason && /* @__PURE__ */ k("p", { children: $.reason }),
1497
+ S && h($.status) && /* @__PURE__ */ A("div", {
1366
1498
  className: "team-run-actions",
1367
- children: [/* @__PURE__ */ A("button", {
1499
+ children: [/* @__PURE__ */ k("button", {
1368
1500
  className: "team-text-button",
1369
1501
  type: "button",
1370
1502
  disabled: Z || $.status === "cancel_requested",
1371
1503
  onClick: () => void Je($.dispatchSuspended ? "resume_dispatch" : "suspend_dispatch"),
1372
1504
  children: $.dispatchSuspended ? "继续协作" : "暂停派发"
1373
- }), /* @__PURE__ */ A("button", {
1505
+ }), /* @__PURE__ */ k("button", {
1374
1506
  className: "team-text-button team-danger",
1375
1507
  type: "button",
1376
1508
  disabled: Z || $.status === "cancel_requested",
@@ -1378,77 +1510,77 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1378
1510
  children: "停止任务"
1379
1511
  })]
1380
1512
  }),
1381
- be && !Ze && /* @__PURE__ */ A("p", {
1513
+ be && !Ze && /* @__PURE__ */ k("p", {
1382
1514
  role: "alert",
1383
1515
  className: "team-inline-error",
1384
1516
  children: be
1385
1517
  }),
1386
- /* @__PURE__ */ A(ce, {
1518
+ /* @__PURE__ */ k(ce, {
1387
1519
  run: $,
1388
1520
  enabled: f,
1389
- candidates: p || [],
1390
- configure: h
1521
+ candidates: m || [],
1522
+ configure: _
1391
1523
  }),
1392
- /* @__PURE__ */ A(N, {
1524
+ /* @__PURE__ */ k(M, {
1393
1525
  run: $,
1394
- onLoadReconciliation: v,
1526
+ onLoadReconciliation: y,
1395
1527
  onReconcile: b
1396
1528
  }, $.teamRunId),
1397
- /* @__PURE__ */ j("details", {
1529
+ /* @__PURE__ */ A("details", {
1398
1530
  className: "team-run-budget",
1399
- children: [/* @__PURE__ */ A("summary", { children: "执行限额" }), /* @__PURE__ */ j("dl", { children: [
1400
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "累计启动" }), /* @__PURE__ */ j("dd", { children: [
1531
+ children: [/* @__PURE__ */ k("summary", { children: "执行限额" }), /* @__PURE__ */ A("dl", { children: [
1532
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", { children: "累计启动" }), /* @__PURE__ */ A("dd", { children: [
1401
1533
  $.budget.startsUsed,
1402
1534
  " / ",
1403
1535
  $.budget.maxStarts
1404
1536
  ] })] }),
1405
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "同时执行" }), /* @__PURE__ */ j("dd", { children: [
1537
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", { children: "同时执行" }), /* @__PURE__ */ A("dd", { children: [
1406
1538
  "最多 ",
1407
1539
  $.budget.maxConcurrent,
1408
1540
  " 个"
1409
1541
  ] })] }),
1410
- $.budget.maxTokens && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Token" }), /* @__PURE__ */ j("dd", { children: [
1542
+ $.budget.maxTokens && /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", { children: "Token" }), /* @__PURE__ */ A("dd", { children: [
1411
1543
  $.budget.tokensUsed ?? 0,
1412
1544
  " / ",
1413
1545
  $.budget.maxTokens
1414
1546
  ] })] }),
1415
- $.budget.maxDurationSeconds && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "主动执行时限" }), /* @__PURE__ */ j("dd", { children: [Math.round($.budget.maxDurationSeconds / 60), " 分钟"] })] })
1547
+ $.budget.maxDurationSeconds && /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", { children: "主动执行时限" }), /* @__PURE__ */ A("dd", { children: [Math.round($.budget.maxDurationSeconds / 60), " 分钟"] })] })
1416
1548
  ] })]
1417
1549
  })
1418
1550
  ]
1419
1551
  }),
1420
- T && /* @__PURE__ */ A(ae, {
1552
+ D && /* @__PURE__ */ k(ae, {
1421
1553
  interactions: Le,
1422
1554
  members: je,
1423
- onRespond: T
1555
+ onRespond: D
1424
1556
  }),
1425
- Me ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
1557
+ Me ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
1426
1558
  className: "team-text-button team-back",
1427
1559
  type: "button",
1428
1560
  onClick: () => Ue(""),
1429
1561
  children: "← 所有分工"
1430
- }), /* @__PURE__ */ A(re, {
1562
+ }), /* @__PURE__ */ k(re, {
1431
1563
  task: Me,
1432
1564
  members: je,
1433
1565
  onAction: ($?.policy || e.group.policy)?.taskAcceptance === "leader" ? void 0 : w,
1434
- onOpenArtifact: O,
1566
+ onOpenArtifact: j,
1435
1567
  onMemberSelect: qe
1436
- }, Me.taskId)] }) : /* @__PURE__ */ A(ne, {
1568
+ }, Me.taskId)] }) : /* @__PURE__ */ k(ne, {
1437
1569
  tasks: ke,
1438
1570
  members: je,
1439
1571
  selectedTaskId: ue,
1440
1572
  onSelect: (e) => Ue(e.taskId)
1441
1573
  })
1442
- ] }) : K === "artifacts" ? /* @__PURE__ */ j("section", {
1574
+ ] }) : K === "artifacts" ? /* @__PURE__ */ A("section", {
1443
1575
  className: "team-artifact-list",
1444
- children: [/* @__PURE__ */ A("h3", { children: "任务交付物" }), Re.length ? Re.map((e) => /* @__PURE__ */ A(W, {
1576
+ children: [/* @__PURE__ */ k("h3", { children: "任务交付物" }), Re.length ? Re.map((e) => /* @__PURE__ */ k(W, {
1445
1577
  artifact: e,
1446
- onOpen: O
1447
- }, e.artifactId)) : /* @__PURE__ */ A("p", {
1578
+ onOpen: j
1579
+ }, e.artifactId)) : /* @__PURE__ */ k("p", {
1448
1580
  className: "team-muted",
1449
1581
  children: "成员发布的成果会保存在这里。"
1450
1582
  })]
1451
- }) : Ne ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
1583
+ }) : Ne ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
1452
1584
  className: "team-text-button team-back",
1453
1585
  type: "button",
1454
1586
  onClick: () => ge(""),
@@ -1456,22 +1588,22 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1456
1588
  }), P?.(Ne, {
1457
1589
  directedMessage: () => Ke(Ne),
1458
1590
  teamRunId: $?.teamRunId
1459
- }, _e) ?? /* @__PURE__ */ A(G, {
1591
+ }, _e) ?? /* @__PURE__ */ k(G, {
1460
1592
  member: Ne,
1461
1593
  onDirectedMessage: () => Ke(Ne)
1462
- })] }) : /* @__PURE__ */ A(oe, {
1594
+ })] }) : /* @__PURE__ */ k(oe, {
1463
1595
  members: je,
1464
1596
  selectedMemberId: he,
1465
1597
  onSelect: qe
1466
1598
  })
1467
1599
  }),
1468
- K === "tasks" && (ke.length > 0 || !!(F && $)) && /* @__PURE__ */ A("footer", {
1600
+ K === "tasks" && (ke.length > 0 || !!(F && $)) && /* @__PURE__ */ k("footer", {
1469
1601
  className: "team-panel-footer",
1470
- children: /* @__PURE__ */ j("button", {
1602
+ children: /* @__PURE__ */ A("button", {
1471
1603
  className: "team-button team-expand",
1472
1604
  type: "button",
1473
1605
  onClick: () => Y(!0),
1474
- children: ["查看执行详情 ", /* @__PURE__ */ A("span", {
1606
+ children: ["查看执行详情 ", /* @__PURE__ */ k("span", {
1475
1607
  "aria-hidden": "true",
1476
1608
  children: "↗"
1477
1609
  })]
@@ -1479,28 +1611,28 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1479
1611
  })
1480
1612
  ]
1481
1613
  }),
1482
- J && /* @__PURE__ */ j("section", {
1614
+ J && /* @__PURE__ */ A("section", {
1483
1615
  className: "team-execution-workspace",
1484
1616
  "aria-label": "执行工作台",
1485
- children: [/* @__PURE__ */ j("header", {
1617
+ children: [/* @__PURE__ */ A("header", {
1486
1618
  className: "team-panel-header",
1487
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("span", {
1619
+ children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("span", {
1488
1620
  className: "team-eyebrow",
1489
1621
  children: "执行详情"
1490
- }), /* @__PURE__ */ A("h2", { children: $?.goal })] }), /* @__PURE__ */ A("button", {
1622
+ }), /* @__PURE__ */ k("h2", { children: $?.goal })] }), /* @__PURE__ */ k("button", {
1491
1623
  className: "team-button",
1492
1624
  type: "button",
1493
1625
  onClick: () => Y(!1),
1494
1626
  children: "返回聊天"
1495
1627
  })]
1496
- }), /* @__PURE__ */ A(y, {
1497
- fallback: /* @__PURE__ */ j("div", {
1628
+ }), /* @__PURE__ */ k(v, {
1629
+ fallback: /* @__PURE__ */ A("div", {
1498
1630
  className: "team-loading",
1499
1631
  role: "status",
1500
1632
  "aria-label": "正在加载执行视图",
1501
- children: [/* @__PURE__ */ A("span", {}), /* @__PURE__ */ A("span", {})]
1633
+ children: [/* @__PURE__ */ k("span", {}), /* @__PURE__ */ k("span", {})]
1502
1634
  }),
1503
- children: /* @__PURE__ */ A(le, {
1635
+ children: /* @__PURE__ */ k(le, {
1504
1636
  authorityRef: e.group.authorityRef,
1505
1637
  groupId: e.group.groupId,
1506
1638
  teamRunId: $?.teamRunId || "",
@@ -1524,8 +1656,8 @@ function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange:
1524
1656
  });
1525
1657
  }
1526
1658
  function ce({ run: e, enabled: t, candidates: n, configure: r }) {
1527
- let [i, a] = D(e.leaderStandby?.standbyBindingRef || ""), [o, s] = D(!1), [c, l] = D(""), [u, d] = D(e.leaderStandby), f = n.filter((e) => e.kind !== "local_build" && ["ready", "unchecked"].includes(e.availability?.state || "") && e.capabilities.leader && e.capabilities.enqueue);
1528
- if (S(() => {
1659
+ let [i, a] = E(e.leaderStandby?.standbyBindingRef || ""), [o, s] = E(!1), [c, l] = E(""), [u, d] = E(e.leaderStandby), f = n.filter((e) => e.kind !== "local_build" && ["ready", "unchecked"].includes(e.availability?.state || "") && e.capabilities.leader && e.capabilities.enqueue);
1660
+ if (x(() => {
1529
1661
  a(e.leaderStandby?.standbyBindingRef || ""), l(""), d(e.leaderStandby);
1530
1662
  }, [e.teamRunId, e.leaderStandby]), !t || !r || !f.length && !u) return null;
1531
1663
  async function p() {
@@ -1540,11 +1672,11 @@ function ce({ run: e, enabled: t, candidates: n, configure: r }) {
1540
1672
  }
1541
1673
  }
1542
1674
  }
1543
- return /* @__PURE__ */ j("details", {
1675
+ return /* @__PURE__ */ A("details", {
1544
1676
  className: "team-run-budget team-standby",
1545
1677
  children: [
1546
- /* @__PURE__ */ j("summary", { children: ["云端接管设置", u?.state === "active" ? " · 已接管" : u?.state === "blocked" ? " · 等待恢复" : ""] }),
1547
- u && /* @__PURE__ */ A("p", {
1678
+ /* @__PURE__ */ A("summary", { children: ["云端接管设置", u?.state === "active" ? " · 已接管" : u?.state === "blocked" ? " · 等待恢复" : ""] }),
1679
+ u && /* @__PURE__ */ k("p", {
1548
1680
  role: "status",
1549
1681
  children: u.state === "active" ? "云端 Leader 已接管当前任务。" : u.state === "armed" ? "兼容的备用节点已配置;接管前会保存进度并核对原执行。" : {
1550
1682
  standby_offline: "云端备用节点离线,正在等待恢复。",
@@ -1552,24 +1684,24 @@ function ce({ run: e, enabled: t, candidates: n, configure: r }) {
1552
1684
  execution_uncertain: "正在核对原执行结果,避免重复执行。"
1553
1685
  }[u.reason || ""] || "暂时无法接管,请检查执行状态。"
1554
1686
  }),
1555
- g(e.status) && !!f.length && /* @__PURE__ */ j(k, { children: [
1556
- /* @__PURE__ */ j("label", {
1687
+ h(e.status) && !!f.length && /* @__PURE__ */ A(O, { children: [
1688
+ /* @__PURE__ */ A("label", {
1557
1689
  className: "team-field",
1558
- children: ["Leader 备用节点", /* @__PURE__ */ j("select", {
1690
+ children: ["Leader 备用节点", /* @__PURE__ */ A("select", {
1559
1691
  value: i,
1560
1692
  onChange: (e) => a(e.target.value),
1561
1693
  disabled: o,
1562
- children: [/* @__PURE__ */ A("option", {
1694
+ children: [/* @__PURE__ */ k("option", {
1563
1695
  value: "",
1564
1696
  children: "选择云端节点,保存时检查"
1565
- }), f.map((e) => /* @__PURE__ */ A("option", {
1697
+ }), f.map((e) => /* @__PURE__ */ k("option", {
1566
1698
  value: e.bindingRef,
1567
1699
  children: e.name || e.agentId
1568
1700
  }, e.bindingRef))]
1569
1701
  })]
1570
1702
  }),
1571
- /* @__PURE__ */ A("p", { children: "本地 Leader 失联后由备用节点继续。新任务沿用此配置;本地恢复时不抢回当前任务。" }),
1572
- /* @__PURE__ */ A("button", {
1703
+ /* @__PURE__ */ k("p", { children: "本地 Leader 失联后由备用节点继续。新任务沿用此配置;本地恢复时不抢回当前任务。" }),
1704
+ /* @__PURE__ */ k("button", {
1573
1705
  type: "button",
1574
1706
  className: "team-button",
1575
1707
  disabled: o || !i,
@@ -1577,7 +1709,7 @@ function ce({ run: e, enabled: t, candidates: n, configure: r }) {
1577
1709
  children: o ? "正在校验…" : "配置备用节点"
1578
1710
  })
1579
1711
  ] }),
1580
- c && /* @__PURE__ */ A("p", {
1712
+ c && /* @__PURE__ */ k("p", {
1581
1713
  role: "alert",
1582
1714
  className: "team-inline-error",
1583
1715
  children: c
@@ -1586,12 +1718,12 @@ function ce({ run: e, enabled: t, candidates: n, configure: r }) {
1586
1718
  });
1587
1719
  }
1588
1720
  function le({ authorityRef: e, groupId: t, teamRunId: n, watermark: r, load: i, ...a }) {
1589
- let o = E(i), s = !!i;
1590
- S(() => {
1721
+ let o = T(i), s = !!i;
1722
+ x(() => {
1591
1723
  o.current = i;
1592
1724
  }, [i]);
1593
- let [c, l] = D(null), [u, d] = D(""), [f, p] = D(!!i), [m, h] = D(0);
1594
- return S(() => {
1725
+ let [c, l] = E(null), [u, d] = E(""), [f, p] = E(!!i), [m, h] = E(0);
1726
+ return x(() => {
1595
1727
  if (!o.current || !n) return;
1596
1728
  let r = new AbortController();
1597
1729
  return o.current(n, r.signal).then((i) => {
@@ -1611,7 +1743,7 @@ function le({ authorityRef: e, groupId: t, teamRunId: n, watermark: r, load: i,
1611
1743
  r,
1612
1744
  m,
1613
1745
  s
1614
- ]), /* @__PURE__ */ A(P, {
1746
+ ]), /* @__PURE__ */ k(P, {
1615
1747
  ...a,
1616
1748
  execution: c,
1617
1749
  executionLoading: f,
@@ -1631,16 +1763,16 @@ function Y(e) {
1631
1763
  }
1632
1764
  //#endregion
1633
1765
  //#region src/components/teams/CreateGroupDialog.tsx
1634
- function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i, onRefresh: a, hasMore: o, onLoadMore: s, onClose: c, onCreate: u }) {
1635
- let d = E(null), f = C(), [p, m] = D(""), [h, g] = D(""), [_, v] = D([]), [y, b] = D(""), [x, w] = D(""), [T, O] = D(!1), [k, M] = D(""), N = E(null), P = (e) => !!(n && e.binding.availability?.state === "unchecked"), F = (e) => J(e) || P(e), I = (e) => F(e) && (e.binding.capabilities.leader || P(e)), L = _.map((e) => {
1766
+ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i, onRefresh: a, hasMore: o, onLoadMore: s, onClose: l, onCreate: u }) {
1767
+ let d = T(null), f = S(), [p, m] = E(""), [h, g] = E(""), [_, v] = E([]), [y, b] = E(""), [C, w] = E(""), [D, O] = E(!1), [j, M] = E(""), N = T(null), P = (e) => !!(n && e.binding.availability?.state === "unchecked"), F = (e) => J(e) || P(e), I = (e) => F(e) && (e.binding.capabilities.leader || P(e)), L = _.map((e) => {
1636
1768
  let n = t.find((t) => t.binding.bindingRef === e.binding.bindingRef);
1637
1769
  return n ? {
1638
1770
  ...n,
1639
1771
  memberId: e.memberId,
1640
1772
  responsibility: e.responsibility
1641
1773
  } : e;
1642
- }), R = L.filter(I), z = R.some((e) => e.memberId === y) ? y : R[0]?.memberId ?? "", B = L.find((e) => e.memberId === z)?.binding.kind === "local_build", V = t.filter((e) => e.binding.kind === "cloud" && I(e)), H = V.some((e) => e.binding.bindingRef === x) ? x : "", U = Y(t).map((e) => e.sort((e, t) => Number(F(t)) - Number(F(e)))).filter((e) => e.some((e) => `${e.name} ${e.description || ""} ${e.binding.agentId}`.toLowerCase().includes(h.toLowerCase())));
1643
- S(() => {
1774
+ }), R = L.filter(I), z = R.some((e) => e.memberId === y) ? y : R[0]?.memberId ?? "", B = L.find((e) => e.memberId === z)?.binding.kind === "local_build", V = t.filter((e) => e.binding.kind === "cloud" && I(e)), H = V.some((e) => e.binding.bindingRef === C) ? C : "", U = Y(t).map((e) => e.sort((e, t) => Number(F(t)) - Number(F(e)))).filter((e) => e.some((e) => `${e.name} ${e.description || ""} ${e.binding.agentId}`.toLowerCase().includes(h.toLowerCase())));
1775
+ x(() => {
1644
1776
  let t = d.current;
1645
1777
  if (!t) return;
1646
1778
  let n = document.activeElement;
@@ -1652,7 +1784,7 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1652
1784
  v((n) => t ? [...n, e] : n.filter((t) => q(t) !== q(e)));
1653
1785
  }
1654
1786
  async function te() {
1655
- if (T || r) return;
1787
+ if (D || r) return;
1656
1788
  M("");
1657
1789
  let e = {
1658
1790
  name: p.trim(),
@@ -1666,7 +1798,7 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1666
1798
  ...n && B && H ? { leaderStandbyBindingRef: H } : {}
1667
1799
  };
1668
1800
  try {
1669
- if (l(e), L.length < 2) throw Error("请选择至少 2 位成员,一起组成团队。");
1801
+ if (c(e), L.length < 2) throw Error("请选择至少 2 位成员,一起组成团队。");
1670
1802
  if (L.some((e) => !t.some((t) => t.binding.bindingRef === e.binding.bindingRef && F(t)))) throw Error("已选成员中有 Agent 暂不可用,请更换版本或移除后重试。");
1671
1803
  if (!z) throw Error("所选成员中至少需要一位支持 Leader 的 Agent。");
1672
1804
  } catch (e) {
@@ -1682,69 +1814,69 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1682
1814
  await u({
1683
1815
  ...e,
1684
1816
  idempotencyKey: N.current.idempotencyKey
1685
- }), m(""), g(""), v([]), b(""), w(""), N.current = null, c();
1817
+ }), m(""), g(""), v([]), b(""), w(""), N.current = null, l();
1686
1818
  } catch (e) {
1687
1819
  M(e instanceof Error ? e.message : "创建团队失败,已保留你的选择。");
1688
1820
  } finally {
1689
1821
  O(!1);
1690
1822
  }
1691
1823
  }
1692
- return /* @__PURE__ */ A("dialog", {
1824
+ return /* @__PURE__ */ k("dialog", {
1693
1825
  ref: d,
1694
1826
  className: "ksadk-teams team-create-dialog",
1695
1827
  "aria-labelledby": f,
1696
1828
  onCancel: (e) => {
1697
- e.preventDefault(), T || c();
1829
+ e.preventDefault(), D || l();
1698
1830
  },
1699
- children: /* @__PURE__ */ j("form", {
1831
+ children: /* @__PURE__ */ A("form", {
1700
1832
  onSubmit: (e) => {
1701
1833
  e.preventDefault(), te();
1702
1834
  },
1703
1835
  children: [
1704
- /* @__PURE__ */ j("header", { children: [/* @__PURE__ */ j("div", { children: [
1705
- /* @__PURE__ */ A("span", {
1836
+ /* @__PURE__ */ A("header", { children: [/* @__PURE__ */ A("div", { children: [
1837
+ /* @__PURE__ */ k("span", {
1706
1838
  className: "team-eyebrow",
1707
1839
  children: "新的协作空间"
1708
1840
  }),
1709
- /* @__PURE__ */ A("h2", {
1841
+ /* @__PURE__ */ k("h2", {
1710
1842
  id: f,
1711
1843
  children: "组建团队"
1712
1844
  }),
1713
- /* @__PURE__ */ A("p", { children: "选择搭档,让 Leader 组织分工与复核。" })
1714
- ] }), /* @__PURE__ */ A("button", {
1845
+ /* @__PURE__ */ k("p", { children: "选择搭档,让 Leader 组织分工与复核。" })
1846
+ ] }), /* @__PURE__ */ k("button", {
1715
1847
  type: "button",
1716
1848
  className: "team-button team-icon-button",
1717
1849
  "aria-label": "关闭创建团队",
1718
- onClick: c,
1719
- disabled: T,
1850
+ onClick: l,
1851
+ disabled: D,
1720
1852
  children: "×"
1721
1853
  })] }),
1722
- /* @__PURE__ */ j("div", {
1854
+ /* @__PURE__ */ A("div", {
1723
1855
  className: "team-create-body",
1724
1856
  children: [
1725
- /* @__PURE__ */ j("label", {
1857
+ /* @__PURE__ */ A("label", {
1726
1858
  className: "team-field",
1727
- children: ["团队名称", /* @__PURE__ */ A("input", {
1859
+ children: ["团队名称", /* @__PURE__ */ k("input", {
1728
1860
  value: p,
1729
1861
  onChange: (e) => m(e.target.value),
1730
1862
  placeholder: "例如:产品交付团队",
1731
1863
  maxLength: 100,
1732
- disabled: T,
1864
+ disabled: D,
1733
1865
  required: !0
1734
1866
  })]
1735
1867
  }),
1736
- /* @__PURE__ */ j("fieldset", {
1737
- disabled: T,
1868
+ /* @__PURE__ */ A("fieldset", {
1869
+ disabled: D,
1738
1870
  children: [
1739
- /* @__PURE__ */ j("legend", { children: ["选择成员 ", /* @__PURE__ */ j("span", { children: [_.length, " / 8"] })] }),
1740
- /* @__PURE__ */ j("div", {
1871
+ /* @__PURE__ */ A("legend", { children: ["选择成员 ", /* @__PURE__ */ A("span", { children: [_.length, " / 8"] })] }),
1872
+ /* @__PURE__ */ A("div", {
1741
1873
  className: "team-directory-search",
1742
- children: [/* @__PURE__ */ A("input", {
1874
+ children: [/* @__PURE__ */ k("input", {
1743
1875
  "aria-label": "搜索 Agent",
1744
1876
  value: h,
1745
1877
  onChange: (e) => g(e.target.value),
1746
1878
  placeholder: "搜索名称或职责"
1747
- }), a && /* @__PURE__ */ A("button", {
1879
+ }), a && /* @__PURE__ */ k("button", {
1748
1880
  type: "button",
1749
1881
  className: "team-text-button",
1750
1882
  disabled: r,
@@ -1752,56 +1884,56 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1752
1884
  children: "刷新"
1753
1885
  })]
1754
1886
  }),
1755
- r && /* @__PURE__ */ A("p", {
1887
+ r && /* @__PURE__ */ k("p", {
1756
1888
  role: "status",
1757
1889
  className: "team-muted",
1758
1890
  children: "正在读取 Agent…"
1759
1891
  }),
1760
- i && /* @__PURE__ */ A("p", {
1892
+ i && /* @__PURE__ */ k("p", {
1761
1893
  role: "alert",
1762
1894
  className: "team-inline-error",
1763
1895
  children: i
1764
1896
  }),
1765
- !r && !t.length ? /* @__PURE__ */ A("p", {
1897
+ !r && !t.length ? /* @__PURE__ */ k("p", {
1766
1898
  className: "team-muted",
1767
1899
  children: "还没有 Agent。先创建 Agent 并完成构建,再回来组队。"
1768
- }) : /* @__PURE__ */ j("div", {
1900
+ }) : /* @__PURE__ */ A("div", {
1769
1901
  className: "team-candidate-list",
1770
1902
  children: [U.map((e) => {
1771
1903
  let t = L.find((t) => q(t) === q(e[0])), n = t || e[0], i = n.binding.kind === "local_build" ? "本地" : "云端", a = P(n) ? "创建时验证执行能力" : n.description || n.binding.description || (n.binding.capabilities.leader ? "可担任 Leader" : "任务成员");
1772
- return /* @__PURE__ */ j("div", {
1904
+ return /* @__PURE__ */ A("div", {
1773
1905
  className: "team-candidate-group",
1774
- children: [/* @__PURE__ */ j("label", {
1906
+ children: [/* @__PURE__ */ A("label", {
1775
1907
  className: "team-candidate",
1776
1908
  "data-selected": !!t,
1777
1909
  children: [
1778
- /* @__PURE__ */ A("input", {
1910
+ /* @__PURE__ */ k("input", {
1779
1911
  type: "checkbox",
1780
1912
  checked: !!t,
1781
1913
  disabled: r || !t && (!F(n) || _.length >= 8),
1782
1914
  onChange: (e) => ee(n, e.target.checked)
1783
1915
  }),
1784
- /* @__PURE__ */ A("span", {
1916
+ /* @__PURE__ */ k("span", {
1785
1917
  className: "team-avatar",
1786
1918
  "aria-hidden": "true",
1787
1919
  children: Array.from(n.name)[0]
1788
1920
  }),
1789
- /* @__PURE__ */ j("span", { children: [
1790
- /* @__PURE__ */ A("strong", {
1921
+ /* @__PURE__ */ A("span", { children: [
1922
+ /* @__PURE__ */ k("strong", {
1791
1923
  title: n.name,
1792
1924
  children: n.name
1793
1925
  }),
1794
- /* @__PURE__ */ A("small", {
1926
+ /* @__PURE__ */ k("small", {
1795
1927
  className: "team-candidate-description",
1796
1928
  title: a,
1797
1929
  children: a
1798
1930
  }),
1799
- !F(n) && /* @__PURE__ */ A("small", {
1931
+ !F(n) && /* @__PURE__ */ k("small", {
1800
1932
  className: "team-candidate-reason",
1801
1933
  children: n.binding.availability?.reason || "当前不支持团队执行"
1802
1934
  })
1803
1935
  ] }),
1804
- /* @__PURE__ */ A("span", {
1936
+ /* @__PURE__ */ k("span", {
1805
1937
  className: "team-source",
1806
1938
  "data-available": F(n),
1807
1939
  "data-state": n.binding.availability?.state,
@@ -1809,13 +1941,13 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1809
1941
  children: i
1810
1942
  })
1811
1943
  ]
1812
- }), t && /* @__PURE__ */ j("details", {
1944
+ }), t && /* @__PURE__ */ A("details", {
1813
1945
  className: "team-version-choice",
1814
1946
  children: [
1815
- /* @__PURE__ */ A("summary", { children: "职责与版本" }),
1816
- /* @__PURE__ */ j("label", {
1947
+ /* @__PURE__ */ k("summary", { children: "职责与版本" }),
1948
+ /* @__PURE__ */ A("label", {
1817
1949
  className: "team-field",
1818
- children: ["工作职责", /* @__PURE__ */ A("textarea", {
1950
+ children: ["工作职责", /* @__PURE__ */ k("textarea", {
1819
1951
  "aria-label": `${n.name} 的工作职责`,
1820
1952
  rows: 2,
1821
1953
  maxLength: 2e3,
@@ -1830,10 +1962,10 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1830
1962
  placeholder: "例如:核对实现边界,补充测试证据"
1831
1963
  })]
1832
1964
  }),
1833
- /* @__PURE__ */ j("p", { children: ["模型:", n.binding.modelName || "沿用固定版本配置"] }),
1834
- /* @__PURE__ */ j("label", {
1965
+ /* @__PURE__ */ A("p", { children: ["模型:", n.binding.modelName || "沿用固定版本配置"] }),
1966
+ /* @__PURE__ */ A("label", {
1835
1967
  className: "team-field",
1836
- children: ["执行版本", /* @__PURE__ */ A("select", {
1968
+ children: ["执行版本", /* @__PURE__ */ k("select", {
1837
1969
  "aria-label": `${n.name} 的执行版本`,
1838
1970
  value: n.binding.bindingRef,
1839
1971
  onChange: (t) => {
@@ -1844,7 +1976,7 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1844
1976
  responsibility: e.responsibility
1845
1977
  } : e));
1846
1978
  },
1847
- children: e.map((e) => /* @__PURE__ */ j("option", {
1979
+ children: e.map((e) => /* @__PURE__ */ A("option", {
1848
1980
  value: e.binding.bindingRef,
1849
1981
  disabled: !F(e),
1850
1982
  children: [e.binding.version || e.binding.buildId || e.binding.bindingRef, F(e) ? "" : " · 不可用"]
@@ -1854,24 +1986,24 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1854
1986
  ]
1855
1987
  })]
1856
1988
  }, q(n));
1857
- }), !U.length && !!t.length && /* @__PURE__ */ A("p", {
1989
+ }), !U.length && !!t.length && /* @__PURE__ */ k("p", {
1858
1990
  className: "team-muted",
1859
1991
  children: "没有匹配的 Agent。"
1860
1992
  })]
1861
1993
  }),
1862
- o && s && /* @__PURE__ */ A("button", {
1994
+ o && s && /* @__PURE__ */ k("button", {
1863
1995
  type: "button",
1864
1996
  className: "team-button",
1865
- disabled: r || T,
1997
+ disabled: r || D,
1866
1998
  onClick: s,
1867
1999
  children: "加载更多成员"
1868
2000
  }),
1869
- _.filter((e) => !t.some((t) => t.binding.bindingRef === e.binding.bindingRef)).map((e) => /* @__PURE__ */ j("p", {
2001
+ _.filter((e) => !t.some((t) => t.binding.bindingRef === e.binding.bindingRef)).map((e) => /* @__PURE__ */ A("p", {
1870
2002
  className: "team-inline-error",
1871
2003
  children: [
1872
2004
  e.name,
1873
2005
  " · 当前目录中不可用 ",
1874
- /* @__PURE__ */ A("button", {
2006
+ /* @__PURE__ */ k("button", {
1875
2007
  type: "button",
1876
2008
  className: "team-text-button",
1877
2009
  onClick: () => ee(e, !1),
@@ -1881,40 +2013,40 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1881
2013
  }, e.memberId))
1882
2014
  ]
1883
2015
  }),
1884
- /* @__PURE__ */ j("label", {
2016
+ /* @__PURE__ */ A("label", {
1885
2017
  className: "team-field",
1886
2018
  children: [
1887
2019
  "指定 Leader",
1888
- /* @__PURE__ */ j("select", {
2020
+ /* @__PURE__ */ A("select", {
1889
2021
  value: z,
1890
2022
  onChange: (e) => b(e.target.value),
1891
- disabled: T || !R.length,
1892
- children: [/* @__PURE__ */ A("option", {
2023
+ disabled: D || !R.length,
2024
+ children: [/* @__PURE__ */ k("option", {
1893
2025
  value: "",
1894
2026
  disabled: !0,
1895
2027
  children: "从已选成员中指定"
1896
- }), R.map((e) => /* @__PURE__ */ j("option", {
2028
+ }), R.map((e) => /* @__PURE__ */ A("option", {
1897
2029
  value: e.memberId,
1898
2030
  children: [e.name, P(e) ? " · 创建时验证" : ""]
1899
2031
  }, e.memberId))]
1900
2032
  }),
1901
- /* @__PURE__ */ j("small", { children: ["Leader 审核成员成果,你处理工具审批和最终验收。", R.some(P) && " 待检查候选需通过服务端能力验证后才能担任 Leader。"] })
2033
+ /* @__PURE__ */ A("small", { children: ["Leader 审核成员成果,你处理工具审批和最终验收。", R.some(P) && " 待检查候选需通过服务端能力验证后才能担任 Leader。"] })
1902
2034
  ]
1903
2035
  }),
1904
- n && B && /* @__PURE__ */ j("details", {
2036
+ n && B && /* @__PURE__ */ A("details", {
1905
2037
  className: "team-version-choice",
1906
2038
  children: [
1907
- /* @__PURE__ */ A("summary", { children: "本地离线时继续协作" }),
1908
- /* @__PURE__ */ j("label", {
2039
+ /* @__PURE__ */ k("summary", { children: "本地离线时继续协作" }),
2040
+ /* @__PURE__ */ A("label", {
1909
2041
  className: "team-field",
1910
- children: ["Leader 云端备用", /* @__PURE__ */ j("select", {
2042
+ children: ["Leader 云端备用", /* @__PURE__ */ A("select", {
1911
2043
  value: H,
1912
2044
  onChange: (e) => w(e.target.value),
1913
- disabled: T || r,
1914
- children: [/* @__PURE__ */ A("option", {
2045
+ disabled: D || r,
2046
+ children: [/* @__PURE__ */ k("option", {
1915
2047
  value: "",
1916
2048
  children: "暂不配置"
1917
- }), V.map((e) => /* @__PURE__ */ j("option", {
2049
+ }), V.map((e) => /* @__PURE__ */ A("option", {
1918
2050
  value: e.binding.bindingRef,
1919
2051
  children: [
1920
2052
  e.name,
@@ -1924,38 +2056,38 @@ function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i,
1924
2056
  }, e.binding.bindingRef))]
1925
2057
  })]
1926
2058
  }),
1927
- /* @__PURE__ */ A("p", {
2059
+ /* @__PURE__ */ k("p", {
1928
2060
  className: "team-muted",
1929
2061
  children: "服务端验证同一发布及实际执行能力后,备用才可启用。云端模型、工具和任务资料需预先准备;本地凭据不会复制到云端。"
1930
2062
  }),
1931
- !V.length && /* @__PURE__ */ A("p", {
2063
+ !V.length && /* @__PURE__ */ k("p", {
1932
2064
  className: "team-muted",
1933
2065
  children: "还没有可用的云端 Leader 候选。可以先创建团队,接入节点后再配置。"
1934
2066
  })
1935
2067
  ]
1936
2068
  }),
1937
- /* @__PURE__ */ A("p", {
2069
+ /* @__PURE__ */ k("p", {
1938
2070
  className: "team-create-footnote",
1939
2071
  children: "创建时检查选中成员的执行环境;配置失败会保留草稿。"
1940
2072
  }),
1941
- k && /* @__PURE__ */ A("p", {
2073
+ j && /* @__PURE__ */ k("p", {
1942
2074
  role: "alert",
1943
2075
  className: "team-inline-error",
1944
- children: k
2076
+ children: j
1945
2077
  })
1946
2078
  ]
1947
2079
  }),
1948
- /* @__PURE__ */ j("footer", { children: [/* @__PURE__ */ A("button", {
2080
+ /* @__PURE__ */ A("footer", { children: [/* @__PURE__ */ k("button", {
1949
2081
  type: "button",
1950
2082
  className: "team-button",
1951
- onClick: c,
1952
- disabled: T,
2083
+ onClick: l,
2084
+ disabled: D,
1953
2085
  children: "稍后继续"
1954
- }), /* @__PURE__ */ A("button", {
2086
+ }), /* @__PURE__ */ k("button", {
1955
2087
  type: "submit",
1956
2088
  className: "team-button team-primary",
1957
- disabled: T || r || L.length < 2,
1958
- children: T ? "正在检查并创建…" : "创建团队"
2089
+ disabled: D || r || L.length < 2,
2090
+ children: D ? "正在检查并创建…" : "创建团队"
1959
2091
  })] })
1960
2092
  ]
1961
2093
  })
@@ -2000,7 +2132,7 @@ var de = class {
2000
2132
  signal: t.signal,
2001
2133
  onSnapshot: (e) => {
2002
2134
  if (n()) {
2003
- if (e.group.authorityRef !== this.authorityRef) throw new a("scope_mismatch", "群授权域发生变化,请重新打开。");
2135
+ if (e.group.authorityRef !== this.authorityRef) throw new i("scope_mismatch", "群授权域发生变化,请重新打开。");
2004
2136
  this.update({ snapshot: e });
2005
2137
  }
2006
2138
  },
@@ -2023,12 +2155,12 @@ var de = class {
2023
2155
  send = (e) => this.client.send(this.groupId, e);
2024
2156
  };
2025
2157
  function X(e) {
2026
- let t = T(() => new de(e.client, e.groupId, e.authorityRef), [
2158
+ let t = w(() => new de(e.client, e.groupId, e.authorityRef), [
2027
2159
  e.client,
2028
2160
  e.groupId,
2029
2161
  e.authorityRef
2030
- ]), n = O(t.subscribe, t.getSnapshot, t.getSnapshot);
2031
- return S(() => (t.start(), t.disconnect), [t]), {
2162
+ ]), n = D(t.subscribe, t.getSnapshot, t.getSnapshot);
2163
+ return x(() => (t.start(), t.disconnect), [t]), {
2032
2164
  ...n,
2033
2165
  loading: !n.snapshot && n.connection === "connecting",
2034
2166
  setDraft: t.setDraft,
@@ -2039,7 +2171,7 @@ function X(e) {
2039
2171
  //#endregion
2040
2172
  //#region src/components/teams/CloudEffectsPanel.tsx
2041
2173
  function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pendingEffectKeys: a, command: o }) {
2042
- let [s, c] = D([]), [l, u] = D(null), [d, p] = D(!1), [m, h] = D(!1), [g, _] = D(""), [v, y] = D(null), [b, w] = D(""), [T, O] = D(!1), [k, M] = D(!1), [N, P] = D(""), F = E(null), I = E(0), L = E(null), R = f(e), z = C(), B = x(async (r = 0) => {
2174
+ let [s, c] = E([]), [l, u] = E(null), [f, p] = E(!1), [m, h] = E(!1), [g, _] = E(""), [v, y] = E(null), [C, w] = E(""), [D, O] = E(!1), [j, M] = E(!1), [N, P] = E(""), F = T(null), I = T(0), L = T(null), R = d(e), z = S(), B = b(async (r = 0) => {
2043
2175
  F.current?.abort();
2044
2176
  let i = new AbortController();
2045
2177
  F.current = i;
@@ -2059,12 +2191,12 @@ function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pe
2059
2191
  t,
2060
2192
  n
2061
2193
  ]);
2062
- S(() => (B(), () => F.current?.abort()), [B, i]), S(() => {
2194
+ x(() => (B(), () => F.current?.abort()), [B, i]), x(() => {
2063
2195
  v && L.current?.scrollIntoView?.({ block: "nearest" });
2064
2196
  }, [v?.effect.effectKey]);
2065
2197
  let V = v ? s.find((e) => e.effectKey === v.effect.effectKey) : void 0, H = !!(v && m && (!V || V.revision !== v.effect.revision || V.evidenceDigest !== v.effect.evidenceDigest)), U = !!(v && a.includes(v.effect.effectKey));
2066
2198
  async function ee() {
2067
- if (!(!v || !r || g || d || k || H || U || !T || !b.trim())) {
2199
+ if (!(!v || !r || g || f || j || H || U || !D || !C.trim())) {
2068
2200
  M(!0), P("");
2069
2201
  try {
2070
2202
  await o(`effects/${v.effect.effectKey}/reconcile`, {
@@ -2072,7 +2204,7 @@ function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pe
2072
2204
  expectedEvidenceDigest: v.effect.evidenceDigest,
2073
2205
  decision: "accept_risk",
2074
2206
  evidenceRef: v.evidenceRef,
2075
- reason: b.trim()
2207
+ reason: C.trim()
2076
2208
  }), y(null), w(""), O(!1), B();
2077
2209
  } catch (e) {
2078
2210
  P(e instanceof Error ? e.message : "核查决定尚未确认,请核对原单。"), B();
@@ -2081,56 +2213,56 @@ function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pe
2081
2213
  }
2082
2214
  }
2083
2215
  }
2084
- return /* @__PURE__ */ j("section", {
2216
+ return /* @__PURE__ */ A("section", {
2085
2217
  className: "team-effect-review",
2086
2218
  "aria-label": "外部操作核查",
2087
2219
  children: [
2088
- /* @__PURE__ */ j("header", {
2220
+ /* @__PURE__ */ A("header", {
2089
2221
  className: "team-effect-review-header",
2090
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", { children: "外部操作核查" }), /* @__PURE__ */ A("p", {
2222
+ children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h3", { children: "外部操作核查" }), /* @__PURE__ */ k("p", {
2091
2223
  className: "team-muted",
2092
2224
  children: "结果未确认的操作需要核查后再继续。核查决定会保留记录。"
2093
- })] }), /* @__PURE__ */ A("button", {
2225
+ })] }), /* @__PURE__ */ k("button", {
2094
2226
  type: "button",
2095
2227
  className: "team-button",
2096
- disabled: d,
2228
+ disabled: f,
2097
2229
  onClick: () => void B(),
2098
2230
  children: "刷新记录"
2099
2231
  })]
2100
2232
  }),
2101
- g && /* @__PURE__ */ A("p", {
2233
+ g && /* @__PURE__ */ k("p", {
2102
2234
  role: "alert",
2103
2235
  className: "team-inline-error",
2104
2236
  children: g
2105
2237
  }),
2106
- d && /* @__PURE__ */ A("p", {
2238
+ f && /* @__PURE__ */ k("p", {
2107
2239
  role: "status",
2108
2240
  className: "team-muted",
2109
2241
  children: "正在读取原执行记录…"
2110
2242
  }),
2111
- m && !d && !g && !s.length && /* @__PURE__ */ A("p", {
2243
+ m && !f && !g && !s.length && /* @__PURE__ */ k("p", {
2112
2244
  className: "team-muted",
2113
2245
  children: l ? "这一页没有待核查操作,请继续读取后续记录。" : "当前任务没有待核查的外部操作。"
2114
2246
  }),
2115
- s.map((e) => /* @__PURE__ */ j("article", {
2247
+ s.map((e) => /* @__PURE__ */ A("article", {
2116
2248
  className: "team-effect-card",
2117
2249
  children: [
2118
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("strong", { children: e.toolName }), /* @__PURE__ */ A("span", {
2250
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("strong", { children: e.toolName }), /* @__PURE__ */ k("span", {
2119
2251
  className: "team-effect-state",
2120
2252
  children: e.resolutionConflict ? "核查后收到不同证据" : e.phase === "prepared" ? "执行结果待核对" : "外部结果未确认"
2121
2253
  })] }),
2122
- /* @__PURE__ */ A("p", {
2254
+ /* @__PURE__ */ k("p", {
2123
2255
  className: "team-muted",
2124
2256
  children: e.resolutionConflict ? "新证据与已有核查决定不一致,后续处理保持暂停。请重新核对原记录,并记录新的决定。" : "系统保留了原操作,不会因断线或重启自动重复发送。请先查看外部系统。"
2125
2257
  }),
2126
- e.outcome?.evidence_ref && /* @__PURE__ */ j("p", {
2258
+ e.outcome?.evidence_ref && /* @__PURE__ */ A("p", {
2127
2259
  className: "team-muted",
2128
2260
  children: ["原执行证据:", e.outcome.evidence_ref]
2129
2261
  }),
2130
- /* @__PURE__ */ A("button", {
2262
+ /* @__PURE__ */ k("button", {
2131
2263
  type: "button",
2132
2264
  className: "team-button",
2133
- disabled: !r || !!g || k || a.includes(e.effectKey),
2265
+ disabled: !r || !!g || j || a.includes(e.effectKey),
2134
2266
  onClick: () => {
2135
2267
  y({
2136
2268
  effect: e,
@@ -2141,50 +2273,50 @@ function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pe
2141
2273
  })
2142
2274
  ]
2143
2275
  }, e.effectKey)),
2144
- l !== null && /* @__PURE__ */ A("button", {
2276
+ l !== null && /* @__PURE__ */ k("button", {
2145
2277
  className: "team-button team-history-more",
2146
2278
  type: "button",
2147
- disabled: d,
2279
+ disabled: f,
2148
2280
  onClick: () => void B(l),
2149
2281
  children: "更多执行记录"
2150
2282
  }),
2151
- v && /* @__PURE__ */ j("form", {
2283
+ v && /* @__PURE__ */ A("form", {
2152
2284
  ref: L,
2153
2285
  className: "team-effect-form",
2154
2286
  onSubmit: (e) => {
2155
2287
  e.preventDefault(), ee();
2156
2288
  },
2157
2289
  children: [
2158
- /* @__PURE__ */ j("h3", { children: ["核查 ", v.effect.toolName] }),
2159
- /* @__PURE__ */ A("p", {
2290
+ /* @__PURE__ */ A("h3", { children: ["核查 ", v.effect.toolName] }),
2291
+ /* @__PURE__ */ k("p", {
2160
2292
  className: "team-muted",
2161
2293
  children: "此操作记录你接受剩余不确定性的决定,不会重新调用外部工具,也不会将原执行标记为成功。"
2162
2294
  }),
2163
- /* @__PURE__ */ j("label", {
2295
+ /* @__PURE__ */ A("label", {
2164
2296
  className: "team-field",
2165
2297
  htmlFor: z,
2166
- children: ["核查说明", /* @__PURE__ */ A("textarea", {
2298
+ children: ["核查说明", /* @__PURE__ */ k("textarea", {
2167
2299
  id: z,
2168
- value: b,
2300
+ value: C,
2169
2301
  maxLength: 1e3,
2170
2302
  rows: 3,
2171
- disabled: k || U,
2303
+ disabled: j || U,
2172
2304
  onChange: (e) => w(e.target.value),
2173
2305
  placeholder: "说明查验了什么、得到什么结果,以及继续处理的依据。"
2174
2306
  })]
2175
2307
  }),
2176
- /* @__PURE__ */ j("label", {
2308
+ /* @__PURE__ */ A("label", {
2177
2309
  className: "team-effect-consent",
2178
- children: [/* @__PURE__ */ A("input", {
2310
+ children: [/* @__PURE__ */ k("input", {
2179
2311
  type: "checkbox",
2180
- checked: T,
2181
- disabled: k || U,
2312
+ checked: D,
2313
+ disabled: j || U,
2182
2314
  onChange: (e) => O(e.target.checked)
2183
- }), /* @__PURE__ */ A("span", { children: "我已核对外部记录,接受剩余不确定性并允许后续处理。" })]
2315
+ }), /* @__PURE__ */ k("span", { children: "我已核对外部记录,接受剩余不确定性并允许后续处理。" })]
2184
2316
  }),
2185
- H && /* @__PURE__ */ j("p", {
2317
+ H && /* @__PURE__ */ A("p", {
2186
2318
  role: "alert",
2187
- children: ["记录已更新,核查说明已保留。", V && /* @__PURE__ */ A("button", {
2319
+ children: ["记录已更新,核查说明已保留。", V && /* @__PURE__ */ k("button", {
2188
2320
  type: "button",
2189
2321
  className: "team-text-button",
2190
2322
  onClick: () => {
@@ -2196,28 +2328,28 @@ function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pe
2196
2328
  children: "读取最新证据后重新核对"
2197
2329
  })]
2198
2330
  }),
2199
- U && /* @__PURE__ */ A("p", {
2331
+ U && /* @__PURE__ */ k("p", {
2200
2332
  role: "status",
2201
2333
  children: "决定已保存在本地,服务端接收结果仍待确认。请在操作记录中核对原单。"
2202
2334
  }),
2203
- N && /* @__PURE__ */ A("p", {
2335
+ N && /* @__PURE__ */ k("p", {
2204
2336
  role: "alert",
2205
2337
  className: "team-inline-error",
2206
2338
  children: N
2207
2339
  }),
2208
- /* @__PURE__ */ j("div", {
2340
+ /* @__PURE__ */ A("div", {
2209
2341
  className: "team-task-actions",
2210
- children: [/* @__PURE__ */ A("button", {
2342
+ children: [/* @__PURE__ */ k("button", {
2211
2343
  type: "button",
2212
2344
  className: "team-button",
2213
- disabled: k,
2345
+ disabled: j,
2214
2346
  onClick: () => y(null),
2215
2347
  children: "收起"
2216
- }), /* @__PURE__ */ A("button", {
2348
+ }), /* @__PURE__ */ k("button", {
2217
2349
  type: "submit",
2218
2350
  className: "team-button team-primary",
2219
- disabled: !r || !!g || d || k || H || U || !T || !b.trim(),
2220
- children: k ? "正在记录…" : "记录核查决定"
2351
+ disabled: !r || !!g || f || j || H || U || !D || !C.trim(),
2352
+ children: j ? "正在记录…" : "记录核查决定"
2221
2353
  })]
2222
2354
  })
2223
2355
  ]
@@ -2289,15 +2421,15 @@ var pe = {
2289
2421
  };
2290
2422
  function Se({ value: e }) {
2291
2423
  let t = be[e.state];
2292
- return /* @__PURE__ */ j("section", {
2424
+ return /* @__PURE__ */ A("section", {
2293
2425
  className: "team-cloud-standby",
2294
2426
  "aria-label": "Leader 接管状态",
2295
2427
  "data-state": e.state,
2296
2428
  role: "status",
2297
2429
  children: [
2298
- /* @__PURE__ */ A("strong", { children: t.label }),
2299
- /* @__PURE__ */ A("p", { children: t.description }),
2300
- e.reason && /* @__PURE__ */ A("p", {
2430
+ /* @__PURE__ */ k("strong", { children: t.label }),
2431
+ /* @__PURE__ */ k("p", { children: t.description }),
2432
+ e.reason && /* @__PURE__ */ k("p", {
2301
2433
  className: "team-cloud-standby-reason",
2302
2434
  children: xe[e.reason] || `服务端原因:${e.reason}`
2303
2435
  })
@@ -2305,12 +2437,12 @@ function Se({ value: e }) {
2305
2437
  });
2306
2438
  }
2307
2439
  function Ce(e) {
2308
- let [t, n] = D(null), [r, i] = D(""), a = f(e.scope);
2309
- return S(() => {
2310
- let t, r = !0, a = new u(e.scope, e.transport);
2440
+ let [t, n] = E(null), [r, i] = E(""), a = d(e.scope);
2441
+ return x(() => {
2442
+ let t, r = !0, a = new l(e.scope, e.transport);
2311
2443
  return (async () => {
2312
2444
  try {
2313
- t = new c({ scope: e.scope }, e.product), t.setWritable(!1), await t.refresh(), r && (n({
2445
+ t = new s({ scope: e.scope }, e.product), t.setWritable(!1), await t.refresh(), r && (n({
2314
2446
  observer: a,
2315
2447
  operations: t
2316
2448
  }), i(""));
@@ -2327,31 +2459,31 @@ function Ce(e) {
2327
2459
  a,
2328
2460
  e.transport,
2329
2461
  e.product
2330
- ]), !t || f(t.observer.scope) !== a ? /* @__PURE__ */ A("section", {
2462
+ ]), !t || d(t.observer.scope) !== a ? /* @__PURE__ */ k("section", {
2331
2463
  className: "ksadk-teams team-workspace",
2332
- children: /* @__PURE__ */ A("p", {
2464
+ children: /* @__PURE__ */ k("p", {
2333
2465
  role: r ? "alert" : "status",
2334
2466
  className: "team-cloud-notice",
2335
2467
  children: r || "正在准备团队工作区…"
2336
2468
  })
2337
- }) : /* @__PURE__ */ A(we, {
2469
+ }) : /* @__PURE__ */ k(we, {
2338
2470
  ...e,
2339
2471
  readOnlyReason: r || e.readOnlyReason,
2340
2472
  resources: t
2341
2473
  });
2342
2474
  }
2343
2475
  function we({ resources: e, ...t }) {
2344
- let { observer: n, operations: r } = e, { onSelectionChange: i, onChanged: a } = t, s = O(n.subscribe, n.getSnapshot, n.getSnapshot), c = O(r?.subscribe ?? me, r?.getSnapshot ?? he, r?.getSnapshot ?? he), [l, u] = D(""), [d, p] = D(!1), [m, h] = D(""), [g, _] = D(null), v = E(0), [y, b] = D(() => typeof navigator > "u" || navigator.onLine);
2345
- S(() => {
2476
+ let { observer: n, operations: r } = e, { onSelectionChange: i, onChanged: o } = t, s = D(n.subscribe, n.getSnapshot, n.getSnapshot), c = D(r?.subscribe ?? me, r?.getSnapshot ?? he, r?.getSnapshot ?? he), [l, u] = E(""), [f, p] = E(!1), [m, h] = E(""), [g, _] = E(null), v = T(0), [y, b] = E(() => typeof navigator > "u" || navigator.onLine);
2477
+ x(() => {
2346
2478
  let e = () => b(navigator.onLine);
2347
2479
  return window.addEventListener("online", e), window.addEventListener("offline", e), () => {
2348
2480
  window.removeEventListener("online", e), window.removeEventListener("offline", e);
2349
2481
  };
2350
2482
  }, []);
2351
- let x = s.projection?.snapshot.group.status === "archived", C = !!r && y && !x && t.canWrite && s.connection === "connected";
2352
- S(() => {
2483
+ let S = s.projection?.snapshot.group.status === "archived", C = !!r && y && !S && t.canWrite && s.connection === "connected";
2484
+ x(() => {
2353
2485
  r && (r.setWritable(C), C ? r.recover() : r.refresh());
2354
- }, [r, C]), S(() => {
2486
+ }, [r, C]), x(() => {
2355
2487
  if (!r) return;
2356
2488
  let e = () => {
2357
2489
  r.refresh(), document.visibilityState === "visible" && navigator.onLine && C && r.recover();
@@ -2372,73 +2504,73 @@ function we({ resources: e, ...t }) {
2372
2504
  if (e === "messages" && !["confirmed", "rejected"].includes(a.status) && _(a.operationId), a.status !== "confirmed") throw Error(a.status === "rejected" ? `请求未被接受(${a.errorCode || "operation_rejected"})。` : "已保存操作,接收结果尚未确认。请在操作记录中核对原单,不要重复创建目标。");
2373
2505
  return t.onChanged?.(), n.refresh(), a;
2374
2506
  }
2375
- S(() => {
2507
+ x(() => {
2376
2508
  if (!(!r || !g)) return r.subscribe(() => {
2377
2509
  let e = r.getSnapshot().operations.find((e) => e.operationId === g);
2378
2510
  if (!e || !["confirmed", "rejected"].includes(e.status) || (_(null), e.status === "rejected")) return;
2379
2511
  u("");
2380
- let t = n.getSnapshot(), o = e.payload.parts, s = Array.isArray(o) ? o.filter((e) => e && typeof e == "object" && !Array.isArray(e) && e.kind === "text").map((e) => e.text).join("") : "", c = e.payload.intent === "start_goal", l = c ? m.trim() === s : t.selectedRunId === e.payload.teamRunId && t.draft.trim() === s;
2512
+ let t = n.getSnapshot(), a = e.payload.parts, s = Array.isArray(a) ? a.filter((e) => e && typeof e == "object" && !Array.isArray(e) && e.kind === "text").map((e) => e.text).join("") : "", c = e.payload.intent === "start_goal", l = c ? m.trim() === s : t.selectedRunId === e.payload.teamRunId && t.draft.trim() === s;
2381
2513
  c && l && (h(""), p(!1)), !c && typeof e.payload.teamRunId == "string" && n.acknowledgeDraft(e.payload.teamRunId, s);
2382
- let f = e.receipt?.teamRunId;
2383
- typeof f == "string" && l && (!c || d) ? (n.observe(f), i?.(f)) : n.refresh(), a?.();
2514
+ let d = e.receipt?.teamRunId;
2515
+ typeof d == "string" && l && (!c || f) ? (n.observe(d), i?.(d)) : n.refresh(), o?.();
2384
2516
  });
2385
2517
  }, [
2386
2518
  r,
2387
2519
  n,
2388
2520
  g,
2389
2521
  m,
2390
- d,
2522
+ f,
2391
2523
  i,
2392
- a
2524
+ o
2393
2525
  ]);
2394
- let T = c.operations.some((e) => e.operation.endsWith("/messages") && !["confirmed", "rejected"].includes(e.status) && (d ? e.payload.intent === "start_goal" : e.payload.teamRunId === s.selectedRunId || !s.selectedRunId && e.payload.intent === "start_goal")), k = (e) => {
2526
+ let O = c.operations.some((e) => e.operation.endsWith("/messages") && !["confirmed", "rejected"].includes(e.status) && (f ? e.payload.intent === "start_goal" : e.payload.teamRunId === s.selectedRunId || !s.selectedRunId && e.payload.intent === "start_goal")), j = (e) => {
2395
2527
  v.current++, p(!1), u(""), n.observe(e), t.onSelectionChange?.(e);
2396
2528
  };
2397
- return /* @__PURE__ */ A(Te, {
2529
+ return /* @__PURE__ */ k(Te, {
2398
2530
  observation: s,
2399
2531
  canWrite: C,
2400
- readOnlyReason: y ? x ? "团队已归档,历史记录仍可查看。" : t.readOnlyReason : "浏览器已离线,草稿与待确认操作会保留。",
2532
+ readOnlyReason: y ? S ? "团队已归档,历史记录仍可查看。" : t.readOnlyReason : "浏览器已离线,草稿与待确认操作会保留。",
2401
2533
  onRetry: () => n.refresh(),
2402
2534
  onLoadMore: (e) => {
2403
2535
  n.loadMore(e).catch(() => u("分页读取失败。可重试;快照过期时会自动重新同步。"));
2404
2536
  },
2405
- onChooseRun: k,
2537
+ onChooseRun: j,
2406
2538
  onNewGoal: () => {
2407
2539
  v.current++, p(!0);
2408
2540
  },
2409
- newGoal: d,
2410
- composer: /* @__PURE__ */ A(Ee, {
2541
+ newGoal: f,
2542
+ composer: /* @__PURE__ */ k(Ee, {
2411
2543
  scope: t.scope,
2412
2544
  product: t.product,
2413
2545
  observation: s,
2414
- newGoal: d,
2415
- pendingMessage: T,
2546
+ newGoal: f,
2547
+ pendingMessage: O,
2416
2548
  canWrite: C,
2417
- value: d ? m : s.draft,
2418
- onChange: (e) => d ? h(e) : n.setDraft(e),
2549
+ value: f ? m : s.draft,
2550
+ onChange: (e) => f ? h(e) : n.setDraft(e),
2419
2551
  onCancelNew: () => {
2420
2552
  v.current++, p(!1);
2421
2553
  },
2422
2554
  onSubmit: async (e) => {
2423
2555
  let t = v.current, r = Array.isArray(e.parts) ? e.parts.map((e) => e && typeof e == "object" && !Array.isArray(e) && e.kind === "text" ? e.text : "").join("") : "", i = await w("messages", e);
2424
2556
  if (typeof e.teamRunId == "string" && n.acknowledgeDraft(e.teamRunId, r), v.current !== t) return;
2425
- d && h((e) => e.trim() === r ? "" : e);
2557
+ f && h((e) => e.trim() === r ? "" : e);
2426
2558
  let a = i.receipt?.teamRunId;
2427
- typeof a == "string" && k(a);
2559
+ typeof a == "string" && j(a);
2428
2560
  }
2429
- }, d ? "new" : s.selectedRunId ?? "empty"),
2430
- operations: /* @__PURE__ */ j("section", {
2561
+ }, f ? "new" : s.selectedRunId ?? "empty"),
2562
+ operations: /* @__PURE__ */ A("section", {
2431
2563
  className: "team-cloud-operations",
2432
2564
  "aria-label": "操作记录",
2433
2565
  children: [
2434
- /* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("strong", { children: "操作记录" }), /* @__PURE__ */ A("button", {
2566
+ /* @__PURE__ */ A("header", { children: [/* @__PURE__ */ k("strong", { children: "操作记录" }), /* @__PURE__ */ k("button", {
2435
2567
  className: "team-text-button",
2436
2568
  type: "button",
2437
2569
  disabled: !C || c.recovering,
2438
2570
  onClick: () => void r?.recover(),
2439
2571
  children: c.recovering ? "正在核对…" : "核对待确认操作"
2440
2572
  })] }),
2441
- c.errorCode && /* @__PURE__ */ j("p", {
2573
+ c.errorCode && /* @__PURE__ */ A("p", {
2442
2574
  role: "alert",
2443
2575
  children: [
2444
2576
  "持久操作存储暂不可用(",
@@ -2446,25 +2578,25 @@ function we({ resources: e, ...t }) {
2446
2578
  ")。"
2447
2579
  ]
2448
2580
  }),
2449
- c.operations.slice(-8).reverse().map((e) => /* @__PURE__ */ j("p", {
2581
+ c.operations.slice(-8).reverse().map((e) => /* @__PURE__ */ A("p", {
2450
2582
  "data-status": e.status,
2451
- children: [/* @__PURE__ */ A("span", { children: ge(e.operation) }), /* @__PURE__ */ A("span", { children: _e[e.status] })]
2583
+ children: [/* @__PURE__ */ k("span", { children: ge(e.operation) }), /* @__PURE__ */ k("span", { children: _e[e.status] })]
2452
2584
  }, e.operationId)),
2453
- !c.operations.length && /* @__PURE__ */ A("p", {
2585
+ !c.operations.length && /* @__PURE__ */ k("p", {
2454
2586
  className: "team-muted",
2455
2587
  children: "操作在发送前保存;刷新后继续核对。"
2456
2588
  })
2457
2589
  ]
2458
2590
  }),
2459
2591
  error: l,
2460
- renderTasks: (e) => /* @__PURE__ */ A(De, {
2592
+ renderTasks: (e) => /* @__PURE__ */ k(De, {
2461
2593
  task: e,
2462
2594
  scope: t.scope,
2463
2595
  product: t.product,
2464
2596
  canWrite: C,
2465
2597
  command: w
2466
2598
  }, `${e.taskId}:${e.revision}`),
2467
- effects: t.effectsEnabled && s.selectedRunId ? /* @__PURE__ */ A(fe, {
2599
+ effects: t.effectsEnabled && s.selectedRunId ? /* @__PURE__ */ k(fe, {
2468
2600
  scope: t.scope,
2469
2601
  teamRunId: s.selectedRunId,
2470
2602
  product: t.product,
@@ -2472,14 +2604,14 @@ function we({ resources: e, ...t }) {
2472
2604
  command: w,
2473
2605
  refreshKey: `${s.projection?.snapshot.watermark ?? 0}:${c.operations.map((e) => `${e.operationId}:${e.status}`).join("|")}`,
2474
2606
  pendingEffectKeys: c.operations.filter((e) => !["confirmed", "rejected"].includes(e.status)).map((e) => /^groups\/[^/]+\/effects\/([^/]+)\/reconcile$/.exec(e.operation)?.[1]).filter((e) => !!e)
2475
- }, `${f(t.scope)}:${s.selectedRunId}`) : void 0,
2476
- renderInteraction: (e) => /* @__PURE__ */ A($, {
2607
+ }, `${d(t.scope)}:${s.selectedRunId}`) : void 0,
2608
+ renderInteraction: (e) => /* @__PURE__ */ k($, {
2477
2609
  summary: e,
2478
2610
  scope: t.scope,
2479
2611
  product: t.product,
2480
2612
  canWrite: C,
2481
2613
  command: w
2482
- }, `${o(e)}:${e.revision}`),
2614
+ }, `${a(e)}:${e.revision}`),
2483
2615
  artifactUrl: (e, n) => t.product.artifactUrl(t.scope, e, n),
2484
2616
  onControl: (e) => {
2485
2617
  let t = s.projection?.snapshot.selectedRun;
@@ -2499,7 +2631,7 @@ function we({ resources: e, ...t }) {
2499
2631
  });
2500
2632
  }
2501
2633
  function Te(e) {
2502
- let { observation: t, canWrite: n, onLoadMore: i } = e, a = t.projection?.snapshot, [s, c] = D("messages"), [l, u] = D(""), d = C(), f = E(null), p = E(null), m = `${a?.selectedRun?.teamRunId ?? ""}:${s}:${!!e.newGoal}`, h = () => {
2634
+ let { observation: t, canWrite: r, onLoadMore: i } = e, o = t.projection?.snapshot, [s, c] = E("messages"), [l, u] = E(""), d = S(), f = T(null), p = T(null), m = `${o?.selectedRun?.teamRunId ?? ""}:${s}:${!!e.newGoal}`, g = () => {
2503
2635
  let e = f.current;
2504
2636
  if (!e || s !== "messages") return;
2505
2637
  let t = e.getBoundingClientRect().top, n = Array.from(e.querySelectorAll("[data-message-id]")).find((e) => e.getBoundingClientRect().bottom > t);
@@ -2510,7 +2642,7 @@ function Te(e) {
2510
2642
  anchorOffset: n ? n.getBoundingClientRect().top - t : void 0
2511
2643
  };
2512
2644
  };
2513
- w(() => {
2645
+ C(() => {
2514
2646
  let e = f.current;
2515
2647
  if (!e || s !== "messages") {
2516
2648
  p.current = null;
@@ -2522,30 +2654,30 @@ function Te(e) {
2522
2654
  let n = Array.from(e.querySelectorAll("[data-message-id]")).find((e) => e.dataset.messageId === t.anchorId);
2523
2655
  n && (e.scrollTop += n.getBoundingClientRect().top - e.getBoundingClientRect().top - t.anchorOffset);
2524
2656
  }
2525
- h();
2526
- }, [m, a?.recentMessages]);
2527
- let _ = (e, n = "加载更多") => a?.cursors[e] && /* @__PURE__ */ A("button", {
2657
+ g();
2658
+ }, [m, o?.recentMessages]);
2659
+ let _ = (e, n = "加载更多") => o?.cursors[e] && /* @__PURE__ */ k("button", {
2528
2660
  className: "team-button team-history-more",
2529
2661
  type: "button",
2530
2662
  disabled: t.loadingPages.includes(e) || t.connection !== "connected",
2531
2663
  onClick: () => i(e),
2532
2664
  children: t.loadingPages.includes(e) ? "正在读取…" : n
2533
2665
  });
2534
- if (!a) return /* @__PURE__ */ A("section", {
2666
+ if (!o) return /* @__PURE__ */ k("section", {
2535
2667
  className: "ksadk-teams team-workspace",
2536
- children: /* @__PURE__ */ j("div", {
2668
+ children: /* @__PURE__ */ A("div", {
2537
2669
  className: "team-empty",
2538
2670
  children: [
2539
- /* @__PURE__ */ A("h2", { children: t.connection === "offline" ? "暂时无法读取团队" : "正在打开工作区" }),
2540
- /* @__PURE__ */ A("p", {
2671
+ /* @__PURE__ */ k("h2", { children: t.connection === "offline" ? "暂时无法读取团队" : "正在打开工作区" }),
2672
+ /* @__PURE__ */ k("p", {
2541
2673
  role: "status",
2542
2674
  children: ve[t.connection]
2543
2675
  }),
2544
- t.errorCode && /* @__PURE__ */ A("p", {
2676
+ t.errorCode && /* @__PURE__ */ k("p", {
2545
2677
  role: "alert",
2546
2678
  children: t.errorCode
2547
2679
  }),
2548
- /* @__PURE__ */ A("button", {
2680
+ /* @__PURE__ */ k("button", {
2549
2681
  type: "button",
2550
2682
  className: "team-button",
2551
2683
  onClick: e.onRetry,
@@ -2554,23 +2686,23 @@ function Te(e) {
2554
2686
  ]
2555
2687
  })
2556
2688
  });
2557
- let v = a.selectedRun, y = v ? a.selectedRunMembers : a.members;
2558
- return /* @__PURE__ */ j("section", {
2689
+ let v = o.selectedRun, y = v ? o.selectedRunMembers : o.members;
2690
+ return /* @__PURE__ */ A("section", {
2559
2691
  className: "ksadk-teams team-workspace team-cloud-workspace",
2560
2692
  "aria-label": "云端团队工作区",
2561
2693
  children: [
2562
- /* @__PURE__ */ j("header", {
2694
+ /* @__PURE__ */ A("header", {
2563
2695
  className: "team-header",
2564
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("span", {
2696
+ children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("span", {
2565
2697
  className: "team-eyebrow",
2566
2698
  children: "云端协作空间"
2567
- }), /* @__PURE__ */ A("h1", { children: a.group.name })] }), /* @__PURE__ */ j("div", {
2699
+ }), /* @__PURE__ */ k("h1", { children: o.group.name })] }), /* @__PURE__ */ A("div", {
2568
2700
  className: "team-header-actions",
2569
- children: [/* @__PURE__ */ A("span", {
2701
+ children: [/* @__PURE__ */ k("span", {
2570
2702
  className: "team-connection",
2571
2703
  role: "status",
2572
2704
  children: ve[t.connection]
2573
- }), /* @__PURE__ */ A("button", {
2705
+ }), /* @__PURE__ */ k("button", {
2574
2706
  type: "button",
2575
2707
  className: "team-button",
2576
2708
  onClick: e.onRetry,
@@ -2578,125 +2710,125 @@ function Te(e) {
2578
2710
  })]
2579
2711
  })]
2580
2712
  }),
2581
- !n && /* @__PURE__ */ j("p", {
2713
+ !r && /* @__PURE__ */ A("p", {
2582
2714
  className: "team-cloud-notice",
2583
2715
  role: "status",
2584
2716
  children: ["只读 · ", e.readOnlyReason || (t.connection === "connected" ? "服务暂未开放写入,已有历史仍可查看。" : "等待连接恢复后再提交操作。")]
2585
2717
  }),
2586
- e.error && /* @__PURE__ */ A("p", {
2718
+ e.error && /* @__PURE__ */ k("p", {
2587
2719
  role: "alert",
2588
2720
  className: "team-inline-error team-cloud-notice",
2589
2721
  children: e.error
2590
2722
  }),
2591
- /* @__PURE__ */ j("div", {
2723
+ /* @__PURE__ */ A("div", {
2592
2724
  className: "team-cloud-layout",
2593
- children: [/* @__PURE__ */ j("aside", {
2725
+ children: [/* @__PURE__ */ A("aside", {
2594
2726
  className: "team-cloud-runs",
2595
2727
  "aria-label": "团队任务",
2596
2728
  children: [
2597
- /* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("h2", { children: "团队任务" }), /* @__PURE__ */ A("button", {
2729
+ /* @__PURE__ */ A("header", { children: [/* @__PURE__ */ k("h2", { children: "团队任务" }), /* @__PURE__ */ k("button", {
2598
2730
  className: "team-text-button",
2599
2731
  type: "button",
2600
- disabled: !n,
2732
+ disabled: !r,
2601
2733
  onClick: e.onNewGoal,
2602
2734
  children: "新任务"
2603
2735
  })] }),
2604
- a.runSummaries.map((t) => /* @__PURE__ */ j("button", {
2736
+ o.runSummaries.map((t) => /* @__PURE__ */ A("button", {
2605
2737
  type: "button",
2606
2738
  className: "team-cloud-run",
2607
2739
  "aria-current": !e.newGoal && v?.teamRunId === t.teamRunId ? "page" : void 0,
2608
2740
  onClick: () => e.onChooseRun(t.teamRunId),
2609
2741
  children: [
2610
- /* @__PURE__ */ A("strong", { children: t.goal }),
2611
- /* @__PURE__ */ j("span", { children: [
2612
- /* @__PURE__ */ A(B, { status: t.status }),
2742
+ /* @__PURE__ */ k("strong", { children: t.goal }),
2743
+ /* @__PURE__ */ A("span", { children: [
2744
+ /* @__PURE__ */ k(B, { status: t.status }),
2613
2745
  " · ",
2614
2746
  t.taskCount,
2615
2747
  " 项任务"
2616
2748
  ] }),
2617
- t.pendingCount > 0 && /* @__PURE__ */ j("small", { children: [t.pendingCount, " 项待处理"] })
2749
+ t.pendingCount > 0 && /* @__PURE__ */ A("small", { children: [t.pendingCount, " 项待处理"] })
2618
2750
  ]
2619
2751
  }, t.teamRunId)),
2620
- !a.runSummaries.length && /* @__PURE__ */ A("p", {
2752
+ !o.runSummaries.length && /* @__PURE__ */ k("p", {
2621
2753
  className: "team-muted",
2622
2754
  children: "还没有协作任务。从一个目标开始。"
2623
2755
  }),
2624
2756
  _("runSummaries", "更多团队任务"),
2625
2757
  e.operations
2626
2758
  ]
2627
- }), /* @__PURE__ */ j("div", {
2759
+ }), /* @__PURE__ */ A("div", {
2628
2760
  className: "team-cloud-main",
2629
- children: [e.newGoal ? /* @__PURE__ */ j("div", {
2761
+ children: [e.newGoal ? /* @__PURE__ */ A("div", {
2630
2762
  className: "team-cloud-goal",
2631
2763
  children: [
2632
- /* @__PURE__ */ A("span", {
2764
+ /* @__PURE__ */ k("span", {
2633
2765
  className: "team-eyebrow",
2634
2766
  children: "新的协作任务"
2635
2767
  }),
2636
- /* @__PURE__ */ A("h2", { children: "这次需要团队完成什么?" }),
2637
- /* @__PURE__ */ A("p", { children: "描述目标和交付要求。任务记录与其他协作独立保存。" })
2768
+ /* @__PURE__ */ k("h2", { children: "这次需要团队完成什么?" }),
2769
+ /* @__PURE__ */ k("p", { children: "描述目标和交付要求。任务记录与其他协作独立保存。" })
2638
2770
  ]
2639
- }) : /* @__PURE__ */ j(k, { children: [
2640
- v && /* @__PURE__ */ j("header", {
2771
+ }) : /* @__PURE__ */ A(O, { children: [
2772
+ v && /* @__PURE__ */ A("header", {
2641
2773
  className: "team-cloud-run-header",
2642
2774
  children: [
2643
- /* @__PURE__ */ A("h2", { children: v.goal }),
2644
- /* @__PURE__ */ j("div", {
2775
+ /* @__PURE__ */ k("h2", { children: v.goal }),
2776
+ /* @__PURE__ */ A("div", {
2645
2777
  className: "team-task-actions",
2646
2778
  children: [
2647
- /* @__PURE__ */ A(B, { status: v.status }),
2648
- v.dispatchSuspended && /* @__PURE__ */ A("span", { children: "已暂停派发" }),
2649
- g(v.status) && v.status !== "cancel_requested" && e.onControl && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
2779
+ /* @__PURE__ */ k(B, { status: v.status }),
2780
+ v.dispatchSuspended && /* @__PURE__ */ k("span", { children: "已暂停派发" }),
2781
+ h(v.status) && v.status !== "cancel_requested" && e.onControl && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
2650
2782
  className: "team-button",
2651
2783
  type: "button",
2652
- disabled: !n,
2784
+ disabled: !r,
2653
2785
  onClick: () => e.onControl?.(v.dispatchSuspended ? "resume_dispatch" : "suspend_dispatch"),
2654
2786
  children: v.dispatchSuspended ? "恢复派发" : "暂停派发"
2655
- }), /* @__PURE__ */ A("button", {
2787
+ }), /* @__PURE__ */ k("button", {
2656
2788
  className: "team-button team-danger",
2657
2789
  type: "button",
2658
- disabled: !n,
2790
+ disabled: !r,
2659
2791
  onClick: () => e.onControl?.("stop"),
2660
2792
  children: "停止任务"
2661
2793
  })] })
2662
2794
  ]
2663
2795
  }),
2664
- v.reason && /* @__PURE__ */ A("p", {
2796
+ v.reason && /* @__PURE__ */ k("p", {
2665
2797
  className: "team-muted",
2666
2798
  children: ye(v.reason)
2667
2799
  }),
2668
- v.status === "awaiting_acceptance" && e.onAcceptance && /* @__PURE__ */ j("div", {
2800
+ v.status === "awaiting_acceptance" && e.onAcceptance && /* @__PURE__ */ A("div", {
2669
2801
  className: "team-cloud-acceptance",
2670
2802
  children: [
2671
- /* @__PURE__ */ A("p", { children: "请查看成果后验收。" }),
2672
- /* @__PURE__ */ j("label", {
2803
+ /* @__PURE__ */ k("p", { children: "请查看成果后验收。" }),
2804
+ /* @__PURE__ */ A("label", {
2673
2805
  className: "team-field",
2674
- children: ["修改意见", /* @__PURE__ */ A("textarea", {
2806
+ children: ["修改意见", /* @__PURE__ */ k("textarea", {
2675
2807
  rows: 2,
2676
2808
  value: l,
2677
2809
  maxLength: 2e3,
2678
2810
  onChange: (e) => u(e.target.value),
2679
- disabled: !n
2811
+ disabled: !r
2680
2812
  })]
2681
2813
  }),
2682
- /* @__PURE__ */ A("button", {
2814
+ /* @__PURE__ */ k("button", {
2683
2815
  className: "team-button",
2684
- disabled: !n || !l.trim(),
2816
+ disabled: !r || !l.trim(),
2685
2817
  onClick: () => e.onAcceptance?.("request_changes", l.trim()),
2686
2818
  children: "提出修改"
2687
2819
  }),
2688
- /* @__PURE__ */ A("button", {
2820
+ /* @__PURE__ */ k("button", {
2689
2821
  className: "team-button team-primary",
2690
- disabled: !n,
2822
+ disabled: !r,
2691
2823
  onClick: () => e.onAcceptance?.("accept"),
2692
2824
  children: "验收通过"
2693
2825
  })
2694
2826
  ]
2695
2827
  }),
2696
- v.leaderStandby && /* @__PURE__ */ A(Se, { value: v.leaderStandby })
2828
+ v.leaderStandby && /* @__PURE__ */ k(Se, { value: v.leaderStandby })
2697
2829
  ]
2698
2830
  }),
2699
- /* @__PURE__ */ A("div", {
2831
+ /* @__PURE__ */ k("div", {
2700
2832
  className: "team-cloud-tabs",
2701
2833
  role: "tablist",
2702
2834
  "aria-label": "任务工作区",
@@ -2707,7 +2839,7 @@ function Te(e) {
2707
2839
  "approvals",
2708
2840
  "members",
2709
2841
  "effects"
2710
- ].filter((t) => t !== "effects" || e.effects).map((e) => /* @__PURE__ */ j("button", {
2842
+ ].filter((t) => t !== "effects" || e.effects).map((e) => /* @__PURE__ */ A("button", {
2711
2843
  type: "button",
2712
2844
  role: "tab",
2713
2845
  id: `${d}-${e}`,
@@ -2724,9 +2856,9 @@ function Te(e) {
2724
2856
  }[e], e === "approvals" && v?.pendingCount ? ` (${v.pendingCount})` : ""]
2725
2857
  }, e))
2726
2858
  }),
2727
- /* @__PURE__ */ j("div", {
2859
+ /* @__PURE__ */ A("div", {
2728
2860
  ref: f,
2729
- onScroll: h,
2861
+ onScroll: g,
2730
2862
  className: "team-cloud-panel",
2731
2863
  role: "tabpanel",
2732
2864
  id: `${d}-panel`,
@@ -2734,54 +2866,54 @@ function Te(e) {
2734
2866
  tabIndex: 0,
2735
2867
  children: [
2736
2868
  s === "effects" && e.effects,
2737
- s === "messages" && /* @__PURE__ */ j(k, { children: [
2869
+ s === "messages" && /* @__PURE__ */ A(O, { children: [
2738
2870
  _("recentMessages", "查看更早的消息"),
2739
- a.recentMessages.filter((e) => e.visibility === "public").map((e) => /* @__PURE__ */ A("article", {
2871
+ o.recentMessages.filter((e) => e.visibility === "public").map((e) => /* @__PURE__ */ k("article", {
2740
2872
  className: "team-message",
2741
2873
  "data-message-id": e.messageId,
2742
2874
  "data-role": e.groupRole,
2743
- children: /* @__PURE__ */ j("div", {
2875
+ children: /* @__PURE__ */ A("div", {
2744
2876
  className: "team-message-main",
2745
- children: [/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("strong", { children: e.senderName }), /* @__PURE__ */ A("time", {
2877
+ children: [/* @__PURE__ */ A("header", { children: [/* @__PURE__ */ k("strong", { children: e.senderName }), /* @__PURE__ */ k("time", {
2746
2878
  dateTime: e.createdAt,
2747
2879
  children: new Date(e.createdAt).toLocaleTimeString([], {
2748
2880
  hour: "2-digit",
2749
2881
  minute: "2-digit"
2750
2882
  })
2751
- })] }), /* @__PURE__ */ A("div", {
2883
+ })] }), /* @__PURE__ */ k("div", {
2752
2884
  className: "team-message-body",
2753
- children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */ A(r, { content: e.text }, t) : /* @__PURE__ */ A("span", {
2885
+ children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */ k(n, { content: e.text }, t) : /* @__PURE__ */ k("span", {
2754
2886
  className: "team-attachment",
2755
2887
  children: e.name || "附件"
2756
2888
  }, t))
2757
2889
  })]
2758
2890
  })
2759
2891
  }, e.messageId)),
2760
- !a.recentMessages.length && /* @__PURE__ */ A("p", {
2892
+ !o.recentMessages.length && /* @__PURE__ */ k("p", {
2761
2893
  className: "team-muted",
2762
2894
  children: v ? "这项协作还没有公开消息。" : "选择任务查看消息,或新建协作目标。"
2763
2895
  })
2764
2896
  ] }),
2765
- s === "tasks" && /* @__PURE__ */ j(k, { children: [
2766
- a.taskSummaries.map((t) => e.renderTasks?.(t) ?? /* @__PURE__ */ j("article", { children: [/* @__PURE__ */ A("h3", { children: t.title }), /* @__PURE__ */ A(B, { status: t.status })] }, t.taskId)),
2767
- !a.taskSummaries.length && /* @__PURE__ */ A("p", {
2897
+ s === "tasks" && /* @__PURE__ */ A(O, { children: [
2898
+ o.taskSummaries.map((t) => e.renderTasks?.(t) ?? /* @__PURE__ */ A("article", { children: [/* @__PURE__ */ k("h3", { children: t.title }), /* @__PURE__ */ k(B, { status: t.status })] }, t.taskId)),
2899
+ !o.taskSummaries.length && /* @__PURE__ */ k("p", {
2768
2900
  className: "team-muted",
2769
2901
  children: "尚无分工任务。"
2770
2902
  }),
2771
2903
  _("taskSummaries")
2772
2904
  ] }),
2773
- s === "approvals" && /* @__PURE__ */ j(k, { children: [
2774
- a.pendingInteractions.map((t) => e.renderInteraction?.(t) ?? /* @__PURE__ */ A("p", { children: t.title }, o(t))),
2775
- !a.pendingInteractions.length && /* @__PURE__ */ A("p", {
2905
+ s === "approvals" && /* @__PURE__ */ A(O, { children: [
2906
+ o.pendingInteractions.map((t) => e.renderInteraction?.(t) ?? /* @__PURE__ */ k("p", { children: t.title }, a(t))),
2907
+ !o.pendingInteractions.length && /* @__PURE__ */ k("p", {
2776
2908
  className: "team-muted",
2777
2909
  children: "当前任务没有待处理事项。"
2778
2910
  }),
2779
2911
  _("pendingInteractions")
2780
2912
  ] }),
2781
- s === "artifacts" && /* @__PURE__ */ j(k, { children: [
2782
- a.artifactSummaries.map((t) => /* @__PURE__ */ j("article", {
2913
+ s === "artifacts" && /* @__PURE__ */ A(O, { children: [
2914
+ o.artifactSummaries.map((t) => /* @__PURE__ */ A("article", {
2783
2915
  className: "team-cloud-artifact",
2784
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("strong", { children: t.name }), /* @__PURE__ */ j("p", {
2916
+ children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("strong", { children: t.name }), /* @__PURE__ */ A("p", {
2785
2917
  className: "team-muted",
2786
2918
  children: [
2787
2919
  t.mediaType,
@@ -2790,23 +2922,23 @@ function Te(e) {
2790
2922
  " 字节 · ",
2791
2923
  t.state === "ready" ? "已就绪" : t.state === "failed" ? "准备失败" : "准备中"
2792
2924
  ]
2793
- })] }), t.state === "ready" && e.artifactUrl && /* @__PURE__ */ A("a", {
2925
+ })] }), t.state === "ready" && e.artifactUrl && /* @__PURE__ */ k("a", {
2794
2926
  href: e.artifactUrl(t.artifactId, t.teamRunId),
2795
2927
  download: t.name,
2796
2928
  children: "下载"
2797
2929
  })]
2798
2930
  }, t.artifactId)),
2799
- !a.artifactSummaries.length && /* @__PURE__ */ A("p", {
2931
+ !o.artifactSummaries.length && /* @__PURE__ */ k("p", {
2800
2932
  className: "team-muted",
2801
2933
  children: "交付物准备好后会显示在这里。"
2802
2934
  }),
2803
2935
  _("artifactSummaries")
2804
2936
  ] }),
2805
- s === "members" && /* @__PURE__ */ j(k, { children: [y.map((e) => /* @__PURE__ */ A("article", {
2937
+ s === "members" && /* @__PURE__ */ A(O, { children: [y.map((e) => /* @__PURE__ */ k("article", {
2806
2938
  className: "team-cloud-member",
2807
- children: /* @__PURE__ */ j("div", { children: [
2808
- /* @__PURE__ */ A("strong", { children: e.name }),
2809
- /* @__PURE__ */ j("span", {
2939
+ children: /* @__PURE__ */ A("div", { children: [
2940
+ /* @__PURE__ */ k("strong", { children: e.name }),
2941
+ /* @__PURE__ */ A("span", {
2810
2942
  className: "team-muted",
2811
2943
  children: [
2812
2944
  " ",
@@ -2815,8 +2947,8 @@ function Te(e) {
2815
2947
  e.binding.kind === "local_build" ? "本地节点" : "云端节点"
2816
2948
  ]
2817
2949
  }),
2818
- /* @__PURE__ */ A("p", { children: e.responsibility }),
2819
- /* @__PURE__ */ j("p", {
2950
+ /* @__PURE__ */ k("p", { children: e.responsibility }),
2951
+ /* @__PURE__ */ A("p", {
2820
2952
  className: "team-muted",
2821
2953
  children: [
2822
2954
  e.binding.availability.state === "ready" ? "执行环境就绪" : e.binding.availability.state === "unchecked" ? "执行环境待检查" : "执行环境不可用",
@@ -2824,12 +2956,12 @@ function Te(e) {
2824
2956
  Z[e.executionStatus]
2825
2957
  ]
2826
2958
  }),
2827
- (e.reason || e.binding.availability.reason) && /* @__PURE__ */ A("p", {
2959
+ (e.reason || e.binding.availability.reason) && /* @__PURE__ */ k("p", {
2828
2960
  role: "status",
2829
2961
  children: e.reason || e.binding.availability.reason
2830
2962
  })
2831
2963
  ] })
2832
- }, e.memberId)), /* @__PURE__ */ A("p", {
2964
+ }, e.memberId)), /* @__PURE__ */ k("p", {
2833
2965
  className: "team-muted",
2834
2966
  children: "节点环境与执行状态来自最近同步;离开页面只停止观察。"
2835
2967
  })] })
@@ -2841,20 +2973,20 @@ function Te(e) {
2841
2973
  ]
2842
2974
  });
2843
2975
  }
2844
- function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage: a, value: o, onChange: c, canWrite: l, onSubmit: u, onCancelNew: f }) {
2845
- let p = C(), m = E(null), h = t(), [_] = D(() => new d(n, e)), v = O(_.subscribe, _.getSnapshot, _.getSnapshot);
2846
- S(() => () => _.dispose(), [_]), S(() => {
2976
+ function Ee({ scope: t, product: n, observation: r, newGoal: i, pendingMessage: a, value: s, onChange: c, canWrite: l, onSubmit: d, onCancelNew: f }) {
2977
+ let p = S(), m = T(null), g = e(), [_] = E(() => new u(n, t)), v = D(_.subscribe, _.getSnapshot, _.getSnapshot);
2978
+ x(() => () => _.dispose(), [_]), x(() => {
2847
2979
  l || _.cancel();
2848
2980
  }, [l, _]);
2849
- let [y, b] = D(""), [x, w] = D(!1), [T, M] = D(""), N = r.projection?.snapshot, P = i ? null : N?.selectedRun, F = i || !P, I = l && !a && (F || g(P.status) && P.status !== "cancel_requested"), L = !F || v.files.length === 0 || v.state === "ready", R = s(v.state);
2981
+ let [y, b] = E(""), [C, w] = E(!1), [j, M] = E(""), N = r.projection?.snapshot, P = i ? null : N?.selectedRun, F = i || !P, I = l && !a && (F || h(P.status) && P.status !== "cancel_requested"), L = !F || v.files.length === 0 || v.state === "ready", R = o(v.state);
2850
2982
  async function z() {
2851
- if (!(!I || x || !o.trim() || !L)) {
2983
+ if (!(!I || C || !s.trim() || !L)) {
2852
2984
  w(!0), M("");
2853
2985
  try {
2854
- await u({
2986
+ await d({
2855
2987
  parts: [{
2856
2988
  kind: "text",
2857
- text: o.trim()
2989
+ text: s.trim()
2858
2990
  }],
2859
2991
  mentions: F || !y ? [] : [y],
2860
2992
  intent: F ? "start_goal" : y ? "directed" : "followup",
@@ -2868,48 +3000,48 @@ function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage:
2868
3000
  }
2869
3001
  }
2870
3002
  }
2871
- return /* @__PURE__ */ j("form", {
3003
+ return /* @__PURE__ */ A("form", {
2872
3004
  className: "team-composer-wrap",
2873
3005
  onSubmit: (e) => {
2874
3006
  e.preventDefault(), z();
2875
3007
  },
2876
3008
  children: [
2877
- a && /* @__PURE__ */ A("p", {
3009
+ a && /* @__PURE__ */ k("p", {
2878
3010
  className: "team-cloud-notice",
2879
3011
  role: "status",
2880
3012
  children: "上一条消息的接收结果未确认,请先在操作记录中核对原单。"
2881
3013
  }),
2882
- T && /* @__PURE__ */ A("p", {
3014
+ j && /* @__PURE__ */ k("p", {
2883
3015
  className: "team-inline-error",
2884
3016
  role: "alert",
2885
- children: T
3017
+ children: j
2886
3018
  }),
2887
- /* @__PURE__ */ j("div", {
3019
+ /* @__PURE__ */ A("div", {
2888
3020
  className: "team-composer",
2889
3021
  children: [
2890
- /* @__PURE__ */ A("label", {
3022
+ /* @__PURE__ */ k("label", {
2891
3023
  className: "team-sr-only",
2892
3024
  htmlFor: p,
2893
3025
  children: F ? "团队协作目标" : "给团队的消息"
2894
3026
  }),
2895
- /* @__PURE__ */ A("textarea", {
3027
+ /* @__PURE__ */ k("textarea", {
2896
3028
  id: p,
2897
3029
  rows: 3,
2898
- value: o,
3030
+ value: s,
2899
3031
  onChange: (e) => c(e.target.value),
2900
- disabled: x,
2901
- placeholder: F ? "描述目标、预期成果和约束…" : P && !g(P.status) ? "此任务已结束,可新建任务继续协作" : l ? "补充要求,或向成员提问…" : "可先整理草稿,恢复连接后再发送…",
3032
+ disabled: C,
3033
+ placeholder: F ? "描述目标、预期成果和约束…" : P && !h(P.status) ? "此任务已结束,可新建任务继续协作" : l ? "补充要求,或向成员提问…" : "可先整理草稿,恢复连接后再发送…",
2902
3034
  onKeyDown: (e) => {
2903
- e.key === "Enter" && !e.shiftKey && !h(e) && (e.preventDefault(), z());
3035
+ e.key === "Enter" && !e.shiftKey && !g(e) && (e.preventDefault(), z());
2904
3036
  }
2905
3037
  }),
2906
- F && v.files.length > 0 && /* @__PURE__ */ j("section", {
3038
+ F && v.files.length > 0 && /* @__PURE__ */ A("section", {
2907
3039
  className: "team-cloud-materials",
2908
3040
  "aria-label": "任务材料",
2909
3041
  children: [
2910
- /* @__PURE__ */ j("div", {
3042
+ /* @__PURE__ */ A("div", {
2911
3043
  className: "team-cloud-material-status",
2912
- children: [/* @__PURE__ */ j("span", {
3044
+ children: [/* @__PURE__ */ A("span", {
2913
3045
  role: "status",
2914
3046
  children: [{
2915
3047
  idle: "",
@@ -2921,34 +3053,34 @@ function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage:
2921
3053
  failed: "上传未完成",
2922
3054
  cancelled: "上传已取消"
2923
3055
  }[v.state], R ? ` · ${v.completed}/${v.files.length}` : ""]
2924
- }), /* @__PURE__ */ j("span", { children: [v.files.length, " 个文件"] })]
3056
+ }), /* @__PURE__ */ A("span", { children: [v.files.length, " 个文件"] })]
2925
3057
  }),
2926
- /* @__PURE__ */ A("ul", { children: v.files.map((e, t) => /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("span", { children: e.name }), /* @__PURE__ */ j("span", { children: [e.size.toLocaleString(), " 字节"] })] }, `${t}:${e.name}`)) }),
2927
- v.error && /* @__PURE__ */ A("p", {
3058
+ /* @__PURE__ */ k("ul", { children: v.files.map((e, t) => /* @__PURE__ */ A("li", { children: [/* @__PURE__ */ k("span", { children: e.name }), /* @__PURE__ */ A("span", { children: [e.size.toLocaleString(), " 字节"] })] }, `${t}:${e.name}`)) }),
3059
+ v.error && /* @__PURE__ */ k("p", {
2928
3060
  className: "team-inline-error",
2929
3061
  role: "alert",
2930
3062
  children: v.error
2931
3063
  }),
2932
- /* @__PURE__ */ j("div", {
3064
+ /* @__PURE__ */ A("div", {
2933
3065
  className: "team-task-actions",
2934
3066
  children: [
2935
- R && /* @__PURE__ */ A("button", {
3067
+ R && /* @__PURE__ */ k("button", {
2936
3068
  type: "button",
2937
3069
  className: "team-text-button",
2938
3070
  onClick: () => _.cancel(),
2939
3071
  children: "取消上传"
2940
3072
  }),
2941
- ["failed", "cancelled"].includes(v.state) && /* @__PURE__ */ A("button", {
3073
+ ["failed", "cancelled"].includes(v.state) && /* @__PURE__ */ k("button", {
2942
3074
  type: "button",
2943
3075
  className: "team-text-button",
2944
- disabled: !I || x,
3076
+ disabled: !I || C,
2945
3077
  onClick: () => void _.retry(),
2946
3078
  children: "重试上传"
2947
3079
  }),
2948
- /* @__PURE__ */ A("button", {
3080
+ /* @__PURE__ */ k("button", {
2949
3081
  type: "button",
2950
3082
  className: "team-text-button",
2951
- disabled: x || a,
3083
+ disabled: C || a,
2952
3084
  onClick: () => _.clear(),
2953
3085
  children: "移除材料"
2954
3086
  })
@@ -2956,23 +3088,23 @@ function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage:
2956
3088
  })
2957
3089
  ]
2958
3090
  }),
2959
- /* @__PURE__ */ j("div", {
3091
+ /* @__PURE__ */ A("div", {
2960
3092
  className: "team-composer-toolbar",
2961
- children: [/* @__PURE__ */ j("div", { children: [
2962
- !F && /* @__PURE__ */ j("select", {
3093
+ children: [/* @__PURE__ */ A("div", { children: [
3094
+ !F && /* @__PURE__ */ A("select", {
2963
3095
  "aria-label": "接收成员",
2964
3096
  value: y,
2965
3097
  onChange: (e) => b(e.target.value),
2966
- disabled: x || !I,
2967
- children: [/* @__PURE__ */ A("option", {
3098
+ disabled: C || !I,
3099
+ children: [/* @__PURE__ */ k("option", {
2968
3100
  value: "",
2969
3101
  children: "发给 Leader"
2970
- }), N?.selectedRunMembers.filter((e) => e.status === "active").map((e) => /* @__PURE__ */ j("option", {
3102
+ }), N?.selectedRunMembers.filter((e) => e.status === "active").map((e) => /* @__PURE__ */ A("option", {
2971
3103
  value: e.memberId,
2972
3104
  children: ["@", e.name]
2973
3105
  }, e.memberId))]
2974
3106
  }),
2975
- F && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("input", {
3107
+ F && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("input", {
2976
3108
  ref: m,
2977
3109
  type: "file",
2978
3110
  multiple: !0,
@@ -2980,32 +3112,32 @@ function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage:
2980
3112
  "aria-label": "选择任务材料",
2981
3113
  onChange: (e) => {
2982
3114
  let t = Array.from(e.target.files ?? []);
2983
- e.target.value = "", I && !x && t.length && _.select(t);
3115
+ e.target.value = "", I && !C && t.length && _.select(t);
2984
3116
  }
2985
- }), /* @__PURE__ */ A("button", {
3117
+ }), /* @__PURE__ */ k("button", {
2986
3118
  className: "team-text-button",
2987
3119
  type: "button",
2988
- disabled: !I || x || R,
3120
+ disabled: !I || C || R,
2989
3121
  onClick: () => m.current?.click(),
2990
3122
  children: v.files.length ? "重新选择材料" : "添加材料"
2991
3123
  })] }),
2992
- i && /* @__PURE__ */ A("button", {
3124
+ i && /* @__PURE__ */ k("button", {
2993
3125
  className: "team-text-button",
2994
3126
  type: "button",
2995
- disabled: x || a,
3127
+ disabled: C || a,
2996
3128
  onClick: f,
2997
3129
  children: "返回任务"
2998
3130
  })
2999
- ] }), /* @__PURE__ */ A("button", {
3131
+ ] }), /* @__PURE__ */ k("button", {
3000
3132
  className: "team-button team-primary",
3001
3133
  type: "submit",
3002
- disabled: !I || x || !o.trim() || !L,
3003
- children: x ? "正在核对" : F ? "开始协作" : "发送"
3134
+ disabled: !I || C || !s.trim() || !L,
3135
+ children: C ? "正在核对" : F ? "开始协作" : "发送"
3004
3136
  })]
3005
3137
  })
3006
3138
  ]
3007
3139
  }),
3008
- /* @__PURE__ */ j("p", {
3140
+ /* @__PURE__ */ A("p", {
3009
3141
  className: "team-composer-help",
3010
3142
  children: ["Enter 发送 · Shift + Enter 换行", F ? " · 单个材料 ≤20 MiB,总计 ≤64 MiB" : " · 接收回执不代表执行完成"]
3011
3143
  })
@@ -3013,8 +3145,8 @@ function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage:
3013
3145
  });
3014
3146
  }
3015
3147
  function De({ task: e, scope: t, product: n, canWrite: r, command: i }) {
3016
- let [a, o] = D(!1), [s, c] = D(null), [l, u] = D("");
3017
- return S(() => {
3148
+ let [a, o] = E(!1), [s, c] = E(null), [l, u] = E("");
3149
+ return x(() => {
3018
3150
  if (!a) return;
3019
3151
  let r = new AbortController();
3020
3152
  return n.task(t, e.taskId, e.teamRunId, r.signal).then((t) => {
@@ -3030,23 +3162,23 @@ function De({ task: e, scope: t, product: n, canWrite: r, command: i }) {
3030
3162
  n,
3031
3163
  t,
3032
3164
  e
3033
- ]), /* @__PURE__ */ j("article", {
3165
+ ]), /* @__PURE__ */ A("article", {
3034
3166
  className: "team-cloud-task",
3035
3167
  children: [
3036
- /* @__PURE__ */ j("button", {
3168
+ /* @__PURE__ */ A("button", {
3037
3169
  className: "team-cloud-task-title",
3038
3170
  type: "button",
3039
3171
  "aria-expanded": a,
3040
3172
  onClick: () => {
3041
3173
  o(!a), u("");
3042
3174
  },
3043
- children: [/* @__PURE__ */ A("strong", { children: e.title }), /* @__PURE__ */ A(B, { status: e.status })]
3175
+ children: [/* @__PURE__ */ k("strong", { children: e.title }), /* @__PURE__ */ k(B, { status: e.status })]
3044
3176
  }),
3045
- e.reason && /* @__PURE__ */ A("p", {
3177
+ e.reason && /* @__PURE__ */ k("p", {
3046
3178
  className: "team-muted",
3047
3179
  children: ye(e.reason)
3048
3180
  }),
3049
- a && (s ? /* @__PURE__ */ A(re, {
3181
+ a && (s ? /* @__PURE__ */ k(re, {
3050
3182
  task: s,
3051
3183
  members: [],
3052
3184
  onAction: r ? (t, n, r) => i(`tasks/${e.taskId}/actions`, {
@@ -3054,7 +3186,7 @@ function De({ task: e, scope: t, product: n, canWrite: r, command: i }) {
3054
3186
  expectedRevision: e.revision,
3055
3187
  ...r ? { reason: r } : {}
3056
3188
  }) : void 0
3057
- }) : /* @__PURE__ */ A("p", {
3189
+ }) : /* @__PURE__ */ k("p", {
3058
3190
  role: l ? "alert" : "status",
3059
3191
  children: l || "正在读取任务详情…"
3060
3192
  }))
@@ -3067,89 +3199,89 @@ function Q(e) {
3067
3199
  let t = e;
3068
3200
  return t.secret === !0 || t.writeOnly === !0 || t.format === "password" || Object.values(t).some(Q);
3069
3201
  }
3070
- function $({ summary: t, scope: r, product: i, canWrite: a, command: o }) {
3071
- let [s, c] = D(null), [l, u] = D(!1), [d, f] = D({}), [p, m] = D(""), [h, g] = D(!1), [_, v] = D(!1);
3072
- S(() => {
3073
- if (!l) return;
3074
- let e = new AbortController();
3075
- return i.interaction(r, t, e.signal).then((t) => {
3076
- e.signal.aborted || c(t);
3202
+ function $({ summary: e, scope: n, product: r, canWrite: i, command: a }) {
3203
+ let [o, s] = E(null), [c, l] = E(!1), [u, d] = E({}), [f, p] = E(""), [m, h] = E(!1), [g, _] = E(!1);
3204
+ x(() => {
3205
+ if (!c) return;
3206
+ let t = new AbortController();
3207
+ return r.interaction(n, e, t.signal).then((e) => {
3208
+ t.signal.aborted || s(e);
3077
3209
  }).catch(() => {
3078
- e.signal.aborted || m("审批详情读取失败,请关闭后重试或刷新。");
3079
- }), () => e.abort();
3210
+ t.signal.aborted || p("审批详情读取失败,请关闭后重试或刷新。");
3211
+ }), () => t.abort();
3080
3212
  }, [
3081
- l,
3213
+ c,
3214
+ n,
3082
3215
  r,
3083
- i,
3084
- t
3216
+ e
3085
3217
  ]);
3086
- async function y(e, t) {
3087
- if (!(!a || !s || s.status !== "pending" || h || _ || Q(s.requestSchema))) {
3088
- g(!0), m("");
3218
+ async function v(e, t) {
3219
+ if (!(!i || !o || o.status !== "pending" || m || g || Q(o.requestSchema))) {
3220
+ h(!0), p("");
3089
3221
  try {
3090
- await o("interactions", {
3091
- ref: s.ref,
3092
- expectedRevision: s.revision,
3222
+ await a("interactions", {
3223
+ ref: o.ref,
3224
+ expectedRevision: o.revision,
3093
3225
  action: e,
3094
3226
  response: t
3095
- }), v(!0);
3227
+ }), _(!0);
3096
3228
  } catch (e) {
3097
- m(e instanceof Error ? e.message : "审批提交失败。");
3229
+ p(e instanceof Error ? e.message : "审批提交失败。");
3098
3230
  } finally {
3099
- g(!1);
3231
+ h(!1);
3100
3232
  }
3101
3233
  }
3102
3234
  }
3103
- return /* @__PURE__ */ j("article", {
3235
+ return /* @__PURE__ */ A("article", {
3104
3236
  className: "team-interaction-card",
3105
3237
  children: [
3106
- /* @__PURE__ */ A("h3", { children: t.title }),
3107
- /* @__PURE__ */ A("button", {
3238
+ /* @__PURE__ */ k("h3", { children: e.title }),
3239
+ /* @__PURE__ */ k("button", {
3108
3240
  className: "team-text-button",
3109
3241
  type: "button",
3110
- "aria-expanded": l,
3242
+ "aria-expanded": c,
3111
3243
  onClick: () => {
3112
- u(!l), m("");
3244
+ l(!c), p("");
3113
3245
  },
3114
- children: l ? "收起详情" : "查看并处理"
3246
+ children: c ? "收起详情" : "查看并处理"
3115
3247
  }),
3116
- l && (s ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(M, { message: s.message }), _ || s.status !== "pending" ? /* @__PURE__ */ A("p", {
3248
+ c && (o ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(j, { message: o.message }), g || o.status !== "pending" ? /* @__PURE__ */ k("p", {
3117
3249
  role: "status",
3118
- children: _ || s.status === "resolving" ? "服务端已接收,等待执行端确认。" : s.status === "expired" ? "该事项已过期。" : s.status === "cancelled" ? "该事项已取消。" : "该事项已处理。"
3119
- }) : Q(s.requestSchema) ? /* @__PURE__ */ A("p", {
3250
+ children: g || o.status === "resolving" ? "服务端已接收,等待执行端确认。" : o.status === "expired" ? "该事项已过期。" : o.status === "cancelled" ? "该事项已取消。" : "该事项已处理。"
3251
+ }) : Q(o.requestSchema) ? /* @__PURE__ */ k("p", {
3120
3252
  role: "status",
3121
3253
  children: "此表单包含敏感字段,无法通过浏览器持久队列提交,请使用安全凭据配置入口。"
3122
- }) : s.kind === "input" ? s.requestSchema && e(s.requestSchema).length > 0 ? /* @__PURE__ */ A(n, {
3123
- schema: s.requestSchema,
3124
- values: d,
3125
- onChange: f,
3126
- disabled: !a || h,
3127
- onSubmit: () => void y("submit", d),
3128
- onCancel: () => void y("cancel", {})
3129
- }) : /* @__PURE__ */ A("p", {
3254
+ }) : o.kind === "input" ? o.requestSchema && t(o.requestSchema).length > 0 ? /* @__PURE__ */ k(N, {
3255
+ schema: o.requestSchema,
3256
+ values: u,
3257
+ onChange: d,
3258
+ disabled: !i || m,
3259
+ onSubmit: () => void v("submit", u),
3260
+ onCancel: () => void v("cancel", {})
3261
+ }) : /* @__PURE__ */ k("p", {
3130
3262
  role: "status",
3131
3263
  children: "缺少输入表单,暂不能提交。"
3132
- }) : /* @__PURE__ */ j("div", {
3264
+ }) : /* @__PURE__ */ A("div", {
3133
3265
  className: "team-task-actions",
3134
- children: [/* @__PURE__ */ A("button", {
3266
+ children: [/* @__PURE__ */ k("button", {
3135
3267
  className: "team-button",
3136
- disabled: !a || h,
3137
- onClick: () => void y("reject", { approved: !1 }),
3268
+ disabled: !i || m,
3269
+ onClick: () => void v("reject", { approved: !1 }),
3138
3270
  children: "拒绝"
3139
- }), /* @__PURE__ */ A("button", {
3271
+ }), /* @__PURE__ */ k("button", {
3140
3272
  className: "team-button team-primary",
3141
- disabled: !a || h,
3142
- onClick: () => void y("approve", { approved: !0 }),
3273
+ disabled: !i || m,
3274
+ onClick: () => void v("approve", { approved: !0 }),
3143
3275
  children: "同意"
3144
3276
  })]
3145
- })] }) : /* @__PURE__ */ A("p", {
3277
+ })] }) : /* @__PURE__ */ k("p", {
3146
3278
  role: "status",
3147
- children: p || "正在读取审批详情…"
3279
+ children: f || "正在读取审批详情…"
3148
3280
  })),
3149
- p && s && /* @__PURE__ */ A("p", {
3281
+ f && o && /* @__PURE__ */ k("p", {
3150
3282
  role: "alert",
3151
3283
  className: "team-inline-error",
3152
- children: p
3284
+ children: f
3153
3285
  })
3154
3286
  ]
3155
3287
  });