@lesliechan721/aw 0.1.0-beta.25 → 0.1.0-beta.27

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 (54) hide show
  1. package/dist/src/portable/commands.d.ts +39 -5
  2. package/dist/src/portable/commands.js +249 -30
  3. package/dist/src/portable/commands.js.map +1 -1
  4. package/dist/src/portable/skills-cli.d.ts +15 -7
  5. package/dist/src/portable/skills-cli.js +35 -19
  6. package/dist/src/portable/skills-cli.js.map +1 -1
  7. package/dist/src/tui/catalog-sources/session.js +9 -0
  8. package/dist/src/tui/catalog-sources/session.js.map +1 -1
  9. package/dist/src/tui/catalog-store-task.d.ts +16 -0
  10. package/dist/src/tui/catalog-store-task.js +19 -0
  11. package/dist/src/tui/catalog-store-task.js.map +1 -0
  12. package/dist/src/tui/components.d.ts +15 -0
  13. package/dist/src/tui/components.js +24 -3
  14. package/dist/src/tui/components.js.map +1 -1
  15. package/dist/src/tui/console-app-v4.d.ts +2 -1
  16. package/dist/src/tui/console-app-v4.js +2147 -1476
  17. package/dist/src/tui/console-app-v4.js.map +1 -1
  18. package/dist/src/tui/controller-runtime.js +396 -16
  19. package/dist/src/tui/controller-runtime.js.map +1 -1
  20. package/dist/src/tui/controller.d.ts +131 -41
  21. package/dist/src/tui/controller.js +493 -33
  22. package/dist/src/tui/controller.js.map +1 -1
  23. package/dist/src/tui/dependency-graph.d.ts +11 -0
  24. package/dist/src/tui/dependency-graph.js +19 -0
  25. package/dist/src/tui/dependency-graph.js.map +1 -1
  26. package/dist/src/tui/diagnostic-projection.js +83 -0
  27. package/dist/src/tui/diagnostic-projection.js.map +1 -1
  28. package/dist/src/tui/model.d.ts +4 -1
  29. package/dist/src/tui/model.js +18 -13
  30. package/dist/src/tui/model.js.map +1 -1
  31. package/dist/src/tui/operation-diagnostic-screens.js +3 -2
  32. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
  33. package/dist/src/tui/operation-review-planner.js +95 -8
  34. package/dist/src/tui/operation-review-planner.js.map +1 -1
  35. package/dist/src/tui/plugin-content.d.ts +23 -0
  36. package/dist/src/tui/plugin-content.js +336 -0
  37. package/dist/src/tui/plugin-content.js.map +1 -0
  38. package/dist/src/tui/router.d.ts +27 -9
  39. package/dist/src/tui/router.js +13 -9
  40. package/dist/src/tui/router.js.map +1 -1
  41. package/dist/src/tui/screen-registry.d.ts +81 -14
  42. package/dist/src/tui/screen-registry.js +46 -17
  43. package/dist/src/tui/screen-registry.js.map +1 -1
  44. package/dist/src/tui/session-console-app.js +1 -1
  45. package/dist/src/tui/session-console-app.js.map +1 -1
  46. package/dist/src/tui/session-host.d.ts +1 -0
  47. package/dist/src/tui/session-host.js +13 -1
  48. package/dist/src/tui/session-host.js.map +1 -1
  49. package/dist/src/utils/codex-reconciler.js +5 -1
  50. package/dist/src/utils/codex-reconciler.js.map +1 -1
  51. package/dist/src/utils/codex-surface-analysis.d.ts +1 -0
  52. package/dist/src/utils/codex-surface-analysis.js +2 -0
  53. package/dist/src/utils/codex-surface-analysis.js.map +1 -1
  54. package/package.json +3 -3
@@ -1,20 +1,23 @@
1
1
  import type { CatalogActivationMode, CatalogSource, CatalogGenerationActiveV1, CatalogGenerationCandidateEvidence, CatalogGenerationSyncResult, CatalogSourceImpact, DependencyScopeOverride, PlatformName, Scope } from '../types.js';
2
- import type { PortableReview } from '../portable/commands.js';
2
+ import type { PortableReview, PortableInstallReceipt, PortableRetryReview } from '../portable/commands.js';
3
3
  import type { CatalogSourceUpdate } from '../utils/catalog-sources.js';
