Commit Graph

2334 Commits

Author SHA1 Message Date
Yichen Jiang
b964e81c11 Merge remote-tracking branch 'origin/master' into worktree/session-reference
# Conflicts:
#	docs/cordis-catalog/events.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/agent-loop/src/loop.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	packages/core/agent/src/types.ts
#	packages/ui/tui/tests/harness.ts
#	scripts/type-equiv.manifest.json
2026-07-21 21:57:21 +08:00
Yichen Jiang
8bc62e1013 Merge remote-tracking branch 'origin/master' into worktree/session-reference
# Conflicts:
#	.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/compact/compact-basic/src/region.ts
#	packages/compact/compact/README.md
#	packages/compact/compact/tests/compact.spec.ts
#	packages/examples/acp-demo/package.json
#	packages/ui/tui/README.md
#	packages/ui/tui/package.json
#	packages/ui/tui/src/index.ts
#	packages/ui/tui/tests/harness.ts
#	packages/ui/tui/tests/tui.spec.ts
2026-07-21 21:10:42 +08:00
Tianyi Cui
5d2f6da843 Merge remote-tracking branch 'origin/codex/enforce-tool-cancellation' into codex/enforce-tool-cancellation
# Conflicts:
#	packages/core/scope/tests/invariant.spec.ts
#	packages/ui/tui/tests/harness.ts
2026-07-21 20:27:58 +08:00
Tianyi Cui
70e50cd9be Merge commit 'refs/codex/unblock/master-current' into HEAD
# Conflicts:
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/bash-spill/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-rejected/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/session.jsonl
#	packages/context/workspace-context/tests/workspace-context.spec.ts
#	packages/core/agent/src/index.ts
#	packages/support/invariants/tests/invariants.spec.ts
#	packages/ui/acp/src/index.ts
#	packages/ui/tui/tests/harness.ts
#	packages/ui/tui/tests/tui.spec.ts
2026-07-21 20:20:53 +08:00
Yichen Jiang
8c6e28cef8 fix(session): simplify reference byte limits 2026-07-21 20:16:18 +08:00
Tianyi Cui
73ccb67469 Merge remote-tracking branch 'origin/master' into codex/enforce-tool-cancellation 2026-07-21 20:03:47 +08:00
Tianyi Cui
0004b8675f Merge remote-tracking branch 'origin/master' into codex/enforce-tool-cancellation
# Conflicts:
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/bash-spill/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-rejected/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/session.jsonl
#	packages/context/workspace-context/tests/workspace-context.spec.ts
#	packages/core/agent/src/index.ts
#	packages/support/invariants/tests/invariants.spec.ts
#	packages/ui/acp/src/index.ts
#	packages/ui/tui/tests/harness.ts
#	packages/ui/tui/tests/tui.spec.ts
2026-07-21 20:03:00 +08:00
Tianyi Cui
21721bf3b1 Merge branch 'master' into fix/compaction-kv-cache-reuse
# Conflicts:
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/src/summarizer.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
2026-07-21 19:45:43 +08:00
Tianyi Cui
72c6696e4f Merge branch 'master' into worktree/routed-model-compaction-policy
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-21 19:23:54 +08:00
Tianyi Cui
39c9bf3ef2 fix(llm-replay): publish recorded model capacity 2026-07-21 18:57:25 +08:00
Tianyi Cui
1cee25fdea fix(tui): resolve context capacity for active model 2026-07-21 18:45:27 +08:00
Tianyi Cui
39eb6e21cd Merge current master into invariant service seam 2026-07-21 18:35:24 +08:00
Tianyi Cui
78f8a3f5d9 Merge branch 'master' into worktree/routed-model-compaction-policy 2026-07-21 18:30:57 +08:00
Tianyi Cui
071fe76755 Merge latest master into invariant service seam 2026-07-21 18:27:46 +08:00
Yichen Jiang
f03b01d8bc Merge remote-tracking branch 'origin/worktree/session-reference' into worktree/session-reference 2026-07-21 18:20:56 +08:00
Yichen Jiang
70b67bd559 fix(acp): preserve command reference arguments 2026-07-21 18:19:42 +08:00
Tianyi Cui
8a93072537 Merge origin/master into worktree/tui-session-controls 2026-07-21 18:12:11 +08:00
Yichen Jiang
927c37ad1e Merge branch 'master' into worktree/session-reference 2026-07-21 18:03:47 +08:00
Tianyi Cui
c9a8c58467 Merge origin/master into lsp 2026-07-21 17:58:46 +08:00
Yichen Jiang
ebb62c482c fix(session): harden cross-session references 2026-07-21 17:54:44 +08:00
Tianyi Cui
5606a05e91 Merge origin/master into worktree/tui-session-controls 2026-07-21 17:46:47 +08:00
Tianyi Cui
504fbf59f3 fix(invariants): replay histories and pack companions 2026-07-21 17:46:43 +08:00
Yichen Jiang
c0d7ef22ec fix(subagent-acp): repair the composition fixture for the merged depth budget
Master landed the tool-subagent depth budget while this branch was in
flight: the numeric default maxDepth now fails the mount against the
ACP provider's depthLimit: false, so the composition fixture must state
maxDepth: 'provider-managed' — the documented opt-out for a provider
whose recursion budget lives in the child harness. The fixture also
moves off the retired stdio-demo REPL onto the current app-boot driver
pattern (runLoaderSmoke + one-shot cli), and the split isDirectory
statements gain the file-not-a-directory case the single-expression
form used to cover implicitly.
2026-07-21 17:14:10 +08:00
Tianyi Cui
744eb99268 Merge branch 'master' into fix/compaction-kv-cache-reuse 2026-07-21 17:03:00 +08:00
Tianyi Cui
35bb623cf4 Merge origin/master into worktree/routed-model-compaction-policy 2026-07-21 16:54:48 +08:00
Yichen Jiang
6fe8cfb5d1 Merge branch 'fix/acp-subagent-cwd' of github.com:deepseek-harness/deepseek-harness into fix/acp-subagent-cwd 2026-07-21 16:53:46 +08:00
Yichen Jiang
822651a2c7 test(subagent-acp): cover inherited cwd through a Loader composition
The inheritance branch ran only under hand-mounted plugin tests, and
the with-key e2e always configures an explicit cwd. Add a test-only
cordis.yml (scripted delegating model + the scripted mock ACP child)
booting the stdio app through the real Loader with cwd omitted: the
child proves it ran in — and was announced — the parent session's
workspace, keylessly.
2026-07-21 16:53:26 +08:00
Yichen Jiang
04117b58bd docs(subagent): align the parent contract with ACP cwd inheritance
SubagentStartRequest.parent, its core-data type-equiv mirror, and the
ACP backend Agent Note still said the out-of-process backend ignores
request.parent — no longer true: with cwd unconfigured it reads exactly
the session header's cwd, and a parent session without one now rejects
at start. State the one-field read at each owning contract, record the
workspace-resolution decision in the Agent Note, and align the README's
accessibility wording with the search-permission guard.
2026-07-21 16:51:49 +08:00
Yichen Jiang
fcbbd22af7 fix(subagent-acp): require search permission on the child cwd
statSync().isDirectory() is true for a mode-600 directory, but a
subprocess cwd needs X_OK — spawn would fail EACCES, deferring a
self-contained configuration error past the load/start boundary the
resolution owns. Probe accessSync(X_OK) alongside the type check so
"not an accessible directory" is literally what the guard verifies.
2026-07-21 16:51:32 +08:00
Tianyi Cui
29ef3b5a7e Merge origin/master into fix/acp-subagent-cwd 2026-07-21 16:51:28 +08:00
Yichen Jiang
8394898ef5 test(tui): await async session suggestions 2026-07-21 16:50:45 +08:00
Tianyi Cui
2477ef415a Merge origin/master into lsp 2026-07-21 16:47:35 +08:00
Yichen Jiang
6cd16fd424 Merge origin/master into worktree/session-reference 2026-07-21 16:47:04 +08:00
Yichen Jiang
32d786c439 feat(session): add cross-session references 2026-07-21 16:46:48 +08:00
Yichen Jiang
49a9bca9f6 fix: validate compaction config pairs 2026-07-21 14:49:57 +08:00
Turtle
a0268d2509 fix(compact-basic): replay conversation prefix so summarization reuses KV cache
Automatic compaction fires mid-conversation, right after the loop warmed
the provider's KV cache with the last routed request. The default
summarizer then issued a separate request whose prefix shared nothing
with that warm request — a bespoke summarizer system prompt followed by
the older history flattened to one rendered transcript string — so a
differing first token invalidated the entire cached prefix and every
compaction re-processed the whole replayed history twice.

