Commit Graph

3544 Commits

Author SHA1 Message Date
Chinesezjc
a9a12ad720 Merge remote-tracking branch 'origin/master' into feat/py-types-code-mode 2026-08-05 11:46:45 +08:00
imccyu
ca27512529 fix(packages): omit source publication payloads 2026-08-05 01:15:19 +08:00
Huanqi Cao
acda0e39bc Merge remote-tracking branch 'origin/master' into feat/pwsh-tool 2026-08-04 20:39:17 +08:00
Huanqi Cao
39b0695d48 Merge remote-tracking branch 'origin/master' into feat/pwsh-tool
# Conflicts:
#	apps/cli/composition.md
#	docs/testing.i18n.yaml
#	docs/testing.md
#	docs/testing.zh.md
2026-08-04 17:54:45 +08:00
imccyu
7f3a2dae91 fix(web): quiesce websocket teardown 2026-08-04 16:42:50 +08:00
imccyu
a36c641db6 chore(docs): refresh WebSocket API catalogs 2026-08-04 16:21:09 +08:00
fz
193d918856 Merge remote-tracking branch 'origin/master' into codex/fix-headless-sigint
# Conflicts:
#	apps/cli/README.i18n.yaml
#	apps/cli/README.md
#	apps/cli/README.zh.md
#	apps/cli/config/base.cordis.yml
2026-08-04 15:18:48 +08:00
Turtle
10bb9cbf4a cleanup: remove TUI package and legacy dsh entrypoints 2026-08-04 13:20:28 +08:00
fz
f0e5a39d19 Merge remote-tracking branch 'origin/master' into codex/fix-headless-sigint 2026-08-04 11:07:36 +08:00
Turtle
5329bef04d perf(tui): incremental step timing and card render caches for long sessions
Resuming a long session (196k events, 2.2k steps, 1.8k tool cards) took
~12s to render and ~800ms to echo one keystroke:

- Every step's timing footer called stepTimingAt, which replayed the whole
  event log per footer - O(steps x events) on the initial render.
- pi-tui re-renders every component each frame and relies on per-component
  line caches, but ToolCardComponent/ContextCardComponent built throwaway
  Text/Markdown instances inside render(width), re-wrapping every settled
  card's output on every keystroke.

Replace the per-footer replay with one shared StepTimingTracker per chat
mount (single O(events) cursor over the append-only log), and cache card
rows by width via CardLineCache, dropped by every state mutator and
invalidate().

Measured (tmux 200x50, 196k-event session): resume prompt-ready ~12s -> ~7.6s;
per-keystroke echo ~800ms median -> ~11ms.
2026-08-04 00:37:10 +08:00
Huanqi Cao
9abc0723dd Merge remote-tracking branch 'origin/master' into feat/pwsh-tool 2026-08-03 23:44:38 +08:00
Huanqi Cao
b978c62a22 Merge pull request #1119 from deepseek-harness/feat/ripgrep-packaged-binary
feat(fs-search): spawn the packaged ripgrep binary through the subprocess seam
2026-08-03 23:31:29 +08:00
Huanqi Cao
f14f826648 revert(bash): drop the executor dialect guard
The ShellDialect marker on BashExecutor and the load-time rejection in
tool-bash/tool-pwsh force every test and example fake executor to declare
a dialect for a guard with no in-repo or plausible deployment to catch
(shipped compositions always pair the tool with its matching executor),
and they break the example composition suites that stub ctx.bash without
a dialect (agent-spine-demo/cli-demo/acp-demo lost the bash tool).

Keep the non-dialect doc fixes that landed with the attempt: the tool-bash
README bashEnv contract trim with the stale example import removed, the
acp-snapshot suite.ts 'usable pwsh' JSDoc, and the pwsh.cordis.yml comment
indent. The parity note records the attempt and revert under Alternatives.
2026-08-03 23:16:53 +08:00
Huanqi Cao
3d1166fcdd feat(bash): shell tools reject a mismatched executor dialect at load
The seam gains ShellDialect ('bash' | 'powershell' - concrete shells, not
families: zsh or fish would be their own values, never 'bash'); bash-local
declares bash (bash-sandbox inherits), pwsh-local declares powershell, and
both tools throw at load when the mounted executor speaks another dialect -
previously tool-pwsh over bash-local handed PowerShell text to bash -c and
the deployment error surfaced as ordinary nonzero exits. Pinned by mismatch
tests on both tools; the parity note records the contract (both languages).

