behavior-contracts 0.11.17 → 0.11.19

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 (46) hide show
  1. package/cli-contract.yaml +9 -4
  2. package/dist/behavior.d.ts +16 -7
  3. package/dist/behavior.d.ts.map +1 -1
  4. package/dist/behavior.js +19 -8
  5. package/dist/behavior.js.map +1 -1
  6. package/dist/cli.js +4 -2
  7. package/dist/cli.js.map +1 -1
  8. package/dist/expr-eval.d.ts +8 -1
  9. package/dist/expr-eval.d.ts.map +1 -1
  10. package/dist/expr-eval.js +11 -2
  11. package/dist/expr-eval.js.map +1 -1
  12. package/dist/generated/contract.d.ts.map +1 -1
  13. package/dist/generated/contract.js +2 -2
  14. package/dist/generated/contract.js.map +1 -1
  15. package/dist/generator/core.d.ts +4 -2
  16. package/dist/generator/core.d.ts.map +1 -1
  17. package/dist/generator/core.js.map +1 -1
  18. package/dist/generator/emit-shared-go-typed.d.ts +8 -12
  19. package/dist/generator/emit-shared-go-typed.d.ts.map +1 -1
  20. package/dist/generator/emit-shared-go-typed.js +40 -25
  21. package/dist/generator/emit-shared-go-typed.js.map +1 -1
  22. package/dist/generator/emit-shared-rust-typed.d.ts +12 -16
  23. package/dist/generator/emit-shared-rust-typed.d.ts.map +1 -1
  24. package/dist/generator/emit-shared-rust-typed.js +45 -30
  25. package/dist/generator/emit-shared-rust-typed.js.map +1 -1
  26. package/dist/generator/emit-shared-typescript-typed.d.ts.map +1 -1
  27. package/dist/generator/emit-shared-typescript-typed.js +10 -2
  28. package/dist/generator/emit-shared-typescript-typed.js.map +1 -1
  29. package/dist/generator/emit-straightline-typed-typescript.d.ts.map +1 -1
  30. package/dist/generator/emit-straightline-typed-typescript.js +15 -23
  31. package/dist/generator/emit-straightline-typed-typescript.js.map +1 -1
  32. package/dist/generator/emit-typed-native-go.d.ts.map +1 -1
  33. package/dist/generator/emit-typed-native-go.js +185 -141
  34. package/dist/generator/emit-typed-native-go.js.map +1 -1
  35. package/dist/generator/emit-typed-native-rust.d.ts.map +1 -1
  36. package/dist/generator/emit-typed-native-rust.js +556 -283
  37. package/dist/generator/emit-typed-native-rust.js.map +1 -1
  38. package/dist/generator/native-expr.d.ts +73 -7
  39. package/dist/generator/native-expr.d.ts.map +1 -1
  40. package/dist/generator/native-expr.js +121 -39
  41. package/dist/generator/native-expr.js.map +1 -1
  42. package/dist/generator/typed.d.ts +165 -0
  43. package/dist/generator/typed.d.ts.map +1 -1
  44. package/dist/generator/typed.js +156 -1
  45. package/dist/generator/typed.js.map +1 -1
  46. package/package.json +1 -1
@@ -80,12 +80,177 @@ export interface TypePlan {
80
80
  * inline で型付き)で、その場合も untyped fallback は存在しない。language-neutral・決定的。
81
81
  */
82
82
  export declare function buildTypePlan(ir: ComponentGraphIR): TypePlan;
