import type { ActionLedgerCapabilityRegistry } from "@voyant-travel/action-ledger/capability"; import type { EventEnvelope, VoyantRuntimeHostPrimitives } from "@voyant-travel/core"; import { type RateLimitStore, type VoyantAuthIntegration, type VoyantBindings } from "@voyant-travel/hono"; import type { ExtensionFactory, ModuleFactory } from "@voyant-travel/hono/composition"; import { type CreateNodeServerOptions, type ExecutionContextLike, type NodeServerHandle } from "@voyant-travel/runtime-core"; import type { StorageProvider, StorageProviderResolver } from "@voyant-travel/storage/types"; import { type CreateVoyantAppConfig } from "./create-app.js"; import type { VoyantGraphDeploymentRequirements, VoyantGraphProvisionedJob } from "./deployment-graph.js"; import type { VoyantDeploymentMode, VoyantDeploymentProviders, VoyantRedisBindingConstraints } from "./deployment-types.js"; import { type VoyantNodeJobHealth, type VoyantNodeJobHost } from "./node-job-host.js"; import { resolveVoyantNodeProviderPlan, type VoyantNodeProviderPlan, validateVoyantNodeProviderPlanEnv } from "./node-provider-plan.js"; import type { VoyantGraphRuntime } from "./runtime-lowering.js"; import { type ResolvedVoyantGraphRuntimeValues } from "./runtime-values.js"; export interface VoyantNodeRuntimeEnv extends VoyantBindings { DATABASE_URL_DIRECT?: string; DATABASE_URL_REPLICAS?: string; S3_ENDPOINT?: string; S3_REGION?: string; S3_ACCESS_KEY_ID?: string; S3_SECRET_ACCESS_KEY?: string; S3_SESSION_TOKEN?: string; S3_FORCE_PATH_STYLE?: string; STORAGE_S3_BACKEND_IDENTITY?: string; STORAGE_MEDIA_BUCKET?: string; STORAGE_DOCUMENTS_BUCKET?: string; MEDIA_PUBLIC_BASE_URL?: string; API_BASE_URL?: string; REDIS_URL?: string; REDIS_NAMESPACE?: string; RATE_LIMIT_STORE?: RateLimitStore; VOYANT_ADMIN_AUTH_MODE?: string; VOYANT_CUSTOMER_AUTH_MODE?: string; VOYANT_APP_RUNTIME_AUDIENCE?: string; VOYANT_APP_SESSION_TOKEN_SIGNING_SECRET?: string; VOYANT_APP_SESSION_TOKEN_TTL_SECONDS?: string; VOYANT_CLOUD_DEPLOYMENT_ID?: string; VOYANT_CLOUD_ADMIN_AUTH_START_URL?: string; VOYANT_CLOUD_ADMIN_AUTH_EXCHANGE_URL?: string; VOYANT_CLOUD_ADMIN_AUTH_JWKS_URL?: string; VOYANT_CLOUD_ADMIN_AUTH_REVALIDATE_URL?: string; VOYANT_CLOUD_ADMIN_AUTH_AUDIENCE?: string; VOYANT_CLOUD_ADMIN_AUTH_CLIENT_TOKEN?: string; SESSION_CLAIMS_ADMIN_SECRET?: string; SESSION_CLAIMS_CUSTOMER_SECRET?: string; BETTER_AUTH_ADMIN_SECRET?: string; BETTER_AUTH_CUSTOMER_SECRET?: string; VOYANT_CLOUD_PRODUCT_JOB_HEALTH_URL?: string; VOYANT_CLOUD_WORKLOAD_ENVIRONMENT_ID?: string; ORIGIN_TRUST_SECRET?: string; PORT?: string; } export interface CreateVoyantNodeRuntimeHostPrimitivesOptions { env: VoyantNodeRuntimeEnv; storage?: StorageProviderResolver; config?: Readonly>; deliverEvent?: (event: unknown, bindings: unknown) => Promise; } export declare class VoyantNodeHostRequirementError extends Error { readonly requirement: string; readonly code = "VOYANT_NODE_HOST_REQUIREMENT_MISSING"; constructor(requirement: string); } /** Domain-neutral infrastructure supplied to statically selected runtime contributors. */ export declare function createVoyantNodeRuntimeHostPrimitives(options: CreateVoyantNodeRuntimeHostPrimitivesOptions): VoyantRuntimeHostPrimitives; /** Generic host resources available only to deployment-local factories. */ export type VoyantNodeRuntimeResources = Readonly>; /** Graph-native deployment settings consumed by the resident Node host. */ export interface VoyantNodeRuntimeDeployment { /** @deprecated Retained as generated-artifact metadata; runtime policy must not branch on it. */ mode?: VoyantDeploymentMode; providers: Readonly> & Partial>; /** Explicit properties of the concrete Redis binding selected at boot. */ redis?: VoyantRedisBindingConstraints; } /** Inputs for booting a generated application graph in a resident Node process. */ export interface VoyantNodeRuntimeOptions { graphRuntime: VoyantGraphRuntime; /** Resolved, immutable provisioning.jobs inventory from the admitted graph. */ jobs: readonly VoyantGraphProvisionedJob[]; deployment: VoyantNodeRuntimeDeployment; deploymentRequirements: VoyantGraphDeploymentRequirements; runtimePorts?: import("./runtime-composition.js").VoyantGraphRuntimePorts; /** * Binds graph-contributed durable event delivery to the composed application * bus after boot. The caller owns the concrete runtime port; the generic Node * host owns only the event-delivery lifecycle. */ eventDelivery?: { bind(deliver: (event: EventEnvelope) => Promise): void; }; /** Node-owned durable boundary for graph-selected outbound webhook events. */ outboundWebhooks?: { enqueue: (event: EventEnvelope, bindings: unknown) => Promise; }; /** Node-owned durable boundary for installed-app webhook events. */ appWebhooks?: { enqueue: (event: EventEnvelope, bindings: unknown) => Promise; }; /** Generic resources available to deployment-local factories. */ resources?: VoyantNodeRuntimeResources; applicationId?: string; env?: Record | VoyantNodeRuntimeEnv; auth?: VoyantAuthIntegration; /** @deprecated Use `resources`; package behavior belongs behind `runtimePorts`. */ providers?: VoyantNodeRuntimeResources; app?: Partial, "providers">>; } /** A graph-native application runtime hosted by Node. */ export interface VoyantNodeRuntime { graphRuntime: VoyantGraphRuntime; deployment: VoyantNodeRuntimeDeployment; requirements: VoyantGraphDeploymentRequirements; env: VoyantNodeRuntimeEnv; graphValues: ResolvedVoyantGraphRuntimeValues; app: ReturnType; actionLedgerCapabilities: ActionLedgerCapabilityRegistry; jobs: { inventory: readonly VoyantGraphProvisionedJob[]; health: () => readonly VoyantNodeJobHealth[]; invoke: VoyantNodeJobHost["invoke"]; }; fetch: (request: Request, env?: VoyantNodeRuntimeEnv, ctx?: ExecutionContextLike) => Response | Promise; start: (options?: Partial>) => NodeServerHandle; } /** Boot a generated application graph without constructing a profile compatibility manifest. */ export declare function loadVoyantNodeRuntime(options: VoyantNodeRuntimeOptions): Promise; export declare function startVoyantNodeRuntime(options: VoyantNodeRuntimeOptions & { server?: Partial>; }): Promise; export declare function createVoyantNodeApp(options: { applicationId: string; activeModules: readonly string[]; deployment: VoyantNodeRuntimeDeployment; env?: VoyantNodeRuntimeEnv; auth?: VoyantAuthIntegration; resources?: VoyantNodeRuntimeResources; /** @deprecated Use `resources`; package behavior belongs behind graph runtime ports. */ providers?: VoyantNodeRuntimeResources; app?: Partial, "providers">>; modules?: Record>; extensions?: Record>; }): import("hono").Hono<{ Bindings: VoyantNodeRuntimeEnv; Variables: import("@voyant-travel/hono").VoyantVariables; }, import("hono/types").BlankSchema, "/"> & import("@voyant-travel/hono/app").VoyantAppExtensions; export declare function createVoyantNodeEnv(processEnv: Record | VoyantNodeRuntimeEnv, providerPlan?: VoyantNodeProviderPlan): VoyantNodeRuntimeEnv; export type { StorageProvider, StorageProviderResolver, VoyantNodeProviderPlan }; export { resolveVoyantNodeProviderPlan, validateVoyantNodeProviderPlanEnv };