mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-02 12:01:50 +08:00
feat: add optional task intelligence recording and views
This commit is contained in:
1 parent
e66789633a
commit
d70dd15e11
24 files changed
+1537
-40
No files matched your search
@@ -1547,3 +1547,24 @@ CREATE TABLE IF NOT EXISTS task_schedule_history (
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_schedule_history ON task_schedule_history(schedule_id,id DESC);
|
||||
|
||||
-- Task intelligence is separate from shared asset authentication and graph compaction.
|
||||
CREATE TABLE IF NOT EXISTS task_intelligence (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
task_id BIGINT NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
|
||||
node_id BIGINT REFERENCES exploration_nodes(id) ON DELETE SET NULL,
|
||||
kind TEXT NOT NULL CHECK (kind IN ('credential','lead','sensitive_data')),
|
||||
title TEXT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
evidence TEXT NOT NULL DEFAULT '',
|
||||
confidence TEXT NOT NULL CHECK (confidence IN ('observed','inferred')),
|
||||
status TEXT NOT NULL,
|
||||
asset_ids JSONB NOT NULL DEFAULT '[]',
|
||||
worker TEXT NOT NULL DEFAULT '',
|
||||
fingerprint TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
UNIQUE(task_id,kind,fingerprint)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_task_intelligence_task ON task_intelligence(task_id,id DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_task_intelligence_assets ON task_intelligence USING gin(asset_ids);
|
||||
Reference in new issue
Block a user