83
+ /**
84
+ * outputReachableDeclNames — the set of {@link TypeDecl} names REACHABLE from an OUTPUT annotation point
85
+ * (a body node's `outType` or a component's `outputType`), transitively through named / arr / opt / map
86
+ * fields. This is the language-neutral definition of "a struct that appears in an OUTPUT type": exactly the
87
+ * OUTPUT roots {@link buildTypePlan} walks, MINUS the input-port schemas (`portSchemas` / `inputPorts`
88
+ * `elemType`), which contribute INPUT-ONLY structs.
89
+ *
90
+ * It is the set the compile emitters (go/rust) de-box implicitly — their inline de-box is driven from these
91
+ * same output roots (`buildDeBoxPlan` over each node `outType` / component `outputType` in
92
+ * emit-typed-native-{go,rust}.ts), so it NEVER visits an input-only struct. A `value`-carrying INPUT-ONLY
93
+ * struct (e.g. a dynamic-WHERE fragment plan whose `params` field is `value[]`) has no output
94
+ * materialization at all (bc#156: `value` is input-only). Exposing the reachable set here lets the TS
95
+ * marshaller emitter make the SAME decision instead of emitting an output de-box for every decl in
96
+ * `plan.decls` (which mixes input and output structs), where an input-only `value` field fails closed.
97
+ */
98
+ export declare function outputReachableDeclNames(ir: ComponentGraphIR, plan: TypePlan): Set<string>;
83
99
  /**
84
100
  * deriveTypeRef — 単一の注記点の型記法を(buildTypePlan と同じ dedup 規律で)TypeRef へ落とす。
85
101
  * ただし named 宣言の同定はプランの走査で既に確定しているため、ここでは同じ structuralKey で
86
102
  * プラン内 decl を引く(プランに無い obj 型は渡されない前提 — buildTypePlan が全注記点を網羅する)。
87
103
  */
88
104
  export declare function deriveTypeRef(t: PortableType, plan: TypePlan): TypeRef;
