@lesliechan721/aw 0.1.0-beta.55 → 0.1.0-beta.56
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/scripts/validate-plugin.mjs +1 -1
- package/dist/src/commands/rebuild-integration.js +20 -1
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/utils/managed-command-store.d.ts +4 -0
- package/dist/src/utils/managed-command-store.js +34 -21
- package/dist/src/utils/managed-command-store.js.map +1 -1
- package/package.json +3 -3
|
@@ -2390,7 +2390,7 @@ function validateRenderedSkillTree(options) {
|
|
|
2390
2390
|
error(`${fieldName} managedCommandPortableUnsupported: Portable Skills cannot contain managed command references`);
|
|
2391
2391
|
}
|
|
2392
2392
|
else if (options.managedTrees) {
|
|
2393
|
-
remaining = replaceManagedCommandPlaceholders(text, () => `cmdp_${'0'.repeat(
|
|
2393
|
+
remaining = replaceManagedCommandPlaceholders(text, () => `cmdp_${'0'.repeat(16)}`);
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
2396
|
catch (cause) {
|
|
@@ -5,7 +5,7 @@ import { catalogFileMode } from '@lesliechan721/aw-plugin-core';
|
|
|
5
5
|
import { COMMAND_PRODUCER_RECORD_FILE, getManagedCommandArtifactTargets, getCommandPackageId } from '@lesliechan721/aw-plugin-core/manifest';
|
|
6
6
|
import os from 'node:os';
|
|
7
7
|
import { commandSetsForProducer, createManagedCommandReferenceResolver, discoverRetainedManagedCommandPackages, retainedManagedCommandPackageResult, managedCommandProducerIdentity, prepareManagedCommandPackage, resolveSkillManagedCommandReferences, } from '../utils/managed-command-materialization.js';
|
|
8
|
-
import { managedCommandDiagnostic, ManagedCommandError, publishManagedCommandBindings, revokeManagedCommandBindings, syncManagedCommandPackage, readInstalledCommandProducer, listManagedCommands } from '../utils/managed-command-store.js';
|
|
8
|
+
import { assertManagedCommandBindingIdentities, normalizeInstalledCommandProducer, managedCommandDiagnostic, ManagedCommandError, publishManagedCommandBindings, revokeManagedCommandBindings, syncManagedCommandPackage, readInstalledCommandProducer, listManagedCommands } from '../utils/managed-command-store.js';
|
|
9
9
|
import { injectInstalledRuntimeConfig, carryRuntimeConfigNativeReceipt } from '../utils/runtime-config.js';
|
|
10
10
|
import { resolveCodexSkillsRelativeRoot } from '../utils/codex-skills-root.js';
|
|
11
11
|
import { resolveClaudeSkillsRelativeRoot } from '../utils/claude-skills-root.js';
|
|
@@ -3536,6 +3536,22 @@ async function applyPlannedOperationAction(action) {
|
|
|
3536
3536
|
}
|
|
3537
3537
|
function createNativeDriver(options) {
|
|
3538
3538
|
const runner = options.context.nativeCliRunner;
|
|
3539
|
+
const preflightCommandBindings = async (targets) => {
|
|
3540
|
+
const producers = [];
|
|
3541
|
+
for (const target of targets)
|
|
3542
|
+
for (const action of target.operationActions ?? []) {
|
|
3543
|
+
if (action.kind === 'syncManagedCommandPackage') {
|
|
3544
|
+
producers.push({ producer: action.producer, sets: action.sets });
|
|
3545
|
+
}
|
|
3546
|
+
else if (action.kind === 'materializeNativeSkill'
|
|
3547
|
+
|| (action.kind === 'writeOwnedArtifact' && action.artifactKind === 'skill-directory')) {
|
|
3548
|
+
const file = action.files?.find((entry) => entry.relativePath === COMMAND_PRODUCER_RECORD_FILE);
|
|
3549
|
+
if (file)
|
|
3550
|
+
producers.push(normalizeInstalledCommandProducer(JSON.parse(Buffer.from(file.contentBase64, 'base64').toString('utf8'))));
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3553
|
+
await assertManagedCommandBindingIdentities({ producers, env: options.context.env });
|
|
3554
|
+
};
|
|
3539
3555
|
const revokeAtRoot = async (root, recursive = false, platform) => {
|
|
3540
3556
|
const listed = await listManagedCommands(options.context.env);
|
|
3541
3557
|
const producers = new Map();
|
|
@@ -3674,6 +3690,7 @@ function createNativeDriver(options) {
|
|
|
3674
3690
|
}
|
|
3675
3691
|
if (materializing.length === 0)
|
|
3676
3692
|
return;
|
|
3693
|
+
await preflightCommandBindings(materializing);
|
|
3677
3694
|
const first = materializing[0];
|
|
3678
3695
|
if (!first.catalog)
|
|
3679
3696
|
throw new Error('Missing rebuild target catalog data.');
|
|
@@ -4138,6 +4155,7 @@ function createNativeDriver(options) {
|
|
|
4138
4155
|
: 'user'))));
|
|
4139
4156
|
},
|
|
4140
4157
|
preflightMutation: async (target) => {
|
|
4158
|
+
await preflightCommandBindings([target]);
|
|
4141
4159
|
if (!target.codexNativeObservationExpectation
|
|
4142
4160
|
&& !target.codexNativeSensitivePreflightRequired)
|
|
4143
4161
|
return;
|
|
@@ -4493,6 +4511,7 @@ function createNativeDriver(options) {
|
|
|
4493
4511
|
}
|
|
4494
4512
|
},
|
|
4495
4513
|
writeArtifacts: async (target) => {
|
|
4514
|
+
await preflightCommandBindings([target]);
|
|
4496
4515
|
await publishPackages(target);
|
|
4497
4516
|
for (const operationAction of target.operationActions ?? []) {
|
|
4498
4517
|
if (operationAction.kind === 'writeOwnedArtifact'
|