Commit Graph

4324 Commits

Author SHA1 Message Date
Hypatia May
820be286a8 Merge origin/master into fix/subagent-empty-terminal-message-output 2026-08-10 23:41:27 +08:00
Hypatia May
f27bdb2be3 Merge remote-tracking branch 'origin/master' into fix/subagent-empty-terminal-message-output
# Conflicts:
#	docs/event-producer-consumer.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/subsystems/subagent.i18n.yaml
#	docs/subsystems/subagent.md
#	docs/subsystems/subagent.zh.md
2026-08-10 22:59:23 +08:00
Yichen Jiang
2e59ff5ef0 Merge remote-tracking branch 'origin/master' into worktree/fix-minimal-preset-prompt
# Conflicts:
#	docs/event-producer-consumer.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-08-10 22:49:25 +08:00
Hypatia May
29c00d59a5 Merge remote-tracking branch 'origin/master' into fix/continuable-subagent-policy-inheritance
# Conflicts:
#	packages/subagent/subagent-inprocess/package.json
#	packages/subagent/subagent/package.json
#	pnpm-lock.yaml
2026-08-10 22:24:56 +08:00
Hypatia May
eebece5e62 Merge remote-tracking branch 'origin/master' into fix/subagent-empty-terminal-message-output 2026-08-10 22:19:44 +08:00
Hypatia May
4f23fa84cc fix(subagent): complete output selection contract 2026-08-10 22:19:14 +08:00
Yichen Jiang
b87a3b1baf Merge remote-tracking branch 'origin/master' into worktree/fix-minimal-preset-prompt 2026-08-10 22:18:22 +08:00
Yichen Jiang
a4e679853f Merge remote-tracking branch 'origin/master' into worktree/fix-minimal-preset-prompt 2026-08-10 22:15:30 +08:00
imccyu
ec601ca13d build(vendor): rescope the vendored Cordis packages into @deepseek-ai
Machine-produced by `pnpm run rescope-vendor --apply` plus the regeneration it
prints: `pnpm install` for the lockfile, `pnpm run gen-third-party-notices`,
`verify-translation-pairing --write` for the touched bilingual pairs,
`gen-doc-graphs`, and one typert snapshot whose ids embed character offsets.
`pnpm run rescope-vendor --check` verifies the result.

Renames nine vendored packages (cordis, cosmokit, schemastery and the six
@cordisjs plugins) and every reference that resolves them: manifest names and
dependency keys, module specifiers including declare-module merges, cordis.yml
plugin names, tsconfig paths, every Markdown fence, and `docs/` prose.
Directory names, upstream versions, and dependency ranges are unchanged, so
vendor/README.md still reads as an upstream snapshot; its manifest table gains
an upstream-name column so THIRD_PARTY_NOTICES keeps MIT attribution pointed
at each fork's origin.

The tutorial tier follows the rename end to end: its yaml fences named plugins
the Loader can no longer resolve, its `ts ignore-check` fences disagreed with
the compiled fences beside them, and its prose quoted both. The contracts that
told readers to keep upstream names — the root convention and the vendoring
cookbook's tree comment and manifest invariant — now say to rescope instead.

Two rules read `@deepseek-ai/` as "another workspace plugin": the client bundle
purity gate now names the vendored libraries a browser bundle inlines, and the
files where a bare `cordis` is an agent-preset id keep that product data.
2026-08-10 22:04:13 +08:00
imccyu
194828e8b8 build(vendor): add the @deepseek-ai rescope codemod, its mapping doc, and its Agent Note
Every harness package declares cordis as a peer dependency, so publishing the
harness publishes the vendored framework layer too; under the upstream names
that publication would squat them on the registry.

scripts/rescope-vendor.ts owns the rename: the nine-package mapping, a
delimited-token rule that leaves cordis.yml, the Loader's cordis: builtins and
vendor directory names alone, per-file exemptions where a name is a directory
or an upstream runtime identifier, and the exact edits for sites a token rule
cannot express — dot-notation lookups, unquoted manifest keys, a regex literal
whose failure would make every Context-merge scan silently find nothing, the
vendored-manifest table, and the contracts that told readers vendored packages
keep their upstream names.

