Commit Graph

88 Commits

Author SHA1 Message Date
Turtle
478079cc98 test: close the merged branches' coverage gaps
Cover the fs-provider load path without a cancellation signal, the app-level
resumeCommand forwarding, and a command returning an error result.
2026-07-22 14:30:01 +08:00
Turtle
dfd1eeeadb test: align merged suites with master's cancel cause and optional welcome
workspace-context's abort-tool test uses agent.cancel({kind:'user'}) (master's
AgentCancelCause shape); tui-demo forwards no welcome when none is configured.
2026-07-22 14:29:52 +08:00
Turtle
87899ae161 feat(workspace-context): load all instruction candidates, dedup by trimmed content, follow symlinks
Squashes feat/instruction-load-all-dedup and feat/allow-instruction-symlink.
2026-07-22 14:29:52 +08:00
Turtle
c8cc087e05 feat(workspace-context): load .local. instruction overlays by default
Load a per-directory local overlay in addition to the base instruction
file, matching the Claude Code AGENTS.local.md / CLAUDE.local.md
convention for git-ignored personal guidance.

- New config `localInstructionFileCandidates`, default
  `['AGENTS.local.md', 'CLAUDE.local.md']`; empty disables the overlay.
  The default lives in the plugin Config schema, so every front door
  (TUI/ACP/headless) reads .local. files consistently.
- Per project directory the plugin loads the first-existing base
  candidate, then additively the first-existing local candidate,
  rendered after the base so it takes precedence within the byte budget.
- Base and local tiers get distinct scope keys via a NUL sentinel
  (scopeKey/decodeScopeKey) so they never collide in the baseline map,
  pending window, or version cache.
- The fixed user-global $DSH_HOME/AGENTS.md stays base-only.

Docs: README (config, lifecycle, Known Limitations), regenerated
config-catalog, and a new bilingual Agent Note cross-linked to the
owning workspace-context note. 100% per-file coverage retained.
2026-07-22 14:29:28 +08:00
Turtle
a409f8b4ba feat(tui): detect terminal color scheme and apply light-optimised palette
Squash of the linearized fix/tui-color-scheme-v2 merge and the follow-up
catalog regeneration. Renders error cause chains at every diagnostic seam
(origin/fetch-failed-diagnostics) and adds color scheme detection with a
light-terminal palette.
2026-07-22 14:29:27 +08:00
Turtle
0c9a4d7c28 Retire the readline front door and the repl-agent example
Delete packages/ui/stdio and examples/repl-agent; rename stdio-demo to
@deepseek-ai/dsh-tui-demo (TUI-only, refuses pipes before Loader boot).
tui-agent owns the coding composition inline; echo-agent and the CI demo
smoke move to the one-shot cli-demo bin, which gains -p/--prompt. The
UI-independent with-key e2es move verbatim to tui-agent. SDK wizard's
'stdio' interface becomes 'tui'. PTY testing stays confined to TUI
surfaces; all other subprocess tests ride pipes.

