@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,5 @@
1
1
  import type { PlatformName, Scope } from '../types.js';
2
+ import type { RecoveryDiagnostic } from '../recovery/receipt.js';
2
3
  import type { DependencyPlacementPlan, DependencyPlacementTarget } from './dependency-operation-plan.js';
3
4
  export type ReconcileTargetAction = 'install' | 'reinstall' | 'move' | 'keep' | 'block';
4
5
  export type ReconcileTargetState = 'absent' | 'present' | 'partial' | 'error';
@@ -6,6 +7,7 @@ export interface ReconcileTargetPlan extends DependencyPlacementTarget {
6
7
  state: ReconcileTargetState;
7
8
  action: ReconcileTargetAction;
8
9
  errorCode?: string;
10
+ configDiagnostic?: RecoveryDiagnostic;
9
11
  preservedScope?: Scope;
10
12
  order: number;
11
13
  }
@@ -19,6 +21,7 @@ export interface ReconcileActualTarget {
19
21
  state: ReconcileTargetState;
20
22
  action: ReconcileTargetAction;
21
23
  errorCode?: string;
24
+ configDiagnostic?: RecoveryDiagnostic;
22
25
  preservedScope?: Scope;
23
26
  order: number;
24
27
  }
@@ -38,6 +38,7 @@ export function createReconcileOperationPlan(options) {
38
38
  ...(errorCode
39
39
  ? { errorCode }
40
40
  : {}),
41
+ ...(actual.configDiagnostic ? { configDiagnostic: actual.configDiagnostic } : {}),
41
42
  ...(actual.preservedScope ? { preservedScope: actual.preservedScope } : {}),
42
43
  order: actual.order,
43
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"reconcile-operation-plan.js","sourceRoot":"","sources":["../../../src/commands/reconcile-operation-plan.ts"],"names":[],"mappings":"AAgCA,MAAM,UAAU,4BAA4B,CAAC,OAG5C;IACC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAmC,CAAC;IAClE,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;IAClD,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QAClD,MAAM,GAAG,GAAG,GAAG,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAA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AAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3E,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -1,6 +1,11 @@
1
1
  import { isCanonicalCodexMarketplaceRegistration } from '../utils/codex-shared-native.js';
2
2
  import { selectAgents } from '../intent/deployment-preferences.js';
3
+ import { resolveActiveConfigPlatforms } from '../utils/config-platforms.js';
4
+ import { configStatusDiagnostics } from '../utils/plugin-config-diagnostics.js';
5
+ import { createScopeContext } from '../intent/scope-context.js';
6
+ import { inspectPortableExtraInstalled } from '../portable/recovery.js';
3
7
  import { readDemand, demandNativeProjection } from '../recovery/demand.js';
8
+ import { deriveJointDemand } from '../recovery/joint-demand.js';
4
9
  import fs from 'node:fs';
5
10
  import path from 'node:path';
6
11
  import { analyzeCodexSurface } from '../utils/codex-surface-analysis.js';
@@ -955,6 +960,34 @@ async function statusCommandV8InSession(options) {
955
960
  const platforms = selectedPlatforms(options.platform);
956
961
  const coversPlatform = (value) => (value === 'codex' || value === 'claude') && platforms.includes(value);
957
962
  const scopes = selectedScopes(options.scope);
963
+ const installedPortableByScope = new Map();
964
+ for (const scope of scopes) {
965
+ const preferences = observedDemands.get(scope)?.preferences;
966
+ if (preferences?.state !== 'valid' || !preferences.value.targets.includes('generic'))
967
+ continue;
968
+ try {
969
+ const context = await createScopeContext({ scope, cwd: options.cwd, env, readOnly: true });
970
+ try {
971
+ const installed = await inspectPortableExtraInstalled({ scope, context, env: context.env, signal: options.signal });
972
+ installedPortableByScope.set(scope, installed.targets);
973
+ }
974
+ finally {
975
+ await context.dispose();
976
+ }
977
+ }
978
+ catch (error) {
979
+ throwIfCancelled(error);
980
+ }
981
+ }
982
+ const userDemand = observedDemands.get('user');
983
+ const projectDemand = observedDemands.get('project');
984
+ const configRequirementKey = (pluginId, scope, target) => `${pluginId}\0${scope}\0${target}`;
985
+ const requiredConfigTargets = new Set(userDemand ? deriveJointDemand({
986
+ context: { context: projectDemand ? 'project' : 'user', cwd: options.cwd,
987
+ scopes: projectDemand ? ['user', 'project'] : ['user'], ...(projectDemand && projectRoot ? { projectRoot } : {}) },
988
+ user: userDemand, project: projectDemand,
989
+ preferences: userDemand.preferences.state === 'valid' ? userDemand.preferences.value : null,
990
+ }).placements.flatMap((placement) => placement.contributions.map((contribution) => configRequirementKey(placement.pluginId, contribution.scope, placement.target))) : []);
958
991
  const selectorErrors = [];
959
992
  const parsedSelectors = [];
960
993
  const plannedSelectors = [];
@@ -1187,12 +1220,27 @@ async function statusCommandV8InSession(options) {
1187
1220
  plugin.pluginId = formatPluginId({ sourceId: item.resolution.sourceId, pluginName: entry.name });
1188
1221
  let configIssues;
1189
1222
  let configDiagnostic;
1190
- if (plugin.manifest.config?.fields) {
1223
+ if (plugin.manifest.config) {
1191
1224
  const issues = new Map();
1192
- for (const platform of ['codex', 'claude']) {
1193
- if (!supportsPlatform(plugin.manifest, platform))
1225
+ for (const scope of scopes) {
1226
+ const scopedDemand = observedDemands.get(scope);
1227
+ if (!scopedDemand)
1228
+ continue;
1229
+ // Strong preference errors are already reported through demand; never fall back to every platform.
1230
+ if (scopedDemand.preferences.state !== 'valid')
1194
1231
  continue;
1195
- for (const scope of scopes) {
1232
+ const active = resolveActiveConfigPlatforms(plugin.pluginId, plugin.manifest, scopedDemand.preferences);
1233
+ for (const platform of active) {
1234
+ const installed = platform === 'generic'
1235
+ ? installedPortableByScope.get(scope)?.some((target) => target.agent === platform && target.pluginId === plugin.pluginId
1236
+ && target.logicalIdentity === plugin.catalogLogicalIdentity)
1237
+ : ownerInventory.references.some((reference) => reference.platform === platform
1238
+ && reference.sourceId === plugin.sourceId && reference.pluginName === plugin.manifest.name
1239
+ && (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
1240
+ && (!reference.sourceIdentity || reference.sourceIdentity === plugin.sourceIdentity)
1241
+ && reference.scope === scope && (scope === 'user' || reference.projectKey === currentProjectKey));
1242
+ if (!installed && !requiredConfigTargets.has(configRequirementKey(plugin.pluginId, scope, platform)))
1243
+ continue;
1196
1244
  try {
1197
1245
  const resolved = scope === 'project'
1198
1246
  ? await resolveProjectArtifactRenderConfig({
@@ -1240,7 +1288,8 @@ async function statusCommandV8InSession(options) {
1240
1288
  issues.set(`${platform}\0${scope}\0${configIssue.type}\0${configIssue.key}\0${configIssue.source}`, configIssue);
1241
1289
  }
1242
1290
  }
1243
- catch {
1291
+ catch (error) {
1292
+ throwIfCancelled(error);
1244
1293
  configDiagnostic ??= {
1245
1294
  scope,
1246
1295
  code: 'configReadFailed',
@@ -2826,11 +2875,14 @@ async function statusCommandV8InSession(options) {
2826
2875
  || scope === 'project' && error.scope === 'user')) {
2827
2876
  blockers.push({ code: 'nativeStateUnreadable', message: '无法读取 Codex 激活配置。' });
2828
2877
  }
2829
- if (entry.configDiagnostic)
2830
- blockers.push({ code: 'configReadFailed', message: '无法读取插件配置。' });
2831
- if (entry.configIssues?.some((issue) => issue.scope === scope)) {
2832
- blockers.push({ code: 'configInvalid', message: '项目配置需要处理。' });
2878
+ const scopedPreferences = observedDemands.get(scope)?.preferences;
2879
+ if (entry.configDiagnostic?.scope === scope && scopedPreferences?.state === 'valid'
2880
+ && resolveActiveConfigPlatforms(`${entry.source.id}/${entry.name}`, { platforms: entry.platforms }, scopedPreferences).includes(platform)) {
2881
+ blockers.push({ code: 'configInvalid', message: 'Plugin configuration could not be read.', detail: { reasonCode: 'configReadFailed' } });
2833
2882
  }
2883
+ const configBlockers = configStatusDiagnostics((entry.configIssues ?? []).flatMap((issue) => issue.scope === scope && issue.platform === platform && (issue.type === 'missing-required' || issue.type === 'invalid-config')
2884
+ ? [{ type: issue.type, key: issue.key, message: '' }] : []));
2885
+ blockers.push(...configBlockers);
2834
2886
  if (observed?.state === 'error' && !blockers.some((error) => /Unsupported$|collision|conflict|foreign/iu.test(error.code))) {
2835
2887
  blockers.push({ code: 'nativeObservationFailed', message: '无法完成项目 Native 现场观察。' });
2836
2888
  }