feat(goal-run): add multi-checkpoint goal orchestration with H5 and admin surfaces.

Persist goal runs in MySQL, bind agent runs to checkpoints, expose awaiting-approval
UX in chat, and add admin inspection routes with local verify scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-01 17:03:16 +08:00
parent 43bc8bbc2b
commit 666db0b939
47 changed files with 4417 additions and 4 deletions
+6
View File
@@ -3,6 +3,7 @@ import mysql from 'mysql2/promise';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { ensureDefaultSpaces } from './mindspace.mjs';
import { ensureGoalRunSchema } from './goal-run-service.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -416,6 +417,11 @@ export async function migrateSchema(pool) {
);
}
await ensureGoalRunSchema(pool, {
columnExists: (table, column) => columnExists(pool, table, column),
indexExists: (table, index) => indexExists(pool, table, index),
});
// MindSpace conversation packages: additive provenance tables for grouping
// images, files, pages, and publications created during a chat session.
await pool.query(`