See .agents/notes/implemented/simplification/2026-07-20-retire-readline-front-door.md
2026-07-22 14:29:27 +08:00
Tianyi Cui
4643e0de10 test(windows): make coverage fixtures portable 2026-07-22 13:10:48 +08:00
Tianyi Cui
53615c91e7 Merge master into worktree-windows-runtime 2026-07-21 23:39:14 +08:00
Tianyi Cui
57cd9ce2bf Merge master into feat/xdg-single-root-home 2026-07-21 22:14:45 +08:00
Tianyi Cui
af1e40e7c6 Merge master into feat/xdg-single-root-home 2026-07-21 21:20:43 +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
071fe76755 Merge latest master into invariant service seam 2026-07-21 18:27:46 +08:00
Tianyi Cui
504fbf59f3 fix(invariants): replay histories and pack companions 2026-07-21 17:46:43 +08:00
Tianyi Cui
b024ebabed Merge origin/master into worktree-windows-runtime
# Conflicts:
#	.agents/notes/implemented/simplification/2026-07-04-fold-stdio-ui-helper.md
#	packages/support/acp-snapshot/src/harness.ts
#	packages/support/acp-snapshot/src/normalize.ts
#	packages/support/acp-snapshot/tests/harness.spec.ts
#	packages/support/acp-snapshot/tests/normalize.spec.ts
2026-07-21 17:14:44 +08:00
Turtle
92e0d0e04f refactor(paths): collapse harness home resolution into one resolver
Delete @deepseek-ai/dsh-home and make dsh-paths the sole owner of the
single-root harness home ($DSH_HOME || ~/.dsh). Migrate tool-bash,
skill-local, and agent-spine-demo off dsh-home, and fold telemetry's
divergent globalConfigDir onto the shared resolver, dropping its second
XDG/APPDATA policy and the deepseek-harness namespace so the anonymous
id lives under the harness home. Add dshHomeDisplay() for symbolic
user-facing paths, replacing workspace-context's bespoke check.
2026-07-21 13:52:00 +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
0c08e34a4a fix(invariants): harden runtime contracts and gates 2026-07-21 00:25:38 +08:00
Tianyi Cui
72f0019c4e Merge remote-tracking branch 'origin/codex/enforce-tool-cancellation' into worktree/explicit-turn-signal
# Conflicts:
#	docs/architecture.md
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	docs/persistence-catalog.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/README.md
#	packages/core/agent-loop/src/loop.ts
#	packages/core/agent/README.md
#	packages/examples/cli-demo/src/cli.ts
#	packages/ui/tui/tests/tui.spec.ts
2026-07-21 00:02:17 +08:00
Tianyi Cui
e92b34bd7e fix(invariants): enforce runtime relationships 2026-07-20 23:16:08 +08:00
Tianyi Cui
4311aaabb0 Merge remote-tracking branch 'origin/master' into codex/enforce-tool-cancellation
# Conflicts:
#	docs/cookbook/adding-a-tool.i18n.yaml
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/bash/tool-bash/src/index.ts
#	packages/core/agent-loop/README.md
#	packages/core/tools/README.md
#	packages/core/tools/tests/scoped.spec.ts
#	packages/fs/tool-fs-search/tests/tools.spec.ts
#	website/zh-CN/api/harness/events.md
#	website/zh-CN/api/harness/tools.md
2026-07-20 23:00:21 +08:00
Yichen Jiang
a92d2e5f34 Merge origin/master into worktree/explicit-turn-signal 2026-07-20 21:38:49 +08:00
Tianyi Cui
4910cc79d0 Merge latest invariant registration gate
# Conflicts:
#	docs/event-producer-consumer.md
#	packages/examples/stdio-demo/tests/stdio-agent.spec.ts
#	packages/examples/tui-demo/src/invariant.ts
2026-07-20 21:06:09 +08:00
Tianyi Cui
872072c83a Merge branch 'master' into worktree-windows-runtime 2026-07-20 21:03:38 +08:00
Tianyi Cui
7345a68845 Merge latest invariant service seam
# Conflicts:
#	docs/module-graph.md
#	package.json
#	packages/examples/tui-demo/package.json
#	packages/examples/tui-demo/src/invariant.ts
#	packages/ui/stdio/package.json
#	packages/ui/stdio/tests/stdio.spec.ts
#	packages/ui/stdio/tsconfig.json
#	pnpm-lock.yaml
2026-07-20 21:02:52 +08:00
Tianyi Cui
78eb93f7e6 Merge branch 'master' into worktree-windows-runtime 2026-07-20 20:39:13 +08:00
Tianyi Cui
44ad2ef073 Remove the Echo agent 2026-07-20 20:16:41 +08:00
Tianyi Cui
f78b17a352 Merge branch 'codex/invariant-package-registration-gate' into codex/package-invariant-checks 2026-07-20 19:55:46 +08:00
Tianyi Cui
9c4cc05da6 Merge branch 'codex/invariant-service-seam' into codex/invariant-package-registration-gate 2026-07-20 19:48:51 +08:00
Tianyi Cui
1145ee5fc3 fix(invariants): assert runtime relationships, not API shapes 2026-07-20 19:34:19 +08:00
Tianyi Cui
4cadf096ce Remove the stdio agent 2026-07-20 19:26:04 +08:00
Tianyi Cui
3b7ce2e682 fix(invariants): require justified empty companions 2026-07-20 18:39:37 +08:00
Turtle
f593ef5ab5 fix(session): drop the <context> envelope and project context verbatim
context/message previously defaulted to a <context source="…">…</context>
wrapper. No model is trained on a <context> tag either, and message
framing does not belong on the session surface: the surface projects the
durable log, and a caller that wants a frame formats its own content —
which the one heavy producer (workspace-context) already does with its own
<system-reminder> frame, opting out via 'raw'. The tag only added
machinery — ContextEnvelope plus an envelope field threaded through
InjectOptions, HookContext, the context/message event, and the agent-loop
inject/additionalContexts plumbing.

context/message now projects its content verbatim as a user-role message,
sharing one deriveEventMessage case with user/message and steering/message.
ContextEnvelope and every envelope field are removed; context/message.meta
still carries durable, model-hidden JSON state. Regenerated catalogs and
website API; refreshed the three affected keyless snapshots (envelope field
only; timestamps unchanged).

Broadens and renames the steering Agent Note to cover both envelope
removals as one decision.

