@lesliechan721/aw 0.1.0-beta.84 → 0.1.0-beta.86

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 (339) hide show
  1. package/dist/authoring/assets/command-runtime-config.d.mts +9 -0
  2. package/dist/authoring/assets/command-runtime-config.mjs +106 -0
  3. package/dist/authoring/assets/command-runtime-config.mjs.map +1 -0
  4. package/dist/authoring/scripts/validate-plugin.mjs +17 -22
  5. package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
  6. package/dist/index.js +2 -6
  7. package/dist/index.js.map +1 -1
  8. package/dist/scripts/aw-skill-eval-materializer.d.ts +4 -0
  9. package/dist/scripts/aw-skill-eval-materializer.js +27 -0
  10. package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
  11. package/dist/scripts/bundle-plugins.js +1 -1
  12. package/dist/scripts/bundle-plugins.js.map +1 -1
  13. package/dist/scripts/test-plugin-scripts.js +13 -2
  14. package/dist/scripts/test-plugin-scripts.js.map +1 -1
  15. package/dist/src/commands/aw-capabilities.d.ts +1 -1
  16. package/dist/src/commands/aw-capabilities.js +2 -2
  17. package/dist/src/commands/catalog-source.d.ts +2 -1
  18. package/dist/src/commands/catalog-source.js +8 -7
  19. package/dist/src/commands/catalog-source.js.map +1 -1
  20. package/dist/src/commands/deployment-confirmation.d.ts +8 -1
  21. package/dist/src/commands/deployment-confirmation.js +79 -11
  22. package/dist/src/commands/deployment-confirmation.js.map +1 -1
  23. package/dist/src/commands/lifecycle-command-package.d.ts +44 -0
  24. package/dist/src/commands/lifecycle-command-package.js +195 -0
  25. package/dist/src/commands/lifecycle-command-package.js.map +1 -0
  26. package/dist/src/commands/managed-commands.d.ts +6 -0
  27. package/dist/src/commands/managed-commands.js +203 -152
  28. package/dist/src/commands/managed-commands.js.map +1 -1
  29. package/dist/src/commands/operation-plan.d.ts +22 -21
  30. package/dist/src/commands/operation-plan.js +2 -5
  31. package/dist/src/commands/operation-plan.js.map +1 -1
  32. package/dist/src/commands/permission-batch.d.ts +5 -0
  33. package/dist/src/commands/permission-batch.js +80 -0
  34. package/dist/src/commands/permission-batch.js.map +1 -0
  35. package/dist/src/commands/plugin-capabilities.js +17 -13
  36. package/dist/src/commands/plugin-capabilities.js.map +1 -1
  37. package/dist/src/commands/public-config-confirmation.d.ts +8 -2
  38. package/dist/src/commands/public-config-confirmation.js +22 -5
  39. package/dist/src/commands/public-config-confirmation.js.map +1 -1
  40. package/dist/src/commands/public-lifecycle-result.d.ts +7 -12
  41. package/dist/src/commands/public-lifecycle-result.js +136 -40
  42. package/dist/src/commands/public-lifecycle-result.js.map +1 -1
  43. package/dist/src/commands/public-lifecycle.js +49 -8
  44. package/dist/src/commands/public-lifecycle.js.map +1 -1
  45. package/dist/src/commands/public-plugin-query.js +21 -5
  46. package/dist/src/commands/public-plugin-query.js.map +1 -1
  47. package/dist/src/commands/rebuild-command.d.ts +4 -0
  48. package/dist/src/commands/rebuild-command.js +150 -48
  49. package/dist/src/commands/rebuild-command.js.map +1 -1
  50. package/dist/src/commands/rebuild-integration.d.ts +12 -3
  51. package/dist/src/commands/rebuild-integration.js +52 -164
  52. package/dist/src/commands/rebuild-integration.js.map +1 -1
  53. package/dist/src/commands/rebuild-operations.d.ts +2 -1
  54. package/dist/src/commands/rebuild-operations.js +7 -2
  55. package/dist/src/commands/rebuild-operations.js.map +1 -1
  56. package/dist/src/commands/rebuild-platform-integration.d.ts +12 -5
  57. package/dist/src/commands/rebuild-platform-integration.js +691 -186
  58. package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
  59. package/dist/src/commands/skill-eval.js +10 -1
  60. package/dist/src/commands/skill-eval.js.map +1 -1
  61. package/dist/src/generators/local-plugin.js +14 -15
  62. package/dist/src/generators/local-plugin.js.map +1 -1
  63. package/dist/src/generators/permissions.d.ts +18 -4
  64. package/dist/src/generators/permissions.js +76 -22
  65. package/dist/src/generators/permissions.js.map +1 -1
  66. package/dist/src/index.d.ts +1 -0
  67. package/dist/src/index.js +84 -44
  68. package/dist/src/index.js.map +1 -1
  69. package/dist/src/intent/scope-context.d.ts +4 -2
  70. package/dist/src/intent/scope-context.js +37 -7
  71. package/dist/src/intent/scope-context.js.map +1 -1
  72. package/dist/src/output/command-receipt.js +7 -8
  73. package/dist/src/output/command-receipt.js.map +1 -1
  74. package/dist/src/output/component-delivery.d.ts +28 -0
  75. package/dist/src/output/component-delivery.js +138 -0
  76. package/dist/src/output/component-delivery.js.map +1 -0
  77. package/dist/src/output/public-result.d.ts +17 -0
  78. package/dist/src/output/public-result.js +121 -25
  79. package/dist/src/output/public-result.js.map +1 -1
  80. package/dist/src/output/rebuild-progress.js +7 -4
  81. package/dist/src/output/rebuild-progress.js.map +1 -1
  82. package/dist/src/output/receipt-projection.js +51 -31
  83. package/dist/src/output/receipt-projection.js.map +1 -1
  84. package/dist/src/output/skill-invocation-notices.d.ts +2 -0
  85. package/dist/src/output/skill-invocation-notices.js +40 -4
  86. package/dist/src/output/skill-invocation-notices.js.map +1 -1
  87. package/dist/src/platforms/antigravity-permissions.d.ts +50 -0
  88. package/dist/src/platforms/antigravity-permissions.js +388 -0
  89. package/dist/src/platforms/antigravity-permissions.js.map +1 -0
  90. package/dist/src/platforms/capabilities.d.ts +4 -1
  91. package/dist/src/platforms/capabilities.js +93 -9
  92. package/dist/src/platforms/capabilities.js.map +1 -1
  93. package/dist/src/platforms/contracts.d.ts +46 -2
  94. package/dist/src/platforms/discovery.d.ts +13 -0
  95. package/dist/src/platforms/discovery.js +170 -30
  96. package/dist/src/platforms/discovery.js.map +1 -1
  97. package/dist/src/platforms/grok-permission-config.d.ts +22 -0
  98. package/dist/src/platforms/grok-permission-config.js +184 -0
  99. package/dist/src/platforms/grok-permission-config.js.map +1 -0
  100. package/dist/src/platforms/grok-permission-document.d.ts +4 -0
  101. package/dist/src/platforms/grok-permission-document.js +145 -0
  102. package/dist/src/platforms/grok-permission-document.js.map +1 -0
  103. package/dist/src/platforms/grok-permissions.d.ts +17 -0
  104. package/dist/src/platforms/grok-permissions.js +311 -0
  105. package/dist/src/platforms/grok-permissions.js.map +1 -0
  106. package/dist/src/platforms/host-permission-policy.d.ts +38 -0
  107. package/dist/src/platforms/host-permission-policy.js +86 -0
  108. package/dist/src/platforms/host-permission-policy.js.map +1 -0
  109. package/dist/src/platforms/inspection-grok.js +165 -11
  110. package/dist/src/platforms/inspection-grok.js.map +1 -1
  111. package/dist/src/platforms/inspection-native.js +53 -18
  112. package/dist/src/platforms/inspection-native.js.map +1 -1
  113. package/dist/src/platforms/inspection-pi.d.ts +7 -1
  114. package/dist/src/platforms/inspection-pi.js +295 -95
  115. package/dist/src/platforms/inspection-pi.js.map +1 -1
  116. package/dist/src/platforms/inspection-query.d.ts +4 -2
  117. package/dist/src/platforms/inspection-query.js +24 -8
  118. package/dist/src/platforms/inspection-query.js.map +1 -1
  119. package/dist/src/platforms/inspection.d.ts +4 -1
  120. package/dist/src/platforms/inspection.js +36 -4
  121. package/dist/src/platforms/inspection.js.map +1 -1
  122. package/dist/src/platforms/layout.d.ts +13 -0
  123. package/dist/src/platforms/layout.js +90 -12
  124. package/dist/src/platforms/layout.js.map +1 -1
  125. package/dist/src/platforms/lifecycle-native.d.ts +1 -0
  126. package/dist/src/platforms/lifecycle-native.js +25 -1
  127. package/dist/src/platforms/lifecycle-native.js.map +1 -1
  128. package/dist/src/platforms/lifecycle.d.ts +2 -0
  129. package/dist/src/platforms/lifecycle.js +98 -25
  130. package/dist/src/platforms/lifecycle.js.map +1 -1
  131. package/dist/src/platforms/opencode-permission-config.d.ts +13 -0
  132. package/dist/src/platforms/opencode-permission-config.js +253 -0
  133. package/dist/src/platforms/opencode-permission-config.js.map +1 -0
  134. package/dist/src/platforms/opencode-permissions.d.ts +39 -0
  135. package/dist/src/platforms/opencode-permissions.js +212 -0
  136. package/dist/src/platforms/opencode-permissions.js.map +1 -0
  137. package/dist/src/platforms/opencode-related-permissions.d.ts +40 -0
  138. package/dist/src/platforms/opencode-related-permissions.js +177 -0
  139. package/dist/src/platforms/opencode-related-permissions.js.map +1 -0
  140. package/dist/src/platforms/permission-ownership.d.ts +89 -0
  141. package/dist/src/platforms/permission-ownership.js +543 -0
  142. package/dist/src/platforms/permission-ownership.js.map +1 -0
  143. package/dist/src/platforms/permission-sidecar.d.ts +70 -0
  144. package/dist/src/platforms/permission-sidecar.js +215 -0
  145. package/dist/src/platforms/permission-sidecar.js.map +1 -0
  146. package/dist/src/platforms/projection-code-extension.js +2 -1
  147. package/dist/src/platforms/projection-code-extension.js.map +1 -1
  148. package/dist/src/platforms/projection.js +127 -29
  149. package/dist/src/platforms/projection.js.map +1 -1
  150. package/dist/src/platforms/supplement-layout.d.ts +5 -1
  151. package/dist/src/platforms/supplement-layout.js +23 -1
  152. package/dist/src/platforms/supplement-layout.js.map +1 -1
  153. package/dist/src/platforms/supplement-state.d.ts +1 -1
  154. package/dist/src/platforms/supplement-state.js +18 -7
  155. package/dist/src/platforms/supplement-state.js.map +1 -1
  156. package/dist/src/portable/commands.js +1 -1
  157. package/dist/src/portable/commands.js.map +1 -1
  158. package/dist/src/portable/materializer.d.ts +4 -0
  159. package/dist/src/portable/materializer.js +8 -1
  160. package/dist/src/portable/materializer.js.map +1 -1
  161. package/dist/src/portable/recovery.d.ts +2 -0
  162. package/dist/src/portable/recovery.js +45 -8
  163. package/dist/src/portable/recovery.js.map +1 -1
  164. package/dist/src/recovery/coordinator.d.ts +3 -1
  165. package/dist/src/recovery/coordinator.js +101 -37
  166. package/dist/src/recovery/coordinator.js.map +1 -1
  167. package/dist/src/recovery/install-concurrency.js +3 -2
  168. package/dist/src/recovery/install-concurrency.js.map +1 -1
  169. package/dist/src/recovery/joint-coordinator.d.ts +7 -0
  170. package/dist/src/recovery/joint-coordinator.js +270 -64
  171. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  172. package/dist/src/recovery/joint-demand.d.ts +14 -2
  173. package/dist/src/recovery/joint-demand.js +54 -7
  174. package/dist/src/recovery/joint-demand.js.map +1 -1
  175. package/dist/src/recovery/joint-install-execution.js +2 -1
  176. package/dist/src/recovery/joint-install-execution.js.map +1 -1
  177. package/dist/src/recovery/receipt.d.ts +15 -4
  178. package/dist/src/recovery/receipt.js +23 -0
  179. package/dist/src/recovery/receipt.js.map +1 -1
  180. package/dist/src/recovery/retirement.js +11 -17
  181. package/dist/src/recovery/retirement.js.map +1 -1
  182. package/dist/src/recovery/status.d.ts +20 -8
  183. package/dist/src/recovery/status.js +411 -91
  184. package/dist/src/recovery/status.js.map +1 -1
  185. package/dist/src/review/eval-source-input.d.ts +1 -0
  186. package/dist/src/review/eval-source-input.js +7 -1
  187. package/dist/src/review/eval-source-input.js.map +1 -1
  188. package/dist/src/review/platform-profile.js +2 -1
  189. package/dist/src/review/platform-profile.js.map +1 -1
  190. package/dist/src/review/review-selection.js +12 -5
  191. package/dist/src/review/review-selection.js.map +1 -1
  192. package/dist/src/review/skill-materialization.d.ts +2 -1
  193. package/dist/src/review/skill-materialization.js +45 -43
  194. package/dist/src/review/skill-materialization.js.map +1 -1
  195. package/dist/src/review/source-binding.js +5 -1
  196. package/dist/src/review/source-binding.js.map +1 -1
  197. package/dist/src/tui/console-app-v4.js +101 -57
  198. package/dist/src/tui/console-app-v4.js.map +1 -1
  199. package/dist/src/tui/controller-runtime.js +72 -7
  200. package/dist/src/tui/controller-runtime.js.map +1 -1
  201. package/dist/src/tui/controller.d.ts +6 -2
  202. package/dist/src/tui/controller.js +17 -4
  203. package/dist/src/tui/controller.js.map +1 -1
  204. package/dist/src/tui/deployment-view.d.ts +6 -3
  205. package/dist/src/tui/deployment-view.js +52 -10
  206. package/dist/src/tui/deployment-view.js.map +1 -1
  207. package/dist/src/tui/diagnostic-projection.d.ts +7 -1
  208. package/dist/src/tui/diagnostic-projection.js +55 -5
  209. package/dist/src/tui/diagnostic-projection.js.map +1 -1
  210. package/dist/src/tui/entity-cards.d.ts +2 -1
  211. package/dist/src/tui/entity-cards.js +34 -11
  212. package/dist/src/tui/entity-cards.js.map +1 -1
  213. package/dist/src/tui/glossary.js +5 -0
  214. package/dist/src/tui/glossary.js.map +1 -1
  215. package/dist/src/tui/model.js +2 -1
  216. package/dist/src/tui/model.js.map +1 -1
  217. package/dist/src/tui/operation-diagnostic-screens.js +3 -1
  218. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
  219. package/dist/src/tui/operation-history.d.ts +6 -0
  220. package/dist/src/tui/operation-history.js +20 -2
  221. package/dist/src/tui/operation-history.js.map +1 -1
  222. package/dist/src/tui/operation-review-planner.js +130 -70
  223. package/dist/src/tui/operation-review-planner.js.map +1 -1
  224. package/dist/src/tui/plugin-detail.d.ts +4 -1
  225. package/dist/src/tui/plugin-detail.js +9 -2
  226. package/dist/src/tui/plugin-detail.js.map +1 -1
  227. package/dist/src/tui/scoped-flow.js +34 -16
  228. package/dist/src/tui/scoped-flow.js.map +1 -1
  229. package/dist/src/tui/scoped-inventory.d.ts +6 -2
  230. package/dist/src/tui/scoped-inventory.js +29 -7
  231. package/dist/src/tui/scoped-inventory.js.map +1 -1
  232. package/dist/src/types.d.ts +10 -21
  233. package/dist/src/types.js.map +1 -1
  234. package/dist/src/utils/artifact-plan.d.ts +3 -36
  235. package/dist/src/utils/artifact-plan.js +16 -78
  236. package/dist/src/utils/artifact-plan.js.map +1 -1
  237. package/dist/src/utils/artifact-renderer.d.ts +1 -60
  238. package/dist/src/utils/artifact-renderer.js +31 -57
  239. package/dist/src/utils/artifact-renderer.js.map +1 -1
  240. package/dist/src/utils/artifact-request.d.ts +3 -26
  241. package/dist/src/utils/artifact-request.js +13 -36
  242. package/dist/src/utils/artifact-request.js.map +1 -1
  243. package/dist/src/utils/artifact-sources.d.ts +0 -8
  244. package/dist/src/utils/artifact-sources.js +0 -8
  245. package/dist/src/utils/artifact-sources.js.map +1 -1
  246. package/dist/src/utils/bundle-layout.js +2 -7
  247. package/dist/src/utils/bundle-layout.js.map +1 -1
  248. package/dist/src/utils/catalog-source-references.js +22 -3
  249. package/dist/src/utils/catalog-source-references.js.map +1 -1
  250. package/dist/src/utils/codex-native-observation.d.ts +6 -0
  251. package/dist/src/utils/codex-native-observation.js +32 -3
  252. package/dist/src/utils/codex-native-observation.js.map +1 -1
  253. package/dist/src/utils/component-command-preparation.d.ts +8 -11
  254. package/dist/src/utils/component-command-preparation.js +110 -210
  255. package/dist/src/utils/component-command-preparation.js.map +1 -1
  256. package/dist/src/utils/component-gap.d.ts +4 -0
  257. package/dist/src/utils/component-gap.js +20 -0
  258. package/dist/src/utils/component-gap.js.map +1 -0
  259. package/dist/src/utils/component-resources.js +2 -4
  260. package/dist/src/utils/component-resources.js.map +1 -1
  261. package/dist/src/utils/dynamic-skill-tree.js +2 -32
  262. package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
  263. package/dist/src/utils/managed-command-cli-review.d.ts +43 -0
  264. package/dist/src/utils/managed-command-cli-review.js +389 -0
  265. package/dist/src/utils/managed-command-cli-review.js.map +1 -0
  266. package/dist/src/utils/managed-command-closure.d.ts +14 -3
  267. package/dist/src/utils/managed-command-closure.js +144 -23
  268. package/dist/src/utils/managed-command-closure.js.map +1 -1
  269. package/dist/src/utils/managed-command-errors.d.ts +5 -0
  270. package/dist/src/utils/managed-command-errors.js +10 -0
  271. package/dist/src/utils/managed-command-errors.js.map +1 -0
  272. package/dist/src/utils/managed-command-materialization.d.ts +77 -113
  273. package/dist/src/utils/managed-command-materialization.js +324 -323
  274. package/dist/src/utils/managed-command-materialization.js.map +1 -1
  275. package/dist/src/utils/managed-command-preparation.d.ts +28 -65
  276. package/dist/src/utils/managed-command-preparation.js +33 -140
  277. package/dist/src/utils/managed-command-preparation.js.map +1 -1
  278. package/dist/src/utils/managed-command-review.d.ts +11 -4
  279. package/dist/src/utils/managed-command-review.js +33 -21
  280. package/dist/src/utils/managed-command-review.js.map +1 -1
  281. package/dist/src/utils/managed-command-runtime.d.ts +1 -0
  282. package/dist/src/utils/managed-command-runtime.js +6 -3
  283. package/dist/src/utils/managed-command-runtime.js.map +1 -1
  284. package/dist/src/utils/managed-command-snapshots.d.ts +17 -0
  285. package/dist/src/utils/managed-command-snapshots.js +84 -0
  286. package/dist/src/utils/managed-command-snapshots.js.map +1 -0
  287. package/dist/src/utils/managed-command-store.d.ts +65 -78
  288. package/dist/src/utils/managed-command-store.js +446 -383
  289. package/dist/src/utils/managed-command-store.js.map +1 -1
  290. package/dist/src/utils/multi-source-catalog.d.ts +2 -0
  291. package/dist/src/utils/multi-source-catalog.js +3 -1
  292. package/dist/src/utils/multi-source-catalog.js.map +1 -1
  293. package/dist/src/utils/native-cli-interruption.d.ts +8 -0
  294. package/dist/src/utils/native-cli-interruption.js +65 -0
  295. package/dist/src/utils/native-cli-interruption.js.map +1 -0
  296. package/dist/src/utils/native-cli.d.ts +5 -0
  297. package/dist/src/utils/native-cli.js +166 -53
  298. package/dist/src/utils/native-cli.js.map +1 -1
  299. package/dist/src/utils/native-tool-context.d.ts +6 -3
  300. package/dist/src/utils/native-tool-context.js +3 -1
  301. package/dist/src/utils/native-tool-context.js.map +1 -1
  302. package/dist/src/utils/native-tool-review.d.ts +2 -12
  303. package/dist/src/utils/native-tool-review.js +6 -108
  304. package/dist/src/utils/native-tool-review.js.map +1 -1
  305. package/dist/src/utils/ownership.d.ts +8 -0
  306. package/dist/src/utils/ownership.js +17 -3
  307. package/dist/src/utils/ownership.js.map +1 -1
  308. package/dist/src/utils/package-content.d.ts +7 -0
  309. package/dist/src/utils/package-content.js +70 -0
  310. package/dist/src/utils/package-content.js.map +1 -0
  311. package/dist/src/utils/platform-empty-state.d.ts +32 -6
  312. package/dist/src/utils/platform-empty-state.js +146 -75
  313. package/dist/src/utils/platform-empty-state.js.map +1 -1
  314. package/dist/src/utils/plugin-config-command-apply.d.ts +33 -0
  315. package/dist/src/utils/plugin-config-command-apply.js +134 -0
  316. package/dist/src/utils/plugin-config-command-apply.js.map +1 -0
  317. package/dist/src/utils/plugin-config-impact.d.ts +19 -9
  318. package/dist/src/utils/plugin-config-impact.js +56 -37
  319. package/dist/src/utils/plugin-config-impact.js.map +1 -1
  320. package/dist/src/utils/plugin-config-write.d.ts +19 -19
  321. package/dist/src/utils/plugin-config-write.js +196 -770
  322. package/dist/src/utils/plugin-config-write.js.map +1 -1
  323. package/dist/src/utils/plugin-scripts.js +19 -8
  324. package/dist/src/utils/plugin-scripts.js.map +1 -1
  325. package/dist/src/utils/process-tree.d.ts +1 -1
  326. package/dist/src/utils/process-tree.js +1 -1
  327. package/dist/src/utils/process-tree.js.map +1 -1
  328. package/dist/src/utils/rendered-contract.js +12 -6
  329. package/dist/src/utils/rendered-contract.js.map +1 -1
  330. package/dist/src/utils/skill-invocation-warning.d.ts +8 -3
  331. package/dist/src/utils/skill-invocation-warning.js +27 -1
  332. package/dist/src/utils/skill-invocation-warning.js.map +1 -1
  333. package/package.json +4 -3
  334. package/dist/src/platforms/managed-command-placement.d.ts +0 -8
  335. package/dist/src/platforms/managed-command-placement.js +0 -79
  336. package/dist/src/platforms/managed-command-placement.js.map +0 -1
  337. package/dist/src/utils/managed-command-evidence.d.ts +0 -7
  338. package/dist/src/utils/managed-command-evidence.js +0 -10
  339. package/dist/src/utils/managed-command-evidence.js.map +0 -1
