@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 28 lines 1.2 KB
Raw
1 import * as Effect from "effect/Effect";
2 import * as SqlClient from "effect/sql/SqlClient";
3
4 export default Effect.gen(function* () {
5 const sql = yield* SqlClient.SqlClient;
6
7 yield* sql`
8 CREATE TABLE orchestration_v2_projection_subagents (
9 subagent_id TEXT PRIMARY KEY,
10 thread_id TEXT NOT NULL,
11 run_id TEXT,
12 parent_node_id TEXT NOT NULL,
13 provider TEXT NOT NULL,
14 provider_thread_id TEXT,
15 child_thread_id TEXT,
16 origin TEXT NOT NULL,
17 status TEXT NOT NULL,
18 started_at TEXT,
19 completed_at TEXT,
20 updated_at TEXT NOT NULL,
21 payload_json TEXT NOT NULL
22 )
23 `;
24 yield* sql`CREATE INDEX orchestration_v2_projection_subagents_thread_idx ON orchestration_v2_projection_subagents(thread_id, started_at, subagent_id)`;
25 yield* sql`CREATE INDEX orchestration_v2_projection_subagents_parent_node_idx ON orchestration_v2_projection_subagents(parent_node_id)`;
26 yield* sql`CREATE INDEX orchestration_v2_projection_subagents_provider_thread_idx ON orchestration_v2_projection_subagents(provider_thread_id)`;
27 yield* sql`CREATE INDEX orchestration_v2_projection_subagents_child_thread_idx ON orchestration_v2_projection_subagents(child_thread_id)`;
28 });