@lesliechan721/aw 0.1.0-beta.67 → 0.1.0-beta.69

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 (75) hide show
  1. package/dist/src/commands/options.d.ts +0 -1
  2. package/dist/src/commands/options.js +0 -3
  3. package/dist/src/commands/options.js.map +1 -1
  4. package/dist/src/commands/rebuild-command.d.ts +1 -2
  5. package/dist/src/commands/rebuild-command.js +60 -48
  6. package/dist/src/commands/rebuild-command.js.map +1 -1
  7. package/dist/src/commands/rebuild-integration.js +2 -2
  8. package/dist/src/commands/rebuild-integration.js.map +1 -1
  9. package/dist/src/commands/status-v6.d.ts +6 -1
  10. package/dist/src/commands/status-v6.js +24 -6
  11. package/dist/src/commands/status-v6.js.map +1 -1
  12. package/dist/src/commands/write-commands.js +2 -8
  13. package/dist/src/commands/write-commands.js.map +1 -1
  14. package/dist/src/eval/manifest-v1.js +2 -2
  15. package/dist/src/eval/manifest-v1.js.map +1 -1
  16. package/dist/src/index.d.ts +1 -26
  17. package/dist/src/index.js +3 -22
  18. package/dist/src/index.js.map +1 -1
  19. package/dist/src/output/command-receipt.js +4 -4
  20. package/dist/src/output/command-receipt.js.map +1 -1
  21. package/dist/src/recovery/coordinator.d.ts +0 -1
  22. package/dist/src/recovery/coordinator.js +2 -3
  23. package/dist/src/recovery/coordinator.js.map +1 -1
  24. package/dist/src/recovery/joint-coordinator.js +2 -2
  25. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  26. package/dist/src/recovery/status.js +2 -1
  27. package/dist/src/recovery/status.js.map +1 -1
  28. package/dist/src/review/review-profile.js +2 -2
  29. package/dist/src/review/review-profile.js.map +1 -1
  30. package/dist/src/review/review-selection.js +3 -3
  31. package/dist/src/review/review-selection.js.map +1 -1
  32. package/dist/src/review/source-binding.js +3 -3
  33. package/dist/src/review/source-binding.js.map +1 -1
  34. package/dist/src/tui/controller-runtime.js +8 -8
  35. package/dist/src/tui/controller-runtime.js.map +1 -1
  36. package/dist/src/tui/controller.d.ts +3 -2
  37. package/dist/src/tui/controller.js +13 -16
  38. package/dist/src/tui/controller.js.map +1 -1
  39. package/dist/src/tui/diagnostic-projection.js +1 -1
  40. package/dist/src/tui/diagnostic-projection.js.map +1 -1
  41. package/dist/src/tui/operation-review-planner.js +28 -21
  42. package/dist/src/tui/operation-review-planner.js.map +1 -1
  43. package/dist/src/types.d.ts +0 -1
  44. package/dist/src/types.js.map +1 -1
  45. package/dist/src/utils/artifact-renderer.js +2 -2
  46. package/dist/src/utils/artifact-renderer.js.map +1 -1
  47. package/dist/src/utils/artifact-request.js +2 -2
  48. package/dist/src/utils/artifact-request.js.map +1 -1
  49. package/dist/src/utils/codex-executable-discovery.d.ts +26 -0
  50. package/dist/src/utils/codex-executable-discovery.js +397 -0
  51. package/dist/src/utils/codex-executable-discovery.js.map +1 -0
  52. package/dist/src/utils/codex-manager.d.ts +19 -36
  53. package/dist/src/utils/codex-manager.js +79 -686
  54. package/dist/src/utils/codex-manager.js.map +1 -1
  55. package/dist/src/utils/codex-native-observation.d.ts +1 -1
  56. package/dist/src/utils/codex-native-observation.js +5 -6
  57. package/dist/src/utils/codex-native-observation.js.map +1 -1
  58. package/dist/src/utils/codex-surface-analysis.js +2 -2
  59. package/dist/src/utils/codex-surface-analysis.js.map +1 -1
  60. package/dist/src/utils/native-cli.d.ts +1 -2
  61. package/dist/src/utils/native-cli.js +2 -1
  62. package/dist/src/utils/native-cli.js.map +1 -1
  63. package/dist/src/utils/plugin-config-impact.js +4 -4
  64. package/dist/src/utils/plugin-config-impact.js.map +1 -1
  65. package/dist/src/utils/plugin-config-references.js +8 -8
  66. package/dist/src/utils/plugin-config-references.js.map +1 -1
  67. package/dist/src/utils/plugin-config-write.js +2 -2
  68. package/dist/src/utils/plugin-config-write.js.map +1 -1
  69. package/dist/src/utils/plugin-config.js +4 -4
  70. package/dist/src/utils/plugin-config.js.map +1 -1
  71. package/dist/src/utils/plugin-scripts.js +2 -2
  72. package/dist/src/utils/plugin-scripts.js.map +1 -1
  73. package/dist/src/utils/runtime-config.js +2 -2
  74. package/dist/src/utils/runtime-config.js.map +1 -1
  75. package/package.json +3 -3
@@ -101,12 +101,17 @@ export interface StatusSharedNativeProjection {
101
101
  staleCacheObserved?: boolean;
102
102
  }
103
103
  export declare function projectStatusSharedNativeReasons(sharedNative: StatusSharedNativeProjection | undefined, existingReasonCodes?: readonly string[], desiredEnabled?: boolean): StatusV8Reason[];
