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 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 currentHash = semanticPlugin ? entry.hash : await currentEntryHash(entry, destPath, transport);
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 (entry.mode !== managedInstructionBlockMode) return transport.hashPath(destPath);
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "name": "NestDevLab/agentwheel",
4
- "version": "0.19.6",
4
+ "version": "0.19.7",
5
5
  "provides": [
6
6
  { "type": "skills", "path": "skills" }
7
7
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentwheel",
3
- "version": "0.19.6",
3
+ "version": "0.19.7",
4
4
  "description": "Weave skills, rules, and instructions across every AI agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -5,7 +5,7 @@ allowed-tools: [Bash]
5
5
  license: MIT
6
6
  metadata:
7
7
  author: NestDevLab
8
- version: "0.19.6"
8
+ version: "0.19.7"
9
9
  ---
10
10
 
11
11
  # agentwheel
@@ -5,7 +5,7 @@ allowed-tools: [Bash]
5
5
  license: MIT
6
6
  metadata:
7
7
  author: NestDevLab
8
- version: "0.19.6"
8
+ version: "0.19.7"
9
9
  ---
10
10
 
11
11
  # Agentwheel Discovery