Replace all in-memory Map-backed stores (credentials, models, agents, tasks, iterations, usage) with Drizzle ORM queries against the homelab-pg PostgreSQL cluster. All store functions are now async. - Add 6 harness_* tables to @homelab/db schema - Generate and apply initial Drizzle migration - Add lazy DB connection proxy to avoid build-time errors - Wire DATABASE_URL from sealed secret into harness deployment - Update all API routes, orchestrator, executor, and boot to await async store operations
519 lines
12 KiB
JSON
519 lines
12 KiB
JSON
{
|
|
"id": "629b632c-cf1f-46ff-bb2f-e47d2343ddbd",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.harness_agent_configs": {
|
|
"name": "harness_agent_configs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"runtime": {
|
|
"name": "runtime",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"model_id": {
|
|
"name": "model_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"max_tokens": {
|
|
"name": "max_tokens",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"env": {
|
|
"name": "env",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.harness_credentials": {
|
|
"name": "harness_credentials",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"base_url": {
|
|
"name": "base_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.harness_curated_models": {
|
|
"name": "harness_curated_models",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"context_window": {
|
|
"name": "context_window",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cost_per_1k_input": {
|
|
"name": "cost_per_1k_input",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cost_per_1k_output": {
|
|
"name": "cost_per_1k_output",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.harness_iterations": {
|
|
"name": "harness_iterations",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"task_id": {
|
|
"name": "task_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"n": {
|
|
"name": "n",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
},
|
|
"diagnosis": {
|
|
"name": "diagnosis",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"agent_output": {
|
|
"name": "agent_output",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"evals": {
|
|
"name": "evals",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"diff_stats": {
|
|
"name": "diff_stats",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"started_at": {
|
|
"name": "started_at",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.harness_model_usage": {
|
|
"name": "harness_model_usage",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"model_id": {
|
|
"name": "model_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"task_id": {
|
|
"name": "task_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"task_slug": {
|
|
"name": "task_slug",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"iteration": {
|
|
"name": "iteration",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"input_tokens": {
|
|
"name": "input_tokens",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"output_tokens": {
|
|
"name": "output_tokens",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"duration_ms": {
|
|
"name": "duration_ms",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"timestamp": {
|
|
"name": "timestamp",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.harness_tasks": {
|
|
"name": "harness_tasks",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"goal": {
|
|
"name": "goal",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
},
|
|
"iteration": {
|
|
"name": "iteration",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"max_iterations": {
|
|
"name": "max_iterations",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 6
|
|
},
|
|
"started_at": {
|
|
"name": "started_at",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"project": {
|
|
"name": "project",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'—'"
|
|
},
|
|
"evals": {
|
|
"name": "evals",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'{}'::jsonb"
|
|
},
|
|
"pr": {
|
|
"name": "pr",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"spec": {
|
|
"name": "spec",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.users": {
|
|
"name": "users",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"users_email_unique": {
|
|
"name": "users_email_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |