/** * emit-typed-native-go.ts — Go COMBINED read emitter (bc#77, the 1.0 read de-box). * * # The problem the two existing emitters each solved HALF * * - go-straightline-native: native ports struct IN (no NewObj/Set) + INLINE sequential exec * (no RunPlan) — but the RESULT stays a boxed `Value` (ExecNativeHandler -> ExecOutcome.Ok). * - go-typed-raw: raw struct RESULT de-box (marshal_raw_T* reads a RawValue field-by-field * straight into the struct) — but the PORTS stay in the generic *Obj container AND it drives * the plan via RunPlan, whose relation-child skip-gate (coderuntime/plan.go preflightOp) * reads the PARENT's result *Obj; a struct-native (nil Value) parent makes it skip relation * children, so typed relation / connection reads DIVERGE from run_behavior (#323/#74). * * # What THIS emitter combines * * 1. Native ports (from the native emitter): per-node native ports struct built by direct field * assignment; dispatch via the combined handler seam. NO NewObj/Set/generic *Obj on the port * plane for a covered read. * 2. Inline sequential exec (from the native emitter, NOT RunPlan): each node's result is a * TYPED STRUCT local (materialized DIRECTLY from the handler's RawValue via marshal_raw_T*). * A relation child reads the parent's REAL struct result inline; the child-present decision * (bindField / continue-policy skip) is made inline from the real parent value — so * relation / connection converge with run_behavior (the RunPlan skip-gate never runs). * 3. Raw struct result de-box (from raw-abi): the handler returns a RawOutcome (native RawValue); * marshal_raw_T* materializes each node result DIRECTLY into the node's outType struct. NO * boxed Value on the RESULT plane. The final output is assembled as a struct and serialized * to a Value ONLY at the outermost return boundary (the equivalence pin). * * The combined handler seam is NativeRawComponentExec (native ports in, RawValue out) — see * go/coderuntime/rawabi.go. BindNativeRaw is the dispatch surface. * * # Scope (fail-closed conservative) * * Covers the sequential componentRef read hot path WITH typed annotations (outType required): * point reads + relation children (a bindField-driven skip) whose ports reference the parent's * typed result field (#74), including bindField / continue-policy skip children (connection point * child). Every covered read is strictly sequential (no real concurrency), statically-resolvable * ports/output, and carries outType on every node + outputType on the component. A covered read * that lacks outType FAILS CLOSED (UNSUPPORTED_NODE_STRAIGHTLINE) — there is no target struct to * de-box into, and we do NOT silently re-box. * * map/cond nodes are NOT covered here (they stay on the boxed typed / straight-line paths — the * relation READS #323 needs are the componentRef + relation-child shape, which this covers). * A component with a map/cond node is not native-eligible and falls through to the generic body. */ import type { EmitterPlugin } from "./core.js"; /** goSharedTypesPackageName — the SSoT for deriving the shared wire types package's Go identifier from a * `--shared-types-import` path: the last path segment, sanitized to a legal Go identifier. Used by BOTH * resolveGoWire (to selector-qualify the hoisted wire types in the covered module) and the CLI's * `--shared-types-out` codegen wrapper (to name the emitted shared package) — so the covered module's * import selector and the shared package's `package` declaration are derived identically (they must agree). */ export declare function goSharedTypesPackageName(sharedTypesImport: string): string; /** * goSharedWireTypesPackage — the BC-GENERATED shared package (Task A cross-package). Emits the SAME seam the * covered module emits in-package (emitGoProbeKinds + emitProbeWireTypes + emitGoWireTypes) into a standalone * package, so a separate leaf-transport package can take a `WireRow` payload + return `WireValue` (and the * covered module reference them) without an import cycle. #183: the transport ABI is the generic `WireRow` * payload built inline at the call site — there are NO per-node/per-role batch ports structs to emit here. * Self-contained (only `strconv` for the numeric constructors). `pkgName` is the package's Go identifier. */ export declare function goSharedWireTypesPackage(pkgName: string): string; /** * goTypedNativeEmitter — language id `go-typed-native` (bc#77). Emits the generic straight-line * body (for non-covered components / helpers) plus the COMBINED READ layer (native ports struct * IN + raw struct result OUT + inline sequential exec) and the BindNativeRaw surface. Requires * outType/outputType on every covered read (fail-closed otherwise). */ export declare const goTypedNativeEmitter: EmitterPlugin; //# sourceMappingURL=emit-typed-native-go.d.ts.map