@lunora/config 1.0.0-alpha.404 → 1.0.0-alpha.406

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 (45) hide show
  1. package/dist/cli/index.d.mts +2 -2
  2. package/dist/cli/index.d.ts +2 -2
  3. package/dist/cli/index.mjs +1 -1
  4. package/dist/cloudflare/index.d.mts +5 -97
  5. package/dist/cloudflare/index.d.ts +5 -97
  6. package/dist/cloudflare/index.mjs +1 -1
  7. package/dist/index.d.mts +67 -6
  8. package/dist/index.d.ts +67 -6
  9. package/dist/index.mjs +1 -1
  10. package/dist/packem_shared/D1_PLACEHOLDER_ID-BpUWE6_j.mjs +1 -0
  11. package/dist/packem_shared/{DEFAULT_DEPLOY_TARGET-CnovxJid.mjs → DEFAULT_DEPLOY_TARGET-T8UHP3bB.mjs} +1 -1
  12. package/dist/packem_shared/{DEV_WORKER_ENV_VALUE-CARjGoAv.mjs → DEV_WORKER_ENV_VALUE-Dx-b7eJB.mjs} +1 -1
  13. package/dist/packem_shared/PACKAGE_SECRETS_REGISTRY-CccA2ip9.mjs +1 -0
  14. package/dist/packem_shared/{POLICY_SCAFFOLD_ENDPOINT-BISd53nh.mjs → POLICY_SCAFFOLD_ENDPOINT-BLMGCD5t.mjs} +1 -1
  15. package/dist/packem_shared/{SCHEMA_EDIT_ENDPOINT-B-Xii8Ke.mjs → SCHEMA_EDIT_ENDPOINT-DrPTyuPd.mjs} +1 -1
  16. package/dist/packem_shared/{STUDIO_PATH-rjtY7n7Q.mjs → STUDIO_PATH-CttpqT9E.mjs} +1 -1
  17. package/dist/packem_shared/{assertBuildTargetMatches-Bw7uURKp.mjs → assertBuildTargetMatches-CJI4jNxP.mjs} +1 -1
  18. package/dist/packem_shared/buildPackageSecretsBlock-Cb5Ze3_1.mjs +19 -0
  19. package/dist/packem_shared/celld-config-DeMDgYAu.mjs +3 -0
  20. package/dist/packem_shared/{deploy-driver.d-Cl96-c1l.d.mts → deploy-driver.d-DraUd2R2.d.mts} +2 -0
  21. package/dist/packem_shared/{deploy-driver.d-Cl96-c1l.d.ts → deploy-driver.d-DraUd2R2.d.ts} +2 -0
  22. package/dist/packem_shared/ensureGitignoreEntries-Tsk8Qkw7.mjs +7 -0
  23. package/dist/packem_shared/{index.d-DkNi7r6E.d.mts → index.d-DSqsbmlq.d.mts} +1 -1
  24. package/dist/packem_shared/{index.d-Cmx4jMFV.d.ts → index.d-sZ22Dkwr.d.ts} +1 -1
  25. package/dist/packem_shared/inferLunoraBindings-BHztYpw9.mjs +1 -0
  26. package/dist/packem_shared/package-secrets-registry-Cx0qpPjB.mjs +1 -0
  27. package/dist/packem_shared/probeCelldToolchain-DxDttfHy.mjs +1 -0
  28. package/dist/packem_shared/reconcile-bindings-B3bPJPeQ.mjs +2 -0
  29. package/dist/packem_shared/{infer-bindings.d-C9ktoVW4.d.ts → reconcile-bindings.d-LHrpR4kY.d.mts} +103 -1
  30. package/dist/packem_shared/{infer-bindings.d-C9ktoVW4.d.mts → reconcile-bindings.d-LHrpR4kY.d.ts} +103 -1
  31. package/dist/packem_shared/reconcileBindingsSafely-Br0hhKmd.mjs +1 -0
  32. package/dist/packem_shared/{scanWranglerVariablesForSecrets-CZDS9y2i.mjs → scanWranglerVariablesForSecrets-DXuYZNqq.mjs} +1 -1
  33. package/dist/packem_shared/startCelldDevSession-BI3x-_-q.mjs +1 -0
  34. package/dist/packem_shared/{wranglerCodegenInputs-UqO5e_qJ.mjs → wranglerCodegenInputs-7WopgQo4.mjs} +1 -1
  35. package/dist/packem_shared/{write-atomic-nFihpdk8.mjs → write-atomic-DSo8BGHA.mjs} +1 -1
  36. package/dist/studio-host/index.mjs +1 -1
  37. package/package.json +3 -3
  38. package/dist/packem_shared/HYPERDRIVE_PLACEHOLDER_ID-DPgHQEDf.mjs +0 -2
  39. package/dist/packem_shared/PACKAGE_SECRETS_REGISTRY-DI99PpTL.mjs +0 -1
  40. package/dist/packem_shared/buildPackageSecretsBlock-C5WZfMwe.mjs +0 -19
  41. package/dist/packem_shared/celld-config-Iv0tK526.mjs +0 -3
  42. package/dist/packem_shared/inferLunoraBindings-DMvPygeU.mjs +0 -1
  43. package/dist/packem_shared/package-secrets-registry-BEJELdls.mjs +0 -1
  44. package/dist/packem_shared/reconcileBindingsSafely-xWmrGHnx.mjs +0 -1
  45. package/dist/packem_shared/startCelldDevSession-PHdbwtI5.mjs +0 -1