Move the compaction directive from the FRONT (a fresh system prompt) to
the END (a trailing user message), and replay the last routed request's
own system prompt, tools, message prefix, and shadowed-region messages
verbatim via session.requestHeader() + deriveEventMessage. The auxiliary
call is now a genuine prefix-extension of the warm request, so the
provider reuses the cached tokens up to the trailing instruction.

SummarizationInput carries the replayed prefix instead of a flat string;
the now-unused renderTranscript/renderContentBlocks path is removed with
its spec. Cache reuse is best-effort (head compaction guarantees a hit;
a mid-range compaction or a differently-routed summarizer forgoes it),
correctness is not.
2026-07-21 13:55:22 +08:00
Tianyi Cui
bc60b9ffe8 fix(lsp): cancel blocked document opens 2026-07-21 13:52:15 +08:00
Tianyi Cui
2fd995bf3c fix(lsp): align operations and harden lifecycle 2026-07-21 13:29:40 +08:00
Huanqi Cao
5d6db0cd56 fix: stub DSH_HOME in 'labels the default DSH home' test
The test 'labels the default DSH home as ~/.dsh when HOME points at the
configured default' mocks node:os to return a temporary home directory
and expects discoverBaselineInstructionFiles to fall back to the default
~/.dsh path. However, when DSH_HOME is externally set (e.g. in the DSH
agent environment), resolveDshHome(undefined) reads that external value
instead of falling back to defaultDshHome(), causing the test to look for
AGENTS.md in the wrong directory and return an empty result.