@@ -8,7 +8,7 @@ import { Box, Text, useInput, useWindowSize } from 'ink';
8
8
  import { AgentManagement } from './agent-management.js';
9
9
  import { useEffect, useLayoutEffect, useRef, useState } from 'react';
10
10
  import path from 'node:path';
11
- import { getCommandPackageId, resolvePluginConfigObjectProperties, validatePluginConfigValue, } from '@lesliechan721/aw-plugin-core/manifest';
11
+ import { resolvePluginConfigObjectProperties, validatePluginConfigValue, } from '@lesliechan721/aw-plugin-core/manifest';
12
12
  import { CATALOG_BETA_REF, CATALOG_LATEST_REF, OFFICIAL_CATALOG_SOURCE_SSH_URL, OFFICIAL_CATALOG_SOURCE_URL, } from '../constants.js';
13
13
  import { CATALOG_SOURCE_ID_PATTERN } from '../utils/catalog-sources.js';
14
14
  import { canonicalizeCatalogGitUrl } from '../utils/catalog-source-identity.js';
@@ -27,10 +27,11 @@ import { resolveTuiSizePolicy } from './layout.js';
27
27
  import { buildDependencyGraphProjection, buildUnifiedDependencyGraphProjection, } from './dependency-graph.js';
28
28
  import { DependencyGraphView, projectDependencyGraphView } from './dependency-graph-view.js';
