Commit Graph
95 Commits
Author SHA1 Message Date
Tianyi Cui e974a655a0 Revert "feat(session, agent, web): support same-session message editing" 2026-09-02 21:20:07 +08:00
lsdsjy ef88756f13 feat(session, agent, web): support same-session message editing 2026-09-02 18:26:55 +08:00
Turtle bec6805d6a refactor(session-persistence)!: handle-based seam with a lifecycle-owned write path
The persistence seam is now create/open/stat/list returning per-session
SessionHandles (read/append/flush/close); every log read and write flows
through the owning handle. The seam package exports only the service and
handle contracts, consumer-visible errors, and pure durable-data
validation helpers; each backend owns its complete storage runtime, and
the shared contract suites pin equivalent observable behavior. The
backend routes published sessions' live events by id into the active
write handle; agent-loop only acquires, seeds, and closes the handle.
Resume appends interruptedTurnClosers through its write handle;
session-query owns the revision-keyed cold cache. Legacy-only surfaces
are removed in the same swap: locate/readRaw/supportsRawArtifacts, the
legacy event-shape read migration, zstd torn-frame salvage,
DSH_SESSION_JSONL, and hook transcript_path population; a torn final
zstd frame is discarded whole; the session-list cold blank probe returns
on stat metadata (eventCount derived from the last physical row,
sizeBytes). The WebUI ZIP export serializes the logical log from a read
handle, so both backends export identically.

Refs #3245
2026-09-01 23:19:02 +08:00
Tianyi Cui 27bf1039db refactor(session)!: distinguish event seqs from log offsets 2026-09-01 20:36:00 +08:00
_Kerman ad02fa37b4 Merge remote-tracking branch 'github/master' into xtr/session-log-read-api 2026-08-31 20:50:19 +08:00
imccyu 6f0daff1dd fix(session-projection): compare observed live views 2026-08-31 19:59:54 +08:00
Yichen Jiang db5417ff6f fix(session-controller): keep refused jumps from parking a stale target
loadThrough now assigns its low-water target only when it owns the loop
(retargeting stays inside the running-jump branch): a call refused while
a plain load-earlier pull holds the pager no longer leaves jumpTargetSeq
behind to drag a later jump all the way to the head. The loop also
carries the doOpen stale-pass guard so a mid-flight resync stops it
instead of paging the new stream generation toward the old target.
2026-08-31 19:46:55 +08:00
Yichen Jiang 218bb7f645 feat(session-controller): loadThrough deep history paging
Session.loadThrough(seq) loops the existing prepend pager (200-message
pages) until the window covers the target seq, with a shared low-water
retarget for repeated calls, a no-progress guard against empty pages
still claiming history, and loadOlder's fail-soft error posture. Busy
state rides the existing loadingOlder snapshot bit.
2026-08-31 19:46:53 +08:00
_Kerman 687ae5c9c0 Merge remote-tracking branch 'github/master' into xtr/session-log-read-api
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-25-web-client-session-scope-and-provide-channel.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-25-web-client-session-scope-and-provide-channel.md
#	.agents/notes/implemented/architecture/2026-07-25-web-client-session-scope-and-provide-channel.zh.md
#	.agents/notes/implemented/feature/2026-08-05-context-form-vocabulary.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-05-context-form-vocabulary.md
#	.agents/notes/implemented/feature/2026-08-05-context-form-vocabulary.zh.md
#	packages/examples/agent-spine-demo/tests/agent-core.spec.ts
#	packages/skill/tool-skill/tests/tool-skill.spec.ts
2026-08-31 17:19:59 +08:00
_Kerman 6c63e708b8 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-2907
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/persistence-catalog.i18n.yaml
#	docs/subsystems/session.i18n.yaml
#	packages/api/session-controller/tests/transport.host.spec.ts
#	packages/bundle/headless/src/index.ts
#	packages/core/session/README.i18n.yaml
#	packages/schedule/schedule/README.i18n.yaml
#	packages/schedule/schedule/README.md
#	packages/schedule/schedule/README.zh.md
#	packages/session-query/tool-session-query/src/workspace-access.ts
#	packages/session/session-log-deepseek/src/index.ts
2026-08-31 10:56:53 +08:00
creatixchu 6516fbcde8 Merge origin/master into worktree/steer-followup-images 2026-08-31 10:37:39 +08:00
Tianyi Cui 2c6ff296af Revert "Merge pull request #3087 from deepseek-harness/worktree/remove-ignorable-session-events"
This reverts commit 2123b2f418b1c8fbb86dc327b598fb11423da226, reversing
changes made to 3c0b5c68ce697537a21084f9135663017474a2e1.
2026-08-30 12:26:20 +08:00
imccyu 18480ff902 test(connection): verify and document recovery behavior 2026-08-29 11:18:58 +08:00
imccyu 674a1e95a3 fix(api): rename the failure marker, harden cross-realm discrimination, and mark the packed-record violation
- protocol: isDSHRemoteGatewayError -> isDSHRemoteError (the class is
  protocol-wide, not Gateway-specific); remoteErrorOf drops its
  instanceof Error precondition and tests the marker plus a string code
  structurally, so a marked failure from another realm no longer reads
  as a local defect.
