Commit Graph

3982 Commits

Author SHA1 Message Date
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
Tianyi Cui
047348300a Merge pull request #2069 from deepseek-harness/worktree/auto-i18n-merge-driver
feat(i18n): compose pairing records during merges
2026-08-09 01:12:05 +08:00
Tianyi Cui
9c13a62702 fix(i18n): preserve merge conflicts without runtime 2026-08-09 00:37:46 +08:00
Tianyi Cui
450ec99325 fix(e2b): address the v7 review round
- restore the parent's AGENTS.md body around this branch's e2b row (the
  replay had resurrected the pre-profile-CLI layout, deleting the api/,
  bundle/, settings/, and credentials/ groups); the fs/lsp row
  condensations stay for the word budget
- aggregate the composite rollback failure, not the original error, when
  private state cleanup also fails — a surviving remote group is no
  longer hidden by a later cleanup error (triple-failure regression)
- own the state directory before the makeDir RPC, matching the terminal
  transaction, so a cancellation racing a committed creation still
  enters cleanup
- drop the hidden pollMs parameter defaults; the schemastery default is
  the one home, and tests pass the cadence explicitly
- restore spawn/spawnTerminal graceMs validation to the seam's
  documented bound (the earlier removal cited subprocess-local as not
  validating; it does), with rejection regressions
2026-08-08 22:52:25 +08:00
Tianyi Cui
0569437ff3 chore(rebase): regenerate third-party notices and the module graph
Master turned THIRD_PARTY_NOTICES.md into generator output (the branch's
hand-added e2b row carried a stale dotenv entry), and the cascade's
ours-side resolution flattened the module graph to the parent's content;
both regenerate from the current tree.
2026-08-08 22:19:13 +08:00
Tianyi Cui
d488330ba4 fix(rebase): migrate the replayed E2B branch onto the rebased parent
The linear replay carried old-lineage content over parent-owned files;
this checkpoint restores them and adapts the branch to the parent's
post-rebase seam:

- restore all pty/lsp/subprocess/code-runtime surfaces to the parent's
  exact content (this branch claims none of them) and drop the net-zero
  code-runtime-e2b/pty-e2b/lsp-e2b residue and its registrations
- widen serializeRemoteEnvironment to the seam's NodeJS.ProcessEnv
  tombstone contract: an explicit undefined removes an ambient entry
- migrate the two E2B fixture Agent stubs to the Inbox-model interface
  and Session.create
- re-apply the branch's gen-doc-graphs roles, THIRD_PARTY_NOTICES e2b
  row, and packages/README group row (trimmed to the doc budget);
  regenerate catalogs and re-record bilingual pairings
2026-08-08 22:19:13 +08:00
Tianyi Cui
f5866fc202 fix(e2b): address review round on cadence config, disposal, and SDK edge cases
- subprocess-e2b: the 20 ms remote poll cadence becomes a validated pollMs
  Config field (each tick is one control-plane request); the README documents
  the latency-versus-request-count trade.
- subprocess-e2b: extract src/remote.ts owning asError, signalOpts,
  commandOpts, delay, waitTick, and one tolerant signalRemoteGroups shared by
  the pgid-keyed process ladder and sid-keyed terminal ladder, so the two
  teardown paths keep identical error tolerance.
- subprocess-e2b: service disposal aggregates sibling cleanup failures into
  one AggregateError instead of discarding all but the first.
- subprocess-e2b: waitForProcessGroupId refuses published group ids <= 1, so
  a same-UID rewrite of the pid file cannot aim termination at kill -- -1;
  README documents the same-UID control-state limitation.
- subprocess-e2b: drain-grace expiry now releases an inherited-output E2B
  callback blocked on host backpressure before disconnecting, so the SDK
  settlement cannot stay pinned behind an unread host stream.
- subprocess-e2b: spawn/spawnTerminal stop validating typed spec fields
  (trust-TypeScript rule; pty-local validates its config before specs exist);
  resolveExecutable rejects separator-containing relative paths per the seam
  contract; terminal setups tracked as a Set of records.
- subprocess-e2b: PTY output push-without-backpressure is a documented
  contract (flowing consumer folds bytes; paused consumer buffers).
- fs-e2b: streamText normalizes the pinned SDK's empty-file '' return into an
  empty stream instead of throwing on getReader().
- e2b overlays: comment the one-world cwd invariant across e2b.cwd,
  workspaceRoot, and bash-local's implicit default workdir.
