@lesliechan721/aw 0.1.0-beta.10 → 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.
- package/dist/authoring/assets/aw-config.d.mts +1 -50
- package/dist/authoring/assets/aw-config.mjs +58 -928
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +28 -33
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +229 -8
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +159 -48
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/bundle-plugins.js +18 -4
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/test-plugin-scripts.d.ts +2 -0
- package/dist/scripts/test-plugin-scripts.js +21 -5
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +1 -1
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +6 -3
- package/dist/src/commands/catalog-dev-source.js +96 -35
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +1 -1
- package/dist/src/commands/catalog-publication-inspection.js +54 -8
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.js +1 -1
- package/dist/src/commands/catalog-publication-journal.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +19 -4
- package/dist/src/commands/catalog-source.js +121 -12
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +26 -7
- package/dist/src/commands/catalog-store.js +361 -42
- package/dist/src/commands/catalog-store.js.map +1 -1
- package/dist/src/commands/console.js +28 -17
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +2 -1
- package/dist/src/commands/operation-plan.js +24 -0
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/operation-planner.d.ts +2 -2
- package/dist/src/commands/operation-planner.js +22 -20
- package/dist/src/commands/operation-planner.js.map +1 -1
- package/dist/src/commands/options.d.ts +2 -2
- package/dist/src/commands/options.js +18 -4
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +2 -2
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +19 -0
- package/dist/src/commands/rebuild-command.js +828 -283
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +25 -47
- package/dist/src/commands/rebuild-integration.js +1176 -1016
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +50 -12
- package/dist/src/commands/rebuild-operations.js +207 -101
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +21 -2
- package/dist/src/commands/status-v6.js +163 -31
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/sync-command.d.ts +17 -0
- package/dist/src/commands/sync-command.js +45 -37
- package/dist/src/commands/sync-command.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +5 -0
- package/dist/src/commands/write-commands.js +50 -3
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/generators/local-plugin.js +14 -4
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/index.js +260 -91
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.js +1 -3
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +1 -3
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/portable/materializer.js +10 -8
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/tui/catalog-generation.js +41 -1
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/session.d.ts +1 -0
- package/dist/src/tui/catalog-sources/session.js +16 -3
- package/dist/src/tui/catalog-sources/session.js.map +1 -1
- package/dist/src/tui/catalog-sources/types.d.ts +3 -2
- package/dist/src/tui/components.d.ts +4 -0
- package/dist/src/tui/components.js +36 -24
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/console-app-v4.d.ts +13 -4
- package/dist/src/tui/console-app-v4.js +2065 -857
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +731 -62
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +156 -10
- package/dist/src/tui/controller.js +1187 -163
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/diagnostic-projection.d.ts +22 -0
- package/dist/src/tui/diagnostic-projection.js +437 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +1 -1
- package/dist/src/tui/diagnostics.js +7 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/glossary.d.ts +23 -0
- package/dist/src/tui/glossary.js +42 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +4 -1
- package/dist/src/tui/index.js +4 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +34 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +12 -2
- package/dist/src/tui/model.js +128 -52
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +21 -0
- package/dist/src/tui/operation-diagnostic-screens.js +101 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +80 -0
- package/dist/src/tui/operation-history.js +130 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.js +366 -99
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/router.d.ts +82 -17
- package/dist/src/tui/router.js +186 -38
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +546 -0
- package/dist/src/tui/screen-registry.js +179 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +6 -0
- package/dist/src/tui/session-console-app.js +13 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +44 -0
- package/dist/src/tui/session-host.js +197 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/types.d.ts +64 -3
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.js +1 -1
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +2 -2
- package/dist/src/utils/artifact-plan.js +8 -6
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +2 -1
- package/dist/src/utils/artifact-renderer.js +139 -120
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +5 -0
- package/dist/src/utils/artifact-request.js +40 -0
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +4 -4
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-generation-resolver.d.ts +14 -2
- package/dist/src/utils/catalog-generation-resolver.js +49 -27
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +8 -1
- package/dist/src/utils/catalog-generation-service.js +81 -47
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +1 -0
- package/dist/src/utils/catalog-generation-store.js +60 -5
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-operation-context.js +1 -0
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +4 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +3 -2
- package/dist/src/utils/catalog-source-impact.js +142 -20
- package/dist/src/utils/catalog-source-impact.js.map +1 -1
- package/dist/src/utils/catalog-source-references.js +95 -9
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +1 -1
- package/dist/src/utils/catalog-sources.js +19 -3
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-manager.js +8 -0
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +34 -1
- package/dist/src/utils/codex-native-observation.js +132 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/codex-reconciler.d.ts +0 -2
- package/dist/src/utils/codex-reconciler.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +2 -26
- package/dist/src/utils/codex-shared-native.js +8 -82
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +3 -0
- package/dist/src/utils/git-catalog-provider.js +40 -1
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +1 -0
- package/dist/src/utils/local-marketplace.js +69 -73
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.js +1 -0
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +9 -4
- package/dist/src/utils/native-cli.js +280 -34
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/path-catalog-provider.js +2 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +33 -0
- package/dist/src/utils/plugin-config-impact.js +298 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +36 -14
- package/dist/src/utils/plugin-config-write.js +709 -225
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +58 -4
- package/dist/src/utils/plugin-config.js +328 -60
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +20 -12
- package/dist/src/utils/plugin-scripts.js +389 -114
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -1
- package/dist/src/utils/project-boundary.js +33 -11
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/windows-claude-shim.d.ts +9 -0
- package/dist/src/utils/windows-claude-shim.js +141 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/vitest.config.js +91 -10
- package/dist/vitest.config.js.map +1 -1
- package/package.json +9 -9
- package/dist/authoring/templates/aw-config-runtime.d.mts +0 -2
- package/dist/authoring/templates/aw-config-runtime.mjs +0 -407
- package/dist/authoring/templates/aw-config-runtime.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,SAAS,GAQV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,GAMvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,SAAS,GAQV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,GAMvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,GAStB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,8BAA8B,GAK/B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,GASpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAA0C,MAAM,aAAa,CAAC;AAC3F,OAAO,EACL,+BAA+B,GAGhC,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAE,kBAAkB,EAAyC,MAAM,aAAa,CAAC;AACxF,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,4BAA4B,GAY7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,wBAAwB,GAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,0BAA0B,EAC1B,WAAW,GAMZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,GAWzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,GAMV,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAChF,OAAO,EACL,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/src/tui/keys.d.ts
CHANGED
|
@@ -9,4 +9,48 @@ export interface TuiKeyInput {
|
|
|
9
9
|
input: string;
|
|
10
10
|
key: Pick<Key, 'ctrl' | 'escape'>;
|
|
11
11
|
}
|
|
12
|
+
export type TuiSessionNavigationKeyAction = 'home' | 'reload';
|
|
13
|
+
export type TuiGlobalKeyAction = TuiSessionNavigationKeyAction | 'back' | 'help' | 'exit' | 'cancel';
|
|
14
|
+
export interface TuiGlobalActionDefinition {
|
|
15
|
+
action: TuiGlobalKeyAction;
|
|
16
|
+
key: 'h' | 'H' | 'Escape' | 'b' | '?' | 'q' | 'Ctrl+C';
|
|
17
|
+
menuOnly: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const TUI_GLOBAL_ACTIONS: readonly [{
|
|
20
|
+
readonly action: "home";
|
|
21
|
+
readonly key: "h";
|
|
22
|
+
readonly menuOnly: true;
|
|
23
|
+
}, {
|
|
24
|
+
readonly action: "reload";
|
|
25
|
+
readonly key: "H";
|
|
26
|
+
readonly menuOnly: true;
|
|
27
|
+
}, {
|
|
28
|
+
readonly action: "back";
|
|
29
|
+
readonly key: "b";
|
|
30
|
+
readonly menuOnly: true;
|
|
31
|
+
}, {
|
|
32
|
+
readonly action: "back";
|
|
33
|
+
readonly key: "Escape";
|
|
34
|
+
readonly menuOnly: true;
|
|
35
|
+
}, {
|
|
36
|
+
readonly action: "help";
|
|
37
|
+
readonly key: "?";
|
|
38
|
+
readonly menuOnly: true;
|
|
39
|
+
}, {
|
|
40
|
+
readonly action: "exit";
|
|
41
|
+
readonly key: "q";
|
|
42
|
+
readonly menuOnly: true;
|
|
43
|
+
}, {
|
|
44
|
+
readonly action: "cancel";
|
|
45
|
+
readonly key: "Escape";
|
|
46
|
+
readonly menuOnly: false;
|
|
47
|
+
}, {
|
|
48
|
+
readonly action: "exit";
|
|
49
|
+
readonly key: "Ctrl+C";
|
|
50
|
+
readonly menuOnly: false;
|
|
51
|
+
}];
|
|
52
|
+
export declare function resolveTuiGlobalKeyAction(event: TuiKeyInput, context: TuiKeyContext): TuiGlobalKeyAction | null;
|
|
53
|
+
export declare function resolveTuiSessionNavigationKey(event: TuiKeyInput, options: {
|
|
54
|
+
characterInput: boolean;
|
|
55
|
+
}): TuiSessionNavigationKeyAction | null;
|
|
12
56
|
export declare function resolveTuiKeyAction(event: TuiKeyInput, context: TuiKeyContext): Exclude<CliPromptAction, 'select'> | null;
|
package/dist/src/tui/keys.js
CHANGED
|
@@ -1,22 +1,50 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
export const TUI_GLOBAL_ACTIONS = [
|
|
2
|
+
{ action: 'home', key: 'h', menuOnly: true },
|
|
3
|
+
{ action: 'reload', key: 'H', menuOnly: true },
|
|
4
|
+
{ action: 'back', key: 'b', menuOnly: true },
|
|
5
|
+
{ action: 'back', key: 'Escape', menuOnly: true },
|
|
6
|
+
{ action: 'help', key: '?', menuOnly: true },
|
|
7
|
+
{ action: 'exit', key: 'q', menuOnly: true },
|
|
8
|
+
{ action: 'cancel', key: 'Escape', menuOnly: false },
|
|
9
|
+
{ action: 'exit', key: 'Ctrl+C', menuOnly: false },
|
|
10
|
+
];
|
|
11
|
+
function registeredAction(action, key) {
|
|
12
|
+
return TUI_GLOBAL_ACTIONS.find((definition) => definition.action === action && definition.key === key).action;
|
|
13
|
+
}
|
|
14
|
+
export function resolveTuiGlobalKeyAction(event, context) {
|
|
15
|
+
if (event.key.ctrl && event.input.toLowerCase() === 'c')
|
|
16
|
+
return registeredAction('exit', 'Ctrl+C');
|
|
5
17
|
if (event.key.escape) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return 'cancel';
|
|
18
|
+
return context.mode === 'menu' && context.allowBack
|
|
19
|
+
? registeredAction('back', 'Escape')
|
|
20
|
+
: registeredAction('cancel', 'Escape');
|
|
10
21
|
}
|
|
11
|
-
if (context.mode !== 'menu')
|
|
22
|
+
if (context.mode !== 'menu' || event.key.ctrl)
|
|
12
23
|
return null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (event.input.toLowerCase() === '
|
|
24
|
+
if (event.input === 'H')
|
|
25
|
+
return registeredAction('reload', 'H');
|
|
26
|
+
if (event.input === 'h')
|
|
27
|
+
return registeredAction('home', 'h');
|
|
28
|
+
if (context.allowBack && event.input.toLowerCase() === 'b')
|
|
29
|
+
return registeredAction('back', 'b');
|
|
30
|
+
if (event.input === '?')
|
|
31
|
+
return registeredAction('help', '?');
|
|
32
|
+
if (event.input.toLowerCase() === 'q')
|
|
33
|
+
return registeredAction('exit', 'q');
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
export function resolveTuiSessionNavigationKey(event, options) {
|
|
37
|
+
const action = resolveTuiGlobalKeyAction(event, {
|
|
38
|
+
mode: options.characterInput ? 'text' : 'menu',
|
|
39
|
+
});
|
|
40
|
+
return action === 'home' || action === 'reload' ? action : null;
|
|
41
|
+
}
|
|
42
|
+
export function resolveTuiKeyAction(event, context) {
|
|
43
|
+
const action = resolveTuiGlobalKeyAction(event, context);
|
|
44
|
+
if (action === 'cancel' && context.mode === 'menu')
|
|
18
45
|
return 'exit';
|
|
19
|
-
|
|
46
|
+
if (action === 'back' || action === 'exit' || action === 'cancel')
|
|
47
|
+
return action;
|
|
20
48
|
return null;
|
|
21
49
|
}
|
|
22
50
|
//# sourceMappingURL=keys.js.map
|
package/dist/src/tui/keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../src/tui/keys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../src/tui/keys.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5C,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC9C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IACjD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5C,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;IACpD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;CACK,CAAC;AAE1D,SAAS,gBAAgB,CACvB,MAA0B,EAC1B,GAAqC;IAErC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAC5C,UAAU,CAAC,MAAM,KAAK,MAAM,IAAI,UAAU,CAAC,GAAG,KAAK,GAAG,CAAE,CAAC,MAAM,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,KAAkB,EAClB,OAAsB;IAEtB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,GAAG;QAAE,OAAO,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACnG,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,SAAS;YACjD,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC;YACpC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAC3D,IAAI,KAAK,CAAC,KAAK,KAAK,GAAG;QAAE,OAAO,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChE,IAAI,KAAK,CAAC,KAAK,KAAK,GAAG;QAAE,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9D,IAAI,OAAO,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,GAAG;QAAE,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjG,IAAI,KAAK,CAAC,KAAK,KAAK,GAAG;QAAE,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9D,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,GAAG;QAAE,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5E,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,KAAkB,EAClB,OAAoC;IAEpC,MAAM,MAAM,GAAG,yBAAyB,CAAC,KAAK,EAAE;QAC9C,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;KAC/C,CAAC,CAAC;IACH,OAAO,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,KAAkB,EAClB,OAAsB;IAEtB,MAAM,MAAM,GAAG,yBAAyB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACzD,IAAI,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IAClE,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IACjF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AllowedLifecycleAction } from '../commands/operation-planner.js';
|
|
2
|
+
export interface LifecycleActionViewModel {
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function projectLifecycleActionView(action: AllowedLifecycleAction): LifecycleActionViewModel;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export function projectLifecycleActionView(action) {
|
|
2
|
+
if (action.id === 'install')
|
|
3
|
+
return {
|
|
4
|
+
label: '添加插件',
|
|
5
|
+
description: '添加所选平台和使用位置。',
|
|
6
|
+
};
|
|
7
|
+
if (action.id === 'sync')
|
|
8
|
+
return {
|
|
9
|
+
label: '同步已保存使用设置',
|
|
10
|
+
description: '按已保存使用设置修复当前使用位置。',
|
|
11
|
+
};
|
|
12
|
+
if (action.id === 'refreshAndSync')
|
|
13
|
+
return {
|
|
14
|
+
label: '刷新并同步',
|
|
15
|
+
description: '刷新相关来源后,使用新的当前启用版本同步。',
|
|
16
|
+
};
|
|
17
|
+
if (action.id === 'reinstall')
|
|
18
|
+
return {
|
|
19
|
+
label: '重新安装',
|
|
20
|
+
description: '保留设置并重新生成 AW 管理内容。',
|
|
21
|
+
};
|
|
22
|
+
if (action.id === 'cleanup')
|
|
23
|
+
return {
|
|
24
|
+
label: '清理 AW 管理内容',
|
|
25
|
+
description: action.reason === 'orphanedManagedContent'
|
|
26
|
+
? '只清理这个插件目标的 AW 管理内容。'
|
|
27
|
+
: '只清理可证明属于 AW 的内容。',
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
label: '移除插件',
|
|
31
|
+
description: '移除 AW 管理的安装内容并保留设置。',
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=lifecycle-action-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-action-view.js","sourceRoot":"","sources":["../../../src/tui/lifecycle-action-view.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,0BAA0B,CACxC,MAA8B;IAE9B,IAAI,MAAM,CAAC,EAAE,KAAK,SAAS;QAAE,OAAO;YAClC,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,cAAc;SAC5B,CAAC;IACF,IAAI,MAAM,CAAC,EAAE,KAAK,MAAM;QAAE,OAAO;YAC/B,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,mBAAmB;SACjC,CAAC;IACF,IAAI,MAAM,CAAC,EAAE,KAAK,gBAAgB;QAAE,OAAO;YACzC,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,uBAAuB;SACrC,CAAC;IACF,IAAI,MAAM,CAAC,EAAE,KAAK,WAAW;QAAE,OAAO;YACpC,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,oBAAoB;SAClC,CAAC;IACF,IAAI,MAAM,CAAC,EAAE,KAAK,SAAS;QAAE,OAAO;YAClC,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,MAAM,CAAC,MAAM,KAAK,wBAAwB;gBACrD,CAAC,CAAC,qBAAqB;gBACvB,CAAC,CAAC,kBAAkB;SACvB,CAAC;IACF,OAAO;QACL,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,qBAAqB;KACnC,CAAC;AACJ,CAAC"}
|
package/dist/src/tui/model.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ export interface PluginListItemViewModel {
|
|
|
94
94
|
capabilityUnsupported?: boolean;
|
|
95
95
|
capabilityRecovery?: string;
|
|
96
96
|
sourceUnavailable?: boolean;
|
|
97
|
+
savedConfigScopes: Scope[];
|
|
98
|
+
configOnly?: true;
|
|
97
99
|
dependencySummary?: PluginDependencySummaryViewModel;
|
|
98
100
|
technicalComponents: Array<{
|
|
99
101
|
platform: PlatformName;
|
|
@@ -224,6 +226,8 @@ export interface ConfigFieldViewModel {
|
|
|
224
226
|
required: boolean;
|
|
225
227
|
sensitive: boolean;
|
|
226
228
|
writable: boolean;
|
|
229
|
+
canSet: boolean;
|
|
230
|
+
canUnset: boolean;
|
|
227
231
|
dirty: boolean;
|
|
228
232
|
inherited: boolean;
|
|
229
233
|
configured: boolean;
|
|
@@ -278,7 +282,7 @@ export interface ConfigPageViewModel {
|
|
|
278
282
|
storedCount: number;
|
|
279
283
|
}
|
|
280
284
|
export declare function configObjectHasSensitiveChild(field: PluginConfigSchemaField): boolean;
|
|
281
|
-
export type UserIssueCategory = 'incompleteInstallation' | 'artifactCollision' | 'sourceUnavailable' | 'sourceMissing' | 'sourceIdentityChanged' | 'requiredConfigMissing' | 'scopeConflict' | 'dependencyMissing' | 'dependencyNotReady' | 'dependencyTargetUnsupported' | 'dependencyStillRequired' | 'dependencyGraphInvalid' | 'legacyState' | 'diagnostic';
|
|
285
|
+
export type UserIssueCategory = 'incompleteInstallation' | 'artifactCollision' | 'sourceUnavailable' | 'sourceMissing' | 'sourceIdentityChanged' | 'requiredConfigMissing' | 'configLayerUnsupported' | 'scopeConflict' | 'dependencyMissing' | 'dependencyNotReady' | 'dependencyTargetUnsupported' | 'dependencyStillRequired' | 'dependencyGraphInvalid' | 'legacyState' | 'diagnostic';
|
|
282
286
|
export type UserIssueGroup = 'sourceRemoved' | 'artifactCollision' | 'sourceUnavailable' | 'dependency' | 'scope' | 'config' | 'installation' | 'diagnostic';
|
|
283
287
|
export type UserIssueActionId = 'install' | 'sync' | 'refreshAndSync' | 'reinstall' | 'cleanup' | 'remove' | 'refreshSource' | 'editSource' | 'retryLater' | 'reAddSource' | 'viewSourceChange' | 'openConfig' | 'keepUserScope' | 'keepProjectScope' | 'viewTechnical' | 'manualMigration' | 'installDependency' | 'reinstallDependency' | 'viewDependencyIssue' | 'viewDependencies';
|
|
284
288
|
export interface UserIssueActionViewModel {
|
|
@@ -329,7 +333,7 @@ export interface UserIssueViewModel {
|
|
|
329
333
|
requiredFields?: Array<{
|
|
330
334
|
key: string;
|
|
331
335
|
title: string;
|
|
332
|
-
type: 'missing-required' | 'invalid-config' | 'sharedCompositeContainsLocalPath';
|
|
336
|
+
type: 'missing-required' | 'invalid-config' | 'sharedCompositeContainsLocalPath' | 'configLayerUnsupported';
|
|
333
337
|
source: 'default' | 'user' | 'project' | 'missing';
|
|
334
338
|
scope: Scope;
|
|
335
339
|
}>;
|
|
@@ -398,6 +402,12 @@ export declare function buildTuiViewModel(options: {
|
|
|
398
402
|
catalogGenerations?: ReadonlyMap<string, CatalogSourceGenerationViewModel>;
|
|
399
403
|
dependencyOverviews?: PluginDependencyOverviewViewModel[];
|
|
400
404
|
portablePluginIds?: string[];
|
|
405
|
+
configStoreInventory?: Array<{
|
|
406
|
+
pluginId: string;
|
|
407
|
+
sourceId: string;
|
|
408
|
+
pluginName: string;
|
|
409
|
+
scope: Scope;
|
|
410
|
+
}>;
|
|
401
411
|
}): TuiViewModel;
|
|
402
412
|
export declare function buildConfigGroups(options: {
|
|
403
413
|
schema: PluginConfigSchema;
|
package/dist/src/tui/model.js
CHANGED
|
@@ -3,6 +3,7 @@ import { statusTargetActivation, statusTargetExtensions, statusTargetIntent, sta
|
|
|
3
3
|
import { buildAllowedLifecycleActions } from '../commands/operation-planner.js';
|
|
4
4
|
import { safeDiagnosticCode, } from './diagnostics.js';
|
|
5
5
|
import { projectCatalogSourceState } from './catalog-sources/projection.js';
|
|
6
|
+
import { projectLifecycleActionView } from './lifecycle-action-view.js';
|
|
6
7
|
export function configObjectHasSensitiveChild(field) {
|
|
7
8
|
if (field.type !== 'object')
|
|
8
9
|
return false;
|
|
@@ -70,7 +71,7 @@ function isInstalledScopeEvidence(target) {
|
|
|
70
71
|
function dependencyAssignmentExplanation(assignmentSource, requiredBy) {
|
|
71
72
|
const consumer = requiredBy[0];
|
|
72
73
|
return {
|
|
73
|
-
root: '
|
|
74
|
+
root: '当前插件位置',
|
|
74
75
|
default: '推荐使用当前项目',
|
|
75
76
|
existingWiderTarget: '复用健康的所有项目安装',
|
|
76
77
|
userOverride: '你选择的位置',
|
|
@@ -268,6 +269,7 @@ export function buildPluginDetailActions(plugin) {
|
|
|
268
269
|
...plugin.installedPlacements.flatMap((placement) => placement.state === 'notInstalled'
|
|
269
270
|
? []
|
|
270
271
|
: [{ id: 'platform', platform: placement.platform }]),
|
|
272
|
+
...(plugin.savedConfigScopes.length > 0 ? [{ id: 'settings' }] : []),
|
|
271
273
|
{ id: 'sourceProblem' },
|
|
272
274
|
{ id: 'about' },
|
|
273
275
|
];
|
|
@@ -375,6 +377,7 @@ function sourceIssue(health, impactedTargets = 0) {
|
|
|
375
377
|
}
|
|
376
378
|
function lifecycleIssueActions(target, options = {}) {
|
|
377
379
|
return buildAllowedLifecycleActions(target).flatMap((action) => {
|
|
380
|
+
const view = projectLifecycleActionView(action);
|
|
378
381
|
if (options.dependency) {
|
|
379
382
|
if (action.id === 'install')
|
|
380
383
|
return [{
|
|
@@ -389,8 +392,8 @@ function lifecycleIssueActions(target, options = {}) {
|
|
|
389
392
|
if (action.id === 'sync' || action.id === 'reinstall')
|
|
390
393
|
return [{
|
|
391
394
|
id: 'reinstallDependency',
|
|
392
|
-
label:
|
|
393
|
-
description:
|
|
395
|
+
label: view.label,
|
|
396
|
+
description: view.description,
|
|
394
397
|
pluginId: action.pluginId,
|
|
395
398
|
platform: action.platform,
|
|
396
399
|
scope: action.scope,
|
|
@@ -409,8 +412,8 @@ function lifecycleIssueActions(target, options = {}) {
|
|
|
409
412
|
}[action.id];
|
|
410
413
|
return [{
|
|
411
414
|
...projection,
|
|
412
|
-
label:
|
|
413
|
-
description:
|
|
415
|
+
label: view.label,
|
|
416
|
+
description: view.description,
|
|
414
417
|
pluginId: action.pluginId,
|
|
415
418
|
platform: action.platform,
|
|
416
419
|
scope: action.scope,
|
|
@@ -455,8 +458,8 @@ function targetIssues(payload) {
|
|
|
455
458
|
issueId: `scope:${target.pluginId}:${target.platform}`,
|
|
456
459
|
category: 'scopeConflict',
|
|
457
460
|
title: `${target.pluginId} · ${target.platform === 'codex' ? 'Codex' : 'Claude Code'} · 扩展位置冲突`,
|
|
458
|
-
explanation: 'AW
|
|
459
|
-
impact: ['
|
|
461
|
+
explanation: 'AW 管理附加能力不能同时使用所有项目和当前项目位置。',
|
|
462
|
+
impact: ['选择要保留的使用位置。系统将移除另一位置,再同步保留的位置。'],
|
|
460
463
|
entity: { kind: 'plugin', id: target.pluginId },
|
|
461
464
|
pluginId: target.pluginId,
|
|
462
465
|
platform: target.platform,
|
|
@@ -478,7 +481,7 @@ function targetIssues(payload) {
|
|
|
478
481
|
],
|
|
479
482
|
technicalDetails: [{
|
|
480
483
|
code: 'codexExtensionScopeConflict',
|
|
481
|
-
message: '
|
|
484
|
+
message: '扩展同时使用 user 和 project scope。',
|
|
482
485
|
}],
|
|
483
486
|
});
|
|
484
487
|
}
|
|
@@ -619,7 +622,7 @@ function targetIssues(payload) {
|
|
|
619
622
|
: root.category === 'sourceUnavailable'
|
|
620
623
|
? [
|
|
621
624
|
...(root.code === 'bundleUnavailable' ? directLifecycleActions : []),
|
|
622
|
-
{ id: 'editSource', label: '查看来源', description: root.code === 'bundleUnavailable' ? '
|
|
625
|
+
{ id: 'editSource', label: '查看来源', description: root.code === 'bundleUnavailable' ? '检查当前插件目录或稍后重试' : '修复来源配置或稍后重试' },
|
|
623
626
|
{ id: 'viewTechnical', label: '技术详情' },
|
|
624
627
|
]
|
|
625
628
|
: [...directLifecycleActions,
|
|
@@ -660,13 +663,13 @@ function targetIssues(payload) {
|
|
|
660
663
|
scope: target.scope,
|
|
661
664
|
relationship: relationship.relationship,
|
|
662
665
|
}],
|
|
663
|
-
title: `${target.pluginId} · ${target.platform === 'codex' ? 'Codex' : 'Claude Code'} · ${sharedNativeRenderDrift ? '
|
|
666
|
+
title: `${target.pluginId} · ${target.platform === 'codex' ? 'Codex' : 'Claude Code'} · ${sharedNativeRenderDrift ? '平台共享内容待同步' : root.category === 'artifactCollision' ? '输出冲突' : dependencyCategory ? {
|
|
664
667
|
dependencyMissing: '缺少依赖',
|
|
665
668
|
dependencyNotReady: '依赖安装不完整',
|
|
666
669
|
dependencyTargetUnsupported: '依赖目标不兼容',
|
|
667
670
|
dependencyStillRequired: '依赖仍被使用',
|
|
668
671
|
dependencyGraphInvalid: '依赖关系无效',
|
|
669
|
-
}[root.category] : target.state === 'needsSync' ? '安装不完整' : bundleUnavailable ? '
|
|
672
|
+
}[root.category] : target.state === 'needsSync' ? '安装不完整' : bundleUnavailable ? '当前插件目录不再包含此插件' : '检查失败'}`,
|
|
670
673
|
explanation: root.category === 'artifactCollision'
|
|
671
674
|
? '目标位置已有不属于当前插件的内容。AW 不会覆盖或删除这些内容。'
|
|
672
675
|
: dependencyCategory
|
|
@@ -674,14 +677,14 @@ function targetIssues(payload) {
|
|
|
674
677
|
? `${dependencyPluginId} 导致当前依赖检查不能通过。`
|
|
675
678
|
: '当前依赖检查不能安全通过。'
|
|
676
679
|
: sharedNativeRenderDrift
|
|
677
|
-
? '
|
|
680
|
+
? '个人默认已变化。Codex 平台共享 Skill 尚未重新生成。'
|
|
678
681
|
: target.state === 'needsSync'
|
|
679
682
|
? '必要内容缺失,插件可能不能稳定运行。'
|
|
680
683
|
: bundleUnavailable
|
|
681
|
-
? '
|
|
684
|
+
? '当前插件目录不再包含此插件,但仍发现 AW 管理的已安装内容。'
|
|
682
685
|
: '当前目标不能安全分类为正常安装。',
|
|
683
686
|
impact: [sharedNativeRenderDrift
|
|
684
|
-
? '
|
|
687
|
+
? '运行同步可恢复;这不是缓存损坏。'
|
|
685
688
|
: root.category === 'artifactCollision'
|
|
686
689
|
? '请先移除或迁移冲突内容,然后重试安装或重新安装。'
|
|
687
690
|
: bundleUnavailable
|
|
@@ -787,9 +790,34 @@ function configIssues(pluginSummaries) {
|
|
|
787
790
|
}
|
|
788
791
|
if (!summary.configIssues?.length)
|
|
789
792
|
return issues;
|
|
790
|
-
const
|
|
793
|
+
const unsupported = summary.configIssues.filter((issue) => issue.type === 'configLayerUnsupported');
|
|
794
|
+
if (unsupported.length > 0) {
|
|
795
|
+
issues.push({
|
|
796
|
+
issueId: `config:${summary.pluginId}:unsupported-project-layer`,
|
|
797
|
+
category: 'configLayerUnsupported',
|
|
798
|
+
title: `${summary.displayName ?? summary.pluginName} · 项目设置包含旧值`,
|
|
799
|
+
explanation: '这些 project override 已不再受支持,实际使用个人默认或 manifest 默认值。',
|
|
800
|
+
impact: ['旧值不会参与生成。可以进入项目设置删除旧值。'],
|
|
801
|
+
entity: { kind: 'plugin', id: summary.pluginId },
|
|
802
|
+
pluginId: summary.pluginId,
|
|
803
|
+
sourceId,
|
|
804
|
+
configLayer: { scope: 'project' },
|
|
805
|
+
actions: [
|
|
806
|
+
{ id: 'openConfig', label: '删除旧值', description: '进入项目设置并恢复继承' },
|
|
807
|
+
{ id: 'viewTechnical', label: '查看字段详情' },
|
|
808
|
+
],
|
|
809
|
+
technicalDetails: unsupported.map((entry) => ({
|
|
810
|
+
code: entry.type,
|
|
811
|
+
message: `${entry.title} · project · 实际使用 user/default`,
|
|
812
|
+
})),
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
const blockingIssues = summary.configIssues.filter((issue) => issue.type !== 'configLayerUnsupported');
|
|
816
|
+
if (blockingIssues.length === 0)
|
|
817
|
+
return issues;
|
|
818
|
+
const types = new Set(blockingIssues.map((issue) => issue.type));
|
|
791
819
|
const invalid = types.has('invalid-config') || types.has('sharedCompositeContainsLocalPath');
|
|
792
|
-
const sources = new Set(
|
|
820
|
+
const sources = new Set(blockingIssues.map((issue) => issue.source));
|
|
793
821
|
const onlySource = sources.size === 1 ? [...sources][0] : undefined;
|
|
794
822
|
const configLayer = onlySource === 'user'
|
|
795
823
|
? { scope: 'user' }
|
|
@@ -807,7 +835,7 @@ function configIssues(pluginSummaries) {
|
|
|
807
835
|
entity: { kind: 'plugin', id: summary.pluginId },
|
|
808
836
|
pluginId: summary.pluginId,
|
|
809
837
|
sourceId,
|
|
810
|
-
requiredFields:
|
|
838
|
+
requiredFields: blockingIssues.map(({ key, title, type, source, scope }) => ({
|
|
811
839
|
key, title, type, source, scope,
|
|
812
840
|
})),
|
|
813
841
|
...(configLayer ? { configLayer } : {}),
|
|
@@ -815,7 +843,7 @@ function configIssues(pluginSummaries) {
|
|
|
815
843
|
{ id: 'openConfig', label: invalid ? '修正设置' : '完成设置', description: configLayer ? '进入建议的设置层' : '选择个人或项目设置层' },
|
|
816
844
|
{ id: 'viewTechnical', label: '查看字段详情' },
|
|
817
845
|
],
|
|
818
|
-
technicalDetails:
|
|
846
|
+
technicalDetails: blockingIssues.map((entry) => ({
|
|
819
847
|
code: entry.type,
|
|
820
848
|
message: `${entry.title} · ${entry.scope} · ${entry.source}`,
|
|
821
849
|
})),
|
|
@@ -859,6 +887,7 @@ function dependencyOverviewIssues(overviews, pluginSummaries, status) {
|
|
|
859
887
|
function issueDiagnostic(issue, sourceDetails) {
|
|
860
888
|
const source = issue.sourceId ? sourceDetails.get(issue.sourceId) : undefined;
|
|
861
889
|
const sourceUnavailable = issue.category === 'sourceUnavailable' && issue.entity.kind === 'source';
|
|
890
|
+
const configLayerUnsupported = issue.category === 'configLayerUnsupported';
|
|
862
891
|
const configUnavailable = issue.category === 'diagnostic' && issue.issueId.startsWith('config:');
|
|
863
892
|
const configInvalid = issue.category === 'requiredConfigMissing';
|
|
864
893
|
const dependency = issue.category.startsWith('dependency');
|
|
@@ -891,10 +920,11 @@ function issueDiagnostic(issue, sourceDetails) {
|
|
|
891
920
|
const code = safeDiagnosticCode(rawCode, sourceUnavailable
|
|
892
921
|
? 'catalogSourceUnavailable' : 'diagnosticUnavailable');
|
|
893
922
|
const stage = sourceUnavailable ? 'resolve-source'
|
|
894
|
-
:
|
|
895
|
-
:
|
|
896
|
-
:
|
|
897
|
-
:
|
|
923
|
+
: configLayerUnsupported ? 'read-config'
|
|
924
|
+
: configUnavailable ? 'read-config'
|
|
925
|
+
: configInvalid ? 'validate-config'
|
|
926
|
+
: dependency ? 'resolve-dependencies'
|
|
927
|
+
: platformState ? 'read-platform-state' : 'inspect-target';
|
|
898
928
|
const context = [
|
|
899
929
|
...(issue.pluginId ? [{ key: 'pluginId', value: issue.pluginId }] : []),
|
|
900
930
|
...(issue.dependencyPluginId
|
|
@@ -915,17 +945,19 @@ function issueDiagnostic(issue, sourceDetails) {
|
|
|
915
945
|
'按技术详情使用受支持命令或人工处理。',
|
|
916
946
|
'再次运行状态检查。',
|
|
917
947
|
]
|
|
918
|
-
:
|
|
919
|
-
? ['
|
|
920
|
-
:
|
|
921
|
-
? ['
|
|
922
|
-
:
|
|
923
|
-
? ['
|
|
924
|
-
:
|
|
925
|
-
? ['
|
|
926
|
-
:
|
|
948
|
+
: configLayerUnsupported
|
|
949
|
+
? ['打开项目设置。', '删除不再支持的 project override。', '重新检查插件设置。']
|
|
950
|
+
: sourceUnavailable
|
|
951
|
+
? ['检查 Git URL、ref 或本地目录。', '确认当前终端具备来源授权。', '运行“重新检查来源”验证修复。']
|
|
952
|
+
: dependency
|
|
953
|
+
? ['检查依赖关系和依赖插件状态。', '完成恢复动作后重新检查根插件。']
|
|
954
|
+
: configUnavailable
|
|
955
|
+
? ['恢复插件来源和可信字段定义。', '重新检查来源后再次打开设置。']
|
|
956
|
+
: configInvalid
|
|
957
|
+
? ['完成或修正列出的设置字段。', '重新检查插件设置。']
|
|
958
|
+
: ['检查目标平台配置和访问权限。', '完成恢复动作后重新运行状态检查。'];
|
|
927
959
|
return {
|
|
928
|
-
severity: 'error',
|
|
960
|
+
severity: configLayerUnsupported ? 'warning' : 'error',
|
|
929
961
|
title: issue.title,
|
|
930
962
|
userMessage: issue.explanation,
|
|
931
963
|
impact,
|
|
@@ -963,7 +995,7 @@ function issueGroup(issue) {
|
|
|
963
995
|
return 'dependency';
|
|
964
996
|
if (issue.category === 'scopeConflict')
|
|
965
997
|
return 'scope';
|
|
966
|
-
if (issue.category === 'requiredConfigMissing')
|
|
998
|
+
if (issue.category === 'requiredConfigMissing' || issue.category === 'configLayerUnsupported')
|
|
967
999
|
return 'config';
|
|
968
1000
|
if (issue.category === 'incompleteInstallation')
|
|
969
1001
|
return 'installation';
|
|
@@ -975,6 +1007,8 @@ function primaryAttentionCode(issue) {
|
|
|
975
1007
|
? 'invalidConfig'
|
|
976
1008
|
: 'requiredConfigMissing';
|
|
977
1009
|
}
|
|
1010
|
+
if (issue.category === 'configLayerUnsupported')
|
|
1011
|
+
return 'configLayerUnsupported';
|
|
978
1012
|
if (issue.category === 'incompleteInstallation')
|
|
979
1013
|
return 'incompleteInstallation';
|
|
980
1014
|
if (issue.category === 'sourceIdentityChanged')
|
|
@@ -1049,11 +1083,24 @@ export function buildTuiViewModel(options) {
|
|
|
1049
1083
|
for (const target of options.status.targets) {
|
|
1050
1084
|
targetsByPlugin.set(target.pluginId, [...(targetsByPlugin.get(target.pluginId) ?? []), target]);
|
|
1051
1085
|
}
|
|
1052
|
-
const
|
|
1086
|
+
const configScopesByPlugin = new Map();
|
|
1087
|
+
for (const store of options.configStoreInventory ?? []) {
|
|
1088
|
+
const scopes = configScopesByPlugin.get(store.pluginId) ?? new Set();
|
|
1089
|
+
scopes.add(store.scope);
|
|
1090
|
+
configScopesByPlugin.set(store.pluginId, scopes);
|
|
1091
|
+
}
|
|
1092
|
+
const pluginIds = new Set([
|
|
1093
|
+
...summaryById.keys(),
|
|
1094
|
+
...targetsByPlugin.keys(),
|
|
1095
|
+
...configScopesByPlugin.keys(),
|
|
1096
|
+
]);
|
|
1053
1097
|
const plugins = [...pluginIds].map((pluginId) => {
|
|
1054
1098
|
const summary = summaryById.get(pluginId);
|
|
1055
1099
|
const targets = targetsByPlugin.get(pluginId) ?? [];
|
|
1056
1100
|
const sourceId = targets[0]?.sourceId ?? pluginId.slice(0, pluginId.indexOf('/'));
|
|
1101
|
+
const savedConfigScopes = [...(configScopesByPlugin.get(pluginId) ?? [])]
|
|
1102
|
+
.sort((left, right) => (left === 'user' ? 0 : 1) - (right === 'user' ? 0 : 1));
|
|
1103
|
+
const configOnly = summary === undefined && targets.length === 0 && savedConfigScopes.length > 0;
|
|
1057
1104
|
const placements = ['codex', 'claude'].flatMap((platform) => {
|
|
1058
1105
|
const platformTargets = targets.filter((target) => target.platform === platform);
|
|
1059
1106
|
return platformTargets.length > 0
|
|
@@ -1071,7 +1118,7 @@ export function buildTuiViewModel(options) {
|
|
|
1071
1118
|
|| capabilityTargets.length > 0;
|
|
1072
1119
|
const capabilityRecovery = capabilityTargets.flatMap((target) => target.recoveryActions)
|
|
1073
1120
|
.find((action) => action.command === 'manual')?.description;
|
|
1074
|
-
const unavailable = sourceUnavailable || capabilityUnsupported;
|
|
1121
|
+
const unavailable = sourceUnavailable || capabilityUnsupported || configOnly;
|
|
1075
1122
|
return {
|
|
1076
1123
|
pluginId,
|
|
1077
1124
|
sourceId,
|
|
@@ -1099,6 +1146,8 @@ export function buildTuiViewModel(options) {
|
|
|
1099
1146
|
...(capabilityUnsupported ? { capabilityUnsupported: true } : {}),
|
|
1100
1147
|
...(capabilityRecovery ? { capabilityRecovery } : {}),
|
|
1101
1148
|
...(sourceUnavailable ? { sourceUnavailable: true } : {}),
|
|
1149
|
+
savedConfigScopes,
|
|
1150
|
+
...(configOnly ? { configOnly: true } : {}),
|
|
1102
1151
|
...(dependencyById.get(pluginId)
|
|
1103
1152
|
? { dependencySummary: dependencyById.get(pluginId).summary }
|
|
1104
1153
|
: summary && (summary.dependencyTotalCount ?? 0) > 0
|
|
@@ -1171,7 +1220,7 @@ export function buildTuiViewModel(options) {
|
|
|
1171
1220
|
return {
|
|
1172
1221
|
...plugin,
|
|
1173
1222
|
primaryAttention: {
|
|
1174
|
-
severity: 'error',
|
|
1223
|
+
severity: primary.category === 'configLayerUnsupported' ? 'warning' : 'error',
|
|
1175
1224
|
code: primaryAttentionCode(primary),
|
|
1176
1225
|
message: primary.explanation,
|
|
1177
1226
|
},
|
|
@@ -1239,6 +1288,8 @@ function configSourceLabel(source) {
|
|
|
1239
1288
|
function configEditorDefinition(field) {
|
|
1240
1289
|
const definition = structuredClone(field);
|
|
1241
1290
|
delete definition.default;
|
|
1291
|
+
if (definition.sensitive === true)
|
|
1292
|
+
delete definition.choices;
|
|
1242
1293
|
return definition;
|
|
1243
1294
|
}
|
|
1244
1295
|
function configObjectChildChanges(field, before, after) {
|
|
@@ -1331,12 +1382,31 @@ export function buildConfigGroups(options) {
|
|
|
1331
1382
|
.filter((layer) => layer !== omittedLayer)
|
|
1332
1383
|
.map((layer) => ({ layer, entry: layerEntry(layer, key) }))
|
|
1333
1384
|
.find((candidate) => candidate.entry?.storedSourceLayer !== undefined);
|
|
1334
|
-
const
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1385
|
+
const projectedFallback = entry?.fallback;
|
|
1386
|
+
const fallbackInvalid = projectedFallback?.state === 'invalid';
|
|
1387
|
+
const fallbackValue = projectedFallback?.state === 'valid'
|
|
1388
|
+
? projectedFallback.effectiveValue
|
|
1389
|
+
: projectedFallback
|
|
1390
|
+
? undefined
|
|
1391
|
+
: fallback?.entry?.storedValue ?? schema.default;
|
|
1392
|
+
const fallbackRawValue = projectedFallback?.state === 'valid'
|
|
1393
|
+
? projectedFallback.sourceLayer === 'user'
|
|
1394
|
+
? options.rawLayerValues?.user?.[key] ?? fallbackValue
|
|
1395
|
+
: fallbackValue
|
|
1396
|
+
: projectedFallback
|
|
1397
|
+
? undefined
|
|
1398
|
+
: fallback
|
|
1399
|
+
? options.rawLayerValues?.[fallback.layer]?.[key] ?? fallbackValue
|
|
1400
|
+
: schema.default;
|
|
1401
|
+
const fallbackConfigured = projectedFallback
|
|
1402
|
+
? projectedFallback.state !== 'missing'
|
|
1403
|
+
: fallback !== undefined || schema.default !== undefined;
|
|
1404
|
+
const fallbackSource = projectedFallback?.state === 'valid'
|
|
1405
|
+
|| projectedFallback?.state === 'invalid'
|
|
1406
|
+
? projectedFallback.sourceLayer
|
|
1407
|
+
: projectedFallback
|
|
1408
|
+
? undefined
|
|
1409
|
+
: fallback?.layer ?? (schema.default !== undefined ? 'default' : undefined);
|
|
1340
1410
|
return {
|
|
1341
1411
|
key,
|
|
1342
1412
|
title: schema.title ?? key,
|
|
@@ -1352,7 +1422,11 @@ export function buildConfigGroups(options) {
|
|
|
1352
1422
|
}),
|
|
1353
1423
|
required: schema.required === true,
|
|
1354
1424
|
sensitive: schema.sensitive === true,
|
|
1355
|
-
writable: entry?.writable ?? effectivePage
|
|
1425
|
+
writable: (entry?.writable ?? effectivePage)
|
|
1426
|
+
&& !(options.read.scope === 'project' && privateValue),
|
|
1427
|
+
canSet: (entry?.canSet ?? effectivePage)
|
|
1428
|
+
&& !(options.read.scope === 'project' && privateValue),
|
|
1429
|
+
canUnset: entry?.canUnset ?? false,
|
|
1356
1430
|
dirty: options.dirtyKeys?.has(key) === true,
|
|
1357
1431
|
inherited,
|
|
1358
1432
|
configured,
|
|
@@ -1378,15 +1452,17 @@ export function buildConfigGroups(options) {
|
|
|
1378
1452
|
: `字段“${schema.title ?? key}”在${configSourceLabel(invalidOverrideSource ?? null)}中的值无效。请切换到该设置层修改或删除此字段。`,
|
|
1379
1453
|
} : {}),
|
|
1380
1454
|
...(!effectivePage && configured ? {
|
|
1381
|
-
fallbackDisplayValue:
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1455
|
+
fallbackDisplayValue: fallbackInvalid
|
|
1456
|
+
? '值无效;保存可成功,但应用会被阻止'
|
|
1457
|
+
: displayConfigValue({
|
|
1458
|
+
field: schema,
|
|
1459
|
+
privateValue,
|
|
1460
|
+
inherited: false,
|
|
1461
|
+
configured: fallbackConfigured,
|
|
1462
|
+
value: schema.type === 'object' ? fallbackRawValue : fallbackValue,
|
|
1463
|
+
}),
|
|
1388
1464
|
fallbackSourceLabel: fallbackSource ? configSourceLabel(fallbackSource) : '未设置',
|
|
1389
|
-
...(schema.type === 'object'
|
|
1465
|
+
...(!fallbackInvalid && schema.type === 'object'
|
|
1390
1466
|
&& typeof (selectedRawValue ?? selectedValue) === 'object'
|
|
1391
1467
|
&& (selectedRawValue ?? selectedValue) !== null
|
|
1392
1468
|
? { fallbackObjectChanges: configObjectChildChanges(schema, (selectedRawValue ?? selectedValue), typeof fallbackRawValue === 'object' && fallbackRawValue !== null
|
|
@@ -1410,7 +1486,7 @@ export function buildConfigGroups(options) {
|
|
|
1410
1486
|
: selectedRawValue ?? options.effectiveRawValues?.[key]) }
|
|
1411
1487
|
: {}),
|
|
1412
1488
|
...(!privateValue && schema.default !== undefined ? { defaultValue: schema.default } : {}),
|
|
1413
|
-
...(choices ? { choices: choices.presets } : {}),
|
|
1489
|
+
...(!privateValue && choices ? { choices: choices.presets } : {}),
|
|
1414
1490
|
allowCustom: choices?.allowCustom ?? true,
|
|
1415
1491
|
...(!privateValue && !configObjectHasSensitiveChild(schema)
|
|
1416
1492
|
&& (selectedRawValue ?? selectedValue) !== undefined && (selectedRawValue ?? selectedValue) !== null
|