@lesliechan721/aw 0.1.0-beta.86 → 0.1.0-beta.87
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/src/commands/rebuild-command.js +29 -56
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +6 -3
- package/dist/src/commands/rebuild-integration.js +29 -19
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/platforms/layout.d.ts +1 -0
- package/dist/src/platforms/layout.js +7 -3
- package/dist/src/platforms/layout.js.map +1 -1
- package/package.json +3 -3
|
@@ -46,7 +46,7 @@ import { createDependencyPlacementPlan, } from './dependency-operation-plan.js';
|
|
|
46
46
|
import { forceOfflineCleanupEvidence, intentOnlyOfflineCleanupEvidence, offlineCleanupEvidenceFromInventory, offlineCleanupEvidenceMatches, } from './offline-cleanup-evidence.js';
|
|
47
47
|
import { assertOperationPlanFingerprint, createOperationPlan, createOperationPlanConfigDigest, operationPlanNativeToolChanges, } from './operation-plan.js';
|
|
48
48
|
import { deploymentConfirmationEffects } from './deployment-confirmation.js';
|
|
49
|
-
import { assertNoClaudeUnboundNativeNameCollision, CodexActivationPostcheckError, createRebuildIntegration, disposePreparedPlatformRebuildSession, executeCodexReconcileActivations,
|
|
49
|
+
import { assertNoClaudeUnboundNativeNameCollision, CodexActivationPostcheckError, createRebuildIntegration, disposePreparedPlatformRebuildSession, executeCodexReconcileActivations, inspectNativeMarketplaceRegistration, isNativeActivationOnlyTarget, postcheckCodexReconcileActivations, removeForceCleanupCodexRoleRegistration } from './rebuild-integration.js';
|
|
50
50
|
import { executeRebuildOperation, hasPlannedPreApply, prepareRebuildOperation } from './rebuild-operations.js';
|
|
51
51
|
import { createReconcileOperationPlan, } from './reconcile-operation-plan.js';
|
|
52
52
|
// A read scope belongs to one Review or its independent locked recheck.
|
|
@@ -2742,61 +2742,34 @@ async function runRebuildCommandInSession(options) {
|
|
|
2742
2742
|
: preflightTargets.filter((target) => target.pluginId === entry.pluginId));
|
|
2743
2743
|
}
|
|
2744
2744
|
}
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
let marketplaceName = persistedName
|
|
2763
|
-
?? (entry.source.sourceId === catalog.primarySourceId
|
|
2764
|
-
? 'aw'
|
|
2765
|
-
: getNamespacedMarketplaceName(entry.source.sourceId));
|
|
2766
|
-
if (options.command === 'cleanup' || options.command === 'uninstall') {
|
|
2767
|
-
marketplaceNamesBySource.set(entry.source.sourceId, marketplaceName);
|
|
2768
|
-
continue;
|
|
2769
|
-
}
|
|
2770
|
-
let registrations = await inspectNativeMarketplaceRegistrations({
|
|
2771
|
-
marketplaceName,
|
|
2772
|
-
marketplaceRoot,
|
|
2773
|
-
cwd: options.commandOptions.cwd,
|
|
2774
|
-
env: runtimeEnv,
|
|
2775
|
-
});
|
|
2776
|
-
if (!persistedName
|
|
2777
|
-
&& marketplaceName === 'aw'
|
|
2778
|
-
&& Object.values(registrations).includes('foreign')) {
|
|
2779
|
-
marketplaceName = getNamespacedMarketplaceName(entry.source.sourceId);
|
|
2780
|
-
registrations = await inspectNativeMarketplaceRegistrations({
|
|
2745
|
+
if (options.command !== 'cleanup' && options.command !== 'uninstall') {
|
|
2746
|
+
const marketplaceSelections = new Map(executionSelections.map(({ entry, platform }) => [
|
|
2747
|
+
`${entry.source.sourceId}\0${platform}`, { source: entry.source, platform },
|
|
2748
|
+
]));
|
|
2749
|
+
for (const { source, platform } of marketplaceSelections.values()) {
|
|
2750
|
+
if (platform !== 'codex' && platform !== 'claude')
|
|
2751
|
+
continue;
|
|
2752
|
+
const marketplaceName = getNamespacedMarketplaceName(source.sourceId);
|
|
2753
|
+
const codexPackages = platform === 'codex' ? stateInventory.references.flatMap((reference) => {
|
|
2754
|
+
const candidate = reference.recoveryCandidate;
|
|
2755
|
+
return reference.kind === 'namespacedOwner' && reference.scope === 'user'
|
|
2756
|
+
&& reference.sourceId === source.sourceId && reference.sourceIdentity === source.sourceIdentity
|
|
2757
|
+
&& candidate?.evidence === 'verified' && candidate.binding.route === 'codex-marketplace' && candidate.nativeIdentity
|
|
2758
|
+
? [candidate.nativeIdentity] : [];
|
|
2759
|
+
}) : [];
|
|
2760
|
+
const registration = await inspectNativeMarketplaceRegistration({
|
|
2761
|
+
platform,
|
|
2781
2762
|
marketplaceName,
|
|
2782
|
-
|
|
2763
|
+
sourceId: source.sourceId,
|
|
2783
2764
|
cwd: options.commandOptions.cwd,
|
|
2784
2765
|
env: runtimeEnv,
|
|
2766
|
+
codexPackages,
|
|
2785
2767
|
});
|
|
2768
|
+
if (registration === 'foreign') {
|
|
2769
|
+
throw new Error(`externalOwnershipPresent: Marketplace ${marketplaceName} is foreign on ${platform}.`);
|
|
2770
|
+
}
|
|
2786
2771
|
}
|
|
2787
|
-
const foreignPlatforms = Object.entries(registrations).flatMap(([platform, state]) => state === 'foreign' ? [platform] : []);
|
|
2788
|
-
if (foreignPlatforms.length > 0) {
|
|
2789
|
-
throw new Error(`externalOwnershipPresent: Marketplace ${marketplaceName} is foreign on ${foreignPlatforms.join(', ')}.`);
|
|
2790
|
-
}
|
|
2791
|
-
marketplaceNamesBySource.set(entry.source.sourceId, marketplaceName);
|
|
2792
2772
|
}
|
|
2793
|
-
const marketplaceNameFor = (entry, ..._placement) => {
|
|
2794
|
-
const marketplaceName = marketplaceNamesBySource.get(entry.source.sourceId);
|
|
2795
|
-
if (!marketplaceName) {
|
|
2796
|
-
throw new Error('marketplaceIdentityUnavailable: No marketplace name was selected for the source.');
|
|
2797
|
-
}
|
|
2798
|
-
return marketplaceName;
|
|
2799
|
-
};
|
|
2800
2773
|
const codexObservationScopeByMarketplace = new Map();
|
|
2801
2774
|
const projectCodexConfig = options.commandOptions.scope === 'project'
|
|
2802
2775
|
? await readCodexConfigFile(resolveCodexPaths(options.commandOptions.cwd, 'project', runtimeEnv).configTomlPath)
|
|
@@ -2804,7 +2777,7 @@ async function runRebuildCommandInSession(options) {
|
|
|
2804
2777
|
for (const { entry, platform } of executionSelections) {
|
|
2805
2778
|
if (platform !== 'codex')
|
|
2806
2779
|
continue;
|
|
2807
|
-
const marketplaceName =
|
|
2780
|
+
const marketplaceName = getNamespacedMarketplaceName(entry.source.sourceId);
|
|
2808
2781
|
const codexPluginId = `${entry.plugin.manifest.name}@${marketplaceName}`;
|
|
2809
2782
|
const requiredScope = options.commandOptions.scope === 'project'
|
|
2810
2783
|
|| (projectCodexConfig !== undefined
|
|
@@ -2902,7 +2875,7 @@ async function runRebuildCommandInSession(options) {
|
|
|
2902
2875
|
const requestedScope = selection.requestedScope ?? options.commandOptions.scope;
|
|
2903
2876
|
const requestedMethod = selection.requestedMethod ?? options.command;
|
|
2904
2877
|
const inspectScope = async (scope) => {
|
|
2905
|
-
const marketplaceName =
|
|
2878
|
+
const marketplaceName = getNamespacedMarketplaceName(entry.source.sourceId);
|
|
2906
2879
|
entry.plugin.marketplaceName = marketplaceName;
|
|
2907
2880
|
const desired = await inspection.buildTarget({
|
|
2908
2881
|
sourceId: entry.source.sourceId,
|
|
@@ -3362,7 +3335,7 @@ async function runRebuildCommandInSession(options) {
|
|
|
3362
3335
|
|| planned.action === 'block'))
|
|
3363
3336
|
continue;
|
|
3364
3337
|
const scope = planned?.resolvedScope ?? options.commandOptions.scope;
|
|
3365
|
-
const marketplaceName =
|
|
3338
|
+
const marketplaceName = getNamespacedMarketplaceName(entry.source.sourceId);
|
|
3366
3339
|
entry.plugin.marketplaceName = marketplaceName;
|
|
3367
3340
|
const marketplaceRoot = path.join(resolveAwHome(runtimeEnv), 'marketplaces', entry.source.sourceId);
|
|
3368
3341
|
if (!dependencyEnabled && selectedPlatform === 'codex') {
|
|
@@ -3446,7 +3419,7 @@ async function runRebuildCommandInSession(options) {
|
|
|
3446
3419
|
|| (plannedNative?.action === 'none' && codexNativeStillDesired)
|
|
3447
3420
|
|| options.command === 'cleanup'
|
|
3448
3421
|
|| options.command === 'uninstall';
|
|
3449
|
-
const marketplaceName =
|
|
3422
|
+
const marketplaceName = getNamespacedMarketplaceName(entry.source.sourceId);
|
|
3450
3423
|
try {
|
|
3451
3424
|
const target = await measureCommandPerformanceStage(options.runtime, 'target.build', () => integration.buildTarget({
|
|
3452
3425
|
sourceId: entry.source.sourceId,
|
|
@@ -4192,7 +4165,7 @@ async function runRebuildCommandInSession(options) {
|
|
|
4192
4165
|
assertRebuildCatalogSourceInventoryComplete(checked.inventory, options.commandOptions.scope);
|
|
4193
4166
|
}
|
|
4194
4167
|
const inspectConsumer = async (options_) => {
|
|
4195
|
-
const marketplaceName =
|
|
4168
|
+
const marketplaceName = getNamespacedMarketplaceName(options_.entry.source.sourceId);
|
|
4196
4169
|
options_.entry.plugin.marketplaceName = marketplaceName;
|
|
4197
4170
|
const consumerTarget = await inspection.buildTarget({
|
|
4198
4171
|
sourceId: options_.entry.source.sourceId,
|
|
@@ -4663,7 +4636,7 @@ async function runRebuildCommandInSession(options) {
|
|
|
4663
4636
|
dependencyStates.set(key, 'kept');
|
|
4664
4637
|
return;
|
|
4665
4638
|
}
|
|
4666
|
-
const marketplaceName =
|
|
4639
|
+
const marketplaceName = getNamespacedMarketplaceName(entry.source.sourceId);
|
|
4667
4640
|
const namespacedSource = {
|
|
4668
4641
|
sourceId: entry.source.sourceId,
|
|
4669
4642
|
sourceIdentity: entry.source.sourceIdentity,
|