Commit Graph

2867 Commits

Author SHA1 Message Date
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
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
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
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
Tianyi Cui
4d4519a587 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-16 03:00:41 +08:00
Tianyi Cui
b90a2549e6 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-16 02:59:40 +08:00
Tianyi Cui
e4309c9b19 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-16 02:58:38 +08:00
Tianyi Cui
486362d2f8 docs(catalog): refresh ACP config source link 2026-07-16 02:57:32 +08:00
Tianyi Cui
60d2e602f1 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-16 02:37:18 +08:00
Tianyi Cui
e138b4c8a8 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-16 02:36:25 +08:00
Tianyi Cui
2f1a40d938 docs(catalog): refresh AgentLoop source link 2026-07-16 02:35:31 +08:00
Tianyi Cui
9da038de7d Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop
# Conflicts:
#	docs/cordis-catalog/services.md
#	packages/core/agent-loop/src/index.ts
2026-07-16 02:35:16 +08:00
Tianyi Cui
0decadd5e4 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-16 02:30:59 +08:00
Tianyi Cui
b77cfd64a1 docs(catalog): refresh repeat guard source link 2026-07-16 02:29:32 +08:00
Tianyi Cui
68b5c716b1 docs(catalog): refresh AgentLoop source link 2026-07-16 02:29:08 +08:00
Tianyi Cui
0ea614459b Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-16 02:06:15 +08:00
Tianyi Cui
afe549b004 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-16 02:06:04 +08:00
Tianyi Cui
aae284cbc3 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-16 02:05:21 +08:00
Tianyi Cui
70c6c0ac39 docs(approval): qualify audit guarantees 2026-07-16 02:04:59 +08:00
Tianyi Cui
3befcfc566 Revert "docs(approval): qualify audit guarantees"
This reverts commit 14439a93c2bb915441e7b59f505d94a79b22d4af.
2026-07-16 02:04:47 +08:00
Tianyi Cui
3855a77e7d docs(approval): qualify audit guarantees 2026-07-16 02:04:04 +08:00
Tianyi Cui
88c5d45d31 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-16 00:03:13 +08:00
Tianyi Cui
5461f24725 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-16 00:03:13 +08:00
Tianyi Cui
680395e7f4 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-16 00:03:13 +08:00
Tianyi Cui
a83847f987 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-16 00:02:55 +08:00
Tianyi Cui
0a58a7ad5a Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-16 00:02:54 +08:00
Tianyi Cui
3fcd262890 Merge branch 'codex/simp-shared-acp-test-launcher' into codex/simp-trim-hook-snapshot-noise 2026-07-16 00:02:54 +08:00