import { z } from 'zod'; export declare const semverVersion: z.ZodString; export declare const permissionDeclaration: z.ZodObject<{ key: z.core.$ZodBranded; description: z.ZodString; }, z.core.$strip>; export type PermissionDeclaration = z.infer; export declare const eventTypeRef: z.ZodObject<{ type: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strip>; export type EventTypeRef = z.infer; export declare const manifestGuard: z.ZodObject<{ before: z.ZodString; predicate: z.ZodString; config: z.ZodDefault>; }, z.core.$strip>; export type ManifestGuard = z.infer; export declare const scheduleSpec: z.ZodObject<{ operation: z.ZodString; cadence: z.ZodObject<{ everyMinutes: z.ZodNumber; }, z.core.$strip>; input: z.ZodOptional>; permissions: z.ZodDefault>>; }, z.core.$strip>; export type ScheduleSpec = z.infer; export declare const freshnessSpec: z.ZodObject<{ eventType: z.ZodString; within: z.ZodObject<{ hours: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; export type FreshnessSpec = z.infer; export declare const envVarSpec: z.ZodObject<{ key: z.ZodString; label: z.ZodOptional; description: z.ZodString; placeholder: z.ZodOptional; required: z.ZodDefault; secret: z.ZodDefault; default: z.ZodOptional; group: z.ZodOptional; }, z.core.$strip>; export type EnvVarSpec = z.infer; /** * A named capability a vertical **provides** or **requires** (e.g. `oidc-issuer`), wired * tenant-side through the connection store (marketplace-publish.md §4). Lowercase kebab. * Identity is per-tenant, so one provider (an auth-server) serves all a tenant's requiring * verticals — the connection binds them, nothing is bundled into a consumer's manifest. */ export declare const capability: z.ZodString; export type Capability = z.infer; /** The runtime resolution of an `envSpec` against a raw environment. */ export interface ResolvedEnv { /** Each declared key → its value (from `raw`, else the spec's `default`). */ values: Record; /** Declared `required` keys that resolved to nothing — a deploy misconfiguration. */ missingRequired: string[]; } /** * Resolve a declared `envSpec` against a raw environment (a Worker `env`, `process.env`, …). * Reads ONLY the declared keys, so the manifest is the single source of what an app consumes * (a key it doesn't declare, it doesn't read); applies each spec `default`; and reports absent * `required` keys. Never throws — the caller decides whether a missing required key is fatal * (a hosted vertical may have a per-scope fallback), and the config form is where a bad deploy * is blocked. Non-string raw values (e.g. a binding) are ignored — the spec covers string config. * * This reads DEPLOYMENT-WIDE config only: env-spec defaults ride as worker bindings shared by * every install of one serving script, so this can never see a per-install override saved in the * dashboard Env tab. A hosted vertical that has per-instance settings must use * `resolveScopedEnvSpec`, passing the config delivered to that scope. */ export declare function resolveEnvSpec(spec: EnvVarSpec[], raw: Record): ResolvedEnv; /** * Resolve a declared `envSpec` for ONE hosted instance: the deployment environment * overlaid with the per-scope config DELIVERED to that instance (the dashboard Env tab → * `/internal/configure`). Precedence is **delivered > env > default** — a per-install * override wins over the deployment-wide binding (which for a hosted vertical typically * just carries the manifest `default:`), which wins over the declared default. * * This is the read half a hosted vertical needs and `resolveEnvSpec(env)` alone cannot * give: env-spec defaults ride as worker bindings, shared by every install of one serving * script, so a per-install setting can only arrive through the per-scope delivery channel * and MUST be overlaid here — reading `env` alone always yields the shared default (the * silent-defaults bug). `delivered` is the vertical's OWN per-scope config map: it owns * the store (a DO row set, a table) and reads it back keyed by scope; the platform never * sees it. This function is the pure merge over that map, so it stays dependency-free and * each vertical supplies `delivered` however it stores config. Only DECLARED keys are read * (the manifest stays the allow-list — a stray delivered key never reaches the app), an * empty/absent delivered value is not an override (keeps env/default, matching * `resolveEnvSpec`), and `missingRequired` reflects the overlaid values. */ export declare function resolveScopedEnvSpec(spec: EnvVarSpec[], raw: Record, delivered: Record): ResolvedEnv; export declare const moduleManifest: z.ZodObject<{ id: z.core.$ZodBranded; version: z.ZodString; kernelContract: z.ZodString; permissions: z.ZodArray; description: z.ZodString; }, z.core.$strip>>; events: z.ZodObject<{ emits: z.ZodArray>; consumes: z.ZodArray>; }, z.core.$strip>; migrations: z.ZodObject<{ journalDir: z.ZodString; compatibleFrom: z.ZodString; }, z.core.$strip>; attachmentTargets: z.ZodArray; writePermission: z.ZodOptional>; }, z.core.$strip>>; liveTargets: z.ZodOptional; }, z.core.$strip>>>; entityRelations: z.ZodOptional>>; guards: z.ZodOptional>; }, z.core.$strip>>>; schedules: z.ZodOptional; input: z.ZodOptional>; permissions: z.ZodDefault>>; }, z.core.$strip>>>; freshness: z.ZodOptional; }, z.core.$strip>>>; withdraws: z.ZodOptional>; entitlementKey: z.ZodString; envSpec: z.ZodOptional; description: z.ZodString; placeholder: z.ZodOptional; required: z.ZodDefault; secret: z.ZodDefault; default: z.ZodOptional; group: z.ZodOptional; }, z.core.$strip>>>; ownerGrants: z.ZodOptional>>; entitlements: z.ZodOptional>; provides: z.ZodOptional>; requires: z.ZodOptional>; api: z.ZodOptional; searchables: z.ZodOptional; table: z.ZodOptional; idColumn: z.ZodOptional; tokenizer: z.ZodOptional>; }, z.core.$strip>>>; lists: z.ZodOptional; filterable: z.ZodOptional>; table: z.ZodOptional; idColumn: z.ZodOptional; }, z.core.$strip>>>; ui: z.ZodOptional; }, z.core.$strip>>>; nav: z.ZodOptional; to: z.ZodString; permission: z.core.$ZodBranded; }, z.core.$strip>>>; entityViews: z.ZodOptional>>; widgets: z.ZodOptional; }, z.core.$strip>>>; settingsPanels: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip>; export type ModuleManifest = z.infer; //# sourceMappingURL=manifest.d.ts.map