@lunora/codegen 1.0.0-alpha.42 → 1.0.0-alpha.43

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/dist/index.d.mts CHANGED
@@ -451,6 +451,64 @@ interface WorkflowIR {
451
451
  */
452
452
  steps: ReadonlyArray<WorkflowStepIR>;
453
453
  }
454
+ /**
455
+ * An agent lifted from a `defineAgent()` export in `lunora/agents.ts`. A
456
+ * `defineAgent` compiles its durable tool-loop onto a Cloudflare Workflow, so —
457
+ * like {@link WorkflowIR} — an agent is NOT a Durable Object: wrangler gets only
458
+ * a `workflows[]` entry, never a `durable_objects` binding or a migration class.
459
+ * Carries what the emitters and the config layer need to wire the generated
460
+ * agent `WorkflowEntrypoint` class (e.g. `SupportAgentWorkflow`), the typed
461
+ * per-agent `ctx.agents` producer, and the reconciled wrangler `workflows[]`
462
+ * entry. Names are derived via `@lunora/agent`'s shared helpers so codegen and
463
+ * the config layer can never disagree.
464
+ */
465
+ interface AgentIR {
466
+ /** The Cloudflare `Workflow` binding name, e.g. `AGENT_SUPPORT`. */
467
+ bindingName: string;
468
+ /** Generated `WorkflowEntrypoint` class name, e.g. `SupportAgentWorkflow`. */
469
+ className: string;
470
+ /** The `lunora/agents.ts` export name, e.g. `support`. */
471
+ exportName: string;
472
+ /**
473
+ * The stable wrangler `workflows[].name`. Defaults to the kebab-cased export
474
+ * name (`support` → `agent-support`); a static `name:` literal in the
475
+ * definition overrides it.
476
+ */
477
+ name: string;
478
+ /**
479
+ * Whether the definition declares an `onEmail` mapper on
480
+ * `defineAgent({ onEmail: … })`. When `true` the emitter wires this agent
481
+ * onto the worker's top-level `email()` handler (via `@lunora/agent/inbound`)
482
+ * so inbound mail starts a durable run. Detected by AST PRESENCE — the
483
+ * closure is never evaluated — and written to IR only when present, so
484
+ * email-free agents (and agent-free projects) stay byte-identical.
485
+ */
486
+ onEmail?: boolean;
487
+ /**
488
+ * Whether the definition opted into public run-starts via
489
+ * `defineAgent({ publicRun: true })` — emitted into the `ctx.agents` wiring
490
+ * spec so the public `agents:agentRun` mutation can gate on it fail-closed.
491
+ * Absent (falsy) means server-side starts only; the field is written to IR
492
+ * only when the literal is `true`, so agent-free and non-opted-in output is
493
+ * byte-identical.
494
+ */
495
+ publicRun?: boolean;
496
+ /**
497
+ * Whether the definition opted into a real-time voice session via a `voice`
498
+ * block on `defineAgent({ voice: … })`. Unlike the durable loop (a Workflow),
499
+ * the voice path IS a Durable Object — so when this is `true` the emitter
500
+ * generates the `voiceClassName` `VoiceSessionDO` subclass and the
501
+ * `api.agents.{name}Voice` client reference, and the config layer reconciles
502
+ * a `durable_objects` binding (`voiceBindingName`) + `new_sqlite_classes`
503
+ * migration. Written to IR only when the literal is present, so voice-free
504
+ * agents (and agent-free projects) stay byte-identical.
505
+ */
506
+ voice?: boolean;
507
+ /** The voice DO's Cloudflare `DurableObjectNamespace` binding name, e.g. `VOICE_SUPPORT`. Present only when `voice`. */
508
+ voiceBindingName?: string;
509
+ /** Generated `VoiceSessionDO` subclass name, e.g. `SupportVoiceDO`. Present only when `voice`. */
510
+ voiceClassName?: string;
511
+ }
454
512
  /** One durable step call lifted from a workflow handler body (the use side of {@link WorkflowIR.steps}). */