Agent Note: .agents/notes/implemented/simplification/2026-07-20-unwrap-injected-content-envelopes.md
2026-07-20 16:22:20 +08:00
Tianyi Cui
684fcf3357 Merge branch 'codex/invariant-package-registration-gate' into codex/package-invariant-checks
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.md
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.zh.md
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.i18n.yaml
#	docs/rfc/INDEX.md
#	packages/AGENTS.md
2026-07-20 00:54:28 +08:00
Tianyi Cui
941b0411d8 feat(invariants): implement package runtime checks 2026-07-20 00:38:37 +08:00
Tianyi Cui
6520f71f94 Merge remote-tracking branch 'origin/codex/invariant-service-seam' into codex/invariant-package-registration-gate
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.i18n.yaml
#	docs/core-data-structures/session.md
#	docs/module-graph.md
#	package.json
#	packages/sdk/scripts/tsconfig.json
2026-07-20 00:35:06 +08:00
Tianyi Cui
a9a44fea96 Merge remote-tracking branch 'origin/master' into codex/enforce-tool-cancellation
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-cooperative-tool-cancellation.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-19-cooperative-tool-cancellation.md
#	.agents/notes/implemented/architecture/2026-07-19-cooperative-tool-cancellation.zh.md
#	.agents/notes/proposed/architecture/2026-07-19-required-cancellation-through-tool-capability-seams.i18n.yaml
#	.agents/notes/proposed/architecture/2026-07-19-required-cancellation-through-tool-capability-seams.md
#	.agents/notes/proposed/architecture/2026-07-19-required-cancellation-through-tool-capability-seams.zh.md
#	docs/cookbook/adding-a-tool.i18n.yaml
#	docs/rfc/INDEX.md
#	packages/AGENTS.md
2026-07-19 23:43:36 +08:00
Tianyi Cui
e8b95c8754 feat(tools): require cancellation signal on every invocation 2026-07-19 23:38:54 +08:00
Tianyi Cui
e8eddc7ef8 Rename RFCs to Agent Notes 2026-07-19 22:52:03 +08:00
Tianyi Cui
433670a754 feat(invariants): require package-owned companions 2026-07-19 22:13:50 +08:00
imccyu
6eabba8021 Merge branch 'master' into worktree-windows-runtime 2026-07-19 21:08:12 +08:00
Tianyi Cui
a278374e8f docs: structure model experience fields 2026-07-19 18:08:42 +08:00
imccyu
3e9cb70c78 Merge remote-tracking branch 'origin/master' into worktree-windows-runtime
# Conflicts:
#	packages/session-persistence/session-persistence-jsonl/README.md
#	packages/session-persistence/session-persistence-jsonl/src/index.ts
#	packages/session-persistence/session-persistence-jsonl/tests/jsonl.spec.ts
#	packages/support/loader-smoke/tests/loader-smoke.spec.ts
2026-07-19 17:52:36 +08:00
Tianyi Cui
bcc920369c docs: document package KV cache effects 2026-07-19 17:39:50 +08:00
Tianyi Cui
7be78c7d4c Merge latest origin/master into compact-post-step-overflow-recovery
# Conflicts:
#	docs/agent-lifecycle.md
#	docs/architecture.md
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/rfc/INDEX.md
#	docs/rfc/implemented/architecture/2026-07-05-reconstructable-requests.md
#	docs/rfc/implemented/architecture/2026-07-15-replay-token-meter-service.i18n.yaml
#	docs/rfc/implemented/architecture/2026-07-15-replay-token-meter-service.md
#	docs/rfc/implemented/architecture/2026-07-15-replay-token-meter-service.zh.md
#	docs/rfc/implemented/feature/2026-06-18-compaction-capability-seam.md
#	docs/rfc/implemented/feature/2026-07-07-session-prefix.md
#	packages/compact/compact-basic/README.md
#	packages/compact/compact-basic/src/config.ts
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/src/summarizer.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
#	packages/compact/compact-basic/tests/compact-loop-repro.spec.ts
#	packages/compact/compact/README.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/src/loop.ts
#	packages/core/agent-loop/tests/cancel.spec.ts
#	packages/llm/llm-deepseek/src/adapter.ts
#	packages/llm/llm-pi-ai/README.md
#	packages/llm/llm-pi-ai/src/stream.ts
#	packages/llm/llm-pi-ai/tests/convert.spec.ts
#	packages/llm/llm/README.md
#	packages/llm/llm/src/index.ts
#	packages/llm/llm/tests/service.spec.ts
#	scripts/gen-doc-graphs.ts
2026-07-19 12:06:23 +08:00
Tianyi Cui
39c1c3df4f Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719
# Conflicts:
#	packages/support/acp-snapshot/README.md
#	packages/support/acp-snapshot/src/harness.ts
#	packages/support/acp-snapshot/src/suite.ts
#	packages/support/acp-snapshot/tests/harness.spec.ts
#	packages/support/acp-snapshot/tests/suite.spec.ts
2026-07-19 11:41:10 +08:00
Yichen Jiang
5190e10d27 Merge latest agent execution context base 2026-07-18 21:42:38 +08:00
Yichen Jiang
cddb79e844 Merge branch 'worktree/agent-execution-context-rfc' into worktree/explicit-turn-signal 2026-07-18 21:33:17 +08:00
Yichen Jiang
0e4785cdb7 Merge origin/master into worktree/agent-execution-context-rfc 2026-07-18 21:20:30 +08:00
imccyu
d36dc6ece9 test(windows): replace POSIX-only filesystem fixtures 2026-07-18 16:25:16 +08:00
Tianyi Cui
d2426fed5d Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	packages/core/agent-loop/tests/loop.spec.ts
#	website/zh-CN/api/harness/events.md
2026-07-18 14:50:55 +08:00