@lunora/codegen 1.0.0-alpha.312 → 1.0.0-alpha.314

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 (27) hide show
  1. package/dist/index.d.mts +3 -288
  2. package/dist/index.d.ts +3 -288
  3. package/dist/index.mjs +1 -1
  4. package/dist/packem_shared/{MUTATORS_FILENAME-qVDmv8st.mjs → MUTATORS_FILENAME--5kUJd5I.mjs} +1 -1
  5. package/dist/packem_shared/{NOTIFY_FILENAME-CLoeWMb5.mjs → NOTIFY_FILENAME-BOZ8G8zT.mjs} +1 -1
  6. package/dist/packem_shared/{SCHEMA_SNAPSHOT_FILENAME-CSjCtmZi.mjs → SCHEMA_SNAPSHOT_FILENAME-DM4csP6n.mjs} +1 -1
  7. package/dist/packem_shared/{context-property-calls-CQWCNUVH.mjs → context-property-calls-DdoCuhv4.mjs} +1 -1
  8. package/dist/packem_shared/{context-root-LyOsqj_o.mjs → context-root-lGZCyHyj.mjs} +1 -1
  9. package/dist/packem_shared/{database-calls-BPpefKqO.mjs → database-calls-CVsXSVhv.mjs} +1 -1
  10. package/dist/packem_shared/{discoverFunctions-CbxZGGj0.mjs → discoverFunctions-BiA7jv30.mjs} +1 -1
  11. package/dist/packem_shared/{discoverHttpRoutes-DgfoyNcf.mjs → discoverHttpRoutes-BccLtGKg.mjs} +1 -1
  12. package/dist/packem_shared/discoverHyperdriveCalls-DxYmsE3Y.mjs +1 -0
  13. package/dist/packem_shared/{discoverInserts-mHOX_dJR.mjs → discoverInserts-rFszl3Al.mjs} +1 -1
  14. package/dist/packem_shared/discoverMaskProcedures-BZlL43UV.mjs +1 -0
  15. package/dist/packem_shared/{discoverQueries-CfxkjP5X.mjs → discoverQueries-DDds61UD.mjs} +1 -1
  16. package/dist/packem_shared/discoverR2sqlCalls-CEbVN9V1.mjs +1 -0
  17. package/dist/packem_shared/{discoverRlsProcedures-TskedRMh.mjs → discoverRlsProcedures-BfEFJmU5.mjs} +1 -1
  18. package/dist/packem_shared/{index-CkS96b8a.mjs → index-Bxn8ZjS0.mjs} +1 -1
  19. package/dist/packem_shared/unwrap-handler-return-BwclbliB.mjs +1 -0
  20. package/dist/sdk/index.d.mts +288 -0
  21. package/dist/sdk/index.d.ts +288 -0
  22. package/dist/{packem_shared/SDK_LANGUAGES-Df_CnJx5.mjs → sdk/index.mjs} +1 -1
  23. package/package.json +13 -9
  24. package/dist/packem_shared/discoverHyperdriveCalls-CwnXgjFJ.mjs +0 -1
  25. package/dist/packem_shared/discoverMaskProcedures-BTePIpmk.mjs +0 -1
  26. package/dist/packem_shared/discoverR2sqlCalls-XBhs4XRZ.mjs +0 -1
  27. package/dist/packem_shared/unwrap-handler-return-CJrkfrSH.mjs +0 -1
package/dist/index.d.mts CHANGED
@@ -5,8 +5,9 @@ import { LunoraError } from '@lunora/errors';
5
5
  export { MESSAGE_SOLUTIONS as LUNORA_SOLUTION_RULES, type Solution as LunoraSolution, type SolutionRule as LunoraSolutionRule, findSolutionByMessage as findLunoraSolution } from '@lunora/errors';
6
6
  import { Schema } from '@lunora/server';
7
7
  import { JsonSchema } from '@lunora/values';
8
- import { LanguageName } from 'quicktype-core';
8
+ export { type OpenRpcDocument, type OpenRpcMethod, type RuntimeVerb, SDK_LANGUAGES, SDK_TARGETS, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, generateSdk, isTypedSchema } from "./sdk/index.mjs";
9
9
  import { StudioFeaturesResult } from '@lunora/shard-engine';
10
+ import 'quicktype-core';
10
11
  /**
11
12
  * The architecture manifest — `_generated/architecture.json` — shared by the
12
13
  * codegen that builds it, the runtime that serves it at
@@ -4604,295 +4605,9 @@ declare const validatorIrToJsonSchema: (validator: ValidatorIR) => JsonSchema;
4604
4605
  * the contract; clients switch on `error.code`. Kept sorted for stable output.
4605
4606
  */
4606
4607
  declare const LUNORA_ERROR_CODES: ReadonlyArray<string>;