455
513
  interface WorkflowStepIR {
456
514
  /** 1-based line of the durable step call. */
@@ -1692,6 +1750,19 @@ declare class CodegenDiagnosticError extends LunoraError {
1692
1750
  * lookup is unaffected.
1693
1751
  */
1694
1752
  declare const diagnosticAt: (node: Node, detail: string, meta?: Record<string, unknown>) => CodegenDiagnosticError;
1753
+ /** The only file agents may be declared in — mirrors `lunora/workflows.ts`. */
1754
+ declare const AGENTS_FILENAME = "agents.ts";
1755
+ /**
1756
+ * Discover every agent the project declares: exported `defineAgent()` calls in
1757
+ * `lunora/agents.ts`. Returns `[]` when the file doesn't exist. Only four things
1758
+ * are read statically — the optional `name` override (wrangler `workflows[].name`),
1759
+ * the optional `publicRun` opt-in (the `agents:agentRun` capability gate), the
1760
+ * presence of a `voice` block (which turns on the voice-session Durable Object),
1761
+ * and the presence of an `onEmail` mapper (which wires the worker `email()`
1762
+ * handler); the rest of the agent config (model / tools / memory / voice models /
1763
+ * the `onEmail` closure body) is runtime-only, so codegen never evaluates it.
1764
+ */
1765
+ declare const discoverAgents: (project: Project, lunoraDirectory: string) => AgentIR[];
1695
1766
  /**
1696
1767
  * Discover `ctx.authApi.&lt;method>(...)` (and bare `authApi.&lt;method>(...)`) calls
1697
1768
  * under the lunora source directory and attribute each to the exported function
@@ -1713,10 +1784,11 @@ declare const discoverContainers: (project: Project, lunoraDirectory: string) =>
1713
1784
  * (`crons.interval(...)`, `crons.daily(...)`, `crons.cron(...)`, …) and lift them
1714
1785
  * into {@link CronJobIR}. Schedules are compiled to standard cron expressions;
1715
1786
  * function references are resolved to their `namespace:fn` dispatch path, while a
1716
- * bare identifier naming a declared workflow (`workflows`) resolves to a durable
1717
- * workflow start. Names must be unique across the project.
1787
+ * `workflows.NAME` / `agents.NAME` reference (or a bare identifier naming a
1788
+ * declared workflow) resolves to a durable workflow start. Names must be unique
1789
+ * across the project.
1718
1790
  */
1719
- declare const discoverCrons: (project: Project, lunoraDirectory: string, workflows?: ReadonlyArray<WorkflowIR>) => CronJobIR[];
1791
+ declare const discoverCrons: (project: Project, lunoraDirectory: string, workflows?: ReadonlyArray<WorkflowIR>, agents?: ReadonlyArray<AgentIR>) => CronJobIR[];
1720
1792
  /** The only file a feature-flag provider may be declared in — mirrors `lunora/queues.ts`. */
1721
1793
  declare const FLAGS_FILENAME = "flags.ts";
1722
1794
  /** One statically-discovered flag read: the key plus the value type its `ctx.flags.&lt;type>` call implies. */
@@ -1887,13 +1959,19 @@ declare const GENERATED_HEADER = "// GENERATED by @lunora/codegen — do not edi
1887
1959
  declare const emitDataModel: (schema: SchemaIR, useUmbrella?: boolean) => string;
1888
1960
  /**
1889
1961
  * Emit `_generated/api.ts` — the typed `api.*` registry (public functions), the
1890
- * `internal.*` registry, and (when the project declares workflows) the typed
1891
- * `workflows.*` reference object. `api`/`internal` are the same `anyApi` proxy
1962
+ * `internal.*` registry, and (when the project declares them) the typed
1963
+ * `workflows.*` / `agents.*` scheduler-target reference objects. `api`/`internal` are the same `anyApi` proxy
1892
1964
  * at runtime (the `__lunoraRef` is identical); visibility is enforced
1893
1965
  * server-side at dispatch, not in the reference. Splitting the *types* keeps
1894
1966
  * internal functions off the client-facing `api` surface.
1895
1967
  */
1896
- declare const emitApi: (functions: ReadonlyArray<FunctionIR>, workflows?: ReadonlyArray<WorkflowIR>, useUmbrella?: boolean) => string;
1968
+ interface EmitApiOptions {
1969
+ agents?: ReadonlyArray<AgentIR>;
1970
+ functions: ReadonlyArray<FunctionIR>;
1971
+ useUmbrella?: boolean;
1972
+ workflows?: ReadonlyArray<WorkflowIR>;
1973
+ }
1974
+ declare const emitApi: (options: EmitApiOptions) => string;
1897
1975
  /**
1898
1976
  * Emit `_generated/seed.ts` — a project-bound `createSeedClient` with this
1899
1977
  * schema's `InsertModel` and runtime schema pre-applied, so a test or script
@@ -1904,7 +1982,6 @@ declare const emitApi: (functions: ReadonlyArray<FunctionIR>, workflows?: Readon
1904
1982
  * Returns `""` when `@lunora/seed` is not a declared dependency, so projects
1905
1983
  * that don't use it keep a clean `_generated/` and never import the package.
1906
1984
  */
1907
-
1908
1985
  /**
1909
1986
  * Emit `_generated/collections.ts` — one TanStack DB collection factory per
1910
1987
  * `defineShape` in `lunora/shapes.ts` (the local-first partial-replication
@@ -1921,6 +1998,8 @@ declare const emitApi: (functions: ReadonlyArray<FunctionIR>, workflows?: Readon
1921
1998
  */
1922
1999
  declare const emitCollections: (shapes: ReadonlyArray<ShapeIR>, hasDatabase: boolean, useUmbrella?: boolean) => string;
1923
2000
  interface EmitServerOptions {
2001
+ /** Agents declared via `defineAgent` exports — wires the typed `ctx.agents` producers onto Mutation/Action contexts. */
2002
+ agents?: ReadonlyArray<AgentIR>;
1924
2003
  containers?: ReadonlyArray<ContainerIR>;
1925
2004
  /**
1926
2005
  * The single `defineEnv(...)` contract declared in `lunora/env.ts`. When
@@ -1974,6 +2053,7 @@ interface EmitServerOptions {
1974
2053
  workflows?: ReadonlyArray<WorkflowIR>;
1975
2054
  }
1976
2055
  declare const emitServer: ({
2056
+ agents,
1977
2057
  containers,
1978
2058
  env,
1979
2059
  hasAccessFacade,
@@ -1995,7 +2075,17 @@ declare const emitServer: ({
1995
2075
  useUmbrella,
1996
2076
  workflows
1997
2077
  }?: EmitServerOptions) => string;
1998
- declare const emitFunctions: (functions: ReadonlyArray<FunctionIR>, migrations?: ReadonlyArray<MigrationIR>, useUmbrella?: boolean, mutators?: ReadonlyArray<MutatorIR>, shapes?: ReadonlyArray<ShapeIR>) => string;
2078
+ interface EmitFunctionsOptions {
2079
+ agents?: ReadonlyArray<AgentIR>;
2080
+ functions: ReadonlyArray<FunctionIR>;
2081
+ migrations?: ReadonlyArray<MigrationIR>;
2082
+ mutators?: ReadonlyArray<MutatorIR>;
2083
+ shapes?: ReadonlyArray<ShapeIR>;
2084
+ /** Import of a sandbox tool (`browserTool`/`containerTool`) auto-registers the `sandbox:invoke` action. */
2085
+ usesSandbox?: boolean;
2086
+ useUmbrella?: boolean;
2087
+ }
2088
+ declare const emitFunctions: (options: EmitFunctionsOptions) => string;
1999
2089
  /**
2000
2090
  * Storage-column map per table for the file browser: `{ table: [field, …] }` for
2001
2091
  * every field declared `v.storage(...)` (unwrapping `v.optional(...)`). The
@@ -2024,6 +2114,16 @@ declare const emitContainers: (containers: ReadonlyArray<ContainerIR>, jurisdict
2024
2114
  */
2025
2115
  declare const emitWorkflows: (workflows: ReadonlyArray<WorkflowIR>) => string;
2026
2116
  /**
2117
+ * Emit `_generated/agents.ts` — one `WorkflowEntrypoint` class per `defineAgent`
2118
+ * export, each a thin subclass of `LunoraWorkflow` (`@lunora/workflow/do`)
2119
+ * constructed with the compiled agent tool-loop (`compileAgentWorkflow`). Like
2120
+ * `_generated/workflows.ts`, the worker entry must re-export these classes:
2121
+ * wrangler requires every `workflows[].class_name` to be exported by the
2122
+ * deployed worker. Returns "" when the project declares no agents (the file is
2123
+ * not written then).
2124
+ */
2125
+ declare const emitAgents: (agents: ReadonlyArray<AgentIR>) => string;
2126
+ /**
2027
2127
  * Emit `_generated/queues.ts` — the push-consumer registry the worker `queue()`
2028
2128
  * handler dispatches through. Maps each push queue's stable wrangler name (which
2029
2129
  * `batch.queue` carries) to its `defineQueue` definition + export name. Pull
@@ -2033,6 +2133,8 @@ declare const emitWorkflows: (workflows: ReadonlyArray<WorkflowIR>) => string;
2033
2133
  */
2034
2134
  interface EmitShardOptions {
2035
2135
  advisories?: ReadonlyArray<Finding>;
2136
+ /** Agents declared via `defineAgent` exports in `lunora/agents.ts` — wires the typed `ctx.agents` producers. */
2137
+ agents?: ReadonlyArray<AgentIR>;
2036
2138
  containers?: ReadonlyArray<ContainerIR>;
2037
2139
  /** The single `defineEnv(...)` contract declared in `lunora/env.ts` — applies the accessor to the worker `env` to populate `ctx.env`. */
2038
2140
  env?: EnvIR;
@@ -2080,6 +2182,7 @@ interface EmitShardOptions {
2080
2182
  }
2081
2183
  declare const emitShard: ({
2082
2184
  advisories,
2185
+ agents,
2083
2186
  containers,
2084
2187
  env,
2085
2188
  flagKeys,
@@ -2165,6 +2268,16 @@ declare const emitVectors: (vectorIndexes: ReadonlyArray<VectorIndexIR>) => stri
2165
2268
  declare const emitWranglerCronTriggers: (crons: ReadonlyArray<CronJobIR>) => string[];
2166
2269
  /** Which capability methods the generated `defineApp` builder exposes — one flag per package-backed feature the app actually uses. */
2167
2270
  interface EmitAppOptions {
2271
+ /**
2272
+ * Inbound-email agents (`defineAgent({ onEmail })`) → wire the worker's
2273
+ * top-level `email()` handler to `dispatchAgentEmail(...)` (from
2274
+ * `@lunora/agent/inbound`), so received mail starts a durable run. Empty/absent
2275
+ * ⇒ no wiring, byte-identical output for email-free (and agent-free) projects.
2276
+ */
2277
+ emailAgents?: ReadonlyArray<{
2278
+ bindingName: string;
2279
+ exportName: string;
2280
+ }>;
2168
2281
  /** App depends on `@lunora/cloudflare-access` → emit `.access()` (wire the Cloudflare Access `resolveIdentity`, composed ahead of `@lunora/auth` when both are present). */
2169
2282
  hasAccess: boolean;
2170
2283
  /** App uses `@lunora/ai` / `ctx.ai` → emit `.ai()` (override the Workers AI binding backing `ctx.ai`). */
@@ -2209,6 +2322,17 @@ interface EmitAppOptions {
2209
2322
  jurisdiction?: JurisdictionIR;
2210
2323
  /** Project depends on the unscoped `lunorash` umbrella → import the runtime via `lunorash/runtime` instead of `@lunora/runtime`. */
2211
2324
  useUmbrella: boolean;
2325
+ /**
2326
+ * Voice-enabled agents (`defineAgent({ voice: … })`) → wire
2327
+ * `options.voiceAgents`, mapping each agent's export name to its `VOICE_*`
2328
+ * Durable Object namespace binding so the runtime exposes
2329
+ * `/_lunora/voice/&lt;exportName>`. Empty/absent ⇒ no wiring, byte-identical
2330
+ * output for voice-free (and agent-free) projects.
2331
+ */
2332
+ voiceAgents?: ReadonlyArray<{
2333
+ bindingName: string;
2334
+ exportName: string;
2335
+ }>;
2212
2336
  /** An OpenAPI spec is emitted (`openapi.ts`) → wire `openApiSpec` into the worker. */
2213
2337
  wantsOpenApi: boolean;
2214
2338
  /** An OpenRPC spec is emitted (`openrpc.ts`) → wire `openRpcSpec` into the worker. */
@@ -2553,6 +2677,13 @@ interface CodegenResult {
2553
2677
  */
2554
2678
  advisories: ReadonlyArray<Finding>;
2555
2679
  /**
2680
+ * Agents discovered from `defineAgent` exports in `lunora/agents.ts` — the
2681
+ * list the config layer reconciles into wrangler's `workflows[]` array (an
2682
+ * agent compiles onto a Cloudflare Workflow). Agents are NOT Durable Objects,
2683
+ * so this adds no binding or migration. Empty when the project declares none.
2684
+ */
2685
+ agents: ReadonlyArray<AgentIR>;
2686
+ /**
2556
2687
  * Containers discovered from `defineContainer` exports in
2557
2688
  * `lunora/containers.ts` — the list the config layer reconciles into
2558
2689
  * wrangler's `containers[]`, `CONTAINER_*` Durable Object bindings, and
@@ -2566,6 +2697,8 @@ interface CodegenResult {
2566
2697
  */
2567
2698
  cronTriggers: ReadonlyArray<string>;
2568
2699
  generated: {
2700
+ /** WorkflowEntrypoint classes for declared agents (`_generated/agents.ts`); `""` (and not written) when no agents are declared. */
2701
+ agents: string;
2569
2702
  api: string; /** Fluent worker-composition builder (`_generated/app.ts`) — `defineApp()`. Always written. */
2570
2703
  app: string;
2571
2704
  /** Partial-replication collection factories (`_generated/collections.ts`); `""` (and not written) unless the project declares shapes and installs `@lunora/db`. */
@@ -2661,4 +2794,4 @@ declare const secretKindOf: (value: string) => string | undefined;
2661
2794
  /** A redacted preview of a secret value — first 4 chars plus its length, never the full value. */
2662
2795
  declare const redact: (value: string) => string;
2663
2796
  declare const VERSION = "0.0.0";
2664
- export { type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type CronJobIR, type DriftChange, 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, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcEmitInput, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type R2sqlCallIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SHAPES_FILENAME, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, diagnosticAt, diffSchemaSnapshots, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, evaluateSchemaDrift, formatAdvisories, lintSchema, parseSchemaSnapshot, redact, refreshCodegenProject, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, validatorIrToJsonSchema };
2797
+ export { AGENTS_FILENAME, type AgentIR, type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type CronJobIR, type DriftChange, 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, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcEmitInput, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type R2sqlCallIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SHAPES_FILENAME, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, evaluateSchemaDrift, formatAdvisories, lintSchema, parseSchemaSnapshot, redact, refreshCodegenProject, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, validatorIrToJsonSchema };
package/dist/index.d.ts CHANGED
@@ -451,6 +451,64 @@ interface WorkflowIR {
451
451
  */
452
452
  steps: ReadonlyArray<WorkflowStepIR>;
453
453
  }
454
+ /**
455
+ * An agent lifted from a `defineAgent()` export in `lunora/agents.ts`. A
456
+ * `defineAgent` compiles its durable tool-loop onto a Cloudflare Workflow, so —
457
+ * like {@link WorkflowIR} — an agent is NOT a Durable Object: wrangler gets only
458
+ * a `workflows[]` entry, never a `durable_objects` binding or a migration class.
459
+ * Carries what the emitters and the config layer need to wire the generated
460
+ * agent `WorkflowEntrypoint` class (e.g. `SupportAgentWorkflow`), the typed
461
+ * per-agent `ctx.agents` producer, and the reconciled wrangler `workflows[]`
462
+ * entry. Names are derived via `@lunora/agent`'s shared helpers so codegen and
463
+ * the config layer can never disagree.
464
+ */
465
+ interface AgentIR {
466
+ /** The Cloudflare `Workflow` binding name, e.g. `AGENT_SUPPORT`. */
467
+ bindingName: string;
468
+ /** Generated `WorkflowEntrypoint` class name, e.g. `SupportAgentWorkflow`. */
469
+ className: string;
470
+ /** The `lunora/agents.ts` export name, e.g. `support`. */
471
+ exportName: string;
472
+ /**
473
+ * The stable wrangler `workflows[].name`. Defaults to the kebab-cased export
474
+ * name (`support` → `agent-support`); a static `name:` literal in the
475
+ * definition overrides it.
476
+ */
477
+ name: string;
478
+ /**
479
+ * Whether the definition declares an `onEmail` mapper on
480
+ * `defineAgent({ onEmail: … })`. When `true` the emitter wires this agent
481
+ * onto the worker's top-level `email()` handler (via `@lunora/agent/inbound`)
482
+ * so inbound mail starts a durable run. Detected by AST PRESENCE — the
483
+ * closure is never evaluated — and written to IR only when present, so
484
+ * email-free agents (and agent-free projects) stay byte-identical.
485
+ */
486
+ onEmail?: boolean;
487
+ /**
488
+ * Whether the definition opted into public run-starts via
489
+ * `defineAgent({ publicRun: true })` — emitted into the `ctx.agents` wiring
490
+ * spec so the public `agents:agentRun` mutation can gate on it fail-closed.
491
+ * Absent (falsy) means server-side starts only; the field is written to IR
492
+ * only when the literal is `true`, so agent-free and non-opted-in output is
493
+ * byte-identical.
494
+ */
495
+ publicRun?: boolean;
496
+ /**
497
+ * Whether the definition opted into a real-time voice session via a `voice`
498
+ * block on `defineAgent({ voice: … })`. Unlike the durable loop (a Workflow),
499
+ * the voice path IS a Durable Object — so when this is `true` the emitter
500
+ * generates the `voiceClassName` `VoiceSessionDO` subclass and the
501
+ * `api.agents.{name}Voice` client reference, and the config layer reconciles
502
+ * a `durable_objects` binding (`voiceBindingName`) + `new_sqlite_classes`
503
+ * migration. Written to IR only when the literal is present, so voice-free
504
+ * agents (and agent-free projects) stay byte-identical.
505
+ */
506
+ voice?: boolean;
507
+ /** The voice DO's Cloudflare `DurableObjectNamespace` binding name, e.g. `VOICE_SUPPORT`. Present only when `voice`. */
508
+ voiceBindingName?: string;
509
+ /** Generated `VoiceSessionDO` subclass name, e.g. `SupportVoiceDO`. Present only when `voice`. */
510
+ voiceClassName?: string;
511
+ }
454
512
  /** One durable step call lifted from a workflow handler body (the use side of {@link WorkflowIR.steps}). */
455
513
  interface WorkflowStepIR {
456
514
  /** 1-based line of the durable step call. */
@@ -1692,6 +1750,19 @@ declare class CodegenDiagnosticError extends LunoraError {
1692
1750
  * lookup is unaffected.
1693
1751
  */
1694
1752
  declare const diagnosticAt: (node: Node, detail: string, meta?: Record<string, unknown>) => CodegenDiagnosticError;
1753
+ /** The only file agents may be declared in — mirrors `lunora/workflows.ts`. */
1754
+ declare const AGENTS_FILENAME = "agents.ts";
1755
+ /**
1756
+ * Discover every agent the project declares: exported `defineAgent()` calls in
1757
+ * `lunora/agents.ts`. Returns `[]` when the file doesn't exist. Only four things
1758
+ * are read statically — the optional `name` override (wrangler `workflows[].name`),
1759
+ * the optional `publicRun` opt-in (the `agents:agentRun` capability gate), the
1760
+ * presence of a `voice` block (which turns on the voice-session Durable Object),
1761
+ * and the presence of an `onEmail` mapper (which wires the worker `email()`
1762
+ * handler); the rest of the agent config (model / tools / memory / voice models /
1763
+ * the `onEmail` closure body) is runtime-only, so codegen never evaluates it.
1764
+ */
1765
+ declare const discoverAgents: (project: Project, lunoraDirectory: string) => AgentIR[];
1695
1766
  /**
1696
1767
  * Discover `ctx.authApi.&lt;method>(...)` (and bare `authApi.&lt;method>(...)`) calls
1697
1768
  * under the lunora source directory and attribute each to the exported function
@@ -1713,10 +1784,11 @@ declare const discoverContainers: (project: Project, lunoraDirectory: string) =>
1713
1784
  * (`crons.interval(...)`, `crons.daily(...)`, `crons.cron(...)`, …) and lift them
1714
1785
  * into {@link CronJobIR}. Schedules are compiled to standard cron expressions;
1715
1786
  * function references are resolved to their `namespace:fn` dispatch path, while a
1716
- * bare identifier naming a declared workflow (`workflows`) resolves to a durable
1717
- * workflow start. Names must be unique across the project.
1787
+ * `workflows.NAME` / `agents.NAME` reference (or a bare identifier naming a
1788
+ * declared workflow) resolves to a durable workflow start. Names must be unique
1789
+ * across the project.
1718
1790
  */
1719
- declare const discoverCrons: (project: Project, lunoraDirectory: string, workflows?: ReadonlyArray<WorkflowIR>) => CronJobIR[];
1791
+ declare const discoverCrons: (project: Project, lunoraDirectory: string, workflows?: ReadonlyArray<WorkflowIR>, agents?: ReadonlyArray<AgentIR>) => CronJobIR[];
1720
1792
  /** The only file a feature-flag provider may be declared in — mirrors `lunora/queues.ts`. */
1721
1793
  declare const FLAGS_FILENAME = "flags.ts";
1722
1794
  /** One statically-discovered flag read: the key plus the value type its `ctx.flags.&lt;type>` call implies. */
@@ -1887,13 +1959,19 @@ declare const GENERATED_HEADER = "// GENERATED by @lunora/codegen — do not edi
1887
1959
  declare const emitDataModel: (schema: SchemaIR, useUmbrella?: boolean) => string;
1888
1960
  /**
1889
1961
  * Emit `_generated/api.ts` — the typed `api.*` registry (public functions), the
1890
- * `internal.*` registry, and (when the project declares workflows) the typed
1891
- * `workflows.*` reference object. `api`/`internal` are the same `anyApi` proxy
1962
+ * `internal.*` registry, and (when the project declares them) the typed
1963
+ * `workflows.*` / `agents.*` scheduler-target reference objects. `api`/`internal` are the same `anyApi` proxy
1892
1964
  * at runtime (the `__lunoraRef` is identical); visibility is enforced
1893
1965
  * server-side at dispatch, not in the reference. Splitting the *types* keeps
1894
1966
  * internal functions off the client-facing `api` surface.
1895
1967
  */
1896
- declare const emitApi: (functions: ReadonlyArray<FunctionIR>, workflows?: ReadonlyArray<WorkflowIR>, useUmbrella?: boolean) => string;
1968
+ interface EmitApiOptions {
1969
+ agents?: ReadonlyArray<AgentIR>;
1970
+ functions: ReadonlyArray<FunctionIR>;
1971
+ useUmbrella?: boolean;
1972
+ workflows?: ReadonlyArray<WorkflowIR>;
1973
+ }
1974
+ declare const emitApi: (options: EmitApiOptions) => string;
1897
1975
  /**
1898
1976
  * Emit `_generated/seed.ts` — a project-bound `createSeedClient` with this
1899
1977
  * schema's `InsertModel` and runtime schema pre-applied, so a test or script
@@ -1904,7 +1982,6 @@ declare const emitApi: (functions: ReadonlyArray<FunctionIR>, workflows?: Readon
1904
1982
  * Returns `""` when `@lunora/seed` is not a declared dependency, so projects
1905
1983
  * that don't use it keep a clean `_generated/` and never import the package.
1906
1984
  */
1907
-
1908
1985
  /**
1909
1986
  * Emit `_generated/collections.ts` — one TanStack DB collection factory per
1910
1987
  * `defineShape` in `lunora/shapes.ts` (the local-first partial-replication
@@ -1921,6 +1998,8 @@ declare const emitApi: (functions: ReadonlyArray<FunctionIR>, workflows?: Readon
1921
1998
  */
1922
1999
  declare const emitCollections: (shapes: ReadonlyArray<ShapeIR>, hasDatabase: boolean, useUmbrella?: boolean) => string;
1923
2000
  interface EmitServerOptions {
2001
+ /** Agents declared via `defineAgent` exports — wires the typed `ctx.agents` producers onto Mutation/Action contexts. */
2002
+ agents?: ReadonlyArray<AgentIR>;
1924
2003
  containers?: ReadonlyArray<ContainerIR>;
1925
2004
  /**
1926
2005
  * The single `defineEnv(...)` contract declared in `lunora/env.ts`. When
@@ -1974,6 +2053,7 @@ interface EmitServerOptions {
1974
2053
  workflows?: ReadonlyArray<WorkflowIR>;
1975
2054
  }
1976
2055
  declare const emitServer: ({
2056
+ agents,
1977
2057
  containers,
1978
2058
  env,
1979
2059
  hasAccessFacade,
@@ -1995,7 +2075,17 @@ declare const emitServer: ({
1995
2075
  useUmbrella,
1996
2076
  workflows
1997
2077
  }?: EmitServerOptions) => string;
1998
- declare const emitFunctions: (functions: ReadonlyArray<FunctionIR>, migrations?: ReadonlyArray<MigrationIR>, useUmbrella?: boolean, mutators?: ReadonlyArray<MutatorIR>, shapes?: ReadonlyArray<ShapeIR>) => string;
2078
+ interface EmitFunctionsOptions {
2079
+ agents?: ReadonlyArray<AgentIR>;
2080
+ functions: ReadonlyArray<FunctionIR>;
2081
+ migrations?: ReadonlyArray<MigrationIR>;
2082
+ mutators?: ReadonlyArray<MutatorIR>;
2083
+ shapes?: ReadonlyArray<ShapeIR>;
2084
+ /** Import of a sandbox tool (`browserTool`/`containerTool`) auto-registers the `sandbox:invoke` action. */
2085
+ usesSandbox?: boolean;
2086
+ useUmbrella?: boolean;
2087
+ }
2088
+ declare const emitFunctions: (options: EmitFunctionsOptions) => string;
1999
2089
  /**
2000
2090
  * Storage-column map per table for the file browser: `{ table: [field, …] }` for
2001
2091
  * every field declared `v.storage(...)` (unwrapping `v.optional(...)`). The
@@ -2024,6 +2114,16 @@ declare const emitContainers: (containers: ReadonlyArray<ContainerIR>, jurisdict
2024
2114
  */
2025
2115
  declare const emitWorkflows: (workflows: ReadonlyArray<WorkflowIR>) => string;
2026
2116
  /**
2117
+ * Emit `_generated/agents.ts` — one `WorkflowEntrypoint` class per `defineAgent`
2118
+ * export, each a thin subclass of `LunoraWorkflow` (`@lunora/workflow/do`)
2119
+ * constructed with the compiled agent tool-loop (`compileAgentWorkflow`). Like
2120
+ * `_generated/workflows.ts`, the worker entry must re-export these classes:
2121
+ * wrangler requires every `workflows[].class_name` to be exported by the
2122
+ * deployed worker. Returns "" when the project declares no agents (the file is
2123
+ * not written then).
2124
+ */
2125
+ declare const emitAgents: (agents: ReadonlyArray<AgentIR>) => string;
2126
+ /**
2027
2127
  * Emit `_generated/queues.ts` — the push-consumer registry the worker `queue()`
2028
2128
  * handler dispatches through. Maps each push queue's stable wrangler name (which
2029
2129
  * `batch.queue` carries) to its `defineQueue` definition + export name. Pull
@@ -2033,6 +2133,8 @@ declare const emitWorkflows: (workflows: ReadonlyArray<WorkflowIR>) => string;
2033
2133
  */
2034
2134
  interface EmitShardOptions {
2035
2135
  advisories?: ReadonlyArray<Finding>;
2136
+ /** Agents declared via `defineAgent` exports in `lunora/agents.ts` — wires the typed `ctx.agents` producers. */
2137
+ agents?: ReadonlyArray<AgentIR>;
2036
2138
  containers?: ReadonlyArray<ContainerIR>;
2037
2139
  /** The single `defineEnv(...)` contract declared in `lunora/env.ts` — applies the accessor to the worker `env` to populate `ctx.env`. */
2038
2140
  env?: EnvIR;
@@ -2080,6 +2182,7 @@ interface EmitShardOptions {
2080
2182
  }
2081
2183
  declare const emitShard: ({
2082
2184
  advisories,
2185
+ agents,
2083
2186
  containers,
2084
2187
  env,
2085
2188
  flagKeys,
@@ -2165,6 +2268,16 @@ declare const emitVectors: (vectorIndexes: ReadonlyArray<VectorIndexIR>) => stri
2165
2268
  declare const emitWranglerCronTriggers: (crons: ReadonlyArray<CronJobIR>) => string[];
2166
2269
  /** Which capability methods the generated `defineApp` builder exposes — one flag per package-backed feature the app actually uses. */
2167
2270
  interface EmitAppOptions {
2271
+ /**
2272
+ * Inbound-email agents (`defineAgent({ onEmail })`) → wire the worker's
2273
+ * top-level `email()` handler to `dispatchAgentEmail(...)` (from
2274
+ * `@lunora/agent/inbound`), so received mail starts a durable run. Empty/absent
2275
+ * ⇒ no wiring, byte-identical output for email-free (and agent-free) projects.
2276
+ */
2277
+ emailAgents?: ReadonlyArray<{
2278
+ bindingName: string;
2279
+ exportName: string;
2280
+ }>;
2168
2281
  /** App depends on `@lunora/cloudflare-access` → emit `.access()` (wire the Cloudflare Access `resolveIdentity`, composed ahead of `@lunora/auth` when both are present). */
2169
2282
  hasAccess: boolean;
2170
2283
  /** App uses `@lunora/ai` / `ctx.ai` → emit `.ai()` (override the Workers AI binding backing `ctx.ai`). */
@@ -2209,6 +2322,17 @@ interface EmitAppOptions {
2209
2322
  jurisdiction?: JurisdictionIR;
2210
2323
  /** Project depends on the unscoped `lunorash` umbrella → import the runtime via `lunorash/runtime` instead of `@lunora/runtime`. */
2211
2324
  useUmbrella: boolean;
2325
+ /**
2326
+ * Voice-enabled agents (`defineAgent({ voice: … })`) → wire
2327
+ * `options.voiceAgents`, mapping each agent's export name to its `VOICE_*`
2328
+ * Durable Object namespace binding so the runtime exposes
2329
+ * `/_lunora/voice/&lt;exportName>`. Empty/absent ⇒ no wiring, byte-identical
2330
+ * output for voice-free (and agent-free) projects.
2331
+ */
2332
+ voiceAgents?: ReadonlyArray<{
2333
+ bindingName: string;
2334
+ exportName: string;
2335
+ }>;
2212
2336
  /** An OpenAPI spec is emitted (`openapi.ts`) → wire `openApiSpec` into the worker. */
2213
2337
  wantsOpenApi: boolean;
2214
2338
  /** An OpenRPC spec is emitted (`openrpc.ts`) → wire `openRpcSpec` into the worker. */
@@ -2553,6 +2677,13 @@ interface CodegenResult {
2553
2677
  */
2554
2678
  advisories: ReadonlyArray<Finding>;
2555
2679
  /**
2680
+ * Agents discovered from `defineAgent` exports in `lunora/agents.ts` — the
2681
+ * list the config layer reconciles into wrangler's `workflows[]` array (an
2682
+ * agent compiles onto a Cloudflare Workflow). Agents are NOT Durable Objects,
2683
+ * so this adds no binding or migration. Empty when the project declares none.
2684
+ */
2685
+ agents: ReadonlyArray<AgentIR>;
2686
+ /**
2556
2687
  * Containers discovered from `defineContainer` exports in
2557
2688
  * `lunora/containers.ts` — the list the config layer reconciles into
2558
2689
  * wrangler's `containers[]`, `CONTAINER_*` Durable Object bindings, and
@@ -2566,6 +2697,8 @@ interface CodegenResult {
2566
2697
  */
2567
2698
  cronTriggers: ReadonlyArray<string>;
2568
2699
  generated: {
2700
+ /** WorkflowEntrypoint classes for declared agents (`_generated/agents.ts`); `""` (and not written) when no agents are declared. */
2701
+ agents: string;
2569
2702
  api: string; /** Fluent worker-composition builder (`_generated/app.ts`) — `defineApp()`. Always written. */
2570
2703
  app: string;
2571
2704
  /** Partial-replication collection factories (`_generated/collections.ts`); `""` (and not written) unless the project declares shapes and installs `@lunora/db`. */
@@ -2661,4 +2794,4 @@ declare const secretKindOf: (value: string) => string | undefined;
2661
2794
  /** A redacted preview of a secret value — first 4 chars plus its length, never the full value. */
2662
2795
  declare const redact: (value: string) => string;
2663
2796
  declare const VERSION = "0.0.0";
2664
- export { type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type CronJobIR, type DriftChange, 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, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcEmitInput, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type R2sqlCallIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SHAPES_FILENAME, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, diagnosticAt, diffSchemaSnapshots, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, evaluateSchemaDrift, formatAdvisories, lintSchema, parseSchemaSnapshot, redact, refreshCodegenProject, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, validatorIrToJsonSchema };
2797
+ export { AGENTS_FILENAME, type AgentIR, type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type CronJobIR, type DriftChange, 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, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcEmitInput, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type R2sqlCallIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SHAPES_FILENAME, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, evaluateSchemaDrift, formatAdvisories, lintSchema, parseSchemaSnapshot, redact, refreshCodegenProject, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, validatorIrToJsonSchema };
package/dist/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  export { formatAdvisories, lintSchema } from './packem_shared/formatAdvisories-DRhEiJUz.mjs';
2
2
  export { CodegenDiagnosticError, diagnosticAt } from './packem_shared/CodegenDiagnosticError-DyQ5FwkM.mjs';
3
+ export { AGENTS_FILENAME, discoverAgents } from './packem_shared/AGENTS_FILENAME-BksnAJgx.mjs';
3
4
  export { default as discoverAuthApiCalls } from './packem_shared/discoverAuthApiCalls-WMx8L2FG.mjs';
4
5
  export { CONTAINERS_FILENAME, discoverContainers } from './packem_shared/CONTAINERS_FILENAME-DjpXMqhp.mjs';
5
- export { default as discoverCrons } from './packem_shared/discoverCrons-D-jrpm97.mjs';
6
+ export { default as discoverCrons } from './packem_shared/discoverCrons-DJJ3ZE5F.mjs';
6
7
  export { FLAGS_FILENAME, discoverFlags } from './packem_shared/FLAGS_FILENAME-fEZtzWXi.mjs';
7
8
  export { discoverFunctions } from './packem_shared/discoverFunctions-CZ91aenA.mjs';
8
9
  export { default as discoverHttpRoutes } from './packem_shared/discoverHttpRoutes-DNZLDCmm.mjs';
@@ -19,11 +20,11 @@ export { default as discoverSchema } from './packem_shared/discoverSchema-DFWVgU
19
20
  export { SHAPES_FILENAME, discoverShapes } from './packem_shared/SHAPES_FILENAME-DOhPGi-6.mjs';
20
21
  export { default as discoverStorageRulesMetadata } from './packem_shared/discoverStorageRulesMetadata-nosjYcvN.mjs';
21
22
  export { WORKFLOWS_FILENAME, discoverWorkflows } from './packem_shared/WORKFLOWS_FILENAME-B2By8S4s.mjs';
22
- export { G as GENERATED_HEADER, e as emitApi, a as emitCollections, b as emitContainers, c as emitCrons, d as emitDataModel, f as emitDrizzleSchema, g as emitFunctions, h as emitServer, i as emitShard, j as emitVectors, k as emitWorkflows, l as emitWranglerCronTriggers } from './packem_shared/emit-31Yg1Ee5.mjs';
23
- export { emitApp } from './packem_shared/emitApp-DCP7Pr6M.mjs';
24
- export { buildOpenApiDocument, emitOpenApi, emitOpenApiModule } from './packem_shared/buildOpenApiDocument-bg-NnLka.mjs';
25
- export { OPENRPC_VERSION, buildOpenRpcDocument, emitOpenRpc, emitOpenRpcModule } from './packem_shared/OPENRPC_VERSION-CzhfvCIQ.mjs';
26
- export { SCHEMA_SNAPSHOT_FILENAME, createCodegenProject, refreshCodegenProject, runCodegen } from './packem_shared/SCHEMA_SNAPSHOT_FILENAME-Cl1EBMdR.mjs';
23
+ export { G as GENERATED_HEADER, e as emitAgents, a as emitApi, b as emitCollections, c as emitContainers, d as emitCrons, f as emitDataModel, g as emitDrizzleSchema, h as emitFunctions, i as emitServer, j as emitShard, k as emitVectors, l as emitWorkflows, m as emitWranglerCronTriggers } from './packem_shared/emit-DtherCpQ.mjs';
24
+ export { emitApp } from './packem_shared/emitApp-D7daY94X.mjs';
25
+ export { buildOpenApiDocument, emitOpenApi, emitOpenApiModule } from './packem_shared/buildOpenApiDocument-BrN41JMl.mjs';
26
+ export { OPENRPC_VERSION, buildOpenRpcDocument, emitOpenRpc, emitOpenRpcModule } from './packem_shared/OPENRPC_VERSION-DqTYxQ22.mjs';
27
+ export { SCHEMA_SNAPSHOT_FILENAME, createCodegenProject, refreshCodegenProject, runCodegen } from './packem_shared/SCHEMA_SNAPSHOT_FILENAME-BbF69nj9.mjs';
27
28
  export { SCHEMA_SNAPSHOT_VERSION, SchemaSnapshotParseError, buildSchemaSnapshot, diffSchemaSnapshots, evaluateSchemaDrift, parseSchemaSnapshot, serializeSchemaSnapshot } from './packem_shared/SCHEMA_SNAPSHOT_VERSION-D0ARY6rL.mjs';
28
29
  export { schemaFromIr } from './packem_shared/schemaFromIr-DTYsLBaA.mjs';
29
30
  export { LUNORA_ERROR_CODES, validatorIrToJsonSchema } from './packem_shared/LUNORA_ERROR_CODES-DvTLozCu.mjs';