@@ -1,2 +1,2 @@
1
- export { b as AGENT_RULES_HINT, D as DEFAULT_DEPLOY_TARGET, l as LUNORA_TAG, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, S as STEP_BADGE_NAMES, type p as StepBadgeName, q as addArgsFor, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, N as readProjectManifest, U as runScriptCommand, V as runnableTargetIds, X as toolchainExecArgs } from "../packem_shared/index.d-DkNi7r6E.mjs";
2
- import "../packem_shared/deploy-driver.d-Cl96-c1l.mjs";
1
+ export { b as AGENT_RULES_HINT, D as DEFAULT_DEPLOY_TARGET, l as LUNORA_TAG, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, S as STEP_BADGE_NAMES, type p as StepBadgeName, q as addArgsFor, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, N as readProjectManifest, U as runScriptCommand, V as runnableTargetIds, X as toolchainExecArgs } from "../packem_shared/index.d-DSqsbmlq.mjs";
2
+ import "../packem_shared/deploy-driver.d-DraUd2R2.mjs";
@@ -1,2 +1,2 @@
1
- export { b as AGENT_RULES_HINT, D as DEFAULT_DEPLOY_TARGET, l as LUNORA_TAG, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, S as STEP_BADGE_NAMES, type p as StepBadgeName, q as addArgsFor, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, N as readProjectManifest, U as runScriptCommand, V as runnableTargetIds, X as toolchainExecArgs } from "../packem_shared/index.d-Cmx4jMFV.js";
2
- import "../packem_shared/deploy-driver.d-Cl96-c1l.js";
1
+ export { b as AGENT_RULES_HINT, D as DEFAULT_DEPLOY_TARGET, l as LUNORA_TAG, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, S as STEP_BADGE_NAMES, type p as StepBadgeName, q as addArgsFor, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, N as readProjectManifest, U as runScriptCommand, V as runnableTargetIds, X as toolchainExecArgs } from "../packem_shared/index.d-sZ22Dkwr.js";
2
+ import "../packem_shared/deploy-driver.d-DraUd2R2.js";
@@ -1 +1 @@
1
- import{AGENT_RULES_HINT as t,claimAgentRulesHint as o,detectAgentRules as a}from"../packem_shared/AGENT_RULES_DIR-Bd6JPtNa.mjs";import{DEFAULT_DEPLOY_TARGET as s,deployTargetIds as l,isRunnableTarget as A,runnableTargetIds as d}from"../packem_shared/DEFAULT_DEPLOY_TARGET-CnovxJid.mjs";import{LUNORA_TAG as c,lunoraLine as m}from"../packem_shared/LUNORA_TAG-DQTGPqcJ.mjs";import{default as T}from"../packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as x,detectInstalledManagers as E,detectPackageManager as i,execArgsFor as u,installArgsFor as R,runScriptCommand as _,toolchainExecArgs as L}from"../packem_shared/addArgsFor-CYZKhNIo.mjs";import{readProjectManifest as G}from"../packem_shared/readProjectDependencies-l3uhUKjo.mjs";import{STEP_BADGE_NAMES as M}from"../packem_shared/ACCENT-CotPTfv7.mjs";export{t as AGENT_RULES_HINT,s as DEFAULT_DEPLOY_TARGET,c as LUNORA_TAG,T as LunoraReporter,M as STEP_BADGE_NAMES,x as addArgsFor,o as claimAgentRulesHint,l as deployTargetIds,a as detectAgentRules,E as detectInstalledManagers,i as detectPackageManager,u as execArgsFor,R as installArgsFor,A as isRunnableTarget,m as lunoraLine,G as readProjectManifest,_ as runScriptCommand,d as runnableTargetIds,L as toolchainExecArgs};
1
+ import{AGENT_RULES_HINT as t,claimAgentRulesHint as o,detectAgentRules as a}from"../packem_shared/AGENT_RULES_DIR-Bd6JPtNa.mjs";import{DEFAULT_DEPLOY_TARGET as s,deployTargetIds as l,isRunnableTarget as A,runnableTargetIds as d}from"../packem_shared/DEFAULT_DEPLOY_TARGET-T8UHP3bB.mjs";import{LUNORA_TAG as c,lunoraLine as m}from"../packem_shared/LUNORA_TAG-DQTGPqcJ.mjs";import{default as T}from"../packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as x,detectInstalledManagers as E,detectPackageManager as i,execArgsFor as u,installArgsFor as R,runScriptCommand as _,toolchainExecArgs as L}from"../packem_shared/addArgsFor-CYZKhNIo.mjs";import{readProjectManifest as G}from"../packem_shared/readProjectDependencies-l3uhUKjo.mjs";import{STEP_BADGE_NAMES as M}from"../packem_shared/ACCENT-CotPTfv7.mjs";export{t as AGENT_RULES_HINT,s as DEFAULT_DEPLOY_TARGET,c as LUNORA_TAG,T as LunoraReporter,M as STEP_BADGE_NAMES,x as addArgsFor,o as claimAgentRulesHint,l as deployTargetIds,a as detectAgentRules,E as detectInstalledManagers,i as detectPackageManager,u as execArgsFor,R as installArgsFor,A as isRunnableTarget,m as lunoraLine,G as readProjectManifest,_ as runScriptCommand,d as runnableTargetIds,L as toolchainExecArgs};
@@ -1,5 +1,6 @@
1
- import { D as DeployDriver } from "../packem_shared/deploy-driver.d-Cl96-c1l.mjs";
2
- import { G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/infer-bindings.d-C9ktoVW4.mjs";
1
+ import { D as DeployDriver } from "../packem_shared/deploy-driver.d-DraUd2R2.mjs";
2
+ import { E as ExportGap, S as SchemaInfo } from "../packem_shared/reconcile-bindings.d-LHrpR4kY.mjs";
3
+ export { H as HYPERDRIVE_PLACEHOLDER_ID, type R as ReconcileBindingsResult, c as collectExportGaps, r as reconcileWranglerBindings } from "../packem_shared/reconcile-bindings.d-LHrpR4kY.mjs";
3
4
  import { WranglerQueueProducerIR, WranglerVariableIR } from '@lunora/codegen';
4
5
  /** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
5
6
  declare const applyModify: (text: string, path: ReadonlyArray<number | string>, value: unknown) => string;
@@ -386,99 +387,6 @@ declare const bindingsNeedingDatabase: (projectRoot: string, env: NodeJS.Process
386
387
  * to install it).
387
388
  */
388
389
  declare const startLocalHyperdrive: (options: StartLocalHyperdriveOptions) => Promise<LocalHyperdrive | undefined>;
389
- /**
390
- * The `id` reconcile writes on a Hyperdrive binding it adds, and the one the `hyperdrive`
391
- * registry item ships: wrangler requires a string, and `lunora dev` serves the binding from an
392
- * embedded Postgres whatever it is. `lunora deploy` swaps in a real id.
393
- */
394
- declare const HYPERDRIVE_PLACEHOLDER_ID = "<replace-with-hyperdrive-create-id>";
395
- /**
396
- * A container/workflow that is declared (so codegen emits its class) but the
397
- * worker entry never re-exports — the one wiring step the generators can't always
398
- * do for the developer. wrangler rejects a `class_name` the deployed worker
399
- * doesn't export, so a deploy fails late on this; surfacing it as structured data
400
- * lets the Vite plugin raise it in the dev error overlay (not just the console)
401
- * the moment the gap appears. The human-readable form is also folded into
402
- * {@link ReconcileBindingsResult.warnings}.
403
- */
404
- interface ExportGap {
405
- /** Generated class wrangler needs exported, e.g. `OrderPipelineWorkflow`. */
406
- className: string;
407
- /** The `lunora/{agents,containers,workflows}.ts` export name, e.g. `orderPipeline`. */
408
- exportName: string;
409
- /** Which declaration is unexported. */
410
- kind: "agent" | "container" | "workflow";
411
- /** The `_generated/{module}` to re-export from, e.g. `workflows`. */
412
- module: GeneratedClassModule;
413
- }
414
- interface ReconcileBindingsResult {
415
- /** Short labels for each binding written (e.g. `"SCHEDULER/SchedulerDO"`). */
416
- added: string[];
417
- /** `true` when `wrangler.jsonc` was rewritten. */
418
- changed: boolean;
419
- /** What was written to the SvelteKit / Nuxt dev sidecar's own config, when anything was. */
420
- devConfig?: {
421
- added: string[];
422
- path: string;
423
- updated: string[];
424
- };
425
- /**
426
- * Declared containers/workflows the worker entry doesn't re-export — the
427
- * structured form of the corresponding `warnings` entries, for the dev error
428
- * overlay. Empty when every declaration is wired.
429
- */
430
- exportGaps: ExportGap[];
431
- /** Reason reconciliation was skipped, for logging. */
432
- reason?: string;
433
- /**
434
- * Short labels for each EXISTING entry whose settings were brought in line
435
- * with its declaration (e.g. `"queues.consumers/receipt-queue (max_retries)"`).
436
- * Kept apart from `added` so a retune is not logged as a new binding.
437
- */
438
- updated: string[];
439
- /** Non-fatal hints for capabilities that cannot be auto-provisioned. */
440
- warnings: string[];
441
- /** Resolved wrangler path, or `undefined` when none was found. */
442
- wranglerPath?: string;
443
- }
444
- /**
445
- * The declared-but-not-re-exported containers and workflows, as structured
446
- * {@link ExportGap}s. The same gaps `collectWarnings` renders into prose — kept
447
- * here as data so the Vite plugin can raise them in the error overlay with a
448
- * precise remediation, rather than re-parsing the warning strings.
449
- *
450
- * Exported because reconciliation is not the only caller that needs the answer:
451
- * `lunora codegen` and `lunora doctor` both want the gaps WITHOUT rewriting
452
- * `wrangler.jsonc`, which is the rest of what {@link reconcileWranglerBindings}
453
- * does. Deriving them again from `inferred.{containers,workflows,agents}` at each
454
- * call site is how one kind ends up silently uncovered.
455
- */
456
- declare const collectExportGaps: (inferred: InferredBindings) => ExportGap[];
457
- /**
458
- * Reconcile inferred Durable Object / D1 bindings into `wrangler.jsonc`.
459
- *
460
- * Writes only when something is missing; returns `changed: false` when the
461
- * config already satisfies the inferred needs.
462
- *
463
- * `environment`, when passed, does NOT change where this provisions — every
464
- * step below still only ADDS to the TOP-LEVEL config; wrangler's `env.<name>`
465
- * blocks have no auto-provisioning path today. The one write into the block is
466
- * {@link reconcileEnvQueues}, which retunes queue consumers the block already
467
- * declares and adds nothing. Otherwise it is used only to emit an
468
- * advisory warning, because bindings (`durable_objects`, `d1_databases`, …)
469
- * are non-inheritable (see `wrangler-environment.ts`'s `NON_INHERITABLE_KEYS`):
470
- * a `--env production` deploy needs its OWN copy of each one, and silently
471
- * writing only to the top level would leave that gap unmentioned. Extending
472
- * the JSONC writer itself to target `env.<name>.*` idempotently for every
473
- * binding kind here is a separate, larger change (each of the ~10 pipeline
474
- * steps below reads AND writes the top-level path) that this fix does not
475
- * attempt — `lunora deploy --env <name>` now VALIDATES the env-scoped view
476
- * (closing the reported gap), it just doesn't yet auto-provision it.
477
- */
478
- declare const reconcileWranglerBindings: (projectRoot: string, inferred: InferredBindings, { environment, target }?: {
479
- environment?: string;
480
- target?: string;
481
- }) => ReconcileBindingsResult;
482
390
  interface ReconcileCompatibilityDateResult {
483
391
  /** `true` when `wrangler.jsonc` was rewritten. */
484
392
  changed: boolean;
@@ -1287,7 +1195,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
1287
1195
  * `{ valid, errors, warnings }`.
1288
1196
  */
1289
1197
  declare const validateWrangler: typeof validateWranglerConfig;
1290
- export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_CLI_CONFIG_WARNING_ENV, CLOUDFLARE_DRIVER, CLOUDFLARE_TOOLCHAIN_VERSIONS, type CloudflareCliConfigFinding, type CloudflareCredentialProbe, DEFAULT_OBSERVABILITY, type DevConfigKind, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, HYPERDRIVE_PLACEHOLDER_ID, type LocalHyperdrive, type ManifestConfigShape, type MaterializeDevOptions, type MaterializeDevResult, type ObservabilitySignalSampling, REMOTE_ELIGIBLE_KEYS, REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, type ReadWranglerResult, type ReconcileBindingsResult, type ReconcileCompatibilityDateResult, type ReconcileResult as ReconcileCronsResult, type ReconcileProject, type RemoteBindingPlan, type RemoteEnableInputs, type RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WithheldBinding, type WranglerCacheShape, type WranglerCodegenInputs, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
1198
+ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_CLI_CONFIG_WARNING_ENV, CLOUDFLARE_DRIVER, CLOUDFLARE_TOOLCHAIN_VERSIONS, type CloudflareCliConfigFinding, type CloudflareCredentialProbe, DEFAULT_OBSERVABILITY, type DevConfigKind, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, type LocalHyperdrive, type ManifestConfigShape, type MaterializeDevOptions, type MaterializeDevResult, type ObservabilitySignalSampling, REMOTE_ELIGIBLE_KEYS, REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, type ReadWranglerResult, type ReconcileCompatibilityDateResult, type ReconcileResult as ReconcileCronsResult, type ReconcileProject, type RemoteBindingPlan, type RemoteEnableInputs, type RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WithheldBinding, type WranglerCacheShape, type WranglerCodegenInputs, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
1291
1199
  /**
1292
1200
  * `@lunora/config/cloudflare` — the wrangler layer.
1293
1201
  *
@@ -1303,4 +1211,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_V
1303
1211
  * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
1304
1212
  * subpath rather than relocating wholesale.
1305
1213
  */
1306
- applyModify, assertWranglerSatisfiesSchema, bindingsNeedingDatabase, buildBindingManifest, collectExportGaps, describePreservedCrons, describeWithheld, detectCloudflareCliConfig, findWranglerFile, hasCloudflareCredentials, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeDevWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveObservabilitySampling, resolveRemoteEnabled, scanWranglerVariablesForSecrets, startLocalHyperdrive, validateWrangler, validateWranglerConfig, validateWranglerProject, warnCloudflareCliConfigOnce, withTailConsumer, withheldBindings, wranglerCodegenInputs, wranglerToAlchemy };
1214
+ applyModify, assertWranglerSatisfiesSchema, bindingsNeedingDatabase, buildBindingManifest, describePreservedCrons, describeWithheld, detectCloudflareCliConfig, findWranglerFile, hasCloudflareCredentials, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeDevWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveObservabilitySampling, resolveRemoteEnabled, scanWranglerVariablesForSecrets, startLocalHyperdrive, validateWrangler, validateWranglerConfig, validateWranglerProject, warnCloudflareCliConfigOnce, withTailConsumer, withheldBindings, wranglerCodegenInputs, wranglerToAlchemy };
@@ -1,5 +1,6 @@
1
- import { D as DeployDriver } from "../packem_shared/deploy-driver.d-Cl96-c1l.js";
2
- import { G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/infer-bindings.d-C9ktoVW4.js";
1
+ import { D as DeployDriver } from "../packem_shared/deploy-driver.d-DraUd2R2.js";
2
+ import { E as ExportGap, S as SchemaInfo } from "../packem_shared/reconcile-bindings.d-LHrpR4kY.js";
3
+ export { H as HYPERDRIVE_PLACEHOLDER_ID, type R as ReconcileBindingsResult, c as collectExportGaps, r as reconcileWranglerBindings } from "../packem_shared/reconcile-bindings.d-LHrpR4kY.js";
3
4
  import { WranglerQueueProducerIR, WranglerVariableIR } from '@lunora/codegen';
4
5
  /** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
5
6
  declare const applyModify: (text: string, path: ReadonlyArray<number | string>, value: unknown) => string;
@@ -386,99 +387,6 @@ declare const bindingsNeedingDatabase: (projectRoot: string, env: NodeJS.Process
386
387
  * to install it).
387
388
  */
388
389
  declare const startLocalHyperdrive: (options: StartLocalHyperdriveOptions) => Promise<LocalHyperdrive | undefined>;
389
- /**
390
- * The `id` reconcile writes on a Hyperdrive binding it adds, and the one the `hyperdrive`
391
- * registry item ships: wrangler requires a string, and `lunora dev` serves the binding from an
392
- * embedded Postgres whatever it is. `lunora deploy` swaps in a real id.
393
- */
394
- declare const HYPERDRIVE_PLACEHOLDER_ID = "<replace-with-hyperdrive-create-id>";
395
- /**
396
- * A container/workflow that is declared (so codegen emits its class) but the
397
- * worker entry never re-exports — the one wiring step the generators can't always
398
- * do for the developer. wrangler rejects a `class_name` the deployed worker
399
- * doesn't export, so a deploy fails late on this; surfacing it as structured data
400
- * lets the Vite plugin raise it in the dev error overlay (not just the console)
401
- * the moment the gap appears. The human-readable form is also folded into
402
- * {@link ReconcileBindingsResult.warnings}.
403
- */
404
- interface ExportGap {
405
- /** Generated class wrangler needs exported, e.g. `OrderPipelineWorkflow`. */
406
- className: string;
407
- /** The `lunora/{agents,containers,workflows}.ts` export name, e.g. `orderPipeline`. */
408
- exportName: string;
409
- /** Which declaration is unexported. */
410
- kind: "agent" | "container" | "workflow";
411
- /** The `_generated/{module}` to re-export from, e.g. `workflows`. */
412
- module: GeneratedClassModule;
413
- }
414
- interface ReconcileBindingsResult {
415
- /** Short labels for each binding written (e.g. `"SCHEDULER/SchedulerDO"`). */
416
- added: string[];
417
- /** `true` when `wrangler.jsonc` was rewritten. */
418
- changed: boolean;
419
- /** What was written to the SvelteKit / Nuxt dev sidecar's own config, when anything was. */
420
- devConfig?: {
421
- added: string[];
422
- path: string;
423
- updated: string[];
424
- };
425
- /**
426
- * Declared containers/workflows the worker entry doesn't re-export — the
427
- * structured form of the corresponding `warnings` entries, for the dev error
428
- * overlay. Empty when every declaration is wired.
429
- */
430
- exportGaps: ExportGap[];
431
- /** Reason reconciliation was skipped, for logging. */
432
- reason?: string;
433
- /**
434
- * Short labels for each EXISTING entry whose settings were brought in line
435
- * with its declaration (e.g. `"queues.consumers/receipt-queue (max_retries)"`).
436
- * Kept apart from `added` so a retune is not logged as a new binding.
437
- */
438
- updated: string[];
439
- /** Non-fatal hints for capabilities that cannot be auto-provisioned. */
440
- warnings: string[];
441
- /** Resolved wrangler path, or `undefined` when none was found. */
442
- wranglerPath?: string;
443
- }
444
- /**
445
- * The declared-but-not-re-exported containers and workflows, as structured
446
- * {@link ExportGap}s. The same gaps `collectWarnings` renders into prose — kept
447
- * here as data so the Vite plugin can raise them in the error overlay with a
448
- * precise remediation, rather than re-parsing the warning strings.
449
- *
450
- * Exported because reconciliation is not the only caller that needs the answer:
451
- * `lunora codegen` and `lunora doctor` both want the gaps WITHOUT rewriting
452
- * `wrangler.jsonc`, which is the rest of what {@link reconcileWranglerBindings}
453
- * does. Deriving them again from `inferred.{containers,workflows,agents}` at each
454
- * call site is how one kind ends up silently uncovered.
455
- */
456
- declare const collectExportGaps: (inferred: InferredBindings) => ExportGap[];
457
- /**
458
- * Reconcile inferred Durable Object / D1 bindings into `wrangler.jsonc`.
459
- *
460
- * Writes only when something is missing; returns `changed: false` when the
461
- * config already satisfies the inferred needs.
462
- *
463
- * `environment`, when passed, does NOT change where this provisions — every
464
- * step below still only ADDS to the TOP-LEVEL config; wrangler's `env.<name>`
465
- * blocks have no auto-provisioning path today. The one write into the block is
466
- * {@link reconcileEnvQueues}, which retunes queue consumers the block already
467
- * declares and adds nothing. Otherwise it is used only to emit an
468
- * advisory warning, because bindings (`durable_objects`, `d1_databases`, …)
469
- * are non-inheritable (see `wrangler-environment.ts`'s `NON_INHERITABLE_KEYS`):
470
- * a `--env production` deploy needs its OWN copy of each one, and silently
471
- * writing only to the top level would leave that gap unmentioned. Extending
472
- * the JSONC writer itself to target `env.<name>.*` idempotently for every
473
- * binding kind here is a separate, larger change (each of the ~10 pipeline
474
- * steps below reads AND writes the top-level path) that this fix does not
475
- * attempt — `lunora deploy --env <name>` now VALIDATES the env-scoped view
476
- * (closing the reported gap), it just doesn't yet auto-provision it.
477
- */
478
- declare const reconcileWranglerBindings: (projectRoot: string, inferred: InferredBindings, { environment, target }?: {
479
- environment?: string;
480
- target?: string;
481
- }) => ReconcileBindingsResult;
482
390
  interface ReconcileCompatibilityDateResult {
483
391
  /** `true` when `wrangler.jsonc` was rewritten. */
484
392
  changed: boolean;
@@ -1287,7 +1195,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
1287
1195
  * `{ valid, errors, warnings }`.
1288
1196
  */
1289
1197
  declare const validateWrangler: typeof validateWranglerConfig;
1290
- export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_CLI_CONFIG_WARNING_ENV, CLOUDFLARE_DRIVER, CLOUDFLARE_TOOLCHAIN_VERSIONS, type CloudflareCliConfigFinding, type CloudflareCredentialProbe, DEFAULT_OBSERVABILITY, type DevConfigKind, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, HYPERDRIVE_PLACEHOLDER_ID, type LocalHyperdrive, type ManifestConfigShape, type MaterializeDevOptions, type MaterializeDevResult, type ObservabilitySignalSampling, REMOTE_ELIGIBLE_KEYS, REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, type ReadWranglerResult, type ReconcileBindingsResult, type ReconcileCompatibilityDateResult, type ReconcileResult as ReconcileCronsResult, type ReconcileProject, type RemoteBindingPlan, type RemoteEnableInputs, type RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WithheldBinding, type WranglerCacheShape, type WranglerCodegenInputs, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
1198
+ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_CLI_CONFIG_WARNING_ENV, CLOUDFLARE_DRIVER, CLOUDFLARE_TOOLCHAIN_VERSIONS, type CloudflareCliConfigFinding, type CloudflareCredentialProbe, DEFAULT_OBSERVABILITY, type DevConfigKind, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, type LocalHyperdrive, type ManifestConfigShape, type MaterializeDevOptions, type MaterializeDevResult, type ObservabilitySignalSampling, REMOTE_ELIGIBLE_KEYS, REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, type ReadWranglerResult, type ReconcileCompatibilityDateResult, type ReconcileResult as ReconcileCronsResult, type ReconcileProject, type RemoteBindingPlan, type RemoteEnableInputs, type RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WithheldBinding, type WranglerCacheShape, type WranglerCodegenInputs, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
1291
1199
  /**
1292
1200
  * `@lunora/config/cloudflare` — the wrangler layer.
1293
1201
  *
@@ -1303,4 +1211,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_V
1303
1211
  * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
1304
1212
  * subpath rather than relocating wholesale.
1305
1213
  */
1306
- applyModify, assertWranglerSatisfiesSchema, bindingsNeedingDatabase, buildBindingManifest, collectExportGaps, describePreservedCrons, describeWithheld, detectCloudflareCliConfig, findWranglerFile, hasCloudflareCredentials, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeDevWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveObservabilitySampling, resolveRemoteEnabled, scanWranglerVariablesForSecrets, startLocalHyperdrive, validateWrangler, validateWranglerConfig, validateWranglerProject, warnCloudflareCliConfigOnce, withTailConsumer, withheldBindings, wranglerCodegenInputs, wranglerToAlchemy };
1214
+ applyModify, assertWranglerSatisfiesSchema, bindingsNeedingDatabase, buildBindingManifest, describePreservedCrons, describeWithheld, detectCloudflareCliConfig, findWranglerFile, hasCloudflareCredentials, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeDevWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveObservabilitySampling, resolveRemoteEnabled, scanWranglerVariablesForSecrets, startLocalHyperdrive, validateWrangler, validateWranglerConfig, validateWranglerProject, warnCloudflareCliConfigOnce, withTailConsumer, withheldBindings, wranglerCodegenInputs, wranglerToAlchemy };
@@ -1 +1 @@
1
- import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as t}from"../packem_shared/assertWranglerSatisfiesSchema-B4DcaiJY.mjs";import{BINDING_MANIFEST_VERSION as i,buildBindingManifest as l}from"../packem_shared/BINDING_MANIFEST_VERSION-CfXEYG8e.mjs";import{CLOUDFLARE_CLI_CONFIG_WARNING_ENV as E,detectCloudflareCliConfig as m,warnCloudflareCliConfigOnce as s}from"../packem_shared/CLOUDFLARE_CLI_CONFIG_WARNING_ENV-BKMrOuXV.mjs";import{default as d}from"../packem_shared/CLOUDFLARE_DRIVER-CULavrYO.mjs";import{default as C}from"../packem_shared/GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG-f8CnJha3.mjs";import{hasCloudflareCredentials as x}from"../packem_shared/hasCloudflareCredentials-Bak5w1_6.mjs";import{describeWithheld as c,withheldBindings as I}from"../packem_shared/describeWithheld-CbyzZjZF.mjs";import{bindingsNeedingDatabase as A,startLocalHyperdrive as D}from"../packem_shared/bindingsNeedingDatabase-6eD6Qtqf.mjs";import{HYPERDRIVE_PLACEHOLDER_ID as S,collectExportGaps as W,reconcileWranglerBindings as T}from"../packem_shared/HYPERDRIVE_PLACEHOLDER_ID-DPgHQEDf.mjs";import{reconcileWranglerCompatibilityDate as v}from"../packem_shared/reconcileWranglerCompatibilityDate-hocXEuRA.mjs";import{describePreservedCrons as b,reconcileWranglerCrons as B}from"../packem_shared/describePreservedCrons-C5KPuPy3.mjs";import{reconcileBindingsSafely as u,reconcileWranglerExtras as G}from"../packem_shared/reconcileBindingsSafely-xWmrGHnx.mjs";import{REMOTE_ELIGIBLE_KEYS as y,injectRemoteFlags as M,isRemoteEnvEnabled as P,materializeDevWranglerConfig as V,planRemoteBindings as H,resolveRemoteEnabled as w}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-CuhB99R2.mjs";import{materializeServiceDevConfigs as K}from"../packem_shared/materializeServiceDevConfigs-qUY4_iu1.mjs";import{default as z}from"../packem_shared/CLOUDFLARE_TOOLCHAIN_VERSIONS-DV5E_f_q.mjs";import{withTailConsumer as J}from"../packem_shared/withTailConsumer-CF3pk_Ov.mjs";import{WORKERS_CACHE_MIN_DATE as k,isCacheEnabled as q}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{wranglerCodegenInputs as $}from"../packem_shared/wranglerCodegenInputs-UqO5e_qJ.mjs";import{DEFAULT_OBSERVABILITY as re,resolveObservabilitySampling as oe}from"../packem_shared/DEFAULT_OBSERVABILITY-bN6UkTMx.mjs";import{mergeWranglerEnvironment as te}from"../packem_shared/mergeWranglerEnvironment-D5ekKj5x.mjs";import{WRANGLER_FILES as ie,findWranglerFile as le,readWranglerJsonc as fe}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{UNEXPORTED_CLASS_MARKER as me,validateWranglerProject as se}from"../packem_shared/UNEXPORTED_CLASS_MARKER-mdcw5KDY.mjs";import{scanWranglerVariablesForSecrets as de}from"../packem_shared/scanWranglerVariablesForSecrets-CZDS9y2i.mjs";import{wranglerToAlchemy as Ce}from"../packem_shared/wranglerToAlchemy-CBO2ucRm.mjs";import{REQUIRED_COMPATIBILITY_DATE as xe,REQUIRED_FLAG as _e,validateWrangler as ce,validateWranglerConfig as Ie}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-D4UcOP_t.mjs";export{i as BINDING_MANIFEST_VERSION,E as CLOUDFLARE_CLI_CONFIG_WARNING_ENV,d as CLOUDFLARE_DRIVER,z as CLOUDFLARE_TOOLCHAIN_VERSIONS,re as DEFAULT_OBSERVABILITY,C as GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG,S as HYPERDRIVE_PLACEHOLDER_ID,y as REMOTE_ELIGIBLE_KEYS,xe as REQUIRED_COMPATIBILITY_DATE,_e as REQUIRED_FLAG,me as UNEXPORTED_CLASS_MARKER,k as WORKERS_CACHE_MIN_DATE,ie as WRANGLER_FILES,o as applyModify,t as assertWranglerSatisfiesSchema,A as bindingsNeedingDatabase,l as buildBindingManifest,W as collectExportGaps,b as describePreservedCrons,c as describeWithheld,m as detectCloudflareCliConfig,le as findWranglerFile,x as hasCloudflareCredentials,M as injectRemoteFlags,q as isCacheEnabled,P as isRemoteEnvEnabled,V as materializeDevWranglerConfig,K as materializeServiceDevConfigs,te as mergeWranglerEnvironment,H as planRemoteBindings,fe as readWranglerJsonc,u as reconcileBindingsSafely,T as reconcileWranglerBindings,v as reconcileWranglerCompatibilityDate,B as reconcileWranglerCrons,G as reconcileWranglerExtras,oe as resolveObservabilitySampling,w as resolveRemoteEnabled,de as scanWranglerVariablesForSecrets,D as startLocalHyperdrive,ce as validateWrangler,Ie as validateWranglerConfig,se as validateWranglerProject,s as warnCloudflareCliConfigOnce,J as withTailConsumer,I as withheldBindings,$ as wranglerCodegenInputs,Ce as wranglerToAlchemy};
1
+ import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as t}from"../packem_shared/assertWranglerSatisfiesSchema-B4DcaiJY.mjs";import{BINDING_MANIFEST_VERSION as i,buildBindingManifest as l}from"../packem_shared/BINDING_MANIFEST_VERSION-CfXEYG8e.mjs";import{CLOUDFLARE_CLI_CONFIG_WARNING_ENV as s,detectCloudflareCliConfig as E,warnCloudflareCliConfigOnce as m}from"../packem_shared/CLOUDFLARE_CLI_CONFIG_WARNING_ENV-BKMrOuXV.mjs";import{default as d}from"../packem_shared/CLOUDFLARE_DRIVER-CULavrYO.mjs";import{default as C}from"../packem_shared/GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG-f8CnJha3.mjs";import{hasCloudflareCredentials as x}from"../packem_shared/hasCloudflareCredentials-Bak5w1_6.mjs";import{describeWithheld as _,withheldBindings as I}from"../packem_shared/describeWithheld-CbyzZjZF.mjs";import{bindingsNeedingDatabase as A,startLocalHyperdrive as D}from"../packem_shared/bindingsNeedingDatabase-6eD6Qtqf.mjs";import{H as S,c as W,r as T}from"../packem_shared/reconcile-bindings-B3bPJPeQ.mjs";import{reconcileWranglerCompatibilityDate as v}from"../packem_shared/reconcileWranglerCompatibilityDate-hocXEuRA.mjs";import{describePreservedCrons as b,reconcileWranglerCrons as B}from"../packem_shared/describePreservedCrons-C5KPuPy3.mjs";import{reconcileBindingsSafely as u,reconcileWranglerExtras as G}from"../packem_shared/reconcileBindingsSafely-Br0hhKmd.mjs";import{REMOTE_ELIGIBLE_KEYS as y,injectRemoteFlags as H,isRemoteEnvEnabled as M,materializeDevWranglerConfig as P,planRemoteBindings as V,resolveRemoteEnabled as w}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-CuhB99R2.mjs";import{materializeServiceDevConfigs as K}from"../packem_shared/materializeServiceDevConfigs-qUY4_iu1.mjs";import{default as z}from"../packem_shared/CLOUDFLARE_TOOLCHAIN_VERSIONS-DV5E_f_q.mjs";import{withTailConsumer as J}from"../packem_shared/withTailConsumer-CF3pk_Ov.mjs";import{WORKERS_CACHE_MIN_DATE as k,isCacheEnabled as q}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{wranglerCodegenInputs as $}from"../packem_shared/wranglerCodegenInputs-7WopgQo4.mjs";import{DEFAULT_OBSERVABILITY as re,resolveObservabilitySampling as oe}from"../packem_shared/DEFAULT_OBSERVABILITY-bN6UkTMx.mjs";import{mergeWranglerEnvironment as te}from"../packem_shared/mergeWranglerEnvironment-D5ekKj5x.mjs";import{WRANGLER_FILES as ie,findWranglerFile as le,readWranglerJsonc as fe}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{UNEXPORTED_CLASS_MARKER as Ee,validateWranglerProject as me}from"../packem_shared/UNEXPORTED_CLASS_MARKER-mdcw5KDY.mjs";import{scanWranglerVariablesForSecrets as de}from"../packem_shared/scanWranglerVariablesForSecrets-DXuYZNqq.mjs";import{wranglerToAlchemy as Ce}from"../packem_shared/wranglerToAlchemy-CBO2ucRm.mjs";import{REQUIRED_COMPATIBILITY_DATE as xe,REQUIRED_FLAG as ce,validateWrangler as _e,validateWranglerConfig as Ie}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-D4UcOP_t.mjs";export{i as BINDING_MANIFEST_VERSION,s as CLOUDFLARE_CLI_CONFIG_WARNING_ENV,d as CLOUDFLARE_DRIVER,z as CLOUDFLARE_TOOLCHAIN_VERSIONS,re as DEFAULT_OBSERVABILITY,C as GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG,S as HYPERDRIVE_PLACEHOLDER_ID,y as REMOTE_ELIGIBLE_KEYS,xe as REQUIRED_COMPATIBILITY_DATE,ce as REQUIRED_FLAG,Ee as UNEXPORTED_CLASS_MARKER,k as WORKERS_CACHE_MIN_DATE,ie as WRANGLER_FILES,o as applyModify,t as assertWranglerSatisfiesSchema,A as bindingsNeedingDatabase,l as buildBindingManifest,W as collectExportGaps,b as describePreservedCrons,_ as describeWithheld,E as detectCloudflareCliConfig,le as findWranglerFile,x as hasCloudflareCredentials,H as injectRemoteFlags,q as isCacheEnabled,M as isRemoteEnvEnabled,P as materializeDevWranglerConfig,K as materializeServiceDevConfigs,te as mergeWranglerEnvironment,V as planRemoteBindings,fe as readWranglerJsonc,u as reconcileBindingsSafely,T as reconcileWranglerBindings,v as reconcileWranglerCompatibilityDate,B as reconcileWranglerCrons,G as reconcileWranglerExtras,oe as resolveObservabilitySampling,w as resolveRemoteEnabled,de as scanWranglerVariablesForSecrets,D as startLocalHyperdrive,_e as validateWrangler,Ie as validateWranglerConfig,me as validateWranglerProject,m as warnCloudflareCliConfigOnce,J as withTailConsumer,I as withheldBindings,$ as wranglerCodegenInputs,Ce as wranglerToAlchemy};
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen';
2
2
  export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