Also from the review round: the tool-bash README's managed-environment
section becomes a summary linking the owning dsh-bash-env contract (the
duplicated prose carried a stale owner in its example import), the
pwshOnly JSDoc drops the stale 'on PATH' phrasing, and the task-tools
contract comment in the two pwsh compositions is indented into its block.
2026-08-03 22:47:53 +08:00
fz
003d297442 Merge remote-tracking branch 'origin/master' into codex/fix-headless-sigint 2026-08-03 22:21:46 +08:00
fz
ef23b88ad4 fix(cli): bound telemetry shutdown on signals
Refs #1356
2026-08-03 22:08:47 +08:00
Turtle
fea88291c1 docs: regenerate module graph for tui projection deps 2026-08-03 21:29:29 +08:00
Turtle
25d8bfac31 Merge remote-tracking branch 'origin/master' into perf/tui-resume-scan
# Conflicts:
#	packages/ui/tui/README.i18n.yaml
2026-08-03 21:16:51 +08:00
Turtle
7a26214a81 feat(tui): resolve resume titles through the projection cache
session-title already registers a title projection unit; /resume now
reads it instead of scanning logs: live rows from the registry
snapshot, persisted rows from the durable checkpoint row
(cachedSnapshot, zero I/O), and only rows without a usable checkpoint
pay a coldSnapshot — checkpoint plus readFrom tail, written back so the
next scan is metadata-only. Cold reads are bounded by the new
resumeScanConcurrency config; compositions without the cache fall back
to the bounded readTitleSnapshots batch. The TUI overlay mounts the
projection registry, storage, and projection-cache rows over the same
storages root the web surface uses, so checkpoints serve both.
2026-08-03 21:13:52 +08:00
Huanqi Cao
a228fe15a2 docs(graph): regenerate the module graph for the merged tree
The merge resolved the module-graph.md conflict by regenerating doc GRAPHS
(gen-doc-graphs) while this file belongs to gen-module-graph; verify-module-graph
is a static-lane gate outside doc-sync, so the staleness only surfaced on CI.
2026-08-03 20:31:43 +08:00
Huanqi Cao
ffeccc138b Merge branch 'feat/ripgrep-packaged-binary' into feat/pwsh-tool
# Conflicts:
#	docs/module-graph.md
2026-08-03 20:22:16 +08:00
Huanqi Cao
0ee198d70e Merge remote-tracking branch 'origin/master' into feat/ripgrep-packaged-binary 2026-08-03 20:19:49 +08:00
imccyu
ae5ee37591 Merge remote-tracking branch 'origin/master' into mergebot/pr927-r3
# Conflicts:
#	packages/ui/tui/README.i18n.yaml
#	packages/ui/tui/src/components/dialogs.ts
2026-08-03 17:57:50 +08:00
imccyu
6b79907ffd Merge remote-tracking branch 'origin/master' into worktree/fix-multi-select-custom-answer 2026-08-03 17:19:53 +08:00
Turtle
3b58ed65b7 feat(tui): wrap and page question dialogs 2026-08-03 17:19:40 +08:00
Turtle
4edb828364 Merge remote-tracking branch 'origin/master' into codex/pr-1037-resolution
# Conflicts:
#	packages/ui/tui/README.i18n.yaml
2026-08-03 16:49:18 +08:00
Yichen Jiang
85b9914934 Merge remote-tracking branch 'origin/master' into worktree/fix-multi-select-custom-answer
# Conflicts:
#	packages/ui/tui/README.i18n.yaml
2026-08-03 16:26:55 +08:00
Yichen Jiang
109d5b5e1c Merge remote-tracking branch 'origin/master' into worktree/fix-multi-select-custom-answer
# Conflicts:
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	apps/web/tests/snapshots/question-composer/session.jsonl
#	docs/core-data-structures/user-interaction.i18n.yaml
#	packages/client/ui-question/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/ui/tui/README.i18n.yaml
#	packages/ui/user-interaction/README.i18n.yaml
2026-08-03 16:09:17 +08:00
Turtle
4fa1d48bf9 Merge remote-tracking branch 'origin/master' into pr/tui-details-fold 2026-08-03 15:56:02 +08:00
Turtle
bea60a430e Merge remote-tracking branch 'origin/master' into pr/tui-details-fold
# Conflicts:
#	docs/cordis-catalog/services.md
#	packages/ui/tui/README.i18n.yaml
#	packages/ui/tui/README.md
#	packages/ui/tui/README.zh.md
#	packages/ui/tui/src/index.ts
2026-08-03 15:55:22 +08:00
Chinesezjc
72b0835ac5 Merge remote-tracking branch 'origin/master' into feat/py-types-code-mode 2026-08-03 14:54:37 +08:00
Chinesezjc
823b83f97a Merge remote-tracking branch 'origin/master' into feat/py-types-code-mode
# Conflicts:
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	packages/core/tools/README.i18n.yaml
2026-08-03 11:08:42 +08:00
kingwl
57e2433f45 show subagent token metrics 2026-08-03 01:19:36 +08:00
kingwl
c831c99981 keep subagent duration fix focused 2026-08-03 01:08:32 +08:00
Huanqi Cao
b482f12d57 fix(coverage): probe the pwsh exemption with the executor's own resolution
The review caught the pwshCoverageExclusions comment claiming the inverse of
the code's behavior: a bare-PATH probe FAILING grants the exemption, so a
win32 host where only install-location pwsh (or 5.1) resolves kept the
exemption while its suites ran - over-exempting, never tightening.

