@lesliechan721/aw 0.1.0-beta.83 → 0.1.0-beta.85
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/index.js +2 -6
- package/dist/index.js.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 +14 -13
- package/dist/src/commands/public-lifecycle-result.js +204 -64
- 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 +44 -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 +665 -288
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +6 -2
- package/dist/src/commands/rebuild-integration.js +60 -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 +28 -6
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +20 -5
- package/dist/src/commands/rebuild-platform-integration.js +752 -182
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +7 -1
- package/dist/src/generators/permissions.js +56 -0
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +112 -54
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/scope-context.d.ts +4 -2
- package/dist/src/intent/scope-context.js +37 -7
- package/dist/src/intent/scope-context.js.map +1 -1
- package/dist/src/output/component-delivery.d.ts +21 -0
- package/dist/src/output/component-delivery.js +82 -0
- package/dist/src/output/component-delivery.js.map +1 -0
- package/dist/src/output/public-result.d.ts +4 -0
- package/dist/src/output/public-result.js +85 -15
- 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 +64 -19
- package/dist/src/output/receipt-projection.js.map +1 -1
- package/dist/src/output/skill-invocation-notices.d.ts +18 -0
- package/dist/src/output/skill-invocation-notices.js +84 -0
- package/dist/src/output/skill-invocation-notices.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +6 -1
- package/dist/src/platforms/capabilities.js +161 -38
- package/dist/src/platforms/capabilities.js.map +1 -1
- package/dist/src/platforms/contracts.d.ts +45 -10
- package/dist/src/platforms/discovery.d.ts +11 -7
- package/dist/src/platforms/discovery.js +176 -76
- package/dist/src/platforms/discovery.js.map +1 -1
- package/dist/src/platforms/inspection-grok.js +121 -9
- package/dist/src/platforms/inspection-grok.js.map +1 -1
- package/dist/src/platforms/inspection-native.js +53 -97
- package/dist/src/platforms/inspection-native.js.map +1 -1
- package/dist/src/platforms/inspection-pi.d.ts +7 -1
- package/dist/src/platforms/inspection-pi.js +295 -95
- package/dist/src/platforms/inspection-pi.js.map +1 -1
- package/dist/src/platforms/inspection-query.d.ts +6 -5
- package/dist/src/platforms/inspection-query.js +30 -25
- package/dist/src/platforms/inspection-query.js.map +1 -1
- package/dist/src/platforms/inspection.d.ts +4 -1
- package/dist/src/platforms/inspection.js +38 -6
- package/dist/src/platforms/inspection.js.map +1 -1
- package/dist/src/platforms/layout.d.ts +6 -0
- package/dist/src/platforms/layout.js +45 -12
- 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.d.ts +1 -0
- package/dist/src/platforms/lifecycle-native.js +29 -89
- package/dist/src/platforms/lifecycle-native.js.map +1 -1
- package/dist/src/platforms/lifecycle.d.ts +2 -0
- package/dist/src/platforms/lifecycle.js +120 -69
- package/dist/src/platforms/lifecycle.js.map +1 -1
- package/dist/src/platforms/projection-code-extension.js +9 -4
- 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 +152 -72
- package/dist/src/platforms/projection.js.map +1 -1
- package/dist/src/platforms/supplement-layout.d.ts +5 -1
- package/dist/src/platforms/supplement-layout.js +23 -1
- package/dist/src/platforms/supplement-layout.js.map +1 -1
- package/dist/src/platforms/supplement-state.d.ts +1 -1
- package/dist/src/platforms/supplement-state.js +18 -7
- package/dist/src/platforms/supplement-state.js.map +1 -1
- package/dist/src/portable/commands.js +1 -1
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/materializer.d.ts +4 -0
- package/dist/src/portable/materializer.js +9 -2
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery.d.ts +31 -3
- package/dist/src/portable/recovery.js +261 -82
- package/dist/src/portable/recovery.js.map +1 -1
- package/dist/src/recovery/coordinator.d.ts +19 -5
- package/dist/src/recovery/coordinator.js +433 -174
- 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 +196 -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 +18 -4
- package/dist/src/recovery/joint-coordinator.js +829 -341
- package/dist/src/recovery/joint-coordinator.js.map +1 -1
- package/dist/src/recovery/joint-demand.d.ts +22 -2
- package/dist/src/recovery/joint-demand.js +104 -6
- 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 +35 -4
- package/dist/src/recovery/receipt.js +90 -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.d.ts +20 -8
- package/dist/src/recovery/status.js +405 -116
- 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 +14 -4
- package/dist/src/review/platform-profile.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +2 -0
- package/dist/src/review/skill-materialization.js +68 -50
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/review/source-binding.js +11 -5
- 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 +180 -63
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +46 -10
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +15 -5
- package/dist/src/tui/controller.js +246 -102
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/deployment-view.d.ts +6 -3
- package/dist/src/tui/deployment-view.js +43 -9
- package/dist/src/tui/deployment-view.js.map +1 -1
- package/dist/src/tui/diagnostic-projection.d.ts +11 -3
- package/dist/src/tui/diagnostic-projection.js +85 -4
- package/dist/src/tui/diagnostic-projection.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +2 -1
- package/dist/src/tui/entity-cards.js +34 -11
- package/dist/src/tui/entity-cards.js.map +1 -1
- package/dist/src/tui/glossary.js +5 -0
- package/dist/src/tui/glossary.js.map +1 -1
- package/dist/src/tui/model.js +2 -1
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +1 -1
- package/dist/src/tui/operation-diagnostic-screens.js +6 -2
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-history.d.ts +12 -3
- package/dist/src/tui/operation-history.js +34 -3
- package/dist/src/tui/operation-history.js.map +1 -1
- package/dist/src/tui/plugin-detail.d.ts +4 -1
- package/dist/src/tui/plugin-detail.js +9 -2
- package/dist/src/tui/plugin-detail.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +3 -1
- package/dist/src/tui/scoped-flow.js +117 -1
- package/dist/src/tui/scoped-flow.js.map +1 -1
- package/dist/src/tui/scoped-inventory.d.ts +6 -2
- package/dist/src/tui/scoped-inventory.js +29 -7
- package/dist/src/tui/scoped-inventory.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 +10 -2
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/artifact-plan.js +5 -1
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +1 -1
- package/dist/src/utils/artifact-renderer.js +29 -8
- package/dist/src/utils/artifact-renderer.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 +14 -17
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +6 -0
- package/dist/src/utils/codex-native-observation.js +32 -3
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/component-command-preparation.d.ts +2 -0
- package/dist/src/utils/component-command-preparation.js +23 -4
- package/dist/src/utils/component-command-preparation.js.map +1 -1
- package/dist/src/utils/component-gap.d.ts +4 -0
- package/dist/src/utils/component-gap.js +20 -0
- package/dist/src/utils/component-gap.js.map +1 -0
- package/dist/src/utils/component-resources.js +2 -4
- package/dist/src/utils/component-resources.js.map +1 -1
- package/dist/src/utils/dynamic-skill-tree.js +2 -32
- package/dist/src/utils/dynamic-skill-tree.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-interruption.d.ts +8 -0
- package/dist/src/utils/native-cli-interruption.js +65 -0
- package/dist/src/utils/native-cli-interruption.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +5 -19
- package/dist/src/utils/native-cli.js +168 -95
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +1 -0
- package/dist/src/utils/ownership.js +18 -4
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/package-content.d.ts +7 -0
- package/dist/src/utils/package-content.js +70 -0
- package/dist/src/utils/package-content.js.map +1 -0
- package/dist/src/utils/platform-empty-state.d.ts +32 -9
- package/dist/src/utils/platform-empty-state.js +135 -70
- 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 +93 -25
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-scripts.js +24 -8
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +1 -1
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/skill-invocation-warning.d.ts +20 -0
- package/dist/src/utils/skill-invocation-warning.js +68 -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
|
@@ -11,6 +11,7 @@ import type { OperationAction } from './operation-plan.js';
|
|
|
11
11
|
import type { DesiredTarget, RebuildTargetDriver, RebuildTargetIdentity } from './rebuild-operations.js';
|
|
12
12
|
import { PlatformRebuildSession } from './rebuild-platform-integration.js';
|
|
13
13
|
export declare function finalizePreparedPlatformRebuildSession(results: Map<string, PluginProcessResult>): void;
|
|
14
|
+
export declare function recordPreparedGrokProjectRetirement(results: Map<string, PluginProcessResult>, ...retirement: Parameters<PlatformRebuildSession['recordGrokProjectRetirement']>): void;
|
|
14
15
|
export declare function disposePreparedPlatformRebuildSession(results: Map<string, PluginProcessResult>): Promise<void>;
|
|
15
16
|
export interface RebuildIntegration {
|
|
16
17
|
resolvePlatformTargets(inputs: readonly Parameters<RebuildIntegration['buildTarget']>[0][]): Promise<void>;
|
|
@@ -18,6 +19,7 @@ export interface RebuildIntegration {
|
|
|
18
19
|
driver: RebuildTargetDriver;
|
|
19
20
|
setNativeMarketplaceEligibleTargets(targets: readonly DesiredTarget[]): void;
|
|
20
21
|
prepareNativeMarketplaceGroup(target: DesiredTarget): Promise<void>;
|
|
22
|
+
postcheckCodexProvider(target: DesiredTarget): Promise<void>;
|
|
21
23
|
captureCodexPostMutationSnapshots(marketplaceNames?: readonly string[]): Promise<void>;
|
|
22
24
|
buildTarget(options: {
|
|
23
25
|
sourceId?: string;
|
|
@@ -32,6 +34,8 @@ export interface RebuildIntegration {
|
|
|
32
34
|
command: 'install' | 'sync' | 'reinstall' | 'cleanup' | 'uninstall';
|
|
33
35
|
catalog: CatalogResolution;
|
|
34
36
|
readOnlyInspectionPlan?: boolean;
|
|
37
|
+
/** Fresh read window for peers undergoing the same placement check or plan verification. */
|
|
38
|
+
observationBatch?: import('../platforms/inspection-query.js').NativeObservationBatch;
|
|
35
39
|
readOnlyShallowInspectionPlan?: boolean;
|
|
36
40
|
includeNativeCleanupCandidate?: boolean;
|
|
37
41
|
codexActivationCleanup?: Array<{
|
|
@@ -50,11 +54,11 @@ export declare class CodexActivationPostcheckError extends Error {
|
|
|
50
54
|
constructor(codexPluginIds: string | readonly string[], detail: string);
|
|
51
55
|
}
|
|
52
56
|
export interface RebuildExecutionContext {
|
|
53
|
-
/** Explicit --native-consent for this request, independent of AW confirmation. */
|
|
54
|
-
nativeConsent?: boolean;
|
|
55
57
|
recoveryCandidates?: readonly import('../platforms/contracts.js').RecoveryCandidate[];
|
|
56
58
|
sharedReferenceView?: import('../utils/native-demand.js').NativeSharedReferenceView;
|
|
57
59
|
platformRebuildSession?: PlatformRebuildSession;
|
|
60
|
+
/** Concurrent native groups share a session across scopes of the same platform. */
|
|
61
|
+
batchInstallPlatform?: PlatformName;
|
|
58
62
|
packagePreparationCache?: Map<string, Promise<PreparedManagedCommandPackage>>;
|
|
59
63
|
interruption?: import('./public-interruption.js').PublicCommandInterruption;
|
|
60
64
|
/** Validated renderer process output shared only by preparations of this operation. */
|
|
@@ -32,15 +32,21 @@ const commandPackagePreparationCaches = new WeakMap();
|
|
|
32
32
|
const platformRebuildSessions = new WeakMap();
|
|
33
33
|
const commandPackageCandidates = new WeakMap();
|
|
34
34
|
export function finalizePreparedPlatformRebuildSession(results) {
|
|
35
|
-
platformRebuildSessions.get(results)?.
|
|
35
|
+
for (const session of platformRebuildSessions.get(results)?.values() ?? [])
|
|
36
|
+
session.freezeMarketplaceCandidates();
|
|
37
|
+
}
|
|
38
|
+
export function recordPreparedGrokProjectRetirement(results, ...retirement) {
|
|
39
|
+
const sessions = platformRebuildSessions.get(results);
|
|
40
|
+
sessions?.get('grok')?.recordGrokProjectRetirement(...retirement);
|
|
41
|
+
sessions?.get(undefined)?.recordGrokProjectRetirement(...retirement);
|
|
36
42
|
}
|
|
37
43
|
export async function disposePreparedPlatformRebuildSession(results) {
|
|
38
|
-
const
|
|
44
|
+
const sessions = platformRebuildSessions.get(results);
|
|
39
45
|
platformRebuildSessions.delete(results);
|
|
40
46
|
const packages = commandPackageCandidates.get(results);
|
|
41
47
|
commandPackageCandidates.delete(results);
|
|
42
48
|
try {
|
|
43
|
-
await session
|
|
49
|
+
await Promise.all([...(sessions?.values() ?? [])].map((session) => session.dispose()));
|
|
44
50
|
}
|
|
45
51
|
finally {
|
|
46
52
|
if (packages)
|
|
@@ -60,7 +66,7 @@ async function commandPackageActions(options) {
|
|
|
60
66
|
commandPackagePreparationCaches.set(options.context, cache);
|
|
61
67
|
}
|
|
62
68
|
for (const declaration of options.plugin.manifest.managedCommands?.packages ?? []) {
|
|
63
|
-
if (!declaration.platforms.includes(options.platform))
|
|
69
|
+
if (!declaration.platforms.includes(options.platform) || options.scope === 'user' && declaration.scope === 'project')
|
|
64
70
|
continue;
|
|
65
71
|
const producer = await managedCommandProducerIdentity({ ...options, scope: declaration.scope,
|
|
66
72
|
producer: { kind: 'package', packageKey: declaration.key } });
|
|
@@ -1105,6 +1111,31 @@ function createNativeDriver(options) {
|
|
|
1105
1111
|
path.normalize(path.resolve(target.identity.marketplaceRoot ?? resolveAwHome(options.context.env))),
|
|
1106
1112
|
].join('\0');
|
|
1107
1113
|
const observationScopeFor = (target) => codexObservationScope(options.context, target.identity.marketplaceName ?? MARKETPLACE_NAME, target.identity.scope);
|
|
1114
|
+
const checkCodexInstalledVersion = async (target, pluginId, marketplaceName) => {
|
|
1115
|
+
const scope = codexObservationScope(options.context, marketplaceName, target.identity.scope);
|
|
1116
|
+
const registration = await inspectCodexPluginRegistrationLive({
|
|
1117
|
+
pluginId,
|
|
1118
|
+
cwd: target.identity.cwd,
|
|
1119
|
+
env: options.context.env,
|
|
1120
|
+
nativeCliRunner: runner,
|
|
1121
|
+
manager: currentCodexManager(),
|
|
1122
|
+
scope,
|
|
1123
|
+
observationSession: options.context.codexObservationSession,
|
|
1124
|
+
});
|
|
1125
|
+
const state = requireObservedCodexNativeState(registration.observation, 'native install postcheck');
|
|
1126
|
+
requireCodexObservationCoverage(registration, scope, 'native install postcheck');
|
|
1127
|
+
if (state !== 'installed') {
|
|
1128
|
+
throw new Error(`codexNativeInstallIncomplete: ${pluginId} is absent from Codex plugin list.`);
|
|
1129
|
+
}
|
|
1130
|
+
const installedEntry = registration.observation.state === 'observed'
|
|
1131
|
+
&& registration.observation.value === 'installed'
|
|
1132
|
+
? registration.observation.entry
|
|
1133
|
+
: undefined;
|
|
1134
|
+
if (installedEntry?.version !== undefined
|
|
1135
|
+
&& installedEntry.version !== target.identity.pluginVersion) {
|
|
1136
|
+
throw new Error(`codexNativeInstallIncomplete: ${pluginId} version is ${installedEntry.version}; expected ${target.identity.pluginVersion}.`);
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1108
1139
|
const groupTargets = (target) => {
|
|
1109
1140
|
if (!options.operationScopedNativePhases)
|
|
1110
1141
|
return [target];
|
|
@@ -1416,6 +1447,25 @@ function createNativeDriver(options) {
|
|
|
1416
1447
|
nativeMarketplaceEligibleTargets = new Set(eligibleTargets);
|
|
1417
1448
|
},
|
|
1418
1449
|
prepareNativeMarketplaceGroup: prepareNativeGroup,
|
|
1450
|
+
postcheckCodexProvider: async (target) => {
|
|
1451
|
+
const pending = deferredPostchecks.filter((entry) => entry.target === target);
|
|
1452
|
+
deferredPostchecks = deferredPostchecks.filter((entry) => entry.target !== target);
|
|
1453
|
+
// A dependent can write as soon as this returns. Read a new Codex list
|
|
1454
|
+
// after the provider's writes, even when its install receipt was healthy.
|
|
1455
|
+
const marketplaces = new Set((target.platformDeployment?.plans ?? []).flatMap((plan) => plan.evidence.layout.marketplaceName && plan.projections.some((projection) => projection.bundle)
|
|
1456
|
+
? [plan.evidence.layout.marketplaceName] : []));
|
|
1457
|
+
if (target.requiresNative)
|
|
1458
|
+
marketplaces.add(target.identity.marketplaceName ?? MARKETPLACE_NAME);
|
|
1459
|
+
for (const name of marketplaces)
|
|
1460
|
+
options.context.codexObservationSession?.invalidate(name);
|
|
1461
|
+
if (!pending.length)
|
|
1462
|
+
await target.platformDeployment?.verify();
|
|
1463
|
+
for (const entry of pending)
|
|
1464
|
+
await entry.postcheck();
|
|
1465
|
+
for (const name of marketplaces) {
|
|
1466
|
+
await checkCodexInstalledVersion(target, `${target.identity.pluginName}@${name}`, name);
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1419
1469
|
...(options.operationScopedNativePhases ? {
|
|
1420
1470
|
deferPostcheck: (target, postcheck) => {
|
|
1421
1471
|
if (target.identity.platform !== 'codex')
|
|
@@ -1425,29 +1475,7 @@ function createNativeDriver(options) {
|
|
|
1425
1475
|
postcheck: async () => {
|
|
1426
1476
|
if (target.requiresNative) {
|
|
1427
1477
|
const marketplaceName = target.identity.marketplaceName ?? MARKETPLACE_NAME;
|
|
1428
|
-
|
|
1429
|
-
const registration = await inspectCodexPluginRegistrationLive({
|
|
1430
|
-
pluginId,
|
|
1431
|
-
cwd: target.identity.cwd,
|
|
1432
|
-
env: options.context.env,
|
|
1433
|
-
nativeCliRunner: runner,
|
|
1434
|
-
manager: currentCodexManager(),
|
|
1435
|
-
scope: observationScopeFor(target),
|
|
1436
|
-
observationSession: options.context.codexObservationSession,
|
|
1437
|
-
});
|
|
1438
|
-
const state = requireObservedCodexNativeState(registration.observation, 'native install postcheck');
|
|
1439
|
-
requireCodexObservationCoverage(registration, observationScopeFor(target), 'native install postcheck');
|
|
1440
|
-
if (state !== 'installed') {
|
|
1441
|
-
throw new Error(`codexNativeInstallIncomplete: ${pluginId} is absent from Codex plugin list.`);
|
|
1442
|
-
}
|
|
1443
|
-
const installedEntry = registration.observation.state === 'observed'
|
|
1444
|
-
&& registration.observation.value === 'installed'
|
|
1445
|
-
? registration.observation.entry
|
|
1446
|
-
: undefined;
|
|
1447
|
-
if (installedEntry?.version !== undefined
|
|
1448
|
-
&& installedEntry.version !== target.identity.pluginVersion) {
|
|
1449
|
-
throw new Error(`codexNativeInstallIncomplete: ${pluginId} version is ${installedEntry.version}; expected ${target.identity.pluginVersion}.`);
|
|
1450
|
-
}
|
|
1478
|
+
await checkCodexInstalledVersion(target, `${target.identity.pluginName}@${marketplaceName}`, marketplaceName);
|
|
1451
1479
|
}
|
|
1452
1480
|
await postcheck();
|
|
1453
1481
|
},
|
|
@@ -1753,10 +1781,12 @@ export function createRebuildIntegration(options) {
|
|
|
1753
1781
|
?? commandPackageCandidates.get(renderResults) ?? new Map();
|
|
1754
1782
|
commandPackageCandidates.set(renderResults, packageCache);
|
|
1755
1783
|
options.context.packagePreparationCache = packageCache;
|
|
1784
|
+
const sessions = platformRebuildSessions.get(renderResults) ?? new Map();
|
|
1785
|
+
platformRebuildSessions.set(renderResults, sessions);
|
|
1756
1786
|
const platformSession = options.context.platformRebuildSession
|
|
1757
|
-
??
|
|
1787
|
+
?? sessions.get(options.context.batchInstallPlatform)
|
|
1758
1788
|
?? new PlatformRebuildSession(options.context);
|
|
1759
|
-
|
|
1789
|
+
sessions.set(options.context.batchInstallPlatform, platformSession);
|
|
1760
1790
|
options.context.platformRebuildSession = platformSession;
|
|
1761
1791
|
platformSession.updateContext(options.context);
|
|
1762
1792
|
platformSession.setOwnershipExecutor(driver.ownership);
|
|
@@ -1766,6 +1796,7 @@ export function createRebuildIntegration(options) {
|
|
|
1766
1796
|
driver,
|
|
1767
1797
|
setNativeMarketplaceEligibleTargets: driver.setNativeMarketplaceEligibleTargets,
|
|
1768
1798
|
prepareNativeMarketplaceGroup: driver.prepareNativeMarketplaceGroup,
|
|
1799
|
+
postcheckCodexProvider: driver.postcheckCodexProvider,
|
|
1769
1800
|
captureCodexPostMutationSnapshots: driver.captureCodexPostMutationSnapshots,
|
|
1770
1801
|
buildTarget: async (input) => {
|
|
1771
1802
|
const target = await platformSession.buildTarget(input);
|