feat: add main features
Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
This commit is contained in:
62
frontend/src/adapters/index.ts
Normal file
62
frontend/src/adapters/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 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 { 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(),
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
TauriSystemGateway,
|
||||
TauriAgentGateway,
|
||||
TauriProjectGateway,
|
||||
TauriTerminalGateway,
|
||||
TauriLayoutGateway,
|
||||
TauriProfileGateway,
|
||||
TauriTemplateGateway,
|
||||
TauriGitGateway,
|
||||
};
|
||||
Reference in New Issue
Block a user