docs(comments): 注释中文化 · internal/runtime/orchestration(29 文件,纯替换)
- 只翻注释/文档字符串:剥离注释后代码行逐字节不变(机械校验只剩允许的行尾注释形态) - 裁决编号与 design 节号(02.4.3 / 11.4.2 / design/05 §9 等)逐字保留 - 复核:go build 绿;orchestration 及其子包(audit/comm)测试绿;gofmt 干净
This commit is contained in:
1 parent
fe90f64a56
commit
eb1828ee7a
29 files changed
+751
-949
No files matched your search
@@ -1,24 +1,19 @@
|
||||
// Package audit provides the subagent-auditing primitives specified by the
|
||||
// Cyrene orchestration design (DevDocs/design/05-子代理.md §3 and §6) and the
|
||||
// security/audit requirements in DevDocs/design/11-安全与权限.md §4 and §8.
|
||||
// Package audit 提供 Cyrene 编排设计所规定的子代理审计原语
|
||||
// (DevDocs/design/05-子代理.md §3 与 §6),以及
|
||||
// DevDocs/design/11-安全与权限.md §4 与 §8 里的安全/审计要求。
|
||||
//
|
||||
// It has two halves:
|
||||
// 它有两半:
|
||||
//
|
||||
// - ContextAuditor gives a main agent read-only, traceable access to a
|
||||
// subagent's context (a []model.Message) so it can audit and pinpoint what
|
||||
// the subagent did: the full context, a tail window, or a keyword hit with
|
||||
// its surrounding lines. It is a pure value type over the message list the
|
||||
// orchestral layer hands it; it holds no storage and no policy.
|
||||
// - ContextAuditor 给主 agent 只读、可追溯地访问某个子代理的上下文
|
||||
// (一个 []model.Message),使其能审计并定位子代理做过什么:整段上下文、
|
||||
// 尾部窗口,或带上下行的关键词命中。它是作用于编排层交给它的消息列表之上的
|
||||
// 纯值类型;不持有存储,也不持有策略。
|
||||
//
|
||||
// - Approver records a main-agent review-and-approve (代审授权) of a
|
||||
// subagent's sensitive action. It writes a structured audit log (who / what
|
||||
// / when / result) and produces the short frontend notice "「xxx 想要干什么,
|
||||
// 我审查后批准了」". Whether an action is actually sensitive and whether it is
|
||||
// allowed is decided by the upper policy layer; this package only records,
|
||||
// narrates, and returns the result model — it never judges permission.
|
||||
// - Approver 记录对子代理敏感操作的「主代理代审授权」。它写入结构化审计日志
|
||||
// (谁 / 什么 / 何时 / 结果),并产出前端短句「「xxx 想要干什么,
|
||||
// 我审查后批准了」」。某项操作是否真的敏感、是否获准由上层策略决定;本包只
|
||||
// 记录、叙述并返回结果模型 —— 绝不判断权限。
|
||||
//
|
||||
// The package is a leaf: it depends only on the standard library,
|
||||
// internal/runtime/model and internal/logger, and never imports the agent loop
|
||||
// or other runtime packages, so it can sit inside runtime/orchestration without
|
||||
// an import cycle.
|
||||
// 本包是叶子:只依赖标准库、internal/runtime/model 与 internal/logger,绝不导入 agent
|
||||
// 循环或其他运行时包,因此能安放在 runtime/orchestration 内而不形成导入环。
|
||||
package audit
|
||||
Reference in new issue
Block a user