core.md read as a type grab-bag: LLM wire vocabulary up front, the agent/loop story buried, and no correspondence to packages/core. It now opens on the packages/core control spine — the package-by-package loop map with a Page column into session/system-prompt/tools/scope — and keeps only what the spine group declares plus the repo-wide patterns: the Agent handle with its delivery/cancellation/interception contracts, the SessionEvent envelope, branded ids, the …Map pattern. The conversation vocabulary (Message/ContentBlock, the model request, adapters — 17 type-equiv blocks) moves to llm-streaming.md, which now declares packages/llm end-to-end; the duplicate ContentBlockMap paste near its seam section folds into the moved section, and the manifest, LINK_MAP, README table rows, website label (Core data structures → Core), and inbound anchors follow. Every packages/<group>/README pair is now a thin front door in one shape: a why-first intro (bash's seam-pattern-first paragraph rewritten as 'shell execution for the agent'), the package table, and a closing pointer to the owning docs/subsystems page — the bash-style table stays the load-bearing middle. Load-bearing trailing paragraphs relocate rather than vanish: the fs no-timeout rationale becomes a filesystem.md section (both languages), session's four sectioned tables merge into one 12-row table, examples' legacy-bin H2 collapses to a pointer at jsonrpc-demo's README, and design rationale that already lives in an Agent Note or subsystem page is now linked instead of restated. All 40 pair records re-recorded.
1.7 KiB
1.7 KiB
interaction/:人机协作平面
English | 中文
人与运行中的 agent(智能体)协作所经由的各个 seam——提问、审批、权限预设、命令。这些是产品包(package):由用户直接操作的真实接口。
| 包 | 职责 | ctx 键 |
|---|---|---|
commands/ |
为交互式适配器注册并分派用户命令。 | ctx.commands |
user-approval/ |
协调一次性审批决策。 | ctx.approval |
permission/ |
呈现并持久化面向用户的权限预设。 | ctx.permission |
user-interaction/ |
定义与提供方无关的用户问答 seam。 | ctx.userInteraction |
tool-ask-user/ |
向模型公开用户问题。 | (注册到 ctx.tools) |
这些包通过现有的 agent(智能体)和会话契约集成,而不改变循环。交互式应用提供具体的命令、审批和提问适配器;自动化使用 acp/,可运行的演示组合包位于 examples/。产品 dsh CLI(命令行界面)直接组合这些包。
子系统参考:approval.md、permission.md、user-interaction.md、commands.md 与 tui.md。仅自动化的 ACP 传输在 acp/,SDK 的 JSON-RPC 服务器一半在 scaffold/server,共享 bin 启动胶水在 boot/。