Commit Graph
4950 Commits
Author SHA1 Message Date
kingwl d32a73a39d Merge remote-tracking branch 'origin/master' into feat/plan-mode 2026-07-16 23:11:55 +08:00
kingwl 79f1ca5f6e Merge remote-tracking branch 'origin/master' into jsonl-packed-chunk-rows 2026-07-16 22:57:11 +08:00
lintianle 9e9228270a scripts: extract shared cordis-walk and md-fences helpers (jscpd gate)
Master's new duplication gate flagged 4 clones, all from the website scripts
reusing existing gate patterns by copy. Extracted the shared halves instead of
ignoring:
- scripts/cordis-walk.ts — cordisModuleBody / eventMembers / serviceClasses,
  one AST walk consumed by both gen-cordis-catalog and gen-website-api (the
  two renderers must agree on WHAT exists; now they structurally do).
- scripts/md-fences.ts — fence extractor with per-gate info-string
  classification, consumed by doc-typecheck and verify-website-yaml.

Behavior-neutral: regenerated catalogs and website pages are byte-identical
(--check green), doc-typecheck/yaml block counts unchanged. jscpd now reports
0 clones; full pre-push run 34/34 green.
2026-07-16 22:07:06 +08:00
lintianle 2cde2a9032 Merge origin/master into feat/website-docs
Conflict resolution notes:
- package.json/run-gates: both sides' new doc-sync gates kept (master's
  scoped-events/readme gates + this branch's website-api/website-yaml);
  js-yaml devDeps deduped (master added them independently).
- pnpm-workspace/knip: website AND python/sdk-runtime entries kept.
- doc-typecheck/verify-type-equiv: master's condensed headers kept, website
  glob retained in both scan scopes.
- vendor/cordis/src/fiber.ts: master's lifecycle-hardening code taken; this
  branch's richer FiberState JSDoc reapplied on top. vendor/README.md logs
  both local modifications (hardening = 6, JSDoc enrichment = 7).
- pnpm-lock: regenerated from master's side (pnpm install).

Post-merge sync the gates forced (the system working as designed):
- verify-website-yaml caught 4 stale plugin names from master's package
  reorg (dsh-stdio-agent -> dsh-stdio-demo, dsh-acp-agent -> dsh-acp-demo);
  8 references fixed across guide/ and develop/.
- gen-website-api picked up master's 6 new services automatically
  (ctx.approval/permission/sandbox/sessionQuery/skills/tasks -> 6 new pages
  + sidebar); api/index.md hub updated to list them.
- AGENTS.md budget ceiling 1370 -> 1400: the website rows (layout line + two
  command lines) and master's own growth collided with the old ceiling; all
  three website rows are load-bearing (new top-level dir, new CI command).
2026-07-16 21:36:43 +08:00
lintianle fcd9d8c391 website: fix nine review findings (generator coverage, loader facts, mode semantics)
Generator (all four structural gaps):
- harness service pages now render public properties/accessors, not just
  methods (ctx.codeRuntime.language/isolation were missing);
- the class page merges the same-named interface half, so ctx.root/baseUrl/
  events/logger/reflect/registry appear on Context (vendor root JSDoc gains
  prose alongside @experimental);
- Pick<…> heritage on a Context merge resolves to the picked class members,
  giving ctx.effect a documented signature on the Fiber page;
- {@link} tags normalize to code spans; merge sections get their own h2 so
  reflect members no longer nest under 'Static members'.

verify-website-yaml: reject the unloadable 'group:' pseudo-name (tree.import
only special-cases 'cordis:'; no builtin is registered here) and recurse into
@cordisjs/plugin-group nested entry lists instead.