4607
- /**
4608
- * Language-agnostic half of SDK generation: turn an OpenRPC document
4609
- * (`_generated/openrpc.json`, see {@link file://../openrpc.ts}) into the parsed
4610
- * shape every per-language target renders from.
4611
- *
4612
- * Nothing here knows about a target language. A target supplies its own member
4613
- * naming and templates (see {@link file://./targets}); everything that would
4614
- * otherwise be re-derived per language — how a `functionPath` splits, which
4615
- * runtime verb a kind maps to, whether a schema is real or the untyped
4616
- * placeholder, how namespaces group and sort — lives here exactly once.
4617
- *
4618
- * That single-source rule is not stylistic. `paths.ts` documents the same
4619
- * discipline for namespaces ("if these ever disagree, runtime dispatch silently
4620
- * misses functions"), and the failure mode here is the same in a new costume: a
4621
- * target that re-derives a model name renders an import pointing at a class
4622
- * quicktype never emitted.
4623
- *
4624
- * Deriving names in one place is necessary but NOT sufficient, because only
4625
- * half the decision is ours: quicktype chooses whether a predicted name becomes
4626
- * a declared type, and different backends answer differently for the same
4627
- * schema. {@link withDeclaredModels} reconciles the two halves before a target
4628
- * renders anything.
4629
- */
4630
- /** One OpenRPC method as {@link file://../openrpc.ts} emits it. */
4631
- interface OpenRpcMethod {
4632
- name: string;
4633
- params?: ReadonlyArray<{
4634
- name: string;
4635
- schema?: Record<string, unknown>;
4636
- }>;
4637
- result?: {
4638
- name: string;
4639
- schema?: Record<string, unknown>;
4640
- };
4641
- summary?: string;
4642
- "x-lunora-function-kind"?: string;
4643
- }
4644
- /** The `_generated/openrpc.json` document. */
4645
- interface OpenRpcDocument {
4646
- info?: {
4647
- title?: string;
4648
- version?: string;
4649
- };
4650
- methods: ReadonlyArray<OpenRpcMethod>;
4651
- }
4652
- /** The runtime verbs a generated SDK can call. Mirrors the client transports. */
4653
- type RuntimeVerb = "action" | "mutation" | "query";
4654
- /** One RPC function, parsed and language-neutral. */
4655
- interface SdkMethod {
4656
- /**
4657
- * Where this function's ARGUMENT nulls mean "unset" and where they mean
4658
- * "null" — see {@link ModelNullPaths}.
4659
- *
4660
- * On the method rather than on a shared render input because it is a
4661
- * per-method fact and the parser already holds the schema it comes from. Read
4662
- * by the three targets whose rendered models cannot tell the two apart
4663
- * (ruby, rust, swift); the other five have a marker of their own and ignore
4664
- * it.
4665
- */
4666
- argsNullPaths: ModelNullPaths;
4667
- /**
4668
- * Generated args model name, or `undefined` when NO model could be named for
4669
- * this function's arguments.
4670
- *
4671
- * `undefined` does NOT mean "takes no arguments" — see {@link SdkMethod.takesArgs}.
4672
- * A schema carrying a `v.bigint()` or `v.bytes()` gets no model deliberately
4673
- * (`hasUnrepresentableWireType`), and a backend that cannot name a shape leaves
4674
- * it undeclared. Both still take arguments, just untyped ones.
4675
- */
4676
- argsType: string | undefined;
4677
- /** Raw exported function name (`"list"`), before any naming convention. */
4678
- functionName: string;
4679
- /** The wire identifier (`"messages:list"`), emitted verbatim into calls. */
4680
- functionPath: string;
4681
- /** Raw file namespace (`"messages"`), before any naming convention. */
4682
- namespace: string;
4683
- /** Generated result model name, or `undefined` while the result is untyped. */
4684
- resultType: string | undefined;
4685
- /** Human summary for the doc comment. */
4686
- summary: string;
4687
- /**
4688
- * Whether this function declares arguments at all, independent of whether a
4689
- * model could be named for them.
4690
- *
4691
- * A target emits three shapes from this: a TYPED parameter when `argsType` is
4692
- * set, an UNTYPED wire-shaped parameter when it is not but this is true, and no
4693
- * parameter at all when this is false. Collapsing the middle case into the last
4694
- * is what made `v.bigint()` functions uncallable with arguments.
4695
- */
4696
- takesArgs: boolean;
4697
- /** Which runtime verb this dispatches to. */
4698
- verb: RuntimeVerb;
4699
- }
4700
- /** One namespace's functions, sorted. */
4701
- interface SdkNamespace {
4702
- methods: ReadonlyArray<SdkMethod>;
4703
- /** Raw namespace (`"messages"`); a target applies its own casing. */
4704
- name: string;
4705
- }
4706
- /**
4707
- * True when a schema actually describes a shape.
4708
- *
4709
- * `openrpc.ts` emits a description-only placeholder for any function without a
4710
- * declared `.output()` (the return type is TS-inferred and absent from the IR).
4711
- * A placeholder must never become a generated model: quicktype would render an
4712
- * empty type, and the surface would decode every response into it — silently
4713
- * discarding the real payload rather than leaving it untyped.
4714
- */
4715
- declare const isTypedSchema: (schema: Record<string, unknown> | undefined) => boolean;
4716
- /**
4717
- * A path from a model's root to one property. `*` stands for every element of an
4718
- * array or every value of a record, neither of which has named positions.
4719
- */
4720
- type SchemaPath = ReadonlyArray<string>;
4721
- /**
4722
- * Where a model's nulls mean different things — the one fact a generated model
4723
- * flattens away, and the reason three ports could not send a `v.nullable()`
4724
- * argument at all.
4725
- *
4726
- * An unset `v.optional()` and a `v.nullable()` set to null are the SAME value in
4727
- * every generated model (a nil field), and opposite things on the wire: the
4728
- * validator rejects an explicit null for the first and requires the key present
4729
- * for the second. Neither Ruby, Rust nor Swift renders a marker telling them
4730
- * apart, so the distinction is computed here, from the schema, where `required`
4731
- * still exists — and handed to the targets that need it.
4732
- *
4733
- * Two lists rather than one because the ports need opposite operations. Ruby and
4734
- * Rust project a whole value tree and prune nulls, so they prune at
4735
- * {@link ModelNullPaths.optional} and nowhere else — which also stops them
4736
- * dropping a legitimate null inside a record or an array, as a blanket prune
4737
- * does. Swift's `JSONEncoder` has already dropped every struct-property nil
4738
- * before the transport sees a tree, so it restores nulls at
4739
- * {@link ModelNullPaths.nullable} instead: an absent key at a required path can
4740
- * only have been a nil, so putting the null back is exact.
4741
- *
4742
- * A `$ref` is NOT resolved. `openrpc.ts` inlines everything it emits, so this
4743
- * never comes up for a generated document — but `--spec` accepts a hand-written
4744
- * one, and there a `$ref`'d sub-object contributes no paths at all: the ports
4745
- * that prune would send its unset optionals as null, and Swift would not restore
4746
- * its nullables. Inline the schema, or teach this to follow the pointer.
4747
- *
4748
- * Both lists name PROPERTIES only. A record's values and an array's elements can
4749
- * be null too, but no port drops one: the pruning ports prune at `optional`
4750
- * paths, which a `*` position can never be, and `JSONEncoder` drops a nil only
4751
- * from a struct property — a nil inside a dictionary or array encodes as null.
4752
- * Listing a `*` leaf would also make Swift's restore INVENT record keys that
4753
- * were never there, which is why the walk records the path it descends through
4754
- * but never the `*` position itself.
4755
- */
4756
- interface ModelNullPaths {
4757
- /** Required properties that permit null — a null there is a VALUE and must survive. */
4758
- nullable: ReadonlyArray<SchemaPath>;
4759
- /** Properties absent from their object's `required` — a null there means UNSET. */
4760
- optional: ReadonlyArray<SchemaPath>;
4761
- }
4762
- /** What a target renders from. */
4763
- interface SdkRenderInput {
4764
- /**
4765
- * The rendered model source, to be written as the target's model file.
4766
- *
4767
- * Empty for a target that emits its own model FILES via
4768
- * {@link SdkTarget.renderModels} — those are already written, and this string
4769
- * exists only so the declared-model reconciliation reads one shape.
4770
- */
4771
- models: string;
4772
- /** Namespaces and their functions, already sorted. */
4773
- namespaces: ReadonlyArray<SdkNamespace>;
4774
- }
4775
- /**
4776
- * One directory or file of the hand-written transport, and where it lands in the
4777
- * output.
4778
- *
4779
- * `from` is relative to `sdks/<target id>/` and `to` is relative to `--out`. The
4780
- * two differ because a repo layout and a consumable layout are not the same
4781
- * shape: the Ruby transport lives under `lib/` so `ruby -Ilib` works in the
4782
- * repo, while a vendored copy has no `lib` to point at, and the Rust transport
4783
- * is the repo's root crate but a nested one in the output.
4784
- *
4785
- * Only the runtime is listed. A transport's own conformance suite and its
4786
- * `generated_check/` sample are deliberately absent — they assert against
4787
- * `protocol/fixtures/`, which is not copied, so vendoring them would ship a user
4788
- * a test suite that cannot run.
4789
- */
4790
- interface SdkVendorEntry {
4791
- /** Path under `sdks/<id>/`. A directory is copied recursively. */
4792
- from: string;
4793
- /** Destination path under `--out`. */
4794
- to: string;
4795
- }
4796
- /** A language target. One per `--lang` value. */
4797
- interface SdkTarget {
4798
- /** The `--lang` value (`"python"`, `"go"`, …). */
4799
- id: string;
4800
- /**
4801
- * The quicktype backend + renderer options that produce this target's
4802
- * models, or absent when the target emits its own (see
4803
- * {@link SdkTarget.renderModels}) or none at all.
4804
- *
4805
- * `LanguageName` is quicktype's own union, so a target naming a backend
4806
- * quicktype does not ship fails to compile rather than at run time.
4807
- */
4808
- quicktype?: {
4809
- lang: LanguageName;
4810
- rendererOptions?: Record<string, string>;
4811
- };
4812
- /**
4813
- * Render the SDK. Returns file contents keyed by path relative to the
4814
- * output directory (nested paths are created as needed).
4815
- *
4816
- * This includes the BUILD MANIFEST the layout needs — `go.mod`, `Cargo.toml`,
4817
- * `Package.swift`, a crate root — because those name the vendored transport
4818
- * and are therefore part of "how this language resolves the copy", not
4819
- * something a consumer should have to write. Languages that resolve by
4820
- * directory (Python, Ruby, Java, Kotlin) emit no manifest.
4821
- */
4822
- render: (input: SdkRenderInput) => Record<string, string>;
4823
- /**
4824
- * Emit this target's models from the schema directly, INSTEAD of quicktype,
4825
- * as file contents keyed by path relative to the output directory.
4826
- *
4827
- * Present only for the two JVM targets, and the exception is earned rather
4828
- * than a preference: quicktype's Java and Kotlin backends rename properties
4829
- * and, under `just-types`, emit no mapping metadata, so a model they render
4830
- * cannot be projected back onto the wire — and the only complete mapping
4831
- * they offer requires a Jackson / Klaxon / kotlinx dependency, which is the
4832
- * one thing these JDK-only transports are defined not to have.
4833
- * `targets/java.ts` records every option that was measured.
4834
- *
4835
- * A MAP rather than the single string quicktype returns, because Java takes
4836
- * one file per class: its single-file render is not compilable Java at all.
4837
- * The values are still joined for {@link SdkRenderInput.models}, so the
4838
- * declared-model reconciliation is the same code for every target.
4839
- */
4840
- renderModels?: (document: OpenRpcDocument) => Record<string, string>;
4841
- /**
4842
- * THIRD-PARTY packages a consuming project must still install, reported by
4843
- * the CLI. Empty for six of the eight — the transport is vendored and those
4844
- * six reach the wire with only their standard library.
4845
- *
4846
- * A list, and not derivable from the transport, because a target's MODELS can
4847
- * carry a dependency the transport does not: quicktype's Ruby backend emits
4848
- * `Dry::Struct` types with no renderer option to avoid them, so a Ruby SDK
4849
- * needs the gems even though `sdks/ruby` itself is dependency-free.
4850
- */
4851
- requires: ReadonlyArray<string>;
4852
- /**
4853
- * Which parts of `sdks/<id>/` are the transport, and where they land under
4854
- * `--out`. See {@link SdkVendorEntry}.
4855
- */
4856
- vendor: ReadonlyArray<SdkVendorEntry>;
4857
- }
4858
- /** Every language `lunora sdk generate --lang` accepts, keyed by id. */
4859
- declare const SDK_TARGETS: Readonly<Record<string, SdkTarget>>;
4860
- /** The accepted `--lang` values, sorted — for help text and error messages. */
4861
- declare const SDK_LANGUAGES: ReadonlyArray<string>;
4862
- /** The files a generation run writes, keyed by path relative to the output directory. */
4863
- type SdkFiles = Record<string, string>;
4864
- /** What a generation run produced, plus what it had to weaken and why. */
4865
- interface SdkResult {
4866
- files: SdkFiles;
4867
- /**
4868
- * Model names predicted from the schema that the chosen backend did not
4869
- * declare, so their call sites fell back to an untyped return. Surfaced
4870
- * rather than swallowed — silently weaker types are how an SDK looks
4871
- * finished while returning `Any` everywhere.
4872
- */
4873
- undeclared: ReadonlyArray<string>;
4874
- /**
4875
- * Functions whose args or result carry a `v.bigint()` or `v.bytes()`. No
4876
- * typed model can represent those — the wire needs a tagged value that no
4877
- * generated field produces — so their parameters stay untyped and the
4878
- * caller passes wire values directly.
4879
- */
4880
- unrepresentable: ReadonlyArray<string>;
4881
- }
4882
- /**
4883
- * Generate the SDK for `document` in `target`'s language.
4884
- *
4885
- * Async only because the model layer is: quicktype's renderer is promise-based.
4886
- * The surface itself is pure, so a target's `render` stays synchronous and
4887
- * unit-testable without touching quicktype.
4888
- *
4889
- * Models are rendered BEFORE the surface because the surface's model references
4890
- * depend on what the backend actually declared — see {@link withDeclaredModels}.
4891
- */
4892
- declare const generateSdk: (document: OpenRpcDocument, target: SdkTarget) => Promise<SdkResult>;
4893
4608
  /** The matching secret rule's `kind` for a string value, or `undefined` when none matches. */
