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

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 (190) hide show
  1. package/dist/authoring/assets/aw-runtime-config.mjs +1 -1
  2. package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -1
  3. package/dist/src/commands/console.js +1 -0
  4. package/dist/src/commands/console.js.map +1 -1
  5. package/dist/src/commands/intent-command.d.ts +1 -0
  6. package/dist/src/commands/intent-command.js +6 -2
  7. package/dist/src/commands/intent-command.js.map +1 -1
  8. package/dist/src/commands/plugin-capabilities.js +3 -3
  9. package/dist/src/commands/plugin-capabilities.js.map +1 -1
  10. package/dist/src/commands/public-lifecycle-result.d.ts +11 -5
  11. package/dist/src/commands/public-lifecycle-result.js +131 -46
  12. package/dist/src/commands/public-lifecycle-result.js.map +1 -1
  13. package/dist/src/commands/public-lifecycle.d.ts +1 -2
  14. package/dist/src/commands/public-lifecycle.js +56 -34
  15. package/dist/src/commands/public-lifecycle.js.map +1 -1
  16. package/dist/src/commands/public-plugin-query.js +28 -11
  17. package/dist/src/commands/public-plugin-query.js.map +1 -1
  18. package/dist/src/commands/rebuild-command.d.ts +13 -3
  19. package/dist/src/commands/rebuild-command.js +647 -286
  20. package/dist/src/commands/rebuild-command.js.map +1 -1
  21. package/dist/src/commands/rebuild-integration.d.ts +5 -2
  22. package/dist/src/commands/rebuild-integration.js +55 -29
  23. package/dist/src/commands/rebuild-integration.js.map +1 -1
  24. package/dist/src/commands/rebuild-operations.d.ts +1 -0
  25. package/dist/src/commands/rebuild-operations.js +23 -4
  26. package/dist/src/commands/rebuild-operations.js.map +1 -1
  27. package/dist/src/commands/rebuild-platform-integration.d.ts +14 -3
  28. package/dist/src/commands/rebuild-platform-integration.js +240 -137
  29. package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
  30. package/dist/src/index.js +105 -50
  31. package/dist/src/index.js.map +1 -1
  32. package/dist/src/output/public-result.d.ts +2 -0
  33. package/dist/src/output/public-result.js +43 -6
  34. package/dist/src/output/public-result.js.map +1 -1
  35. package/dist/src/output/rebuild-progress.d.ts +3 -0
  36. package/dist/src/output/rebuild-progress.js +12 -2
  37. package/dist/src/output/rebuild-progress.js.map +1 -1
  38. package/dist/src/output/receipt-projection.js +55 -18
  39. package/dist/src/output/receipt-projection.js.map +1 -1
  40. package/dist/src/output/skill-invocation-notices.d.ts +16 -0
  41. package/dist/src/output/skill-invocation-notices.js +48 -0
  42. package/dist/src/output/skill-invocation-notices.js.map +1 -0
  43. package/dist/src/platforms/capabilities.d.ts +2 -0
  44. package/dist/src/platforms/capabilities.js +73 -34
  45. package/dist/src/platforms/capabilities.js.map +1 -1
  46. package/dist/src/platforms/contracts.d.ts +9 -9
  47. package/dist/src/platforms/discovery.d.ts +0 -7
  48. package/dist/src/platforms/discovery.js +13 -53
  49. package/dist/src/platforms/discovery.js.map +1 -1
  50. package/dist/src/platforms/inspection-native.js +1 -80
  51. package/dist/src/platforms/inspection-native.js.map +1 -1
  52. package/dist/src/platforms/inspection-query.d.ts +2 -3
  53. package/dist/src/platforms/inspection-query.js +7 -18
  54. package/dist/src/platforms/inspection-query.js.map +1 -1
  55. package/dist/src/platforms/inspection.js +2 -2
  56. package/dist/src/platforms/inspection.js.map +1 -1
  57. package/dist/src/platforms/layout.js +1 -5
  58. package/dist/src/platforms/layout.js.map +1 -1
  59. package/dist/src/platforms/lifecycle-native-services.d.ts +1 -1
  60. package/dist/src/platforms/lifecycle-native-services.js +14 -14
  61. package/dist/src/platforms/lifecycle-native-services.js.map +1 -1
  62. package/dist/src/platforms/lifecycle-native.js +4 -88
  63. package/dist/src/platforms/lifecycle-native.js.map +1 -1
  64. package/dist/src/platforms/lifecycle.js +56 -56
  65. package/dist/src/platforms/lifecycle.js.map +1 -1
  66. package/dist/src/platforms/projection-code-extension.js +7 -3
  67. package/dist/src/platforms/projection-code-extension.js.map +1 -1
  68. package/dist/src/platforms/projection.d.ts +3 -0
  69. package/dist/src/platforms/projection.js +86 -54
  70. package/dist/src/platforms/projection.js.map +1 -1
  71. package/dist/src/portable/materializer.js +2 -2
  72. package/dist/src/portable/materializer.js.map +1 -1
  73. package/dist/src/portable/recovery.d.ts +29 -3
  74. package/dist/src/portable/recovery.js +220 -78
  75. package/dist/src/portable/recovery.js.map +1 -1
  76. package/dist/src/recovery/coordinator.d.ts +21 -5
  77. package/dist/src/recovery/coordinator.js +383 -151
  78. package/dist/src/recovery/coordinator.js.map +1 -1
  79. package/dist/src/recovery/install-concurrency.d.ts +48 -0
  80. package/dist/src/recovery/install-concurrency.js +195 -0
  81. package/dist/src/recovery/install-concurrency.js.map +1 -0
  82. package/dist/src/recovery/interruption.d.ts +19 -0
  83. package/dist/src/recovery/interruption.js +43 -0
  84. package/dist/src/recovery/interruption.js.map +1 -0
  85. package/dist/src/recovery/joint-coordinator.d.ts +11 -4
  86. package/dist/src/recovery/joint-coordinator.js +681 -333
  87. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  88. package/dist/src/recovery/joint-demand.d.ts +8 -0
  89. package/dist/src/recovery/joint-demand.js +52 -1
  90. package/dist/src/recovery/joint-demand.js.map +1 -1
  91. package/dist/src/recovery/joint-install-execution.d.ts +19 -0
  92. package/dist/src/recovery/joint-install-execution.js +307 -0
  93. package/dist/src/recovery/joint-install-execution.js.map +1 -0
  94. package/dist/src/recovery/joint-install-native-rebase.d.ts +4 -0
  95. package/dist/src/recovery/joint-install-native-rebase.js +67 -0
  96. package/dist/src/recovery/joint-install-native-rebase.js.map +1 -0
  97. package/dist/src/recovery/receipt.d.ts +20 -0
  98. package/dist/src/recovery/receipt.js +67 -1
  99. package/dist/src/recovery/receipt.js.map +1 -1
  100. package/dist/src/recovery/retirement.js +1 -1
  101. package/dist/src/recovery/retirement.js.map +1 -1
  102. package/dist/src/recovery/status.js +26 -27
  103. package/dist/src/recovery/status.js.map +1 -1
  104. package/dist/src/review/platform-profile.d.ts +4 -1
  105. package/dist/src/review/platform-profile.js +13 -4
  106. package/dist/src/review/platform-profile.js.map +1 -1
  107. package/dist/src/review/skill-materialization.d.ts +1 -0
  108. package/dist/src/review/skill-materialization.js +28 -16
  109. package/dist/src/review/skill-materialization.js.map +1 -1
  110. package/dist/src/review/source-binding.js +6 -4
  111. package/dist/src/review/source-binding.js.map +1 -1
  112. package/dist/src/tui/catalog-generation.d.ts +6 -0
  113. package/dist/src/tui/catalog-generation.js +22 -6
  114. package/dist/src/tui/catalog-generation.js.map +1 -1
  115. package/dist/src/tui/console-app-v4.d.ts +1 -1
  116. package/dist/src/tui/console-app-v4.js +139 -59
  117. package/dist/src/tui/console-app-v4.js.map +1 -1
  118. package/dist/src/tui/controller-runtime.js +145 -53
  119. package/dist/src/tui/controller-runtime.js.map +1 -1
  120. package/dist/src/tui/controller.d.ts +13 -4
  121. package/dist/src/tui/controller.js +241 -102
  122. package/dist/src/tui/controller.js.map +1 -1
  123. package/dist/src/tui/deployment-view.js +6 -1
  124. package/dist/src/tui/deployment-view.js.map +1 -1
  125. package/dist/src/tui/diagnostic-projection.d.ts +4 -2
  126. package/dist/src/tui/diagnostic-projection.js +40 -4
  127. package/dist/src/tui/diagnostic-projection.js.map +1 -1
  128. package/dist/src/tui/glossary.js +1 -0
  129. package/dist/src/tui/glossary.js.map +1 -1
  130. package/dist/src/tui/operation-diagnostic-screens.d.ts +1 -1
  131. package/dist/src/tui/operation-diagnostic-screens.js +3 -1
  132. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
  133. package/dist/src/tui/operation-history.d.ts +6 -3
  134. package/dist/src/tui/operation-history.js +15 -2
  135. package/dist/src/tui/operation-history.js.map +1 -1
  136. package/dist/src/tui/scoped-flow.d.ts +3 -1
  137. package/dist/src/tui/scoped-flow.js +99 -1
  138. package/dist/src/tui/scoped-flow.js.map +1 -1
  139. package/dist/src/tui/session-console-app.d.ts +2 -0
  140. package/dist/src/tui/session-console-app.js +11 -0
  141. package/dist/src/tui/session-console-app.js.map +1 -1
  142. package/dist/src/types.d.ts +8 -1
  143. package/dist/src/types.js.map +1 -1
  144. package/dist/src/utils/aw-home-mutation-lock.js +2 -1
  145. package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
  146. package/dist/src/utils/catalog-generation-resolver.d.ts +1 -0
  147. package/dist/src/utils/catalog-generation-resolver.js +1 -0
  148. package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
  149. package/dist/src/utils/catalog-operation-context.d.ts +11 -0
  150. package/dist/src/utils/catalog-operation-context.js +18 -3
  151. package/dist/src/utils/catalog-operation-context.js.map +1 -1
  152. package/dist/src/utils/catalog-source-references.js +2 -14
  153. package/dist/src/utils/catalog-source-references.js.map +1 -1
  154. package/dist/src/utils/component-resources.js +1 -1
  155. package/dist/src/utils/component-resources.js.map +1 -1
  156. package/dist/src/utils/managed-command-materialization.d.ts +2 -1
  157. package/dist/src/utils/managed-command-materialization.js +3 -3
  158. package/dist/src/utils/managed-command-materialization.js.map +1 -1
  159. package/dist/src/utils/managed-command-store.d.ts +6 -0
  160. package/dist/src/utils/managed-command-store.js +90 -18
  161. package/dist/src/utils/managed-command-store.js.map +1 -1
  162. package/dist/src/utils/multi-source-catalog.d.ts +2 -0
  163. package/dist/src/utils/multi-source-catalog.js +3 -2
  164. package/dist/src/utils/multi-source-catalog.js.map +1 -1
  165. package/dist/src/utils/native-cli.d.ts +0 -19
  166. package/dist/src/utils/native-cli.js +2 -42
  167. package/dist/src/utils/native-cli.js.map +1 -1
  168. package/dist/src/utils/ownership.js +1 -1
  169. package/dist/src/utils/ownership.js.map +1 -1
  170. package/dist/src/utils/platform-empty-state.d.ts +1 -3
  171. package/dist/src/utils/platform-empty-state.js +1 -6
  172. package/dist/src/utils/platform-empty-state.js.map +1 -1
  173. package/dist/src/utils/plugin-config-write.d.ts +8 -0
  174. package/dist/src/utils/plugin-config-write.js +89 -25
  175. package/dist/src/utils/plugin-config-write.js.map +1 -1
  176. package/dist/src/utils/plugin-scripts.js +5 -0
  177. package/dist/src/utils/plugin-scripts.js.map +1 -1
  178. package/dist/src/utils/skill-invocation-warning.d.ts +15 -0
  179. package/dist/src/utils/skill-invocation-warning.js +42 -0
  180. package/dist/src/utils/skill-invocation-warning.js.map +1 -0
  181. package/package.json +3 -3
  182. package/dist/src/output/native-consent.d.ts +0 -2
  183. package/dist/src/output/native-consent.js +0 -5
  184. package/dist/src/output/native-consent.js.map +0 -1
  185. package/dist/src/platforms/gemini-activation.d.ts +0 -36
  186. package/dist/src/platforms/gemini-activation.js +0 -331
  187. package/dist/src/platforms/gemini-activation.js.map +0 -1
  188. package/dist/src/platforms/gemini-consent.d.ts +0 -8
  189. package/dist/src/platforms/gemini-consent.js +0 -81
  190. package/dist/src/platforms/gemini-consent.js.map +0 -1
