@lesliechan721/aw 0.1.0-beta.89 → 0.1.0-beta.90

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 (96) hide show
  1. package/dist/src/commands/aw-capabilities.d.ts +1 -1
  2. package/dist/src/commands/aw-capabilities.js +4 -1
  3. package/dist/src/commands/aw-capabilities.js.map +1 -1
  4. package/dist/src/commands/plugin-capabilities.js +4 -1
  5. package/dist/src/commands/plugin-capabilities.js.map +1 -1
  6. package/dist/src/commands/public-lifecycle-result.d.ts +3 -0
  7. package/dist/src/commands/public-lifecycle-result.js +30 -5
  8. package/dist/src/commands/public-lifecycle-result.js.map +1 -1
  9. package/dist/src/commands/public-lifecycle.js +8 -0
  10. package/dist/src/commands/public-lifecycle.js.map +1 -1
  11. package/dist/src/commands/public-plugin-query.js +6 -2
  12. package/dist/src/commands/public-plugin-query.js.map +1 -1
  13. package/dist/src/commands/rebuild-command.js +28 -17
  14. package/dist/src/commands/rebuild-command.js.map +1 -1
  15. package/dist/src/commands/rebuild-platform-integration.js +23 -3
  16. package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
  17. package/dist/src/commands/reconcile-operation-plan.d.ts +3 -0
  18. package/dist/src/commands/reconcile-operation-plan.js +1 -0
  19. package/dist/src/commands/reconcile-operation-plan.js.map +1 -1
  20. package/dist/src/commands/status-v6.js +61 -9
  21. package/dist/src/commands/status-v6.js.map +1 -1
  22. package/dist/src/index.js +122 -28
  23. package/dist/src/index.js.map +1 -1
  24. package/dist/src/output/public-result.d.ts +1 -0
  25. package/dist/src/output/public-result.js +21 -3
  26. package/dist/src/output/public-result.js.map +1 -1
  27. package/dist/src/output/receipt-projection.js +19 -5
  28. package/dist/src/output/receipt-projection.js.map +1 -1
  29. package/dist/src/portable/recovery.d.ts +2 -7
  30. package/dist/src/portable/recovery.js +10 -0
  31. package/dist/src/portable/recovery.js.map +1 -1
  32. package/dist/src/recovery/coordinator.js +5 -0
  33. package/dist/src/recovery/coordinator.js.map +1 -1
  34. package/dist/src/recovery/joint-coordinator.js +12 -0
  35. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  36. package/dist/src/recovery/status.d.ts +1 -0
  37. package/dist/src/recovery/status.js +151 -44
  38. package/dist/src/recovery/status.js.map +1 -1
  39. package/dist/src/review/source-binding.js +7 -4
  40. package/dist/src/review/source-binding.js.map +1 -1
  41. package/dist/src/tui/components.js +1 -0
  42. package/dist/src/tui/components.js.map +1 -1
  43. package/dist/src/tui/config-object-suggestions.d.ts +15 -0
  44. package/dist/src/tui/config-object-suggestions.js +71 -0
  45. package/dist/src/tui/config-object-suggestions.js.map +1 -0
  46. package/dist/src/tui/config-suggestions.d.ts +7 -2
  47. package/dist/src/tui/config-suggestions.js +22 -14
  48. package/dist/src/tui/config-suggestions.js.map +1 -1
  49. package/dist/src/tui/console-app-v4.js +569 -102
  50. package/dist/src/tui/console-app-v4.js.map +1 -1
  51. package/dist/src/tui/controller-runtime.js +14 -16
  52. package/dist/src/tui/controller-runtime.js.map +1 -1
  53. package/dist/src/tui/controller.d.ts +6 -4
  54. package/dist/src/tui/controller.js +59 -12
  55. package/dist/src/tui/controller.js.map +1 -1
  56. package/dist/src/tui/guided-setup.d.ts +25 -0
  57. package/dist/src/tui/guided-setup.js +101 -0
  58. package/dist/src/tui/guided-setup.js.map +1 -0
  59. package/dist/src/tui/model.d.ts +5 -0
  60. package/dist/src/tui/model.js +120 -49
  61. package/dist/src/tui/model.js.map +1 -1
  62. package/dist/src/tui/router.d.ts +5 -3
  63. package/dist/src/tui/router.js.map +1 -1
  64. package/dist/src/tui/scoped-flow.d.ts +2 -0
  65. package/dist/src/tui/scoped-flow.js.map +1 -1
  66. package/dist/src/tui/scoped-inventory.d.ts +1 -0
  67. package/dist/src/tui/screen-registry.d.ts +3 -2
  68. package/dist/src/utils/config-platforms.d.ts +21 -0
  69. package/dist/src/utils/config-platforms.js +51 -0
  70. package/dist/src/utils/config-platforms.js.map +1 -0
  71. package/dist/src/utils/managed-command-materialization.d.ts +1 -0
  72. package/dist/src/utils/managed-command-materialization.js +8 -3
  73. package/dist/src/utils/managed-command-materialization.js.map +1 -1
  74. package/dist/src/utils/plugin-config-command-apply.js +7 -1
  75. package/dist/src/utils/plugin-config-command-apply.js.map +1 -1
  76. package/dist/src/utils/plugin-config-diagnostics.d.ts +16 -0
  77. package/dist/src/utils/plugin-config-diagnostics.js +44 -0
  78. package/dist/src/utils/plugin-config-diagnostics.js.map +1 -0
  79. package/dist/src/utils/plugin-config-impact.js +46 -18
  80. package/dist/src/utils/plugin-config-impact.js.map +1 -1
  81. package/dist/src/utils/plugin-config-references.d.ts +5 -0
  82. package/dist/src/utils/plugin-config-references.js +19 -7
  83. package/dist/src/utils/plugin-config-references.js.map +1 -1
  84. package/dist/src/utils/plugin-config-suggestion-runner.d.ts +45 -12
  85. package/dist/src/utils/plugin-config-suggestion-runner.js +174 -33
  86. package/dist/src/utils/plugin-config-suggestion-runner.js.map +1 -1
  87. package/dist/src/utils/plugin-config-suggestions.d.ts +10 -7
  88. package/dist/src/utils/plugin-config-suggestions.js +41 -13
  89. package/dist/src/utils/plugin-config-suggestions.js.map +1 -1
  90. package/dist/src/utils/plugin-config-write.d.ts +2 -0
  91. package/dist/src/utils/plugin-config-write.js +44 -4
  92. package/dist/src/utils/plugin-config-write.js.map +1 -1
  93. package/dist/src/utils/plugin-config.d.ts +1 -0
  94. package/dist/src/utils/plugin-config.js +33 -8
  95. package/dist/src/utils/plugin-config.js.map +1 -1
  96. package/package.json +3 -3
