chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)

This commit is contained in:
runny committed 2026-11-13 17:54:56 +08:00
commit 9097ee699d
5769 files changed
+1446466

No files matched your search

@@ -0,0 +1,22 @@
-- Remembered agent approvals: "allow for the rest of this conversation" and
-- the grants an automation carries between runs.
CREATE TABLE IF NOT EXISTS agent_grants (
id VARCHAR(36) PRIMARY KEY,
tenant_id BIGINT NOT NULL,
user_id VARCHAR(128) NOT NULL,
scope VARCHAR(16) NOT NULL,
scope_id VARCHAR(64) NOT NULL,
grant_key VARCHAR(512) NOT NULL,
label TEXT,
binding_hash VARCHAR(64) NOT NULL DEFAULT '',
risk VARCHAR(16) NOT NULL DEFAULT 'write',
prompt_id VARCHAR(36),
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL,
last_used_at DATETIME,
expires_at DATETIME,
revoked_at DATETIME
);
CREATE UNIQUE INDEX IF NOT EXISTS idx_agent_grants_key
ON agent_grants(tenant_id, user_id, scope, scope_id, grant_key);
CREATE INDEX IF NOT EXISTS idx_agent_grants_scope ON agent_grants(tenant_id, scope, scope_id);