knowledge-trust-core
Knowledge Trust Core
面向 AI 知识系统的可移植、确定性信任策略。
Knowledge Trust Core 回答一个范围狭窄但至关重要的问题:这份知识能否在此风险级别、此范围内用于这一目的? 它将证据成熟度、来源出处、Claim 类型、预期用途和来源家族独立性转化为可执行的 SDK、CLI 和只读 MCP 判定。
它并非真相预言机,也不会输出数值化的“真相评分”。一个措辞精美的声明仍可能是错误的;本包只强制执行你声明的证据边界。
为什么存在
大多数知识库存储来源和结论,却把最终安全规则留在提示词里:一个 Agent 遵守 seed,另一个却默默将其当作事实。Knowledge Trust Core 让这条规则变得可移植、可测试。
同一创作者重复二十次,仍然只算一个来源家族。
外部来源页面可以启发构思、实验、问题或文案,但不能成为默认的事实性答案。
运营用途需要佐证;高风险和公开事实性用途需要验证。
明确的禁止规则和范围不匹配始终优先于成熟度。
每条判定都返回稳定的原因代码、注意事项、证据缺口和生效的策略版本。
Related MCP server: vigile-mcp
包含内容
用于验证、预期用途判定和晋升检查的 TypeScript SDK
带版本号的默认策略,外加可审计的自定义策略加载
规范化的 JSON Schema 契约
带中文 Claim 标签的只读 Markdown/Obsidian 适配器
只读 CLI:
validate、evaluate、promotion-check和audit只读 MCP 工具:
trust_validate、trust_evaluate和trust_promotion_check合成 JSON、Obsidian 和可选的 GBrain-host 示例
刻意排除的内容
本包不存储、检索、排序、审批、编辑、提交、索引或同步知识。它不具备 Git、数据库、向量索引、GBrain 写入或提案队列能力。可以将其与任何存储或检索系统配对,并在检索之后、Agent 使用结果之前调用它。
快速开始
git clone https://github.com/haorantang97/knowledge-trust-core.git
cd knowledge-trust-core
npm install
npm run verifySDK:
import { evaluateUse, validateRecord } from "knowledge-trust-core";
const parsed = validateRecord(candidate);
if (!parsed.ok) throw new Error(JSON.stringify(parsed.issues));
const verdict = evaluateUse(parsed.record, {
intended_use: "operational_decision",
risk_level: "ordinary",
scope: ["ordinary internal workflow"]
});
if (verdict.decision === "deny") {
console.error(verdict.reason_codes);
}CLI:
npm run build
node dist/src/cli.js validate examples/obsidian/seed-rhetoric.md --json
node dist/src/cli.js evaluate examples/obsidian/seed-rhetoric.md \
--use copywriting_inspiration --json
node dist/src/cli.js audit examples --jsonMCP:
KNOWLEDGE_TRUST_ALLOWED_ROOTS=/absolute/path/to/knowledge \
node dist/src/mcp/server.js基于 payload 的 MCP 调用无需文件系统访问。基于文件的调用会被禁用,除非其规范路径位于 KNOWLEDGE_TRUST_ALLOWED_ROOTS 之内;符号链接逃逸会被拒绝。
默认成熟度策略
预期用途 | 最低成熟度 | 是否允许来源页面? |
构思生成、文案灵感、访谈问题、实验假设 |
| 可以,但需遵守声明的限制 |
低风险行动、默认答案、运营决策 |
| 否 |
高风险决策、公开事实性声明 |
| 否 |
完整矩阵还会检查 Claim 类型、归属、明确的允许/禁止列表、范围和证据缺口。参见 docs/model.md。
来源家族独立性
n > 1 还不够。来自同一上游创作者的转发、剪辑和重复声明仍属于同一个来源家族。从 seed 晋升到 corroborated 需要至少两个真正独立的家族支持,且不存在未解决的冲突家族。晋升到 validated 还要求在声明的范围内有重复测试或高质量证据。
存储适配器
规范化 JSON 是边界。随附的 Markdown 适配器在不修改笔记的前提下读取信任元数据,从引用 ID 中剥离 Obsidian 别名和锚点,并拒绝猜测缺失的成熟度。现有的散文优先型知识库可能需要进行渐进式迁移,以符合显式契约;参见 docs/migration.md。GBrain 是可选的,仅视为可能的检索宿主;参见 docs/integration.md 和 examples/gbrain-host。
开发
npm test
npm run typecheck
npm run build
npm run privacy-check
npm run verify发布门禁会进行类型检查、运行所有测试、重新生成 JSON Schema、扫描私有路径或凭据,并检查 npm 包清单。
中文简介
这是一个可嵌入的“知识使用边界”引擎,而不是事实判定器。它把 seed / corroborated / validated、来源家族独立性、Claim 类型、适用范围和预期用途变成确定性的代码规则;可接在 Obsidian、向量库、GBrain 或任意检索系统之后,阻止低成熟度材料被 Agent 当作默认事实或高风险决策依据。
许可证
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityFmaintenanceProvides policy-based access control, incident tracking, and compliance monitoring to govern AI agent behavior. It enables organizations to enforce security rules and maintain audit trails by validating agent actions against trust levels and pattern-based policies.61
- AlicenseAqualityFmaintenanceEnables AI agents to query trust scores for MCP servers and agent skills while scanning content for potential security issues. It provides direct access to the Vigile trust registry to help users evaluate the safety of third-party tools and integrations.991MIT
- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI agents with trust scoring and reputation management capabilities for secure interactions. Enables agents to check trust scores, rate interactions, and manage disputes before transacting with other agents.
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to query cryptographically verified facts with zero-knowledge proofs, selective disclosure, and tamper-evident provenance.1791Apache 2.0
Related MCP Connectors
Trust infrastructure for AI agents: read a verifiable Trust Rating, claim an identity, earn a badge.
Independent AI-agent reviews: trust checks, evidence scorecards, incident registry, recommendations.
Evidence-backed x402 web verification for AI agents, with auditable decisions for every condition.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/haorantang97/knowledge-trust-core'
If you have feedback or need assistance with the MCP directory API, please join our Discord server