behavior-contracts 0.8.0 → 0.8.2

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.
Files changed (62) hide show
  1. package/dist/authoring.d.ts +3 -0
  2. package/dist/authoring.d.ts.map +1 -1
  3. package/dist/authoring.js +7 -0
  4. package/dist/authoring.js.map +1 -1
  5. package/dist/behavior.d.ts +15 -0
  6. package/dist/behavior.d.ts.map +1 -1
  7. package/dist/behavior.js +26 -0
  8. package/dist/behavior.js.map +1 -1
  9. package/dist/expr-operator-types.d.ts.map +1 -1
  10. package/dist/expr-operator-types.js +2 -0
  11. package/dist/expr-operator-types.js.map +1 -1
  12. package/dist/generator/emit-shared-go-typed.d.ts.map +1 -1
  13. package/dist/generator/emit-shared-go-typed.js +130 -4
  14. package/dist/generator/emit-shared-go-typed.js.map +1 -1
  15. package/dist/generator/emit-shared-rust-typed.d.ts.map +1 -1
  16. package/dist/generator/emit-shared-rust-typed.js +49 -1
  17. package/dist/generator/emit-shared-rust-typed.js.map +1 -1
  18. package/dist/generator/emit-shared-typescript-typed.d.ts +83 -0
  19. package/dist/generator/emit-shared-typescript-typed.d.ts.map +1 -0
  20. package/dist/generator/emit-shared-typescript-typed.js +259 -0
  21. package/dist/generator/emit-shared-typescript-typed.js.map +1 -0
  22. package/dist/generator/emit-shared-typescript.d.ts.map +1 -1
  23. package/dist/generator/emit-shared-typescript.js +88 -0
  24. package/dist/generator/emit-shared-typescript.js.map +1 -1
  25. package/dist/generator/emit-straightline-typed-typescript.d.ts.map +1 -1
  26. package/dist/generator/emit-straightline-typed-typescript.js +2 -0
  27. package/dist/generator/emit-straightline-typed-typescript.js.map +1 -1
  28. package/dist/generator/emit-typed-native-go.d.ts.map +1 -1
  29. package/dist/generator/emit-typed-native-go.js +250 -26
  30. package/dist/generator/emit-typed-native-go.js.map +1 -1
  31. package/dist/generator/emit-typed-native-rust.d.ts.map +1 -1
  32. package/dist/generator/emit-typed-native-rust.js +244 -25
  33. package/dist/generator/emit-typed-native-rust.js.map +1 -1
  34. package/dist/generator/emit-typescript-native.d.ts +56 -0
  35. package/dist/generator/emit-typescript-native.d.ts.map +1 -0
  36. package/dist/generator/emit-typescript-native.js +44 -0
  37. package/dist/generator/emit-typescript-native.js.map +1 -0
  38. package/dist/generator/index.d.ts +2 -0
  39. package/dist/generator/index.d.ts.map +1 -1
  40. package/dist/generator/index.js +6 -0
  41. package/dist/generator/index.js.map +1 -1
  42. package/dist/generator/native-expr.d.ts +17 -0
  43. package/dist/generator/native-expr.d.ts.map +1 -1
  44. package/dist/generator/native-expr.js +82 -2
  45. package/dist/generator/native-expr.js.map +1 -1
  46. package/dist/generator/straightline.d.ts +22 -1
  47. package/dist/generator/straightline.d.ts.map +1 -1
  48. package/dist/generator/straightline.js +25 -7
  49. package/dist/generator/straightline.js.map +1 -1
  50. package/dist/generator/typed.d.ts +5 -0
  51. package/dist/generator/typed.d.ts.map +1 -1
  52. package/dist/generator/typed.js +8 -0
  53. package/dist/generator/typed.js.map +1 -1
  54. package/dist/guard.d.ts +2 -1
  55. package/dist/guard.d.ts.map +1 -1
  56. package/dist/guard.js +6 -5
  57. package/dist/guard.js.map +1 -1
  58. package/dist/type-gate.d.ts +1 -1
  59. package/dist/type-gate.d.ts.map +1 -1
  60. package/dist/type-gate.js +45 -24
  61. package/dist/type-gate.js.map +1 -1
  62. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"emit-straightline-typed-typescript.js","sourceRoot":"","sources":["../../src/generator/emit-straightline-typed-typescript.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EACL,aAAa,EACb,aAAa,GAId,MAAM,YAAY,CAAC;AAGpB,gFAAgF;AAEhF,8EAA8E;AAC9E,SAAS,aAAa,CAAC,GAAY;IACjC,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AAI,CAAC,MAAM,CAAC,CAAC;IAEhB,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;EAoBpB,KAAK;;EAEL,KAAK;CACN,CAAC;IACA,OAAO,gBAAgB,GAAG,IAAI,GAAG,WAAW,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,QAAQ,EAAE,kBAAkB;IAC5B,cAAc,EAAE,SAAS,EAAE,kFAAkF;IAC7G,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,oBAAoB;IAC1C,YAAY,EAAE,8BAA8B;IAC5C,IAAI;CACL,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"emit-straightline-typed-typescript.js","sourceRoot":"","sources":["../../src/generator/emit-straightline-typed-typescript.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EACL,aAAa,EACb,aAAa,GAId,MAAM,YAAY,CAAC;AAGpB,gFAAgF;AAEhF,8EAA8E;AAC9E,SAAS,aAAa,CAAC,GAAY;IACjC,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,QAAQ;YACX,gEAAgE;YAChE,QAAQ,GAAG,CAAC,MAAM,EAAE,CAAC;gBACnB,KAAK,QAAQ;oBACX,OAAO,QAAQ,CAAC;gBAClB,KAAK,KAAK,CAAC;gBACX,KAAK,OAAO;oBACV,OAAO,QAAQ,CAAC;gBAClB,KAAK,MAAM;oBACT,OAAO,SAAS,CAAC;gBACnB,KAAK,MAAM;oBACT,OAAO,MAAM,CAAC;YAClB,CAAC;YACD,MAAM;QACR,KAAK,KAAK;YACR,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC;QA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B,EAAE,oBAAoB;IAC1C,YAAY,EAAE,8BAA8B;IAC5C,IAAI;CACL,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"emit-typed-native-go.d.ts","sourceRoot":"","sources":["../../src/generator/emit-typed-native-go.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,WAAW,CAAC;AAq8E5D;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CA6RhF;AAqCD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAOlC,CAAC"}
1
+ {"version":3,"file":"emit-typed-native-go.d.ts","sourceRoot":"","sources":["../../src/generator/emit-typed-native-go.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,WAAW,CAAC;AAipF5D;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CA6RhF;AAqCD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAOlC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { GeneratorFailure } from "./core.js";
2
+ import { isControlGate } from "../behavior.js";
2
3
  import { goStraightlineInternals } from "./emit-shared-go.js";
3
4
  import { goTypedInternals } from "./emit-shared-go-typed.js";
4
5
  import { buildTypePlan, deriveTypeRef, findDecl } from "./typed.js";
@@ -74,12 +75,12 @@ function inferPortType(node, inputPorts, asBinding) {
74
75
  if (e.path.length === 1) {
75
76
  const s = inputPorts[e.path[0]];
76
77
  if (s) {
77
- if (s.type === "string")
78
- return "string";
78
+ if (s.type === "string" || s.type === "literal")
79
+ return "string"; // literal = constrained string.
79
80
  if (s.type === "int")
80
81
  return "int64";
81
- if (s.type === "float")
82
- return "float64";
82
+ if (s.type === "float" || s.type === "number")
83
+ return "float64"; // `"number"` = the float channel.
83
84
  if (s.type === "bool")
84
85
  return "bool";
85
86
  }
@@ -133,12 +134,77 @@ function portFieldGoType(node, inputPorts, where = "port", asBinding, plan, type
133
134
  const num = numLiteralGoExpr(node);
134
135
  if (num !== null)
135
136
  return Number.isInteger(node) ? "int64" : "float64";
137
+ // a ref to a `$as` element field (or an input map port) whose type is a MAP or NAMED struct (NOT a bare
138
+ // scalar) → the native map/struct type (#108-map: a `{map:V}` write port lowers to map[string]V).
139
+ const composite = portCompositeRef(node, inputPorts, asBinding, plan);
140
+ if (composite !== null)
141
+ return renderTypeRef(composite);
136
142
  const ft = inferPortType(node, inputPorts, asBinding);
137
143
  if (ft === "Value") {
138
144
  throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `go combined read (bc#90 / runtime-free): ${where} '${JSON.stringify(node)}' does not lower to a native Go type (would need a boxed dslcontracts.Value). The covered read plane is runtime-free and admits NO boxed escape — the covered corpus ports are string / bool / static-string-array (projection) / bare-number (limit) only. Regenerate on the boxed straight-line path if this port is genuinely dynamic.`);
139
145
  }
140
146
  return ft;
141
147
  }
148
+ /** portCompositeRef (go twin) — the full TypeRef of a port that is a `{ref:[...]}` into a `$as` element
149
+ * MAP or NAMED field (or an input MAP port with elemType). Returns null otherwise (caller falls through
150
+ * to scalar/array inference). #108-map: enables a `{map:V}` write port to lower to map[string]V. */
151
+ function portCompositeRef(node, inputPorts, asBinding, plan) {
152
+ const e = classifyExpr(node);
153
+ if (e.kind !== "ref" || plan === undefined)
154
+ return null;
155
+ let ref = null;
156
+ if (asBinding !== undefined && e.path[0] === asBinding.name) {
157
+ try {
158
+ ref = goTypedInternals.typedFieldAccess(asBinding.name, asBinding.ref, e.path.slice(1), asBinding.plan).ref;
159
+ }
160
+ catch {
161
+ return null;
162
+ }
163
+ }
164
+ else if (e.path.length === 1) {
165
+ const s = inputPorts[e.path[0]];
166
+ if (s !== undefined && s.type === "map") {
167
+ const et = s.elemType;
168
+ if (et !== undefined)
169
+ return { kind: "map", value: deriveTypeRef(et, plan) };
170
+ }
171
+ return null;
172
+ }
173
+ if (ref === null)
174
+ return null;
175
+ if (ref.kind === "map" || ref.kind === "named")
176
+ return ref;
177
+ return null;
178
+ }
179
+ /** emitCompositePortValue (go twin) — the OWNED native value expr for a `{map:V}`/named port ref: a typed
180
+ * field access `<elemBase>.<field>` (native map/struct, ZERO boxed Value). `elemBaseExpr` is the map arm's
181
+ * element base for a `$as`-headed ref (omitted at top level — only input map-port refs resolve there). */
182
+ function emitCompositePortValue(node, inputPorts, asBinding, plan, elemBaseExpr) {
183
+ const e = classifyExpr(node);
184
+ if (e.kind !== "ref")
185
+ return null;
186
+ if (asBinding !== undefined && elemBaseExpr !== undefined && e.path[0] === asBinding.name) {
187
+ let acc;
188
+ try {
189
+ acc = goTypedInternals.typedFieldAccess(elemBaseExpr, asBinding.ref, e.path.slice(1), plan);
190
+ }
191
+ catch {
192
+ return null;
193
+ }
194
+ if (acc.ref.kind !== "map" && acc.ref.kind !== "named")
195
+ return null;
196
+ return acc.expr;
197
+ }
198
+ // a WHOLE-port ref to an input MAP port (with elemType) — valid at top level OR inside a map node (a
199
+ // ref head that is NOT the `$as` element binding). Reads the native map[string]V off the input struct.
200
+ if ((asBinding === undefined || e.path[0] !== asBinding.name) && e.path.length === 1) {
201
+ const s = inputPorts[e.path[0]];
202
+ if (s !== undefined && s.type === "map" && s.elemType !== undefined) {
203
+ return `in.${goFieldName(e.path[0])}`;
204
+ }
205
+ }
206
+ return null;
207
+ }
142
208
  function staticArrElems(node) {
143
209
  if (node === null || typeof node !== "object" || Array.isArray(node))
144
210
  return null;
@@ -270,6 +336,10 @@ function isFullyTyped(comp) {
270
336
  if (comp.outputType === undefined)
271
337
  return false;
272
338
  for (const n of comp.body) {
339
+ // #125: a control-gate cond is a typeless skip marker (A3) — it never de-boxes a result, so it is
340
+ // exempt from the "every node carries outType" de-box requirement (matches type-gate's exemption).
341
+ if (isControlGate(n))
342
+ continue;
273
343
  if (n.outType === undefined)
274
344
  return false;
275
345
  }
@@ -305,6 +375,13 @@ function coveredMapNode(n, bodyIds, comp) {
305
375
  return false;
306
376
  if (m.relationKind !== undefined && m.relationKind !== "single" && m.relationKind !== "connection")
307
377
  return false;
378
+ // A map node must carry an outType (its ELEMENT type per the recorder SoT — authoring.ts recordMap
379
+ // holds `node.outType = mapElem`, the PRE-array-wrap element; the emitter synthesizes the produced
380
+ // `[]element`). A map WITHOUT outType is uncovered. Legacy hand-built IR that already carries the
381
+ // `{arr:element}` produced form is ALSO accepted — mapNodeArrRef normalizes both to the array ref.
382
+ const outT = n.outType;
383
+ if (outT === undefined || typeof outT !== "object")
384
+ return false;
308
385
  // `over` element type must be STATICALLY resolvable: a ref to a PRIOR BODY NODE's typed arr field
309
386
  // (mapOverElemType) OR a ref to an INPUT array port that carries `elemType` (#108 — the C3 "BC does
310
387
  // not infer" rule: an input array WITHOUT elemType stays fail-closed / uncovered).
@@ -389,16 +466,33 @@ function coverageRejectReason(comp) {
389
466
  // to it too. A non-single/connection bindField member is rejected by that shared check.
390
467
  for (const [i] of ep.parallelStageOf) {
391
468
  const n = comp.body[i];
469
+ // #125/#108: a cond node IS allowed as a parallel-stage member — it is a pure Expression (no
470
+ // dispatch), evaluated in preflight ascending order, so its produced flag / typed result cell is
471
+ // settled before any dispatch. It carries no handler and no boxed result, so it does not disturb the
472
+ // bounded-concurrency error-precedence protocol (which governs the componentRef fan-out members).
473
+ // Covers BOTH the when(...) control-gate cond (#136, {ok}/null skip marker) AND the Φ-merge VALUE
474
+ // cond (#108, has outType, then/else are data branches — the sibling Φ-join). The cond's own
475
+ // validity (a value cond REQUIRES outType; a control gate is exempt) is enforced by the per-node
476
+ // cond check below, so a parallel value cond without outType still loud-rejects there.
477
+ if ("cond" in n)
478
+ continue;
392
479
  if (!("component" in n))
393
480
  return `node '${n.id}' is a non-componentRef member of a parallel stage (not native-covered)`;
394
481
  }
395
482
  const bodyIds = new Set(comp.body.map((b) => b.id));
396
483
  for (const n of comp.body) {
397
484
  if ("cond" in n) {
398
- // #108: a cond node is native-covered its `if`/`then`/`else` compile to native expressions via
399
- // the runtime-free NativeExprCompiler (byte-equal to run_behavior's cond lower). If an expression
400
- // is not statically compilable (uncovered op / refOpt / opt operand / type mismatch), the compiler
401
- // fails closed at emit (a loud GeneratorFailure) — never a silent box. cond requires outType.
485
+ // #125: a when(...) control-gate cond (`{if, then:{obj:{ok:true}}, else:null}`) は制御スキップ
486
+ // マーカーで出力データ型を持たない(A3 の意図的 typeless design)— outType を要求しない。gate
487
+ // if native bool へコンパイルし produced_<gate> に写すだけで、分岐内ノードは既存の
488
+ // `parent=gate, bindField:"ok"` skip-gate(run_behavior null-binding skip)が実行選択する。
489
+ if (isControlGate(n))
490
+ continue;
491
+ // #108: a DATA-JOIN cond node (Φ 合流) is native-covered — its `if`/`then`/`else` compile to native
492
+ // expressions via the runtime-free NativeExprCompiler (byte-equal to run_behavior's cond lower). If an
493
+ // expression is not statically compilable (uncovered op / refOpt / opt operand / type mismatch), the
494
+ // compiler fails closed at emit (a loud GeneratorFailure) — never a silent box. A data-join cond
495
+ // requires outType(合流値を de-box する対象だから — control gate だけがこの要求を免除される)。
402
496
  if (n.outType === undefined)
403
497
  return `node '${n.id}' cond has no outType (required to de-box the branch join)`;
404
498
  continue;
@@ -428,6 +522,11 @@ function coverageRejectReason(comp) {
428
522
  // struct-de-plumbed). relationKind:single WITHOUT bindField (the #74/#323 core) IS covered.
429
523
  if (cr.policy !== undefined && cr.policy !== "fail")
430
524
  return `node '${n.id}' componentRef policy '${cr.policy}' (produced-aware output not yet native-covered)`;
525
+ // #125: a when(...) control-gate child (`parent=gate, bindField:"ok"`). Its bindField is the gate's
526
+ // skip signal, NOT a relation data key — so the relationKind constraint below (which governs a
527
+ // relation bindField into a single|connection parent) does not apply. Its skip is driven by the
528
+ // gate's produced_<gate> flag; the child itself can be a plain point read (or a relation read).
529
+ const childOfGate = cr.parent !== undefined && isControlGate(comp.body.find((b) => b.id === cr.parent));
431
530
  // #86 part 1: a relationKind:single child WITH bindField (relationSingle) IS covered. When the
432
531
  // bound parent field is null/absent the child is UNPRODUCED — the produced-aware output lowering
433
532
  // (emitProducedAwareValue) then yields the unproduced rep (null / opt-nil) for a ref/refOpt into
@@ -435,7 +534,7 @@ function coverageRejectReason(comp) {
435
534
  // child is ALSO covered — the connection's unproduced rep is the empty connection {items:[],cursor:null}
436
535
  // (unproducedValue("connection")), which emitProducedAwareValue emits explicitly for a skipped
437
536
  // connection node (a ref into it yields {items:[],cursor:null}, matching run_behavior).
438
- if (cr.bindField !== undefined && cr.relationKind !== "single" && cr.relationKind !== "connection")
537
+ if (!childOfGate && cr.bindField !== undefined && cr.relationKind !== "single" && cr.relationKind !== "connection")
439
538
  return `node '${n.id}' relationKind '${cr.relationKind ?? "point"}' not native-covered (bindField only supports single|connection)`;
440
539
  if (cr.relationKind !== undefined && cr.relationKind !== "single" && cr.relationKind !== "connection")
441
540
  return `relationKind '${cr.relationKind}' not native-covered (node '${n.id}')`;
@@ -740,6 +839,19 @@ function fanoutOverElemInfo(comp, node, typedNodes, plan) {
740
839
  }
741
840
  throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `go fanout (v3): fanout '${node.id}' 'over' must be a ref to a prior node's typed arr field OR an input array port with a declared elemType (got ${JSON.stringify(f.over)}).`);
742
841
  }
842
+ /** mapNodeArrRef — the map node's PRODUCED-ARRAY TypeRef from its `outType`, normalizing the two IR
843
+ * conventions to the one array shape every downstream site assumes (`typedNodes.get(mapId)` is an arr):
844
+ * - the RECORDER SoT (authoring.ts recordMap): `node.outType` is the ELEMENT (pre-array-wrap) — wrap
845
+ * to `{arr:element}` (the map produces `[]element`), matching type-gate's outputType wrap
846
+ * (`"map" in n ? {arr:ot} : ot`). This is the declarative-authoring form (graphddb batchWrite/forEach).
847
+ * - legacy hand-built IR: `node.outType` already the `{arr:element}` produced form — take it as-is.
848
+ * A map ELEMENT is never itself an `{arr:…}` in the covered corpus, so the discriminator is unambiguous.
849
+ * Both converge to the SAME produced-array ref, so existing goldens stay byte-identical. */
850
+ function mapNodeArrRef(node, plan) {
851
+ const outT = node.outType;
852
+ const isArr = outT !== null && typeof outT === "object" && "arr" in outT;
853
+ return deriveTypeRef((isArr ? outT : { arr: outT }), plan);
854
+ }
743
855
  /** mapElemRowRef — the handler's per-element RETURN shape for a covered map node: the `into` field's
744
856
  * type (into) or the element outType directly (no-into). This is the type of RawElem_<comp>_<node>. */
745
857
  function mapElemRowRef(node, arrRef, plan) {
@@ -922,10 +1034,14 @@ function inStructName(compName) {
922
1034
  function inputPortGoType(schema, plan) {
923
1035
  switch (schema?.type) {
924
1036
  case "string":
1037
+ // a `"literal"` port is a constrained STRING union (`param.literal(…)`, stored 'S') → native string.
1038
+ case "literal":
925
1039
  return "string";
926
1040
  case "int":
927
1041
  return "int64";
928
1042
  case "float":
1043
+ // a `"number"` port is the FLOAT channel (run_behavior: number → float / f64 / float64).
1044
+ case "number":
929
1045
  return "float64";
930
1046
  case "bool":
931
1047
  return "bool";
@@ -938,6 +1054,13 @@ function inputPortGoType(schema, plan) {
938
1054
  return `[]${renderTypeRef(deriveTypeRef(et, plan))}`;
939
1055
  return `${PKG}.Value`;
940
1056
  }
1057
+ case "map": {
1058
+ // an input MAP port (dynamic string keys, declared value elemType) lowers to a native map[string]ElemT.
1059
+ const et = schema.elemType;
1060
+ if (et !== undefined && plan !== undefined)
1061
+ return `map[string]${renderTypeRef(deriveTypeRef(et, plan))}`;
1062
+ return `${PKG}.Value`;
1063
+ }
941
1064
  default:
942
1065
  return `${PKG}.Value`;
943
1066
  }
@@ -946,10 +1069,12 @@ function inputPortGoType(schema, plan) {
946
1069
  function inputScalarKind(schema) {
947
1070
  switch (schema?.type) {
948
1071
  case "string":
1072
+ case "literal": // a `"literal"` union is a constrained string (see inputPortGoType).
949
1073
  return "string";
950
1074
  case "int":
951
1075
  return "int64";
952
1076
  case "float":
1077
+ case "number": // a `"number"` port is the FLOAT channel (run_behavior: number → float / float64).
953
1078
  return "float64";
954
1079
  case "bool":
955
1080
  return "bool";
@@ -1025,6 +1150,14 @@ function emitInDecoder(comp, plan) {
1025
1150
  lines.push(`\t}`);
1026
1151
  continue;
1027
1152
  }
1153
+ if (schema?.type === "map" && et !== undefined) {
1154
+ // #108-map: decode the boxed *Obj into the native map[string]V (test glue — the input map port
1155
+ // carries a declared elemType). materializeExpr covers the map de-box (Obj → map[string]V).
1156
+ const mapRef = { kind: "map", value: deriveTypeRef(et, plan) };
1157
+ lines.push(`\t\tin.${field} = ${goTypedInternals.materializeExpr("v", mapRef, plan)}`);
1158
+ lines.push(`\t}`);
1159
+ continue;
1160
+ }
1028
1161
  if (scalar === undefined) {
1029
1162
  lines.push(`\t\tin.${field} = v`);
1030
1163
  }
@@ -1096,8 +1229,15 @@ function emitNativeScalar(node, want, resolveRef) {
1096
1229
  * plane — a boxed escape would re-introduce the bc-runtime coupling this module removes). Returns the
1097
1230
  * struct field initializer (`Field: <expr>`). `resolveRef` resolves a ref head for the scalar path.
1098
1231
  */
1099
- function emitPortInit(pn, expr, fieldGoType, resolveRef, inputPorts, plan, typedNodes) {
1232
+ function emitPortInit(pn, expr, fieldGoType, resolveRef, inputPorts, plan, typedNodes, asBinding, elemBaseExpr) {
1100
1233
  const fieldName = goPortFieldName(pn);
1234
+ // #108-map: a port that is a ref to a `$as` element MAP/NAMED field (or an input map port) → the typed
1235
+ // composite value directly off the element/input (native map[string]V / struct — ZERO boxed Value).
1236
+ if (plan !== undefined) {
1237
+ const compExpr = emitCompositePortValue(expr, inputPorts ?? {}, asBinding, plan, elemBaseExpr);
1238
+ if (compExpr !== null)
1239
+ return `${fieldName}: ${compExpr}`;
1240
+ }
1101
1241
  // #110: a componentRef port bound to a runtime array input port (with elemType) → the native []ElemT,
1102
1242
  // read straight from the concrete input struct (`in.<Field>`) — ZERO boxed Value on the read hot path.
1103
1243
  // The over-elem/element-source case (map…over) already resolves via mapOverElemInfo; this is the plain
@@ -1171,10 +1311,35 @@ function emitParallelStageArm(comp, stage, atPos, concurrency, metas, typedNodes
1171
1311
  const ids = stage.map((i) => comp.body[i].id);
1172
1312
  lines.push(`\t// ── bc#87 real-concurrency stage {${ids.map((x) => JSON.stringify(x)).join(", ")}} — static parallel`);
1173
1313
  lines.push(`\t// orchestration (goroutine per op, bound=${concurrency}); preflight+commit in ascending index order.`);
1314
+ // #125/#108: a stage member may be a cond node — a pure Expression (NO handler/dispatch). The
1315
+ // parallel orchestration (goroutine/WaitGroup/semaphore) governs only the componentRef fan-out
1316
+ // members; a cond is settled in ascending preflight order — BEFORE any dispatch — via the SAME
1317
+ // emitCondArm the sequential path uses (no forked lowering). This covers BOTH cond kinds that the
1318
+ // sequential path covers, and emitCondArm routes them internally:
1319
+ // - a when(...) control-gate cond (#136, isControlGate, no outType): commits produced_<gate>
1320
+ // ({ok}/null skip marker), whose gated children read it in a later stage;
1321
+ // - a Φ-merge VALUE cond (#108, has outType, then/else are data branches): materializes its typed
1322
+ // result cell (short-circuit taken branch) — the sibling Φ-join (e.g. two when-gated connection
1323
+ // relations each folding to `ref | emptyConn`). Both are mutually independent (§1), so emitting
1324
+ // them ascending at the head of the stage block is byte-equal to run_behavior (each cond's `if`
1325
+ // evaluated in preflight). A cond never shares a stage with a node that depends on it (an intra-
1326
+ // stage parent/child dep is rejected by concurrencyPlan).
1327
+ const condMembers = stage.filter((i) => "cond" in comp.body[i]);
1328
+ const refMembers = stage.filter((i) => !("cond" in comp.body[i]));
1329
+ for (const i of condMembers) {
1330
+ // emit the cond EXACTLY as #108/#136 does sequentially (reused, not forked) — position in `order`
1331
+ // is atPos + slot; emitCondArm dispatches control-gate vs value-cond internally.
1332
+ lines.push(emitCondArm(comp, comp.body[i], atPos + stage.indexOf(i), typedNodes, plan, priorNodeAt, zeroOut));
1333
+ }
1334
+ // A cond-ONLY stage carries no handler fan-out — the conds above ARE the whole stage (each committed
1335
+ // its produced flag / typed cell in ascending order). Skip the parallel orchestration block entirely
1336
+ // (no goroutine / WaitGroup / semaphore to emit — an empty one would be dead scaffolding).
1337
+ if (refMembers.length === 0)
1338
+ return lines.join("\n");
1174
1339
  lines.push(`\t{`);
1175
1340
  // per-member outcome + resolved-flag + ports locals, declared at STAGE scope (assigned in the
1176
1341
  // ascending preflight, read at dispatch/commit — a goroutine closes over the ports local).
1177
- for (const i of stage) {
1342
+ for (const i of refMembers) {
1178
1343
  const node = comp.body[i];
1179
1344
  const s = sanitize(node.id);
1180
1345
  const structName = portsStructName(comp.name, comp.body[i].id);
@@ -1195,17 +1360,26 @@ function emitParallelStageArm(comp, stage, atPos, concurrency, metas, typedNodes
1195
1360
  // per member (BEFORE dispatch). For a bindField relation child the bound key is read from the SETTLED
1196
1361
  // parent struct field (typed access — no serialize); a nil bound => the member is UNPRODUCED/skipped
1197
1362
  // (run_${s} stays false), exactly run_behavior's preflightOp bindField skip, before any dispatch.
1198
- for (const i of stage) {
1363
+ for (const i of refMembers) {
1199
1364
  const node = comp.body[i];
1200
1365
  const s = sanitize(node.id);
1201
1366
  const structName = portsStructName(comp.name, node.id);
1202
1367
  let ind = "\t\t";
1203
1368
  const closers = [];
1369
+ // #125: a stage member gated by a PRIOR-stage control gate (`parent=gate, bindField:"ok"`). Its
1370
+ // bindField is the gate's skip sentinel, NOT a relation data key — the gate is typeless (no struct
1371
+ // field to read). Mirror the sequential arm: when the gate is produced we are past the skip, so the
1372
+ // bound is the non-nil "ok" sentinel (the child's ports read the REAL data parent, not the gate).
1373
+ const parentIsGate = node.parent !== undefined && isControlGate(comp.body.find((b) => b.id === node.parent));
1204
1374
  if (node.parent !== undefined && priorNodeAt(node.parent, atPos)) {
1205
1375
  lines.push(`${ind}if produced_${sanitize(node.parent)} {`);
1206
1376
  closers.unshift(`${ind}}`);
1207
1377
  ind += "\t";
1208
- if (node.bindField !== undefined) {
1378
+ if (node.bindField !== undefined && parentIsGate) {
1379
+ lines.push(`${ind}gateOK_${s} := "ok"`);
1380
+ lines.push(`${ind}bound_${s} = &gateOK_${s}`);
1381
+ }
1382
+ else if (node.bindField !== undefined) {
1209
1383
  const parentRef = typedNodes.get(node.parent);
1210
1384
  const { expr: bfExpr, ref: bfRef } = goTypedInternals.typedFieldAccess(typedLocal(node.parent), parentRef, [node.bindField], plan);
1211
1385
  if (bfRef.kind === "opt") {
@@ -1233,10 +1407,10 @@ function emitParallelStageArm(comp, stage, atPos, concurrency, metas, typedNodes
1233
1407
  lines.push(c);
1234
1408
  }
1235
1409
  // 2) DISPATCH (bounded): one goroutine per runnable member, bound by a semaphore of the static size.
1236
- const bound = Math.min(concurrency, stage.length);
1410
+ const bound = Math.min(concurrency, refMembers.length);
1237
1411
  lines.push(`\t\tvar wg sync.WaitGroup`);
1238
1412
  lines.push(`\t\tsem := make(chan struct{}, ${bound})`);
1239
- for (const i of stage) {
1413
+ for (const i of refMembers) {
1240
1414
  const node = comp.body[i];
1241
1415
  const s = sanitize(node.id);
1242
1416
  lines.push(`\t\tif run_${s} {`);
@@ -1252,7 +1426,7 @@ function emitParallelStageArm(comp, stage, atPos, concurrency, metas, typedNodes
1252
1426
  }
1253
1427
  lines.push(`\t\twg.Wait()`);
1254
1428
  // 3) COMMIT (ascending index): interpret + materialize deterministically — lowest-index failure wins.
1255
- for (const i of stage) {
1429
+ for (const i of refMembers) {
1256
1430
  const node = comp.body[i];
1257
1431
  const meta = metas[i];
1258
1432
  const s = sanitize(node.id);
@@ -1299,8 +1473,11 @@ function emitNativeRawRunner(comp, plan, flags) {
1299
1473
  const metas = analyzeSequentialOps(cplan.opsLiteral, order);
1300
1474
  const fn = sanitize(comp.name);
1301
1475
  const typedNodes = new Map();
1476
+ // #125: a control-gate cond has NO outType (skip marker) — it never yields a typed data cell, so it
1477
+ // carries no typedNodes entry. Its skip is expressed purely via produced_<gate> (children gate on it).
1302
1478
  for (const n of comp.body)
1303
- typedNodes.set(n.id, deriveTypeRef(n.outType, plan));
1479
+ if (!isControlGate(n))
1480
+ typedNodes.set(n.id, "map" in n ? mapNodeArrRef(n, plan) : deriveTypeRef(n.outType, plan));
1304
1481
  const idToPos = new Map();
1305
1482
  order.forEach((opIdx, k) => idToPos.set(comp.body[opIdx].id, k));
1306
1483
  const priorNodeAt = (head, atPos) => {
@@ -1359,10 +1536,16 @@ function emitNativeRawRunner(comp, plan, flags) {
1359
1536
  return { expr: `in.${goFieldName(head)}`, scalar };
1360
1537
  };
1361
1538
  for (const k of order.keys()) {
1362
- const id = comp.body[order[k]].id;
1363
- lines.push(`\tvar ${typedLocal(id)} ${renderTypeRef(typedNodes.get(id))}`);
1539
+ const node = comp.body[order[k]];
1540
+ const id = node.id;
1541
+ // #125: a control-gate cond has no typed data cell — only a produced_<gate> flag (its `if` result),
1542
+ // which its gated children read via the existing `if produced_<parent>` skip-gate. A non-gate node
1543
+ // declares its typed local in the SAME line order as before (`var` first — golden-corpus stable).
1544
+ if (!isControlGate(node))
1545
+ lines.push(`\tvar ${typedLocal(id)} ${renderTypeRef(typedNodes.get(id))}`);
1364
1546
  lines.push(`\tproduced_${sanitize(id)} := false`);
1365
- lines.push(`\t_ = ${typedLocal(id)}`);
1547
+ if (!isControlGate(node))
1548
+ lines.push(`\t_ = ${typedLocal(id)}`);
1366
1549
  lines.push(`\t_ = produced_${sanitize(id)}`);
1367
1550
  }
1368
1551
  const idToPosAll = new Map();
@@ -1405,11 +1588,20 @@ function emitNativeRawRunner(comp, plan, flags) {
1405
1588
  lines.push(`\t// ── op '${node.id}' (${node.component}${node.relationKind ? ", relationKind:" + node.relationKind : ""}${node.parent ? ", parent:" + node.parent : ""}) ──`);
1406
1589
  let indent = "\t";
1407
1590
  const closers = [];
1591
+ const parentIsGate = node.parent !== undefined && isControlGate(comp.body.find((b) => b.id === node.parent));
1408
1592
  if (node.parent !== undefined && priorNodeAt(node.parent, k)) {
1409
1593
  lines.push(`${indent}if produced_${sanitize(node.parent)} {`);
1410
1594
  closers.unshift(`${indent}}`);
1411
1595
  indent += "\t";
1412
- if (node.bindField !== undefined) {
1596
+ if (node.bindField !== undefined && parentIsGate) {
1597
+ // #125: a when(...) control-gate parent. gate の bindField:"ok" は run_behavior では成立時
1598
+ // `true` / 不成立時 `null`(→ null-binding skip)。native では produced_<gate>(= gate の `if`)
1599
+ // が既にその skip を担うので、ここに来た時点で gate は成立。bound は skip の sentinel(データ
1600
+ // キーではない — 子の ports は実データ親を参照する)として、非 nil の `*string` を渡す。
1601
+ lines.push(`${indent}gateOK_${s} := "ok"`);
1602
+ lines.push(`${indent}bound_${s} := &gateOK_${s}`);
1603
+ }
1604
+ else if (node.bindField !== undefined) {
1413
1605
  // bind (change #3 — typed produced-aware bound): read the parent struct field DIRECTLY (typed
1414
1606
  // access — no serialize). `bound_<s>` is a TYPED POINTER (`*T`) — nil => UNPRODUCED/skip, non-nil
1415
1607
  // => produced (an empty string is a VALID produced value, a non-nil *string to ""). This is the
@@ -1590,7 +1782,8 @@ function emitMapArm(comp, node, atPos, typedNodes, plan, priorNodeAt, zeroOut, f
1590
1782
  const asBinding = { name: asName, ref: overElemRef, plan };
1591
1783
  for (const pn of portNames) {
1592
1784
  const fieldGoType = portFieldGoType(m.ports[pn], comp.inputPorts, `map port '${pn}' of node '${node.id}'`, asBinding, plan);
1593
- inits.push(emitPortInit(pn, m.ports[pn], fieldGoType, resolveRef, comp.inputPorts, plan));
1785
+ // #108-map: pass the element binding + base expr so a `$as` MAP/NAMED field port reads the typed composite.
1786
+ inits.push(emitPortInit(pn, m.ports[pn], fieldGoType, resolveRef, comp.inputPorts, plan, undefined, asBinding, elemLocal(s)));
1594
1787
  }
1595
1788
  out.push(`${il}ep_${s} := ${structName}{${inits.join(", ")}}`);
1596
1789
  return out;
@@ -1855,7 +2048,6 @@ function goInputHeadRef(head, comp, plan) {
1855
2048
  function emitCondArm(comp, node, atPos, typedNodes, plan, priorNodeAt, zeroOut) {
1856
2049
  const c = node.cond;
1857
2050
  const s = sanitize(node.id);
1858
- const nodeRef = typedNodes.get(node.id);
1859
2051
  const priorHere = (head) => priorNodeAt(head, atPos);
1860
2052
  const resolveHead = (head) => {
1861
2053
  if (priorHere(head))
@@ -1864,8 +2056,31 @@ function emitCondArm(comp, node, atPos, typedNodes, plan, priorNodeAt, zeroOut)
1864
2056
  };
1865
2057
  const be = makeGoExprBackend(zeroOut, resolveHead, plan);
1866
2058
  const compiler = new NativeExprCompiler(be);
1867
- const resolveDecl = (name) => findDecl(plan, name).fields;
1868
2059
  const cond = compiler.compileBool(c.if);
2060
+ // #125: a when(...) control-gate cond は出力データ型を持たない制御スキップマーカー。typed cell へ
2061
+ // 何も materialize せず、`if` を native bool にして produced_<gate> に写すだけ。分岐内ノード
2062
+ // (`parent=gate, bindField:"ok"`)は既存の `if produced_<gate>` skip-gate が実行選択する — gate が
2063
+ // 成立(produced_<gate>=true)で子は走り、不成立で子は skip、run_behavior の null-binding skip と一致。
2064
+ if (isControlGate(node)) {
2065
+ const glines = [];
2066
+ glines.push(`\t// ── control-gate cond '${node.id}'${c.parent ? " (parent:" + c.parent + ")" : ""} — when(...) skip marker (no data type) ──`);
2067
+ let gindent = "\t";
2068
+ const gclosers = [];
2069
+ if (c.parent !== undefined && priorNodeAt(c.parent, atPos)) {
2070
+ glines.push(`${gindent}if produced_${sanitize(c.parent)} {`);
2071
+ gclosers.unshift(`${gindent}}`);
2072
+ gindent += "\t";
2073
+ }
2074
+ // the `if` condition (fallible temps hoisted first — always evaluated); produced_<gate> = its bool.
2075
+ for (const st of cond.stmts)
2076
+ glines.push(`${gindent}${st}`);
2077
+ glines.push(`${gindent}produced_${s} = ${cond.expr}`);
2078
+ for (const cl of gclosers)
2079
+ glines.push(cl);
2080
+ return glines.join("\n");
2081
+ }
2082
+ const nodeRef = typedNodes.get(node.id);
2083
+ const resolveDecl = (name) => findDecl(plan, name).fields;
1869
2084
  const thenC = compiler.compileTo(c.then, nodeRef, resolveDecl);
1870
2085
  const elseC = compiler.compileTo(c.else, nodeRef, resolveDecl);
1871
2086
  const lines = [];
@@ -2007,6 +2222,8 @@ function goZero(ref) {
2007
2222
  return "nil";
2008
2223
  case "opt":
2009
2224
  return "nil";
2225
+ case "map":
2226
+ return "nil";
2010
2227
  }
2011
2228
  }
2012
2229
  // bc#90 / runtime-free: the nv* helper set (nvVE/nvBindVE/nvFieldVE/nvCatVE/nvArrVE) is REMOVED —
@@ -2059,6 +2276,11 @@ function makeGoExprBackend(zeroOut, resolveHead, plan) {
2059
2276
  notOp: (a) => `(!${a})`,
2060
2277
  structLit: (name, inits) => `${name}{${inits.map((i) => `${goFieldName(i.field)}: ${i.expr}`).join(", ")}}`,
2061
2278
  arrLit: (elemTy, items) => `[]${elemTy}{${items.join(", ")}}`,
2279
+ // an opt (`*T`) NONE literal is `nil` (the inner type is not needed for the untyped nil in Go).
2280
+ optNone: (_innerTy) => "nil",
2281
+ // opt (`*T`) null-presence test: present = `(expr != nil)`, absent = `(expr == nil)`.
2282
+ optIsSome: (expr) => `(${expr} != nil)`,
2283
+ optIsNone: (expr) => `(${expr} == nil)`,
2062
2284
  ternary: (cond, t, e, ty) => `func() ${ty} { if ${cond} { return ${t} }; return ${e} }()`,
2063
2285
  shortCircuitBool: (op, temp, left, rStmts, rExpr) => {
2064
2286
  // and: temp=false; if left { <rStmts>; temp=rExpr }. or: temp=true; if !left { <rStmts>; temp=rExpr }.
@@ -2262,7 +2484,8 @@ function emit(ctx) {
2262
2484
  const typedNodes = new Map();
2263
2485
  // build the full typed-node map FIRST so a map's over-element resolution can see every node.
2264
2486
  for (const n of c.body)
2265
- typedNodes.set(n.id, deriveTypeRef(n.outType, plan));
2487
+ if (!isControlGate(n))
2488
+ typedNodes.set(n.id, "map" in n ? mapNodeArrRef(n, plan) : deriveTypeRef(n.outType, plan)); // #125: control-gate typeless; map は produced-array ref に正規化
2266
2489
  for (const n of c.body) {
2267
2490
  if ("fanout" in n) {
2268
2491
  // v3: a fanout node emits a per-id element ports struct + a batch struct (like a batched map).
@@ -2404,7 +2627,8 @@ ${native.map((c) => `\t${handlerIfaceName(c.name)}`).join("\n")}
2404
2627
  for (const c of native) {
2405
2628
  const typedNodes = new Map();
2406
2629
  for (const n of c.body)
2407
- typedNodes.set(n.id, deriveTypeRef(n.outType, plan));
2630
+ if (!isControlGate(n))
2631
+ typedNodes.set(n.id, "map" in n ? mapNodeArrRef(n, plan) : deriveTypeRef(n.outType, plan)); // #125: control-gate typeless; map は produced-array ref に正規化
2408
2632
  for (const n of c.body) {
2409
2633
  if ("cond" in n)
2410
2634
  continue; // #108: cond has no handler method (pure Expression) — no scripted impl.