@wairon/cli 5.1.1-dev.30 → 5.1.1-dev.32

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
@@ -1113,7 +1113,7 @@ var init_defaults = __esm({
1113
1113
  copilot: ".github/prompts",
1114
1114
  codex: ".codex/agents"
1115
1115
  };
1116
- WAIRON_VERSION = "5.1.1-dev.30";
1116
+ WAIRON_VERSION = "5.1.1-dev.32";
1117
1117
  GITHUB_REPO = "SYW-Apps/Waffle-AIron";
1118
1118
  ARCHITECT_AGENT_ID = "agent-architect";
1119
1119
  ARCHITECT_TEMPLATE_ID = "architect";
@@ -12114,6 +12114,24 @@ var init_lifecycle_entrypoints = __esm({
12114
12114
  });
12115
12115
 
12116
12116
  // src/core/rules/narrative-graph-projector.ts
12117
+ function stepEdges(step, ctx, followRegisterEdges) {
12118
+ if (step.type === "call" && step.targetComponent && step.targetMethod) {
12119
+ return [{ compId: step.targetComponent, methodName: step.targetMethod }];
12120
+ }
12121
+ if (followRegisterEdges && step.type === "register" && step.targetComponent && step.targetMethod) {
12122
+ return [{ compId: step.targetComponent, methodName: step.targetMethod }];
12123
+ }
12124
+ if (step.type === "dispatch" && step.targetComponent) {
12125
+ const edges = [{ compId: step.targetComponent }];
12126
+ const portal = ctx.componentMap.get(step.targetComponent);
12127
+ const binding = portal?.dispatch?.find((b) => b.capability === step.capability);
12128
+ if (binding && ctx.componentMap.has(binding.component)) {
12129
+ edges.push({ compId: binding.component, methodName: binding.method });
12130
+ }
12131
+ return edges;
12132
+ }
12133
+ return [];
12134
+ }
12117
12135
  function walk(ctx, seeds, options = {}) {
12118
12136
  const followDispatchTables = options.followDispatchTables ?? true;
12119
12137
  const followRegisterEdges = options.followRegisterEdges ?? true;
@@ -12171,22 +12189,9 @@ function walk(ctx, seeds, options = {}) {
12171
12189
  }
12172
12190
  if (!impl || !methodImpl) continue;
12173
12191
  for (const step of methodImpl.narrative) {
12174
- if (step.type === "call" && step.targetComponent && step.targetMethod) {
12175
- reachComponent(step.targetComponent);
12176
- enqueueMethod(step.targetComponent, step.targetMethod);
12177
- }
12178
- if (followRegisterEdges && step.type === "register" && step.targetComponent && step.targetMethod) {
12179
- reachComponent(step.targetComponent);
12180
- enqueueMethod(step.targetComponent, step.targetMethod);
12181
- }
12182
- if (step.type === "dispatch" && step.targetComponent) {
12183
- reachComponent(step.targetComponent);
12184
- const portal = ctx.componentMap.get(step.targetComponent);
12185
- const binding = portal?.dispatch?.find((b) => b.capability === step.capability);
12186
- if (binding && ctx.componentMap.has(binding.component)) {
12187
- reachComponent(binding.component);
12188
- enqueueMethod(binding.component, binding.method);
12189
- }
12192
+ for (const edge of stepEdges(step, ctx, followRegisterEdges)) {
12193
+ reachComponent(edge.compId);
12194
+ if (edge.methodName) enqueueMethod(edge.compId, edge.methodName);
12190
12195
  }
12191
12196
  }
12192
12197
  if (methodImpl.narrative.length === 0) {