This commit is contained in:
seb
2026-10-17 02:47:20 +02:00
parent 8ee080b744
commit 59395f95d8
8 changed files with 3330 additions and 3215 deletions

View File

@@ -1011,6 +1011,23 @@ CREATE TABLE IF NOT EXISTS mcp_token (
);
`;
export const INIT_SUBAGENTSCHEDULE = `
CREATE TABLE IF NOT EXISTS subagentschedule (
id INTEGER PRIMARY KEY AUTOINCREMENT,
company_id INTEGER NOT NULL,
"desc" TEXT,
prompt TEXT NOT NULL,
skills TEXT,
lastagentnote TEXT,
max_itr INTEGER NOT NULL DEFAULT 15,
cron TEXT NOT NULL,
created_at TEXT NOT NULL DEFAULT (${UTC_NOW}),
lastrun_at TEXT,
FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS IX_subagentschedule_company ON subagentschedule (company_id);
`;
/** DDL scripts in dependency order for SQLite schema initialization. */
export const SCHEMA_SCRIPTS = [
INIT_META,
@@ -1082,4 +1099,5 @@ export const SCHEMA_SCRIPTS = [
INIT_MCP_CLIENT,
INIT_MCP_AUTH_CODE,
INIT_MCP_TOKEN,
INIT_SUBAGENTSCHEDULE,
];