@lesliechan721/aw 0.1.0-beta.11 → 0.1.0-beta.12

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 (52) hide show
  1. package/dist/authoring/scripts/validate-plugin.mjs +33 -42
  2. package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
  3. package/dist/src/commands/operation-planner.js +11 -1
  4. package/dist/src/commands/operation-planner.js.map +1 -1
  5. package/dist/src/commands/rebuild-command.d.ts +12 -0
  6. package/dist/src/commands/rebuild-command.js +72 -17
  7. package/dist/src/commands/rebuild-command.js.map +1 -1
  8. package/dist/src/commands/rebuild-integration.d.ts +1 -0
  9. package/dist/src/commands/rebuild-integration.js +138 -41
  10. package/dist/src/commands/rebuild-integration.js.map +1 -1
  11. package/dist/src/commands/status-v6.js +6 -6
  12. package/dist/src/commands/status-v6.js.map +1 -1
  13. package/dist/src/index.js +52 -14
  14. package/dist/src/index.js.map +1 -1
  15. package/dist/src/portable/materializer.js +5 -3
  16. package/dist/src/portable/materializer.js.map +1 -1
  17. package/dist/src/tui/console-app-v4.js +1 -21
  18. package/dist/src/tui/console-app-v4.js.map +1 -1
  19. package/dist/src/tui/controller-runtime.js +165 -48
  20. package/dist/src/tui/controller-runtime.js.map +1 -1
  21. package/dist/src/tui/controller.d.ts +4 -4
  22. package/dist/src/tui/controller.js +19 -7
  23. package/dist/src/tui/controller.js.map +1 -1
  24. package/dist/src/tui/diagnostics.js +6 -6
  25. package/dist/src/tui/diagnostics.js.map +1 -1
  26. package/dist/src/tui/operation-review-planner.js +66 -19
  27. package/dist/src/tui/operation-review-planner.js.map +1 -1
  28. package/dist/src/utils/artifact-plan.d.ts +2 -2
  29. package/dist/src/utils/artifact-plan.js +8 -6
  30. package/dist/src/utils/artifact-plan.js.map +1 -1
  31. package/dist/src/utils/artifact-renderer.js +96 -77
  32. package/dist/src/utils/artifact-renderer.js.map +1 -1
  33. package/dist/src/utils/artifact-request.d.ts +5 -0
  34. package/dist/src/utils/artifact-request.js +40 -0
  35. package/dist/src/utils/artifact-request.js.map +1 -1
  36. package/dist/src/utils/plugin-config-impact.d.ts +33 -0
  37. package/dist/src/utils/plugin-config-impact.js +298 -0
  38. package/dist/src/utils/plugin-config-impact.js.map +1 -0
  39. package/dist/src/utils/plugin-config-write.d.ts +22 -2
  40. package/dist/src/utils/plugin-config-write.js +368 -104
  41. package/dist/src/utils/plugin-config-write.js.map +1 -1
  42. package/dist/src/utils/plugin-config.d.ts +10 -0
  43. package/dist/src/utils/plugin-config.js +39 -22
  44. package/dist/src/utils/plugin-config.js.map +1 -1
  45. package/dist/src/utils/plugin-scripts.js +47 -39
  46. package/dist/src/utils/plugin-scripts.js.map +1 -1
  47. package/dist/src/utils/project-boundary.js +22 -9
  48. package/dist/src/utils/project-boundary.js.map +1 -1
  49. package/dist/src/utils/sensitive-content.d.ts +3 -0
  50. package/dist/src/utils/sensitive-content.js +28 -7
  51. package/dist/src/utils/sensitive-content.js.map +1 -1
  52. package/package.json +3 -3
