feat(runtimes): add Runtimes tab with usage tracking and connection test
Add a new "Runtimes" sidebar tab to manage local agent runtimes with three main capabilities: runtime status overview, token usage tracking (reading Claude Code and Codex CLI local JSONL logs via daemon), and an interactive connection test that sends a ping through the daemon to verify end-to-end agent CLI connectivity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6fd0e2b319
commit
903fbee55d
24 changed files with 1773 additions and 9 deletions
16
server/migrations/013_runtime_usage.up.sql
Normal file
16
server/migrations/013_runtime_usage.up.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
CREATE TABLE runtime_usage (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
runtime_id UUID NOT NULL REFERENCES agent_runtime(id) ON DELETE CASCADE,
|
||||
date DATE NOT NULL,
|
||||
provider TEXT NOT NULL,
|
||||
model TEXT NOT NULL DEFAULT '',
|
||||
input_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
output_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cache_read_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cache_write_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
UNIQUE (runtime_id, date, provider, model)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_runtime_usage_runtime_date ON runtime_usage(runtime_id, date DESC);
|
||||
Loading…
Add table
Add a link
Reference in a new issue