feat(ECR-023): AICoreConfig KnowledgeSource 只读并 Closed
运营可观测知识源目录(knowledge_sources + admin /ai),不含 Chunk/Embedding。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
-- ECR-023 AICoreConfig KnowledgeSource (read catalog)
|
||||
|
||||
CREATE TABLE IF NOT EXISTS knowledge_sources (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
code varchar(64) NOT NULL UNIQUE,
|
||||
title varchar(128) NOT NULL,
|
||||
description text NULL,
|
||||
source_kind varchar(32) NOT NULL
|
||||
CHECK (source_kind IN ('faq', 'policy', 'guide')),
|
||||
version int NOT NULL DEFAULT 1 CHECK (version > 0),
|
||||
active boolean NOT NULL DEFAULT true,
|
||||
system boolean NOT NULL DEFAULT false,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_knowledge_sources_active ON knowledge_sources(active);
|
||||
|
||||
INSERT INTO knowledge_sources(code, title, description, source_kind, version, active, system)
|
||||
VALUES (
|
||||
'ask_grounding',
|
||||
'问答 grounding 知识源',
|
||||
'运营可观测的 Ask grounding 目录占位;本切片不含 KnowledgeChunk。',
|
||||
'faq',
|
||||
1,
|
||||
true,
|
||||
true
|
||||
)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
Reference in New Issue
Block a user