@@ -12,7 +12,8 @@ import { withResolvedCatalogPlugin, withResolvedMultiSourceCatalog, formatPlugin
12
12
  import { coercePluginConfigUpdates, inspectPluginConfigResetTarget, listNamespacedPluginConfigStoreIdentities, readPluginConfigStore, resolveConfigRead, resolveEffectivePluginConfig, resolvePluginConfigStorePath, } from '../utils/plugin-config.js';
13
13
  import { assertProjectSharedConfigPathVisible } from '../utils/project-boundary.js';
14
14
  import { readPluginIntentState } from '../utils/plugin-intent-state.js';
15
- import { applyPluginConfigWrite, replayConfigRuntimeWrites, resetPluginConfigWithHelper, } from '../utils/plugin-config-write.js';
15
+ import { applyPluginConfigWrite, replayConfigRuntimeWrites, resolveConfigPreApplyAuthorization, resetPluginConfigWithHelper, } from '../utils/plugin-config-write.js';
16
+ import { analyzePluginConfigMutationImpact } from '../utils/plugin-config-impact.js';
16
17
  import { createBatchIntentCompatiblePlanFingerprint } from '../commands/operation-plan.js';
17
18
  import { offlineCleanupEvidenceFromInventory, offlineCleanupEvidenceMatches, } from '../commands/offline-cleanup-evidence.js';
18
19
  import { inventoryCatalogSourceReferences } from '../utils/catalog-source-references.js';
@@ -118,18 +119,32 @@ export function configAffectedStatusTargets(targets, pluginId, configScope) {
118
119
  .sort((left, right) => `${left.platform}\0${left.scope}`
119
120
  .localeCompare(`${right.platform}\0${right.scope}`, 'en'));
120
121
  }
121
- function configSharedNativeRenderTargets(plugin, changedKeys) {
122
- const changed = changedKeys ? new Set(changedKeys) : undefined;
122
+ function configRetrySharedNativeRenderTargets(plugin) {
123
123
  return (plugin.manifest.artifacts?.targets ?? []).flatMap((target) => target.platform === 'codex'
124
124
  && target.target === 'codex.skill'
125
125
  && target.delivery.mode === 'codex-native'
126
126
  && target.skillKey
127
- && (changed
128
- ? target.refreshKeys.some((key) => changed.has(key))
129
- : target.refreshKeys.length > 0)
127
+ && target.refreshKeys.length > 0
130
128
  ? [{ id: target.id, skillKey: target.skillKey, refreshKeys: [...target.refreshKeys] }]
131
129
  : []);
132
130
  }
131
+ function configImpactVisibleTargets(pluginName, targets) {
132
+ return targets.map((target) => ({
133
+ pluginName,
134
+ platform: target.platform,
135
+ scope: target.scope,
136
+ }));
137
+ }
138
+ function configIntentRequestsApply(intent) {
139
+ if (!intent.apply)
140
+ return false;
141
+ if (intent.retryApply === true)
142
+ return true;
143
+ if (intent.changes)
144
+ return intent.changes.length > 0;
145
+ return Object.keys(intent.updates ?? {}).length > 0
146
+ || (intent.removeKeys?.length ?? 0) > 0;
147
+ }
133
148
  function operationReviewStale(message) {
134
149
  return new TuiOperationBlockedError('operationReviewStale', `operationReviewStale: ${message}`);
135
150
  }
@@ -770,10 +785,16 @@ export function createTuiControllerDependencies(context, progressFeed, options =
770
785
  if (target.kind === 'special') {
771
786
  throw new TuiOperationBlockedError('configResetTargetUnsupported', '设置目标是特殊文件系统节点,不能自动重置。请手动移动后重试。');
772
787
  }
773
- let source;
788
+ const relevantTargets = sessionStatusResult
789
+ ? configAffectedStatusTargets(sessionStatusResult.payload.targets, intent.pluginId, intent.scope)
790
+ : [];
791
+ const relevantRevisions = (sessionStatusResult?.targetRevisions ?? []).filter((revision) => relevantTargets.some((statusTarget) => statusTarget.platform === revision.platform
792
+ && statusTarget.scope === revision.scope
793
+ && statusTarget.pluginId === revision.pluginId));
794
+ let selected;
774
795
  try {
775
796
  const packageInfo = await readCliPackageInfo();
776
- source = await withResolvedCatalogPlugin({
797
+ selected = await withResolvedCatalogPlugin({
777
798
  selector: intent.pluginId,
778
799
  cliVersion: packageInfo.version,
779
800
  env: context.env,
@@ -781,16 +802,23 @@ export function createTuiControllerDependencies(context, progressFeed, options =
781
802
  ? { operationContext: sessionContextForPlugin(intent.pluginId) }
782
803
  : {}),
783
804
  ...(signal ? { signal } : {}),
784
- consume: async ({ plugin, source: resolvedSource }) => sourceEvidenceForPlugin(resolvedSource, plugin.manifest.name),
805
+ consume: async ({ plugin, source: resolvedSource }) => ({
806
+ source: sourceEvidenceForPlugin(resolvedSource, plugin.manifest.name),
807
+ impact: await analyzePluginConfigMutationImpact({
808
+ plugin,
809
+ scope: intent.scope,
810
+ cwd: context.cwd,
811
+ env: context.env,
812
+ visibleTargets: configImpactVisibleTargets(plugin.manifest.name, relevantTargets),
813
+ mutation: { kind: 'reset' },
814
+ }),
815
+ }),
785
816
  });
786
817
  }
787
818
  catch {
788
- source = undefined;
819
+ selected = undefined;
789
820
  }
790
821
  signal?.throwIfAborted();
791
- const relevantTargets = sessionStatusResult
792
- ? configAffectedStatusTargets(sessionStatusResult.payload.targets, intent.pluginId, intent.scope)
793
- : [];
794
822
  await preparation?.reporter.emit('evidence');
795
823
  return {
796
824
  catalog: sessionStatusResult ? {
@@ -800,11 +828,20 @@ export function createTuiControllerDependencies(context, progressFeed, options =
800
828
  configDigest: 'config-reset-offline',
801
829
  compositeDigest: 'config-reset-target',
802
830
  },
803
- ...(source ? { source } : {}),
831
+ ...(selected ? { source: selected.source } : {}),
832
+ ...(sessionStatusResult ? {
833
+ targetFingerprint: statusTargetFingerprint(relevantTargets, relevantRevisions),
834
+ } : {}),
804
835
  config: {
805
836
  scope: intent.scope,
806
- storeDigest: target.fingerprint,
807
- affectedTargets: relevantTargets.map(({ platform, scope }) => ({ platform, scope })),
837
+ storeDigest: selected?.impact.storeDigest ?? target.fingerprint,
838
+ impactState: selected?.impact.impactState ?? 'unknown',
839
+ ...(selected?.impact.noEffectiveChange ? { noEffectiveChange: true } : {}),
840
+ affectedTargets: (selected?.impact.affectedTargets
841
+ ?? relevantTargets).map(({ platform, scope }) => ({ platform, scope })),
842
+ ...((selected?.impact.sharedNativeRenderTargets.length ?? 0) > 0
843
+ ? { sharedNativeRenderTargets: selected.impact.sharedNativeRenderTargets }
844
+ : {}),
808
845
  },
809
846
  resetTarget: {
810
847
  sourceId: parsed.sourceId,
@@ -1281,12 +1318,14 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1281
1318
  if (configSnapshot.digest !== sessionStatusResult.payload.catalog.configDigest) {
1282
1319
  throw operationReviewStale('准备设置确认期间来源配置发生变化。');
1283
1320
  }
1321
+ const relevantTargets = configAffectedStatusTargets(sessionStatusResult.payload.targets, intent.pluginId, intent.scope);
1322
+ const preparedCatalogOperation = catalogOperation;
1284
1323
  const selected = await withResolvedCatalogPlugin({
1285
1324
  selector: intent.pluginId,
1286
1325
  cliVersion: packageInfo.version,
1287
1326
  configSnapshot,
1288
1327
  env: context.env,
1289
- ...(catalogOperation ? { operationContext: catalogOperation } : {}),
1328
+ operationContext: preparedCatalogOperation,
1290
1329
  ...(signal ? { signal } : {}),
1291
1330
  consume: async ({ plugin, source }) => {
1292
1331
  if (!plugin.manifest.config) {
@@ -1304,35 +1343,56 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1304
1343
  }
1305
1344
  }
1306
1345
  }
1346
+ const impact = intent.retryApply ? undefined : await analyzePluginConfigMutationImpact({
1347
+ plugin,
1348
+ scope: intent.scope,
1349
+ cwd: context.cwd,
1350
+ env: context.env,
1351
+ visibleTargets: configImpactVisibleTargets(plugin.manifest.name, relevantTargets),
1352
+ mutation: {
1353
+ kind: 'patch',
1354
+ updates: intent.updates,
1355
+ removeKeys: intent.removeKeys,
1356
+ },
1357
+ });
1358
+ const affectedTargets = intent.retryApply
1359
+ ? configImpactVisibleTargets(plugin.manifest.name, relevantTargets)
1360
+ : impact.affectedTargets;
1307
1361
  return {
1308
1362
  pluginName: plugin.manifest.name,
1309
1363
  source: sourceEvidenceForPlugin(source, plugin.manifest.name),
1310
- sharedNativeRenderTargets: intent.kind === 'configSave'
1311
- ? configSharedNativeRenderTargets(plugin, intent.retryApply
1312
- ? undefined
1313
- : [
1314
- ...Object.keys(intent.updates ?? {}),
1315
- ...(intent.removeKeys ?? []),
1316
- ])
1364
+ impact,
1365
+ preApplyAuthorization: configIntentRequestsApply(intent)
1366
+ ? (await resolveConfigPreApplyAuthorization({
1367
+ plugin,
1368
+ scope: intent.scope,
1369
+ cwd: context.cwd,
1370
+ env: context.env,
1371
+ applyTargets: affectedTargets,
1372
+ nativeCliRunner: context.nativeCliRunner,
1373
+ rebuildRuntime: {
1374
+ catalogOperationContext: preparedCatalogOperation,
1375
+ expectedGenerationSetDigest: preparedCatalogOperation.generationSetDigest,
1376
+ inventoryCatalogSourceReferences: operationInventory,
1377
+ },
1378
+ })).targets
1317
1379
  : [],
1380
+ sharedNativeRenderTargets: intent.retryApply
1381
+ ? configRetrySharedNativeRenderTargets(plugin)
1382
+ : impact.sharedNativeRenderTargets,
1318
1383
  };
1319
1384
  },
1320
1385
  });
1321
- const store = await readPluginConfigStore({
1322
- sourceId: selected.source?.sourceId ?? parsePluginId(intent.pluginId).sourceId,
1323
- ...(selected.source?.sourceIdentity
1324
- ? { sourceIdentity: selected.source.sourceIdentity }
1325
- : {}),
1326
- ...(selected.source?.logicalIdentity
1327
- ? { logicalIdentity: selected.source.logicalIdentity }
1328
- : {}),
1386
+ const retryStore = intent.retryApply ? await readPluginConfigStore({
1387
+ sourceId: selected.source.sourceId,
1388
+ sourceIdentity: selected.source.sourceIdentity,
1389
+ logicalIdentity: selected.source.logicalIdentity,
1329
1390
  pluginName: selected.pluginName,
1330
1391
  scope: intent.scope,
1331
1392
  cwd: context.cwd,
1332
1393
  env: context.env,
1333
- });
1394
+ }) : undefined;
1334
1395
  signal?.throwIfAborted();
1335
- const relevantTargets = configAffectedStatusTargets(sessionStatusResult.payload.targets, intent.pluginId, intent.scope);
1336
1396
  const relevantRevisions = (sessionStatusResult.targetRevisions ?? []).filter((revision) => relevantTargets.some((target) => target.platform === revision.platform
1337
1397
  && target.scope === revision.scope
1338
1398
  && target.pluginId === revision.pluginId));
@@ -1348,8 +1408,15 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1348
1408
  config: {
1349
1409
  scope: intent.scope,
1350
1410
  ...(selected.source?.manifestDigest ? { schemaIdentity: selected.source.manifestDigest } : {}),
1351
- storeDigest: digest({ exists: store.exists, rawDigest: store.rawDigest }),
1352
- affectedTargets: relevantTargets.map(({ platform, scope }) => ({ platform, scope })),
1411
+ storeDigest: selected.impact?.storeDigest
1412
+ ?? digest({ exists: retryStore?.exists, rawDigest: retryStore?.rawDigest }),
1413
+ impactState: selected.impact?.impactState ?? 'known',
1414
+ ...(selected.impact?.noEffectiveChange ? { noEffectiveChange: true } : {}),
1415
+ affectedTargets: (selected.impact?.affectedTargets
1416
+ ?? relevantTargets).map(({ platform, scope }) => ({ platform, scope })),
1417
+ ...(selected.preApplyAuthorization.length > 0
1418
+ ? { preApplyAuthorization: selected.preApplyAuthorization }
1419
+ : {}),
1353
1420
  ...(selected.sharedNativeRenderTargets.length > 0
1354
1421
  ? { sharedNativeRenderTargets: selected.sharedNativeRenderTargets }
1355
1422
  : {}),
@@ -1430,6 +1497,9 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1430
1497
  throw operationReviewStale('离线清理现场证据已消失或无法验证。');
1431
1498
  }
1432
1499
  }
1500
+ const configVisibleTargets = intent.kind === 'configSave'
1501
+ ? configAffectedStatusTargets(status.payload.targets, intent.pluginId, intent.scope)
1502
+ : [];
1433
1503
  const selected = offlineCleanupTarget
1434
1504
  ? {
1435
1505
  pluginName: offlineCleanupTarget.pluginName,
@@ -1464,16 +1534,48 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1464
1534
  }
1465
1535
  }
1466
1536
  }
1537
+ const impact = intent.kind === 'configSave' && !intent.retryApply
1538
+ ? await analyzePluginConfigMutationImpact({
1539
+ plugin,
1540
+ scope: intent.scope,
1541
+ cwd: context.cwd,
1542
+ env: context.env,
1543
+ visibleTargets: configImpactVisibleTargets(plugin.manifest.name, configVisibleTargets),
1544
+ mutation: {
1545
+ kind: 'patch',
1546
+ updates: intent.updates,
1547
+ removeKeys: intent.removeKeys,
1548
+ },
1549
+ })
1550
+ : undefined;
1467
1551
  return {
1468
1552
  pluginName: plugin.manifest.name,
1469
1553
  source: sourceEvidenceForPlugin(source, plugin.manifest.name),
1554
+ impact,
1555
+ preApplyAuthorization: intent.kind === 'configSave'
1556
+ && configIntentRequestsApply(intent)
1557
+ ? (await resolveConfigPreApplyAuthorization({
1558
+ plugin,
1559
+ scope: intent.scope,
1560
+ cwd: context.cwd,
1561
+ env: context.env,
1562
+ applyTargets: intent.retryApply
1563
+ ? configImpactVisibleTargets(plugin.manifest.name, configVisibleTargets)
1564
+ : impact.affectedTargets,
1565
+ nativeCliRunner: context.nativeCliRunner,
1566
+ rebuildRuntime: {
1567
+ ...(catalogOperation ? { catalogOperationContext: catalogOperation } : {}),
1568
+ ...(catalogOperation?.generationSetDigest
1569
+ ? { expectedGenerationSetDigest: catalogOperation.generationSetDigest }
1570
+ : {}),
1571
+ inventoryCatalogSourceReferences: operationInventory,
1572
+ },
1573
+ })).targets
1574
+ : [],
1470
1575
  sharedNativeRenderTargets: intent.kind === 'configSave'
1471
- ? configSharedNativeRenderTargets(plugin, intent.retryApply
1472
- ? undefined
1473
- : [
1474
- ...Object.keys(intent.updates ?? {}),
1475
- ...(intent.removeKeys ?? []),
1476
- ])
1576
+ ? intent.retryApply
1577
+ ? configRetrySharedNativeRenderTargets(plugin)
1578
+ : impact.sharedNativeRenderTargets
1477
1579
  : [],
1478
1580
  };
1479
1581
  },
@@ -1566,7 +1668,7 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1566
1668
  await preparation?.reporter.emit('evidence');
1567
1669
  signal?.throwIfAborted();
1568
1670
  const evidenceTargets = intent.kind === 'configSave'
1569
- ? configAffectedStatusTargets(status.payload.targets, intent.pluginId, intent.scope)
1671
+ ? configVisibleTargets
1570
1672
  : status.payload.targets;
1571
1673
  const evidenceRevisions = intent.kind === 'configSave'
1572
1674
  ? (status.targetRevisions ?? []).filter((revision) => evidenceTargets.some((target) => target.platform === revision.platform
@@ -1591,7 +1693,8 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1591
1693
  targetFingerprint: statusTargetFingerprint(evidenceTargets, evidenceRevisions),
1592
1694
  };
1593
1695
  if (intent.kind === 'configSave') {
1594
- const store = await readPluginConfigStore({
1696
+ const impact = 'impact' in selected ? selected.impact : undefined;
1697
+ const retryStore = intent.retryApply ? await readPluginConfigStore({
1595
1698
  sourceId: selected.source.sourceId,
1596
1699
  sourceIdentity: selected.source.sourceIdentity,
1597
1700
  ...('logicalIdentity' in selected.source
@@ -1601,15 +1704,19 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1601
1704
  scope: intent.scope,
1602
1705
  cwd: context.cwd,
1603
1706
  env: context.env,
1604
- });
1707
+ }) : undefined;
1605
1708
  signal?.throwIfAborted();
1606
1709
  evidence.config = {
1607
1710
  scope: intent.scope,
1608
1711
  ...('manifestDigest' in selected.source
1609
1712
  ? { schemaIdentity: selected.source.manifestDigest }
1610
1713
  : {}),
1611
- storeDigest: digest({ exists: store.exists, rawDigest: store.rawDigest }),
1612
- affectedTargets: evidenceTargets.map(({ platform, scope }) => ({ platform, scope })),
1714
+ storeDigest: impact?.storeDigest
1715
+ ?? digest({ exists: retryStore?.exists, rawDigest: retryStore?.rawDigest }),
1716
+ impactState: impact?.impactState ?? 'known',
1717
+ ...(impact?.noEffectiveChange ? { noEffectiveChange: true } : {}),
1718
+ affectedTargets: (impact?.affectedTargets
1719
+ ?? evidenceTargets).map(({ platform, scope }) => ({ platform, scope })),
1613
1720
  ...(intent.scope === 'project' ? {
1614
1721
  shareability: await inspectConfigShareability({
1615
1722
  sourceId: selected.source.sourceId,
@@ -1623,6 +1730,10 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1623
1730
  && selected.sharedNativeRenderTargets.length > 0
1624
1731
  ? { sharedNativeRenderTargets: selected.sharedNativeRenderTargets }
1625
1732
  : {}),
1733
+ ...('preApplyAuthorization' in selected
1734
+ && selected.preApplyAuthorization.length > 0
1735
+ ? { preApplyAuthorization: selected.preApplyAuthorization }
1736
+ : {}),
1626
1737
  };
1627
1738
  }
1628
1739
  if (catalogOperation)
@@ -2343,6 +2454,7 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2343
2454
  runtime: {
2344
2455
  ...context,
2345
2456
  awHomeMutationToken,
2457
+ preApplyConfirmed: true,
2346
2458
  inventoryCatalogSourceReferences: groupInventory,
2347
2459
  expectedCatalogConfigDigest: expectedBatch.catalog.configDigest,
2348
2460
  ...(executionPreview.operationPlan ? {
@@ -2436,6 +2548,7 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2436
2548
  ...context,
2437
2549
  ...(codexObservationSession ? { codexObservationSession } : {}),
2438
2550
  awHomeMutationToken,
2551
+ preApplyConfirmed: true,
2439
2552
  inventoryCatalogSourceReferences: operationInventory,
2440
2553
  ...(expectedEvidence.operationPlan
2441
2554
  ? { expectedPlanFingerprint: expectedEvidence.operationPlan.planFingerprint }
@@ -2490,7 +2603,7 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2490
2603
  ...(catalogOperation ? { operationContext: catalogOperation } : {}),
2491
2604
  consume: async ({ plugin, source }) => {
2492
2605
  assertSourceEvidenceMatches(currentSource, sourceEvidenceForPlugin(source, plugin.manifest.name));
2493
- const applyTargets = intent.apply
2606
+ const applyTargets = intent.retryApply || intent.apply
2494
2607
  ? currentEvidence.config?.affectedTargets.map((target) => ({
2495
2608
  pluginName: plugin.manifest.name,
2496
2609
  platform: target.platform,
@@ -2519,6 +2632,8 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2519
2632
  awHomeMutationToken,
2520
2633
  applyTargets,
2521
2634
  sharedNativeApplyConfirmed: true,
2635
+ preApplyConfirmed: true,
2636
+ preApplyAuthorizedTargets: expectedEvidence.config?.preApplyAuthorization ?? [],
2522
2637
  })
2523
2638
  : await applyPluginConfigWrite({
2524
2639
  plugin,
@@ -2543,6 +2658,8 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2543
2658
  applyTargets,
2544
2659
  request: { updates: intent.updates, removeKeys: intent.removeKeys },
2545
2660
  sharedNativeApplyConfirmed: true,
2661
+ preApplyConfirmed: true,
2662
+ preApplyAuthorizedTargets: expectedEvidence.config?.preApplyAuthorization ?? [],
2546
2663
  });
2547
2664
  return { ...result, operationRebuildResults };
2548
2665
  },