@@ -17,8 +17,8 @@ import { selectLifecycleRetryAction, } from '../commands/operation-planner.js';
17
17
  import { parseScriptTimeoutMs, SCRIPT_TIMEOUT_DEFAULT_MS, SCRIPT_TIMEOUT_MAX_MS, SCRIPT_TIMEOUT_MIN_MS, } from '../commands/options.js';
18
18
  import { projectCatalogSourceLocation } from '../utils/catalog-source-presentation.js';
19
19
  import { ActionRow, AgentStatusText, ConfigTile, configTileHeight, HomeNavTile, KeyCap, ObjectCardFrame, ObjectCardRow, objectCardRowLayout, pluginListRowLayout, StatusBadge, diagnosticDetailLines, diagnosticDetailText, Callout, ChoiceRow, ContentViewport, DiagnosticSummary, InputCard, PluginListRow, ProgressRow, ResultCard, ResultRow, ReviewCard, ReviewChangeRow, ScreenFrame, SectionCard, SectionRow, StaticRow, StatusCard, TaskRow, TechnicalDetails, ToggleRow, } from './components.js';
20
- import { safeDiagnosticCode, sanitizeDiagnosticText, } from './diagnostics.js';
21
- import { extractPortableError, TuiConfigInvalidStoreError, userIssueKey, } from './controller.js';
20
+ import { safeDiagnosticCode, sanitizeDiagnosticDetailText, sanitizeDiagnosticText, } from './diagnostics.js';
21
+ import { extractPortableError, TuiConfigInvalidStoreError, TuiOperationBlockedError, userIssueKey, } from './controller.js';
22
22
  import { pluginWriteTaskVersionEvidence } from './plugin-write-task.js';