Markdown follows the rename inside every fence, because a fence is code a
reader copies or configuration they mount, and in `docs/` prose as well, where
a sentence quoting a name teaches something this repository no longer resolves.
Prose elsewhere records what was true when it was written, and the same
spelling can mean something else: the Python SDK's `cordis` option, or the
unvendored `@cordisjs/plugin-http`. `docs/rescope.md` states both names on
purpose and is exempt.

exactEditState() classifies every exact edit as pending, applied, or invalid.
An insertion keeps its anchor and a deletion keeps its remainder, so each side
counts the form that survives: a duplicated insertion, a half-applied
replacement, and a deletion whose remainder moved are all invalid. The run
classifies every edit before writing anything and aborts on the first invalid
one, so a disagreement between the mapping and the tree cannot leave a
half-rescoped checkout; each write re-reads its file, because two edits can
target one. rescope-vendor.spec.ts pins those rejections, and --check asserts
the whole post-state from the hygiene gate, so CI owns the invariant.

--reverse restores the upstream names, verified as a round trip: reverse, then
apply, reproduces this tree byte for byte.

docs/rescope.md is the consumer-facing reference: the old-name/new-name table
with each package's role, what the rename deliberately leaves alone, the sites
callers must change, and the commands to apply, verify, and revert. The Agent
Note carries the decision and its consequences.

The rename itself lands in the next commit, produced by running the script.
2026-08-10 22:04:10 +08:00
Hypatia May
76061417d9 Merge remote-tracking branch 'origin/master' into fix/continuable-subagent-policy-inheritance
# Conflicts:
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.1.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.2.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.jsonl
#	examples/headless-agent/tests/snapshots/advanced-toolchain/session.1.jsonl
#	examples/headless-agent/tests/snapshots/advanced-toolchain/session.2.jsonl
#	examples/headless-agent/tests/snapshots/advanced-toolchain/session.jsonl
2026-08-10 22:02:36 +08:00
Hypatia May
084638af47 Merge remote-tracking branch 'origin/master' into fix/subagent-empty-terminal-message-output 2026-08-10 21:59:42 +08:00
Hypatia May
2b2899b4ce Merge remote-tracking branch 'origin/master' into fix/continuable-subagent-policy-inheritance
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/subagent/subagent-inprocess/src/index.ts
#	packages/subagent/subagent/package.json
#	packages/subagent/subagent/src/child-agent.ts
#	packages/subagent/subagent/src/continuation.ts
#	packages/subagent/subagent/tsconfig.json
2026-08-10 21:42:45 +08:00
Turtle
820bb29035 docs: sync repository removal translations 2026-08-10 21:32:13 +08:00
Turtle
a33ee3d4f0 docs: refresh MCP config catalog 2026-08-10 21:32:13 +08:00
Turtle
993550e6c8 refactor: remove repository plugin path 2026-08-10 21:32:13 +08:00
imccyu
717792b631 refactor: nest client manifest metadata under dsh 2026-08-10 21:11:09 +08:00
imccyu
854f6623bb docs: rename client manifest field references 2026-08-10 21:11:09 +08:00
Yichen Jiang
7175ba3d5e Merge remote-tracking branch 'origin/master' into worktree/fix-minimal-preset-prompt 2026-08-10 21:06:25 +08:00
Yichen Jiang
388ce89823 Merge remote-tracking branch 'origin/master' into worktree/fix-minimal-preset-prompt
# Conflicts:
#	apps/cli/config/agent-presets/minimal/preset.yml
2026-08-10 21:05:29 +08:00
Yichen Jiang
43f3324a7b fix(tools): restrict what a scope inherits, not just the global layer
A restriction was compiled against the global tool layer alone: only
global-layer tools were tested against `admits()`, and every chain-layer
tool was overlaid unfiltered afterward. That read the exempt set as "the
global layer" when what it means is "what this scope registers itself" —
two descriptions of the same set only while every model-facing tool sat in
the host composition.