3
- export { A as ACCENT, a as AGENT_RULES_DIR, b as AGENT_RULES_HINT, c as AGENT_RULES_HINT_ENV, type d as AgentRulesStatus, B as BADGES, e as BADGE_COLUMN_WIDTH, type f as BadgeName, type g as BadgeSpec, D as DEFAULT_DEPLOY_TARGET, L as LUNA_ART, h as LUNA_BUNNY, i as LUNA_NAME, j as LUNA_SIGNOFF, k as LUNORA_SKILL_NAMES, l as LUNORA_TAG, type m as LevelBadgeName, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, R as ROOT_SKILL_NAME, S as STEP_BADGE_NAMES, type p as StepBadgeName, type T as ToolchainInvocation, q as addArgsFor, r as advisoryLine, s as badgeLead, t as badgeWidth, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, G as padBadge, H as paintAnswer, I as paintBadge, J as planToolchainInvocation, K as readProjectDependencies, M as readProjectDependencyNames, N as readProjectManifest, O as resolveDeployDriver, Q as runScriptArgsFor, U as runScriptCommand, V as runnableTargetIds, W as targetRunsOwnDevServer, X as toolchainExecArgs } from "./packem_shared/index.d-DkNi7r6E.mjs";
3
+ export { A as ACCENT, a as AGENT_RULES_DIR, b as AGENT_RULES_HINT, c as AGENT_RULES_HINT_ENV, type d as AgentRulesStatus, B as BADGES, e as BADGE_COLUMN_WIDTH, type f as BadgeName, type g as BadgeSpec, D as DEFAULT_DEPLOY_TARGET, L as LUNA_ART, h as LUNA_BUNNY, i as LUNA_NAME, j as LUNA_SIGNOFF, k as LUNORA_SKILL_NAMES, l as LUNORA_TAG, type m as LevelBadgeName, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, R as ROOT_SKILL_NAME, S as STEP_BADGE_NAMES, type p as StepBadgeName, type T as ToolchainInvocation, q as addArgsFor, r as advisoryLine, s as badgeLead, t as badgeWidth, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, G as padBadge, H as paintAnswer, I as paintBadge, J as planToolchainInvocation, K as readProjectDependencies, M as readProjectDependencyNames, N as readProjectManifest, O as resolveDeployDriver, Q as runScriptArgsFor, U as runScriptCommand, V as runnableTargetIds, W as targetRunsOwnDevServer, X as toolchainExecArgs } from "./packem_shared/index.d-DSqsbmlq.mjs";
4
4
  import { ChildProcess } from 'node:child_process';