29
29
  import { agentLabel, platformLabel, scopeLabel, recoveryReason } from './glossary.js';
30
- import { skillInvocationNotices } from '../output/skill-invocation-notices.js';
30
+ import { skillInvocationNotices, skillInvocationProductLabel } from '../output/skill-invocation-notices.js';
31
+ import { hasComponentDeliveryNotice, isDeliveryNoticeCode, isInstallationAdvisory } from '../output/component-delivery.js';
31
32
  import { describeSkillInvocationControl, SKILL_INVOCATION_NOTICE } from '../utils/skill-invocation-warning.js';
32
- import { deploymentPlanLines, deploymentResultLines, deploymentObservationLines, deploymentExclusionLines, componentGapLines } from './deployment-view.js';
33
- import { inventoryRecoveryActions, projectDeploymentReceipt, projectDeploymentObservation } from '../commands/public-lifecycle-result.js';
33
+ import { deploymentPlanLines, deploymentResultLines, deploymentObservationLines, deploymentExclusionLines, componentDeliveryLines, deliveryNoticeText } from './deployment-view.js';
34
+ import { inventoryRecoveryActions, projectDeploymentNotices, projectDeploymentReceipt, projectDeploymentObservation } from '../commands/public-lifecycle-result.js';
34
35
  import { InputDisplay, removeLastGrapheme } from './input-display.js';