4
4
  import type { CatalogGenerationFreshnessState, CatalogGenerationFreshnessResult } from '../utils/catalog-generation-service.js';
5
5
  import type { StatusV8Payload, StatusV8PluginSummary, StatusScopedTarget, StatusTargetRevision } from '../commands/status-v6.js';
6
6
  import type { ReconcileOperationPlan } from '../commands/reconcile-operation-plan.js';
7
- import type { RebuildCommandResult } from '../commands/rebuild-command.js';
7
+ import type { PreApplyAuthorizationTarget, RebuildCommandResult } from '../commands/rebuild-command.js';
8
8
  import type { OfflineCleanupTargetEvidence } from '../commands/offline-cleanup-evidence.js';
9
9
  import type { CodexReconcilePlan } from '../utils/codex-reconciler.js';
10
10
  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
+ import type { PluginContentOverview } from './plugin-content.js';
13
14
  import { OperationHistoryStore, type OperationDiagnosticDetail, type OperationEffectFacts, type OperationHistorySummary, type OperationReportPreview, type SafeOperationDiagnostic, type SaveOperationReportResult } from './operation-history.js';
14
15
  import { type ConfigInvalidStoreEvidence, type PluginInstallFilter, type PortableBlockerCode, type TuiPageContext, type TuiRoute, type TuiRouterSnapshot } from './router.js';
15
16
  import { type CatalogSourceGenerationViewModel } from './catalog-generation.js';
16
17
  import type { CatalogSourceFreshnessViewModel } from './catalog-freshness.js';
17
18
  import type { CatalogSessionReusableCandidate } from './catalog-sources/types.js';
19
+ import type { CatalogStoreStatusResult } from '../commands/catalog-store.js';
20
+ import type { CatalogStoreTaskEvidence } from './catalog-store-task.js';
18
21
  import { type PluginWriteTaskBlockedTarget, type PluginWriteTaskCandidate, type PluginWriteTaskCause, type PluginWriteTaskGoal, type PluginWriteTaskIntent, type PluginWriteTaskTarget } from './plugin-write-task.js';
19
22
  export type { PluginWriteTaskBlockReason, PluginWriteTaskCandidate, PluginWriteTaskExpectedUpdate, PluginWriteTaskGoal, PluginWriteTaskIntent, PluginWriteTaskMethod, PluginWriteTaskTarget, } from './plugin-write-task.js';
20
23
  type CatalogActivationBlockReason = 'configDraft' | 'sourceDraft' | 'batchDraft' | 'portableDraft' | 'activeReview' | 'reviewPreparation' | 'writeProgress';
@@ -33,6 +36,9 @@ export type PluginWriteBatchSelection = {
33
36
  } | {
34
37
  kind: 'targets';
35
38
  targets: PluginWriteBatchTarget[];
39
+ } | {
40
+ kind: 'currentProjectIntentTargets';
41
+ targets: PluginWriteBatchTarget[];
36
42
  } | {
37
43
  kind: 'currentProjectIntentRoots';
38
44
  };