5
- import { D as DiscoveryCache } from "./packem_shared/infer-bindings.d-C9ktoVW4.mjs";
6
- export { C as COMPOSED_WORKER_ENTRY, a as DURABLE_OBJECT_BINDINGS, type b as DiscoverSchemaInfoResult, c as GENERATED_CLASS_MODULES, d as GENERATED_MODULE_DURABLE_OBJECTS, type G as GeneratedClassModule, type e as InferOptions, type f as InferredAgent, type I as InferredBindings, type g as InferredContainer, type h as InferredWorkflow, M as MERGED_DURABLE_OBJECTS_MODULE, type S as SchemaInfo, i as createDiscoveryCache, j as discoverSchemaInfo, k as inferLunoraBindings, l as isMergedProject, m as isMergedRoleModule, s as secretSourcesFromBindings } from "./packem_shared/infer-bindings.d-C9ktoVW4.mjs";
5
+ import { D as DiscoveryCache } from "./packem_shared/reconcile-bindings.d-LHrpR4kY.mjs";
6
+ export { C as COMPOSED_WORKER_ENTRY, a as D1_PLACEHOLDER_ID, b as DURABLE_OBJECT_BINDINGS, type d as DiscoverSchemaInfoResult, G as GENERATED_CLASS_MODULES, e as GENERATED_MODULE_DURABLE_OBJECTS, type f as GeneratedClassModule, type I as InferOptions, type g as InferredAgent, type h as InferredBindings, type i as InferredContainer, type j as InferredWorkflow, M as MERGED_DURABLE_OBJECTS_MODULE, type S as SchemaInfo, k as createDiscoveryCache, l as discoverSchemaInfo, m as inferLunoraBindings, n as isMergedProject, o as isMergedRoleModule, s as secretSourcesFromBindings } from "./packem_shared/reconcile-bindings.d-LHrpR4kY.mjs";
7
7
  import { Writable } from 'node:stream';