@@ -1,4 +1,7 @@
1
1
  import { readAgentSettings, previewAgentSettings, saveAgentSettings } from './agent-settings.js';
2
+ import { observePreferences } from '../intent/deployment-preferences.js';
3
+ import { resolveConfigurableLayers, classifyResidualConfigLayers } from '../utils/config-platforms.js';
4
+ import { configObjectHasSensitiveChild } from './config-value-presentation.js';
2
5
  import { selectPluginConfigProfile, getPluginConfigReferenceChoices, PLATFORM_TARGETS, NATIVE_PLATFORM_TARGETS, resolveSupportedPlatforms } from '@lesliechan721/aw-plugin-core';
3
6
  import { configReferenceKey, configReferenceScalars } from './config-references.js';
4
7
  import { preparePluginConfigSuggestions } from '../utils/plugin-config-suggestions.js';
@@ -1605,11 +1608,6 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1605
1608
  updates: intent.updates ?? {},
1606
1609
  cwd: context.cwd,
1607
1610
  });
1608
- for (const key of intent.removeKeys ?? []) {
1609
- if (!definition.fields[key]) {
1610
- throw new TuiOperationBlockedError('unknownConfigKey', '设置字段已变化,请重新检查。');
1611
- }
1612
- }
1613
1611
  }
1614
1612
  const impact = intent.retryApply ? undefined : await analyzePluginConfigMutationImpact({
1615
1613
  plugin,
@@ -1754,11 +1752,6 @@ export function createTuiControllerDependencies(context, progressFeed, options =
1754
1752
  updates: intent.updates ?? {},
1755
1753
  cwd: context.cwd,
1756
1754
  });
1757
- for (const key of intent.removeKeys ?? []) {
1758
- if (!definition.fields[key]) {
1759
- throw new TuiOperationBlockedError('unknownConfigKey', '设置字段已变化,请重新检查。');
1760
- }
1761
- }
1762
1755
  }
1763
1756
  const impact = intent.kind === 'configSave' && !intent.retryApply
1764
1757
  ? await analyzePluginConfigMutationImpact({
@@ -2135,11 +2128,6 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2135
2128
  updates: intent.updates ?? {},
2136
2129
  cwd: context.cwd,
2137
2130
  });
2138
- for (const key of intent.removeKeys ?? []) {
2139
- if (!definition.fields[key]) {
2140
- throw new TuiOperationBlockedError('unknownConfigKey', '设置字段已变化,请重新检查。');
2141
- }
2142
- }
2143
2131
  },
2144
2132
  });
2145
2133
  return;
@@ -2206,6 +2194,16 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2206
2194
  signal,
2207
2195
  });
2208
2196
  const userStore = stores.user;
2197
+ const preferences = await observePreferences({ scope: 'user', cwd: context.cwd, env: context.env });
2198
+ const configurableLayers = resolveConfigurableLayers(pluginId, plugin.manifest, preferences);
2199
+ const residualLayers = classifyResidualConfigLayers(userStore, configurableLayers).map(({ layer }) => {
2200
+ const fields = selectPluginConfigProfile(plugin.manifest.config, layer === 'common' ? undefined : layer).fields;
2201
+ const stored = layer === 'common' ? userStore.common : userStore.platforms?.[layer];
2202
+ return { profile: layer, keys: Object.keys(stored ?? {}).sort().map((key) => {
2203
+ const field = Object.hasOwn(fields, key) ? fields[key] : undefined;
2204
+ return field && !field.sensitive && !configObjectHasSensitiveChild(field) ? key : '[redacted]';
2205
+ }) };
2206
+ });
2209
2207
  const read = await resolveConfigRead({
2210
2208
  pluginName: plugin.manifest.name,
2211
2209
  plugin,
@@ -2249,7 +2247,7 @@ export function createTuiControllerDependencies(context, progressFeed, options =
2249
2247
  effectiveRawValues: effectiveRaw.values,
2250
2248
  sharedNativeRefreshKeys: new Set(plugin.manifest.artifacts?.configKeys ?? []),
2251
2249
  });
2252
- return { ...page, editEvidence: {
2250
+ return { ...page, configurableLayers, residualLayers, editEvidence: {
2253
2251
  platform: config.platform,
2254
2252
  context: config.context ?? 'user',
2255
2253
  sourceIdentity: source.sourceIdentity,