2026-08-08 22:19:13 +08:00
Tianyi Cui
b1b2d63785 refactor(e2b): drop speculative cleanup retry state 2026-08-08 22:19:13 +08:00
Tianyi Cui
de77310c6f refactor(e2b): narrow the sandbox POC 2026-08-08 22:19:13 +08:00
Tianyi Cui
677541d123 fix(e2b): close proven provider boundary gaps 2026-08-08 22:19:12 +08:00
Tianyi Cui
81e2e1f647 fix(e2b): harden SDK shell and cleanup boundaries
E2B starts command and PTY requests through login shells, so isolate each control shell behind a fresh randomized HOME and blank sandbox credential names before mutable profiles can run. Preserve the real remote HOME only for the requested argv.

Collapse duplicate termination state, keep failed force cleanup retryable until quiescence is observed, and make terminal state allocation cancellable. Leave numeric PGID reuse as an explicit provider-level TODO because a userspace precheck would remain TOCTOU.
2026-08-08 22:19:12 +08:00
Tianyi Cui
2188cb908c refactor(e2b): delegate terminal lifecycle 2026-08-08 22:19:11 +08:00
Tianyi Cui
6667102890 Add E2B PTY, LSP, and code runtime providers 2026-08-08 22:19:10 +08:00
Tianyi Cui
e7b682f1f6 feat(e2b): add remote runtime providers 2026-08-08 22:19:10 +08:00
Tianyi Cui
9a4b70cf3b fix(i18n): harden stopped-merge recovery 2026-08-08 21:49:23 +08:00
Tianyi Cui
d47df8ff9d chore(rebase): refresh generated docs after the round-two replay
Restores master's vitest config and packages-README pairing record (the
replay had carried old-lineage copies; this branch claims neither), and
regenerates the doc graphs, catalogs, and architecture pairing the
replay's ours-side resolutions had flattened to master's content.
2026-08-08 21:28:00 +08:00
Tianyi Cui
18ab9f6db2 fix(rebase): migrate the replayed stack onto current master APIs
The linear replay carried each commit's own lineage, so this checkpoint
restores the master-owned surfaces the conflicted regions clobbered and
migrates branch-owned code to master's post-rebase APIs:

- rebuild subprocess-local spawn.ts on master's tree-exit-observer
  machinery, keeping the branch's win32 childEnv key semantics and the
  Linux zombie-quiescence probe; the zombie test reaps its survivor
  directly since a confirmed-absent verdict is a permanent
  no-more-signals boundary
- migrate pty-local test stubs to the Inbox-model Agent interface,
  Session.create, runnerFailureRules, and the new turn/start payload
- implement the seam's resolveExecutable/spawnTerminal abstracts in the
  new pwsh-local and tool-fs-search test fakes
- restore code-runtime, atomic-write, pwsh-local, and app-boot to
  master's exact content (the net-zero code-runtime churn is pruned
  from this history) and drop rename-detection graft debris
- re-apply the PR's architecture rows and execution-world paragraph,
  re-record bilingual pairings, regenerate catalogs, and reconcile the
  lockfile
2026-08-08 21:27:59 +08:00
Tianyi Cui
4d5345794d refactor(code-runtime): remove subprocess backend 2026-08-08 21:27:59 +08:00
Tianyi Cui
87b2c5d93f docs(runtime): remove stale runtime storage claims 2026-08-08 21:27:59 +08:00
Tianyi Cui
22fc228b97 refactor(runtime): collapse unused setup layers 2026-08-08 21:27:59 +08:00
Tianyi Cui
ff86795b15 fix(pty): close provider cancellation races 2026-08-08 21:27:58 +08:00
Tianyi Cui
b71dbbe766 fix(runtime): close review lifecycle and bound gaps 2026-08-08 21:27:58 +08:00
Tianyi Cui
c1d550de58 refactor(runtime): collapse speculative portability layers
Remove the one-consumer bounded-read primitive and shared terminal lifecycle controller, make terminal cleanup one awaited provider operation, and reuse one Code Runtime contract suite. Keep only reproduced cancellation and policy fixes; defer unproven replacement, prompt-attribution, and streaming-frame concerns to scoped markers.
2026-08-08 21:27:58 +08:00
Tianyi Cui
4997fb219e fix(lsp): preserve execution-world URI semantics 2026-08-08 21:27:56 +08:00
Tianyi Cui
8917ff8ef4 refactor(runtime): compose consumers over fs and subprocess 2026-08-08 21:27:55 +08:00
Tianyi Cui
3abe813fd3 docs(i18n): document automatic pairing merges 2026-08-08 21:12:00 +08:00
Hypatia May
ddea7b398e docs: refresh tool catalog after stack merge 2026-08-08 20:02:37 +08:00
Hypatia May
d769d3cbb7 feat(subagent): let ancestors interrupt descendants
interrupt_agent(agent_id) passes the calling agent as the ancestor
authority for ctx.subagents.interrupt(); the service verifies live
registry identity and recorded lineage, so a direct child or deeper
descendant stops with the same generic parameter while send_message keeps
its exact-direct-parent authority.

