Files
deepseek-harness/packages/core
sjw1231 fa96728ee0 Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/experimental/cua-macos/tests/provider-lifecycle.spec.ts
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
#	packages/experimental/cua/package.json
#	packages/experimental/cua/src/index.ts
#	packages/experimental/cua/src/native-client.ts
#	packages/experimental/ptc-runtime-python/README.i18n.yaml
#	packages/experimental/ptc-runtime-python/src/index.ts
#	packages/experimental/ptc-runtime-python/tests/runtime.spec.ts
#	packages/ptc-runtime/ptc-runtime/package.json
#	packages/ptc-runtime/ptc-runtime/tsconfig.json
#	pnpm-lock.yaml
#	snapshots/session/cua-native/session.v4.jsonl
#	snapshots/session/cua-ptc/session.v4.jsonl
2026-11-11 12:24:26 +08:00
..
2026-11-11 10:18:52 +08:00
2026-11-11 10:18:52 +08:00
2026-11-11 10:18:52 +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

Use the core packages to build or extend an agent that records durable session history, assembles system prompts, exposes tools, selects a default model, and runs model turns. These packages define the shared APIs used by every composition, while executable product assemblies live under packages/bundle. Choose this group when developing agent behavior or replacing one of those capabilities; start with dsh-base when you need the default runnable composition.

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.