@pi-harness/pi-harness 0.1.13 → 0.1.14

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 (1333) hide show
  1. package/README.md +678 -2
  2. package/apps/web/dist/assets/index-BVI_IS-R.css +2 -0
  3. package/apps/web/dist/assets/index-C98SJjJd.js +22 -0
  4. package/apps/web/dist/index.html +2 -2
  5. package/apps/web/package.json +6 -6
  6. package/node_modules/@pi-harness/api-gateway/dist/index.d.ts.map +1 -1
  7. package/node_modules/@pi-harness/api-gateway/dist/index.js +97 -9
  8. package/node_modules/@pi-harness/api-gateway/dist/index.js.map +1 -1
  9. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/agent-teams.json +6 -6
  10. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/anchored-standard.json +1 -1
  11. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/annotation.json +1 -2
  12. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/archify.json +1 -1
  13. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/at-file.json +11 -5
  14. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/auto-mode.json +1 -1
  15. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/better-sidebar.json +1 -1
  16. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/browser-fetch.json +12 -5
  17. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/browser-session.json +14 -8
  18. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/canvas-draw.json +3 -4
  19. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/change-verifier.json +1 -1
  20. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cleaner.json +11 -6
  21. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cli-notifier.json +5 -5
  22. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/code2skill.json +5 -5
  23. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/colleague-skill.json +1 -2
  24. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/context-doctor.json +12 -7
  25. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/context.json +10 -5
  26. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cordis-group.json +2 -2
  27. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cordis-logger-console.json +4 -4
  28. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cordis-timer.json +3 -3
  29. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cost-meter.json +9 -6
  30. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/dependency-checker.json +13 -10
  31. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +10 -5
  32. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/fail-logger.json +11 -6
  33. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/genui.json +7 -5
  34. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +13 -8
  35. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/graph-memory.json +13 -7
  36. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/history-compressor.json +1 -1
  37. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/hol-guard.json +1 -1
  38. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/i18n-pair.json +9 -6
  39. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/image-compressor.json +1 -1
  40. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/llm-verifier.json +1 -1
  41. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mcp-client.json +12 -7
  42. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mcp-panel.json +1 -1
  43. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/memory.json +1 -1
  44. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +1 -1
  45. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mock-server.json +1 -1
  46. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/modlens.json +4 -4
  47. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/module-search.json +1 -1
  48. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +1 -1
  49. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/openpets.json +9 -5
  50. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plan-execute.json +1 -1
  51. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-check.json +1 -1
  52. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-dev.json +8 -6
  53. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-finder.json +1 -1
  54. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-radar.json +1 -1
  55. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-stars.json +15 -7
  56. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/prompt-guard.json +1 -1
  57. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/prompt-library.json +1 -1
  58. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/readme-gen.json +12 -8
  59. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/recall-unread.json +11 -6
  60. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/reverse-skill.json +1 -1
  61. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +1 -1
  62. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +1 -1
  63. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/secure-audit.json +1 -1
  64. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +1 -1
  65. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-bridge.json +13 -8
  66. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-compare.json +1 -1
  67. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-export.json +1 -1
  68. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-insights.json +12 -6
  69. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-search.json +1 -1
  70. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/skill-catalog.json +1 -1
  71. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/skill-guard.json +9 -5
  72. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/sql-lens.json +13 -7
  73. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/synapse.json +1 -1
  74. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/tab-manager.json +1 -1
  75. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/taskboard.json +1 -1
  76. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +1 -1
  77. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/test-harness.json +14 -7
  78. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/theme-studio.json +1 -1
  79. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/token-guard.json +12 -6
  80. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/turn-rewind.json +11 -6
  81. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +1 -1
  82. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +8 -5
  83. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/web-research.json +1 -1
  84. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +1 -1
  85. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/workspace-search.json +1 -1
  86. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/yaml-validator.json +8 -5
  87. package/node_modules/@pi-harness/api-gateway/package.json +1 -1
  88. package/node_modules/@pi-harness/cli/dist/node-stdio.d.ts.map +1 -1
  89. package/node_modules/@pi-harness/cli/dist/node-stdio.js +83 -20
  90. package/node_modules/@pi-harness/cli/dist/node-stdio.js.map +1 -1
  91. package/node_modules/@pi-harness/cli/package.json +1 -1
  92. package/node_modules/@pi-harness/core/dist/atomic-write.d.ts +8 -0
  93. package/node_modules/@pi-harness/core/dist/atomic-write.d.ts.map +1 -0
  94. package/node_modules/@pi-harness/core/dist/atomic-write.js +40 -0
  95. package/node_modules/@pi-harness/core/dist/atomic-write.js.map +1 -0
  96. package/node_modules/@pi-harness/core/dist/boot.d.ts.map +1 -1
  97. package/node_modules/@pi-harness/core/dist/boot.js +132 -10
  98. package/node_modules/@pi-harness/core/dist/boot.js.map +1 -1
  99. package/node_modules/@pi-harness/core/dist/bounded-file.d.ts +7 -0
  100. package/node_modules/@pi-harness/core/dist/bounded-file.d.ts.map +1 -0
  101. package/node_modules/@pi-harness/core/dist/bounded-file.js +50 -0
  102. package/node_modules/@pi-harness/core/dist/bounded-file.js.map +1 -0
  103. package/node_modules/@pi-harness/core/dist/config.d.ts +2 -0
  104. package/node_modules/@pi-harness/core/dist/config.d.ts.map +1 -1
  105. package/node_modules/@pi-harness/core/dist/config.js +21 -0
  106. package/node_modules/@pi-harness/core/dist/config.js.map +1 -1
  107. package/node_modules/@pi-harness/core/dist/cordis-timer.d.ts +15 -0
  108. package/node_modules/@pi-harness/core/dist/cordis-timer.d.ts.map +1 -0
  109. package/node_modules/@pi-harness/core/dist/cordis-timer.js +99 -0
  110. package/node_modules/@pi-harness/core/dist/cordis-timer.js.map +1 -0
  111. package/node_modules/@pi-harness/core/dist/plugins/agent-teams.d.ts +5 -1
  112. package/node_modules/@pi-harness/core/dist/plugins/agent-teams.d.ts.map +1 -1
  113. package/node_modules/@pi-harness/core/dist/plugins/agent-teams.js +986 -105
  114. package/node_modules/@pi-harness/core/dist/plugins/agent-teams.js.map +1 -1
  115. package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.d.ts +1 -0
  116. package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.d.ts.map +1 -1
  117. package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.js +39 -11
  118. package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.js.map +1 -1
  119. package/node_modules/@pi-harness/core/dist/plugins/annotation.d.ts +1 -0
  120. package/node_modules/@pi-harness/core/dist/plugins/annotation.d.ts.map +1 -1
  121. package/node_modules/@pi-harness/core/dist/plugins/annotation.js +35 -17
  122. package/node_modules/@pi-harness/core/dist/plugins/annotation.js.map +1 -1
  123. package/node_modules/@pi-harness/core/dist/plugins/archify.d.ts +1 -0
  124. package/node_modules/@pi-harness/core/dist/plugins/archify.d.ts.map +1 -1
  125. package/node_modules/@pi-harness/core/dist/plugins/archify.js +69 -22
  126. package/node_modules/@pi-harness/core/dist/plugins/archify.js.map +1 -1
  127. package/node_modules/@pi-harness/core/dist/plugins/at-file.d.ts +5 -1
  128. package/node_modules/@pi-harness/core/dist/plugins/at-file.d.ts.map +1 -1
  129. package/node_modules/@pi-harness/core/dist/plugins/at-file.js +120 -29
  130. package/node_modules/@pi-harness/core/dist/plugins/at-file.js.map +1 -1
  131. package/node_modules/@pi-harness/core/dist/plugins/auto-mode.d.ts.map +1 -1
  132. package/node_modules/@pi-harness/core/dist/plugins/auto-mode.js +89 -20
  133. package/node_modules/@pi-harness/core/dist/plugins/auto-mode.js.map +1 -1
  134. package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.d.ts +1 -0
  135. package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.d.ts.map +1 -1
  136. package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.js +14 -4
  137. package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.js.map +1 -1
  138. package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.d.ts +1 -0
  139. package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.d.ts.map +1 -1
  140. package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.js +288 -96
  141. package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.js.map +1 -1
  142. package/node_modules/@pi-harness/core/dist/plugins/browser-session.d.ts.map +1 -1
  143. package/node_modules/@pi-harness/core/dist/plugins/browser-session.js +445 -106
  144. package/node_modules/@pi-harness/core/dist/plugins/browser-session.js.map +1 -1
  145. package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.d.ts +1 -0
  146. package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.d.ts.map +1 -1
  147. package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.js +71 -19
  148. package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.js.map +1 -1
  149. package/node_modules/@pi-harness/core/dist/plugins/change-verifier.d.ts +1 -0
  150. package/node_modules/@pi-harness/core/dist/plugins/change-verifier.d.ts.map +1 -1
  151. package/node_modules/@pi-harness/core/dist/plugins/change-verifier.js +30 -9
  152. package/node_modules/@pi-harness/core/dist/plugins/change-verifier.js.map +1 -1
  153. package/node_modules/@pi-harness/core/dist/plugins/cleaner.d.ts +5 -1
  154. package/node_modules/@pi-harness/core/dist/plugins/cleaner.d.ts.map +1 -1
  155. package/node_modules/@pi-harness/core/dist/plugins/cleaner.js +337 -40
  156. package/node_modules/@pi-harness/core/dist/plugins/cleaner.js.map +1 -1
  157. package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.d.ts +2 -1
  158. package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.d.ts.map +1 -1
  159. package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.js +99 -42
  160. package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.js.map +1 -1
  161. package/node_modules/@pi-harness/core/dist/plugins/code2skill.d.ts +1 -0
  162. package/node_modules/@pi-harness/core/dist/plugins/code2skill.d.ts.map +1 -1
  163. package/node_modules/@pi-harness/core/dist/plugins/code2skill.js +178 -38
  164. package/node_modules/@pi-harness/core/dist/plugins/code2skill.js.map +1 -1
  165. package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.d.ts +2 -1
  166. package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.d.ts.map +1 -1
  167. package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.js +79 -49
  168. package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.js.map +1 -1
  169. package/node_modules/@pi-harness/core/dist/plugins/context-doctor.d.ts +6 -1
  170. package/node_modules/@pi-harness/core/dist/plugins/context-doctor.d.ts.map +1 -1
  171. package/node_modules/@pi-harness/core/dist/plugins/context-doctor.js +403 -39
  172. package/node_modules/@pi-harness/core/dist/plugins/context-doctor.js.map +1 -1
  173. package/node_modules/@pi-harness/core/dist/plugins/context.d.ts +1 -0
  174. package/node_modules/@pi-harness/core/dist/plugins/context.d.ts.map +1 -1
  175. package/node_modules/@pi-harness/core/dist/plugins/context.js +169 -42
  176. package/node_modules/@pi-harness/core/dist/plugins/context.js.map +1 -1
  177. package/node_modules/@pi-harness/core/dist/plugins/cost-meter.d.ts +4 -0
  178. package/node_modules/@pi-harness/core/dist/plugins/cost-meter.d.ts.map +1 -1
  179. package/node_modules/@pi-harness/core/dist/plugins/cost-meter.js +319 -93
  180. package/node_modules/@pi-harness/core/dist/plugins/cost-meter.js.map +1 -1
  181. package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.d.ts +11 -2
  182. package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.d.ts.map +1 -1
  183. package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.js +463 -114
  184. package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.js.map +1 -1
  185. package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.d.ts +1 -0
  186. package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.d.ts.map +1 -1
  187. package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.js +322 -80
  188. package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.js.map +1 -1
  189. package/node_modules/@pi-harness/core/dist/plugins/fail-logger.d.ts +1 -0
  190. package/node_modules/@pi-harness/core/dist/plugins/fail-logger.d.ts.map +1 -1
  191. package/node_modules/@pi-harness/core/dist/plugins/fail-logger.js +187 -20
  192. package/node_modules/@pi-harness/core/dist/plugins/fail-logger.js.map +1 -1
  193. package/node_modules/@pi-harness/core/dist/plugins/genui.d.ts +1 -0
  194. package/node_modules/@pi-harness/core/dist/plugins/genui.d.ts.map +1 -1
  195. package/node_modules/@pi-harness/core/dist/plugins/genui.js +103 -38
  196. package/node_modules/@pi-harness/core/dist/plugins/genui.js.map +1 -1
  197. package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.d.ts +8 -2
  198. package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.d.ts.map +1 -1
  199. package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.js +400 -54
  200. package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.js.map +1 -1
  201. package/node_modules/@pi-harness/core/dist/plugins/graph-memory.d.ts.map +1 -1
  202. package/node_modules/@pi-harness/core/dist/plugins/graph-memory.js +329 -42
  203. package/node_modules/@pi-harness/core/dist/plugins/graph-memory.js.map +1 -1
  204. package/node_modules/@pi-harness/core/dist/plugins/history-compressor.d.ts.map +1 -1
  205. package/node_modules/@pi-harness/core/dist/plugins/history-compressor.js +31 -12
  206. package/node_modules/@pi-harness/core/dist/plugins/history-compressor.js.map +1 -1
  207. package/node_modules/@pi-harness/core/dist/plugins/hol-guard.d.ts.map +1 -1
  208. package/node_modules/@pi-harness/core/dist/plugins/hol-guard.js +33 -13
  209. package/node_modules/@pi-harness/core/dist/plugins/hol-guard.js.map +1 -1
  210. package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.d.ts +5 -1
  211. package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.d.ts.map +1 -1
  212. package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.js +308 -52
  213. package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.js.map +1 -1
  214. package/node_modules/@pi-harness/core/dist/plugins/image-compressor.d.ts +7 -0
  215. package/node_modules/@pi-harness/core/dist/plugins/image-compressor.d.ts.map +1 -1
  216. package/node_modules/@pi-harness/core/dist/plugins/image-compressor.js +98 -25
  217. package/node_modules/@pi-harness/core/dist/plugins/image-compressor.js.map +1 -1
  218. package/node_modules/@pi-harness/core/dist/plugins/llm-verifier.d.ts.map +1 -1
  219. package/node_modules/@pi-harness/core/dist/plugins/llm-verifier.js +21 -11
  220. package/node_modules/@pi-harness/core/dist/plugins/llm-verifier.js.map +1 -1
  221. package/node_modules/@pi-harness/core/dist/plugins/mcp-client.d.ts.map +1 -1
  222. package/node_modules/@pi-harness/core/dist/plugins/mcp-client.js +986 -232
  223. package/node_modules/@pi-harness/core/dist/plugins/mcp-client.js.map +1 -1
  224. package/node_modules/@pi-harness/core/dist/plugins/mcp-panel.d.ts.map +1 -1
  225. package/node_modules/@pi-harness/core/dist/plugins/mcp-panel.js +30 -16
  226. package/node_modules/@pi-harness/core/dist/plugins/mcp-panel.js.map +1 -1
  227. package/node_modules/@pi-harness/core/dist/plugins/memory.d.ts.map +1 -1
  228. package/node_modules/@pi-harness/core/dist/plugins/memory.js +292 -59
  229. package/node_modules/@pi-harness/core/dist/plugins/memory.js.map +1 -1
  230. package/node_modules/@pi-harness/core/dist/plugins/mirage-bridge.d.ts.map +1 -1
  231. package/node_modules/@pi-harness/core/dist/plugins/mirage-bridge.js +20 -10
  232. package/node_modules/@pi-harness/core/dist/plugins/mirage-bridge.js.map +1 -1
  233. package/node_modules/@pi-harness/core/dist/plugins/mock-server.d.ts.map +1 -1
  234. package/node_modules/@pi-harness/core/dist/plugins/mock-server.js +85 -54
  235. package/node_modules/@pi-harness/core/dist/plugins/mock-server.js.map +1 -1
  236. package/node_modules/@pi-harness/core/dist/plugins/model.d.ts +3 -0
  237. package/node_modules/@pi-harness/core/dist/plugins/model.d.ts.map +1 -1
  238. package/node_modules/@pi-harness/core/dist/plugins/model.js +3 -0
  239. package/node_modules/@pi-harness/core/dist/plugins/model.js.map +1 -1
  240. package/node_modules/@pi-harness/core/dist/plugins/models.d.ts.map +1 -1
  241. package/node_modules/@pi-harness/core/dist/plugins/models.js +10 -2
  242. package/node_modules/@pi-harness/core/dist/plugins/models.js.map +1 -1
  243. package/node_modules/@pi-harness/core/dist/plugins/modlens.d.ts +8 -1
  244. package/node_modules/@pi-harness/core/dist/plugins/modlens.d.ts.map +1 -1
  245. package/node_modules/@pi-harness/core/dist/plugins/modlens.js +438 -31
  246. package/node_modules/@pi-harness/core/dist/plugins/modlens.js.map +1 -1
  247. package/node_modules/@pi-harness/core/dist/plugins/module-search.d.ts +1 -0
  248. package/node_modules/@pi-harness/core/dist/plugins/module-search.d.ts.map +1 -1
  249. package/node_modules/@pi-harness/core/dist/plugins/module-search.js +35 -16
  250. package/node_modules/@pi-harness/core/dist/plugins/module-search.js.map +1 -1
  251. package/node_modules/@pi-harness/core/dist/plugins/obsidian-sync.d.ts.map +1 -1
  252. package/node_modules/@pi-harness/core/dist/plugins/obsidian-sync.js +20 -11
  253. package/node_modules/@pi-harness/core/dist/plugins/obsidian-sync.js.map +1 -1
  254. package/node_modules/@pi-harness/core/dist/plugins/openpets.d.ts.map +1 -1
  255. package/node_modules/@pi-harness/core/dist/plugins/openpets.js +203 -44
  256. package/node_modules/@pi-harness/core/dist/plugins/openpets.js.map +1 -1
  257. package/node_modules/@pi-harness/core/dist/plugins/plan-execute.d.ts +4 -1
  258. package/node_modules/@pi-harness/core/dist/plugins/plan-execute.d.ts.map +1 -1
  259. package/node_modules/@pi-harness/core/dist/plugins/plan-execute.js +42 -21
  260. package/node_modules/@pi-harness/core/dist/plugins/plan-execute.js.map +1 -1
  261. package/node_modules/@pi-harness/core/dist/plugins/plugin-check.d.ts +12 -3
  262. package/node_modules/@pi-harness/core/dist/plugins/plugin-check.d.ts.map +1 -1
  263. package/node_modules/@pi-harness/core/dist/plugins/plugin-check.js +83 -12
  264. package/node_modules/@pi-harness/core/dist/plugins/plugin-check.js.map +1 -1
  265. package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.d.ts +1 -0
  266. package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.d.ts.map +1 -1
  267. package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.js +156 -23
  268. package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.js.map +1 -1
  269. package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.d.ts +1 -0
  270. package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.d.ts.map +1 -1
  271. package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.js +131 -13
  272. package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.js.map +1 -1
  273. package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.d.ts +4 -0
  274. package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.d.ts.map +1 -1
  275. package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.js +137 -36
  276. package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.js.map +1 -1
  277. package/node_modules/@pi-harness/core/dist/plugins/plugin-stars.d.ts.map +1 -1
  278. package/node_modules/@pi-harness/core/dist/plugins/plugin-stars.js +282 -81
  279. package/node_modules/@pi-harness/core/dist/plugins/plugin-stars.js.map +1 -1
  280. package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.d.ts +1 -0
  281. package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.d.ts.map +1 -1
  282. package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.js +60 -9
  283. package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.js.map +1 -1
  284. package/node_modules/@pi-harness/core/dist/plugins/prompt-library.d.ts +1 -0
  285. package/node_modules/@pi-harness/core/dist/plugins/prompt-library.d.ts.map +1 -1
  286. package/node_modules/@pi-harness/core/dist/plugins/prompt-library.js +4 -1
  287. package/node_modules/@pi-harness/core/dist/plugins/prompt-library.js.map +1 -1
  288. package/node_modules/@pi-harness/core/dist/plugins/readme-gen.d.ts +6 -2
  289. package/node_modules/@pi-harness/core/dist/plugins/readme-gen.d.ts.map +1 -1
  290. package/node_modules/@pi-harness/core/dist/plugins/readme-gen.js +514 -73
  291. package/node_modules/@pi-harness/core/dist/plugins/readme-gen.js.map +1 -1
  292. package/node_modules/@pi-harness/core/dist/plugins/recall-unread.d.ts +1 -1
  293. package/node_modules/@pi-harness/core/dist/plugins/recall-unread.d.ts.map +1 -1
  294. package/node_modules/@pi-harness/core/dist/plugins/recall-unread.js +411 -68
  295. package/node_modules/@pi-harness/core/dist/plugins/recall-unread.js.map +1 -1
  296. package/node_modules/@pi-harness/core/dist/plugins/resources.d.ts.map +1 -1
  297. package/node_modules/@pi-harness/core/dist/plugins/resources.js +66 -3
  298. package/node_modules/@pi-harness/core/dist/plugins/resources.js.map +1 -1
  299. package/node_modules/@pi-harness/core/dist/plugins/reverse-skill.d.ts.map +1 -1
  300. package/node_modules/@pi-harness/core/dist/plugins/reverse-skill.js +2 -1
  301. package/node_modules/@pi-harness/core/dist/plugins/reverse-skill.js.map +1 -1
  302. package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.d.ts +1 -0
  303. package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.d.ts.map +1 -1
  304. package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.js +35 -16
  305. package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.js.map +1 -1
  306. package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.d.ts +1 -0
  307. package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.d.ts.map +1 -1
  308. package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.js +4 -1
  309. package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.js.map +1 -1
  310. package/node_modules/@pi-harness/core/dist/plugins/runtime.d.ts.map +1 -1
  311. package/node_modules/@pi-harness/core/dist/plugins/runtime.js +104 -70
  312. package/node_modules/@pi-harness/core/dist/plugins/runtime.js.map +1 -1
  313. package/node_modules/@pi-harness/core/dist/plugins/secure-audit.d.ts +1 -0
  314. package/node_modules/@pi-harness/core/dist/plugins/secure-audit.d.ts.map +1 -1
  315. package/node_modules/@pi-harness/core/dist/plugins/secure-audit.js +30 -12
  316. package/node_modules/@pi-harness/core/dist/plugins/secure-audit.js.map +1 -1
  317. package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.d.ts +1 -0
  318. package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.d.ts.map +1 -1
  319. package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.js +4 -1
  320. package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.js.map +1 -1
  321. package/node_modules/@pi-harness/core/dist/plugins/session-bridge.d.ts +1 -0
  322. package/node_modules/@pi-harness/core/dist/plugins/session-bridge.d.ts.map +1 -1
  323. package/node_modules/@pi-harness/core/dist/plugins/session-bridge.js +401 -88
  324. package/node_modules/@pi-harness/core/dist/plugins/session-bridge.js.map +1 -1
  325. package/node_modules/@pi-harness/core/dist/plugins/session-compare.d.ts +1 -0
  326. package/node_modules/@pi-harness/core/dist/plugins/session-compare.d.ts.map +1 -1
  327. package/node_modules/@pi-harness/core/dist/plugins/session-compare.js +4 -1
  328. package/node_modules/@pi-harness/core/dist/plugins/session-compare.js.map +1 -1
  329. package/node_modules/@pi-harness/core/dist/plugins/session-export.d.ts +1 -0
  330. package/node_modules/@pi-harness/core/dist/plugins/session-export.d.ts.map +1 -1
  331. package/node_modules/@pi-harness/core/dist/plugins/session-export.js +6 -6
  332. package/node_modules/@pi-harness/core/dist/plugins/session-export.js.map +1 -1
  333. package/node_modules/@pi-harness/core/dist/plugins/session-insights.d.ts +37 -1
  334. package/node_modules/@pi-harness/core/dist/plugins/session-insights.d.ts.map +1 -1
  335. package/node_modules/@pi-harness/core/dist/plugins/session-insights.js +406 -21
  336. package/node_modules/@pi-harness/core/dist/plugins/session-insights.js.map +1 -1
  337. package/node_modules/@pi-harness/core/dist/plugins/session-search.d.ts +1 -0
  338. package/node_modules/@pi-harness/core/dist/plugins/session-search.d.ts.map +1 -1
  339. package/node_modules/@pi-harness/core/dist/plugins/session-search.js +4 -1
  340. package/node_modules/@pi-harness/core/dist/plugins/session-search.js.map +1 -1
  341. package/node_modules/@pi-harness/core/dist/plugins/session.d.ts.map +1 -1
  342. package/node_modules/@pi-harness/core/dist/plugins/session.js +8 -1
  343. package/node_modules/@pi-harness/core/dist/plugins/session.js.map +1 -1
  344. package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.d.ts +1 -0
  345. package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.d.ts.map +1 -1
  346. package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.js +6 -5
  347. package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.js.map +1 -1
  348. package/node_modules/@pi-harness/core/dist/plugins/skill-guard.d.ts +2 -1
  349. package/node_modules/@pi-harness/core/dist/plugins/skill-guard.d.ts.map +1 -1
  350. package/node_modules/@pi-harness/core/dist/plugins/skill-guard.js +241 -61
  351. package/node_modules/@pi-harness/core/dist/plugins/skill-guard.js.map +1 -1
  352. package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.d.ts +2 -0
  353. package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.d.ts.map +1 -0
  354. package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.js +206 -0
  355. package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.js.map +1 -0
  356. package/node_modules/@pi-harness/core/dist/plugins/sql-lens.d.ts +7 -1
  357. package/node_modules/@pi-harness/core/dist/plugins/sql-lens.d.ts.map +1 -1
  358. package/node_modules/@pi-harness/core/dist/plugins/sql-lens.js +301 -68
  359. package/node_modules/@pi-harness/core/dist/plugins/sql-lens.js.map +1 -1
  360. package/node_modules/@pi-harness/core/dist/plugins/stdio.d.ts +3 -0
  361. package/node_modules/@pi-harness/core/dist/plugins/stdio.d.ts.map +1 -1
  362. package/node_modules/@pi-harness/core/dist/plugins/stdio.js +62 -4
  363. package/node_modules/@pi-harness/core/dist/plugins/stdio.js.map +1 -1
  364. package/node_modules/@pi-harness/core/dist/plugins/synapse.d.ts.map +1 -1
  365. package/node_modules/@pi-harness/core/dist/plugins/synapse.js +17 -9
  366. package/node_modules/@pi-harness/core/dist/plugins/synapse.js.map +1 -1
  367. package/node_modules/@pi-harness/core/dist/plugins/tab-manager.d.ts +1 -0
  368. package/node_modules/@pi-harness/core/dist/plugins/tab-manager.d.ts.map +1 -1
  369. package/node_modules/@pi-harness/core/dist/plugins/tab-manager.js +167 -62
  370. package/node_modules/@pi-harness/core/dist/plugins/tab-manager.js.map +1 -1
  371. package/node_modules/@pi-harness/core/dist/plugins/taskboard.d.ts.map +1 -1
  372. package/node_modules/@pi-harness/core/dist/plugins/taskboard.js +50 -22
  373. package/node_modules/@pi-harness/core/dist/plugins/taskboard.js.map +1 -1
  374. package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.d.ts +4 -1
  375. package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.d.ts.map +1 -1
  376. package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.js +30 -11
  377. package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.js.map +1 -1
  378. package/node_modules/@pi-harness/core/dist/plugins/test-harness.d.ts +7 -1
  379. package/node_modules/@pi-harness/core/dist/plugins/test-harness.d.ts.map +1 -1
  380. package/node_modules/@pi-harness/core/dist/plugins/test-harness.js +255 -43
  381. package/node_modules/@pi-harness/core/dist/plugins/test-harness.js.map +1 -1
  382. package/node_modules/@pi-harness/core/dist/plugins/theme-studio.d.ts.map +1 -1
  383. package/node_modules/@pi-harness/core/dist/plugins/theme-studio.js +4 -2
  384. package/node_modules/@pi-harness/core/dist/plugins/theme-studio.js.map +1 -1
  385. package/node_modules/@pi-harness/core/dist/plugins/token-guard.d.ts.map +1 -1
  386. package/node_modules/@pi-harness/core/dist/plugins/token-guard.js +164 -32
  387. package/node_modules/@pi-harness/core/dist/plugins/token-guard.js.map +1 -1
  388. package/node_modules/@pi-harness/core/dist/plugins/tools.d.ts.map +1 -1
  389. package/node_modules/@pi-harness/core/dist/plugins/tools.js +4 -1
  390. package/node_modules/@pi-harness/core/dist/plugins/tools.js.map +1 -1
  391. package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.d.ts +17 -0
  392. package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.d.ts.map +1 -1
  393. package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.js +340 -36
  394. package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.js.map +1 -1
  395. package/node_modules/@pi-harness/core/dist/plugins/undo-savepoint.d.ts.map +1 -1
  396. package/node_modules/@pi-harness/core/dist/plugins/undo-savepoint.js +157 -51
  397. package/node_modules/@pi-harness/core/dist/plugins/undo-savepoint.js.map +1 -1
  398. package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.d.ts +22 -3
  399. package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.d.ts.map +1 -1
  400. package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.js +389 -66
  401. package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.js.map +1 -1
  402. package/node_modules/@pi-harness/core/dist/plugins/web-research.d.ts.map +1 -1
  403. package/node_modules/@pi-harness/core/dist/plugins/web-research.js +13 -4
  404. package/node_modules/@pi-harness/core/dist/plugins/web-research.js.map +1 -1
  405. package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.d.ts +8 -2
  406. package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.d.ts.map +1 -1
  407. package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.js +28 -10
  408. package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.js.map +1 -1
  409. package/node_modules/@pi-harness/core/dist/plugins/workspace-search.d.ts +7 -0
  410. package/node_modules/@pi-harness/core/dist/plugins/workspace-search.d.ts.map +1 -1
  411. package/node_modules/@pi-harness/core/dist/plugins/workspace-search.js +67 -34
  412. package/node_modules/@pi-harness/core/dist/plugins/workspace-search.js.map +1 -1
  413. package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.d.ts +1 -0
  414. package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.d.ts.map +1 -1
  415. package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.js +156 -47
  416. package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.js.map +1 -1
  417. package/node_modules/@pi-harness/core/dist/runtime.d.ts.map +1 -1
  418. package/node_modules/@pi-harness/core/dist/runtime.js +8 -3
  419. package/node_modules/@pi-harness/core/dist/runtime.js.map +1 -1
  420. package/node_modules/@pi-harness/core/dist/services.d.ts.map +1 -1
  421. package/node_modules/@pi-harness/core/dist/services.js +22 -2
  422. package/node_modules/@pi-harness/core/dist/services.js.map +1 -1
  423. package/node_modules/@pi-harness/core/dist/stdio.d.ts +1 -0
  424. package/node_modules/@pi-harness/core/dist/stdio.d.ts.map +1 -1
  425. package/node_modules/@pi-harness/core/dist/stdio.js +241 -25
  426. package/node_modules/@pi-harness/core/dist/stdio.js.map +1 -1
  427. package/node_modules/@pi-harness/core/dist/workspace-path.d.ts +1 -0
  428. package/node_modules/@pi-harness/core/dist/workspace-path.d.ts.map +1 -1
  429. package/node_modules/@pi-harness/core/dist/workspace-path.js +9 -0
  430. package/node_modules/@pi-harness/core/dist/workspace-path.js.map +1 -1
  431. package/node_modules/@pi-harness/core/package.json +1 -1
  432. package/node_modules/@pi-harness/core/profiles/default/cordis.yml +4 -2
  433. package/node_modules/@pi-harness/host-webserver/package.json +1 -1
  434. package/node_modules/@pi-harness/web-app/package.json +1 -1
  435. package/package.json +12 -7
  436. package/packages/api-gateway/dist/index.d.ts.map +1 -1
  437. package/packages/api-gateway/dist/index.js +97 -9
  438. package/packages/api-gateway/dist/index.js.map +1 -1
  439. package/packages/api-gateway/dist/marketplace-entries/official/agent-teams.json +6 -6
  440. package/packages/api-gateway/dist/marketplace-entries/official/anchored-standard.json +1 -1
  441. package/packages/api-gateway/dist/marketplace-entries/official/annotation.json +1 -2
  442. package/packages/api-gateway/dist/marketplace-entries/official/archify.json +1 -1
  443. package/packages/api-gateway/dist/marketplace-entries/official/at-file.json +11 -5
  444. package/packages/api-gateway/dist/marketplace-entries/official/auto-mode.json +1 -1
  445. package/packages/api-gateway/dist/marketplace-entries/official/better-sidebar.json +1 -1
  446. package/packages/api-gateway/dist/marketplace-entries/official/browser-fetch.json +12 -5
  447. package/packages/api-gateway/dist/marketplace-entries/official/browser-session.json +14 -8
  448. package/packages/api-gateway/dist/marketplace-entries/official/canvas-draw.json +3 -4
  449. package/packages/api-gateway/dist/marketplace-entries/official/change-verifier.json +1 -1
  450. package/packages/api-gateway/dist/marketplace-entries/official/cleaner.json +11 -6
  451. package/packages/api-gateway/dist/marketplace-entries/official/cli-notifier.json +5 -5
  452. package/packages/api-gateway/dist/marketplace-entries/official/code2skill.json +5 -5
  453. package/packages/api-gateway/dist/marketplace-entries/official/colleague-skill.json +1 -2
  454. package/packages/api-gateway/dist/marketplace-entries/official/context-doctor.json +12 -7
  455. package/packages/api-gateway/dist/marketplace-entries/official/context.json +10 -5
  456. package/packages/api-gateway/dist/marketplace-entries/official/cordis-group.json +2 -2
  457. package/packages/api-gateway/dist/marketplace-entries/official/cordis-logger-console.json +4 -4
  458. package/packages/api-gateway/dist/marketplace-entries/official/cordis-timer.json +3 -3
  459. package/packages/api-gateway/dist/marketplace-entries/official/cost-meter.json +9 -6
  460. package/packages/api-gateway/dist/marketplace-entries/official/dependency-checker.json +13 -10
  461. package/packages/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +10 -5
  462. package/packages/api-gateway/dist/marketplace-entries/official/fail-logger.json +11 -6
  463. package/packages/api-gateway/dist/marketplace-entries/official/genui.json +7 -5
  464. package/packages/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +13 -8
  465. package/packages/api-gateway/dist/marketplace-entries/official/graph-memory.json +13 -7
  466. package/packages/api-gateway/dist/marketplace-entries/official/history-compressor.json +1 -1
  467. package/packages/api-gateway/dist/marketplace-entries/official/hol-guard.json +1 -1
  468. package/packages/api-gateway/dist/marketplace-entries/official/i18n-pair.json +9 -6
  469. package/packages/api-gateway/dist/marketplace-entries/official/image-compressor.json +1 -1
  470. package/packages/api-gateway/dist/marketplace-entries/official/llm-verifier.json +1 -1
  471. package/packages/api-gateway/dist/marketplace-entries/official/mcp-client.json +12 -7
  472. package/packages/api-gateway/dist/marketplace-entries/official/mcp-panel.json +1 -1
  473. package/packages/api-gateway/dist/marketplace-entries/official/memory.json +1 -1
  474. package/packages/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +1 -1
  475. package/packages/api-gateway/dist/marketplace-entries/official/mock-server.json +1 -1
  476. package/packages/api-gateway/dist/marketplace-entries/official/modlens.json +4 -4
  477. package/packages/api-gateway/dist/marketplace-entries/official/module-search.json +1 -1
  478. package/packages/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +1 -1
  479. package/packages/api-gateway/dist/marketplace-entries/official/openpets.json +9 -5
  480. package/packages/api-gateway/dist/marketplace-entries/official/plan-execute.json +1 -1
  481. package/packages/api-gateway/dist/marketplace-entries/official/plugin-check.json +1 -1
  482. package/packages/api-gateway/dist/marketplace-entries/official/plugin-dev.json +8 -6
  483. package/packages/api-gateway/dist/marketplace-entries/official/plugin-finder.json +1 -1
  484. package/packages/api-gateway/dist/marketplace-entries/official/plugin-radar.json +1 -1
  485. package/packages/api-gateway/dist/marketplace-entries/official/plugin-stars.json +15 -7
  486. package/packages/api-gateway/dist/marketplace-entries/official/prompt-guard.json +1 -1
  487. package/packages/api-gateway/dist/marketplace-entries/official/prompt-library.json +1 -1
  488. package/packages/api-gateway/dist/marketplace-entries/official/readme-gen.json +12 -8
  489. package/packages/api-gateway/dist/marketplace-entries/official/recall-unread.json +11 -6
  490. package/packages/api-gateway/dist/marketplace-entries/official/reverse-skill.json +1 -1
  491. package/packages/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +1 -1
  492. package/packages/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +1 -1
  493. package/packages/api-gateway/dist/marketplace-entries/official/secure-audit.json +1 -1
  494. package/packages/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +1 -1
  495. package/packages/api-gateway/dist/marketplace-entries/official/session-bridge.json +13 -8
  496. package/packages/api-gateway/dist/marketplace-entries/official/session-compare.json +1 -1
  497. package/packages/api-gateway/dist/marketplace-entries/official/session-export.json +1 -1
  498. package/packages/api-gateway/dist/marketplace-entries/official/session-insights.json +12 -6
  499. package/packages/api-gateway/dist/marketplace-entries/official/session-search.json +1 -1
  500. package/packages/api-gateway/dist/marketplace-entries/official/skill-catalog.json +1 -1
  501. package/packages/api-gateway/dist/marketplace-entries/official/skill-guard.json +9 -5
  502. package/packages/api-gateway/dist/marketplace-entries/official/sql-lens.json +13 -7
  503. package/packages/api-gateway/dist/marketplace-entries/official/synapse.json +1 -1
  504. package/packages/api-gateway/dist/marketplace-entries/official/tab-manager.json +1 -1
  505. package/packages/api-gateway/dist/marketplace-entries/official/taskboard.json +1 -1
  506. package/packages/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +1 -1
  507. package/packages/api-gateway/dist/marketplace-entries/official/test-harness.json +14 -7
  508. package/packages/api-gateway/dist/marketplace-entries/official/theme-studio.json +1 -1
  509. package/packages/api-gateway/dist/marketplace-entries/official/token-guard.json +12 -6
  510. package/packages/api-gateway/dist/marketplace-entries/official/turn-rewind.json +11 -6
  511. package/packages/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +1 -1
  512. package/packages/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +8 -5
  513. package/packages/api-gateway/dist/marketplace-entries/official/web-research.json +1 -1
  514. package/packages/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +1 -1
  515. package/packages/api-gateway/dist/marketplace-entries/official/workspace-search.json +1 -1
  516. package/packages/api-gateway/dist/marketplace-entries/official/yaml-validator.json +8 -5
  517. package/packages/api-gateway/package.json +1 -1
  518. package/packages/api-gateway/src/index.ts +90 -9
  519. package/packages/api-gateway/src/marketplace-entries/official/agent-teams.json +6 -6
  520. package/packages/api-gateway/src/marketplace-entries/official/anchored-standard.json +1 -1
  521. package/packages/api-gateway/src/marketplace-entries/official/annotation.json +1 -2
  522. package/packages/api-gateway/src/marketplace-entries/official/archify.json +1 -1
  523. package/packages/api-gateway/src/marketplace-entries/official/at-file.json +11 -5
  524. package/packages/api-gateway/src/marketplace-entries/official/auto-mode.json +1 -1
  525. package/packages/api-gateway/src/marketplace-entries/official/better-sidebar.json +1 -1
  526. package/packages/api-gateway/src/marketplace-entries/official/browser-fetch.json +12 -5
  527. package/packages/api-gateway/src/marketplace-entries/official/browser-session.json +14 -8
  528. package/packages/api-gateway/src/marketplace-entries/official/canvas-draw.json +3 -4
  529. package/packages/api-gateway/src/marketplace-entries/official/change-verifier.json +1 -1
  530. package/packages/api-gateway/src/marketplace-entries/official/cleaner.json +11 -6
  531. package/packages/api-gateway/src/marketplace-entries/official/cli-notifier.json +5 -5
  532. package/packages/api-gateway/src/marketplace-entries/official/code2skill.json +5 -5
  533. package/packages/api-gateway/src/marketplace-entries/official/colleague-skill.json +1 -2
  534. package/packages/api-gateway/src/marketplace-entries/official/context-doctor.json +12 -7
  535. package/packages/api-gateway/src/marketplace-entries/official/context.json +10 -5
  536. package/packages/api-gateway/src/marketplace-entries/official/cordis-group.json +2 -2
  537. package/packages/api-gateway/src/marketplace-entries/official/cordis-logger-console.json +4 -4
  538. package/packages/api-gateway/src/marketplace-entries/official/cordis-timer.json +3 -3
  539. package/packages/api-gateway/src/marketplace-entries/official/cost-meter.json +9 -6
  540. package/packages/api-gateway/src/marketplace-entries/official/dependency-checker.json +13 -10
  541. package/packages/api-gateway/src/marketplace-entries/official/docker-sandbox.json +10 -5
  542. package/packages/api-gateway/src/marketplace-entries/official/fail-logger.json +11 -6
  543. package/packages/api-gateway/src/marketplace-entries/official/genui.json +7 -5
  544. package/packages/api-gateway/src/marketplace-entries/official/git-time-capsule.json +13 -8
  545. package/packages/api-gateway/src/marketplace-entries/official/graph-memory.json +13 -7
  546. package/packages/api-gateway/src/marketplace-entries/official/history-compressor.json +1 -1
  547. package/packages/api-gateway/src/marketplace-entries/official/hol-guard.json +1 -1
  548. package/packages/api-gateway/src/marketplace-entries/official/i18n-pair.json +9 -6
  549. package/packages/api-gateway/src/marketplace-entries/official/image-compressor.json +1 -1
  550. package/packages/api-gateway/src/marketplace-entries/official/llm-verifier.json +1 -1
  551. package/packages/api-gateway/src/marketplace-entries/official/mcp-client.json +12 -7
  552. package/packages/api-gateway/src/marketplace-entries/official/mcp-panel.json +1 -1
  553. package/packages/api-gateway/src/marketplace-entries/official/memory.json +1 -1
  554. package/packages/api-gateway/src/marketplace-entries/official/mirage-bridge.json +1 -1
  555. package/packages/api-gateway/src/marketplace-entries/official/mock-server.json +1 -1
  556. package/packages/api-gateway/src/marketplace-entries/official/modlens.json +4 -4
  557. package/packages/api-gateway/src/marketplace-entries/official/module-search.json +1 -1
  558. package/packages/api-gateway/src/marketplace-entries/official/obsidian-sync.json +1 -1
  559. package/packages/api-gateway/src/marketplace-entries/official/openpets.json +9 -5
  560. package/packages/api-gateway/src/marketplace-entries/official/plan-execute.json +1 -1
  561. package/packages/api-gateway/src/marketplace-entries/official/plugin-check.json +1 -1
  562. package/packages/api-gateway/src/marketplace-entries/official/plugin-dev.json +8 -6
  563. package/packages/api-gateway/src/marketplace-entries/official/plugin-finder.json +1 -1
  564. package/packages/api-gateway/src/marketplace-entries/official/plugin-radar.json +1 -1
  565. package/packages/api-gateway/src/marketplace-entries/official/plugin-stars.json +15 -7
  566. package/packages/api-gateway/src/marketplace-entries/official/prompt-guard.json +1 -1
  567. package/packages/api-gateway/src/marketplace-entries/official/prompt-library.json +1 -1
  568. package/packages/api-gateway/src/marketplace-entries/official/readme-gen.json +12 -8
  569. package/packages/api-gateway/src/marketplace-entries/official/recall-unread.json +11 -6
  570. package/packages/api-gateway/src/marketplace-entries/official/reverse-skill.json +1 -1
  571. package/packages/api-gateway/src/marketplace-entries/official/reviewer-bot.json +1 -1
  572. package/packages/api-gateway/src/marketplace-entries/official/runtime-doctor.json +1 -1
  573. package/packages/api-gateway/src/marketplace-entries/official/secure-audit.json +1 -1
  574. package/packages/api-gateway/src/marketplace-entries/official/session-bookmarks.json +1 -1
  575. package/packages/api-gateway/src/marketplace-entries/official/session-bridge.json +13 -8
  576. package/packages/api-gateway/src/marketplace-entries/official/session-compare.json +1 -1
  577. package/packages/api-gateway/src/marketplace-entries/official/session-export.json +1 -1
  578. package/packages/api-gateway/src/marketplace-entries/official/session-insights.json +12 -6
  579. package/packages/api-gateway/src/marketplace-entries/official/session-search.json +1 -1
  580. package/packages/api-gateway/src/marketplace-entries/official/skill-catalog.json +1 -1
  581. package/packages/api-gateway/src/marketplace-entries/official/skill-guard.json +9 -5
  582. package/packages/api-gateway/src/marketplace-entries/official/sql-lens.json +13 -7
  583. package/packages/api-gateway/src/marketplace-entries/official/synapse.json +1 -1
  584. package/packages/api-gateway/src/marketplace-entries/official/tab-manager.json +1 -1
  585. package/packages/api-gateway/src/marketplace-entries/official/taskboard.json +1 -1
  586. package/packages/api-gateway/src/marketplace-entries/official/telemetry-blocker.json +1 -1
  587. package/packages/api-gateway/src/marketplace-entries/official/test-harness.json +14 -7
  588. package/packages/api-gateway/src/marketplace-entries/official/theme-studio.json +1 -1
  589. package/packages/api-gateway/src/marketplace-entries/official/token-guard.json +12 -6
  590. package/packages/api-gateway/src/marketplace-entries/official/turn-rewind.json +11 -6
  591. package/packages/api-gateway/src/marketplace-entries/official/undo-savepoint.json +1 -1
  592. package/packages/api-gateway/src/marketplace-entries/official/vision-toolkit.json +8 -5
  593. package/packages/api-gateway/src/marketplace-entries/official/web-research.json +1 -1
  594. package/packages/api-gateway/src/marketplace-entries/official/workspace-navigator.json +1 -1
  595. package/packages/api-gateway/src/marketplace-entries/official/workspace-search.json +1 -1
  596. package/packages/api-gateway/src/marketplace-entries/official/yaml-validator.json +8 -5
  597. package/packages/api-gateway/test/index.test.ts +1594 -2
  598. package/packages/api-gateway/test/marketplace.test.ts +389 -2
  599. package/packages/api-gateway/test/release-package.test.ts +1 -0
  600. package/packages/bundle-web-app/package.json +1 -1
  601. package/packages/cli/dist/node-stdio.d.ts.map +1 -1
  602. package/packages/cli/dist/node-stdio.js +83 -20
  603. package/packages/cli/dist/node-stdio.js.map +1 -1
  604. package/packages/cli/package.json +1 -1
  605. package/packages/cli/src/node-stdio.ts +77 -20
  606. package/packages/cli/test/node-stdio.test.ts +118 -2
  607. package/packages/client-web/dist/agent-teams-view.d.ts +70 -0
  608. package/packages/client-web/dist/agent-teams-view.d.ts.map +1 -0
  609. package/packages/client-web/dist/agent-teams-view.js +159 -0
  610. package/packages/client-web/dist/agent-teams-view.js.map +1 -0
  611. package/packages/client-web/dist/at-file-view.d.ts +10 -0
  612. package/packages/client-web/dist/at-file-view.d.ts.map +1 -0
  613. package/packages/client-web/dist/at-file-view.js +65 -0
  614. package/packages/client-web/dist/at-file-view.js.map +1 -0
  615. package/packages/client-web/dist/browser-fetch-view.d.ts +22 -0
  616. package/packages/client-web/dist/browser-fetch-view.d.ts.map +1 -0
  617. package/packages/client-web/dist/browser-fetch-view.js +101 -0
  618. package/packages/client-web/dist/browser-fetch-view.js.map +1 -0
  619. package/packages/client-web/dist/browser-session-view.d.ts +32 -0
  620. package/packages/client-web/dist/browser-session-view.d.ts.map +1 -1
  621. package/packages/client-web/dist/browser-session-view.js +206 -3
  622. package/packages/client-web/dist/browser-session-view.js.map +1 -1
  623. package/packages/client-web/dist/cleaner-view.d.ts +29 -0
  624. package/packages/client-web/dist/cleaner-view.d.ts.map +1 -0
  625. package/packages/client-web/dist/cleaner-view.js +191 -0
  626. package/packages/client-web/dist/cleaner-view.js.map +1 -0
  627. package/packages/client-web/dist/context-doctor-view.d.ts +35 -0
  628. package/packages/client-web/dist/context-doctor-view.d.ts.map +1 -0
  629. package/packages/client-web/dist/context-doctor-view.js +129 -0
  630. package/packages/client-web/dist/context-doctor-view.js.map +1 -0
  631. package/packages/client-web/dist/context-insights-view.d.ts +31 -0
  632. package/packages/client-web/dist/context-insights-view.d.ts.map +1 -0
  633. package/packages/client-web/dist/context-insights-view.js +90 -0
  634. package/packages/client-web/dist/context-insights-view.js.map +1 -0
  635. package/packages/client-web/dist/cost-meter-view.d.ts +16 -0
  636. package/packages/client-web/dist/cost-meter-view.d.ts.map +1 -0
  637. package/packages/client-web/dist/cost-meter-view.js +43 -0
  638. package/packages/client-web/dist/cost-meter-view.js.map +1 -0
  639. package/packages/client-web/dist/dependency-checker-view.d.ts +24 -0
  640. package/packages/client-web/dist/dependency-checker-view.d.ts.map +1 -0
  641. package/packages/client-web/dist/dependency-checker-view.js +195 -0
  642. package/packages/client-web/dist/dependency-checker-view.js.map +1 -0
  643. package/packages/client-web/dist/docker-sandbox-view.d.ts +28 -0
  644. package/packages/client-web/dist/docker-sandbox-view.d.ts.map +1 -0
  645. package/packages/client-web/dist/docker-sandbox-view.js +152 -0
  646. package/packages/client-web/dist/docker-sandbox-view.js.map +1 -0
  647. package/packages/client-web/dist/fail-logger-view.d.ts +16 -0
  648. package/packages/client-web/dist/fail-logger-view.d.ts.map +1 -0
  649. package/packages/client-web/dist/fail-logger-view.js +97 -0
  650. package/packages/client-web/dist/fail-logger-view.js.map +1 -0
  651. package/packages/client-web/dist/genui-view.d.ts +28 -0
  652. package/packages/client-web/dist/genui-view.d.ts.map +1 -0
  653. package/packages/client-web/dist/genui-view.js +62 -0
  654. package/packages/client-web/dist/genui-view.js.map +1 -0
  655. package/packages/client-web/dist/git-time-capsule-view.d.ts +31 -0
  656. package/packages/client-web/dist/git-time-capsule-view.d.ts.map +1 -0
  657. package/packages/client-web/dist/git-time-capsule-view.js +203 -0
  658. package/packages/client-web/dist/git-time-capsule-view.js.map +1 -0
  659. package/packages/client-web/dist/graph-memory-view.d.ts +39 -0
  660. package/packages/client-web/dist/graph-memory-view.d.ts.map +1 -0
  661. package/packages/client-web/dist/graph-memory-view.js +82 -0
  662. package/packages/client-web/dist/graph-memory-view.js.map +1 -0
  663. package/packages/client-web/dist/i18n-pair-view.d.ts +32 -0
  664. package/packages/client-web/dist/i18n-pair-view.d.ts.map +1 -0
  665. package/packages/client-web/dist/i18n-pair-view.js +182 -0
  666. package/packages/client-web/dist/i18n-pair-view.js.map +1 -0
  667. package/packages/client-web/dist/mcp-client-view.d.ts +58 -0
  668. package/packages/client-web/dist/mcp-client-view.d.ts.map +1 -0
  669. package/packages/client-web/dist/mcp-client-view.js +121 -0
  670. package/packages/client-web/dist/mcp-client-view.js.map +1 -0
  671. package/packages/client-web/dist/modlens-view.d.ts +43 -0
  672. package/packages/client-web/dist/modlens-view.d.ts.map +1 -0
  673. package/packages/client-web/dist/modlens-view.js +176 -0
  674. package/packages/client-web/dist/modlens-view.js.map +1 -0
  675. package/packages/client-web/dist/openpets-view.d.ts +26 -0
  676. package/packages/client-web/dist/openpets-view.d.ts.map +1 -0
  677. package/packages/client-web/dist/openpets-view.js +62 -0
  678. package/packages/client-web/dist/openpets-view.js.map +1 -0
  679. package/packages/client-web/dist/panel-safe.d.ts +5 -0
  680. package/packages/client-web/dist/panel-safe.d.ts.map +1 -0
  681. package/packages/client-web/dist/panel-safe.js +58 -0
  682. package/packages/client-web/dist/panel-safe.js.map +1 -0
  683. package/packages/client-web/dist/plugin-dev-view.d.ts +15 -0
  684. package/packages/client-web/dist/plugin-dev-view.d.ts.map +1 -0
  685. package/packages/client-web/dist/plugin-dev-view.js +33 -0
  686. package/packages/client-web/dist/plugin-dev-view.js.map +1 -0
  687. package/packages/client-web/dist/plugin-stars-view.d.ts +28 -0
  688. package/packages/client-web/dist/plugin-stars-view.d.ts.map +1 -1
  689. package/packages/client-web/dist/plugin-stars-view.js +209 -1
  690. package/packages/client-web/dist/plugin-stars-view.js.map +1 -1
  691. package/packages/client-web/dist/react-room.d.ts +5 -1
  692. package/packages/client-web/dist/react-room.d.ts.map +1 -1
  693. package/packages/client-web/dist/react-room.js +463 -219
  694. package/packages/client-web/dist/react-room.js.map +1 -1
  695. package/packages/client-web/dist/readme-gen-view.d.ts +30 -0
  696. package/packages/client-web/dist/readme-gen-view.d.ts.map +1 -0
  697. package/packages/client-web/dist/readme-gen-view.js +134 -0
  698. package/packages/client-web/dist/readme-gen-view.js.map +1 -0
  699. package/packages/client-web/dist/recall-unread-view.d.ts +46 -0
  700. package/packages/client-web/dist/recall-unread-view.d.ts.map +1 -0
  701. package/packages/client-web/dist/recall-unread-view.js +104 -0
  702. package/packages/client-web/dist/recall-unread-view.js.map +1 -0
  703. package/packages/client-web/dist/session-bridge-view.d.ts +50 -0
  704. package/packages/client-web/dist/session-bridge-view.d.ts.map +1 -0
  705. package/packages/client-web/dist/session-bridge-view.js +113 -0
  706. package/packages/client-web/dist/session-bridge-view.js.map +1 -0
  707. package/packages/client-web/dist/session-insights-view.d.ts +40 -0
  708. package/packages/client-web/dist/session-insights-view.d.ts.map +1 -0
  709. package/packages/client-web/dist/session-insights-view.js +157 -0
  710. package/packages/client-web/dist/session-insights-view.js.map +1 -0
  711. package/packages/client-web/dist/skill-guard-view.d.ts +47 -0
  712. package/packages/client-web/dist/skill-guard-view.d.ts.map +1 -0
  713. package/packages/client-web/dist/skill-guard-view.js +93 -0
  714. package/packages/client-web/dist/skill-guard-view.js.map +1 -0
  715. package/packages/client-web/dist/sql-lens-view.d.ts +37 -0
  716. package/packages/client-web/dist/sql-lens-view.d.ts.map +1 -0
  717. package/packages/client-web/dist/sql-lens-view.js +235 -0
  718. package/packages/client-web/dist/sql-lens-view.js.map +1 -0
  719. package/packages/client-web/dist/test-harness-view.d.ts +24 -0
  720. package/packages/client-web/dist/test-harness-view.d.ts.map +1 -0
  721. package/packages/client-web/dist/test-harness-view.js +149 -0
  722. package/packages/client-web/dist/test-harness-view.js.map +1 -0
  723. package/packages/client-web/dist/token-guard-view.d.ts +19 -0
  724. package/packages/client-web/dist/token-guard-view.d.ts.map +1 -0
  725. package/packages/client-web/dist/token-guard-view.js +56 -0
  726. package/packages/client-web/dist/token-guard-view.js.map +1 -0
  727. package/packages/client-web/dist/turn-rewind-view.d.ts +41 -0
  728. package/packages/client-web/dist/turn-rewind-view.d.ts.map +1 -0
  729. package/packages/client-web/dist/turn-rewind-view.js +117 -0
  730. package/packages/client-web/dist/turn-rewind-view.js.map +1 -0
  731. package/packages/client-web/dist/vision-toolkit-view.d.ts +66 -0
  732. package/packages/client-web/dist/vision-toolkit-view.d.ts.map +1 -0
  733. package/packages/client-web/dist/vision-toolkit-view.js +238 -0
  734. package/packages/client-web/dist/vision-toolkit-view.js.map +1 -0
  735. package/packages/client-web/dist/yaml-validator-view.d.ts +52 -0
  736. package/packages/client-web/dist/yaml-validator-view.d.ts.map +1 -0
  737. package/packages/client-web/dist/yaml-validator-view.js +96 -0
  738. package/packages/client-web/dist/yaml-validator-view.js.map +1 -0
  739. package/packages/client-web/package.json +1 -1
  740. package/packages/client-web/src/agent-teams-view.ts +189 -0
  741. package/packages/client-web/src/at-file-view.ts +69 -0
  742. package/packages/client-web/src/browser-fetch-view.ts +114 -0
  743. package/packages/client-web/src/browser-session-view.ts +222 -3
  744. package/packages/client-web/src/cleaner-view.ts +207 -0
  745. package/packages/client-web/src/context-doctor-view.ts +140 -0
  746. package/packages/client-web/src/context-insights-view.ts +125 -0
  747. package/packages/client-web/src/cost-meter-view.ts +63 -0
  748. package/packages/client-web/src/dependency-checker-view.ts +215 -0
  749. package/packages/client-web/src/docker-sandbox-view.ts +177 -0
  750. package/packages/client-web/src/fail-logger-view.ts +112 -0
  751. package/packages/client-web/src/genui-view.ts +88 -0
  752. package/packages/client-web/src/git-time-capsule-view.ts +215 -0
  753. package/packages/client-web/src/graph-memory-view.ts +91 -0
  754. package/packages/client-web/src/i18n-pair-view.ts +194 -0
  755. package/packages/client-web/src/mcp-client-view.ts +122 -0
  756. package/packages/client-web/src/modlens-view.ts +210 -0
  757. package/packages/client-web/src/openpets-view.ts +67 -0
  758. package/packages/client-web/src/panel-safe.ts +47 -0
  759. package/packages/client-web/src/plugin-dev-view.ts +39 -0
  760. package/packages/client-web/src/plugin-stars-view.ts +239 -1
  761. package/packages/client-web/src/react-room.tsx +1770 -900
  762. package/packages/client-web/src/readme-gen-view.ts +145 -0
  763. package/packages/client-web/src/recall-unread-view.ts +105 -0
  764. package/packages/client-web/src/session-bridge-view.ts +118 -0
  765. package/packages/client-web/src/session-insights-view.ts +205 -0
  766. package/packages/client-web/src/skill-guard-view.ts +94 -0
  767. package/packages/client-web/src/sql-lens-view.ts +247 -0
  768. package/packages/client-web/src/test-harness-view.ts +170 -0
  769. package/packages/client-web/src/token-guard-view.ts +75 -0
  770. package/packages/client-web/src/turn-rewind-view.ts +120 -0
  771. package/packages/client-web/src/vision-toolkit-view.ts +280 -0
  772. package/packages/client-web/src/yaml-validator-view.ts +102 -0
  773. package/packages/client-web/test/agent-teams-view.test.ts +198 -0
  774. package/packages/client-web/test/at-file-panel.test.ts +76 -0
  775. package/packages/client-web/test/browser-fetch-panel.test.ts +44 -0
  776. package/packages/client-web/test/browser-fetch-view.test.ts +89 -0
  777. package/packages/client-web/test/browser-session-panel.test.ts +55 -0
  778. package/packages/client-web/test/browser-session-view.test.ts +99 -1
  779. package/packages/client-web/test/cleaner-panel.test.ts +66 -0
  780. package/packages/client-web/test/cleaner-view.test.ts +143 -0
  781. package/packages/client-web/test/context-doctor-view.test.ts +169 -0
  782. package/packages/client-web/test/context-insights-view.test.ts +120 -0
  783. package/packages/client-web/test/cost-meter-view.test.ts +53 -0
  784. package/packages/client-web/test/dependency-checker-panel.test.ts +51 -0
  785. package/packages/client-web/test/dependency-checker-view.test.ts +266 -0
  786. package/packages/client-web/test/docker-sandbox-panel.test.ts +44 -0
  787. package/packages/client-web/test/docker-sandbox-view.test.ts +127 -0
  788. package/packages/client-web/test/fail-logger-view.test.ts +155 -0
  789. package/packages/client-web/test/genui-view.test.ts +55 -0
  790. package/packages/client-web/test/git-time-capsule-view.test.ts +252 -0
  791. package/packages/client-web/test/graph-memory-view.test.ts +67 -0
  792. package/packages/client-web/test/i18n-pair-panel.test.ts +72 -0
  793. package/packages/client-web/test/i18n-pair-view.test.ts +164 -0
  794. package/packages/client-web/test/mcp-client-view.test.ts +106 -0
  795. package/packages/client-web/test/modlens-view.test.ts +198 -0
  796. package/packages/client-web/test/openpets-view.test.ts +57 -0
  797. package/packages/client-web/test/plugin-dev-view.test.ts +63 -0
  798. package/packages/client-web/test/plugin-stars-panel.test.ts +44 -0
  799. package/packages/client-web/test/plugin-stars-view.test.ts +88 -1
  800. package/packages/client-web/test/readme-gen-panel.test.ts +81 -0
  801. package/packages/client-web/test/readme-gen-view.test.ts +91 -0
  802. package/packages/client-web/test/recall-unread-view.test.ts +153 -0
  803. package/packages/client-web/test/session-bridge-view.test.ts +102 -0
  804. package/packages/client-web/test/session-insights-panel.test.ts +85 -0
  805. package/packages/client-web/test/session-insights-view.test.ts +152 -0
  806. package/packages/client-web/test/skill-guard-view.test.ts +138 -0
  807. package/packages/client-web/test/sql-lens-panel.test.ts +52 -0
  808. package/packages/client-web/test/sql-lens-view.test.ts +134 -0
  809. package/packages/client-web/test/test-harness-panel.test.ts +228 -0
  810. package/packages/client-web/test/token-guard-view.test.ts +93 -0
  811. package/packages/client-web/test/turn-rewind-view.test.ts +159 -0
  812. package/packages/client-web/test/vision-toolkit-view.test.ts +152 -0
  813. package/packages/client-web/test/yaml-validator-view.test.ts +100 -0
  814. package/packages/core/dist/atomic-write.d.ts +8 -0
  815. package/packages/core/dist/atomic-write.d.ts.map +1 -0
  816. package/packages/core/dist/atomic-write.js +40 -0
  817. package/packages/core/dist/atomic-write.js.map +1 -0
  818. package/packages/core/dist/boot.d.ts.map +1 -1
  819. package/packages/core/dist/boot.js +132 -10
  820. package/packages/core/dist/boot.js.map +1 -1
  821. package/packages/core/dist/bounded-file.d.ts +7 -0
  822. package/packages/core/dist/bounded-file.d.ts.map +1 -0
  823. package/packages/core/dist/bounded-file.js +50 -0
  824. package/packages/core/dist/bounded-file.js.map +1 -0
  825. package/packages/core/dist/config.d.ts +2 -0
  826. package/packages/core/dist/config.d.ts.map +1 -1
  827. package/packages/core/dist/config.js +21 -0
  828. package/packages/core/dist/config.js.map +1 -1
  829. package/packages/core/dist/cordis-timer.d.ts +15 -0
  830. package/packages/core/dist/cordis-timer.d.ts.map +1 -0
  831. package/packages/core/dist/cordis-timer.js +99 -0
  832. package/packages/core/dist/cordis-timer.js.map +1 -0
  833. package/packages/core/dist/plugins/agent-teams.d.ts +5 -1
  834. package/packages/core/dist/plugins/agent-teams.d.ts.map +1 -1
  835. package/packages/core/dist/plugins/agent-teams.js +986 -105
  836. package/packages/core/dist/plugins/agent-teams.js.map +1 -1
  837. package/packages/core/dist/plugins/anchored-standard.d.ts +1 -0
  838. package/packages/core/dist/plugins/anchored-standard.d.ts.map +1 -1
  839. package/packages/core/dist/plugins/anchored-standard.js +39 -11
  840. package/packages/core/dist/plugins/anchored-standard.js.map +1 -1
  841. package/packages/core/dist/plugins/annotation.d.ts +1 -0
  842. package/packages/core/dist/plugins/annotation.d.ts.map +1 -1
  843. package/packages/core/dist/plugins/annotation.js +35 -17
  844. package/packages/core/dist/plugins/annotation.js.map +1 -1
  845. package/packages/core/dist/plugins/archify.d.ts +1 -0
  846. package/packages/core/dist/plugins/archify.d.ts.map +1 -1
  847. package/packages/core/dist/plugins/archify.js +69 -22
  848. package/packages/core/dist/plugins/archify.js.map +1 -1
  849. package/packages/core/dist/plugins/at-file.d.ts +5 -1
  850. package/packages/core/dist/plugins/at-file.d.ts.map +1 -1
  851. package/packages/core/dist/plugins/at-file.js +120 -29
  852. package/packages/core/dist/plugins/at-file.js.map +1 -1
  853. package/packages/core/dist/plugins/auto-mode.d.ts.map +1 -1
  854. package/packages/core/dist/plugins/auto-mode.js +89 -20
  855. package/packages/core/dist/plugins/auto-mode.js.map +1 -1
  856. package/packages/core/dist/plugins/better-sidebar.d.ts +1 -0
  857. package/packages/core/dist/plugins/better-sidebar.d.ts.map +1 -1
  858. package/packages/core/dist/plugins/better-sidebar.js +14 -4
  859. package/packages/core/dist/plugins/better-sidebar.js.map +1 -1
  860. package/packages/core/dist/plugins/browser-fetch.d.ts +1 -0
  861. package/packages/core/dist/plugins/browser-fetch.d.ts.map +1 -1
  862. package/packages/core/dist/plugins/browser-fetch.js +288 -96
  863. package/packages/core/dist/plugins/browser-fetch.js.map +1 -1
  864. package/packages/core/dist/plugins/browser-session.d.ts.map +1 -1
  865. package/packages/core/dist/plugins/browser-session.js +445 -106
  866. package/packages/core/dist/plugins/browser-session.js.map +1 -1
  867. package/packages/core/dist/plugins/canvas-draw.d.ts +1 -0
  868. package/packages/core/dist/plugins/canvas-draw.d.ts.map +1 -1
  869. package/packages/core/dist/plugins/canvas-draw.js +71 -19
  870. package/packages/core/dist/plugins/canvas-draw.js.map +1 -1
  871. package/packages/core/dist/plugins/change-verifier.d.ts +1 -0
  872. package/packages/core/dist/plugins/change-verifier.d.ts.map +1 -1
  873. package/packages/core/dist/plugins/change-verifier.js +30 -9
  874. package/packages/core/dist/plugins/change-verifier.js.map +1 -1
  875. package/packages/core/dist/plugins/cleaner.d.ts +5 -1
  876. package/packages/core/dist/plugins/cleaner.d.ts.map +1 -1
  877. package/packages/core/dist/plugins/cleaner.js +337 -40
  878. package/packages/core/dist/plugins/cleaner.js.map +1 -1
  879. package/packages/core/dist/plugins/cli-notifier.d.ts +2 -1
  880. package/packages/core/dist/plugins/cli-notifier.d.ts.map +1 -1
  881. package/packages/core/dist/plugins/cli-notifier.js +99 -42
  882. package/packages/core/dist/plugins/cli-notifier.js.map +1 -1
  883. package/packages/core/dist/plugins/code2skill.d.ts +1 -0
  884. package/packages/core/dist/plugins/code2skill.d.ts.map +1 -1
  885. package/packages/core/dist/plugins/code2skill.js +178 -38
  886. package/packages/core/dist/plugins/code2skill.js.map +1 -1
  887. package/packages/core/dist/plugins/colleague-skill.d.ts +2 -1
  888. package/packages/core/dist/plugins/colleague-skill.d.ts.map +1 -1
  889. package/packages/core/dist/plugins/colleague-skill.js +79 -49
  890. package/packages/core/dist/plugins/colleague-skill.js.map +1 -1
  891. package/packages/core/dist/plugins/context-doctor.d.ts +6 -1
  892. package/packages/core/dist/plugins/context-doctor.d.ts.map +1 -1
  893. package/packages/core/dist/plugins/context-doctor.js +403 -39
  894. package/packages/core/dist/plugins/context-doctor.js.map +1 -1
  895. package/packages/core/dist/plugins/context.d.ts +1 -0
  896. package/packages/core/dist/plugins/context.d.ts.map +1 -1
  897. package/packages/core/dist/plugins/context.js +169 -42
  898. package/packages/core/dist/plugins/context.js.map +1 -1
  899. package/packages/core/dist/plugins/cost-meter.d.ts +4 -0
  900. package/packages/core/dist/plugins/cost-meter.d.ts.map +1 -1
  901. package/packages/core/dist/plugins/cost-meter.js +319 -93
  902. package/packages/core/dist/plugins/cost-meter.js.map +1 -1
  903. package/packages/core/dist/plugins/dependency-checker.d.ts +11 -2
  904. package/packages/core/dist/plugins/dependency-checker.d.ts.map +1 -1
  905. package/packages/core/dist/plugins/dependency-checker.js +463 -114
  906. package/packages/core/dist/plugins/dependency-checker.js.map +1 -1
  907. package/packages/core/dist/plugins/docker-sandbox.d.ts +1 -0
  908. package/packages/core/dist/plugins/docker-sandbox.d.ts.map +1 -1
  909. package/packages/core/dist/plugins/docker-sandbox.js +322 -80
  910. package/packages/core/dist/plugins/docker-sandbox.js.map +1 -1
  911. package/packages/core/dist/plugins/fail-logger.d.ts +1 -0
  912. package/packages/core/dist/plugins/fail-logger.d.ts.map +1 -1
  913. package/packages/core/dist/plugins/fail-logger.js +187 -20
  914. package/packages/core/dist/plugins/fail-logger.js.map +1 -1
  915. package/packages/core/dist/plugins/genui.d.ts +1 -0
  916. package/packages/core/dist/plugins/genui.d.ts.map +1 -1
  917. package/packages/core/dist/plugins/genui.js +103 -38
  918. package/packages/core/dist/plugins/genui.js.map +1 -1
  919. package/packages/core/dist/plugins/git-time-capsule.d.ts +8 -2
  920. package/packages/core/dist/plugins/git-time-capsule.d.ts.map +1 -1
  921. package/packages/core/dist/plugins/git-time-capsule.js +400 -54
  922. package/packages/core/dist/plugins/git-time-capsule.js.map +1 -1
  923. package/packages/core/dist/plugins/graph-memory.d.ts.map +1 -1
  924. package/packages/core/dist/plugins/graph-memory.js +329 -42
  925. package/packages/core/dist/plugins/graph-memory.js.map +1 -1
  926. package/packages/core/dist/plugins/history-compressor.d.ts.map +1 -1
  927. package/packages/core/dist/plugins/history-compressor.js +31 -12
  928. package/packages/core/dist/plugins/history-compressor.js.map +1 -1
  929. package/packages/core/dist/plugins/hol-guard.d.ts.map +1 -1
  930. package/packages/core/dist/plugins/hol-guard.js +33 -13
  931. package/packages/core/dist/plugins/hol-guard.js.map +1 -1
  932. package/packages/core/dist/plugins/i18n-pair.d.ts +5 -1
  933. package/packages/core/dist/plugins/i18n-pair.d.ts.map +1 -1
  934. package/packages/core/dist/plugins/i18n-pair.js +308 -52
  935. package/packages/core/dist/plugins/i18n-pair.js.map +1 -1
  936. package/packages/core/dist/plugins/image-compressor.d.ts +7 -0
  937. package/packages/core/dist/plugins/image-compressor.d.ts.map +1 -1
  938. package/packages/core/dist/plugins/image-compressor.js +98 -25
  939. package/packages/core/dist/plugins/image-compressor.js.map +1 -1
  940. package/packages/core/dist/plugins/llm-verifier.d.ts.map +1 -1
  941. package/packages/core/dist/plugins/llm-verifier.js +21 -11
  942. package/packages/core/dist/plugins/llm-verifier.js.map +1 -1
  943. package/packages/core/dist/plugins/mcp-client.d.ts.map +1 -1
  944. package/packages/core/dist/plugins/mcp-client.js +986 -232
  945. package/packages/core/dist/plugins/mcp-client.js.map +1 -1
  946. package/packages/core/dist/plugins/mcp-panel.d.ts.map +1 -1
  947. package/packages/core/dist/plugins/mcp-panel.js +30 -16
  948. package/packages/core/dist/plugins/mcp-panel.js.map +1 -1
  949. package/packages/core/dist/plugins/memory.d.ts.map +1 -1
  950. package/packages/core/dist/plugins/memory.js +292 -59
  951. package/packages/core/dist/plugins/memory.js.map +1 -1
  952. package/packages/core/dist/plugins/mirage-bridge.d.ts.map +1 -1
  953. package/packages/core/dist/plugins/mirage-bridge.js +20 -10
  954. package/packages/core/dist/plugins/mirage-bridge.js.map +1 -1
  955. package/packages/core/dist/plugins/mock-server.d.ts.map +1 -1
  956. package/packages/core/dist/plugins/mock-server.js +85 -54
  957. package/packages/core/dist/plugins/mock-server.js.map +1 -1
  958. package/packages/core/dist/plugins/model.d.ts +3 -0
  959. package/packages/core/dist/plugins/model.d.ts.map +1 -1
  960. package/packages/core/dist/plugins/model.js +3 -0
  961. package/packages/core/dist/plugins/model.js.map +1 -1
  962. package/packages/core/dist/plugins/models.d.ts.map +1 -1
  963. package/packages/core/dist/plugins/models.js +10 -2
  964. package/packages/core/dist/plugins/models.js.map +1 -1
  965. package/packages/core/dist/plugins/modlens.d.ts +8 -1
  966. package/packages/core/dist/plugins/modlens.d.ts.map +1 -1
  967. package/packages/core/dist/plugins/modlens.js +438 -31
  968. package/packages/core/dist/plugins/modlens.js.map +1 -1
  969. package/packages/core/dist/plugins/module-search.d.ts +1 -0
  970. package/packages/core/dist/plugins/module-search.d.ts.map +1 -1
  971. package/packages/core/dist/plugins/module-search.js +35 -16
  972. package/packages/core/dist/plugins/module-search.js.map +1 -1
  973. package/packages/core/dist/plugins/obsidian-sync.d.ts.map +1 -1
  974. package/packages/core/dist/plugins/obsidian-sync.js +20 -11
  975. package/packages/core/dist/plugins/obsidian-sync.js.map +1 -1
  976. package/packages/core/dist/plugins/openpets.d.ts.map +1 -1
  977. package/packages/core/dist/plugins/openpets.js +203 -44
  978. package/packages/core/dist/plugins/openpets.js.map +1 -1
  979. package/packages/core/dist/plugins/plan-execute.d.ts +4 -1
  980. package/packages/core/dist/plugins/plan-execute.d.ts.map +1 -1
  981. package/packages/core/dist/plugins/plan-execute.js +42 -21
  982. package/packages/core/dist/plugins/plan-execute.js.map +1 -1
  983. package/packages/core/dist/plugins/plugin-check.d.ts +12 -3
  984. package/packages/core/dist/plugins/plugin-check.d.ts.map +1 -1
  985. package/packages/core/dist/plugins/plugin-check.js +83 -12
  986. package/packages/core/dist/plugins/plugin-check.js.map +1 -1
  987. package/packages/core/dist/plugins/plugin-dev.d.ts +1 -0
  988. package/packages/core/dist/plugins/plugin-dev.d.ts.map +1 -1
  989. package/packages/core/dist/plugins/plugin-dev.js +156 -23
  990. package/packages/core/dist/plugins/plugin-dev.js.map +1 -1
  991. package/packages/core/dist/plugins/plugin-finder.d.ts +1 -0
  992. package/packages/core/dist/plugins/plugin-finder.d.ts.map +1 -1
  993. package/packages/core/dist/plugins/plugin-finder.js +131 -13
  994. package/packages/core/dist/plugins/plugin-finder.js.map +1 -1
  995. package/packages/core/dist/plugins/plugin-radar.d.ts +4 -0
  996. package/packages/core/dist/plugins/plugin-radar.d.ts.map +1 -1
  997. package/packages/core/dist/plugins/plugin-radar.js +137 -36
  998. package/packages/core/dist/plugins/plugin-radar.js.map +1 -1
  999. package/packages/core/dist/plugins/plugin-stars.d.ts.map +1 -1
  1000. package/packages/core/dist/plugins/plugin-stars.js +282 -81
  1001. package/packages/core/dist/plugins/plugin-stars.js.map +1 -1
  1002. package/packages/core/dist/plugins/prompt-guard.d.ts +1 -0
  1003. package/packages/core/dist/plugins/prompt-guard.d.ts.map +1 -1
  1004. package/packages/core/dist/plugins/prompt-guard.js +60 -9
  1005. package/packages/core/dist/plugins/prompt-guard.js.map +1 -1
  1006. package/packages/core/dist/plugins/prompt-library.d.ts +1 -0
  1007. package/packages/core/dist/plugins/prompt-library.d.ts.map +1 -1
  1008. package/packages/core/dist/plugins/prompt-library.js +4 -1
  1009. package/packages/core/dist/plugins/prompt-library.js.map +1 -1
  1010. package/packages/core/dist/plugins/readme-gen.d.ts +6 -2
  1011. package/packages/core/dist/plugins/readme-gen.d.ts.map +1 -1
  1012. package/packages/core/dist/plugins/readme-gen.js +514 -73
  1013. package/packages/core/dist/plugins/readme-gen.js.map +1 -1
  1014. package/packages/core/dist/plugins/recall-unread.d.ts +1 -1
  1015. package/packages/core/dist/plugins/recall-unread.d.ts.map +1 -1
  1016. package/packages/core/dist/plugins/recall-unread.js +411 -68
  1017. package/packages/core/dist/plugins/recall-unread.js.map +1 -1
  1018. package/packages/core/dist/plugins/resources.d.ts.map +1 -1
  1019. package/packages/core/dist/plugins/resources.js +66 -3
  1020. package/packages/core/dist/plugins/resources.js.map +1 -1
  1021. package/packages/core/dist/plugins/reverse-skill.d.ts.map +1 -1
  1022. package/packages/core/dist/plugins/reverse-skill.js +2 -1
  1023. package/packages/core/dist/plugins/reverse-skill.js.map +1 -1
  1024. package/packages/core/dist/plugins/reviewer-bot.d.ts +1 -0
  1025. package/packages/core/dist/plugins/reviewer-bot.d.ts.map +1 -1
  1026. package/packages/core/dist/plugins/reviewer-bot.js +35 -16
  1027. package/packages/core/dist/plugins/reviewer-bot.js.map +1 -1
  1028. package/packages/core/dist/plugins/runtime-doctor.d.ts +1 -0
  1029. package/packages/core/dist/plugins/runtime-doctor.d.ts.map +1 -1
  1030. package/packages/core/dist/plugins/runtime-doctor.js +4 -1
  1031. package/packages/core/dist/plugins/runtime-doctor.js.map +1 -1
  1032. package/packages/core/dist/plugins/runtime.d.ts.map +1 -1
  1033. package/packages/core/dist/plugins/runtime.js +104 -70
  1034. package/packages/core/dist/plugins/runtime.js.map +1 -1
  1035. package/packages/core/dist/plugins/secure-audit.d.ts +1 -0
  1036. package/packages/core/dist/plugins/secure-audit.d.ts.map +1 -1
  1037. package/packages/core/dist/plugins/secure-audit.js +30 -12
  1038. package/packages/core/dist/plugins/secure-audit.js.map +1 -1
  1039. package/packages/core/dist/plugins/session-bookmarks.d.ts +1 -0
  1040. package/packages/core/dist/plugins/session-bookmarks.d.ts.map +1 -1
  1041. package/packages/core/dist/plugins/session-bookmarks.js +4 -1
  1042. package/packages/core/dist/plugins/session-bookmarks.js.map +1 -1
  1043. package/packages/core/dist/plugins/session-bridge.d.ts +1 -0
  1044. package/packages/core/dist/plugins/session-bridge.d.ts.map +1 -1
  1045. package/packages/core/dist/plugins/session-bridge.js +401 -88
  1046. package/packages/core/dist/plugins/session-bridge.js.map +1 -1
  1047. package/packages/core/dist/plugins/session-compare.d.ts +1 -0
  1048. package/packages/core/dist/plugins/session-compare.d.ts.map +1 -1
  1049. package/packages/core/dist/plugins/session-compare.js +4 -1
  1050. package/packages/core/dist/plugins/session-compare.js.map +1 -1
  1051. package/packages/core/dist/plugins/session-export.d.ts +1 -0
  1052. package/packages/core/dist/plugins/session-export.d.ts.map +1 -1
  1053. package/packages/core/dist/plugins/session-export.js +6 -6
  1054. package/packages/core/dist/plugins/session-export.js.map +1 -1
  1055. package/packages/core/dist/plugins/session-insights.d.ts +37 -1
  1056. package/packages/core/dist/plugins/session-insights.d.ts.map +1 -1
  1057. package/packages/core/dist/plugins/session-insights.js +406 -21
  1058. package/packages/core/dist/plugins/session-insights.js.map +1 -1
  1059. package/packages/core/dist/plugins/session-search.d.ts +1 -0
  1060. package/packages/core/dist/plugins/session-search.d.ts.map +1 -1
  1061. package/packages/core/dist/plugins/session-search.js +4 -1
  1062. package/packages/core/dist/plugins/session-search.js.map +1 -1
  1063. package/packages/core/dist/plugins/session.d.ts.map +1 -1
  1064. package/packages/core/dist/plugins/session.js +8 -1
  1065. package/packages/core/dist/plugins/session.js.map +1 -1
  1066. package/packages/core/dist/plugins/skill-catalog.d.ts +1 -0
  1067. package/packages/core/dist/plugins/skill-catalog.d.ts.map +1 -1
  1068. package/packages/core/dist/plugins/skill-catalog.js +6 -5
  1069. package/packages/core/dist/plugins/skill-catalog.js.map +1 -1
  1070. package/packages/core/dist/plugins/skill-guard.d.ts +2 -1
  1071. package/packages/core/dist/plugins/skill-guard.d.ts.map +1 -1
  1072. package/packages/core/dist/plugins/skill-guard.js +241 -61
  1073. package/packages/core/dist/plugins/skill-guard.js.map +1 -1
  1074. package/packages/core/dist/plugins/sql-lens-worker.d.ts +2 -0
  1075. package/packages/core/dist/plugins/sql-lens-worker.d.ts.map +1 -0
  1076. package/packages/core/dist/plugins/sql-lens-worker.js +206 -0
  1077. package/packages/core/dist/plugins/sql-lens-worker.js.map +1 -0
  1078. package/packages/core/dist/plugins/sql-lens.d.ts +7 -1
  1079. package/packages/core/dist/plugins/sql-lens.d.ts.map +1 -1
  1080. package/packages/core/dist/plugins/sql-lens.js +301 -68
  1081. package/packages/core/dist/plugins/sql-lens.js.map +1 -1
  1082. package/packages/core/dist/plugins/stdio.d.ts +3 -0
  1083. package/packages/core/dist/plugins/stdio.d.ts.map +1 -1
  1084. package/packages/core/dist/plugins/stdio.js +62 -4
  1085. package/packages/core/dist/plugins/stdio.js.map +1 -1
  1086. package/packages/core/dist/plugins/synapse.d.ts.map +1 -1
  1087. package/packages/core/dist/plugins/synapse.js +17 -9
  1088. package/packages/core/dist/plugins/synapse.js.map +1 -1
  1089. package/packages/core/dist/plugins/tab-manager.d.ts +1 -0
  1090. package/packages/core/dist/plugins/tab-manager.d.ts.map +1 -1
  1091. package/packages/core/dist/plugins/tab-manager.js +167 -62
  1092. package/packages/core/dist/plugins/tab-manager.js.map +1 -1
  1093. package/packages/core/dist/plugins/taskboard.d.ts.map +1 -1
  1094. package/packages/core/dist/plugins/taskboard.js +50 -22
  1095. package/packages/core/dist/plugins/taskboard.js.map +1 -1
  1096. package/packages/core/dist/plugins/telemetry-blocker.d.ts +4 -1
  1097. package/packages/core/dist/plugins/telemetry-blocker.d.ts.map +1 -1
  1098. package/packages/core/dist/plugins/telemetry-blocker.js +30 -11
  1099. package/packages/core/dist/plugins/telemetry-blocker.js.map +1 -1
  1100. package/packages/core/dist/plugins/test-harness.d.ts +7 -1
  1101. package/packages/core/dist/plugins/test-harness.d.ts.map +1 -1
  1102. package/packages/core/dist/plugins/test-harness.js +255 -43
  1103. package/packages/core/dist/plugins/test-harness.js.map +1 -1
  1104. package/packages/core/dist/plugins/theme-studio.d.ts.map +1 -1
  1105. package/packages/core/dist/plugins/theme-studio.js +4 -2
  1106. package/packages/core/dist/plugins/theme-studio.js.map +1 -1
  1107. package/packages/core/dist/plugins/token-guard.d.ts.map +1 -1
  1108. package/packages/core/dist/plugins/token-guard.js +164 -32
  1109. package/packages/core/dist/plugins/token-guard.js.map +1 -1
  1110. package/packages/core/dist/plugins/tools.d.ts.map +1 -1
  1111. package/packages/core/dist/plugins/tools.js +4 -1
  1112. package/packages/core/dist/plugins/tools.js.map +1 -1
  1113. package/packages/core/dist/plugins/turn-rewind.d.ts +17 -0
  1114. package/packages/core/dist/plugins/turn-rewind.d.ts.map +1 -1
  1115. package/packages/core/dist/plugins/turn-rewind.js +340 -36
  1116. package/packages/core/dist/plugins/turn-rewind.js.map +1 -1
  1117. package/packages/core/dist/plugins/undo-savepoint.d.ts.map +1 -1
  1118. package/packages/core/dist/plugins/undo-savepoint.js +157 -51
  1119. package/packages/core/dist/plugins/undo-savepoint.js.map +1 -1
  1120. package/packages/core/dist/plugins/vision-toolkit.d.ts +22 -3
  1121. package/packages/core/dist/plugins/vision-toolkit.d.ts.map +1 -1
  1122. package/packages/core/dist/plugins/vision-toolkit.js +389 -66
  1123. package/packages/core/dist/plugins/vision-toolkit.js.map +1 -1
  1124. package/packages/core/dist/plugins/web-research.d.ts.map +1 -1
  1125. package/packages/core/dist/plugins/web-research.js +13 -4
  1126. package/packages/core/dist/plugins/web-research.js.map +1 -1
  1127. package/packages/core/dist/plugins/workspace-navigator.d.ts +8 -2
  1128. package/packages/core/dist/plugins/workspace-navigator.d.ts.map +1 -1
  1129. package/packages/core/dist/plugins/workspace-navigator.js +28 -10
  1130. package/packages/core/dist/plugins/workspace-navigator.js.map +1 -1
  1131. package/packages/core/dist/plugins/workspace-search.d.ts +7 -0
  1132. package/packages/core/dist/plugins/workspace-search.d.ts.map +1 -1
  1133. package/packages/core/dist/plugins/workspace-search.js +67 -34
  1134. package/packages/core/dist/plugins/workspace-search.js.map +1 -1
  1135. package/packages/core/dist/plugins/yaml-validator.d.ts +1 -0
  1136. package/packages/core/dist/plugins/yaml-validator.d.ts.map +1 -1
  1137. package/packages/core/dist/plugins/yaml-validator.js +156 -47
  1138. package/packages/core/dist/plugins/yaml-validator.js.map +1 -1
  1139. package/packages/core/dist/runtime.d.ts.map +1 -1
  1140. package/packages/core/dist/runtime.js +8 -3
  1141. package/packages/core/dist/runtime.js.map +1 -1
  1142. package/packages/core/dist/services.d.ts.map +1 -1
  1143. package/packages/core/dist/services.js +22 -2
  1144. package/packages/core/dist/services.js.map +1 -1
  1145. package/packages/core/dist/stdio.d.ts +1 -0
  1146. package/packages/core/dist/stdio.d.ts.map +1 -1
  1147. package/packages/core/dist/stdio.js +241 -25
  1148. package/packages/core/dist/stdio.js.map +1 -1
  1149. package/packages/core/dist/workspace-path.d.ts +1 -0
  1150. package/packages/core/dist/workspace-path.d.ts.map +1 -1
  1151. package/packages/core/dist/workspace-path.js +9 -0
  1152. package/packages/core/dist/workspace-path.js.map +1 -1
  1153. package/packages/core/package.json +1 -1
  1154. package/packages/core/profiles/default/cordis.yml +4 -2
  1155. package/packages/core/src/atomic-write.ts +45 -0
  1156. package/packages/core/src/boot.ts +123 -11
  1157. package/packages/core/src/bounded-file.ts +41 -0
  1158. package/packages/core/src/config.ts +18 -0
  1159. package/packages/core/src/cordis-timer.ts +107 -0
  1160. package/packages/core/src/plugins/agent-teams.ts +1003 -103
  1161. package/packages/core/src/plugins/anchored-standard.ts +41 -14
  1162. package/packages/core/src/plugins/annotation.ts +36 -19
  1163. package/packages/core/src/plugins/archify.ts +80 -33
  1164. package/packages/core/src/plugins/at-file.ts +110 -26
  1165. package/packages/core/src/plugins/auto-mode.ts +91 -24
  1166. package/packages/core/src/plugins/better-sidebar.ts +15 -4
  1167. package/packages/core/src/plugins/browser-fetch.ts +286 -95
  1168. package/packages/core/src/plugins/browser-session.ts +421 -102
  1169. package/packages/core/src/plugins/canvas-draw.ts +74 -21
  1170. package/packages/core/src/plugins/change-verifier.ts +33 -9
  1171. package/packages/core/src/plugins/cleaner.ts +339 -37
  1172. package/packages/core/src/plugins/cli-notifier.ts +110 -41
  1173. package/packages/core/src/plugins/code2skill.ts +175 -34
  1174. package/packages/core/src/plugins/colleague-skill.ts +72 -47
  1175. package/packages/core/src/plugins/context-doctor.ts +410 -40
  1176. package/packages/core/src/plugins/context.ts +164 -39
  1177. package/packages/core/src/plugins/cost-meter.ts +360 -113
  1178. package/packages/core/src/plugins/dependency-checker.ts +456 -119
  1179. package/packages/core/src/plugins/docker-sandbox.ts +312 -76
  1180. package/packages/core/src/plugins/fail-logger.ts +169 -18
  1181. package/packages/core/src/plugins/genui.ts +104 -42
  1182. package/packages/core/src/plugins/git-time-capsule.ts +424 -55
  1183. package/packages/core/src/plugins/graph-memory.ts +333 -60
  1184. package/packages/core/src/plugins/history-compressor.ts +29 -12
  1185. package/packages/core/src/plugins/hol-guard.ts +31 -13
  1186. package/packages/core/src/plugins/i18n-pair.ts +296 -52
  1187. package/packages/core/src/plugins/image-compressor.ts +98 -25
  1188. package/packages/core/src/plugins/llm-verifier.ts +39 -21
  1189. package/packages/core/src/plugins/mcp-client.ts +1069 -249
  1190. package/packages/core/src/plugins/mcp-panel.ts +37 -21
  1191. package/packages/core/src/plugins/memory.ts +262 -57
  1192. package/packages/core/src/plugins/mirage-bridge.ts +22 -10
  1193. package/packages/core/src/plugins/mock-server.ts +91 -60
  1194. package/packages/core/src/plugins/model.ts +4 -0
  1195. package/packages/core/src/plugins/models.ts +10 -2
  1196. package/packages/core/src/plugins/modlens.ts +463 -29
  1197. package/packages/core/src/plugins/module-search.ts +40 -19
  1198. package/packages/core/src/plugins/obsidian-sync.ts +26 -15
  1199. package/packages/core/src/plugins/openpets.ts +193 -42
  1200. package/packages/core/src/plugins/plan-execute.ts +49 -21
  1201. package/packages/core/src/plugins/plugin-check.ts +100 -16
  1202. package/packages/core/src/plugins/plugin-dev.ts +167 -23
  1203. package/packages/core/src/plugins/plugin-finder.ts +119 -12
  1204. package/packages/core/src/plugins/plugin-radar.ts +130 -39
  1205. package/packages/core/src/plugins/plugin-stars.ts +252 -80
  1206. package/packages/core/src/plugins/prompt-guard.ts +51 -12
  1207. package/packages/core/src/plugins/prompt-library.ts +14 -8
  1208. package/packages/core/src/plugins/readme-gen.ts +476 -79
  1209. package/packages/core/src/plugins/recall-unread.ts +412 -68
  1210. package/packages/core/src/plugins/resources.ts +70 -2
  1211. package/packages/core/src/plugins/reverse-skill.ts +9 -5
  1212. package/packages/core/src/plugins/reviewer-bot.ts +34 -16
  1213. package/packages/core/src/plugins/runtime-doctor.ts +4 -1
  1214. package/packages/core/src/plugins/runtime.ts +98 -68
  1215. package/packages/core/src/plugins/secure-audit.ts +33 -12
  1216. package/packages/core/src/plugins/session-bookmarks.ts +12 -6
  1217. package/packages/core/src/plugins/session-bridge.ts +404 -89
  1218. package/packages/core/src/plugins/session-compare.ts +10 -4
  1219. package/packages/core/src/plugins/session-export.ts +12 -9
  1220. package/packages/core/src/plugins/session-insights.ts +454 -31
  1221. package/packages/core/src/plugins/session-search.ts +4 -1
  1222. package/packages/core/src/plugins/session.ts +8 -1
  1223. package/packages/core/src/plugins/skill-catalog.ts +13 -8
  1224. package/packages/core/src/plugins/skill-guard.ts +254 -61
  1225. package/packages/core/src/plugins/sql-lens-worker.ts +202 -0
  1226. package/packages/core/src/plugins/sql-lens.ts +323 -71
  1227. package/packages/core/src/plugins/stdio.ts +58 -3
  1228. package/packages/core/src/plugins/synapse.ts +16 -9
  1229. package/packages/core/src/plugins/tab-manager.ts +163 -65
  1230. package/packages/core/src/plugins/taskboard.ts +81 -47
  1231. package/packages/core/src/plugins/telemetry-blocker.ts +27 -11
  1232. package/packages/core/src/plugins/test-harness.ts +275 -42
  1233. package/packages/core/src/plugins/theme-studio.ts +7 -2
  1234. package/packages/core/src/plugins/token-guard.ts +171 -31
  1235. package/packages/core/src/plugins/tools.ts +4 -1
  1236. package/packages/core/src/plugins/turn-rewind.ts +351 -37
  1237. package/packages/core/src/plugins/undo-savepoint.ts +160 -59
  1238. package/packages/core/src/plugins/vision-toolkit.ts +420 -63
  1239. package/packages/core/src/plugins/web-research.ts +19 -7
  1240. package/packages/core/src/plugins/workspace-navigator.ts +39 -14
  1241. package/packages/core/src/plugins/workspace-search.ts +75 -37
  1242. package/packages/core/src/plugins/yaml-validator.ts +165 -46
  1243. package/packages/core/src/runtime.ts +8 -2
  1244. package/packages/core/src/services.ts +22 -2
  1245. package/packages/core/src/stdio.ts +220 -25
  1246. package/packages/core/src/workspace-path.ts +10 -0
  1247. package/packages/core/test/agent-teams.test.ts +495 -2
  1248. package/packages/core/test/anchored-standard.test.ts +60 -0
  1249. package/packages/core/test/annotation.test.ts +69 -0
  1250. package/packages/core/test/archify.test.ts +212 -1
  1251. package/packages/core/test/at-file.test.ts +666 -0
  1252. package/packages/core/test/atomic-write.test.ts +52 -0
  1253. package/packages/core/test/auto-mode.test.ts +629 -0
  1254. package/packages/core/test/better-sidebar.test.ts +108 -1
  1255. package/packages/core/test/boot.test.ts +129 -1
  1256. package/packages/core/test/bounded-file.test.ts +55 -0
  1257. package/packages/core/test/browser-fetch-rebinding.test.ts +93 -0
  1258. package/packages/core/test/browser-fetch.test.ts +844 -0
  1259. package/packages/core/test/browser-session.test.ts +1236 -0
  1260. package/packages/core/test/canvas-draw.test.ts +164 -0
  1261. package/packages/core/test/change-verifier.test.ts +200 -0
  1262. package/packages/core/test/cleaner.test.ts +316 -0
  1263. package/packages/core/test/cli-notifier.test.ts +235 -0
  1264. package/packages/core/test/code2skill.test.ts +264 -0
  1265. package/packages/core/test/colleague-skill.test.ts +167 -0
  1266. package/packages/core/test/config.test.ts +8 -0
  1267. package/packages/core/test/context-doctor.test.ts +597 -2
  1268. package/packages/core/test/context-insights.test.ts +396 -0
  1269. package/packages/core/test/cordis-timer.test.ts +147 -0
  1270. package/packages/core/test/cost-meter.test.ts +362 -0
  1271. package/packages/core/test/dependency-checker.test.ts +576 -3
  1272. package/packages/core/test/docker-sandbox.test.ts +170 -0
  1273. package/packages/core/test/fail-logger.test.ts +363 -0
  1274. package/packages/core/test/genui.test.ts +162 -0
  1275. package/packages/core/test/git-time-capsule.test.ts +1364 -3
  1276. package/packages/core/test/graph-memory.test.ts +508 -0
  1277. package/packages/core/test/history-compressor.test.ts +47 -0
  1278. package/packages/core/test/hol-guard.test.ts +61 -0
  1279. package/packages/core/test/i18n-pair.test.ts +367 -0
  1280. package/packages/core/test/image-compressor.test.ts +59 -0
  1281. package/packages/core/test/llm-verifier.test.ts +4 -0
  1282. package/packages/core/test/mcp-client.test.ts +1037 -0
  1283. package/packages/core/test/mcp-panel.test.ts +91 -0
  1284. package/packages/core/test/memory.test.ts +125 -0
  1285. package/packages/core/test/mirage-bridge.test.ts +4 -0
  1286. package/packages/core/test/mock-server.test.ts +63 -0
  1287. package/packages/core/test/model.test.ts +62 -0
  1288. package/packages/core/test/models.test.ts +85 -0
  1289. package/packages/core/test/modlens.test.ts +615 -0
  1290. package/packages/core/test/module-search.test.ts +20 -0
  1291. package/packages/core/test/obsidian-sync.test.ts +57 -0
  1292. package/packages/core/test/openpets.test.ts +273 -0
  1293. package/packages/core/test/plan-execute.test.ts +86 -0
  1294. package/packages/core/test/plugin-dev.test.ts +246 -0
  1295. package/packages/core/test/plugin-finder.test.ts +105 -0
  1296. package/packages/core/test/plugin-radar.test.ts +87 -0
  1297. package/packages/core/test/plugin-stars.test.ts +429 -4
  1298. package/packages/core/test/profiles.integration.test.ts +451 -2
  1299. package/packages/core/test/prompt-guard.test.ts +78 -0
  1300. package/packages/core/test/readme-gen.test.ts +403 -3
  1301. package/packages/core/test/recall-unread.test.ts +559 -2
  1302. package/packages/core/test/registry.test.ts +16 -0
  1303. package/packages/core/test/resources.test.ts +310 -0
  1304. package/packages/core/test/reviewer-bot.test.ts +55 -0
  1305. package/packages/core/test/runtime-fixture.ts +10 -1
  1306. package/packages/core/test/runtime.test.ts +155 -2
  1307. package/packages/core/test/secure-audit.test.ts +14 -1
  1308. package/packages/core/test/services.test.ts +2772 -117
  1309. package/packages/core/test/session-bridge.test.ts +309 -1
  1310. package/packages/core/test/session-insights.test.ts +486 -0
  1311. package/packages/core/test/session.test.ts +153 -0
  1312. package/packages/core/test/skill-guard.test.ts +261 -2
  1313. package/packages/core/test/sql-lens.test.ts +244 -0
  1314. package/packages/core/test/stdio-args.test.ts +484 -1
  1315. package/packages/core/test/stdio.test.ts +159 -0
  1316. package/packages/core/test/synapse.test.ts +67 -0
  1317. package/packages/core/test/tab-manager.test.ts +58 -0
  1318. package/packages/core/test/taskboard.test.ts +73 -0
  1319. package/packages/core/test/telemetry-blocker.test.ts +61 -0
  1320. package/packages/core/test/test-harness.test.ts +297 -0
  1321. package/packages/core/test/token-guard.test.ts +362 -1
  1322. package/packages/core/test/tools.test.ts +118 -0
  1323. package/packages/core/test/turn-rewind.test.ts +532 -2
  1324. package/packages/core/test/undo-savepoint.test.ts +222 -0
  1325. package/packages/core/test/vision-toolkit.test.ts +480 -7
  1326. package/packages/core/test/web-research.test.ts +63 -0
  1327. package/packages/core/test/workspace-git-status.test.ts +19 -2
  1328. package/packages/core/test/workspace-navigator.test.ts +11 -1
  1329. package/packages/core/test/workspace-search.test.ts +88 -0
  1330. package/packages/core/test/yaml-validator.test.ts +195 -0
  1331. package/packages/host-webserver/package.json +1 -1
  1332. package/apps/web/dist/assets/index-C_AdODuM.js +0 -20
  1333. package/apps/web/dist/assets/index-De8Rm01Z.css +0 -2