105
+ /**
106
+ * OutputSlotLowering — how a value of type V is lowered into a typed OUTPUT slot (a component's output,
107
+ * an output struct/interface field, an output array element) whose DECLARED type is D, and the type the
108
+ * value HAS ONCE PLACED there.
109
+ *
110
+ * - `identity` — V is placed as it stands; `placed` is V.
111
+ * - `optSome` — D is `{opt:W}` and V is not an opt, so V is placed in the opt's PRESENT form; `placed`
112
+ * is `{opt:V}`. This is the write side of a declared-nullable slot (`unproducibleNodeIds` makes the
113
+ * field nullable because the node can be UNPRODUCED; the value here is the PRODUCED one). It is NOT a
114
+ * default and NOT a coalesce — absence is written by the emitter's own unproduced arm, never here.
115
+ */
116
+ export type OutputSlotLowering = {
117
+ kind: "identity" | "optSome";
118
+ placed: TypeRef;
119
+ };
120
+ /**
121
+ * lowerIntoOutputSlot — the ONE rule for "what may be placed into a typed output slot, and as what type".
122
+ * Language-neutral: it decides the SHAPE of the lowering; each emitter spells it in its own syntax
123
+ * (rust `Some(x)`; go a fresh-pointer IIFE, since `&<expr>` on a temporary is not addressable; TS the
124
+ * EMPTY spelling — `T` is assignable to `T | null`, so a union slot admits its member with nothing to
125
+ * construct). The two halves must agree, so every site that performs the lowering reads `kind` for the
126
+ * spelling AND passes `placed` to {@link makeOutputFieldTypeCheck}'s check.
127
+ *
128
+ * A site that CANNOT perform the lowering (it emits the value bare into a struct literal) must pass the
129
+ * value's own type instead, so the check fails closed rather than blessing code the toolchain rejects.
130
+ */
131
+ export declare function lowerIntoOutputSlot(declared: TypeRef | undefined, value: TypeRef): OutputSlotLowering;
132
+ /**
133
+ * OutputFieldTypeCheck — the fail-closed gate one emitter binds ONCE ({@link makeOutputFieldTypeCheck}) and
134
+ * every output slot in that emitter runs. `fieldType` is the slot's DECLARED type, `valueType` the type of
135
+ * the value ACTUALLY PLACED there (a {@link lowerIntoOutputSlot} `placed`).
136
+ */
137
+ export type OutputFieldTypeCheck = (compName: string, fieldPath: string, fieldType: TypeRef | undefined, valueType: TypeRef | undefined) => void;
138
+ /**
139
+ * makeOutputFieldTypeCheck — build the fail-closed OUTPUT_TYPE_INCONSISTENT gate for one language. It
140
+ * compares the slot's DECLARED type against the type of the value ACTUALLY PLACED in it (the caller's
141
+ * {@link lowerIntoOutputSlot} `placed`), both rendered by that emitter's OWN `renderTypeRef` — so the
142
+ * comparison is the target language's type identity, including the struct NAME two structurally identical
143
+ * rows differ by.
144
+ *
145
+ * For go/rust that identity IS the compiler's rule (nominal, invariant), so a mismatch is exactly the
146
+ * error the toolchain would report. For TS, whose rule is ASSIGNABILITY, rendered equality is STRICTER
147
+ * than `tsc`: the admitted set is {identity} ∪ {the lowerings `lowerIntoOutputSlot` covers}, and anything
148
+ * outside it fails closed even where `tsc` would accept it. So the gate guarantees "never emit a module
149
+ * the toolchain rejects", NOT "fires only when the toolchain would reject" — on TS it is deliberately the
150
+ * narrower of the two, and a rejection is a LOUD generation failure rather than a silently-wrong module.
151
+ */
152
+ export declare function makeOutputFieldTypeCheck(lang: string, compilerReject: string, render: (ref: TypeRef) => string): OutputFieldTypeCheck;
153
+ /**
154
+ * SlotRefLowering — an emitter-supplied lowering for a NODE-RESULT REFERENCE (`ref`/`refOpt`) reached at a
155
+ * typed output slot. The ONE output recursion consults it at every slot it descends into (the component
156
+ * output, an output struct field, an output array element, an operator operand) BEFORE its own `ref`
157
+ * handling, and keeps handling everything it returns `undefined` for (a literal, an input-param read, an
158
+ * obj/arr assembly, an operator).
159
+ *
160
+ * This is the seam that keeps the recursion SINGLE. The produced-aware output lowering (#86 pt1 /
161
+ * {@link lowerProducedAwareRead}) used to be a SECOND recursion that copied the obj branch per language and
162
+ * therefore never reached an array element — the position it could not reach was fail-closed rather than
163
+ * covered (#293/#295).
164
+ */
165
+ export type SlotRefLowering = (node: unknown, declared: TypeRef | undefined, fieldPath: string) => {
166
+ expr: string;
167
+ ref: TypeRef | undefined;
168
+ } | undefined;
169
+ /**
170
+ * ProducedAwareSpelling — the per-language SPELLINGS {@link lowerProducedAwareRead} needs. Everything else
171
+ * about that lowering is language-neutral and lives in the rule: which arm is taken, what the unproduced arm
172
+ * holds, which type both arms must agree on, and when the slot cannot represent the unproduced read at all.
173
+ */
174
+ export interface ProducedAwareSpelling {
175
+ /** the boolean expression reading node `head`'s produced flag (go `produced_x`; rust `produced_x.get()`). */
176
+ producedFlag(head: string): string;
177
+ /** the PRESENT form of a value lowered `optSome` into `placed` — the `optSome` half of
178
+ * {@link lowerIntoOutputSlot} (go a fresh pointer, since `&<temp>` on a temporary is not addressable;
179
+ * rust `Some(..)`). */
180
+ optSome(valueExpr: string, placed: TypeRef): string;
181
+ /** the ZERO value of a type in this language (go `nil` / `T{}` / `""`; rust `None` / `T::default()`). */
182
+ zero(ref: TypeRef): string;
183
+ /** a conditional EXPRESSION whose two arms both have type `placed` (go an IIFE — Go has no expression
184
+ * `if`; rust `if c { a } else { b }`). */
185
+ conditional(cond: string, present: string, absent: string, placed: TypeRef): string;
186
+ }
187
+ /**
188
+ * unproducedInSlot — the ONE spelling of "the UNPRODUCED value of a node, as the slot type `placed` holds
189
+ * it". `run_behavior`'s writeUnproduced writes `unproducedValue(relationKind)` into a skipped node, so what
190
+ * a reader sees is decided by `relationKind` (its ABSENCE means null — builder.ts owns that rule):
191
+ * - relationKind ABSENT → null at every depth (`refOpt` propagates it) ⇒ the slot's zero, which is null
192
+ * in both languages BECAUSE the slot is an opt (the caller enforces that — see
193
+ * {@link lowerProducedAwareRead}).
194
+ * - `relationKind:"connection"` read WHOLE → the EMPTY connection, whose rep is the connection struct
195
+ * ZERO (its serializer normalizes an empty/nil items to `[]` and a nil cursor to `null`, so the zero
196
+ * serializes to `unproducedValue("connection")` byte-for-byte). An OPT slot still holds that empty
197
+ * connection, never null — so the zero is lowered through the SOME spelling.
198
+ * - `relationKind:"connection"` read INTO a key the empty connection HAS (`.items` → `[]`, `.cursor` →
199
+ * `null`) → the slot's own zero, which IS that value in both languages (an empty slice/Vec serializes
200
+ * to `[]`, an opt zero to `null`). WHICH keys those are is not decided here: the caller's floor asks
201
+ * {@link holdsUnproduced}, so a read of any other declared field never reaches this function (#305).
202
+ *
203
+ * Read by BOTH positions that place an unproduced value into a typed slot: the produced-aware output read
204
+ * and the `map.into` attach point of a guard-skipped element (#177/#182, where the read is always WHOLE).
205
+ */
206
+ export declare function unproducedInSlot(placed: TypeRef, relationKind: "connection" | undefined, whole: boolean, spell: ProducedAwareSpelling): string;
207
+ /**
208
+ * lowerProducedAwareRead — the ONE rule for reading a node that can be UNPRODUCED (#86 pt1) at a typed
209
+ * output slot: `<produced flag> ? <the produced value lowered into the slot> : <the unproduced rep>`.
210
+ *
211
+ * The PRESENT arm is an ordinary output-slot lowering, so it goes through the same
212
+ * {@link lowerIntoOutputSlot} + {@link OutputFieldTypeCheck} pair as any other slot — `placed` is both the
213
+ * type the check is given AND the type the two arms (and the conditional itself) must have.
214
+ *
215
+ * The ABSENT arm is {@link unproducedInSlot}, which can only be spelled when the slot can REPRESENT the
216
+ * unproduced read AT THE READ PATH. That is not a rule this file owns: it is `behavior.ts`'s
217
+ * {@link holdsUnproduced}, which walks the SSoT unproduced value ({@link unproducedValue}) by the path and
218
+ * asks whether the type holds what it lands on — so the set of paths an unproduced node HAS (`{items,
219
+ * cursor}` for a connection, nothing at all for a null) is decided there and spelled nowhere else. The
220
+ * floor FAILS CLOSED wherever that walk says no:
221
+ * - the walk lands on null (a node with no `relationKind`, read WHOLE or crossed by a `refOpt`) and the
222
+ * slot is not optional — the zero is a real value (go `""`, rust `String::default()`), so emitting it
223
+ * would return a value where `run_behavior` raises NULL_REF;
224
+ * - the walk cannot continue (a key the unproduced value does not have — every declared field of a
225
+ * connection beyond `items`/`cursor`, #305) — `run_behavior` raises MISSING_PROP there on EVERY
226
+ * surface while the zero would be returned silently;
227
+ * - a hard `ref` crosses a null intermediate — NULL_REF on the interpreter, and only `refOpt` can spell
228
+ * the null (`refCore`), which is why `optional` is part of the question.
229
+ * Either way the divergence is the one #233 forbids. `type-gate.ts`'s resolveOutputType descends an obj
230
+ * field, an array element and the output itself; it does NOT descend into an operator's operands, so this
231
+ * floor is the only thing standing at an operand.
232
+ */
233
+ export declare function lowerProducedAwareRead(args: {
234
+ /** the FULL ref path (`[head, …rest]`) — its head names the node, its tail is the read path. */
235
+ path: readonly string[];
236
+ relationKind: "connection" | undefined;
237
+ /** whether the reference is a `refOpt` (a null intermediate propagates instead of raising NULL_REF). */
238
+ optional: boolean;
239
+ /** the emitted read of the PRODUCED value (a typed field access) and its type. */
240
+ valueExpr: string;
241
+ value: TypeRef;
242
+ /** the slot's declared type. */
243
+ declared: TypeRef | undefined;
244
+ compName: string;
245
+ fieldPath: string;
246
+ check: OutputFieldTypeCheck;
247
+ spell: ProducedAwareSpelling;
248
+ /** the type plan — the slot type is asked in PortableType terms, which is what holdsUnproduced reads. */
249
+ plan: TypePlan;
250
+ }): {
251
+ expr: string;
252
+ ref: TypeRef;
253
+ };
89
254
  /**
90
255
  * inputPortIsOptional — その input port が **省略可(値が「無い」= null を取り得る)**か。
91
256
  *
@@ -1 +1 @@
1
- {"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../src/generator/typed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAa,gBAAgB,EAAE,YAAY,EAAc,MAAM,gBAAgB,CAAC;AAM5F;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,GACxE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAC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G;IACH,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxE;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,CAAC;IACxH;;;OAGG;IACH,cAAc,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1E;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE3E"}
@@ -1,4 +1,5 @@
1
- import { portableTypeOfInputPort } from "../behavior.js";
1
+ import { holdsUnproduced, portableTypeOfInputPort } from "../behavior.js";
2
+ import { unproducedValue } from "../plan.js";
2
3
  import { gfail } from "./core.js";
3
4
  /** obj 型の構造キー(dedup 用・決定的)。field 名(宣言順)+各 field 型の構造キーを連結する。 */
