Commit Graph

4669 Commits

Author SHA1 Message Date
Turtle
b02b438667 refactor(agent): align delivery method names 2026-07-24 15:08:36 +08:00
Tianyi Cui
9848a9542b docs: restore architecture headroom 2026-07-24 14:02:53 +08:00
Tianyi Cui
b01fc33492 Merge remote-tracking branch 'origin/feat/send-unify' into worktree/agent-message-intents
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-22-unified-send-and-coalesced-user-messages.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-22-unified-send-and-coalesced-user-messages.md
#	.agents/notes/implemented/architecture/2026-07-22-unified-send-and-coalesced-user-messages.zh.md
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/src/agent.ts
2026-07-24 13:59:37 +08:00
Tianyi Cui
d6d50deb24 refactor(agent): expose resolved input acceptance 2026-07-24 13:52:25 +08:00
Turtle
d613fdb073 fix(agent-loop): third review pass — disposal discard ordering, flush guard, docs
Address a fresh-eye review of the disposal/injection fixes:
- disposal now snapshots, clears, and marks disposed BEFORE emitting
  agent/inbox/discard (mirroring cancel's snapshot→clear→emit), so a
  re-entrant send/cancel from a discard listener throws 'disposed' or
  finds an empty inbox instead of leaking or double-discarding an id.
  The discard is unconditional (even on unpublished setup-rollback) to
  match send's unconditional enqueue, keeping every id balanced.
- restore the turnRecorded guard on the idle-injection flush: a
  turn/start rejected pre-commit (append reentrancy / internal-dispatch
  veto) records nothing and owes no flush; the previous unconditional
  flush emitted a phantom-turn agent/error. The isTurnOpen/turnRecorded
  branches are reachable (reentrant inject from a session/event
  listener) and now covered by a regression test rather than v8-ignored.
- rewrite the agent/inbox/discard event JSDoc to enumerate all three
  emitters (cancel, terminal turn-stop, disposal) — every enqueued id
  gets exactly one terminal dequeue-or-discard.

Per-file coverage stays 100%.
2026-07-24 13:39:06 +08:00
Tianyi Cui
1595f4c851 refactor(agent-loop): rename private input boundary 2026-07-24 13:01:48 +08:00
Tianyi Cui
086e454931 refactor(agent): name delivery methods by intent 2026-07-24 12:27:20 +08:00
Turtle
c7c1b97501 fix(agent-loop): address second-round review — disposal discard, injection validation, frozen payloads
Address the review bot's five genuinely-new findings on the current code:
- disposal now discards any still-pending inbox items before the loop
  exits, so every enqueued id gets a terminal lifecycle event.
- injection (next-step/no-wakeup) validates its payload up front, before
  opening the idle one-shot turn, honoring 'invalid input throws before
  any append'; and rejects attached contexts (which belong only to inbox
  messages) rather than silently dropping them.