@@ -66,6 +72,7 @@ export interface PluginWriteBatchGroupEvidence {
66
72
  export interface PluginWriteBatchEvidence extends OperationEvidence {
67
73
  requestedPluginIds: string[];
68
74
  groups: PluginWriteBatchGroupEvidence[];
75
+ projectIntentDigest?: string;
69
76
  targetVersions?: Array<PluginWriteBatchTarget & {
70
77
  presence: 'new' | 'installed' | 'unknown';
71
78
  installedVersion?: string;
@@ -115,6 +122,39 @@ export interface PluginWriteTaskExecutionResult extends RebuildCommandResult {
115
122
  sourceResults: PluginWriteTaskSourceResult[];
116
123
  }
117
124
  export type OperationKind = OperationIntent['kind'];
125
+ export interface ConfigOperationChange {
126
+ key: string;
127
+ title: string;
128
+ before: string;
129
+ after: string;
130
+ children?: Array<{
131
+ property: string;
132
+ before: string;
133
+ after: string;
134
+ private?: boolean;
135
+ }>;
136
+ }
137
+ export interface ConfigSaveBatchGroup {
138
+ scope: Scope;
139
+ updates?: Record<string, unknown>;
140
+ removeKeys?: string[];
141
+ sensitiveKeys?: string[];
142
+ privateKeys?: string[];
143
+ changes?: ConfigOperationChange[];
144
+ }
145
+ export interface ConfigSaveBatchGroupResult {
146
+ scope: Scope;
147
+ status: 'succeeded' | 'failed';
148
+ configSaved: boolean;
149
+ applyRequested: boolean;
150
+ applyStatus: 'notRequested' | 'notNeeded' | 'succeeded' | 'failed';
151
+ errorCode?: string;
152
+ execution?: unknown;
153
+ }
154
+ export interface ConfigSaveBatchExecutionResult {
155
+ status: 'succeeded' | 'partial' | 'failed';
156
+ groups: ConfigSaveBatchGroupResult[];
157
+ }
118
158
  export interface IssueOrigin {
119
159
  issueId: string;
120
160
  issueKey: string;
@@ -152,6 +192,10 @@ export type OperationIntent = {
152
192
  scope: Scope;
153
193
  selectedSkills: string[];
154
194
  requestedAgents?: string[];
195
+ retry?: {
196
+ receipt: PortableInstallReceipt;
197
+ review?: PortableRetryReview;
198
+ };
155
199
  } | {
156
200
  kind: 'configSave';
157
201
  pluginId: string;
@@ -163,35 +207,19 @@ export type OperationIntent = {
163
207
  removeKeys?: string[];
164
208
  sensitiveKeys?: string[];
165
209
  privateKeys?: string[];
166
- changes?: Array<{
167
- key: string;
168
- title: string;
169
- before: string;
170
- after: string;
171
- children?: Array<{
172
- property: string;
173
- before: string;
174
- after: string;
175
- private?: boolean;
176
- }>;
177
- }>;
210
+ changes?: ConfigOperationChange[];
211
+ } | {
212
+ kind: 'configSaveBatch';
213
+ pluginId: string;
214
+ apply: boolean;
215
+ scriptTimeoutMs?: number;
216
+ groups: ConfigSaveBatchGroup[];
178
217
  } | {
179
218
  kind: 'configReset';
180
219
  pluginId: string;
181
220
  scope: Scope;
182
221
  expectedStoreState?: 'invalid';
183
- changes?: Array<{
184
- key: string;
185
- title: string;
186
- before: string;
187
- after: string;
188
- children?: Array<{
189
- property: string;
190
- before: string;
191
- after: string;
192
- private?: boolean;
193
- }>;
194
- }>;
222
+ changes?: ConfigOperationChange[];
195
223
  } | {
196
224
  kind: 'sourceMutation';
197
225
  action: 'add' | 'update' | 'setPrimary' | 'remove';
@@ -218,7 +246,27 @@ export type OperationIntent = {
218
246
  setPrimaryAfterActivation?: boolean;
219
247
  } | {
220
248
  kind: 'catalogSourcesRecovery';
249
+ } | {
250
+ kind: 'catalogStorePrune';
221
251
  };
252
+ export interface ConfigOperationEvidence {
253
+ scope: Scope;
254
+ schemaIdentity?: string;
255
+ storeDigest: string;
256
+ impactState?: 'known' | 'unknown';
257
+ noEffectiveChange?: true;
258
+ affectedTargets: Array<{
259
+ platform: PlatformName;
260
+ scope: Scope;
261
+ }>;
262
+ preApplyAuthorization?: PreApplyAuthorizationTarget[];
263
+ sharedNativeRenderTargets?: Array<{
264
+ id: string;
265
+ skillKey: string;
266
+ refreshKeys: string[];
267
+ }>;
268
+ shareability?: 'verified' | 'unverified';
269
+ }
222
270
  export interface OperationEvidence {
223
271
  catalog: {
224
272
  configDigest: string;
@@ -250,23 +298,13 @@ export interface OperationEvidence {
250
298
  packageName: '@openai/codex';
251
299
  version: string;
252
300
  };
253
- config?: {
254
- scope: Scope;
255
- schemaIdentity?: string;
256
- storeDigest: string;
257
- impactState?: 'known' | 'unknown';
258
- noEffectiveChange?: true;
259
- affectedTargets: Array<{
260
- platform: PlatformName;
301
+ config?: ConfigOperationEvidence;
302
+ configBatch?: {
303
+ groups: Array<{
261
304
  scope: Scope;
305
+ config: ConfigOperationEvidence;
306
+ targetFingerprint: string;
262
307
  }>;
263
- shareability?: 'verified' | 'unverified';
264
- sharedNativeRenderTargets?: Array<{
265
- id: string;
266
- skillKey: string;
267
- refreshKeys: string[];
268
- }>;
269
- preApplyAuthorization?: import('../commands/rebuild-command.js').PreApplyAuthorizationTarget[];
270
308
  };
271
309
  resetTarget?: {
272
310
  sourceId: string;
@@ -311,6 +349,7 @@ export interface OperationEvidence {
311
349
  setPrimaryAfterActivation?: boolean;
312
350
  };
313
351
  portable?: PortableReview;
352
+ catalogStore?: CatalogStoreTaskEvidence;
314
353
  }
315
354
  export interface OperationReviewChange {
316
355
  kind: 'add' | 'change' | 'remove' | 'keep' | 'warning';
@@ -463,6 +502,14 @@ export interface OperationResultSummary {
463
502
  configApplySkippedReason?: 'invalidConfig';
464
503
  configScope?: Scope;
465
504
  configApplyRetryAvailable?: boolean;
505
+ configRetryApply?: boolean;
506
+ configGroups?: Array<{
507
+ scope: Scope;
508
+ configSaved: boolean;
509
+ applyRequested: boolean;
510
+ applyStatus: ConfigSaveBatchGroupResult['applyStatus'];
511
+ errorCode?: string;
512
+ }>;
466
513
  resetDisposition?: 'absent' | 'deletedFile' | 'unlinkedSymlink' | 'quarantinedDirectory';
467
514
  quarantineBasename?: string;
468
515
  changes?: string[];
@@ -492,10 +539,19 @@ export interface OperationResultSummary {
492
539
  scope: Scope;
493
540
  materializationDigest: string;
494
541
  skillsCliVersion: string;
542
+ verified: Array<{
543
+ name: string;
544
+ scope?: string;
545
+ agents: string[];
546
+ }>;
495
547
  missing: Array<{
496
548
  skill: string;
497
549
  agent?: string;
498
550
  }>;
551
+ unknown: Array<{
552
+ skill: string;
553
+ agent?: string;
554
+ }>;
499
555
  verificationUnknown: boolean;
500
556
  recovery?: string;
501
557
  failureCode?: string;
@@ -546,6 +602,11 @@ export interface PluginOperationProgressLine {
546
602
  state: 'pending' | 'running' | 'completed' | 'kept' | 'failed' | 'skipped';
547
603
  }
548
604
  export interface TuiStatusLoadResult {
605
+ projectRoot?: string;
606
+ projectIntentRoots?: Array<{
607
+ pluginId: string;
608
+ platforms: PlatformName[];
609
+ }>;
549
610
  cliChannel?: 'latest' | 'beta';
550
611
  payload: StatusV8Payload;
551
612
  pluginSummaries: StatusV8PluginSummary[];
@@ -553,6 +614,7 @@ export interface TuiStatusLoadResult {
553
614
  sourceDetails?: SourceDetailViewModel[];
554
615
  configuredSources?: CatalogSource[];
555
616
  dependencyOverviews?: PluginDependencyOverviewViewModel[];
617
+ contentOverviews?: Record<string, PluginContentOverview>;
556
618
  portablePluginIds?: string[];
557
619
  configStoreInventory?: Array<{
558
620
  pluginId: string;
@@ -563,6 +625,17 @@ export interface TuiStatusLoadResult {
563
625
  catalogGenerations?: CatalogSourceGenerationViewModel[];
564
626
  sessionGenerationKeys?: Record<string, string>;
565
627
  }
628
+ export interface ProjectIntentReminderTarget extends PluginWriteBatchTarget {
629
+ reasonCodes: string[];
630
+ }
631
+ export interface ProjectIntentReminder {
632
+ projectRoot: string;
633
+ signature: string;
634
+ actionableTargets: ProjectIntentReminderTarget[];
635
+ blockedTargets: ProjectIntentReminderTarget[];
636
+ unconfirmedTargets: PluginWriteBatchTarget[];
637
+ }
638
+ export declare function projectCurrentIntentReminder(status: TuiStatusLoadResult): ProjectIntentReminder | undefined;
566
639
  export interface InstallTargetOption {
567
640
  platform: PlatformName;
568
641
  compatible: boolean;
@@ -588,11 +661,14 @@ export interface TuiControllerDependencies {
588
661
  reuseValidatedGenerations?: boolean;
589
662
  }) => void;
590
663
  loadStatus: (signal: AbortSignal) => Promise<TuiStatusLoadResult>;
664
+ loadPluginContent?: (pluginId: string, signal: AbortSignal) => Promise<PluginContentOverview>;
591
665
  probeCatalogFreshness?: (sourceId: string, options: {
592
666
  fullValidation: boolean;
593
667
  }, signal: AbortSignal) => Promise<CatalogGenerationFreshnessResult>;
594
668
  inspectSourceRemoval?: (sourceId: string, signal: AbortSignal) => Promise<SourceReferenceSummaryViewModel>;
669
+ inspectCatalogStore?: (signal: AbortSignal) => Promise<CatalogStoreStatusResult>;
595
670
  captureEvidence: (intent: OperationIntent, signal?: AbortSignal) => Promise<OperationEvidence>;
671
+ recheckPortableInstall?: (receipt: PortableInstallReceipt, signal: AbortSignal) => Promise<PortableInstallReceipt>;
596
672
  validateIntent?: (intent: OperationIntent, signal: AbortSignal) => Promise<void>;
597
673
  prepareReviewEvidence?: (intent: OperationIntent, signal: AbortSignal, onStage: (stage: ReviewPreparationStageId) => void | Promise<void>, reusableCandidate?: CatalogSessionReusableCandidate) => Promise<OperationEvidence>;
598
674
  previewDependencyPlacement?: (intent: Extract<OperationIntent, {
@@ -659,6 +735,13 @@ export interface TuiControllerSnapshot {
659
735
  scope: Scope;
660
736
  };
661
737
  installPlacementDraft?: InstallPlacementDraftViewModel;
738
+ completionNotice?: {
739
+ pluginId: string;
740
+ title: string;
741
+ description: string;
742
+ operationRecordId?: string;
743
+ };
744
+ projectIntentReminder?: ProjectIntentReminder;
662
745
  }
663
746
  export declare class TuiOperationBlockedError extends Error {
664
747
  readonly code: string;
@@ -714,10 +797,13 @@ export declare class TuiController {
714
797
  refreshPortableInstallDraft(pluginId: string): Promise<PortableSkillSelectionViewModel>;
715
798
  togglePortableSkill(name: string): void;
716
799
  selectAllPortableSkills(): void;
800
+ clearPortableSkills(): void;
717
801
  setPortableAgentMode(mode: 'automatic' | 'explicit', requestedAgents?: string[]): void;
718
802
  setPortableScope(scope: Scope): void;
719
803
  buildPortableInstallReview(): Promise<OperationReviewModel>;
720
804
  startPortableInstallReviewPreparation(): ReviewPreparationSnapshot;
805
+ recheckPortableResult(): Promise<PortableInstallReceipt>;
806
+ startPortableRetryReviewPreparation(): ReviewPreparationSnapshot;
721
807
  discardPortableDraft(): void;
722
808
  replace(route: TuiRoute, context?: TuiPageContext): void;
723
809
  beginConfigFlow(pluginId: string): void;
@@ -750,6 +836,9 @@ export declare class TuiController {
750
836
  installFilter?: PluginInstallFilter;
751
837
  }): PluginListItemViewModel[];
752
838
  getPluginOverview(pluginId: string): PluginListItemViewModel | undefined;
839
+ getPluginContentOverview(pluginId: string): PluginContentOverview | undefined;
840
+ getPluginContentState(pluginId: string): 'idle' | 'loading' | 'ready';
841
+ loadPluginContent(pluginId: string): Promise<void>;
753
842
  getPluginSourceIdentity(pluginId: string): string | undefined;
754
843
  listCurrentProjectIntentRoots(): string[];
755
844
  listPluginWriteBatchTargets(action: Exclude<BatchPluginWriteAction, 'install'>, pluginIds: readonly string[]): PluginWriteBatchTarget[];
@@ -795,6 +884,7 @@ export declare class TuiController {
795
884
  sourceId: string;
796
885
  }): Promise<boolean>;
797
886
  inspectSourceRemoval(sourceId: string): Promise<SourceReferenceSummaryViewModel>;
887
+ inspectCatalogStore(): Promise<CatalogStoreStatusResult>;
798
888
  getConfigGroups(pluginId: string, layer: {
799
889
  scope: Scope;
800
890
  }): Promise<ConfigGroupViewModel[]>;