behavior-contracts 0.11.23 → 0.12.0

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 (52) hide show
  1. package/cli-contract.yaml +27 -20
  2. package/dist/cli.js +3 -3
  3. package/dist/cli.js.map +1 -1
  4. package/dist/generated/contract.d.ts.map +1 -1
  5. package/dist/generated/contract.js +2 -2
  6. package/dist/generated/contract.js.map +1 -1
  7. package/dist/generated/program.js +4 -4
  8. package/dist/generated/program.js.map +1 -1
  9. package/dist/generator/core.d.ts +13 -10
  10. package/dist/generator/core.d.ts.map +1 -1
  11. package/dist/generator/core.js.map +1 -1
  12. package/dist/generator/emit-native-dynamic.d.ts +203 -0
  13. package/dist/generator/emit-native-dynamic.d.ts.map +1 -0
  14. package/dist/generator/emit-native-dynamic.js +733 -0
  15. package/dist/generator/emit-native-dynamic.js.map +1 -0
  16. package/dist/generator/emit-native-php.d.ts +4 -0
  17. package/dist/generator/emit-native-php.d.ts.map +1 -0
  18. package/dist/generator/emit-native-php.js +668 -0
  19. package/dist/generator/emit-native-php.js.map +1 -0
  20. package/dist/generator/emit-native-python.d.ts +4 -0
  21. package/dist/generator/emit-native-python.d.ts.map +1 -0
  22. package/dist/generator/emit-native-python.js +592 -0
  23. package/dist/generator/emit-native-python.js.map +1 -0
  24. package/dist/generator/emit-php.d.ts +4 -0
  25. package/dist/generator/emit-php.d.ts.map +1 -1
  26. package/dist/generator/emit-php.js +6 -2
  27. package/dist/generator/emit-php.js.map +1 -1
  28. package/dist/generator/emit-python.d.ts +4 -0
  29. package/dist/generator/emit-python.d.ts.map +1 -1
  30. package/dist/generator/emit-python.js +2 -2
  31. package/dist/generator/emit-python.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 +31 -542
  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 +33 -461
  37. package/dist/generator/emit-typed-native-rust.js.map +1 -1
  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 +9 -1
  41. package/dist/generator/index.js.map +1 -1
  42. package/dist/generator/native-coverage.d.ts +162 -0
  43. package/dist/generator/native-coverage.d.ts.map +1 -0
  44. package/dist/generator/native-coverage.js +412 -0
  45. package/dist/generator/native-coverage.js.map +1 -0
  46. package/dist/generator/native-expr.d.ts +1 -1
  47. package/dist/generator/native-expr.d.ts.map +1 -1
  48. package/dist/generator/typed.d.ts +6 -0
  49. package/dist/generator/typed.d.ts.map +1 -1
  50. package/dist/generator/typed.js +17 -0
  51. package/dist/generator/typed.js.map +1 -1
  52. package/package.json +1 -1
package/cli-contract.yaml CHANGED
@@ -13,9 +13,10 @@ info:
13
13
  lowering the body AST (`+`/`?:`/`.map`/`?.` etc.) to the component-graph IR
14
14
  (no module execution), then runs source→ir→emit end to end in-process. What
15
15
  is emitted depends on the target: the codegen targets (typed ts, native
16
- go/rust) terminate the IR at build time and embed none of it (IR-free), while
17
- the literal targets (ts/python/php) bake the IR in and punt to the runtime.
18
- Only the go/rust native targets import no bc runtime at all (runtime-free).
16
+ go/rust/python/php) terminate the IR at build time and embed none of it
17
+ (IR-free), while the literal targets (ts/python/php) bake the IR in and punt to
18
+ the runtime. Only the native targets (go/rust/python/php) import no bc runtime
19
+ at all (runtime-free).
19
20
  The IR exists only inside the CLI; nothing reads it at runtime. `typescript` is a
20
21
  build-time-only optional peer dependency used solely on this `--from <.ts>`
21
22
  path; the runtime entry stays dependency-free. `--in <ir-doc.json>` (a
@@ -45,7 +46,7 @@ artifact_slots:
45
46
  direction: write
46
47
  description: >-
47
48
  Generated module source for the requested target (literal = IR baked in;
48
- codegen = IR-free; go/rust native additionally runtime-free).
49
+ codegen = IR-free; go/rust/python/php native additionally runtime-free).
49
50
 
50
51
  command_sets:
51
52
  bc:
@@ -192,10 +193,11 @@ command_sets:
192
193
  required: false
193
194
  repeatable: true
194
195
  description: >-