- session-controller: the live-follow packed-record protocol violation
  now throws a marked RemoteError('gateway/internal'), landing the
  session in openState=error instead of an unhandled rejection;
  pinned at the transport and session levels.
- util-time: correct the invariant companion's @module name.
- regenerate the tool-cordis catalog for the marker rename.
2026-08-29 03:12:43 +08:00
imccyu 2f2e6d627b fix(api): resolve review findings on stream boundary, inject staleness, and ctx discipline
- api/gateway: mark terminal Remote-stream escapes (carrier retry
  exhaustion and pre-acceptance end classification) as
  RemoteError('gateway/internal') at the two escape points; marked
  failures pass through verbatim. The carrier class stays the
  retry-internal signal for carrierFailed and the ended(true) retry
  trigger. Regression coverage lands on the session and workspace
  stream consumers.
- client/ui-tool, client/ui-workspace: read $host.home through a hooks
  observable subscribed to connection/reset; the slot renderer memoizes
  inject results per entry, so the previous plain-value injection froze
  home at the first render.
- client/ui-settings-models: components no longer receive ctx; apply
  binds the credential and settings Remote operations into callbacks,
  and the settings/conflict code judgment stays in the apply world.
2026-08-28 22:37:36 +08:00
imccyu 804b1ffbfc refactor(api): converge the Remote failure vocabulary and client surface
Single RemoteError with a merge-extensible, domain-prefixed code map;
owners throw at the failure point; streams surface marked failures;
clients consume ctx.remote directly with isRemoteFailure as the only
discrimination point and construct no failure instances.
2026-08-28 22:37:36 +08:00
creatixchu 3b2e5105e6 Merge remote-tracking branch 'origin/master' into worktree/steer-followup-images 2026-08-28 15:19:28 +08:00
_Kerman 5660f44d29 perf(session): separate indexed and snapshot log reads 2026-08-28 13:25:58 +08:00
_Kerman d25ace0f22 refactor(api): require the session projection registry 2026-08-28 12:50:51 +08:00
creatixchu b9060b4f9b Merge remote-tracking branch 'origin/master' into worktree/steer-followup-images
# Conflicts:
#	packages/context/file-reference-local/tests/search.spec.ts
2026-08-27 23:29:17 +08:00
_Kerman 13c1541c63 Merge remote-tracking branch 'github/master' into xtr/session-projection-migrations
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	pnpm-lock.yaml
2026-08-27 23:18:55 +08:00
creatixchu 0158adc926 Merge remote-tracking branch 'origin/master' into worktree/steer-followup-images
# Conflicts:
#	docs/event-producer-consumer.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-08-27 22:33:20 +08:00
imccyu 40929d6e1a refactor(client): replace host description consumers 2026-08-27 22:26:28 +08:00
imccyu e036aae7c0 refactor(connection): carry Host facts with generations 2026-08-27 22:26:28 +08:00
imccyu 18ae39a665 fix(api): preserve native path opening behavior 2026-08-27 21:57:58 +08:00
imccyu 89ee54ebb7 test(api): align migrated client contracts 2026-08-27 21:57:57 +08:00
imccyu 88f2f0aaec test(api): complete migrated Remote coverage 2026-08-27 21:57:57 +08:00
imccyu 160706be60 test(api): refresh Remote migration artifacts 2026-08-27 21:57:56 +08:00
creatixchu 21d2d9395d refactor: align prompt admission and echo ownership 2026-08-27 20:14:18 +08:00
creatixchu 53f5418a72 fix: 稳定 steer 提交回显位置 2026-08-27 17:25:36 +08:00
creatixchu abe185205b fix: scope prompt catalog type to client 2026-08-27 16:49:15 +08:00
creatixchu b67663c583 fix: retain prompt parts in client catalog 2026-08-27 16:42:11 +08:00
_Kerman d9c0aa1cd0 Merge remote-tracking branch 'github/master' into xtr/session-projection-migrations
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.md
#	packages/context/session-reference/package.json
#	packages/context/session-reference/tests/session-reference.spec.ts
#	packages/subagent/tool-subagent/src/index.ts
#	packages/subagent/tool-subagent/src/invariant.ts
#	packages/subagent/tool-subagent/src/model-selection-state.ts
#	packages/subagent/tool-subagent/tests/harness.ts
#	packages/subagent/tool-subagent/tests/list-models.spec.ts
#	packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts
#	packages/subagent/tool-subagent/tests/tool-subagent.spec.ts
#	pnpm-lock.yaml
2026-08-27 16:38:06 +08:00
creatixchu 381ea9fc5d Merge branch 'master' into worktree/steer-followup-images
# Conflicts:
#	packages/api/session-controller/src/client/contract/session.ts
2026-08-27 15:53:14 +08:00
creatixchu 7c38fd8102 fix: deliver images reliably with steer and follow-up messages
A steer or follow-up accepted while a turn is closing is now claimed by a
fresh turn at the driver's clean exit instead of stranding in the inbox;
cancellation and pre-step rejection still park accepted work. Continuable
subagent follow-ups accept image parts: the wire is upload-shaped, the Host
admits and persists each batch before inbox acceptance, and delivery is
refused when the child model declines image input. The queue dock renders
durable image thumbnails instead of an [image] text marker.