@@ -9,11 +9,40 @@ import { messageText, projectChatTurns } from "./message-content.js";
9
9
  import { formatAnnotationPrompt, parseAnnotationPrompt } from "./annotation-ui.js";
10
10
  import { marketplaceCategoryTabs, marketplaceDetailPath, marketplaceStatisticItems, readMarketplaceDetailId } from "./marketplace-navigation.js";
11
11
  import { loadMarketplaceCatalog } from "./marketplace-catalog.js";
12
- import { pluginStarsRows } from "./plugin-stars-view.js";
13
- import { browserSessionTabs } from "./browser-session-view.js";
12
+ import { pluginStarsPanelView } from "./plugin-stars-view.js";
13
+ import { pluginDevPanelView } from "./plugin-dev-view.js";
14
+ import { atFilePanelView } from "./at-file-view.js";
15
+ import { testHarnessPanelView } from "./test-harness-view.js";
16
+ import { sessionInsightsPanelView } from "./session-insights-view.js";
17
+ import { yamlValidatorPanelView } from "./yaml-validator-view.js";
18
+ import { browserFetchPanelView } from "./browser-fetch-view.js";
19
+ import { browserSessionPanelView } from "./browser-session-view.js";
20
+ import { cleanerPanelView } from "./cleaner-view.js";
14
21
  import { matchesPluginQuery } from "./plugin-search.js";
