Interface: ExtensionCoordinatorOptions
Makaio Framework / kernel/extension / ExtensionCoordinatorOptions
Interface: ExtensionCoordinatorOptions
Section titled “Interface: ExtensionCoordinatorOptions”Defined in: ../../../packages/kernel/src/extension/types.ts:27
Options for constructing an ExtensionCoordinator.
Properties
Section titled “Properties”capabilities?
Section titled “capabilities?”
optionalcapabilities?:ReadonlySet<string>
Defined in: ../../../packages/kernel/src/extension/types.ts:60
Host-provided environment capability tokens.
Packages whose MakaioExtension.requires entries are not all present in this set are excluded during ExtensionCoordinator.load. Omit the set only in tests that intentionally bypass environment gating.
optionaldb?:unknown
Defined in: ../../../packages/kernel/src/extension/types.ts:39
Optional database instance for storage handler registration (opaque — cast to MakaioDatabase at call site).
extensionContextBase?
Section titled “extensionContextBase?”
optionalextensionContextBase?:Omit<NodeExtensionContext,"config"|"identity"|"bus"|"signal"|"getService"|"dataDir"|"hasExtension">
Defined in: ../../../packages/kernel/src/extension/types.ts:49
Node host fields for the context supplied to extension factories.
Required when any loaded extension declares a create factory. When absent,
extensions with create will fail to start.
Omit config, signal, and hasExtension — those are coordinator-owned
and assembled per extension at context-build time.
launcherCommand?
Section titled “launcherCommand?”
optionallauncherCommand?:string
Defined in: ../../../packages/kernel/src/extension/types.ts:37
Host launcher command embedded into client wiring installed from warning actions.
Defaults to 'makaio' for framework-only hosts. Hosts pass their
own launcher policy through this seam so the runtime does not infer it
from process entrypoints.
loadConfig?
Section titled “loadConfig?”
optionalloadConfig?: (name) =>Record<string,unknown> |undefined
Defined in: ../../../packages/kernel/src/extension/types.ts:75
Optional callback to retrieve stored configuration for a package during
startAll and enablePackage. Returns undefined when no stored config exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Record<string, unknown> | undefined
loadEnabled?
Section titled “loadEnabled?”
optionalloadEnabled?: (name) =>boolean|undefined
Defined in: ../../../packages/kernel/src/extension/types.ts:70
Optional callback to retrieve persisted enabled state during startAll.
Returns false to skip a package at boot, true or undefined to start normally.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean | undefined
persistEnabled?
Section titled “persistEnabled?”
optionalpersistEnabled?: (name,enabled) =>Promise<void>
Defined in: ../../../packages/kernel/src/extension/types.ts:65
Optional callback to persist enabled/disabled state after a setEnabled call. The composition root supplies this to bridge into PreferencesSubjects or another durable store.
Parameters
Section titled “Parameters”string
enabled
Section titled “enabled”boolean
Returns
Section titled “Returns”Promise<void>
runMigrations?
Section titled “runMigrations?”
optionalrunMigrations?: (sources) =>Promise<void>
Defined in: ../../../packages/kernel/src/extension/types.ts:100
Optional callback invoked by ExtensionCoordinator.startAll to run database migrations declared by loaded packages before any services start.
The coordinator collects all packages whose StorageManifest.migrations
field is set and passes them as an array of
{ name, migrationsPath, migrationSourceId } objects to this callback in topological
(dependency) order. The callback is responsible for applying pending
migrations — typically via Drizzle migrate() or the bundled
applyMigrations() helper — using a tracking table keyed to the migration
bundle identity so packages that share one folder share one ledger.
When absent, declared migrations are silently skipped and storage tables that depend on them will not be created at runtime.
The migrationsPath values are absolute discovery paths resolved by the
coordinator from each package’s StorageManifest.migrations field
plus executable storage.packageRoot metadata when needed.
migrationSourceId is the stable runtime identity used for bundled hosts;
when a package does not declare one, it falls back to migrationsPath.
Parameters
Section titled “Parameters”sources
Section titled “sources”readonly object[]
Migration sources in dependency order, each carrying the package name, absolute migration folder path, and stable source id.
Returns
Section titled “Returns”Promise<void>
A promise that resolves when all migrations have been applied.
surface?
Section titled “surface?”
optionalsurface?:ExtensionRuntimeSurface
Defined in: ../../../packages/kernel/src/extension/types.ts:29
Hosted surface category used to apply package gating. Defaults to 'headless'.