/** * build-binaries, compiles standalone binaries for the configured matrix. * * Absorbs tui/build.ts and agent/build.ts. The TUI's daemon leg (a second * `bun build --compile` of a daemon entrypoint per target) is config-driven: * a target/build with a `daemonEntrypoint` + `daemonArtifact` builds two * binaries, one without builds one. Native addons (sqlite-vec) stay `--external` * and are copied beside the binary; a same-platform miss is fatal, a * cross-target miss triggers an `npm pack` + `tar` fetch. */ import type { Exec, Logger } from './effects.js'; import type { BinaryTarget, BuildConfig } from '../config.js'; import { type DependencyManifest } from './optional-externals.js'; /** Resolve which targets to build and whether the daemon leg is forced off/only. */ export interface TargetSelection { readonly targets: readonly BinaryTarget[]; readonly daemonOnly: boolean; } /** * Resolve the target selection from argv against the matrix. * - `--all` → every target. * - `--target ` → that target; a `daemon-` alias forces daemon-only. * - `--daemon-only` → daemon leg only. * - none → the native `${platform}-${arch}` row. */ export declare function resolveTargets(argv: readonly string[], config: BuildConfig, nativeKey: string): TargetSelection; /** Construct the `bun build --compile` argv for one entrypoint. */ export declare function buildCompileArgs(entrypoint: string, bunTarget: string, outfile: string, externals: readonly string[]): string[]; export interface BuildOutcome { readonly key: string; readonly ok: boolean; readonly detail: string; } export interface RunBuildOptions { readonly cwd: string; readonly config: BuildConfig; readonly selection: TargetSelection; readonly nativeKey: string; /** Copies a resolved native addon into place; returns false if it could not be provided. Injected so the real fs copy stays out of the policy. */ readonly provideAddon?: (target: BinaryTarget, sameHost: boolean) => boolean; /** * Manifests whose `optionalDependencies` may be externalised and whose * `dependencies` must be present. Omit both this and `isPackageInstalled` * and the screen does not run at all, which is what every existing caller * gets. */ readonly dependencyManifests?: readonly DependencyManifest[]; /** True when the package resolves from the build root. */ readonly isPackageInstalled?: (packageName: string) => boolean; readonly exec?: Exec; readonly logger?: Logger; } /** Compile the selected targets. Returns one outcome per target. */ export declare function runBuildBinaries(options: RunBuildOptions): BuildOutcome[]; //# sourceMappingURL=build-binaries.d.ts.map