@inf-monkeys-tech/monkeys 1.1.3 → 1.1.4

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.
@@ -18648,6 +18648,12 @@ var resolvePage = (input) => {
18648
18648
  const queryBindings = [];
18649
18649
  const actionBindings = [];
18650
18650
  const interactionBindings = [];
18651
+ const nodesById = /* @__PURE__ */ new Map();
18652
+ const indexNode = (node) => {
18653
+ nodesById.set(node.id, node);
18654
+ node.children?.forEach(indexNode);
18655
+ };
18656
+ indexNode(page.body);
18651
18657
  const visitNode = (node, parentNodeId) => {
18652
18658
  const registration = singleByStableIdentity(
18653
18659
  capabilityRegistrations,
@@ -18768,15 +18774,13 @@ var resolvePage = (input) => {
18768
18774
  ...cursorWindow,
18769
18775
  pageChangeIntentSchemaRevisionRef: (() => {
18770
18776
  const sourceInstanceId = cursorWindow.sourceCapabilityInstanceId ?? node.id;
18771
- const sourceRegistration = capabilityInstances.find(
18772
- (instance) => instance.instanceId === sourceInstanceId
18773
- );
18774
- const sourceCapability = sourceRegistration && capabilityRegistrations.find(
18775
- (candidate) => sameRevisionRef(
18776
- candidate.revisionRef,
18777
- sourceRegistration.capabilityRevisionRef
18778
- )
18779
- );
18777
+ const sourceNode = nodesById.get(sourceInstanceId);
18778
+ const sourceCapability = sourceNode ? singleByStableIdentity(
18779
+ capabilityRegistrations,
18780
+ "capability",
18781
+ sourceNode.component,
18782
+ `page.body.${sourceNode.id}.component`
18783
+ ) : void 0;
18780
18784
  const sourcePort = sourceCapability?.outputPorts.find(
18781
18785
  (candidate) => candidate.name === cursorWindow.pageChangePort
18782
18786
  );