Fixes #3186
2026-08-27 15:30:35 +08:00
_Kerman eeb4ca2b87 Merge remote-tracking branch 'origin/master' into xtr/session-projection-migrations 2026-08-27 12:03:10 +08:00
creatixchu 16a7ead9ab Merge remote-tracking branch 'origin/master' into codex/pr-3111-review
# Conflicts:
#	scripts/ci-workflow.spec.ts
2026-08-27 10:57:27 +08:00
imccyu 5918dd205e refactor(client): use settings Remote namespaces 2026-08-27 03:01:02 +08:00
imccyu 6e4087626d refactor(apiproxy)!: remove directory-picker RPCs 2026-08-27 02:20:39 +08:00
creatixchu 3031cb0e33 Merge remote-tracking branch 'origin/master' into codex/pr-3111-review
# Conflicts:
#	packages/api/session-controller/src/client/contract/snapshot.ts
#	packages/test-support/client-runtime/src/sessions.ts
2026-08-26 15:34:18 +08:00
_Kerman 81e07e3935 Merge remote-tracking branch 'origin/master' into xtr/session-projection-migrations 2026-08-26 15:15:04 +08:00
imccyu 91fea67745 test(subagent): cover Remote control migration 2026-08-26 14:52:53 +08:00
creatixchu fab41be07e Merge remote-tracking branch 'origin/master' into codex/pr-3111-review 2026-08-26 14:21:56 +08:00
_Kerman 737691054a Merge remote-tracking branch 'origin/master' into xtr/session-projection-migrations
# Conflicts:
#	packages/core/agent-loop/tests/agent-initiator.spec.ts
#	packages/core/tools/tests/tools.spec.ts
#	packages/fs/tool-fs/tests/tools.spec.ts
#	packages/schedule/schedule/tests/plugin.spec.ts
#	packages/session/session-checkpoint-policy/tests/fixtures/crash-child.ts
2026-08-26 13:36:05 +08:00
creatixchu b22cc3e95b Merge master and address submission echo review 2026-08-26 13:20:24 +08:00
creatixchu f1606e31d2 test(web): 提交回显的组装路径 e2e 与不可见标记
PendingSubmissionBubble 携带 data-submission-echo 标记(渲染不变,仅供检测),
新增 keyless 组装 e2e:发送按键当下回显即在流中、composer 已清空可编辑,
durable 节点到达后原位替换且只剩一条气泡。
2026-08-26 12:12:08 +08:00
creatixchu 1da466a0a6 test+docs: 回显生命周期、去重与预览移交的覆盖,README 与 Agent Note
新增 sendSession 回显编排、ChatView 回显渲染与 rpcId 去重、control 队列 rpcId
投影、HistoricalImageCache.seed、MessageImage 预览 arm 的测试;四个包 README
双语更新;Agent Note 记录 rpcId 关联与延帧退休决策。
2026-08-26 12:01:27 +08:00
creatixchu 5657066b1d test: 修复回显契约扩散到的类型化 fake 与断言 2026-08-26 11:51:35 +08:00
_Kerman 4325672ad6 Merge origin/master into xtr/session-projection-migrations 2026-08-26 11:48:52 +08:00
creatixchu 98da332260 feat(session-controller): 客户端本地提交回显与 rpcId 关联
beginSubmission 在 prompt 之前同步把本地提交回显写入 SessionSnapshot.pendingSubmissions;
durable user/message(source.rpcId)或队列投影(SessionQueuedItem.rpcId)到达后延迟一帧退休,
prompt 失败与放弃立即退休并回调 onRetire。fixture 的 prompt 同步回显 requestId。
2026-08-26 11:48:33 +08:00