2026-06-20 23:25:33 +08:00
# core/ — product API spine
2026-07-26 05:03:53 +08:00
English | [中文 ](README.zh.md )
2026-07-10 14:19:06 +08:00
The session log, system-prompt assembly, tool registry, agent vocabulary, and concrete loop that form the harness's default control spine. These are **product** packages — the stable surface plugins and consumers build against.
2026-06-20 23:25:33 +08:00
| Package | Role | ctx key |
|---|---|---|
2026-08-04 00:54:19 +08:00
| [`scope/` ](scope/README.md ) | Scoped-context registration primitive | library — no ctx key |
| [`session/` ](session/README.md ) | Event-sourced session log and in-memory store | `ctx.sessions` |
| [`system-prompt/` ](system-prompt/README.md ) | Prompt and tool-schema assembly registry | `ctx.systemPrompt` |
| [`tools/` ](tools/README.md ) | Scoped tool registry and execution pipeline | `ctx.tools` |
| [`agent/` ](agent/README.md ) | Agent interface, registry, and event vocabulary | `ctx.agents` |
| [`agent-loop/` ](agent-loop/README.md ) | Default concrete agent driver | `ctx.agentLoop` |
2026-06-20 23:25:33 +08:00
2026-08-04 00:54:19 +08:00
`scope` supplies the shared scoping primitive. `agent` owns the public seam, while `agent-loop` is its default implementation; extension plugins depend on the seam so the driver remains swappable.
docs: agent-scope RFC, CONTEXT.md glossary, architecture scope section, README sync
The agent-scope-contexts RFC (implemented) records the decision tree:
the dsh-scope primitive over cordis extend/Context.filter/no-op fibers,
two-level flat scope with shadowing, restriction/grant semantics, the
scoped-dispatch rule with fused helpers, the setup window, and the
alternatives (explicit scope params, isolate, event-filtering-only,
vendored support) with why each lost. CONTEXT.md pins the glossary.
architecture.md gains the Agent Scope section, the dsh-scope spine row,
the scoped turn-flow line, and an extension-table row (ceiling 1640→1790:
the two-layer registration model is a new architectural axis; additions
are condensed to pointers). READMEs of every touched package re-state
their scoped facts; the stale structured-runtime README section is
replaced by the scoped-registration description.
2026-07-09 03:01:11 +08:00
2026-08-04 00:54:19 +08:00
Runnable compositions belong to [`examples/agent-spine-demo` ](../examples/agent-spine-demo/README.md ); this group owns only the swappable spine pieces.