23
23
  import { catalogSourceFreshnessLabel, catalogSourceListPresentation, } from './catalog-sources/screens.js';
24
24
  import { operationDiagnosticText, operationHistoryMeta, operationHistoryState, } from './operation-diagnostic-screens.js';
@@ -27,8 +27,10 @@ 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';
31
+ import { describeSkillInvocationControl, SKILL_INVOCATION_NOTICE } from '../utils/skill-invocation-warning.js';
30
32
  import { deploymentPlanLines, deploymentResultLines, deploymentObservationLines, deploymentExclusionLines, componentGapLines } from './deployment-view.js';
31
- import { projectDeploymentReceipt, projectDeploymentObservation } from '../commands/public-lifecycle-result.js';
33
+ import { inventoryRecoveryActions, projectDeploymentReceipt, projectDeploymentObservation } from '../commands/public-lifecycle-result.js';
32
34
  import { InputDisplay, removeLastGrapheme } from './input-display.js';
33
35
  import { QueryHeader, querySearchWidth } from './query-header.js';
34
36
  import { Pager, Reader, paginateWrappedRows, readerPage } from './reader.js';
@@ -38,6 +40,7 @@ import { SourceDetailCard, sourceDetailCardLayout } from './source-detail-card.j
38
40
  import { catalogRefPolicyForPreset } from './source-ref-presets.js';
39
41
  import { buildPlatformActions, configObjectHasSensitiveChild, hasInstalledPlacement, configValuesEqual, } from './model.js';
40
42
  import { managedCommandRecoveryPlanChanges } from './operation-review-planner.js';
43
+ import { isRecoveryReviewStaleBeforeExecution, recoveryRetryTargets, recoverySummaryErrors } from '../recovery/receipt.js';
41
44
  import { resolveTuiGlobalKeyAction, resolveTuiSessionNavigationKey } from './keys.js';
42
45
  import { tuiTheme } from './theme.js';
43
46
  import { contentRowBudget, rowViewport, wrapDisplayText } from './viewport.js';
@@ -166,7 +169,8 @@ function recoveryTargetLines(receipt, result) {
166
169
  }
167
170
  else
168
171
  action = target.content === 'absent' || target.observation === 'missing' ? '+ 新增安装' : '↻ 同步并修复';
169
- const reason = target.blockers[0] || target.reasons?.[0] ? recoveryReason((target.blockers[0] ?? target.reasons[0]).code)
172
+ const diagnostic = target.blockers[0] ?? target.reasons?.find(({ code }) => code !== SKILL_INVOCATION_NOTICE);
173
+ const reason = diagnostic ? recoveryReason(diagnostic.code)
170
174
  : target.satisfaction === 'excluded' ? '已关闭此 Agent'
171
175
  : target.satisfaction === 'unsupported' ? '插件不支持此 Agent' : undefined;
172
176
  const label = `${action} ${recoveryPluginLabel(target.pluginId)} ${scopeLabel(target.scope)}`;
