agentwheel 0.18.0 → 0.18.1

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
@@ -15955,7 +15955,11 @@ function mergeFocusedArtifactGraphLock(current, previous, rootId, focused) {
15955
15955
  const roots = previous.canonical.roots.map((root) => root.rootId === rootId ? currentRoot : root);
15956
15956
  if (!roots.some((root) => root.rootId === rootId)) roots.push(currentRoot);
15957
15957
  const currentIncludes = usedIncludeEdges(current, currentFocused);
15958
- const previousIncludes = usedIncludeEdges(previous, previousPreserved);
15958
+ const previousFocusedIncludes = new Set(usedIncludeEdges(previous, previousFocused).map(graphIncludeEdgeIdentity));
15959
+ const previousPreservedIncludes = new Set(usedIncludeEdges(previous, previousPreserved).map(graphIncludeEdgeIdentity));
15960
+ const previousIncludes = previous.canonical.includeEdges.filter(
15961
+ (edge) => previousNodeIds.has(edge.fromNodeId) && previousNodeIds.has(edge.toNodeId) && (!previousFocusedIncludes.has(graphIncludeEdgeIdentity(edge)) || previousPreservedIncludes.has(graphIncludeEdgeIdentity(edge)))
15962
+ );
15959
15963
  return canonicalizeGraphLock({
15960
15964
  ...current,
15961
15965
  canonical: {
@@ -15977,7 +15981,7 @@ function mergeFocusedArtifactGraphLock(current, previous, rootId, focused) {
15977
15981
  ),
15978
15982
  includeEdges: uniqueBy(
15979
15983
  [...currentIncludes, ...previousIncludes],
15980
- (edge) => `${edge.fromNodeId}\0${edge.alias}\0${edge.toNodeId}\0${edge.selector}\0${edge.sourceHash}`
15984
+ graphIncludeEdgeIdentity
15981
15985
  ),
15982
15986
  artifacts: [...currentFocused, ...previousPreserved],
15983
15987
  namespacing: [
@@ -16007,6 +16011,16 @@ function preservedGraphNodeIds(lock, replacedRootId, artifacts) {
16007
16011
  const replacedRoot = lock.canonical.roots.find((root) => root.rootId === replacedRootId);
16008
16012
  if (replacedRoot) {
16009
16013
  const replacedRootClosure = graphRootClosure(lock, replacedRootId);
16014
+ const dependencyQueue = artifacts.map((artifact) => artifact.graphNodeId).filter((nodeId) => nodeId !== replacedRoot.graphNodeId);
16015
+ while (dependencyQueue.length > 0) {
16016
+ const nodeId = dependencyQueue.shift();
16017
+ if (!selected.has(nodeId)) selected.add(nodeId);
16018
+ for (const edge of lock.canonical.edges) {
16019
+ if (edge.from !== nodeId || selected.has(edge.to)) continue;
16020
+ selected.add(edge.to);
16021
+ dependencyQueue.push(edge.to);
16022
+ }
16023
+ }
16010
16024
  for (const artifact of artifacts) {
16011
16025
  if (!replacedRootClosure.has(artifact.graphNodeId)) continue;
16012
16026
  for (const nodeId of graphAncestorPaths(lock, replacedRoot.graphNodeId, /* @__PURE__ */ new Set([artifact.graphNodeId]))) {
@@ -16033,6 +16047,9 @@ function usedIncludeEdges(lock, artifacts) {
16033
16047
  const selectors = new Set(artifacts.flatMap((artifact) => artifact.composedFrom?.map((entry) => entry.selector) ?? []));
16034
16048
  return lock.canonical.includeEdges.filter((edge) => selectors.has(`${edge.toNodeId}:${edge.selector}`));
16035
16049
  }
16050
+ function graphIncludeEdgeIdentity(edge) {
16051
+ return `${edge.fromNodeId}\0${edge.alias}\0${edge.toNodeId}\0${edge.selector}\0${edge.sourceHash}`;
16052
+ }
16036
16053
  function graphAncestorPaths(lock, rootNodeId, targets) {
16037
16054
  const selected = new Set(targets);
16038
16055
  selected.add(rootNodeId);
package/openpack.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "name": "NestDevLab/agentwheel",
4
- "version": "0.18.0",
4
+ "version": "0.18.1",
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.18.0",
3
+ "version": "0.18.1",
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.18.0"
8
+ version: "0.18.1"
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.18.0"
8
+ version: "0.18.1"
9
9
  ---
10
10
 
11
11
  # Agentwheel Discovery