195
- (--lang rust-typed-native / go-typed-native only) Map a covered leaf
196
- (catalog component) to the op-agnostic transport symbol the runner
197
- calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not
198
- listed uses the in-package default name (rust leaf_<comp> / go
196
+ (--lang rust-typed-native / go-typed-native / python-native /
197
+ php-native only) Map a covered leaf (catalog component) to the
198
+ op-agnostic transport symbol the runner calls directly, as
199
+ <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the
200
+ in-package default name (rust / python / php leaf_<comp>, go
199
201
  Leaf_<comp>). Ignored by other emitters.
200
202
  value_name: mapping
201
203
  schema:
@@ -206,10 +208,12 @@ command_sets:
206
208
  - name: leaf-transport-import
207
209
  required: false
208
210
  description: >-
209
- (--lang rust-typed-native / go-typed-native only) Module the leaf
210
- transport symbols are imported from (rust `use <module>::{…}`, go
211
- package import + selector); absent → resolve in-scope / same
212
- package. Ignored by other emitters.
211
+ (--lang rust-typed-native / go-typed-native / python-native /
212
+ php-native only) Where the leaf transport symbols live: rust `use
213
+ <module>::{…}`, go package import + selector, python `from <module>
214
+ import …`, php the class whose static methods they are
215
+ (`\<Class>::<symbol>(…)`); absent → resolve in-scope / same package
216
+ (php: global functions). Ignored by other emitters.
213
217
  value_name: module
214
218
  schema:
215
219
  type: string
@@ -356,10 +360,11 @@ command_sets:
356
360
  required: false
357
361
  repeatable: true
358
362
  description: >-
359
- (--lang rust-typed-native / go-typed-native only) Map a covered leaf
360
- (catalog component) to the op-agnostic transport symbol the runner
361
- calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not
362
- listed uses the in-package default name (rust leaf_<comp> / go
363
+ (--lang rust-typed-native / go-typed-native / python-native /
364
+ php-native only) Map a covered leaf (catalog component) to the
365
+ op-agnostic transport symbol the runner calls directly, as
366
+ <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the
367
+ in-package default name (rust / python / php leaf_<comp>, go
363
368
  Leaf_<comp>). Ignored by other emitters.
364
369
  value_name: mapping
365
370
  schema:
@@ -370,10 +375,12 @@ command_sets:
370
375
  - name: leaf-transport-import
371
376
  required: false
372
377
  description: >-
373
- (--lang rust-typed-native / go-typed-native only) Module the leaf
374
- transport symbols are imported from (rust `use <module>::{…}`, go
375
- package import + selector); absent → resolve in-scope / same
376
- package. Ignored by other emitters.
378
+ (--lang rust-typed-native / go-typed-native / python-native /
379
+ php-native only) Where the leaf transport symbols live: rust `use
380
+ <module>::{…}`, go package import + selector, python `from <module>
381
+ import …`, php the class whose static methods they are
382
+ (`\<Class>::<symbol>(…)`); absent → resolve in-scope / same package
383
+ (php: global functions). Ignored by other emitters.
377
384
  value_name: module
378
385
  schema:
379
386
  type: string
package/dist/cli.js CHANGED
@@ -19,9 +19,9 @@
19
19
  // check → regenerate + byte-diff against --out and/or --shared-types-out; exit 1 on drift (drift gate).
20
20
  //
21
21
  // The IR doc is a BUILD-TIME input only; nothing reads it at runtime. What the generated module looks
22
- // like depends on the target: the codegen targets (typed ts, native go/rust) embed no IR (IR-free), the
23
- // literal targets (ts/python/php) bake it in as literals, and only the go/rust native targets import no
24
- // bc runtime at all (runtime-free) — generator.md "Runtime import discipline".
22
+ // like depends on the target: the codegen targets (typed ts, native go/rust/python/php) embed no IR
23
+ // (IR-free), the literal targets (ts/python/php) bake it in as literals, and only the native targets
24
+ // (go/rust/python/php) import no bc runtime at all (runtime-free) — generator.md "Runtime import discipline".
25
25
  import { readFileSync, writeFileSync } from "node:fs";
26
26
  import { createRequire } from "node:module";
27
27
  import { createProgram } from "./generated/program.js";
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,+EAA+E;AAC/E,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,sCAAsC;AACtC,EAAE;AACF,0KAA0K;AAC1K,0KAA0K;AAC1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EAAE,MAAM,cAAc,CAAC,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACnG,CAAC;QACD,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,MAAM,IAAI,GACR,GAAG,WAAW,CAAC,IAAI,CAAC,uBAAuB,IAAI,CAAC,cAAc,EAAE;gBAChE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,0BAA0B,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACrF,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,yBAAyB,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;CACF,CAAC;AAEF,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,EAAE,MAA4mhB,CAAC;AAEzohB,eAAO,MAAM,iBAAiB,EAAE,MAAsglB,CAAC"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,EAAE,MAAkmiB,CAAC;AAE/niB,eAAO,MAAM,iBAAiB,EAAE,MAAi6lB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  // Auto-generated by cli-contracts. Do not edit.
2
2
  // Embedded contract for the extract subcommand.
3
- export const CONTRACT_YAML = "# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json\ncli_contracts: 0.1.0\n\ninfo:\n title: behavior-contracts CLI\n version: 0.1.0\n description: >-\n bc — the build-time codegen CLI over behavior-contracts' public API.\n The consumer authors behaviors in native TS only (`@behavior` / `@leaf`\n static methods with plain TS bodies) and never touches the IR. `bc generate\n --from <behaviors.ts> --behavior <ClassName>` uses the TypeScript compiler to\n read each method's SOURCE — type-extracting parameter/return types and\n lowering the body AST (`+`/`?:`/`.map`/`?.` etc.) to the component-graph IR\n (no module execution), then runs source→ir→emit end to end in-process. What\n is emitted depends on the target: the codegen targets (typed ts, native\n go/rust) terminate the IR at build time and embed none of it (IR-free), while\n the literal targets (ts/python/php) bake the IR in and punt to the runtime.\n Only the go/rust native targets import no bc runtime at all (runtime-free).\n The IR exists only inside the CLI; nothing reads it at runtime. `typescript` is a\n build-time-only optional peer dependency used solely on this `--from <.ts>`\n path; the runtime entry stays dependency-free. `--in <ir-doc.json>` (a\n pre-serialized ComponentGraphIRDoc) remains as an internal/test input\n alongside --from.\n license:\n name: MIT\n contact:\n name: foo-ogawa\n url: https://github.com/foo-ogawa/behavior-contracts\n\nartifact_slots:\n behaviors-module:\n direction: read\n description: >-\n The consumer's TS SOURCE module exporting an `@behavior` class with\n `@behavior` / `@leaf` static methods — the TS-authoring codegen input\n (`--from`). The TS compiler type-extracts each method's parameter/return\n types and lowers its body AST to IR (no module execution). BC runs\n source→ir→native.\n ir-doc:\n direction: read\n description: >-\n Serialized ComponentGraphIRDoc (unbranded JSON IR) — the internal/test\n codegen input (`--in`). The TS-authoring surface uses --from instead.\n generated-module:\n direction: write\n description: >-\n Generated module source for the requested target (literal = IR baked in;\n codegen = IR-free; go/rust native additionally runtime-free).\n\ncommand_sets:\n bc:\n summary: build-time codegen CLI over behavior-contracts' public API.\n executable: bc\n\n global_options:\n - name: version\n aliases: [V]\n description: Print version and exit.\n schema:\n type: boolean\n\n - name: help\n aliases: [h]\n description: Show help and exit.\n schema:\n type: boolean\n\n commands:\n # ── generate ─────────────────────────────────────────\n generate:\n summary: Emit a native module from a TS behavior module (--from) or a serialized IR doc (--in).\n description: >-\n TS-authoring flow (--from): reads the consumer's TS SOURCE module and\n its --behavior export (an `@behavior` class), then runs source→ir→native\n in-process (the AST reader lowers each method to IR → generateModule)\n for the --lang emitter. The IR is CLI-internal and never touches the\n consumer surface. Internal/test flow (--in): reads the\n ComponentGraphIRDoc, adopts it via loadCompiledIR, and runs the same\n generateModule. Exactly one of --from / --in is required (--from also\n requires --behavior). Writes the module source to --out if given, else\n to stdout. Rejects an unregistered --lang.\n usage:\n - bc generate --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\n - bc generate --lang go-typed-native --from behaviors.ts --behavior UserRepo --out gen.go\n - bc generate --lang typescript-typed --in ir-doc.json --runtime-import ./runtime.js\n\n options:\n - name: lang\n required: true\n description: >-\n Target emitter (must be a registered language, e.g.\n rust-typed-native, go-typed-native, typescript-typed).\n value_name: emitter\n schema:\n type: string\n\n - name: from\n required: false\n description: >-\n TS-authoring input: the consumer's `.ts` SOURCE. The TypeScript\n compiler type-extracts each method's parameter/return types and\n lowers its body AST (`+`/`?:`/`.map`/`?.` etc.) to IR — the source\n is read, not executed. BC compiles the --behavior export's methods\n and runs the emitter. The module's `behavior-contracts` import must\n resolve to the same installed package as bc (so `@behavior`/`@leaf`\n markers are identified by declaration file). Requires the optional\n peer dependency `typescript`. Mutually exclusive with --in.\n value_name: behaviors.ts\n schema:\n type: string\n file:\n mode: read\n exists: true\n encoding: utf-8\n\n - name: behavior\n required: false\n description: >-\n (with --from) The name of the exported `@behavior` class to compile\n (one class = its public static methods, each a root Behavior).\n Required whenever --from is given.\n value_name: ClassName\n schema:\n type: string\n\n - name: in\n required: false\n description: >-\n Internal/test input: path to a serialized ComponentGraphIRDoc JSON\n file. The TS-authoring surface uses --from instead. Mutually\n exclusive with --from.\n value_name: ir-doc.json\n schema:\n type: string\n file:\n mode: read\n exists: true\n media_type: application/json\n encoding: utf-8\n\n - name: out\n required: false\n description: Write the generated covered module here instead of stdout.\n value_name: file\n schema:\n type: string\n file:\n mode: write\n\n - name: shared-types-out\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) Write the BC-OWNED\n shared wire types module (WireValue/WireRow/WireList + probe kinds,\n rust also the shared BehaviorError; plus the cross-package/-crate\n batch ports structs) here. This is the module a covered module built\n with --shared-types-import imports. Independent of --out: a build may\n emit the covered module, the shared module, or both. For go the\n emitted package name is derived from --shared-types-import (so\n --shared-types-import is required with go). Rejected for other\n emitters. A standalone --shared-types-out does NOT print the covered\n module to stdout.\n value_name: file\n schema:\n type: string\n file:\n mode: write\n\n - name: runtime-import\n required: false\n description: Override the runtime import specifier baked into the module.\n value_name: spec\n schema:\n type: string\n\n - name: shared-types-import\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) Package (go) / crate\n (rust) path for the BC-GENERATED shared wire types (WireValue/\n WireRow/WireList; rust also the shared BehaviorError). When set, BC\n emits those types into that shared package/crate and the covered\n module imports them (go: package-qualified; rust: use <path>::*), so\n a separate leaf-transport package/crate can return them without an\n import cycle (cross-package / cross-crate layout). Absent →\n in-package. Ignored by other emitters.\n value_name: spec\n schema:\n type: string\n\n - name: leaf-transport\n required: false\n repeatable: true\n description: >-\n (--lang rust-typed-native / go-typed-native only) Map a covered leaf\n (catalog component) to the op-agnostic transport symbol the runner\n calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not\n listed uses the in-package default name (rust leaf_<comp> / go\n Leaf_<comp>). Ignored by other emitters.\n value_name: mapping\n schema:\n type: array\n items:\n type: string\n\n - name: leaf-transport-import\n required: false\n description: >-\n (--lang rust-typed-native / go-typed-native only) Module the leaf\n transport symbols are imported from (rust `use <module>::{…}`, go\n package import + selector); absent → resolve in-scope / same\n package. Ignored by other emitters.\n value_name: module\n schema:\n type: string\n\n exits:\n '0':\n description: Module generated (written to --out, or printed to stdout).\n stdout:\n format: text\n '1':\n description: >-\n Generation failed (--from module unimportable / missing --behavior\n export / compile error; or unreadable/invalid --in; or --lang is\n not a registered emitter).\n stderr:\n format: text\n '2':\n description: >-\n Usage error — --lang omitted, neither --from nor --in given (or\n both), or --from without --behavior.\n stderr:\n format: text\n\n x-agent:\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects:\n - file_write\n sideEffectNote: >-\n Writes to the filesystem only when --out is specified; otherwise\n output goes to stdout.\n\n # ── check ────────────────────────────────────────────\n check:\n summary: Verify a committed module matches a fresh generation (drift gate).\n description: >-\n Regenerates the module for --lang from the SAME input as generate\n (--from a TS behavior module + --behavior, or --in an IR doc) and\n byte-compares it against the committed --out file. Exits non-zero on\n drift. This is the build's codegen drift gate.\n usage:\n - bc check --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\n - bc check --lang rust-typed-native --in ir-doc.json --out gen.rs\n\n options:\n - name: lang\n required: true\n description: Target emitter (must be a registered language).\n value_name: emitter\n schema:\n type: string\n\n - name: from\n required: false\n description: >-\n TS-authoring input (same as generate --from): the consumer's `.ts`\n SOURCE, read by the TS compiler (type-extract + AST-lower, not\n executed; needs the optional peer `typescript`). Regenerated +\n byte-compared against --out. Requires --behavior. Mutually exclusive\n with --in.\n value_name: behaviors.ts\n schema:\n type: string\n file:\n mode: read\n exists: true\n encoding: utf-8\n\n - name: behavior\n required: false\n description: >-\n (with --from) The name of the exported `@behavior` class to\n compile. Required whenever --from is given.\n value_name: ClassName\n schema:\n type: string\n\n - name: in\n required: false\n description: >-\n Internal/test input: path to a serialized ComponentGraphIRDoc JSON\n file. Mutually exclusive with --from.\n value_name: ir-doc.json\n schema:\n type: string\n file:\n mode: read\n exists: true\n media_type: application/json\n encoding: utf-8\n\n - name: out\n required: false\n description: >-\n The committed covered-module file to diff a fresh generation\n against. At least one of --out / --shared-types-out is required.\n value_name: file\n schema:\n type: string\n file:\n mode: read\n exists: true\n\n - name: shared-types-out\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) The committed BC-OWNED\n shared wire types module to diff a fresh generation against (drift\n gate for the file emitted by `generate --shared-types-out`). May be\n checked together with --out in one invocation; at least one of\n --out / --shared-types-out is required. For go, --shared-types-import\n is required (it names the package). Rejected for other emitters.\n value_name: file\n schema:\n type: string\n file:\n mode: read\n exists: true\n\n - name: runtime-import\n required: false\n description: Override the runtime import specifier baked into the module.\n value_name: spec\n schema:\n type: string\n\n - name: shared-types-import\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) Package (go) / crate\n (rust) path for the BC-GENERATED shared wire types (WireValue/\n WireRow/WireList; rust also the shared BehaviorError). When set, BC\n emits those types into that shared package/crate and the covered\n module imports them (go: package-qualified; rust: use <path>::*), so\n a separate leaf-transport package/crate can return them without an\n import cycle (cross-package / cross-crate layout). Absent →\n in-package. Ignored by other emitters.\n value_name: spec\n schema:\n type: string\n\n - name: leaf-transport\n required: false\n repeatable: true\n description: >-\n (--lang rust-typed-native / go-typed-native only) Map a covered leaf\n (catalog component) to the op-agnostic transport symbol the runner\n calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not\n listed uses the in-package default name (rust leaf_<comp> / go\n Leaf_<comp>). Ignored by other emitters.\n value_name: mapping\n schema:\n type: array\n items:\n type: string\n\n - name: leaf-transport-import\n required: false\n description: >-\n (--lang rust-typed-native / go-typed-native only) Module the leaf\n transport symbols are imported from (rust `use <module>::{…}`, go\n package import + selector); absent → resolve in-scope / same\n package. Ignored by other emitters.\n value_name: module\n schema:\n type: string\n\n exits:\n '0':\n description: Up to date — the committed --out matches a fresh generation.\n stdout:\n format: text\n '1':\n description: >-\n Drift detected (--out differs or does not exist), or generation\n failed (--from module unimportable / missing --behavior export /\n compile error; or unreadable/invalid --in; or unregistered --lang).\n stderr:\n format: text\n '2':\n description: >-\n Usage error — --lang omitted, neither --from nor --in given (or\n both), --from without --behavior, or neither --out nor\n --shared-types-out was given.\n stderr:\n format: text\n\n x-agent:\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: []\n";
4
- export const CONTRACT_JSON_STR = "{\n \"cli_contracts\": \"0.1.0\",\n \"info\": {\n \"title\": \"behavior-contracts CLI\",\n \"version\": \"0.1.0\",\n \"description\": \"bc — the build-time codegen CLI over behavior-contracts' public API. The consumer authors behaviors in native TS only (`@behavior` / `@leaf` static methods with plain TS bodies) and never touches the IR. `bc generate --from <behaviors.ts> --behavior <ClassName>` uses the TypeScript compiler to read each method's SOURCE — type-extracting parameter/return types and lowering the body AST (`+`/`?:`/`.map`/`?.` etc.) to the component-graph IR (no module execution), then runs source→ir→emit end to end in-process. What is emitted depends on the target: the codegen targets (typed ts, native go/rust) terminate the IR at build time and embed none of it (IR-free), while the literal targets (ts/python/php) bake the IR in and punt to the runtime. Only the go/rust native targets import no bc runtime at all (runtime-free). The IR exists only inside the CLI; nothing reads it at runtime. `typescript` is a build-time-only optional peer dependency used solely on this `--from <.ts>` path; the runtime entry stays dependency-free. `--in <ir-doc.json>` (a pre-serialized ComponentGraphIRDoc) remains as an internal/test input alongside --from.\",\n \"license\": {\n \"name\": \"MIT\"\n },\n \"contact\": {\n \"name\": \"foo-ogawa\",\n \"url\": \"https://github.com/foo-ogawa/behavior-contracts\"\n }\n },\n \"artifact_slots\": {\n \"behaviors-module\": {\n \"direction\": \"read\",\n \"description\": \"The consumer's TS SOURCE module exporting an `@behavior` class with `@behavior` / `@leaf` static methods — the TS-authoring codegen input (`--from`). The TS compiler type-extracts each method's parameter/return types and lowers its body AST to IR (no module execution). BC runs source→ir→native.\"\n },\n \"ir-doc\": {\n \"direction\": \"read\",\n \"description\": \"Serialized ComponentGraphIRDoc (unbranded JSON IR) — the internal/test codegen input (`--in`). The TS-authoring surface uses --from instead.\"\n },\n \"generated-module\": {\n \"direction\": \"write\",\n \"description\": \"Generated module source for the requested target (literal = IR baked in; codegen = IR-free; go/rust native additionally runtime-free).\"\n }\n },\n \"command_sets\": {\n \"bc\": {\n \"summary\": \"build-time codegen CLI over behavior-contracts' public API.\",\n \"executable\": \"bc\",\n \"global_options\": [\n {\n \"name\": \"version\",\n \"aliases\": [\n \"V\"\n ],\n \"description\": \"Print version and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"help\",\n \"aliases\": [\n \"h\"\n ],\n \"description\": \"Show help and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"commands\": {\n \"generate\": {\n \"summary\": \"Emit a native module from a TS behavior module (--from) or a serialized IR doc (--in).\",\n \"description\": \"TS-authoring flow (--from): reads the consumer's TS SOURCE module and its --behavior export (an `@behavior` class), then runs source→ir→native in-process (the AST reader lowers each method to IR → generateModule) for the --lang emitter. The IR is CLI-internal and never touches the consumer surface. Internal/test flow (--in): reads the ComponentGraphIRDoc, adopts it via loadCompiledIR, and runs the same generateModule. Exactly one of --from / --in is required (--from also requires --behavior). Writes the module source to --out if given, else to stdout. Rejects an unregistered --lang.\",\n \"usage\": [\n \"bc generate --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\",\n \"bc generate --lang go-typed-native --from behaviors.ts --behavior UserRepo --out gen.go\",\n \"bc generate --lang typescript-typed --in ir-doc.json --runtime-import ./runtime.js\"\n ],\n \"options\": [\n {\n \"name\": \"lang\",\n \"required\": true,\n \"description\": \"Target emitter (must be a registered language, e.g. rust-typed-native, go-typed-native, typescript-typed).\",\n \"value_name\": \"emitter\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"from\",\n \"required\": false,\n \"description\": \"TS-authoring input: the consumer's `.ts` SOURCE. The TypeScript compiler type-extracts each method's parameter/return types and lowers its body AST (`+`/`?:`/`.map`/`?.` etc.) to IR — the source is read, not executed. BC compiles the --behavior export's methods and runs the emitter. The module's `behavior-contracts` import must resolve to the same installed package as bc (so `@behavior`/`@leaf` markers are identified by declaration file). Requires the optional peer dependency `typescript`. Mutually exclusive with --in.\",\n \"value_name\": \"behaviors.ts\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"behavior\",\n \"required\": false,\n \"description\": \"(with --from) The name of the exported `@behavior` class to compile (one class = its public static methods, each a root Behavior). Required whenever --from is given.\",\n \"value_name\": \"ClassName\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"in\",\n \"required\": false,\n \"description\": \"Internal/test input: path to a serialized ComponentGraphIRDoc JSON file. The TS-authoring surface uses --from instead. Mutually exclusive with --from.\",\n \"value_name\": \"ir-doc.json\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/json\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"out\",\n \"required\": false,\n \"description\": \"Write the generated covered module here instead of stdout.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"write\"\n }\n },\n {\n \"name\": \"shared-types-out\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) Write the BC-OWNED shared wire types module (WireValue/WireRow/WireList + probe kinds, rust also the shared BehaviorError; plus the cross-package/-crate batch ports structs) here. This is the module a covered module built with --shared-types-import imports. Independent of --out: a build may emit the covered module, the shared module, or both. For go the emitted package name is derived from --shared-types-import (so --shared-types-import is required with go). Rejected for other emitters. A standalone --shared-types-out does NOT print the covered module to stdout.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"write\"\n }\n },\n {\n \"name\": \"runtime-import\",\n \"required\": false,\n \"description\": \"Override the runtime import specifier baked into the module.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"shared-types-import\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) Package (go) / crate (rust) path for the BC-GENERATED shared wire types (WireValue/ WireRow/WireList; rust also the shared BehaviorError). When set, BC emits those types into that shared package/crate and the covered module imports them (go: package-qualified; rust: use <path>::*), so a separate leaf-transport package/crate can return them without an import cycle (cross-package / cross-crate layout). Absent → in-package. Ignored by other emitters.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"leaf-transport\",\n \"required\": false,\n \"repeatable\": true,\n \"description\": \"(--lang rust-typed-native / go-typed-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust leaf_<comp> / go Leaf_<comp>). Ignored by other emitters.\",\n \"value_name\": \"mapping\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"name\": \"leaf-transport-import\",\n \"required\": false,\n \"description\": \"(--lang rust-typed-native / go-typed-native only) Module the leaf transport symbols are imported from (rust `use <module>::{…}`, go package import + selector); absent → resolve in-scope / same package. Ignored by other emitters.\",\n \"value_name\": \"module\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Module generated (written to --out, or printed to stdout).\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Generation failed (--from module unimportable / missing --behavior export / compile error; or unreadable/invalid --in; or --lang is not a registered emitter).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n },\n \"2\": {\n \"description\": \"Usage error — --lang omitted, neither --from nor --in given (or both), or --from without --behavior.\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": [\n \"file_write\"\n ],\n \"sideEffectNote\": \"Writes to the filesystem only when --out is specified; otherwise output goes to stdout.\"\n }\n },\n \"check\": {\n \"summary\": \"Verify a committed module matches a fresh generation (drift gate).\",\n \"description\": \"Regenerates the module for --lang from the SAME input as generate (--from a TS behavior module + --behavior, or --in an IR doc) and byte-compares it against the committed --out file. Exits non-zero on drift. This is the build's codegen drift gate.\",\n \"usage\": [\n \"bc check --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\",\n \"bc check --lang rust-typed-native --in ir-doc.json --out gen.rs\"\n ],\n \"options\": [\n {\n \"name\": \"lang\",\n \"required\": true,\n \"description\": \"Target emitter (must be a registered language).\",\n \"value_name\": \"emitter\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"from\",\n \"required\": false,\n \"description\": \"TS-authoring input (same as generate --from): the consumer's `.ts` SOURCE, read by the TS compiler (type-extract + AST-lower, not executed; needs the optional peer `typescript`). Regenerated + byte-compared against --out. Requires --behavior. Mutually exclusive with --in.\",\n \"value_name\": \"behaviors.ts\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"behavior\",\n \"required\": false,\n \"description\": \"(with --from) The name of the exported `@behavior` class to compile. Required whenever --from is given.\",\n \"value_name\": \"ClassName\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"in\",\n \"required\": false,\n \"description\": \"Internal/test input: path to a serialized ComponentGraphIRDoc JSON file. Mutually exclusive with --from.\",\n \"value_name\": \"ir-doc.json\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/json\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"out\",\n \"required\": false,\n \"description\": \"The committed covered-module file to diff a fresh generation against. At least one of --out / --shared-types-out is required.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true\n }\n },\n {\n \"name\": \"shared-types-out\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) The committed BC-OWNED shared wire types module to diff a fresh generation against (drift gate for the file emitted by `generate --shared-types-out`). May be checked together with --out in one invocation; at least one of --out / --shared-types-out is required. For go, --shared-types-import is required (it names the package). Rejected for other emitters.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true\n }\n },\n {\n \"name\": \"runtime-import\",\n \"required\": false,\n \"description\": \"Override the runtime import specifier baked into the module.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"shared-types-import\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) Package (go) / crate (rust) path for the BC-GENERATED shared wire types (WireValue/ WireRow/WireList; rust also the shared BehaviorError). When set, BC emits those types into that shared package/crate and the covered module imports them (go: package-qualified; rust: use <path>::*), so a separate leaf-transport package/crate can return them without an import cycle (cross-package / cross-crate layout). Absent → in-package. Ignored by other emitters.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"leaf-transport\",\n \"required\": false,\n \"repeatable\": true,\n \"description\": \"(--lang rust-typed-native / go-typed-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust leaf_<comp> / go Leaf_<comp>). Ignored by other emitters.\",\n \"value_name\": \"mapping\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"name\": \"leaf-transport-import\",\n \"required\": false,\n \"description\": \"(--lang rust-typed-native / go-typed-native only) Module the leaf transport symbols are imported from (rust `use <module>::{…}`, go package import + selector); absent → resolve in-scope / same package. Ignored by other emitters.\",\n \"value_name\": \"module\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Up to date — the committed --out matches a fresh generation.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Drift detected (--out differs or does not exist), or generation failed (--from module unimportable / missing --behavior export / compile error; or unreadable/invalid --in; or unregistered --lang).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n },\n \"2\": {\n \"description\": \"Usage error — --lang omitted, neither --from nor --in given (or both), --from without --behavior, or neither --out nor --shared-types-out was given.\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": []\n }\n }\n }\n }\n }\n}";
3
+ export const CONTRACT_YAML = "# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json\ncli_contracts: 0.1.0\n\ninfo:\n title: behavior-contracts CLI\n version: 0.1.0\n description: >-\n bc — the build-time codegen CLI over behavior-contracts' public API.\n The consumer authors behaviors in native TS only (`@behavior` / `@leaf`\n static methods with plain TS bodies) and never touches the IR. `bc generate\n --from <behaviors.ts> --behavior <ClassName>` uses the TypeScript compiler to\n read each method's SOURCE — type-extracting parameter/return types and\n lowering the body AST (`+`/`?:`/`.map`/`?.` etc.) to the component-graph IR\n (no module execution), then runs source→ir→emit end to end in-process. What\n is emitted depends on the target: the codegen targets (typed ts, native\n go/rust/python/php) terminate the IR at build time and embed none of it\n (IR-free), while the literal targets (ts/python/php) bake the IR in and punt to\n the runtime. Only the native targets (go/rust/python/php) import no bc runtime\n at all (runtime-free).\n The IR exists only inside the CLI; nothing reads it at runtime. `typescript` is a\n build-time-only optional peer dependency used solely on this `--from <.ts>`\n path; the runtime entry stays dependency-free. `--in <ir-doc.json>` (a\n pre-serialized ComponentGraphIRDoc) remains as an internal/test input\n alongside --from.\n license:\n name: MIT\n contact:\n name: foo-ogawa\n url: https://github.com/foo-ogawa/behavior-contracts\n\nartifact_slots:\n behaviors-module:\n direction: read\n description: >-\n The consumer's TS SOURCE module exporting an `@behavior` class with\n `@behavior` / `@leaf` static methods — the TS-authoring codegen input\n (`--from`). The TS compiler type-extracts each method's parameter/return\n types and lowers its body AST to IR (no module execution). BC runs\n source→ir→native.\n ir-doc:\n direction: read\n description: >-\n Serialized ComponentGraphIRDoc (unbranded JSON IR) — the internal/test\n codegen input (`--in`). The TS-authoring surface uses --from instead.\n generated-module:\n direction: write\n description: >-\n Generated module source for the requested target (literal = IR baked in;\n codegen = IR-free; go/rust/python/php native additionally runtime-free).\n\ncommand_sets:\n bc:\n summary: build-time codegen CLI over behavior-contracts' public API.\n executable: bc\n\n global_options:\n - name: version\n aliases: [V]\n description: Print version and exit.\n schema:\n type: boolean\n\n - name: help\n aliases: [h]\n description: Show help and exit.\n schema:\n type: boolean\n\n commands:\n # ── generate ─────────────────────────────────────────\n generate:\n summary: Emit a native module from a TS behavior module (--from) or a serialized IR doc (--in).\n description: >-\n TS-authoring flow (--from): reads the consumer's TS SOURCE module and\n its --behavior export (an `@behavior` class), then runs source→ir→native\n in-process (the AST reader lowers each method to IR → generateModule)\n for the --lang emitter. The IR is CLI-internal and never touches the\n consumer surface. Internal/test flow (--in): reads the\n ComponentGraphIRDoc, adopts it via loadCompiledIR, and runs the same\n generateModule. Exactly one of --from / --in is required (--from also\n requires --behavior). Writes the module source to --out if given, else\n to stdout. Rejects an unregistered --lang.\n usage:\n - bc generate --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\n - bc generate --lang go-typed-native --from behaviors.ts --behavior UserRepo --out gen.go\n - bc generate --lang typescript-typed --in ir-doc.json --runtime-import ./runtime.js\n\n options:\n - name: lang\n required: true\n description: >-\n Target emitter (must be a registered language, e.g.\n rust-typed-native, go-typed-native, typescript-typed).\n value_name: emitter\n schema:\n type: string\n\n - name: from\n required: false\n description: >-\n TS-authoring input: the consumer's `.ts` SOURCE. The TypeScript\n compiler type-extracts each method's parameter/return types and\n lowers its body AST (`+`/`?:`/`.map`/`?.` etc.) to IR — the source\n is read, not executed. BC compiles the --behavior export's methods\n and runs the emitter. The module's `behavior-contracts` import must\n resolve to the same installed package as bc (so `@behavior`/`@leaf`\n markers are identified by declaration file). Requires the optional\n peer dependency `typescript`. Mutually exclusive with --in.\n value_name: behaviors.ts\n schema:\n type: string\n file:\n mode: read\n exists: true\n encoding: utf-8\n\n - name: behavior\n required: false\n description: >-\n (with --from) The name of the exported `@behavior` class to compile\n (one class = its public static methods, each a root Behavior).\n Required whenever --from is given.\n value_name: ClassName\n schema:\n type: string\n\n - name: in\n required: false\n description: >-\n Internal/test input: path to a serialized ComponentGraphIRDoc JSON\n file. The TS-authoring surface uses --from instead. Mutually\n exclusive with --from.\n value_name: ir-doc.json\n schema:\n type: string\n file:\n mode: read\n exists: true\n media_type: application/json\n encoding: utf-8\n\n - name: out\n required: false\n description: Write the generated covered module here instead of stdout.\n value_name: file\n schema:\n type: string\n file:\n mode: write\n\n - name: shared-types-out\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) Write the BC-OWNED\n shared wire types module (WireValue/WireRow/WireList + probe kinds,\n rust also the shared BehaviorError; plus the cross-package/-crate\n batch ports structs) here. This is the module a covered module built\n with --shared-types-import imports. Independent of --out: a build may\n emit the covered module, the shared module, or both. For go the\n emitted package name is derived from --shared-types-import (so\n --shared-types-import is required with go). Rejected for other\n emitters. A standalone --shared-types-out does NOT print the covered\n module to stdout.\n value_name: file\n schema:\n type: string\n file:\n mode: write\n\n - name: runtime-import\n required: false\n description: Override the runtime import specifier baked into the module.\n value_name: spec\n schema:\n type: string\n\n - name: shared-types-import\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) Package (go) / crate\n (rust) path for the BC-GENERATED shared wire types (WireValue/\n WireRow/WireList; rust also the shared BehaviorError). When set, BC\n emits those types into that shared package/crate and the covered\n module imports them (go: package-qualified; rust: use <path>::*), so\n a separate leaf-transport package/crate can return them without an\n import cycle (cross-package / cross-crate layout). Absent →\n in-package. Ignored by other emitters.\n value_name: spec\n schema:\n type: string\n\n - name: leaf-transport\n required: false\n repeatable: true\n description: >-\n (--lang rust-typed-native / go-typed-native / python-native /\n php-native only) Map a covered leaf (catalog component) to the\n op-agnostic transport symbol the runner calls directly, as\n <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the\n in-package default name (rust / python / php leaf_<comp>, go\n Leaf_<comp>). Ignored by other emitters.\n value_name: mapping\n schema:\n type: array\n items:\n type: string\n\n - name: leaf-transport-import\n required: false\n description: >-\n (--lang rust-typed-native / go-typed-native / python-native /\n php-native only) Where the leaf transport symbols live: rust `use\n <module>::{…}`, go package import + selector, python `from <module>\n import …`, php the class whose static methods they are\n (`\\<Class>::<symbol>(…)`); absent → resolve in-scope / same package\n (php: global functions). Ignored by other emitters.\n value_name: module\n schema:\n type: string\n\n exits:\n '0':\n description: Module generated (written to --out, or printed to stdout).\n stdout:\n format: text\n '1':\n description: >-\n Generation failed (--from module unimportable / missing --behavior\n export / compile error; or unreadable/invalid --in; or --lang is\n not a registered emitter).\n stderr:\n format: text\n '2':\n description: >-\n Usage error — --lang omitted, neither --from nor --in given (or\n both), or --from without --behavior.\n stderr:\n format: text\n\n x-agent:\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects:\n - file_write\n sideEffectNote: >-\n Writes to the filesystem only when --out is specified; otherwise\n output goes to stdout.\n\n # ── check ────────────────────────────────────────────\n check:\n summary: Verify a committed module matches a fresh generation (drift gate).\n description: >-\n Regenerates the module for --lang from the SAME input as generate\n (--from a TS behavior module + --behavior, or --in an IR doc) and\n byte-compares it against the committed --out file. Exits non-zero on\n drift. This is the build's codegen drift gate.\n usage:\n - bc check --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\n - bc check --lang rust-typed-native --in ir-doc.json --out gen.rs\n\n options:\n - name: lang\n required: true\n description: Target emitter (must be a registered language).\n value_name: emitter\n schema:\n type: string\n\n - name: from\n required: false\n description: >-\n TS-authoring input (same as generate --from): the consumer's `.ts`\n SOURCE, read by the TS compiler (type-extract + AST-lower, not\n executed; needs the optional peer `typescript`). Regenerated +\n byte-compared against --out. Requires --behavior. Mutually exclusive\n with --in.\n value_name: behaviors.ts\n schema:\n type: string\n file:\n mode: read\n exists: true\n encoding: utf-8\n\n - name: behavior\n required: false\n description: >-\n (with --from) The name of the exported `@behavior` class to\n compile. Required whenever --from is given.\n value_name: ClassName\n schema:\n type: string\n\n - name: in\n required: false\n description: >-\n Internal/test input: path to a serialized ComponentGraphIRDoc JSON\n file. Mutually exclusive with --from.\n value_name: ir-doc.json\n schema:\n type: string\n file:\n mode: read\n exists: true\n media_type: application/json\n encoding: utf-8\n\n - name: out\n required: false\n description: >-\n The committed covered-module file to diff a fresh generation\n against. At least one of --out / --shared-types-out is required.\n value_name: file\n schema:\n type: string\n file:\n mode: read\n exists: true\n\n - name: shared-types-out\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) The committed BC-OWNED\n shared wire types module to diff a fresh generation against (drift\n gate for the file emitted by `generate --shared-types-out`). May be\n checked together with --out in one invocation; at least one of\n --out / --shared-types-out is required. For go, --shared-types-import\n is required (it names the package). Rejected for other emitters.\n value_name: file\n schema:\n type: string\n file:\n mode: read\n exists: true\n\n - name: runtime-import\n required: false\n description: Override the runtime import specifier baked into the module.\n value_name: spec\n schema:\n type: string\n\n - name: shared-types-import\n required: false\n description: >-\n (--lang go-typed-native / rust-typed-native) Package (go) / crate\n (rust) path for the BC-GENERATED shared wire types (WireValue/\n WireRow/WireList; rust also the shared BehaviorError). When set, BC\n emits those types into that shared package/crate and the covered\n module imports them (go: package-qualified; rust: use <path>::*), so\n a separate leaf-transport package/crate can return them without an\n import cycle (cross-package / cross-crate layout). Absent →\n in-package. Ignored by other emitters.\n value_name: spec\n schema:\n type: string\n\n - name: leaf-transport\n required: false\n repeatable: true\n description: >-\n (--lang rust-typed-native / go-typed-native / python-native /\n php-native only) Map a covered leaf (catalog component) to the\n op-agnostic transport symbol the runner calls directly, as\n <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the\n in-package default name (rust / python / php leaf_<comp>, go\n Leaf_<comp>). Ignored by other emitters.\n value_name: mapping\n schema:\n type: array\n items:\n type: string\n\n - name: leaf-transport-import\n required: false\n description: >-\n (--lang rust-typed-native / go-typed-native / python-native /\n php-native only) Where the leaf transport symbols live: rust `use\n <module>::{…}`, go package import + selector, python `from <module>\n import …`, php the class whose static methods they are\n (`\\<Class>::<symbol>(…)`); absent → resolve in-scope / same package\n (php: global functions). Ignored by other emitters.\n value_name: module\n schema:\n type: string\n\n exits:\n '0':\n description: Up to date — the committed --out matches a fresh generation.\n stdout:\n format: text\n '1':\n description: >-\n Drift detected (--out differs or does not exist), or generation\n failed (--from module unimportable / missing --behavior export /\n compile error; or unreadable/invalid --in; or unregistered --lang).\n stderr:\n format: text\n '2':\n description: >-\n Usage error — --lang omitted, neither --from nor --in given (or\n both), --from without --behavior, or neither --out nor\n --shared-types-out was given.\n stderr:\n format: text\n\n x-agent:\n riskLevel: low\n requiresConfirmation: false\n idempotent: true\n sideEffects: []\n";
4
+ export const CONTRACT_JSON_STR = "{\n \"cli_contracts\": \"0.1.0\",\n \"info\": {\n \"title\": \"behavior-contracts CLI\",\n \"version\": \"0.1.0\",\n \"description\": \"bc — the build-time codegen CLI over behavior-contracts' public API. The consumer authors behaviors in native TS only (`@behavior` / `@leaf` static methods with plain TS bodies) and never touches the IR. `bc generate --from <behaviors.ts> --behavior <ClassName>` uses the TypeScript compiler to read each method's SOURCE — type-extracting parameter/return types and lowering the body AST (`+`/`?:`/`.map`/`?.` etc.) to the component-graph IR (no module execution), then runs source→ir→emit end to end in-process. What is emitted depends on the target: the codegen targets (typed ts, native go/rust/python/php) terminate the IR at build time and embed none of it (IR-free), while the literal targets (ts/python/php) bake the IR in and punt to the runtime. Only the native targets (go/rust/python/php) import no bc runtime at all (runtime-free). The IR exists only inside the CLI; nothing reads it at runtime. `typescript` is a build-time-only optional peer dependency used solely on this `--from <.ts>` path; the runtime entry stays dependency-free. `--in <ir-doc.json>` (a pre-serialized ComponentGraphIRDoc) remains as an internal/test input alongside --from.\",\n \"license\": {\n \"name\": \"MIT\"\n },\n \"contact\": {\n \"name\": \"foo-ogawa\",\n \"url\": \"https://github.com/foo-ogawa/behavior-contracts\"\n }\n },\n \"artifact_slots\": {\n \"behaviors-module\": {\n \"direction\": \"read\",\n \"description\": \"The consumer's TS SOURCE module exporting an `@behavior` class with `@behavior` / `@leaf` static methods — the TS-authoring codegen input (`--from`). The TS compiler type-extracts each method's parameter/return types and lowers its body AST to IR (no module execution). BC runs source→ir→native.\"\n },\n \"ir-doc\": {\n \"direction\": \"read\",\n \"description\": \"Serialized ComponentGraphIRDoc (unbranded JSON IR) — the internal/test codegen input (`--in`). The TS-authoring surface uses --from instead.\"\n },\n \"generated-module\": {\n \"direction\": \"write\",\n \"description\": \"Generated module source for the requested target (literal = IR baked in; codegen = IR-free; go/rust/python/php native additionally runtime-free).\"\n }\n },\n \"command_sets\": {\n \"bc\": {\n \"summary\": \"build-time codegen CLI over behavior-contracts' public API.\",\n \"executable\": \"bc\",\n \"global_options\": [\n {\n \"name\": \"version\",\n \"aliases\": [\n \"V\"\n ],\n \"description\": \"Print version and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"help\",\n \"aliases\": [\n \"h\"\n ],\n \"description\": \"Show help and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"commands\": {\n \"generate\": {\n \"summary\": \"Emit a native module from a TS behavior module (--from) or a serialized IR doc (--in).\",\n \"description\": \"TS-authoring flow (--from): reads the consumer's TS SOURCE module and its --behavior export (an `@behavior` class), then runs source→ir→native in-process (the AST reader lowers each method to IR → generateModule) for the --lang emitter. The IR is CLI-internal and never touches the consumer surface. Internal/test flow (--in): reads the ComponentGraphIRDoc, adopts it via loadCompiledIR, and runs the same generateModule. Exactly one of --from / --in is required (--from also requires --behavior). Writes the module source to --out if given, else to stdout. Rejects an unregistered --lang.\",\n \"usage\": [\n \"bc generate --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\",\n \"bc generate --lang go-typed-native --from behaviors.ts --behavior UserRepo --out gen.go\",\n \"bc generate --lang typescript-typed --in ir-doc.json --runtime-import ./runtime.js\"\n ],\n \"options\": [\n {\n \"name\": \"lang\",\n \"required\": true,\n \"description\": \"Target emitter (must be a registered language, e.g. rust-typed-native, go-typed-native, typescript-typed).\",\n \"value_name\": \"emitter\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"from\",\n \"required\": false,\n \"description\": \"TS-authoring input: the consumer's `.ts` SOURCE. The TypeScript compiler type-extracts each method's parameter/return types and lowers its body AST (`+`/`?:`/`.map`/`?.` etc.) to IR — the source is read, not executed. BC compiles the --behavior export's methods and runs the emitter. The module's `behavior-contracts` import must resolve to the same installed package as bc (so `@behavior`/`@leaf` markers are identified by declaration file). Requires the optional peer dependency `typescript`. Mutually exclusive with --in.\",\n \"value_name\": \"behaviors.ts\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"behavior\",\n \"required\": false,\n \"description\": \"(with --from) The name of the exported `@behavior` class to compile (one class = its public static methods, each a root Behavior). Required whenever --from is given.\",\n \"value_name\": \"ClassName\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"in\",\n \"required\": false,\n \"description\": \"Internal/test input: path to a serialized ComponentGraphIRDoc JSON file. The TS-authoring surface uses --from instead. Mutually exclusive with --from.\",\n \"value_name\": \"ir-doc.json\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/json\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"out\",\n \"required\": false,\n \"description\": \"Write the generated covered module here instead of stdout.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"write\"\n }\n },\n {\n \"name\": \"shared-types-out\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) Write the BC-OWNED shared wire types module (WireValue/WireRow/WireList + probe kinds, rust also the shared BehaviorError; plus the cross-package/-crate batch ports structs) here. This is the module a covered module built with --shared-types-import imports. Independent of --out: a build may emit the covered module, the shared module, or both. For go the emitted package name is derived from --shared-types-import (so --shared-types-import is required with go). Rejected for other emitters. A standalone --shared-types-out does NOT print the covered module to stdout.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"write\"\n }\n },\n {\n \"name\": \"runtime-import\",\n \"required\": false,\n \"description\": \"Override the runtime import specifier baked into the module.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"shared-types-import\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) Package (go) / crate (rust) path for the BC-GENERATED shared wire types (WireValue/ WireRow/WireList; rust also the shared BehaviorError). When set, BC emits those types into that shared package/crate and the covered module imports them (go: package-qualified; rust: use <path>::*), so a separate leaf-transport package/crate can return them without an import cycle (cross-package / cross-crate layout). Absent → in-package. Ignored by other emitters.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"leaf-transport\",\n \"required\": false,\n \"repeatable\": true,\n \"description\": \"(--lang rust-typed-native / go-typed-native / python-native / php-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust / python / php leaf_<comp>, go Leaf_<comp>). Ignored by other emitters.\",\n \"value_name\": \"mapping\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"name\": \"leaf-transport-import\",\n \"required\": false,\n \"description\": \"(--lang rust-typed-native / go-typed-native / python-native / php-native only) Where the leaf transport symbols live: rust `use <module>::{…}`, go package import + selector, python `from <module> import …`, php the class whose static methods they are (`\\\\<Class>::<symbol>(…)`); absent → resolve in-scope / same package (php: global functions). Ignored by other emitters.\",\n \"value_name\": \"module\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Module generated (written to --out, or printed to stdout).\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Generation failed (--from module unimportable / missing --behavior export / compile error; or unreadable/invalid --in; or --lang is not a registered emitter).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n },\n \"2\": {\n \"description\": \"Usage error — --lang omitted, neither --from nor --in given (or both), or --from without --behavior.\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": [\n \"file_write\"\n ],\n \"sideEffectNote\": \"Writes to the filesystem only when --out is specified; otherwise output goes to stdout.\"\n }\n },\n \"check\": {\n \"summary\": \"Verify a committed module matches a fresh generation (drift gate).\",\n \"description\": \"Regenerates the module for --lang from the SAME input as generate (--from a TS behavior module + --behavior, or --in an IR doc) and byte-compares it against the committed --out file. Exits non-zero on drift. This is the build's codegen drift gate.\",\n \"usage\": [\n \"bc check --lang rust-typed-native --from behaviors.ts --behavior UserRepo --out gen.rs\",\n \"bc check --lang rust-typed-native --in ir-doc.json --out gen.rs\"\n ],\n \"options\": [\n {\n \"name\": \"lang\",\n \"required\": true,\n \"description\": \"Target emitter (must be a registered language).\",\n \"value_name\": \"emitter\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"from\",\n \"required\": false,\n \"description\": \"TS-authoring input (same as generate --from): the consumer's `.ts` SOURCE, read by the TS compiler (type-extract + AST-lower, not executed; needs the optional peer `typescript`). Regenerated + byte-compared against --out. Requires --behavior. Mutually exclusive with --in.\",\n \"value_name\": \"behaviors.ts\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"behavior\",\n \"required\": false,\n \"description\": \"(with --from) The name of the exported `@behavior` class to compile. Required whenever --from is given.\",\n \"value_name\": \"ClassName\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"in\",\n \"required\": false,\n \"description\": \"Internal/test input: path to a serialized ComponentGraphIRDoc JSON file. Mutually exclusive with --from.\",\n \"value_name\": \"ir-doc.json\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/json\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"out\",\n \"required\": false,\n \"description\": \"The committed covered-module file to diff a fresh generation against. At least one of --out / --shared-types-out is required.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true\n }\n },\n {\n \"name\": \"shared-types-out\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) The committed BC-OWNED shared wire types module to diff a fresh generation against (drift gate for the file emitted by `generate --shared-types-out`). May be checked together with --out in one invocation; at least one of --out / --shared-types-out is required. For go, --shared-types-import is required (it names the package). Rejected for other emitters.\",\n \"value_name\": \"file\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true\n }\n },\n {\n \"name\": \"runtime-import\",\n \"required\": false,\n \"description\": \"Override the runtime import specifier baked into the module.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"shared-types-import\",\n \"required\": false,\n \"description\": \"(--lang go-typed-native / rust-typed-native) Package (go) / crate (rust) path for the BC-GENERATED shared wire types (WireValue/ WireRow/WireList; rust also the shared BehaviorError). When set, BC emits those types into that shared package/crate and the covered module imports them (go: package-qualified; rust: use <path>::*), so a separate leaf-transport package/crate can return them without an import cycle (cross-package / cross-crate layout). Absent → in-package. Ignored by other emitters.\",\n \"value_name\": \"spec\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"leaf-transport\",\n \"required\": false,\n \"repeatable\": true,\n \"description\": \"(--lang rust-typed-native / go-typed-native / python-native / php-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust / python / php leaf_<comp>, go Leaf_<comp>). Ignored by other emitters.\",\n \"value_name\": \"mapping\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"name\": \"leaf-transport-import\",\n \"required\": false,\n \"description\": \"(--lang rust-typed-native / go-typed-native / python-native / php-native only) Where the leaf transport symbols live: rust `use <module>::{…}`, go package import + selector, python `from <module> import …`, php the class whose static methods they are (`\\\\<Class>::<symbol>(…)`); absent → resolve in-scope / same package (php: global functions). Ignored by other emitters.\",\n \"value_name\": \"module\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Up to date — the committed --out matches a fresh generation.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Drift detected (--out differs or does not exist), or generation failed (--from module unimportable / missing --behavior export / compile error; or unreadable/invalid --in; or unregistered --lang).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n },\n \"2\": {\n \"description\": \"Usage error — --lang omitted, neither --from nor --in given (or both), --from without --behavior, or neither --out nor --shared-types-out was given.\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"riskLevel\": \"low\",\n \"requiresConfirmation\": false,\n \"idempotent\": true,\n \"sideEffects\": []\n }\n }\n }\n }\n }\n}";
5
5
  //# sourceMappingURL=contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,gDAAgD;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAW,mmhBAAmmhB,CAAC;AAEzohB,MAAM,CAAC,MAAM,iBAAiB,GAAW,6/kBAA6/kB,CAAC"}
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,gDAAgD;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAW,yliBAAyliB,CAAC;AAE/niB,MAAM,CAAC,MAAM,iBAAiB,GAAW,w5lBAAw5lB,CAAC"}
@@ -18,8 +18,8 @@ export function createProgram(handlers, version, options = {}) {
18
18
  .option("--shared-types-out <file>", "(--lang go-typed-native / rust-typed-native) Write the BC-OWNED shared wire types module (WireValue/WireRow/WireList + probe kinds, rust also the shared BehaviorError; plus the cross-package/-crate batch ports structs) here. This is the module a covered module built with --shared-types-import imports. Independent of --out: a build may emit the covered module, the shared module, or both. For go the emitted package name is derived from --shared-types-import (so --shared-types-import is required with go). Rejected for other emitters. A standalone --shared-types-out does NOT print the covered module to stdout.")
19
19
  .option("--runtime-import <spec>", "Override the runtime import specifier baked into the module.")
20
20
  .option("--shared-types-import <spec>", "(--lang go-typed-native / rust-typed-native) Package (go) / crate (rust) path for the BC-GENERATED shared wire types (WireValue/ WireRow/WireList; rust also the shared BehaviorError). When set, BC emits those types into that shared package/crate and the covered module imports them (go: package-qualified; rust: use <path>::*), so a separate leaf-transport package/crate can return them without an import cycle (cross-package / cross-crate layout). Absent → in-package. Ignored by other emitters.")
21
- .option("--leaf-transport <mapping...>", "(--lang rust-typed-native / go-typed-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust leaf_<comp> / go Leaf_<comp>). Ignored by other emitters.")
22
- .option("--leaf-transport-import <module>", "(--lang rust-typed-native / go-typed-native only) Module the leaf transport symbols are imported from (rust `use <module>::{…}`, go package import + selector); absent → resolve in-scope / same package. Ignored by other emitters.")
21
+ .option("--leaf-transport <mapping...>", "(--lang rust-typed-native / go-typed-native / python-native / php-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust / python / php leaf_<comp>, go Leaf_<comp>). Ignored by other emitters.")
22
+ .option("--leaf-transport-import <module>", "(--lang rust-typed-native / go-typed-native / python-native / php-native only) Where the leaf transport symbols live: rust `use <module>::{…}`, go package import + selector, python `from <module> import …`, php the class whose static methods they are (`\\<Class>::<symbol>(…)`); absent → resolve in-scope / same package (php: global functions). Ignored by other emitters.")
23
23
  .action(async (opts, cmd) => {
24
24
  await handlers.generate(opts, cmd.optsWithGlobals());
25
25
  });
@@ -34,8 +34,8 @@ export function createProgram(handlers, version, options = {}) {
34
34
  .option("--shared-types-out <file>", "(--lang go-typed-native / rust-typed-native) The committed BC-OWNED shared wire types module to diff a fresh generation against (drift gate for the file emitted by `generate --shared-types-out`). May be checked together with --out in one invocation; at least one of --out / --shared-types-out is required. For go, --shared-types-import is required (it names the package). Rejected for other emitters.")
35
35
  .option("--runtime-import <spec>", "Override the runtime import specifier baked into the module.")
36
36
  .option("--shared-types-import <spec>", "(--lang go-typed-native / rust-typed-native) Package (go) / crate (rust) path for the BC-GENERATED shared wire types (WireValue/ WireRow/WireList; rust also the shared BehaviorError). When set, BC emits those types into that shared package/crate and the covered module imports them (go: package-qualified; rust: use <path>::*), so a separate leaf-transport package/crate can return them without an import cycle (cross-package / cross-crate layout). Absent → in-package. Ignored by other emitters.")
37
- .option("--leaf-transport <mapping...>", "(--lang rust-typed-native / go-typed-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust leaf_<comp> / go Leaf_<comp>). Ignored by other emitters.")
38
- .option("--leaf-transport-import <module>", "(--lang rust-typed-native / go-typed-native only) Module the leaf transport symbols are imported from (rust `use <module>::{…}`, go package import + selector); absent → resolve in-scope / same package. Ignored by other emitters.")
37
+ .option("--leaf-transport <mapping...>", "(--lang rust-typed-native / go-typed-native / python-native / php-native only) Map a covered leaf (catalog component) to the op-agnostic transport symbol the runner calls directly, as <leaf>=<symbol>; repeat per leaf. A leaf not listed uses the in-package default name (rust / python / php leaf_<comp>, go Leaf_<comp>). Ignored by other emitters.")
38
+ .option("--leaf-transport-import <module>", "(--lang rust-typed-native / go-typed-native / python-native / php-native only) Where the leaf transport symbols live: rust `use <module>::{…}`, go package import + selector, python `from <module> import …`, php the class whose static methods they are (`\\<Class>::<symbol>(…)`); absent → resolve in-scope / same package (php: global functions). Ignored by other emitters.")
39
39
  .action(async (opts, cmd) => {
40
40
  await handlers.check(opts, cmd.optsWithGlobals());
41
41
  });
@@ -1 +1 @@
1
- {"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/generated/program.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAuB,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAkBjE,MAAM,UAAU,aAAa,CAC3B,QAAyB,EACzB,OAAe,EACf,UAA0B,EAAE;IAE5B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO;SACJ,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC;SACjC,WAAW,CAAC,6DAA6D,CAAC,CAAC;IAG9E,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,wFAAwF,CAAC;SACrG,MAAM,CAAC,kBAAkB,EAAE,4GAA4G,CAAC;SACxI,MAAM,CAAC,uBAAuB,EAAE,8gBAA8gB,CAAC;SAC/iB,MAAM,CAAC,wBAAwB,EAAE,uKAAuK,CAAC;SACzM,MAAM,CAAC,oBAAoB,EAAE,wJAAwJ,CAAC;SACtL,MAAM,CAAC,cAAc,EAAE,4DAA4D,CAAC;SACpF,MAAM,CAAC,2BAA2B,EAAE,umBAAumB,CAAC;SAC5oB,MAAM,CAAC,yBAAyB,EAAE,8DAA8D,CAAC;SACjG,MAAM,CAAC,8BAA8B,EAAE,kfAAkf,CAAC;SAC1hB,MAAM,CAAC,+BAA+B,EAAE,iTAAiT,CAAC;SAC1V,MAAM,CAAC,kCAAkC,EAAE,sOAAsO,CAAC;SAClR,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAC1B,MAAM,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,G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bmodel = a single `execute_sql`; graphddb = `get_item` / `query` /
22
22
  * `batch_get_item`), so consumer transport code is a fixed set of ops, not one method per behavior node.
23
23
  * - `symbols` — leaf(=catalog component) name → runtime transport symbol name. A leaf absent from the
24
- * table resolves to the in-package DEFAULT convention (rust `leaf_<sanitizedComponent>`, go
24
+ * table resolves to the in-package DEFAULT convention (rust / python / php `leaf_<sanitizedComponent>`, go
25
25
  * `Leaf_<sanitizedComponent>`).
26
26
  * - `import` — the module specifier the transport symbols live in (added to the covered module's import
27
27
  * block + used to bring the distinct resolved symbols into scope). Omit → in-package / crate-scope
28
28
  * resolution (the covered module emits no `use`/import and the symbols resolve where the module is used).
29
- * Other emitters (ts / py / php) ignore it.
29
+ * python `from <import> import …`; php: the class whose static methods the symbols are.
30
+ * The literal / typed emitters (ts / py / php) ignore it.
30
31
  */
31
32
  export interface LeafTransportOptions {
32
33
  /** leaf(=catalog component)名 → 直呼びする runtime transport シンボル名の表。 */
@@ -59,7 +60,7 @@ export interface EmitContext {
59
60
  /** #192: 生成エントリの名前空間(宣言クラス名。未指定なら emitter 既定)。 */
60
61
  namespace?: string;
61
62
  /**
62
- * codegen I/O モデル(bc#97): async/await を持つ言語(native=rust; 将来の native python)で、consumer の
63
+ * codegen I/O モデル(bc#97): async/await を持つ言語(native=rust)で、consumer の
63
64
  * terminal handler が async I/O を行う場合の宣言。emitter は per-terminal-node で `async fn` + `.await`
64
65
  * を出力する(await placement は SSoT 伝播 pass `async-plan.ts` が導出)。async/sync は language-runtime
65
66
  * concern であり IR には入らない — これは codegen INPUT(emitter option / CLI flag)。
@@ -68,7 +69,8 @@ export interface EmitContext {
68
69
  * - `{ asyncComponents }`: **per-terminal-handler granularity** — catalog `component` 名が集合に入る
69
70
  * terminal のみ async。未列挙は sync。1 runner 内で sync+async 混在可(bottom-up 伝播で runner は
70
71
  * iff async terminal を含む時 async)。
71
- * go は await 概念が無く annotation を無視(no-op)。python は native codegen surface が無く対象外。
72
+ * go は await 概念が無く annotation を無視(no-op)。python-native / php-native も同期のみで無視する(python /
73
+ * php の bc runtime に async 実行系が無く、等価の基準となる interpreter が同期であるため)。
72
74
  */
73
75
  ioModel: IoModel;
74
76
  /**
@@ -80,8 +82,8 @@ export interface EmitContext {
80
82
  sharedTypesImport?: string;
81
83
  /**
82
84
  * native codegen の op-agnostic leaf transport シンボル表({@link LeafTransportOptions})。covered runner
83
- * が各 covered node の実行点で直呼びする。未指定なら in-package 既定名(rust `leaf_<comp>` / go
84
- * `Leaf_<comp>`)。native emitter(rust/go)のみ消費、他(ts/py/php)は無視。
85
+ * が各 covered node の実行点で直呼びする。未指定なら in-package 既定名(rust / python / php `leaf_<comp>` /
86
+ * go `Leaf_<comp>`)。native emitter(rust/go/python/php)のみ消費、他(ts/py/php の literal)は無視。
85
87
  */
86
88
  leafTransport?: LeafTransportOptions;
87
89
  /**
@@ -110,9 +112,9 @@ export declare function entryPortOrder(comp: Component, declared: DeclaredEntryP
110
112
  * - `"ir-exec"` — IR 実行モデル。生成物に**可搬 IR を埋め込み**、ロード時 `loadCompiledIR` で adopt
111
113
  * して BC runtime(`runBehavior`)へ渡し**動的実行**する(literal = ts/python/php のみ)。
112
114
  * - `"codegen"` — IR を build で**終端**し、IR も dict dispatch も持たない **IR-free** コードを生成、
113
- * leaf を静的シンボルで直呼びする(typed ts + native go/rust)。**typed ts はここ**(#128/A6 で
115
+ * leaf を静的シンボルで直呼びする(typed ts + native go/rust/python/php)。**typed ts はここ**(#128/A6 で
114
116
  * ir-exec 側から codegen 側へ再分類 — 実装は 0.5.0 以降 straight-line codegen で IR 非在)。
115
- * **`runtime-free`(bc-runtime import ゼロ)は別の性質**で native go/rust だけが満たす。ts の
117
+ * **`runtime-free`(bc-runtime import ゼロ)は別の性質**で native go/rust/python/php だけが満たす。ts の
116
118
  * codegen ターゲットは意味論を runtime から import する(consumer-interface.md §0 の用語定義)。
117
119
  * conformance の grep-0(生成物 IR/dict 不在)+ 実行等価(生成 ≡ interpreter)は codegen ターゲットに課す。
118
120
  */
@@ -158,7 +160,7 @@ export interface GenerateOptions {
158
160
  * codegen I/O モデル(bc#97)を **明示指定**する(省略時の解決は下記)。`'async'`(uniform)または
159
161
  * `{ asyncComponents }`(per-terminal-handler granularity)を渡すと async/await 対応 native 言語
160
162
  * (rust-typed-native)が per-node で `async fn` + `.await` を出力する。go は await 概念が無いため
161
- * 無視(no-op)。python は native codegen surface が無く対象外。詳細は {@link IoModel} と
163
+ * 無視(no-op)。python-native / php-native も同期のみで無視する。詳細は {@link IoModel} と
162
164
  * `async-plan.ts` の SSoT 伝播 pass を参照。
163
165
  *
164
166
  * **省略時(#210・consumer の通常経路)**: `@leaf` 宣言(`static async` / `Promise<T>` 戻り型)から
@@ -175,7 +177,8 @@ export interface GenerateOptions {
175
177
  sharedTypesImport?: string;
176
178
  /**
177
179
  * native codegen の op-agnostic leaf transport シンボル表({@link LeafTransportOptions})。未指定なら
178
- * in-package 既定名(rust `leaf_<comp>` / go `Leaf_<comp>`)。native emitter(rust/go)のみ消費。
180
+ * in-package 既定名(rust / python / php `leaf_<comp>` / go `Leaf_<comp>`)。native emitter(rust/go/python/php)
181
+ * のみ消費。
179
182
  */
180
183
  leafTransport?: LeafTransportOptions;
181
184
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/generator/core.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG;IAAE,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAGzF;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAA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