Moving those rows onto the agent plane separated them. A preset's tools are
an ANCESTOR contribution to a joined agent, so a subagent's `toolFilter`
stopped constraining anything it was given; and with the global layer empty
`restrict()` rejected every name it received as unknown, failing the child
outright. With the same tools in the global layer the filter still admits
and applies normally, which is what makes this a regression of the move
rather than a standing limitation.

`view()` now filters everything a scope inherits — the global layer and
every ancestor layer on its chain — and exempts only the layer the scope
owns. That exemption is load-bearing rather than incidental: the delegation
runtime registers a child's `report` and structured-output tools into the
child's own layer, and a filter naming the capabilities the child may use
must not strip the machinery it answers through. Tool order, and with it
prefix-cache reuse, is unchanged: inherited names keep their global-then-
ancestor position and own-layer names still come last.

The diagnostic said "unknown global tool" while listing what is really the
inherited surface; it now names the surface it checks and says why an
own-layer name is not restrictable.

Fixes #2185
2026-08-10 20:34:45 +08:00
Yichen Jiang
6301320a63 Merge remote-tracking branch 'origin/master' into worktree/subagent-missing-tools-fb2359 2026-08-10 20:32:58 +08:00
Ziya
5cdebcf5f3 Merge branch 'master' into fs-overwrite-diff-bound-v2 2026-08-10 05:10:30 -07:00
Yichen Jiang
6dabf0ea99 docs(python): generalize SDK guide 2026-08-10 19:53:51 +08:00
Yichen Jiang
299cafad01 fix(python): rename SDK distribution 2026-08-10 19:45:54 +08:00
Hypatia May
9e40fc7f6b Merge remote-tracking branch 'origin/master' into fix/continuable-subagent-policy-inheritance 2026-08-10 19:40:14 +08:00
Yichen Jiang
dc524c2c93 Merge remote-tracking branch 'origin/master' into worktree/fix-minimal-preset-prompt 2026-08-10 19:30:51 +08:00
Yichen Jiang
20139a3fb7 docs(sdk): add minimal Python example 2026-08-10 19:30:46 +08:00
Yichen Jiang
2f481fa352 fix(apiproxy): echo the preset a created session runs, not its header
`session.create` also adopts an already-live session, and the preceding
commit newly allows adopting one under the preset it switched to while
blank. Its response still echoed `header.agentPreset`, so that adoption
answered with the preset the session had just left — contradicting the
request it had accepted and the row `session.list` serves for the same
session from `resolveSessionPreset()`. The echo now resolves the same way.

The `assertPresetUnchanged` parameter doc said `existing` was the preset
the session was created under; both callers now pass what it runs.

`composeFrom()` was documented as "infallible" and "cannot fail" beside two
`@throws`. It has no composition failure mode — no roster read, no mount, no
file — but it does reject a caller error, and the wording now says which.

The package-level "switched preset" test re-linked to the same preset id,
so it could not tell reading the parent's live scope chain from reading its
creation header. A second fixture preset makes the switch real.

The Web browser lane's subagent goldens gain the preset badge a child now
shows, which is the visible consequence of recording its composition. That
lane runs only under DSH_EXAMPLE_MODE=lib and was missed before.

The Agent Note records two limits found in review: a cold-resumed
continuable child joins its parent's current composition rather than the one
its header names, and `toolFilter` does not constrain a joined child. The
latter is a regression from the agent-plane move rather than anything this
change introduces — with the same tools in the global layer the filter
applies normally — and is tracked in #2185.

Refs #2185
2026-08-10 19:28:40 +08:00
Turtle
243ed09aaf Merge pull request #2046 from deepseek-harness/worktree/lightweight-doc-translation-20260808
docs(skill): make routine translation lightweight
2026-08-10 19:09:30 +08:00
Tianyi Cui
ef7195a00a fix(skill): enforce manual invocation policy 2026-08-10 18:04:26 +08:00
Yichen Jiang
86d5dd4384 fix(preset): align minimal agent with RL composition 2026-08-10 18:02:11 +08:00
Tianyi Cui
c5dd99124c docs: make routine translation lightweight 2026-08-10 17:58:09 +08:00
Yichen Jiang
da5d9aaee9 Merge remote-tracking branch 'origin/master' into worktree/subagent-missing-tools-fb2359 2026-08-10 17:57:59 +08:00
Yichen Jiang
e53f448650 fix(subagent): compose children from their parent's preset
Tool and prompt-section visibility is inherited along dsh-scope's parent
chain, and an agent's scope key is minted with no parent. Per-session agent
presets moved every model-facing row onto the agent plane and made
AgentPresets.mount() the one thing that binds that link, from the api-proxy's
session create, resume, and fork paths. The two in-process subagent drivers
installed only the per-child persona and tool filter, so a child's scope chain
had length one and its registry view resolved the global layer alone — which
is empty wherever a preset roster is composed. One-shot children reached the
model with no tools, continuable ones with only the host-plane `report`, and
neither carried its parent's persona, workspace context, or skill catalog.