Stub DSH_HOME to undefined so the test controls the full resolution path.
2026-07-21 13:08:34 +08:00
Tianyi Cui
d6bebc18f8 Merge remote-tracking branch 'origin/codex/enforce-tool-cancellation' into worktree/explicit-turn-signal
# Conflicts:
#	docs/architecture.md
#	docs/cordis-catalog/events.md
#	docs/core-data-structures/core.md
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent/README.md
#	packages/core/agent/src/types.ts
#	packages/ui/acp/src/index.ts
#	packages/ui/tui/src/index.ts
#	packages/ui/tui/tests/harness.ts
2026-07-21 12:48:46 +08:00
Tianyi Cui
43d50a38b1 Merge remote-tracking branch 'origin/master' into codex/enforce-tool-cancellation
# Conflicts:
#	docs/architecture.md
#	packages/core/agent-loop/README.md
2026-07-21 12:30:08 +08:00
Yichen Jiang
7e43f8661c Merge branch 'master' into fix/acp-subagent-cwd 2026-07-21 12:29:50 +08:00
Tianyi Cui
c6e1d35a99 fix(core): close turn cancellation contract gaps 2026-07-21 12:14:53 +08:00
Yichen Jiang
b6f6c58435 Merge remote-tracking branch 'origin/master' into worktree/routed-model-compaction-policy
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-10-after-call-compaction-pressure-and-overflow-recovery.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-10-after-call-compaction-pressure-and-overflow-recovery.md
#	.agents/notes/implemented/architecture/2026-07-10-after-call-compaction-pressure-and-overflow-recovery.zh.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	examples/headless-agent/tests/harness.ts
#	examples/repl-agent/cordis.yml
#	packages/compact/compact-basic/README.md
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
#	packages/compact/compact-basic/tests/loader-composition.spec.ts
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/llm/README.md
#	packages/llm/llm-deepseek/src/adapter.ts
#	packages/llm/llm-pi-ai/src/adapter.ts
#	packages/llm/llm/README.md
#	packages/llm/llm/src/index.ts
#	scripts/gen-cordis-catalog.ts
#	website/zh-CN/api/harness/events.md
#	website/zh-CN/api/harness/llm.md
#	website/zh-CN/api/harness/token-meter.md
#	website/zh-CN/guide/config.md
2026-07-21 10:17:55 +08:00
Yichen Jiang
a37e2e0f16 Merge remote-tracking branch 'origin/master' into worktree/tui-session-controls
# Conflicts:
#	docs/config-catalog.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/ui/acp/src/index.ts
#	packages/ui/tui/README.md
#	packages/ui/tui/src/index.ts
#	packages/ui/tui/tests/harness.ts
#	packages/ui/tui/tests/plugin-shape.spec.ts
#	packages/ui/tui/tests/snapshots/disposed-terminal.expected.txt
#	packages/ui/tui/tests/snapshots/errors-and-help.expected.txt
#	packages/ui/tui/tests/tui.spec.ts
2026-07-21 10:15:49 +08:00
Dudu-0223
2a55f6b684 Merge origin/master into lsp 2026-07-21 09:57:36 +08:00
Tianyi Cui
7eee0b48b7 Merge codex/invariant-service-seam into codex/invariant-service-review-fixes
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.i18n.yaml
#	scripts/test-invariants.ts
2026-07-21 01:25:18 +08:00
Tianyi Cui
d3ae708384 Merge origin/master into codex/invariant-service-seam
# Conflicts:
#	docs/module-graph.md
2026-07-21 01:23:19 +08:00
Tianyi Cui
55ef21d9d5 Merge origin/master into codex/invariant-service-seam
# Conflicts:
#	docs/config-catalog.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/package.json
#	packages/examples/agent-spine-demo/src/index.ts
#	packages/examples/tui-demo/package.json
#	packages/support/invariants/src/scoped-events.generated.ts
#	packages/ui/acp/package.json
#	packages/ui/tui/package.json
#	packages/ui/tui/tests/tui.spec.ts
#	pnpm-lock.yaml
2026-07-21 01:13:28 +08:00
Tianyi Cui
167a5e95e0 Merge codex/invariant-service-seam into codex/invariant-service-review-fixes
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.i18n.yaml
#	scripts/test-invariants.spec.ts
#	scripts/test-invariants.ts
2026-07-21 00:47:02 +08:00