Owner ruling 2026-10-04: the module is a sunk cost, retrievable from history if ever revisited. Removed: core practice contracts + pipeline helpers, the PracticeStore port + adapter + data dir path, server service + API routes (sets, clusters picker, practice aborts), the practice pages + dialog/exam/list UI, chain-table's Generate handoff, sidebar nav, activity-dock practice rows, and the partitioner/ problemGenerator/grader model roles (BACKGROUND_MODEL_ROLES 8 → 5). Survivors, moved to core/chains.ts (pure + browser-safe): ReasoningChain, chainsForSelection, formatChainLine — the chain table and graph emission still consume them.
35 lines
1.4 KiB
TypeScript
35 lines
1.4 KiB
TypeScript
/**
|
|
* THE COMPOSITION ROOT for storage — the single place concrete store
|
|
* adapters are wired. Everything else (core, services, agents) codes against
|
|
* the port types in core/ports.ts and receives instances through this
|
|
* module. Swapping the fs adapter for SQLite later changes exactly this
|
|
* file (and the adapter implementations in src/store/).
|
|
*/
|
|
|
|
import { chatStore } from "../store/chats.ts";
|
|
import { graphStore } from "../store/graph.ts";
|
|
import { jobStore } from "../store/jobs.ts";
|
|
import { settingsStore } from "../store/settings.ts";
|
|
import { resolveSettings, type EffectiveSettings } from "../core/settings-resolution.ts";
|
|
/** The wired adapters. Satisfies core/graph.ts's GraphDeps structurally. */
|
|
export const stores = {
|
|
chatStore,
|
|
graphStore,
|
|
jobStore,
|
|
settingsStore,
|
|
};
|
|
|
|
export type Stores = typeof stores;
|
|
|
|
/**
|
|
* The resolved view of the settings record (core/settings-resolution.ts):
|
|
* every knob concrete over its factory default — EXCEPT MODELS (BYOK all
|
|
* the way down, owner 2026-09-22): no factory pins exist, so unset model
|
|
* slots resolve to null and per-need refusal gates fire downstream. Read
|
|
* fresh on every call — the record is a small file and turns are rare, so
|
|
* no caching layer (stale toggles after a settings PUT would be worse).
|
|
*/
|
|
export function effectiveSettings(): EffectiveSettings {
|
|
return resolveSettings(settingsStore.readSettings());
|
|
}
|