104
+ type StatusSystemCodexInspection = Exclude<SystemCodexInspection, {
105
+ state: 'compatible';
106
+ }> | Omit<Extract<SystemCodexInspection, {
107
+ state: 'compatible';
108
+ }>, 'manager'>;
104
109
  export interface StatusActivationProjection {
105
110
  user?: boolean;
106
111
  project?: boolean;
107
112
  effective?: boolean;
108
113
  evidence: 'observed' | 'assumed' | 'unobserved';
109
- systemConsumer?: SystemCodexInspection;
114
+ systemConsumer?: StatusSystemCodexInspection;
110
115
  }
111
116
  export interface StatusExtensionProjection {
112
117
  state: 'ready' | 'missing' | 'drifted' | 'conflict';
@@ -40,7 +40,8 @@ export function statusTargetPlacements(target) {
40
40
  cwd: target.cwd,
41
41
  ...placement,
42
42
  sharedComponents: target.components.filter((component) => component.kind !== 'systemConsumer' || component.key === `codex:${placement.scope}`),
43
- sharedReasons: target.reasons.filter((reason) => reason.code.startsWith('codexSharedNative') || reason.code === 'staleCacheObserved'),
43
+ sharedReasons: target.reasons.filter((reason) => reason.code.startsWith('codexSharedNative') || reason.code === 'staleCacheObserved'
44
+ || reason.code === 'codexCandidateExcluded'),
44
45
  }));
45
46
  }
46
47
  export function flattenStatusTargets(targets) {
@@ -178,6 +179,10 @@ export function statusTargetActivation(target) {
178
179
  && typeof diagnostic === 'string'
179
180
  ? { state: 'unresolved', code, diagnostic, requiredMinVersion }
180
181
  : undefined;
182
+ const diagnostics = consumer.metadata?.diagnostics;
183
+ if (systemConsumer && Array.isArray(diagnostics) && diagnostics.length > 0) {
184
+ systemConsumer = { ...systemConsumer, diagnostics: diagnostics.filter((value) => typeof value === 'string') };
185
+ }
181
186
  }
182
187
  return {
183
188
  ...(user ? { user: user.state === 'enabled' } : {}),
@@ -830,18 +835,25 @@ async function statusCommandV8InSession(options) {
830
835
  });
831
836
  }
832
837
  const nativeCliRunner = options.nativeCliRunner ?? getDefaultNativeCliRunner();
833
- const codexSystemConsumerInspections = new Map();
838
+ let codexSystemConsumerInspection;
834
839
  const inspectCodexSystemConsumer = (scope) => {
835
840
  throwIfCancelled();
836
- let inspection = codexSystemConsumerInspections.get(scope);
841
+ let inspection = codexSystemConsumerInspection;
837
842
  if (!inspection) {
838
843
  inspection = inspectSystemCodex({
839
844
  runner: nativeCliRunner,
840
845
  cwd: options.cwd,
841
846
  env,
847
+ signal: options.signal,
842
848
  operationRequirement: getCodexOperationRequirement(scope),
843
- }).then((result) => { throwIfCancelled(); return result; });
844
- codexSystemConsumerInspections.set(scope, inspection);
849
+ }).then((result) => {
850
+ throwIfCancelled();
851
+ if (result.state === 'compatible') {
852
+ options.codexObservationSession.setManager(result.manager);
853
+ }
854
+ return result;
855
+ });
856
+ codexSystemConsumerInspection = inspection;
845
857
  }
846
858
  return inspection;
847
859
  };
@@ -863,6 +875,7 @@ async function statusCommandV8InSession(options) {
863
875
  cwd: options.cwd,
864
876
  env,
865
877
  nativeCliRunner,
878
+ manager: consumer.manager,
866
879
  scope: options.scope === 'user' ? 'user' : 'both',
867
880
  observationSession: options.codexObservationSession,
868
881
  });
@@ -2561,6 +2574,7 @@ async function statusCommandV8InSession(options) {
2561
2574
  ...(target.platform === 'codex' && consumerBlocking && desiredEnabled
2562
2575
  ? [blocking(consumerIssue.code, consumerIssue.diagnostic)]
2563
2576
  : []),
2577
+ ...(activation?.systemConsumer?.diagnostics ?? []).map((diagnostic) => warning('codexCandidateExcluded', diagnostic)),
2564
2578
  ];
2565
2579
  const targetErrors = [...baseTargetErrors, ...stableErrors];
2566
2580
  const dedupedErrors = [...new Map(targetErrors.map((error) => [
@@ -2628,6 +2642,9 @@ async function statusCommandV8InSession(options) {
2628
2642
  ...('diagnostic' in activation.systemConsumer
2629
2643
  ? { diagnostic: activation.systemConsumer.diagnostic }
2630
2644
  : {}),
2645
+ ...(activation.systemConsumer.diagnostics?.length
2646
+ ? { diagnostics: activation.systemConsumer.diagnostics }
2647
+ : {}),
2631
2648
  },
2632
2649
  }] : []),
2633
2650
  ...(extensions ? [{
@@ -2707,7 +2724,8 @@ async function statusCommandV8InSession(options) {
2707
2724
  const sharedComponents = [...new Map(decorated.flatMap((target) => target.components)
2708
2725
  .filter((component) => component.kind === 'sharedNative' || component.kind === 'systemConsumer')
2709
2726
  .map((component) => [`${component.kind}\0${component.key}`, component])).values()];
2710
- const sharedReason = (reason) => reason.code.startsWith('codexSharedNative') || reason.code === 'staleCacheObserved';
2727
+ const sharedReason = (reason) => reason.code.startsWith('codexSharedNative') || reason.code === 'staleCacheObserved'
2728
+ || reason.code === 'codexCandidateExcluded';
2711
2729
  const sharedReasons = decorated.flatMap((target) => target.reasons.filter(sharedReason));
2712
2730
  const placements = decorated.map((target) => ({
2713
2731
  scope: target.scope,