35
36
  import { QueryHeader, querySearchWidth } from './query-header.js';
36
37
  import { Pager, Reader, paginateWrappedRows, readerPage } from './reader.js';
@@ -99,6 +100,9 @@ function scopedRiskReasons(plan) {
99
100
  reasons.push(`本次还会清理 ${dependencyCleanup.length} 个不再需要的依赖位置;请确认所列依赖。`);
100
101
  }
101
102
  const visit = (entry) => {
103
+ for (const withdrawal of entry.portableCommandWithdrawals ?? []) {
104
+ reasons.push(`本次会撤销 ${withdrawal.selector} 的共享命令入口,影响所有项目。`);
105
+ }
102
106
  reasons.push(...entry.nativeGroups.flatMap((group) => (group.preview.codexReconcilePlans ?? []).filter((item) => item.review.requiresConfirmation)
103
107
  .map((item) => item.review.sharedImpact.warning
104
108
  ?? '本次共享原生内容变更可能影响其他使用位置。')));
@@ -145,18 +149,26 @@ function recoveryPluginLabel(id) {
145
149
  }
146
150
  function recoveryTargetLines(receipt, result) {
147
151
  const groups = new Map();
152
+ const advisories = result ? projectDeploymentNotices(receipt.targetResults) : [];
148
153
  let unchanged = 0;
149
154
  for (const target of receipt.targetResults) {
150
155
  let action;
151
156
  if (result) {
152
- action = target.satisfaction === 'unsupported' || target.satisfaction === 'excluded' ? '! 已跳过'
153
- : target.execution === 'applied' || target.execution === 'no-op' ? '✓ 完成'
154
- : target.execution === 'partial' ? '! 部分完成' : target.execution === 'failed' ? '× 执行失败'
155
- : target.blockers.length ? '! 已跳过' : '? 尚未确认';
157
+ const advised = advisories.some(({ code, subject, severity }) => severity === 'warning' && isInstallationAdvisory(code) && subject?.pluginId === target.pluginId
158
+ && subject.target === target.agent && subject.scope === target.scope);
159
+ action = target.execution === 'partial' ? '! 部分完成' : target.execution === 'failed' ? '× 执行失败'
160
+ : target.satisfaction === 'not-applicable' ? '✓ 当前平台无适用组件'
161
+ : target.satisfaction === 'unsupported' || target.satisfaction === 'excluded' ? '! 已跳过'
162
+ : target.execution === 'applied' || target.execution === 'no-op'
163
+ ? (hasComponentDeliveryNotice(target) || advised) && target.content === 'satisfied' ? '✓ 已安装 · 有提示' : '✓ 完成'
164
+ : target.blockers.length ? '! 已跳过' : '? 尚未确认';
156
165
  }
157
166
  else if (target.blockers.length || target.satisfaction === 'excluded' || target.satisfaction === 'unsupported') {
158
167
  action = '! 跳过';
159
168
  }
169
+ else if (target.satisfaction === 'not-applicable') {
170
+ action = '✓ 当前平台无适用组件';
171
+ }
160
172
  else if (receipt.command === 'cleanup' || receipt.command === 'uninstall' || receipt.command === 'retire') {
161
173
  action = '− 移除';
162
174
  }
@@ -169,7 +181,7 @@ function recoveryTargetLines(receipt, result) {
169
181
  }
170
182
  else
171
183
  action = target.content === 'absent' || target.observation === 'missing' ? '+ 新增安装' : '↻ 同步并修复';
172
- const diagnostic = target.blockers[0] ?? target.reasons?.find(({ code }) => code !== SKILL_INVOCATION_NOTICE);
184
+ const diagnostic = target.blockers[0] ?? target.reasons?.find(({ code }) => code !== SKILL_INVOCATION_NOTICE && !isDeliveryNoticeCode(code));
173
185
  const reason = diagnostic ? recoveryReason(diagnostic.code)
174
186
  : target.satisfaction === 'excluded' ? '已关闭此 Agent'
175
187
  : target.satisfaction === 'unsupported' ? '插件不支持此 Agent' : undefined;
@@ -178,10 +190,10 @@ function recoveryTargetLines(receipt, result) {
178
190
  const group = groups.get(key) ?? { label: `→ ${agentLabel(target.agent)}`, targets: [] };
179
191
  group.targets.push(`${label}${reason ? ` · ${reason}` : ''}`);
180
192
  if (result && target.deploymentReceipts)
181
- group.targets.push(...deploymentResultLines(target.deploymentReceipts.map((deployment) => projectDeploymentReceipt(deployment, { receipt, target }))));
193
+ group.targets.push(...deploymentResultLines(target.deploymentReceipts.map((deployment) => projectDeploymentReceipt(deployment, { receipt, target })), false, target.installedComponentIds));
182
194
  else if (result && target.deploymentObservations)
183
195
  group.targets.push(...deploymentObservationLines(target.deploymentObservations.map(projectDeploymentObservation)));
184
- group.targets.push(...deploymentExclusionLines(target.deploymentExclusions ?? []), ...componentGapLines(target.componentGaps ?? []));
196
+ group.targets.push(...deploymentExclusionLines(target.deploymentExclusions ?? []), ...componentDeliveryLines(target));
185
197
  groups.set(key, group);
186
198
  }
187
199
  return [...groups.values()].flatMap((group) => [group.label, ...group.targets])
@@ -213,10 +225,17 @@ function scopedPlanSummary(plan) {
213
225
  lines.push(` ${phase === 'before' ? '变更前' : '变更后'}:${closure?.definitions.map((tool) => tool.key).join(' · ') || '无'}`);
214
226
  for (const consumer of closure?.consumers ?? [])
215
227
  for (const tool of consumer.tools) {
216
- lines.push(` ${consumer.key} 使用 ${tool.key}:${tool.policy === 'required' ? '必须可用' : '优先使用,可回退'}`);
228
+ lines.push(` ${consumer.kind === 'plugin-command' ? '插件命令' : consumer.key} 使用 ${tool.key}:${tool.policy === 'required' ? '必须可用' : '优先使用,可回退'}`);
217
229
  }
218
230
  }
219
231
  }
232
+ if (plan.kind === 'recovery')
233
+ lines.push(...scopedCommandPlanText(plan));
234
+ else if (plan.kind === 'retire')
235
+ for (const action of plan.plan.operationPlan?.actions ?? []) {
236
+ if (action.kind === 'retainManagedCommandPackage')
237
+ lines.push(`保留命令包 ${action.selector} · 所有项目共用`, ...action.recoveryActions);
238
+ }
220
239
  if (plan.kind === 'recovery') {
221
240
  const scripts = new Set();
222
241
  const visit = (entry) => {
@@ -236,10 +255,10 @@ function scopedPlanSummary(plan) {
236
255
  return [...new Set(lines)].join('\n');
237
256
  }
238
257
  const skillInvocationExplanations = {
239
- noBoundExecutor: '通用输出没有绑定执行客户端,无法保证',
240
- invocationControlUnsupported: '该客户端不支持',
241
- invocationControlUnverified: '尚未验证该客户端能否保证',
242
- app: '尚未验证 Codex 桌面 App 能否保证',
258
+ noBoundExecutor: () => '通用输出没有绑定执行客户端,无法保证',
259
+ invocationControlUnsupported: (reader) => `${reader ?? '该客户端'}不支持`,
260
+ invocationControlUnverified: (reader) => `尚未验证${reader ? ` ${reader} ` : '该客户端'}能否保证`,
261
+ invocationControlDegraded: (reader) => `观察到${reader ? ` ${reader}` : '该客户端'}未执行`,
243
262
  };
244
263
  function skillInvocationControlLabel({ feature, values }) {
245
264
  if (feature === 'skill.invocation.manual' || feature === 'skill.invocation.model') {
@@ -252,20 +271,35 @@ function skillInvocationResultLines(diagnostics, technical = false) {
252
271
  return skillInvocationNotices(diagnostics).flatMap(({ skill, pluginId, platform, scope, reasonCode, controls, message }) => {
253
272
  const position = `! ${pluginId} · ${agentLabel(platform)} · ${scopeLabel(scope)} · ${skill} 已安装。`;
254
273
  if (!controls.length) {
255
- return [`${position}${skillInvocationExplanations[reasonCode]}声明的调用限制。`, ` ${sanitizeDiagnosticDetailText(message)}`,
274
+ return [`${position}${skillInvocationExplanations[reasonCode]()}声明的调用限制。`, ` ${sanitizeDiagnosticDetailText(message)}`,
256
275
  ...(technical ? [` ${SKILL_INVOCATION_NOTICE} · ${reasonCode}`] : [])];
257
276
  }
258
- const explanations = Object.entries(skillInvocationExplanations).flatMap(([reason, explanation]) => {
259
- const affected = controls.filter((control) => (control.product ?? control.reasonCode) === reason).map(skillInvocationControlLabel);
260
- return affected.length ? [`${explanation}「${affected.join('、')}」。`] : [];
261
- });
277
+ const groups = new Map();
278
+ for (const control of controls) {
279
+ const reader = control.product ? platform === 'codex' ? 'Codex 桌面 App'
280
+ : skillInvocationProductLabel(platform, control.product) : undefined;
281
+ const explanation = skillInvocationExplanations[control.reasonCode](reader);
282
+ groups.set(explanation, [...(groups.get(explanation) ?? []), skillInvocationControlLabel(control)]);
283
+ }
284
+ const explanations = [...groups].map(([explanation, affected]) => `${explanation}「${affected.join('、')}」。`);
262
285
  return [`${position}${explanations.join('')}`,
263
- ...(technical ? [` ${SKILL_INVOCATION_NOTICE} · ${reasonCode}`, ...controls.map((control) => ` ${describeSkillInvocationControl(control)} · ${control.reasonCode}${control.product ? ' · Codex 桌面 App' : ''}`)] : [])];
286
+ ...(technical ? [` ${SKILL_INVOCATION_NOTICE} · ${reasonCode}`, ...controls.map((control) => ` ${describeSkillInvocationControl(control)} · ${control.reasonCode}${control.product
287
+ ? ` · ${platform === 'codex' ? 'Codex 桌面 App' : skillInvocationProductLabel(platform, control.product)}` : ''}`)] : [])];
288
+ });
289
+ }
290
+ function deliveryAdvisoryLines(diagnostics, technical = false) {
291
+ return diagnostics.filter(({ code }) => isDeliveryNoticeCode(code)).flatMap(({ code, subject, detail, severity, message }) => {
292
+ const position = [subject?.pluginId, subject?.target ? agentLabel(subject.target) : undefined,
293
+ subject?.scope ? scopeLabel(subject.scope) : undefined].filter(Boolean).join(' · ');
294
+ return [`${severity === 'error' ? '×' : '!'} ${position} · ${deliveryNoticeText(code, detail, subject?.field, message)}`,
295
+ ...(technical ? [` ${code}${detail?.reasonCode ? ` · ${detail.reasonCode}` : ''}${detail?.path ? ` · ${detail.path}` : ''}`] : [])];
264
296
  });
265
297
  }
266
298
  function scopedResultSummary(receipt) {
299
+ const notices = projectDeploymentNotices(receipt.targetResults);
267
300
  return [receipt.coverage?.scopes.length === 2 ? '所有项目 + 当前项目' : scopeLabel(receipt.scope),
268
- ...skillInvocationResultLines(receipt.targetResults.flatMap(({ reasons }) => reasons ?? [])),
301
+ ...skillInvocationResultLines(notices),
302
+ ...deliveryAdvisoryLines(notices),
269
303
  ...recoveryTargetLines(receipt, true),
270
304
  ...(receipt.unconfirmedSavedState === 'intent' ? ['插件清单写入后的内容需要重新检查。']
271
305
  : receipt.declarationChanged ? ['插件清单已保存。'] : []),
@@ -299,6 +333,7 @@ function scopedPlanText(plan, technical = false) {
299
333
  ...receipt.errors.map((entry) => [`${entry.code}:${entry.message}`, `全局错误:${entry.code} · ${entry.message}`]),
300
334
  ...receipt.blockers.map((entry) => [`${entry.code}:${entry.message}`, `全局受阻:${entry.code} · ${entry.message}`]),
301
335
  ]).values()];
336
+ const commandReview = plan.kind === 'recovery' ? managedCommandRecoveryPlanChanges(plan.plan) : [];
302
337
  return [
303
338
  `范围:${plan.scope === 'user' ? '个人(所有项目)' : '当前项目'}`,
304
339
  `完整请求:${receipt.requestedRoots.join('、') || '无'}`,
@@ -314,10 +349,11 @@ function scopedPlanText(plan, technical = false) {
314
349
  ? `受阻:${target.blockers.map((blocker) => blocker.code).join('、')}` : target.observation}`),
315
350
  ...diagnostics,
316
351
  ...receipt.targetResults.flatMap((target) => target.reasons?.map((reason) => `${reason.code} · ${reason.message}`) ?? []),
317
- ...plan.plan.changes.map((change) => `影响:${change}`),
352
+ ...plan.plan.changes.filter((line) => !commandReview.some(({ title, description }) => line === title || line === description))
353
+ .map((change) => `影响:${change}`),
318
354
  ...plan.plan.warnings.map((warning) => `注意:${warning}`),
319
355
  ...deploymentPlanLines(scopedDeploymentPlans(plan), true),
320
- ...(plan.kind === 'recovery' ? scopedCommandPlanText(plan) : []),
356
+ ...commandReview.map(({ title, description }) => `${title}${description ? `:${description}` : ''}`),
321
357
  ...(plan.kind === 'retire' ? [`配置删除选项:${plan.plan.options.deleteConfig
322
358
  ? impact.config ? '已选择' : '已选择;当前没有可删除配置' : '关闭(默认)'}`] : []),
323
359
  ].join('\n');
@@ -333,10 +369,9 @@ function scopedResultText(receipt, technical = false) {
333
369
  ...recoverySummaryErrors(receipt).map((entry) => [`${entry.code}:${entry.message}`, `全局错误:${entry.code} · ${entry.message}`]),
334
370
  ...receipt.blockers.map((entry) => [`${entry.code}:${entry.message}`, `全局受阻:${entry.code} · ${entry.message}`]),
335
371
  ]).values()];
336
- const nativeRecovery = inventoryRecoveryActions(receipt.targetResults.filter((target) => !target.deploymentReceipts?.length)
337
- .flatMap((target) => [...target.blockers, ...(target.reasons ?? [])])
338
- .filter((entry) => entry.subject?.field === 'nativeSource' || entry.subject?.field === 'workspace'
339
- || entry.subject?.field === 'nativeConfigRoot'), receipt);
372
+ const nativeRecovery = inventoryRecoveryActions(receipt.targetResults.flatMap((target) => [...target.blockers, ...(target.reasons ?? [])].filter((entry) => entry.code === 'permissionRelatedProjectUpdateIncomplete'
373
+ || !target.deploymentReceipts?.length && ['nativeSource', 'workspace', 'nativeConfigRoot'].includes(entry.subject?.field ?? ''))), receipt);
374
+ const notices = projectDeploymentNotices(receipt.targetResults);
340
375
  return [
341
376
  `范围:${receipt.scope === 'user' ? '个人(所有项目)' : '当前项目'}`,
342
377
  `完整请求:${receipt.requestedRoots.join('、') || '无'}`,
@@ -345,28 +380,35 @@ function scopedResultText(receipt, technical = false) {
345
380
  `配置变更:${receipt.configChanged ? '是' : '无'}`,
346
381
  `输出可能改变:${receipt.outputsMayHaveChanged ? '是' : '否'}`,
347
382
  ...diagnostics,
348
- ...skillInvocationResultLines(receipt.targetResults.flatMap(({ reasons }) => reasons ?? []), true),
349
- ...receipt.targetResults.flatMap((target) => (target.reasons ?? []).filter(({ code }) => code !== SKILL_INVOCATION_NOTICE)
383
+ ...skillInvocationResultLines(notices, true),
384
+ ...deliveryAdvisoryLines(notices, true),
385
+ ...receipt.targetResults.flatMap((target) => (target.reasons ?? []).filter(({ code }) => code !== SKILL_INVOCATION_NOTICE && !isDeliveryNoticeCode(code))
350
386
  .map((reason) => `${reason.code} · ${reason.message}`)),
351
387
  ...(isRecoveryReviewStaleBeforeExecution(receipt) ? ['本次未执行,需要重新准备。'] : []),
352
388
  ...receipt.targetResults.map((target) => `${target.pluginId} · ${agentLabel(target.agent)} [${target.scope === 'user' ? '个人' : '当前项目'}] · ${target.delivery?.kind === 'native' ? '原生' : target.delivery?.kind === 'agent-skills' ? 'Skills' : '无交付'} · ${target.execution} · ${target.observation}${target.blockers.length ? ` · 受阻 ${target.blockers.map((blocker) => blocker.code).join('、')}` : ''}`),
353
- ...receipt.targetResults.flatMap((target) => target.deploymentReceipts ? deploymentResultLines(target.deploymentReceipts.map((deployment) => projectDeploymentReceipt(deployment, { receipt, target })), true)
389
+ ...receipt.targetResults.flatMap((target) => [
390
+ ...(target.satisfaction === 'not-applicable' ? [`${target.pluginId} · ${agentLabel(target.agent)} · ${scopeLabel(target.scope)} · 当前平台无适用组件`] : []),
391
+ ...componentDeliveryLines(target),
392
+ ]),
393
+ ...receipt.targetResults.flatMap((target) => target.deploymentReceipts ? deploymentResultLines(target.deploymentReceipts.map((deployment) => projectDeploymentReceipt(deployment, { receipt, target })), true, target.installedComponentIds)
354
394
  : target.deploymentObservations ? deploymentObservationLines(target.deploymentObservations.map(projectDeploymentObservation), true) : []),
355
395
  ...receipt.targetResults.flatMap((target) => target.recoveryActions?.map((action) => `${target.pluginId} · ${target.agent}:${action}`) ?? []),
356
396
  ...nativeRecovery.flatMap((action) => action.kind === 'manual' ? [action.message] : []),
357
- ...(receipt.commandResults ?? []).flatMap((result) => [
358
- `命令${result.producer.kind === 'package' ? '包' : '生产者'} ${result.producer.key} · ${result.producer.sourceId}/${result.producer.pluginName} · ${scopeLabel(result.producer.scope)}${result.producer.platform ? ` · ${platformLabel(result.producer.platform)}` : ''} · ${result.state}`,
359
- ...(result.recoveryActions.some((action) => action.startsWith('aw command package remove '))
360
- ? [result.producer.scope === 'user' ? '保留命令包:所有项目共用' : '保留命令包:当前项目内共用'] : []),
361
- ...result.commandIds.map((id) => `命令:${id}`),
362
- ...result.removedCommandIds.map((id) => `撤销命令:${id}`),
363
- ...result.errors.map((error) => `命令错误:${error.code} · ${error.message}`),
364
- ...result.recoveryActions.map((action) => `命令恢复:${action}`),
365
- ]),
397
+ ...(receipt.commandResults ?? []).flatMap((result) => commandPackageResultLines(result, receipt.command === 'cleanup' || receipt.command === 'uninstall')),
366
398
  ...receipt.remainingTargets.map((target) => `未完成:${target.pluginId} · ${target.agent} · ${scopeLabel(target.scope)}`),
367
399
  ...receipt.recoveryActions.map((action) => `恢复:${action}`),
368
400
  ].join('\n');
369
401
  }
402
+ function commandPackageResultLines(result, removal) {
403
+ return [
404
+ `命令包 ${result.selector} · ${result.action} · ${result.availability} · ${result.state}`,
405
+ ...(removal && result.action === 'unchanged' ? [`保留命令包 ${result.packageId} · 所有项目共用`] : []),
406
+ ...result.subcommands.map((name) => `aw command run ${result.selector} -- ${name}`),
407
+ ...(result.hasFallback ? [`通用入口 · aw command run ${result.selector} --`] : []),
408
+ ...result.errors.map(({ code, message }) => `${code} · ${message}`),
409
+ ...result.recoveryActions,
410
+ ];
411
+ }
370
412
  const PLUGIN_FILTERS = [
371
413
  'all', 'installed', 'uninstalled', 'updateAvailable', 'attention', 'project', 'user',
372
414
  ];
@@ -9180,7 +9222,10 @@ export function ConsoleAppV4(props) {
9180
9222
  const resultStatus = blocked ? 'error' : partial ? 'warning' : 'success';
9181
9223
  const resultTargets = configOperation ? resultSummary?.configTargets ?? resultSummary?.targets ?? []
9182
9224
  : resultSummary?.targets ?? [];
9183
- const configInvocationLines = skillInvocationResultLines(resultSummary?.configDiagnostics ?? [], showTechnical);
9225
+ const configDiagnostics = resultSummary?.configDiagnostics ?? [];
9226
+ const permissionRecovery = inventoryRecoveryActions(configDiagnostics.filter(({ code }) => code === 'permissionRelatedProjectUpdateIncomplete')).flatMap((action) => action.kind === 'manual' ? [action.message] : []);
9227
+ const configInvocationLines = [...permissionRecovery, ...skillInvocationResultLines(configDiagnostics, showTechnical),
9228
+ ...deliveryAdvisoryLines(configDiagnostics, showTechnical)];
9184
9229
  const configInvocationRows = configInvocationLines.flatMap((line) => wrapDisplayText(line, size.columns - 6))
9185
9230
  .map((line, index) => _jsx(Text, { color: tuiTheme.statusColors.warning, children: line }, `config-skill:${index}`));
9186
9231
  const configGroupRows = resultSummary?.configGroups?.map((group) => {
@@ -9194,24 +9239,30 @@ export function ConsoleAppV4(props) {
9194
9239
  return _jsx(ResultRow, { title: configLayerLabel({ profile: group.platform ?? 'common' }), description: group.errorCode, meta: outcome, status: status, compact: true }, `config:${group.platform ?? 'common'}`);
9195
9240
  }) ?? [];
9196
9241
  const commandResults = resultSummary?.commandResults ?? [];
9197
- const retainedCommandPackage = (result) => result.producer.kind === 'package' && (resultSummary?.action === 'cleanup' || resultSummary?.action === 'uninstall');
9198
- const commandResultRows = commandResults.map((result, index) => _jsx(ResultRow, { title: `${retainedCommandPackage(result) ? '保留' : ''}命令${result.producer.kind === 'package' ? '包' : '生产者'} ${result.producer.key}`, description: `${result.producer.sourceId}/${result.producer.pluginName} · ${scopeLabel(result.producer.scope)} · ${retainedCommandPackage(result) ? result.producer.scope === 'user' ? '所有项目共用 · ' : '当前项目内共用 · ' : ''}${result.commandIds.length} 个命令${result.removedCommandIds.length ? ` · 撤销 ${result.removedCommandIds.length} 个` : ''}${result.errors[0] ? ` · ${result.errors[0].code}` : ''}`, meta: retainedCommandPackage(result) ? '保留' : result.state === 'completed' ? '完成' : result.state === 'partial' ? '部分完成' : '失败', status: result.state === 'completed' ? 'success' : result.state === 'partial' ? 'warning' : 'error', compact: policy.mode === 'compact' }, `command:${index}`));
9242
+ const isRemoval = resultSummary?.action === 'cleanup' || resultSummary?.action === 'uninstall';
9243
+ const retainedCommandPackage = (result) => result.action === 'unchanged' && isRemoval;
9244
+ const commandResultRows = commandResults.map((result, index) => _jsx(ResultRow, { title: `${retainedCommandPackage(result) ? '保留' : ''}命令包 ${result.selector}`, description: `${result.action} · ${result.availability} · ${result.subcommands.length} 个子命令${result.hasFallback ? ' · 含通用入口' : ''}${retainedCommandPackage(result) ? ' · 所有项目共用' : ''}${result.errors[0] ? ` · ${result.errors[0].code}` : ''}`, meta: retainedCommandPackage(result) ? '保留' : result.state === 'completed' ? '完成' : result.state === 'partial' ? '部分完成' : '失败', status: result.state === 'completed' ? 'success' : result.state === 'partial' ? 'warning' : 'error', compact: policy.mode === 'compact' }, `command:${index}`));
9199
9245
  const hasPreservedTarget = resultTargets.some((target) => target.state === 'completed' || target.state === 'kept');
9200
9246
  const prioritizedTargets = [...resultTargets].sort((left, right) => {
9201
9247
  const priority = (target) => target.state === 'failed' ? 0
9202
9248
  : target.state === 'skipped' ? 1 : target.relation === 'requested' ? 2 : 3;
9203
9249
  return priority(left) - priority(right);
9204
9250
  });
9205
- const targetResultRows = prioritizedTargets.map((target) => {
9206
- const state = target.partialDelivery
9207
- ? { label: '部分完成', status: 'warning' }
9208
- : operationTargetStateLabel(target.state);
9251
+ const targetResultRows = prioritizedTargets.flatMap((target) => {
9252
+ const advisory = configDiagnostics.some(({ code, subject, severity }) => severity === 'warning' && isInstallationAdvisory(code)
9253
+ && subject?.pluginId === target.pluginId && subject?.target === target.platform && subject?.scope === target.scope);
9254
+ const state = target.partialDelivery ? { label: '部分完成', status: 'warning' }
9255
+ : target.state !== 'failed' && !target.errorCode && target.satisfaction === 'not-applicable' ? { label: '当前平台无适用组件', status: 'success' }
9256
+ : (target.state === 'completed' || target.state === 'kept') && (advisory || hasComponentDeliveryNotice(target))
9257
+ ? { label: '已安装 · 有提示', status: 'success' } : operationTargetStateLabel(target.state);
9209
9258
  const relation = target.relation === 'requested' ? '你选择的插件'
9210
9259
  : target.relation === 'direct' ? '直接依赖' : target.relation === 'transitive' ? '间接依赖' : undefined;
9211
9260
  const targetDescription = configOperation
9212
9261
  ? [agentLabel(target.platform), scopeLabel(target.scope), target.errorCode].filter(Boolean).join(' · ')
9213
9262
  : relation;
9214
- return _jsx(ResultRow, { title: resultTargetName(target), description: targetDescription, meta: state.label, status: state.status ?? 'muted', compact: policy.mode === 'compact' }, `${target.pluginId ?? ''}:${target.platform}:${target.scope}`);
9263
+ const key = `${target.pluginId ?? ''}:${target.platform}:${target.scope}`;
9264
+ return [_jsx(ResultRow, { title: resultTargetName(target), description: targetDescription, meta: state.label, status: state.status ?? 'muted', compact: policy.mode === 'compact' }, key), ...componentDeliveryLines(target).flatMap((line) => wrapDisplayText(line, size.columns - 6))
9265
+ .map((line, index) => _jsx(Text, { color: tuiTheme.statusColors.muted, children: line }, `${key}:component:${index}`))];
9215
9266
  });
9216
9267
  const generalResultRows = [...configInvocationRows, ...configGroupRows, ...targetResultRows, ...commandResultRows];
9217
9268
  const baseResultPaginationTotal = Math.max(generalResultRows.length, taskSummary?.rootResults.reduce((count, root) => count + 1 + (taskSummary.requestedTargets.filter((target) => target.pluginId === root.pluginId).length), 0) ?? 0, (resultSummary?.batch?.rootResults.length ?? 0) + resultTargets.length);
@@ -9293,14 +9344,7 @@ export function ConsoleAppV4(props) {
9293
9344
  ...(resultSummary?.warnings ?? []),
9294
9345
  ...(resultSummary?.recoveryActions ?? []),
9295
9346
  ...prioritizedTargets.map((target) => `${resultTargetName(target)} · ${agentLabel(target.platform)} · ${scopeLabel(target.scope)} · ${target.partialDelivery ? '部分完成' : operationTargetStateLabel(target.state).label}`),
9296
- ...commandResults.flatMap((result) => [
9297
- `命令生产者 ${result.producer.key} · ${scopeLabel(result.producer.scope)} · ${result.state}`,
9298
- ...(retainedCommandPackage(result) ? [`保留命令包 ${getCommandPackageId(result.producer)} · ${result.producer.scope === 'user' ? '所有项目共用' : '当前项目内共用'}`] : []),
9299
- ...result.commandIds.map((id) => `命令 ${id}`),
9300
- ...result.removedCommandIds.map((id) => `已撤销命令 ${id}`),
9301
- ...result.errors.map((error) => `${error.code}: ${error.message}`),
9302
- ...result.recoveryActions,
9303
- ]),
9347
+ ...commandResults.flatMap((result) => commandPackageResultLines(result, isRemoval)),
9304
9348
  ...prioritizedPortablePairs.map((pair) => `${pair.skill} · ${pair.agent ?? 'Agent 未确认'} · ${portablePairStateLabel(pair)}`),
9305
9349
  ...(taskSummary?.rootResults ?? []).map((root) => `${root.pluginId} · ${root.state}`),
9306
9350
  ...(resultSummary?.batch?.rootResults ?? []).map((root) => `${root.pluginId} · ${root.state}`),