@lesliechan721/aw 0.1.0-beta.87 → 0.1.0-beta.89
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/command-runtime-config.mjs +40 -12
- package/dist/authoring/assets/command-runtime-config.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +14 -3
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/aw-skill-eval-materializer.js +10 -2
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +1 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-source.js +1 -1
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/lifecycle-command-package.d.ts +1 -0
- package/dist/src/commands/lifecycle-command-package.js +14 -10
- package/dist/src/commands/lifecycle-command-package.js.map +1 -1
- package/dist/src/commands/managed-commands.js +8 -16
- package/dist/src/commands/managed-commands.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +4 -0
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-lifecycle-result.js +2 -1
- package/dist/src/commands/public-lifecycle-result.js.map +1 -1
- package/dist/src/generators/local-plugin.js +6 -0
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +2 -1
- package/dist/src/generators/permissions.js +5 -5
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.js +82 -9
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.js +4 -2
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/public-result.js +16 -4
- package/dist/src/output/public-result.js.map +1 -1
- package/dist/src/output/receipt-projection.js +5 -4
- package/dist/src/output/receipt-projection.js.map +1 -1
- package/dist/src/platforms/grok-permission-config.d.ts +2 -1
- package/dist/src/platforms/grok-permission-config.js +4 -4
- package/dist/src/platforms/grok-permission-config.js.map +1 -1
- package/dist/src/platforms/projection.js +2 -2
- package/dist/src/platforms/projection.js.map +1 -1
- package/dist/src/recovery/status.js +2 -2
- package/dist/src/recovery/status.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +1 -0
- package/dist/src/review/skill-materialization.js +11 -2
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +2 -1
- package/dist/src/tui/config-array-draft.js +3 -0
- package/dist/src/tui/config-array-draft.js.map +1 -1
- package/dist/src/tui/config-leaf-editor.d.ts +2 -1
- package/dist/src/tui/config-leaf-editor.js +7 -4
- package/dist/src/tui/config-leaf-editor.js.map +1 -1
- package/dist/src/tui/config-suggestions.d.ts +22 -0
- package/dist/src/tui/config-suggestions.js +54 -0
- package/dist/src/tui/config-suggestions.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +1 -0
- package/dist/src/tui/config-value-presentation.js +26 -1
- package/dist/src/tui/config-value-presentation.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +284 -87
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +14 -0
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +4 -0
- package/dist/src/tui/controller.js +46 -4
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/operation-review-planner.js +2 -2
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/router.d.ts +17 -18
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +2 -8
- package/dist/src/types.d.ts +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +7 -0
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/component-command-preparation.js +2 -3
- package/dist/src/utils/component-command-preparation.js.map +1 -1
- package/dist/src/utils/managed-command-cli-review.d.ts +11 -1
- package/dist/src/utils/managed-command-cli-review.js +82 -40
- package/dist/src/utils/managed-command-cli-review.js.map +1 -1
- package/dist/src/utils/managed-command-materialization.js +2 -2
- package/dist/src/utils/managed-command-materialization.js.map +1 -1
- package/dist/src/utils/managed-command-review.js +2 -2
- package/dist/src/utils/managed-command-review.js.map +1 -1
- package/dist/src/utils/managed-command-runtime.d.ts +2 -0
- package/dist/src/utils/managed-command-runtime.js +5 -3
- package/dist/src/utils/managed-command-runtime.js.map +1 -1
- package/dist/src/utils/managed-command-snapshots.d.ts +8 -1
- package/dist/src/utils/managed-command-snapshots.js +16 -11
- package/dist/src/utils/managed-command-snapshots.js.map +1 -1
- package/dist/src/utils/managed-command-store.d.ts +6 -1
- package/dist/src/utils/managed-command-store.js +47 -8
- package/dist/src/utils/managed-command-store.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +10 -0
- package/dist/src/utils/native-cli.js +24 -18
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/platform-empty-state.js +3 -2
- package/dist/src/utils/platform-empty-state.js.map +1 -1
- package/dist/src/utils/plugin-config-command-apply.js +7 -5
- package/dist/src/utils/plugin-config-command-apply.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +1 -0
- package/dist/src/utils/plugin-config-impact.js +2 -1
- package/dist/src/utils/plugin-config-impact.js.map +1 -1
- package/dist/src/utils/plugin-config-references.d.ts +2 -0
- package/dist/src/utils/plugin-config-references.js +12 -2
- package/dist/src/utils/plugin-config-references.js.map +1 -1
- package/dist/src/utils/plugin-config-suggestion-runner.d.ts +50 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js +167 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestions.d.ts +47 -0
- package/dist/src/utils/plugin-config-suggestions.js +274 -0
- package/dist/src/utils/plugin-config-suggestions.js.map +1 -0
- package/dist/src/utils/plugin-config.d.ts +5 -1
- package/dist/src/utils/plugin-config.js +48 -22
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +2 -0
- package/dist/src/utils/plugin-scripts.js +101 -28
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +2 -2
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/vitest.config.js +1 -0
- package/dist/vitest.config.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ConfigReferenceContext, ConfigReferenceDraft } from './config-references.js';
|
|
2
|
+
import type { ConfigSuggestionLookup } from './config-suggestions.js';
|
|
3
|
+
import type { ConfigSuggestionsResponseV1, PreparedConfigSuggestions } from '../utils/plugin-config-suggestions.js';
|
|
2
4
|
import type { CatalogActivationMode, CatalogSource, CatalogGenerationActiveV1, CatalogGenerationCandidateEvidence, CatalogGenerationSyncResult, CatalogSourceImpact, CommandProducerResult, ConfigApplyResult, DependencyScopeOverride, PlatformName, PlatformTarget, Scope } from '../types.js';
|
|
3
5
|
import type { PortableReview, PortableInstallReceipt, PortableRetryReview } from '../portable/commands.js';
|
|
4
6
|
import type { CatalogSourceUpdate } from '../utils/catalog-sources.js';
|
|
@@ -798,6 +800,7 @@ export interface TuiControllerDependencies {
|
|
|
798
800
|
getConfigGroups?: (pluginId: string, options: ConfigReadOptions, signal: AbortSignal) => Promise<ConfigGroupViewModel[]>;
|
|
799
801
|
getConfigPage?: (pluginId: string, options: ConfigReadOptions, signal: AbortSignal) => Promise<ConfigPageViewModel>;
|
|
800
802
|
getConfigReferenceContext?: (pluginId: string, options: ConfigProfileOptions, draft: ConfigReferenceDraft, signal: AbortSignal) => Promise<ConfigReferenceContext>;
|
|
803
|
+
getConfigSuggestions?: (lookup: ConfigSuggestionLookup, run: (prepared: Pick<PreparedConfigSuggestions, 'cacheKey' | 'project' | 'run'>) => Promise<ConfigSuggestionsResponseV1>, signal: AbortSignal) => Promise<ConfigSuggestionsResponseV1>;
|
|
801
804
|
getConfigResetAvailability?: (pluginId: string, options: ConfigProfileOptions, signal: AbortSignal) => Promise<ConfigResetAvailability>;
|
|
802
805
|
logError?: (error: unknown, code: string, context?: {
|
|
803
806
|
privateConfigOperation: boolean;
|
|
@@ -1023,6 +1026,7 @@ export declare class TuiController {
|
|
|
1023
1026
|
getConfigGroups(pluginId: string, options: ConfigReadOptions): Promise<ConfigGroupViewModel[]>;
|
|
1024
1027
|
getConfigPage(pluginId: string, options: ConfigReadOptions, signal?: AbortSignal): Promise<ConfigPageViewModel>;
|
|
1025
1028
|
getConfigReferenceContext(pluginId: string, options: ConfigProfileOptions, draft: ConfigReferenceDraft, signal?: AbortSignal): Promise<ConfigReferenceContext>;
|
|
1029
|
+
getConfigSuggestions(lookup: ConfigSuggestionLookup, refresh: boolean, signal: AbortSignal): Promise<ConfigSuggestionsResponseV1>;
|
|
1026
1030
|
saveConfigDraft(request: Extract<OperationIntent, {
|
|
1027
1031
|
kind: 'configSave' | 'configSaveBatch';
|
|
1028
1032
|
}>, signal?: AbortSignal): Promise<ConfigDraftSaveResult>;
|
|
@@ -698,6 +698,7 @@ export class TuiController {
|
|
|
698
698
|
#taskRetryIntent;
|
|
699
699
|
#operationHistory = new OperationHistoryStore();
|
|
700
700
|
#sessionEpoch = 0;
|
|
701
|
+
#configSuggestions = new Map();
|
|
701
702
|
#lastRecordedResultId;
|
|
702
703
|
#operationDiagnostics = new Map();
|
|
703
704
|
constructor(dependencies, progressFeed) {
|
|
@@ -820,6 +821,8 @@ export class TuiController {
|
|
|
820
821
|
return structuredClone(this.#externalDrafts);
|
|
821
822
|
}
|
|
822
823
|
attachOperationHistory(history, epoch) {
|
|
824
|
+
if (epoch !== this.#sessionEpoch)
|
|
825
|
+
this.#configSuggestions.clear();
|
|
823
826
|
this.#operationHistory = history;
|
|
824
827
|
this.#sessionEpoch = epoch;
|
|
825
828
|
}
|
|
@@ -1547,9 +1550,13 @@ export class TuiController {
|
|
|
1547
1550
|
this.#project();
|
|
1548
1551
|
this.#normalizeCurrentRoute();
|
|
1549
1552
|
}
|
|
1553
|
+
#beginCatalogSession(options) {
|
|
1554
|
+
this.#configSuggestions.clear();
|
|
1555
|
+
this.dependencies.beginCatalogSession?.(options);
|
|
1556
|
+
}
|
|
1550
1557
|
async load() {
|
|
1551
1558
|
this.#assertAcceptingActions();
|
|
1552
|
-
this
|
|
1559
|
+
this.#beginCatalogSession();
|
|
1553
1560
|
const generation = ++this.#generation;
|
|
1554
1561
|
this.#scopedRefreshToken.user += 1;
|
|
1555
1562
|
this.#scopedRefreshToken.project += 1;
|
|
@@ -3119,7 +3126,7 @@ export class TuiController {
|
|
|
3119
3126
|
this.#assertAcceptingActions();
|
|
3120
3127
|
if (this.catalogActivationBlockReason())
|
|
3121
3128
|
return false;
|
|
3122
|
-
this
|
|
3129
|
+
this.#beginCatalogSession();
|
|
3123
3130
|
const generation = ++this.#generation;
|
|
3124
3131
|
this.#phase = 'loading';
|
|
3125
3132
|
this.#publish();
|
|
@@ -3187,6 +3194,40 @@ export class TuiController {
|
|
|
3187
3194
|
const combined = signal ? AbortSignal.any([this.#abort.signal, signal]) : this.#abort.signal;
|
|
3188
3195
|
return cloneFrozen(await this.#trackRead(this.dependencies.getConfigReferenceContext(pluginId, structuredClone(options), structuredClone(draft), combined)));
|
|
3189
3196
|
}
|
|
3197
|
+
async getConfigSuggestions(lookup, refresh, signal) {
|
|
3198
|
+
this.#assertAcceptingActions();
|
|
3199
|
+
if (!this.dependencies.getConfigSuggestions)
|
|
3200
|
+
return { schemaVersion: 1, status: 'unavailable', items: [] };
|
|
3201
|
+
const combined = AbortSignal.any([this.#abort.signal, signal]);
|
|
3202
|
+
const frameId = this.#router.snapshot.currentFrameId;
|
|
3203
|
+
const epoch = this.#sessionEpoch;
|
|
3204
|
+
const generation = this.#generation;
|
|
3205
|
+
const verifyRequest = () => {
|
|
3206
|
+
combined.throwIfAborted();
|
|
3207
|
+
if (generation !== this.#generation || epoch !== this.#sessionEpoch || frameId !== this.#router.snapshot.currentFrameId) {
|
|
3208
|
+
throw new DOMException('Config field changed', 'AbortError');
|
|
3209
|
+
}
|
|
3210
|
+
};
|
|
3211
|
+
return this.#trackRead(this.dependencies.getConfigSuggestions(structuredClone(lookup), async (prepared) => {
|
|
3212
|
+
verifyRequest();
|
|
3213
|
+
if (!refresh) {
|
|
3214
|
+
const cached = this.#configSuggestions.get(prepared.cacheKey);
|
|
3215
|
+
if (cached) {
|
|
3216
|
+
// Once a value is recognized as sensitive, keep it out of this shared cache entry.
|
|
3217
|
+
const redacted = cloneFrozen(prepared.project(cached, 'cache'));
|
|
3218
|
+
this.#configSuggestions.set(prepared.cacheKey, redacted);
|
|
3219
|
+
return cloneFrozen(prepared.project(redacted));
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
else
|
|
3223
|
+
this.#configSuggestions.delete(prepared.cacheKey);
|
|
3224
|
+
const response = cloneFrozen(await prepared.run(combined));
|
|
3225
|
+
verifyRequest();
|
|
3226
|
+
if (response.status === 'ok')
|
|
3227
|
+
this.#configSuggestions.set(prepared.cacheKey, response);
|
|
3228
|
+
return cloneFrozen(prepared.project(response));
|
|
3229
|
+
}, combined));
|
|
3230
|
+
}
|
|
3190
3231
|
async saveConfigDraft(request, signal) {
|
|
3191
3232
|
this.#assertAcceptingActions();
|
|
3192
3233
|
if (this.hasActiveWrite)
|
|
@@ -3880,7 +3921,7 @@ export class TuiController {
|
|
|
3880
3921
|
generation = ++this.#generation;
|
|
3881
3922
|
if (ticket.intent.kind === 'sourceMutation' || ticket.intent.kind === 'catalogGeneration'
|
|
3882
3923
|
|| ticket.intent.kind === 'catalogSourcesRecovery') {
|
|
3883
|
-
this
|
|
3924
|
+
this.#beginCatalogSession(ticket.intent.kind === 'sourceMutation' ? {
|
|
3884
3925
|
reuseValidatedGenerations: true,
|
|
3885
3926
|
} : undefined);
|
|
3886
3927
|
try {
|
|
@@ -4318,7 +4359,7 @@ export class TuiController {
|
|
|
4318
4359
|
});
|
|
4319
4360
|
}
|
|
4320
4361
|
async #rebuildStaleReview(ticket, operationId, currentEvidence, generation = this.#generation) {
|
|
4321
|
-
this
|
|
4362
|
+
this.#beginCatalogSession();
|
|
4322
4363
|
generation = ++this.#generation;
|
|
4323
4364
|
try {
|
|
4324
4365
|
const refreshed = await this.dependencies.loadStatus(this.#abort.signal);
|
|
@@ -4472,6 +4513,7 @@ export class TuiController {
|
|
|
4472
4513
|
this.#cancelInstallPlacementRequest();
|
|
4473
4514
|
this.#catalogSourcesSession.dispose();
|
|
4474
4515
|
this.#abort.abort();
|
|
4516
|
+
this.#configSuggestions.clear();
|
|
4475
4517
|
this.#progressUnsubscribe?.();
|
|
4476
4518
|
this.#tickets.clear();
|
|
4477
4519
|
this.#phase = 'disposed';
|