AgentPresets.composeFrom() joins one agent to the standing composition another
already runs on. It is a bind, not a mount: the child gets its parent's exact
generation, so a composition edited since the parent started cannot fork it
onto another one, and it is synchronous, which is what lets a child creation
window use it. applyChildComposition() now takes the parent and performs the
join first, making a child composed without it unrepresentable at the call
sites. childSessionMeta() records the joined id so a cold read rebuilds the
composition the child actually ran under.

The audit that followed found two api-proxy readers on the wrong authority:
presenterScopeFor() and the live-agent branch of assertPresetUnchanged() both
read header.agentPreset, which goes stale the moment a blank session switches
preset. A switched session's cold transcript resolved presenters in the older
composition's layer and silently degraded to generic cards, and the gateway
refused to adopt a live session under the preset it actually runs while
accepting the one it left. Both now resolve through resolveSessionPreset(),
matching the resume branch fifteen lines above. The owning architecture Agent
Note carried the stale claim that the header records what a session runs; it
is corrected to name the header/log pair and its three readers.

Fixes #2165
2026-08-10 17:46:34 +08:00
Hypatia May
08e4f1b17c Merge remote-tracking branch 'origin/master' into fix/subagent-empty-terminal-message-output 2026-08-10 17:11:30 +08:00
ZiyaZhang
c969d69f10 Merge latest master into PR branch 2026-08-10 02:10:57 -07:00
ZiyaZhang
c950366bd9 fix(ci): bound native ACL coverage gate 2026-08-10 02:09:14 -07:00
Yichen Jiang
94f4183afd Merge remote-tracking branch 'origin/master' into worktree/web-theme-settings-integration-fde706 2026-08-10 17:05:18 +08:00
Hypatia May
1ac58714d1 Merge remote-tracking branch 'origin/master' into fix/continuable-subagent-policy-inheritance 2026-08-10 16:54:44 +08:00
Yichen Jiang
8ae1a9d6a8 Merge remote-tracking branch 'origin/master' into fix/preset-host-plane-task-registry 2026-08-10 16:53:03 +08:00
Hypatia May
9bb3a203ce Merge remote-tracking branch 'origin/master' into fix/continuable-subagent-policy-inheritance 2026-08-10 16:50:09 +08:00
Yichen Jiang
be7bf24169 Merge remote-tracking branch 'origin/master' into fix/preset-host-plane-task-registry 2026-08-10 16:45:13 +08:00
Yichen Jiang
2e55964865 Merge remote-tracking branch 'origin/master' into worktree/web-theme-settings-integration-fde706 2026-08-10 16:37:14 +08:00
Turtle
a27efdef36 docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
Turtle
8dc91d2c00 fix(feedback): report shared anonymous user id 2026-08-10 16:23:05 +08:00
ZiyaZhang
191c7625a4 Merge master and repair CI for bounded diff basis 2026-08-10 01:18:38 -07:00
Yichen Jiang
109059429a Merge remote-tracking branch 'origin/master' into fix/preset-host-plane-task-registry 2026-08-10 16:17:44 +08:00
Yichen Jiang
d2b74744fb Merge remote-tracking branch 'origin/fix/preset-host-plane-task-registry' into fix/preset-host-plane-task-registry 2026-08-10 16:13:21 +08:00
Hypatia May
b2b0f663d5 Merge remote-tracking branch 'origin/master' into fix/subagent-empty-terminal-message-output 2026-08-10 16:13:00 +08:00