Prose corrected against loader/cordis source: service.md isolation example
uses the real group plugin + group: true + the required isolate map;
config.md documents concurrent entry startup (Promise.all; order via inject)
and the real hmr defaults (root ['.'], base/ignored/debounce); events.md
fixes emit (synchronous, not parallel), bail (null/false also delegate), and
serial (stops at the first bail value).
2026-07-16 21:15:44 +08:00
Yichen Jiang 55916f931d fix(core): preserve abort-observer replacements 2026-07-16 19:16:54 +08:00
lintianle 4c49677469 website: render the design essays' TeX (math: true, mathjax3 pinned to v4)
design/revertible-effects and design/context-model carry real TeX that was
showing as literal $$ source. markdown: { math: true } enables
markdown-it-mathjax3; pinned ^4.3.2 deliberately — v5 injects a <style> tag
per formula (31 on one page), which Vue's template compiler rejects, so v5
cannot work under VitePress; v4 emits pure SVG (probed: 0 style tags).
2026-07-16 18:57:44 +08:00
Hypatia May ba4a57c7d1 refactor(compact): align pruning contracts (round 3) 2026-07-16 18:51:26 +08:00
NI0317 d7ead6fdec docs(rfc): correct harness loop contracts 2026-07-16 18:47:46 +08:00
lintianle 20bcd66dbf website: include h3 member headings in the page outline
The generated API pages put each member at h3 under an h2 group; default
outline depth (h2 only) hid them, leaving e.g. the Context page outline with a
single 'Static members' entry.
2026-07-16 18:43:12 +08:00
Hypatia May 171bae5c20 fix(compact): harden pruning integration (round 2) 2026-07-16 18:28:31 +08:00
Yichen Jiang c238992fbb feat(core): make turn cancellation explicit 2026-07-16 18:14:13 +08:00
lintianle efba9fab0a website: generate the API reference from source (cordis + all 15 harness services)
scripts/gen-website-api.ts renders website/zh-CN/api/{cordis,harness}/* and the
api-sidebar.json fragment the VitePress config imports, so pages and navigation
can never drift from the code: signatures, @param/@returns prose, dispatch
modes, and GitHub source links are extracted, never transcribed, and the
generator hard-errors on any rendered member missing docs. verify-website-api
(doc-sync + run-gates) is the freshness gate.

Replaces the hand-written zh api pages (7 pages covering 7 of 15 services,
with phantom APIs: Context.current/Context.events, agent/post-step, tool/call,
compact/*, llm/pre-request none of which exist) with generated English
references: 5 cordis pages, 15 per-service pages, and a 35-event catalog
grouped by scope. The hand-written hub api/index.md stays and now indexes the
full surface; zh for these pages arrives with the unified translation flow.
2026-07-16 18:13:34 +08:00
lintianle da26138592 website: gate every yaml config example against the real plugin surface
New doc-sync gate verify-website-yaml: each ```yaml block under
website/zh-CN (api/ excluded — generator-owned) must parse with the loader's
real schema (JSON_SCHEMA + !!js), use only EntryOptions keys, name only real
workspace packages, and pass only config keys the plugin's declared Config
type / schemastery schema accepts (collectConfigCatalog drives the key sets).
```yaml ignore-check opts out a deliberate-placeholder block (the
capability-trio tutorial keeps its fictional package names).
2026-07-16 18:13:04 +08:00
lintianle 83cb48441e vendor(cordis): document the full plugin-author surface (@param/@returns everywhere)
Comment-only enrichment across cordis/src/*.ts — Context, EventsService (+ the
ctx merges), Fiber, RegistryService, ReflectService, Service, logger — so the
website API generator can render a complete reference and hard-error on any
future undocumented member (vendor sync included). Logged as local
modification 6 in vendor/README.md; retire it when upstreamed to the fork.
INHERITED_SERVICES/EVENTS source pointers refreshed for the shifted lines;
cordis catalogs regenerated.
2026-07-16 18:12:36 +08:00
lintianle 6ce9f16030 website: wire the site into the repo gates; make every tutorial example compile
- website joins the pnpm workspace; root scripts website:dev/website:build;
  run-gates gains a website-build gate (ci-primary + ci-static) — the
  VitePress build doubles as the site's dead-link check; AGENTS.md documents
  the commands.
- doc-typecheck + verify-type-equiv now scan website/zh-CN/**/*.md; every
  ```typescript fence converted to ```ts and made standalone-compilable
  (55 compiled, 1 ignore-check). Phantom APIs the compiler caught are fixed:
  invented event names (agent/turn-end, tool/call, llm/pre-request, ready,
  dispose) replaced with real catalog events or per-plugin declare-module
  merges; presentCall/inject/Config claims corrected to the real shapes.
- guide/config.md entry-fields table completed against loader EntryOptions;
  its coding-agent example brought in line with examples/coding-agent.
