{
  "package": "@arki/dot",
  "version": "0.7.0",
  "entries": [
    {
      "subpath": ".",
      "name": "ActionDiagnostic",
      "kind": "type",
      "signature": "export type ActionDiagnostic = { id: string; plugin: string; binding: string; /** The action's summary, when it has one (post-boot, as completed by `$describeAction`). */ summary?: string; /** Structural configure-phase health only; not runtime liveness. */ status: Extract<DiagnosticStatus, 'ok' | 'degraded' | 'failed'>; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ActionDirection",
      "kind": "type",
      "signature": "export type ActionDirection = 'in' | 'out';",
      "jsdocSummary": "Direction of a boundary interaction, viewed from the app."
    },
    {
      "subpath": ".",
      "name": "ActionManifest",
      "kind": "type",
      "signature": "export type ActionManifest = { /** Stable identifier, e.g. `orders.list` or `orders.created.consume`. */ id: string; plugin: string; /** Adapter-owned binding name: `http`, `queue`, `cli`, `cron`, etc. */ binding: string; /** `in` = world invokes/feeds the app; `out` = app emits. */ direction: ActionDirection; /** Display-only address printed by `dot explain`. */ address?: string; /** Human summary rendered into explain output and projected documents. */ summary?: string; /** Adapter-owned, JSON-serializable detail. Opaque to the kernel. */ meta?: Readonly<JsonObject>; /** Optional adapter-owned identifier+version for the meta layout. */ metaSchema?: string; };",
      "jsdocSummary": "Something the app does at a boundary — universal, serializable, tiny."
    },
    {
      "subpath": ".",
      "name": "ActionSource",
      "kind": "type",
      "signature": "export type ActionSource = ActionDeclaration | { toDotAction(): ActionDeclaration; };",
      "jsdocSummary": "Structural protocol for adapter-owned declarations."
    },
    {
      "subpath": ".",
      "name": "AnyPlugin",
      "kind": "type",
      "signature": "export type AnyPlugin = Plugin<ServiceRecord, ServiceRecord, NeedsShape, string, PluginOwnership, PluginPhases>;",
      "jsdocSummary": "Internal type alias used by the kernel to erase plugin service generics."
    },
    {
      "subpath": ".",
      "name": "AuthoredPlugin",
      "kind": "type",
      "signature": "export type AuthoredPlugin<Needs extends ServiceRecord, Provides extends ServiceRecord, Shape extends NeedsShape, Owner extends string, Values extends ServiceRecord, Phases extends PluginPhases, Logging extends DotLoggingHandle | Failure, Boot> = Omit<Plugin<Needs, Provides, Shape, Owner, EmptyOwnership, Phases>, 'logging' | 'factories' | 'hooks'> & LoggingSlot<Logging> & FactoryContract<ProvidedValues<Values>> & { readonly factories: { readonly [Key in keyof Values]: (ctx: never) => Values[Key]; }; readonly hooks: PhaseHooks<never, { readonly [Phase in keyof PluginPhases]: undefined | Phases[Phase]; }> & { readonly boot?: (ctx: CtxOf<Shape> & Provides & KernelCtx) => MaybePromise<Boot>; }; };",
      "jsdocSummary": "Authored plugins retain the callbacks that own their runtime failures."
    },
    {
      "subpath": ".",
      "name": "bootTestApp",
      "kind": "function",
      "signature": "export declare function bootTestApp<const TPlugins extends readonly AnyPlugin[] = readonly []>(plugins?: TPlugins & TestAppGuard<TPlugins>, options?: TestAppOptions): Promise<import(\"./define-app.js\").DotApp<TestAppServices<TPlugins>, PluginCloseFailure<TPlugins[number]>, PluginOpenFailure<TPlugins[number]>, PluginPhaseFailures<TPlugins[number]>> | Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<PluginPhaseFailures<TPlugins[number]>[\"configure\"], void> | Exclude<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void>, void> | Exclude<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"open\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"open\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void>, void> | Exclude<Exclude<Extract<TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never, Failure>, void>, void> | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | PluginOpenFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure> | import(\"@arki/async\").ScopeAggregate<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void> | Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"open\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"open\"], void> | Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void> | Exclude<Extract<TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never, Failure>, void> | import(\"@arki/async\").SupervisorFailure | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | PluginOpenFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure>, PluginPhaseFailures<TPlugins[number]>[\"dispose\"] | (Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void> | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure>)>>;",
      "jsdocSummary": "Build and boot an app, returning declared ownership failures to its caller."
    },
    {
      "subpath": ".",
      "name": "CtxOf",
      "kind": "type",
      "signature": "export type CtxOf<S extends NeedsShape> = { [K in keyof S]: WitnessContext<S[K]>; };",
      "jsdocSummary": "Local-alias view of a needs shape — what lifecycle hooks destructure. `{ cache: Token<KV, 'arki.kv'> }` → `{ cache: KV }`. `{ search: service.lazy<S>() }` → `{ search: Lazy<S> }`."
    },
    {
      "subpath": ".",
      "name": "defineApp",
      "kind": "function",
      "signature": "export declare function defineApp(name: string, options?: { version?: string; config?: Readonly<Record<string, unknown>>; /** * In-process lifecycle observers, registered before the first phase * fires. Required if you want to see `configure`-phase events — after * configure runs, observers can be added post-hoc via * `configured.subscribe(...)` or `app.subscribe(...)`. */ observers?: readonly DotLifecycleObserver[]; /** * Watchdog budget (ms) for each async hook invocation (`boot`, `start`, * `stop`, `dispose` — `configure` is sync). A hook exceeding the budget * fails with `ARKI_DOT_E015` naming the plugin and hook, and the * kernel applies its normal failure rules (boot rollback, teardown * aggregation). The hook's promise itself cannot be cancelled — the * watchdog makes the hang *visible*, it does not kill it. Default: * no watchdog. */ hookTimeoutMs?: number; clock?: Clock; }): DotAppBuilder<EmptyShape>;",
      "jsdocSummary": "Create a new DOT app builder."
    },
    {
      "subpath": ".",
      "name": "DependencyEdge",
      "kind": "type",
      "signature": "export type DependencyEdge = { from: string; to: string; kind: DependencyEdgeKind; /** * The capability (wire key) the edge carries. Set on edges the kernel * derives before boot from a feature's static `provides`. */ key?: string; };",
      "jsdocSummary": "Directed edge in the plugin dependency graph."
    },
    {
      "subpath": ".",
      "name": "DependencyEdgeKind",
      "kind": "type",
      "signature": "export type DependencyEdgeKind = 'requires' | 'provides' | 'uses';",
      "jsdocSummary": "Kind of dependency edge between two plugins."
    },
    {
      "subpath": ".",
      "name": "DiagnosticIssue",
      "kind": "type",
      "signature": "export type DiagnosticIssue = { /** Stable machine-readable code, e.g. `ARKI_DOT_E003`. */ code: string; severity: DiagnosticSeverity; plugin?: string; message: string; /** Human-readable remediation: what the developer should do. */ remediation: string; /** Link to the relevant docs page for this issue. */ docsUrl: string; metadata?: Record<string, unknown>; };",
      "jsdocSummary": "Single structured issue surfaced by the kernel or by a plugin."
    },
    {
      "subpath": ".",
      "name": "DiagnosticSeverity",
      "kind": "type",
      "signature": "export type DiagnosticSeverity = 'info' | 'warning' | 'error';",
      "jsdocSummary": "Severity of a single diagnostic issue."
    },
    {
      "subpath": ".",
      "name": "DiagnosticStatus",
      "kind": "type",
      "signature": "export type DiagnosticStatus = 'ok' | 'degraded' | 'failed' | 'skipped' | 'missing';",
      "jsdocSummary": "Status of a plugin/action/service/lifecycle entry."
    },
    {
      "subpath": ".",
      "name": "DOT_LIFECYCLE_HOOKS",
      "kind": "variable",
      "signature": "export declare const DOT_LIFECYCLE_HOOKS: readonly DotLifecycleHook[];",
      "jsdocSummary": "The complete set of lifecycle hooks in execution order. `stop` and `dispose` run in reverse declaration order across plugins, but the sequence of hooks themselves is always `configure -> boot -> start -> stop -> dispose`."
    },
    {
      "subpath": ".",
      "name": "DOT_MANIFEST_ERROR_CODE",
      "kind": "variable",
      "signature": "export declare const DOT_MANIFEST_ERROR_CODE = \"ARKI_DOT_E032\";",
      "jsdocSummary": "Code of {@link DotManifestError}."
    },
    {
      "subpath": ".",
      "name": "DotApp",
      "kind": "type",
      "signature": "export type DotApp<TServices extends ServiceRecord, TClose extends Failure = never, _TOpen extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = { /** App name (passed to `defineApp`). */ readonly name: string; /** Current lifecycle state. */ readonly state: DotLifecycleState; /** * Services published by booted plugins, keyed by wire key. * Empty before `boot()` succeeds. */ readonly services: TServices; /** Declarative manifest — describes the static shape of the app. */ readonly manifest: DotAppManifest; /** Point-in-time diagnostics snapshot. Re-computed on every access. */ readonly diagnostics: DotDiagnosticsSnapshot; /** * Start active work. Boots first if app is `defined` or `configured`. * Idempotent while `started`. Returns a defect if the app is `failed` or `disposed`. */ start(): Promise<DotStartedOutcome<TClose, TPhases>>; /** * Stop active work. Keeps booted resources for later cleanup. * Idempotent while not `started`. */ stop(): Promise<DotStopOutcome<TPhases>>; /** * Release booted resources. Runs stop() first if `started`. * Idempotent while `disposed`. */ dispose(): Promise<DotDisposeOutcome<TClose, TPhases>>; /** * Register an in-process lifecycle observer. Returns an unsubscribe * function. Observers added here see events from this point onward — * pass observers through `defineApp(name, { observers })` to catch * `configure`-phase events too. */ subscribe(observer: DotLifecycleObserver): () => void; /** * Render the recorded lifecycle as an ASCII waterfall. Reads from * the current `diagnostics` snapshot — call after `boot()` / * `dispose()` / a failure to see the full picture. */ timeline(): string; };",
      "jsdocSummary": "Public DotApp surface. The internal `DotAppImpl` implements this; consumers see only these members."
    },
    {
      "subpath": ".",
      "name": "DotAppBuilder",
      "kind": "type",
      "signature": "export type DotAppBuilder<TAvail extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = Pick<Builder<TAvail, TOpen, TClose, TPhases>, keyof Builder<TAvail, TOpen, TClose, TPhases>>;",
      "jsdocSummary": "Builder produced by `defineApp(name)`. The app reads as a hexagon:"
    },
    {
      "subpath": ".",
      "name": "DotAppConfigured",
      "kind": "type",
      "signature": "export type DotAppConfigured<TServices extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = { readonly name: string; readonly state: DotLifecycleState; readonly manifest: DotAppManifest; readonly diagnostics: DotDiagnosticsSnapshot; /** Continue the lifecycle. */ boot(): Promise<DotApp<TServices, TClose, TOpen, TPhases> | Exclude<DotBootOutcome<TOpen, TClose, TPhases>, void>>; start(): Promise<DotApp<TServices, TClose, TOpen, TPhases> | Exclude<DotStartOutcome<TOpen, TClose, TPhases>, void>>; /** See {@link DotApp.subscribe}. */ subscribe(observer: DotLifecycleObserver): () => void; /** See {@link DotApp.timeline}. */ timeline(): string; };",
      "jsdocSummary": "Intermediate type after `configure()` but before `boot()`. Exposes the manifest and diagnostics already, but no `services` yet."
    },
    {
      "subpath": ".",
      "name": "DotAppLifecycle",
      "kind": "type",
      "signature": "export type DotAppLifecycle<TAvail extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = Pick<Builder<TAvail, TOpen, TClose, TPhases>, 'configure' | 'boot' | 'start'>;",
      "jsdocSummary": "Lifecycle entry points every builder phase shares."
    },
    {
      "subpath": ".",
      "name": "DotAppManifest",
      "kind": "type",
      "signature": "export type DotAppManifest = { /** Manifest schema version. 2 = actions/projections era. */ manifestVersion: 2; app: { name: string; version?: string; }; plugins: PluginManifest[]; actions: ActionManifest[]; services: ServiceManifest[]; lifecycle: LifecycleManifest[]; dependencies: DependencyEdge[]; projections: ProjectionManifest[]; };",
      "jsdocSummary": "Top-level manifest describing the static shape of a DOT app."
    },
    {
      "subpath": ".",
      "name": "DotConfigureContext",
      "kind": "type",
      "signature": "export type DotConfigureContext = { /** Custom telemetry scoped to this plugin, sharing its active configure span. */ readonly $telemetry: DotTelemetry; pluginName: string; /** App name. */ appName: string; /** * Register a service this plugin publishes, for manifest/diagnostics * purposes. Registration is metadata-only — the actual service instance * is returned from its `provides` factory. */ registerService(name: string, kind: ServiceKind): void; /** Register an action this plugin contributes at an app boundary. */ registerAction(action: ActionDeclaration): void; /** Register a projection renderer this plugin contributes. */ registerProjection(projection: ProjectionDeclaration): void; /** * Replace the `summary` of an action already registered. Same ownership * rule as `$describeAction` (see {@link KernelCtx}); in `configure` it sees * the actions of plugins mounted earlier. */ describeAction(actionId: string, patch: { readonly summary: string; }): void; /** @deprecated Use `registerAction`; removed in DOT 0.5.0. */ registerRoute(route: LegacyRouteDeclaration): void; /** Mark the plugin as participating in a lifecycle hook. */ registerLifecycleHook(hook: 'configure' | 'boot' | 'start' | 'stop' | 'dispose'): void; /** Append `provides` capability strings (informational, manifest-only). */ declareProvides(...capabilities: string[]): void; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "DotDiagnosticsSnapshot",
      "kind": "type",
      "signature": "export type DotDiagnosticsSnapshot = { /** Diagnostic snapshot schema version. 2 = actions/projections era. */ snapshotVersion: 2; /** ISO-8601 timestamp at which the snapshot was generated. */ generatedAt: string; app: { name: string; state: DotLifecycleState; }; plugins: PluginDiagnostic[]; actions: ActionDiagnostic[]; services: ServiceDiagnostic[]; lifecycle: LifecycleDiagnostic[]; issues: DiagnosticIssue[]; };",
      "jsdocSummary": "Single point-in-time diagnostic snapshot of a DotApp."
    },
    {
      "subpath": ".",
      "name": "DotLifecycleError",
      "kind": "class",
      "signature": "export declare class DotLifecycleError extends Error { readonly code: DotLifecycleErrorCodeValue; /** One-sentence guidance on how to fix the problem. Same shape as `DotPluginError.remediation`. */ readonly remediation: string; /** Documentation page that explains this error. */ readonly docsUrl: string; readonly phase: DotLifecycleHook; readonly plugin?: string; readonly cause?: unknown; readonly failures?: readonly DotLifecyclePluginFailure[]; constructor(args: { code: DotLifecycleErrorCodeValue; phase: DotLifecycleHook; message: string; /** Overrides the stock remediation for this code. */ remediation?: string; plugin?: string; cause?: unknown; failures?: readonly DotLifecyclePluginFailure[]; }); }",
      "jsdocSummary": "Structured error thrown for any lifecycle failure or misuse."
    },
    {
      "subpath": ".",
      "name": "DotLifecycleErrorCode",
      "kind": "variable",
      "signature": "export declare const DotLifecycleErrorCode: { /** * A `configure` hook attempted async work (returned a Promise). * @fix Make `configure` synchronous and move async work to `boot`. * @verify dot explain --json | jq -e .ok */ readonly ConfigureAsync: 'ARKI_DOT_E001'; /** * A `configure` hook threw. * @fix Fix the plugin's config or its `configure` hook, then build a new app. * @verify dot explain --json | jq -e .ok */ readonly ConfigureFailed: 'ARKI_DOT_E002'; /** * A `boot` hook threw. * @fix Read `cause` and `plugin`, then fix that plugin's `boot` hook or the service it opens. * @verify dot doctor --json | jq -e .ok */ readonly BootFailed: 'ARKI_DOT_E003'; /** * A `start` hook threw. * @fix Read `cause` and `plugin`, then fix that plugin's `start` hook. * @verify bun run test */ readonly StartFailed: 'ARKI_DOT_E004'; /** * One or more `stop` hooks threw — aggregate. * @fix Read `failures`: each entry names the plugin whose `stop` hook threw. * @verify bun run test */ readonly StopFailed: 'ARKI_DOT_E005'; /** * One or more `dispose` hooks threw — aggregate. * @fix Read `failures`: each entry names the plugin whose `dispose` hook threw. * @verify dot doctor --json | jq -e .ok */ readonly DisposeFailed: 'ARKI_DOT_E006'; /** * Caller tried to reuse the app after dispose. * @fix Build a fresh app instance; a disposed app cannot run again. * @verify bun run test */ readonly ReuseAfterDispose: 'ARKI_DOT_E007'; /** * Caller tried to reuse the app after a failed lifecycle. * @fix Build a fresh app instance; a failed app cannot run again. * @verify bun run test */ readonly ReuseAfterFailure: 'ARKI_DOT_E008'; /** * Plugin registered twice. * @fix Remove the second `.use()` of this plugin, or `rename` it to run two copies. * @verify dot explain --json | jq -e .ok */ readonly DuplicatePlugin: 'ARKI_DOT_E011'; /** * A plugin's `needs` entry has no provider among earlier-booted plugins. * @fix Mount a plugin that provides the needed key before its consumer. * @verify dot doctor --json | jq -e .ok */ readonly UnsatisfiedNeed: 'ARKI_DOT_E012'; /** * A plugin published a wire key that an earlier plugin already provides. * @fix Give one of the two providers a different key with `rename`. * @verify dot doctor --json | jq -e .ok */ readonly ServiceCollision: 'ARKI_DOT_E013'; /** * A needs alias, publish key, or rename target uses the reserved `$` prefix. * @fix Rename the key; names starting with `$` belong to the kernel. * @verify dot explain --json | jq -e .ok */ readonly ReservedServiceKey: 'ARKI_DOT_E014'; /** * A lifecycle hook exceeded the app's `hookTimeoutMs` watchdog. * @fix Pass the hook's `$signal` to its I/O, or raise `hookTimeoutMs` with a reason. * @verify dot doctor --json | jq -e .ok */ readonly HookTimeout: 'ARKI_DOT_E015'; /** * Two actions in the same binding use the same id. * @fix Give each action in a binding its own id. * @verify dot explain --json | jq -e .ok */ readonly DuplicateAction: 'ARKI_DOT_E016'; /** * Action metadata is not JSON-round-trip safe. * @fix Keep action `meta` plain JSON: no functions, Dates, Maps or cycles. * @verify dot explain --json | jq -e .ok */ readonly ActionMetaNotJson: 'ARKI_DOT_E017'; /** * More than one plugin fills the logging slot. * @fix Keep one `log()` plugin in the app. * @verify dot explain --json | jq -e .ok */ readonly DuplicateLogging: 'ARKI_DOT_E018'; /** * Static capability needs form a ring: a feature's need comes back around to itself. * @fix Move the shared piece into a third unit that both sides need. * @verify dot explain --json | jq -e .ok */ readonly CapabilityRing: 'ARKI_DOT_E019'; /** * A feature needs a capability whose (static) provider is mounted after it. * @fix Mount the provider before the unit that needs it; the message names both positions. * @verify dot explain --json | jq -e .ok */ readonly ProviderMountedLater: 'ARKI_DOT_E020'; /** * `$describeAction` named an action the calling plugin may not amend (unknown id, or not its own). * @fix Describe only actions the calling plugin declared or owns. * @verify dot explain --json | jq -e .ok */ readonly ActionNotAmendable: 'ARKI_DOT_E021'; };",
      "jsdocSummary": "Stable error codes for every failure the kernel throws, `ARKI_DOT_E001`.. Codes are never renumbered and never reused (E009 and E010 are retired). E001-E021 are lifecycle failures; E022-E031 are feature-composition failures (see `FEATURE_ERROR_CODES`); E032 is non-JSON manifest data."
    },
    {
      "subpath": ".",
      "name": "DotLifecycleErrorCodeValue",
      "kind": "type",
      "signature": "export type DotLifecycleErrorCodeValue = (typeof DotLifecycleErrorCode)[keyof typeof DotLifecycleErrorCode];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "DotLifecycleEvent",
      "kind": "type",
      "signature": "export type DotLifecycleEvent = DotPhaseLifecycleEvent | DotPluginHookLifecycleEvent;",
      "jsdocSummary": "The single fan-out event type emitted by the kernel to every registered observer. Discriminated by `kind`:"
    },
    {
      "subpath": ".",
      "name": "DotLifecycleEventStatus",
      "kind": "type",
      "signature": "export type DotLifecycleEventStatus = 'starting' | 'completed' | 'failed';",
      "jsdocSummary": "Possible event statuses. See {@link DotLifecycleEvent}."
    },
    {
      "subpath": ".",
      "name": "DotLifecycleHook",
      "kind": "type",
      "signature": "export type DotLifecycleHook = 'configure' | 'boot' | 'start' | 'stop' | 'dispose';",
      "jsdocSummary": "Identifier of a single hook in the DOT lifecycle."
    },
    {
      "subpath": ".",
      "name": "DotLifecycleObserver",
      "kind": "type",
      "signature": "export type DotLifecycleObserver = (event: DotLifecycleEvent) => void;",
      "jsdocSummary": "Observer function signature. Synchronous by contract — observers MUST NOT block the lifecycle. If a long-running side effect is needed (e.g. shipping events to a remote sink), the observer should buffer the event and process it on a separate cadence."
    },
    {
      "subpath": ".",
      "name": "DotLifecyclePluginFailure",
      "kind": "type",
      "signature": "export type DotLifecyclePluginFailure = { plugin: string; phase: DotLifecycleHook; error: unknown; };",
      "jsdocSummary": "Single plugin failure inside an aggregate lifecycle error (stop/dispose)."
    },
    {
      "subpath": ".",
      "name": "DotLifecycleState",
      "kind": "type",
      "signature": "export type DotLifecycleState = 'defined' | 'configured' | 'booted' | 'started' | 'stopped' | 'disposed' | 'failed';",
      "jsdocSummary": "Macro-states the DotApp can occupy."
    },
    {
      "subpath": ".",
      "name": "DotLoggingContext",
      "kind": "type",
      "signature": "export type DotLoggingContext = { /** App name (passed to `defineApp`). */ readonly appName: string; };",
      "jsdocSummary": "What the kernel passes to a plugin's `logging` factory."
    },
    {
      "subpath": ".",
      "name": "DotLoggingHandle",
      "kind": "type",
      "signature": "export type DotLoggingHandle<Close extends undefined | Failure = undefined | Failure> = { close(): MaybePromise<Close>; };",
      "jsdocSummary": "What a `logging` factory returns. The kernel closes it after the app's last lifecycle record."
    },
    {
      "subpath": ".",
      "name": "DotManifestError",
      "kind": "class",
      "signature": "export declare class DotManifestError extends TypeError { readonly code = \"ARKI_DOT_E032\"; readonly remediation = \"Pass plain JSON only: no functions, Dates, Maps, class instances, undefined fields, NaN or cycles.\"; readonly docsUrl: string; constructor(message: string, options?: { readonly cause?: unknown; }); }",
      "jsdocSummary": "Manifest metadata that is not plain JSON. A `TypeError`, so existing `instanceof TypeError` checks still match."
    },
    {
      "subpath": ".",
      "name": "DotPhaseLifecycleEvent",
      "kind": "type",
      "signature": "export type DotPhaseLifecycleEvent = { readonly kind: 'phase'; /** The phase the event belongs to. */ readonly phase: DotLifecycleHook; readonly status: DotLifecycleEventStatus; /** App name (so multiplexed observers can disambiguate). */ readonly appName: string; /** Wall-clock duration in milliseconds. Present on `completed` / `failed`. */ readonly durationMs?: number; /** The error value, if `status === 'failed'`. */ readonly error?: unknown; /** Wall-clock timestamp in ms-since-epoch (`Date.now()` semantics). */ readonly timestamp: number; };",
      "jsdocSummary": "Boundary of a top-level lifecycle phase."
    },
    {
      "subpath": ".",
      "name": "DotPluginError",
      "kind": "class",
      "signature": "export declare class DotPluginError extends Error { /** Stable error code, e.g. `ARKI_KV_PLUGIN_E001`. */ readonly code: string; /** One-sentence guidance on how to fix the underlying problem. */ readonly remediation: string; /** URL of the documentation page that explains this error. */ readonly docsUrl: string; constructor(args: { readonly code: string; readonly message: string; readonly remediation: string; readonly docsUrl: string; }); }",
      "jsdocSummary": "Stable error thrown by DOT plugin adapters."
    },
    {
      "subpath": ".",
      "name": "DotPluginHookLifecycleEvent",
      "kind": "type",
      "signature": "export type DotPluginHookLifecycleEvent = { readonly kind: 'plugin-hook'; /** The phase the hook belongs to. */ readonly phase: DotLifecycleHook; /** The plugin whose hook is being executed. */ readonly plugin: string; /** Topological order of the plugin within the phase (0-based). */ readonly order: number; readonly status: DotLifecycleEventStatus; readonly appName: string; readonly durationMs?: number; readonly error?: unknown; readonly timestamp: number; };",
      "jsdocSummary": "Boundary of a single plugin's hook execution."
    },
    {
      "subpath": ".",
      "name": "DotPluginRole",
      "kind": "type",
      "signature": "export type DotPluginRole = 'feature' | 'driving';",
      "jsdocSummary": "See {@link Plugin.role}."
    },
    {
      "subpath": ".",
      "name": "DotServeBuilder",
      "kind": "type",
      "signature": "export type DotServeBuilder<TAvail extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = Pick<Builder<TAvail, TOpen, TClose, TPhases>, keyof DotAppLifecycle<TAvail, TOpen, TClose, TPhases> | 'serve' | 'entrypoints'>;",
      "jsdocSummary": "Builder after `.features()` or `.serve()` — only driving adapters remain. Driven adapters (`.use`) cannot follow the domain: infrastructure never depends on a feature."
    },
    {
      "subpath": ".",
      "name": "DotTelemetry",
      "kind": "type",
      "signature": "export type DotTelemetry = ReturnType<typeof telemetryFor>;",
      "jsdocSummary": "The inferred custom instrumentation surface, shared by all plugin and feature contexts."
    },
    {
      "subpath": ".",
      "name": "EmptyOwnership",
      "kind": "type",
      "signature": "export type EmptyOwnership = { readonly open: never; readonly close: never; };",
      "jsdocSummary": "A unit with no declared construction or cleanup refusals."
    },
    {
      "subpath": ".",
      "name": "EmptyPhases",
      "kind": "type",
      "signature": "export type EmptyPhases = { readonly [Phase in keyof PluginPhases]: never; };",
      "jsdocSummary": "No declared hook failures."
    },
    {
      "subpath": ".",
      "name": "EmptyShape",
      "kind": "type",
      "signature": "export type EmptyShape = {};",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "FactoryContract",
      "kind": "type",
      "signature": "export type FactoryContract<Values extends ServiceRecord> = { readonly [FactoryContractSym]?: Values; };",
      "jsdocSummary": "The successful outputs that minted a unit's handles; failures stay inferred from the live callbacks."
    },
    {
      "subpath": ".",
      "name": "FactoryContractOf",
      "kind": "type",
      "signature": "export type FactoryContractOf<P> = FactoryContract<P extends FactoryContract<infer Values> ? Values : never>;",
      "jsdocSummary": "Preserve the original factory contract while projecting a unit's wiring."
    },
    {
      "subpath": ".",
      "name": "fake",
      "kind": "function",
      "signature": "export declare function fake<T, K extends string, Value extends NoInfer<T>>(handle: Handle<T, K>, value: Value): Omit<Plugin<EmptyShape, ProvidedValues<Readonly<Record<K, Value>>>, EmptyShape, string, InferredOwnership<Readonly<Record<K, Value>>, void>>, \"hooks\"> & { readonly hooks: EmptyShape; };",
      "jsdocSummary": "A plugin that provides one fake under a real handle's wire key — for app-level tests that mount the real features against fakes:"
    },
    {
      "subpath": ".",
      "name": "FeatureUnits",
      "kind": "type",
      "signature": "export type FeatureUnits<TFeatures extends readonly (AnyFeature | AnyDefinedFeature)[]> = number extends TFeatures['length'] ? readonly AnyPlugin[] : FlattenUnits<TFeatures>;",
      "jsdocSummary": "Every kernel unit a feature list mounts, flattened in order — what `.features()` checks with the `UseAllGuard`. A non-tuple list stays an array, so the guard asks for a tuple."
    },
    {
      "subpath": ".",
      "name": "Handle",
      "kind": "type",
      "signature": "export type Handle<T, K extends string, O extends string = string> = Token<T, K> & { readonly provider: O; /** The lazy-lifting form of the same handle (the `service.lazy` of handles). */ readonly lazy: LazyHandle<T, K, O>; };",
      "jsdocSummary": "A capability handle: a token on the wire key `K`, stamped with the name of the unit that provides it. `plugin()` and `feature()` mint one per `provides` key, so a consumer names the capability in its `needs` (`needs: { db: database.provides.db }`) and never restates the type — the Drizzle `references(() => table.column)` of services. Identity is the wire key, not the object: the kernel resolves by `key`."
    },
    {
      "subpath": ".",
      "name": "Handles",
      "kind": "type",
      "signature": "export type Handles<TProvides extends ServiceRecord, O extends string = string> = { readonly [K in keyof TProvides & string]: Handle<TProvides[K], K, O>; };",
      "jsdocSummary": "One handle per published key — what `plugin.provides` holds."
    },
    {
      "subpath": ".",
      "name": "hookSignals",
      "kind": "function",
      "signature": "export declare function hookSignals(app: Disposable, options?: HookSignalsOptions): () => void;",
      "jsdocSummary": "Wire termination signals to `app.dispose()`. Returns an unhook function that removes the handlers without disposing — call it if the app is torn down through another path first."
    },
    {
      "subpath": ".",
      "name": "HookSignalsOptions",
      "kind": "type",
      "signature": "export type HookSignalsOptions = { /** Signals to intercept. Default: `['SIGTERM', 'SIGINT']`. */ readonly signals?: readonly string[]; /** * Maximum time the drain (`dispose()`) may take before the process is * terminated anyway. Default: 10 000 ms. */ readonly timeoutMs?: number; /** Test seam — a process-like target. Default: the global `process`, when the runtime has one. */ readonly proc?: SignalTarget; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "InferredOwnership",
      "kind": "type",
      "signature": "export type InferredOwnership<in out Values, out Boot> = { readonly open: ProviderOpen<Values> | Extract<Boot, Failure> | EntriesFailure<Exclude<Boot, void | Failure>, 'open'> | EntriesFailure<Exclude<Boot, void | Failure>, 'run'>; readonly close: ProviderClose<Values> | EntriesFailure<Exclude<Boot, void | Failure>, 'close'> | EntriesFailure<Exclude<Boot, void | Failure>, 'run'>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "InferredPhases",
      "kind": "type",
      "signature": "export type InferredPhases<Returns extends HookReturns> = { readonly [Phase in keyof PluginPhases]: Extract<Returns[Phase], Failure>; };",
      "jsdocSummary": "Derive phase failures from callback results."
    },
    {
      "subpath": ".",
      "name": "initPlugins",
      "kind": "variable",
      "signature": "export declare const initPlugins: { context<TServices extends object>(): { create(): InitPluginsFactory<TServices>; }; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "InitPluginsFactory",
      "kind": "type",
      "signature": "export type InitPluginsFactory<TServices extends object> = ReturnType<typeof createPluginFactory<TServices>>;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "isLazy",
      "kind": "function",
      "signature": "export declare function isLazy(value: unknown): value is PublishedLazy;",
      "jsdocSummary": "Detect a published lazy handle without claiming its cleanup is infallible."
    },
    {
      "subpath": ".",
      "name": "JsonObject",
      "kind": "type",
      "signature": "export type JsonObject = Record<string, JsonValue>;",
      "jsdocSummary": "JSON-serializable object used for adapter-owned manifest metadata."
    },
    {
      "subpath": ".",
      "name": "JsonValue",
      "kind": "type",
      "signature": "export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue; };",
      "jsdocSummary": "JSON-serializable value — the manifest's currency."
    },
    {
      "subpath": ".",
      "name": "KernelCtx",
      "kind": "type",
      "signature": "export type KernelCtx = { /** App name (passed to `defineApp`). */ readonly $app: string; /** This plugin's name. */ readonly $plugin: string; /** Custom spans, events, metrics and correlated logs scoped to this mounted plugin or feature. */ readonly $telemetry: DotTelemetry; /** Read-only runtime config bag from `defineApp(name, { config })`. */ readonly $config: Readonly<Record<string, unknown>>; /** * Aborts when this hook exceeds `defineApp(name, { hookTimeoutMs })`; the * reason is the `ARKI_DOT_E015` error. Pass it to the hook's I/O * (`fetch`, a driver's connect, `sleep`) so a hung hook stops instead of * running on after the kernel gave up on it. One signal per hook call. */ readonly $signal: AbortSignal; /** * Complete an action's `summary` once the plugin's services exist (a * `provides` factory, `boot`, `start`, ...). `dot explain` stays static; * the post-boot `app.manifest` and `dot doctor` show the new text. * * A plugin may amend an action it declared, or an action in a binding it * registered a projection for (an adapter completing the actions of the * features it serves). Anything else throws `ARKI_DOT_E021`. */ readonly $describeAction: (actionId: string, patch: { readonly summary: string; }) => void; };",
      "jsdocSummary": "Kernel-supplied context keys, present in every service-carrying hook context. The `$` prefix is a reserved namespace: `plugin()` rejects `$`-prefixed needs aliases and publish keys at compile time (via {@link NoReservedKeys}) and the kernel enforces it at runtime (`ARKI_DOT_E014`), so these keys can never be shadowed."
    },
    {
      "subpath": ".",
      "name": "lazy",
      "kind": "function",
      "signature": "export declare function lazy<Value, Cleanup = void>(init: Initializer<Value> & TypedOutput<Value>, options?: LazyOptions<Value, Cleanup>): { [LazyTag]: true; get: () => Promise<Value | Failure<\"dot.lazy_closed\", undefined> | Failure<\"failure.unexpected_defect\", undefined>>; readonly initialized: boolean; peek(): Exclude<Awaited<Value>, Failure<string, unknown>> | undefined; dispose(): Promise<Failure<\"failure.unexpected_defect\", undefined> | Extract<Awaited<Awaited<Cleanup>>, Failure<string, unknown>> | Extract<Awaited<Awaited<Value>>, Failure<string, unknown>> | undefined>; };",
      "jsdocSummary": "Own a service initialized on first use. Concurrent gets share an attempt; returned failures and defects are retried only by a later get. Cleanup receives successful services only. Disposal closes admission immediately, waits for a pending attempt, and caches its complete typed outcome."
    },
    {
      "subpath": ".",
      "name": "Lazy",
      "kind": "type",
      "signature": "export type Lazy<Value, Cleanup = void> = ReturnType<typeof lazy<Value, Cleanup>>;",
      "jsdocSummary": "A service handle derived from its callback outputs. `Lazy<T>` includes the canonical closed/defect outcomes; providers with other declared failures keep their inferred handle type, or supply their original callback output types."
    },
    {
      "subpath": ".",
      "name": "LazyClosed",
      "kind": "variable",
      "signature": "export declare const LazyClosed: import(\"@arki/failure\").FailureDefinition<\"dot.lazy_closed\", undefined>;",
      "jsdocSummary": "An operation tried to initialize a service after its owner closed admission."
    },
    {
      "subpath": ".",
      "name": "LazyHandle",
      "kind": "type",
      "signature": "export type LazyHandle<T, K extends string, O extends string = string> = Token<T, K> & LazyService<T> & { readonly provider: O; };",
      "jsdocSummary": "A handle that always delivers a `Lazy<T>`, whether the provider is eager or lazy — `needs: { db: database.provides.db.lazy }`."
    },
    {
      "subpath": ".",
      "name": "lazyOf",
      "kind": "function",
      "signature": "export declare function lazyOf<Value>(value: Awaited<Value>): { [LazyTag]: true; get(): Promise<Failure<\"dot.lazy_closed\", undefined> | Awaited<Awaited<Value>>>; readonly initialized: boolean; peek(): Exclude<Awaited<Value>, Failure> | undefined; dispose(): Promise<undefined>; };",
      "jsdocSummary": "Borrow an already available service without initializing or owning it. A failure is returned by get and is never marked initialized."
    },
    {
      "subpath": ".",
      "name": "LazyService",
      "kind": "type",
      "signature": "export type LazyService<T> = Service<T | Lazy<T>> & { readonly lazy: true; readonly [LazyInner]?: T; };",
      "jsdocSummary": "A lazy-lifting witness (create via {@link service.lazy}). The consumer always receives a `Lazy<T>` handle, regardless of whether the provider published a plain `T` (the kernel lifts it into a pre-initialized handle) or a `Lazy<T>` (passed through). This decouples consumers from the provider's eager-vs-lazy strategy."
    },
    {
      "subpath": ".",
      "name": "LifecycleDiagnostic",
      "kind": "type",
      "signature": "export type LifecycleDiagnostic = { plugin: string; hook: DotLifecycleHook; state: DotLifecycleState; /** 0-based topological order of this plugin within the hook pass. */ order: number; /** Wall-clock duration of the hook call, in milliseconds. */ durationMs?: number; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "LifecycleManifest",
      "kind": "type",
      "signature": "export type LifecycleManifest = { plugin: string; hooks: readonly DotLifecycleHook[]; };",
      "jsdocSummary": "Which lifecycle hooks a plugin participates in."
    },
    {
      "subpath": ".",
      "name": "LoggingSlot",
      "kind": "type",
      "signature": "export type LoggingSlot<Result extends DotLoggingHandle | Failure> = { readonly logging?: (ctx: DotLoggingContext) => Result; };",
      "jsdocSummary": "The actual logging callback remains the source of activation and cleanup failures."
    },
    {
      "subpath": ".",
      "name": "MergePhases",
      "kind": "type",
      "signature": "export type MergePhases<Left extends PluginPhases, Right extends PluginPhases> = { readonly [Phase in keyof PluginPhases]: Left[Phase] | Right[Phase]; };",
      "jsdocSummary": "Combine failure channels when appending a unit to an app."
    },
    {
      "subpath": ".",
      "name": "NeedsShape",
      "kind": "type",
      "signature": "export type NeedsShape = Record<string, Service<unknown>>;",
      "jsdocSummary": "A `needs` declaration: local alias → witness (anonymous or token)."
    },
    {
      "subpath": ".",
      "name": "NoReservedKeys",
      "kind": "type",
      "signature": "export type NoReservedKeys = Readonly<Record<`$${string}`, never>>;",
      "jsdocSummary": "No `$`-prefixed keys — that prefix is the kernel context namespace ({@link KernelCtx}). Used as a constraint on needs shapes and provides records: a matching key makes the property type `never`, which no witness or service value satisfies, so the violation errors at the exact offending property. The kernel re-validates at runtime with `ARKI_DOT_E014` for paths the constraint cannot see (renames, erased plugins)."
    },
    {
      "subpath": ".",
      "name": "NormalizeProvides",
      "kind": "type",
      "signature": "export type NormalizeProvides<TP extends ServiceRecord> = [TP] extends [never] ? EmptyShape : TP;",
      "jsdocSummary": "A plugin whose `boot` always throws infers `TProvides = never`, which would poison both the collision check (`keyof never` matches everything) and the accumulated record (`TAvail & never` = `never`). Such a plugin provides nothing — normalize to the empty shape."
    },
    {
      "subpath": ".",
      "name": "PhaseHooks",
      "kind": "type",
      "signature": "export type PhaseHooks<Context, Returns extends HookReturns> = { readonly configure?: (ctx: DotConfigureContext) => Returns['configure']; readonly start?: (ctx: Context) => MaybePromise<Returns['start']>; readonly stop?: (ctx: Context) => MaybePromise<Returns['stop']>; readonly dispose?: (ctx: Context) => MaybePromise<Returns['dispose']>; };",
      "jsdocSummary": "Lifecycle callbacks sharing a context, with concrete results per phase."
    },
    {
      "subpath": ".",
      "name": "plugin",
      "kind": "function",
      "signature": "export declare function plugin<TShape extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape, const TName extends string = string, TBoot extends undefined = undefined>(def: PluginDefinition<TShape, TProvides, TName, undefined, EmptyHookReturns, DotLoggingHandle<undefined>>, ..._guard: BootGuard<NoInfer<TBoot>>): AuthoredPlugin<WireNeeds<TShape>, ProvidedValues<TProvides>, TShape, TName, TProvides, EmptyPhases, DotLoggingHandle<undefined>, TBoot>; ; export declare function plugin<TShape extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape, const TName extends string = string, TBoot extends undefined | ScopePlan | Failure = undefined, TConfigure extends undefined | Failure = undefined, TStart extends undefined | Failure = undefined, TStop extends undefined | Failure = undefined, TDispose extends undefined | Failure = undefined, TLogging extends DotLoggingHandle | Failure = DotLoggingHandle<undefined>>(def: PluginDefinition<TShape, TProvides, TName, TBoot, { configure: TConfigure; start: TStart; stop: TStop; dispose: TDispose; }, TLogging>, ..._guard: BootGuard<NoInfer<TBoot>>): AuthoredPlugin<WireNeeds<TShape>, ProvidedValues<TProvides>, TShape, TName, TProvides, InferredPhases<{ configure: TConfigure; start: TStart; stop: TStop; dispose: TDispose; }>, TLogging, TBoot>;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "Plugin",
      "kind": "type",
      "signature": "export type Plugin<out TNeeds extends ServiceRecord = ServiceRecord, out TProvides extends ServiceRecord = ServiceRecord, out TShape extends NeedsShape = NeedsShape, out TOwner extends string = string, out TOwnership extends PluginOwnership = EmptyOwnership, out TPhases extends PluginPhases = EmptyPhases> = { readonly runtime: PluginRuntime<TOwnership['open'], TOwnership['close']>; readonly [OwnershipSym]?: TOwnership; /** Unique identifier for this plugin within the app. */ readonly name: string; /** Runtime needs shape (local alias → witness). */ readonly needs: NeedsShape; readonly actions: readonly ActionSource[]; /** Mount-time renames: publish key → new wire key (see {@link rename}). */ readonly renames: Readonly<Record<string, string>>; /** * Where the app builder mounted this plugin in the hexagon: `feature` * (`.features()`) or `driving` (`.serve()`). Absent for `.use()` — a * driven adapter, or any plugin in an app that never calls `.features()`. */ readonly role?: DotPluginRole; /** * One typed handle per published wire key, known before boot. The kernel * checks ordering and rings at configure time from these keys, and * `dot explain` draws the edges without booting. `rename()` rebuilds * them on the new keys. */ readonly provides: Handles<TProvides, TOwner>; /** The `provides` factories, keyed by publish key (before renames). The kernel runs them in key order at boot. */ readonly factories: AnyFactories; /** * The logging slot. At most one plugin per app fills it. The kernel activates * it during boot, before provider construction, and closes it after owned * plugin cleanup. Configure never activates logging. */ readonly logging?: (ctx: DotLoggingContext) => DotLoggingHandle<undefined | TOwnership['close']> | TOwnership['open']; readonly hooks: PhaseHooks<never, { readonly [Phase in keyof PluginPhases]: undefined | TPhases[Phase]; }> & { readonly boot?: (ctx: never) => unknown; }; readonly [NeedsSym]?: TNeeds; readonly [ProvidesSym]?: TProvides; readonly [ProviderIdentitySym]?: TShape; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "PluginCloseFailure",
      "kind": "type",
      "signature": "export type PluginCloseFailure<P> = PluginPreparation<P>['close'] | SourceOwnership<P>['close'] | CallbackFailure<LoggingResult<P>, 'close'>;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "PluginDiagnostic",
      "kind": "type",
      "signature": "export type PluginDiagnostic = { plugin: string; status: Extract<DiagnosticStatus, 'ok' | 'degraded' | 'failed' | 'skipped'>; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "PluginFactoryGuard",
      "kind": "type",
      "signature": "export type PluginFactoryGuard<P> = [FactoryContractError<P>] extends [never] ? [] : [error: FactoryContractError<P>];",
      "jsdocSummary": "Validate replaceable factories against the handles their original definitions minted."
    },
    {
      "subpath": ".",
      "name": "PluginManifest",
      "kind": "type",
      "signature": "export type PluginManifest = { name: string; /** Hexagon role from the app builder — see `Plugin.role`. */ role?: DotPluginRole; dependencies: readonly string[]; provides: readonly string[]; };",
      "jsdocSummary": "Single plugin's declarative metadata."
    },
    {
      "subpath": ".",
      "name": "PluginNeeds",
      "kind": "type",
      "signature": "export type PluginNeeds<P> = P extends AnyPlugin ? NonNullable<P[typeof NeedsSym]> : never;",
      "jsdocSummary": "Extract a plugin's (wire-keyed) needs record."
    },
    {
      "subpath": ".",
      "name": "PluginOpenFailure",
      "kind": "type",
      "signature": "export type PluginOpenFailure<P> = PluginPreparation<P>['open'] | SourceOwnership<P>['open'] | Extract<LoggingResult<P>, Failure>;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "PluginOwnership",
      "kind": "type",
      "signature": "export type PluginOwnership = { readonly open: Failure; readonly close: Failure; };",
      "jsdocSummary": "Exact failures owned by a plugin's construction and release callbacks."
    },
    {
      "subpath": ".",
      "name": "PluginPhaseFailures",
      "kind": "type",
      "signature": "export type PluginPhaseFailures<P> = P extends { readonly hooks: infer Hooks; } ? { readonly [Phase in keyof PluginPhases]: PhaseFailure<Hooks, Phase>; } : EmptyPhases;",
      "jsdocSummary": "Infer each phase from the actual hooks, including spread replacements."
    },
    {
      "subpath": ".",
      "name": "PluginPhases",
      "kind": "type",
      "signature": "export type PluginPhases = { readonly configure: Failure; readonly start: Failure; readonly stop: Failure; readonly dispose: Failure; };",
      "jsdocSummary": "Constraint for the four lifecycle failure channels; infer concrete channels from a plugin."
    },
    {
      "subpath": ".",
      "name": "PluginPreparation",
      "kind": "type",
      "signature": "export type PluginPreparation<P> = P extends { readonly [OwnershipSym]?: infer Owned extends PluginOwnership; } ? Owned : EmptyOwnership;",
      "jsdocSummary": "Failures owned by the runtime's feature preparation, independent of replaceable callbacks."
    },
    {
      "subpath": ".",
      "name": "PluginProvides",
      "kind": "type",
      "signature": "export type PluginProvides<P> = P extends AnyPlugin ? NonNullable<P[typeof ProvidesSym]> : never;",
      "jsdocSummary": "Extract a plugin's (wire-keyed) provides record."
    },
    {
      "subpath": ".",
      "name": "PluginSourceGuard",
      "kind": "type",
      "signature": "export type PluginSourceGuard<P> = [FactoryContractError<P> | SourceBootError<P>] extends [never] ? [] : [error: FactoryContractError<P> | SourceBootError<P>];",
      "jsdocSummary": "Validate the live factories and boot callback before mounting a unit."
    },
    {
      "subpath": ".",
      "name": "ProjectionManifest",
      "kind": "type",
      "signature": "export type ProjectionManifest = { /** Document format key matched by `dot explain --as <format>`. */ format: string; /** Binding this projection primarily renders. Informational. */ binding: string; /** Import specifier for the projection module. */ module: string; /** Plugin that registered this projection. */ plugin: string; };",
      "jsdocSummary": "Registered projection renderer for an adapter-owned document format."
    },
    {
      "subpath": ".",
      "name": "provide",
      "kind": "function",
      "signature": "export declare function provide<T, K extends string>(tok: Token<T, K>, value: T): Record<K, T>;",
      "jsdocSummary": "A record holding one value under a token's wire key, typed by the token's literal key: `provide(Db, handle)` is `{ 'arki.db': DbHandle }`."
    },
    {
      "subpath": ".",
      "name": "Provided",
      "kind": "type",
      "signature": "export type Provided<H> = H extends Service<infer T> ? T : never;",
      "jsdocSummary": "The value type behind a handle — for the one alias an app names (`type Db = Provided<typeof database.provides.db>`)."
    },
    {
      "subpath": ".",
      "name": "ProvidedValue",
      "kind": "type",
      "signature": "export type ProvidedValue<Value> = Value extends ResourceEntry | Failure ? Value extends ResourceEntry ? Value extends { readonly open: infer Open extends (...args: never[]) => unknown; } ? SuccessOf<Open> : never : never : Value;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ProvidedValues",
      "kind": "type",
      "signature": "export type ProvidedValues<Values> = { [Name in keyof Values]: ProvidedValue<Awaited<Values[Name]>>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ProvidesFactories",
      "kind": "type",
      "signature": "export type ProvidesFactories<TNeeds extends NeedsShape, TProvides extends ServiceRecord> = { readonly [K in keyof TProvides]: (services: CtxOf<TNeeds> & KernelCtx) => TProvides[K] & NoInfer<CheckedProvider<TProvides[K]>>; };",
      "jsdocSummary": "Infer raw factory returns once, including Promise wrappers. Explicit TProvides annotations describe those raw returns, not the resolved services. Services and ownership resolve promises through their shared projections."
    },
    {
      "subpath": ".",
      "name": "rename",
      "kind": "function",
      "signature": "export declare function rename<P extends AnyPlugin, TOwnership extends PluginOwnership, const M extends { readonly [K in keyof PluginProvides<P>]?: string; }, const TNewName extends string = PluginOwner<P>>(p: P & { readonly runtime: PluginRuntime<TOwnership['open'], TOwnership['close']>; readonly [OwnershipSym]?: TOwnership; }, map: M, newName?: TNewName): Omit<Plugin<PluginNeeds<P>, RenamedProvides<PluginProvides<P>, M>, PluginProviderIdentities<P>, TNewName, TOwnership, PluginPhaseFailures<P>>, 'hooks' | 'logging' | 'factories'> & Pick<P, 'hooks' | 'logging' | 'factories'> & FactoryContractOf<P>;",
      "jsdocSummary": "Mount-time rename. `rename(dbPlugin, { db: 'reportsDb' }, 'reports-db')` publishes the same service under a different wire key, retyped accordingly — the way to mount a second instance of an adapter without a key collision. Renames compose: renaming an already-renamed key rewrites the earlier entry."
    },
    {
      "subpath": ".",
      "name": "RenamedProvides",
      "kind": "type",
      "signature": "export type RenamedProvides<TP, M> = { [K in keyof TP as K extends keyof M ? (M[K] extends string ? M[K] : K) : K]: TP[K]; };",
      "jsdocSummary": "Rename a plugin's published wire keys — the multi-instance primitive."
    },
    {
      "subpath": ".",
      "name": "renderTimeline",
      "kind": "function",
      "signature": "export declare function renderTimeline(snapshot: DotDiagnosticsSnapshot, opts?: RenderTimelineOptions): string;",
      "jsdocSummary": "Render the snapshot's lifecycle records as a per-phase waterfall. Pure — no IO. Caller is responsible for printing the result."
    },
    {
      "subpath": ".",
      "name": "RenderTimelineOptions",
      "kind": "type",
      "signature": "export type RenderTimelineOptions = { /** Maximum bar width in characters (default `50`). */ readonly barWidth?: number; /** * When `true`, also emit any plugin's diagnostic `issues[]` underneath * the bar so failure reasons are visible in the timeline view. * Default `true`. */ readonly showIssues?: boolean; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "service",
      "kind": "variable",
      "signature": "export declare const service: (<T>() => Service<T>) & { readonly lazy: <T>() => LazyService<T>; };",
      "jsdocSummary": "Create an app-local (anonymous) service witness for a `needs` shape."
    },
    {
      "subpath": ".",
      "name": "Service",
      "kind": "type",
      "signature": "export type Service<out T> = { readonly [TypeOf]?: T; };",
      "jsdocSummary": "Phantom type witness for a service. Carries `T` at the type level only — the runtime value is an empty object."
    },
    {
      "subpath": ".",
      "name": "ServiceDiagnostic",
      "kind": "type",
      "signature": "export type ServiceDiagnostic = { service: string; plugin: string; status: Extract<DiagnosticStatus, 'ok' | 'degraded' | 'failed' | 'missing'>; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ServiceKind",
      "kind": "type",
      "signature": "export type ServiceKind = 'env' | 'db' | 'kv' | 'queue' | 'auth' | 'email' | 'logger' | 'event-store' | 'message-bus' | 'custom';",
      "jsdocSummary": "Kind of service that a plugin can publish."
    },
    {
      "subpath": ".",
      "name": "ServiceManifest",
      "kind": "type",
      "signature": "export type ServiceManifest = { name: string; plugin: string; kind: ServiceKind; };",
      "jsdocSummary": "Single service published by a plugin."
    },
    {
      "subpath": ".",
      "name": "ServiceRecord",
      "kind": "type",
      "signature": "export type ServiceRecord = Record<string, unknown>;",
      "jsdocSummary": "Record of wire-keyed services."
    },
    {
      "subpath": ".",
      "name": "SignalTarget",
      "kind": "type",
      "signature": "export type SignalTarget = { readonly pid: number; once(event: string, listener: () => void): unknown; off(event: string, listener: () => void): unknown; kill(pid: number, signal?: string): unknown; };",
      "jsdocSummary": "The slice of `process` the signal hook touches. Injectable so tests can drive signals through a fake without terminating the test runner — defaults to the real `process`."
    },
    {
      "subpath": ".",
      "name": "telemetryFor",
      "kind": "function",
      "signature": "export declare function telemetryFor(owner: { readonly name: string; } | { readonly $plugin: string; }): { /** Observe a custom operation, retaining its exact return value, promise and failure identity. */ span<Value>(name: string, run: () => Value, options?: SpanOptions): Value; /** Annotate the active operation without adding a span. Explicit attributes only. */ event(name: string, attributes?: Attributes): void; /** Create a counter. Keep explicit dimensions bounded; do not include user IDs or payloads. */ counter(name: string, options?: MetricOptions): { add(value: number, attributes?: Attributes): void; }; /** Create a histogram with the same identity and context as this scope. */ histogram(name: string, options?: MetricOptions): { record(value: number, attributes?: Attributes): void; }; /** Write through the app's logging setup with the active trace stamped on the record. */ log(level: LevelInput, template: string, fields?: Fields): void; };",
      "jsdocSummary": "Scope custom instrumentation from an existing plugin, feature or hook context. App-owned OTel providers supply tracing; without an SDK every call is safe. Use a new span only for a new operational boundary, not one already instrumented."
    },
    {
      "subpath": ".",
      "name": "testApp",
      "kind": "function",
      "signature": "export declare function testApp<const TPlugins extends readonly AnyPlugin[] = readonly []>(plugins?: TPlugins & TestAppGuard<TPlugins>, options?: TestAppOptions): import(\"./define-app.js\").DotAppBuilder<TestAppServices<TPlugins>, PluginOpenFailure<TPlugins[number]>, PluginCloseFailure<TPlugins[number]>, PluginPhaseFailures<TPlugins[number]>>;",
      "jsdocSummary": "Build a DOT app builder pre-populated with the given plugins, ready to `.configure()`, `.boot()` or `.start()` from a test. The services are read off the plugins — `testApp([database]).boot()` gives `app.services.db` — and a tuple that would not mount (a need before its provider, a wire key provided twice) is a compile error on the argument."
    },
    {
      "subpath": ".",
      "name": "TestAppOptions",
      "kind": "type",
      "signature": "export type TestAppOptions = { /** App name used in the manifest. Defaults to `'test-app'`. */ name?: string; /** Runtime config bag exposed to hooks as `$config`. */ config?: Readonly<Record<string, unknown>>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "testPlugin",
      "kind": "function",
      "signature": "export declare function testPlugin<const P extends AnyPlugin>(plugin: P & ListGuard<PluginSourceGuard<P>>, options?: TestAppOptions): TestPluginBuilder<PluginNeeds<P>, PluginProvides<P>, PluginOpenFailure<P>, PluginCloseFailure<P>, EmptyShape, PluginPhaseFailures<P>>;",
      "jsdocSummary": "Unit-test a single plugin with **typed overrides** — the compile-checked counterpart to {@link testApp}'s erased arrays."
    },
    {
      "subpath": ".",
      "name": "TestPluginBuilder",
      "kind": "type",
      "signature": "export type TestPluginBuilder<TRemaining extends ServiceRecord, TServices extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TFakes extends ServiceRecord = EmptyShape, TPhases extends PluginPhases = EmptyPhases> = { /** * Satisfy one need directly with a fake. Token form — the token names * the wire key and carries the type: * * ```ts * testPlugin(reports).provide(Db, fakeDb) * ``` */ provide<K extends keyof TRemaining & string, T extends TRemaining[K]>(token: Token<T, K>, value: T): TestPluginBuilder<Omit<TRemaining, K>, TServices & Readonly<Record<K, T>>, TOpen, TClose, TFakes & Readonly<Record<K, T>>, TPhases>; /** * Satisfy one need directly with a fake. Key form — for anonymous * `service<T>()` needs, where the wire key is the property name: * * ```ts * testPlugin(billing).provide('db', fakeDb) * ``` */ provide<K extends keyof TRemaining & string, T extends TRemaining[K]>(key: K, value: T): TestPluginBuilder<Omit<TRemaining, K>, TServices & Readonly<Record<K, T>>, TOpen, TClose, TFakes & Readonly<Record<K, T>>, TPhases>; /** Boot the plugin against the provided fakes. Compile error until every need is provided. */ boot(this: BootReady<TRemaining, TestPluginBuilder<TRemaining, TServices, TOpen, TClose, TFakes, TPhases>>): ReturnType<TestPluginLifecycle<TServices, TOpen, TClose, TFakes, TPhases>['boot']>; /** Boot + start. Same guard as {@link TestPluginBuilder.boot}. */ start(this: BootReady<TRemaining, TestPluginBuilder<TRemaining, TServices, TOpen, TClose, TFakes, TPhases>>): ReturnType<TestPluginLifecycle<TServices, TOpen, TClose, TFakes, TPhases>['start']>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "toJsonObject",
      "kind": "function",
      "signature": "export declare function toJsonObject(value: unknown): JsonObject;",
      "jsdocSummary": "Validate and narrow unknown adapter data into manifest JSON metadata."
    },
    {
      "subpath": ".",
      "name": "token",
      "kind": "function",
      "signature": "export declare function token<T>(): <K extends string>(key: K) => Token<T, K>;",
      "jsdocSummary": "Create a token. Curried so `T` is explicit while `K` is inferred as a literal: `const Db = token<DbHandle>()('arki.db')`."
    },
    {
      "subpath": ".",
      "name": "Token",
      "kind": "type",
      "signature": "export type Token<T, K extends string = string> = Service<T> & { readonly key: K; /** Derive a token for an additional instance of the same contract. */ instance<N extends string>(name: N): Token<T, `${K}#${N}`>; };",
      "jsdocSummary": "Shared, named witness — a cross-package service contract. The `key` is the wire name used for satisfaction checks and runtime lookup; the local property name in a `needs` shape becomes a free-choice alias."
    },
    {
      "subpath": ".",
      "name": "UseAllAvail",
      "kind": "type",
      "signature": "export type UseAllAvail<TAvail extends ServiceRecord, TPlugins extends readonly AnyPlugin[]> = UseAllState<TAvail, TPlugins>['avail'];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "UseAllGuard",
      "kind": "type",
      "signature": "export type UseAllGuard<TAvail extends ServiceRecord, TPlugins extends readonly AnyPlugin[]> = [ UseAllState<TAvail, TPlugins>['error'] ] extends [never] ? UseAllTupleGuard<TPlugins> : [error: UseAllState<TAvail, TPlugins>['error']];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "UseGuard",
      "kind": "type",
      "signature": "export type UseGuard<TAvail extends ServiceRecord, TNeeds extends ServiceRecord, TProvides extends ServiceRecord, TPlugin = EmptyShape> = PluginSourceGuard<TPlugin> extends [] ? string extends keyof TAvail ? [] : [TAvail] extends [TNeeds] ? [keyof TAvail & keyof TProvides] extends [never] ? [] : [error: CollisionError<TAvail, TProvides>] : [error: NeedsError<TAvail, TNeeds>] : PluginSourceGuard<TPlugin>;",
      "jsdocSummary": "One unit's wiring check. Satisfied → `[]`; violated → `[error]` with the diagnostic as the error type. `ListGuard` turns it into a type on the argument itself, so the call site fails on the plugin with the `DOT:` label in the message (not with \"Expected 2 arguments, but got 1\"). The open record (`DotAppBuilder<ServiceRecord>`, the erased builder a runtime-built plugin list gives) has nothing to check: the kernel checks it at boot."
    },
    {
      "subpath": ".",
      "name": "WireNeeds",
      "kind": "type",
      "signature": "export type WireNeeds<S extends NeedsShape> = { [K in keyof S as S[K] extends { readonly key: infer WK extends string; } ? WK : K]: S[K] extends Service<infer T> ? T : never; };",
      "jsdocSummary": "Wire-key view of a needs shape — what the app builder checks satisfaction against. Tokens contribute their owned key; anonymous witnesses contribute the property name. `{ cache: Token<KV, 'arki.kv'> }` → `{ 'arki.kv': KV }`."
    },
    {
      "subpath": "./action",
      "name": "action",
      "kind": "function",
      "signature": "export declare function action<Input extends StandardSchemaV1, Output extends StandardSchemaV1, const Definitions extends readonly ActionFailureDefinition[]>(options: ActionOptions<Input, Output, Definitions>): Readonly<{ id: string; summary?: string; input: Input; output: Output; policy: Readonly<{ principal: 'optional' | 'required'; approval: 'none' | 'required'; retry: 'never' | 'idempotent'; exposure: readonly string[]; }>; failures: readonly [...Readonly<Definitions>, FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, FailureDefinition<\"schema.validator_defect\", undefined>, FailureDefinition<\"async.cancelled\", undefined>, FailureDefinition<\"async.deadline\", undefined>, FailureDefinition<\"failure.unexpected_defect\", undefined>, FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, FailureDefinition<\"dot.action_not_exposed\", undefined>, FailureDefinition<\"dot.action_principal_required\", undefined>, FailureDefinition<\"dot.action_approval_required\", undefined>]; toDotAction(): ActionDeclaration; }>;",
      "jsdocSummary": "Define a reusable action without importing server services or an implementation. It implements Dot's existing ActionSource protocol; no second registry is needed."
    },
    {
      "subpath": "./action",
      "name": "Action",
      "kind": "type",
      "signature": "export type Action<Input extends StandardSchemaV1, Output extends StandardSchemaV1, Definitions extends readonly ActionFailureDefinition[]> = ReturnType<typeof action<Input, Output, Definitions>>;",
      "jsdocSummary": "The descriptor's members are inferred from action(), not restated."
    },
    {
      "subpath": "./action",
      "name": "ACTION_FAILURES",
      "kind": "variable",
      "signature": "export declare const ACTION_FAILURES: readonly [FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, FailureDefinition<\"schema.validator_defect\", undefined>, FailureDefinition<\"async.cancelled\", undefined>, FailureDefinition<\"async.deadline\", undefined>, FailureDefinition<\"failure.unexpected_defect\", undefined>, FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, FailureDefinition<\"dot.action_not_exposed\", undefined>, FailureDefinition<\"dot.action_principal_required\", undefined>, FailureDefinition<\"dot.action_approval_required\", undefined>];",
      "jsdocSummary": "Failures owned by execution rather than the business implementation."
    },
    {
      "subpath": "./action",
      "name": "ActionApprovalRequired",
      "kind": "variable",
      "signature": "export declare const ActionApprovalRequired: FailureDefinition<\"dot.action_approval_required\", undefined>;",
      "jsdocSummary": "Approval must be verified for this invocation, not inferred from another exposure."
    },
    {
      "subpath": "./action",
      "name": "ActionFailureDefinition",
      "kind": "type",
      "signature": "export type ActionFailureDefinition = Pick<FailureDefinition, 'code' | 'status' | 'is' | 'dataSchema'> & ((...args: never[]) => Failure);",
      "jsdocSummary": "Canonical definitions are shared with errorMap(), HTTP routes and JSON revival."
    },
    {
      "subpath": "./action",
      "name": "ActionNotExposed",
      "kind": "variable",
      "signature": "export declare const ActionNotExposed: FailureDefinition<\"dot.action_not_exposed\", undefined>;",
      "jsdocSummary": "An adapter may call only an explicitly exposed boundary."
    },
    {
      "subpath": "./action",
      "name": "ActionOptions",
      "kind": "type",
      "signature": "export type ActionOptions<Input extends StandardSchemaV1, Output extends StandardSchemaV1, Definitions extends readonly ActionFailureDefinition[]> = { readonly id: string; readonly summary?: string; readonly input: Input; readonly output: Output; readonly failures: Definitions; readonly policy: ActionPolicy; };",
      "jsdocSummary": "The action's only authoring source. Its implementation is bound separately on the server."
    },
    {
      "subpath": "./action",
      "name": "ActionPolicy",
      "kind": "type",
      "signature": "export type ActionPolicy = { readonly exposure: readonly string[]; readonly principal: 'optional' | 'required'; readonly approval: 'none' | 'required'; /** Metadata for an explicit retry owner; execution never retries implicitly. */ readonly retry: 'never' | 'idempotent'; };",
      "jsdocSummary": "Minimum authority is shared by every exposure, including internal jobs."
    },
    {
      "subpath": "./action",
      "name": "ActionPrincipalRequired",
      "kind": "variable",
      "signature": "export declare const ActionPrincipalRequired: FailureDefinition<\"dot.action_principal_required\", undefined>;",
      "jsdocSummary": "The adapter must authenticate its caller before invoking this action."
    },
    {
      "subpath": "./cli",
      "name": "AppImportFailed",
      "kind": "variable",
      "signature": "export declare const AppImportFailed: import(\"@arki/failure\").FailureDefinition<\"dot.app_import_failed\", StandardSchemaV1<AppImportFailedData, AppImportFailedData>>;",
      "jsdocSummary": "Importing the app file threw, or its exported factory did."
    },
    {
      "subpath": "./cli",
      "name": "AppInvalidExport",
      "kind": "variable",
      "signature": "export declare const AppInvalidExport: import(\"@arki/failure\").FailureDefinition<\"dot.app_invalid_export\", StandardSchemaV1<AppInvalidExportData, AppInvalidExportData>>;",
      "jsdocSummary": "The app file loaded, but no export is a DOT app, or several are and none is `default` or `app`."
    },
    {
      "subpath": "./cli",
      "name": "AppLifecycleFailed",
      "kind": "variable",
      "signature": "export declare const AppLifecycleFailed: import(\"@arki/failure\").FailureDefinition<\"dot.app_lifecycle_failed\", StandardSchemaV1<AppLifecycleFailedData, AppLifecycleFailedData>>;",
      "jsdocSummary": "`configure` threw while the CLI prepared the app."
    },
    {
      "subpath": "./cli",
      "name": "AppNotFound",
      "kind": "variable",
      "signature": "export declare const AppNotFound: import(\"@arki/failure\").FailureDefinition<\"dot.app_not_found\", StandardSchemaV1<AppNotFoundData, AppNotFoundData>>;",
      "jsdocSummary": "No app file at the default paths and no `--app`."
    },
    {
      "subpath": "./cli",
      "name": "DEV_STATE_PATH",
      "kind": "variable",
      "signature": "export declare const DEV_STATE_PATH = \".local/dot/dev.json\";",
      "jsdocSummary": "Where the state file lives, relative to the project directory."
    },
    {
      "subpath": "./cli",
      "name": "DevAlreadyRunning",
      "kind": "variable",
      "signature": "export declare const DevAlreadyRunning: import(\"@arki/failure\").FailureDefinition<\"dot.dev_already_running\", StandardSchemaV1<DevAlreadyRunningData, DevAlreadyRunningData>>;",
      "jsdocSummary": "Another `dot dev` is alive in this project: its pid is in the state file."
    },
    {
      "subpath": "./cli",
      "name": "DevAppStarted",
      "kind": "variable",
      "signature": "export declare const DevAppStarted: import(\"@arki/failure\").FailureDefinition<\"dot.dev_app_started\", StandardSchemaV1<DevAppStartedData, DevAppStartedData>>;",
      "jsdocSummary": "The app export is already configured, booted or started: `dot dev` cannot own its lifecycle."
    },
    {
      "subpath": "./cli",
      "name": "DevDbUnreachable",
      "kind": "variable",
      "signature": "export declare const DevDbUnreachable: import(\"@arki/failure\").FailureDefinition<\"dot.dev_db_unreachable\", StandardSchemaV1<DevDbUnreachableData, DevDbUnreachableData>>;",
      "jsdocSummary": "`dot dev` found no Postgres to talk to: no URL, a bad URL, or a closed port it could not start."
    },
    {
      "subpath": "./cli",
      "name": "DevEvent",
      "kind": "type",
      "signature": "export type DevEvent = z.infer<typeof devEventZod>;",
      "jsdocSummary": "One `dot dev` event."
    },
    {
      "subpath": "./cli",
      "name": "devEventSchema",
      "kind": "variable",
      "signature": "export declare const devEventSchema: StandardSchemaV1<unknown, DevEvent>;",
      "jsdocSummary": "Parses a `DevEvent` (Standard Schema: no validator library in the public type)."
    },
    {
      "subpath": "./cli",
      "name": "DevPortInUse",
      "kind": "variable",
      "signature": "export declare const DevPortInUse: import(\"@arki/failure\").FailureDefinition<\"dot.dev_port_in_use\", StandardSchemaV1<DevPortInUseData, DevPortInUseData>>;",
      "jsdocSummary": "Something already listens on the app port, so the runner would not get it."
    },
    {
      "subpath": "./cli",
      "name": "DevPreflightFailed",
      "kind": "variable",
      "signature": "export declare const DevPreflightFailed: import(\"@arki/failure\").FailureDefinition<\"dot.dev_preflight_failed\", StandardSchemaV1<DevPreflightFailedData, DevPreflightFailedData>>;",
      "jsdocSummary": "The preflight process did not report a result: a crash, a hang past the timeout, or output that is not its report. Never a pass."
    },
    {
      "subpath": "./cli",
      "name": "DevRemoteDbRefused",
      "kind": "variable",
      "signature": "export declare const DevRemoteDbRefused: import(\"@arki/failure\").FailureDefinition<\"dot.dev_remote_db_refused\", StandardSchemaV1<DevRemoteDbRefusedData, DevRemoteDbRefusedData>>;",
      "jsdocSummary": "The database is neither on this machine nor a compose service: `dot dev` would migrate it on boot."
    },
    {
      "subpath": "./cli",
      "name": "DevResult",
      "kind": "type",
      "signature": "export type DevResult = { readonly items: DevEvent[]; };",
      "jsdocSummary": "What `dot dev` succeeds with: every event, so `--output ndjson` prints one per line."
    },
    {
      "subpath": "./cli",
      "name": "DevRunnerFailed",
      "kind": "variable",
      "signature": "export declare const DevRunnerFailed: import(\"@arki/failure\").FailureDefinition<\"dot.dev_runner_failed\", StandardSchemaV1<DevRunnerFailedData, DevRunnerFailedData>>;",
      "jsdocSummary": "The app runner (`vite dev`, `--run`, or `dot _serve`) could not be started."
    },
    {
      "subpath": "./cli",
      "name": "DevState",
      "kind": "type",
      "signature": "export type DevState = z.infer<typeof devStateZod>;",
      "jsdocSummary": "The content of `dev.json`."
    },
    {
      "subpath": "./cli",
      "name": "devStateSchema",
      "kind": "variable",
      "signature": "export declare const devStateSchema: StandardSchemaV1<unknown, DevState>;",
      "jsdocSummary": "Parses `dev.json` (Standard Schema: no validator library in the public type)."
    },
    {
      "subpath": "./cli",
      "name": "DoctorFailed",
      "kind": "variable",
      "signature": "export declare const DoctorFailed: import(\"@arki/failure\").FailureDefinition<\"dot.doctor_failed\", StandardSchemaV1<DoctorReport, DoctorReport>>;",
      "jsdocSummary": "`doctor` found error-severity issues. The data is the whole report: `.error.data.plugins[]`."
    },
    {
      "subpath": "./cli",
      "name": "DoctorOptions",
      "kind": "type",
      "signature": "export type DoctorOptions = { /** Also check that an OpenTelemetry SDK is registered; a missing one is a warning issue. */ readonly observability?: boolean | undefined; /** Return the observed plugin graph as Mermaid source instead of the diagnostics. */ readonly graph?: boolean | undefined; /** * Called with the booted app before it is disposed, when boot succeeded. * `dot dev` reads what the preflight boot published here (the * `migrations` service of `dbMigrations`). */ readonly onBooted?: ((app: DotApp<Record<string, unknown>, Failure, Failure, PluginPhases>) => void) | undefined; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./cli",
      "name": "DoctorReport",
      "kind": "type",
      "signature": "export type DoctorReport = DotDiagnosticsSnapshot & { readonly status: DoctorStatus; };",
      "jsdocSummary": "What `dot doctor` returns: the diagnostics snapshot and its verdict."
    },
    {
      "subpath": "./cli",
      "name": "DoctorStatus",
      "kind": "type",
      "signature": "export type DoctorStatus = 'success' | 'warning' | 'failure';",
      "jsdocSummary": "`doctor`'s verdict: the worst severity among all the snapshot's issues."
    },
    {
      "subpath": "./cli",
      "name": "DotNewOperation",
      "kind": "type",
      "signature": "export type DotNewOperation = { readonly path: string; readonly action: FileOperation['action']; readonly contentHash: string; readonly contentBytes: number; readonly reason: string; };",
      "jsdocSummary": "One file `dot new` plans or writes, as printed in `.data.operations[]`."
    },
    {
      "subpath": "./cli",
      "name": "DotNewResult",
      "kind": "type",
      "signature": "export type DotNewResult = { readonly app: { readonly name: string; readonly target: string; }; readonly operations: readonly DotNewOperation[]; /** The commands to run next, from the directory `dot new` ran in. */ readonly nextSteps: readonly string[]; };",
      "jsdocSummary": "What `dot new` returns: the same shape for `--dry-run` and a real run."
    },
    {
      "subpath": "./cli",
      "name": "ExplainData",
      "kind": "type",
      "signature": "export type ExplainData = DotAppManifest | GraphData | ProjectionData;",
      "jsdocSummary": "What `dot explain` returns: the manifest, or the `--graph` / `--as` payload."
    },
    {
      "subpath": "./cli",
      "name": "ExplainOptions",
      "kind": "type",
      "signature": "export type ExplainOptions = { /** Return the plugin graph as Mermaid source instead of the manifest. */ readonly graph?: boolean | undefined; /** Return the document of this registered projection format instead of the manifest. */ readonly as?: string | undefined; /** Replace the projection module for this run (`--as` only). */ readonly module?: string | undefined; /** The app file: projection modules resolve relative to it. Defaults to the cwd. */ readonly appFilePath?: string | undefined; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./cli",
      "name": "GraphData",
      "kind": "type",
      "signature": "export type GraphData = { format: 'mermaid'; /** Mermaid `flowchart` source. */ source: string; };",
      "jsdocSummary": "The `data` of `--graph`: Mermaid source."
    },
    {
      "subpath": "./cli",
      "name": "ObservabilityNoSdk",
      "kind": "variable",
      "signature": "export declare const ObservabilityNoSdk: import(\"@arki/failure\").FailureDefinition<\"dot.observability_no_sdk\", undefined>;",
      "jsdocSummary": "`doctor --observability` found no OpenTelemetry SDK. Reported as a warning issue in the snapshot, not returned."
    },
    {
      "subpath": "./cli",
      "name": "PreflightFailed",
      "kind": "variable",
      "signature": "export declare const PreflightFailed: import(\"@arki/failure\").FailureDefinition<\"dot.preflight_failed\", import(\"zod\").ZodObject<{ app: import(\"zod\").ZodNullable<import(\"zod\").ZodObject<{ file: import(\"zod\").ZodString; exportName: import(\"zod\").ZodString; plugins: import(\"zod\").ZodNumber; features: import(\"zod\").ZodNumber; }, import(\"zod/v4/core\").$strip>>; migrations: import(\"zod\").ZodNullable<import(\"zod\").ZodArray<import(\"zod\").ZodString>>; report: import(\"zod\").ZodNullable<import(\"zod\").ZodObject<{ status: import(\"zod\").ZodEnum<{ failure: \"failure\"; success: \"success\"; warning: \"warning\"; }>; plugins: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ issues: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ code: import(\"zod\").ZodString; }, import(\"zod/v4/core\").$loose>>; }, import(\"zod/v4/core\").$loose>>; actions: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ issues: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ code: import(\"zod\").ZodString; }, import(\"zod/v4/core\").$loose>>; }, import(\"zod/v4/core\").$loose>>; services: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ issues: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ code: import(\"zod\").ZodString; }, import(\"zod/v4/core\").$loose>>; }, import(\"zod/v4/core\").$loose>>; lifecycle: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ issues: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ code: import(\"zod\").ZodString; }, import(\"zod/v4/core\").$loose>>; }, import(\"zod/v4/core\").$loose>>; issues: import(\"zod\").ZodArray<import(\"zod\").ZodObject<{ code: import(\"zod\").ZodString; }, import(\"zod/v4/core\").$loose>>; }, import(\"zod/v4/core\").$loose>>; failure: import(\"zod\").ZodNullable<import(\"zod\").ZodObject<{ code: import(\"zod\").ZodString; message: import(\"zod\").ZodString; data: import(\"zod\").ZodUnknown; }, import(\"zod/v4/core\").$strip>>; }, import(\"zod/v4/core\").$strip>>;",
      "jsdocSummary": "A managed preflight reported a lifecycle failure, retaining the complete report."
    },
    {
      "subpath": "./cli",
      "name": "program",
      "kind": "variable",
      "signature": "export declare const program: import(\"@arki/cli\").Program;",
      "jsdocSummary": "The `dot` program. `program.main(argv, io)` runs one command line without touching the process."
    },
    {
      "subpath": "./cli",
      "name": "ProjectionConflict",
      "kind": "variable",
      "signature": "export declare const ProjectionConflict: import(\"@arki/failure\").FailureDefinition<\"dot.projection_conflict\", StandardSchemaV1<ProjectionConflictData, ProjectionConflictData>>;",
      "jsdocSummary": "Two plugins register different modules for one projection format."
    },
    {
      "subpath": "./cli",
      "name": "ProjectionData",
      "kind": "type",
      "signature": "export type ProjectionData = { format: string; document: JsonValue; };",
      "jsdocSummary": "The `data` of `explain --as`: the format and the document `project(manifest)` returned."
    },
    {
      "subpath": "./cli",
      "name": "ProjectionExecutionFailed",
      "kind": "variable",
      "signature": "export declare const ProjectionExecutionFailed: import(\"@arki/failure\").FailureDefinition<\"dot.projection_execution_failed\", StandardSchemaV1<ProjectionExecutionFailedData, ProjectionExecutionFailedData>>;",
      "jsdocSummary": "`project(manifest)` threw or returned output that does not survive a JSON round trip."
    },
    {
      "subpath": "./cli",
      "name": "ProjectionImportFailed",
      "kind": "variable",
      "signature": "export declare const ProjectionImportFailed: import(\"@arki/failure\").FailureDefinition<\"dot.projection_import_failed\", StandardSchemaV1<ProjectionImportFailedData, ProjectionImportFailedData>>;",
      "jsdocSummary": "The projection module could not be resolved or imported, or exports no `project(manifest)`."
    },
    {
      "subpath": "./cli",
      "name": "ProjectionNotFound",
      "kind": "variable",
      "signature": "export declare const ProjectionNotFound: import(\"@arki/failure\").FailureDefinition<\"dot.projection_not_found\", StandardSchemaV1<ProjectionNotFoundData, ProjectionNotFoundData>>;",
      "jsdocSummary": "No plugin registers the `--as` format."
    },
    {
      "subpath": "./cli",
      "name": "runDev",
      "kind": "function",
      "signature": "export declare function runDev(options: RunDevOptions): Promise<DevResult | Failure>;",
      "jsdocSummary": "Run one `dot dev` session. Returns every event, or the failure that stopped it before the runner ran (discovery, `dev.json`, db, preflight, runner). Failures after the start are printed and the session waits for a change."
    },
    {
      "subpath": "./cli",
      "name": "RunDevOptions",
      "kind": "type",
      "signature": "export type RunDevOptions = { /** App file (default: discovery's search list). */ readonly app?: string | undefined; readonly cwd?: string | undefined; readonly db: DbChoice; /** Accept a database that is neither local nor a compose service. Boot migrates it. */ readonly allowRemoteDb: boolean; readonly port: number; readonly consolePort: number; /** Hand `CONSOLE_PORT` to the runner and announce the console URL once it appears in `dev.json`. */ readonly console: boolean; /** Open the console URL in the browser when it appears. */ readonly open: boolean; /** Stop after the preflight: no runner. */ readonly once: boolean; /** A shell command line that serves the app, instead of Vite or `dot _serve`. */ readonly run?: string | undefined; readonly ui: Ui; readonly mode: Mode; /** Aborting it ends the session: the runner is stopped, `dev.json` removed. */ readonly signal: AbortSignal; /** Sees every event as it happens; the result lists them all at the end. */ readonly onEvent?: ((event: DevEvent) => void) | undefined; /** The process env, merged over `.env`. Default `process.env`. */ readonly env?: Readonly<Record<string, string | undefined>> | undefined; readonly exec?: Exec | undefined; readonly probe?: Probe | undefined; readonly lookup?: Lookup | undefined; /** How to start the `dot` CLI for `_serve`: the program, then its entry script. Default: this runtime and this CLI. */ readonly cliEntry?: readonly [string, ...string[]] | undefined; /** Where keys are read from in a text-mode terminal. Default `process.stdin`. */ readonly stdin?: KeyInput | undefined; readonly openUrl?: ((url: string) => void) | undefined; /** How long the runner gets between SIGTERM and SIGKILL. Default 10 s. */ readonly stopGraceMs?: number | undefined; /** How long one preflight process may run before it is killed and the preflight fails. Default 120 s. */ readonly preflightTimeoutMs?: number | undefined; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./cli",
      "name": "runDoctor",
      "kind": "function",
      "signature": "export declare function runDoctor(discovered: DiscoveredApp, opts?: DoctorOptions): Promise<DoctorReport | GraphData | Failure>;",
      "jsdocSummary": "Run `doctor` on a discovered app. The CLI owns boot and dispose only when it receives a builder or a configured app; an already-booted app is read and left to its caller. With `graph`, a boot that throws returns `dot.doctor_failed` with the diagnostics, not the graph."
    },
    {
      "subpath": "./cli",
      "name": "runExplain",
      "kind": "function",
      "signature": "export declare function runExplain(discovered: DiscoveredApp, opts?: ExplainOptions): Promise<ExplainData | Failure>;",
      "jsdocSummary": "Explain a discovered app. A builder is configured, never booted; a configured or booted app is read as is."
    },
    {
      "subpath": "./cli",
      "name": "runNew",
      "kind": "function",
      "signature": "export declare function runNew(opts: RunNewOptions): Promise<DotNewResult | Failure>;",
      "jsdocSummary": "Run `dot new`: plan, then write unless `dryRun`. Returns `{ app, operations }` or a failure: `cli.invalid_input` (name, template), `dot.target_not_empty`, `dot.template_missing`, `dot.write_failed`. Prints nothing."
    },
    {
      "subpath": "./cli",
      "name": "RunNewOptions",
      "kind": "type",
      "signature": "export type RunNewOptions = { /** Application name (becomes `package.json#name`). */ readonly name: string; /** * Working directory for resolving `--target`. Defaults to * `process.cwd()` when omitted. */ readonly cwd?: string; /** * Target directory; resolved against `cwd`. Defaults to `<name>` * under `cwd`. The directory is created if missing. */ readonly target?: string; /** Package manager hint surfaced in README/AGENTS.md. Defaults to `bun`. */ readonly pm?: PackageManager; /** * Bundled template to scaffold (`stack` or `minimal`). Defaults to * {@link DEFAULT_TEMPLATE}. Any other value fails with `cli.invalid_input`. */ readonly template?: string; /** When true, only plan operations — write nothing. */ readonly dryRun?: boolean; /** When true, overwrite existing files in the target dir. */ readonly force?: boolean; /** * Override template root. Used by tests; production callers should * leave this undefined so the bundled `templates/app-<template>/` * directory is used. */ readonly templateRoot?: string; /** * Version values inlined into the generated `package.json`. `dot` * defaults to this package's own version; the others default to * {@link TEMPLATE_VERSIONS} (see `versions.ts`). */ readonly versions?: { readonly dot?: string; readonly env?: string; readonly zod?: string; readonly log?: string; readonly db?: string; readonly journal?: string; readonly ui?: string; readonly designSystems?: string; }; };",
      "jsdocSummary": "Options accepted by {@link runNew}."
    },
    {
      "subpath": "./cli",
      "name": "TargetNotEmpty",
      "kind": "variable",
      "signature": "export declare const TargetNotEmpty: import(\"@arki/failure\").FailureDefinition<\"dot.target_not_empty\", StandardSchemaV1<TargetNotEmptyData, TargetNotEmptyData>>;",
      "jsdocSummary": "`dot new` would overwrite files in a non-empty target directory."
    },
    {
      "subpath": "./cli",
      "name": "TemplateMissing",
      "kind": "variable",
      "signature": "export declare const TemplateMissing: import(\"@arki/failure\").FailureDefinition<\"dot.template_missing\", StandardSchemaV1<TemplateMissingData, TemplateMissingData>>;",
      "jsdocSummary": "The package's bundled template directory is empty or missing."
    },
    {
      "subpath": "./cli",
      "name": "WriteFailed",
      "kind": "variable",
      "signature": "export declare const WriteFailed: import(\"@arki/failure\").FailureDefinition<\"dot.write_failed\", StandardSchemaV1<WriteFailedData, WriteFailedData>>;",
      "jsdocSummary": "`dot new` could not write some files. `written` lists the ones that landed."
    },
    {
      "subpath": "./execute",
      "name": "ActionInvocation",
      "kind": "type",
      "signature": "export type ActionInvocation = { readonly binding: string; /** The adapter authenticates credentials and checks expiry before asserting this. */ readonly principal: 'anonymous' | 'authenticated'; /** The adapter verifies approval bound to this caller, operation and input. */ readonly approval: 'absent' | 'granted'; readonly signal?: AbortSignal; readonly deadline?: AbortSignal; };",
      "jsdocSummary": "Trusted adapter attestations, never fields accepted from an external request body."
    },
    {
      "subpath": "./execute",
      "name": "ActionScope",
      "kind": "type",
      "signature": "export type ActionScope<Definitions extends readonly ActionFailureDefinition[]> = Parameters<Parameters<ReturnType<typeof dynamicScope<ExecutionDefinitions<Definitions>>>['run']>[0]>[0];",
      "jsdocSummary": "Inferred from the shared structured-concurrency owner, including typed acquisition and cleanup."
    },
    {
      "subpath": "./execute",
      "name": "bindAction",
      "kind": "function",
      "signature": "export declare function bindAction<const Definition extends ActionOptions<StandardSchemaV1, StandardSchemaV1, readonly ActionFailureDefinition[]>, Result extends NoInfer<StandardSchemaV1.InferInput<Definition['output']> | ReturnType<ExecutionDefinitions<Definition['failures']>[number]> | PromiseLike<StandardSchemaV1.InferInput<Definition['output']> | ReturnType<ExecutionDefinitions<Definition['failures']>[number]>>>>(definition: Definition, implementation: (input: StandardSchemaV1.InferOutput<Definition['input']>, scope: ActionScope<Definition['failures']>) => Result): { definition: Definition; /** Validate an untyped invocation, including asynchronous input/output transformations. */ run(input: unknown, invocation: ActionInvocation): Promise<Failure<\"dot.action_approval_required\", undefined> | Failure<\"dot.action_not_exposed\", undefined> | Failure<\"dot.action_principal_required\", undefined> | Failure<\"schema.invalid_input\", { issues: readonly StandardSchemaV1.Issue[]; }> | Failure<\"schema.validator_defect\", undefined> | Exclude<Awaited<StandardSchemaV1.InferOutput<Definition[\"output\"]>>, Failure> | Exclude<Awaited<Extract<Awaited<Result>, Failure>>, Failure> | Exclude<Awaited<Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"input\"]>>, Failure>>, Failure> | Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"output\"]>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<Result>, Failure>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"input\"]>>, Failure>>, Failure<string, unknown>> | ReturnType<(readonly [...Definition[\"failures\"], import(\"@arki/failure\").FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, import(\"@arki/failure\").FailureDefinition<\"schema.validator_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.cancelled\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.deadline\", undefined>, import(\"@arki/failure\").FailureDefinition<\"failure.unexpected_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, import(\"@arki/failure\").FailureDefinition<\"dot.action_not_exposed\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_principal_required\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_approval_required\", undefined>])[number]> | import(\"@arki/async\").SupervisorFailure | import(\"@arki/async\").ScopeAggregate<Failure<\"dot.action_approval_required\", undefined> | Failure<\"dot.action_not_exposed\", undefined> | Failure<\"dot.action_principal_required\", undefined> | Failure<\"schema.invalid_input\", { issues: readonly StandardSchemaV1.Issue[]; }> | Failure<\"schema.validator_defect\", undefined> | Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"output\"]>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<Result>, Failure>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"input\"]>>, Failure>>, Failure<string, unknown>> | ReturnType<(readonly [...Definition[\"failures\"], import(\"@arki/failure\").FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, import(\"@arki/failure\").FailureDefinition<\"schema.validator_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.cancelled\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.deadline\", undefined>, import(\"@arki/failure\").FailureDefinition<\"failure.unexpected_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, import(\"@arki/failure\").FailureDefinition<\"dot.action_not_exposed\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_principal_required\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_approval_required\", undefined>])[number]> | import(\"@arki/async\").SupervisorFailure, ReturnType<(readonly [...Definition[\"failures\"], import(\"@arki/failure\").FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, import(\"@arki/failure\").FailureDefinition<\"schema.validator_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.cancelled\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.deadline\", undefined>, import(\"@arki/failure\").FailureDefinition<\"failure.unexpected_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, import(\"@arki/failure\").FailureDefinition<\"dot.action_not_exposed\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_principal_required\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_approval_required\", undefined>])[number]> | import(\"@arki/async\").SupervisorFailure>>; /** * Bind to a transport that already parses input and validates output, such * as an oRPC handler. Successful output is still the output schema's INPUT; * the transport owns encoding/transformation. Never parse either schema twice. */ handle(input: StandardSchemaV1.InferOutput<Definition[\"input\"]>, invocation: ActionInvocation): Promise<Failure<\"dot.action_approval_required\", undefined> | Failure<\"dot.action_not_exposed\", undefined> | Failure<\"dot.action_principal_required\", undefined> | Failure<\"schema.invalid_input\", { issues: readonly StandardSchemaV1.Issue[]; }> | Failure<\"schema.validator_defect\", undefined> | Exclude<Awaited<Exclude<Awaited<Result>, Failure>>, Failure> | Exclude<Awaited<Extract<Awaited<Result>, Failure>>, Failure> | Exclude<Awaited<Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"input\"]>>, Failure>>, Failure> | Extract<Awaited<Exclude<Awaited<Result>, Failure>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<Result>, Failure>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"input\"]>>, Failure>>, Failure<string, unknown>> | ReturnType<(readonly [...Definition[\"failures\"], import(\"@arki/failure\").FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, import(\"@arki/failure\").FailureDefinition<\"schema.validator_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.cancelled\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.deadline\", undefined>, import(\"@arki/failure\").FailureDefinition<\"failure.unexpected_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, import(\"@arki/failure\").FailureDefinition<\"dot.action_not_exposed\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_principal_required\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_approval_required\", undefined>])[number]> | import(\"@arki/async\").SupervisorFailure | import(\"@arki/async\").ScopeAggregate<Failure<\"dot.action_approval_required\", undefined> | Failure<\"dot.action_not_exposed\", undefined> | Failure<\"dot.action_principal_required\", undefined> | Failure<\"schema.invalid_input\", { issues: readonly StandardSchemaV1.Issue[]; }> | Failure<\"schema.validator_defect\", undefined> | Extract<Awaited<Exclude<Awaited<Result>, Failure>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<Result>, Failure>>, Failure<string, unknown>> | Extract<Awaited<Extract<Awaited<StandardSchemaV1.InferOutput<Definition[\"input\"]>>, Failure>>, Failure<string, unknown>> | ReturnType<(readonly [...Definition[\"failures\"], import(\"@arki/failure\").FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, import(\"@arki/failure\").FailureDefinition<\"schema.validator_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.cancelled\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.deadline\", undefined>, import(\"@arki/failure\").FailureDefinition<\"failure.unexpected_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, import(\"@arki/failure\").FailureDefinition<\"dot.action_not_exposed\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_principal_required\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_approval_required\", undefined>])[number]> | import(\"@arki/async\").SupervisorFailure, ReturnType<(readonly [...Definition[\"failures\"], import(\"@arki/failure\").FailureDefinition<\"schema.invalid_input\", StandardSchemaV1<unknown, { issues: readonly StandardSchemaV1.Issue[]; }>>, import(\"@arki/failure\").FailureDefinition<\"schema.validator_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.cancelled\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.deadline\", undefined>, import(\"@arki/failure\").FailureDefinition<\"failure.unexpected_defect\", undefined>, import(\"@arki/failure\").FailureDefinition<\"async.scope_failed\", StandardSchemaV1<unknown, { primaryCount: number; cleanupCount: number; }>>, import(\"@arki/failure\").FailureDefinition<\"dot.action_not_exposed\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_principal_required\", undefined>, import(\"@arki/failure\").FailureDefinition<\"dot.action_approval_required\", undefined>])[number]> | import(\"@arki/async\").SupervisorFailure>>; };",
      "jsdocSummary": "Bind services through a closure, after the browser-safe contract is declared. Implementations can return only successful output input or listed canonical failures. A request owns its resources and children until they settle, even on cancellation."
    },
    {
      "subpath": "./feature",
      "name": "allFeatures",
      "kind": "function",
      "signature": "export declare function allFeatures<F extends { readonly name: string; }>(features: readonly F[]): readonly F[];",
      "jsdocSummary": "A feature and every descendant, depth-first in declaration order — what drivers and `dot explain` walk. Each node once."
    },
    {
      "subpath": "./feature",
      "name": "AnyDefinedFeature",
      "kind": "type",
      "signature": "export type AnyDefinedFeature = { readonly name: string; readonly provides: Readonly<Record<string, AnyHandle>>; readonly features: readonly AnyDefinedFeature[]; readonly entrypoints: readonly AnyEntrypoint[]; readonly contract: unknown; readonly router: unknown; /** Raw infra handles this feature (or a descendant) owns → the owning feature. Checked by `mountFeatures`. */ readonly owned: ReadonlyMap<object, string>; plugins(): readonly AnyPlugin[]; };",
      "jsdocSummary": "The erased finished feature — what the app builder accepts."
    },
    {
      "subpath": "./feature",
      "name": "AnyEntrypoint",
      "kind": "type",
      "signature": "export type AnyEntrypoint = Entrypoint<never>;",
      "jsdocSummary": "The erased entrypoint — what helpers that only read `kind` / `key` / `actions` accept."
    },
    {
      "subpath": "./feature",
      "name": "AnyFeature",
      "kind": "type",
      "signature": "export type AnyFeature = { readonly name: string; readonly router: RouterFragments; readonly repos: RepoFactories; readonly use: readonly AnyFeatureSlice[]; readonly actions: readonly ActionSource[]; readonly needs: NeedsShape; readonly factories: Readonly<Record<string, (services: never) => unknown>>; readonly boot?: (services: never) => unknown; readonly runtime: PluginRuntime<Failure, Failure>; readonly provides: Readonly<Record<string, AnyHandle>>; } & PhaseHooks<never, HookReturns>;",
      "jsdocSummary": "The erased feature bound list helpers fold over. `boot`'s parameter is `never` (the contravariant top) so features with concrete `needs` remain assignable — same trick as `RepoFactories`' `(database: never)`."
    },
    {
      "subpath": "./feature",
      "name": "AnyFeatureCore",
      "kind": "type",
      "signature": "export type AnyFeatureCore = { readonly name: string; readonly handles: NeedsShape; };",
      "jsdocSummary": "Any feature logic stage — the constraint entrypoint factories take (`schedules(logic, defs)`)."
    },
    {
      "subpath": "./feature",
      "name": "AnyFeatureSlice",
      "kind": "type",
      "signature": "export type AnyFeatureSlice = FeatureSlice<string, unknown, never>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "AppContract",
      "kind": "type",
      "signature": "export type AppContract = Readonly<Record<string, object>>;",
      "jsdocSummary": "An app contract: mount key → feature contract. The only place mount keys are written."
    },
    {
      "subpath": "./feature",
      "name": "bindDriver",
      "kind": "function",
      "signature": "export declare function bindDriver<const Unit extends AnyPlugin>(adapter: ReturnType<typeof driver<Unit>>, features: readonly MountedFeature[]): Unit & { needs: { [x: string]: Service<unknown> | Token<Readonly<Record<string, unknown>>, string>; }; };",
      "jsdocSummary": "Bind a driver and add the features' slice tokens to its runtime needs, so the kernel hands it every slice record and `dot explain` draws the feature → driver edges. Called by `.serve()`."
    },
    {
      "subpath": "./feature",
      "name": "ChildHandles",
      "kind": "type",
      "signature": "export type ChildHandles<C extends readonly AnyDefinedFeature[]> = C extends readonly [] ? EmptyShape : UnionToIntersection<C[number]['provides']>;",
      "jsdocSummary": "The children's public handles, merged, by local key."
    },
    {
      "subpath": "./feature",
      "name": "ChildOverrides",
      "kind": "type",
      "signature": "export type ChildOverrides<TName extends string, C extends readonly AnyDefinedFeature[]> = C extends readonly [] ? unknown : UnionToIntersection<C[number] extends infer X ? X extends { readonly name: infer Nm extends string; } ? { readonly [K in keyof OverridesOf<X> & string as `${LocalName<TName, Nm>}.${K}`]?: OverridesOf<X>[K]; } : never : never>;",
      "jsdocSummary": "`override({ 'compile.ranker': fake })`: a child's overrides, keyed by its local name — recursive through the child's own type."
    },
    {
      "subpath": "./feature",
      "name": "ChildProvides",
      "kind": "type",
      "signature": "export type ChildProvides<C extends readonly AnyDefinedFeature[]> = C extends readonly [] ? EmptyShape : UnionToIntersection<ProvidesOf<C[number]>>;",
      "jsdocSummary": "The children's public services, merged, by local key — what the parent's usecases see."
    },
    {
      "subpath": "./feature",
      "name": "ChildrenGuard",
      "kind": "type",
      "signature": "export type ChildrenGuard<TName extends string, N, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[]> = ([NotChildName<TName, C>] extends [never] ? unknown : { readonly 'DOT: a child feature must be named `<parent>.<child>`': NotChildName<TName, C>; }) & ([ChildKeyCollision<N, I, C>] extends [never] ? unknown : { readonly 'DOT: a child provides a key that collides with a need alias, an infra service or a reserved name': ChildKeyCollision<N, I, C>; }) & ([SiblingDup<C>] extends [never] ? unknown : { readonly 'DOT: two children provide the same key': SiblingDup<C>; });",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "ChildUnits",
      "kind": "type",
      "signature": "export type ChildUnits<TName extends string, TLocal, Owners extends string, C extends readonly AnyDefinedFeature[], Acc extends readonly AnyPlugin[] = readonly []> = C extends readonly [infer H extends AnyDefinedFeature, ...infer T extends readonly AnyDefinedFeature[]] ? ChildUnits<TName, TLocal, Owners, T, readonly [...Acc, ...RemappedUnits<TName, TLocal, Owners, ReturnType<H['plugins']>>]> : Acc;",
      "jsdocSummary": "Every child's units, in declaration order, each remapped onto the parent's scope."
    },
    {
      "subpath": "./feature",
      "name": "ComposedRepos",
      "kind": "type",
      "signature": "export type ComposedRepos<T extends readonly AnyFeature[]> = { readonly [K in keyof MergedRepoFactories<T>]: MergedRepoFactories<T>[K] extends (database: never) => infer R ? R : never; };",
      "jsdocSummary": "The repo record a feature tuple composes. An app's `AppRepo` should be pinned to this in a type test one module away from its `Context` (referencing it directly from `Context` closes a circular type loop through the router fragments)."
    },
    {
      "subpath": "./feature",
      "name": "ComposedRouter",
      "kind": "type",
      "signature": "export type ComposedRouter<T extends readonly AnyFeature[]> = UnionToIntersection<T[number]['router']>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "composeRepos",
      "kind": "function",
      "signature": "export declare function composeRepos<const T extends readonly AnyFeature[]>(features: T & NoInfer<Distinct<DuplicateKeys<ReposOf<T>>, 'ARKI_FEATURE: duplicate repo keys'>>, database: RepoDatabaseOf<T>): ComposedRepos<T>;",
      "jsdocSummary": "Fold the features' repo factories over one db handle. A repo key claimed by two features is a compile error, and throws `FeatureError` for code that skips types."
    },
    {
      "subpath": "./feature",
      "name": "composeRouter",
      "kind": "function",
      "signature": "export declare function composeRouter<const T extends readonly AnyFeature[]>(features: T & NoInfer<Distinct<DuplicateKeys<RoutersOf<T>>, 'ARKI_FEATURE: duplicate router mount keys'>>): ComposedRouter<T>;",
      "jsdocSummary": "Fold the features' router fragments into one router — value AND type from the single list. A mount key claimed by two features is a compile error, and throws `FeatureError` at module load for code that skips types."
    },
    {
      "subpath": "./feature",
      "name": "ContractOf",
      "kind": "type",
      "signature": "export type ContractOf<E extends readonly AnyEntrypoint[]> = [RpcIn<E>] extends [never] ? never : RpcIn<E> extends { readonly contract: infer C; } ? C : never;",
      "jsdocSummary": "The contract of a feature's `rpc` entrypoint; `never` when it has none."
    },
    {
      "subpath": "./feature",
      "name": "CoreDeps",
      "kind": "type",
      "signature": "export type CoreDeps<N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[]> = CtxOf<UsecaseNeeds<N>> & InfraProvides<I> & ChildProvides<C>;",
      "jsdocSummary": "What `.usecases(create)` receives: the usecase-visible needs by alias, the infra services and the children's services by local key."
    },
    {
      "subpath": "./feature",
      "name": "CoreHandles",
      "kind": "type",
      "signature": "export type CoreHandles<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U> = N & { readonly [K in keyof InfraProvides<I> & string]: ScopedHandle<InfraProvides<I>[K], `${TName}.${K}`, `${TName}/${string}`, TName>; } & ChildHandles<C> & { readonly usecases: ScopedHandle<UsecaseValues<U>, `${TName}.usecases`, TName, TName, true>; };",
      "jsdocSummary": "Every handle a request resolves for this feature: its needs, its infra services (local key → qualified handle), its children's provides and its usecases. `bind(logic)` hands a request the feature's `<name>.services` record, which holds exactly these, resolved — so the handler sees `context.usecases`, `context.store`, `context.plans`."
    },
    {
      "subpath": "./feature",
      "name": "CoreServices",
      "kind": "type",
      "signature": "export type CoreServices<N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U> = CtxOf<N> & InfraProvides<I> & ChildProvides<C> & { readonly usecases: UsecaseValues<U>; };",
      "jsdocSummary": "What `.provides` factories and every entrypoint receive: every need (entrypoint-only included), infra, children and the usecases object."
    },
    {
      "subpath": "./feature",
      "name": "DefinedFeature",
      "kind": "type",
      "signature": "export type DefinedFeature<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U, P extends ServiceRecord, E extends readonly AnyEntrypoint[]> = FeatureCore<TName, N, I, C, U> & { readonly [FeatureParamsTag]?: FeatureParams<TName, N, I, C, U, P, E>; /** Public handles, one per provided key — what other features name in their `needs`. Inside a parent they are scoped (`<name>.<key>`). */ readonly provides: ScopedHandles<ProvidedValues<P>, TName>; /** The nested features, as declared. Drivers and `dot explain` walk them. */ readonly features: C; /** Raw infra handles this feature (or a descendant) owns → the owning feature. Checked by `mountFeatures`. */ readonly owned: ReadonlyMap<object, string>; readonly entrypoints: E; /** The contract of the `rpc` entrypoint (`never` without one) — `routerFor` matches on it. */ readonly contract: ContractOf<E>; readonly router: RouterOf<E>; /** Kernel units in boot order: the qualified infra plugins, each child's units, then the feature plugin. A tuple, so the app builder's guard checks it. */ plugins(): UnitsOf<TName, N, I, C, FeatureUnit<TName, N, I, C, U, P, E>>; /** * Replace infra services by local key before compilation (tests), this * feature's (`repos`) or a child's (`'compile.ranker'`). The plugin that * provides a key is rebuilt in place: same name and needs, the overridden * keys return the value, its other keys keep their factory. Its lifecycle * hooks are dropped — they were written for the real services. * Entrypoints and provides are kept. */ override(values: Partial<InfraProvides<I>> & ChildOverrides<TName, C>): DefinedFeature<TName, N, I, C, U, P, E>; /** * A second copy of this feature, named `<name>#<instance>`: its own infra * units, usecases, services and entrypoints, publishing under * `<name>#<instance>.<key>`, so two copies mount side by side. `rebind` * swaps a need's handle for another provider's handle of the same service * type (`{ db: databaseEu.provides.db }`); a child that needs the same * handle follows. The rpc entrypoint gets its own contract identity: the * app contract mounts `copy.contract` under its own key. */ instance<const TInstance extends string, const R extends RebindOf<N> = EmptyShape>(name: TInstance & InstanceNameGuard<TInstance>, rebind?: R): DefinedFeature<`${TName}#${TInstance}`, RebindNeeds<N, R>, I, InstanceChildren<C, TName, `${TName}#${TInstance}`, N, R>, U, P, E>; };",
      "jsdocSummary": "A finished feature: what `.entrypoints(...)` returns and `defineApp().features([...])` mounts."
    },
    {
      "subpath": "./feature",
      "name": "defineFeature",
      "kind": "function",
      "signature": "export declare function defineFeature<const TName extends string>(name: TName & FeatureNameGuard<TName>): NeedsStage<TName>;",
      "jsdocSummary": "Declare a feature. Pure data capture — nothing runs until the app boots. See the module comment for the chain; `.entrypoints(...)` finishes it."
    },
    {
      "subpath": "./feature",
      "name": "DepsOf",
      "kind": "type",
      "signature": "export type DepsOf<C> = C extends { readonly [CoreServicesTag]?: infer D; } ? D : never;",
      "jsdocSummary": "The services a stage hands its next step — types code declared in another file. Before `.usecases()` it is what a usecase may ask for (needs + infra + children, minus entrypoint-only needs); after, it is what entrypoints get (every need + infra + children + `usecases`)."
    },
    {
      "subpath": "./feature",
      "name": "DotTelemetry",
      "kind": "type",
      "signature": "export type DotTelemetry = ReturnType<typeof telemetryFor>;",
      "jsdocSummary": "The inferred custom instrumentation surface, shared by all plugin and feature contexts."
    },
    {
      "subpath": "./feature",
      "name": "driven",
      "kind": "function",
      "signature": "export declare function driven<const Unit extends AnyPlugin>(bind: (features: readonly MountedFeature[]) => Unit): { readonly side: 'driven'; readonly bind: typeof bind; };",
      "jsdocSummary": "Author a driven adapter that reads the features' declarations."
    },
    {
      "subpath": "./feature",
      "name": "Driven",
      "kind": "type",
      "signature": "export type Driven<TNeeds extends ServiceRecord = ServiceRecord, TProvides extends ServiceRecord = ServiceRecord, TOwnership extends PluginOwnership = PluginOwnership, TPhases extends PluginPhases = PluginPhases> = { readonly side: 'driven'; readonly bind: (features: readonly MountedFeature[]) => Plugin<TNeeds, TProvides, NeedsShape, string, TOwnership, TPhases>; };",
      "jsdocSummary": "A driven adapter that reads the features' static declarations — e.g. the journal composing every feature's `journalHandlers` slice so features can write through it. `.use()` binds it when the app is built, to the final feature list, and it boots BEFORE the features: it sees only their declarations ({@link entrypointsOf}, and a chain feature's `plugins()`), never slice records — {@link sliceOf} throws there."
    },
    {
      "subpath": "./feature",
      "name": "driver",
      "kind": "function",
      "signature": "export declare function driver<const Unit extends AnyPlugin>(bind: (features: readonly MountedFeature[]) => Unit): { readonly side: 'driving'; readonly bind: typeof bind; };",
      "jsdocSummary": "Author a driving adapter. `bind` receives the app's mounted features, in order."
    },
    {
      "subpath": "./feature",
      "name": "Driver",
      "kind": "type",
      "signature": "export type Driver<TNeeds extends ServiceRecord = ServiceRecord, TProvides extends ServiceRecord = ServiceRecord, TOwnership extends PluginOwnership = PluginOwnership, TPhases extends PluginPhases = PluginPhases> = { readonly side: 'driving'; readonly bind: (features: readonly MountedFeature[]) => Plugin<TNeeds, TProvides, NeedsShape, string, TOwnership, TPhases>; };",
      "jsdocSummary": "A driving adapter: something that calls INTO the features (an HTTP server, a job worker, a scheduler). `.serve()` binds it to the features the app mounted, so app code never lists them twice."
    },
    {
      "subpath": "./feature",
      "name": "Entrypoint",
      "kind": "type",
      "signature": "export type Entrypoint<TServices = never> = FeatureSlice<string, unknown, TServices> & { readonly kind: string; /** * Actions whose ids need the feature's name. Action ids are unique per * binding across the app, and a procedure called `list` lives in many * features — so `rpc()` names its actions `<feature>.<procedure>` here. * Called when the feature compiles, with its declared children, so a * child's mounted procedures are declared once, by the child. */ readonly actionsOf?: (feature: string, children: readonly AnyDefinedFeature[]) => readonly ActionSource[]; };",
      "jsdocSummary": "An entrypoint descriptor — the protocol adapter packages implement (`rpc`, `schedules`, `journalEffects`, `endpoints`). Structural on purpose: an adapter imports nothing from Dot at runtime."
    },
    {
      "subpath": "./feature",
      "name": "entrypointOnly",
      "kind": "function",
      "signature": "export declare function entrypointOnly<H extends AnyHandle & { readonly lazy: object; }>(handle: H): EntrypointOnly<H>;",
      "jsdocSummary": "Mark a need as entrypoint-only: usecases never receive it; entrypoints and `provides` factories do. The flag survives `.lazy`. The clone keeps the handle it was made from under `origin`, so identity checks (`.infra()`, the child remap, assembly) still see the original."
    },
    {
      "subpath": "./feature",
      "name": "EntrypointOnly",
      "kind": "type",
      "signature": "export type EntrypointOnly<H> = H & { readonly entrypointOnly: true; readonly lazy: (H extends { readonly lazy: infer L; } ? L : never) & { readonly entrypointOnly: true; }; };",
      "jsdocSummary": "A need only entrypoints receive — a `db` to open a transaction with: `needs({ db: entrypointOnly(database.provides.db) })`. The flag survives `.lazy`."
    },
    {
      "subpath": "./feature",
      "name": "EntrypointPayloads",
      "kind": "type",
      "signature": "export type EntrypointPayloads<E extends readonly AnyEntrypoint[]> = { readonly [X in E[number] as X['key']]: X extends FeatureSlice<string, infer P, never> ? P : never; };",
      "jsdocSummary": "The slice record a feature publishes under `feature.<name>`: entrypoint key → resolved payload."
    },
    {
      "subpath": "./feature",
      "name": "entrypointsOf",
      "kind": "function",
      "signature": "export declare function entrypointsOf(f: MountedFeature): readonly AnyFeatureSlice[];",
      "jsdocSummary": "The declarations a mounted feature hands its adapters: a chain feature's `entrypoints`, or an object-form feature's `use` slices. Same protocol (`key`, `actions`, `resolve`), so an adapter reads one list either way."
    },
    {
      "subpath": "./feature",
      "name": "EntrypointsStage",
      "kind": "type",
      "signature": "export type EntrypointsStage<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U, P extends ServiceRecord> = FeatureCore<TName, N, I, C, U> & { /** Finish the feature. Call it with no argument for a feature nothing reaches directly. */ entrypoints<const E extends readonly Entrypoint<CoreServices<N, I, C, U> & KernelCtx>[]>(...entrypoints: E & EntrypointGuard<P, E> & ChildContractGuard<C, E>): DefinedFeature<TName, N, I, C, U, P, E>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "feature",
      "kind": "function",
      "signature": "export declare function feature<const TName extends string, TNeeds extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape, const TUse extends readonly FeatureSlice<string, unknown, CtxOf<TNeeds> & KernelCtx>[] = readonly [], const TRouter extends RouterFragments = EmptyShape, const TRepos extends RepoFactories = EmptyShape, TBoot extends undefined = undefined>(name: TName, config: FeatureConfig<TNeeds, TProvides, TUse, TRouter, TRepos, undefined, EmptyHookReturns>, ..._guard: BootGuard<NoInfer<TBoot>>): Feature<TName, TNeeds, NoInfer<TProvides>, TUse, TRouter, TRepos, NoInfer<TBoot>, EmptyHookReturns>; ; export declare function feature<const TName extends string, TNeeds extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape, const TUse extends readonly FeatureSlice<string, unknown, CtxOf<TNeeds> & KernelCtx>[] = readonly [], const TRouter extends RouterFragments = EmptyShape, const TRepos extends RepoFactories = EmptyShape, TBoot extends undefined | ScopePlan | Failure = undefined, TConfigure extends undefined | Failure = undefined, TStart extends undefined | Failure = undefined, TStop extends undefined | Failure = undefined, TDispose extends undefined | Failure = undefined>(name: TName, config: FeatureConfig<TNeeds, TProvides, TUse, TRouter, TRepos, TBoot, { configure: TConfigure; start: TStart; stop: TStop; dispose: TDispose; }>, ..._guard: BootGuard<NoInfer<TBoot>>): Feature<TName, TNeeds, NoInfer<TProvides>, TUse, TRouter, TRepos, NoInfer<TBoot>, { configure: TConfigure; start: TStart; stop: TStop; dispose: TDispose; }>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "Feature",
      "kind": "type",
      "signature": "export type Feature<TName extends string = string, TNeeds extends NeedsShape = NeedsShape, TProvides extends ServiceRecord = ServiceRecord, TUse extends readonly AnyFeatureSlice[] = readonly AnyFeatureSlice[], TRouter extends RouterFragments = RouterFragments, TRepos extends RepoFactories = RepoFactories, TBoot extends undefined | ScopePlan | Failure = undefined, TReturns extends HookReturns = EmptyHookReturns> = PhaseHooks<CtxOf<TNeeds> & ProvidedValues<TProvides> & KernelCtx, TReturns> & FactoryContract<ProvidedValues<TProvides>> & { readonly runtime: PluginRuntime<never, never>; readonly name: TName; /** Compile-time fragments, folded by `composeRouter` / `composeRepos`. */ readonly router: TRouter; readonly repos: TRepos; /** Boot-time slice contracts + static manifest actions. */ readonly use: TUse; readonly actions: readonly ActionSource[]; /** Runtime escape hatch — becomes the plugin lifecycle in `.features()`. */ readonly needs: TNeeds; /** One factory per capability, run in key order when the feature boots. */ readonly factories: ProvidesFactories<TNeeds, TProvides>; /** Runs after providers; may return a typed private ownership plan or failure. */ readonly boot?: (services: CtxOf<TNeeds> & ProvidedValues<TProvides> & KernelCtx) => MaybePromise<TBoot>; /** * Typed handles for what the feature provides: `billing.provides.entitlements` * is a `Token` on the same wire key, typed from billing's factory and * stamped with the providing feature. A consumer names the capability in * its `needs` and never restates the type — the Drizzle * `references(() => table.column)` of features. The keys are static, so * `Object.keys(billing.provides)` is known before anything boots. */ readonly provides: Handles<ProvidedValues<TProvides>, TName>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "FEATURE_ERROR_CODES",
      "kind": "variable",
      "signature": "export declare const FEATURE_ERROR_CODES: { /** * Two routers of a feature use the same key. * @fix Rename one of the two router keys. * @verify dot explain --json | jq -e .ok */ readonly duplicateRouterKey: 'ARKI_DOT_E022'; /** * Two repos of a feature use the same key. * @fix Rename one of the two repo keys. * @verify dot explain --json | jq -e .ok */ readonly duplicateRepoKey: 'ARKI_DOT_E023'; /** * Two slices of a feature use the same key. * @fix Rename one of the two slice keys. * @verify dot explain --json | jq -e .ok */ readonly duplicateSliceKey: 'ARKI_DOT_E024'; /** * A feature was declared with no slices. * @fix Add at least one slice to the feature. * @verify dot explain --json | jq -e .ok */ readonly missingSlices: 'ARKI_DOT_E025'; /** * A handle the feature needs is missing from the services bag. * @fix Mount the provider of that handle, and check the gateway's needs. * @verify dot doctor --json | jq -e .ok */ readonly missingCapability: 'ARKI_DOT_E026'; /** * A need alias, infra key, provided key or entrypoint key collides with another slot or a reserved name. * @fix Rename the alias or key so it collides with nothing. * @verify dot explain --json | jq -e .ok */ readonly keyCollision: 'ARKI_DOT_E027'; /** * `override()` named a key that no infra plugin of the feature provides. * @fix Override a key that one of the feature's infra plugins provides. * @verify dot explain --json | jq -e .ok */ readonly unknownOverride: 'ARKI_DOT_E028'; /** * `routerFor()`: an app-contract key is implemented by zero or several features. * @fix Give each app-contract key exactly one feature. * @verify dot explain --json | jq -e .ok */ readonly contractOwner: 'ARKI_DOT_E029'; /** * `routerFor()`: a feature's contract is not mounted in the app contract. * @fix Mount the feature's contract in the app contract. * @verify dot explain --json | jq -e .ok */ readonly contractNotMounted: 'ARKI_DOT_E030'; /** * `rpc()`: a procedure's contract `meta` is not plain JSON, so `dot explain` cannot show it. * @fix Keep the procedure's contract `meta` plain JSON. * @verify dot explain --json | jq -e .ok */ readonly rpcMetaNotJson: 'ARKI_DOT_E031'; };",
      "jsdocSummary": "Error codes for feature composition. Shared by `feature()` (object form) and `defineFeature()` (chain form), so both report through one class."
    },
    {
      "subpath": "./feature",
      "name": "FeatureCore",
      "kind": "type",
      "signature": "export type FeatureCore<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U> = { readonly name: TName; readonly handles: CoreHandles<TName, N, I, C, U>; readonly [CoreServicesTag]?: CoreServices<N, I, C, U>; };",
      "jsdocSummary": "The feature up to `.usecases()`: name, handles and (type only) the services its entrypoints receive. Entrypoint files take it as a typed parameter (`import type`), so they never import the feature at runtime."
    },
    {
      "subpath": "./feature",
      "name": "FeatureError",
      "kind": "class",
      "signature": "export declare class FeatureError extends Error { readonly code: FeatureErrorCode; readonly remediation: string; readonly docsUrl: string; constructor(args: { readonly code: FeatureErrorCode; readonly message: string; readonly remediation: string; }); }",
      "jsdocSummary": "A mistake in how features are composed. The types reject the same mistake at compile time; this is the backstop for code that skips them."
    },
    {
      "subpath": "./feature",
      "name": "FeatureErrorCode",
      "kind": "type",
      "signature": "export type FeatureErrorCode = (typeof FEATURE_ERROR_CODES)[keyof typeof FEATURE_ERROR_CODES];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "FeatureParams",
      "kind": "type",
      "signature": "export type FeatureParams<TName, N, I, C, U, P, E> = { readonly name: TName; readonly needs: N; readonly infra: I; readonly children: C; readonly usecases: U; readonly provides: P; readonly entrypoints: E; };",
      "jsdocSummary": "The type arguments of a finished feature, carried so `instance()` can re-derive a child's type under the new name."
    },
    {
      "subpath": "./feature",
      "name": "FeatureSlice",
      "kind": "type",
      "signature": "export type FeatureSlice<K extends string = string, P = unknown, TServices = never> = { readonly key: K; readonly actions: readonly ActionSource[]; /** Actions named after the mounting feature (an instance's ids carry its name); `plug()` and the chain form both read it. */ readonly actionsOf?: (feature: string, children: readonly AnyDefinedFeature[]) => readonly ActionSource[]; readonly resolve: (services: TServices) => P; };",
      "jsdocSummary": "A boot-time slice contract. Adapter packages export factories that produce these (`jobs()`, `schedules()`, `endpoints()`): the payload lands under `key` in the feature's published slice record, and the `actions` derived from the payload join the feature's manifest. The shape is structural on purpose — an adapter can mint slices without importing this module."
    },
    {
      "subpath": "./feature",
      "name": "FeaturesStage",
      "kind": "type",
      "signature": "export type FeaturesStage<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[]> = UsecasesStage<TName, N, I, readonly []> & { /** * The feature's own features, in boot order — each a finished feature * named `<this>.<child>`. A child sees this feature's infra (by handle) * and its earlier siblings' provides; its provides are seen here and by * its siblings, nowhere else. */ features<const C extends readonly AnyDefinedFeature[]>(...children: C & ChildrenGuard<TName, N, I, C>): UsecasesStage<TName, N, I, C>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "FeatureTokenOf",
      "kind": "type",
      "signature": "export type FeatureTokenOf<F extends AnyFeature> = Token<SlicePayloads<F['use']>, `feature.${F['name']}`>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "FeatureUnit",
      "kind": "type",
      "signature": "export type FeatureUnit<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U, P extends ServiceRecord, E extends readonly AnyEntrypoint[]> = Omit<Plugin<WireNeeds<N> & { [K in keyof InfraProvides<I> as Qualify<TName, K>]: InfraProvides<I>[K]; } & WireNeeds<ChildHandles<C>>, PublishRecord<TName, ProvidedValues<P>> & Readonly<Record<`${TName}.usecases`, UsecaseValues<U>>> & Readonly<Record<`${TName}.services`, CoreServices<N, I, C, U>>> & Readonly<Record<`feature.${TName}`, EntrypointPayloads<E>>>, N, TName, { readonly open: UsecaseCreationFailure<U>; readonly close: never; }>, 'factories' | 'hooks' | 'provides'> & FactoryContract<PublishRecord<TName, ProvidedValues<P>>> & { readonly hooks: EmptyShape; readonly factories: { readonly [Key in keyof P as PublishKey<TName, Key>]: (ctx: never) => P[Key]; }; readonly provides: UnitHandles<TName, PublishRecord<TName, ProvidedValues<P>>, Readonly<Record<`${TName}.usecases`, UsecaseValues<U>>> & Readonly<Record<`${TName}.services`, CoreServices<N, I, C, U>>> & Readonly<Record<`feature.${TName}`, EntrypointPayloads<E>>>>; };",
      "jsdocSummary": "The feature plugin: needs = the feature's needs + its qualified infra + its children's provides; provides = the public services, `<feature>.usecases`, `<feature>.services` and the slice record `feature.<feature>`."
    },
    {
      "subpath": "./feature",
      "name": "Handle",
      "kind": "type",
      "signature": "export type Handle<T, K extends string, O extends string = string> = Token<T, K> & { readonly provider: O; /** The lazy-lifting form of the same handle (the `service.lazy` of handles). */ readonly lazy: LazyHandle<T, K, O>; };",
      "jsdocSummary": "A capability handle: a token on the wire key `K`, stamped with the name of the unit that provides it. `plugin()` and `feature()` mint one per `provides` key, so a consumer names the capability in its `needs` (`needs: { db: database.provides.db }`) and never restates the type — the Drizzle `references(() => table.column)` of services. Identity is the wire key, not the object: the kernel resolves by `key`."
    },
    {
      "subpath": "./feature",
      "name": "HandleEntries",
      "kind": "type",
      "signature": "export type HandleEntries<N extends NeedsShape> = { [K in keyof N as N[K] extends { readonly provider: string; } ? K : never]: N[K]; };",
      "jsdocSummary": "The entries of a needs shape that are capability handles (driven services like `db` drop out)."
    },
    {
      "subpath": "./feature",
      "name": "Handles",
      "kind": "type",
      "signature": "export type Handles<TProvides extends ServiceRecord, O extends string = string> = { readonly [K in keyof TProvides & string]: Handle<TProvides[K], K, O>; };",
      "jsdocSummary": "One handle per published key — what `plugin.provides` holds."
    },
    {
      "subpath": "./feature",
      "name": "HandlesIn",
      "kind": "type",
      "signature": "export type HandlesIn<T extends readonly HasProvides[]> = UnionToIntersection<T[number]['provides']>;",
      "jsdocSummary": "Every handle the units in the tuple provide, merged into one record."
    },
    {
      "subpath": "./feature",
      "name": "HasProvides",
      "kind": "type",
      "signature": "export type HasProvides = { readonly provides: Readonly<Record<string, AnyHandle>>; };",
      "jsdocSummary": "Anything with static handles — a feature or a plugin."
    },
    {
      "subpath": "./feature",
      "name": "InfraProvides",
      "kind": "type",
      "signature": "export type InfraProvides<I extends readonly AnyPlugin[]> = I extends readonly [] ? EmptyShape : UnionToIntersection<PluginProvides<I[number]>>;",
      "jsdocSummary": "The services the infra plugins provide, merged, under their local keys."
    },
    {
      "subpath": "./feature",
      "name": "InfraStage",
      "kind": "type",
      "signature": "export type InfraStage<TName extends string, N extends NeedsShape> = FeaturesStage<TName, N, readonly []> & { /** * The feature's own plugins, in boot order. Their keys are private to this * feature and its children. A plugin's need alias is bound to a sibling's * key first, then to the feature's need of the same alias; anything else * is a compile error naming the alias. */ infra<const I extends readonly AnyPlugin[]>(...plugins: I & InfraGuard<N, I>): FeaturesStage<TName, N, I>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "InstanceChildren",
      "kind": "type",
      "signature": "export type InstanceChildren<C extends readonly AnyDefinedFeature[], From extends string, To extends string, N, R> = { readonly [K in keyof C]: InstanceOfChild<C[K], From, To, N, R>; };",
      "jsdocSummary": "The children of an instance: each re-derived under the new parent name, its needs following the rebind."
    },
    {
      "subpath": "./feature",
      "name": "instanceOf",
      "kind": "function",
      "signature": "export declare function instanceOf(name: string): string | undefined;",
      "jsdocSummary": "The instance segment of a feature or unit name: `reports#eu`, `reports#eu.audit` and `reports#eu/store` → `eu`; `reports` → `undefined`. Adapters qualify what they register by it (`send-digest#eu`), so a plain feature's names never change."
    },
    {
      "subpath": "./feature",
      "name": "LazyHandle",
      "kind": "type",
      "signature": "export type LazyHandle<T, K extends string, O extends string = string> = Token<T, K> & LazyService<T> & { readonly provider: O; };",
      "jsdocSummary": "A handle that always delivers a `Lazy<T>`, whether the provider is eager or lazy — `needs: { db: database.provides.db.lazy }`."
    },
    {
      "subpath": "./feature",
      "name": "MaybePromise",
      "kind": "type",
      "signature": "export type MaybePromise<T> = T | Promise<T>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "MountedFeature",
      "kind": "type",
      "signature": "export type MountedFeature = AnyFeature | AnyDefinedFeature;",
      "jsdocSummary": "A feature as an adapter sees it while both feature forms exist: an object-form `feature()` value or a `defineFeature` feature. Drivers and driven adapters receive these, as mounted. (Phase 5 of the RFC deletes the object form; this union then narrows to the chain form.)"
    },
    {
      "subpath": "./feature",
      "name": "mountFeatures",
      "kind": "function",
      "signature": "export declare function mountFeatures(features: readonly AnyDefinedFeature[]): { readonly features: readonly AnyDefinedFeature[]; readonly units: readonly AnyPlugin[]; };",
      "jsdocSummary": "Assemble features for an app: the normalized node list (each node once, depth-first) and the kernel units. Checks raw-handle ownership before anything binds by key: a unit outside a feature's scope that still holds one of its raw infra handles is refused — the remap at `.features()` has replaced every legitimate one, so only outsiders keep them. `defineApp().features()` runs this; drivers and driven adapters read `features` from it."
    },
    {
      "subpath": "./feature",
      "name": "NeedsGuard",
      "kind": "type",
      "signature": "export type NeedsGuard<TName extends string, N> = ([InternalNeeds<N>] extends [never] ? unknown : { readonly \"DOT: a need names a feature's internal handle (usecases/services); need its provides instead\": InternalNeeds<N>; }) & ([OutOfScope<TName, N>] extends [never] ? unknown : { readonly \"DOT: a need reaches a private service from outside its scope (a feature's infra, or a nested feature's provides)\": OutOfScope<TName, N>; });",
      "jsdocSummary": "A need may name a public handle, its own scope's private infra, or a nested feature's provides from inside that feature's parent."
    },
    {
      "subpath": "./feature",
      "name": "NeedsStage",
      "kind": "type",
      "signature": "export type NeedsStage<TName extends string> = InfraStage<TName, EmptyShape> & { /** What the feature takes from other units, by handle, under local aliases. The one door for handles. */ needs<N extends NeedsShape & NoReservedKeys & NoKeys<ReservedAlias> = EmptyShape>(needs: N & NeedsGuard<TName, N> & NotAHandle<N>): InfraStage<TName, N>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "ownUnits",
      "kind": "function",
      "signature": "export declare function ownUnits(feature: AnyDefinedFeature): readonly AnyPlugin[];",
      "jsdocSummary": "A node's OWN kernel units — its qualified infra and its feature unit — never a descendant's. Adapters read declarations from these."
    },
    {
      "subpath": "./feature",
      "name": "plug",
      "kind": "function",
      "signature": "export declare function plug<F extends AnyFeature>(f: F): PluginOf<F>;",
      "jsdocSummary": "Compile one feature into the kernel unit the app mounts. Called by `.features()`. The feature's factories run as the plugin's factories, and its slice record is one more provides entry under `feature.<name>`, so `boot` retains its private ownership plan. The feature's own handles pass through unchanged: `billing.provides.x === plug(billing).provides.x`."
    },
    {
      "subpath": "./feature",
      "name": "PluginOf",
      "kind": "type",
      "signature": "export type PluginOf<F extends AnyFeature> = Omit<Plugin<WireNeeds<F['needs']>, ProvidedOf<F> & Readonly<Record<`feature.${F['name']}`, SlicePayloads<F['use']>>>, NeedsShape, string, FeatureOwnership<F>, PluginPhaseFailures<{ readonly hooks: F; }>>, 'runtime' | 'hooks' | 'factories'> & Pick<F, 'runtime' | 'factories'> & FactoryContractOf<F> & { readonly hooks: Pick<F, 'configure' | 'boot' | 'start' | 'stop' | 'dispose'>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "PluginsOf",
      "kind": "type",
      "signature": "export type PluginsOf<T extends readonly AnyFeature[]> = { readonly [I in keyof T]: T[I] extends AnyFeature ? PluginOf<T[I]> : never; };",
      "jsdocSummary": "Tuple map from features to the plugins `.features()` mounts."
    },
    {
      "subpath": "./feature",
      "name": "Provided",
      "kind": "type",
      "signature": "export type Provided<H> = H extends Service<infer T> ? T : never;",
      "jsdocSummary": "The value type behind a handle — for the one alias an app names (`type Db = Provided<typeof database.provides.db>`)."
    },
    {
      "subpath": "./feature",
      "name": "ProvidedOf",
      "kind": "type",
      "signature": "export type ProvidedOf<F extends HasProvides> = F extends HasProvides ? { [K in keyof F['provides']]: F['provides'][K] extends Service<infer T> ? T : never; } : never;",
      "jsdocSummary": "The service values a feature provides, keyed by wire key — each handle unwrapped to its value type. Distributive over `F`, so a union of features maps member by member (a mapped type over the union would keep only the keys every member shares)."
    },
    {
      "subpath": "./feature",
      "name": "ProvidesFactories",
      "kind": "type",
      "signature": "export type ProvidesFactories<TNeeds extends NeedsShape, TProvides extends ServiceRecord> = { readonly [K in keyof TProvides]: (services: CtxOf<TNeeds> & KernelCtx) => TProvides[K] & NoInfer<CheckedProvider<TProvides[K]>>; };",
      "jsdocSummary": "Infer raw factory returns once, including Promise wrappers. Explicit TProvides annotations describe those raw returns, not the resolved services. Services and ownership resolve promises through their shared projections."
    },
    {
      "subpath": "./feature",
      "name": "providesOf",
      "kind": "function",
      "signature": "export declare function providesOf<const T extends readonly HasProvides[]>(units: T): HandlesIn<T>;",
      "jsdocSummary": "Every handle the features (and plugins) provide, merged — spread it into a gateway feature's `needs` and the kernel hands it every capability: `providesOf([database, cache, ...features])`. The builder guard then proves the gateway is mounted after every provider."
    },
    {
      "subpath": "./feature",
      "name": "ProvidesStage",
      "kind": "type",
      "signature": "export type ProvidesStage<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], U> = EntrypointsStage<TName, N, I, C, U, EmptyShape> & { /** Public services, one factory per key; each gets needs, infra, the children's services and usecases. */ provides<P extends ServiceRecord & NoReservedKeys & NoKeys<ReservedAlias> = EmptyShape>(factories: { readonly [K in keyof P]: (services: CoreServices<N, I, C, U> & KernelCtx) => P[K] & NoInfer<CheckedProvider<P[K]>>; } & ProvidesGuard<TName, I, P>): EntrypointsStage<TName, N, I, C, U, P>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "QualifiedInfra",
      "kind": "type",
      "signature": "export type QualifiedInfra<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[]> = { readonly [K in keyof I]: I[K] extends AnyPlugin ? QualifiedPlugin<TName, N, I[K], keyof InfraProvides<I>> : never; };",
      "jsdocSummary": "Every infra plugin qualified, as a tuple in declaration order."
    },
    {
      "subpath": "./feature",
      "name": "QualifiedPlugin",
      "kind": "type",
      "signature": "export type QualifiedPlugin<TName extends string, N extends NeedsShape, P extends AnyPlugin, TLocal> = Omit<Plugin<{ [K in keyof PluginNeeds<P> as K extends TLocal ? Qualify<TName, K> : K extends keyof N ? WireKeyOfNeed<N[K], K> : K]: PluginNeeds<P>[K]; }, { [K in keyof PluginProvides<P> as Qualify<TName, K>]: PluginProvides<P>[K]; }, OwnedShape<N, PluginProviderIdentities<P>>, `${TName}/${string}`, PluginPreparation<P>, PluginPhaseFailures<P>>, 'runtime' | 'hooks' | 'factories' | 'logging' | 'provides'> & Pick<P, 'runtime' | 'hooks' | 'factories' | 'logging'> & FactoryContractOf<P> & { readonly provides: InfraUnitHandles<TName, { [K in keyof PluginProvides<P> as Qualify<TName, K>]: PluginProvides<P>[K]; }>; };",
      "jsdocSummary": "An infra plugin after qualification: it provides under `<feature>.<key>`; a need that named a sibling infra key (`TLocal`) names the qualified key, so the sibling — not an app plugin — satisfies it; any other need alias is the feature's need of that alias, on that handle's wire key."
    },
    {
      "subpath": "./feature",
      "name": "RebindNeeds",
      "kind": "type",
      "signature": "export type RebindNeeds<N extends NeedsShape, R> = { readonly [K in keyof N]: K extends keyof R ? Exclude<R[K], undefined> : N[K]; };",
      "jsdocSummary": "The feature's needs after a rebind: a rebound alias takes the new handle's type."
    },
    {
      "subpath": "./feature",
      "name": "RebindOf",
      "kind": "type",
      "signature": "export type RebindOf<N extends NeedsShape> = { readonly [K in keyof N]?: Service<Carried<N[K]>>; };",
      "jsdocSummary": "`instance(name, rebind)`: a rebound alias takes any handle carrying the same service type — another provider, another key."
    },
    {
      "subpath": "./feature",
      "name": "RepoDatabaseOf",
      "kind": "type",
      "signature": "export type RepoDatabaseOf<T extends readonly AnyFeature[]> = { [I in keyof T]: (database: RepoDbParamOf<T[I]>) => void; }[number] extends (database: infer TDb) => void ? TDb : never;",
      "jsdocSummary": "The db handle type every repo factory in the tuple accepts — intersected ACROSS features via signature-parameter inference rather than a distributive UnionToIntersection, so a factory whose param is itself a union (`Db | Transaction`) keeps it intact instead of collapsing to `Db & Transaction`. Repo-less features contribute `unknown` (the intersection identity)."
    },
    {
      "subpath": "./feature",
      "name": "RepoFactories",
      "kind": "type",
      "signature": "export type RepoFactories = Record<string, (database: never) => unknown>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "RequestHandles",
      "kind": "type",
      "signature": "export type RequestHandles<T extends readonly AnyDefinedFeature[]> = UnionToIntersection<T[number]['provides']> & UnionToIntersection<ServicesHandlesIn<ReturnType<T[number]['plugins']>>>;",
      "jsdocSummary": "What a gateway needs to serve these features' requests: their public handles, and every node's `<name>.services`."
    },
    {
      "subpath": "./feature",
      "name": "requestServices",
      "kind": "function",
      "signature": "export declare function requestServices<const T extends readonly AnyDefinedFeature[]>(features: T): { readonly provides: RequestHandles<T>; };",
      "jsdocSummary": "The handles a gateway needs to serve requests for these features, as one `provides` record: the top-level features' public handles, and the `<name>.services` bag of every node (nested children included), which `bind(core)` reads per request. The bags are published public here on purpose — serving requests is the assembly's job, not a feature's — so a gateway may spread them into `.needs()`:"
    },
    {
      "subpath": "./feature",
      "name": "ReservedAlias",
      "kind": "type",
      "signature": "export type ReservedAlias = 'session' | 'headers' | 'services' | 'usecases';",
      "jsdocSummary": "Names a feature may not use for a need alias, an infra key or a provided key: the request context's own keys (`session`, `headers`, `services`) and the `usecases` slot. A handler context spreads the feature's handles next to the request keys, so a private `session` would replace the real one."
    },
    {
      "subpath": "./feature",
      "name": "resolveNeeds",
      "kind": "function",
      "signature": "export declare function resolveNeeds<N extends NeedsShape>(bag: ServicesBag, needs: N): CtxOf<HandleEntries<N>>;",
      "jsdocSummary": "Narrow a request context's services bag with a feature's own `needs`: each capability handle resolves to its value under the local alias. Driven services (`db`) are not in the bag and drop out of the result."
    },
    {
      "subpath": "./feature",
      "name": "routerFor",
      "kind": "function",
      "signature": "export declare function routerFor<const A extends AppContract, const F extends readonly Mounted[]>(app: A & ([Unimplemented<A, F>] extends [never] ? unknown : { readonly 'ARKI_FEATURE: app contract key has no feature': Unimplemented<A, F>; }), features: F & ([Unmounted<A, F>] extends [never] ? unknown : { readonly 'ARKI_FEATURE: feature contract not mounted in the app contract': Unmounted<A, F>; })): RouterFor<A, F>;",
      "jsdocSummary": "Resolve the app router from the app contract. Mount keys are written once, in the app contract; each feature is found by contract identity. Compile errors at the call: an app-contract key no feature implements, a feature whose contract the app contract does not mount. Features without an `rpc` entrypoint are skipped, so the app's whole feature list can be passed. A nested feature's contract is mounted by its parent, not here."
    },
    {
      "subpath": "./feature",
      "name": "RouterFor",
      "kind": "type",
      "signature": "export type RouterFor<A extends AppContract, F extends readonly Mounted[]> = { readonly [K in keyof A]: Extract<F[number], { readonly contract: A[K]; }>['router']; };",
      "jsdocSummary": "For each app-contract key, the router of the one feature whose contract is that contract."
    },
    {
      "subpath": "./feature",
      "name": "RouterFragments",
      "kind": "type",
      "signature": "export type RouterFragments = Record<string, unknown>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./feature",
      "name": "RouterOf",
      "kind": "type",
      "signature": "export type RouterOf<E extends readonly AnyEntrypoint[]> = [RpcIn<E>] extends [never] ? never : RpcIn<E> extends { readonly router: infer R; } ? R : never;",
      "jsdocSummary": "The router of a feature's `rpc` entrypoint; `never` when it has none."
    },
    {
      "subpath": "./feature",
      "name": "RpcEntrypoint",
      "kind": "type",
      "signature": "export type RpcEntrypoint<C extends object = object, R = unknown> = Entrypoint<unknown> & { readonly kind: 'rpc'; readonly key: 'rpc'; readonly contract: C; readonly router: R; };",
      "jsdocSummary": "The one descriptor with static data: the feature's oRPC contract and the router that implements it. `DefinedFeature.contract` / `.router` are read from it, so `routerFor(rpcContract, features)` finds each feature by its contract. (`rpc(contract, implementer, procedures)` in `@arki/dot/orpc` builds it and checks the router against the contract.)"
    },
    {
      "subpath": "./feature",
      "name": "ScopedHandle",
      "kind": "type",
      "signature": "export type ScopedHandle<T, K extends string, O extends string, S extends string | undefined, Internal extends boolean = false> = Handle<T, K, O> & { readonly scope: S; readonly internal: Internal; readonly lazy: Handle<T, K, O>['lazy'] & { readonly scope: S; readonly internal: Internal; }; };",
      "jsdocSummary": "A handle with explicit ownership: `scope` is the feature inside which it may be needed (`undefined` = public); `internal` marks the feature's own usecases/services/slice, which nothing may need. Both survive `.lazy`. `needs()` and `.infra()` read only this metadata — nothing derived from names."
    },
    {
      "subpath": "./feature",
      "name": "ScopedHandles",
      "kind": "type",
      "signature": "export type ScopedHandles<P extends ServiceRecord, TName extends string> = { readonly [K in keyof P & string]: ScopedHandle<P[K], PublishKey<TName, K>, TName, ScopeFor<TName>>; };",
      "jsdocSummary": "One handle per provided key (local key → handle on the published wire key)."
    },
    {
      "subpath": "./feature",
      "name": "ServicesBag",
      "kind": "type",
      "signature": "export type ServicesBag = Readonly<Record<string, unknown>>;",
      "jsdocSummary": "The services a request context carries: wire key → value. Opaque on purpose — naming the merged type in the context closes a type loop through the routers. Procedures narrow it with their feature's own `needs` through {@link resolveNeeds}."
    },
    {
      "subpath": "./feature",
      "name": "servicesOf",
      "kind": "function",
      "signature": "export declare function servicesOf<const T extends readonly HasProvides[]>(ctx: object, features: T): ServicesOf<T>;",
      "jsdocSummary": "Read every capability the units (features, `defineFeature` features or plugins) provide out of a hook context whose `needs` spread {@link providesOf} — the bag a gateway passes to its request context."
    },
    {
      "subpath": "./feature",
      "name": "ServicesOf",
      "kind": "type",
      "signature": "export type ServicesOf<T extends readonly HasProvides[]> = UnionToIntersection<ProvidedOf<T[number]>>;",
      "jsdocSummary": "Every service value the units (features or plugins) in the tuple provide, keyed by wire key."
    },
    {
      "subpath": "./feature",
      "name": "sliceOf",
      "kind": "function",
      "signature": "export declare function sliceOf(ctx: object, f: MountedFeature): Readonly<Record<string, unknown>>;",
      "jsdocSummary": "The slice record one feature published — read inside a bound driver's hooks. Values are untyped on purpose: the adapter that minted the slice checks its own payload shape (`jobs()`, `schedules()`, `endpoints()`)."
    },
    {
      "subpath": "./feature",
      "name": "SlicePayloads",
      "kind": "type",
      "signature": "export type SlicePayloads<TUse extends readonly AnyFeatureSlice[]> = TUse extends readonly [] ? EmptyShape : UnionToIntersection<{ [I in keyof TUse]: TUse[I] extends FeatureSlice<infer K, infer P, never> ? Readonly<Record<K, P>> : never; }[number]>;",
      "jsdocSummary": "The slice record a feature's `use` tuple publishes, keyed by slice key."
    },
    {
      "subpath": "./feature",
      "name": "telemetryFor",
      "kind": "function",
      "signature": "export declare function telemetryFor(owner: { readonly name: string; } | { readonly $plugin: string; }): { /** Observe a custom operation, retaining its exact return value, promise and failure identity. */ span<Value>(name: string, run: () => Value, options?: SpanOptions): Value; /** Annotate the active operation without adding a span. Explicit attributes only. */ event(name: string, attributes?: Attributes): void; /** Create a counter. Keep explicit dimensions bounded; do not include user IDs or payloads. */ counter(name: string, options?: MetricOptions): { add(value: number, attributes?: Attributes): void; }; /** Create a histogram with the same identity and context as this scope. */ histogram(name: string, options?: MetricOptions): { record(value: number, attributes?: Attributes): void; }; /** Write through the app's logging setup with the active trace stamped on the record. */ log(level: LevelInput, template: string, fields?: Fields): void; };",
      "jsdocSummary": "Scope custom instrumentation from an existing plugin, feature or hook context. App-owned OTel providers supply tracing; without an SDK every call is safe. Use a new span only for a new operational boundary, not one already instrumented."
    },
    {
      "subpath": "./feature",
      "name": "tokenOf",
      "kind": "function",
      "signature": "export declare function tokenOf<F extends AnyFeature>(f: F): FeatureTokenOf<F>;",
      "jsdocSummary": "The slice token a feature publishes. Driving adapters list these as runtime needs so the kernel hands them each feature's slice record."
    },
    {
      "subpath": "./feature",
      "name": "UnitsOf",
      "kind": "type",
      "signature": "export type UnitsOf<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[], Unit extends AnyPlugin> = ChildUnits<TName, keyof InfraProvides<I>, InfraOwners<I>, C, QualifiedInfra<TName, N, I>> extends infer U extends readonly AnyPlugin[] ? readonly [...U, Unit] : never;",
      "jsdocSummary": "The whole unit list of a feature with children: infra, children, then the feature itself."
    },
    {
      "subpath": "./feature",
      "name": "UsecaseFactories",
      "kind": "type",
      "signature": "export type UsecaseFactories = Readonly<Record<string, (deps: never) => unknown>>;",
      "jsdocSummary": "What `.usecases()` takes: one factory per usecase, `(deps) => usecase`."
    },
    {
      "subpath": "./feature",
      "name": "UsecaseFactoriesOf",
      "kind": "type",
      "signature": "export type UsecaseFactoriesOf<D> = Readonly<Record<string, (deps: D) => unknown>>;",
      "jsdocSummary": "The same, with the feature's deps `D` as the parameter: an inline factory `({ store }) => …` is contextually typed with `D`, so it needs no annotation. An annotated `Pick<D, 'store'>` still fits (parameter contravariance)."
    },
    {
      "subpath": "./feature",
      "name": "UsecaseGuard",
      "kind": "type",
      "signature": "export type UsecaseGuard<D, F extends UsecaseFactories> = [BadUsecases<D, F>] extends [never] ? unknown : { readonly 'DOT: a usecase asks for a dep the feature does not provide': { readonly [K in BadUsecases<D, F>]: Exclude<keyof DepsAskedBy<F[K]>, keyof D>; }; };",
      "jsdocSummary": "Names each usecase that asks for a dep the feature does not have, and the deps it lacks."
    },
    {
      "subpath": "./feature",
      "name": "UsecaseNeeds",
      "kind": "type",
      "signature": "export type UsecaseNeeds<N extends NeedsShape> = { [K in keyof N as N[K] extends { readonly entrypointOnly: true; } ? never : K]: N[K]; };",
      "jsdocSummary": "The needs usecases may see: every need that is not entrypoint-only."
    },
    {
      "subpath": "./feature",
      "name": "Usecases",
      "kind": "type",
      "signature": "export type Usecases<F extends UsecaseFactories> = { readonly [K in keyof F]: ReturnType<F[K]>; };",
      "jsdocSummary": "The usecases object: each factory's return under its key."
    },
    {
      "subpath": "./feature",
      "name": "UsecasesStage",
      "kind": "type",
      "signature": "export type UsecasesStage<TName extends string, N extends NeedsShape, I extends readonly AnyPlugin[], C extends readonly AnyDefinedFeature[]> = Omit<ProvidesStage<TName, N, I, C, EmptyShape>, typeof CoreServicesTag> & { /** * Before `.usecases()` there are no usecases, so `DepsOf<typeof <feature>Deps>` is * exactly what a usecase may ask for — needs + infra + children, no `usecases` key. */ readonly [CoreServicesTag]?: CoreDeps<N, I, C>; /** * One factory per usecase, built once per boot: `{ signup, markInvited }`, * each `(deps) => usecase`. An inline factory gets the deps type for free * (`({ repos }) => …`); an annotated one may ask for any subset * (`Pick<Deps, 'repos'>`). Asking for a dep the feature lacks is a compile * error naming the usecase. * * Two overloads, on purpose. The first infers inline factories, but a * factory that asks for a missing dep fails its constraint with a plain * `Property 'mailer' is missing` and never reaches the guard. TypeScript then * tries the second, today's signature, whose guard prints the `DOT:` label — * and prints the LAST overload's failure under \"No overload matches this call\". */ usecases<const F extends UsecaseFactoriesOf<CoreDeps<N, I, C>>>(factories: F & UsecaseSignatureGuard<F>): ProvidesStage<TName, N, I, C, Usecases<F>>; usecases<const F extends UsecaseFactories>(factories: F & UsecaseGuard<CoreDeps<N, I, C>, F> & UsecaseSignatureGuard<F>): ProvidesStage<TName, N, I, C, Usecases<F>>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./log",
      "name": "DOT_LOG_ERROR_CODES",
      "kind": "variable",
      "signature": "export declare const DOT_LOG_ERROR_CODES: { /** * `boot` ran before the kernel activated the logging slot. * @fix Mount `log()` with `.use()` in a Dot app and let the kernel run its hooks; never call them yourself. * @verify dot doctor --json | jq -e .ok */ readonly notActivated: 'DOT_LOG_E001'; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./log",
      "name": "log",
      "kind": "function",
      "signature": "export declare function log<const C extends string>(config: () => LogConfig<C>): import(\"./plugin-contract.js\").AuthoredPlugin<import(\"./plugin-contract.js\").WireNeeds<import(\"./plugin-contract.js\").EmptyShape>, import(\"./plugin-contract.js\").ProvidedValues<{ logging: Configured<C>; }>, import(\"./plugin-contract.js\").EmptyShape, \"log\", { logging: Configured<C>; }, import(\"./plugin-contract.js\").EmptyPhases, import(\"./plugin-contract.js\").DotLoggingHandle<undefined>, undefined>;",
      "jsdocSummary": "The Dot plugin that configures `@arki/log` for the app. Pass a thunk: it runs when the app boots, never at import."
    },
    {
      "subpath": "./log",
      "name": "LogServices",
      "kind": "type",
      "signature": "export type LogServices<C extends string> = { readonly logging: Configured<C>; };",
      "jsdocSummary": "What `log()` publishes."
    },
    {
      "subpath": "./orpc",
      "name": "BoundContext",
      "kind": "type",
      "signature": "export type BoundContext<H extends NeedsShape> = CtxOf<HandleEntries<H>>;",
      "jsdocSummary": "What `bind(logic)` adds to a handler's context: every handle of the feature's logic stage, resolved, under its alias."
    },
    {
      "subpath": "./orpc",
      "name": "BuiltRouter",
      "kind": "type",
      "signature": "export type BuiltRouter<F> = { readonly [K in keyof F]: F[K] extends (implementer: never) => infer R ? R : BuiltRouter<F[K]>; };",
      "jsdocSummary": "The router the factories build: each factory's return under its key."
    },
    {
      "subpath": "./orpc",
      "name": "ContractKeysGuard",
      "kind": "type",
      "signature": "export type ContractKeysGuard<C, F> = [ExtraKeys<C, F>] extends [never] ? unknown : { readonly 'DOT: a procedure key is not in the contract': ExtraKeys<C, F>; };",
      "jsdocSummary": "A compile error naming each procedure key the contract does not list."
    },
    {
      "subpath": "./orpc",
      "name": "ErrorCaptureInfo",
      "kind": "type",
      "signature": "export type ErrorCaptureInfo = { readonly path: readonly string[]; };",
      "jsdocSummary": "What `errorCaptureMiddleware` hands its reporter with the error."
    },
    {
      "subpath": "./orpc",
      "name": "errorCaptureMiddleware",
      "kind": "function",
      "signature": "export declare function errorCaptureMiddleware(options: { readonly report: (error: unknown, info: ErrorCaptureInfo) => void; }): import(\"@orpc/server\").DecoratedMiddleware<Record<never, never>, Record<never, never>, unknown, any, any, Record<never, never>>;",
      "jsdocSummary": "Make the app's error capture, once: `export const errorCapture = errorCaptureMiddleware({ report: (error, { path }) => captureException(error) })`."
    },
    {
      "subpath": "./orpc",
      "name": "needsMiddleware",
      "kind": "function",
      "signature": "export declare function needsMiddleware<Ctx extends RequestContextShape>(): <H extends NeedsShape>(logic: { readonly name: string; readonly handles: H; } & ShadowGuard<Ctx, H>) => import(\"@orpc/server\").DecoratedMiddleware<Ctx & Record<never, never>, CtxOf<HandleEntries<H>> & IntersectPick<Ctx, CtxOf<HandleEntries<H>>>, unknown, any, any, Record<never, never>>;",
      "jsdocSummary": "Make the app's `bind` for its request context type, once: `export const bind = needsMiddleware<RequestContext>()`."
    },
    {
      "subpath": "./orpc",
      "name": "ProcedureFactories",
      "kind": "type",
      "signature": "export type ProcedureFactories<C, O> = { readonly [K in keyof C]: C[K] extends ContractProcedure<infer _I, infer _O, infer _E, infer _M> ? (implementer: O) => Router<C[K], never> : ProcedureFactories<C[K], O> | (C[K] extends ContractRouter<Meta> ? (implementer: O) => Router<C[K], never> : never); };",
      "jsdocSummary": "Shaped like the contract: a leaf is `(impl) => impl.<path>.handler(…)`, a group is a nested object — or, for a mounted child feature, `() => child.router`, the child's whole router under the key the contract gives it. `Router<C[K], never>` is oRPC's own \"implements\" check for one procedure (or one subtree) — same schemas — and `never` as the initial context accepts whatever context the app's implementer settled on."
    },
    {
      "subpath": "./orpc",
      "name": "RequestContextShape",
      "kind": "type",
      "signature": "export type RequestContextShape = { readonly services: ServicesBag; };",
      "jsdocSummary": "The least a request context carries for `bind`: the services bag the gateway built for this request."
    },
    {
      "subpath": "./orpc",
      "name": "rpc",
      "kind": "function",
      "signature": "export declare function rpc<C extends ContractRouter<Meta>, O, const F extends ProcedureFactories<C, O>>(contract: C, implementer: O, factories: F & ContractKeysGuard<C, F>): RpcEntrypoint<C, BuiltRouter<F>>;",
      "jsdocSummary": "The feature's oRPC entrypoint: its contract, and the router built from one factory per procedure. The whole tree lives in one `entrypoints/procedures.ts`; each leaf takes the feature's `rpcImplementer` as a typed parameter, so it never imports the feature at runtime. The contract stays the one list of procedure names: a missing, extra or wrong procedure does not compile. `DefinedFeature.contract` / `.router` are read from this descriptor, so `routerFor(rpcContract, features)` finds the feature by its contract. Its actions (one per procedure, `<feature>.<path>`) are named when the feature compiles, through `actionsOf`. A subtree whose built router IS a declared child's router is the child's: the child names those actions itself, so they are skipped here. An inline group (`admin: impl => ({ … })`) has no child owner and keeps its actions."
    },
    {
      "subpath": "./orpc",
      "name": "RPC_ACTION_META_SCHEMA",
      "kind": "variable",
      "signature": "export declare const RPC_ACTION_META_SCHEMA = \"@arki/dot/rpc-action-meta@1\";",
      "jsdocSummary": "Identifies the layout of an rpc action's `meta`, for tools that read `dot explain --json`."
    },
    {
      "subpath": "./plugin",
      "name": "ActionDeclaration",
      "kind": "type",
      "signature": "export type ActionDeclaration = Omit<ActionManifest, 'plugin'>;",
      "jsdocSummary": "Context provided to a `configure` hook (sync registration only)."
    },
    {
      "subpath": "./plugin",
      "name": "ActionDiagnostic",
      "kind": "type",
      "signature": "export type ActionDiagnostic = { id: string; plugin: string; binding: string; /** The action's summary, when it has one (post-boot, as completed by `$describeAction`). */ summary?: string; /** Structural configure-phase health only; not runtime liveness. */ status: Extract<DiagnosticStatus, 'ok' | 'degraded' | 'failed'>; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "ActionDirection",
      "kind": "type",
      "signature": "export type ActionDirection = 'in' | 'out';",
      "jsdocSummary": "Direction of a boundary interaction, viewed from the app."
    },
    {
      "subpath": "./plugin",
      "name": "ActionManifest",
      "kind": "type",
      "signature": "export type ActionManifest = { /** Stable identifier, e.g. `orders.list` or `orders.created.consume`. */ id: string; plugin: string; /** Adapter-owned binding name: `http`, `queue`, `cli`, `cron`, etc. */ binding: string; /** `in` = world invokes/feeds the app; `out` = app emits. */ direction: ActionDirection; /** Display-only address printed by `dot explain`. */ address?: string; /** Human summary rendered into explain output and projected documents. */ summary?: string; /** Adapter-owned, JSON-serializable detail. Opaque to the kernel. */ meta?: Readonly<JsonObject>; /** Optional adapter-owned identifier+version for the meta layout. */ metaSchema?: string; };",
      "jsdocSummary": "Something the app does at a boundary — universal, serializable, tiny."
    },
    {
      "subpath": "./plugin",
      "name": "ActionSource",
      "kind": "type",
      "signature": "export type ActionSource = ActionDeclaration | { toDotAction(): ActionDeclaration; };",
      "jsdocSummary": "Structural protocol for adapter-owned declarations."
    },
    {
      "subpath": "./plugin",
      "name": "AnyHandle",
      "kind": "type",
      "signature": "export type AnyHandle = Token<unknown> & { readonly provider: string; };",
      "jsdocSummary": "An erased handle — what helpers that only read `key` / `provider` accept."
    },
    {
      "subpath": "./plugin",
      "name": "AnyPlugin",
      "kind": "type",
      "signature": "export type AnyPlugin = Plugin<ServiceRecord, ServiceRecord, NeedsShape, string, PluginOwnership, PluginPhases>;",
      "jsdocSummary": "Internal type alias used by the kernel to erase plugin service generics."
    },
    {
      "subpath": "./plugin",
      "name": "AuthoredPlugin",
      "kind": "type",
      "signature": "export type AuthoredPlugin<Needs extends ServiceRecord, Provides extends ServiceRecord, Shape extends NeedsShape, Owner extends string, Values extends ServiceRecord, Phases extends PluginPhases, Logging extends DotLoggingHandle | Failure, Boot> = Omit<Plugin<Needs, Provides, Shape, Owner, EmptyOwnership, Phases>, 'logging' | 'factories' | 'hooks'> & LoggingSlot<Logging> & FactoryContract<ProvidedValues<Values>> & { readonly factories: { readonly [Key in keyof Values]: (ctx: never) => Values[Key]; }; readonly hooks: PhaseHooks<never, { readonly [Phase in keyof PluginPhases]: undefined | Phases[Phase]; }> & { readonly boot?: (ctx: CtxOf<Shape> & Provides & KernelCtx) => MaybePromise<Boot>; }; };",
      "jsdocSummary": "Authored plugins retain the callbacks that own their runtime failures."
    },
    {
      "subpath": "./plugin",
      "name": "bootTestApp",
      "kind": "function",
      "signature": "export declare function bootTestApp<const TPlugins extends readonly AnyPlugin[] = readonly []>(plugins?: TPlugins & TestAppGuard<TPlugins>, options?: TestAppOptions): Promise<import(\"./define-app.js\").DotApp<TestAppServices<TPlugins>, PluginCloseFailure<TPlugins[number]>, PluginOpenFailure<TPlugins[number]>, PluginPhaseFailures<TPlugins[number]>> | Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<PluginPhaseFailures<TPlugins[number]>[\"configure\"], void> | Exclude<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void>, void> | Exclude<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"open\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"open\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void>, void> | Exclude<Exclude<Extract<TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never, Failure>, void>, void> | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | PluginOpenFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure> | import(\"@arki/async\").ScopeAggregate<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void> | Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"open\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"open\"], void> | Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void> | Exclude<Extract<TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never, Failure>, void> | import(\"@arki/async\").SupervisorFailure | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | PluginOpenFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure>, PluginPhaseFailures<TPlugins[number]>[\"dispose\"] | (Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void> | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure>)>>;",
      "jsdocSummary": "Build and boot an app, returning declared ownership failures to its caller."
    },
    {
      "subpath": "./plugin",
      "name": "CtxOf",
      "kind": "type",
      "signature": "export type CtxOf<S extends NeedsShape> = { [K in keyof S]: WitnessContext<S[K]>; };",
      "jsdocSummary": "Local-alias view of a needs shape — what lifecycle hooks destructure. `{ cache: Token<KV, 'arki.kv'> }` → `{ cache: KV }`. `{ search: service.lazy<S>() }` → `{ search: Lazy<S> }`."
    },
    {
      "subpath": "./plugin",
      "name": "defineApp",
      "kind": "function",
      "signature": "export declare function defineApp(name: string, options?: { version?: string; config?: Readonly<Record<string, unknown>>; /** * In-process lifecycle observers, registered before the first phase * fires. Required if you want to see `configure`-phase events — after * configure runs, observers can be added post-hoc via * `configured.subscribe(...)` or `app.subscribe(...)`. */ observers?: readonly DotLifecycleObserver[]; /** * Watchdog budget (ms) for each async hook invocation (`boot`, `start`, * `stop`, `dispose` — `configure` is sync). A hook exceeding the budget * fails with `ARKI_DOT_E015` naming the plugin and hook, and the * kernel applies its normal failure rules (boot rollback, teardown * aggregation). The hook's promise itself cannot be cancelled — the * watchdog makes the hang *visible*, it does not kill it. Default: * no watchdog. */ hookTimeoutMs?: number; clock?: Clock; }): DotAppBuilder<EmptyShape>;",
      "jsdocSummary": "Create a new DOT app builder."
    },
    {
      "subpath": "./plugin",
      "name": "DependencyEdge",
      "kind": "type",
      "signature": "export type DependencyEdge = { from: string; to: string; kind: DependencyEdgeKind; /** * The capability (wire key) the edge carries. Set on edges the kernel * derives before boot from a feature's static `provides`. */ key?: string; };",
      "jsdocSummary": "Directed edge in the plugin dependency graph."
    },
    {
      "subpath": "./plugin",
      "name": "DependencyEdgeKind",
      "kind": "type",
      "signature": "export type DependencyEdgeKind = 'requires' | 'provides' | 'uses';",
      "jsdocSummary": "Kind of dependency edge between two plugins."
    },
    {
      "subpath": "./plugin",
      "name": "DiagnosticIssue",
      "kind": "type",
      "signature": "export type DiagnosticIssue = { /** Stable machine-readable code, e.g. `ARKI_DOT_E003`. */ code: string; severity: DiagnosticSeverity; plugin?: string; message: string; /** Human-readable remediation: what the developer should do. */ remediation: string; /** Link to the relevant docs page for this issue. */ docsUrl: string; metadata?: Record<string, unknown>; };",
      "jsdocSummary": "Single structured issue surfaced by the kernel or by a plugin."
    },
    {
      "subpath": "./plugin",
      "name": "DiagnosticSeverity",
      "kind": "type",
      "signature": "export type DiagnosticSeverity = 'info' | 'warning' | 'error';",
      "jsdocSummary": "Severity of a single diagnostic issue."
    },
    {
      "subpath": "./plugin",
      "name": "DiagnosticStatus",
      "kind": "type",
      "signature": "export type DiagnosticStatus = 'ok' | 'degraded' | 'failed' | 'skipped' | 'missing';",
      "jsdocSummary": "Status of a plugin/action/service/lifecycle entry."
    },
    {
      "subpath": "./plugin",
      "name": "DOT_LIFECYCLE_HOOKS",
      "kind": "variable",
      "signature": "export declare const DOT_LIFECYCLE_HOOKS: readonly DotLifecycleHook[];",
      "jsdocSummary": "The complete set of lifecycle hooks in execution order. `stop` and `dispose` run in reverse declaration order across plugins, but the sequence of hooks themselves is always `configure -> boot -> start -> stop -> dispose`."
    },
    {
      "subpath": "./plugin",
      "name": "DotApp",
      "kind": "type",
      "signature": "export type DotApp<TServices extends ServiceRecord, TClose extends Failure = never, _TOpen extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = { /** App name (passed to `defineApp`). */ readonly name: string; /** Current lifecycle state. */ readonly state: DotLifecycleState; /** * Services published by booted plugins, keyed by wire key. * Empty before `boot()` succeeds. */ readonly services: TServices; /** Declarative manifest — describes the static shape of the app. */ readonly manifest: DotAppManifest; /** Point-in-time diagnostics snapshot. Re-computed on every access. */ readonly diagnostics: DotDiagnosticsSnapshot; /** * Start active work. Boots first if app is `defined` or `configured`. * Idempotent while `started`. Returns a defect if the app is `failed` or `disposed`. */ start(): Promise<DotStartedOutcome<TClose, TPhases>>; /** * Stop active work. Keeps booted resources for later cleanup. * Idempotent while not `started`. */ stop(): Promise<DotStopOutcome<TPhases>>; /** * Release booted resources. Runs stop() first if `started`. * Idempotent while `disposed`. */ dispose(): Promise<DotDisposeOutcome<TClose, TPhases>>; /** * Register an in-process lifecycle observer. Returns an unsubscribe * function. Observers added here see events from this point onward — * pass observers through `defineApp(name, { observers })` to catch * `configure`-phase events too. */ subscribe(observer: DotLifecycleObserver): () => void; /** * Render the recorded lifecycle as an ASCII waterfall. Reads from * the current `diagnostics` snapshot — call after `boot()` / * `dispose()` / a failure to see the full picture. */ timeline(): string; };",
      "jsdocSummary": "Public DotApp surface. The internal `DotAppImpl` implements this; consumers see only these members."
    },
    {
      "subpath": "./plugin",
      "name": "DotAppBuilder",
      "kind": "type",
      "signature": "export type DotAppBuilder<TAvail extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = Pick<Builder<TAvail, TOpen, TClose, TPhases>, keyof Builder<TAvail, TOpen, TClose, TPhases>>;",
      "jsdocSummary": "Builder produced by `defineApp(name)`. The app reads as a hexagon:"
    },
    {
      "subpath": "./plugin",
      "name": "DotAppConfigured",
      "kind": "type",
      "signature": "export type DotAppConfigured<TServices extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TPhases extends PluginPhases = EmptyPhases> = { readonly name: string; readonly state: DotLifecycleState; readonly manifest: DotAppManifest; readonly diagnostics: DotDiagnosticsSnapshot; /** Continue the lifecycle. */ boot(): Promise<DotApp<TServices, TClose, TOpen, TPhases> | Exclude<DotBootOutcome<TOpen, TClose, TPhases>, void>>; start(): Promise<DotApp<TServices, TClose, TOpen, TPhases> | Exclude<DotStartOutcome<TOpen, TClose, TPhases>, void>>; /** See {@link DotApp.subscribe}. */ subscribe(observer: DotLifecycleObserver): () => void; /** See {@link DotApp.timeline}. */ timeline(): string; };",
      "jsdocSummary": "Intermediate type after `configure()` but before `boot()`. Exposes the manifest and diagnostics already, but no `services` yet."
    },
    {
      "subpath": "./plugin",
      "name": "DotAppManifest",
      "kind": "type",
      "signature": "export type DotAppManifest = { /** Manifest schema version. 2 = actions/projections era. */ manifestVersion: 2; app: { name: string; version?: string; }; plugins: PluginManifest[]; actions: ActionManifest[]; services: ServiceManifest[]; lifecycle: LifecycleManifest[]; dependencies: DependencyEdge[]; projections: ProjectionManifest[]; };",
      "jsdocSummary": "Top-level manifest describing the static shape of a DOT app."
    },
    {
      "subpath": "./plugin",
      "name": "DotConfigureContext",
      "kind": "type",
      "signature": "export type DotConfigureContext = { /** Custom telemetry scoped to this plugin, sharing its active configure span. */ readonly $telemetry: DotTelemetry; pluginName: string; /** App name. */ appName: string; /** * Register a service this plugin publishes, for manifest/diagnostics * purposes. Registration is metadata-only — the actual service instance * is returned from its `provides` factory. */ registerService(name: string, kind: ServiceKind): void; /** Register an action this plugin contributes at an app boundary. */ registerAction(action: ActionDeclaration): void; /** Register a projection renderer this plugin contributes. */ registerProjection(projection: ProjectionDeclaration): void; /** * Replace the `summary` of an action already registered. Same ownership * rule as `$describeAction` (see {@link KernelCtx}); in `configure` it sees * the actions of plugins mounted earlier. */ describeAction(actionId: string, patch: { readonly summary: string; }): void; /** @deprecated Use `registerAction`; removed in DOT 0.5.0. */ registerRoute(route: LegacyRouteDeclaration): void; /** Mark the plugin as participating in a lifecycle hook. */ registerLifecycleHook(hook: 'configure' | 'boot' | 'start' | 'stop' | 'dispose'): void; /** Append `provides` capability strings (informational, manifest-only). */ declareProvides(...capabilities: string[]): void; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "DotDiagnosticsSnapshot",
      "kind": "type",
      "signature": "export type DotDiagnosticsSnapshot = { /** Diagnostic snapshot schema version. 2 = actions/projections era. */ snapshotVersion: 2; /** ISO-8601 timestamp at which the snapshot was generated. */ generatedAt: string; app: { name: string; state: DotLifecycleState; }; plugins: PluginDiagnostic[]; actions: ActionDiagnostic[]; services: ServiceDiagnostic[]; lifecycle: LifecycleDiagnostic[]; issues: DiagnosticIssue[]; };",
      "jsdocSummary": "Single point-in-time diagnostic snapshot of a DotApp."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleError",
      "kind": "class",
      "signature": "export declare class DotLifecycleError extends Error { readonly code: DotLifecycleErrorCodeValue; /** One-sentence guidance on how to fix the problem. Same shape as `DotPluginError.remediation`. */ readonly remediation: string; /** Documentation page that explains this error. */ readonly docsUrl: string; readonly phase: DotLifecycleHook; readonly plugin?: string; readonly cause?: unknown; readonly failures?: readonly DotLifecyclePluginFailure[]; constructor(args: { code: DotLifecycleErrorCodeValue; phase: DotLifecycleHook; message: string; /** Overrides the stock remediation for this code. */ remediation?: string; plugin?: string; cause?: unknown; failures?: readonly DotLifecyclePluginFailure[]; }); }",
      "jsdocSummary": "Structured error thrown for any lifecycle failure or misuse."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleErrorCode",
      "kind": "variable",
      "signature": "export declare const DotLifecycleErrorCode: { /** * A `configure` hook attempted async work (returned a Promise). * @fix Make `configure` synchronous and move async work to `boot`. * @verify dot explain --json | jq -e .ok */ readonly ConfigureAsync: 'ARKI_DOT_E001'; /** * A `configure` hook threw. * @fix Fix the plugin's config or its `configure` hook, then build a new app. * @verify dot explain --json | jq -e .ok */ readonly ConfigureFailed: 'ARKI_DOT_E002'; /** * A `boot` hook threw. * @fix Read `cause` and `plugin`, then fix that plugin's `boot` hook or the service it opens. * @verify dot doctor --json | jq -e .ok */ readonly BootFailed: 'ARKI_DOT_E003'; /** * A `start` hook threw. * @fix Read `cause` and `plugin`, then fix that plugin's `start` hook. * @verify bun run test */ readonly StartFailed: 'ARKI_DOT_E004'; /** * One or more `stop` hooks threw — aggregate. * @fix Read `failures`: each entry names the plugin whose `stop` hook threw. * @verify bun run test */ readonly StopFailed: 'ARKI_DOT_E005'; /** * One or more `dispose` hooks threw — aggregate. * @fix Read `failures`: each entry names the plugin whose `dispose` hook threw. * @verify dot doctor --json | jq -e .ok */ readonly DisposeFailed: 'ARKI_DOT_E006'; /** * Caller tried to reuse the app after dispose. * @fix Build a fresh app instance; a disposed app cannot run again. * @verify bun run test */ readonly ReuseAfterDispose: 'ARKI_DOT_E007'; /** * Caller tried to reuse the app after a failed lifecycle. * @fix Build a fresh app instance; a failed app cannot run again. * @verify bun run test */ readonly ReuseAfterFailure: 'ARKI_DOT_E008'; /** * Plugin registered twice. * @fix Remove the second `.use()` of this plugin, or `rename` it to run two copies. * @verify dot explain --json | jq -e .ok */ readonly DuplicatePlugin: 'ARKI_DOT_E011'; /** * A plugin's `needs` entry has no provider among earlier-booted plugins. * @fix Mount a plugin that provides the needed key before its consumer. * @verify dot doctor --json | jq -e .ok */ readonly UnsatisfiedNeed: 'ARKI_DOT_E012'; /** * A plugin published a wire key that an earlier plugin already provides. * @fix Give one of the two providers a different key with `rename`. * @verify dot doctor --json | jq -e .ok */ readonly ServiceCollision: 'ARKI_DOT_E013'; /** * A needs alias, publish key, or rename target uses the reserved `$` prefix. * @fix Rename the key; names starting with `$` belong to the kernel. * @verify dot explain --json | jq -e .ok */ readonly ReservedServiceKey: 'ARKI_DOT_E014'; /** * A lifecycle hook exceeded the app's `hookTimeoutMs` watchdog. * @fix Pass the hook's `$signal` to its I/O, or raise `hookTimeoutMs` with a reason. * @verify dot doctor --json | jq -e .ok */ readonly HookTimeout: 'ARKI_DOT_E015'; /** * Two actions in the same binding use the same id. * @fix Give each action in a binding its own id. * @verify dot explain --json | jq -e .ok */ readonly DuplicateAction: 'ARKI_DOT_E016'; /** * Action metadata is not JSON-round-trip safe. * @fix Keep action `meta` plain JSON: no functions, Dates, Maps or cycles. * @verify dot explain --json | jq -e .ok */ readonly ActionMetaNotJson: 'ARKI_DOT_E017'; /** * More than one plugin fills the logging slot. * @fix Keep one `log()` plugin in the app. * @verify dot explain --json | jq -e .ok */ readonly DuplicateLogging: 'ARKI_DOT_E018'; /** * Static capability needs form a ring: a feature's need comes back around to itself. * @fix Move the shared piece into a third unit that both sides need. * @verify dot explain --json | jq -e .ok */ readonly CapabilityRing: 'ARKI_DOT_E019'; /** * A feature needs a capability whose (static) provider is mounted after it. * @fix Mount the provider before the unit that needs it; the message names both positions. * @verify dot explain --json | jq -e .ok */ readonly ProviderMountedLater: 'ARKI_DOT_E020'; /** * `$describeAction` named an action the calling plugin may not amend (unknown id, or not its own). * @fix Describe only actions the calling plugin declared or owns. * @verify dot explain --json | jq -e .ok */ readonly ActionNotAmendable: 'ARKI_DOT_E021'; };",
      "jsdocSummary": "Stable error codes for every failure the kernel throws, `ARKI_DOT_E001`.. Codes are never renumbered and never reused (E009 and E010 are retired). E001-E021 are lifecycle failures; E022-E031 are feature-composition failures (see `FEATURE_ERROR_CODES`); E032 is non-JSON manifest data."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleErrorCodeValue",
      "kind": "type",
      "signature": "export type DotLifecycleErrorCodeValue = (typeof DotLifecycleErrorCode)[keyof typeof DotLifecycleErrorCode];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleEvent",
      "kind": "type",
      "signature": "export type DotLifecycleEvent = DotPhaseLifecycleEvent | DotPluginHookLifecycleEvent;",
      "jsdocSummary": "The single fan-out event type emitted by the kernel to every registered observer. Discriminated by `kind`:"
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleEventStatus",
      "kind": "type",
      "signature": "export type DotLifecycleEventStatus = 'starting' | 'completed' | 'failed';",
      "jsdocSummary": "Possible event statuses. See {@link DotLifecycleEvent}."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleHook",
      "kind": "type",
      "signature": "export type DotLifecycleHook = 'configure' | 'boot' | 'start' | 'stop' | 'dispose';",
      "jsdocSummary": "Identifier of a single hook in the DOT lifecycle."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleObserver",
      "kind": "type",
      "signature": "export type DotLifecycleObserver = (event: DotLifecycleEvent) => void;",
      "jsdocSummary": "Observer function signature. Synchronous by contract — observers MUST NOT block the lifecycle. If a long-running side effect is needed (e.g. shipping events to a remote sink), the observer should buffer the event and process it on a separate cadence."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecyclePluginFailure",
      "kind": "type",
      "signature": "export type DotLifecyclePluginFailure = { plugin: string; phase: DotLifecycleHook; error: unknown; };",
      "jsdocSummary": "Single plugin failure inside an aggregate lifecycle error (stop/dispose)."
    },
    {
      "subpath": "./plugin",
      "name": "DotLifecycleState",
      "kind": "type",
      "signature": "export type DotLifecycleState = 'defined' | 'configured' | 'booted' | 'started' | 'stopped' | 'disposed' | 'failed';",
      "jsdocSummary": "Macro-states the DotApp can occupy."
    },
    {
      "subpath": "./plugin",
      "name": "DotLoggingContext",
      "kind": "type",
      "signature": "export type DotLoggingContext = { /** App name (passed to `defineApp`). */ readonly appName: string; };",
      "jsdocSummary": "What the kernel passes to a plugin's `logging` factory."
    },
    {
      "subpath": "./plugin",
      "name": "DotLoggingHandle",
      "kind": "type",
      "signature": "export type DotLoggingHandle<Close extends undefined | Failure = undefined | Failure> = { close(): MaybePromise<Close>; };",
      "jsdocSummary": "What a `logging` factory returns. The kernel closes it after the app's last lifecycle record."
    },
    {
      "subpath": "./plugin",
      "name": "DotPhaseLifecycleEvent",
      "kind": "type",
      "signature": "export type DotPhaseLifecycleEvent = { readonly kind: 'phase'; /** The phase the event belongs to. */ readonly phase: DotLifecycleHook; readonly status: DotLifecycleEventStatus; /** App name (so multiplexed observers can disambiguate). */ readonly appName: string; /** Wall-clock duration in milliseconds. Present on `completed` / `failed`. */ readonly durationMs?: number; /** The error value, if `status === 'failed'`. */ readonly error?: unknown; /** Wall-clock timestamp in ms-since-epoch (`Date.now()` semantics). */ readonly timestamp: number; };",
      "jsdocSummary": "Boundary of a top-level lifecycle phase."
    },
    {
      "subpath": "./plugin",
      "name": "DotPluginError",
      "kind": "class",
      "signature": "export declare class DotPluginError extends Error { /** Stable error code, e.g. `ARKI_KV_PLUGIN_E001`. */ readonly code: string; /** One-sentence guidance on how to fix the underlying problem. */ readonly remediation: string; /** URL of the documentation page that explains this error. */ readonly docsUrl: string; constructor(args: { readonly code: string; readonly message: string; readonly remediation: string; readonly docsUrl: string; }); }",
      "jsdocSummary": "Stable error thrown by DOT plugin adapters."
    },
    {
      "subpath": "./plugin",
      "name": "DotPluginHookLifecycleEvent",
      "kind": "type",
      "signature": "export type DotPluginHookLifecycleEvent = { readonly kind: 'plugin-hook'; /** The phase the hook belongs to. */ readonly phase: DotLifecycleHook; /** The plugin whose hook is being executed. */ readonly plugin: string; /** Topological order of the plugin within the phase (0-based). */ readonly order: number; readonly status: DotLifecycleEventStatus; readonly appName: string; readonly durationMs?: number; readonly error?: unknown; readonly timestamp: number; };",
      "jsdocSummary": "Boundary of a single plugin's hook execution."
    },
    {
      "subpath": "./plugin",
      "name": "DotPluginRole",
      "kind": "type",
      "signature": "export type DotPluginRole = 'feature' | 'driving';",
      "jsdocSummary": "See {@link Plugin.role}."
    },
    {
      "subpath": "./plugin",
      "name": "DotTelemetry",
      "kind": "type",
      "signature": "export type DotTelemetry = ReturnType<typeof telemetryFor>;",
      "jsdocSummary": "The inferred custom instrumentation surface, shared by all plugin and feature contexts."
    },
    {
      "subpath": "./plugin",
      "name": "EmptyOwnership",
      "kind": "type",
      "signature": "export type EmptyOwnership = { readonly open: never; readonly close: never; };",
      "jsdocSummary": "A unit with no declared construction or cleanup refusals."
    },
    {
      "subpath": "./plugin",
      "name": "EmptyPhases",
      "kind": "type",
      "signature": "export type EmptyPhases = { readonly [Phase in keyof PluginPhases]: never; };",
      "jsdocSummary": "No declared hook failures."
    },
    {
      "subpath": "./plugin",
      "name": "EmptyShape",
      "kind": "type",
      "signature": "export type EmptyShape = {};",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "FactoryContract",
      "kind": "type",
      "signature": "export type FactoryContract<Values extends ServiceRecord> = { readonly [FactoryContractSym]?: Values; };",
      "jsdocSummary": "The successful outputs that minted a unit's handles; failures stay inferred from the live callbacks."
    },
    {
      "subpath": "./plugin",
      "name": "FactoryContractOf",
      "kind": "type",
      "signature": "export type FactoryContractOf<P> = FactoryContract<P extends FactoryContract<infer Values> ? Values : never>;",
      "jsdocSummary": "Preserve the original factory contract while projecting a unit's wiring."
    },
    {
      "subpath": "./plugin",
      "name": "Handle",
      "kind": "type",
      "signature": "export type Handle<T, K extends string, O extends string = string> = Token<T, K> & { readonly provider: O; /** The lazy-lifting form of the same handle (the `service.lazy` of handles). */ readonly lazy: LazyHandle<T, K, O>; };",
      "jsdocSummary": "A capability handle: a token on the wire key `K`, stamped with the name of the unit that provides it. `plugin()` and `feature()` mint one per `provides` key, so a consumer names the capability in its `needs` (`needs: { db: database.provides.db }`) and never restates the type — the Drizzle `references(() => table.column)` of services. Identity is the wire key, not the object: the kernel resolves by `key`."
    },
    {
      "subpath": "./plugin",
      "name": "handleOf",
      "kind": "function",
      "signature": "export declare function handleOf(key: string, provider: string): Handle<unknown, string>;",
      "jsdocSummary": "Mint the handle for wire key `key` provided by `provider` (and its lazy form)."
    },
    {
      "subpath": "./plugin",
      "name": "Handles",
      "kind": "type",
      "signature": "export type Handles<TProvides extends ServiceRecord, O extends string = string> = { readonly [K in keyof TProvides & string]: Handle<TProvides[K], K, O>; };",
      "jsdocSummary": "One handle per published key — what `plugin.provides` holds."
    },
    {
      "subpath": "./plugin",
      "name": "InferredOwnership",
      "kind": "type",
      "signature": "export type InferredOwnership<in out Values, out Boot> = { readonly open: ProviderOpen<Values> | Extract<Boot, Failure> | EntriesFailure<Exclude<Boot, void | Failure>, 'open'> | EntriesFailure<Exclude<Boot, void | Failure>, 'run'>; readonly close: ProviderClose<Values> | EntriesFailure<Exclude<Boot, void | Failure>, 'close'> | EntriesFailure<Exclude<Boot, void | Failure>, 'run'>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "InferredPhases",
      "kind": "type",
      "signature": "export type InferredPhases<Returns extends HookReturns> = { readonly [Phase in keyof PluginPhases]: Extract<Returns[Phase], Failure>; };",
      "jsdocSummary": "Derive phase failures from callback results."
    },
    {
      "subpath": "./plugin",
      "name": "initPlugins",
      "kind": "variable",
      "signature": "export declare const initPlugins: { context<TServices extends object>(): { create(): InitPluginsFactory<TServices>; }; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "InitPluginsFactory",
      "kind": "type",
      "signature": "export type InitPluginsFactory<TServices extends object> = ReturnType<typeof createPluginFactory<TServices>>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "isLazy",
      "kind": "function",
      "signature": "export declare function isLazy(value: unknown): value is PublishedLazy;",
      "jsdocSummary": "Detect a published lazy handle without claiming its cleanup is infallible."
    },
    {
      "subpath": "./plugin",
      "name": "JsonObject",
      "kind": "type",
      "signature": "export type JsonObject = Record<string, JsonValue>;",
      "jsdocSummary": "JSON-serializable object used for adapter-owned manifest metadata."
    },
    {
      "subpath": "./plugin",
      "name": "JsonValue",
      "kind": "type",
      "signature": "export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue; };",
      "jsdocSummary": "JSON-serializable value — the manifest's currency."
    },
    {
      "subpath": "./plugin",
      "name": "KernelCtx",
      "kind": "type",
      "signature": "export type KernelCtx = { /** App name (passed to `defineApp`). */ readonly $app: string; /** This plugin's name. */ readonly $plugin: string; /** Custom spans, events, metrics and correlated logs scoped to this mounted plugin or feature. */ readonly $telemetry: DotTelemetry; /** Read-only runtime config bag from `defineApp(name, { config })`. */ readonly $config: Readonly<Record<string, unknown>>; /** * Aborts when this hook exceeds `defineApp(name, { hookTimeoutMs })`; the * reason is the `ARKI_DOT_E015` error. Pass it to the hook's I/O * (`fetch`, a driver's connect, `sleep`) so a hung hook stops instead of * running on after the kernel gave up on it. One signal per hook call. */ readonly $signal: AbortSignal; /** * Complete an action's `summary` once the plugin's services exist (a * `provides` factory, `boot`, `start`, ...). `dot explain` stays static; * the post-boot `app.manifest` and `dot doctor` show the new text. * * A plugin may amend an action it declared, or an action in a binding it * registered a projection for (an adapter completing the actions of the * features it serves). Anything else throws `ARKI_DOT_E021`. */ readonly $describeAction: (actionId: string, patch: { readonly summary: string; }) => void; };",
      "jsdocSummary": "Kernel-supplied context keys, present in every service-carrying hook context. The `$` prefix is a reserved namespace: `plugin()` rejects `$`-prefixed needs aliases and publish keys at compile time (via {@link NoReservedKeys}) and the kernel enforces it at runtime (`ARKI_DOT_E014`), so these keys can never be shadowed."
    },
    {
      "subpath": "./plugin",
      "name": "lazy",
      "kind": "function",
      "signature": "export declare function lazy<Value, Cleanup = void>(init: Initializer<Value> & TypedOutput<Value>, options?: LazyOptions<Value, Cleanup>): { [LazyTag]: true; get: () => Promise<Value | Failure<\"dot.lazy_closed\", undefined> | Failure<\"failure.unexpected_defect\", undefined>>; readonly initialized: boolean; peek(): Exclude<Awaited<Value>, Failure<string, unknown>> | undefined; dispose(): Promise<Failure<\"failure.unexpected_defect\", undefined> | Extract<Awaited<Awaited<Cleanup>>, Failure<string, unknown>> | Extract<Awaited<Awaited<Value>>, Failure<string, unknown>> | undefined>; };",
      "jsdocSummary": "Own a service initialized on first use. Concurrent gets share an attempt; returned failures and defects are retried only by a later get. Cleanup receives successful services only. Disposal closes admission immediately, waits for a pending attempt, and caches its complete typed outcome."
    },
    {
      "subpath": "./plugin",
      "name": "Lazy",
      "kind": "type",
      "signature": "export type Lazy<Value, Cleanup = void> = ReturnType<typeof lazy<Value, Cleanup>>;",
      "jsdocSummary": "A service handle derived from its callback outputs. `Lazy<T>` includes the canonical closed/defect outcomes; providers with other declared failures keep their inferred handle type, or supply their original callback output types."
    },
    {
      "subpath": "./plugin",
      "name": "LazyClosed",
      "kind": "variable",
      "signature": "export declare const LazyClosed: import(\"@arki/failure\").FailureDefinition<\"dot.lazy_closed\", undefined>;",
      "jsdocSummary": "An operation tried to initialize a service after its owner closed admission."
    },
    {
      "subpath": "./plugin",
      "name": "LazyHandle",
      "kind": "type",
      "signature": "export type LazyHandle<T, K extends string, O extends string = string> = Token<T, K> & LazyService<T> & { readonly provider: O; };",
      "jsdocSummary": "A handle that always delivers a `Lazy<T>`, whether the provider is eager or lazy — `needs: { db: database.provides.db.lazy }`."
    },
    {
      "subpath": "./plugin",
      "name": "lazyOf",
      "kind": "function",
      "signature": "export declare function lazyOf<Value>(value: Awaited<Value>): { [LazyTag]: true; get(): Promise<Failure<\"dot.lazy_closed\", undefined> | Awaited<Awaited<Value>>>; readonly initialized: boolean; peek(): Exclude<Awaited<Value>, Failure> | undefined; dispose(): Promise<undefined>; };",
      "jsdocSummary": "Borrow an already available service without initializing or owning it. A failure is returned by get and is never marked initialized."
    },
    {
      "subpath": "./plugin",
      "name": "LazyService",
      "kind": "type",
      "signature": "export type LazyService<T> = Service<T | Lazy<T>> & { readonly lazy: true; readonly [LazyInner]?: T; };",
      "jsdocSummary": "A lazy-lifting witness (create via {@link service.lazy}). The consumer always receives a `Lazy<T>` handle, regardless of whether the provider published a plain `T` (the kernel lifts it into a pre-initialized handle) or a `Lazy<T>` (passed through). This decouples consumers from the provider's eager-vs-lazy strategy."
    },
    {
      "subpath": "./plugin",
      "name": "LifecycleDiagnostic",
      "kind": "type",
      "signature": "export type LifecycleDiagnostic = { plugin: string; hook: DotLifecycleHook; state: DotLifecycleState; /** 0-based topological order of this plugin within the hook pass. */ order: number; /** Wall-clock duration of the hook call, in milliseconds. */ durationMs?: number; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "LifecycleManifest",
      "kind": "type",
      "signature": "export type LifecycleManifest = { plugin: string; hooks: readonly DotLifecycleHook[]; };",
      "jsdocSummary": "Which lifecycle hooks a plugin participates in."
    },
    {
      "subpath": "./plugin",
      "name": "LoggingSlot",
      "kind": "type",
      "signature": "export type LoggingSlot<Result extends DotLoggingHandle | Failure> = { readonly logging?: (ctx: DotLoggingContext) => Result; };",
      "jsdocSummary": "The actual logging callback remains the source of activation and cleanup failures."
    },
    {
      "subpath": "./plugin",
      "name": "MergePhases",
      "kind": "type",
      "signature": "export type MergePhases<Left extends PluginPhases, Right extends PluginPhases> = { readonly [Phase in keyof PluginPhases]: Left[Phase] | Right[Phase]; };",
      "jsdocSummary": "Combine failure channels when appending a unit to an app."
    },
    {
      "subpath": "./plugin",
      "name": "NeedsShape",
      "kind": "type",
      "signature": "export type NeedsShape = Record<string, Service<unknown>>;",
      "jsdocSummary": "A `needs` declaration: local alias → witness (anonymous or token)."
    },
    {
      "subpath": "./plugin",
      "name": "NoReservedKeys",
      "kind": "type",
      "signature": "export type NoReservedKeys = Readonly<Record<`$${string}`, never>>;",
      "jsdocSummary": "No `$`-prefixed keys — that prefix is the kernel context namespace ({@link KernelCtx}). Used as a constraint on needs shapes and provides records: a matching key makes the property type `never`, which no witness or service value satisfies, so the violation errors at the exact offending property. The kernel re-validates at runtime with `ARKI_DOT_E014` for paths the constraint cannot see (renames, erased plugins)."
    },
    {
      "subpath": "./plugin",
      "name": "NormalizeProvides",
      "kind": "type",
      "signature": "export type NormalizeProvides<TP extends ServiceRecord> = [TP] extends [never] ? EmptyShape : TP;",
      "jsdocSummary": "A plugin whose `boot` always throws infers `TProvides = never`, which would poison both the collision check (`keyof never` matches everything) and the accumulated record (`TAvail & never` = `never`). Such a plugin provides nothing — normalize to the empty shape."
    },
    {
      "subpath": "./plugin",
      "name": "PhaseHooks",
      "kind": "type",
      "signature": "export type PhaseHooks<Context, Returns extends HookReturns> = { readonly configure?: (ctx: DotConfigureContext) => Returns['configure']; readonly start?: (ctx: Context) => MaybePromise<Returns['start']>; readonly stop?: (ctx: Context) => MaybePromise<Returns['stop']>; readonly dispose?: (ctx: Context) => MaybePromise<Returns['dispose']>; };",
      "jsdocSummary": "Lifecycle callbacks sharing a context, with concrete results per phase."
    },
    {
      "subpath": "./plugin",
      "name": "plugin",
      "kind": "function",
      "signature": "export declare function plugin<TShape extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape, const TName extends string = string, TBoot extends undefined = undefined>(def: PluginDefinition<TShape, TProvides, TName, undefined, EmptyHookReturns, DotLoggingHandle<undefined>>, ..._guard: BootGuard<NoInfer<TBoot>>): AuthoredPlugin<WireNeeds<TShape>, ProvidedValues<TProvides>, TShape, TName, TProvides, EmptyPhases, DotLoggingHandle<undefined>, TBoot>; ; export declare function plugin<TShape extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape, const TName extends string = string, TBoot extends undefined | ScopePlan | Failure = undefined, TConfigure extends undefined | Failure = undefined, TStart extends undefined | Failure = undefined, TStop extends undefined | Failure = undefined, TDispose extends undefined | Failure = undefined, TLogging extends DotLoggingHandle | Failure = DotLoggingHandle<undefined>>(def: PluginDefinition<TShape, TProvides, TName, TBoot, { configure: TConfigure; start: TStart; stop: TStop; dispose: TDispose; }, TLogging>, ..._guard: BootGuard<NoInfer<TBoot>>): AuthoredPlugin<WireNeeds<TShape>, ProvidedValues<TProvides>, TShape, TName, TProvides, InferredPhases<{ configure: TConfigure; start: TStart; stop: TStop; dispose: TDispose; }>, TLogging, TBoot>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "Plugin",
      "kind": "type",
      "signature": "export type Plugin<out TNeeds extends ServiceRecord = ServiceRecord, out TProvides extends ServiceRecord = ServiceRecord, out TShape extends NeedsShape = NeedsShape, out TOwner extends string = string, out TOwnership extends PluginOwnership = EmptyOwnership, out TPhases extends PluginPhases = EmptyPhases> = { readonly runtime: PluginRuntime<TOwnership['open'], TOwnership['close']>; readonly [OwnershipSym]?: TOwnership; /** Unique identifier for this plugin within the app. */ readonly name: string; /** Runtime needs shape (local alias → witness). */ readonly needs: NeedsShape; readonly actions: readonly ActionSource[]; /** Mount-time renames: publish key → new wire key (see {@link rename}). */ readonly renames: Readonly<Record<string, string>>; /** * Where the app builder mounted this plugin in the hexagon: `feature` * (`.features()`) or `driving` (`.serve()`). Absent for `.use()` — a * driven adapter, or any plugin in an app that never calls `.features()`. */ readonly role?: DotPluginRole; /** * One typed handle per published wire key, known before boot. The kernel * checks ordering and rings at configure time from these keys, and * `dot explain` draws the edges without booting. `rename()` rebuilds * them on the new keys. */ readonly provides: Handles<TProvides, TOwner>; /** The `provides` factories, keyed by publish key (before renames). The kernel runs them in key order at boot. */ readonly factories: AnyFactories; /** * The logging slot. At most one plugin per app fills it. The kernel activates * it during boot, before provider construction, and closes it after owned * plugin cleanup. Configure never activates logging. */ readonly logging?: (ctx: DotLoggingContext) => DotLoggingHandle<undefined | TOwnership['close']> | TOwnership['open']; readonly hooks: PhaseHooks<never, { readonly [Phase in keyof PluginPhases]: undefined | TPhases[Phase]; }> & { readonly boot?: (ctx: never) => unknown; }; readonly [NeedsSym]?: TNeeds; readonly [ProvidesSym]?: TProvides; readonly [ProviderIdentitySym]?: TShape; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "PluginCloseFailure",
      "kind": "type",
      "signature": "export type PluginCloseFailure<P> = PluginPreparation<P>['close'] | SourceOwnership<P>['close'] | CallbackFailure<LoggingResult<P>, 'close'>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "PluginDiagnostic",
      "kind": "type",
      "signature": "export type PluginDiagnostic = { plugin: string; status: Extract<DiagnosticStatus, 'ok' | 'degraded' | 'failed' | 'skipped'>; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "PluginFactoryGuard",
      "kind": "type",
      "signature": "export type PluginFactoryGuard<P> = [FactoryContractError<P>] extends [never] ? [] : [error: FactoryContractError<P>];",
      "jsdocSummary": "Validate replaceable factories against the handles their original definitions minted."
    },
    {
      "subpath": "./plugin",
      "name": "PluginManifest",
      "kind": "type",
      "signature": "export type PluginManifest = { name: string; /** Hexagon role from the app builder — see `Plugin.role`. */ role?: DotPluginRole; dependencies: readonly string[]; provides: readonly string[]; };",
      "jsdocSummary": "Single plugin's declarative metadata."
    },
    {
      "subpath": "./plugin",
      "name": "PluginNeeds",
      "kind": "type",
      "signature": "export type PluginNeeds<P> = P extends AnyPlugin ? NonNullable<P[typeof NeedsSym]> : never;",
      "jsdocSummary": "Extract a plugin's (wire-keyed) needs record."
    },
    {
      "subpath": "./plugin",
      "name": "PluginOpenFailure",
      "kind": "type",
      "signature": "export type PluginOpenFailure<P> = PluginPreparation<P>['open'] | SourceOwnership<P>['open'] | Extract<LoggingResult<P>, Failure>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "PluginOwnership",
      "kind": "type",
      "signature": "export type PluginOwnership = { readonly open: Failure; readonly close: Failure; };",
      "jsdocSummary": "Exact failures owned by a plugin's construction and release callbacks."
    },
    {
      "subpath": "./plugin",
      "name": "PluginPhaseFailures",
      "kind": "type",
      "signature": "export type PluginPhaseFailures<P> = P extends { readonly hooks: infer Hooks; } ? { readonly [Phase in keyof PluginPhases]: PhaseFailure<Hooks, Phase>; } : EmptyPhases;",
      "jsdocSummary": "Infer each phase from the actual hooks, including spread replacements."
    },
    {
      "subpath": "./plugin",
      "name": "PluginPhases",
      "kind": "type",
      "signature": "export type PluginPhases = { readonly configure: Failure; readonly start: Failure; readonly stop: Failure; readonly dispose: Failure; };",
      "jsdocSummary": "Constraint for the four lifecycle failure channels; infer concrete channels from a plugin."
    },
    {
      "subpath": "./plugin",
      "name": "PluginPreparation",
      "kind": "type",
      "signature": "export type PluginPreparation<P> = P extends { readonly [OwnershipSym]?: infer Owned extends PluginOwnership; } ? Owned : EmptyOwnership;",
      "jsdocSummary": "Failures owned by the runtime's feature preparation, independent of replaceable callbacks."
    },
    {
      "subpath": "./plugin",
      "name": "PluginProvides",
      "kind": "type",
      "signature": "export type PluginProvides<P> = P extends AnyPlugin ? NonNullable<P[typeof ProvidesSym]> : never;",
      "jsdocSummary": "Extract a plugin's (wire-keyed) provides record."
    },
    {
      "subpath": "./plugin",
      "name": "PluginSourceGuard",
      "kind": "type",
      "signature": "export type PluginSourceGuard<P> = [FactoryContractError<P> | SourceBootError<P>] extends [never] ? [] : [error: FactoryContractError<P> | SourceBootError<P>];",
      "jsdocSummary": "Validate the live factories and boot callback before mounting a unit."
    },
    {
      "subpath": "./plugin",
      "name": "ProjectionDeclaration",
      "kind": "type",
      "signature": "export type ProjectionDeclaration = Omit<ProjectionManifest, 'plugin'>;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "ProjectionManifest",
      "kind": "type",
      "signature": "export type ProjectionManifest = { /** Document format key matched by `dot explain --as <format>`. */ format: string; /** Binding this projection primarily renders. Informational. */ binding: string; /** Import specifier for the projection module. */ module: string; /** Plugin that registered this projection. */ plugin: string; };",
      "jsdocSummary": "Registered projection renderer for an adapter-owned document format."
    },
    {
      "subpath": "./plugin",
      "name": "provide",
      "kind": "function",
      "signature": "export declare function provide<T, K extends string>(tok: Token<T, K>, value: T): Record<K, T>;",
      "jsdocSummary": "A record holding one value under a token's wire key, typed by the token's literal key: `provide(Db, handle)` is `{ 'arki.db': DbHandle }`."
    },
    {
      "subpath": "./plugin",
      "name": "Provided",
      "kind": "type",
      "signature": "export type Provided<H> = H extends Service<infer T> ? T : never;",
      "jsdocSummary": "The value type behind a handle — for the one alias an app names (`type Db = Provided<typeof database.provides.db>`)."
    },
    {
      "subpath": "./plugin",
      "name": "ProvidedValue",
      "kind": "type",
      "signature": "export type ProvidedValue<Value> = Value extends ResourceEntry | Failure ? Value extends ResourceEntry ? Value extends { readonly open: infer Open extends (...args: never[]) => unknown; } ? SuccessOf<Open> : never : never : Value;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "ProvidedValues",
      "kind": "type",
      "signature": "export type ProvidedValues<Values> = { [Name in keyof Values]: ProvidedValue<Awaited<Values[Name]>>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "ProvidesFactories",
      "kind": "type",
      "signature": "export type ProvidesFactories<TNeeds extends NeedsShape, TProvides extends ServiceRecord> = { readonly [K in keyof TProvides]: (services: CtxOf<TNeeds> & KernelCtx) => TProvides[K] & NoInfer<CheckedProvider<TProvides[K]>>; };",
      "jsdocSummary": "Infer raw factory returns once, including Promise wrappers. Explicit TProvides annotations describe those raw returns, not the resolved services. Services and ownership resolve promises through their shared projections."
    },
    {
      "subpath": "./plugin",
      "name": "rename",
      "kind": "function",
      "signature": "export declare function rename<P extends AnyPlugin, TOwnership extends PluginOwnership, const M extends { readonly [K in keyof PluginProvides<P>]?: string; }, const TNewName extends string = PluginOwner<P>>(p: P & { readonly runtime: PluginRuntime<TOwnership['open'], TOwnership['close']>; readonly [OwnershipSym]?: TOwnership; }, map: M, newName?: TNewName): Omit<Plugin<PluginNeeds<P>, RenamedProvides<PluginProvides<P>, M>, PluginProviderIdentities<P>, TNewName, TOwnership, PluginPhaseFailures<P>>, 'hooks' | 'logging' | 'factories'> & Pick<P, 'hooks' | 'logging' | 'factories'> & FactoryContractOf<P>;",
      "jsdocSummary": "Mount-time rename. `rename(dbPlugin, { db: 'reportsDb' }, 'reports-db')` publishes the same service under a different wire key, retyped accordingly — the way to mount a second instance of an adapter without a key collision. Renames compose: renaming an already-renamed key rewrites the earlier entry."
    },
    {
      "subpath": "./plugin",
      "name": "RenamedProvides",
      "kind": "type",
      "signature": "export type RenamedProvides<TP, M> = { [K in keyof TP as K extends keyof M ? (M[K] extends string ? M[K] : K) : K]: TP[K]; };",
      "jsdocSummary": "Rename a plugin's published wire keys — the multi-instance primitive."
    },
    {
      "subpath": "./plugin",
      "name": "renderTimeline",
      "kind": "function",
      "signature": "export declare function renderTimeline(snapshot: DotDiagnosticsSnapshot, opts?: RenderTimelineOptions): string;",
      "jsdocSummary": "Render the snapshot's lifecycle records as a per-phase waterfall. Pure — no IO. Caller is responsible for printing the result."
    },
    {
      "subpath": "./plugin",
      "name": "RenderTimelineOptions",
      "kind": "type",
      "signature": "export type RenderTimelineOptions = { /** Maximum bar width in characters (default `50`). */ readonly barWidth?: number; /** * When `true`, also emit any plugin's diagnostic `issues[]` underneath * the bar so failure reasons are visible in the timeline view. * Default `true`. */ readonly showIssues?: boolean; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "service",
      "kind": "variable",
      "signature": "export declare const service: (<T>() => Service<T>) & { readonly lazy: <T>() => LazyService<T>; };",
      "jsdocSummary": "Create an app-local (anonymous) service witness for a `needs` shape."
    },
    {
      "subpath": "./plugin",
      "name": "Service",
      "kind": "type",
      "signature": "export type Service<out T> = { readonly [TypeOf]?: T; };",
      "jsdocSummary": "Phantom type witness for a service. Carries `T` at the type level only — the runtime value is an empty object."
    },
    {
      "subpath": "./plugin",
      "name": "ServiceDiagnostic",
      "kind": "type",
      "signature": "export type ServiceDiagnostic = { service: string; plugin: string; status: Extract<DiagnosticStatus, 'ok' | 'degraded' | 'failed' | 'missing'>; issues: DiagnosticIssue[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "ServiceKind",
      "kind": "type",
      "signature": "export type ServiceKind = 'env' | 'db' | 'kv' | 'queue' | 'auth' | 'email' | 'logger' | 'event-store' | 'message-bus' | 'custom';",
      "jsdocSummary": "Kind of service that a plugin can publish."
    },
    {
      "subpath": "./plugin",
      "name": "ServiceManifest",
      "kind": "type",
      "signature": "export type ServiceManifest = { name: string; plugin: string; kind: ServiceKind; };",
      "jsdocSummary": "Single service published by a plugin."
    },
    {
      "subpath": "./plugin",
      "name": "ServiceRecord",
      "kind": "type",
      "signature": "export type ServiceRecord = Record<string, unknown>;",
      "jsdocSummary": "Record of wire-keyed services."
    },
    {
      "subpath": "./plugin",
      "name": "telemetryFor",
      "kind": "function",
      "signature": "export declare function telemetryFor(owner: { readonly name: string; } | { readonly $plugin: string; }): { /** Observe a custom operation, retaining its exact return value, promise and failure identity. */ span<Value>(name: string, run: () => Value, options?: SpanOptions): Value; /** Annotate the active operation without adding a span. Explicit attributes only. */ event(name: string, attributes?: Attributes): void; /** Create a counter. Keep explicit dimensions bounded; do not include user IDs or payloads. */ counter(name: string, options?: MetricOptions): { add(value: number, attributes?: Attributes): void; }; /** Create a histogram with the same identity and context as this scope. */ histogram(name: string, options?: MetricOptions): { record(value: number, attributes?: Attributes): void; }; /** Write through the app's logging setup with the active trace stamped on the record. */ log(level: LevelInput, template: string, fields?: Fields): void; };",
      "jsdocSummary": "Scope custom instrumentation from an existing plugin, feature or hook context. App-owned OTel providers supply tracing; without an SDK every call is safe. Use a new span only for a new operational boundary, not one already instrumented."
    },
    {
      "subpath": "./plugin",
      "name": "testApp",
      "kind": "function",
      "signature": "export declare function testApp<const TPlugins extends readonly AnyPlugin[] = readonly []>(plugins?: TPlugins & TestAppGuard<TPlugins>, options?: TestAppOptions): import(\"./define-app.js\").DotAppBuilder<TestAppServices<TPlugins>, PluginOpenFailure<TPlugins[number]>, PluginCloseFailure<TPlugins[number]>, PluginPhaseFailures<TPlugins[number]>>;",
      "jsdocSummary": "Build a DOT app builder pre-populated with the given plugins, ready to `.configure()`, `.boot()` or `.start()` from a test. The services are read off the plugins — `testApp([database]).boot()` gives `app.services.db` — and a tuple that would not mount (a need before its provider, a wire key provided twice) is a compile error on the argument."
    },
    {
      "subpath": "./plugin",
      "name": "TestAppOptions",
      "kind": "type",
      "signature": "export type TestAppOptions = { /** App name used in the manifest. Defaults to `'test-app'`. */ name?: string; /** Runtime config bag exposed to hooks as `$config`. */ config?: Readonly<Record<string, unknown>>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "toJsonObject",
      "kind": "function",
      "signature": "export declare function toJsonObject(value: unknown): JsonObject;",
      "jsdocSummary": "Validate and narrow unknown adapter data into manifest JSON metadata."
    },
    {
      "subpath": "./plugin",
      "name": "token",
      "kind": "function",
      "signature": "export declare function token<T>(): <K extends string>(key: K) => Token<T, K>;",
      "jsdocSummary": "Create a token. Curried so `T` is explicit while `K` is inferred as a literal: `const Db = token<DbHandle>()('arki.db')`."
    },
    {
      "subpath": "./plugin",
      "name": "Token",
      "kind": "type",
      "signature": "export type Token<T, K extends string = string> = Service<T> & { readonly key: K; /** Derive a token for an additional instance of the same contract. */ instance<N extends string>(name: N): Token<T, `${K}#${N}`>; };",
      "jsdocSummary": "Shared, named witness — a cross-package service contract. The `key` is the wire name used for satisfaction checks and runtime lookup; the local property name in a `needs` shape becomes a free-choice alias."
    },
    {
      "subpath": "./plugin",
      "name": "UseAllAvail",
      "kind": "type",
      "signature": "export type UseAllAvail<TAvail extends ServiceRecord, TPlugins extends readonly AnyPlugin[]> = UseAllState<TAvail, TPlugins>['avail'];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "UseAllGuard",
      "kind": "type",
      "signature": "export type UseAllGuard<TAvail extends ServiceRecord, TPlugins extends readonly AnyPlugin[]> = [ UseAllState<TAvail, TPlugins>['error'] ] extends [never] ? UseAllTupleGuard<TPlugins> : [error: UseAllState<TAvail, TPlugins>['error']];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./plugin",
      "name": "UseGuard",
      "kind": "type",
      "signature": "export type UseGuard<TAvail extends ServiceRecord, TNeeds extends ServiceRecord, TProvides extends ServiceRecord, TPlugin = EmptyShape> = PluginSourceGuard<TPlugin> extends [] ? string extends keyof TAvail ? [] : [TAvail] extends [TNeeds] ? [keyof TAvail & keyof TProvides] extends [never] ? [] : [error: CollisionError<TAvail, TProvides>] : [error: NeedsError<TAvail, TNeeds>] : PluginSourceGuard<TPlugin>;",
      "jsdocSummary": "One unit's wiring check. Satisfied → `[]`; violated → `[error]` with the diagnostic as the error type. `ListGuard` turns it into a type on the argument itself, so the call site fails on the plugin with the `DOT:` label in the message (not with \"Expected 2 arguments, but got 1\"). The open record (`DotAppBuilder<ServiceRecord>`, the erased builder a runtime-built plugin list gives) has nothing to check: the kernel checks it at boot."
    },
    {
      "subpath": "./plugin",
      "name": "WireNeeds",
      "kind": "type",
      "signature": "export type WireNeeds<S extends NeedsShape> = { [K in keyof S as S[K] extends { readonly key: infer WK extends string; } ? WK : K]: S[K] extends Service<infer T> ? T : never; };",
      "jsdocSummary": "Wire-key view of a needs shape — what the app builder checks satisfaction against. Tokens contribute their owned key; anonymous witnesses contribute the property name. `{ cache: Token<KV, 'arki.kv'> }` → `{ 'arki.kv': KV }`."
    },
    {
      "subpath": "./runtime",
      "name": "createAppRuntime",
      "kind": "function",
      "signature": "export declare function createAppRuntime<S extends ServiceRecord, Open extends Failure = never, Close extends Failure = never, Phases extends PluginPhases = EmptyPhases>(app: DotAppLifecycle<S, Open, Close, Phases>, options?: { readonly hot?: { readonly data: Record<string, unknown>; dispose(callback: (data: Record<string, unknown>) => void): void; } | undefined; readonly onStarted?: ((app: DotApp<S, Close, Open, Phases>) => void) | undefined; }): { get(): Promise<DotApp<S, Close, Open, Phases> | Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"dot.runtime_release_failed\", undefined> | Failure<\"dot.runtime_replaced\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<Phases[\"configure\"], void> | Exclude<Phases[\"start\"], void> | Exclude<Exclude<Close, void>, void> | Exclude<Exclude<Open, void>, void> | import(\"@arki/async\").ScopeAggregate<Failure<\"failure.unexpected_defect\", undefined>, Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | import(\"@arki/async\").ScopeAggregate<never, Phases[\"stop\"] | (Phases[\"dispose\"] | (Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<Close, void> | import(\"@arki/async\").ScopeAggregate<Close | import(\"@arki/async\").SupervisorFailure, Close | import(\"@arki/async\").SupervisorFailure>))> | import(\"@arki/async\").ScopeAggregate<Close | import(\"@arki/async\").SupervisorFailure, Close | import(\"@arki/async\").SupervisorFailure>> | import(\"@arki/async\").ScopeAggregate<Phases[\"start\"] | import(\"@arki/async\").SupervisorFailure, Phases[\"stop\"] | (Phases[\"dispose\"] | (Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<Close, void> | import(\"@arki/async\").ScopeAggregate<Close | import(\"@arki/async\").SupervisorFailure, Close | import(\"@arki/async\").SupervisorFailure>))> | import(\"@arki/async\").ScopeAggregate<Close | Open | import(\"@arki/async\").SupervisorFailure, Close | import(\"@arki/async\").SupervisorFailure> | import(\"@arki/async\").ScopeAggregate<Exclude<Close, void> | Exclude<Open, void> | import(\"@arki/async\").SupervisorFailure | import(\"@arki/async\").ScopeAggregate<Close | Open | import(\"@arki/async\").SupervisorFailure, Close | import(\"@arki/async\").SupervisorFailure>, Phases[\"dispose\"] | (Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<Close, void> | import(\"@arki/async\").ScopeAggregate<Close | import(\"@arki/async\").SupervisorFailure, Close | import(\"@arki/async\").SupervisorFailure>)>>; };",
      "jsdocSummary": "Start one Dot app per module instance and wait for prior HMR disposal. Resolved start failures are never cached as ready. A failed release prevents another owner from starting. Replaced modules return RuntimeReplaced."
    },
    {
      "subpath": "./runtime",
      "name": "RuntimeReleaseFailed",
      "kind": "variable",
      "signature": "export declare const RuntimeReleaseFailed: import(\"@arki/failure\").FailureDefinition<\"dot.runtime_release_failed\", undefined>;",
      "jsdocSummary": "Previous ownership could not be released, so starting another app is unsafe."
    },
    {
      "subpath": "./runtime",
      "name": "RuntimeReplaced",
      "kind": "variable",
      "signature": "export declare const RuntimeReplaced: import(\"@arki/failure\").FailureDefinition<\"dot.runtime_replaced\", undefined>;",
      "jsdocSummary": "A replaced module no longer owns the application's runtime."
    },
    {
      "subpath": "./telemetry",
      "name": "DotTelemetry",
      "kind": "type",
      "signature": "export type DotTelemetry = ReturnType<typeof telemetryFor>;",
      "jsdocSummary": "The inferred custom instrumentation surface, shared by all plugin and feature contexts."
    },
    {
      "subpath": "./telemetry",
      "name": "telemetryFor",
      "kind": "function",
      "signature": "export declare function telemetryFor(owner: { readonly name: string; } | { readonly $plugin: string; }): { /** Observe a custom operation, retaining its exact return value, promise and failure identity. */ span<Value>(name: string, run: () => Value, options?: SpanOptions): Value; /** Annotate the active operation without adding a span. Explicit attributes only. */ event(name: string, attributes?: Attributes): void; /** Create a counter. Keep explicit dimensions bounded; do not include user IDs or payloads. */ counter(name: string, options?: MetricOptions): { add(value: number, attributes?: Attributes): void; }; /** Create a histogram with the same identity and context as this scope. */ histogram(name: string, options?: MetricOptions): { record(value: number, attributes?: Attributes): void; }; /** Write through the app's logging setup with the active trace stamped on the record. */ log(level: LevelInput, template: string, fields?: Fields): void; };",
      "jsdocSummary": "Scope custom instrumentation from an existing plugin, feature or hook context. App-owned OTel providers supply tracing; without an SDK every call is safe. Use a new span only for a new operational boundary, not one already instrumented."
    },
    {
      "subpath": "./test-harness",
      "name": "bootTestApp",
      "kind": "function",
      "signature": "export declare function bootTestApp<const TPlugins extends readonly AnyPlugin[] = readonly []>(plugins?: TPlugins & TestAppGuard<TPlugins>, options?: TestAppOptions): Promise<import(\"./define-app.js\").DotApp<TestAppServices<TPlugins>, PluginCloseFailure<TPlugins[number]>, PluginOpenFailure<TPlugins[number]>, PluginPhaseFailures<TPlugins[number]>> | Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<PluginPhaseFailures<TPlugins[number]>[\"configure\"], void> | Exclude<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void>, void> | Exclude<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"open\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"open\"], void>, void> | Exclude<Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void>, void> | Exclude<Exclude<Extract<TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never, Failure>, void>, void> | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | PluginOpenFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure> | import(\"@arki/async\").ScopeAggregate<Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void> | Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"open\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"open\"], void> | Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void> | Exclude<Extract<TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never, Failure>, void> | import(\"@arki/async\").SupervisorFailure | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | PluginOpenFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure>, PluginPhaseFailures<TPlugins[number]>[\"dispose\"] | (Failure<\"async.cancelled\", undefined> | Failure<\"async.deadline\", undefined> | Failure<\"failure.unexpected_defect\", undefined> | Exclude<import(\"./plugin-contract.js\").PluginPreparation<TPlugins[number]>[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_3 ? T_3 extends TPlugins[number] ? T_3 extends { readonly factories: infer Factories; readonly hooks: infer Hooks; } ? InferredOwnership<{ [Key in keyof Factories]: Factories[Key] extends infer T_4 ? T_4 extends Factories[Key] ? T_4 extends (...args: never[]) => infer Value ? Value : never : never : never; }, Hooks extends { readonly boot?: (...args: never[]) => infer Boot; } ? Awaited<Boot> : never> : import(\"./plugin-contract.js\").EmptyOwnership : never : never)[\"close\"], void> | Exclude<(TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) extends infer T_5 ? T_5 extends (TPlugins[number] extends infer T_4 ? T_4 extends TPlugins[number] ? T_4 extends { readonly logging?: (...args: never[]) => infer Result; } ? Result : never : never : never) ? T_5 extends Record<\"close\", infer Callback extends (...args: never[]) => unknown> ? Extract<Awaited<ReturnType<Callback>>, Failure<string, unknown>> : never : never : never, void> | import(\"@arki/async\").ScopeAggregate<PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure, PluginCloseFailure<TPlugins[number]> | import(\"@arki/async\").SupervisorFailure>)>>;",
      "jsdocSummary": "Build and boot an app, returning declared ownership failures to its caller."
    },
    {
      "subpath": "./test-harness",
      "name": "fake",
      "kind": "function",
      "signature": "export declare function fake<T, K extends string, Value extends NoInfer<T>>(handle: Handle<T, K>, value: Value): Omit<Plugin<EmptyShape, ProvidedValues<Readonly<Record<K, Value>>>, EmptyShape, string, InferredOwnership<Readonly<Record<K, Value>>, void>>, \"hooks\"> & { readonly hooks: EmptyShape; };",
      "jsdocSummary": "A plugin that provides one fake under a real handle's wire key — for app-level tests that mount the real features against fakes:"
    },
    {
      "subpath": "./test-harness",
      "name": "testApp",
      "kind": "function",
      "signature": "export declare function testApp<const TPlugins extends readonly AnyPlugin[] = readonly []>(plugins?: TPlugins & TestAppGuard<TPlugins>, options?: TestAppOptions): import(\"./define-app.js\").DotAppBuilder<TestAppServices<TPlugins>, PluginOpenFailure<TPlugins[number]>, PluginCloseFailure<TPlugins[number]>, PluginPhaseFailures<TPlugins[number]>>;",
      "jsdocSummary": "Build a DOT app builder pre-populated with the given plugins, ready to `.configure()`, `.boot()` or `.start()` from a test. The services are read off the plugins — `testApp([database]).boot()` gives `app.services.db` — and a tuple that would not mount (a need before its provider, a wire key provided twice) is a compile error on the argument."
    },
    {
      "subpath": "./test-harness",
      "name": "TestAppOptions",
      "kind": "type",
      "signature": "export type TestAppOptions = { /** App name used in the manifest. Defaults to `'test-app'`. */ name?: string; /** Runtime config bag exposed to hooks as `$config`. */ config?: Readonly<Record<string, unknown>>; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./test-harness",
      "name": "TestAppServices",
      "kind": "type",
      "signature": "export type TestAppServices<TPlugins extends readonly AnyPlugin[]> = number extends TPlugins['length'] ? ServiceRecord : UseAllAvail<EmptyShape, TPlugins>;",
      "jsdocSummary": "What `testApp(plugins)` exposes as `app.services`: the services the tuple accumulates, as `.useAll()` would type them. A runtime-built array (`feature.plugins()`) has no tuple to read, so it gets the open record."
    },
    {
      "subpath": "./test-harness",
      "name": "testPlugin",
      "kind": "function",
      "signature": "export declare function testPlugin<const P extends AnyPlugin>(plugin: P & ListGuard<PluginSourceGuard<P>>, options?: TestAppOptions): TestPluginBuilder<PluginNeeds<P>, PluginProvides<P>, PluginOpenFailure<P>, PluginCloseFailure<P>, EmptyShape, PluginPhaseFailures<P>>;",
      "jsdocSummary": "Unit-test a single plugin with **typed overrides** — the compile-checked counterpart to {@link testApp}'s erased arrays."
    },
    {
      "subpath": "./test-harness",
      "name": "TestPluginBuilder",
      "kind": "type",
      "signature": "export type TestPluginBuilder<TRemaining extends ServiceRecord, TServices extends ServiceRecord, TOpen extends Failure = never, TClose extends Failure = never, TFakes extends ServiceRecord = EmptyShape, TPhases extends PluginPhases = EmptyPhases> = { /** * Satisfy one need directly with a fake. Token form — the token names * the wire key and carries the type: * * ```ts * testPlugin(reports).provide(Db, fakeDb) * ``` */ provide<K extends keyof TRemaining & string, T extends TRemaining[K]>(token: Token<T, K>, value: T): TestPluginBuilder<Omit<TRemaining, K>, TServices & Readonly<Record<K, T>>, TOpen, TClose, TFakes & Readonly<Record<K, T>>, TPhases>; /** * Satisfy one need directly with a fake. Key form — for anonymous * `service<T>()` needs, where the wire key is the property name: * * ```ts * testPlugin(billing).provide('db', fakeDb) * ``` */ provide<K extends keyof TRemaining & string, T extends TRemaining[K]>(key: K, value: T): TestPluginBuilder<Omit<TRemaining, K>, TServices & Readonly<Record<K, T>>, TOpen, TClose, TFakes & Readonly<Record<K, T>>, TPhases>; /** Boot the plugin against the provided fakes. Compile error until every need is provided. */ boot(this: BootReady<TRemaining, TestPluginBuilder<TRemaining, TServices, TOpen, TClose, TFakes, TPhases>>): ReturnType<TestPluginLifecycle<TServices, TOpen, TClose, TFakes, TPhases>['boot']>; /** Boot + start. Same guard as {@link TestPluginBuilder.boot}. */ start(this: BootReady<TRemaining, TestPluginBuilder<TRemaining, TServices, TOpen, TClose, TFakes, TPhases>>): ReturnType<TestPluginLifecycle<TServices, TOpen, TClose, TFakes, TPhases>['start']>; };",
      "jsdocSummary": ""
    }
  ],
  "errorCodes": [
    "ARKI_DOT_E001",
    "ARKI_DOT_E002",
    "ARKI_DOT_E003",
    "ARKI_DOT_E004",
    "ARKI_DOT_E005",
    "ARKI_DOT_E006",
    "ARKI_DOT_E007",
    "ARKI_DOT_E008",
    "ARKI_DOT_E011",
    "ARKI_DOT_E012",
    "ARKI_DOT_E013",
    "ARKI_DOT_E014",
    "ARKI_DOT_E015",
    "ARKI_DOT_E016",
    "ARKI_DOT_E017",
    "ARKI_DOT_E018",
    "ARKI_DOT_E019",
    "ARKI_DOT_E020",
    "ARKI_DOT_E021",
    "ARKI_DOT_E022",
    "ARKI_DOT_E023",
    "ARKI_DOT_E024",
    "ARKI_DOT_E025",
    "ARKI_DOT_E026",
    "ARKI_DOT_E027",
    "ARKI_DOT_E028",
    "ARKI_DOT_E029",
    "ARKI_DOT_E030",
    "ARKI_DOT_E031",
    "DOT_LOG_E001",
    "dot.action_approval_required",
    "dot.action_not_exposed",
    "dot.action_principal_required",
    "dot.app_import_failed",
    "dot.app_invalid_export",
    "dot.app_lifecycle_failed",
    "dot.app_not_found",
    "dot.dev_already_running",
    "dot.dev_app_started",
    "dot.dev_db_unreachable",
    "dot.dev_port_in_use",
    "dot.dev_preflight_failed",
    "dot.dev_remote_db_refused",
    "dot.dev_runner_failed",
    "dot.doctor_failed",
    "dot.lazy_closed",
    "dot.observability_no_sdk",
    "dot.preflight_failed",
    "dot.projection_conflict",
    "dot.projection_execution_failed",
    "dot.projection_import_failed",
    "dot.projection_not_found",
    "dot.runtime_release_failed",
    "dot.runtime_replaced",
    "dot.target_not_empty",
    "dot.template_missing",
    "dot.write_failed"
  ]
}
