@lesliechan721/aw 0.1.0-beta.93 → 0.1.0-beta.94
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.
- package/dist/src/commands/deployment-confirmation.js +13 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -1
- package/dist/src/commands/offline-cleanup-evidence.d.ts +1 -1
- package/dist/src/commands/offline-cleanup-evidence.js +30 -31
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +5 -0
- package/dist/src/commands/operation-plan.js +2 -0
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/public-lifecycle-result.js +16 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -1
- package/dist/src/commands/public-lifecycle.js +3 -1
- package/dist/src/commands/public-lifecycle.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +9 -16
- package/dist/src/commands/rebuild-command.js +149 -92
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +1 -0
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +1 -0
- package/dist/src/commands/rebuild-platform-integration.js +26 -15
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
- package/dist/src/commands/status-v6.js +7 -4
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/platforms/contracts.d.ts +23 -1
- package/dist/src/platforms/discovery.d.ts +2 -0
- package/dist/src/platforms/discovery.js.map +1 -1
- package/dist/src/platforms/inspection-native.d.ts +4 -2
- package/dist/src/platforms/inspection-native.js +228 -24
- package/dist/src/platforms/inspection-native.js.map +1 -1
- package/dist/src/platforms/layout.js +15 -0
- package/dist/src/platforms/layout.js.map +1 -1
- package/dist/src/platforms/lifecycle-native-services.js +68 -2
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -1
- package/dist/src/platforms/lifecycle-native.js +12 -1
- package/dist/src/platforms/lifecycle-native.js.map +1 -1
- package/dist/src/platforms/lifecycle.d.ts +3 -1
- package/dist/src/platforms/lifecycle.js +133 -12
- package/dist/src/platforms/lifecycle.js.map +1 -1
- package/dist/src/platforms/retirement-native.d.ts +6 -0
- package/dist/src/platforms/retirement-native.js +95 -0
- package/dist/src/platforms/retirement-native.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +2 -0
- package/dist/src/recovery/receipt.js.map +1 -1
- package/dist/src/recovery/retirement.js +58 -22
- package/dist/src/recovery/retirement.js.map +1 -1
- package/dist/src/recovery/status.js +12 -2
- package/dist/src/recovery/status.js.map +1 -1
- package/dist/src/tui/catalog-generation.d.ts +4 -1
- package/dist/src/tui/catalog-generation.js +34 -0
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +50 -13
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +16 -8
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +2 -1
- package/dist/src/tui/controller.js +14 -5
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/deployment-view.d.ts +1 -0
- package/dist/src/tui/deployment-view.js +21 -3
- package/dist/src/tui/deployment-view.js.map +1 -1
- package/dist/src/tui/entity-cards.js +7 -1
- package/dist/src/tui/entity-cards.js.map +1 -1
- package/dist/src/tui/model.d.ts +6 -1
- package/dist/src/tui/model.js +18 -5
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/scoped-inventory.d.ts +9 -1
- package/dist/src/tui/scoped-inventory.js +16 -1
- package/dist/src/tui/scoped-inventory.js.map +1 -1
- package/dist/src/utils/catalog-source-references.d.ts +37 -1
- package/dist/src/utils/catalog-source-references.js +361 -94
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +3 -0
- package/dist/src/utils/codex-config.js +7 -0
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +2 -0
- package/dist/src/utils/local-marketplace.js +12 -0
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/package.json +3 -3
|
@@ -34,7 +34,7 @@ import { agentLabel, platformLabel, scopeLabel, recoveryReason } from './glossar
|
|
|
34
34
|
import { skillInvocationNotices, skillInvocationProductLabel } from '../output/skill-invocation-notices.js';
|
|
35
35
|
import { hasComponentDeliveryNotice, isDeliveryNoticeCode, isInstallationAdvisory } from '../output/component-delivery.js';
|
|
36
36
|
import { describeSkillInvocationControl, SKILL_INVOCATION_NOTICE } from '../utils/skill-invocation-warning.js';
|
|
37
|
-
import { deploymentPlanLines, deploymentResultLines, deploymentObservationLines, deploymentExclusionLines, componentDeliveryLines, deliveryNoticeText } from './deployment-view.js';
|
|
37
|
+
import { deploymentPlanLines, deploymentResultLines, deploymentObservationLines, deploymentExclusionLines, componentDeliveryLines, deliveryNoticeText, sharedNativeRetirementImpact } from './deployment-view.js';
|
|
38
38
|
import { inventoryRecoveryActions, projectDeploymentNotices, projectDeploymentReceipt, projectDeploymentObservation } from '../commands/public-lifecycle-result.js';
|
|
39
39
|
import { InputDisplay, removeLastGrapheme } from './input-display.js';
|
|
40
40
|
import { QueryHeader, querySearchWidth } from './query-header.js';
|
|
@@ -88,6 +88,10 @@ function scopedRiskReasons(plan) {
|
|
|
88
88
|
if (plan.kind === 'retire')
|
|
89
89
|
return [
|
|
90
90
|
...(plan.plan.options.deleteConfig ? ['本次会删除此插件的全部本机设置(通用与各 Agent),影响所有项目。'] : []),
|
|
91
|
+
...new Set(scopedDeploymentPlans(plan).flatMap((deployment) => {
|
|
92
|
+
const impact = sharedNativeRetirementImpact(deployment);
|
|
93
|
+
return impact ? [impact] : [];
|
|
94
|
+
})),
|
|
91
95
|
...(plan.scope === 'user' && plan.plan.plannedImpact.outputs
|
|
92
96
|
? ['本次会清理个人原生输出,可能影响其他项目。'] : []),
|
|
93
97
|
];
|
|
@@ -4704,10 +4708,14 @@ export function ConsoleAppV4(props) {
|
|
|
4704
4708
|
}
|
|
4705
4709
|
else if (flow.stage === 'recoveryScope') {
|
|
4706
4710
|
title = flow.command === 'uninstall' ? '选择卸载范围' : '选择清理范围';
|
|
4707
|
-
description = '
|
|
4711
|
+
description = flow.command === 'retire'
|
|
4712
|
+
? '选择要清理的范围;共享影响将在操作汇总中列出。'
|
|
4713
|
+
: '确认变化后处理此范围,保留其他范围仍需要的内容。';
|
|
4708
4714
|
actions = flow.scopes.map((selectedScope) => ({ label: scopeLabel(selectedScope),
|
|
4709
|
-
status: 'error', run: () =>
|
|
4710
|
-
|
|
4715
|
+
status: 'error', run: () => flow.command === 'retire'
|
|
4716
|
+
? beginScopedTask({ kind: 'retire', selector: flow.selector, scope: selectedScope, deleteConfig: flow.deleteConfig })
|
|
4717
|
+
: beginScopedTask({ kind: 'recovery', command: flow.command,
|
|
4718
|
+
scope: selectedScope, selectors: flow.selectors ?? [flow.selector] }) }));
|
|
4711
4719
|
content = _jsx(SemanticRows, { actions: actions, focus: flow.focus, kind: "action", compact: true });
|
|
4712
4720
|
}
|
|
4713
4721
|
else if (flow.stage === 'intentScope') {
|
|
@@ -4926,8 +4934,8 @@ export function ConsoleAppV4(props) {
|
|
|
4926
4934
|
? [{ actionId: 'inventory-remove-demand', label: '移除此插件需求(保留安装)',
|
|
4927
4935
|
run: () => beginScopedTask({ kind: 'intent', action: 'remove', scope: route.scope,
|
|
4928
4936
|
selector: activeRoot.pluginId }) }] : []),
|
|
4929
|
-
...(activeRoot &&
|
|
4930
|
-
&& activeRoot.blockers?.some((blocker) => blocker.code === 'pluginUnavailable')
|
|
4937
|
+
...(activeRoot?.retirementCandidate && (section === 'extraInstalled'
|
|
4938
|
+
|| activeRoot.sourceState === 'ready' && activeRoot.blockers?.some((blocker) => blocker.code === 'pluginUnavailable'))
|
|
4931
4939
|
? [{ actionId: 'inventory-retire', label: '停用已移除插件(保留设置)',
|
|
4932
4940
|
run: () => beginScopedTask({ kind: 'retire', scope: route.scope,
|
|
4933
4941
|
selector: activeRoot.pluginId, deleteConfig: false }) },
|
|
@@ -5110,7 +5118,8 @@ export function ConsoleAppV4(props) {
|
|
|
5110
5118
|
name: item.displayName,
|
|
5111
5119
|
sourceLabel: item.sourceLabel,
|
|
5112
5120
|
description: item.configOnly
|
|
5113
|
-
? '
|
|
5121
|
+
? item.retirementCandidate ? '插件已下架;可以查看或显式清理已保存设置。'
|
|
5122
|
+
: '来源当前没有这个插件;可以查看已保存设置或定点重置设置层。'
|
|
5114
5123
|
: item.description,
|
|
5115
5124
|
placementSummary: (() => {
|
|
5116
5125
|
const subject = props.controller.getPluginDetailSubject(item.pluginId);
|
|
@@ -6424,10 +6433,10 @@ export function ConsoleAppV4(props) {
|
|
|
6424
6433
|
context = `${plugin.sourceLabel}${plugin.version ? ` · ${plugin.version}` : ''}`;
|
|
6425
6434
|
title = plugin.displayName;
|
|
6426
6435
|
description = '';
|
|
6427
|
-
const updateTaskCandidates = plugin.configOnly ? []
|
|
6436
|
+
const updateTaskCandidates = plugin.configOnly || plugin.retirementCandidate ? []
|
|
6428
6437
|
: props.controller.listPluginWriteTaskCandidates('update')
|
|
6429
6438
|
.filter((candidate) => candidate.target.pluginId === plugin.pluginId);
|
|
6430
|
-
const restoreTaskCandidates = plugin.configOnly ? []
|
|
6439
|
+
const restoreTaskCandidates = plugin.configOnly || plugin.retirementCandidate ? []
|
|
6431
6440
|
: props.controller.listPluginWriteTaskCandidates('restore')
|
|
6432
6441
|
.filter((candidate) => candidate.target.pluginId === plugin.pluginId);
|
|
6433
6442
|
const updateAction = updateTaskCandidates.length > 0 ? {
|
|
@@ -6477,7 +6486,7 @@ export function ConsoleAppV4(props) {
|
|
|
6477
6486
|
description: '当前插件设置问题需要先完成或修正设置',
|
|
6478
6487
|
status: 'warning',
|
|
6479
6488
|
run: () => go({ name: 'issueDetail', issueId: configIssue.issueId }),
|
|
6480
|
-
} : plugin.aggregateStatus === 'unavailable'
|
|
6489
|
+
} : plugin.retirementCandidate ? undefined : plugin.aggregateStatus === 'unavailable'
|
|
6481
6490
|
? plugin.capabilityUnsupported && !plugin.sourceUnavailable ? {
|
|
6482
6491
|
label: '需要升级 AW CLI',
|
|
6483
6492
|
description: '查看缺少的功能和安全恢复方向',
|
|
@@ -6556,7 +6565,7 @@ export function ConsoleAppV4(props) {
|
|
|
6556
6565
|
: '当前没有已声明的所需插件或使用者',
|
|
6557
6566
|
run: () => go({ name: 'pluginDependencies', pluginId: plugin.pluginId }),
|
|
6558
6567
|
} : undefined;
|
|
6559
|
-
const uninstallAction = installed ? {
|
|
6568
|
+
const uninstallAction = installed && !plugin.retirementCandidate ? {
|
|
6560
6569
|
actionId: 'uninstall',
|
|
6561
6570
|
label: '卸载',
|
|
6562
6571
|
description: plugin.installedPlacements.length === 1
|
|
@@ -6585,7 +6594,32 @@ export function ConsoleAppV4(props) {
|
|
|
6585
6594
|
go({ name: 'uninstallTargets', pluginId: plugin.pluginId });
|
|
6586
6595
|
},
|
|
6587
6596
|
} : undefined;
|
|
6588
|
-
const
|
|
6597
|
+
const retirementScopes = plugin.retirementCandidate ? ['user', 'project'].filter((candidate) => {
|
|
6598
|
+
const inventory = snapshot.scopedInventories[candidate];
|
|
6599
|
+
return detailSubject.declarations[candidate].state === 'declared'
|
|
6600
|
+
|| detailSubject.placements.some((placement) => placement.scope === candidate)
|
|
6601
|
+
|| [...(inventory?.declaredRoots ?? []), ...(inventory?.extraInstalledRoots ?? [])].some((root) => root.pluginId === plugin.pluginId)
|
|
6602
|
+
|| props.controller.listPluginWriteBatchTargets('cleanup', [plugin.pluginId]).some((target) => target.scope === candidate);
|
|
6603
|
+
}) : [];
|
|
6604
|
+
const cleanupScopes = retirementScopes.length ? retirementScopes : plugin.savedConfigScopes;
|
|
6605
|
+
const beginRetirement = (deleteConfig) => {
|
|
6606
|
+
if (cleanupScopes.length === 1) {
|
|
6607
|
+
beginScopedTask({ kind: 'retire', selector: plugin.pluginId, scope: cleanupScopes[0], deleteConfig });
|
|
6608
|
+
}
|
|
6609
|
+
else {
|
|
6610
|
+
setScopedFlow({ stage: 'recoveryScope', scope, selector: plugin.pluginId, command: 'retire',
|
|
6611
|
+
deleteConfig, scopes: cleanupScopes, focus: 0 });
|
|
6612
|
+
}
|
|
6613
|
+
};
|
|
6614
|
+
const cleanupAction = plugin.retirementCandidate ? {
|
|
6615
|
+
actionId: 'cleanup',
|
|
6616
|
+
label: plugin.configOnly ? '清理已删除插件并删除设置' : '清理已删除插件',
|
|
6617
|
+
description: plugin.configOnly ? '显式删除全部本机设置;确认前不会写入'
|
|
6618
|
+
: '预览所选范围的全部残留;默认保留设置',
|
|
6619
|
+
disabled: cleanupScopes.length ? undefined : '当前无法确认残留范围,请重新检查',
|
|
6620
|
+
status: 'error',
|
|
6621
|
+
run: () => beginRetirement(plugin.configOnly === true),
|
|
6622
|
+
} : plugin.configOnly
|
|
6589
6623
|
|| plugin.removedPluginCleanupRequired ? {
|
|
6590
6624
|
actionId: 'cleanup',
|
|
6591
6625
|
label: plugin.removedPluginCleanupRequired ? '清理已删除插件' : '检查并清理插件残留',
|
|
@@ -6605,7 +6639,7 @@ export function ConsoleAppV4(props) {
|
|
|
6605
6639
|
actions = dedupeActions([
|
|
6606
6640
|
...(exceptionalAction ? [{ ...exceptionalAction, actionId: 'exceptional' }] : []),
|
|
6607
6641
|
...(restoreAction ? [{ ...restoreAction, actionId: 'restore' }] : []),
|
|
6608
|
-
...(hasPortablePlacement && !restoreAction ? [{ actionId: 'sync', label: '同步并修复…',
|
|
6642
|
+
...(hasPortablePlacement && !plugin.retirementCandidate && !restoreAction ? [{ actionId: 'sync', label: '同步并修复…',
|
|
6609
6643
|
run: () => beginScopedTask({ kind: 'recovery', command: 'sync',
|
|
6610
6644
|
scope: detailSubject.placements.some((placement) => placement.scope === 'project')
|
|
6611
6645
|
|| detailSubject.declarations.project.state === 'declared' ? 'project' : 'user',
|
|
@@ -6639,6 +6673,9 @@ export function ConsoleAppV4(props) {
|
|
|
6639
6673
|
...(dependencyAction ? [dependencyAction] : []),
|
|
6640
6674
|
...(uninstallAction ? [uninstallAction] : []),
|
|
6641
6675
|
...(cleanupAction ? [cleanupAction] : []),
|
|
6676
|
+
...(plugin.retirementCandidate && !plugin.configOnly && plugin.savedConfigScopes.length > 0
|
|
6677
|
+
? [{ actionId: 'cleanup-config', label: '清理已删除插件并删除设置', status: 'error',
|
|
6678
|
+
run: () => beginRetirement(true) }] : []),
|
|
6642
6679
|
{
|
|
6643
6680
|
actionId: 'more',
|
|
6644
6681
|
label: '更多操作',
|