- LOT C2 (§14.5.3) : use cases de configuration des embedders déclaratifs (List/Save/Delete + DescribeEmbedderEngines : modèles ONNX recommandés, environnement local détecté, stratégies compilées). UI EmbedderSettings. - LOT C3 (§14.5.5) : suggestion contextuelle best-effort à l'activation quand la mémoire dépasse le budget de recall sans embedder configuré (event EmbedderSuggested, anti-spam 1×/session, « ne plus demander »). - Contexte projet partagé .ideai/CONTEXT.md (model-agnostic) injecté à tous les agents/profils au lancement, avant la persona. UI ProjectContextPanel. Tests : backend workspace vert (0 échec) ; frontend 306/306. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
72 lines
2.2 KiB
TypeScript
72 lines
2.2 KiB
TypeScript
/**
|
||
* Real Tauri adapters wiring the UI ports to the backend via `@tauri-apps/api`.
|
||
*
|
||
* Only {@link TauriSystemGateway} is fully wired in L1 (to the `health`
|
||
* command). The remaining gateways are skeletons that throw `NOT_IMPLEMENTED`
|
||
* until their lots (L2–L9) land — they exist so the DI surface is complete and
|
||
* the app can run real-mode without the mock substituting everything.
|
||
*/
|
||
|
||
import type { GatewayError } from "@/domain";
|
||
import type {
|
||
Gateways,
|
||
RemoteGateway,
|
||
} from "@/ports";
|
||
import { TauriSystemGateway } from "./system";
|
||
import { TauriAgentGateway } from "./agent";
|
||
import { TauriProjectGateway } from "./project";
|
||
import { TauriTerminalGateway } from "./terminal";
|
||
import { TauriLayoutGateway } from "./layout";
|
||
import { TauriProfileGateway } from "./profile";
|
||
import { TauriTemplateGateway } from "./template";
|
||
import { TauriSkillGateway } from "./skill";
|
||
import { TauriMemoryGateway } from "./memory";
|
||
import { TauriEmbedderGateway } from "./embedder";
|
||
import { TauriGitGateway } from "./git";
|
||
|
||
function notImplemented(what: string): never {
|
||
const err: GatewayError = {
|
||
code: "NOT_IMPLEMENTED",
|
||
message: `${what} is not implemented yet (pending its lot).`,
|
||
};
|
||
throw err;
|
||
}
|
||
|
||
class TauriRemoteGateway implements RemoteGateway {
|
||
connect(): Promise<void> {
|
||
return notImplemented("RemoteGateway.connect");
|
||
}
|
||
}
|
||
|
||
/** Builds the full set of real Tauri-backed gateways. */
|
||
export function createTauriGateways(): Gateways {
|
||
return {
|
||
system: new TauriSystemGateway(),
|
||
agent: new TauriAgentGateway(),
|
||
terminal: new TauriTerminalGateway(),
|
||
project: new TauriProjectGateway(),
|
||
layout: new TauriLayoutGateway(),
|
||
git: new TauriGitGateway(),
|
||
remote: new TauriRemoteGateway(),
|
||
profile: new TauriProfileGateway(),
|
||
template: new TauriTemplateGateway(),
|
||
skill: new TauriSkillGateway(),
|
||
memory: new TauriMemoryGateway(),
|
||
embedder: new TauriEmbedderGateway(),
|
||
};
|
||
}
|
||
|
||
export {
|
||
TauriSystemGateway,
|
||
TauriAgentGateway,
|
||
TauriProjectGateway,
|
||
TauriTerminalGateway,
|
||
TauriLayoutGateway,
|
||
TauriProfileGateway,
|
||
TauriTemplateGateway,
|
||
TauriSkillGateway,
|
||
TauriMemoryGateway,
|
||
TauriEmbedderGateway,
|
||
TauriGitGateway,
|
||
};
|