Commit Graph
5560 Commits
Author SHA1 Message Date
Hypatia May 06e0450b8d fix(token-meter): keep pressure anchors conservative 2026-07-16 15:26:30 +08:00
ZiyaZhang 60fcb494a7 docs(i18n): restore prompt-v4 as the pipeline baseline
按 jingtingxiang 拍板将 prompt 回到 v4 基线:模板正文恢复内嵌的
格式/语气/句式/词汇/标点全量约束与 11 组正误例(量词规则按术语表
现行裁定 package→包 写作「由三个包构成的 seam」),不再注入
translation-rules.md——该文件约束人和 agent,不进模板;占位符收敛
为 source_lang/target_lang/terminology 三个,切换行由模型按文档
自身拼写。渲染器、解析器、conformance 门禁与单测同步回 v4 契约:
三段裸 XML(translation/review/final 顺序唯一),容忍整体 ```xml
围栏回显;saxes 依赖随 CDATA 协议一并移除。
2026-07-16 00:19:25 -07:00
Hypatia May d027ea0d10 refactor(compact-basic): inline automatic listeners into the service
Fold automatic.ts into BasicCompactService as a private
_registerAutomaticCompaction method, removing the AutomaticCompactor
structural interface the standalone module needed to avoid an import
cycle. Listener behavior is unchanged; compactIfNeeded stays
dynamically dispatched so subclass overrides are honored at event time.
2026-07-16 15:14:24 +08:00
Dudu-0223 3368f7924f docs(lsp): resolve ds-review-bot RFC warnings
Fix the executable-resolution lifecycle contradiction to match the
shipped implementation: the executable resolves eagerly at load
(failing before registration if unavailable), while the server process
launch stays lazy until the first query. Align both language versions.

Correct two zh counterpart divergences: drop the "only" condition the
Chinese text added to the English "behave best" source modality, and
apply binding terminology (包(package)/包, transcript(文本记录)).
2026-07-16 14:57:07 +08:00
Dudu-0223 3bed1a644f Merge origin/master into parallel-tool-call 2026-07-16 14:56:02 +08:00
Hypatia May 6d96b3e4a8 refactor(token-meter): merge measurement snapshots (round 1) 2026-07-16 14:38:24 +08:00
Dudu-0223 91da66e715 refactor(agent-loop): simplify parallel tool-call cap config 2026-07-16 14:36:16 +08:00
Ziya 2565133af3 docs(i18n): RFC tree batch — 146 bilingual pairs via the committed pipeline
implemented(除 4 篇超长文档随后补)、proposed、rejected 全树配对;
同一流水线 + 二遍校验(paraphrase-back + 仓库上下文一致性)产出。
docs/rfc/implemented/AGENTS.md 与其 CLAUDE.md 符号链接列入排除
(agent 指令文件,与根 AGENTS.md 同策略)。
2026-07-15 23:25:06 -07:00
Dudu-0223 43d419ac5c fix(lsp): address codex review round 3
Final review pass on the local provider:
- Tear the instance down when `initialize` REJECTS (utf-8 negotiation, malformed
  result), not only on abort, so a permanently-rejecting `ready` is never pooled.
- Use the group-aware SIGKILL on a framing failure so helpers are reached.
- Validate maxMessageBytes and maxDocumentBytes positive at load alongside the
  other byte caps.
- Fix the location renderer's outside-workspace check to match a `..` segment
  exactly, so an in-workspace path like `..generated/a.ts` stays relative.
- Document the accepted ancestor-directory symlink-swap TOCTOU under the
  trusted-host model (O_NOFOLLOW guards only the final component).
2026-07-16 14:17:21 +08:00
Hypatia May 92fd92fa69 test(session-query): name binding retry precisely (round 3) 2026-07-16 14:12:50 +08:00
Ziya 5270dcd61d docs(i18n): core-data-structures and postmortem batch — 22 bilingual pairs
core-data-structures 18 篇(core.md 因超长仍在产出、随后补)、
postmortem 3 篇与 RFC 前门 README 配对;流水线 + 二遍校验产出。
生成文件 docs/rfc/INDEX.md(gen-rfc-index 产物)列入排除。中文侧
页内锚点统一指向英文侧锚名,满足配对门禁的链接目标一致规则。
2026-07-15 23:11:25 -07:00
Hypatia May de863aab9a fix(session-query): release stale persistence binding (round 2) 2026-07-16 14:04:49 +08:00
Ziya ec47f2e40f docs(i18n): core-docs batch — five bilingual pairs via the committed pipeline
architecture / cordis-primer / defensive-patterns / glossary / testing
五篇核心文档配对,译文由进仓流水线产出(committed renderer + 金标
few-shot + 严格 XML 协议),并经二遍校验(逐句对照原文复述核查 +
注入 architecture/glossary 仓库上下文的一致性修复)。五篇生成文档
(agent-lifecycle、capability-seams、event-producer-consumer、
graph-atlas、tool-execution-pipeline 均为 gen-doc-graphs 产物)列入
排除清单——手写译文会在再生成时失效,与既有生成目录排除策略一致。
2026-07-15 23:03:13 -07:00
Hypatia May 4505c6c55a refactor(session-query): simplify persistence binding (round 1) 2026-07-16 13:55:23 +08:00
Dudu-0223 0f3f0efd9c fix(lsp): address codex review round 2
Further lifecycle/safety hardening of the local provider:
- Tear the instance down when the initialize handshake is aborted, so a
  poisoned pending `ready` can't make later queries for that workspace re-wait.
- Make the serialized-queue wait itself abortable, so a query blocked behind
  hung earlier work can still observe its own timeout.
- Spawn the server detached and signal the whole process group on teardown, so
  helper processes (e.g. tsserver) can't outlive dispose().
- Open the source with O_NOFOLLOW and cap the read at maxDocumentBytes+1, closing
  the symlink-swap and concurrent-grow windows the fd-based read left open.
- Honor an already-aborted signal before any host I/O or startup.
- Validate maxStderrBytes positive at load; surface the retained stderr tail in
  the "language server exited" error so a fatal startup diagnostic is visible.
2026-07-16 13:34:37 +08:00
Hypatia May 19a56ec542 fix(token-meter): reject stale config (round 2) 2026-07-16 13:23:20 +08:00
Dudu-0223 8e8f90e235 fix(lsp): address codex review round 1
Lifecycle and safety fixes from the external review:
- Observe abort while awaiting the initialize handshake, so a server that never
  replies can't defeat the tool-timeout signal.
- On an aborted request the server won't cancel, tear the instance down after a
  bounded grace instead of releasing the serialized queue with work still live
  (prevents overlapping document lifecycles).
- Re-check provider disposal after the canonicalize/read awaits so a query can't
  spawn an unowned server after disposeAll().
- Read the source through one open handle (stat + read on the same fd) to close
  the realpath-vs-read TOCTOU; decode with a fatal UTF-8 decoder so a legitimate
  U+FFFD is not misclassified as invalid.
- Validate and read the source BEFORE spawning a server (pre-start rejection).
- Require an explicit openClose for option-form textDocumentSync.
- Reject nonpositive teardown budgets and non-executable absolute commands at
  load; surface unsupported operations as structured LSP_UNSUPPORTED_OPERATION.
- Retain the stderr tail (fatal diagnostics land at exit), not the prefix.
- Catalog the seam vocabulary in docs/core-data-structures/lsp.md.
2026-07-16 13:11:07 +08:00
Hypatia May 5c243e8a8d refactor(token-meter): simplify singleton service (round 1) 2026-07-16 12:58:07 +08:00
Dudu-0223 575feaddfa docs(lsp): regenerate config catalog for optional lsp-local config fields 2026-07-16 12:08:06 +08:00
Dudu-0223 d0029d8d60 feat(lsp): LSP capability seam, generic stdio provider, and lsp tool
Implements the LSP capability seam RFC as three packages: dsh-lsp (the
ctx.lsp interface — provider registry by branded id + exclusive extension
mapping, per-query order-independent selection, closed request/result
vocabulary, LspError taxonomy), dsh-lsp-local (a generic stdio language-server
provider — Content-Length JSON-RPC framing, per-(provider, workspace) process
single-flight, transient didOpen/query/didClose, an abortable per-instance
queue, UTF-16 negotiation, host-namespace source reads outside ctx.fs, and
bounded shutdown/kill teardown), and dsh-tool-lsp (the model-facing lsp tool —
four operations, one-based UTF-16 cursor conversion, workspace-grouped location
rendering, hover capping, a required session workspace, and a timeout budget).

Why: an agent had text search and file reads but no way to identify a program
symbol — follow an alias, connect an interface to implementations, or read an
inferred type — before changing code. Splitting model contract, seam, and local
subprocess behavior keeps the four semantic queries stable across future remote
or sandbox-native providers without leaking a JSON-RPC escape hatch.
2026-07-16 12:05:35 +08:00
Hypatia May 2793325df0 refactor(compact): store tool-pairing balance once per surface cut
toolPairingBalancedAfter previously answered by resolving a cached
positional successor and reading its before-balance, with a null-successor
depth fallback. Both queries are the same prefix property sampled at
adjacent cuts, so the cache now holds one per-cut balance sequence
(N nodes -> N+1 cuts) plus a seq->position index; before/after differ
only by a cut offset. The successor map, the duplicate rebuild/extend
fold loops, and the non-null assertion are gone, and the running counter
is named inProgressToolCalls. Docs describing the successor mechanism
are updated in place.
2026-07-16 11:42:17 +08:00
Dudu-0223 3b1d1bfa12 refactor(agent-loop): unify tool-call scheduling on one rolling pool + factory cap default
Run every ordered group through the same rolling pool: an exclusive call is a
pool of one (a barrier), dropping the separate runExclusive path and the
redundant post-grouping executionMode re-query. Behavior is unchanged — the
parallel-tool-calls snapshot and the full scheduler unit suite (barriers, cap,
abort, model-order results) stay green.

Add AgentLoop.Config.maxParallelToolCalls as a factory-wide default applied to
every agent create/createAgent/resume mints (per-agent option overrides it),
forwarded through agent-core so it reaches front doors that expose no cap field
of their own. Trim the isConcurrencySafe JSDoc to the local contract and link
the parallel-tool-call RFC for the full rationale; document the field on the
canonical core-data-structures page.
2026-07-16 11:36:16 +08:00
Tianyi Cui e19133b997 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-16 11:21:58 +08:00
Tianyi Cui b626230023 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-16 11:21:58 +08:00
Tianyi Cui a5ac5b0ad2 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-16 11:21:58 +08:00
Tianyi Cui 6a516693a3 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-16 11:21:57 +08:00
Tianyi Cui c0c0f8b3a4 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-16 11:21:57 +08:00
Tianyi Cui 28641fdc46 Merge branch 'codex/simp-compaction-surface' into codex/simp-agent-entry-state 2026-07-16 11:21:57 +08:00
Tianyi Cui be367fd981 Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface
# Conflicts:
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
2026-07-16 11:21:41 +08:00
Tianyi Cui 3817411aa5 Merge branch 'codex/simp-shared-acp-test-launcher' into codex/simp-trim-hook-snapshot-noise 2026-07-16 11:21:08 +08:00
Tianyi Cui 90afd0ce81 Merge branch 'codex/simp-snapshot-fixture-inventory' into codex/simp-shared-acp-test-launcher 2026-07-16 11:21:07 +08:00
Tianyi Cui 2f1dac68ea Merge remote-tracking branch 'origin/codex/simp-session-log-representation' into codex/simp-snapshot-fixture-inventory 2026-07-16 11:20:55 +08:00
Tianyi Cui 6825918ead docs: finish session simplification prose cleanup 2026-07-16 11:15:58 +08:00
Yichen Jiang 04df615dd6 docs(rfc): propose agent execution context 2026-07-16 11:11:55 +08:00
Hypatia May a6c8775f12 fix(session): reject sparse provenance arrays 2026-07-16 11:08:59 +08:00
Hypatia May 4bf36e4dd1 docs: condense tool-context lifecycle contract 2026-07-16 10:29:08 +08:00
Hypatia May da48435e8c Merge remote-tracking branch 'origin/token-meter-service' into compact-post-step-overflow-recovery
# Conflicts:
#	docs/architecture.md
2026-07-16 10:14:33 +08:00
Hypatia May 7250aaea7e fix(sdk): compose token meter for compact projects 2026-07-16 10:07:11 +08:00
Hypatia May 8d0d9bdd1d Merge remote-tracking branch 'origin/compact-tool-pairing' into token-meter-service
# Conflicts:
#	docs/capability-seams.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
2026-07-16 10:04:17 +08:00
Hypatia May 97e5f43f8b Merge remote-tracking branch 'origin/master' into session-query-search
# Conflicts:
#	packages/README.md
2026-07-16 09:55:03 +08:00
Hypatia May 3cccecee0a Merge remote-tracking branch 'origin/master' into compact-tool-pairing
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-16 09:55:02 +08:00
Hypatia May 8184332918 Merge remote-tracking branch 'origin/master' into session-query-trace
# Conflicts:
#	packages/README.md
#	packages/support/invariants/src/index.ts
2026-07-16 09:55:02 +08:00
Hypatia May 9287449ac2 Merge remote-tracking branch 'origin/master' into codex/acp-agent-auto-compaction
# Conflicts:
#	examples/acp-agent/composition.md
2026-07-16 09:55:01 +08:00
Yichen Jiang a621d2f9a6 Merge branch 'master' into codex/project-instruction-files 2026-07-16 09:52:52 +08:00
hypatiamay 5dd37a4f99 Merge branch 'master' into debug-pangwenjie 2026-07-16 09:49:28 +08:00
hypatiamay 6bac9c832b Merge branch 'master' into codex/document-host-sandbox-retries 2026-07-16 09:49:26 +08:00
Tianyi Cui 68ba6b3e64 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-16 03:28:19 +08:00
Tianyi Cui 5f298fc5b0 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-16 03:27:22 +08:00
Tianyi Cui 438d8c6a17 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-16 03:26:29 +08:00
Tianyi Cui f7af6a87dc docs(acp): describe terminal capability lifetime 2026-07-16 03:25:21 +08:00