behavior-contracts 0.10.1 → 0.11.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.
- package/README.md +246 -350
- package/cli-contract.yaml +49 -51
- package/dist/authoring.d.ts +61 -424
- package/dist/authoring.d.ts.map +1 -1
- package/dist/authoring.js +53 -1157
- package/dist/authoring.js.map +1 -1
- package/dist/behavior.d.ts +7 -15
- package/dist/behavior.d.ts.map +1 -1
- package/dist/behavior.js.map +1 -1
- package/dist/builder.d.ts +4 -4
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +9 -11
- package/dist/builder.js.map +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/codegen.d.ts.map +1 -1
- package/dist/commands/codegen.js +12 -56
- package/dist/commands/codegen.js.map +1 -1
- package/dist/commands/ts-compile.d.ts +23 -0
- package/dist/commands/ts-compile.d.ts.map +1 -0
- package/dist/commands/ts-compile.js +724 -0
- package/dist/commands/ts-compile.js.map +1 -0
- package/dist/commands/ts-extract.d.ts +67 -1
- package/dist/commands/ts-extract.d.ts.map +1 -1
- package/dist/commands/ts-extract.js +162 -31
- package/dist/commands/ts-extract.js.map +1 -1
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +2 -2
- package/dist/generated/contract.js.map +1 -1
- package/dist/generated/program.js +4 -4
- package/dist/generated/program.js.map +1 -1
- package/dist/generator/core.d.ts +11 -1
- package/dist/generator/core.d.ts.map +1 -1
- package/dist/generator/core.js +5 -4
- package/dist/generator/core.js.map +1 -1
- package/dist/generator/emit-php.d.ts +0 -17
- package/dist/generator/emit-php.d.ts.map +1 -1
- package/dist/generator/emit-php.js +25 -1
- package/dist/generator/emit-php.js.map +1 -1
- package/dist/generator/emit-python.d.ts +0 -7
- package/dist/generator/emit-python.d.ts.map +1 -1
- package/dist/generator/emit-python.js +34 -1
- package/dist/generator/emit-python.js.map +1 -1
- package/dist/generator/emit-straightline-typed-typescript.js +1 -1
- package/dist/generator/emit-straightline-typed-typescript.js.map +1 -1
- package/dist/generator/emit-typed-native-go.d.ts +1 -1
- package/dist/generator/emit-typed-native-go.d.ts.map +1 -1
- package/dist/generator/emit-typed-native-go.js +110 -107
- package/dist/generator/emit-typed-native-go.js.map +1 -1
- package/dist/generator/emit-typed-native-rust.d.ts +3 -2
- package/dist/generator/emit-typed-native-rust.d.ts.map +1 -1
- package/dist/generator/emit-typed-native-rust.js +55 -123
- package/dist/generator/emit-typed-native-rust.js.map +1 -1
- package/dist/generator/emit-typescript-native.js +1 -1
- package/dist/generator/emit-typescript-native.js.map +1 -1
- package/dist/generator/emit-typescript.js +1 -1
- package/dist/generator/emit-typescript.js.map +1 -1
- package/dist/generator/typed.d.ts +5 -1
- package/dist/generator/typed.d.ts.map +1 -1
- package/dist/generator/typed.js +40 -9
- package/dist/generator/typed.js.map +1 -1
- package/dist/guard.d.ts +4 -0
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +26 -8
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +19 -57
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -101
- package/dist/index.js.map +1 -1
- package/dist/lowering.d.ts +251 -0
- package/dist/lowering.d.ts.map +1 -0
- package/dist/lowering.js +652 -0
- package/dist/lowering.js.map +1 -0
- package/dist/provenance.js +4 -4
- package/dist/provenance.js.map +1 -1
- package/dist/runtime.d.ts +52 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +77 -0
- package/dist/runtime.js.map +1 -0
- package/dist/spec-versions.d.ts +25 -0
- package/dist/spec-versions.d.ts.map +1 -0
- package/dist/spec-versions.js +26 -0
- package/dist/spec-versions.js.map +1 -0
- package/dist/type-gate.d.ts +12 -0
- package/dist/type-gate.d.ts.map +1 -1
- package/dist/type-gate.js +79 -3
- package/dist/type-gate.js.map +1 -1
- package/package.json +5 -1
- package/dist/bind.d.ts +0 -88
- package/dist/bind.d.ts.map +0 -1
- package/dist/bind.js +0 -155
- package/dist/bind.js.map +0 -1
- package/dist/lower.d.ts +0 -35
- package/dist/lower.d.ts.map +0 -1
- package/dist/lower.js +0 -118
- package/dist/lower.js.map +0 -1
|
@@ -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 TS only (@behavior / defineLeaf /\n behaviorComponents) and never touches the IR. `bc generate --from\n <behaviors.ts> --behavior <ClassName>` uses the TypeScript compiler to\n type-extract each method's `$: In<T>` input-port types and to transpile +\n load the module (decorators supported), then runs ts→ir→native end to end\n in-process (compileBehaviors → generateModule), emitting a runtime-free\n native module (data baked as literals). The IR exists only inside the CLI;\n nothing reads it at runtime. `typescript` is a build-time-only optional peer\n dependency used solely on this `--from <.ts>` path; the runtime entry stays\n dependency-free. `--in <ir-doc.json>` (a pre-serialized ComponentGraphIRDoc)\n remains as an internal/test input 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 behavior module exporting an @behavior / SemanticBehavior\n class — the TS-authoring codegen input (`--from`). A `.ts` SOURCE is the\n primary form (the TS compiler type-extracts `$: In<T>` input ports +\n transpiles decorators); a compiled `.js`/`.mjs` is also accepted (no input\n types). BC runs ts→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: Generated native module source (baked-literal, 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): imports the consumer's compiled behavior\n module and reads its --behavior export (an @behavior / SemanticBehavior\n class), then runs ts→ir→native in-process (compileBehaviors →\n generateModule) for the --lang emitter. The IR is CLI-internal and\n never touches the consumer surface. Internal/test flow (--in): reads\n the ComponentGraphIRDoc, adopts it via loadCompiledIR, and runs the\n same generateModule. Exactly one of --from / --in is required (--from\n also requires --behavior). Writes the module source to --out if given,\n else to stdout. Rejects an unregistered --lang.\n usage:\n - bc generate --lang rust-typed-native --from behaviors.js --behavior UserRepo --out gen.rs\n - bc generate --lang go-typed-native --from behaviors.mjs --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. A `.ts` SOURCE is the primary form: the\n TypeScript compiler type-extracts each method's `$: In<T>`\n input-port types (so an input-typed behavior emits native) and\n transpiles + loads the module with decorators (Node type-stripping\n rejects @behavior). A compiled `.js`/`.mjs` is also accepted (no\n input-port types → native emit limited to no-dynamic-input shapes).\n BC reads the --behavior export and runs compileBehaviors →\n generateModule. The module's `behavior-contracts` import must\n resolve to the same installed package as bc (shared\n @behavior/defineLeaf registry). A `.ts` requires the optional peer\n dependency `typescript`. Mutually exclusive with --in.\n value_name: behaviors.(ts|js|mjs)\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 / SemanticBehavior\n class to compile (one class = its public methods each a root\n Behavior). 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.js --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): a `.ts` SOURCE (TS\n compiler type-extracts `$: In<T>` + transpiles decorators; needs the\n optional peer `typescript`) or a compiled `.js`/`.mjs`. Regenerated\n + byte-compared against --out. Requires --behavior. Mutually\n exclusive with --in.\n value_name: behaviors.(ts|js|mjs)\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 / SemanticBehavior\n class to 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 TS only (@behavior / defineLeaf / behaviorComponents) and never touches the IR. `bc generate --from <behaviors.ts> --behavior <ClassName>` uses the TypeScript compiler to type-extract each method's `$: In<T>` input-port types and to transpile + load the module (decorators supported), then runs ts→ir→native end to end in-process (compileBehaviors → generateModule), emitting a runtime-free native module (data baked as literals). 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 behavior module exporting an @behavior / SemanticBehavior class — the TS-authoring codegen input (`--from`). A `.ts` SOURCE is the primary form (the TS compiler type-extracts `$: In<T>` input ports + transpiles decorators); a compiled `.js`/`.mjs` is also accepted (no input types). BC runs ts→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 native module source (baked-literal, 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): imports the consumer's compiled behavior module and reads its --behavior export (an @behavior / SemanticBehavior class), then runs ts→ir→native in-process (compileBehaviors → 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.js --behavior UserRepo --out gen.rs\",\n \"bc generate --lang go-typed-native --from behaviors.mjs --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. A `.ts` SOURCE is the primary form: the TypeScript compiler type-extracts each method's `$: In<T>` input-port types (so an input-typed behavior emits native) and transpiles + loads the module with decorators (Node type-stripping rejects @behavior). A compiled `.js`/`.mjs` is also accepted (no input-port types → native emit limited to no-dynamic-input shapes). BC reads the --behavior export and runs compileBehaviors → generateModule. The module's `behavior-contracts` import must resolve to the same installed package as bc (shared @behavior/defineLeaf registry). A `.ts` requires the optional peer dependency `typescript`. Mutually exclusive with --in.\",\n \"value_name\": \"behaviors.(ts|js|mjs)\",\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 / SemanticBehavior class to compile (one class = its public 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.js --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): a `.ts` SOURCE (TS compiler type-extracts `$: In<T>` + transpiles decorators; needs the optional peer `typescript`) or a compiled `.js`/`.mjs`. Regenerated + byte-compared against --out. Requires --behavior. Mutually exclusive with --in.\",\n \"value_name\": \"behaviors.(ts|js|mjs)\",\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 / SemanticBehavior 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→native end to end in-process,\n emitting a runtime-free native module (data baked as literals). The IR exists\n 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: Generated native module source (baked-literal, 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→native end to end in-process, emitting a runtime-free native module (data baked as literals). 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 native module source (baked-literal, 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}";
|
|
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,
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,gDAAgD;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAW,ywgBAAywgB,CAAC;AAE/ygB,MAAM,CAAC,MAAM,iBAAiB,GAAW,mskBAAmskB,CAAC"}
|
|
@@ -11,8 +11,8 @@ export function createProgram(handlers, version) {
|
|
|
11
11
|
.command("generate")
|
|
12
12
|
.description("Emit a native module from a TS behavior module (--from) or a serialized IR doc (--in).")
|
|
13
13
|
.option("--lang <emitter>", "Target emitter (must be a registered language, e.g. rust-typed-native, go-typed-native, typescript-typed).")
|
|
14
|
-
.option("--from <behaviors.
|
|
15
|
-
.option("--behavior <ClassName>", "(with --from) The name of the exported
|
|
14
|
+
.option("--from <behaviors.ts>", "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.")
|
|
15
|
+
.option("--behavior <ClassName>", "(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.")
|
|
16
16
|
.option("--in <ir-doc.json>", "Internal/test input: path to a serialized ComponentGraphIRDoc JSON file. The TS-authoring surface uses --from instead. Mutually exclusive with --from.")
|
|
17
17
|
.option("--out <file>", "Write the generated covered module here instead of stdout.")
|
|
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.")
|
|
@@ -27,8 +27,8 @@ export function createProgram(handlers, version) {
|
|
|
27
27
|
.command("check")
|
|
28
28
|
.description("Verify a committed module matches a fresh generation (drift gate).")
|
|
29
29
|
.option("--lang <emitter>", "Target emitter (must be a registered language).")
|
|
30
|
-
.option("--from <behaviors.
|
|
31
|
-
.option("--behavior <ClassName>", "(with --from) The name of the exported
|
|
30
|
+
.option("--from <behaviors.ts>", "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.")
|
|
31
|
+
.option("--behavior <ClassName>", "(with --from) The name of the exported `@behavior` class to compile. Required whenever --from is given.")
|
|
32
32
|
.option("--in <ir-doc.json>", "Internal/test input: path to a serialized ComponentGraphIRDoc JSON file. Mutually exclusive with --from.")
|
|
33
33
|
.option("--out <file>", "The committed covered-module file to diff a fresh generation against. At least one of --out / --shared-types-out is required.")
|
|
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.")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/generated/program.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOjE,MAAM,UAAU,aAAa,CAC3B,QAAyB,EACzB,OAAe;IAEf,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,
|
|
1
|
+
{"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/generated/program.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOjE,MAAM,UAAU,aAAa,CAC3B,QAAyB,EACzB,OAAe;IAEf,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO;SACJ,IAA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AU,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;wBACrF,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;oBAC1B,CAAC;gBACH,CAAC;gBACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACpC,MAAM,OAAO,GAAG,EAAE,GAAI,EAA8B,EAAE,CAAC;oBACvD,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC;oBAC3B,GAAG,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;gBACvB,CAAC;YACH,CAAC;YACD,IAAI,GAAG,CAAC,UAAU;gBAAE,QAAQ,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;YACzD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IACL,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/generator/core.d.ts
CHANGED
|
@@ -34,11 +34,12 @@ export interface LeafTransportOptions {
|
|
|
34
34
|
/** transport シンボルの import 元モジュール指定子(未指定=in-package/crate-scope 既定名を使う)。 */
|
|
35
35
|
import?: string;
|
|
36
36
|
}
|
|
37
|
-
export type GeneratorFailureCode = "INPUT_NOT_PORTABLE_IR" | "UNSUPPORTED_IR_VERSION" | "UNSUPPORTED_EXPR_VERSION" | "EMPTY_IR" | "DUPLICATE_COMPONENT" | "UNKNOWN_LANGUAGE" | "OUTPUT_TYPE_INCONSISTENT" | "UNSUPPORTED_NODE_STRAIGHTLINE";
|
|
37
|
+
export type GeneratorFailureCode = "INPUT_NOT_PORTABLE_IR" | "UNSUPPORTED_IR_VERSION" | "UNSUPPORTED_EXPR_VERSION" | "EMPTY_IR" | "DUPLICATE_COMPONENT" | "UNKNOWN_LANGUAGE" | "OUTPUT_TYPE_INCONSISTENT" | "NOMINAL_NAME_COLLISION" | "UNSUPPORTED_NODE_STRAIGHTLINE";
|
|
38
38
|
export declare class GeneratorFailure extends Error {
|
|
39
39
|
code: GeneratorFailureCode;
|
|
40
40
|
constructor(code: GeneratorFailureCode, message: string);
|
|
41
41
|
}
|
|
42
|
+
export declare function gfail(code: GeneratorFailureCode, message: string): never;
|
|
42
43
|
/** 生成時に emitter へ渡される言語中立コンテキスト(検証済み)。 */
|
|
43
44
|
export interface EmitContext {
|
|
44
45
|
/** 検証済み可搬 IR(構造は入力のまま — キー順保存)。 */
|
|
@@ -55,6 +56,8 @@ export interface EmitContext {
|
|
|
55
56
|
componentNames: string[];
|
|
56
57
|
/** runtime-core を import するモジュール指定子(emitter の既定を上書き可)。 */
|
|
57
58
|
runtimeImport: string;
|
|
59
|
+
/** #192: 生成エントリの名前空間(宣言クラス名。未指定なら emitter 既定)。 */
|
|
60
|
+
namespace?: string;
|
|
58
61
|
/**
|
|
59
62
|
* codegen I/O モデル(bc#97): async/await を持つ言語(native=rust; 将来の native python)で、consumer の
|
|
60
63
|
* terminal handler が async I/O を行う場合の宣言。emitter は per-terminal-node で `async fn` + `.await`
|
|
@@ -148,6 +151,13 @@ export interface GenerateOptions {
|
|
|
148
151
|
* in-package 既定名(rust `leaf_<comp>` / go `Leaf_<comp>`)。native emitter(rust/go)のみ消費。
|
|
149
152
|
*/
|
|
150
153
|
leafTransport?: LeafTransportOptions;
|
|
154
|
+
/**
|
|
155
|
+
* #192: 生成エントリの **名前空間 = 宣言クラス**(authoring のクラス名)。物理配置を指定する唯一の場所。
|
|
156
|
+
* go = `package <namespace>`(lower-case 化)/ python = `class <Namespace>`(+ @staticmethod)/ php =
|
|
157
|
+
* `final class <Namespace>`。rust の mod は出力ファイル配置(bc generate 側の関心事・proposal §5.5)。
|
|
158
|
+
* 未指定なら emitter 既定(go `behaviors` 等)。`@behavior` に名前空間引数は付けない — クラス名が宣言する。
|
|
159
|
+
*/
|
|
160
|
+
namespace?: string;
|
|
151
161
|
}
|
|
152
162
|
export interface GeneratedModule {
|
|
153
163
|
/** 生成言語。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/generator/core.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;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,MAAM,CAAC;CACjB;AAGD,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,wBAAwB,GACxB,0BAA0B,GAC1B,UAAU,GACV,qBAAqB,GACrB,kBAAkB,GAClB,0BAA0B,GAC1B,+BAA+B,CAAC;AAEpC,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,IAAI,EAAE,oBAAoB,CAAC;gBACf,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM;CAKxD;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/generator/core.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;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,mEA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AAE,eAAe,GAAG,eAAe,CAwCrF"}
|
package/dist/generator/core.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* (エンドポイント 2)を置き換えない。両経路は同一 IR に対して観測等価であることが
|
|
23
23
|
* conformance ゲート(§7.3 — ts/test/codegen-conformance.test.ts)で強制される。
|
|
24
24
|
*/
|
|
25
|
-
import { SPEC_VERSIONS } from "../
|
|
25
|
+
import { SPEC_VERSIONS } from "../spec-versions.js";
|
|
26
26
|
import { assertPortableComponentGraph } from "../guard.js";
|
|
27
27
|
import { fingerprintComponentGraph } from "./fingerprint.js";
|
|
28
28
|
import { assertCompiled } from "../provenance.js";
|
|
@@ -35,7 +35,7 @@ export class GeneratorFailure extends Error {
|
|
|
35
35
|
this.name = "GeneratorFailure";
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function gfail(code, message) {
|
|
38
|
+
export function gfail(code, message) {
|
|
39
39
|
throw new GeneratorFailure(code, message);
|
|
40
40
|
}
|
|
41
41
|
const registry = new Map();
|
|
@@ -62,8 +62,8 @@ function validateGeneratorInput(ir) {
|
|
|
62
62
|
const doc = ir;
|
|
63
63
|
if (doc.irVersion === undefined || doc.components === undefined)
|
|
64
64
|
gfail("INPUT_NOT_PORTABLE_IR", "generator input must be a portable component-graph IR document ({irVersion, exprVersion, components[]}); the codegen path consumes portable IR ONLY — never source/internal IR or consumer bundles (fail-closed)");
|
|
65
|
-
if (doc.irVersion !== 2)
|
|
66
|
-
gfail("UNSUPPORTED_IR_VERSION", `irVersion ${String(doc.irVersion)} is not supported (supported: 2
|
|
65
|
+
if (doc.irVersion !== 2 && doc.irVersion !== 3)
|
|
66
|
+
gfail("UNSUPPORTED_IR_VERSION", `irVersion ${String(doc.irVersion)} is not supported (supported: 2 | 3 — v3 adds optional nominal type names) (fail-closed)`);
|
|
67
67
|
const exprVersion = doc.exprVersion;
|
|
68
68
|
if (typeof exprVersion !== "number" || !Number.isInteger(exprVersion) || exprVersion < 1)
|
|
69
69
|
gfail("INPUT_NOT_PORTABLE_IR", `exprVersion must be a positive integer, got ${String(exprVersion)} (fail-closed)`);
|
|
@@ -122,6 +122,7 @@ export function generateModule(ir, options) {
|
|
|
122
122
|
ioModel: options.ioModel ?? "sync",
|
|
123
123
|
sharedTypesImport: options.sharedTypesImport,
|
|
124
124
|
leafTransport: options.leafTransport,
|
|
125
|
+
namespace: options.namespace,
|
|
125
126
|
};
|
|
126
127
|
return {
|
|
127
128
|
language: plugin.language,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/generator/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/generator/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAmD/D,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,IAAI,CAAuB;IAC3B,YAAY,IAA0B,EAAE,OAAe;QACrD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED,MAAM,UAAU,KAAK,CAAC,IAA0B,EAAE,OAAe;IAC/D,MAAM,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC;AA8ED,MAAM,QAAQ,GAAG,IAAI,G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AE,aAAa,CAAC,UAAU;QACpC,IAAI,EAAE,aAAa,CAAC,IAAI;KACzB,CAAC;IACF,MAAM,cAAc,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAgB;QACvB,EAAE,EAAE,SAAS;QACb,WAAW;QACX,YAAY;QACZ,cAAc;QACd,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,MAAM,CAAC,oBAAoB;QACnE,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,MAAM;QAClC,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QACtB,WAAW;QACX,YAAY;QACZ,cAAc;QACd,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,sBAAsB,MAAM,CAAC,aAAa,EAAE;KAClF,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* emit-php.ts — PHP emitter(共通 Generator, bc#13 SP2)。
|
|
3
|
-
*
|
|
4
|
-
* 生成物: 可搬 IR を **ネイティブ配列/stdClass リテラル**(`(object) [...]` /
|
|
5
|
-
* `[...]` — Behavior::runBehavior が消費する json_decode(.., false) 同型ドメイン)
|
|
6
|
-
* として埋め込み、`Behavior::runBehavior` に handler 注入で渡す accessor
|
|
7
|
-
* (`bind` クロージャ)を公開する .php ファイル。
|
|
8
|
-
*
|
|
9
|
-
* ロード形: PHP に「モジュール」概念は無いため、生成ファイルは **require の戻り値**
|
|
10
|
-
* としてモジュールオブジェクト(stdClass: EXPECTED_SPEC_VERSIONS / IR_FINGERPRINT /
|
|
11
|
-
* COMPONENT_NAMES / IR / bind)を返す。トップレベルシンボルを定義しないので、
|
|
12
|
-
* 同一プロセスで複数の生成モジュールを衝突なく require できる
|
|
13
|
-
* (変数スコープ漏れを避けるにはクロージャ内で require すること)。
|
|
14
|
-
*
|
|
15
|
-
* ロード時検査は **require 時**: spec-version skew / fingerprint mismatch は
|
|
16
|
-
* RuntimeException で LOUD reject(#208 prepared-artifact 規律)。
|
|
17
|
-
*/
|
|
18
1
|
import type { EmitterPlugin } from "./core.js";
|
|
19
2
|
export declare const phpEmitter: EmitterPlugin;
|
|
20
3
|
//# sourceMappingURL=emit-php.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-php.d.ts","sourceRoot":"","sources":["../../src/generator/emit-php.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emit-php.d.ts","sourceRoot":"","sources":["../../src/generator/emit-php.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,WAAW,CAAC;AAmG5D,eAAO,MAAM,UAAU,EAAE,aAMxB,CAAC"}
|
|
@@ -3,6 +3,30 @@ import { emitDocLiteral } from "./literal.js";
|
|
|
3
3
|
function phpSq(s) {
|
|
4
4
|
return `'${s.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
5
5
|
}
|
|
6
|
+
/** #192: a valid PHP variable name (no `$`) from a port name. */
|
|
7
|
+
function phpVarName(port) {
|
|
8
|
+
return port.replace(/[^A-Za-z0-9_]/g, "_").replace(/^([0-9])/, "_$1");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* #192: the namespaced `final class <Namespace>` of 1:1 positional static entries (emitted when
|
|
12
|
+
* GenerateOptions.namespace is set). Each `public static function <method>(<positional args>, array
|
|
13
|
+
* $handlers)` is a thin wrapper over `Behavior::runBehavior` (the same dynamic path `bind` uses). The IR
|
|
14
|
+
* is held on a static property (set after the class def) — PHP classes can't close over the local `$ir`.
|
|
15
|
+
* Guarded by `class_exists` so a re-require of the same file is idempotent (the module otherwise defines
|
|
16
|
+
* NO top-level symbols by design). `bind` is unchanged. The method name = the authored method (php camelCase).
|
|
17
|
+
*/
|
|
18
|
+
function emitNamespaceClass(namespace, components, runtimeImport) {
|
|
19
|
+
const cls = namespace.replace(/[^A-Za-z0-9_]/g, "");
|
|
20
|
+
const methods = components.map((c) => {
|
|
21
|
+
const ports = Object.keys(c.inputPorts ?? {});
|
|
22
|
+
const params = ports.map(phpVarName);
|
|
23
|
+
const arr = `[${ports.map((p, i) => `${phpSq(p)} => $${params[i]}`).join(", ")}]`;
|
|
24
|
+
const method = c.name.replace(/[^A-Za-z0-9_]/g, "_");
|
|
25
|
+
const sig = [...params.map((v) => `$${v}`), "array $handlers"].join(", ");
|
|
26
|
+
return ` public static function ${method}(${sig}): mixed {\n return \\${runtimeImport}\\Behavior::runBehavior(self::$ir, $handlers, ${arr}, ${phpSq(c.name)});\n }`;
|
|
27
|
+
});
|
|
28
|
+
return `\n// #192: namespaced 1:1 positional entries (thin wrappers over runBehavior). Guarded so a re-require\n// is idempotent; IR held on a static (a class cannot close over the local $ir).\nif (!\\class_exists(${phpSq(cls)}, false)) {\n final class ${cls} {\n /** @var array<string,mixed> */\n public static array $ir;\n\n${methods.join("\n\n")}\n }\n}\n${cls}::$ir = $ir;\n`;
|
|
29
|
+
}
|
|
6
30
|
function emit(ctx) {
|
|
7
31
|
const { fingerprint, specVersions, componentNames, runtimeImport } = ctx;
|
|
8
32
|
const names = componentNames.map(phpSq).join(", ");
|
|
@@ -48,7 +72,7 @@ $gotFingerprint = \\${runtimeImport}\\Fingerprint::componentGraph($ir);
|
|
|
48
72
|
if ($gotFingerprint !== $irFingerprint) {
|
|
49
73
|
throw new \\RuntimeException("behavior-contracts generated module: IR fingerprint mismatch (baked={$irFingerprint}, embedded literal={$gotFingerprint}) — the generated code was modified or corrupted (fail-closed)");
|
|
50
74
|
}
|
|
51
|
-
|
|
75
|
+
${ctx.namespace !== undefined ? emitNamespaceClass(ctx.namespace, ctx.ir.components, runtimeImport) : ""}
|
|
52
76
|
// bind — inject handlers (boundary injection; catalog name → implementation) and
|
|
53
77
|
// get one executor closure per component. Each call delegates to the runtime
|
|
54
78
|
// core's Behavior::runBehavior over the embedded IR (dynamic-path equivalent — §7.3).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-php.js","sourceRoot":"","sources":["../../src/generator/emit-php.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emit-php.js","sourceRoot":"","sources":["../../src/generator/emit-php.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,mDAAmD;AACnD,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;AAC9D,CAAC;AAED,iEAAiE;AACjE,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,kBAAkB,CAAC,SAAiB,EAAE,UAAgC,EAAE,aAAqB;IACpG,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CA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AIjC,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;wEAYhC,aAAa;;;;;CAKpF,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,QAAQ,EAAE,KAAK;IACf,cAAc,EAAE,SAAS,EAAE,kDAAkD;IAC7E,aAAa,EAAE,MAAM;IACrB,oBAAoB,EAAE,mBAAmB;IACzC,IAAI;CACL,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* emit-python.ts — Python emitter(共通 Generator, bc#13 SP1)。
|
|
3
|
-
*
|
|
4
|
-
* 生成物: 可搬 IR を **dict リテラル**として埋め込み、`behavior_contracts.run_behavior` に
|
|
5
|
-
* handler 注入で渡す薄い accessor(`bind`)を公開する .py モジュール。TS emitter と同形:
|
|
6
|
-
* spec-version / fingerprint 定数の焼き込み + ロード時 fail-closed 検査。
|
|
7
|
-
*/
|
|
8
1
|
import type { EmitterPlugin } from "./core.js";
|
|
9
2
|
export declare const pythonEmitter: EmitterPlugin;
|
|
10
3
|
//# sourceMappingURL=emit-python.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-python.d.ts","sourceRoot":"","sources":["../../src/generator/emit-python.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emit-python.d.ts","sourceRoot":"","sources":["../../src/generator/emit-python.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,WAAW,CAAC;AA6G5D,eAAO,MAAM,aAAa,EAAE,aAM3B,CAAC"}
|
|
@@ -3,6 +3,39 @@ import { emitDocLiteral } from "./literal.js";
|
|
|
3
3
|
function pyStr(s) {
|
|
4
4
|
return JSON.stringify(s);
|
|
5
5
|
}
|
|
6
|
+
const PY_KEYWORDS = /* @__PURE__ */ new Set([
|
|
7
|
+
"False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue", "def",
|
|
8
|
+
"del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is",
|
|
9
|
+
"lambda", "nonlocal", "not", "or", "pass", "raise", "return", "try", "while", "with", "yield",
|
|
10
|
+
"handlers", "input",
|
|
11
|
+
]);
|
|
12
|
+
/** #192: a valid Python parameter name from a port name (keyword-safe: append `_`). */
|
|
13
|
+
function pyParamName(port) {
|
|
14
|
+
const safe = port.replace(/[^A-Za-z0-9_]/g, "_").replace(/^([0-9])/, "_$1");
|
|
15
|
+
return PY_KEYWORDS.has(safe) ? `${safe}_` : safe;
|
|
16
|
+
}
|
|
17
|
+
/** #192: the Python method name for a component (method) — snake_case (camelCase → snake_case). */
|
|
18
|
+
function pyMethodName(name) {
|
|
19
|
+
const snake = name.replace(/[^A-Za-z0-9_]/g, "_").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
20
|
+
return PY_KEYWORDS.has(snake) ? `${snake}_` : snake;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* #192: the namespaced class of 1:1 positional entries (emitted when GenerateOptions.namespace is set).
|
|
24
|
+
* Each `@staticmethod <method>(<positional port args>, handlers)` is a thin wrapper over `run_behavior`
|
|
25
|
+
* (the same dynamic path `bind` uses) — the class = the declaring class (namespace), the params = the
|
|
26
|
+
* authored args, the name = the method (nominal name is cosmetic in dynamic Python). `bind` is unchanged.
|
|
27
|
+
*/
|
|
28
|
+
function emitNamespaceClass(namespace, components) {
|
|
29
|
+
const cls = namespace.replace(/[^A-Za-z0-9_]/g, "");
|
|
30
|
+
const methods = components.map((c) => {
|
|
31
|
+
const ports = Object.keys(c.inputPorts ?? {});
|
|
32
|
+
const params = ports.map(pyParamName);
|
|
33
|
+
const dict = `{${ports.map((p, i) => `${pyStr(p)}: ${params[i]}`).join(", ")}}`;
|
|
34
|
+
const sig = [...params, "handlers"].join(", ");
|
|
35
|
+
return ` @staticmethod\n def ${pyMethodName(c.name)}(${sig}):\n return run_behavior(IR, handlers, ${dict}, ${pyStr(c.name)})`;
|
|
36
|
+
});
|
|
37
|
+
return `\n\nclass ${cls}:\n """#192: namespaced 1:1 positional entries (thin wrappers over run_behavior)."""\n\n${methods.join("\n\n")}\n`;
|
|
38
|
+
}
|
|
6
39
|
function emit(ctx) {
|
|
7
40
|
const { fingerprint, specVersions, componentNames, runtimeImport } = ctx;
|
|
8
41
|
const names = componentNames.map(pyStr).join(", ");
|
|
@@ -64,7 +97,7 @@ def bind(handlers):
|
|
|
64
97
|
return _call
|
|
65
98
|
|
|
66
99
|
return {name: _make(name) for name in COMPONENT_NAMES}
|
|
67
|
-
`;
|
|
100
|
+
${ctx.namespace !== undefined ? emitNamespaceClass(ctx.namespace, ctx.ir.components) : ""}`;
|
|
68
101
|
}
|
|
69
102
|
export const pythonEmitter = {
|
|
70
103
|
language: "python",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-python.js","sourceRoot":"","sources":["../../src/generator/emit-python.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emit-python.js","sourceRoot":"","sources":["../../src/generator/emit-python.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,+CAA+C;AAC/C,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,GAAG,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK;IACrG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,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EAqCd,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC5F,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,QAAQ,EAAE,QAAQ;IAClB,cAAc,EAAE,SAAS,EAAE,mDAAmD;IAC9E,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,oBAAoB;IAC1C,IAAI;CACL,CAAC"}
|
|
@@ -361,7 +361,7 @@ export const typescriptTypedEmitter = {
|
|
|
361
361
|
language: "typescript-typed",
|
|
362
362
|
classification: "codegen", // typed ts は CODEGEN(ts→IR→生成 ts コード・IR 非在・runtime-free)— #128/A6 で ir-exec から再分類
|
|
363
363
|
fileExtension: ".ts",
|
|
364
|
-
defaultRuntimeImport: "behavior-contracts",
|
|
364
|
+
defaultRuntimeImport: "behavior-contracts/runtime",
|
|
365
365
|
filenameHint: "behaviors.typed.generated.ts",
|
|
366
366
|
emit,
|
|
367
367
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-straightline-typed-typescript.js","sourceRoot":"","sources":["../../src/generator/emit-straightline-typed-typescript.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EACL,aAAa,EACb,aAAa,GAId,MAAM,YAAY,CAAC;AAGpB,gFAAgF;AAEhF,8EAA8E;AAC9E,SAAS,aAAa,CAAC,GAAY;IACjC,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,2EAA2E;YAC3E,+DAA+D;YAC/D,OAAO,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G,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IAEtF,8EAA8E;IAC9E,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC;QAAE,OAAO,gBAAgB,CAAC;IAExD,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACnC,qFAAqF;IACrF,gBAAgB;IAChB,MAAM,KAAK,GAAG,mBAAmB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC,UAAU;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAE,CAAgC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC;SACxH,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;SACpC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhB,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;EAoBpB,KAAK;;EAEL,KAAK;CACN,CAAC;IACA,OAAO,gBAAgB,GAAG,IAAI,GAAG,WAAW,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,QAAQ,EAAE,kBAAkB;IAC5B,cAAc,EAAE,SAAS,EAAE,kFAAkF;IAC7G,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,oBAAoB;IAC1C,YAAY,EAAE,8BAA8B;IAC5C,IAAI;CACL,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"emit-straightline-typed-typescript.js","sourceRoot":"","sources":["../../src/generator/emit-straightline-typed-typescript.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,gBAAgB,EAAE,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