@lesliechan721/aw 0.1.0-beta.83 → 0.1.0-beta.84
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/aw-runtime-config.mjs +1 -1
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -1
- package/dist/src/commands/console.js +1 -0
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +1 -0
- package/dist/src/commands/intent-command.js +6 -2
- package/dist/src/commands/intent-command.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +3 -3
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-lifecycle-result.d.ts +11 -5
- package/dist/src/commands/public-lifecycle-result.js +131 -46
- package/dist/src/commands/public-lifecycle-result.js.map +1 -1
- package/dist/src/commands/public-lifecycle.d.ts +1 -2
- package/dist/src/commands/public-lifecycle.js +56 -34
- package/dist/src/commands/public-lifecycle.js.map +1 -1
- package/dist/src/commands/public-plugin-query.js +28 -11
- package/dist/src/commands/public-plugin-query.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +13 -3
- package/dist/src/commands/rebuild-command.js +647 -286
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +5 -2
- package/dist/src/commands/rebuild-integration.js +55 -29
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +1 -0
- package/dist/src/commands/rebuild-operations.js +23 -4
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +13 -3
- package/dist/src/commands/rebuild-platform-integration.js +229 -133
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
- package/dist/src/index.js +105 -50
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/public-result.d.ts +2 -0
- package/dist/src/output/public-result.js +43 -6
- package/dist/src/output/public-result.js.map +1 -1
- package/dist/src/output/rebuild-progress.d.ts +3 -0
- package/dist/src/output/rebuild-progress.js +12 -2
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.js +55 -18
- package/dist/src/output/receipt-projection.js.map +1 -1
- package/dist/src/output/skill-invocation-notices.d.ts +16 -0
- package/dist/src/output/skill-invocation-notices.js +48 -0
- package/dist/src/output/skill-invocation-notices.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +2 -0
- package/dist/src/platforms/capabilities.js +73 -34
- package/dist/src/platforms/capabilities.js.map +1 -1
- package/dist/src/platforms/contracts.d.ts +9 -9
- package/dist/src/platforms/discovery.d.ts +0 -7
- package/dist/src/platforms/discovery.js +13 -53
- package/dist/src/platforms/discovery.js.map +1 -1
- package/dist/src/platforms/inspection-native.js +1 -80
- package/dist/src/platforms/inspection-native.js.map +1 -1
- package/dist/src/platforms/inspection-query.d.ts +2 -3
- package/dist/src/platforms/inspection-query.js +7 -18
- package/dist/src/platforms/inspection-query.js.map +1 -1
- package/dist/src/platforms/inspection.js +2 -2
- package/dist/src/platforms/inspection.js.map +1 -1
- package/dist/src/platforms/layout.js +1 -5
- package/dist/src/platforms/layout.js.map +1 -1
- package/dist/src/platforms/lifecycle-native-services.d.ts +1 -1
- package/dist/src/platforms/lifecycle-native-services.js +14 -14
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -1
- package/dist/src/platforms/lifecycle-native.js +4 -88
- package/dist/src/platforms/lifecycle-native.js.map +1 -1
- package/dist/src/platforms/lifecycle.js +56 -56
- package/dist/src/platforms/lifecycle.js.map +1 -1
- package/dist/src/platforms/projection-code-extension.js +7 -3
- package/dist/src/platforms/projection-code-extension.js.map +1 -1
- package/dist/src/platforms/projection.d.ts +3 -0
- package/dist/src/platforms/projection.js +86 -54
- package/dist/src/platforms/projection.js.map +1 -1
- package/dist/src/portable/materializer.js +2 -2
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery.d.ts +29 -3
- package/dist/src/portable/recovery.js +220 -78
- package/dist/src/portable/recovery.js.map +1 -1
- package/dist/src/recovery/coordinator.d.ts +18 -4
- package/dist/src/recovery/coordinator.js +357 -165
- package/dist/src/recovery/coordinator.js.map +1 -1
- package/dist/src/recovery/install-concurrency.d.ts +48 -0
- package/dist/src/recovery/install-concurrency.js +195 -0
- package/dist/src/recovery/install-concurrency.js.map +1 -0
- package/dist/src/recovery/interruption.d.ts +19 -0
- package/dist/src/recovery/interruption.js +43 -0
- package/dist/src/recovery/interruption.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +11 -4
- package/dist/src/recovery/joint-coordinator.js +671 -333
- package/dist/src/recovery/joint-coordinator.js.map +1 -1
- package/dist/src/recovery/joint-demand.d.ts +8 -0
- package/dist/src/recovery/joint-demand.js +52 -1
- package/dist/src/recovery/joint-demand.js.map +1 -1
- package/dist/src/recovery/joint-install-execution.d.ts +19 -0
- package/dist/src/recovery/joint-install-execution.js +307 -0
- package/dist/src/recovery/joint-install-execution.js.map +1 -0
- package/dist/src/recovery/joint-install-native-rebase.d.ts +4 -0
- package/dist/src/recovery/joint-install-native-rebase.js +67 -0
- package/dist/src/recovery/joint-install-native-rebase.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +20 -0
- package/dist/src/recovery/receipt.js +67 -1
- package/dist/src/recovery/receipt.js.map +1 -1
- package/dist/src/recovery/retirement.js +1 -1
- package/dist/src/recovery/retirement.js.map +1 -1
- package/dist/src/recovery/status.js +26 -27
- package/dist/src/recovery/status.js.map +1 -1
- package/dist/src/review/platform-profile.d.ts +4 -1
- package/dist/src/review/platform-profile.js +13 -4
- package/dist/src/review/platform-profile.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +1 -0
- package/dist/src/review/skill-materialization.js +28 -16
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/review/source-binding.js +6 -4
- package/dist/src/review/source-binding.js.map +1 -1
- package/dist/src/tui/console-app-v4.d.ts +1 -1
- package/dist/src/tui/console-app-v4.js +137 -57
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +45 -9
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +13 -4
- package/dist/src/tui/controller.js +233 -102
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/deployment-view.js +6 -1
- package/dist/src/tui/deployment-view.js.map +1 -1
- package/dist/src/tui/diagnostic-projection.d.ts +4 -2
- package/dist/src/tui/diagnostic-projection.js +40 -4
- package/dist/src/tui/diagnostic-projection.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +1 -1
- package/dist/src/tui/operation-diagnostic-screens.js +3 -1
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-history.d.ts +6 -3
- package/dist/src/tui/operation-history.js +15 -2
- package/dist/src/tui/operation-history.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +3 -1
- package/dist/src/tui/scoped-flow.js +99 -1
- package/dist/src/tui/scoped-flow.js.map +1 -1
- package/dist/src/tui/session-console-app.d.ts +2 -0
- package/dist/src/tui/session-console-app.js +11 -0
- package/dist/src/tui/session-console-app.js.map +1 -1
- package/dist/src/types.d.ts +8 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/aw-home-mutation-lock.js +2 -1
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/catalog-source-references.js +2 -14
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/component-resources.js +1 -1
- package/dist/src/utils/component-resources.js.map +1 -1
- package/dist/src/utils/managed-command-materialization.d.ts +2 -1
- package/dist/src/utils/managed-command-materialization.js +3 -3
- package/dist/src/utils/managed-command-materialization.js.map +1 -1
- package/dist/src/utils/managed-command-store.d.ts +6 -0
- package/dist/src/utils/managed-command-store.js +90 -18
- package/dist/src/utils/managed-command-store.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.d.ts +2 -0
- package/dist/src/utils/multi-source-catalog.js +3 -2
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +0 -19
- package/dist/src/utils/native-cli.js +2 -42
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/ownership.js +1 -1
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +1 -3
- package/dist/src/utils/platform-empty-state.js +1 -6
- package/dist/src/utils/platform-empty-state.js.map +1 -1
- package/dist/src/utils/plugin-config-write.d.ts +8 -0
- package/dist/src/utils/plugin-config-write.js +89 -25
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-scripts.js +5 -0
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/skill-invocation-warning.d.ts +15 -0
- package/dist/src/utils/skill-invocation-warning.js +42 -0
- package/dist/src/utils/skill-invocation-warning.js.map +1 -0
- package/package.json +3 -3
- package/dist/src/output/native-consent.d.ts +0 -2
- package/dist/src/output/native-consent.js +0 -5
- package/dist/src/output/native-consent.js.map +0 -1
- package/dist/src/platforms/gemini-activation.d.ts +0 -36
- package/dist/src/platforms/gemini-activation.js +0 -331
- package/dist/src/platforms/gemini-activation.js.map +0 -1
- package/dist/src/platforms/gemini-consent.d.ts +0 -8
- package/dist/src/platforms/gemini-consent.js +0 -81
- package/dist/src/platforms/gemini-consent.js.map +0 -1
|
@@ -14,15 +14,16 @@ import { withResolvedCatalogPlugin, withResolvedMultiSourceCatalog, formatPlugin
|
|
|
14
14
|
import { coercePluginConfigUpdates, inspectPluginConfigResetTarget, listNamespacedPluginConfigStoreIdentities, readPluginConfigStore, replacePluginConfigStoreLayer, resolveConfigRead, resolveEffectivePluginConfig, resolveEffectivePluginConfigFromStores, resolvePluginConfigReferenceContext, } from '../utils/plugin-config.js';
|
|
15
15
|
import { readRecoveryStatus } from '../recovery/status.js';
|
|
16
16
|
import { readJointDemand } from '../recovery/joint-demand.js';
|
|
17
|
+
import { RecoveryInterruptedError } from '../recovery/interruption.js';
|
|
17
18
|
import { catalogSourceErrorCode, sanitizeCatalogSourceError } from '../utils/catalog-public-error.js';
|
|
18
19
|
import { activateRecoverySourcesAndReprepare, prepareRecovery, executeRecovery, } from '../recovery/coordinator.js';
|
|
19
20
|
import { prepareRetire, executeRetire } from '../recovery/retirement.js';
|
|
20
21
|
import { prepareTargetsPlan, executeTargetsPlan, prepareIntentPlan, executeIntentPlan } from './scoped-flow.js';
|
|
21
|
-
import { applyPluginConfigWrite, applyPluginConfig, preparePluginConfigApply, disposePluginConfigApply, resolveConfigPreApplyAuthorization, resetPluginConfigWithHelper, } from '../utils/plugin-config-write.js';
|
|
22
|
+
import { applyPluginConfigWrite, applyPluginConfig, ConfigApplyInterruptedError, preparePluginConfigApply, disposePluginConfigApply, resolveConfigPreApplyAuthorization, resetPluginConfigWithHelper, } from '../utils/plugin-config-write.js';
|
|
22
23
|
import { analyzePluginConfigMutationImpact, discoverPluginConfigManagedCommandPackages, pluginConfigTargetRenderScopes, pluginSharedNativeConfigRenderUnits } from '../utils/plugin-config-impact.js';
|
|
23
24
|
import { collectPluginConfigReferenceEvidence, pluginConfigHasExternalReferences, resolvePluginConfigReferenceConsumers, resolvePluginConfigReferencePlugins } from '../utils/plugin-config-references.js';
|
|
24
25
|
import { inventoryCatalogSourceReferences } from '../utils/catalog-source-references.js';
|
|
25
|
-
import { operationEvidenceMatches, operationEvidenceFingerprint, TuiConfigInvalidStoreError, TuiController, TuiOperationBlockedError, } from './controller.js';
|
|
26
|
+
import { operationEvidenceMatches, operationEvidenceFingerprint, configApplyHasCompletedWork, TuiConfigInvalidStoreError, TuiController, TuiOperationBlockedError, } from './controller.js';
|
|
26
27
|
import { buildConfigPage, } from './model.js';
|
|
27
28
|
import { projectCatalogSourceLocation } from '../utils/catalog-source-presentation.js';
|
|
28
29
|
import { calculateCatalogSourceConfigFingerprint, calculateCatalogSourceIdentity, } from '../utils/catalog-source-identity.js';
|
|
@@ -1934,7 +1935,16 @@ export function createTuiControllerDependencies(context, progressFeed, options =
|
|
|
1934
1935
|
const refreshed = await activateRecoverySourcesAndReprepare(plan.plan, { runtime: context });
|
|
1935
1936
|
return { kind: 'recoveryReview', plan: { kind: 'recovery', scope: plan.scope, plan: refreshed } };
|
|
1936
1937
|
}
|
|
1937
|
-
const receipt = await executeRecovery(plan.plan, {
|
|
1938
|
+
const receipt = await executeRecovery(plan.plan, {
|
|
1939
|
+
yes: true,
|
|
1940
|
+
runtime: progressFeed ? { ...context, onInstallProgress: progressFeed.setInstallProgress } : context,
|
|
1941
|
+
}).catch((error) => {
|
|
1942
|
+
if (!(error instanceof RecoveryInterruptedError))
|
|
1943
|
+
throw error;
|
|
1944
|
+
if (context.interruption && error.code === 'processCleanupUnconfirmed')
|
|
1945
|
+
context.interruption.cleanupFailed = true;
|
|
1946
|
+
return error.receipt;
|
|
1947
|
+
});
|
|
1938
1948
|
return { kind: 'recovery', receipt };
|
|
1939
1949
|
},
|
|
1940
1950
|
loadPluginContent,
|
|
@@ -2645,7 +2655,15 @@ export function createTuiControllerDependencies(context, progressFeed, options =
|
|
|
2645
2655
|
const approvedPreApplyTargets = reviewedBatch.groups.flatMap((group) => group.config.preApplyAuthorization ?? []);
|
|
2646
2656
|
const results = [];
|
|
2647
2657
|
const packageInfo = await readCliPackageInfo();
|
|
2658
|
+
let interrupted = false;
|
|
2648
2659
|
for (const group of intent.groups) {
|
|
2660
|
+
if (interrupted) {
|
|
2661
|
+
results.push({
|
|
2662
|
+
scope: 'user', platform: group.platform, status: 'notStarted',
|
|
2663
|
+
configSaved: false, applyRequested: intent.apply, applyStatus: intent.apply ? 'notStarted' : 'notRequested',
|
|
2664
|
+
});
|
|
2665
|
+
continue;
|
|
2666
|
+
}
|
|
2649
2667
|
const groupIntent = configSaveBatchGroupIntent(intent, group);
|
|
2650
2668
|
const reviewedGroup = reviewedBatch.groups.find((item) => item.platform === group.platform);
|
|
2651
2669
|
if (!reviewedGroup) {
|
|
@@ -2741,15 +2759,16 @@ export function createTuiControllerDependencies(context, progressFeed, options =
|
|
|
2741
2759
|
? 'succeeded'
|
|
2742
2760
|
: result.apply.state === 'skipped'
|
|
2743
2761
|
? 'notNeeded'
|
|
2744
|
-
: 'failed';
|
|
2762
|
+
: configApplyHasCompletedWork(result.apply) ? 'partial' : 'failed';
|
|
2763
|
+
const applyIncomplete = applyStatus === 'failed' || applyStatus === 'partial';
|
|
2745
2764
|
results.push({
|
|
2746
2765
|
scope: 'user', platform: group.platform,
|
|
2747
|
-
status:
|
|
2766
|
+
status: applyIncomplete ? 'failed' : 'succeeded',
|
|
2748
2767
|
configSaved,
|
|
2749
2768
|
applyRequested: intent.apply,
|
|
2750
2769
|
applyStatus,
|
|
2751
2770
|
execution: { ...result, operationRebuildResults },
|
|
2752
|
-
...(
|
|
2771
|
+
...(applyIncomplete ? {
|
|
2753
2772
|
errorCode: result.apply.state === 'unavailable'
|
|
2754
2773
|
? result.apply.error?.code ?? result.apply.reason
|
|
2755
2774
|
: result.apply.targetResults.find((target) => target.errorCode)?.errorCode
|
|
@@ -2758,6 +2777,13 @@ export function createTuiControllerDependencies(context, progressFeed, options =
|
|
|
2758
2777
|
});
|
|
2759
2778
|
}
|
|
2760
2779
|
catch (error) {
|
|
2780
|
+
const interruption = error instanceof ConfigApplyInterruptedError ? error : undefined;
|
|
2781
|
+
if (interruption) {
|
|
2782
|
+
interrupted = true;
|
|
2783
|
+
if (context.interruption && interruption.code === 'processCleanupUnconfirmed') {
|
|
2784
|
+
context.interruption.cleanupFailed = true;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2761
2787
|
configSaved = error?.configWrite === 'succeeded';
|
|
2762
2788
|
const errorCode = typeof error === 'object' && error !== null
|
|
2763
2789
|
&& 'code' in error && typeof error.code === 'string'
|
|
@@ -2768,10 +2794,14 @@ export function createTuiControllerDependencies(context, progressFeed, options =
|
|
|
2768
2794
|
status: 'failed',
|
|
2769
2795
|
configSaved,
|
|
2770
2796
|
applyRequested: intent.apply,
|
|
2771
|
-
applyStatus: intent.apply ? '
|
|
2797
|
+
applyStatus: !intent.apply ? 'notRequested'
|
|
2798
|
+
: configApplyHasCompletedWork(interruption?.apply) ? 'partial' : 'failed',
|
|
2772
2799
|
errorCode,
|
|
2773
|
-
...(operationRebuildResults.length > 0
|
|
2774
|
-
? { execution: {
|
|
2800
|
+
...(interruption || operationRebuildResults.length > 0
|
|
2801
|
+
? { execution: {
|
|
2802
|
+
operationRebuildResults,
|
|
2803
|
+
...(interruption ? { apply: interruption.apply, operationDiagnostic: interruption.operationDiagnostic } : {}),
|
|
2804
|
+
} }
|
|
2775
2805
|
: {}),
|
|
2776
2806
|
});
|
|
2777
2807
|
}
|
|
@@ -2893,6 +2923,12 @@ export function createTuiControllerDependencies(context, progressFeed, options =
|
|
|
2893
2923
|
});
|
|
2894
2924
|
return { ...result, operationRebuildResults };
|
|
2895
2925
|
},
|
|
2926
|
+
}).catch((error) => {
|
|
2927
|
+
if (error instanceof ConfigApplyInterruptedError && context.interruption
|
|
2928
|
+
&& error.code === 'processCleanupUnconfirmed') {
|
|
2929
|
+
context.interruption.cleanupFailed = true;
|
|
2930
|
+
}
|
|
2931
|
+
throw error;
|
|
2896
2932
|
});
|
|
2897
2933
|
}
|
|
2898
2934
|
throw new TuiOperationBlockedError('operationNotImplemented', '这个写操作尚未接入新 Controller。');
|