* origin/main: (675 commits) fix(web): tolerate servers that predate git identity in project import (#10547) chore(mobile): bump app version to 1.1.0 fix(mobile): wait for native thread scroll before reveal (#10486) fix(mobile): match Working status color to desktop fix(web): remove inserted citations on cancel (#10518) feat(web): group onboarding project import by repository (#10493) fix(mobile): preserve chat rows when toggling commands (#10492) fix(mobile): restore assistant message bottom padding (#10491) fix(mobile): animate thread lifecycle transitions consistently (#10487) fix(mobile): release initial scroll target after dragging (#10483) fix(mobile): smooth composer status pill resizing (#10484) fix(mobile): prevent chat from disappearing when scrolling (#10479) fix(web): resize the floating preview from any edge (#10467) fix(web): keep composer toolbar controls anchored during transitions (#10478) fix(mobile): improve font-size slider performance and prevent maximum update depth errors (#7138) feat(mobile): start a new thread on an existing branch (#10359) fix(ios): scroll short source files from blank space (#10178) fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback (#9828) fix(projects): prevent invalid script IDs from crashing threads (#10019) fix(devcontainer): make repository setup work (#7875) ... # Conflicts: # apps/server/src/provider/builtInDrivers.ts # docs/README.md # docs/user/install.md # packages/contracts/src/settings.test.ts # packages/contracts/src/settings.ts
60 lines
2.3 KiB
TypeScript
60 lines
2.3 KiB
TypeScript
/**
|
|
* BUILT_IN_DRIVERS — the static set of `ProviderDriver`s this build ships
|
|
* with.
|
|
*
|
|
* Every driver that the server knows how to instantiate from settings is
|
|
* listed here. The `ProviderInstanceRegistry` iterates this array when
|
|
* resolving `providerInstances` entries; anything not in the array surfaces
|
|
* as an `"unavailable"` shadow snapshot at runtime (see
|
|
* `buildUnavailableProviderSnapshot`).
|
|
*
|
|
* Adding a new first-party driver means:
|
|
* 1. implement `ProviderDriver` in a sibling `Drivers/<Name>Driver.ts`,
|
|
* 2. add it to this array,
|
|
* 3. ensure the runtime layer satisfies its declared `R`.
|
|
*
|
|
* The aggregated `BuiltInDriversEnv` type is the union of every driver's
|
|
* env requirement — the registry layer's `R` is this type, and the runtime
|
|
* layer (ChildProcessSpawner, FileSystem, Path, ServerConfig,
|
|
* OpenCodeRuntime, …) must satisfy it.
|
|
*
|
|
* @module provider/builtInDrivers
|
|
*/
|
|
import { ClaudeDriver, type ClaudeDriverEnv } from "./Drivers/ClaudeDriver.ts";
|
|
import { CodexDriver, type CodexDriverEnv } from "./Drivers/CodexDriver.ts";
|
|
import { CursorDriver, type CursorDriverEnv } from "./Drivers/CursorDriver.ts";
|
|
import { GrokDriver, type GrokDriverEnv } from "./Drivers/GrokDriver.ts";
|
|
import { HermesDriver, type HermesDriverEnv } from "./Drivers/HermesDriver.ts";
|
|
import { OpenCodeDriver, type OpenCodeDriverEnv } from "./Drivers/OpenCodeDriver.ts";
|
|
import { AntigravityDriver, type AntigravityDriverEnv } from "./Drivers/AntigravityDriver.ts";
|
|
import type { AnyProviderDriver } from "./ProviderDriver.ts";
|
|
|
|
/**
|
|
* Union of infrastructure services required to construct any built-in
|
|
* driver. The registry layer declares `R = BuiltInDriversEnv`; the runtime
|
|
* layer must provide every service in this union.
|
|
*/
|
|
export type BuiltInDriversEnv =
|
|
| ClaudeDriverEnv
|
|
| CodexDriverEnv
|
|
| CursorDriverEnv
|
|
| GrokDriverEnv
|
|
| HermesDriverEnv
|
|
| OpenCodeDriverEnv
|
|
| AntigravityDriverEnv;
|
|
|
|
/**
|
|
* Ordered list of built-in drivers. Order matters only for tie-breaking in
|
|
* UI presentation — the registry itself is keyed by `driverKind`, so
|
|
* iteration order has no functional effect on instance lookup.
|
|
*/
|
|
export const BUILT_IN_DRIVERS: ReadonlyArray<AnyProviderDriver<BuiltInDriversEnv>> = [
|
|
CodexDriver,
|
|
ClaudeDriver,
|
|
CursorDriver,
|
|
GrokDriver,
|
|
HermesDriver,
|
|
OpenCodeDriver,
|
|
AntigravityDriver,
|
|
];
|