@@ -174,7 +178,7 @@ function recoveryTargetLines(receipt, result) {
174
178
  const group = groups.get(key) ?? { label: `→ ${agentLabel(target.agent)}`, targets: [] };
175
179
  group.targets.push(`${label}${reason ? ` · ${reason}` : ''}`);
176
180
  if (result && target.deploymentReceipts)
177
- group.targets.push(...deploymentResultLines(target.deploymentReceipts.map(projectDeploymentReceipt)));
181
+ group.targets.push(...deploymentResultLines(target.deploymentReceipts.map((deployment) => projectDeploymentReceipt(deployment, { receipt, target }))));
178
182
  else if (result && target.deploymentObservations)
179
183
  group.targets.push(...deploymentObservationLines(target.deploymentObservations.map(projectDeploymentObservation)));
180
184
  group.targets.push(...deploymentExclusionLines(target.deploymentExclusions ?? []), ...componentGapLines(target.componentGaps ?? []));
@@ -231,12 +235,44 @@ function scopedPlanSummary(plan) {
231
235
  lines.push(`! ${recoveryReason(diagnostic.code)}`);
232
236
  return [...new Set(lines)].join('\n');
233
237
  }
238
+ const skillInvocationExplanations = {
239
+ noBoundExecutor: '通用输出没有绑定执行客户端,无法保证',
240
+ invocationControlUnsupported: '该客户端不支持',
241
+ invocationControlUnverified: '尚未验证该客户端能否保证',
242
+ app: '尚未验证 Codex 桌面 App 能否保证',
243
+ };
244
+ function skillInvocationControlLabel({ feature, values }) {
245
+ if (feature === 'skill.invocation.manual' || feature === 'skill.invocation.model') {
246
+ const invocation = feature === 'skill.invocation.manual' ? '用户显式调用' : '模型自动调用';
247
+ return values?.length ? values.map((value) => `${value === 'true' ? '允许' : '禁止'}${invocation}`).join('、') : invocation;
248
+ }
249
+ return values?.length ? values.map((value) => `${value === 'visible' ? '显示' : '隐藏'} Skill`).join('、') : 'Skill 可见性';
250
+ }
251
+ function skillInvocationResultLines(diagnostics, technical = false) {
252
+ return skillInvocationNotices(diagnostics).flatMap(({ skill, pluginId, platform, scope, reasonCode, controls, message }) => {
253
+ const position = `! ${pluginId} · ${agentLabel(platform)} · ${scopeLabel(scope)} · ${skill} 已安装。`;
254
+ if (!controls.length) {
255
+ return [`${position}${skillInvocationExplanations[reasonCode]}声明的调用限制。`, ` ${sanitizeDiagnosticDetailText(message)}`,
256
+ ...(technical ? [` ${SKILL_INVOCATION_NOTICE} · ${reasonCode}`] : [])];
257
+ }
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
+ });
262
+ return [`${position}${explanations.join('')}`,
263
+ ...(technical ? [` ${SKILL_INVOCATION_NOTICE} · ${reasonCode}`, ...controls.map((control) => ` ${describeSkillInvocationControl(control)} · ${control.reasonCode}${control.product ? ' · Codex 桌面 App' : ''}`)] : [])];
264
+ });
265
+ }
234
266
  function scopedResultSummary(receipt) {
235
- return [receipt.coverage?.scopes.length === 2 ? '所有项目 + 当前项目' : scopeLabel(receipt.scope), ...recoveryTargetLines(receipt, true),
236
- ...(receipt.declarationChanged ? ['插件清单已保存。'] : []),
237
- ...(receipt.preferencesChanged ? ['Agent 选择已保存。'] : []),
267
+ return [receipt.coverage?.scopes.length === 2 ? '所有项目 + 当前项目' : scopeLabel(receipt.scope),
268
+ ...skillInvocationResultLines(receipt.targetResults.flatMap(({ reasons }) => reasons ?? [])),
269
+ ...recoveryTargetLines(receipt, true),
270
+ ...(receipt.unconfirmedSavedState === 'intent' ? ['插件清单写入后的内容需要重新检查。']
271
+ : receipt.declarationChanged ? ['插件清单已保存。'] : []),
272
+ ...(receipt.unconfirmedSavedState === 'preferences' ? ['Agent 选择写入后的内容需要重新检查。']
273
+ : receipt.preferencesChanged ? ['Agent 选择已保存。'] : []),
238
274
  ...(receipt.configChanged ? ['插件设置已保存。'] : []),
239
- ...[...new Set([...receipt.errors, ...receipt.blockers].map((entry) => recoveryReason(entry.code)))]
275
+ ...[...new Set([...recoverySummaryErrors(receipt), ...receipt.blockers].map((entry) => recoveryReason(entry.code)))]
240
276
  .map((reason) => `! ${reason}`),
241
277
  ...(receipt.commandResults?.length ? [`命令包:${receipt.commandResults.filter((entry) => entry.errors.length === 0).length} 项完成,${receipt.commandResults.filter((entry) => entry.errors.length > 0).length} 项需处理;详情中可查看恢复方法。`] : []),
242
278
  ].join('\n');
@@ -294,11 +330,13 @@ function scopedResultText(receipt, technical = false) {
294
330
  if (!technical)
295
331
  return scopedResultSummary(receipt);
296
332
  const diagnostics = [...new Map([
297
- ...receipt.errors.map((entry) => [`${entry.code}:${entry.message}`, `全局错误:${entry.code} · ${entry.message}`]),
333
+ ...recoverySummaryErrors(receipt).map((entry) => [`${entry.code}:${entry.message}`, `全局错误:${entry.code} · ${entry.message}`]),
298
334
  ...receipt.blockers.map((entry) => [`${entry.code}:${entry.message}`, `全局受阻:${entry.code} · ${entry.message}`]),
299
335
  ]).values()];
300
- const reviewStale = [...receipt.blockers, ...receipt.errors]
301
- .some((entry) => entry.code === 'operationReviewStale');
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);
302
340
  return [
303
341
  `范围:${receipt.scope === 'user' ? '个人(所有项目)' : '当前项目'}`,
304
342
  `完整请求:${receipt.requestedRoots.join('、') || '无'}`,
@@ -307,12 +345,15 @@ function scopedResultText(receipt, technical = false) {
307
345
  `配置变更:${receipt.configChanged ? '是' : '无'}`,
308
346
  `输出可能改变:${receipt.outputsMayHaveChanged ? '是' : '否'}`,
309
347
  ...diagnostics,
310
- ...receipt.targetResults.flatMap((target) => target.reasons?.map((reason) => `${reason.code} · ${reason.message}`) ?? []),
311
- ...(reviewStale ? ['本次未执行,需要重新准备。'] : []),
348
+ ...skillInvocationResultLines(receipt.targetResults.flatMap(({ reasons }) => reasons ?? []), true),
349
+ ...receipt.targetResults.flatMap((target) => (target.reasons ?? []).filter(({ code }) => code !== SKILL_INVOCATION_NOTICE)
350
+ .map((reason) => `${reason.code} · ${reason.message}`)),
351
+ ...(isRecoveryReviewStaleBeforeExecution(receipt) ? ['本次未执行,需要重新准备。'] : []),
312
352
  ...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('、')}` : ''}`),
313
- ...receipt.targetResults.flatMap((target) => target.deploymentReceipts ? deploymentResultLines(target.deploymentReceipts.map(projectDeploymentReceipt), true)
353
+ ...receipt.targetResults.flatMap((target) => target.deploymentReceipts ? deploymentResultLines(target.deploymentReceipts.map((deployment) => projectDeploymentReceipt(deployment, { receipt, target })), true)
314
354
  : target.deploymentObservations ? deploymentObservationLines(target.deploymentObservations.map(projectDeploymentObservation), true) : []),
315
355
  ...receipt.targetResults.flatMap((target) => target.recoveryActions?.map((action) => `${target.pluginId} · ${target.agent}:${action}`) ?? []),
356
+ ...nativeRecovery.flatMap((action) => action.kind === 'manual' ? [action.message] : []),
316
357
  ...(receipt.commandResults ?? []).flatMap((result) => [
317
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}`,
318
359
  ...(result.recoveryActions.some((action) => action.startsWith('aw command package remove '))
@@ -322,7 +363,7 @@ function scopedResultText(receipt, technical = false) {
322
363
  ...result.errors.map((error) => `命令错误:${error.code} · ${error.message}`),
323
364
  ...result.recoveryActions.map((action) => `命令恢复:${action}`),
324
365
  ]),
325
- ...receipt.remainingTargets.map((target) => `未完成:${target.pluginId} · ${target.agent}`),
366
+ ...receipt.remainingTargets.map((target) => `未完成:${target.pluginId} · ${target.agent} · ${scopeLabel(target.scope)}`),
326
367
  ...receipt.recoveryActions.map((action) => `恢复:${action}`),
327
368
  ].join('\n');
328
369
  }
@@ -2266,7 +2307,8 @@ export function ConsoleAppV4(props) {
2266
2307
  || Boolean(route.name === 'portableBlocker' && plugin)
2267
2308
  || Boolean(route.name === 'configUnavailable' && plugin)
2268
2309
  || Boolean(route.name === 'result' && snapshot.result && 'operationKind' in snapshot.result
2269
- && snapshot.result.operationKind === 'portableInstall'));
2310
+ && (snapshot.result.operationKind === 'portableInstall'
2311
+ || ('summary' in snapshot.result && snapshot.result.summary?.configDiagnostics?.length))));
2270
2312
  const characterInput = !activeVariantPreview && !activeFieldIsConst && !activePropertyIsConst && isCharacterInputMode(route, searchFocus)
2271
2313
  || route.name === 'operationReportPreview' && reportSaveMode;
2272
2314
  const canOpenHelp = !tooSmall && !characterInput && !preparationRunning;
@@ -2506,7 +2548,7 @@ export function ConsoleAppV4(props) {
2506
2548
  return;
2507
2549
  scopedFlowBusy.current = false;
2508
2550
  setScopedFlow({ stage: 'result', scope: request.scope,
2509
- errorCode: safeDiagnosticCode(error instanceof Error ? error.message : undefined, 'recoveryPreparationFailed'), focus: 0 });
2551
+ errorCode: safeDiagnosticCode(error instanceof TuiOperationBlockedError ? error.code : error instanceof Error ? error.message : undefined, 'recoveryPreparationFailed'), focus: 0 });
2510
2552
  });
2511
2553
  };
2512
2554
  const agentSummaries = (pluginId) => {
@@ -4240,6 +4282,7 @@ export function ConsoleAppV4(props) {
4240
4282
  title = flow.stage === 'preparing' ? '正在准备操作汇总' : '正在执行恢复';
4241
4283
  description = flow.stage === 'preparing' ? '正在检查当前证据。Esc 可取消准备。'
4242
4284
  : '操作已开始。完成后显示每个目标结果。';
4285
+ const installProgress = flow.stage === 'progress' ? snapshot.progress.installProgress : undefined;
4243
4286
  readingText = flow.stage === 'progress' ? [
4244
4287
  ...(snapshot.progress.current
4245
4288
  ? [`${snapshot.progress.current.target} · ${snapshot.progress.current.phase}`] : []),
@@ -4247,7 +4290,7 @@ export function ConsoleAppV4(props) {
4247
4290
  ...(flow.plan.kind === 'recovery' ? scopedCommandPlanText(flow.plan) : []),
4248
4291
  ...deploymentPlanLines(scopedDeploymentPlans(flow.plan)),
4249
4292
  ].join('\n') : undefined;
4250
- content = _jsxs(Box, { flexDirection: "column", children: [_jsx(ProgressRow, { title: title, state: "active" }), readingText ? readingPage(readingText, size.columns - 6, Math.max(1, pageActionBudget(4))) : null] });
4293
+ content = _jsxs(Box, { flexDirection: "column", children: [_jsx(ProgressRow, { title: title, state: "active" }), installProgress ? _jsxs(_Fragment, { children: [_jsx(StaticRow, { title: `已完成 ${installProgress.completed} · 正在执行 ${installProgress.running}`, compact: true }), _jsx(StaticRow, { title: `等待依赖 ${installProgress.waitingForDependencies} · 待执行 ${installProgress.waiting}`, compact: true })] }) : null, readingText ? readingPage(readingText, size.columns - 6, Math.max(1, pageActionBudget(installProgress ? 6 : 4))) : null] });
4251
4294
  }
4252
4295
  else if (flow.stage === 'timeout') {
4253
4296
  title = '设置脚本超时';
@@ -4308,15 +4351,14 @@ export function ConsoleAppV4(props) {
4308
4351
  : '本机工具已保存。';
4309
4352
  readingText = flow.receipt ? scopedResultText(flow.receipt, showTechnical)
4310
4353
  : (flow.errorCode ? showTechnical ? flow.errorCode : recoveryReason(flow.errorCode) : undefined) ?? (flow.changed ? '本机工具已保存。' : '本机工具没有变化。');
4311
- const retryTargets = flow.receipt?.targetResults.filter((target) => (target.execution === 'failed' || target.execution === 'partial')
4354
+ const failedPositions = flow.receipt?.targetResults.filter((target) => (target.execution === 'failed' || target.execution === 'partial')
4312
4355
  && (target.observation === 'missing' || target.content === 'absent')) ?? [];
4313
- const retryKeys = new Set(retryTargets.map((target) => `${target.pluginId}\0${target.agent}\0${target.scope}`));
4356
+ const retryTargets = flow.receipt ? recoveryRetryTargets(flow.receipt, failedPositions) : [];
4357
+ const originalCommand = flow.plan?.kind === 'recovery' ? flow.plan.plan.command : undefined;
4358
+ const retryKeys = new Set(failedPositions.map((target) => `${target.pluginId}\0${target.agent}\0${target.scope}`));
4314
4359
  const unknownTargets = flow.receipt?.targetResults.filter((target) => target.observation === 'unknown'
4315
4360
  && !retryKeys.has(`${target.pluginId}\0${target.agent}\0${target.scope}`)) ?? [];
4316
- const reviewStale = flow.receipt
4317
- ? [...flow.receipt.blockers, ...flow.receipt.errors]
4318
- .some((entry) => entry.code === 'operationReviewStale')
4319
- : false;
4361
+ const reviewStale = flow.receipt && isRecoveryReviewStaleBeforeExecution(flow.receipt);
4320
4362
  actions = [
4321
4363
  { label: route.name === 'issueDetail' ? '返回问题详情'
4322
4364
  : route.name === 'pluginWriteTask' ? '返回插件任务'
@@ -4330,13 +4372,15 @@ export function ConsoleAppV4(props) {
4330
4372
  }) }] : []),
4331
4373
  ...(unknownTargets.length ? [{ label: `检查未确认项(${unknownTargets.length})`, run: () => {
4332
4374
  closeScopedFlow();
4333
- void props.controller.refreshScopedInventory(flow.scope);
4375
+ for (const scope of new Set(unknownTargets.map((target) => target.scope))) {
4376
+ void props.controller.refreshScopedInventory(scope);
4377
+ }
4334
4378
  } }] : []),
4335
4379
  ...(retryTargets.length ? [{ label: `重试明确失败项(${retryTargets.length})`, run: () => beginScopedTask({
4336
- kind: 'recovery', scope: flow.scope, command: flow.receipt.command,
4380
+ kind: 'recovery', scope: flow.scope, command: originalCommand === 'install' ? 'sync' : originalCommand ?? 'sync',
4337
4381
  selectors: [...new Set(retryTargets.map((target) => target.pluginId))],
4338
4382
  targets: [...new Set(retryTargets.map((target) => target.agent))],
4339
- exactTargets: retryTargets.map((target) => ({ pluginId: target.pluginId, agent: target.agent, scope: target.scope })),
4383
+ exactTargets: retryTargets,
4340
4384
  }) }] : []),
4341
4385
  ];
4342
4386
  content = _jsxs(ResultSurface, { status: flow.errorCode || flow.receipt && !flow.receipt.ok ? 'warning' : 'success', title: description, children: [readingPage(readingText, size.columns - 6, Math.max(1, pageActionBudget(actions.length + (showTechnical ? 5 : 4)))), _jsx(SemanticRows, { actions: actions, focus: flow.focus, kind: "action", compact: true })] });
@@ -8034,7 +8078,9 @@ export function ConsoleAppV4(props) {
8034
8078
  : [])).values()].map((target) => ({
8035
8079
  label: `处理 ${props.controller.getPluginOverview(target.pluginId).displayName}`,
8036
8080
  description: '查看这个依赖的问题和可用的恢复操作',
8037
- run: () => go({ name: 'platform', pluginId: target.pluginId, platform: target.platform }),
8081
+ run: () => go(target.platform === 'generic'
8082
+ ? { name: 'pluginDetail', pluginId: target.pluginId }
8083
+ : { name: 'platform', pluginId: target.pluginId, platform: target.platform }),
8038
8084
  })),
8039
8085
  { label: '重试', description: '重新读取和验证当前状态', run: () => {
8040
8086
  props.controller.retryReviewPreparation();
@@ -8718,11 +8764,18 @@ export function ConsoleAppV4(props) {
8718
8764
  : '✓ 来源配置已保存'
8719
8765
  : configOperation
8720
8766
  ? blocked
8721
- ? '× 设置未确认保存'
8767
+ ? resultSummary?.configRetryApply ? '× 插件应用未完成' : '× 设置未确认保存'
8722
8768
  : partial ? resultSummary?.configApplySkippedReason === 'invalidConfig'
8723
- ? '! 设置已保存,但未应用'
8724
- : '! 设置已保存,但部分应用失败'
8725
- : resultSummary?.configApplied ? '✓ 设置已保存并应用' : '✓ 设置已保存'
8769
+ ? resultSummary.configRetryApply ? '! 配置无效,应用未完成' : '! 设置已保存,但未应用'
8770
+ : resultSummary?.configRetryApply
8771
+ ? resultSummary.configApplied ? '! 部分插件内容已就绪' : '! 插件应用未完成'
8772
+ : resultSummary?.configApplied && (resultSummary.configApplyRetryTargets !== undefined
8773
+ || resultSummary.configGroups?.some((group) => group.applyStatus === 'partial'))
8774
+ ? '! 设置已保存,部分插件内容已就绪'
8775
+ : '! 设置已保存,但部分应用失败'
8776
+ : resultSummary?.configRetryApply
8777
+ ? resultSummary.configApplied ? '✓ 已应用已保存的设置' : '✓ 应用检查完成'
8778
+ : resultSummary?.configApplied ? '✓ 设置已保存并应用' : '✓ 设置已保存'
8726
8779
  : partial ? '! 插件操作只完成了一部分'
8727
8780
  : blocked ? result.code === 'operationFailed' ? '× 插件操作没有完成' : '× 插件操作未完成'
8728
8781
  : completedTitle;
@@ -8771,7 +8824,7 @@ export function ConsoleAppV4(props) {
8771
8824
  : configOperation
8772
8825
  ? partial
8773
8826
  ? resultSummary?.message ?? '设置层已经保存;平台应用失败不会回滚设置。'
8774
- : '设置层已经更新。'
8827
+ : resultSummary?.configRetryApply ? '状态已刷新。' : '设置层已经更新。'
8775
8828
  : '状态已刷新。';
8776
8829
  if (taskOperation && splitTaskReview?.currentScope === 'user') {
8777
8830
  if (!blocked && !partial)
@@ -8785,11 +8838,15 @@ export function ConsoleAppV4(props) {
8785
8838
  && 'pluginId' in result.returnRoute
8786
8839
  ? result.returnRoute.pluginId
8787
8840
  : undefined);
8788
- const configRetryProfiles = configResultPluginId === undefined ? []
8841
+ const configRetries = configResultPluginId === undefined ? []
8789
8842
  : operationKind === 'configSaveBatch'
8790
- ? resultSummary?.configGroups?.filter((group) => group.configSaved && group.applyStatus === 'failed'
8791
- && group.errorCode !== 'invalidConfig').map((group) => group.platform ?? 'common') ?? []
8792
- : resultSummary?.configApplyRetryAvailable === true ? [resultSummary.configPlatform ?? 'common'] : [];
8843
+ ? resultSummary?.configGroups?.filter((group) => group.configSaved
8844
+ && (group.applyStatus === 'failed' || group.applyStatus === 'partial')
8845
+ && group.errorCode !== 'invalidConfig' && group.retryTargets?.length !== 0)
8846
+ .map((group) => ({ profile: group.platform ?? 'common', targets: group.retryTargets })) ?? []
8847
+ : resultSummary?.configApplyRetryAvailable === true
8848
+ ? [{ profile: resultSummary.configPlatform ?? 'common', targets: resultSummary.configApplyRetryTargets }]
8849
+ : [];
8793
8850
  const configOrigin = successfulConfigOperation && pluginId
8794
8851
  ? props.controller.configOrigin(pluginId)
8795
8852
  : undefined;
@@ -9019,8 +9076,8 @@ export function ConsoleAppV4(props) {
9019
9076
  label: '返回首页', run: () => requestSessionNavigation('home') }]
9020
9077
  : configOperation && partial
9021
9078
  ? [
9022
- ...configRetryProfiles.map((profile) => ({
9023
- label: configRetryProfiles.length > 1 ? `重试应用 · ${configLayerLabel({ profile })}` : '重试应用',
9079
+ ...configRetries.map(({ profile, targets }) => ({
9080
+ label: configRetries.length > 1 ? `重试应用 · ${configLayerLabel({ profile })}` : '重试应用',
9024
9081
  description: '先重新显示操作汇总,并重新读取当前状态',
9025
9082
  run: () => beginReview({
9026
9083
  kind: 'configSave',
@@ -9029,6 +9086,7 @@ export function ConsoleAppV4(props) {
9029
9086
  ...configReadOptions({ profile, context: resultSummary?.configContext }),
9030
9087
  apply: true,
9031
9088
  retryApply: true,
9089
+ ...(targets ? { targets } : {}),
9032
9090
  updates: {},
9033
9091
  removeKeys: [],
9034
9092
  }),
@@ -9122,6 +9180,19 @@ export function ConsoleAppV4(props) {
9122
9180
  const resultStatus = blocked ? 'error' : partial ? 'warning' : 'success';
9123
9181
  const resultTargets = configOperation ? resultSummary?.configTargets ?? resultSummary?.targets ?? []
9124
9182
  : resultSummary?.targets ?? [];
9183
+ const configInvocationLines = skillInvocationResultLines(resultSummary?.configDiagnostics ?? [], showTechnical);
9184
+ const configInvocationRows = configInvocationLines.flatMap((line) => wrapDisplayText(line, size.columns - 6))
9185
+ .map((line, index) => _jsx(Text, { color: tuiTheme.statusColors.warning, children: line }, `config-skill:${index}`));
9186
+ const configGroupRows = resultSummary?.configGroups?.map((group) => {
9187
+ const status = group.notStarted ? 'muted' : !group.configSaved ? 'error'
9188
+ : group.applyStatus === 'failed' || group.applyStatus === 'partial' ? 'warning' : 'success';
9189
+ const outcome = group.notStarted ? '尚未保存' : !group.configSaved ? '保存失败'
9190
+ : group.applyStatus === 'failed' ? '已保存 · 应用失败'
9191
+ : group.applyStatus === 'partial' ? '已保存 · 部分应用'
9192
+ : group.applyStatus === 'succeeded' ? '已保存 · 已应用'
9193
+ : '已保存';
9194
+ return _jsx(ResultRow, { title: configLayerLabel({ profile: group.platform ?? 'common' }), description: group.errorCode, meta: outcome, status: status, compact: true }, `config:${group.platform ?? 'common'}`);
9195
+ }) ?? [];
9125
9196
  const commandResults = resultSummary?.commandResults ?? [];
9126
9197
  const retainedCommandPackage = (result) => result.producer.kind === 'package' && (resultSummary?.action === 'cleanup' || resultSummary?.action === 'uninstall');
9127
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}`));
@@ -9131,7 +9202,19 @@ export function ConsoleAppV4(props) {
9131
9202
  : target.state === 'skipped' ? 1 : target.relation === 'requested' ? 2 : 3;
9132
9203
  return priority(left) - priority(right);
9133
9204
  });
9134
- const baseResultPaginationTotal = Math.max(resultTargets.length + commandResults.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);
9205
+ const targetResultRows = prioritizedTargets.map((target) => {
9206
+ const state = target.partialDelivery
9207
+ ? { label: '部分完成', status: 'warning' }
9208
+ : operationTargetStateLabel(target.state);
9209
+ const relation = target.relation === 'requested' ? '你选择的插件'
9210
+ : target.relation === 'direct' ? '直接依赖' : target.relation === 'transitive' ? '间接依赖' : undefined;
9211
+ const targetDescription = configOperation
9212
+ ? [agentLabel(target.platform), scopeLabel(target.scope), target.errorCode].filter(Boolean).join(' · ')
9213
+ : 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}`);
9215
+ });
9216
+ const generalResultRows = [...configInvocationRows, ...configGroupRows, ...targetResultRows, ...commandResultRows];
9217
+ 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);
9135
9218
  const resultExtraRows = (resultSummary?.elapsedMs !== undefined ? 1 : 0)
9136
9219
  + visibleMessages.length
9137
9220
  + visibleChanges.length
@@ -9204,11 +9287,12 @@ export function ConsoleAppV4(props) {
9204
9287
  ].join('\n') : '当前结果已变化。请返回结果摘要。' : [
9205
9288
  ...(taskOperation && splitTaskReview ? splitTaskLines(splitTaskReview) : []),
9206
9289
  resultSummary?.message ?? (blocked ? result.message : '操作结果'),
9290
+ ...configInvocationLines,
9207
9291
  ...(resultSummary?.messages ?? []).map(productResultMessage),
9208
9292
  ...(resultSummary?.changes ?? []),
9209
9293
  ...(resultSummary?.warnings ?? []),
9210
9294
  ...(resultSummary?.recoveryActions ?? []),
9211
- ...prioritizedTargets.map((target) => `${resultTargetName(target)} · ${agentLabel(target.platform)} · ${scopeLabel(target.scope)} · ${operationTargetStateLabel(target.state).label}`),
9295
+ ...prioritizedTargets.map((target) => `${resultTargetName(target)} · ${agentLabel(target.platform)} · ${scopeLabel(target.scope)} · ${target.partialDelivery ? '部分完成' : operationTargetStateLabel(target.state).label}`),
9212
9296
  ...commandResults.flatMap((result) => [
9213
9297
  `命令生产者 ${result.producer.key} · ${scopeLabel(result.producer.scope)} · ${result.state}`,
9214
9298
  ...(retainedCommandPackage(result) ? [`保留命令包 ${getCommandPackageId(result.producer)} · ${result.producer.scope === 'user' ? '所有项目共用' : '当前项目内共用'}`] : []),
@@ -9274,11 +9358,9 @@ export function ConsoleAppV4(props) {
9274
9358
  : portableFixedRows
9275
9359
  : resultPaginationTotal > 1 ? 7 : 8);
9276
9360
  const resultActionViewport = actionViewport(actions, true, focus, scrollOffset, currentActionViewportLineBudget);
9277
- const resultTargetLimit = Math.max(1, prefixRowLimit([...prioritizedTargets, ...commandResults].map(() => policy.mode === 'compact' ? 1 : 2), pageActionBudget() - 3 - resultActionViewport.limit - resultExtraRows));
9278
- const resultTargetPage = pagedItems(prioritizedTargets.length + commandResults.length, resultTargetLimit);
9279
- const resultTargetOffset = resultTargetPage.offset;
9280
- const visibleResultTargets = prioritizedTargets.slice(resultTargetOffset, resultTargetOffset + resultTargetLimit);
9281
- const visibleCommandResultRows = commandResultRows.slice(Math.max(0, resultTargetOffset - prioritizedTargets.length), Math.max(0, resultTargetOffset + resultTargetLimit - prioritizedTargets.length));
9361
+ const resultTargetLimit = Math.max(1, prefixRowLimit(generalResultRows.map(() => policy.mode === 'compact' ? 1 : 2), pageActionBudget() - 3 - resultActionViewport.limit - resultExtraRows));
9362
+ const resultTargetPage = pagedItems(generalResultRows.length, resultTargetLimit);
9363
+ const visibleResultRows = generalResultRows.slice(resultTargetPage.offset, resultTargetPage.offset + resultTargetLimit);
9282
9364
  const portableTechnicalSummary = showTechnical;
9283
9365
  const portableRows = visiblePortablePairs.map((pair) => {
9284
9366
  const status = blocked || pair.state !== 'verified' ? 'warning' : 'success';
@@ -9312,15 +9394,6 @@ export function ConsoleAppV4(props) {
9312
9394
  : resultSummary?.resetDisposition === 'quarantinedDirectory'
9313
9395
  ? `设置路径是目录;已隔离为 ${resultSummary.quarantineBasename ?? '安全隔离目录'}`
9314
9396
  : undefined;
9315
- const configGroupRows = resultSummary?.configGroups?.map((group) => {
9316
- const status = !group.configSaved ? 'error'
9317
- : group.applyStatus === 'failed' ? 'warning' : 'success';
9318
- const outcome = !group.configSaved ? '保存失败'
9319
- : group.applyStatus === 'failed' ? '已保存 · 应用失败'
9320
- : group.applyStatus === 'succeeded' ? '已保存 · 已应用'
9321
- : '已保存';
9322
- return _jsx(ResultRow, { title: configLayerLabel({ profile: group.platform ?? 'common' }), description: group.errorCode, meta: outcome, status: status, compact: true }, `config:${group.platform ?? 'common'}`);
9323
- }) ?? [];
9324
9397
  const taskRootResults = taskSummary?.rootResults ?? [];
9325
9398
  const blockedTaskTargets = new Map((taskSummary?.blockedTargets ?? []).map((entry) => [
9326
9399
  [entry.target.pluginId, entry.target.platform, entry.target.scope].join('\0'), entry,
@@ -9398,7 +9471,7 @@ export function ConsoleAppV4(props) {
9398
9471
  const locationResultRows = [...(taskOperation ? taskLocationRows : batchLocationResultRows), ...commandResultRows];
9399
9472
  const combinedResultRows = [...pluginResultRows, ...locationResultRows];
9400
9473
  const actualResultRows = taskOperation || batchOperation ? combinedResultRows.length
9401
- : portableOperation ? prioritizedPortablePairs.length : prioritizedTargets.length + commandResults.length;
9474
+ : portableOperation ? prioritizedPortablePairs.length : generalResultRows.length;
9402
9475
  const actualResultPageRows = taskOperation || batchOperation ? taskResultLimit
9403
9476
  : portableOperation ? portableSkillLimit : resultTargetLimit;
9404
9477
  if (!portableResultDetailOpen && actualResultRows > actualResultPageRows) {
@@ -9411,7 +9484,7 @@ export function ConsoleAppV4(props) {
9411
9484
  const visibleLocationStart = Math.max(0, taskResultOffset - pluginResultRows.length);
9412
9485
  const remainingResultRows = taskResultLimit - visiblePluginResultRows.length;
9413
9486
  const visibleLocationResultRows = locationResultRows.slice(visibleLocationStart, visibleLocationStart + remainingResultRows);
9414
- if (taskOperation || batchOperation || resultTargets.length > resultTargetLimit
9487
+ if (taskOperation || batchOperation || resultTargetPage.pageCount > 1
9415
9488
  || prioritizedPortablePairs.length > portableSkillLimit) {
9416
9489
  help = '←→ 查看全部项目 · ↑↓ 移动 · Enter 选择 · Esc 返回';
9417
9490
  }
@@ -9425,7 +9498,14 @@ export function ConsoleAppV4(props) {
9425
9498
  ? _jsx(StaticRow, { title: "Agent", meta: "\u81EA\u52A8\u9009\u62E9\u53EF\u7528 Agent", compact: true }) : null, portableReceipt?.recovery
9426
9499
  ? _jsx(StaticRow, { title: `安全恢复:${portableReceipt.recovery}`, status: "warning", compact: true })
9427
9500
  : null] }) }), !portableResultDetailOpen && portableSkillPage.pageCount > 1
9428
- ? _jsx(Pager, { page: portableSkillPage.page, pageCount: portableSkillPage.pageCount, columns: size.columns - 2 }) : null, _jsx(SemanticRows, { actions: actions, focus: focus, kind: "action", compact: true, offset: resultActionViewport.offset, limit: resultActionViewport.limit })] }) : _jsxs(Box, { flexDirection: "column", children: [_jsxs(ResultCard, { status: resultStatus, title: blockedDependencyFailure ? '依赖安装没有完成' : blocked ? result.writeMayHaveCompleted ? '结果未确认' : '操作未完成' : sourceOperation ? '来源配置写入已完成' : dependencyTargets ? partial ? '依赖安装没有全部完成' : '操作已完成' : resultSummary?.message ?? '状态已变化,请重新确认', meta: resultTargets.length > 0 ? `${resultTargets.length} 个目标` : undefined, children: [resetDispositionText ? _jsx(StaticRow, { title: resetDispositionText, status: "success", compact: true }) : null, configGroupRows, visibleResultTargets.map((target) => { const state = operationTargetStateLabel(target.state); const relation = target.relation === 'requested' ? '你选择的插件' : target.relation === 'direct' ? '直接依赖' : target.relation === 'transitive' ? '间接依赖' : undefined; return _jsx(ResultRow, { title: resultTargetName(target), description: relation, meta: state.label, status: state.status ?? 'muted', compact: policy.mode === 'compact' }, `${target.pluginId ?? ''}:${target.platform}:${target.scope}`); }), visibleCommandResultRows, resultTargetPage.pageCount > 1 ? _jsx(Pager, { page: resultTargetPage.page, pageCount: resultTargetPage.pageCount, columns: size.columns - 6 }) : null, partial && hasPreservedTarget && resultTargets.some((target) => target.state === 'skipped') ? _jsx(StaticRow, { title: "\u672A\u6267\u884C\u7684\u76EE\u6807\u6CA1\u6709\u5199\u5165\uFF1B\u5DF2\u5B8C\u6210\u6216\u5DF2\u4FDD\u7559\u7684\u76EE\u6807\u4FDD\u6301\u53EF\u7528\u3002", status: "muted", compact: true }) : null, configOperation && partial && !invalidConfigResult ? _jsx(Callout, { status: "warning", title: "\u6062\u590D\u6307\u5F15", description: "\u5DF2\u4FDD\u5B58\u7684\u8BBE\u7F6E\u5C42\u4E0D\u4F1A\u91CD\u5199\u3002\u5931\u8D25\u7684\u4FDD\u5B58\u5C42\u4FDD\u7559\u8349\u7A3F\uFF1B\u5E94\u7528\u5931\u8D25\u65F6\u53EA\u91CD\u8BD5\u5E94\u7528\u3002" }) : null, resultSummary?.elapsedMs !== undefined ? _jsx(StaticRow, { title: "\u5DF2\u7528\u65F6", meta: `${Math.floor(resultSummary.elapsedMs / 1_000)}s` }) : null, visibleMessages.map((message, index) => _jsx(StaticRow, { title: productResultMessage(message), status: "muted", compact: true }, `${index}:${message}`))] }), _jsx(SemanticRows, { actions: actions, focus: focus, kind: "action", compact: true, offset: resultActionViewport.offset, limit: resultActionViewport.limit })] });
9501
+ ? _jsx(Pager, { page: portableSkillPage.page, pageCount: portableSkillPage.pageCount, columns: size.columns - 2 }) : null, _jsx(SemanticRows, { actions: actions, focus: focus, kind: "action", compact: true, offset: resultActionViewport.offset, limit: resultActionViewport.limit })] }) : _jsxs(Box, { flexDirection: "column", children: [_jsxs(ResultCard, { status: resultStatus, title: blockedDependencyFailure ? '依赖安装没有完成'
9502
+ : blocked ? result.writeMayHaveCompleted ? '结果未确认' : '操作未完成'
9503
+ : sourceOperation ? '来源配置写入已完成'
9504
+ : dependencyTargets ? partial ? '依赖安装没有全部完成' : '操作已完成'
9505
+ : resultSummary?.message ?? '状态已变化,请重新确认', meta: resultTargets.length > 0 ? `${resultTargets.length} 个目标` : undefined, children: [resetDispositionText ? _jsx(StaticRow, { title: resetDispositionText, status: "success", compact: true }) : null, visibleResultRows, resultTargetPage.pageCount > 1 ? _jsx(Pager, { page: resultTargetPage.page, pageCount: resultTargetPage.pageCount, columns: size.columns - 6 }) : null, partial && hasPreservedTarget && resultTargets.some((target) => target.state === 'skipped')
9506
+ ? _jsx(StaticRow, { title: "\u672A\u6267\u884C\u7684\u76EE\u6807\u6CA1\u6709\u5199\u5165\uFF1B\u5DF2\u5B8C\u6210\u6216\u5DF2\u4FDD\u7559\u7684\u76EE\u6807\u4FDD\u6301\u53EF\u7528\u3002", status: "muted", compact: true }) : null, configOperation && partial && !invalidConfigResult && configRetries.length > 0
9507
+ ? _jsx(Callout, { status: "warning", title: "\u6062\u590D\u6307\u5F15", description: "\u9009\u62E9\u201C\u91CD\u8BD5\u5E94\u7528\u201D\u53EF\u4EE5\u91CD\u65B0\u5BA1\u9605\u672A\u5B8C\u6210\u7684\u5E73\u53F0\u3002" }) : null, resultSummary?.elapsedMs !== undefined
9508
+ ? _jsx(StaticRow, { title: "\u5DF2\u7528\u65F6", meta: `${Math.floor(resultSummary.elapsedMs / 1_000)}s` }) : null, visibleMessages.map((message, index) => _jsx(StaticRow, { title: productResultMessage(message), status: "muted", compact: true }, `${index}:${message}`))] }), _jsx(SemanticRows, { actions: actions, focus: focus, kind: "action", compact: true, offset: resultActionViewport.offset, limit: resultActionViewport.limit })] });
9429
9509
  }
9430
9510
  else if (route.name === 'pluginContent' && plugin) {
9431
9511
  const overview = props.controller.getPluginContentOverview(plugin.pluginId);