Commit Graph

211 Commits

Author SHA1 Message Date
Yichen Jiang
877364f7a4 Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui
# Conflicts:
#	packages/client/ui-conversation/tests/input-bar.spec.tsx
2026-08-09 22:57:23 +08:00
Yichen Jiang
4926b296c4 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
2026-08-09 22:56:44 +08:00
Yichen Jiang
19b6a41564 Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	scripts/doc-budgets.manifest.json
2026-08-09 21:36:55 +08:00
Yichen Jiang
5aa10901ad Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
2026-08-09 21:35:37 +08:00
Tianyi Cui
25dcd7293c docs: purge chain-of-thought leakage from prose
Delete design-session citations (decision/audit/plan ordinals, stack
positions), change narration, review choreography, and reviewer-addressed
justification from comments, JSDoc, docs, READMEs, Agent Notes, tests, and
generator templates; restate every affected fact as current-state contract
prose. Fix generated docs at their sources and regenerate the catalogs and
cordis-surface regions; re-paste type-equiv blocks; update every bilingual
counterpart and re-record the pairs. Record the citation rule in the
committed-artifact-citations Agent Note.
2026-08-09 21:10:59 +08:00
Yichen Jiang
801d39d131 Merge remote-tracking branch 'origin/stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui
# Conflicts:
#	docs/architecture.i18n.yaml
#	docs/architecture.zh.md
#	docs/module-graph.md
#	packages/host/apiproxy/src/api-proxy.ts
#	scripts/verify-package-readme-model-experience.ts
2026-08-09 20:38:21 +08:00
Yichen Jiang
f80d2a742e Merge remote-tracking branch 'origin/stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	docs/module-graph.md
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/tsconfig.json
2026-08-09 20:33:55 +08:00
imccyu
27682b9384 fix: docs 2026-08-09 19:00:22 +08:00
imccyu
522acc7432 test: update conversation assembly coverage and docs 2026-08-09 18:16:44 +08:00
Turtle
93e858faf9 docs: address prose review findings 2026-08-09 16:31:15 +08:00
Turtle
9704749b01 docs: replace vague provenance prose with recorded facts 2026-08-09 15:35:02 +08:00
Yichen Jiang
46f74c652f Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui
# Conflicts:
#	AGENTS.md
#	docs/architecture.i18n.yaml
#	docs/cordis-catalog/services.md
#	docs/module-graph.md
2026-08-09 03:16:18 +08:00
Yichen Jiang
4952afe5c0 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/module-graph.md
#	docs/subsystems/persistence.i18n.yaml
#	packages/client/ui-question/tsconfig.json
#	pnpm-lock.yaml
2026-08-09 03:05:10 +08:00
Tianyi Cui
f7323354bb docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs
Rebuild of the region machinery (PR3) on the post-#904 Typert projection:
renderPageRegion/renderInheritedPage live in dsh-typert-generator beside the
projection; scripts/gen-cordis-catalog.ts owns the curated SERVICE_PAGE /
EVENT_SCOPE_PAGE / SERVICE_WALK_EXEMPTIONS / LINK_MAP partition (fail-loud in
both directions, with the independent Context-merge scan backstopping the
projection's blind spot), spliceRegion, and the guarded pair auto-record.
docs/cordis-catalog/ is deleted: the flat events/services catalogs dissolve
into per-page regions and docs/cordis-catalog/core moves to docs/cordis-api/
with the inherited tier as its own generated page. The partition absorbs the
post-regrouping surface: ctx.typert → invariants.md, ctx.directoryPicker →
workspace.md, skills/* events → skills.md, and the four launcher-provided tui
accessor values join the named exemptions.
2026-08-09 01:31:57 +08:00
Tianyi Cui
ba3125234a docs: rename core-data-structures/ to subsystems/
The folder is becoming the home of one-doc-per-subsystem pages (intro +
data structures + cordis services/events), so the name must describe the
whole contract, not just the type-vocabulary third of it. Mechanical
rename rebuilt on current master: every inbound Markdown link, generator
constant, website route, type-equiv manifest path, and spec expectation
moves together; the zh sides of the notes whose prose names the folder
are aligned (子系统) in the same change; touched bilingual pairs
re-recorded; translation-prompt snapshot re-recorded (its example embeds
development.md). Historical Agent Note slugs keep their dated
filenames.
2026-08-09 01:27:09 +08:00
Tianyi Cui
36cf4f32f4 docs(agent-note): flip the regrouping note to implemented
Move the triplet to implemented/architecture/, rewrite Proposal into a
present-tense Decision, fold Acceptance criteria and Risks into
Consequences (recording what pins the result), retitle the migration
section to what the move actually touched, and repoint the seven
inbound FIXME/README links.
2026-08-09 01:25:24 +08:00
Tianyi Cui
7e445c3a67 refactor(session): fold the session family into packages/session/
git mv the 12 packages from session-persistence/, session-projection/,
session-title/, and telemetry/ into one session/ group per the
regrouping RFC; merge the four group READMEs into one bilingual
triplet; rewrite the group segment in tsconfig references (intra-group
references shorten to ../<pkg>), tsconfig.base.json paths/globs,
knip.json keys, vitest include, gate scripts, and authored doc/note
citations; regenerate module graph, doc graphs, catalogs, and the
lockfile importer keys. No npm names change.

Full unit suite: 8779 passed; the 18 reported failures reproduce as
env flakes (ambient-proxy IPv6 tunneling, watched-dir inotify
timeouts under parallel load) — each passes in isolation with
NO_PROXY set, matching their known pre-existing behavior on master.
2026-08-09 01:21:11 +08:00
Yichen Jiang
64c992238a Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui 2026-08-08 22:51:17 +08:00
Yichen Jiang
bcfab57318 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire 2026-08-08 22:47:15 +08:00
_Kerman
df30c62e2b fix(agent-loop): latch wakes landing in the cancel-convergence window 2026-08-08 19:42:42 +08:00
Yichen Jiang
d174edf9eb Merge pull request #2034 from deepseek-harness/worktree/merge-compact-card
feat(web): merge compact status and summary cards
2026-08-08 16:23:00 +08:00
Tianyi Cui
37e4e1585b fix(compact): enforce replay provenance 2026-08-08 15:28:35 +08:00
Tianyi Cui
8dcfe5c406 fix(replay): mark local compaction calls 2026-08-08 15:28:35 +08:00
Yichen Jiang
beec364e04 Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui
The Client API carrier's `agentPresets` member was the one member of its class
without an `IApiClient[...]` annotation. Inferring it inlined `AgentPresetEntry`
into the emitted declaration by the specifier TS picks — the host `index.ts` —
dragging the whole gateway, and with it the host `Context` merges, into every
Client program importing the carrier. Annotated like its siblings.

`ApiRemoteAgentOptions.setup` now takes the inspected session rather than its
header alone: this layer resolves a resumed session's preset from the LOG,
because a session that switched while blank ran its turns under the newer
composition and the header is written once at creation.

Conflicts:
	apps/web/tests/snapshots/*/*.expected.md
	packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
	packages/host/apiproxy/src/api-proxy.ts
	scripts/doc-budgets.manifest.json
2026-08-08 15:00:31 +08:00
Yichen Jiang
c5ca12eabd Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
master extracted this layer's inline cold-resume resolver into
@deepseek-ai/dsh-api-remotes, whose `setup` was a fixed AgentSetup. A resumed
session composes the preset ITS header recorded, so the option becomes a
function of that header; the resolver builds the setup before the published
re-checks so those stay adjacent to `resume`.

Conflicts:
	docs/cordis-catalog/services.md
	docs/module-graph.md
	packages/host/apiproxy/package.json
	packages/host/apiproxy/src/api-proxy.ts
	pnpm-lock.yaml
2026-08-08 14:26:38 +08:00
Yichen Jiang
1db327ea6c feat(web): merge compact status and summary cards 2026-08-08 14:11:26 +08:00
imccyu
9400926bdf feat(goal): add TypeRT gateway example 2026-08-07 21:47:14 +08:00
Yichen Jiang
d13cb724ee Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-5-web-ui 2026-08-07 16:22:02 +08:00
Yichen Jiang
41938b9da6 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	apps/web/tests/shipped-composition.e2e.ts
2026-08-07 16:20:38 +08:00
Yichen Jiang
98fbe0ee94 fix(web): record which preset a session actually runs
The creation header names the preset a session STARTED with and is frozen,
which is correct — it is a creation fact. Switching is legal only while a
session is blank, and that looked like enough: no history exists yet.

It is not, because the switch's effect outlives the blank window. The user
switches, then sends the first message; every turn from there runs under the
new composition while the header still names the old one. The session is
then locked around a misrecorded preset, and resume reads the header to
rebuild it — composing one preset's tools over a history another produced,
which is exactly the replay the blank-only lock exists to prevent, reached
by another route. A picker showed `standard` for a session running
`core-web`.

A switch is now an `agent-preset/selected` event appended after the swap
commits, and `resolveSessionPreset()` (last selection, else the header) is
what every reconstruction reads: the summary, resume, the conflict guard,
and the fork introduced one layer down.
2026-08-07 00:38:11 +08:00
Yichen Jiang
91b55b9245 feat(web): compose a web session's agent from a named preset
`session.create` takes an optional `agentPreset`, and the host resolves it,
mounts it during pre-publication setup, and records the resolved id on the
session header so a later resume rebuilds the same agent.

Resolution happens BEFORE the session exists, not inside setup: the session
boundary snapshots `meta` before asynchronous setup begins, so an id discovered
during setup could never reach the header. Mounting still happens in setup,
where a failure rolls the whole creation back rather than publishing a session
whose capabilities are half-installed.

Resume ignores whatever the request names and rebuilds from the stored id. A
resumed session's history was produced under that composition; restoring a
different one would replay tool calls the model can no longer make.

`dsh-agent-presets` now throws `UnknownPresetError` / `PresetMountError` so
the host can tell a bad request from a broken preset — they become
`agent-preset-not-found` and `agent-preset-invalid`.

Ships the two built-in compositions (`standard`, `core-web`) and the persona
row that lets them differ in identity. Nothing mounts them yet: no roster is
configured, so `composeAgent` finds no service and every session keeps the host
composition. Wiring the roster and moving base's agent-plane rows behind it is
the next commit, so the switch happens atomically with a real-composition test.
2026-08-07 00:35:30 +08:00
Turtle
da732cad72 Merge remote-tracking branch 'origin/master' into task/command-feedback-master 2026-08-06 18:38:35 +08:00
Turtle
96ac51f0c8 Merge origin/master into task/command-feedback-master 2026-08-06 16:02:25 +08:00
_Kerman
23671848c3 Merge remote-tracking branch 'github/master' into feat/agent-event-payload 2026-08-06 13:26:04 +08:00
_Kerman
ee44980c51 docs(session): refresh generated catalogs after agent event payload rework
Regenerate persistence catalog (types.ts line drift from retired
PreStepContext/RequestFailureContext) and drop the retired PreStepContext
entry from the type-equiv manifest.
2026-08-06 12:16:23 +08:00
imccyu
e5810d450e Merge remote-tracking branch 'origin/master' into mergebot/pr1667 2026-08-06 11:42:14 +08:00
imccyu
e089ef92d8 docs: document session preparation flow 2026-08-06 04:11:57 +08:00
imccyu
59df683ef1 fix(token-meter): bound projection state via logged shadow prices
The contextBreakdown and contextPressure units carried the full priced
surface, so each session's persisted projection checkpoint grew without
bound. A surface replacement is now priced by the shadow-price event
logged directly before it — compact/summary for compaction, the new
compact/prune from tool-result pruning (priced through the injected
token meter) — and the unit states shrink to a fixed handful of numbers.
Regenerate the persistence/cordis/module/config catalogs.
2026-08-06 02:50:38 +08:00
_Kerman
e874910a76 test(session): align turn-end contract artifacts 2026-08-04 14:09:52 +08:00
_Kerman
d4fa26023d fix(agent-loop): open turns before pre-step 2026-08-04 13:49:35 +08:00
_Kerman
2a9ebfcac2 fix(session): load pre-react-loop persisted sessions 2026-08-04 11:25:31 +08:00
_Kerman
ce60304648 chore(ci): regenerate stale catalogs and re-record translation pairs
- gen-cordis-catalog / gen-persistence-catalog / gen-doc-graphs after the
  error-reason and steering/message changes (line anchors and event
  producer/consumer graph drifted).
- verify-translation-pairing --write --all: every bilingual pair touched
  by the PR (agent notes, session/core docs, READMEs) plus the merge.
- queue-actions preserved golden re-recorded against the rebuilt client
  (branch disabled on non-completed-turn tails is back in effect).
2026-08-03 18:06:14 +08:00
_Kerman
cb2f01f48c refactor(agent-loop): drop the steering/message session event
Steer, inject, and followup now land as durable user/message events on the
session surface; the steering/message event type and its ConversationNode
kind are removed from the client projection. Update tests, docs, generated
catalogs, and agent notes to match, and align the steering e2e fixture and
prompt inventory assertions with the durable user/message landing.
2026-08-03 16:04:26 +08:00
_Kerman
49e90695cc refactor(agent): complete inbox lifecycle migration 2026-08-03 12:25:33 +08:00
_Kerman
1a09174987 refactor(goal): persist state with domain events 2026-07-31 22:52:18 +08:00
_Kerman
afedf18ccf fix inbox lifecycle downstream contracts 2026-07-31 22:00:39 +08:00
_Kerman
fcc2b5e282 refactor agent pre-step inbox lifecycle 2026-07-31 19:21:16 +08:00
_Kerman
7a463dbe44 Merge branch 'master' of https://github.com/deepseek-harness/deepseek-harness into xtr/react-loop-simplification
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-17-dedicated-full-screen-tui-front-door.i18n.yaml
#	docs/architecture.i18n.yaml
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/core-data-structures/core.md
#	docs/core-data-structures/core.zh.md
#	docs/core-data-structures/llm-streaming.i18n.yaml
#	docs/core-data-structures/llm-streaming.md
#	docs/core-data-structures/llm-streaming.zh.md
#	docs/core-data-structures/session.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/persistence-catalog.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/README.i18n.yaml
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent/README.i18n.yaml
#	packages/core/session/README.i18n.yaml
#	packages/core/session/src/types.ts
#	packages/llm/llm/README.i18n.yaml
#	packages/llm/llm/README.md
#	packages/llm/llm/README.zh.md
#	packages/llm/llm/src/index.ts
#	packages/llm/llm/tests/service.spec.ts
#	packages/sdk/sdk-client/README.i18n.yaml
#	packages/sdk/sdk-protocol/README.i18n.yaml
#	packages/sdk/sdk-protocol/README.md
#	packages/sdk/sdk-protocol/README.zh.md
#	packages/subagent/subagent-dsh-sdk/README.i18n.yaml
#	packages/ui/jsonrpc/README.i18n.yaml
#	packages/ui/jsonrpc/README.md
#	packages/ui/jsonrpc/README.zh.md
#	packages/ui/tui/src/index.ts
#	python/sdk/README.i18n.yaml
#	scripts/gen-cordis-catalog.ts
2026-07-31 10:16:14 +08:00
Yichen Jiang
5fd34f9109 fix(agent-loop): rematerialize adapter defaults 2026-07-30 21:49:58 +08:00
_Kerman
c891cb6f6f fix(agent): address initial review findings 2026-07-30 18:54:19 +08:00