- agentMessage() freezes the agent/inbox/* payload so a listener cannot
  mutate the shared correlation object mid-dispatch.
- refresh the package READMEs (compact, goal, guard, hook-protocol,
  plan-mode, time-context, workspace-context) that still referenced the
  removed context/message event, with the source-based user/message
  distinction.

The up-front injection validation makes two finally branches unreachable
(v8-ignored as the turn-enclosure backstop). Adds regression tests for
disposal discard, context rejection, up-front validation, and the frozen
payload; per-file coverage stays 100%.
2026-07-24 12:05:57 +08:00
Turtle
7b7f793ee5 test: fix CI coverage + e2e for user/message coalescing
- tui.spec: exercise a goal-sourced injected context card (labels by
  source kind, not plugin name), closing the last uncovered branch in
  tui/src/index.ts that the CI coverage gate caught.
- time-context.e2e / goal.e2e: filter injected context by source now
  that it is a user/message (plugin/goal source), and count goal
  continuation rounds by round>0 rather than event type.
2026-07-23 22:57:39 +08:00
Turtle
d5f88f1221 Merge remote-tracking branch 'origin/master' into feat/send-unify
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/pty/pty-local/tests/index.spec.ts
#	packages/session-query/session-query/tests/tracing.spec.ts
2026-07-23 22:41:45 +08:00
Turtle
1f9a3e1bee fix(agent-loop): second review pass — late-steering discard, dead-branch, catalog leaks
Address a second fresh-eye review of the review fixes:
- MAJOR: late steering that lands after runTurn returns terminally
  stopped (e.g. during the post-turn flush) was drained by runLoop and
  dropped without a discard, leaving a dangling outstanding id the
  negative-only invariant can't catch. Emit agent/inbox/discard for it,
  symmetric with the in-turn terminal-stop drop.
- remove the dead cancel() idle-settle branch: whenIdle's fast path
  already resolves for a lone quiet item, so no waiter is ever left for
  it to settle. Document why.
- gen-cordis-api classShape now drops private/protected/#private members
  and strips getter/setter bodies, so Session no longer leaks private
  fields and getter bodies into the model catalog.
- document that AgentMessage intentionally omits meta (durable-only).

Adds a regression test for the late-steering discard.
2026-07-23 22:33:12 +08:00
Tianyi Cui
a08a008fad Merge pull request #576 from deepseek-harness/worktree/remove-expose-internals
refactor: drop obsolete --expose-internals launches
2026-07-23 22:27:03 +08:00
Tianyi Cui
9fdbae66e7 Merge remote-tracking branch 'origin/master' into worktree/pr576-merge-master-20260723 2026-07-23 22:18:30 +08:00
Tianyi Cui
b06bcfd21c Merge pull request #532 from deepseek-harness/worktree/web-session-titles
feat(web): render log-backed session titles
2026-07-23 22:16:17 +08:00
Tianyi Cui
c688aa486c Merge remote-tracking branch 'origin/master' into worktree/remove-expose-internals 2026-07-23 22:08:44 +08:00
Tianyi Cui
ce232f8e28 Merge remote-tracking branch 'origin/master' into worktree/web-session-titles 2026-07-23 22:07:31 +08:00
Tianyi Cui
4edd4f3572 Merge pull request #322 from deepseek-harness/session-query-search
feat(session-query): add SQLite full-text search
2026-07-23 22:04:58 +08:00
Tianyi Cui
85335acd10 Merge remote-tracking branch 'origin/master' into worktree/web-session-titles 2026-07-23 22:00:59 +08:00
Tianyi Cui
404da65595 Merge branch 'master' into worktree/web-session-titles
# Conflicts:
#	apps/web/tests/smoke-real.e2e.ts
#	packages/client/connection/tests/fixture.spec.ts
#	packages/host/runtime/README.md
#	packages/host/runtime/src/api-proxy.ts
2026-07-23 22:00:17 +08:00
Hypatia May
00191e75dd Merge remote-tracking branch 'origin/master' into session-query-search 2026-07-23 21:55:59 +08:00
Tianyi Cui
84e74ff1f0 Merge pull request #577 from deepseek-harness/codex/plan-mode-active-exit
feat(plan): add direct plan exit command
2026-07-23 21:55:23 +08:00
Tianyi Cui
64eebc1b35 Merge branch 'master' into codex/plan-mode-active-exit 2026-07-23 21:52:23 +08:00
Hypatia May
712c84f06f fix(session-query): validate before service registration 2026-07-23 21:48:12 +08:00
Turtle
98ee4ce429 fix(agent-loop): address review — quiet-item parking, meta, discard balance
Resolve six review findings on the unified-send change:
- quiet (wakeup:false) queued items no longer un-park the driver; the
  inbox distinguishes hasWakingQueued (drives the loop, idle/quiescence)
  from hasQueued (anything to dequeue), so a lone quiet item parks at idle
  and rides the next waking send. whenIdle/cancel settle off the waking
  signal, so cancelling a parked quiet item no longer hangs whenIdle.
- SendOptions.meta on queued/steering sends now reaches the durable
  user/message and steering/message (was dropped except on injection).
- a terminal agent/turn-stop that drops pending steering emits
  agent/inbox/discard so the enqueue-dequeue-or-discard ledger balances.
- the loop-authored continuation reason is snapshotted and frozen like a
  public send.
- gen-cordis-api collects exported classes (body-stripped) so the now-
  abstract-class Agent and its transitive shapes reappear in the API
  catalog.

Adds regression tests for each and re-records the affected snapshot.
2026-07-23 21:41:42 +08:00
fz
5e8943fd1c fix(plan): make direct exit discoverable 2026-07-23 21:34:40 +08:00
Hypatia May
72fdf57c00 Merge remote-tracking branch 'origin/session-query-search' into session-query-search 2026-07-23 21:34:23 +08:00
Hypatia May
9482affc48 fix(session-query): make persisted observation non-mutating 2026-07-23 21:33:28 +08:00
fz
a7b0e69797 test(snapshot): update plan command metadata 2026-07-23 21:22:36 +08:00
Tianyi Cui
f9120a944c Merge master into session-query-search 2026-07-23 21:18:05 +08:00
Tianyi Cui
f712bca316 Merge pull request #529 from deepseek-harness/worktree/pty-review-fixes
fix(pty): close review lifecycle gaps
2026-07-23 21:14:37 +08:00
Hypatia May
c1fa985c20 Merge remote-tracking branch 'origin/master' into session-query-search
# Conflicts:
#	docs/architecture.i18n.yaml
#	packages/client/ui-sidebar/tests/sidebar-root.spec.tsx
#	packages/session-persistence/session-persistence-jsonl/src/index.ts
#	packages/session-persistence/session-persistence/README.md
2026-07-23 21:13:29 +08:00
Tianyi Cui
bd04f759a0 Merge master into worktree/pty-review-fixes 2026-07-23 21:09:10 +08:00
Tianyi Cui
73699dba8d Merge pull request #531 from deepseek-harness/worktree/web-ask-user-question
feat(gui): add ask-user question composer
2026-07-23 21:07:19 +08:00
fz
8e4f666238 feat(plan): add direct plan exit command 2026-07-23 21:06:03 +08:00
Tianyi Cui
b7ae34b67c test(tool-tasks): cover bounded output rendering 2026-07-23 21:04:26 +08:00
Turtle
c402cc2422 test(snapshot): re-record acp fixtures after merging master
Merge took master's snapshot fixtures; re-record the two keyless
scenarios so they reflect this branch's user/message coalescing and the
abstract Agent + AgentMessageId type dump.
2026-07-23 20:58:35 +08:00
Turtle
a3ad5241ba Merge remote-tracking branch 'origin/master' into feat/send-unify
# Conflicts:
#	docs/persistence-catalog.md
#	examples/acp-agent/tests/snapshots/code-mode-workspace-context/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/context/time-context/tests/time-context.spec.ts
#	packages/cordis/tool-cordis/src/api-catalog.ts
2026-07-23 20:54:48 +08:00
Tianyi Cui
0fb6a2540c Merge commit 'fc123040d824069a679a52bac84b2e3554589436' into worktree/pty-review-fixes 2026-07-23 20:52:05 +08:00
Tianyi Cui
ea019beae9 Merge branch 'master' into worktree/web-session-titles 2026-07-23 20:51:17 +08:00
Tianyi Cui
26bfd37da0 Merge commit 'refs/codex-unblock/20260723/master' into worktree/pty-review-fixes
# Conflicts:
#	.agents/notes/implemented/feature/2026-06-30-interception-seams.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/tools.md
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/tools/README.md
#	packages/core/tools/src/index.ts
#	packages/core/tools/src/schema.ts
#	packages/core/tools/tests/tools.spec.ts
#	packages/pty/tool-pty/README.md
#	packages/pty/tool-pty/src/index.ts
#	packages/pty/tool-pty/src/render.ts
#	packages/tasks/tool-tasks/README.md
#	packages/tasks/tool-tasks/src/index.ts
2026-07-23 20:50:45 +08:00
Tianyi Cui
d1f9230384 Merge branch 'master' into worktree/remove-expose-internals 2026-07-23 20:50:38 +08:00
Hypatia May
d24a875c5d fix(session-query): protect live reconciliation 2026-07-23 20:50:29 +08:00
Turtle
866b543700 docs(agent): fix stale 'info' param name in agent/inbox/enqueue JSDoc
The @param was renamed info→message; the body sentence still named info.
Found by fresh-eye review. Regenerated the catalog/graph docs.
2026-07-23 20:50:13 +08:00
Tianyi Cui
ea75abd71e docs(gui): correct client coverage lane 2026-07-23 20:45:36 +08:00
Turtle
3fd72f7c74 feat(agent): rename InboxItemInfo to AgentMessage with an id; send returns it
Add a branded AgentMessageId assigned to each accepted send message and
returned from send/followup/steer/inject (was void). Rename the inbox
event payload InboxItemInfo to AgentMessage, carrying that id so a caller
can correlate a queued item with its enqueue/dequeue/discard events.
2026-07-23 20:45:29 +08:00
imccyu
48a390473e Merge branch 'master' into worktree/web-ask-user-question 2026-07-23 20:43:07 +08:00
Tianyi Cui
8833fc2b58 Merge pull request #571 from deepseek-harness/worktree/web-carrier-chain
refactor(gui): kind-agnostic PendingWait carriers and the composer slot chain
2026-07-23 20:42:29 +08:00
Tianyi Cui
2a62da8ff0 test(web): make real title smoke deterministic 2026-07-23 20:41:10 +08:00
imccyu
8f54ccae7f Merge branch 'worktree/web-carrier-chain' into worktree/web-ask-user-question 2026-07-23 20:36:20 +08:00
Tianyi Cui
eb0cc4eb18 refactor: drop obsolete expose-internals flag 2026-07-23 20:35:09 +08:00