Commit Graph
861 Commits
Author SHA1 Message Date
_Kerman 3df3a0dc00 test(tui-agent): match scripted triggers across the trailing user run
This branch intentionally appends plugin-sourced context (plan-mode
notices, the skill catalog) after the prompt, so the request's last message
is no longer the user's text. The scripted adapter keyed every scenario off
messages.at(-1) only, missed its triggers, and fell through to the
ask_user_question default — the frozen 'Waiting for the first token' PTY
timeouts. It now scans all text since the last assistant message.
2026-07-26 11:47:52 +08:00
_Kerman 6b4c26a1b9 fix(acp-snapshot): stabilize /private prefix and spill paths in snapshots
macOS symlinks /tmp → /private/tmp; when the session header cwd lacks
the /private prefix but fs tools resolve symlinks, tool result paths
get the prefix and the cwd replacement never matches.  Strip the prefix
before cwd→{{cwd}} replacement so both forms normalize identically.

Also extend refreshFixtureReplacements to match spill paths by filename
suffix, preventing raw fixture churn when a refresh runs from a
different session directory.
2026-07-24 23:00:17 +08:00
_Kerman 992cf894af refactor(agent): unify sourced message delivery 2026-07-24 22:38:50 +08:00
_Kerman 194b18a32f Merge remote-tracking branch 'origin/master' into xtr/agent-loop-message-machine
# Conflicts:
#	docs/cordis-catalog/services.md
2026-07-24 21:41:02 +08:00
_Kerman b73eb7663c refactor(agent-loop): simplify observable state machine 2026-07-24 21:18:48 +08:00
Tianyi Cui 9e691d54c0 fix(goal): normalize strict-schema fillers 2026-07-24 20:45:23 +08:00
Tianyi Cui 1731243fa0 Merge branch 'master' into feat/send-unify 2026-07-24 19:13:11 +08:00
Turtle e525b68106 Merge branch 'master' into feat/examples-third-party-llm-docs 2026-07-24 18:48:01 +08:00
_Kerman fb0ef82aa6 Merge remote-tracking branch 'origin/feat/send-unify' into xtr/agent-loop-message-machine
# Conflicts:
#	packages/client/runtime/src/client/sessions/fold-adapter.ts
2026-07-24 18:24:28 +08:00
_Kerman 879bc71864 refactor(agent): require explicit send options 2026-07-24 18:23:24 +08:00
_Kerman 1d9662a020 refactor(agent-loop): unify pending message representation 2026-07-24 17:23:33 +08:00
Turtle d2b2539f3e Merge remote-tracking branch 'origin/feat/send-unify' into feat/send-unify
# Conflicts:
#	docs/architecture.i18n.yaml
#	docs/architecture.md
2026-07-24 16:58:32 +08:00
Turtle 80bbe959a7 Merge remote-tracking branch 'origin/master' into feat/send-unify 2026-07-24 16:52:46 +08:00
_Kerman 6945a2c37d Merge remote-tracking branch 'origin/feat/send-unify' into xtr/agent-loop-message-machine 2026-07-24 16:31:49 +08:00
Turtle bb124c2869 Merge branch 'master' into feat/send-unify 2026-07-24 16:31:00 +08:00
ZiyaZhang 33ee34b58e fix(tui): make resume picker full-screen 2026-07-24 01:29:35 -07:00
Turtle c440217fde refactor(tui): defer cross-process resume locking 2026-07-24 01:29:35 -07:00
NI0317 2ae9f4fdf3 feat(tui): add safe session resume flow 2026-07-24 01:29:35 -07:00
_Kerman 66645638fb Merge remote-tracking branch 'origin/feat/send-unify' into xtr/agent-loop-message-machine
# 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/architecture.i18n.yaml
#	docs/architecture.md
#	docs/architecture.zh.md
#	docs/core-data-structures/core.md
#	packages/context/session-reference/README.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/src/inbox.ts
#	packages/core/agent-loop/tests/agent.spec.ts
#	packages/core/agent-loop/tests/cancel.spec.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	packages/core/agent-loop/tests/coverage-edges.spec.ts
#	packages/core/agent-loop/tests/interception.spec.ts
#	packages/core/agent-loop/tests/loop.spec.ts
#	packages/core/agent/README.md
#	packages/core/agent/src/types.ts
#	packages/core/agent/tests/agent.spec.ts
#	packages/ui/acp/src/index.ts
#	packages/ui/tui/src/index.ts
#	packages/ui/tui/tests/harness.ts
2026-07-24 16:25:53 +08:00
Turtle b02b438667 refactor(agent): align delivery method names 2026-07-24 15:08:36 +08:00
_Kerman 5c7505b208 refactor(agent): remove message metadata channel 2026-07-24 14:05:33 +08:00
Tianyi Cui d6d50deb24 refactor(agent): expose resolved input acceptance 2026-07-24 13:52:25 +08:00
NI0317 f97f9bcf8a chore(examples): declare @deepseek-ai/dsh-llm-pi-ai as an example dep
pi-ai is the library-backed twin adapter the tui-agent README already
points at ("swap one line to @deepseek-ai/dsh-llm-pi-ai"), and the
supported entry point for third-party providers (Anthropic, Google,
OpenRouter) mounted through the personal overlay under ~/.dsh. Making
it a declared workspace dep of the examples umbrella means
`pnpm install` resolves the symlink upstream so users configuring a
third-party provider via `~/.dsh/config.yaml` don't have to patch
`examples/package.json` locally (which their next git checkout would
wipe).

