agentwheel 0.19.6 → 0.19.7
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/index.js +13 -5
- package/openpack.json +1 -1
- package/package.json +1 -1
- package/skills/agentwheel/SKILL.md +1 -1
- package/skills/agentwheel-discovery/SKILL.md +1 -1
package/dist/index.js
CHANGED
|
@@ -4132,7 +4132,8 @@ async function createPlanFromOperations(desiredOps, adapter, targetRoot, manifes
|
|
|
4132
4132
|
const semanticPlugin = entry.semanticPlugin;
|
|
4133
4133
|
const destPath = semanticPlugin ? targetRoot : join17(targetRoot, entry.path);
|
|
4134
4134
|
if (!semanticPlugin && !await transport.pathExists(destPath)) continue;
|
|
4135
|
-
const
|
|
4135
|
+
const inferredMode = semanticPlugin ? void 0 : await inferExactLegacyManagedInstructionMode(entry, destPath, transport);
|
|
4136
|
+
const currentHash = semanticPlugin ? entry.hash : await currentEntryHash(entry, destPath, transport, inferredMode);
|
|
4136
4137
|
if (workspaceOwner && !entryOwnedByWorkspace(entry, workspaceOwner)) {
|
|
4137
4138
|
operations.push(keepForeignManifestEntryOperation(entry, targetRoot, workspaceOwner, void 0, currentHash));
|
|
4138
4139
|
continue;
|
|
@@ -4154,7 +4155,7 @@ async function createPlanFromOperations(desiredOps, adapter, targetRoot, manifes
|
|
|
4154
4155
|
semanticPlugin,
|
|
4155
4156
|
execute: entry.executed,
|
|
4156
4157
|
mergeStrategy: entry.mergeStrategy,
|
|
4157
|
-
mode: entry.mode,
|
|
4158
|
+
mode: entry.mode ?? inferredMode,
|
|
4158
4159
|
composedFrom: entry.composedFrom,
|
|
4159
4160
|
...operationMetadataFromEntry(entry),
|
|
4160
4161
|
...options.forceDrift ? { action: "remove", reason: "force removing drifted stale managed destination", overrideDrift: true } : {}
|
|
@@ -4176,7 +4177,7 @@ async function createPlanFromOperations(desiredOps, adapter, targetRoot, manifes
|
|
|
4176
4177
|
semanticPlugin,
|
|
4177
4178
|
execute: entry.executed,
|
|
4178
4179
|
mergeStrategy: entry.mergeStrategy,
|
|
4179
|
-
mode: entry.mode,
|
|
4180
|
+
mode: entry.mode ?? inferredMode,
|
|
4180
4181
|
composedFrom: entry.composedFrom,
|
|
4181
4182
|
...operationMetadataFromEntry(entry)
|
|
4182
4183
|
});
|
|
@@ -4361,12 +4362,19 @@ async function planManagedBlockOperation(op, manifestByPath, transport, options,
|
|
|
4361
4362
|
reason: reasonWithComposedDiff("managed instruction source changed", op.composedFrom, existing.composedFrom)
|
|
4362
4363
|
}];
|
|
4363
4364
|
}
|
|
4364
|
-
async function currentEntryHash(entry, destPath, transport) {
|
|
4365
|
-
if (
|
|
4365
|
+
async function currentEntryHash(entry, destPath, transport, mode = entry.mode) {
|
|
4366
|
+
if (mode !== managedInstructionBlockMode) return transport.hashPath(destPath);
|
|
4366
4367
|
const selector = managedInstructionSelector("logicalSelector" in entry ? entry.logicalSelector : void 0, entry.artifactType, entry.artifactName);
|
|
4367
4368
|
const state = await readManagedInstructionBlockState(destPath, selector, transport);
|
|
4368
4369
|
return state.hash;
|
|
4369
4370
|
}
|
|
4371
|
+
async function inferExactLegacyManagedInstructionMode(entry, destPath, transport) {
|
|
4372
|
+
if (entry.mode || entry.artifactType !== "instructions") return void 0;
|
|
4373
|
+
const selector = managedInstructionSelector("logicalSelector" in entry ? entry.logicalSelector : void 0, entry.artifactType, entry.artifactName);
|
|
4374
|
+
const state = await readManagedInstructionBlockState(destPath, selector, transport);
|
|
4375
|
+
if (!state.hasBlock || state.drifted || state.hash !== entry.hash) return void 0;
|
|
4376
|
+
return managedInstructionBlockMode;
|
|
4377
|
+
}
|
|
4370
4378
|
async function canStrictlyAdoptLegacyEntry(entry, op, targetRoot, transport) {
|
|
4371
4379
|
if (entry.artifactType !== op.artifactType || entry.artifactName !== op.artifactName) return false;
|
|
4372
4380
|
if (!op.desiredHash || entry.sourceHash !== op.desiredHash) return false;
|
package/openpack.json
CHANGED
package/package.json
CHANGED