Run events in the database: Runs page and Agent run card on the Dokploy Portal

Snapshot of D:\Ecw Process 65c92c5 (2026-10-30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ManikandanandClaude Opus 5.5 committed 2026-10-30 11:28:26 +05:30
1 parent d500f750da
commit 840272032a
9 files changed
+655 -46

No files matched your search

+17
View File
@@ -104,6 +104,23 @@ BEGIN
END
GO
-- Every Run's events (2026-10-30): the same JSON lines as the bot PC's
-- Logs\events_<run>.jsonl, so the Portal on Dokploy has a Runs page and an
-- Agent run card. Written by the bot (db_datawriter), read by cv_portal
-- (db_datareader). tools/import_run_events.py loads the older files once.
IF OBJECT_ID('dbo.CV_RunEvent', 'U') IS NULL
BEGIN
CREATE TABLE dbo.CV_RunEvent (
id BIGINT IDENTITY(1,1) PRIMARY KEY,
run_id VARCHAR(15) NOT NULL, -- 20261030_101500, the run log's stamp
at DATETIME2(3) NOT NULL,
kind NVARCHAR(40) NOT NULL, -- run_start, claim_start, run_end, ...
body NVARCHAR(MAX) NOT NULL -- the event's JSON line
);
CREATE INDEX IX_CV_RunEvent_run ON dbo.CV_RunEvent (run_id, id);
END
GO
-- So the bot can connect with your Windows login (no password), give that
-- login read/write here. Uncomment and run once, as an admin (e.g. sa):
--