feat(canvas): persist artifacts and surface UI

This commit is contained in:
William Valentin
2026-02-25 11:18:53 -08:00
parent ac60fa5be3
commit e3e98058b0
11 changed files with 330 additions and 5 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ export async function startDaemon(config: Config, options?: StartDaemonOptions):
let channelAgents: ReturnType<typeof createMessageRouter>['agents'] | null = null;
const gateway = createGateway({
config, configPath: options?.persistConfigPath ?? options?.configPath, sessionManager, modelRouter, systemPrompt, toolRegistry, toolExecutor,
config, configPath: options?.persistConfigPath ?? options?.configPath, dataDir, sessionManager, modelRouter, systemPrompt, toolRegistry, toolExecutor,
channelRegistry, pairingManager, lifecycle, memoryStore,
getBackendMode: () => backendMode,
setBackendMode: (mode) => {
+5 -1
View File
@@ -282,6 +282,7 @@ export function initPairingManager(config: Config, store?: PairingStore): Pairin
export interface GatewayDeps {
config: Config;
configPath?: string;
dataDir: string;
sessionManager: SessionManager;
modelRouter: ModelRouter;
systemPrompt: string;
@@ -301,7 +302,7 @@ export interface GatewayDeps {
}
export function createGateway(deps: GatewayDeps): GatewayServer {
const { config, configPath, sessionManager, modelRouter, systemPrompt, toolRegistry, toolExecutor, channelRegistry, pairingManager, lifecycle, getChannelAgents } = deps;
const { config, configPath, sessionManager, modelRouter, systemPrompt, toolRegistry, toolExecutor, channelRegistry, pairingManager, lifecycle, getChannelAgents, dataDir } = deps;
const gateway = new GatewayServer({
port: config.server.port,
@@ -358,6 +359,9 @@ export function createGateway(deps: GatewayDeps): GatewayServer {
),
},
},
canvas: {
persistDir: resolve(dataDir, 'canvas'),
},
nodes: {
enabled: config.server.nodes.enabled,
allowedRoles: config.server.nodes.allowed_roles,