2026-07-16 18:12:22 +08:00
Yichen Jiang b1e19d8b69 fix(core): drain cross-realm execution promises 2026-07-16 18:09:20 +08:00
Hypatia May ce96104a77 feat(compact): prune tool results before summarization (round 1) 2026-07-16 18:02:15 +08:00
Hypatia May c5381de8b2 time-context: cover missing baselines (round 2) 2026-07-16 17:57:45 +08:00
Dudu-0223 e92ec69f32 refactor(lsp): drop redundant side-effect type import
The value import of LspProviderId already pulls in the cordis module
augmentation for ctx.lsp, so the separate `import type {}` is dead.
2026-07-16 17:57:18 +08:00
Hypatia May 46e63a004c time-context: durable per-step history (round 1) 2026-07-16 17:47:51 +08:00
Yichen Jiang d3b959389a test(support): add shared AgentLoop testkit 2026-07-16 17:39:53 +08:00
Dudu-0223 a63c55eb00 refactor(lsp): configure local servers together 2026-07-16 17:31:20 +08:00
Hypatia May 231aeabe55 docs(compact): align recovery RFC with singleton meter 2026-07-16 17:11:41 +08:00
NI0317 8a33e7cd00 docs(rfc): propose harness-level goal-based loop
Introduce packages/loop as a capability seam covering goal-based (and
naturally proactive) loops around the existing agent-loop, deferring
time-based scheduling to a future dsh-schedule RFC. Four cordis service
seams — loop-as-session, pluggable Evaluator/Budget with EvaluatorSpec
tiers and protectedPaths, RoundHandoff, GoalReflector — plus a driver-
enforced Default-FAIL contract and reuse of packages/fs policy gate for
reward-hacking defense. Bilingual pair.
2026-07-16 17:06:16 +08:00
Yichen Jiang 5a5591205f docs(rfc): acknowledge experimental ALS teardown API 2026-07-16 16:58:34 +08:00
Yichen Jiang 027af418a2 Merge remote-tracking branch 'origin/master' into codex/agent-session-jsonl-location
# Conflicts:
#	docs/architecture.md
#	docs/capability-seams.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/bash.md
#	docs/module-graph.md
#	docs/tool-catalog.md
#	examples/acp-agent/tests/snapshots/advanced-toolchain/system-prompt.golden.md
#	examples/acp-agent/tests/snapshots/advanced-toolchain/tool-schemas.golden.json
#	examples/acp-agent/tests/snapshots/both-mode-turn/system-prompt.golden.md
#	examples/acp-agent/tests/snapshots/both-mode-turn/tool-schemas.golden.json
#	examples/acp-agent/tests/snapshots/code-mode-turn/system-prompt.golden.md
#	examples/acp-agent/tests/snapshots/permission-switching/tool-schemas.golden.json
#	examples/acp-agent/tests/snapshots/skill-load/tool-schemas.golden.json
#	examples/acp-agent/tests/snapshots/text-turn/tool-schemas.golden.json
#	examples/acp-agent/tests/snapshots/workspace-edit/tool-schemas.golden.json
#	packages/bash/bash-local/README.md
#	packages/bash/bash-local/src/index.ts
#	packages/bash/bash-local/tests/executor.spec.ts
#	packages/bash/bash/README.md
#	packages/bash/bash/src/index.ts
#	packages/bash/bash/src/types.ts
#	packages/bash/tool-bash/README.md
#	packages/bash/tool-bash/package.json
#	packages/bash/tool-bash/src/index.ts
#	packages/bash/tool-bash/tests/tools.spec.ts
#	packages/bash/tool-bash/tsconfig.json
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/src/index.ts
#	packages/examples/agent-spine-demo/tests/agent-core.spec.ts
#	pnpm-lock.yaml
2026-07-16 16:47:31 +08:00
Dudu-0223 0d8e7e98f7 fix(lsp): harden local provider lifecycle 2026-07-16 16:42:32 +08:00
Yichen Jiang 182c622eab docs: stay within architecture word budget 2026-07-16 16:42:04 +08:00
Yichen Jiang 97190c81ba Merge remote-tracking branch 'origin/master' into worktree/provider-routed-llm-adapters
# Conflicts:
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-rejected/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/session.jsonl
2026-07-16 16:39:13 +08:00
Yichen Jiang 7bcae0cd64 feat(core): add agent execution context 2026-07-16 16:29:46 +08:00
Hypatia May 5ff491e3a2 Merge remote-tracking branch 'origin/token-meter-service' into compact-post-step-overflow-recovery
# Conflicts:
#	docs/core-data-structures/compaction.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
#	examples/coding-agent/cordis.yml
#	packages/compact/compact-basic/README.md
#	packages/compact/compact-basic/src/automatic.ts
#	packages/compact/compact-basic/src/config.ts
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
2026-07-16 16:18:16 +08:00
Tianyi Cui 1d403104a6 Merge branch 'master' into readme 2026-07-16 16:17:12 +08:00
Tianyi Cui 8d35092e26 fix(examples): isolate headless agent example 2026-07-16 16:12:27 +08:00
Hypatia May c3ddbde3c9 Merge remote-tracking branch 'origin/compact-tool-pairing' into token-meter-service 2026-07-16 16:06:27 +08:00
Tianyi Cui 72bb02e68e refactor(workspace-context): move package to context group 2026-07-16 16:01:06 +08:00
Tianyi Cui a3f248ff52 docs(workspace-context): mark deferred correctness fixes 2026-07-16 15:53:45 +08:00
Dudu-0223 17fe9e5b1e fix(agent-loop): tighten parallel tool-call safety 2026-07-16 15:52:35 +08:00
Tianyi Cui ae73ef774d Merge branch 'master' into codex/cli-one-shot-demo 2026-07-16 15:38:53 +08:00
Dudu-0223 bbf66b3a5b docs(tools): trim concurrency classifier contract 2026-07-16 15:27:36 +08:00
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