4894
4609
  declare const secretKindOf: (value: string) => string | undefined;
4895
4610
  /** A redacted preview of a secret value — first 4 chars plus its length, never the full value. */
4896
4611
  declare const redact: (value: string) => string;
4897
4612
  declare const VERSION = "0.0.0";
4898
- export { AGENTS_FILENAME, type AgentIR, type ArchitectureManifest, type AuthApiCallIR, CAPABILITY_PROBES, CONTAINERS_FILENAME, type CapabilityKey, type CapabilityProbe, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContainerImageIR, type ContainerNamedImageIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DefaultScheduledContainerIR, type DriftChange, type DriftRemediation, type DriftScope, type DurableObjectScheduledContainerIR, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, type NotifyChannels, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcDocument, type OpenRpcEmitInput, type OpenRpcMethod, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, type RuntimeVerb, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SDK_LANGUAGES, SDK_TARGETS, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, type ServiceBindingIR, type ServiceLiteral, type ShapeIR, type SourceCapabilitySignals, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, type TopicIR, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerQueueProducerIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, capabilitiesUsedBy, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyChannels, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitInternalApi, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, fingerprintSchemaSources, foldCapabilitySignals, formatAdvisories, generateSdk, isD1GlobalTable, isHyperdriveGlobalTable, isTestPath, isTypedSchema, lintSchema, listLunoraSourceFiles, loadProjectConfig, mayReadCapabilityContext, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, readServiceBindings, redact, refreshCodegenProject, resolveCodegenTarget, resolveServiceBindings, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, sortedUniqueNames, sourceCapabilitySignals, toAdvisorContext, validatorIrToJsonSchema };
4613
+ export { AGENTS_FILENAME, type AgentIR, type ArchitectureManifest, type AuthApiCallIR, CAPABILITY_PROBES, CONTAINERS_FILENAME, type CapabilityKey, type CapabilityProbe, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContainerImageIR, type ContainerNamedImageIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DefaultScheduledContainerIR, type DriftChange, type DriftRemediation, type DriftScope, type DurableObjectScheduledContainerIR, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, type NotifyChannels, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcEmitInput, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type ServiceBindingIR, type ServiceLiteral, type ShapeIR, type SourceCapabilitySignals, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, type TopicIR, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerQueueProducerIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, capabilitiesUsedBy, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyChannels, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitInternalApi, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, fingerprintSchemaSources, foldCapabilitySignals, formatAdvisories, isD1GlobalTable, isHyperdriveGlobalTable, isTestPath, lintSchema, listLunoraSourceFiles, loadProjectConfig, mayReadCapabilityContext, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, readServiceBindings, redact, refreshCodegenProject, resolveCodegenTarget, resolveServiceBindings, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, sortedUniqueNames, sourceCapabilitySignals, toAdvisorContext, validatorIrToJsonSchema };
package/dist/index.d.ts CHANGED
@@ -5,8 +5,9 @@ import { LunoraError } from '@lunora/errors';
5
5
  export { MESSAGE_SOLUTIONS as LUNORA_SOLUTION_RULES, type Solution as LunoraSolution, type SolutionRule as LunoraSolutionRule, findSolutionByMessage as findLunoraSolution } from '@lunora/errors';