resolvePwshPath/candidatePwshPaths move to the dependency-free
pwsh-local/src/resolve.ts (index.ts re-exports; public API unchanged) and
vitest.config.ts probes with that shared definition, so the exemption is
active exactly when the suites skip. The two spec headers stop saying
'on PATH' for a probe that is deliberately not PATH-only, and the parity
note records the abort backport as the one both-ways parity change (both
languages, pairing re-recorded); catalogs regenerated for the line shift.
2026-08-03 00:21:17 +08:00
kingwl
6b6acbe0c5 Merge master into subagent usage branch
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-27-web-subagent-conversations.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-27-web-subagent-conversations.md
#	.agents/notes/implemented/feature/2026-07-27-web-subagent-conversations.zh.md
#	apps/web/tests/snapshots/subagent-conversation/tree.expected.md
#	apps/web/tests/subagent-conversation.e2e.ts
#	packages/client/ui-subagent/src/client/SubagentCatalogAction.tsx
2026-08-02 23:37:17 +08:00
kingwl
b30686d634 show subagent usage and active duration 2026-08-02 23:31:24 +08:00
Tianyi Cui
1ea72962eb Merge master into fix/subagent-stack-end-result 2026-08-02 23:13:00 +08:00
Huanqi Cao
37bceb7dad Merge branch 'feat/ripgrep-packaged-binary' into feat/pwsh-tool 2026-08-02 22:29:44 +08:00
Huanqi Cao
ffb7d681f4 Merge remote-tracking branch 'origin/master' into feat/ripgrep-packaged-binary 2026-08-02 22:28:21 +08:00
ZiyaZhang
820a5a97f1 review(tool-goal,llm-replay): address ds-review-bot round one
- fromRequest placeholder: the last two braces of a consecutive } run now
  terminate the placeholder, so patterns may end with a brace quantifier
  (bot warning; the truncated pattern could even silently mis-match since
  an unclosed { is literal in JS regexes)
- document that derived JSONL entries pass through the same resolution
- widen ToolRunContext/deferContext seam docs beyond composite-only usage
  (source JSDoc, README pair, core-data-structures type-equiv blocks)
- pin direct-human blocked as uninstructed, completing the
  goal-round/direct-human x complete/blocked test quadrant
2026-08-02 07:19:26 -07:00
Huanqi Cao
725cd3afd0 docs(catalog): regenerate the cordis services catalog for the scrub JSDoc line shift 2026-08-02 22:06:29 +08:00
Huanqi Cao
b2838fb2be fix(pwsh): close the remaining review threads
- scrubbedParentEnv folds case before the DSH_ prefix check (Windows env
  names are case-insensitive; a parent dsh_* entry read back as \*
  in the child) and the service spec pins the lowercase probe.
- The acp.snapshot.ts pwsh probe follows resolvePwshPath() like the package
  suites, so a Windows host with only an install-location pwsh still runs
  the scenario.
- pwsh-tool-turn is re-recorded around [Console]::Out.Write('PWSH_OK'):
  the fixture carries no platform newline, so one recording replays on
  Windows and POSIX alike (record + refresh; replay-verified keyless).
- The pwsh-local Known Limitations bullet drops the self-defeating no-op
  advice: & { } is scoped to param(...), using/#requires scripts run from a
  file (both languages, pairing re-recorded).
- The capability-seams graph moves ctx.bashEnv ownership to bash-env and
  lists pwsh-local/tool-pwsh on the ctx.bash seam (source updated,
  docs regenerated).
- The tool-bash presenter fixture retires the stale 'command aborted'
  literal for the shipped 'tool call aborted' message.
2026-08-02 21:46:53 +08:00
Huanqi Cao
7b7525c091 fix(fixtures): repair the cancel-fixture abort error placement; exempt pwsh-local coverage on pwsh-less hosts
The hand-edit in 348ab41151 put the seq-17 abort error inside the tool-result
message and dropped a closing brace, breaking every JSONL consumer; tool-calls.ts
appends 'error' as a data-level sibling of 'message' (the seq-19 shape), so the
fixture now matches the emitter.

Coverage: pwsh-local's executor suites self-skip without a real pwsh, which left
per-file 100% unreachable on pwsh-less contributor hosts (mirror of the existing
windowsCoverageExclusions contract). A PATH-only probe exempts only
pwsh-local/src/index.ts; CI runners ship pwsh and still enforce the full bar.
docs/testing.md (+zh, pairing re-recorded) names the prerequisite; the testing.md
budget rises 1120->1150 because the coverage-gate contract genuinely grew.
2026-08-02 21:28:22 +08:00
ZiyaZhang
666ef95f81 fix(tool-goal): let the model deliver a wrap-up message after a goal-round complete/blocked
A goal round reporting complete or blocked used to conclude the turn at
the tool result, so the model never spoke after the call and sessions
ended on a bare update_goal card. The terminal update now defers one
plugin-sourced <goal_complete>/<goal_blocked> instruction onto its
result asking for a grounded closing message without further tool
calls; the turn then ends through the ordinary no-tool-calls stop.
Direct-human mutations stay uninstructed. Wording chosen by A/B
sampling on deepseek-v4-pro; one extra request per goal lifecycle.

New keyless ACP snapshot goal-wrapup drives the shipped app through
create -> round one -> autonomous complete and pins the injection, the
same-turn closing message, and the completed turn end.
2026-08-02 05:58:45 -07:00
Tianyi Cui
da80b0e5e6 chore(docs): refresh the descriptor catalog pointer
Correcting the cold-resume module contract added one JSDoc line above SubagentDescriptorData, but the generated persistence catalog still linked the durable subagent/descriptor event payload to descriptor.ts line 36. That left a dead source pointer and made the repository documentation gate fail even though the catalog content itself was otherwise current.

Regenerate docs/persistence-catalog.md so its source link follows the declaration to line 37. This is a generated-reference correction only: it does not change the durable event vocabulary, payload shape, or runtime behavior.

Validated with pnpm run verify-persistence-catalog and git diff --cached --check; the generator reports the catalog is up to date.
2026-08-02 20:34:43 +08:00
Tianyi Cui
b54381f3e7 fix(agent): commit mutable setup at publication
Agent setup may await while a mutable contribution registry changes. The previous subagent path validated and committed its provisioning batch inside the setup callback. A revocation queued after that callback returned therefore treated the installation as resident and released it, even though AgentLoop had not published the child yet. AgentLoop could then admit and announce a child whose required capability had already disappeared.

Introduce AgentSetupCommit as the optional synchronous result of create and resume setup. AgentLoop now awaits setup, invokes that commit with no intervening asynchronous boundary, and only then enters the Session and Agent registries. A commit failure follows the existing private-transaction rollback, so neither identity is published and the caller can reuse the id.

Keep continuable-subagent installations provisional until this publication commit. Contribution removal still releases every installation immediately, but now marks an unpublished batch invalid so its commit rejects with ACTIVATION_SETUP_REVOKED. Once the commit succeeds, later removal remains ordinary live revocation.

Cover create and resume ordering, resume commit rejection and identity reuse, and an assembled microtask revocation that leaves only the parent Agent and Session. Update the public JSDoc, architecture flow, package contracts, current Agent Notes, Chinese counterparts, pairing records, and generated Cordis API to describe the new boundary.

Validated with the four focused Agent/subagent test files (91 tests), the isolated assembled regression, targeted TypeScript project builds, generated Cordis API freshness, export JSDoc verification, scoped translation pairing, Markdown wrapping, and Mermaid parsing.
2026-08-02 20:09:05 +08:00
Huanqi Cao
ed39ff096f test(fixtures): pin the TOOL_ABORTED message and keep the pwsh fixture replayable; restore trimmed testing.md clauses 2026-08-02 20:07:26 +08:00
Huanqi Cao
5e437d3996 docs(pwsh): scope the encoding claim, document the PATH probe and preamble limitation, and fix catalog requires lists 2026-08-02 19:37:45 +08:00
Huanqi Cao
c376802f44 fix(acp-snapshot): skip pwshOnly scenarios without pwsh and mount task tools in the pwsh composition 2026-08-02 19:37:09 +08:00