15
22
  import { readInstalledPluginDetailId } from "./plugin-navigation.js";
16
23
  import { installedPluginCardContent } from "./plugin-card.js";
24
+ import { costMeterPanelView } from "./cost-meter-view.js";
25
+ import { dependencyCheckerPanelView } from "./dependency-checker-view.js";
26
+ import { dockerSandboxPanelView } from "./docker-sandbox-view.js";
27
+ import { failLoggerPanelView } from "./fail-logger-view.js";
28
+ import { genUiPanelView } from "./genui-view.js";
29
+ import { gitTimeCapsulePanelView } from "./git-time-capsule-view.js";
30
+ import { graphMemoryPanelView } from "./graph-memory-view.js";
31
+ import { i18nPairPanelView } from "./i18n-pair-view.js";
32
+ import { mcpClientPanelView } from "./mcp-client-view.js";
33
+ import { openPetsPanelView } from "./openpets-view.js";
34
+ import { recallUnreadPanelView } from "./recall-unread-view.js";
35
+ import { turnRewindPanelView } from "./turn-rewind-view.js";
36
+ import { contextDoctorPanelView } from "./context-doctor-view.js";
37
+ import { contextInsightsPanelView } from "./context-insights-view.js";
38
+ import { tokenGuardPanelView } from "./token-guard-view.js";
39
+ import { sessionBridgePanelView } from "./session-bridge-view.js";
40
+ import { skillGuardPanelView } from "./skill-guard-view.js";
41
+ import { sqlLensPanelView } from "./sql-lens-view.js";
42
+ import { agentTeamsPanelView } from "./agent-teams-view.js";
43
+ import { modlensPanelView } from "./modlens-view.js";
44
+ import { visionToolkitPanelView } from "./vision-toolkit-view.js";
45
+ import { readmeGenPanelView } from "./readme-gen-view.js";
17
46
  const value = (input, fallback = "—") => {
18
47
  if (input === undefined || input === null || input === "")
19
48
  return fallback;
@@ -471,8 +500,30 @@ function pluginPanelValue(input) {
471
500
  return value(input);
472
501
  }
473
502
  }