8
- export type { D as DeployDriver, a as DeployRequest, b as DevRequest, c as DriverToolchain, P as ProjectedConfig, d as ProjectionPurpose, S as SecretRequest, T as TailRequest, e as ToolchainCommand } from "./packem_shared/deploy-driver.d-Cl96-c1l.mjs";
8
+ export type { D as DeployDriver, a as DeployRequest, b as DevRequest, c as DriverToolchain, P as ProjectedConfig, d as ProjectionPurpose, S as SecretRequest, T as TailRequest, e as ToolchainCommand } from "./packem_shared/deploy-driver.d-DraUd2R2.mjs";
9
9
  export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.mjs";
10
10
  interface DiscoverAgentInfoResult {
11
11
  /** Discovered agent definitions; `[]` when none are declared or parsing failed. */
@@ -81,6 +81,35 @@ declare class MissingBuildOutputError extends Error {}
81
81
  * resolves through its nearest existing ancestor, since the CLI and the plugin often name a `.lunora` directory before creating it.
82
82
  */
83
83
  declare const canonicalPath: (path: string) => string;
84
+ interface CelldCommandResult {
85
+ code: number;
86
+ /** The launch error (`EACCES`) of a command that exists but could not start. */
87
+ error?: string;
88
+ stdout: string;
89
+ }
90
+ /** Runs one command and resolves its output; `undefined` when it does not exist (not on PATH). */
91
+ type CelldCommandRunner = (command: string, args: ReadonlyArray<string>) => Promise<CelldCommandResult | undefined>;
92
+ interface CelldToolchainProbeOptions {
93
+ /** A `--dry-run` deploy bundles but writes nothing, so it does not need the bucket. */
94
+ dryRun?: boolean;
95
+ /** The environment `CELLD_BUCKET` and `CELLD_ESBUILD` are read from, and the tools are looked up and run with. */
96
+ env?: Readonly<Record<string, string | undefined>>;
97
+ /** `deploy` also needs the fleet bucket; a dev session does not. */
98
+ purpose: "deploy" | "dev";
99
+ /** Injected for tests; defaults to running the command with `execFile`. */
100
+ run?: CelldCommandRunner;
101
+ }
102
+ interface CelldToolchainProbe {
103
+ /** Problems that stop the deploy or dev session. */
104
+ errors: string[];
105
+ /** Problems that do not stop it. */
106
+ warnings: string[];
107
+ }
108
+ /**
109
+ * Check the celld toolchain a deploy or dev session will run.
110
+ * @returns the errors that stop it and the warnings that do not. Nothing is written.
111
+ */
112
+ declare const probeCelldToolchain: (options: CelldToolchainProbeOptions) => Promise<CelldToolchainProbe>;
84
113
  /** Spawns the process — injectable so tests run without the binary. */
85
114
  type DevProcessSpawner = (command: string, args: ReadonlyArray<string>, options: {
86
115
  cwd: string;
@@ -132,6 +161,8 @@ interface CelldDevSessionOptions {
132
161
  log: (line: string, origin: CelldLineOrigin) => void;
133
162
  /** Port the app serves on. */
134
163
  port: number;
164
+ /** Checks the celld toolchain before anything starts; defaults to the host's `celld` and `PATH`. */
165
+ probe?: () => Promise<CelldToolchainProbe>;
135
166
  projectRoot: string;
136
167
  spawn?: DevProcessSpawner;
137
168
  }
@@ -144,6 +175,16 @@ interface CelldDevSession {
144
175
  /** Stop watching, cut short a restart in flight, then stop the app. */
145
176
  stop: () => Promise<void>;
146
177
  }
178
+ /**
179
+ * Write the app's dev projection without starting anything, for a `--no-worker`
180
+ * run whose external runner executes `celld dev` on it. The toolchain is probed
181
+ * first, so a missing tool leaves the project untouched, as a session does.
182
+ * @returns the warnings that do not stop it; throws, with nothing written, when a tool is missing.
183
+ */
184
+ declare const writeCelldDevProjection: (options: {
185
+ probe?: () => Promise<CelldToolchainProbe>;
186
+ projectRoot: string;
187
+ }) => Promise<string[]>;
147
188
  /**
148
189
  * Start the session: register every service, run the app, then watch the
149
190
  * service folders. Resolves once the app accepts connections; rejects, with
@@ -551,6 +592,20 @@ declare const DEV_WORKER_ENV_VALUE = "development";
551
592
  * declares it (in `.dev.vars` itself, or in the wrangler config's `vars`).
552
593
  */
553
594
  declare const ensureDevWorkerEnv: (projectRoot: string, info: (message: string) => void) => void;
595
+ /**
596
+ * Make sure the `.gitignore` in `directory` covers every pattern in `patterns`,
597
+ * appending only the ones it lacks. A no-op once they are all present, so a
598
+ * second call changes nothing.
599
+ *
600
+ * ORDER IS LOAD-BEARING: git is last-match-wins, so a negation only works while
601
+ * it sits below every pattern that would otherwise catch its file. An appended
602
+ * pattern lands BELOW whatever the file already had, so when anything is
603
+ * appended every negation in `patterns` is re-stated after the additions.
604
+ * @param directory The directory whose `.gitignore` is ensured; the patterns are relative to it.
605
+ * @param patterns The `.gitignore` lines the directory must carry.
606
+ * @returns The patterns appended, empty when the file already covered them all.
607
+ */
608
+ declare const ensureGitignoreEntries: (directory: string, patterns: ReadonlyArray<string>) => string[];
554
609
  /** Directory holding per-checkout Lunora state (gitignored by convention). */
555
610
  declare const LINKED_PROJECT_DIR = ".lunora";
556
611
  /** The canonical link filename, relative to the project root. */
@@ -719,6 +774,12 @@ interface SecretEntry {
719
774
  * given the set of detected capability package names.
720
775
  */
721
776
  declare const PACKAGE_SECRETS_REGISTRY: Readonly<Record<string, ReadonlyArray<SecretEntry>>>;
777
+ /**
778
+ * The keys a project may mint, given its secret sources. The relay key is minted only
779
+ * when this project hosts the registry: a worker that calls another worker's registry
780
+ * must take the host's value, so a fresh one would only be refused.
781
+ */
782
+ declare const mintableSecretKeysFor: (packageNames: ReadonlyArray<string>) => ReadonlySet<string>;
722
783
  declare const secretsForPackages: (packageNames: ReadonlyArray<string>) => SecretEntry[];
723
784
  /**
724
785
  * The two channels this needs from a caller's logger. Deliberately structural
@@ -952,7 +1013,7 @@ declare const isPlaceholderValue: (value: string) => boolean;
952
1013
  * runtime — over the developer's own half-filled `.dev.vars` — and hide the gap
953
1014
  * from `lunora env doctor`, whose job is to report it as unfilled.
954
1015
  */
955
- declare const isMintableSecretKey: (key: string) => boolean;
1016
+ declare const isMintableSecretKey: (key: string, value: string) => boolean;
956
1017
  /** Mint a fresh strong secret value — 64 hex chars (32 bytes), like `openssl rand -hex 32`. */
957
1018
  declare const generateSecretValue: (randomHex?: (bytes: number) => string) => string;
958
1019
  /**
@@ -1240,4 +1301,4 @@ type ParseSchemaResult = {
1240
1301
  * message per failure mode without throwing.
1241
1302
  */
1242
1303
  declare const parseSchema: (source: string) => ParseSchemaResult;
1243
- export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BUILD_ROOT_ENV, BUILD_TARGET_ENV, BUNDLE_META_PATH_ENV, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_BUNDLE_META_PATH, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, assertBuildTargetMatches, blockingFindingsMessage, buildPackageSecretsBlock, canonicalPath, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
1304
+ export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BUILD_ROOT_ENV, BUILD_TARGET_ENV, BUNDLE_META_PATH_ENV, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type CelldToolchainProbe, type CelldToolchainProbeOptions, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_BUNDLE_META_PATH, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, assertBuildTargetMatches, blockingFindingsMessage, buildPackageSecretsBlock, canonicalPath, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, ensureGitignoreEntries, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, mintableSecretKeysFor, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, probeCelldToolchain, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeCelldDevProjection, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen';
2
2
  export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
3
- export { A as ACCENT, a as AGENT_RULES_DIR, b as AGENT_RULES_HINT, c as AGENT_RULES_HINT_ENV, type d as AgentRulesStatus, B as BADGES, e as BADGE_COLUMN_WIDTH, type f as BadgeName, type g as BadgeSpec, D as DEFAULT_DEPLOY_TARGET, L as LUNA_ART, h as LUNA_BUNNY, i as LUNA_NAME, j as LUNA_SIGNOFF, k as LUNORA_SKILL_NAMES, l as LUNORA_TAG, type m as LevelBadgeName, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, R as ROOT_SKILL_NAME, S as STEP_BADGE_NAMES, type p as StepBadgeName, type T as ToolchainInvocation, q as addArgsFor, r as advisoryLine, s as badgeLead, t as badgeWidth, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, G as padBadge, H as paintAnswer, I as paintBadge, J as planToolchainInvocation, K as readProjectDependencies, M as readProjectDependencyNames, N as readProjectManifest, O as resolveDeployDriver, Q as runScriptArgsFor, U as runScriptCommand, V as runnableTargetIds, W as targetRunsOwnDevServer, X as toolchainExecArgs } from "./packem_shared/index.d-Cmx4jMFV.js";
3
+ export { A as ACCENT, a as AGENT_RULES_DIR, b as AGENT_RULES_HINT, c as AGENT_RULES_HINT_ENV, type d as AgentRulesStatus, B as BADGES, e as BADGE_COLUMN_WIDTH, type f as BadgeName, type g as BadgeSpec, D as DEFAULT_DEPLOY_TARGET, L as LUNA_ART, h as LUNA_BUNNY, i as LUNA_NAME, j as LUNA_SIGNOFF, k as LUNORA_SKILL_NAMES, l as LUNORA_TAG, type m as LevelBadgeName, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, R as ROOT_SKILL_NAME, S as STEP_BADGE_NAMES, type p as StepBadgeName, type T as ToolchainInvocation, q as addArgsFor, r as advisoryLine, s as badgeLead, t as badgeWidth, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, G as padBadge, H as paintAnswer, I as paintBadge, J as planToolchainInvocation, K as readProjectDependencies, M as readProjectDependencyNames, N as readProjectManifest, O as resolveDeployDriver, Q as runScriptArgsFor, U as runScriptCommand, V as runnableTargetIds, W as targetRunsOwnDevServer, X as toolchainExecArgs } from "./packem_shared/index.d-sZ22Dkwr.js";
4
4
  import { ChildProcess } from 'node:child_process';
5
- import { D as DiscoveryCache } from "./packem_shared/infer-bindings.d-C9ktoVW4.js";
6
- export { C as COMPOSED_WORKER_ENTRY, a as DURABLE_OBJECT_BINDINGS, type b as DiscoverSchemaInfoResult, c as GENERATED_CLASS_MODULES, d as GENERATED_MODULE_DURABLE_OBJECTS, type G as GeneratedClassModule, type e as InferOptions, type f as InferredAgent, type I as InferredBindings, type g as InferredContainer, type h as InferredWorkflow, M as MERGED_DURABLE_OBJECTS_MODULE, type S as SchemaInfo, i as createDiscoveryCache, j as discoverSchemaInfo, k as inferLunoraBindings, l as isMergedProject, m as isMergedRoleModule, s as secretSourcesFromBindings } from "./packem_shared/infer-bindings.d-C9ktoVW4.js";
5
+ import { D as DiscoveryCache } from "./packem_shared/reconcile-bindings.d-LHrpR4kY.js";
6
+ export { C as COMPOSED_WORKER_ENTRY, a as D1_PLACEHOLDER_ID, b as DURABLE_OBJECT_BINDINGS, type d as DiscoverSchemaInfoResult, G as GENERATED_CLASS_MODULES, e as GENERATED_MODULE_DURABLE_OBJECTS, type f as GeneratedClassModule, type I as InferOptions, type g as InferredAgent, type h as InferredBindings, type i as InferredContainer, type j as InferredWorkflow, M as MERGED_DURABLE_OBJECTS_MODULE, type S as SchemaInfo, k as createDiscoveryCache, l as discoverSchemaInfo, m as inferLunoraBindings, n as isMergedProject, o as isMergedRoleModule, s as secretSourcesFromBindings } from "./packem_shared/reconcile-bindings.d-LHrpR4kY.js";
7
7
  import { Writable } from 'node:stream';
8
- export type { D as DeployDriver, a as DeployRequest, b as DevRequest, c as DriverToolchain, P as ProjectedConfig, d as ProjectionPurpose, S as SecretRequest, T as TailRequest, e as ToolchainCommand } from "./packem_shared/deploy-driver.d-Cl96-c1l.js";
8
+ export type { D as DeployDriver, a as DeployRequest, b as DevRequest, c as DriverToolchain, P as ProjectedConfig, d as ProjectionPurpose, S as SecretRequest, T as TailRequest, e as ToolchainCommand } from "./packem_shared/deploy-driver.d-DraUd2R2.js";
9
9
  export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.js";
10
10
  interface DiscoverAgentInfoResult {
11
11
  /** Discovered agent definitions; `[]` when none are declared or parsing failed. */
@@ -81,6 +81,35 @@ declare class MissingBuildOutputError extends Error {}
81
81
  * resolves through its nearest existing ancestor, since the CLI and the plugin often name a `.lunora` directory before creating it.
82
82
  */
83
83
  declare const canonicalPath: (path: string) => string;
84
+ interface CelldCommandResult {
85
+ code: number;
86
+ /** The launch error (`EACCES`) of a command that exists but could not start. */
87
+ error?: string;
88
+ stdout: string;
89
+ }
90
+ /** Runs one command and resolves its output; `undefined` when it does not exist (not on PATH). */
91
+ type CelldCommandRunner = (command: string, args: ReadonlyArray<string>) => Promise<CelldCommandResult | undefined>;
92
+ interface CelldToolchainProbeOptions {
93
+ /** A `--dry-run` deploy bundles but writes nothing, so it does not need the bucket. */
94
+ dryRun?: boolean;
95
+ /** The environment `CELLD_BUCKET` and `CELLD_ESBUILD` are read from, and the tools are looked up and run with. */
96
+ env?: Readonly<Record<string, string | undefined>>;
97
+ /** `deploy` also needs the fleet bucket; a dev session does not. */
98
+ purpose: "deploy" | "dev";
99
+ /** Injected for tests; defaults to running the command with `execFile`. */
100
+ run?: CelldCommandRunner;
101
+ }
102
+ interface CelldToolchainProbe {
103
+ /** Problems that stop the deploy or dev session. */
104
+ errors: string[];
105
+ /** Problems that do not stop it. */
106
+ warnings: string[];
107
+ }
108
+ /**
109
+ * Check the celld toolchain a deploy or dev session will run.
110
+ * @returns the errors that stop it and the warnings that do not. Nothing is written.
111
+ */
112
+ declare const probeCelldToolchain: (options: CelldToolchainProbeOptions) => Promise<CelldToolchainProbe>;
84
113
  /** Spawns the process — injectable so tests run without the binary. */
85
114
  type DevProcessSpawner = (command: string, args: ReadonlyArray<string>, options: {
86
115
  cwd: string;
@@ -132,6 +161,8 @@ interface CelldDevSessionOptions {
132
161
  log: (line: string, origin: CelldLineOrigin) => void;
133
162
  /** Port the app serves on. */
134
163
  port: number;
164
+ /** Checks the celld toolchain before anything starts; defaults to the host's `celld` and `PATH`. */
165
+ probe?: () => Promise<CelldToolchainProbe>;
135
166
  projectRoot: string;
136
167
  spawn?: DevProcessSpawner;
137
168
  }
@@ -144,6 +175,16 @@ interface CelldDevSession {
144
175
  /** Stop watching, cut short a restart in flight, then stop the app. */
145
176
  stop: () => Promise<void>;
146
177
  }
178
+ /**
179
+ * Write the app's dev projection without starting anything, for a `--no-worker`
180
+ * run whose external runner executes `celld dev` on it. The toolchain is probed
181
+ * first, so a missing tool leaves the project untouched, as a session does.
182
+ * @returns the warnings that do not stop it; throws, with nothing written, when a tool is missing.
183
+ */
184
+ declare const writeCelldDevProjection: (options: {
185
+ probe?: () => Promise<CelldToolchainProbe>;
186
+ projectRoot: string;
187
+ }) => Promise<string[]>;
147
188
  /**
148
189
  * Start the session: register every service, run the app, then watch the
149
190
  * service folders. Resolves once the app accepts connections; rejects, with
@@ -551,6 +592,20 @@ declare const DEV_WORKER_ENV_VALUE = "development";
551
592
  * declares it (in `.dev.vars` itself, or in the wrangler config's `vars`).
552
593
  */
553
594
  declare const ensureDevWorkerEnv: (projectRoot: string, info: (message: string) => void) => void;
595
+ /**
596
+ * Make sure the `.gitignore` in `directory` covers every pattern in `patterns`,
597
+ * appending only the ones it lacks. A no-op once they are all present, so a
598
+ * second call changes nothing.
599
+ *
600
+ * ORDER IS LOAD-BEARING: git is last-match-wins, so a negation only works while
601
+ * it sits below every pattern that would otherwise catch its file. An appended
602
+ * pattern lands BELOW whatever the file already had, so when anything is
603
+ * appended every negation in `patterns` is re-stated after the additions.
604
+ * @param directory The directory whose `.gitignore` is ensured; the patterns are relative to it.
605
+ * @param patterns The `.gitignore` lines the directory must carry.
606
+ * @returns The patterns appended, empty when the file already covered them all.
607
+ */
608
+ declare const ensureGitignoreEntries: (directory: string, patterns: ReadonlyArray<string>) => string[];
554
609
  /** Directory holding per-checkout Lunora state (gitignored by convention). */
555
610
  declare const LINKED_PROJECT_DIR = ".lunora";
556
611
  /** The canonical link filename, relative to the project root. */
@@ -719,6 +774,12 @@ interface SecretEntry {
719
774
  * given the set of detected capability package names.
720
775
  */
721
776
  declare const PACKAGE_SECRETS_REGISTRY: Readonly<Record<string, ReadonlyArray<SecretEntry>>>;
777
+ /**
778
+ * The keys a project may mint, given its secret sources. The relay key is minted only
779
+ * when this project hosts the registry: a worker that calls another worker's registry
780
+ * must take the host's value, so a fresh one would only be refused.
781
+ */
782
+ declare const mintableSecretKeysFor: (packageNames: ReadonlyArray<string>) => ReadonlySet<string>;
722
783
  declare const secretsForPackages: (packageNames: ReadonlyArray<string>) => SecretEntry[];
723
784
  /**
724
785
  * The two channels this needs from a caller's logger. Deliberately structural
@@ -952,7 +1013,7 @@ declare const isPlaceholderValue: (value: string) => boolean;
952
1013
  * runtime — over the developer's own half-filled `.dev.vars` — and hide the gap
953
1014
  * from `lunora env doctor`, whose job is to report it as unfilled.
954
1015
  */
955
- declare const isMintableSecretKey: (key: string) => boolean;
1016
+ declare const isMintableSecretKey: (key: string, value: string) => boolean;
956
1017
  /** Mint a fresh strong secret value — 64 hex chars (32 bytes), like `openssl rand -hex 32`. */
957
1018
  declare const generateSecretValue: (randomHex?: (bytes: number) => string) => string;
958
1019
  /**
@@ -1240,4 +1301,4 @@ type ParseSchemaResult = {
1240
1301
  * message per failure mode without throwing.
1241
1302
  */
1242
1303
  declare const parseSchema: (source: string) => ParseSchemaResult;
1243
- export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BUILD_ROOT_ENV, BUILD_TARGET_ENV, BUNDLE_META_PATH_ENV, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_BUNDLE_META_PATH, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, assertBuildTargetMatches, blockingFindingsMessage, buildPackageSecretsBlock, canonicalPath, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
1304
+ export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BUILD_ROOT_ENV, BUILD_TARGET_ENV, BUNDLE_META_PATH_ENV, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type CelldToolchainProbe, type CelldToolchainProbeOptions, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_BUNDLE_META_PATH, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, assertBuildTargetMatches, blockingFindingsMessage, buildPackageSecretsBlock, canonicalPath, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, ensureGitignoreEntries, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, mintableSecretKeysFor, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, probeCelldToolchain, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeCelldDevProjection, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };