deepseek-harness/packages/core
Tianyi Cui a706ec7966 Merge branch 'structured-output-subagent-seam' into worktree-dynamic-workflows
# Conflicts:
#	docs/rfc/INDEX.md
#	examples/acp-agent/tests/snapshots/text-turn/session.jsonl
2026-07-07 23:10:50 +08:00
..
agent fix review findings: CI leaf-gate wiring, heritage return surface, AGENTS.md self-containedness 2026-07-07 20:30:34 +08:00
agent-core refactor(system-prompt): rename TOOL_ORDER_REST from '...' to '<unlisted-tools>' 2026-07-07 20:49:35 +08:00
agent-loop Merge remote-tracking branch 'origin/master' into worktree-llm-tool-order 2026-07-07 21:35:28 +08:00
session fix review findings: CI leaf-gate wiring, heritage return surface, AGENTS.md self-containedness 2026-07-07 20:30:34 +08:00
system-prompt feat: add assembly-time validation rejects placeholder 2026-07-07 22:03:12 +08:00
tools Merge branch 'structured-output-subagent-seam' into worktree-dynamic-workflows 2026-07-07 22:21:44 +08:00
README.md Merge remote-tracking branch 'origin/worktree-hooks-b-bash-seam' into worktree-hooks-c-interception 2026-07-01 15:37:54 +08:00

core/ — product API spine

The packages every harness build is assembled from: the session log, the system-prompt assembly, the tool registry, the agent vocabulary, and the one concrete loop that drives them. These are product packages — the stable surface plugins and consumers build against.

Package Role ctx key
session/ Event-sourced session log + in-memory store ctx.sessions
system-prompt/ Prompt-section + tool-schema assembly registry ctx.systemPrompt
tools/ Tool registry + tools/pre-execute/tools/post-execute pipeline ctx.tools
agent/ Agent interface, registry, agent/* event vocabulary ctx.agents
agent-loop/ The concrete loop plugin: ReactLoopAgent + the loop driver ctx.agentLoop
agent-core/ Bundle plugin: the providerless/executor-less/UI-less spine as code (loads the spine)

agent-loop is the one concrete implementation of the agent seam and lives here because it is the harness's default product loop; everything else in core/ is interface/vocabulary. Plugins depend on the agent vocabulary, never on agent-loop directly, so the loop stays swappable.

agent-core is the composition counterpart: one bundle plugin that loads the whole providerless spine (timer + llm + sessions + system-prompt + tools + agents + invariants + tool-bash + agent-loop) and forwards agent-loop's agents list as its own config. App packages (ui/stdio-agent, ui/acp-agent) consume it and add only a front door; a leaf adds the swappable backends plus any optional product tools it wants to expose. It lives in core/ because it composes exclusively core/ + interface packages and ships no provider, executor, or UI of its own.