Files
IdeA/frontend/src/adapters/index.ts
Blomios 7007b2cc7e feat(backend,frontend): tâches planifiées projet — tool MCP idea_scheduled_task_* et menu utilisateur #305, fix transcript lié indisponible après reboot #314 (QA verte)
#305: nouvel agrégat durable ScheduledProjectTask dans domain (scheduled_task.rs, ids, ports ScheduledProjectTaskStore), source de vérité <app_data_dir>/scheduled-project-tasks/<projectId>.json, schedules bornés V1 interval/daily/weekly avec fuseau, cycle À approuver/Active/Suspendue avec approbation obligatoire des tâches demandées par agent; use cases application/scheduled_task (list/create/update/delete/run_now/reconcile/fire) réutilisant BackgroundTask pour les runs avec distinction planifié/manuel; store infrastructure dédié + scheduler reconcile au boot sans rattrapage en rafale, cwd confiné au projet; 7 tools MCP idea_scheduled_task_* (list/read lecture seule, create/update/delete/run_now/set_enabled write-actions soumises aux permissions natives); commandes Tauri + routes HTTP aux contrats DTO identiques (camelCase nextRunAtMs/lastRunAtMs/lastTaskId/createdBy/updatedBy); frontend: gateways Tauri/HTTP/mock + types ports/domain, surface projet 'Tâches planifiées' (liste utilisateur+agent unifiée, création/édition avec récapitulatif avant activation, approbation/refus, exécuter maintenant, suspendre/reprendre, suppression), catalogage surface web (webSurfaceCatalog/viewPlacement/ViewPanelBody/WebWorkspace); docs/scheduled-project-tasks.md et sdk docs/services.md (047c38b: pas un service plugin V1, pas d'émulation via cron système).

#314: correction de 'Conversation liée — transcript indisponible' après reboot: restauration du transcript lié côté application (orchestrator service, lifecycle, session_limit, background sink, terminal registry) et côté frontend (adapters agent/http frames/stream/requestResponse, workStateNormalization, CustomAgentChatView avec état et action utile), tests dto_chat/agent_lifecycle/structured_registry_d1/background_completion_sink étendus.

QA verte rapportée par QA sur feature/305-scheduled-project-tasks-mcp, sans bloquant, pour #305 et #314.

Hors périmètre worktree: tickets non liés, attachments/, scripts/; aucun push.
2026-09-11 10:32:01 +02:00

127 lines
4.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 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 { TauriInputGateway } from "./input";
import { TauriProjectGateway } from "./project";
import { TauriTerminalGateway } from "./terminal";
import { TauriLayoutGateway } from "./layout";
import { TauriProfileGateway } from "./profile";
import { TauriModelServerGateway } from "./modelServer";
import { TauriDesktopServerGateway } from "./desktopServer";
import { TauriTemplateGateway } from "./template";
import { TauriSkillGateway } from "./skill";
import { TauriMemoryGateway } from "./memory";
import { TauriEmbedderGateway } from "./embedder";
import { TauriDeviceGateway } from "./device";
import { TauriGitGateway } from "./git";
import { TauriPermissionGateway } from "./permission";
import { TauriWorkStateGateway } from "./workState";
import { TauriScheduledTaskGateway } from "./scheduledTask";
import { TauriConversationGateway } from "./conversation";
import { TauriTicketGateway } from "./ticket";
import { TauriWindowGateway } from "./window";
import { TauriFocusedProjectGateway } from "./focusedProject";
import { LocalStorageUiPreferencesGateway } from "./uiPreferences";
import { TauriUserSettingsGateway } from "./userSettings";
import { TauriPluginGateway } from "./plugin";
import { TauriPluginWorkspaceGateway } from "./pluginWorkspace";
import { TauriPluginTaskGateway } from "./pluginTask";
import { TauriPluginToolchainGateway } from "./pluginToolchain";
import { TauriPluginEventGateway } from "./pluginEvents";
import { TauriPluginConfigGateway } from "./pluginConfig";
import { TauriPluginStorageGateway } from "./pluginStorage";
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(),
input: new TauriInputGateway(),
terminal: new TauriTerminalGateway(),
project: new TauriProjectGateway(),
layout: new TauriLayoutGateway(),
git: new TauriGitGateway(),
remote: new TauriRemoteGateway(),
profile: new TauriProfileGateway(),
modelServer: new TauriModelServerGateway(),
desktopServer: new TauriDesktopServerGateway(),
template: new TauriTemplateGateway(),
skill: new TauriSkillGateway(),
memory: new TauriMemoryGateway(),
embedder: new TauriEmbedderGateway(),
device: new TauriDeviceGateway(),
permission: new TauriPermissionGateway(),
workState: new TauriWorkStateGateway(),
scheduledTask: new TauriScheduledTaskGateway(),
conversation: new TauriConversationGateway(),
ticket: new TauriTicketGateway(),
window: new TauriWindowGateway(),
focusedProject: new TauriFocusedProjectGateway(),
uiPreferences: new LocalStorageUiPreferencesGateway(),
userSettings: new TauriUserSettingsGateway(),
plugin: new TauriPluginGateway(),
pluginWorkspace: new TauriPluginWorkspaceGateway(),
pluginTask: new TauriPluginTaskGateway(),
pluginToolchain: new TauriPluginToolchainGateway(),
pluginEvents: new TauriPluginEventGateway(),
pluginConfig: new TauriPluginConfigGateway(),
pluginStorage: new TauriPluginStorageGateway(),
};
}
export {
TauriSystemGateway,
TauriAgentGateway,
TauriInputGateway,
TauriProjectGateway,
TauriTerminalGateway,
TauriLayoutGateway,
TauriProfileGateway,
TauriModelServerGateway,
TauriDesktopServerGateway,
TauriTemplateGateway,
TauriSkillGateway,
TauriMemoryGateway,
TauriEmbedderGateway,
TauriDeviceGateway,
TauriGitGateway,
TauriPermissionGateway,
TauriWorkStateGateway,
TauriScheduledTaskGateway,
TauriConversationGateway,
TauriTicketGateway,
TauriWindowGateway,
TauriFocusedProjectGateway,
LocalStorageUiPreferencesGateway,
TauriUserSettingsGateway,
TauriPluginGateway,
TauriPluginStorageGateway,
};