mirror of
https://github.com/saltbo/agent-kanban.git
synced 2026-09-19 09:01:47 +08:00
a2fa54a729
Replace the v1 Agent/Machine runtime and CLI architecture with the v2 Resource Server, AMA-backed projections, task lifecycle, session observation, BDD specifications, and a single-package layered codebase. BREAKING CHANGE: remove the v1 CLI, internal Agent/Machine runtime entities, workspace layout, and legacy runtime coordination APIs.
34 lines
1.2 KiB
SQL
34 lines
1.2 KiB
SQL
-- Backfill NULL runtimes with 'claude-code' then enforce NOT NULL
|
|
-- Normalize legacy runtime names
|
|
UPDATE agents SET runtime = 'claude' WHERE runtime IN ('claude-code', 'Claude Code');
|
|
UPDATE agents SET runtime = 'codex' WHERE runtime = 'codex-cli';
|
|
|
|
-- Backfill NULL runtimes with 'claude'
|
|
UPDATE agents SET runtime = 'claude' WHERE runtime IS NULL;
|
|
|
|
-- D1 doesn't support ALTER COLUMN, so recreate the table
|
|
CREATE TABLE agents_new (
|
|
id TEXT PRIMARY KEY,
|
|
owner_id TEXT NOT NULL,
|
|
name TEXT NOT NULL,
|
|
bio TEXT,
|
|
soul TEXT,
|
|
role TEXT,
|
|
kind TEXT NOT NULL DEFAULT 'worker',
|
|
handoff_to TEXT,
|
|
runtime TEXT NOT NULL DEFAULT 'claude',
|
|
model TEXT,
|
|
skills TEXT,
|
|
public_key TEXT NOT NULL,
|
|
private_key TEXT NOT NULL,
|
|
fingerprint TEXT NOT NULL,
|
|
builtin INTEGER NOT NULL DEFAULT 0,
|
|
created_at TEXT NOT NULL,
|
|
updated_at TEXT NOT NULL
|
|
);
|
|
|
|
INSERT INTO agents_new (id, owner_id, name, bio, soul, role, kind, handoff_to, runtime, model, skills, public_key, private_key, fingerprint, builtin, created_at, updated_at)
|
|
SELECT id, owner_id, name, bio, soul, role, kind, handoff_to, runtime, model, skills, public_key, private_key, fingerprint, builtin, created_at, updated_at FROM agents;
|
|
DROP TABLE agents;
|
|
ALTER TABLE agents_new RENAME TO agents;
|