4
5
  function structuralKey(t) {
@@ -111,6 +112,56 @@ export function buildTypePlan(ir) {
111
112
  }
112
113
  return b.plan();
113
114
  }
115
+ /**
116
+ * outputReachableDeclNames — the set of {@link TypeDecl} names REACHABLE from an OUTPUT annotation point
117
+ * (a body node's `outType` or a component's `outputType`), transitively through named / arr / opt / map
118
+ * fields. This is the language-neutral definition of "a struct that appears in an OUTPUT type": exactly the
119
+ * OUTPUT roots {@link buildTypePlan} walks, MINUS the input-port schemas (`portSchemas` / `inputPorts`
120
+ * `elemType`), which contribute INPUT-ONLY structs.
121
+ *
122
+ * It is the set the compile emitters (go/rust) de-box implicitly — their inline de-box is driven from these
123
+ * same output roots (`buildDeBoxPlan` over each node `outType` / component `outputType` in
124
+ * emit-typed-native-{go,rust}.ts), so it NEVER visits an input-only struct. A `value`-carrying INPUT-ONLY
125
+ * struct (e.g. a dynamic-WHERE fragment plan whose `params` field is `value[]`) has no output
126
+ * materialization at all (bc#156: `value` is input-only). Exposing the reachable set here lets the TS
127
+ * marshaller emitter make the SAME decision instead of emitting an output de-box for every decl in
128
+ * `plan.decls` (which mixes input and output structs), where an input-only `value` field fails closed.
129
+ */
130
+ export function outputReachableDeclNames(ir, plan) {
131
+ const names = new Set();
132
+ const visit = (ref) => {
133
+ switch (ref.kind) {
134
+ case "opt":
135
+ return visit(ref.inner);
136
+ case "arr":
137
+ return visit(ref.elem);
138
+ case "map":
139
+ return visit(ref.value);
140
+ case "named": {
141
+ if (names.has(ref.name))
142
+ return; // dedup + cycle guard
143
+ names.add(ref.name);
144
+ const decl = plan.decls.find((d) => d.name === ref.name);
145
+ if (decl !== undefined)
146
+ for (const f of decl.fields)
147
+ visit(f.type);
148
+ return;
149
+ }
150
+ default:
151
+ return; // scalar / value — no named struct reachable
152
+ }
153
+ };
154
+ for (const comp of ir.components) {
155
+ for (const n of comp.body) {
156
+ const ot = n.outType;
157
+ if (ot !== undefined)
158
+ visit(deriveTypeRef(ot, plan));
159
+ }
160
+ if (comp.outputType !== undefined)
161
+ visit(deriveTypeRef(comp.outputType, plan));
162
+ }
163
+ return names;
164
+ }
114
165
  /**
115
166
  * deriveTypeRef — 単一の注記点の型記法を(buildTypePlan と同じ dedup 規律で)TypeRef へ落とす。
116
167
  * ただし named 宣言の同定はプランの走査で既に確定しているため、ここでは同じ structuralKey で
@@ -144,6 +195,110 @@ export function deriveTypeRef(t, plan) {
144
195
  throw new Error(`typed emit: anonymous obj type not found in the type plan (structuralKey=${key}) — buildTypePlan must cover every annotation point`);
145
196
  return { kind: "named", name: decl.name };
146
197
  }
198
+ /**
199
+ * lowerIntoOutputSlot — the ONE rule for "what may be placed into a typed output slot, and as what type".
200
+ * Language-neutral: it decides the SHAPE of the lowering; each emitter spells it in its own syntax
201
+ * (rust `Some(x)`; go a fresh-pointer IIFE, since `&<expr>` on a temporary is not addressable; TS the
202
+ * EMPTY spelling — `T` is assignable to `T | null`, so a union slot admits its member with nothing to
203
+ * construct). The two halves must agree, so every site that performs the lowering reads `kind` for the
204
+ * spelling AND passes `placed` to {@link makeOutputFieldTypeCheck}'s check.
205
+ *
206
+ * A site that CANNOT perform the lowering (it emits the value bare into a struct literal) must pass the
207
+ * value's own type instead, so the check fails closed rather than blessing code the toolchain rejects.
208
+ */
209
+ export function lowerIntoOutputSlot(declared, value) {
210
+ if (declared !== undefined && declared.kind === "opt" && value.kind !== "opt")
211
+ return { kind: "optSome", placed: { kind: "opt", inner: value } };
212
+ return { kind: "identity", placed: value };
213
+ }
214
+ /**
215
+ * makeOutputFieldTypeCheck — build the fail-closed OUTPUT_TYPE_INCONSISTENT gate for one language. It
216
+ * compares the slot's DECLARED type against the type of the value ACTUALLY PLACED in it (the caller's
217
+ * {@link lowerIntoOutputSlot} `placed`), both rendered by that emitter's OWN `renderTypeRef` — so the
218
+ * comparison is the target language's type identity, including the struct NAME two structurally identical
219
+ * rows differ by.
220
+ *
221
+ * For go/rust that identity IS the compiler's rule (nominal, invariant), so a mismatch is exactly the
222
+ * error the toolchain would report. For TS, whose rule is ASSIGNABILITY, rendered equality is STRICTER
223
+ * than `tsc`: the admitted set is {identity} ∪ {the lowerings `lowerIntoOutputSlot` covers}, and anything
224
+ * outside it fails closed even where `tsc` would accept it. So the gate guarantees "never emit a module
225
+ * the toolchain rejects", NOT "fires only when the toolchain would reject" — on TS it is deliberately the
226
+ * narrower of the two, and a rejection is a LOUD generation failure rather than a silently-wrong module.
227
+ */
228
+ export function makeOutputFieldTypeCheck(lang, compilerReject, render) {
229
+ return (compName, fieldPath, fieldType, valueType) => {
230
+ if (fieldType === undefined || valueType === undefined)
231
+ return;
232
+ const ft = render(fieldType);
233
+ const vt = render(valueType);
234
+ if (ft === vt)
235
+ return;
236
+ gfail("OUTPUT_TYPE_INCONSISTENT", `${lang} output assembly: component '${compName}' output field '${fieldPath}' is declared type '${ft}', but the value placed into it has type '${vt}', and no lowering from '${vt}' into '${ft}' is covered at this position. Emitting it would produce a module the toolchain rejects (${compilerReject}), so generation fails closed. Either the declared output type and the node-result type genuinely disagree, or this is a lowering BC does not cover — the emitter does not decide which.`);
237
+ };
238
+ }
239
+ /**
240
+ * unproducedInSlot — the ONE spelling of "the UNPRODUCED value of a node, as the slot type `placed` holds
241
+ * it". `run_behavior`'s writeUnproduced writes `unproducedValue(relationKind)` into a skipped node, so what
242
+ * a reader sees is decided by `relationKind` (its ABSENCE means null — builder.ts owns that rule):
243
+ * - relationKind ABSENT → null at every depth (`refOpt` propagates it) ⇒ the slot's zero, which is null
244
+ * in both languages BECAUSE the slot is an opt (the caller enforces that — see
245
+ * {@link lowerProducedAwareRead}).
246
+ * - `relationKind:"connection"` read WHOLE → the EMPTY connection, whose rep is the connection struct
247
+ * ZERO (its serializer normalizes an empty/nil items to `[]` and a nil cursor to `null`, so the zero
248
+ * serializes to `unproducedValue("connection")` byte-for-byte). An OPT slot still holds that empty
249
+ * connection, never null — so the zero is lowered through the SOME spelling.
250
+ * - `relationKind:"connection"` read INTO a key the empty connection HAS (`.items` → `[]`, `.cursor` →
251
+ * `null`) → the slot's own zero, which IS that value in both languages (an empty slice/Vec serializes
252
+ * to `[]`, an opt zero to `null`). WHICH keys those are is not decided here: the caller's floor asks
253
+ * {@link holdsUnproduced}, so a read of any other declared field never reaches this function (#305).
254
+ *
255
+ * Read by BOTH positions that place an unproduced value into a typed slot: the produced-aware output read
256
+ * and the `map.into` attach point of a guard-skipped element (#177/#182, where the read is always WHOLE).
257
+ */
258
+ export function unproducedInSlot(placed, relationKind, whole, spell) {
259
+ if (relationKind === "connection" && whole && placed.kind === "opt")
260
+ return spell.optSome(spell.zero(placed.inner), placed);
261
+ return spell.zero(placed);
262
+ }
263
+ /**
264
+ * lowerProducedAwareRead — the ONE rule for reading a node that can be UNPRODUCED (#86 pt1) at a typed
265
+ * output slot: `<produced flag> ? <the produced value lowered into the slot> : <the unproduced rep>`.
266
+ *
267
+ * The PRESENT arm is an ordinary output-slot lowering, so it goes through the same
268
+ * {@link lowerIntoOutputSlot} + {@link OutputFieldTypeCheck} pair as any other slot — `placed` is both the
269
+ * type the check is given AND the type the two arms (and the conditional itself) must have.
270
+ *
271
+ * The ABSENT arm is {@link unproducedInSlot}, which can only be spelled when the slot can REPRESENT the
272
+ * unproduced read AT THE READ PATH. That is not a rule this file owns: it is `behavior.ts`'s
273
+ * {@link holdsUnproduced}, which walks the SSoT unproduced value ({@link unproducedValue}) by the path and
274
+ * asks whether the type holds what it lands on — so the set of paths an unproduced node HAS (`{items,
275
+ * cursor}` for a connection, nothing at all for a null) is decided there and spelled nowhere else. The
276
+ * floor FAILS CLOSED wherever that walk says no:
277
+ * - the walk lands on null (a node with no `relationKind`, read WHOLE or crossed by a `refOpt`) and the
278
+ * slot is not optional — the zero is a real value (go `""`, rust `String::default()`), so emitting it
279
+ * would return a value where `run_behavior` raises NULL_REF;
280
+ * - the walk cannot continue (a key the unproduced value does not have — every declared field of a
281
+ * connection beyond `items`/`cursor`, #305) — `run_behavior` raises MISSING_PROP there on EVERY
282
+ * surface while the zero would be returned silently;
283
+ * - a hard `ref` crosses a null intermediate — NULL_REF on the interpreter, and only `refOpt` can spell
284
+ * the null (`refCore`), which is why `optional` is part of the question.
285
+ * Either way the divergence is the one #233 forbids. `type-gate.ts`'s resolveOutputType descends an obj
286
+ * field, an array element and the output itself; it does NOT descend into an operator's operands, so this
287
+ * floor is the only thing standing at an operand.
288
+ */
289
+ export function lowerProducedAwareRead(args) {
290
+ const { path, relationKind, optional, valueExpr, value, declared, compName, fieldPath, check, spell, plan } = args;
291
+ const low = lowerIntoOutputSlot(declared, value);
292
+ check(compName, fieldPath, declared, low.placed);
293
+ const placed = low.placed;
294
+ const rest = path.slice(1);
295
+ if (!holdsUnproduced(typeRefToPortable(placed, plan), relationKind, rest, optional))
296
+ gfail("OUTPUT_TYPE_INCONSISTENT", `output assembly: component '${compName}' reads node '${path[0]}'${rest.length === 0 ? " WHOLE" : ` at .${rest.join(".")}`} in output position '${fieldPath}', but that node can be UNPRODUCED and this position cannot represent the unproduced read. run_behavior writes ${JSON.stringify(unproducedValue(relationKind))} into the skipped node, and reading it here either RAISES on the interpreter (NULL_REF for a \`ref\` through a null intermediate, MISSING_PROP for a key the unproduced value does not have) or yields a value this position cannot hold. Emitting the slot's zero instead would return a value where run_behavior raises (the same IR observing different results per surface), so generation fails closed. Reference a path the unproduced value actually has, declare the position so it can hold that value, or use \`refOpt\` where the read crosses a null.`);
297
+ return {
298
+ expr: spell.conditional(spell.producedFlag(path[0]), low.kind === "optSome" ? spell.optSome(valueExpr, placed) : valueExpr, unproducedInSlot(placed, relationKind, rest.length === 0, spell), placed),
299
+ ref: declared ?? value,
300
+ };
301
+ }
147
302
  // ── input port schema → TypeRef(native emitter 共通 SSoT)────────────────────────────
148
303
  /**
149
304
  * inputPortIsOptional — その input port が **省略可(値が「無い」= null を取り得る)**か。
@@ -1 +1 @@
1
- {"version":3,"file":"typed.js","sourceRoot":"","sources":["../../src/generator/typed.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAyClC,gEAAgE;AAChE,SAAS,aAAa,CAAC,CAAe;IACpC,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IACpC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,OAAO,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACtD,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,OAAO,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACtD,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,OAAO,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,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AI,KAAK,IAAI,CAAC,CAAC;AACjD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "behavior-contracts",
3
- "version": "0.11.17",
3
+ "version": "0.11.19",
4
4
  "description": "Language-agnostic runtime core for behavior contracts (dsl-contracts): validateEnvelope / evaluateExpression / renderTemplate / runPlan / canonical serialization. Single source of truth for the shared DSL runtime primitives.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",