@lesliechan721/aw 0.1.0-beta.35 → 0.1.0-beta.37
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/operation-plan.d.ts +19 -0
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +1 -0
- package/dist/src/commands/rebuild-command.js +890 -8
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +12 -0
- package/dist/src/commands/rebuild-integration.js +88 -2
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/status-v6.js +109 -19
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/wizard.d.ts +5 -1
- package/dist/src/commands/wizard.js +4 -2
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.js +3 -0
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/index.js +57 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/tui/components.d.ts +20 -1
- package/dist/src/tui/components.js +41 -20
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +1323 -1165
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.js +18 -2
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +3 -0
- package/dist/src/tui/controller.js +57 -8
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.js +16 -19
- package/dist/src/tui/dependency-graph.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +55 -0
- package/dist/src/tui/entity-cards.js +220 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/input-display.js +10 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/model.d.ts +2 -0
- package/dist/src/tui/model.js +10 -2
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +2 -18
- package/dist/src/tui/operation-diagnostic-screens.js +16 -69
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-review-planner.js +44 -3
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/plugin-content.d.ts +8 -0
- package/dist/src/tui/plugin-content.js +409 -65
- package/dist/src/tui/plugin-content.js.map +1 -1
- package/dist/src/tui/plugin-detail.d.ts +52 -0
- package/dist/src/tui/plugin-detail.js +165 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +37 -0
- package/dist/src/tui/reader.js +47 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +10 -0
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +2 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/wizard.js +26 -4
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +1 -0
- package/dist/src/utils/local-marketplace.js +22 -0
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/package.json +4 -4
|
@@ -11,6 +11,7 @@ import type { OperationPlan } from '../commands/operation-plan.js';
|
|
|
11
11
|
import type { RebuildProgressFeed, RebuildProgressSnapshot } from '../output/rebuild-progress.js';
|
|
12
12
|
import { type ConfigPageViewModel, type ConfigGroupViewModel, type InstallPlacementDraftViewModel, type PluginListItemViewModel, type PluginDependencyOverviewViewModel, type PortableSkillSelectionViewModel, type SourceHealthViewModel, type SourceDetailViewModel, type TuiViewModel, type UserIssueCategory, type UserIssueViewModel } from './model.js';
|
|
13
13
|
import type { PluginContentOverview } from './plugin-content.js';
|
|
14
|
+
import { type PluginDetailSubject } from './plugin-detail.js';
|
|
14
15
|
import { OperationHistoryStore, type OperationDiagnosticDetail, type OperationEffectFacts, type OperationHistorySummary, type OperationReportPreview, type SafeOperationDiagnostic, type SaveOperationReportResult } from './operation-history.js';
|
|
15
16
|
import { type ProjectInventoryRoot, type ProjectInventoryViewModel } from './project-inventory.js';
|
|
16
17
|
import { type ConfigInvalidStoreEvidence, type PluginInstallFilter, type PortableBlockerCode, type TuiPageContext, type TuiRoute, type TuiRouterSnapshot } from './router.js';
|
|
@@ -292,6 +293,7 @@ export interface OperationEvidence {
|
|
|
292
293
|
targetFingerprint?: string;
|
|
293
294
|
offlineCleanup?: OfflineCleanupTargetEvidence;
|
|
294
295
|
offlineCleanupPlans?: OfflineCleanupTargetEvidence[];
|
|
296
|
+
removedPluginCleanupIds?: string[];
|
|
295
297
|
dependencyPlan?: ReconcileOperationPlan;
|
|
296
298
|
codexReconcilePlans?: CodexReconcilePlan[];
|
|
297
299
|
operationPlan?: OperationPlan;
|
|
@@ -896,6 +898,7 @@ export declare class TuiController {
|
|
|
896
898
|
installFilter?: PluginInstallFilter;
|
|
897
899
|
}): PluginListItemViewModel[];
|
|
898
900
|
getPluginOverview(pluginId: string): PluginListItemViewModel | undefined;
|
|
901
|
+
getPluginDetailSubject(pluginId: string): PluginDetailSubject | undefined;
|
|
899
902
|
getPluginContentOverview(pluginId: string): PluginContentOverview | undefined;
|
|
900
903
|
getPluginContentState(pluginId: string): 'idle' | 'loading' | 'ready';
|
|
901
904
|
loadPluginContent(pluginId: string): Promise<void>;
|
|
@@ -6,6 +6,7 @@ import { buildRebuildReceiptJson, requestedIntentAction } from '../output/comman
|
|
|
6
6
|
import { buildOperationResultModel } from '../commands/operation-planner.js';
|
|
7
7
|
import { buildOperationReviewProjection } from './operation-review-planner.js';
|
|
8
8
|
import { buildTuiViewModel, dependencyPlacementTargets, } from './model.js';
|
|
9
|
+
import { buildPluginDetailSubject } from './plugin-detail.js';
|
|
9
10
|
import { safeDiagnosticCode, sanitizeDiagnosticText } from './diagnostics.js';
|
|
10
11
|
import { projectExecutionDiagnostics, projectThrownOperationDiagnostic } from './diagnostic-projection.js';
|
|
11
12
|
import { OperationHistoryStore, } from './operation-history.js';
|
|
@@ -37,7 +38,10 @@ export function pluginWriteBatchTargets(action, pluginIds, statusTargets) {
|
|
|
37
38
|
const activation = statusTargetActivation(target);
|
|
38
39
|
const hasManagedOutput = ownership !== 'absent';
|
|
39
40
|
const hasCleanupEvidence = ownership === 'present' || ownership === 'partial'
|
|
40
|
-
|| intent.relation === 'managed'
|
|
41
|
+
|| intent.relation === 'managed'
|
|
42
|
+
|| target.reasons.some((reason) => reason.code === 'removedPluginCleanupRequired')
|
|
43
|
+
|| (target.platform === 'codex' && activation?.evidence === 'observed'
|
|
44
|
+
&& (activation.user !== undefined || activation.project !== undefined));
|
|
41
45
|
if (action === 'sync' || action === 'reinstall') {
|
|
42
46
|
intent.scopes.forEach((scope) => add(target, scope));
|
|
43
47
|
if (hasManagedOutput)
|
|
@@ -62,9 +66,9 @@ export function pluginWriteBatchTargets(action, pluginIds, statusTargets) {
|
|
|
62
66
|
else if (hasCleanupEvidence) {
|
|
63
67
|
add(target, target.scope);
|
|
64
68
|
if (target.platform === 'codex') {
|
|
65
|
-
if (activation?.user
|
|
69
|
+
if (activation?.user !== undefined)
|
|
66
70
|
add(target, 'user');
|
|
67
|
-
if (activation?.project
|
|
71
|
+
if (activation?.project !== undefined)
|
|
68
72
|
add(target, 'project');
|
|
69
73
|
}
|
|
70
74
|
}
|
|
@@ -1214,7 +1218,16 @@ export class TuiController {
|
|
|
1214
1218
|
});
|
|
1215
1219
|
}
|
|
1216
1220
|
#normalizeRoute(route) {
|
|
1217
|
-
|
|
1221
|
+
const state = this.#routeEntityState();
|
|
1222
|
+
if (route.name === 'pluginDetail' || route.name === 'pluginPreview'
|
|
1223
|
+
|| route.name === 'pluginDependencies' && route.view !== 'removeBlocked'
|
|
1224
|
+
|| route.name === 'pluginDependencyNode') {
|
|
1225
|
+
return normalizeTuiRoute(route, {
|
|
1226
|
+
...state,
|
|
1227
|
+
hasPlugin: (pluginId) => this.getPluginDetailSubject(pluginId) !== undefined,
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
return normalizeTuiRoute(route, state);
|
|
1218
1231
|
}
|
|
1219
1232
|
#routeEntityState() {
|
|
1220
1233
|
return {
|
|
@@ -2540,6 +2553,20 @@ export class TuiController {
|
|
|
2540
2553
|
const plugin = this.#viewModel?.plugins.find((entry) => entry.pluginId === pluginId);
|
|
2541
2554
|
return plugin ? cloneFrozen(plugin) : undefined;
|
|
2542
2555
|
}
|
|
2556
|
+
getPluginDetailSubject(pluginId) {
|
|
2557
|
+
if (!this.#status || !this.#viewModel)
|
|
2558
|
+
return undefined;
|
|
2559
|
+
const subject = buildPluginDetailSubject({
|
|
2560
|
+
pluginId,
|
|
2561
|
+
status: this.#status.payload,
|
|
2562
|
+
pluginSummaries: this.#status.pluginSummaries,
|
|
2563
|
+
targetRevisions: this.#status.targetRevisions,
|
|
2564
|
+
plugins: this.#viewModel.plugins,
|
|
2565
|
+
projectInventory: this.#projectInventory,
|
|
2566
|
+
dependencyOverviews: this.#status.dependencyOverviews,
|
|
2567
|
+
});
|
|
2568
|
+
return subject ? cloneFrozen(subject) : undefined;
|
|
2569
|
+
}
|
|
2543
2570
|
getPluginContentOverview(pluginId) {
|
|
2544
2571
|
const overview = this.#viewModel?.contentOverviews[pluginId];
|
|
2545
2572
|
return overview ? cloneFrozen(overview) : undefined;
|
|
@@ -2577,6 +2604,10 @@ export class TuiController {
|
|
|
2577
2604
|
pluginVersion: '待确认',
|
|
2578
2605
|
catalogVersion: '待确认',
|
|
2579
2606
|
evidence: 'unavailable',
|
|
2607
|
+
coverage: 'unavailable',
|
|
2608
|
+
coverageIssue: {
|
|
2609
|
+
code: 'unreadable', message: '当前无法安全读取这个插件的内容。',
|
|
2610
|
+
},
|
|
2580
2611
|
items: [],
|
|
2581
2612
|
notices: ['当前无法安全读取这个插件的内容。'],
|
|
2582
2613
|
});
|
|
@@ -2603,7 +2634,20 @@ export class TuiController {
|
|
|
2603
2634
|
}))].sort((left, right) => left.localeCompare(right, 'en')));
|
|
2604
2635
|
}
|
|
2605
2636
|
listPluginWriteBatchTargets(action, pluginIds) {
|
|
2606
|
-
|
|
2637
|
+
const targets = pluginWriteBatchTargets(action, pluginIds, flattenStatusTargets(this.#status?.payload.targets ?? []));
|
|
2638
|
+
if (action === 'cleanup') {
|
|
2639
|
+
for (const plugin of this.#viewModel?.plugins ?? []) {
|
|
2640
|
+
if (!pluginIds.includes(plugin.pluginId) || !plugin.configOnly
|
|
2641
|
+
|| targets.some((target) => target.pluginId === plugin.pluginId))
|
|
2642
|
+
continue;
|
|
2643
|
+
targets.push({
|
|
2644
|
+
pluginId: plugin.pluginId,
|
|
2645
|
+
platform: 'codex',
|
|
2646
|
+
scope: plugin.savedConfigScopes[0] ?? 'user',
|
|
2647
|
+
});
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
return cloneFrozen(targets);
|
|
2607
2651
|
}
|
|
2608
2652
|
listPluginInstallBatchTargets(pluginIds, platform, scope) {
|
|
2609
2653
|
const platforms = platform === 'both' ? ['codex', 'claude'] : [platform];
|
|
@@ -2621,14 +2665,14 @@ export class TuiController {
|
|
|
2621
2665
|
&& activation[scope] === true);
|
|
2622
2666
|
});
|
|
2623
2667
|
const exactOwnership = exactTarget ? statusTargetOwnershipState(exactTarget) : 'absent';
|
|
2668
|
+
if (plugin?.catalogEntryMissing) {
|
|
2669
|
+
return { ...target, state: 'blocked', reason: '来源中没有可信插件定义' };
|
|
2670
|
+
}
|
|
2624
2671
|
if (alreadyConfigured || exactOwnership === 'present' || exactOwnership === 'partial') {
|
|
2625
2672
|
return { ...target, state: 'existing' };
|
|
2626
2673
|
}
|
|
2627
2674
|
if (!plugin)
|
|
2628
2675
|
return { ...target, state: 'blocked', reason: '插件已不在当前状态中' };
|
|
2629
|
-
if (plugin.configOnly) {
|
|
2630
|
-
return { ...target, state: 'blocked', reason: '来源中没有可信插件定义' };
|
|
2631
|
-
}
|
|
2632
2676
|
if (plugin.sourceUnavailable) {
|
|
2633
2677
|
return { ...target, state: 'blocked', reason: '插件来源不可用' };
|
|
2634
2678
|
}
|
|
@@ -2709,6 +2753,11 @@ export class TuiController {
|
|
|
2709
2753
|
const plugin = this.#viewModel?.plugins.find((entry) => entry.pluginId === pluginId);
|
|
2710
2754
|
if (!plugin)
|
|
2711
2755
|
return [];
|
|
2756
|
+
if (plugin.catalogEntryMissing) {
|
|
2757
|
+
return plugin.supportedPlatforms.map((platform) => ({
|
|
2758
|
+
platform, compatible: false, disabled: '来源中没有可信插件定义',
|
|
2759
|
+
}));
|
|
2760
|
+
}
|
|
2712
2761
|
if (plugin.aggregateStatus === 'unavailable') {
|
|
2713
2762
|
return plugin.supportedPlatforms.map((platform) => ({
|
|
2714
2763
|
platform,
|