@lesliechan721/aw 0.1.0-beta.16 → 0.1.0-beta.18

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.
@@ -237,6 +237,7 @@ export interface OperationEvidence {
237
237
  };
238
238
  targetFingerprint?: string;
239
239
  offlineCleanup?: OfflineCleanupTargetEvidence;
240
+ offlineCleanupPlans?: OfflineCleanupTargetEvidence[];
240
241
  dependencyPlan?: ReconcileOperationPlan;
241
242
  codexReconcilePlans?: CodexReconcilePlan[];
242
243
  operationPlan?: OperationPlan;
@@ -1485,13 +1485,19 @@ export class TuiController {
1485
1485
  };
1486
1486
  try {
1487
1487
  const evidence = await this.#trackRead(this.dependencies.captureEvidence(intent, this.#abort.signal));
1488
- const candidate = evidence.offlineCleanup;
1489
- if (candidate?.forceExclusive !== true
1490
- || candidate.pluginId !== pluginId
1488
+ const candidate = (evidence.offlineCleanupPlans
1489
+ ?? (evidence.offlineCleanup ? [evidence.offlineCleanup] : [])).find((entry) => entry.pluginId === pluginId
1490
+ && entry.platform === platform
1491
+ && entry.scope === scope);
1492
+ if (!evidence.operationPlan
1493
+ || !candidate
1491
1494
  || candidate.platform !== platform
1492
1495
  || candidate.scope !== scope
1493
- || candidate.plan.actions.length === 0)
1496
+ || (candidate.forceExclusive !== true && candidate.plan.actions.length > 0)
1497
+ || (candidate.plan.actions.length === 0
1498
+ && !evidence.operationPlan.intentChanges.some((change) => change.scope === scope))) {
1494
1499
  return undefined;
1500
+ }
1495
1501
  return cloneFrozen({ pluginId, platform, scope, actionCount: candidate.plan.actions.length });
1496
1502
  }
1497
1503
  catch (error) {
@@ -1500,9 +1506,6 @@ export class TuiController {
1500
1506
  }
1501
1507
  }
1502
1508
  startForceCleanupReview(candidate) {
1503
- if (candidate.actionCount <= 0) {
1504
- throw new TuiOperationBlockedError('forceCleanupPathUnavailable', '没有可验证的精确清理目标。');
1505
- }
1506
1509
  return this.startReviewPreparation({
1507
1510
  kind: 'pluginWrite',
1508
1511
  action: 'cleanup',