Discovery: list_agents gains an optional scope. descendants walks the new
SubagentService.listDescendants() — one lineage trace flattened in stable
pre-order across ordinary and one-shot intermediates, each entry carrying
its verified parentId and depth — and every status now comes from the
live Agent registry (running/idle/complete).

Refs #1535
2026-08-08 20:02:37 +08:00
Hypatia May
336c84baf0 docs(subagent): clarify interrupt edge cases 2026-08-08 20:02:36 +08:00
Hypatia May
57e9e6977c docs(subagent): record the public interrupt in the continuation contract docs
The continuable-subagent core-data page and the continuation lifecycle
Agent Note claimed no public subagent cancellation existed; interrupt()
is now that one public stop. Both pages and their Chinese counterparts
state the shipped contract and link the owning interrupt note.

Refs #1535
2026-08-08 20:02:36 +08:00
Hypatia May
66a21a38b1 feat(subagent): add current-turn interrupt RPC
ctx.subagents.interrupt() stops one live continuable child's current turn
via Agent.cancel(cause, { keepInbox: true }) under either a human durable
parent address or an exact live ancestor Agent. Fire-and-return: admission
is synchronous, quiescence is not awaited. Pending inbox work, the
Activation, and published descendants are preserved; only a later waking
send resumes the parked FIFO queue. Absent, one-shot, and disposing
targets are accepted no-ops.

The new Host RPC subagent.interrupt calls only that primitive with user
authority — no catalog, history, persistence, or parent-registry lookup —
so a live child stays stoppable while its parent Agent is offline.

Refs #1535
2026-08-08 20:02:36 +08:00
_Kerman
df30c62e2b fix(agent-loop): latch wakes landing in the cancel-convergence window 2026-08-08 19:42:42 +08:00
imccyu
61f3982348 fix: gen docs 2026-08-08 16:53:24 +08:00
Tianyi Cui
a44e35793c Merge pull request #2048 from deepseek-harness/worktree/batch-session-persistence
Batch durable session writes with a bounded delay
2026-08-08 16:51:15 +08:00
Tianyi Cui
41b2fd7a70 Merge pull request #1145 from deepseek-harness/fix/f4-ask-user-child-guard
fix(user-interaction): guard human interaction by runtime ownership
2026-08-08 16:47:24 +08:00
Turtle
bd518cb684 Merge pull request #1696 from deepseek-harness/codex/dsh-badge-plugin
feat: add optional dsh badge skill provider
2026-08-08 16:33:00 +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
9614bce6c6 docs(graph): refresh session persistence dependency 2026-08-08 16:08:03 +08:00
Tianyi Cui
8dcbabc3a4 docs: refresh module graph 2026-08-08 16:04:24 +08:00
Tianyi Cui
2268f0ecec Merge origin/master into codex/dsh-badge-plugin 2026-08-08 16:03:30 +08:00
Tianyi Cui
74a8e2e776 Merge remote-tracking branch 'origin/master' into worktree/fix-pr1145-revised-guard-20260808 2026-08-08 16:00:25 +08:00
Tianyi Cui
724a0fb16c Merge remote-tracking branch 'origin/master' into worktree/batch-session-persistence 2026-08-08 15:54:48 +08:00
Tianyi Cui
e3162f3ba6 Merge origin/master into worktree/batch-session-persistence 2026-08-08 15:44:12 +08:00
Tianyi Cui
924c954469 feat(session): bound persistence write batching 2026-08-08 15:43:52 +08:00
Tianyi Cui
6d0a14d428 Merge origin/master into codex/dsh-badge-plugin 2026-08-08 15:42:47 +08:00
Tianyi Cui
e0f113f55b Merge origin/master into codex/dsh-badge-plugin 2026-08-08 15:33:41 +08:00
Tianyi Cui
ed808adef3 Merge remote-tracking branch 'refs/remotes/origin/master' into worktree/fix-pr1145-revised-guard-20260808 2026-08-08 15:30:59 +08:00
Tianyi Cui
dc64c5f1c2 fix: guard human interaction by runtime ownership 2026-08-08 15:30:08 +08:00
Tianyi Cui
ec556b7ced docs: refresh replay config source link 2026-08-08 15:29:36 +08:00
Tianyi Cui
49dff10abd fix(workspace-context): commit projections after tool steps 2026-08-08 15:29:36 +08:00