6
6
  import { Schema } from '@lunora/server';
7
7
  import { JsonSchema } from '@lunora/values';
8
- import { LanguageName } from 'quicktype-core';
8
+ export { type OpenRpcDocument, type OpenRpcMethod, type RuntimeVerb, SDK_LANGUAGES, SDK_TARGETS, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, generateSdk, isTypedSchema } from "./sdk/index.js";
9
9
  import { StudioFeaturesResult } from '@lunora/shard-engine';
10
+ import 'quicktype-core';
10
11
  /**
11
12
  * The architecture manifest — `_generated/architecture.json` — shared by the
12
13
  * codegen that builds it, the runtime that serves it at
@@ -4604,295 +4605,9 @@ declare const validatorIrToJsonSchema: (validator: ValidatorIR) => JsonSchema;
4604
4605
  * the contract; clients switch on `error.code`. Kept sorted for stable output.
4605
4606
  */
4606
4607
  declare const LUNORA_ERROR_CODES: ReadonlyArray<string>;
4607
- /**
4608
- * Language-agnostic half of SDK generation: turn an OpenRPC document
4609
- * (`_generated/openrpc.json`, see {@link file://../openrpc.ts}) into the parsed
4610
- * shape every per-language target renders from.
4611
- *
4612
- * Nothing here knows about a target language. A target supplies its own member
4613
- * naming and templates (see {@link file://./targets}); everything that would
4614
- * otherwise be re-derived per language — how a `functionPath` splits, which
4615
- * runtime verb a kind maps to, whether a schema is real or the untyped
4616
- * placeholder, how namespaces group and sort — lives here exactly once.
4617
- *
4618
- * That single-source rule is not stylistic. `paths.ts` documents the same
4619
- * discipline for namespaces ("if these ever disagree, runtime dispatch silently
4620
- * misses functions"), and the failure mode here is the same in a new costume: a
4621
- * target that re-derives a model name renders an import pointing at a class
4622
- * quicktype never emitted.
4623
- *
4624
- * Deriving names in one place is necessary but NOT sufficient, because only
4625
- * half the decision is ours: quicktype chooses whether a predicted name becomes
4626
- * a declared type, and different backends answer differently for the same
4627
- * schema. {@link withDeclaredModels} reconciles the two halves before a target
4628
- * renders anything.
4629
- */
4630
- /** One OpenRPC method as {@link file://../openrpc.ts} emits it. */
4631
- interface OpenRpcMethod {
4632
- name: string;
4633
- params?: ReadonlyArray<{
4634
- name: string;
4635
- schema?: Record<string, unknown>;
4636
- }>;
4637
- result?: {
4638
- name: string;
4639
- schema?: Record<string, unknown>;
4640
- };
4641
- summary?: string;
4642
- "x-lunora-function-kind"?: string;
4643
- }
4644
- /** The `_generated/openrpc.json` document. */
4645
- interface OpenRpcDocument {
4646
- info?: {
4647
- title?: string;
4648
- version?: string;
4649
- };
4650
- methods: ReadonlyArray<OpenRpcMethod>;
4651
- }
4652
- /** The runtime verbs a generated SDK can call. Mirrors the client transports. */
4653
- type RuntimeVerb = "action" | "mutation" | "query";
4654
- /** One RPC function, parsed and language-neutral. */
4655
- interface SdkMethod {
4656
- /**
4657
- * Where this function's ARGUMENT nulls mean "unset" and where they mean
4658
- * "null" — see {@link ModelNullPaths}.
4659
- *
4660
- * On the method rather than on a shared render input because it is a
4661
- * per-method fact and the parser already holds the schema it comes from. Read
4662
- * by the three targets whose rendered models cannot tell the two apart
4663
- * (ruby, rust, swift); the other five have a marker of their own and ignore
4664
- * it.
4665
- */
4666
- argsNullPaths: ModelNullPaths;
4667
- /**
4668
- * Generated args model name, or `undefined` when NO model could be named for
4669
- * this function's arguments.
4670
- *
4671
- * `undefined` does NOT mean "takes no arguments" — see {@link SdkMethod.takesArgs}.
4672
- * A schema carrying a `v.bigint()` or `v.bytes()` gets no model deliberately
4673
- * (`hasUnrepresentableWireType`), and a backend that cannot name a shape leaves
4674
- * it undeclared. Both still take arguments, just untyped ones.
4675
- */
4676
- argsType: string | undefined;
4677
- /** Raw exported function name (`"list"`), before any naming convention. */
4678
- functionName: string;
4679
- /** The wire identifier (`"messages:list"`), emitted verbatim into calls. */
4680
- functionPath: string;
4681
- /** Raw file namespace (`"messages"`), before any naming convention. */
4682
- namespace: string;
4683
- /** Generated result model name, or `undefined` while the result is untyped. */
4684
- resultType: string | undefined;
4685
- /** Human summary for the doc comment. */
4686
- summary: string;
4687
- /**
4688
- * Whether this function declares arguments at all, independent of whether a
4689
- * model could be named for them.
4690
- *
4691
- * A target emits three shapes from this: a TYPED parameter when `argsType` is
4692
- * set, an UNTYPED wire-shaped parameter when it is not but this is true, and no
4693
- * parameter at all when this is false. Collapsing the middle case into the last
4694
- * is what made `v.bigint()` functions uncallable with arguments.
4695
- */
4696
- takesArgs: boolean;
4697
- /** Which runtime verb this dispatches to. */
4698
- verb: RuntimeVerb;
4699
- }
4700
- /** One namespace's functions, sorted. */
4701
- interface SdkNamespace {
4702
- methods: ReadonlyArray<SdkMethod>;
4703
- /** Raw namespace (`"messages"`); a target applies its own casing. */
4704
- name: string;
4705
- }
4706
- /**
4707
- * True when a schema actually describes a shape.
4708
- *
4709
- * `openrpc.ts` emits a description-only placeholder for any function without a
4710
- * declared `.output()` (the return type is TS-inferred and absent from the IR).
4711
- * A placeholder must never become a generated model: quicktype would render an
4712
- * empty type, and the surface would decode every response into it — silently
4713
- * discarding the real payload rather than leaving it untyped.
4714
- */
4715
- declare const isTypedSchema: (schema: Record<string, unknown> | undefined) => boolean;
4716
- /**
4717
- * A path from a model's root to one property. `*` stands for every element of an
4718
- * array or every value of a record, neither of which has named positions.
4719
- */
4720
- type SchemaPath = ReadonlyArray<string>;
4721
- /**
4722
- * Where a model's nulls mean different things — the one fact a generated model
4723
- * flattens away, and the reason three ports could not send a `v.nullable()`
4724
- * argument at all.
4725
- *
4726
- * An unset `v.optional()` and a `v.nullable()` set to null are the SAME value in
4727
- * every generated model (a nil field), and opposite things on the wire: the
4728
- * validator rejects an explicit null for the first and requires the key present
4729
- * for the second. Neither Ruby, Rust nor Swift renders a marker telling them
4730
- * apart, so the distinction is computed here, from the schema, where `required`
4731
- * still exists — and handed to the targets that need it.
4732
- *
4733
- * Two lists rather than one because the ports need opposite operations. Ruby and
4734
- * Rust project a whole value tree and prune nulls, so they prune at
4735
- * {@link ModelNullPaths.optional} and nowhere else — which also stops them
4736
- * dropping a legitimate null inside a record or an array, as a blanket prune
4737
- * does. Swift's `JSONEncoder` has already dropped every struct-property nil
4738
- * before the transport sees a tree, so it restores nulls at
4739
- * {@link ModelNullPaths.nullable} instead: an absent key at a required path can
4740
- * only have been a nil, so putting the null back is exact.
4741
- *
4742
- * A `$ref` is NOT resolved. `openrpc.ts` inlines everything it emits, so this
4743
- * never comes up for a generated document — but `--spec` accepts a hand-written
4744
- * one, and there a `$ref`'d sub-object contributes no paths at all: the ports
4745
- * that prune would send its unset optionals as null, and Swift would not restore
4746
- * its nullables. Inline the schema, or teach this to follow the pointer.
4747
- *
4748
- * Both lists name PROPERTIES only. A record's values and an array's elements can
4749
- * be null too, but no port drops one: the pruning ports prune at `optional`
4750
- * paths, which a `*` position can never be, and `JSONEncoder` drops a nil only
4751
- * from a struct property — a nil inside a dictionary or array encodes as null.
4752
- * Listing a `*` leaf would also make Swift's restore INVENT record keys that
4753
- * were never there, which is why the walk records the path it descends through
4754
- * but never the `*` position itself.
4755
- */
4756
- interface ModelNullPaths {
4757
- /** Required properties that permit null — a null there is a VALUE and must survive. */
4758
- nullable: ReadonlyArray<SchemaPath>;
4759
- /** Properties absent from their object's `required` — a null there means UNSET. */
4760
- optional: ReadonlyArray<SchemaPath>;
4761
- }
4762
- /** What a target renders from. */
4763
- interface SdkRenderInput {
4764
- /**
4765
- * The rendered model source, to be written as the target's model file.
4766
- *
4767
- * Empty for a target that emits its own model FILES via
4768
- * {@link SdkTarget.renderModels} — those are already written, and this string
4769
- * exists only so the declared-model reconciliation reads one shape.
4770
- */
4771
- models: string;
4772
- /** Namespaces and their functions, already sorted. */
4773
- namespaces: ReadonlyArray<SdkNamespace>;
4774
- }
4775
- /**
4776
- * One directory or file of the hand-written transport, and where it lands in the
4777
- * output.
4778
- *
4779
- * `from` is relative to `sdks/<target id>/` and `to` is relative to `--out`. The
4780
- * two differ because a repo layout and a consumable layout are not the same
4781
- * shape: the Ruby transport lives under `lib/` so `ruby -Ilib` works in the
4782
- * repo, while a vendored copy has no `lib` to point at, and the Rust transport
4783
- * is the repo's root crate but a nested one in the output.
4784
- *
4785
- * Only the runtime is listed. A transport's own conformance suite and its
4786
- * `generated_check/` sample are deliberately absent — they assert against
4787
- * `protocol/fixtures/`, which is not copied, so vendoring them would ship a user
4788
- * a test suite that cannot run.
4789
- */
4790
- interface SdkVendorEntry {
4791
- /** Path under `sdks/<id>/`. A directory is copied recursively. */
4792
- from: string;
4793
- /** Destination path under `--out`. */
4794
- to: string;
4795
- }
4796
- /** A language target. One per `--lang` value. */
4797
- interface SdkTarget {
4798
- /** The `--lang` value (`"python"`, `"go"`, …). */
4799
- id: string;
4800
- /**
4801
- * The quicktype backend + renderer options that produce this target's
4802
- * models, or absent when the target emits its own (see
4803
- * {@link SdkTarget.renderModels}) or none at all.
4804
- *
4805
- * `LanguageName` is quicktype's own union, so a target naming a backend
4806
- * quicktype does not ship fails to compile rather than at run time.
4807
- */
4808
- quicktype?: {
4809
- lang: LanguageName;
4810
- rendererOptions?: Record<string, string>;
4811
- };
4812
- /**
4813
- * Render the SDK. Returns file contents keyed by path relative to the
4814
- * output directory (nested paths are created as needed).
4815
- *
4816
- * This includes the BUILD MANIFEST the layout needs — `go.mod`, `Cargo.toml`,
4817
- * `Package.swift`, a crate root — because those name the vendored transport
4818
- * and are therefore part of "how this language resolves the copy", not
4819
- * something a consumer should have to write. Languages that resolve by
4820
- * directory (Python, Ruby, Java, Kotlin) emit no manifest.
4821
- */
4822
- render: (input: SdkRenderInput) => Record<string, string>;
4823
- /**
4824
- * Emit this target's models from the schema directly, INSTEAD of quicktype,
4825
- * as file contents keyed by path relative to the output directory.
4826
- *
4827
- * Present only for the two JVM targets, and the exception is earned rather
4828
- * than a preference: quicktype's Java and Kotlin backends rename properties
4829
- * and, under `just-types`, emit no mapping metadata, so a model they render
4830
- * cannot be projected back onto the wire — and the only complete mapping
4831
- * they offer requires a Jackson / Klaxon / kotlinx dependency, which is the
4832
- * one thing these JDK-only transports are defined not to have.
4833
- * `targets/java.ts` records every option that was measured.
4834
- *
4835
- * A MAP rather than the single string quicktype returns, because Java takes
4836
- * one file per class: its single-file render is not compilable Java at all.
4837
- * The values are still joined for {@link SdkRenderInput.models}, so the
4838
- * declared-model reconciliation is the same code for every target.
4839
- */
4840
- renderModels?: (document: OpenRpcDocument) => Record<string, string>;
4841
- /**
4842
- * THIRD-PARTY packages a consuming project must still install, reported by
4843
- * the CLI. Empty for six of the eight — the transport is vendored and those
4844
- * six reach the wire with only their standard library.
4845
- *
4846
- * A list, and not derivable from the transport, because a target's MODELS can
4847
- * carry a dependency the transport does not: quicktype's Ruby backend emits
4848
- * `Dry::Struct` types with no renderer option to avoid them, so a Ruby SDK
4849
- * needs the gems even though `sdks/ruby` itself is dependency-free.
4850
- */
4851
- requires: ReadonlyArray<string>;
4852
- /**
4853
- * Which parts of `sdks/<id>/` are the transport, and where they land under
4854
- * `--out`. See {@link SdkVendorEntry}.
4855
- */
4856
- vendor: ReadonlyArray<SdkVendorEntry>;
4857
- }
4858
- /** Every language `lunora sdk generate --lang` accepts, keyed by id. */
4859
- declare const SDK_TARGETS: Readonly<Record<string, SdkTarget>>;
4860
- /** The accepted `--lang` values, sorted — for help text and error messages. */
4861
- declare const SDK_LANGUAGES: ReadonlyArray<string>;
4862
- /** The files a generation run writes, keyed by path relative to the output directory. */
4863
- type SdkFiles = Record<string, string>;
4864
- /** What a generation run produced, plus what it had to weaken and why. */
4865
- interface SdkResult {
4866
- files: SdkFiles;
4867
- /**
4868
- * Model names predicted from the schema that the chosen backend did not
4869
- * declare, so their call sites fell back to an untyped return. Surfaced
4870
- * rather than swallowed — silently weaker types are how an SDK looks
4871
- * finished while returning `Any` everywhere.
4872
- */
4873
- undeclared: ReadonlyArray<string>;
4874
- /**
4875
- * Functions whose args or result carry a `v.bigint()` or `v.bytes()`. No
4876
- * typed model can represent those — the wire needs a tagged value that no
4877
- * generated field produces — so their parameters stay untyped and the
4878
- * caller passes wire values directly.
4879
- */
4880
- unrepresentable: ReadonlyArray<string>;
4881
- }
4882
- /**
4883
- * Generate the SDK for `document` in `target`'s language.
4884
- *
4885
- * Async only because the model layer is: quicktype's renderer is promise-based.
4886
- * The surface itself is pure, so a target's `render` stays synchronous and
4887
- * unit-testable without touching quicktype.
4888
- *
4889
- * Models are rendered BEFORE the surface because the surface's model references
4890
- * depend on what the backend actually declared — see {@link withDeclaredModels}.
4891
- */
4892
- declare const generateSdk: (document: OpenRpcDocument, target: SdkTarget) => Promise<SdkResult>;
4893
4608
  /** The matching secret rule's `kind` for a string value, or `undefined` when none matches. */
