Files
deepseek-harness/packages/core
Tianyi Cui a88ef734cc Merge remote-tracking branch 'origin/worktree/session-format-04-live-assistant-stream' into worktree/session-format-05-v1-v2-chunk-migration
# Conflicts:
#	.agents/notes/implemented/architecture/2026-08-31-live-assistant-stream-frames.i18n.yaml
#	.agents/notes/implemented/architecture/2026-08-31-live-assistant-stream-frames.md
#	.agents/notes/implemented/architecture/2026-08-31-live-assistant-stream-frames.zh.md
#	.agents/notes/implemented/simplification/2026-08-06-buffer-free-feedback-telemetry.i18n.yaml
#	.agents/notes/implemented/simplification/2026-08-06-buffer-free-feedback-telemetry.md
#	.agents/notes/implemented/simplification/2026-08-06-buffer-free-feedback-telemetry.zh.md
#	apps/web/tests/scaffold.ts
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/api/session-controller/README.i18n.yaml
#	packages/api/session-controller/README.md
#	packages/api/session-controller/README.zh.md
#	packages/api/session-controller/src/client/sessions/assistant-stream.ts
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/src/assistant-stream.ts
#	packages/core/agent-loop/tests/loop.spec.ts
#	packages/core/agent/src/runtime-types.ts
#	packages/session/session-telemetry/tests/telemetry.spec.ts
#	packages/test-support/llm-replay/README.i18n.yaml
#	packages/test-support/llm-replay/README.md
#	packages/test-support/llm-replay/README.zh.md
#	packages/test-support/llm-replay/src/alpha-refusal-fixtures.ts
#	packages/test-support/llm-replay/src/index.ts
#	packages/test-support/llm-replay/tests/llm-replay.spec.ts
#	packages/test-support/session-snapshot/README.i18n.yaml
#	packages/test-support/session-snapshot/README.md
#	packages/test-support/session-snapshot/README.zh.md
#	packages/test-support/session-snapshot/src/suite.ts
#	packages/test-support/session-snapshot/tests/suite.spec.ts
#	snapshots/sdk/sdk.snapshot.ts
#	snapshots/session/headless.snapshot.ts
2026-09-03 03:10:05 +08:00
..
2026-09-02 15:48:33 +08:00

description, kind
description kind
The core group map: the session log, system-prompt assembly, tool registry, agent vocabulary, and default loop that form the product API spine. package-group

packages/core

English | 中文

Summary

The core group provides the product API spine of the DeepSeek Harness: an append-only session log, system-prompt assembly, a tool registry, the Agent handle, and the concrete loop that drives them. Every composition boots these packages, and plugins and consumers build against their stable contracts. A turn flows through all of them — the loop claims a prompt, opens a turn on the session log, assembles the request through system-prompt, streams the model response, dispatches tool calls through the registry, and appends every model-visible fact back to the log. Choose this group when you build an agent or extend one; the default product composition is dsh-base.

Table of Contents


Packages

Package Role ctx key
scope/ Scoped registration and event routing that isolate one agent's contributions library — no ctx key
session/ The append-only session event log every agent's history derives from ctx.sessions
system-prompt/ System-prompt assembly from ordered sections, tool schemas, and variables ctx.systemPrompt
tools/ The tool registry and guarded execution pipeline the loop dispatches through ctx.tools
agent-tool-presentation/ Per-agent tool-presentation selector for presets no ctx key
agent/ The Agent handle plugins program against, plus its live registry and events ctx.agents
agent-default-model/ The deployment default model selection entry points apply to fresh agents ctx.agentDefaultModel
agent-loop/ The default agent driver: creates agents and runs the turn and step lifecycle ctx.agentLoop

scope supplies the shared scoping primitive; agent owns the public Agent contract, while agent-loop is its default implementation, so extension plugins depend on agent and the driver stays swappable. agent-default-model owns the deployment selection an entry point applies when a session has none of its own. Runnable compositions live under packages/bundle; this group owns only the swappable spine pieces.



Dev Note

Working context for maintainers — click to expand

None.