/** * Primitive discovery run once at startup, before the server accepts requests. * * Extracted from `production-server.ts` so the host-execution grant it passes * can be tested. The bug this addresses (issue-inbox#363) was that the fallback * branch hardcoded `allowHostProjectCodeExecution: true` while the request * handler computed the real answer fifteen lines below, so a deployment that * denied execution at request time still granted it at startup. * * Same shape as veryfront-code#3364, where `api-handler-wrapper.ts` passed a * hardcoded `true` and made the computed predicate dead code. A hardcoded * capability sitting next to a computed one is the pattern to look for. */ import type { DiscoveryConfig, DiscoveryResult } from "../discovery/types.js"; import type { FileSystemAdapter } from "../platform/adapters/base.js"; import type { ExtendedFileSystemAdapter } from "../platform/adapters/fs/wrapper.js"; import type { DiscoveryOptions } from "./production-server.js"; export interface RunStartupDiscoveryInput { config: DiscoveryOptions; /** * The deployment's posture, computed once by the host-owned entrypoint and * shared with the request handler. Never hardcoded here. */ allowHostProjectCodeExecution: boolean; discoverAll: (config: DiscoveryConfig) => Promise; isExtendedFSAdapter: (fs: FileSystemAdapter) => fs is ExtendedFileSystemAdapter; } /** What startup discovery did, so the caller can report it accurately. */ export type StartupDiscoveryOutcome = { ran: true; } | { ran: false; reason: "scoped-multi-project"; }; export declare function runStartupDiscovery(input: RunStartupDiscoveryInput): Promise; //# sourceMappingURL=startup-discovery.d.ts.map