feat: 建立 Agent Knowledge 分层 inspection - #238
Merged
Merged
Conversation
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[72%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: codex (gpt-5.6-sol) <ai@local>
ohfei
force-pushed
the
codex/issue-235-agent-knowledge-main
branch
from
August 31, 2026 14:57
0442b29 to
49ded61
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题
Closes #235
KAT 缺少面向 AI Agent 的稳定知识发现面:Agent 无法渐进地选择 Workflow、发现 PACK Provider、读取来源 SQL/关系说明,或在已有 Run 上找回当前 Workflow 的分析策略。
主要改动
kat inspect workflow与kat inspect provider,并支持kat inspect workflow --run <run-id>。kat inspect为纯 manifest 读取,不启动 Python 或导入 PACK 源码。@kat.workflow收敛为显式name、description、parameters、guide合同。@kat.provider;Provider 仍是 PACK-owned 普通 Python 类,不引入基类、registry、factory 或生命周期托管。datasources/,原子校验 declaration、唯一名称、静态可导入的module + qualname和 guide。knowledge/渐进读取,并拒绝绝对路径、穿越、根外链接、非 Markdown、空文件和非法 UTF-8。required_tables/Table Grant 和 Provider 扫描决定的替代关系。独立交付边界
origin/main,不依赖 feat(pack): 提供文本 Ftrace 类型化 Provider #232 或 重构 kat datasource 并删除旧 Dataset 执行面 #234。required_tables后的兼容执行歧义,显式提供旧 Dataset 时,其全部 Source table 对 Workflow 可见。kat query实现与 Runtime 协议;Skill 消费 重构 kat query 为 Run Output 原生 NDJSON 查询 #233 已发布的 output-only 原生 NDJSON 合同。inspect workflow --run使用独立的 Run identity projection,只定位pack/workflow,不解释历史 Dataset、inputs 或 outputs 数据合同。kat/platform/datasource或 Dataprovider Toolkit 的数据面实现。验证证据
cargo test --locked -p kat-cli --lib --test inspect --test query --test trace_streamer_demo -- --test-threads=1inspect workflow --run定向回归:1 passedcargo fmt --all -- --checkgit diff --check origin/main.github/scripts/pr_guard.py重放:PASS;91 files、6360 additions、10618 total diff、0 binary、0 AI identity hits门禁说明
本 PR 完整交付 Issue #235 的 CLI、Runtime、Skill、参考 PACK 与测试闭环,因此超过常规规模阈值;已确认并应用
approved-large-change。