474
- function PluginPanelCard({ panel, inline = false }) {
475
- const data = panel.data !== null && typeof panel.data === "object" && !Array.isArray(panel.data) ? panel.data : undefined;
503
+ function pluginPanelData(value) {
504
+ try {
505
+ if (value === null || typeof value !== "object" || Array.isArray(value))
506
+ return undefined;
507
+ const prototype = Object.getPrototypeOf(value);
508
+ if (prototype !== Object.prototype && prototype !== null)
509
+ return undefined;
510
+ const descriptors = Object.getOwnPropertyDescriptors(value);
511
+ if (Reflect.ownKeys(descriptors).some((key) => typeof key !== "string"))
512
+ return undefined;
513
+ const output = Object.create(null);
514
+ for (const [key, descriptor] of Object.entries(descriptors)) {
515
+ if (!("value" in descriptor))
516
+ return undefined;
517
+ output[key] = descriptor.value;
518
+ }
519
+ return output;
520
+ }
521
+ catch {
522
+ return undefined;
523
+ }
524
+ }
525
+ export function PluginPanelCard({ panel, inline = false }) {
526
+ const data = pluginPanelData(panel.data);
476
527
  const entries = data ? Object.entries(data) : [["内容", panel.data]];
477
528
  const items = data && Array.isArray(data.items) ? data.items : [];
478
529
  const pluginEntries = data && Array.isArray(data.entries) ? data.entries : [];
@@ -483,67 +534,167 @@ function PluginPanelCard({ panel, inline = false }) {
483
534
  })) : (_jsx("div", { className: "px-3 py-4 text-[12px] text-[#687381]", children: "\u6682\u65E0\u65E5\u5FD7\u8F93\u51FA\u3002" })) })] })) : panel.id === "plugin-group-panel" ? (_jsx("div", { className: "mt-3 max-h-64 overflow-auto rounded-lg border border-[#edf0f3]", children: pluginEntries.length ? (pluginEntries.map((item, index) => {
484
535
  const entry = item !== null && typeof item === "object" ? item : {};
485
536
  return (_jsxs("div", { className: "flex items-center gap-3 border-b border-[#edf0f3] px-3 py-2 last:border-b-0", children: [_jsx("span", { className: `h-2 w-2 shrink-0 rounded-full ${entry.enabled === false ? "bg-[#a0a8b2]" : "bg-[#22c55e]"}` }), _jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-[11px] text-[#30343b]", children: value(entry.name ?? "plugin") }), _jsx("span", { className: "text-[10px] text-[#687381]", children: value(entry.state ?? "unknown") })] }, `${value(entry.id ?? "plugin")}-${index}`));
486
- })) : (_jsx("div", { className: "px-3 py-4 text-[12px] text-[#687381]", children: "\u6682\u65E0\u63D2\u4EF6\u6761\u76EE\u3002" })) })) : panel.id === "timer-service-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3 rounded-lg bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "font-mono text-[10px] uppercase tracking-[0.08em] text-[#687381]", children: "\u670D\u52A1\u72B6\u6001" }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] font-semibold ${data?.registered === true ? "bg-[#e8f8ee] text-[#14733f]" : "bg-[#fff4e5] text-[#8a5a00]"}`, children: data?.registered === true ? "已注册" : "未注册" })] }), _jsx("div", { className: "flex flex-wrap gap-2", children: capabilities.map((capability, index) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(capability) }, `${value(capability)}-${index}`))) })] })) : panel.id === "agent-teams-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "grid gap-2 sm:grid-cols-3", children: [capabilities.length > 0
487
- ? capabilities.map((capability, index) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 text-center text-[10px] text-[#3565c5]", children: value(capability) }, `${value(capability)}-${index}`)))
488
- : null, _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u6210\u5458" }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(Array.isArray(data?.members) ? data.members.length : 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u4EFB\u52A1" }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(Array.isArray(data?.tasks) ? data.tasks.length : 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u672A\u8BFB\u6D88\u606F" }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(Array.isArray(data?.messages)
489
- ? data.messages.filter((message) => message !== null && typeof message === "object" && message.read !== true)
490
- .length
491
- : 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u53EF\u6267\u884C\u4EFB\u52A1" }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(Array.isArray(data?.readyTasks) ? data.readyTasks.length : 0) })] })] }), Array.isArray(data?.dependencyCycle) && data.dependencyCycle.length > 1 ? (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[11px] text-[#b42318]", children: ["\u4F9D\u8D56\u5FAA\u73AF\uFF1A", data.dependencyCycle.map((item) => value(item)).join(" → ")] })) : null, _jsx("div", { className: "grid gap-2", children: Array.isArray(data?.members) && data.members.length > 0 ? (data.members.map((item, index) => {
492
- const member = item !== null && typeof item === "object" ? item : {};
493
- return (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#edf0f3] px-3 py-2", children: [_jsx("span", { className: "h-2 w-2 rounded-full bg-[#22c55e]" }), _jsx("span", { className: "min-w-0 flex-1 truncate text-[11px] font-semibold text-[#30343b]", children: value(member.name ?? "成员") }), _jsx("span", { className: "text-[10px] text-[#687381]", children: value(member.role ?? "协作成员") }), _jsx("span", { className: "font-mono text-[10px] text-[#3565c5]", children: value(member.status ?? "idle") })] }, `${value(member.id ?? "member")}-${index}`));
494
- })) : (_jsx("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3 text-[12px] text-[#687381]", children: "\u6682\u65E0\u534F\u4F5C\u6210\u5458\u3002" })) }), _jsx("div", { className: "grid gap-2", children: Array.isArray(data?.tasks) && data.tasks.length > 0 ? (data.tasks.map((item, index) => {
495
- const task = item !== null && typeof item === "object" ? item : {};
496
- return (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#edf0f3] px-3 py-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-[11px] text-[#30343b]", children: value(task.title ?? "未命名任务") }), Array.isArray(task.dependsOn) && task.dependsOn.length > 0 ? (_jsxs("span", { className: "mt-0.5 block truncate font-mono text-[9px] text-[#687381]", children: ["\u4F9D\u8D56\uFF1A", task.dependsOn.join(", ")] })) : null] }), _jsx("span", { className: "text-[10px] text-[#687381]", children: value(task.assignee ?? "unassigned") }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] ${task.status === "blocked" ? "bg-[#fff4e5] text-[#8a5a00]" : task.status === "done" ? "bg-[#e8f8ee] text-[#14733f]" : "bg-[#edf3fe] text-[#3565c5]"}`, children: value(task.status ?? "todo") })] }, `${value(task.id ?? "task")}-${index}`));
497
- })) : (_jsx("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3 text-[12px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u4EFB\u52A1\u3002\u53EF\u8BA9 Agent \u4F7F\u7528 team_task \u521B\u5EFA\u3002" })) }), _jsxs("div", { className: "grid gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u56E2\u961F\u6D88\u606F" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "durable mailbox" })] }), Array.isArray(data?.messages) && data.messages.length > 0 ? (Array.from(data.messages)
498
- .reverse()
499
- .slice(0, 5)
500
- .map((item, index) => {
501
- const message = item !== null && typeof item === "object" ? item : {};
502
- return (_jsxs("div", { className: `rounded-lg border px-3 py-2 ${message.read === true ? "border-[#edf0f3] bg-white" : "border-[#cfe0ff] bg-[#f4f8ff]"}`, children: [_jsxs("div", { className: "flex items-center gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { className: "font-mono text-[#3565c5]", children: [value(message.from ?? "unknown"), " \u2192 ", value(message.to ?? "unknown")] }), _jsx("span", { className: "ml-auto", children: message.read === true ? "已读" : "未读" })] }), _jsx("p", { className: "mt-1 whitespace-pre-wrap break-words text-[11px] text-[#30343b]", children: value(message.body ?? "") })] }, `${value(message.id ?? "message")}-${index}`));
503
- })) : (_jsx("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3 text-[12px] text-[#687381]", children: "\u6682\u65E0\u56E2\u961F\u6D88\u606F\u3002" }))] })] })) : panel.id === "modlens-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${data?.attached === true ? "border-[#b9e6c9] bg-[#f0fbf4]" : "border-[#e3e7ee] bg-[#f6f8fa]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: data?.attached === true ? "图片已附加" : "等待图片" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "vision_inspect" })] }), data?.image !== null && data?.image !== undefined && typeof data.image === "object" ? (_jsxs("p", { className: "mt-2 truncate text-[11px] text-[#65707b]", children: [value(data.image.path ?? "图片"), " \u00B7 ", value(data.image.bytes ?? 0), " bytes"] })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8C03\u7528 vision_inspect \u5E76\u63D0\u4F9B\u5DE5\u4F5C\u533A\u5185\u56FE\u7247\u8DEF\u5F84\u3002" }))] }), _jsx("div", { className: "flex flex-wrap gap-2", children: capabilities.map((capability, index) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(capability) }, `${value(capability)}-${index}`))) })] })) : panel.id === "at-file-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6700\u8FD1\u9644\u52A0" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "file_context" })] }), data?.lastFile !== null && data?.lastFile !== undefined && typeof data.lastFile === "object" ? (_jsxs("p", { className: "mt-2 truncate text-[11px] text-[#65707b]", children: [value(data.lastFile.path ?? "文件"), " \u00B7 ", value(data.lastFile.bytes ?? 0), " bytes"] })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u9644\u52A0\u6587\u4EF6\u3002\u53EF\u4F7F\u7528 @file \u6216\u8BA9 Agent \u8C03\u7528 file_context\u3002" }))] }), _jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#687381]", children: [_jsx("span", { children: "\u5355\u6587\u4EF6\u4E0A\u9650" }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(data?.maxBytes ?? 0), " bytes"] })] })] })) : panel.id === "git-time-capsule-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6700\u8FD1\u5FEB\u7167" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "git_snapshot" })] }), data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? (_jsxs("p", { className: "mt-2 truncate text-[11px] text-[#65707b]", children: [value(data.latest.name ?? "snapshot"), " \u00B7 ", value(data.latest.files ?? 0), " \u4E2A\u6587\u4EF6", data.latest.restored === true ? " · 已恢复" : ""] })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u5FEB\u7167\u3002\u4FEE\u6539\u4EE3\u7801\u524D\u8BA9 Agent \u8C03\u7528 git_snapshot\u3002" }))] }), _jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#687381]", children: [_jsx("span", { children: "\u4FDD\u7559\u5FEB\u7167" }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(Array.isArray(data?.capsules) ? data.capsules.length : 0), " / 20"] })] }), _jsx("p", { className: "text-[10px] leading-4 text-[#687381]", children: "\u6062\u590D\u4F1A\u53CD\u5411\u5E94\u7528\u9009\u4E2D\u7684 patch\uFF0C\u5FC5\u987B\u663E\u5F0F\u4F20\u5165 confirm=true\u3002" })] })) : panel.id === "dependency-checker-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
504
- const report = data?.report !== null && typeof data?.report === "object" ? data.report : {};
505
- const missing = Array.isArray(report.missing) ? report.missing : [];
506
- const invalid = Array.isArray(report.invalid) ? report.invalid : [];
507
- const conflicts = Array.isArray(report.conflicts) ? report.conflicts : [];
508
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-2 text-[10px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u6E05\u5355\u7C7B\u578B" }), _jsx("strong", { className: "font-mono uppercase text-[#315fb8]", children: value(report.ecosystem ?? "npm") })] }), _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
509
- ["声明", report.declared ?? 0],
510
- ["已安装", report.installed ?? 0],
511
- ["缺失", missing.length + invalid.length],
512
- ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${missing.length || invalid.length || conflicts.length ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"}`, children: missing.length || invalid.length
513
- ? `缺失或无效:${[...missing, ...invalid].map((item) => value(item)).join(", ")}`
514
- : "依赖声明与本地安装一致。" }), conflicts.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-[#f3dfab] bg-[#fffaf0] px-3 py-3 text-[11px] text-[#8a6200]", children: [_jsx("strong", { children: "\u7248\u672C\u51B2\u7A81" }), _jsx("ul", { className: "mt-1 grid gap-1 pl-4", children: conflicts.slice(0, 6).map((item, index) => {
515
- const conflict = item !== null && typeof item === "object" ? item : {};
516
- const constraints = Array.isArray(conflict.constraints) ? conflict.constraints.map((constraint) => value(constraint)).join(" · ") : "";
517
- return (_jsxs("li", { children: [_jsx("code", { children: value(conflict.name ?? "dependency") }), "\uFF1A", constraints] }, `${value(conflict.name ?? "dependency")}-${index}`));
518
- }) })] })) : null] }));
519
- })() })) : panel.id === "token-guard-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: _jsxs("div", { className: "grid gap-2 sm:grid-cols-2", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${data?.exceeded === true ? "border-[#f4caca] bg-[#fff5f5]" : "border-[#e3eaf8] bg-[#f6f8ff]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u4E0A\u4E0B\u6587\u9884\u7B97" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: [value(data?.percent ?? "—"), "% / ", value(data?.maxPercent ?? "—"), "%"] })] }), _jsx("div", { className: "mt-2 h-2 overflow-hidden rounded-full bg-[#dfe8fb]", children: _jsx("div", { className: `h-full rounded-full ${data?.exceeded === true ? "bg-[#d64545]" : "bg-[#5d8bea]"}`, style: { width: `${Math.max(0, Math.min(100, typeof data?.percent === "number" ? data.percent : 0))}%` } }) }), _jsx("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: data?.exceeded === true ? "已达到阈值,运行会被自动停止。" : `自动停止次数:${value(data?.aborts ?? 0)}` })] }), _jsxs("div", { className: `rounded-lg border px-3 py-3 ${data?.runExceeded === true ? "border-[#f4caca] bg-[#fff5f5]" : "border-[#e3eaf8] bg-[#f6f8ff]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5355\u6B21\u4EFB\u52A1" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: [value(data?.runTokens ?? "—"), " / ", value(data?.maxRunTokens || "—")] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: data?.maxRunTokens ? "按 agent_start 后累计 token 熔断。" : "未启用绝对 Token 上限。" })] })] }) })) : panel.id === "test-harness-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
520
- const run = data.latest;
521
- return (_jsxs("div", { className: `rounded-lg border px-3 py-3 ${run.exitCode === 0 ? "border-[#b9e6c9] bg-[#f0fbf4]" : "border-[#f4caca] bg-[#fff5f5]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "font-mono text-[11px] font-semibold text-[#30343b]", children: value(run.command ?? "npm run test") }), _jsxs("strong", { className: `text-[12px] ${run.exitCode === 0 ? "text-[#14733f]" : "text-[#b42318]"}`, children: ["exit ", value(run.exitCode ?? "—")] })] }), _jsxs("p", { className: "mt-2 text-[11px] text-[#65707b]", children: ["\u8017\u65F6 ", value(run.durationMs ?? 0), " ms"] })] }));
522
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6267\u884C\u9A8C\u8BC1\u811A\u672C\u3002\u53EF\u8BA9 Agent \u8C03\u7528 run_project_tests\u3002" })), _jsx("div", { className: "flex flex-wrap gap-2", children: Array.isArray(data?.allowedScripts)
523
- ? data.allowedScripts.map((script, index) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(script) }, `${value(script)}-${index}`)))
524
- : null })] })) : panel.id === "session-insights-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
525
- const tokens = data?.tokens !== null && typeof data?.tokens === "object" ? data.tokens : {};
526
- const usage = data?.contextUsage !== null && typeof data?.contextUsage === "object" ? data.contextUsage : {};
527
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid grid-cols-3 gap-2", children: [
528
- ["消息", data?.totalMessages ?? 0],
529
- ["工具调用", data?.toolCalls ?? 0],
530
- ["成本", `$${Number(data?.cost ?? 0).toFixed(4)}`],
531
- ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u4E0A\u4E0B\u6587" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: [value(usage.percent ?? "—"), "%"] })] }), _jsxs("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: [value(tokens.total ?? 0), " tracked tokens \u00B7 \u8F93\u5165 ", value(tokens.input ?? 0), " \u00B7 \u8F93\u51FA ", value(tokens.output ?? 0)] })] })] }));
532
- })() })) : panel.id === "session-bridge-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
533
- const latestPreview = data?.latestPreview !== null && typeof data?.latestPreview === "object"
534
- ? data.latestPreview.preview
535
- : undefined;
536
- const preview = latestPreview ??
537
- (data?.currentPreview !== null && typeof data?.currentPreview === "object" ? data.currentPreview : {});
537
+ })) : (_jsx("div", { className: "px-3 py-4 text-[12px] text-[#687381]", children: "\u6682\u65E0\u63D2\u4EF6\u6761\u76EE\u3002" })) })) : panel.id === "timer-service-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3 rounded-lg bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "font-mono text-[10px] uppercase tracking-[0.08em] text-[#687381]", children: "\u670D\u52A1\u72B6\u6001" }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] font-semibold ${data?.registered === true ? "bg-[#e8f8ee] text-[#14733f]" : "bg-[#fff4e5] text-[#8a5a00]"}`, children: data?.registered === true ? "已注册" : "未注册" })] }), _jsx("div", { className: "flex flex-wrap gap-2", children: capabilities.map((capability, index) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(capability) }, `${value(capability)}-${index}`))) })] })) : panel.id === "agent-teams-panel" ? ((() => {
538
+ const view = agentTeamsPanelView(data);
539
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsx("div", { className: "grid gap-2 sm:grid-cols-4", children: [
540
+ ["成员", view.inventory.members.total],
541
+ ["任务", view.inventory.tasks.total],
542
+ ["未读消息", view.inventory.messages.unread],
543
+ ["可执行任务", view.inventory.tasks.ready],
544
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), view.dependencyCycle !== null && view.dependencyCycle.length > 1 ? (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[11px] text-[#b42318]", children: ["\u4F9D\u8D56\u5FAA\u73AF\uFF1A", view.dependencyCycle.join(" → ")] })) : null, _jsx("div", { className: "grid gap-2", children: view.members.length > 0 ? (view.members.map((member) => (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#edf0f3] px-3 py-2", children: [_jsx("span", { className: `h-2 w-2 rounded-full ${member.status === "working" ? "bg-[#22c55e]" : "bg-[#a0a8b2]"}` }), _jsx("span", { className: "min-w-0 flex-1 truncate text-[11px] font-semibold text-[#30343b]", children: member.name }), _jsx("span", { className: "truncate text-[10px] text-[#687381]", children: member.role }), _jsx("span", { className: "font-mono text-[10px] text-[#3565c5]", children: member.status })] }, member.id)))) : (_jsx("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3 text-[12px] text-[#687381]", children: "\u6682\u65E0\u534F\u4F5C\u89D2\u8272\u3002" })) }), _jsx("div", { className: "grid gap-2", children: view.tasks.length > 0 ? (view.tasks.map((task) => (_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#edf0f3] px-3 py-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-[11px] text-[#30343b]", children: task.title }), task.dependsOn.length > 0 ? (_jsxs("span", { className: "mt-0.5 block truncate font-mono text-[9px] text-[#687381]", children: ["\u4F9D\u8D56\uFF1A", task.dependsOn.join(", ")] })) : null] }), _jsx("span", { className: "text-[10px] text-[#687381]", children: task.assignee }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] ${task.status === "blocked" ? "bg-[#fff4e5] text-[#8a5a00]" : task.status === "done" ? "bg-[#e8f8ee] text-[#14733f]" : "bg-[#edf3fe] text-[#3565c5]"}`, children: task.status })] }, task.id)))) : (_jsx("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3 text-[12px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u4EFB\u52A1\u3002\u53EF\u8BA9 Agent \u4F7F\u7528 team_task \u521B\u5EFA\u3002" })) }), _jsxs("div", { className: "grid gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u4F1A\u8BDD\u5185\u90AE\u7BB1\u5907\u6CE8" }), _jsxs("span", { className: "font-mono text-[10px] text-[#687381]", children: [view.inventory.messages.shown, " / ", view.inventory.messages.total] })] }), view.messages.length > 0 ? ([...view.messages].reverse().map((message) => (_jsxs("div", { className: `rounded-lg border px-3 py-2 ${message.read ? "border-[#edf0f3] bg-white" : "border-[#cfe0ff] bg-[#f4f8ff]"}`, children: [_jsxs("div", { className: "flex items-center gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { className: "font-mono text-[#3565c5]", children: [message.from, " \u2192 ", message.to] }), _jsx("span", { className: "ml-auto", children: message.read ? "已读" : "未读" })] }), _jsx("p", { className: "mt-1 whitespace-pre-wrap break-words text-[11px] text-[#30343b]", children: message.body })] }, message.id)))) : (_jsx("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3 text-[12px] text-[#687381]", children: "\u6682\u65E0\u90AE\u7BB1\u5907\u6CE8\u3002" }))] }), view.truncated || view.inventory.members.truncated || view.inventory.tasks.truncated || view.inventory.messages.truncated ? (_jsx("p", { className: "text-[10px] leading-4 text-[#8a6200]", children: "\u9762\u677F\u6309\u56FA\u5B9A\u5B89\u5168\u4E0A\u9650\u5C55\u793A\uFF1B\u5B8C\u6574\u8BA1\u6570\u4FDD\u7559\u5728\u4E0A\u65B9\u3002" })) : null, _jsx("p", { className: "text-[10px] leading-4 text-[#687381]", children: "\u8FD9\u662F\u5F53\u524D Pi \u4F1A\u8BDD\u7684\u534F\u4F5C\u8D26\u672C\uFF0C\u4E0D\u4F1A\u542F\u52A8\u5176\u4ED6 Agent\u3001\u521B\u5EFA\u8FDB\u7A0B\u6216\u5411\u5916\u90E8\u53D1\u9001\u6D88\u606F\u3002" })] }));
545
+ })()) : panel.id === "modlens-panel" ? ((() => {
546
+ const view = modlensPanelView(panel.data);
547
+ const stateLabel = view.status.state === "running"
548
+ ? "正在读取视觉内容"
549
+ : view.status.state === "failed"
550
+ ? "视觉检查失败"
551
+ : view.status.state === "cancelled"
552
+ ? "视觉检查已取消"
553
+ : view.status.state === "completed"
554
+ ? "视觉检查完成"
555
+ : "等待图片";
556
+ const mode = view.status.state === "idle" ? view.image?.mode : view.status.mode;
557
+ const path = view.status.state === "idle" ? view.image?.path : view.status.path;
558
+ const stateStyle = view.status.state === "failed"
559
+ ? "border-[#f4caca] bg-[#fff5f5]"
560
+ : view.status.state === "cancelled"
561
+ ? "border-[#f1d7a8] bg-[#fff9ed]"
562
+ : view.status.state === "running"
563
+ ? "border-[#c9d9f7] bg-[#f4f8ff]"
564
+ : view.attached
565
+ ? "border-[#b9e6c9] bg-[#f0fbf4]"
566
+ : "border-[#e3e7ee] bg-[#f6f8fa]";
567
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${stateStyle}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: stateLabel }), _jsx("span", { className: "rounded-full border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[9px] text-[#3565c5]", children: mode === "native" ? "原生直传" : mode === "evidence" ? "ModLens 证据" : "vision_inspect" })] }), path !== undefined ? _jsx("p", { className: "mt-2 truncate font-mono text-[10px] text-[#65707b]", children: path }) : null, view.image !== null ? (_jsxs("div", { className: "mt-2 flex flex-wrap gap-x-3 gap-y-1 text-[10px] text-[#687381]", children: [_jsx("span", { children: view.image.mimeType }), _jsxs("span", { children: [view.image.bytes.toLocaleString(), " bytes"] }), view.image.cached ? _jsx("span", { className: "font-semibold text-[#14733f]", children: "\u7F13\u5B58\u547D\u4E2D" }) : null] })) : view.status.state === "idle" ? (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8BA9 Agent \u8C03\u7528 vision_inspect\uFF0C\u5E76\u63D0\u4F9B\u5DE5\u4F5C\u533A\u5185\u7684\u56FE\u7247\u8DEF\u5F84\u3002" })) : null, view.status.state === "failed" || view.status.state === "cancelled" ? (_jsx("p", { className: "mt-2 break-words text-[10px] leading-4 text-[#9b2c24]", children: view.status.error })) : null] }), _jsx("div", { className: "flex flex-wrap gap-2", children: view.supportedTypes.map((type) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: type }, type))) }), _jsxs("div", { className: "flex flex-wrap gap-2 font-mono text-[9px] text-[#687381]", children: [_jsxs("span", { children: ["image:", Math.round(view.limits.imageBytes / 1_048_576), "MiB"] }), _jsxs("span", { children: ["evidence:", Math.round(view.limits.evidenceBytes / 1_024), "KiB"] }), _jsxs("span", { children: ["timeout:", Math.round(view.limits.timeoutMs / 1_000), "s"] }), _jsxs("span", { children: ["cache:", view.limits.cacheEntries] })] }), view.truncated ? _jsx("p", { className: "text-[10px] leading-4 text-[#8a6200]", children: "\u5F02\u5E38\u9762\u677F\u6570\u636E\u5DF2\u6309\u56FA\u5B9A\u5B89\u5168\u8FB9\u754C\u4E22\u5F03\u6216\u622A\u65AD\u3002" }) : null, _jsx("p", { className: "rounded-lg border border-[#dce5f5] bg-[#f7f9fd] px-3 py-2 text-[10px] leading-4 text-[#566273]", children: "\u7EAF\u6587\u672C\u6A21\u578B\u4F1A\u542F\u52A8\u5916\u90E8 ModLens \u5F15\u64CE\uFF0C\u53EF\u80FD\u4F7F\u7528\u7F51\u7EDC\u548C provider \u914D\u989D\u5E76\u4EA7\u751F\u8D39\u7528\u3002\u89C6\u89C9\u8BC1\u636E\u662F\u4E0D\u53EF\u4FE1\u6570\u636E\uFF0C\u4E0D\u6784\u6210\u6307\u4EE4\u6216\u7528\u6237\u6388\u6743\u3002" })] }));
568
+ })()) : panel.id === "vision-toolkit-panel" ? ((() => {
569
+ const view = visionToolkitPanelView(panel.data);
570
+ const report = view.report;
571
+ const stateLabel = view.status.state === "running"
572
+ ? view.status.operation === "catalog"
573
+ ? "正在盘点视觉素材"
574
+ : "正在读取图片元数据"
575
+ : view.status.state === "failed"
576
+ ? "视觉素材检查失败"
577
+ : view.status.state === "cancelled"
578
+ ? "视觉素材检查已取消"
579
+ : view.status.state === "completed"
580
+ ? "视觉素材检查完成"
581
+ : "等待检查";
582
+ const stateStyle = view.status.state === "failed"
583
+ ? "border-[#f4caca] bg-[#fff5f5]"
584
+ : view.status.state === "cancelled"
585
+ ? "border-[#f1d7a8] bg-[#fff9ed]"
586
+ : view.status.state === "running"
587
+ ? "border-[#c9d9f7] bg-[#f4f8ff]"
588
+ : view.status.state === "completed"
589
+ ? "border-[#b9e6c9] bg-[#f0fbf4]"
590
+ : "border-[#e3e7ee] bg-[#f6f8fa]";
591
+ const shownAssets = report?.assets.slice(0, 20) ?? [];
592
+ const shownIssues = report?.issues.slice(0, 10) ?? [];
593
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${stateStyle}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: stateLabel }), _jsx("span", { className: "rounded-full border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[9px] text-[#3565c5]", children: view.status.state === "idle" ? "vision_catalog" : view.status.operation === "catalog" ? "catalog" : "image info" })] }), view.status.state !== "idle" && view.status.path !== undefined ? (_jsx("p", { className: "mt-2 truncate font-mono text-[10px] text-[#65707b]", children: view.status.path })) : null, view.status.state === "failed" || view.status.state === "cancelled" ? (_jsx("p", { className: "mt-2 break-words text-[10px] leading-4 text-[#9b2c24]", children: view.status.error })) : null] }), _jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: [
594
+ ["已扫描", report?.scannedEntries ?? 0],
595
+ ["候选图片", report?.inspectedCandidates ?? 0],
596
+ ["有效素材", report?.assets.length ?? 0],
597
+ ["问题", report?.issues.length ?? 0],
598
+ ].map(([label, count]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: label }), _jsx("strong", { className: "mt-1 block font-mono text-[16px] text-[#30343b]", children: count })] }, label))) }), shownAssets.length > 0 ? (_jsx("div", { className: "max-h-52 overflow-auto rounded-lg border border-[#edf0f3] bg-[#fbfcfd]", children: shownAssets.map((asset, index) => (_jsxs("div", { className: "border-b border-[#edf0f3] px-3 py-2 last:border-b-0", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "min-w-0 truncate font-mono text-[10px] text-[#30343b]", title: asset.path, children: asset.path }), _jsx("span", { className: "shrink-0 font-mono text-[9px] text-[#3565c5]", children: asset.width === null ? "?×?" : `${asset.width}×${asset.height}` })] }), _jsxs("div", { className: "mt-1 flex flex-wrap gap-x-3 text-[9px] text-[#687381]", children: [_jsx("span", { children: asset.mimeType }), _jsxs("span", { children: [asset.bytes.toLocaleString(), " B"] }), asset.headerTruncated ? _jsx("span", { className: "text-[#8a6200]", children: "\u4EC5\u626B\u63CF\u524D 256 KiB" }) : null] })] }, `${asset.path}-${index}`))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: report === null ? "让 Agent 调用 vision_catalog 盘点工作区图片,或调用 vision_image_info 检查单张图片。" : "未发现有效的受支持图片。" })), shownIssues.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-[#f1d7a8] bg-[#fff9ed] px-3 py-3", children: [_jsxs("p", { className: "text-[10px] font-semibold text-[#8a6200]", children: ["\u56FE\u7247\u95EE\u9898\uFF08\u663E\u793A ", shownIssues.length, " \u6761\uFF09"] }), _jsx("div", { className: "mt-2 grid gap-1.5", children: shownIssues.map((issue, index) => (_jsxs("p", { className: "break-words font-mono text-[9px] leading-4 text-[#6f5730]", children: [issue.path, ": ", issue.reason] }, `${issue.path}-${index}`))) })] })) : null, _jsxs("div", { className: "flex flex-wrap gap-2", children: [view.supportedTypes.map((type) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[9px] text-[#3565c5]", children: type }, type))), _jsxs("span", { className: "rounded-md border border-[#e3e7ee] bg-[#f6f8fa] px-2 py-1 font-mono text-[9px] text-[#687381]", children: ["file\u2264", Math.round(view.limits.imageBytes / 1_048_576), "MiB"] }), _jsxs("span", { className: "rounded-md border border-[#e3e7ee] bg-[#f6f8fa] px-2 py-1 font-mono text-[9px] text-[#687381]", children: ["assets\u2264", view.limits.assets] })] }), view.truncated ||
599
+ report?.truncated === true ||
600
+ report?.issuesTruncated === true ||
601
+ (report !== null && (report.assets.length > shownAssets.length || report.issues.length > shownIssues.length)) ? (_jsx("p", { className: "text-[10px] leading-4 text-[#8a6200]", children: "\u9762\u677F\u6216\u626B\u63CF\u7ED3\u679C\u5DF2\u6309\u56FA\u5B9A\u5B89\u5168\u4E0A\u9650\u622A\u65AD\uFF1B\u8BA1\u6570\u4E0E\u8B66\u544A\u4F1A\u4FDD\u7559\u53EF\u89C1\u3002" })) : null, _jsx("p", { className: "rounded-lg border border-[#dce5f5] bg-[#f7f9fd] px-3 py-2 text-[10px] leading-4 text-[#566273]", children: "\u4EC5\u5728\u5F53\u524D workspace \u5185\u672C\u5730\u8BFB\u53D6\u56FE\u7247\u5934\u90E8\uFF0C\u4E0D\u4E0A\u4F20\u56FE\u7247\u3001\u4E0D\u8C03\u7528\u5916\u90E8\u89C6\u89C9\u670D\u52A1\uFF1B\u8FD9\u91CC\u5C55\u793A\u7684\u662F\u5143\u6570\u636E\uFF0C\u4E0D\u662F\u5B8C\u6574\u56FE\u50CF\u89E3\u7801\u7ED3\u679C\u3002" })] }));
602
+ })()) : panel.id === "at-file-panel" ? ((() => {
603
+ const view = atFilePanelView(panel.data);
604
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6700\u8FD1\u9644\u52A0" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "file_context" })] }), view.lastFile !== null ? (_jsxs("p", { className: "mt-2 min-w-0 whitespace-normal break-all text-[11px] leading-4 text-[#65707b]", children: [view.lastFile.path, " \u00B7 ", view.lastFile.bytes, " bytes"] })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u9644\u52A0\u6587\u4EF6\u3002\u53EF\u4F7F\u7528 @file \u6216\u8BA9 Agent \u8C03\u7528 file_context\u3002" }))] }), _jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#687381]", children: [_jsx("span", { children: "\u5355\u6587\u4EF6\u4E0A\u9650" }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [view.maxBytes, " bytes"] })] }), view.truncated ? _jsx("p", { className: "text-[10px] leading-4 text-[#8a6200]", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u5DF2\u6309\u56FA\u5B9A\u5B89\u5168\u4E0A\u9650\u8C03\u6574\u3002" }) : null] }));
605
+ })()) : panel.id === "git-time-capsule-panel" ? ((() => {
606
+ const report = gitTimeCapsulePanelView(data);
607
+ const latest = report.latest;
608
+ const statusLabel = latest?.status === "completed" ? "已完成" : latest?.status === "cancelled" ? "已取消" : "失败";
609
+ const statusStyle = latest?.status === "completed"
610
+ ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#147a43]"
611
+ : latest?.status === "cancelled"
612
+ ? "border-[#f1ddb1] bg-[#fff9eb] text-[#996515]"
613
+ : "border-[#f4caca] bg-[#fff5f5] text-[#b42318]";
614
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${latest === null ? "border-[#e3e7ee] bg-[#f6f8fa]" : statusStyle}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: latest?.action === "restore" ? "最近撤销" : "最近捕获" }), latest === null ? (_jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "git_snapshot" })) : (_jsx("span", { className: "rounded-full border border-current px-2 py-0.5 text-[9px] font-semibold", children: statusLabel }))] }), latest === null ? (_jsx("p", { className: "mt-2 text-[11px] leading-4 text-[#687381]", children: "\u5F53\u524D\u6CA1\u6709\u64A4\u9500\u80F6\u56CA\u3002\u5148\u4EA7\u751F unstaged tracked \u6539\u52A8\uFF0C\u518D\u8BA9 Agent \u8C03\u7528 git_snapshot\u3002" })) : (_jsxs("div", { className: "mt-2 grid gap-1 text-[11px] text-[#65707b]", children: [latest.name !== null ? _jsx("p", { className: "truncate font-mono text-[10px] text-[#30343b]", children: latest.name }) : null, _jsxs("p", { children: [latest.files, " \u4E2A\u6587\u4EF6 \u00B7 ", latest.bytes, " bytes \u00B7 ", _jsx("time", { dateTime: latest.at, children: latest.at.replace("T", " ") })] }), latest.error !== null ? _jsx("p", { className: "break-words text-[#b42318]", children: latest.error }) : null] }))] }), _jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6700\u8FD1\u80F6\u56CA" }), _jsxs("span", { className: "font-mono text-[10px] text-[#3565c5]", children: [report.inventory.shown, " / ", report.inventory.total] })] }), report.capsules.length > 0 ? (_jsx("div", { className: "mt-2 max-h-44 overflow-y-auto border-l-2 border-[#cbd8ef] pl-3", children: report.capsules.map((capsule) => (_jsxs("div", { className: "flex min-w-0 items-center gap-2 border-b border-[#eef1f5] py-1.5 last:border-b-0", children: [_jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-[10px] text-[#30343b]", children: capsule.name }), _jsxs("span", { className: "shrink-0 font-mono text-[9px] text-[#687381]", children: [capsule.bytes, " B"] })] }, capsule.name))) })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u5C1A\u672A\u4FDD\u5B58 tracked diff\u3002" })), report.inventory.truncated || report.truncated ? (_jsxs("p", { className: "mt-2 text-[10px] text-[#996515]", children: ["\u5217\u8868\u5DF2\u6309\u5B89\u5168\u4E0A\u9650\u622A\u65AD\uFF0C\u4EC5\u5C55\u793A\u6700\u8FD1 ", report.inventory.displayLimit, " \u6761\u6709\u6548\u8BB0\u5F55\u3002"] })) : null] }), _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { className: "rounded-md bg-[#f6f8fa] px-2 py-1.5", children: ["Git \u8D85\u65F6\uFF1A", report.timeoutMs, " ms"] }), _jsxs("span", { className: "rounded-md bg-[#f6f8fa] px-2 py-1.5", children: ["\u5355\u80F6\u56CA\uFF1A", report.limits.capsuleBytes, " B"] })] }), _jsx("p", { className: "text-[10px] leading-4 text-[#687381]", children: "git_snapshot \u6355\u83B7\u5F53\u524D unstaged tracked \u6539\u52A8\uFF1Bgit_restore \u4F1A\u53CD\u5411\u5E94\u7528\u8BE5 patch\u3002staged \u4E0E\u672A\u8DDF\u8E2A\u6587\u4EF6\u4E0D\u5305\u542B\u5728\u5185\uFF0C\u6062\u590D\u5FC5\u987B\u4F20\u5165 confirm=true\u3002" })] }));
615
+ })()) : panel.id === "dependency-checker-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
616
+ const report = dependencyCheckerPanelView(data);
617
+ const hasProblems = report.missingCount > 0 || report.invalidCount > 0 || report.conflictCount > 0;
618
+ const isIndeterminate = report.unresolvedCount > 0 || report.truncated;
619
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-2 text-[10px]", children: [_jsx("span", { className: "min-w-0 truncate font-mono text-[#65707b]", children: report.manifest }), _jsx("strong", { className: "shrink-0 font-mono uppercase text-[#315fb8]", children: report.ecosystem })] }), _jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-5", children: [
620
+ ["声明", report.declared],
621
+ ["已安装", report.installed],
622
+ ["问题", report.missingCount + report.invalidCount],
623
+ ["可选缺席", report.optionalMissingCount],
624
+ ["未决", report.unresolvedCount],
625
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsx("div", { className: `min-w-0 break-words rounded-lg border px-3 py-3 text-[11px] [overflow-wrap:anywhere] ${hasProblems ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : isIndeterminate ? "border-[#f3dfab] bg-[#fffaf0] text-[#8a6200]" : "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"}`, children: report.missingCount || report.invalidCount
626
+ ? `缺失 ${report.missingCount}、无效 ${report.invalidCount}:${[...report.missing, ...report.invalid].join(", ")}`
627
+ : report.conflictCount
628
+ ? `本地安装存在 ${report.conflictCount} 组声明约束冲突。`
629
+ : report.unresolvedCount
630
+ ? `${report.unresolvedCount} 组声明约束无法离线判定。`
631
+ : report.truncated
632
+ ? "报告不完整,无法确认依赖状态。"
633
+ : "依赖声明与本地安装一致。" }), report.optionalMissingCount > 0 ? (_jsxs("div", { className: "min-w-0 break-words rounded-lg border border-[#f3dfab] bg-[#fffaf0] px-3 py-2 text-[10px] text-[#8a6200] [overflow-wrap:anywhere]", children: ["\u53EF\u9009\u4F9D\u8D56\u672A\u5B89\u88C5\uFF08", report.optionalMissingCount, "\uFF09\uFF1A", report.optionalMissing.join(", ")] })) : null, report.conflicts.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-[#f3dfab] bg-[#fffaf0] px-3 py-3 text-[11px] text-[#8a6200]", children: [_jsx("strong", { children: "\u7248\u672C\u51B2\u7A81" }), _jsx("ul", { className: "mt-1 grid gap-1 pl-4", children: report.conflicts.map((conflict, index) => (_jsxs("li", { className: "min-w-0 break-words [overflow-wrap:anywhere]", children: [_jsx("code", { children: conflict.name }), "\uFF1A", conflict.constraints.join(" · ") || "—"] }, `${conflict.name}-${index}`))) })] })) : null, report.unresolved.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-[#f3dfab] bg-[#fffaf0] px-3 py-3 text-[11px] text-[#8a6200]", children: [_jsx("strong", { children: "\u672A\u51B3\u7EA6\u675F" }), _jsx("ul", { className: "mt-1 grid gap-1 pl-4", children: report.unresolved.map((constraint, index) => (_jsxs("li", { className: "min-w-0 break-words [overflow-wrap:anywhere]", children: [_jsx("code", { children: constraint.name }), "\uFF1A", constraint.constraints.join(" · ") || "—"] }, `${constraint.name}-${index}`))) })] })) : null, _jsxs("div", { className: "flex items-center justify-between text-[10px] text-[#687381]", children: [_jsxs("span", { children: ["\u672C\u5730\u53EA\u8BFB\u626B\u63CF \u00B7 \u4E0A\u9650 ", report.scanLimit, " \u9879"] }), report.truncated ? _jsx("span", { children: "\u9762\u677F\u660E\u7EC6\u5DF2\u622A\u65AD" }) : null] })] }));
634
+ })() })) : panel.id === "token-guard-panel" ? ((() => {
635
+ const view = tokenGuardPanelView(data);
636
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "grid gap-2 sm:grid-cols-2", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${view.exceeded ? "border-[#f4caca] bg-[#fff5f5]" : "border-[#e3eaf8] bg-[#f6f8ff]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u4E0A\u4E0B\u6587\u9884\u7B97" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: [view.percent === null ? "—" : view.percent, "% / ", view.maxPercent, "%"] })] }), _jsx("div", { className: "mt-2 h-2 overflow-hidden rounded-full bg-[#dfe8fb]", children: _jsx("div", { className: `h-full rounded-full ${view.exceeded ? "bg-[#d64545]" : "bg-[#5d8bea]"}`, style: { width: `${Math.min(100, view.percent ?? 0)}%` } }) }), _jsxs("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: [view.tokens === null ? "上下文 token 未知" : `${view.tokens.toLocaleString()} / ${view.contextWindow?.toLocaleString() ?? "—"} tokens`, ` · 已请求停止 ${view.aborts} 次`] })] }), _jsxs("div", { className: `rounded-lg border px-3 py-3 ${view.runExceeded ? "border-[#f4caca] bg-[#fff5f5]" : "border-[#e3eaf8] bg-[#f6f8ff]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5355\u6B21\u4EFB\u52A1" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: [view.runTokens === null ? "—" : view.runTokens.toLocaleString(), " / ", view.maxRunTokens === 0 ? "—" : view.maxRunTokens.toLocaleString()] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: view.maxRunTokens > 0 ? "按 agent_start 后新增的已结算 token 熔断。" : "未启用绝对 Token 上限。" })] })] }), view.lastError === null ? null : (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[10px] leading-4 text-[#b42318]", children: ["\u4FDD\u62A4\u5668\u9519\u8BEF\uFF1A", view.lastError] }))] }));
637
+ })()) : panel.id === "test-harness-panel" ? ((() => {
638
+ const view = testHarnessPanelView(panel.data);
639
+ const run = view.latest;
640
+ const statusLabel = run?.status === "passed"
641
+ ? "验证通过"
642
+ : run?.status === "failed"
643
+ ? "验证失败"
644
+ : run?.status === "timed-out"
645
+ ? "验证超时"
646
+ : run?.status === "cancelled"
647
+ ? "验证已取消"
648
+ : "等待验证";
649
+ const statusStyle = run?.status === "passed"
650
+ ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"
651
+ : run?.status === "failed"
652
+ ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"
653
+ : run?.status === "timed-out" || run?.status === "cancelled"
654
+ ? "border-[#f1d7a8] bg-[#fff9ed] text-[#8a6200]"
655
+ : "border-[#e3e7ee] bg-[#f6f8fa] text-[#687381]";
656
+ return (_jsxs("div", { className: "mt-3 grid min-w-0 gap-3", children: [_jsxs("div", { className: `min-w-0 rounded-lg border px-3 py-3 ${statusStyle}`, children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center justify-between gap-2", children: [_jsx("span", { className: "break-all font-mono text-[11px] font-semibold text-[#30343b]", children: run?.command ?? "npm run test" }), _jsx("span", { className: "rounded-full border border-current px-2 py-0.5 text-[9px] font-semibold", children: statusLabel })] }), run === null ? (_jsx("p", { className: "mt-2 text-[11px] leading-4 text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6267\u884C\u9A8C\u8BC1\u811A\u672C\u3002\u53EF\u8BA9 Agent \u8C03\u7528 run_project_tests\u3002" })) : (_jsxs("div", { className: "mt-2 flex flex-wrap gap-x-3 gap-y-1 text-[10px] text-[#65707b]", children: [_jsxs("span", { children: ["exit ", run.exitCode ?? "—"] }), run.signal === null ? null : _jsx("span", { children: run.signal }), _jsxs("span", { children: [run.durationMs, " ms"] }), _jsxs("span", { children: [run.outputBytes.toLocaleString(), " output bytes"] })] }))] }), run !== null && run.output !== "" ? (_jsxs("div", { className: "min-w-0 rounded-lg border border-[#e3e7ee] bg-[#111318] p-3", children: [_jsxs("div", { className: "mb-2 flex flex-wrap items-center justify-between gap-2 text-[9px] text-[#9ba6b2]", children: [_jsx("span", { className: "font-semibold uppercase tracking-[0.08em]", children: "\u8F93\u51FA\u672B\u5C3E" }), _jsxs("span", { children: ["\u6700\u591A ", view.limits.outputBytes, " bytes"] })] }), _jsx("pre", { className: "max-h-52 min-w-0 overflow-auto whitespace-pre-wrap break-all font-mono text-[10px] leading-4 text-[#e6edf3]", children: run.output })] })) : null, run?.outputTruncated || run?.outputSanitized ? (_jsxs("p", { className: "text-[10px] leading-4 text-[#8a6200]", children: [run.outputTruncated ? "输出只保留最后 12 KiB。" : "", run.outputSanitized ? "终端控制字符已清理。" : ""] })) : null, _jsx("div", { className: "flex flex-wrap gap-2", children: view.allowedScripts.map((script) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: script }, script))) }), _jsxs("div", { className: "flex flex-wrap gap-x-3 gap-y-1 font-mono text-[9px] text-[#687381]", children: [_jsxs("span", { children: ["timeout ", view.limits.timeoutMs, " ms"] }), _jsxs("span", { children: ["output ", view.limits.outputBytes, " bytes"] })] }), view.truncated ? _jsx("p", { className: "text-[10px] leading-4 text-[#8a6200]", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u5DF2\u6309\u56FA\u5B9A\u5B89\u5168\u4E0A\u9650\u8C03\u6574\u3002" }) : null, _jsx("p", { className: "rounded-lg border border-[#f1d7a8] bg-[#fff9ed] px-3 py-2 text-[10px] leading-4 text-[#6f5730]", children: "npm scripts \u4F1A\u6267\u884C\u5F53\u524D\u9879\u76EE\u5B9A\u4E49\u7684\u4EE3\u7801\uFF1B\u4EC5\u5728\u53EF\u4FE1 workspace \u4E2D\u4F7F\u7528\u3002Test Harness \u4E0D\u662F\u6C99\u7BB1\uFF0C\u4E5F\u4E0D\u4F1A\u628A\u811A\u672C\u8F93\u51FA\u5F53\u4F5C\u7528\u6237\u6388\u6743\u3002" })] }));
657
+ })()) : panel.id === "session-insights-panel" ? ((() => {
658
+ const view = sessionInsightsPanelView(panel.data);
659
+ const report = view.report;
660
+ if (report === null)
661
+ return (_jsx("div", { className: "mt-3 rounded-lg border border-[#f3c4c4] bg-[#fff4f4] px-3 py-3 text-[11px] leading-5 text-[#a23b3b]", children: "\u4F1A\u8BDD\u7EDF\u8BA1\u6570\u636E\u65E0\u6548\uFF0C\u5DF2\u505C\u6B62\u5C55\u793A\u6307\u6807\uFF0C\u907F\u514D\u628A\u635F\u574F\u6570\u636E\u8BEF\u62A5\u4E3A\u5065\u5EB7\u72B6\u6001\u3002" }));
662
+ const contextUsage = report.contextUsage;
663
+ const compactionLabels = {
664
+ idle: "尚未请求压缩",
665
+ queued: "等待 Agent 空闲",
666
+ running: "正在压缩",
667
+ completed: "压缩已完成",
668
+ failed: "压缩失败",
669
+ cancelled: "压缩已取消",
670
+ unknown: "压缩状态数据无效",
671
+ };
672
+ const compactionStyles = {
673
+ idle: "border-[#e3e7ee] bg-[#f6f8fa] text-[#687381]",
674
+ queued: "border-[#f1d7a8] bg-[#fff9ed] text-[#8a6200]",
675
+ running: "border-[#cbdaf6] bg-[#f3f7ff] text-[#315fb8]",
676
+ completed: "border-[#bfe4cb] bg-[#f1fbf4] text-[#287a43]",
677
+ failed: "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]",
678
+ cancelled: "border-[#f1d7a8] bg-[#fff9ed] text-[#8a6200]",
679
+ unknown: "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]",
680
+ };
681
+ return (_jsxs("div", { className: "mt-3 grid min-w-0 gap-3", children: [_jsxs("div", { className: "min-w-0 rounded-lg border border-[#e3e7ee] bg-white px-3 py-2", children: [_jsx("span", { className: "block text-[9px] font-semibold uppercase tracking-[0.08em] text-[#7a8490]", children: "Session" }), _jsx("p", { className: "mt-1 min-w-0 break-all font-mono text-[10px] leading-4 text-[#3d4650]", children: report.sessionId })] }), _jsx("div", { className: "grid min-w-0 grid-cols-1 gap-2 min-[360px]:grid-cols-3", children: [
682
+ ["消息", report.totalMessages.toLocaleString("en-US")],
683
+ ["工具调用 / 结果", `${report.toolCalls.toLocaleString("en-US")} / ${report.toolResults.toLocaleString("en-US")}`],
684
+ ["成本", `$${report.cost.toFixed(4)}`],
685
+ ].map(([label, item]) => (_jsxs("div", { className: "min-w-0 rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: label }), _jsx("strong", { className: "mt-1 block break-all text-[16px] font-semibold text-[#30343b]", children: item })] }, label))) }), _jsxs("div", { className: "min-w-0 rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center justify-between gap-2", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u7D2F\u8BA1 token" }), _jsx("strong", { className: "break-all font-mono text-[14px] text-[#315fb8]", children: report.tokens.total.toLocaleString("en-US") })] }), _jsxs("div", { className: "mt-2 flex min-w-0 flex-wrap gap-x-3 gap-y-1 text-[10px] leading-4 text-[#5d6d82]", children: [_jsxs("span", { children: ["\u8F93\u5165 ", report.tokens.input.toLocaleString("en-US")] }), _jsxs("span", { children: ["\u8F93\u51FA ", report.tokens.output.toLocaleString("en-US")] }), _jsxs("span", { children: ["\u7F13\u5B58\u8BFB\u53D6 ", report.tokens.cacheRead.toLocaleString("en-US")] }), _jsxs("span", { children: ["\u7F13\u5B58\u5199\u5165 ", report.tokens.cacheWrite.toLocaleString("en-US")] })] })] }), _jsxs("div", { className: "min-w-0 rounded-lg border border-[#e3e7ee] bg-white px-3 py-3", children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center justify-between gap-2", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5F53\u524D\u4E0A\u4E0B\u6587" }), contextUsage === null ? null : contextUsage.percent === null ? (_jsx("strong", { className: "text-[11px] font-semibold text-[#8a6200]", children: "\u5F85\u4E0B\u4E00\u6B21\u6A21\u578B\u54CD\u5E94" })) : (_jsxs("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: [contextUsage.percent.toFixed(1), "%"] }))] }), contextUsage === null ? (_jsx("p", { className: "mt-2 text-[10px] leading-4 text-[#687381]", children: "\u5F53\u524D\u6A21\u578B\u672A\u63D0\u4F9B\u4E0A\u4E0B\u6587\u7A97\u53E3\u3002" })) : contextUsage.tokens === null ? (_jsxs("p", { className: "mt-2 text-[10px] leading-4 text-[#687381]", children: ["\u538B\u7F29\u540E token \u6682\u4E0D\u53EF\u4F30\u7B97 \u00B7 \u4E0A\u4E0B\u6587\u7A97\u53E3 ", contextUsage.contextWindow.toLocaleString("en-US")] })) : (_jsxs("p", { className: "mt-2 text-[10px] leading-4 text-[#687381]", children: [contextUsage.tokens.toLocaleString("en-US"), " / ", contextUsage.contextWindow.toLocaleString("en-US"), " tokens"] }))] }), _jsxs("div", { className: `min-w-0 rounded-lg border px-3 py-3 ${compactionStyles[view.compaction.status]}`, children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center justify-between gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.08em]", children: "\u4F1A\u8BDD\u538B\u7F29" }), _jsx("strong", { className: "text-[11px] font-semibold", children: compactionLabels[view.compaction.status] })] }), view.compaction.error === null ? null : _jsx("p", { className: "mt-2 break-words text-[10px] leading-4", children: view.compaction.error })] }), view.malformed && view.compaction.status !== "unknown" ? _jsx("p", { className: "text-[10px] leading-4 text-[#a23b3b]", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u4E00\u81F4\u3002" }) : null] }));
686
+ })()) : panel.id === "session-bridge-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
687
+ const view = sessionBridgePanelView(data);
538
688
  const sections = [
539
- ["目标", preview.goal],
540
- ["当前状态", preview.currentState],
541
- ["下一步", preview.nextStep],
689
+ ["目标", view.preview.goal],
690
+ ["当前状态", view.preview.currentState],
691
+ ["下一步", view.preview.nextStep],
542
692
  ];
543
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3 text-[11px] leading-5 text-[#315fb8]", children: "\u9884\u89C8\u4E0D\u4F1A\u521B\u5EFA\u76EE\u6807\u4F1A\u8BDD\uFF0C\u4E5F\u4E0D\u4F1A\u4FEE\u6539\u6E90\u4F1A\u8BDD\u3002" }), sections.map(([label, item]) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-3", children: [_jsx("span", { className: "block text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: label }), _jsx("p", { className: "mt-2 whitespace-pre-wrap text-[11px] leading-5 text-[#30343b]", children: value(item) })] }, label))), _jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: [
544
- ["关键决策", preview.decisions],
545
- ["关键文件", preview.keyFiles],
546
- ].map(([label, items]) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "block text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: value(label) }), Array.isArray(items) && items.length > 0 ? (_jsx("ul", { className: "mt-2 grid gap-1 text-[10px] leading-4 text-[#65707b]", children: items.slice(0, 8).map((item, index) => (_jsx("li", { children: value(item) }, `${value(item)}-${index}`))) })) : (_jsx("p", { className: "mt-2 text-[10px] text-[#687381]", children: "\u6682\u65E0" }))] }, value(label)))) })] }));
693
+ const lists = [
694
+ ["关键决策", view.preview.decisions],
695
+ ["关键文件", view.preview.keyFiles],
696
+ ];
697
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3 text-[11px] leading-5 text-[#315fb8]", children: "\u9884\u89C8\u4E0D\u4F1A\u521B\u5EFA\u76EE\u6807\u4F1A\u8BDD\uFF0C\u4E5F\u4E0D\u4F1A\u4FEE\u6539\u6E90\u4F1A\u8BDD\u3002" }), view.status.state === "failed" || view.status.state === "cancelled" ? (_jsxs("div", { className: `rounded-lg border px-3 py-3 text-[11px] leading-5 ${view.status.state === "failed" ? "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]" : "border-[#f4d8a8] bg-[#fff9ed] text-[#9a6700]"}`, children: [view.status.operation === "import" ? "导入" : view.status.operation === "export" ? "导出" : "预览", view.status.state === "failed" ? "失败" : "已取消", view.status.error === null ? "" : `:${view.status.error}`] })) : null, sections.map(([label, item]) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-3", children: [_jsx("span", { className: "block text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: label }), _jsx("p", { className: "mt-2 whitespace-pre-wrap break-words text-[11px] leading-5 text-[#30343b]", children: item || "暂无" })] }, label))), _jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: lists.map(([label, items]) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "block text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: value(label) }), items.length > 0 ? (_jsx("ul", { className: "mt-2 grid gap-1 text-[10px] leading-4 text-[#65707b]", children: items.map((item, index) => (_jsx("li", { className: "break-words", children: item }, `${item}-${index}`))) })) : (_jsx("p", { className: "mt-2 text-[10px] text-[#687381]", children: "\u6682\u65E0" }))] }, value(label)))) }), _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { children: ["\u683C\u5F0F v", view.formatVersion] }), _jsxs("span", { children: ["\u6700\u591A ", view.limits.messages, " \u6761\u6D88\u606F"] }), _jsxs("span", { children: ["\u6B63\u6587 ", view.limits.totalMessageCharacters, " \u5B57\u7B26"] }), _jsxs("span", { children: ["\u9644\u4EF6\u6807\u8BB0 ", view.limits.attachments, " \u4E2A"] }), view.source !== null ? _jsxs("span", { className: "max-w-full truncate", children: ["\u6765\u6E90 ", view.source.sessionId] }) : null, view.latest !== null ? _jsx("span", { children: view.latest.direction === "import" ? "最近导入" : "最近导出" }) : null] })] }));
547
698
  })() })) : panel.id === "session-compare-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: data?.left && typeof data.left === "object" && data?.right && typeof data.right === "object" ? ((() => {
548
699
  const left = data.left;
549
700
  const right = data.right;
@@ -570,11 +721,35 @@ function PluginPanelCard({ panel, inline = false }) {
570
721
  const finding = item !== null && typeof item === "object" ? item : {};
571
722
  const severity = value(finding.severity, "medium");
572
723
  return (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("code", { className: "min-w-0 truncate text-[10px] text-[#315fb8]", children: value(finding.path) }), _jsx("span", { className: `shrink-0 text-[10px] font-semibold ${severity === "critical" ? "text-[#b42318]" : "text-[#9a6700]"}`, children: severity })] }), _jsxs("p", { className: "mt-1 text-[10px] leading-4 text-[#65707b]", children: ["\u7B2C ", value(finding.line), " \u884C \u00B7 ", value(finding.message)] })] }, `${value(finding.path)}-${value(finding.line)}-${index}`));
573
- }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD0\u884C security_audit \u540E\u663E\u793A\u8131\u654F\u7ED3\u679C\u3002" }))] })) : panel.id === "context-doctor-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${data?.status === "warning" ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"}`, children: data?.status === "warning" ? "需要关注上下文风险。" : "上下文状态正常。" }), _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
574
- ["占用", `${value(data?.usagePercent ?? "—")}%`],
575
- ["超大消息", data?.oversizedMessages ?? 0],
576
- ["工具错误", data?.toolErrors ?? 0],
577
- ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: value(item) })] }, value(label)))) }), Array.isArray(data?.recommendations) && data.recommendations.length > 0 ? (_jsx("ul", { className: "grid gap-1 rounded-lg border border-[#e3e7ee] bg-white px-4 py-3 text-[10px] text-[#65707b]", children: data.recommendations.slice(0, 4).map((item, index) => (_jsx("li", { children: value(item) }, `${value(item)}-${index}`))) })) : null] })) : panel.id === "history-compressor-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.enabled === true ? "自动压缩已启用" : "自动压缩已停用" }), _jsxs("strong", { className: "font-mono text-[11px] text-[#3565c5]", children: ["\u9608\u503C ", value(data?.thresholdPercent ?? "—"), "%"] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u5DF2\u538B\u7F29" }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: value(data?.compactions ?? 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u5F53\u524D\u5360\u7528" }), _jsxs("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: [value(data?.lastUsagePercent ?? "—"), "%"] })] })] }), data?.lastError ? _jsxs("p", { className: "text-[11px] text-[#b42318]", children: ["\u6700\u8FD1\u9519\u8BEF\uFF1A", value(data.lastError)] }) : null] })) : panel.id === "session-export-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest && typeof data.latest === "object" ? ((() => {
724
+ }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD0\u884C security_audit \u540E\u663E\u793A\u8131\u654F\u7ED3\u679C\u3002" }))] })) : panel.id === "context-doctor-panel" ? ((() => {
725
+ const view = contextDoctorPanelView(data);
726
+ const compactionLabel = {
727
+ idle: "尚未请求",
728
+ queued: "已排队",
729
+ running: "压缩中",
730
+ completed: "已完成",
731
+ failed: "失败",
732
+ cancelled: "已取消",
733
+ unknown: "未知",
734
+ };
735
+ const compactionTone = view.compaction.status === "completed"
736
+ ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"
737
+ : view.compaction.status === "failed"
738
+ ? "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]"
739
+ : view.compaction.status === "cancelled"
740
+ ? "border-[#f4d8a8] bg-[#fff9ed] text-[#9a6700]"
741
+ : "border-[#dce5f5] bg-[#f6f8ff] text-[#3565c5]";
742
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${view.status === "warning"
743
+ ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"
744
+ : view.status === "ok"
745
+ ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"
746
+ : "border-[#e3e7ee] bg-[#f6f8fa] text-[#687381]"}`, children: view.status === "warning" ? "需要关注上下文风险。" : view.status === "ok" ? "上下文状态正常。" : "上下文状态不可用。" }), _jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: [
747
+ ["占用", view.usagePercent === null ? "—" : `${view.usagePercent}%`],
748
+ ["超限/不可测", view.oversizedMessages],
749
+ ["无法安全检查", view.uninspectableMessages],
750
+ ["工具错误", view.toolErrors],
751
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: label }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: item })] }, String(label)))) }), view.compaction.status === "idle" || view.compaction.status === "unknown" ? null : (_jsxs("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${compactionTone}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { children: "\u6700\u8FD1\u538B\u7F29" }), _jsx("strong", { children: compactionLabel[view.compaction.status] })] }), view.compaction.error === null ? null : _jsx("p", { className: "mt-2 break-words text-[10px] leading-4", children: view.compaction.error })] })), view.recommendations.length > 0 ? (_jsxs("ul", { className: "grid gap-1 rounded-lg border border-[#e3e7ee] bg-white px-4 py-3 text-[10px] text-[#65707b]", children: [view.recommendations.map((item, index) => (_jsx("li", { children: item }, `${item}-${index}`))), view.recommendationsTruncated ? _jsx("li", { children: "\u90E8\u5206\u5EFA\u8BAE\u56E0\u6D4F\u89C8\u5668\u663E\u793A\u4E0A\u9650\u88AB\u7701\u7565\u3002" }) : null] })) : null, _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u626B\u63CF ", view.scannedMessages, " / ", view.messageCount, " \u6761\u6D88\u606F", view.messagesTruncated ? "(已截断)" : ""] }), _jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u544A\u8B66\u9608\u503C ", view.warnPercent, "%"] }), _jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u5927\u6D88\u606F\u9608\u503C ", view.maxMessageBytes, "B"] }), _jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u7ED3\u6784\u9884\u7B97 ", view.limits.jsonNodesPerAudit, " \u8282\u70B9 / \u6DF1\u5EA6 ", view.limits.jsonDepth] })] })] }));
752
+ })()) : panel.id === "history-compressor-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.enabled === true ? "自动压缩已启用" : "自动压缩已停用" }), _jsxs("strong", { className: "font-mono text-[11px] text-[#3565c5]", children: ["\u9608\u503C ", value(data?.thresholdPercent ?? "—"), "%"] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u5DF2\u538B\u7F29" }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: value(data?.compactions ?? 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u5F53\u524D\u5360\u7528" }), _jsxs("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: [value(data?.lastUsagePercent ?? "—"), "%"] })] })] }), data?.lastError ? _jsxs("p", { className: "text-[11px] text-[#b42318]", children: ["\u6700\u8FD1\u9519\u8BEF\uFF1A", value(data.lastError)] }) : null] })) : panel.id === "session-export-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest && typeof data.latest === "object" ? ((() => {
578
753
  const latest = data.latest;
579
754
  return (_jsxs("div", { className: "rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsx("span", { className: "block text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: "\u6700\u8FD1\u5BFC\u51FA" }), _jsx("code", { className: "mt-2 block truncate text-[11px] text-[#315fb8]", children: value(latest.path ?? "pi-session.md") }), _jsxs("p", { className: "mt-1 text-[10px] text-[#65707b]", children: [value(latest.messages ?? 0), " \u6761\u6D88\u606F \u00B7 ", value(latest.bytes ?? 0), " bytes"] })] }));
580
755
  })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u5BFC\u51FA\u5F53\u524D\u4F1A\u8BDD\u3002" })), _jsx("p", { className: "text-[10px] leading-4 text-[#687381]", children: "\u5BFC\u51FA\u6587\u4EF6\u53EA\u5141\u8BB8\u5199\u5165\u5F53\u524D\u5DE5\u4F5C\u533A\u5185\u7684 .md \u8DEF\u5F84\uFF0C\u8986\u76D6\u5DF2\u6709\u6587\u4EF6\u9700\u8981\u663E\u5F0F\u786E\u8BA4\u3002" })] })) : panel.id === "session-search-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.query ? (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsx("code", { className: "min-w-0 truncate text-[11px] text-[#315fb8]", children: value(data.query) }), _jsxs("strong", { className: "ml-3 shrink-0 text-[11px] text-[#3565c5]", children: [value(data.total ?? 0), " \u4E2A\u4F1A\u8BDD"] })] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8F93\u5165\u67E5\u8BE2\u540E\u663E\u793A\u5339\u914D\u7684\u5386\u53F2\u4F1A\u8BDD\u3002" })), Array.isArray(data?.items) && data.items.length > 0 ? (_jsx("div", { className: "grid gap-2", children: data.items.slice(0, 8).map((item, index) => {
@@ -638,7 +813,7 @@ function PluginPanelCard({ panel, inline = false }) {
638
813
  const constraints = list("constraints");
639
814
  const files = list("files");
640
815
  const acceptance = list("acceptance");
641
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsx("span", { className: "text-[11px] text-[#65707b]", children: "\u4EA4\u63A5\u7ED9" }), _jsx("strong", { className: "text-[11px] text-[#315fb8]", children: value(handoff.toRole) })] }), _jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-3 text-[11px] text-[#253044]", children: value(handoff.objective) }), handoff.context ? _jsx("p", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2 text-[10px] leading-4 text-[#65707b]", children: value(handoff.context) }) : null, files.length > 0 ? (_jsx("div", { className: "grid gap-1 rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: files.slice(0, 8).map((file) => (_jsx("code", { className: "truncate text-[10px] text-[#65707b]", children: file }, file))) })) : null, _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#65707b]", children: [_jsxs("span", { children: ["\u7EA6\u675F ", constraints.length, " \u6761"] }), _jsxs("span", { children: ["\u9A8C\u6536 ", acceptance.length, " \u6761"] })] })] }));
816
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsx("span", { className: "text-[11px] text-[#65707b]", children: "\u4EA4\u63A5\u7ED9" }), _jsx("strong", { className: "text-[11px] text-[#315fb8]", children: value(handoff.toRole) })] }), _jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-3 text-[11px] text-[#253044]", children: value(handoff.objective) }), handoff.context ? _jsx("p", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2 text-[10px] leading-4 text-[#65707b]", children: value(handoff.context) }) : null, files.length > 0 ? (_jsx("div", { className: "grid gap-1 rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: files.slice(0, 8).map((file) => (_jsx("code", { className: "truncate text-[10px] text-[#65707b]", children: file }, file))) })) : null, constraints.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-[#fffaf0] px-3 py-2", children: [_jsx("strong", { className: "text-[10px] text-[#9a6700]", children: "\u7EA6\u675F" }), _jsx("ul", { className: "mt-1 grid gap-1 text-[10px] text-[#65707b]", children: constraints.slice(0, 8).map((constraint, index) => (_jsxs("li", { children: ["\u2022 ", constraint] }, `${constraint}-${index}`))) })] })) : null, acceptance.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-[#f0fbf4] px-3 py-2", children: [_jsx("strong", { className: "text-[10px] text-[#14733f]", children: "\u9A8C\u6536\u6761\u4EF6" }), _jsx("ul", { className: "mt-1 grid gap-1 text-[10px] text-[#65707b]", children: acceptance.slice(0, 8).map((criterion, index) => (_jsxs("li", { children: ["\u2022 ", criterion] }, `${criterion}-${index}`))) })] })) : null, _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#65707b]", children: [_jsxs("span", { children: ["\u7EA6\u675F ", constraints.length, " \u6761"] }), _jsxs("span", { children: ["\u9A8C\u6536 ", acceptance.length, " \u6761"] })] })] }));
642
817
  })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6267\u884C colleague_handoff \u540E\u663E\u793A\u89D2\u8272\u4EA4\u63A5\u5305\u3002" })) })) : panel.id === "reverse-skill-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsx("span", { className: "text-[11px] text-[#65707b]", children: "\u590D\u6838\u98CE\u9669\u5185\u5BB9" }), _jsx("strong", { className: "font-mono text-[11px] text-[#3565c5]", children: data?.allowReviewByDefault === true ? "已允许" : "默认阻断" })] }), data?.latest && typeof data.latest === "object" ? ((() => {
643
818
  const latest = data.latest;
644
819
  const risk = value(latest.risk ?? "safe");
@@ -660,39 +835,30 @@ function PluginPanelCard({ panel, inline = false }) {
660
835
  const item = step && typeof step === "object" ? step : {};
661
836
  const status = value(item.status ?? "pending");
662
837
  return (_jsxs("li", { className: "flex items-center gap-2 rounded-lg border border-[#edf0f3] bg-white px-3 py-2 text-[11px]", children: [_jsx("span", { className: `h-2 w-2 rounded-full ${status === "done" ? "bg-[#32a35a]" : status === "in_progress" ? "bg-[#3565c5]" : status === "skipped" ? "bg-[#a0a7b0]" : "bg-[#d7dce2]"}` }), _jsx("span", { className: `min-w-0 flex-1 truncate ${status === "done" ? "text-[#14733f]" : "text-[#30343b]"}`, children: value(item.title ?? "步骤") }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: status })] }, value(item.id ?? index)));
663
- }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 plan_create \u521B\u5EFA\u6267\u884C\u8BA1\u5212\u3002" }))] })) : panel.id === "plugin-stars-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "font-medium text-[#30343b]", children: "\u793E\u533A\u6392\u884C\u699C" }), _jsxs("span", { className: "font-mono text-[#65707b]", children: ["\u4E0A\u9650 ", value(data?.limit ?? "—")] })] }), data?.latest && typeof data.latest === "object" ? ((() => {
664
- const latest = data.latest;
665
- const entries = Array.isArray(latest.results)
666
- ? latest.results.flatMap((entry) => {
667
- if (entry === null || typeof entry !== "object")
668
- return [];
669
- const item = entry;
670
- if (typeof item.fullName !== "string" ||
671
- typeof item.name !== "string" ||
672
- typeof item.stars !== "number" ||
673
- typeof item.htmlUrl !== "string" ||
674
- typeof item.updatedAt !== "string")
675
- return [];
676
- return [{ fullName: item.fullName, name: item.name, stars: item.stars, htmlUrl: item.htmlUrl, updatedAt: item.updatedAt }];
677
- })
678
- : [];
679
- const rows = pluginStarsRows(entries, 8);
680
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#65707b]", children: [_jsxs("span", { children: ["\u67E5\u8BE2\uFF1A", value(latest.query, "全部")] }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(latest.total ?? rows.length), " \u4E2A\u7ED3\u679C"] })] }), rows.length > 0 ? (_jsx("ol", { className: "grid gap-1.5", children: rows.map((row) => (_jsxs("li", { className: "flex items-center gap-2 rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("span", { className: "w-5 shrink-0 text-center font-mono text-[10px] text-[#9a6700]", children: ["#", row.rank] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("a", { className: "block truncate font-mono text-[11px] text-[#315fb8] hover:underline", href: row.htmlUrl, rel: "noreferrer", target: "_blank", children: row.fullName }), _jsxs("span", { className: "block truncate text-[10px] text-[#687381]", children: ["\u66F4\u65B0\u4E8E ", row.updatedAt || "未知"] })] }), _jsxs("span", { className: "shrink-0 font-mono text-[10px] text-[#8a5a00]", children: ["\u2605 ", row.stars.toLocaleString()] })] }, row.fullName))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u793E\u533A\u63D2\u4EF6\u3002" })), _jsxs("p", { className: "text-[10px] leading-4 text-[#687381]", children: ["\u6765\u6E90\uFF1A", value(latest.source, "dsh-plugin-stars"), " \u00B7 \u4EC5\u5C55\u793A\u516C\u5F00\u4ED3\u5E93\u4FE1\u606F\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u5B89\u88C5\u3002"] })] }));
681
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 plugin_stars_search \u62C9\u53D6\u5E76\u7B5B\u9009\u793E\u533A\u6392\u884C\u699C\u3002" }))] })) : panel.id === "plugin-finder-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "font-medium text-[#30343b]", children: "\u53EA\u8BFB Registry \u641C\u7D22" }), _jsxs("span", { className: "font-mono text-[#65707b]", children: ["\u5173\u952E\u8BCD ", value(data?.keyword ?? "pi-harness"), " \u00B7 \u4E0A\u9650 ", value(data?.limit ?? "—")] })] }), data?.query ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#65707b]", children: [_jsxs("span", { children: ["\u67E5\u8BE2\uFF1A", value(data.query)] }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(data.total ?? 0), " \u4E2A\u7ED3\u679C"] })] }), Array.isArray(data?.results) && data.results.length > 0 ? (_jsx("ul", { className: "grid gap-1.5", children: data.results.slice(0, 5).map((result, index) => {
838
+ }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 plan_create \u521B\u5EFA\u6267\u884C\u8BA1\u5212\u3002" }))] })) : panel.id === "plugin-stars-panel" ? ((() => {
839
+ const view = pluginStarsPanelView(data);
840
+ if (view.malformed) {
841
+ return (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] text-[#b42318]", children: [_jsx("strong", { className: "block text-[12px]", children: "Plugin Stars \u9762\u677F\u6570\u636E\u5F02\u5E38" }), _jsx("span", { className: "mt-1 block", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u6392\u884C\u699C\u3002" })] }));
842
+ }
843
+ const latest = view.latest;
844
+ const rows = latest?.results ?? [];
845
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "font-medium text-[#30343b]", children: "\u793E\u533A\u6392\u884C\u699C" }), _jsxs("span", { className: "font-mono text-[#65707b]", children: ["\u7ED3\u679C\u4E0A\u9650 ", view.limit] })] }), latest !== null ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#65707b]", children: [_jsxs("span", { children: ["\u67E5\u8BE2\uFF1A", latest.query || "全部"] }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: ["\u663E\u793A ", view.inventory.shown, "/", view.inventory.total] })] }), rows.length > 0 ? (_jsx("ol", { className: "grid gap-1.5", children: rows.map((row) => (_jsxs("li", { className: "flex items-center gap-2 rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("span", { className: "w-5 shrink-0 text-center font-mono text-[10px] text-[#9a6700]", children: ["#", row.rank] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("a", { className: "block truncate font-mono text-[11px] text-[#315fb8] hover:underline", href: row.htmlUrl, rel: "noreferrer", target: "_blank", children: row.fullName }), _jsxs("span", { className: "block truncate text-[10px] text-[#687381]", children: ["\u66F4\u65B0\u4E8E ", row.updatedAt || "未知"] })] }), _jsxs("span", { className: "shrink-0 font-mono text-[10px] text-[#8a5a00]", children: ["\u2605 ", row.stars.toLocaleString()] })] }, row.fullName))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u793E\u533A\u63D2\u4EF6\u3002" })), _jsxs("p", { className: "text-[10px] leading-4 text-[#687381]", children: ["\u6765\u6E90\uFF1A", latest.source || "dsh-plugin-stars", " \u00B7 \u4EC5\u5C55\u793A\u516C\u5F00\u4ED3\u5E93\u4FE1\u606F\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u5B89\u88C5\u3002"] })] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 plugin_stars_search \u62C9\u53D6\u5E76\u7B5B\u9009\u793E\u533A\u6392\u884C\u699C\u3002" }))] }));
846
+ })()) : panel.id === "plugin-finder-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "font-medium text-[#30343b]", children: "\u53EA\u8BFB Registry \u641C\u7D22" }), _jsxs("span", { className: "font-mono text-[#65707b]", children: ["\u5173\u952E\u8BCD ", value(data?.keyword ?? "pi-harness"), " \u00B7 \u4E0A\u9650 ", value(data?.limit ?? "—")] })] }), data?.query ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#65707b]", children: [_jsxs("span", { children: ["\u67E5\u8BE2\uFF1A", value(data.query)] }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(data.total ?? 0), " \u4E2A\u7ED3\u679C"] })] }), Array.isArray(data?.results) && data.results.length > 0 ? (_jsx("ul", { className: "grid gap-1.5", children: data.results.slice(0, 5).map((result, index) => {
682
847
  const item = result && typeof result === "object" ? result : {};
683
848
  return (_jsxs("li", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("strong", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(item.name ?? "未知插件") }), _jsxs("span", { className: "font-mono text-[10px] text-[#687381]", children: ["v", value(item.version ?? "—")] })] }), _jsx("p", { className: "mt-1 truncate text-[10px] text-[#687381]", children: value(item.description, "") })] }, `${value(item.name ?? "plugin")}-${index}`));
684
849
  }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u627E\u5230\u5339\u914D\u63D2\u4EF6\u3002" }))] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 plugin_search \u641C\u7D22 npm Registry\u3002" }))] })) : panel.id === "memory-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "font-medium text-[#30343b]", children: "\u8DE8\u4F1A\u8BDD\u8BB0\u5FC6" }), _jsxs("span", { className: "font-mono text-[#3565c5]", children: [value(data?.count ?? 0), " \u6761"] })] }), Array.isArray(data?.memories) && data.memories.length > 0 ? (_jsx("ul", { className: "grid gap-1.5", children: data.memories.slice(0, 5).map((memory, index) => {
685
850
  const item = memory && typeof memory === "object" ? memory : {};
686
851
  return (_jsxs("li", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsx("strong", { className: "block truncate font-mono text-[11px] text-[#30343b]", children: value(item.key ?? "未知键") }), _jsx("p", { className: "mt-1 truncate text-[10px] text-[#687381]", children: value(item.value, "") })] }, `${value(item.key ?? "memory")}-${index}`));
687
852
  }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5C1A\u672A\u4FDD\u5B58\u8BB0\u5FC6\u3002Agent \u53EF\u8C03\u7528 memory_set \u660E\u786E\u5199\u5165\u3002" }))] })) : panel.id === "graph-memory-panel" ? ((() => {
688
- const kinds = data?.kinds !== null && typeof data?.kinds === "object" ? data.kinds : {};
689
- const recent = Array.isArray(data?.recent) ? data.recent : [];
690
- const recentRelations = Array.isArray(data?.recentRelations) ? data.recentRelations : [];
853
+ const report = graphMemoryPanelView(data);
854
+ const kinds = report.kinds;
855
+ const recent = report.recent;
856
+ const recentRelations = report.recentRelations;
691
857
  return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsx("div", { className: "grid grid-cols-3 gap-2", children: [
692
858
  ["任务", kinds.task ?? 0, "bg-[#3565c5]"],
693
859
  ["技能", kinds.skill ?? 0, "bg-[#22a06b]"],
694
860
  ["事件", kinds.event ?? 0, "bg-[#d97706]"],
695
- ].map(([label, count, color]) => (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-[#f8fafc] px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-[#687381]", children: [_jsx("span", { className: `h-1.5 w-1.5 rounded-full ${value(color)}` }), value(label)] }), _jsx("strong", { className: "mt-1 block font-mono text-[17px] text-[#30343b]", children: value(count) })] }, value(label)))) }), _jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-2 text-[10px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u672C\u5730\u5173\u7CFB\u56FE" }), _jsxs("span", { className: "font-mono text-[#3565c5]", children: [value(data?.nodes ?? 0), " \u8282\u70B9 \u00B7 ", value(data?.relations ?? 0), " \u5173\u7CFB"] })] }), recent.length > 0 ? (_jsxs("ul", { className: "grid gap-1.5", children: [_jsxs("li", { className: "text-[9px] uppercase tracking-[0.08em] text-[#687381]", children: ["\u6700\u8FD1\u8282\u70B9 ", Math.min(recent.length, 5), " / ", value(data?.nodes ?? recent.length)] }), recent.slice(0, 5).map((entry, index) => {
861
+ ].map(([label, count, color]) => (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-[#f8fafc] px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-[#687381]", children: [_jsx("span", { className: `h-1.5 w-1.5 rounded-full ${value(color)}` }), value(label)] }), _jsx("strong", { className: "mt-1 block font-mono text-[17px] text-[#30343b]", children: value(count) })] }, value(label)))) }), _jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-2 text-[10px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u672C\u5730\u5173\u7CFB\u56FE" }), _jsxs("span", { className: "font-mono text-[#3565c5]", children: [report.nodes, " \u8282\u70B9 \u00B7 ", report.relations, " \u5173\u7CFB"] })] }), recent.length > 0 ? (_jsxs("ul", { className: "grid gap-1.5", children: [_jsxs("li", { className: "text-[9px] uppercase tracking-[0.08em] text-[#687381]", children: ["\u6700\u8FD1\u8282\u70B9 ", Math.min(recent.length, 5), " / ", report.nodes] }), recent.slice(0, 5).map((entry, index) => {
696
862
  const item = entry !== null && typeof entry === "object" ? entry : {};
697
863
  const kind = item.kind === "task" || item.kind === "skill" || item.kind === "event" ? item.kind : "unknown";
698
864
  const kindLabel = kind === "task" ? "任务" : kind === "skill" ? "技能" : kind === "event" ? "事件" : "未知";
@@ -704,10 +870,10 @@ function PluginPanelCard({ panel, inline = false }) {
704
870
  ? "bg-[#fff4e5] text-[#a15c00]"
705
871
  : "bg-[#f2f3f5] text-[#65707b]";
706
872
  return (_jsxs("li", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: `rounded px-1.5 py-0.5 text-[9px] font-semibold ${kindClass}`, children: kindLabel }), _jsx("strong", { className: "min-w-0 flex-1 truncate text-[11px] text-[#30343b]", children: value(item.label ?? "未命名节点") })] }), _jsx("p", { className: "mt-1 line-clamp-2 text-[10px] leading-4 text-[#65707b]", children: value(item.summary, "") }), item.source ? _jsxs("p", { className: "mt-1 truncate font-mono text-[9px] text-[#687381]", children: ["\u6765\u6E90\uFF1A", value(item.source)] }) : null] }, `${value(item.id ?? "node")}-${index}`));
707
- })] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5C1A\u672A\u8BB0\u5F55\u56FE\u8BB0\u5FC6\u3002Agent \u53EF\u8C03\u7528 graph_memory_record \u521B\u5EFA\u4EFB\u52A1\u3001\u6280\u80FD\u6216\u4E8B\u4EF6\u8282\u70B9\u3002" })), recentRelations.length > 0 ? (_jsxs("div", { className: "grid gap-1 rounded-lg border border-[#edf0f3] bg-[#fbfcfd] px-3 py-2", children: [_jsxs("span", { className: "text-[9px] uppercase tracking-[0.08em] text-[#687381]", children: ["\u6700\u8FD1\u5173\u7CFB ", Math.min(recentRelations.length, 3), " / ", value(data?.relations ?? recentRelations.length)] }), recentRelations.slice(0, 3).map((entry, index) => {
873
+ })] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5C1A\u672A\u8BB0\u5F55\u56FE\u8BB0\u5FC6\u3002Agent \u53EF\u8C03\u7528 graph_memory_record \u521B\u5EFA\u4EFB\u52A1\u3001\u6280\u80FD\u6216\u4E8B\u4EF6\u8282\u70B9\u3002" })), recentRelations.length > 0 ? (_jsxs("div", { className: "grid gap-1 rounded-lg border border-[#edf0f3] bg-[#fbfcfd] px-3 py-2", children: [_jsxs("span", { className: "text-[9px] uppercase tracking-[0.08em] text-[#687381]", children: ["\u6700\u8FD1\u5173\u7CFB ", Math.min(recentRelations.length, 3), " / ", report.relations] }), recentRelations.slice(0, 3).map((entry, index) => {
708
874
  const relation = entry !== null && typeof entry === "object" ? entry : {};
709
875
  return (_jsxs("div", { className: "flex min-w-0 items-center gap-1.5 font-mono text-[9px] text-[#65707b]", children: [_jsx("span", { className: "truncate", children: value(relation.fromLabel ?? relation.from ?? "节点") }), _jsxs("span", { className: "shrink-0 text-[#3565c5]", children: ["\u2014", value(relation.relation ?? "RELATED_TO"), "\u2192"] }), _jsx("span", { className: "truncate", children: value(relation.toLabel ?? relation.to ?? "节点") })] }, `${value(relation.id ?? "relation")}-${index}`));
710
- })] })) : null] }));
876
+ })] })) : null, report.lastSearch !== null ? (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-2 text-[10px]", children: [_jsxs("span", { className: "min-w-0 truncate text-[#65707b]", children: ["\u6700\u8FD1\u641C\u7D22\uFF1A", report.lastSearch.query] }), _jsxs("span", { className: "shrink-0 font-mono text-[#3565c5]", children: [report.lastSearch.shown, " / ", report.lastSearch.total] })] })) : null, _jsxs("div", { className: "flex flex-wrap gap-2 font-mono text-[9px] text-[#687381]", children: [_jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u8282\u70B9 \u2264 ", report.limits.nodes] }), _jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u5173\u7CFB \u2264 ", report.limits.relations] }), _jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u6587\u4EF6 \u2264 ", report.limits.fileBytes, " B"] })] }), report.truncated ? _jsx("p", { className: "text-[10px] text-[#996515]", children: "\u9762\u677F\u5185\u5BB9\u5DF2\u6309\u5B89\u5168\u663E\u793A\u4E0A\u9650\u622A\u65AD\u3002" }) : null] }));
711
877
  })()) : panel.id === "taskboard-panel" ? ((() => {
712
878
  const counts = data?.counts !== null && typeof data?.counts === "object" ? data.counts : {};
713
879
  const recent = Array.isArray(data?.recent) ? data.recent : [];
@@ -760,20 +926,17 @@ function PluginPanelCard({ panel, inline = false }) {
760
926
  })()) : panel.id === "cost-meter-panel" ? ((() => {
761
927
  const budget = typeof data?.budget === "number" ? data.budget : null;
762
928
  const budgetPercent = typeof data?.budgetPercent === "number" ? data.budgetPercent : null;
763
- const entries = Array.isArray(data?.entries) ? data.entries : [];
929
+ const meterView = costMeterPanelView(data);
764
930
  const budgetClass = budgetPercent !== null && budgetPercent >= 100
765
931
  ? "text-[#b42318]"
766
932
  : budgetPercent !== null && budgetPercent >= 80
767
933
  ? "text-[#a15c00]"
768
934
  : "text-[#14733f]";
769
935
  return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsx("div", { className: "grid grid-cols-3 gap-2", children: [
770
- ["今日", `$${Number(data?.todayCost ?? 0).toFixed(4)}`],
936
+ ["今日(UTC)", `$${Number(data?.todayCost ?? 0).toFixed(4)}`],
771
937
  ["当前会话", `$${Number(data?.sessionCost ?? 0).toFixed(4)}`],
772
938
  ["累计", `$${Number(data?.lifetimeCost ?? 0).toFixed(4)}`],
773
- ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block font-mono text-[15px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between text-[11px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u6BCF\u65E5\u9884\u7B97" }), _jsx("strong", { className: budgetClass, children: budget === null ? "未设置" : `$${budget.toFixed(4)} · ${budgetPercent?.toFixed(2) ?? "0.00"}%` })] }), budget !== null ? (_jsx("div", { className: "mt-2 h-1.5 overflow-hidden rounded-full bg-[#dfe8f7]", children: _jsx("div", { className: `h-full ${budgetPercent !== null && budgetPercent >= 100 ? "bg-[#d64545]" : "bg-[#4c83e8]"}`, style: { width: `${Math.min(100, budgetPercent ?? 0)}%` } }) })) : null] }), entries.length > 0 ? (_jsx("ul", { className: "grid gap-1.5", children: entries.slice(0, 5).map((entry, index) => {
774
- const item = entry !== null && typeof entry === "object" ? entry : {};
775
- return (_jsxs("li", { className: "flex items-center justify-between rounded-lg border border-[#edf0f3] bg-white px-3 py-2 text-[10px]", children: [_jsx("span", { className: "truncate font-mono text-[#65707b]", children: value(item.sessionId ?? "未知会话") }), _jsxs("strong", { className: "font-mono text-[#30343b]", children: ["$", Number(item.cost ?? 0).toFixed(4)] })] }, `${value(item.sessionId ?? "session")}-${index}`));
776
- }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5C1A\u672A\u8BB0\u5F55\u5DF2\u5B8C\u6210\u4F1A\u8BDD\u3002Agent \u53EF\u8C03\u7528 cost_report \u7684 refresh \u64CD\u4F5C\u5199\u5165\u8D26\u672C\u3002" })), _jsx("div", { className: "text-[10px] text-[#687381]", children: "\u4EC5\u8BB0\u5F55\u8FD0\u884C\u65F6\u62A5\u544A\u7684\u5B9E\u9645\u6210\u672C\uFF0C\u4E0D\u5185\u7F6E\u6216\u731C\u6D4B\u6A21\u578B\u4EF7\u683C\u3002" })] }));
939
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block font-mono text-[15px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between text-[11px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u6BCF\u65E5\u9884\u7B97\uFF08UTC\uFF09" }), _jsx("strong", { className: budgetClass, children: budget === null ? "未设置" : `$${budget.toFixed(4)} · ${budgetPercent?.toFixed(2) ?? "0.00"}%` })] }), budget !== null ? (_jsx("div", { className: "mt-2 h-1.5 overflow-hidden rounded-full bg-[#dfe8f7]", children: _jsx("div", { className: `h-full ${budgetPercent !== null && budgetPercent >= 100 ? "bg-[#d64545]" : "bg-[#4c83e8]"}`, style: { width: `${Math.min(100, budgetPercent ?? 0)}%` } }) })) : null] }), _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: [meterView.dayBasis, " \u65E5\u8D26\u672C"] }), _jsxs("span", { className: "rounded bg-[#f6f8fa] px-2 py-1", children: ["\u8D26\u672C\u4E0A\u9650 ", meterView.entryLimit ?? "—", " \u6761"] })] }), meterView.lastError !== null ? (_jsxs("div", { className: "rounded-lg border border-[#f0c8c4] bg-[#fff5f4] px-3 py-2 text-[10px] text-[#b42318]", children: ["\u6700\u8FD1\u5199\u5165\u9519\u8BEF\uFF1A", meterView.lastError] })) : null, meterView.entries.length > 0 ? (_jsx("ul", { className: "grid gap-1.5", children: meterView.entries.map((entry, index) => (_jsxs("li", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2 text-[10px]", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "min-w-0 truncate font-mono text-[#65707b]", children: entry.sessionId }), _jsxs("strong", { className: "shrink-0 font-mono text-[#30343b]", children: ["$", entry.dailyCost.toFixed(4), " \u5F53\u65E5\u589E\u91CF"] })] }), _jsxs("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[#7a8490]", children: [_jsxs("span", { children: ["UTC ", entry.utcDate] }), _jsxs("span", { children: ["\u4F1A\u8BDD\u7D2F\u8BA1 $", entry.sessionCost.toFixed(4)] }), _jsxs("span", { children: [entry.tokens, " tokens"] }), _jsxs("span", { children: [entry.messages, " \u6D88\u606F"] })] })] }, `${entry.sessionId}-${entry.utcDate}-${index}`))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5C1A\u672A\u8BB0\u5F55\u5DF2\u5B8C\u6210\u4F1A\u8BDD\u3002Agent \u53EF\u8C03\u7528 cost_report \u7684 refresh \u64CD\u4F5C\u5199\u5165\u8D26\u672C\u3002" })), _jsx("div", { className: "text-[10px] text-[#687381]", children: "\u4EC5\u8BB0\u5F55\u8FD0\u884C\u65F6\u62A5\u544A\u7684\u5B9E\u9645\u6210\u672C\uFF0C\u4E0D\u5185\u7F6E\u6216\u731C\u6D4B\u6A21\u578B\u4EF7\u683C\u3002" })] }));
777
940
  })()) : panel.id === "undo-savepoint-panel" ? ((() => {
778
941
  const savepoints = Array.isArray(data?.savepoints) ? data.savepoints : [];
779
942
  return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u4FDD\u5B58\u70B9" }), _jsx("strong", { className: "mt-1 block font-mono text-[17px] text-[#315fb8]", children: value(data?.count ?? savepoints.length) })] }), _jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u8DDF\u8E2A\u8DEF\u5F84" }), _jsx("strong", { className: "mt-1 block font-mono text-[17px] text-[#315fb8]", children: value(Array.isArray(data?.trackedPaths) ? data.trackedPaths.length : 0) })] })] }), savepoints.length > 0 ? (_jsx("ul", { className: "grid gap-1.5", children: savepoints.slice(0, 6).map((entry, index) => {
@@ -880,41 +1043,47 @@ function PluginPanelCard({ panel, inline = false }) {
880
1043
  const item = match && typeof match === "object" ? match : {};
881
1044
  return (_jsxs("li", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("strong", { className: "block truncate font-mono text-[10px] text-[#3565c5]", children: [value(item.path ?? "未知文件"), ":", value(item.line ?? "?")] }), _jsx("p", { className: "mt-1 truncate font-mono text-[10px] text-[#65707b]", children: value(item.text, "") })] }, `${value(item.path ?? "match")}-${index}`));
882
1045
  }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u627E\u5230\u5339\u914D\u5185\u5BB9\u3002" }));
883
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 workspace_search \u68C0\u7D22\u5F53\u524D\u5DE5\u4F5C\u533A\u3002" }))] })) : panel.id === "recall-unread-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "font-medium text-[#30343b]", children: "\u672A\u56DE\u7B54\u4F1A\u8BDD" }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(data?.total ?? 0), " \u4E2A"] })] }), Array.isArray(data?.items) && data.items.length > 0 ? (_jsx("div", { className: "grid gap-2", children: data.items.slice(0, 8).map((item, index) => {
884
- const session = item !== null && typeof item === "object" ? item : {};
885
- return (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsx("strong", { className: "block truncate text-[11px] text-[#30343b]", children: value(session.name ?? session.id ?? "未命名会话") }), _jsx("p", { className: "mt-1 line-clamp-2 text-[10px] leading-4 text-[#65707b]", children: value(session.message ?? "") })] }, `${value(session.id ?? "session")}-${index}`));
886
- }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u4EE5\u672A\u56DE\u7B54\u7528\u6237\u6D88\u606F\u7ED3\u675F\u7684\u4F1A\u8BDD\u3002" }))] })) : panel.id === "turn-rewind-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest && typeof data.latest === "object" ? ((() => {
887
- const latest = data.latest;
888
- const target = latest.target !== null && typeof latest.target === "object" ? latest.target : {};
889
- const cancelled = latest.cancelled === true;
890
- return (_jsxs("div", { className: `rounded-lg border px-3 py-3 ${cancelled ? "border-[#f4dfb0] bg-[#fffaf0]" : "border-[#dce5f5] bg-[#f6f8ff]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: "\u6700\u8FD1\u64CD\u4F5C" }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] font-semibold ${cancelled ? "bg-[#fff0c7] text-[#9a6700]" : "bg-[#e8f8ee] text-[#14733f]"}`, children: cancelled ? "已取消" : "已回退" })] }), _jsx("p", { className: "mt-2 line-clamp-2 text-[11px] leading-4 text-[#30343b]", children: value(target.text ?? "未命名轮次") })] }));
891
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6267\u884C\u56DE\u9000\u64CD\u4F5C\u3002" })), _jsxs("div", { className: "grid gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: "\u53EF\u56DE\u9000\u8F6E\u6B21" }), (() => {
892
- const candidates = Array.isArray(data?.candidates) ? data.candidates : [];
893
- return candidates.length > 0 ? (candidates.slice(-8).map((item, index) => {
894
- const candidate = item !== null && typeof item === "object" ? item : {};
895
- return (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsx("span", { className: "mt-0.5 font-mono text-[10px] text-[#3565c5]", children: candidates.length - index }), _jsx("span", { className: "line-clamp-2 min-w-0 flex-1 text-[11px] leading-4 text-[#65707b]", children: value(candidate.text ?? "未命名轮次") })] }, `${value(candidate.entryId ?? "turn")}-${index}`));
896
- })) : (_jsx("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-3 text-[11px] text-[#687381]", children: "\u5F53\u524D\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u53EF\u56DE\u9000\u7684\u7528\u6237\u8F6E\u6B21\u3002" }));
897
- })()] })] })) : panel.id === "skill-guard-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsx("div", { className: "grid grid-cols-3 gap-2", children: [
898
- ["已扫描", data?.total ?? 0],
899
- ["高风险", data?.blocked ?? 0],
900
- ["待复核", data?.review ?? 0],
901
- ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsx("div", { className: "grid gap-2", children: Array.isArray(data?.reports) && data.reports.length > 0 ? (data.reports.slice(0, 8).map((item, index) => {
902
- const report = item !== null && typeof item === "object" ? item : {};
903
- const risk = report.risk;
904
- const findings = Array.isArray(report.findings) ? report.findings : [];
905
- return (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: `h-2 w-2 rounded-full ${risk === "blocked" ? "bg-[#d64545]" : risk === "review" ? "bg-[#e0a11a]" : "bg-[#22a06b]"}` }), _jsx("strong", { className: "min-w-0 flex-1 truncate text-[11px] text-[#30343b]", children: value(report.name ?? "unknown") }), _jsx("span", { className: "text-[10px] text-[#687381]", children: risk === "blocked" ? "阻断" : risk === "review" ? "复核" : "安全" })] }), findings.length > 0 ? (_jsx("p", { className: "mt-1 truncate text-[10px] text-[#65707b]", children: findings
906
- .map((finding) => finding !== null && typeof finding === "object" ? value(finding.code ?? "finding") : value(finding))
907
- .join(" · ") })) : null] }, `${value(report.name ?? "skill")}-${index}`));
908
- })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6682\u65E0 Skill \u626B\u63CF\u7ED3\u679C\uFF0C\u53EF\u8BA9 Agent \u8C03\u7528 skill_guard_scan\u3002" })) })] })) : panel.id === "prompt-guard-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-3 text-[11px] ${data?.risk === "blocked" ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : data?.risk === "review" ? "border-[#f3dfab] bg-[#fffaf0] text-[#9a6700]" : "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"}`, children: [_jsx("span", { children: data?.risk === "blocked" ? "高风险,需阻断" : data?.risk === "review" ? "需要人工复核" : "未发现风险" }), _jsxs("strong", { className: "font-mono", children: [value(data?.scans ?? 0), " \u6B21\u626B\u63CF"] })] }), data?.latest && typeof data.latest === "object" ? ((() => {
1046
+ })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 workspace_search \u68C0\u7D22\u5F53\u524D\u5DE5\u4F5C\u533A\u3002" }))] })) : panel.id === "recall-unread-panel" ? ((() => {
1047
+ const view = recallUnreadPanelView(data);
1048
+ const visible = view.items.slice(0, 8);
1049
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [view.status.state === "failed" || view.status.state === "cancelled" ? (_jsxs("div", { className: `rounded-lg border px-3 py-3 text-[11px] leading-5 ${view.status.state === "failed" ? "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]" : "border-[#f4d8a8] bg-[#fff9ed] text-[#9a6700]"}`, children: ["\u626B\u63CF", view.status.state === "failed" ? "失败" : "已取消", view.status.error === null ? "" : `:${view.status.error}`] })) : null, _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
1050
+ ["候选", view.inventory.candidates],
1051
+ ["已扫描", view.inventory.scanned],
1052
+ ["未回答", view.total],
1053
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block font-mono text-[17px] text-[#30343b]", children: value(item) })] }, value(label)))) }), visible.length > 0 ? (_jsx("div", { className: "grid gap-2", children: visible.map((session, index) => (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("strong", { className: "min-w-0 flex-1 truncate text-[11px] text-[#30343b]", children: session.name }), _jsxs("span", { className: "shrink-0 font-mono text-[9px] text-[#687381]", children: [session.messageCount, " \u6761\u6D88\u606F"] })] }), _jsx("p", { className: "mt-1 line-clamp-2 whitespace-pre-wrap break-words text-[10px] leading-4 text-[#65707b]", children: session.message })] }, `${session.id}-${index}`))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u4EE5\u672A\u56DE\u7B54\u7528\u6237\u6D88\u606F\u7ED3\u675F\u7684\u4F1A\u8BDD\u3002" })), _jsxs("p", { className: "text-[10px] leading-4 text-[#687381]", children: ["\u5DF2\u626B\u63CF ", view.inventory.scanned, "/", view.inventory.available, " \u4E2A\u4F1A\u8BDD\u6587\u4EF6\uFF0C\u754C\u9762\u663E\u793A ", visible.length, "/", view.inventory.unread, " ", "\u4E2A\uFF1B\u53EA\u8BFB\u626B\u63CF\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u4F1A\u8BDD\u3002", view.inventory.truncated ? " 部分结果因发现、扫描或展示上限被截断。" : ""] })] }));
1054
+ })()) : panel.id === "turn-rewind-panel" ? ((() => {
1055
+ const view = turnRewindPanelView(data);
1056
+ const statusLabel = {
1057
+ queued: "已排队",
1058
+ running: "执行中",
1059
+ completed: "已回退",
1060
+ failed: "失败",
1061
+ cancelled: "已取消",
1062
+ };
1063
+ const statusTone = {
1064
+ queued: "border-[#dce5f5] bg-[#f6f8ff] text-[#3565c5]",
1065
+ running: "border-[#dce5f5] bg-[#f6f8ff] text-[#3565c5]",
1066
+ completed: "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]",
1067
+ failed: "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]",
1068
+ cancelled: "border-[#f4d8a8] bg-[#fff9ed] text-[#9a6700]",
1069
+ };
1070
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [view.latest === null ? (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6267\u884C\u56DE\u9000\u64CD\u4F5C\u3002" })) : (_jsxs("div", { className: `rounded-lg border px-3 py-3 ${statusTone[view.latest.status]}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.08em]", children: "\u6700\u8FD1\u64CD\u4F5C" }), _jsx("span", { className: "rounded-full bg-white/70 px-2 py-1 text-[10px] font-semibold", children: statusLabel[view.latest.status] })] }), _jsx("p", { className: "mt-2 line-clamp-2 text-[11px] leading-4 text-[#30343b]", children: view.latest.target.text }), view.latest.error === null ? null : _jsx("p", { className: "mt-2 break-words text-[10px] leading-4", children: view.latest.error }), view.latest.summarized ? _jsx("p", { className: "mt-2 text-[10px] leading-4", children: "\u5DF2\u8BF7\u6C42\u5206\u652F\u6458\u8981\uFF1B\u8BE5\u9009\u9879\u53EF\u80FD\u8C03\u7528\u6A21\u578B\u5E76\u4EA7\u751F\u8D39\u7528\u3002" }) : null] })), _jsxs("div", { className: "grid gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-[#687381]", children: "\u53EF\u56DE\u9000\u8F6E\u6B21" }), view.candidates.length > 0 ? (view.candidates.map((candidate, index) => (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsx("span", { className: "mt-0.5 font-mono text-[10px] text-[#3565c5]", children: view.candidates.length - index }), _jsx("span", { className: "line-clamp-2 min-w-0 flex-1 text-[11px] leading-4 text-[#65707b]", children: candidate.text })] }, `${candidate.entryId}-${index}`)))) : (_jsx("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-3 text-[11px] text-[#687381]", children: "\u5F53\u524D\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u53EF\u56DE\u9000\u7684\u7528\u6237\u8F6E\u6B21\u3002" }))] }), _jsxs("p", { className: "text-[10px] leading-4 text-[#687381]", children: ["\u5DF2\u68C0\u67E5\u5F53\u524D\u5206\u652F ", view.inventory.scannedEntries, " \u4E2A\u6761\u76EE\uFF1B\u540E\u7AEF\u4FDD\u7559 ", view.inventory.shown, " \u4E2A\u5019\u9009\uFF0C\u754C\u9762\u663E\u793A ", view.candidates.length, " \u4E2A\u3002", view.inventory.truncated ? " 部分结果因扫描、候选或显示上限被截断。" : ""] })] }));
1071
+ })()) : panel.id === "skill-guard-panel" ? ((() => {
1072
+ const view = skillGuardPanelView(data);
1073
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [view.status.state === "failed" || view.status.state === "cancelled" ? (_jsxs("div", { className: `rounded-lg border px-3 py-3 text-[11px] leading-5 ${view.status.state === "failed" ? "border-[#f3c4c4] bg-[#fff4f4] text-[#a23b3b]" : "border-[#f4d8a8] bg-[#fff9ed] text-[#9a6700]"}`, children: ["\u626B\u63CF", view.status.state === "failed" ? "失败" : "已取消", view.status.error === null ? "" : `:${view.status.error}`] })) : null, _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
1074
+ ["已扫描", view.total],
1075
+ ["高风险", view.blocked],
1076
+ ["待复核", view.review],
1077
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsx("div", { className: "grid gap-2", children: view.reports.length > 0 ? (view.reports.slice(0, 8).map((report, index) => (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: `h-2 w-2 rounded-full ${report.risk === "blocked" ? "bg-[#d64545]" : report.risk === "review" ? "bg-[#e0a11a]" : "bg-[#22a06b]"}` }), _jsx("strong", { className: "min-w-0 flex-1 truncate text-[11px] text-[#30343b]", children: report.name }), _jsx("span", { className: "text-[10px] text-[#687381]", children: report.risk === "blocked" ? "高风险" : report.risk === "review" ? "复核" : "安全" })] }), report.findings.length > 0 ? (_jsx("p", { className: "mt-1 truncate text-[10px] text-[#65707b]", children: report.findings.map((finding) => finding.code).join(" · ") })) : null] }, `${report.name}-${index}`)))) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6682\u65E0 Skill \u626B\u63CF\u7ED3\u679C\uFF0C\u53EF\u8BA9 Agent \u8C03\u7528 skill_guard_scan\u3002" })) }), _jsxs("p", { className: "text-[10px] text-[#687381]", children: ["\u5DF2\u626B\u63CF ", view.inventory.scanned, "/", view.inventory.available, " \u4E2A\u5165\u53E3\uFF0C\u9762\u677F\u663E\u793A ", Math.min(view.reports.length, 8), " \u4E2A\uFF1B\u98CE\u9669\u7B49\u7EA7\u4EC5\u4F9B\u5BA1\u8BA1\uFF0C\u4E0D\u4F1A\u7981\u7528 Skill\u3002"] })] }));
1078
+ })()) : panel.id === "prompt-guard-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-3 text-[11px] ${data?.risk === "blocked" ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : data?.risk === "review" ? "border-[#f3dfab] bg-[#fffaf0] text-[#9a6700]" : "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"}`, children: [_jsx("span", { children: data?.risk === "blocked" ? "高风险,需阻断" : data?.risk === "review" ? "需要人工复核" : "未发现风险" }), _jsxs("strong", { className: "font-mono", children: [value(data?.scans ?? 0), " \u6B21\u626B\u63CF"] })] }), data?.latest && typeof data.latest === "object" ? ((() => {
909
1079
  const report = data.latest;
910
1080
  const findings = Array.isArray(report.findings) ? report.findings : [];
911
1081
  return findings.length > 0 ? (_jsx("ul", { className: "grid gap-1 rounded-lg border border-[#e3e7ee] bg-white px-4 py-3 text-[10px] text-[#65707b]", children: findings.slice(0, 4).map((finding, index) => {
912
1082
  const item = finding && typeof finding === "object" ? finding : {};
913
1083
  return (_jsxs("li", { children: [_jsx("strong", { className: "font-mono text-[#30343b]", children: value(item.code ?? "finding") }), "\uFF1A", value(item.message, "")] }, `${value(item.code ?? "finding")}-${index}`));
914
1084
  }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6700\u8FD1\u4E00\u6B21\u626B\u63CF\u672A\u53D1\u73B0\u98CE\u9669\u3002" }));
915
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 prompt_guard_scan \u68C0\u67E5\u4E0D\u53EF\u4FE1\u6587\u672C\u3002" }))] })) : panel.id === "code2skill-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5DF2\u751F\u6210\u6280\u80FD" }), _jsx("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: value(data?.generated ?? 0) })] }), data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? (_jsxs("p", { className: "mt-2 truncate text-[11px] text-[#65707b]", children: [value(data.latest.slug ?? "skill"), " \u00B7", " ", value(Array.isArray(data.latest.files) ? data.latest.files.length : 0), " ", "\u4E2A\u53C2\u8003\u6587\u4EF6"] })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u751F\u6210\u6280\u80FD\u3002\u53EF\u8BA9 Agent \u8C03\u7528 skill_pack_create\u3002" }))] }), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u8F93\u51FA\u76EE\u5F55\uFF1A\u9879\u76EE .pi/skills/<name>\uFF0C\u5305\u542B SKILL.md \u548C\u539F\u59CB\u53C2\u8003\u6587\u4EF6\u3002" })] })) : panel.id === "genui-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
916
- const report = data.latest;
917
- const blocks = Array.isArray(report.blocks) ? report.blocks : [];
1085
+ })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "Agent \u53EF\u8C03\u7528 prompt_guard_scan \u68C0\u67E5\u4E0D\u53EF\u4FE1\u6587\u672C\u3002" }))] })) : panel.id === "code2skill-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5DF2\u751F\u6210\u6280\u80FD" }), _jsx("strong", { className: "font-mono text-[12px] text-[#315fb8]", children: value(data?.generated ?? 0) })] }), data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? (_jsxs("p", { className: "mt-2 truncate text-[11px] text-[#65707b]", children: [value(data.latest.slug ?? "skill"), " \u00B7", " ", value(Array.isArray(data.latest.files) ? data.latest.files.length : 0), " ", "\u4E2A\u53C2\u8003\u6587\u4EF6"] })) : (_jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u751F\u6210\u6280\u80FD\u3002\u53EF\u8BA9 Agent \u8C03\u7528 skill_pack_create\u3002" }))] }), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u8F93\u51FA\u76EE\u5F55\uFF1A\u9879\u76EE .pi/skills/<name>\uFF0C\u5305\u542B SKILL.md \u548C\u539F\u59CB\u53C2\u8003\u6587\u4EF6\u3002" })] })) : panel.id === "genui-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [(() => {
1086
+ const view = genUiPanelView(data);
918
1087
  const toneClass = {
919
1088
  neutral: "border-[#e3e7ee] bg-[#f6f8fa] text-[#65707b]",
920
1089
  info: "border-[#d9e4f7] bg-[#f6f8ff] text-[#315fb8]",
@@ -922,96 +1091,138 @@ function PluginPanelCard({ panel, inline = false }) {
922
1091
  warning: "border-[#f3dfab] bg-[#fffaf0] text-[#9a6700]",
923
1092
  danger: "border-[#f4caca] bg-[#fff5f5] text-[#b42318]",
924
1093
  };
925
- return (_jsxs("div", { className: "grid gap-2", children: [_jsxs("div", { className: "flex items-center justify-between text-[11px]", children: [_jsx("strong", { className: "text-[#30343b]", children: value(report.title ?? "结构化卡片") }), _jsxs("span", { className: "font-mono text-[#687381]", children: [value(data.rendered ?? 0), " \u6B21"] })] }), blocks.map((block, index) => {
926
- const item = block && typeof block === "object" ? block : {};
927
- const tone = value(item.tone ?? "neutral");
928
- const blockValue = item.value;
929
- return item.type === "progress" ? (_jsxs("div", { className: `rounded-lg border px-3 py-2 ${toneClass[tone] ?? toneClass.neutral}`, children: [_jsxs("div", { className: "flex items-center justify-between text-[10px]", children: [_jsx("span", { children: value(item.label ?? "进度") }), _jsxs("strong", { children: [value(blockValue ?? 0), "%"] })] }), _jsx("div", { className: "mt-1 h-1.5 overflow-hidden rounded-full bg-white/70", children: _jsx("div", { className: "h-full rounded-full bg-current", style: { width: `${Math.max(0, Math.min(100, Number(blockValue) || 0))}%` } }) })] }, `${value(item.label)}-${index}`)) : (_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-2 text-[11px] ${toneClass[tone] ?? toneClass.neutral}`, children: [_jsx("span", { className: "text-[#65707b]", children: value(item.label, "") }), _jsx("strong", { children: value(blockValue, "") })] }, `${value(item.label)}-${index}`));
930
- })] }));
931
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u7ED3\u6784\u5316\u5361\u7247\u3002\u53EF\u8BA9 Agent \u8C03\u7528 genui_render\u3002" })), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u4EC5\u6E32\u67D3\u7ED3\u6784\u5316\u6587\u672C\u3001\u5FBD\u6807\u548C\u8FDB\u5EA6\u5757\uFF1BHTML \u4E0E\u811A\u672C\u6309\u666E\u901A\u6587\u672C\u5904\u7406\u3002" })] })) : panel.id === "anchored-standard-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [(() => {
1094
+ return view.latest !== null ? (_jsxs("div", { className: "grid gap-2", children: [_jsxs("div", { className: "flex items-start justify-between gap-3 text-[11px]", children: [_jsx("strong", { className: "min-w-0 break-words text-[#30343b]", children: view.latest.title }), _jsxs("span", { className: "shrink-0 font-mono text-[10px] text-[#687381]", children: [view.rendered, " \u6B21"] })] }), view.latest.blocks.map((block, index) => block.type === "progress" ? (_jsxs("div", { className: `rounded-lg border px-3 py-2 ${toneClass[block.tone]}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2 text-[10px]", children: [_jsx("span", { className: "min-w-0 break-words", children: block.label }), _jsxs("strong", { className: "shrink-0", children: [block.value, "%"] })] }), _jsx("div", { className: "mt-1 h-1.5 overflow-hidden rounded-full bg-white/70", children: _jsx("div", { className: "h-full rounded-full bg-current", style: { width: `${block.value}%` } }) })] }, `${block.label}-${index}`)) : block.type === "text" ? (_jsxs("div", { className: `rounded-lg border px-3 py-2 text-[11px] ${toneClass[block.tone]}`, children: [_jsx("strong", { className: "block text-[10px]", children: block.label }), _jsx("p", { className: "mt-1 whitespace-pre-wrap break-words leading-4", children: block.value })] }, `${block.label}-${index}`)) : (_jsxs("div", { className: `flex items-center justify-between gap-3 rounded-lg border px-3 py-2 text-[11px] ${toneClass[block.tone]}`, children: [_jsx("span", { className: "min-w-0 break-words", children: block.label }), _jsx("strong", { className: "min-w-0 break-words text-right", children: block.value })] }, `${block.label}-${index}`))), _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { children: ["\u6700\u591A ", view.limits.blocks, " \u5757"] }), _jsxs("span", { children: ["\u603B\u6587\u672C\u4E0A\u9650 ", view.limits.totalText, " \u5B57\u7B26"] }), view.latest.renderedAt !== null ? _jsxs("span", { children: [view.latest.renderedAt.slice(11, 19), " UTC"] }) : null, view.latest.truncated ? _jsx("span", { children: "\u9762\u677F\u660E\u7EC6\u5DF2\u622A\u65AD" }) : null] })] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u7ED3\u6784\u5316\u5361\u7247\u3002\u53EF\u8BA9 Agent \u8C03\u7528 genui_render\u3002" }));
1095
+ })(), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u4EC5\u6E32\u67D3\u7ED3\u6784\u5316\u6587\u672C\u3001\u5FBD\u6807\u548C\u8FDB\u5EA6\u5757\uFF1BHTML \u4E0E\u811A\u672C\u6309\u666E\u901A\u6587\u672C\u663E\u793A\u3002" })] })) : panel.id === "anchored-standard-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [(() => {
932
1096
  const violations = Array.isArray(data?.violations) ? data.violations : [];
933
1097
  const violated = data?.status === "violated";
934
1098
  return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-3 text-[11px] ${violated ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"}`, children: [_jsx("span", { children: violated ? "轨迹存在违规" : data?.status === "anchored" ? "运行已锚定" : "等待 Agent 运行" }), _jsxs("strong", { className: "font-mono", children: [value(data?.events ?? 0), " \u4E8B\u4EF6"] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#65707b]", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u5DE5\u5177\u8C03\u7528 ", _jsx("strong", { className: "ml-1 text-[#30343b]", children: value(data?.toolCalls ?? 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u8FDD\u89C4\u9879 ", _jsx("strong", { className: "ml-1 text-[#30343b]", children: value(violations.length) })] })] }), violations.length > 0 ? (_jsx("ul", { className: "grid gap-1 rounded-lg border border-[#f4caca] bg-[#fffafa] px-3 py-2 text-[10px] text-[#b42318]", children: violations.slice(0, 4).map((item, index) => (_jsx("li", { children: value(item && typeof item === "object" ? (item.message ?? "违规") : item) }, `${value(item)}-${index}`))) })) : null] }));
935
- })(), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u53EF\u8BA9 Agent \u8C03\u7528 trajectory_anchor_check \u5BA1\u8BA1\u5F53\u524D\u6267\u884C\u8F68\u8FF9\u3002" })] })) : panel.id === "telemetry-blocker-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#b9e6c9] bg-[#f0fbf4] px-3 py-3 text-[11px] text-[#14733f]", children: [_jsx("span", { children: "\u9065\u6D4B\u5DF2\u5173\u95ED" }), _jsxs("strong", { className: "font-mono", children: ["\u62E6\u622A ", value(data?.blocked ?? 0), " \u6B21"] })] }), _jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[10px] text-[#65707b]", children: Array.isArray(data?.names) && data.names.length > 0 ? `事件名:${data.names.slice(0, 8).map(String).join("、")}` : "尚未收到遥测事件。" }), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u53EA\u8BB0\u5F55\u4E8B\u4EF6\u540D\u548C\u8BA1\u6570\uFF0C\u4E0D\u4FDD\u7559\u4E8B\u4EF6\u5C5E\u6027\uFF0C\u4E5F\u4E0D\u4F1A\u53D1\u8D77\u7F51\u7EDC\u8BF7\u6C42\u3002" })] })) : panel.id === "plugin-dev-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-3 text-[11px] ${data?.status === "reloaded" ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" : data?.status === "failed" ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" : "border-[#e3e7ee] bg-[#f6f8fa] text-[#65707b]"}`, children: [_jsx("span", { children: data?.status === "reloaded" ? "插件已重载" : data?.status === "failed" ? "插件重载失败" : "等待重载" }), _jsx("strong", { className: "font-mono", children: value(data?.status ?? "idle") })] }), _jsx("p", { className: "text-[10px] text-[#687381]", children: value(data?.reason ?? "修改本地扩展后调用 plugin_dev_reload") }), data?.error ? _jsx("p", { className: "rounded-lg bg-[#fff5f5] px-3 py-2 text-[10px] text-[#b42318]", children: value(data.error) }) : null] })) : panel.id === "openpets-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#e3e7ee] bg-[#f8fafc] px-3 py-3", children: [_jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-[#dceaff] text-[20px] text-[#3565c5]", children: "\u25C9" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("strong", { className: "block truncate text-[13px] text-[#30343b]", children: value(data?.name ?? "Pi") }), _jsx("span", { className: "text-[10px] text-[#687381]", children: value(data?.lastEvent ?? "session_start") })] }), _jsx("span", { className: "rounded-full bg-[#edf3fe] px-2 py-1 text-[10px] text-[#3565c5]", children: value(data?.mood ?? "idle") })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#65707b]", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u80FD\u91CF ", _jsxs("strong", { className: "ml-1 text-[#30343b]", children: [value(data?.energy ?? 0), "%"] })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u4E92\u52A8 ", _jsx("strong", { className: "ml-1 text-[#30343b]", children: value(data?.interactions ?? 0) })] })] }), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u6839\u636E\u771F\u5B9E Pi \u4F1A\u8BDD\u4E8B\u4EF6\u81EA\u52A8\u53CD\u5E94\uFF0C\u4E5F\u53EF\u8BA9 Agent \u8C03\u7528 pet_react \u8FDB\u884C\u4E92\u52A8\u3002" })] })) : panel.id === "change-verifier-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
1099
+ })(), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u53EF\u8BA9 Agent \u8C03\u7528 trajectory_anchor_check \u5BA1\u8BA1\u5F53\u524D\u6267\u884C\u8F68\u8FF9\u3002" })] })) : panel.id === "telemetry-blocker-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#b9e6c9] bg-[#f0fbf4] px-3 py-3 text-[11px] text-[#14733f]", children: [_jsx("span", { children: "\u9065\u6D4B\u5DF2\u5173\u95ED" }), _jsxs("strong", { className: "font-mono", children: ["\u62E6\u622A ", value(data?.blocked ?? 0), " \u6B21"] })] }), _jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[10px] text-[#65707b]", children: Array.isArray(data?.names) && data.names.length > 0 ? `事件名:${data.names.slice(0, 8).map(String).join("、")}` : "尚未收到遥测事件。" }), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u53EA\u8BB0\u5F55\u4E8B\u4EF6\u540D\u548C\u8BA1\u6570\uFF0C\u4E0D\u4FDD\u7559\u4E8B\u4EF6\u5C5E\u6027\uFF0C\u4E5F\u4E0D\u4F1A\u53D1\u8D77\u7F51\u7EDC\u8BF7\u6C42\u3002" })] })) : panel.id === "plugin-dev-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
1100
+ const view = pluginDevPanelView(data);
1101
+ const presentation = {
1102
+ idle: { label: "等待重载", style: "border-[#e3e7ee] bg-[#f6f8fa] text-[#65707b]" },
1103
+ queued: { label: "等待当前运行结束", style: "border-[#d9e4f7] bg-[#f6f8ff] text-[#315fb8]" },
1104
+ running: { label: "正在重载会话资源", style: "border-[#d9e4f7] bg-[#f6f8ff] text-[#315fb8]" },
1105
+ reloaded: { label: "会话资源已重载", style: "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" },
1106
+ failed: { label: "会话资源重载失败", style: "border-[#f4caca] bg-[#fff5f5] text-[#b42318]" },
1107
+ cancelled: { label: "会话资源重载已取消", style: "border-[#f3dfab] bg-[#fffaf0] text-[#9a6700]" },
1108
+ }[view.status];
1109
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-3 text-[11px] ${presentation.style}`, children: [_jsx("span", { children: presentation.label }), _jsx("strong", { className: "font-mono", children: view.status })] }), _jsx("p", { className: "break-words text-[10px] text-[#687381]", children: view.reason || "修改本地扩展后调用 plugin_dev_reload" }), view.error !== null ? _jsx("p", { className: "break-words rounded-lg bg-[#fff5f5] px-3 py-2 text-[10px] text-[#b42318]", children: view.error }) : null, _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { children: ["\u539F\u56E0\u4E0A\u9650 ", view.limits.reasonCharacters, " \u5B57\u7B26"] }), _jsxs("span", { children: ["\u9519\u8BEF\u4E0A\u9650 ", view.limits.errorCharacters, " \u5B57\u7B26"] }), view.reloadedAt !== null ? _jsxs("span", { children: [view.reloadedAt.slice(11, 19), " UTC"] }) : null] })] }));
1110
+ })() })) : panel.id === "openpets-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
1111
+ const view = openPetsPanelView(data);
1112
+ const moodLabel = { idle: "休息", focused: "专注", happy: "开心", concerned: "担心" }[view.mood];
1113
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#e3e7ee] bg-[#f8fafc] px-3 py-3", children: [_jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-[#dceaff] text-[20px] text-[#3565c5]", children: "\u25C9" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("strong", { className: "block truncate text-[13px] text-[#30343b]", children: view.name }), _jsx("span", { className: "text-[10px] text-[#687381]", children: view.lastEvent })] }), _jsx("span", { className: "rounded-full bg-[#edf3fe] px-2 py-1 text-[10px] text-[#3565c5]", children: moodLabel })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#65707b]", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u80FD\u91CF ", _jsxs("strong", { className: "ml-1 text-[#30343b]", children: [view.energy, "%"] })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u4E92\u52A8 ", _jsx("strong", { className: "ml-1 text-[#30343b]", children: view.interactions })] })] }), _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { children: ["\u6062\u590D\u626B\u63CF ", view.recovery.scanned, " / ", view.recovery.sessionEntries] }), _jsx("span", { children: view.recovery.restored ? "已恢复状态" : "使用初始状态" }), _jsxs("span", { children: ["\u6301\u4E45\u5316 ", view.persistence.attempts - view.persistence.failures, " / ", view.persistence.attempts] }), view.updatedAt !== null ? _jsxs("span", { children: [view.updatedAt.slice(11, 19), " UTC"] }) : null] }), view.persistence.lastError !== null ? (_jsx("p", { className: "break-words rounded-lg bg-[#fff5f5] px-3 py-2 text-[10px] text-[#b42318]", children: view.persistence.lastError })) : null, _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u6839\u636E\u771F\u5B9E Pi \u4F1A\u8BDD\u4E8B\u4EF6\u81EA\u52A8\u53CD\u5E94\uFF0C\u4E5F\u53EF\u8BA9 Agent \u8C03\u7528 pet_react \u8FDB\u884C\u4E92\u52A8\u3002" })] }));
1114
+ })() })) : panel.id === "change-verifier-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
936
1115
  const report = data.latest;
937
1116
  const tests = report.tests && typeof report.tests === "object" ? report.tests : {};
938
1117
  const review = report.review && typeof report.review === "object" ? report.review : {};
939
1118
  const status = value(report.status ?? "fail");
940
1119
  return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `flex items-center justify-between rounded-lg border px-3 py-3 text-[11px] ${status === "pass" ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" : status === "warning" ? "border-[#f3dfab] bg-[#fffaf0] text-[#9a6700]" : "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"}`, children: [_jsx("span", { children: status === "pass" ? "门禁通过" : status === "warning" ? "门禁有警告" : "门禁失败" }), _jsxs("strong", { className: "font-mono", children: [value(data.runs ?? 0), " \u6B21"] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2 text-[10px] text-[#65707b]", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u6D4B\u8BD5 exit ", _jsx("strong", { className: "ml-1 text-[#30343b]", children: value(tests.exitCode ?? "—") })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: ["\u5BA1\u67E5 ", _jsx("strong", { className: "ml-1 text-[#30343b]", children: value(review.status ?? "—") })] })] })] }));
941
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6267\u884C\u53D1\u5E03\u95E8\u7981\u3002\u53EF\u8BA9 Agent \u8C03\u7528 verify_change_gate\u3002" })), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u590D\u7528 run_project_tests \u548C review_changes\uFF0C\u4E0D\u91CD\u590D\u5B9E\u73B0\u6D4B\u8BD5\u6216\u5BA1\u67E5\u903B\u8F91\u3002" })] })) : panel.id === "readme-gen-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: data?.generated === true ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "rounded-lg border border-[#b9e6c9] bg-[#f0fbf4] px-3 py-3 text-[11px] text-[#14733f]", children: ["\u5DF2\u751F\u6210 ", value(data.name ?? "项目"), " \u7684 README \u6982\u89C8\uFF1A", value(data.scripts ?? 0), " \u4E2A\u811A\u672C\uFF0C", value(data.plugins ?? 0), " \u4E2A\u8FD0\u884C\u65F6\u63D2\u4EF6\u3002"] }), data.lastWrite && typeof data.lastWrite === "object" ? (_jsxs("div", { className: "rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-2 text-[11px] text-[#315fb8]", children: ["\u5DF2\u5199\u5165 ", value(data.lastWrite.path ?? "README.generated.md"), " \u00B7", " ", value(data.lastWrite.bytes ?? 0), " bytes", data.lastWrite.overwritten === true ? " · 已覆盖" : " · 新文件"] })) : null, _jsx("p", { className: "text-[10px] leading-4 text-[#687381]", children: "\u9700\u8981\u843D\u76D8\u65F6\u8C03\u7528 readme_write\uFF0C\u5E76\u663E\u5F0F\u4F20\u5165 confirm=true\uFF1B\u9ED8\u8BA4\u5199\u5165 README.generated.md\u3002" })] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u751F\u6210\u6587\u6863\u3002\u8BA9 Agent \u8C03\u7528 readme_report \u83B7\u53D6 Markdown \u8349\u7A3F\uFF0C\u6216\u8C03\u7528 readme_write \u5199\u5165\u786E\u8BA4\u540E\u7684\u6587\u4EF6\u3002" })) })) : panel.id === "sql-lens-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
942
- const report = data.latest;
943
- const rows = Array.isArray(report.rows) ? report.rows : [];
944
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(report.database ?? "database") }), _jsxs("strong", { className: "font-mono text-[12px] text-[#3565c5]", children: [value(rows.length), " rows"] })] }), _jsx("pre", { className: "max-h-48 overflow-auto rounded-lg border border-[#edf0f3] bg-[#fbfcfd] p-3 text-[10px] leading-4 text-[#65707b]", children: JSON.stringify(rows, null, 2) })] }));
945
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u67E5\u8BE2\u6570\u636E\u5E93\u3002\u53EF\u8BA9 Agent \u8C03\u7528 sql_readonly\u3002" })) })) : panel.id === "theme-studio-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("strong", { className: "block text-[12px] text-[#30343b]", children: value(data?.label ?? "Light") }), _jsx("p", { className: "mt-1 truncate text-[10px] text-[#65707b]", children: value(data?.description ?? "") })] }), _jsx("span", { className: "shrink-0 rounded-full bg-[#edf3fe] px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(data?.theme ?? "light") })] }), Array.isArray(data?.presets) ? (_jsx("div", { className: "grid grid-cols-2 gap-2", children: data.presets.map((preset, index) => {
1120
+ })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6267\u884C\u53D1\u5E03\u95E8\u7981\u3002\u53EF\u8BA9 Agent \u8C03\u7528 verify_change_gate\u3002" })), _jsx("p", { className: "text-[10px] text-[#687381]", children: "\u590D\u7528 run_project_tests \u548C review_changes\uFF0C\u4E0D\u91CD\u590D\u5B9E\u73B0\u6D4B\u8BD5\u6216\u5BA1\u67E5\u903B\u8F91\u3002" })] })) : panel.id === "readme-gen-panel" ? ((() => {
1121
+ const view = readmeGenPanelView(data);
1122
+ if (view.malformed)
1123
+ return (_jsx("div", { className: "mt-3 rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] leading-5 text-[#b42318]", children: "README \u9762\u677F\u6570\u636E\u65E0\u6548\uFF0C\u6682\u4E0D\u5C55\u793A\u751F\u6210\u6216\u5199\u5165\u7ED3\u679C\u3002" }));
1124
+ const statusLabel = view.status.state === "idle"
1125
+ ? "等待生成"
1126
+ : view.status.state === "running"
1127
+ ? view.status.operation === "write"
1128
+ ? "正在写入"
1129
+ : "正在生成"
1130
+ : view.status.state === "completed"
1131
+ ? view.status.operation === "write"
1132
+ ? "写入已完成"
1133
+ : "草稿已生成"
1134
+ : view.status.state === "failed"
1135
+ ? view.status.operation === "write"
1136
+ ? "写入失败"
1137
+ : "生成失败"
1138
+ : view.status.operation === "write"
1139
+ ? "写入已取消"
1140
+ : "生成已取消";
1141
+ const statusTone = view.status.state === "failed" || view.status.state === "cancelled"
1142
+ ? "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"
1143
+ : view.status.state === "completed"
1144
+ ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]"
1145
+ : "border-[#dce5f5] bg-[#f6f8ff] text-[#315fb8]";
1146
+ return (_jsxs("div", { className: "mt-3 grid min-w-0 gap-3", children: [_jsxs("div", { className: `flex min-w-0 items-center justify-between gap-3 rounded-lg border px-3 py-2 text-[10px] ${statusTone}`, children: [_jsx("strong", { className: "font-semibold", children: statusLabel }), view.status.at !== null ? _jsxs("time", { className: "shrink-0 font-mono", children: [view.status.at.slice(11, 19), " UTC"] }) : null] }), view.generated === null ? (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] leading-5 text-[#687381]", children: ["\u8FD8\u6CA1\u6709\u751F\u6210 README \u8349\u7A3F\u3002\u8BA9 Agent \u8C03\u7528 ", _jsx("code", { className: "font-mono text-[#3565c5]", children: "readme_report" }), " \u5148\u68C0\u67E5\u5185\u5BB9\u3002"] })) : (_jsxs("div", { className: "min-w-0 border-l-2 border-[#7aa2e8] bg-[#f8faff] px-3 py-3", children: [_jsx("p", { className: "break-all text-[12px] font-semibold leading-5 text-[#20252b]", children: view.generated.name }), _jsxs("p", { className: "mt-1 text-[10px] text-[#687381]", children: [view.generated.scripts, " \u4E2A\u811A\u672C \u00B7 ", view.generated.plugins, " \u4E2A\u8FD0\u884C\u65F6\u63D2\u4EF6"] })] })), view.lastWrite !== null ? (_jsxs("div", { className: "min-w-0 rounded-lg border border-[#dce5f5] bg-white px-3 py-2 text-[#315fb8]", children: [_jsx("p", { className: "break-all font-mono text-[10px] leading-4", children: view.lastWrite.path }), _jsxs("p", { className: "mt-1 text-[10px] text-[#687381]", children: [new Intl.NumberFormat("en-US").format(view.lastWrite.bytes), " bytes \u00B7 ", view.lastWrite.overwritten ? "已覆盖" : "新文件"] })] })) : null, view.status.error !== null ? (_jsx("p", { className: "break-words rounded-lg bg-[#fff5f5] px-3 py-2 text-[10px] leading-4 text-[#b42318]", children: view.status.error })) : null, _jsxs("p", { className: "text-[10px] leading-4 text-[#687381]", children: ["\u5199\u5165\u9700\u8981 ", _jsx("code", { className: "font-mono", children: "confirm=true" }), "\uFF1B\u8986\u76D6\u5DF2\u6709 README \u8FD8\u9700\u8981 ", _jsx("code", { className: "font-mono", children: "overwrite=true" }), "\u3002"] })] }));
1147
+ })()) : panel.id === "sql-lens-panel" ? ((() => {
1148
+ const view = sqlLensPanelView(data);
1149
+ if (view.malformed) {
1150
+ return (_jsxs("div", { className: "mt-3 rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] text-[#b42318]", children: [_jsx("strong", { className: "block text-[12px]", children: "SQL Lens \u9762\u677F\u6570\u636E\u5F02\u5E38" }), _jsx("span", { className: "mt-1 block", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u540E\u518D\u67E5\u8BE2\u3002" })] }));
1151
+ }
1152
+ const report = view.latest;
1153
+ const statusLabel = view.status.state === "running"
1154
+ ? "查询中"
1155
+ : view.status.state === "completed"
1156
+ ? "已完成"
1157
+ : view.status.state === "failed"
1158
+ ? "查询失败"
1159
+ : view.status.state === "cancelled"
1160
+ ? "已取消"
1161
+ : "等待查询";
1162
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-[10px] text-[#687381]", children: [_jsx("span", { className: "rounded-full border border-[#dce5f5] bg-[#f6f8fa] px-2 py-1 font-semibold text-[#3565c5]", children: statusLabel }), view.status.at !== null ? _jsx("time", { className: "font-mono", children: new Date(view.status.at).toLocaleString() }) : null] }), view.status.error !== null ? (_jsx("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[10px] leading-4 text-[#b42318]", children: view.status.error })) : null, report !== null ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", title: report.database, children: report.database }), _jsxs("strong", { className: "shrink-0 font-mono text-[12px] text-[#3565c5]", children: [report.rowInventory.returned, " rows"] })] }), _jsx("code", { className: "mt-2 block max-h-16 overflow-auto whitespace-pre-wrap break-words text-[10px] leading-4 text-[#687381]", children: report.query })] }), _jsx("pre", { className: "max-h-56 overflow-auto rounded-lg border border-[#edf0f3] bg-[#fbfcfd] p-3 text-[10px] leading-4 text-[#65707b]", children: JSON.stringify(report.rows, null, 2) }), report.rowInventory.truncated ? (_jsxs("p", { className: "text-[10px] text-[#9a6700]", children: ["\u9762\u677F\u663E\u793A ", report.rowInventory.shown, " / ", report.rowInventory.returned, " \u884C\uFF1B\u67E5\u8BE2\u5171\u626B\u63CF ", report.rowInventory.scanned, " ", "\u884C\uFF0C\u7ED3\u679C\u5DF2\u6309\u5B89\u5168\u8FB9\u754C\u622A\u65AD\u3002"] })) : null] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u67E5\u8BE2\u6570\u636E\u5E93\u3002\u53EF\u8BA9 Agent \u8C03\u7528 sql_readonly\u3002" })), _jsxs("div", { className: "flex flex-wrap gap-2 font-mono text-[10px] text-[#3565c5]", children: [_jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["timeout:", view.timeoutMs, "ms"] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["rows:", view.limits.rows] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["result:", Math.round(view.limits.resultBytes / 1_024), "KiB"] })] })] }));
1163
+ })()) : panel.id === "theme-studio-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("strong", { className: "block text-[12px] text-[#30343b]", children: value(data?.label ?? "Light") }), _jsx("p", { className: "mt-1 truncate text-[10px] text-[#65707b]", children: value(data?.description ?? "") })] }), _jsx("span", { className: "shrink-0 rounded-full bg-[#edf3fe] px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(data?.theme ?? "light") })] }), Array.isArray(data?.presets) ? (_jsx("div", { className: "grid grid-cols-2 gap-2", children: data.presets.map((preset, index) => {
946
1164
  const item = preset !== null && typeof preset === "object" ? preset : {};
947
1165
  const selected = item.id === data.theme;
948
1166
  return (_jsxs("div", { className: `rounded-lg border px-3 py-2 ${selected ? "border-[#9bbcff] bg-[#f6f8ff]" : "border-[#edf0f3] bg-white"}`, children: [_jsx("strong", { className: "block text-[11px] text-[#30343b]", children: value(item.label ?? item.id ?? "主题") }), _jsx("span", { className: "mt-1 block truncate text-[10px] text-[#687381]", children: value(item.description ?? "") })] }, `${value(item.id ?? "theme")}-${index}`));
949
1167
  }) })) : null, _jsx("p", { className: "text-[10px] leading-4 text-[#687381]", children: "\u53EF\u8BA9 Agent \u8C03\u7528 theme_set \u5207\u6362\u9884\u8BBE\uFF1B\u9009\u62E9\u4F1A\u4FDD\u5B58\u5230\u5F53\u524D session\uFF0C\u5E76\u7531 React \u6839\u8282\u70B9\u5E94\u7528 token\u3002" })] })) : panel.id === "mirage-bridge-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: `rounded-lg border px-3 py-3 ${data?.available === true ? "border-[#b9e6c9] bg-[#f0fbf4]" : data?.available === false ? "border-[#f3dfab] bg-[#fffaf0]" : "border-[#e3e7ee] bg-[#f6f8fa]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5B98\u65B9 Mirage CLI" }), _jsx("strong", { className: `text-[11px] ${data?.available === true ? "text-[#14733f]" : data?.available === false ? "text-[#9a6700]" : "text-[#687381]"}`, children: data?.available === true ? "已连接" : data?.available === false ? "未检测到" : "未检查" })] }), _jsx("p", { className: "mt-2 truncate font-mono text-[10px] text-[#65707b]", children: value(data?.version ?? data?.executable ?? "mirage") }), _jsxs("p", { className: "mt-1 text-[11px] text-[#65707b]", children: ["\u865A\u62DF\u5DE5\u4F5C\u533A\uFF1A", value(data?.workspaceId ?? "未配置")] })] }), data?.lastRun && typeof data.lastRun === "object" ? ((() => {
950
1168
  const run = data.lastRun;
951
1169
  return (_jsxs("div", { className: `rounded-lg border px-3 py-3 ${run.exitCode === 0 ? "border-[#b9e6c9] bg-[#f0fbf4]" : "border-[#f4caca] bg-[#fff5f5]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[10px] text-[#30343b]", children: value(run.command ?? "") }), _jsxs("strong", { className: `shrink-0 text-[11px] ${run.exitCode === 0 ? "text-[#14733f]" : "text-[#b42318]"}`, children: ["exit ", value(run.exitCode ?? "—")] })] }), _jsxs("p", { className: "mt-1 text-[10px] text-[#65707b]", children: ["\u8017\u65F6 ", value(run.durationMs ?? 0), " ms"] })] }));
952
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5148\u8C03\u7528 mirage_doctor \u68C0\u67E5 CLI\uFF0C\u518D\u8C03\u7528 mirage_execute\u3002" })), data?.lastError ? _jsx("p", { className: "text-[10px] leading-4 text-[#9a6700]", children: value(data.lastError) }) : null] })) : panel.id === "docker-sandbox-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
953
- const run = data.latest;
954
- return (_jsxs("div", { className: "rounded-lg border border-[#b9e6c9] bg-[#f0fbf4] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(run.image ?? "image") }), _jsxs("strong", { className: "font-mono text-[12px] text-[#14733f]", children: ["exit ", value(run.exitCode ?? "—")] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#65707b]", children: Array.isArray(run.command) ? run.command.map((argument) => value(argument)).join(" ") : "argv" })] }));
955
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6C99\u7BB1\u8FD0\u884C\u3002\u9ED8\u8BA4\u65E0\u7F51\u7EDC\u3001\u5DE5\u4F5C\u533A\u53EA\u8BFB\u3002" })), _jsx("div", { className: "flex flex-wrap gap-2", children: data?.defaults !== null && typeof data?.defaults === "object"
956
- ? Object.entries(data.defaults).map(([key, entryValue]) => (_jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: [key, ":", value(entryValue)] }, key)))
957
- : null })] })) : panel.id === "yaml-validator-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
958
- const report = data.latest;
959
- const errors = Array.isArray(report.errors) ? report.errors : [];
960
- const warnings = Array.isArray(report.warnings) ? report.warnings : [];
961
- const valid = report.valid === true;
962
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${valid ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" : "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"}`, children: valid ? "YAML 语法有效。" : `发现 ${errors.length} 个语法错误。` }), _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
963
- ["文档", report.documents ?? 0],
964
- ["错误", errors.length],
965
- ["警告", warnings.length],
966
- ].map(([label, entryValue]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: value(entryValue) })] }, value(label)))) }), !valid && errors.length > 0 ? (_jsx("pre", { className: "max-h-32 overflow-auto rounded-lg border border-[#f4caca] bg-[#fffafa] p-3 text-[10px] leading-4 text-[#b42318]", children: errors
967
- .map((error) => typeof error === "object" && error !== null
968
- ? `${value(error.line ?? "?")}:${value(error.column ?? "?")} ${value(error.message, "")}`
969
- : value(error))
970
- .join("\n") })) : null] }));
971
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6821\u9A8C YAML\u3002\u53EF\u8BA9 Agent \u8C03\u7528 yaml_validate\u3002" })), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: "max:512KiB \u00B7 read-only" })] })) : panel.id === "browser-session-panel" ? ((() => {
972
- const tabs = Array.isArray(data?.tabs)
973
- ? browserSessionTabs(data.tabs.flatMap((tab) => {
974
- if (tab === null || typeof tab !== "object")
975
- return [];
976
- const item = tab;
977
- return typeof item.targetId === "string" && typeof item.url === "string"
978
- ? [{ targetId: item.targetId, title: typeof item.title === "string" ? item.title : "", url: item.url }]
979
- : [];
980
- }), 8)
981
- : [];
982
- const latest = data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? data.latest : undefined;
1170
+ })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5148\u8C03\u7528 mirage_doctor \u68C0\u67E5 CLI\uFF0C\u518D\u8C03\u7528 mirage_execute\u3002" })), data?.lastError ? _jsx("p", { className: "text-[10px] leading-4 text-[#9a6700]", children: value(data.lastError) }) : null] })) : panel.id === "docker-sandbox-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
1171
+ const view = dockerSandboxPanelView(data);
1172
+ if (view.malformed) {
1173
+ return (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] text-[#b42318]", children: [_jsx("strong", { className: "block text-[12px]", children: "Docker Sandbox \u9762\u677F\u6570\u636E\u5F02\u5E38" }), _jsx("span", { className: "mt-1 block", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u540E\u518D\u8FD0\u884C\u3002" })] }));
1174
+ }
1175
+ const run = view.latest;
1176
+ const successful = run?.status === "completed" && run.exitCode === 0;
1177
+ return (_jsxs(_Fragment, { children: [run !== null ? (_jsxs("div", { className: `rounded-lg border px-3 py-3 ${successful ? "border-[#b9e6c9] bg-[#f0fbf4]" : "border-[#f4caca] bg-[#fff5f5]"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: run.image }), _jsx("strong", { className: `shrink-0 font-mono text-[12px] ${successful ? "text-[#14733f]" : "text-[#b42318]"}`, children: run.status === "timed_out" ? "超时" : `exit ${run.exitCode}` })] }), _jsx("p", { className: "mt-2 break-all font-mono text-[10px] leading-4 text-[#65707b]", children: run.command.map((argument) => JSON.stringify(argument)).join(" ") }), _jsxs("div", { className: "mt-2 flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsx("span", { children: run.write ? "工作区可写(已确认)" : "工作区只读" }), _jsxs("span", { children: [run.commandCount, " \u4E2A argv \u53C2\u6570"] }), run.truncated ? _jsx("span", { children: "\u9762\u677F\u660E\u7EC6\u5DF2\u622A\u65AD" }) : null] }), run.output ? (_jsx("pre", { className: "mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-all rounded-md bg-white/70 px-2 py-2 text-[10px] leading-4 text-[#4c5663]", children: run.output })) : null] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6C99\u7BB1\u8FD0\u884C\u3002\u4EC5\u4F7F\u7528\u672C\u5730\u955C\u50CF\uFF0C\u9ED8\u8BA4\u65E0\u7F51\u7EDC\u3001\u5DE5\u4F5C\u533A\u53EA\u8BFB\u3002" })), _jsx("div", { className: "flex flex-wrap gap-2", children: [
1178
+ [`image:${view.defaults.image}`, "image"],
1179
+ [`pull:${view.defaults.pull}`, "pull"],
1180
+ [`network:${view.defaults.network}`, "network"],
1181
+ [`rootfs:${view.defaults.rootFilesystem}`, "rootfs"],
1182
+ [`workspace:${view.defaults.workspace}`, "workspace"],
1183
+ [`memory:${view.defaults.memory}`, "memory"],
1184
+ [`cpus:${view.defaults.cpus}`, "cpus"],
1185
+ [`pids:${view.defaults.pids}`, "pids"],
1186
+ [`timeout:${view.defaults.timeoutMs}ms`, "timeout"],
1187
+ ].map(([label, key]) => (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: label }, key))) })] }));
1188
+ })() })) : panel.id === "yaml-validator-panel" ? ((() => {
1189
+ const view = yamlValidatorPanelView(data);
1190
+ const report = view.latest;
1191
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [view.status.state === "failed" || view.status.state === "cancelled" ? (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[11px] text-[#b42318]", children: ["\u6700\u8FD1\u4E00\u6B21\u6821\u9A8C", view.status.state === "cancelled" ? "已取消" : "失败", "\u3002", view.status.error ?? ""] })) : null, report !== null ? (_jsxs(_Fragment, { children: [_jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${report.valid ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" : "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"}`, children: report.valid ? "YAML 语法有效。" : `发现 ${report.errorCount} 个语法错误。` }), _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
1192
+ ["文档", report.documents],
1193
+ ["错误", report.errorCount],
1194
+ ["警告", report.warningCount],
1195
+ ].map(([label, entryValue]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: label }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: entryValue })] }, label))) }), !report.valid && report.errors.length > 0 ? (_jsx("pre", { className: "max-h-32 overflow-auto whitespace-pre-wrap break-words rounded-lg border border-[#f4caca] bg-[#fffafa] p-3 text-[10px] leading-4 text-[#b42318]", children: report.errors.map((error) => `${error.line ?? "?"}:${error.column ?? "?"} ${error.message}`).join("\n") })) : null, report.diagnosticsTruncated ? _jsx("p", { className: "text-[10px] text-[#8a5a00]", children: "\u8BCA\u65AD\u9884\u89C8\u5DF2\u622A\u65AD\uFF0C\u5B8C\u6574\u8BA1\u6570\u4FDD\u7559\u5728\u6458\u8981\u4E2D\u3002" }) : null] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6821\u9A8C YAML\u3002\u53EF\u8BA9 Agent \u8C03\u7528 yaml_validate\u3002" })), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: ["max:", Math.round(view.limits.fileBytes / 1024), "KiB \u00B7 read-only"] })] }));
1196
+ })()) : panel.id === "browser-session-panel" ? ((() => {
1197
+ const view = browserSessionPanelView(data);
1198
+ if (view.malformed) {
1199
+ return (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] text-[#b42318]", children: [_jsx("strong", { className: "block text-[12px]", children: "Browser Session \u9762\u677F\u6570\u636E\u5F02\u5E38" }), _jsx("span", { className: "mt-1 block", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u540E\u518D\u8BD5\u3002" })] }));
1200
+ }
1201
+ const tabs = view.tabs;
1202
+ const latest = view.latest;
983
1203
  const latestAction = latest?.screenshot
984
1204
  ? "已截图"
985
1205
  : latest?.clicked === true
986
1206
  ? "已点击"
987
- : latest?.text
1207
+ : latest?.status === "read" || typeof latest?.text === "string"
988
1208
  ? "已读取"
989
1209
  : latest?.status === "navigated"
990
1210
  ? "已导航"
991
1211
  : undefined;
992
- return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(data?.endpoint ?? "本地浏览器未连接") }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] font-semibold ${data?.connected === true ? "bg-[#e8f8ee] text-[#14733f]" : "bg-[#fff4e5] text-[#8a5a00]"}`, children: data?.connected === true ? "已连接" : "未连接" })] }), _jsxs("p", { className: "mt-2 text-[11px] text-[#687381]", children: ["Chrome DevTools Protocol \u00B7 ", tabs.length, " \u4E2A\u53EF\u8C03\u8BD5\u9875\u9762"] }), data?.connected === false ? (_jsxs("p", { className: "mt-2 text-[11px] text-[#b42318]", children: ["\u8BF7\u4F7F\u7528 remote-debugging-port \u542F\u52A8 Chrome\u3002", value(data.error, "")] })) : null] }), latestAction ? (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-2 text-[11px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u6700\u8FD1\u52A8\u4F5C" }), _jsx("strong", { className: "font-mono text-[#315fb8]", children: latestAction })] })) : null, tabs.length > 0 ? (_jsx("div", { className: "grid gap-2", children: tabs.map((tab) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-2", children: [_jsx("strong", { className: "block truncate text-[11px] text-[#30343b]", children: tab.title }), _jsx("span", { className: "mt-1 block truncate font-mono text-[10px] text-[#687381]", children: tab.url })] }, tab.targetId))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u53EF\u8C03\u8BD5\u7684\u6D4F\u89C8\u5668\u9875\u9762\u3002" })), _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "tabs" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "read" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "click" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "screenshot" })] })] }));
993
- })()) : panel.id === "mcp-client-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(data?.server ?? "尚未连接 MCP 服务器") }), _jsxs("div", { className: "flex shrink-0 items-center gap-2 font-mono text-[10px] text-[#3565c5]", children: [_jsxs("span", { children: [value(Array.isArray(data?.tools) ? data.tools.length : 0), " \u5DE5\u5177"] }), _jsx("span", { className: "text-[#687381]", children: "\u00B7" }), _jsxs("span", { children: [value(Array.isArray(data?.resources) ? data.resources.length : 0), " \u8D44\u6E90"] }), _jsx("span", { className: "text-[#687381]", children: "\u00B7" }), _jsxs("span", { children: [value(Array.isArray(data?.prompts) ? data.prompts.length : 0), " \u63D0\u793A"] })] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: data?.lastCall === null || data?.lastCall === undefined ? "使用 mcp_list_tools 发现 stdio 工具。" : `最近调用:${value(data.lastCall)}` })] }), Array.isArray(data?.tools) && data.tools.length > 0 ? (_jsx("div", { className: "flex flex-wrap gap-2", children: data.tools.slice(0, 12).map((tool, index) => {
994
- const item = typeof tool === "object" && tool !== null ? tool : {};
995
- return (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: value(item.name ?? "tool") }, `${value(item.name ?? "tool")}-${index}`));
996
- }) })) : null, Array.isArray(data?.resources) && data.resources.length > 0 ? (_jsxs("div", { className: "grid gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-[#687381]", children: "\u8D44\u6E90" }), _jsx("div", { className: "flex flex-wrap gap-2", children: data.resources.slice(0, 8).map((resource, index) => {
997
- const item = typeof resource === "object" && resource !== null ? resource : {};
998
- return (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#65707b]", children: value(item.name ?? item.uri ?? "resource") }, `${value(item.uri ?? "resource")}-${index}`));
999
- }) })] })) : null, Array.isArray(data?.prompts) && data.prompts.length > 0 ? (_jsxs("div", { className: "grid gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-[#687381]", children: "\u63D0\u793A\u6A21\u677F" }), _jsx("div", { className: "flex flex-wrap gap-2", children: data.prompts.slice(0, 8).map((prompt, index) => {
1000
- const item = typeof prompt === "object" && prompt !== null ? prompt : {};
1001
- return (_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#65707b]", children: value(item.name ?? "prompt") }, `${value(item.name ?? "prompt")}-${index}`));
1002
- }) })] })) : null, Array.isArray(data?.servers) && data.servers.length > 0 ? (_jsx("div", { className: "grid gap-2", children: data.servers.map((server, index) => {
1003
- const item = typeof server === "object" && server !== null ? server : {};
1004
- return (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-white px-3 py-2 text-[10px]", children: [_jsx("span", { className: "font-mono text-[#30343b]", children: value(item.id ?? "server") }), _jsx("span", { className: "text-[#14733f]", children: value(item.status ?? "unknown") })] }, `${value(item.id ?? "server")}-${index}`));
1005
- }) })) : null] })) : panel.id === "mcp-panel" ? ((() => {
1212
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: view.endpoint || "本地浏览器未连接" }), _jsx("span", { className: `rounded-full px-2 py-1 text-[10px] font-semibold ${view.connected ? "bg-[#e8f8ee] text-[#14733f]" : "bg-[#fff4e5] text-[#8a5a00]"}`, children: view.connected ? "已连接" : "未连接" })] }), _jsxs("p", { className: "mt-2 text-[11px] text-[#687381]", children: ["Chrome DevTools Protocol \u00B7 \u663E\u793A ", view.inventory.shown, "/", view.inventory.total, " \u4E2A\u53EF\u8C03\u8BD5\u9875\u9762"] }), !view.connected ? _jsxs("p", { className: "mt-2 text-[11px] text-[#b42318]", children: ["\u8BF7\u4F7F\u7528 remote-debugging-port \u542F\u52A8 Chrome\u3002", view.error ?? ""] }) : null] }), latestAction ? (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-2 text-[11px]", children: [_jsx("span", { className: "text-[#65707b]", children: "\u6700\u8FD1\u52A8\u4F5C" }), _jsx("strong", { className: "font-mono text-[#315fb8]", children: latestAction })] })) : null, latest?.text !== undefined ? (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-3", children: [_jsx("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap break-words text-[10px] leading-4 text-[#4c5663]", children: latest.text }), latest.previewTruncated ? _jsx("p", { className: "mt-2 text-[10px] text-[#8a5a00]", children: "\u9762\u677F\u6B63\u6587\u9884\u89C8\u5DF2\u622A\u65AD\u3002" }) : null] })) : null, latest?.screenshot !== undefined ? (_jsxs("div", { className: "rounded-lg border border-[#dce5f5] bg-[#f6f8ff] px-3 py-2 text-[10px] text-[#315fb8]", children: ["\u622A\u56FE\u5143\u6570\u636E\uFF1A", latest.screenshot.mimeType, " \u00B7 ", latest.screenshot.bytes.toLocaleString(), " bytes"] })) : null, tabs.length > 0 ? (_jsx("div", { className: "grid gap-2", children: tabs.map((tab) => (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-2", children: [_jsx("strong", { className: "block truncate text-[11px] text-[#30343b]", children: tab.title }), _jsx("span", { className: "mt-1 block truncate font-mono text-[10px] text-[#687381]", children: tab.url })] }, tab.targetId))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u6CA1\u6709\u53EF\u8C03\u8BD5\u7684\u6D4F\u89C8\u5668\u9875\u9762\u3002" })), _jsxs("div", { className: "flex flex-wrap gap-2 text-[10px] text-[#687381]", children: [_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "tabs" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "read" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "click" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[#3565c5]", children: "screenshot" })] })] }));
1213
+ })()) : panel.id === "mcp-client-panel" ? ((() => {
1214
+ const view = mcpClientPanelView(data);
1215
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(view.server ?? "尚未连接 MCP 服务器") }), _jsxs("div", { className: "flex shrink-0 items-center gap-2 font-mono text-[10px] text-[#3565c5]", children: [_jsxs("span", { children: [view.inventory.tools.total, " \u5DE5\u5177"] }), _jsx("span", { className: "text-[#687381]", children: "\u00B7" }), _jsxs("span", { children: [view.inventory.resources.total, " \u8D44\u6E90"] }), _jsx("span", { className: "text-[#687381]", children: "\u00B7" }), _jsxs("span", { children: [view.inventory.prompts.total, " \u63D0\u793A"] })] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: view.lastCall === null ? "使用 mcp_list_tools 发现 stdio 工具。" : `最近调用:${view.lastCall}` })] }), view.tools.length > 0 ? (_jsx("div", { className: "flex flex-wrap gap-2", children: view.tools.map((tool, index) => (_jsx("span", { className: "max-w-full truncate rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", title: tool.description, children: tool.name }, `${tool.name}-${index}`))) })) : null, view.resources.length > 0 ? (_jsxs("div", { className: "grid gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-[#687381]", children: "\u8D44\u6E90" }), _jsx("div", { className: "flex flex-wrap gap-2", children: view.resources.map((resource, index) => (_jsx("span", { className: "max-w-full truncate rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#65707b]", title: resource.uri, children: resource.name ?? resource.uri }, `${resource.uri}-${index}`))) })] })) : null, view.prompts.length > 0 ? (_jsxs("div", { className: "grid gap-2", children: [_jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-[#687381]", children: "\u63D0\u793A\u6A21\u677F" }), _jsx("div", { className: "flex flex-wrap gap-2", children: view.prompts.map((prompt, index) => (_jsx("span", { className: "max-w-full truncate rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#65707b]", title: prompt.description, children: prompt.name }, `${prompt.name}-${index}`))) })] })) : null, view.servers.length > 0 ? (_jsx("div", { className: "grid gap-2", children: view.servers.map((server, index) => (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-white px-3 py-2 text-[10px]", children: [_jsx("span", { className: "truncate font-mono text-[#30343b]", children: server.id }), _jsx("span", { className: server.status === "running" ? "text-[#14733f]" : "text-[#687381]", children: server.status })] }, `${server.id}-${index}`))) })) : null, view.inventory.tools.truncated || view.inventory.resources.truncated || view.inventory.prompts.truncated || view.inventory.servers.truncated ? (_jsx("p", { className: "text-[10px] text-[#687381]", children: "\u9762\u677F\u4EC5\u663E\u793A\u53D7\u9650\u9884\u89C8\uFF1B\u5B8C\u6574\u6E05\u5355\u8BF7\u4F7F\u7528\u5BF9\u5E94 MCP \u5217\u8868\u5DE5\u5177\u3002" })) : null, _jsxs("p", { className: "font-mono text-[9px] text-[#8a94a1]", children: ["\u54CD\u5E94\u4E0A\u9650 ", Math.round(view.limits.responseBytes / 1024), " KiB \u00B7 \u8BF7\u6C42\u8D85\u65F6 ", Math.round(view.limits.requestTimeoutMs / 1000), " \u79D2"] })] }));
1216
+ })()) : panel.id === "mcp-panel" ? ((() => {
1006
1217
  const servers = Array.isArray(data?.servers) ? data.servers : [];
1007
1218
  return (_jsxs("div", { className: "mt-3 grid gap-3", children: [servers.length > 0 ? (_jsx("ul", { className: "grid gap-2", children: servers.map((entry, index) => {
1008
1219
  const server = entry !== null && typeof entry === "object" ? entry : {};
1009
1220
  const healthy = server.status === "running";
1010
1221
  return (_jsxs("li", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("strong", { className: "min-w-0 flex-1 truncate font-mono text-[11px] text-[#30343b]", children: value(server.id, "未命名服务器") }), _jsx("span", { className: `rounded px-1.5 py-0.5 text-[9px] ${healthy ? "bg-[#eaf8f0] text-[#14733f]" : "bg-[#fff5f5] text-[#b42318]"}`, children: value(server.status, "unknown") })] }), _jsxs("div", { className: "mt-1 flex items-center gap-2 text-[10px] text-[#687381]", children: [_jsxs("span", { children: [value(server.toolCount, "0"), " \u4E2A\u6865\u63A5\u5DE5\u5177"] }), _jsx("span", { children: "\u00B7" }), _jsx("span", { children: value(server.statusSource, "runtime") })] })] }, `${value(server.id ?? "server")}-${index}`));
1011
1222
  }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5F53\u524D\u6CA1\u6709 MCP \u670D\u52A1\u5668\u5FEB\u7167\u3002" })), _jsxs("div", { className: "text-[10px] text-[#687381]", children: ["\u53EA\u8BFB\u8BFB\u53D6\u5B98\u65B9 MCP bridge \u72B6\u6001\uFF1B\u5065\u5EB7\u5EFA\u8BAE\u901A\u8FC7 mcp_panel \u7684 health \u64CD\u4F5C\u67E5\u770B\u3002", data?.writesEnabled === true ? ` 已启用 profile patch 写入:${value(data.patchPath)}` : " profile patch 写入未配置,apply 会被拒绝。"] })] }));
1012
- })()) : panel.id === "mock-server-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.running === true ? "运行中" : "未启动" }), _jsxs("strong", { className: "font-mono text-[11px] text-[#3565c5]", children: [value(data?.routes ?? 0), " \u8DEF\u7531"] })] }), data?.url ? _jsx("code", { className: "rounded-md bg-white px-3 py-2 text-[10px] text-[#65707b]", children: value(data.url) }) : null, data?.lastRequest ? _jsxs("p", { className: "text-[11px] text-[#687381]", children: ["\u6700\u8FD1\u8BF7\u6C42\uFF1A", value(data.lastRequest)] }) : null] })) : panel.id === "cli-notifier-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.enabled === true ? "已启用" : "已停用" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: value(data?.platform ?? "unknown") })] }), Array.isArray(data?.notifications) && data.notifications.length > 0 ? (_jsx("div", { className: "grid gap-2", children: data.notifications.slice(0, 5).map((notification, index) => {
1223
+ })()) : panel.id === "mock-server-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.running === true ? "运行中" : "未启动" }), _jsxs("strong", { className: "font-mono text-[11px] text-[#3565c5]", children: [value(data?.routes ?? 0), " \u8DEF\u7531"] })] }), data?.url ? _jsx("code", { className: "rounded-md bg-white px-3 py-2 text-[10px] text-[#65707b]", children: value(data.url) }) : null, data?.lastRequest ? _jsxs("p", { className: "text-[11px] text-[#687381]", children: ["\u6700\u8FD1\u8BF7\u6C42\uFF1A", value(data.lastRequest)] }) : null] })) : panel.id === "cli-notifier-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.enabled === true ? "已启用" : "已停用" }), _jsxs("span", { className: "font-mono text-[10px] text-[#687381]", children: [value(data?.platform ?? "unknown"), " \u00B7 ", value(data?.timeoutMs ?? 10_000), "ms"] })] }), Array.isArray(data?.notifications) && data.notifications.length > 0 ? (_jsx("div", { className: "grid gap-2", children: data.notifications.slice(0, 5).map((notification, index) => {
1013
1224
  const item = typeof notification === "object" && notification !== null ? notification : {};
1014
- return (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-2 text-[10px]", children: [_jsx("strong", { className: "block text-[#30343b]", children: value(item.title ?? "Pi Harness") }), _jsx("span", { className: "mt-1 block text-[#65707b]", children: value(item.message, "") })] }, `${value(item.time ?? "notification")}-${index}`));
1225
+ return (_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-2 text-[10px]", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("strong", { className: "text-[#30343b]", children: value(item.title ?? "Pi Harness") }), _jsx("span", { className: item.delivered === true ? "text-[#14733f]" : "text-[#b42318]", children: item.delivered === true ? "已送达" : "未送达" })] }), _jsx("span", { className: "mt-1 block text-[#65707b]", children: value(item.message, "") }), item.delivered !== true && item.reason ? _jsx("span", { className: "mt-1 block break-words text-[#b42318]", children: value(item.reason) }) : null] }, `${value(item.time ?? "notification")}-${index}`));
1015
1226
  }) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u53D1\u9001\u901A\u77E5\u3002" }))] })) : panel.id === "obsidian-sync-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "font-mono text-[11px] text-[#30343b]", children: data?.configured === true ? "已配置" : "未配置 vault" }), _jsx("span", { className: "font-mono text-[10px] text-[#687381]", children: "Markdown" })] }), data?.vaultPath ? _jsx("code", { className: "truncate rounded-md bg-white px-3 py-2 text-[10px] text-[#65707b]", children: value(data.vaultPath) }) : null, data?.last !== null && data?.last !== undefined && typeof data.last === "object" ? (_jsxs("p", { className: "text-[11px] text-[#687381]", children: ["\u6700\u8FD1\u5199\u5165\uFF1A", value(data.last.relativePath ?? "note.md")] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u540C\u6B65\u7B14\u8BB0\u3002" }))] })) : panel.id === "web-research-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3 text-[11px]", children: [_jsx("span", { className: "text-[#315fb8]", children: data?.keyless === true ? "Firecrawl 匿名模式" : "Firecrawl 已认证" }), _jsxs("strong", { className: "font-mono text-[#315fb8]", children: ["\u6700\u591A ", value(data?.maxResults ?? 8), " \u6761"] })] }), data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
1016
1227
  const report = data.latest;
1017
1228
  const items = Array.isArray(report.items) ? report.items : [];
@@ -1019,35 +1230,68 @@ function PluginPanelCard({ panel, inline = false }) {
1019
1230
  const item = entry !== null && typeof entry === "object" ? entry : {};
1020
1231
  return (_jsxs("a", { className: "rounded-lg border border-[#e3e7ee] bg-white px-3 py-2 transition-colors hover:border-[#bdd0f5] hover:bg-[#fbfdff]", href: value(item.url, ""), rel: "noreferrer", target: "_blank", children: [_jsx("strong", { className: "block truncate text-[11px] text-[#30343b]", children: value(item.title ?? item.url ?? "来源") }), _jsx("span", { className: "mt-1 block truncate font-mono text-[10px] text-[#3565c5]", children: value(item.source ?? item.url, "") }), item.snippet ? _jsx("span", { className: "mt-1 line-clamp-2 block text-[10px] leading-4 text-[#65707b]", children: value(item.snippet) }) : null] }, `${value(item.url ?? "source")}-${index}`));
1021
1232
  }) })] }));
1022
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u8054\u7F51\u641C\u7D22\u3002\u53EF\u8BA9 Agent \u8C03\u7528 web_search\uFF1B\u5355\u9875\u8BFB\u53D6\u4F7F\u7528 read_page\u3002" })), _jsxs("p", { className: "text-[10px] text-[#687381]", children: ["\u641C\u7D22\u8BCD\u4F1A\u53D1\u9001\u5230 Firecrawl\uFF1B\u9875\u9762\u8BFB\u53D6", data?.readPageAvailable === true ? "已复用本地 Browser Fetch" : "需要启用 Browser Fetch", "\u3002"] })] })) : panel.id === "browser-fetch-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [data?.latest !== null && data?.latest !== undefined && typeof data.latest === "object" ? ((() => {
1023
- const result = data.latest;
1024
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between gap-3 rounded-lg bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(result.finalUrl ?? result.url ?? "page") }), _jsxs("strong", { className: "font-mono text-[12px] text-[#14733f]", children: ["HTTP ", value(result.status ?? "—")] })] }), _jsx("pre", { className: "max-h-48 overflow-auto rounded-lg border border-[#edf0f3] bg-[#fbfcfd] p-3 text-[10px] leading-4 text-[#65707b]", children: value(result.text, "") })] }));
1025
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6293\u53D6\u7F51\u9875\u3002\u9ED8\u8BA4\u963B\u6B62\u672C\u5730\u548C\u79C1\u6709\u7F51\u7EDC\u76EE\u6807\u3002" })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: "max:512KiB" }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: "scripts:disabled" }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: ["private:", value(data?.allowPrivate === true ? "allowed" : "blocked")] })] })] })) : panel.id === "i18n-pair-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: data?.report !== null && data?.report !== undefined && typeof data.report === "object" ? ((() => {
1026
- const report = data.report;
1027
- const missing = Array.isArray(report.missing) ? report.missing : [];
1028
- const extra = Array.isArray(report.extra) ? report.extra : [];
1029
- const healthy = missing.length === 0 && extra.length === 0;
1030
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${healthy ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" : "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"}`, children: healthy ? "语言包键完全一致。" : `缺失 ${missing.length} 个,额外 ${extra.length} 个。` }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u57FA\u51C6\u952E" }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: value(report.baseKeys ?? 0) })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u76EE\u6807\u952E" }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: value(report.targetKeys ?? 0) })] })] })] }));
1031
- })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u68C0\u67E5\u8BED\u8A00\u5305\u3002\u53EF\u8BA9 Agent \u8C03\u7528 i18n_check\u3002" })) })) : panel.id === "cleaner-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u5FEB\u7167\u6E05\u7406" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#3565c5]", children: [value(Array.isArray(data?.capsules) ? data.capsules.length : 0), " \u4E2A"] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u4EC5\u6E05\u7406 agent \u6570\u636E\u76EE\u5F55\u4E2D\u7684 .patch \u5FEB\u7167\uFF0C\u5FC5\u987B\u663E\u5F0F confirm=true\u3002" })] }), _jsxs("div", { className: "flex items-center justify-between text-[11px] text-[#687381]", children: [_jsx("span", { children: "\u4E0A\u6B21\u6E05\u7406" }), _jsxs("strong", { className: "font-mono text-[#3565c5]", children: [value(data?.lastRemoved ?? 0), " \u4E2A"] })] })] })) : panel.id === "fail-logger-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between rounded-lg bg-[#fff5f5] px-3 py-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#7f1d1d]", children: "\u53BB\u91CD\u540E\u7684\u5931\u8D25\u8BB0\u5F55" }), _jsx("strong", { className: "font-mono text-[17px] text-[#b42318]", children: value(data?.total ?? 0) })] }), _jsx("div", { className: "max-h-48 overflow-auto rounded-lg border border-[#edf0f3]", children: Array.isArray(data?.failures) && data.failures.length > 0 ? (data.failures.map((item, index) => {
1032
- const failure = item !== null && typeof item === "object" ? item : {};
1033
- return (_jsxs("div", { className: "grid grid-cols-[auto_1fr] gap-2 border-b border-[#edf0f3] px-3 py-2 last:border-b-0", children: [_jsx("span", { className: "font-mono text-[10px] text-[#b42318]", children: value(failure.source ?? "runtime") }), _jsx("span", { className: "break-words text-[11px] leading-4 text-[#65707b]", children: value(failure.message ?? "未知错误") })] }, `${value(failure.time ?? "failure")}-${index}`));
1034
- })) : (_jsx("div", { className: "px-3 py-4 text-[12px] text-[#687381]", children: "\u6682\u65E0\u5931\u8D25\u8BB0\u5F55\u3002" })) })] })) : panel.id === "context-insight-panel" ? (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "font-mono text-[10px] uppercase tracking-[0.08em] text-[#5d6d82]", children: "\u4E0A\u4E0B\u6587\u5360\u7528" }), _jsx("strong", { className: "text-[13px] font-semibold text-[#315fb8]", children: data?.percent === null || data?.percent === undefined ? "—" : `${value(data.percent)}%` })] }), _jsx("div", { className: "mt-2 h-2 overflow-hidden rounded-full bg-[#dfe8fb]", children: _jsx("div", { className: "h-full rounded-full bg-[#5d8bea] transition-[width] duration-300", style: { width: `${Math.max(0, Math.min(100, typeof data?.percent === "number" ? data.percent : 0))}%` } }) }), _jsxs("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: [data?.tokens === null || data?.tokens === undefined ? "令牌数未知" : `${value(data.tokens)} tokens`, data?.contextWindow === null || data?.contextWindow === undefined ? "" : ` / ${value(data.contextWindow)} 上限`] })] }), _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
1035
- ["消息", data?.messages ?? 0],
1036
- ["事件", data?.events ?? 0],
1037
- ["压缩", data?.compactions ?? 0],
1038
- ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6D88\u606F\u7EC4\u6210" }), _jsx("span", { className: "text-[10px] text-[#687381]", children: "\u6309\u89D2\u8272\u7EDF\u8BA1" })] }), _jsx("div", { className: "mt-2 grid grid-cols-5 gap-1.5", children: [
1039
- ["用户", data?.composition?.user ?? 0],
1040
- ["助手", data?.composition?.assistant ?? 0],
1041
- ["工具", data?.composition?.toolResult ?? 0],
1042
- ["系统", data?.composition?.system ?? 0],
1043
- ["其他", data?.composition?.other ?? 0],
1044
- ].map(([label, item]) => (_jsxs("div", { className: "rounded bg-[#f6f8fa] px-2 py-1.5 text-center", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-0.5 block font-mono text-[13px] text-[#30343b]", children: value(item) })] }, value(label)))) })] }), _jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6700\u8FD1\u4E0A\u4E0B\u6587\u4E8B\u4EF6" }), _jsx("span", { className: "text-[10px] text-[#687381]", children: "\u6700\u591A\u4FDD\u7559 50 \u6761" })] }), _jsx("div", { className: "mt-2 max-h-28 overflow-auto", children: Array.isArray(data?.recentEvents) && data.recentEvents.length > 0 ? (data.recentEvents
1045
- .slice(-6)
1046
- .reverse()
1047
- .map((item, index) => {
1048
- const event = item !== null && typeof item === "object" ? item : {};
1049
- return (_jsxs("div", { className: "flex items-center justify-between border-b border-[#f0f2f5] py-1.5 last:border-b-0", children: [_jsx("span", { className: "font-mono text-[10px] text-[#5d6d82]", children: value(event.type, "unknown") }), _jsx("span", { className: "text-[10px] text-[#687381]", children: typeof event.at === "number" ? new Date(event.at).toLocaleTimeString() : "—" })] }, `${value(event.type)}-${value(event.at)}-${index}`));
1050
- })) : (_jsx("div", { className: "py-2 text-[11px] text-[#687381]", children: "\u6682\u65E0\u4E0A\u4E0B\u6587\u4E8B\u4EF6\u3002" })) })] })] })) : (_jsx("div", { className: "mt-3 grid gap-2", children: entries.map(([key, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block font-mono text-[10px] uppercase tracking-[0.08em] text-[#687381]", children: key }), _jsx("pre", { className: "mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-words text-[12px] leading-5 text-[#30343b]", children: pluginPanelValue(item) })] }, key))) }))] }));
1233
+ })()) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u8054\u7F51\u641C\u7D22\u3002\u53EF\u8BA9 Agent \u8C03\u7528 web_search\uFF1B\u5355\u9875\u8BFB\u53D6\u4F7F\u7528 read_page\u3002" })), _jsxs("p", { className: "text-[10px] text-[#687381]", children: ["\u641C\u7D22\u8BCD\u4F1A\u53D1\u9001\u5230 Firecrawl\uFF1B\u9875\u9762\u8BFB\u53D6", data?.readPageAvailable === true ? "已复用本地 Browser Fetch" : "需要启用 Browser Fetch", "\u3002"] })] })) : panel.id === "browser-fetch-panel" ? ((() => {
1234
+ const view = browserFetchPanelView(data);
1235
+ if (view.malformed) {
1236
+ return (_jsxs("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] text-[#b42318]", children: [_jsx("strong", { className: "block text-[12px]", children: "Browser Fetch \u9762\u677F\u6570\u636E\u5F02\u5E38" }), _jsx("span", { className: "mt-1 block", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u540E\u518D\u6293\u53D6\u3002" })] }));
1237
+ }
1238
+ const result = view.latest;
1239
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [result === null ? (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u6293\u53D6\u7F51\u9875\u3002\u9ED8\u8BA4\u963B\u6B62\u672C\u5730\u548C\u79C1\u6709\u7F51\u7EDC\u76EE\u6807\u3002" })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between gap-3 rounded-lg bg-[#f6f8fa] px-3 py-3", children: [_jsx("span", { className: "truncate font-mono text-[11px] text-[#30343b]", children: value(result.finalUrl || result.url || "page") }), _jsxs("strong", { className: "font-mono text-[12px] text-[#14733f]", children: ["HTTP ", value(result.status || "—")] })] }), _jsx("pre", { className: "max-h-48 overflow-auto rounded-lg border border-[#edf0f3] bg-[#fbfcfd] p-3 text-[10px] leading-4 text-[#65707b]", children: value(result.text, "") }), result.previewTruncated || result.truncated ? (_jsxs("p", { className: "text-[10px] text-[#9a6700]", children: [result.truncated ? "响应正文已达到抓取上限;" : "", result.previewTruncated ? "面板仅显示有界预览。" : ""] })) : null] })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: ["max:", value(Math.round(view.limits.responseBytes / 1024)), "KiB"] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: ["timeout:", value(view.limits.timeoutMs), "ms"] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: ["redirects:", value(view.limits.redirects)] }), _jsx("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: "scripts:disabled" }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1 font-mono text-[10px] text-[#3565c5]", children: ["private:", value(view.allowPrivate ? "allowed" : "blocked")] })] })] }));
1240
+ })()) : panel.id === "i18n-pair-panel" ? ((() => {
1241
+ const view = i18nPairPanelView(data);
1242
+ const report = view.report;
1243
+ const healthy = report !== null && report.missingTotal === 0 && report.extraTotal === 0;
1244
+ const statusLabel = view.status.state === "unknown"
1245
+ ? "数据异常"
1246
+ : view.status.state === "running"
1247
+ ? "检查中"
1248
+ : view.status.state === "failed"
1249
+ ? "检查失败"
1250
+ : view.status.state === "cancelled"
1251
+ ? "已取消"
1252
+ : view.status.state === "completed"
1253
+ ? "已完成"
1254
+ : "等待检查";
1255
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-[10px] text-[#687381]", children: [_jsx("span", { className: "rounded-full border border-[#dce5f5] bg-[#f6f8fa] px-2 py-1 font-semibold text-[#3565c5]", children: statusLabel }), view.status.at !== null ? _jsx("time", { className: "font-mono", children: new Date(view.status.at).toLocaleString() }) : null] }), view.status.error !== null ? (_jsx("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[10px] leading-4 text-[#b42318]", children: view.status.error })) : null, view.malformed ? (_jsx("div", { className: "rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-2 text-[10px] leading-4 text-[#b42318]", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u672A\u663E\u793A\u8BED\u8A00\u5305\u7EDF\u8BA1\u3002" })) : null, report !== null ? (_jsxs(_Fragment, { children: [_jsx("div", { className: `rounded-lg border px-3 py-3 text-[11px] ${healthy ? "border-[#b9e6c9] bg-[#f0fbf4] text-[#14733f]" : "border-[#f4caca] bg-[#fff5f5] text-[#b42318]"}`, children: healthy ? "语言包键完全一致。" : `缺失 ${report.missingTotal} 个,额外 ${report.extraTotal} 个。` }), _jsxs("div", { className: "grid gap-2 rounded-lg border border-[#edf0f3] bg-[#fbfcfd] px-3 py-3 font-mono text-[10px]", children: [_jsxs("div", { className: "grid grid-cols-[3rem_minmax(0,1fr)] gap-2", children: [_jsx("span", { className: "text-[#687381]", children: "\u57FA\u51C6" }), _jsx("span", { className: "truncate text-[#30343b]", title: report.base, children: report.base })] }), _jsxs("div", { className: "grid grid-cols-[3rem_minmax(0,1fr)] gap-2", children: [_jsx("span", { className: "text-[#687381]", children: "\u76EE\u6807" }), _jsx("span", { className: "truncate text-[#30343b]", title: report.target, children: report.target })] })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u57FA\u51C6\u952E" }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: report.baseKeys })] }), _jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: "\u76EE\u6807\u952E" }), _jsx("strong", { className: "mt-1 block text-[17px] text-[#30343b]", children: report.targetKeys })] })] }), report.missing.length > 0 || report.extra.length > 0 ? (_jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: [
1256
+ { label: `缺失 · ${report.missingTotal}`, keys: report.missing, tone: "text-[#b42318]" },
1257
+ { label: `额外 · ${report.extraTotal}`, keys: report.extra, tone: "text-[#9a6700]" },
1258
+ ].map((group) => (_jsxs("div", { className: "min-w-0 rounded-lg border border-[#edf0f3] bg-[#fbfcfd] p-3", children: [_jsx("strong", { className: `text-[10px] ${group.tone}`, children: group.label }), _jsx("ul", { className: "mt-2 max-h-36 space-y-1 overflow-auto font-mono text-[10px] text-[#30343b]", children: group.keys.map((key, index) => (_jsx("li", { className: "truncate", title: key, children: key }, `${key}-${index}`))) })] }, group.label))) })) : null, report.truncated ? _jsx("p", { className: "text-[10px] text-[#9a6700]", children: "\u9762\u677F\u4EC5\u663E\u793A\u6709\u754C\u952E\u5217\u8868\uFF1B\u5B8C\u6574\u7ED3\u679C\u4FDD\u7559\u5728\u5DE5\u5177\u8C03\u7528\u8BE6\u60C5\u4E2D\u3002" }) : null] })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u8FD8\u6CA1\u6709\u68C0\u67E5\u8BED\u8A00\u5305\u3002\u53EF\u8BA9 Agent \u8C03\u7528 i18n_check\u3002" })), _jsxs("div", { className: "flex flex-wrap gap-2 font-mono text-[10px] text-[#3565c5]", children: [_jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["file:", Math.round(view.limits.fileBytes / 1_048_576), "MiB"] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["depth:", view.limits.depth] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["keys:", view.limits.keysPerFile] })] })] }));
1259
+ })()) : panel.id === "cleaner-panel" ? ((() => {
1260
+ const view = cleanerPanelView(data);
1261
+ if (view.malformed || view.inventory === null) {
1262
+ return (_jsxs("div", { className: "mt-3 rounded-lg border border-[#f4caca] bg-[#fff5f5] px-3 py-3 text-[11px] text-[#b42318]", children: [_jsx("strong", { className: "block text-[12px]", children: "Cleaner \u9762\u677F\u6570\u636E\u5F02\u5E38" }), _jsx("span", { className: "mt-1 block", children: "\u9762\u677F\u6570\u636E\u4E0D\u5B8C\u6574\u6216\u4E0D\u53EF\u4FE1\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u540E\u518D\u6267\u884C\u6E05\u7406\u3002" })] }));
1263
+ }
1264
+ const inventory = view.inventory;
1265
+ const activity = view.lastCleanup;
1266
+ const statusLabel = activity?.status === "running"
1267
+ ? "清理中"
1268
+ : activity?.status === "completed"
1269
+ ? "已完成"
1270
+ : activity?.status === "cancelled"
1271
+ ? "已取消"
1272
+ : activity?.status === "failed"
1273
+ ? "清理失败"
1274
+ : "尚未清理";
1275
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "Git \u80F6\u56CA\u5E93\u5B58" }), _jsxs("strong", { className: "font-mono text-[12px] text-[#3565c5]", children: [inventory.total, " \u4E2A"] })] }), _jsx("p", { className: "mt-2 text-[11px] text-[#687381]", children: "\u4EC5\u6E05\u7406 agent \u6570\u636E\u76EE\u5F55\u4E2D\u7684 .patch \u80F6\u56CA\uFF0C\u5FC5\u987B\u663E\u5F0F confirm=true\u3002" }), _jsxs("div", { className: "mt-3 flex flex-wrap gap-2 font-mono text-[10px] text-[#3565c5]", children: [_jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["capsules:", view.limits.capsules] }), _jsxs("span", { className: "rounded-md border border-[#dce5f5] bg-white px-2 py-1", children: ["scan:", view.limits.directoryEntries] })] })] }), activity !== null ? (_jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-[#fbfcfd] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-[10px]", children: [_jsx("strong", { className: activity.status === "failed" ? "text-[#b42318]" : "text-[#30343b]", children: statusLabel }), activity.at !== null ? _jsx("time", { className: "font-mono text-[#687381]", children: new Date(activity.at).toLocaleString() }) : null] }), _jsxs("div", { className: "mt-2 flex gap-4 text-[11px] text-[#687381]", children: [_jsxs("span", { children: ["\u5DF2\u5220 ", _jsx("strong", { className: "font-mono text-[#30343b]", children: activity.removed })] }), _jsxs("span", { children: ["\u4FDD\u7559 ", _jsx("strong", { className: "font-mono text-[#30343b]", children: activity.kept ?? "—" })] }), _jsxs("span", { children: ["\u8BF7\u6C42\u4FDD\u7559 ", _jsx("strong", { className: "font-mono text-[#30343b]", children: activity.requestedKeep })] })] }), activity.error !== null ? _jsx("p", { className: "mt-2 break-words text-[10px] leading-4 text-[#b42318]", children: activity.error }) : null] })) : null, view.capsules.length > 0 ? (_jsx("div", { className: "max-h-48 overflow-auto rounded-lg border border-[#edf0f3] bg-[#fbfcfd]", children: view.capsules.map((capsule, index) => (_jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-[#edf0f3] px-3 py-2 last:border-b-0", children: [_jsx("span", { className: "truncate font-mono text-[10px] text-[#30343b]", title: capsule.name, children: capsule.name }), _jsxs("span", { className: "shrink-0 font-mono text-[9px] text-[#687381]", children: [capsule.bytes.toLocaleString(), " B"] })] }, `${capsule.name}-${index}`))) })) : (_jsx("div", { className: "rounded-lg border border-[#e3e7ee] bg-[#f6f8fa] px-3 py-3 text-[11px] text-[#687381]", children: "\u5F53\u524D\u6CA1\u6709\u53EF\u6E05\u7406\u7684 Git \u80F6\u56CA\u3002" })), inventory.truncated ? (_jsxs("p", { className: "text-[10px] text-[#9a6700]", children: ["\u9762\u677F\u663E\u793A ", inventory.shown, " / ", inventory.total, " \u4E2A\u6761\u76EE\uFF1B\u6E05\u7406\u5DE5\u5177\u4ECD\u6309\u5B8C\u6574\u7684\u6709\u754C\u5E93\u5B58\u6267\u884C\u3002"] })) : null] }));
1276
+ })()) : panel.id === "fail-logger-panel" ? (_jsx("div", { className: "mt-3 grid gap-3", children: (() => {
1277
+ const view = failLoggerPanelView(data);
1278
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "rounded-lg bg-[#fff5f5] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#7f1d1d]", children: "\u805A\u5408\u540E\u7684\u5931\u8D25\u8BB0\u5F55" }), _jsx("strong", { className: "font-mono text-[17px] text-[#b42318]", children: view.total })] }), _jsxs("div", { className: "mt-2 flex flex-wrap gap-3 text-[10px] text-[#8b4a4a]", children: [_jsxs("span", { children: ["\u89C2\u6D4B ", view.observed, " \u6B21"] }), _jsxs("span", { children: ["\u5BB9\u91CF ", view.total, " / ", view.capacity] }), view.dropped > 0 ? _jsxs("span", { children: ["\u5DF2\u6DD8\u6C70 ", view.dropped, " \u6761\u65E7\u8BB0\u5F55"] }) : null, view.truncated ? _jsx("span", { children: "\u9762\u677F\u660E\u7EC6\u5DF2\u622A\u65AD" }) : null] })] }), _jsx("div", { className: "max-h-56 overflow-auto rounded-lg border border-[#edf0f3]", children: view.failures.length > 0 ? (view.failures.map((failure, index) => (_jsxs("div", { className: "border-b border-[#edf0f3] px-3 py-2 last:border-b-0", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "font-mono text-[10px] text-[#b42318]", children: failure.source }), _jsxs("span", { className: "flex shrink-0 items-center gap-2 font-mono text-[9px] text-[#8a94a0]", children: [failure.occurrences > 1 ? _jsxs("strong", { className: "text-[#b42318]", children: ["\u00D7", failure.occurrences] }) : null, failure.time === null ? "时间未知" : `${failure.time.slice(11, 19)} UTC`] })] }), _jsx("p", { className: "mt-1 break-words text-[11px] leading-4 text-[#65707b]", children: failure.message })] }, `${failure.time ?? "failure"}-${index}`)))) : (_jsx("div", { className: "px-3 py-4 text-[12px] text-[#687381]", children: "\u6682\u65E0\u5931\u8D25\u8BB0\u5F55\u3002" })) })] }));
1279
+ })() })) : panel.id === "context-insight-panel" ? ((() => {
1280
+ const view = contextInsightsPanelView(data);
1281
+ return (_jsxs("div", { className: "mt-3 grid gap-3", children: [_jsxs("div", { className: "rounded-lg border border-[#e3eaf8] bg-[#f6f8ff] px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "font-mono text-[10px] uppercase tracking-[0.08em] text-[#5d6d82]", children: "\u4E0A\u4E0B\u6587\u5360\u7528" }), _jsx("strong", { className: "text-[13px] font-semibold text-[#315fb8]", children: view.percent === null ? "—" : `${view.percent}%` })] }), _jsx("div", { className: "mt-2 h-2 overflow-hidden rounded-full bg-[#dfe8fb]", children: _jsx("div", { className: "h-full rounded-full bg-[#5d8bea] transition-[width] duration-300", style: { width: `${Math.min(100, view.percent ?? 0)}%` } }) }), _jsxs("p", { className: "mt-2 text-[11px] text-[#5d6d82]", children: [view.tokens === null ? "令牌数未知" : `${view.tokens.toLocaleString()} tokens`, view.contextWindow === null ? "" : ` / ${view.contextWindow.toLocaleString()} 上限`] })] }), _jsx("div", { className: "grid grid-cols-3 gap-2", children: [
1282
+ ["消息", view.messages],
1283
+ ["事件", view.events],
1284
+ ["压缩", view.compactions],
1285
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-1 block text-[17px] font-semibold text-[#30343b]", children: value(item) })] }, value(label)))) }), _jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6D88\u606F\u7EC4\u6210" }), _jsx("span", { className: "text-[10px] text-[#687381]", children: view.messagesTruncated ? `最近 ${view.scannedMessages} / ${view.messages} 条` : `全部 ${view.scannedMessages} 条` })] }), _jsx("div", { className: "mt-2 grid grid-cols-5 gap-1.5", children: [
1286
+ ["用户", view.composition.user],
1287
+ ["助手", view.composition.assistant],
1288
+ ["工具", view.composition.toolResult],
1289
+ ["系统", view.composition.system],
1290
+ ["其他", view.composition.other],
1291
+ ].map(([label, item]) => (_jsxs("div", { className: "rounded bg-[#f6f8fa] px-2 py-1.5 text-center", children: [_jsx("span", { className: "block text-[10px] text-[#687381]", children: value(label) }), _jsx("strong", { className: "mt-0.5 block font-mono text-[13px] text-[#30343b]", children: value(item) })] }, value(label)))) })] }), _jsxs("div", { className: "rounded-lg border border-[#edf0f3] bg-white px-3 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[11px] font-semibold text-[#30343b]", children: "\u6700\u8FD1\u4E0A\u4E0B\u6587\u4E8B\u4EF6" }), _jsxs("span", { className: "text-[10px] text-[#687381]", children: ["\u663E\u793A ", view.limits.displayedEvents, " / \u4FDD\u7559 ", view.limits.retainedEvents, " \u6761"] })] }), _jsx("div", { className: "mt-2 max-h-28 overflow-auto", children: view.recentEvents.length > 0 ? (view.recentEvents.map((event, index) => {
1292
+ return (_jsxs("div", { className: "flex items-center justify-between border-b border-[#f0f2f5] py-1.5 last:border-b-0", children: [_jsx("span", { className: "font-mono text-[10px] text-[#5d6d82]", children: event.type }), _jsx("span", { className: "text-[10px] text-[#687381]", children: event.at === null ? "—" : new Date(event.at).toLocaleTimeString() })] }, `${event.type}-${event.at ?? "unknown"}-${index}`));
1293
+ })) : (_jsx("div", { className: "py-2 text-[11px] text-[#687381]", children: "\u6682\u65E0\u4E0A\u4E0B\u6587\u4E8B\u4EF6\u3002" })) }), view.recentEventsTruncated ? _jsx("p", { className: "mt-2 text-[10px] text-[#687381]", children: "\u66F4\u65E9\u4E8B\u4EF6\u5DF2\u6309\u6D4F\u89C8\u5668\u663E\u793A\u4E0A\u9650\u7701\u7565\u3002" }) : null] })] }));
1294
+ })()) : (_jsx("div", { className: "mt-3 grid gap-2", children: entries.map(([key, item]) => (_jsxs("div", { className: "rounded-lg bg-[#f6f8fa] px-3 py-2", children: [_jsx("span", { className: "block font-mono text-[10px] uppercase tracking-[0.08em] text-[#687381]", children: key }), _jsx("pre", { className: "mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-words text-[12px] leading-5 text-[#30343b]", children: pluginPanelValue(item) })] }, key))) }))] }));
1051
1295
  }
1052
1296
  function PluginUninstallDialog({ pluginName, busy, error, onCancel, onConfirm, }) {
1053
1297
  const dialogRef = useModalFocus(true, onCancel, busy);