Placement matches the sibling llm-* cluster; workspace:* to match the
other adapters. No cordis.yml or README changes: mounting pi-ai
remains explicit and opt-in per the provider-routed-llm-adapters
Agent Note.
2026-07-24 13:23:28 +08:00
Tianyi Cui 086e454931 refactor(agent): name delivery methods by intent 2026-07-24 12:27:20 +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
Tianyi Cui 7a09ca8cd2 Merge remote-tracking branch 'origin/master' into worktree/pr540-merge-master-20260723 2026-07-23 22:34:49 +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 c688aa486c Merge remote-tracking branch 'origin/master' into worktree/remove-expose-internals 2026-07-23 22:08:44 +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 64eebc1b35 Merge branch 'master' into codex/plan-mode-active-exit 2026-07-23 21:52:23 +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
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
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
fz 8e4f666238 feat(plan): add direct plan exit command 2026-07-23 21:06:03 +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 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 eb0cc4eb18 refactor: drop obsolete expose-internals flag 2026-07-23 20:35:09 +08:00
Hypatia May 1e457b22e0 refactor(session-query): unify query service 2026-07-23 20:18:05 +08:00
Yichen Jiang 40ce342d81 Merge remote-tracking branch 'origin/master' into worktree/tui-file-autocomplete
# Conflicts:
#	docs/config-catalog.md
2026-07-23 19:32:13 +08:00
Turtle 44fd93fd06 feat(agent): unify send(target × wakeup), coalesce context/message into user/message
Replace send/steer/inject with one Agent.send primitive over the
(target × wakeup) matrix; followup/steer/inject become fixed-preset
alias methods on the now-abstract Agent class. Coalesce context/message
into user/message (injected context is a non-user source). Replace
agent/queued with agent/inbox/enqueue/dequeue/discard, add cancel
keepInbox, and add a FIFO-conservation invariant.
2026-07-23 19:15:45 +08:00
Tianyi Cui fa5c3fa0b9 Merge origin/master into codex/code-mode-complete-result-card 2026-07-23 17:59:58 +08:00
Yichen Jiang 23fc9cc226 feat(tui): add path-only @file autocomplete 2026-07-23 17:39:30 +08:00
Tianyi Cui 05cdee1471 Merge branch 'master' into worktree/llm-default-context-window 2026-07-23 17:31:17 +08:00
Tianyi Cui be62eecc60 test(acp): require a real sandbox denial 2026-07-23 16:39:02 +08:00
Yichen Jiang 6d7e4c339d feat(llm): add default context window fallback 2026-07-23 11:51:52 +08:00
Tianyi Cui 2821826e2c fix(pty): close final review gaps 2026-07-23 02:53:43 +08:00
Tianyi Cui 3f547a83d1 Merge branch 'codex/code-mode-typed-results' into codex/code-mode-complete-result-card
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-20-canonical-tool-output-contract.i18n.yaml
2026-07-23 00:03:56 +08:00