4894
4609
  declare const secretKindOf: (value: string) => string | undefined;
4895
4610
  /** A redacted preview of a secret value — first 4 chars plus its length, never the full value. */
4896
4611
  declare const redact: (value: string) => string;
4897
4612
  declare const VERSION = "0.0.0";
4898
- export { AGENTS_FILENAME, type AgentIR, type ArchitectureManifest, type AuthApiCallIR, CAPABILITY_PROBES, CONTAINERS_FILENAME, type CapabilityKey, type CapabilityProbe, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContainerImageIR, type ContainerNamedImageIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DefaultScheduledContainerIR, type DriftChange, type DriftRemediation, type DriftScope, type DurableObjectScheduledContainerIR, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, type NotifyChannels, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcDocument, type OpenRpcEmitInput, type OpenRpcMethod, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, type RuntimeVerb, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SDK_LANGUAGES, SDK_TARGETS, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, type ServiceBindingIR, type ServiceLiteral, type ShapeIR, type SourceCapabilitySignals, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, type TopicIR, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerQueueProducerIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, capabilitiesUsedBy, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyChannels, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitInternalApi, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, fingerprintSchemaSources, foldCapabilitySignals, formatAdvisories, generateSdk, isD1GlobalTable, isHyperdriveGlobalTable, isTestPath, isTypedSchema, lintSchema, listLunoraSourceFiles, loadProjectConfig, mayReadCapabilityContext, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, readServiceBindings, redact, refreshCodegenProject, resolveCodegenTarget, resolveServiceBindings, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, sortedUniqueNames, sourceCapabilitySignals, toAdvisorContext, validatorIrToJsonSchema };
4613
+ export { AGENTS_FILENAME, type AgentIR, type ArchitectureManifest, type AuthApiCallIR, CAPABILITY_PROBES, CONTAINERS_FILENAME, type CapabilityKey, type CapabilityProbe, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContainerImageIR, type ContainerNamedImageIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DefaultScheduledContainerIR, type DriftChange, type DriftRemediation, type DriftScope, type DurableObjectScheduledContainerIR, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, type NotifyChannels, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcEmitInput, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type ServiceBindingIR, type ServiceLiteral, type ShapeIR, type SourceCapabilitySignals, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, type TopicIR, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerQueueProducerIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, capabilitiesUsedBy, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyChannels, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitInternalApi, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, fingerprintSchemaSources, foldCapabilitySignals, formatAdvisories, isD1GlobalTable, isHyperdriveGlobalTable, isTestPath, lintSchema, listLunoraSourceFiles, loadProjectConfig, mayReadCapabilityContext, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, readServiceBindings, redact, refreshCodegenProject, resolveCodegenTarget, resolveServiceBindings, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, sortedUniqueNames, sourceCapabilitySignals, toAdvisorContext, validatorIrToJsonSchema };