Commit Graph
437 Commits
Author SHA1 Message Date
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
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
imccyu 42b07a7022 feat(sdk): add developer project tooling
docs(rfc): propose SDK developer project tooling

feat: rename / docs

ci: fix windows gates

docs: revert
2026-07-15 23:17:29 +08:00
Tianyi Cui b06ae91fa8 fix(tasks): address task API review feedback
The public kill result used the awkward phrase already-terminal. Rename it to already-finished and keep the model-facing response aligned; not-alive would be inaccurate because a force-failed registry record can still correspond to orphaned producer work.

Task kinds were open strings even though producer namespaces are an extension point. Add the merge-extensible TaskKindMap and derived TaskKind, cover consumer declarations in task and bundle tests, and retain the runtime non-empty check for untyped callers.

With exactOptionalPropertyTypes, owner?: Agent | undefined allowed an explicit undefined value that no caller needs. Tighten the property to owner?: Agent so unowned work is expressed by omitting it.

Record the requested task-service/backend split as a follow-up, using a systemd-backed runtime as a concrete candidate without guessing its durability and ownership contract in this PR. Regenerate the type and Cordis catalogs so public docs match the declarations.
2026-07-15 21:45:30 +08:00
Tianyi Cui f4bd2405cc Merge current master into PR #219
Refresh the background-task branch onto the latest repository baseline before applying review feedback. This preserves merge ancestry, incorporates the current CI and package-structure changes, and ensures the review fixes are validated against the code that will actually receive the PR.
2026-07-15 21:30:21 +08:00
Tianyi Cui 3383c20c63 fix(i18n): refine Chinese prose and prompt validation 2026-07-15 20:39:24 +08:00
Tianyi Cui 168a3b9fe7 Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	scripts/verify-translation-pairing.ts
2026-07-15 20:24:23 +08:00
imccyu 32cfd6c513 fix: normalize remaining Windows gate paths 2026-07-15 19:59:00 +08:00
imccyu 82794c5681 ci(windows): exclude runtime smoke from static gates 2026-07-15 19:24:30 +08:00
Huanqi Cao ae8aedb2fd fix: normalize glob paths with split(sep).join('/') on Windows
glob/globSync returns host-separator paths on Windows. Nine scripts that consume these paths for split('/'), manifest-key comparison, startsWith/includes exclusion checks, or committed-output rendering now normalize with .map(s => s.split(sep).join('/')) at ingestion. This replaces the previous replaceAll('\\\\', '/') with an explicit, self-documenting OS-separator-to-POSIX conversion.
2026-07-15 19:11:20 +08:00
imccyu ae7b132f62 fix: launch pnpm gates without a Windows shell 2026-07-15 18:11:24 +08:00
Yichen Jiang 306b79fa2c Merge remote-tracking branch 'origin/master' into codex/rfc-subagent-background-tasks
# Conflicts:
#	docs/config-catalog.md
#	docs/module-graph.md
#	examples/coding-agent/README.md
#	examples/coding-agent/cordis.yml
#	packages/README.md
#	packages/examples/acp-demo/README.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/stdio-demo/README.md
#	pnpm-lock.yaml
#	scripts/doc-budgets.manifest.json
#	scripts/verify-package-readme-model-experience.ts
2026-07-15 16:57:03 +08:00
Tianyi Cui 9530a4ccfc Merge remote-tracking branch 'origin/master' into HEAD 2026-07-15 16:56:19 +08:00
imccyu 6dde9f70f0 fix: satisfy doc gates after the examples/ relocation
Repair cross-group README links whose targets changed groups
(ui/jsonrpc, ui/app-boot -> examples; examples/* -> ui seams),
re-record the bilingual-pair consistency hashes for the docs the
rename touched on both language sides, and condense the AGENTS.md and
packages/README.md group entries. The packages/README ceiling rises
710 -> 760 for the mandated new examples/ hierarchy row (5% headroom).
2026-07-15 16:46:05 +08:00
imccyu 6f77da4c8c refactor: relocate demo app bundles to packages/examples/*-demo
Move the agent-spine bundle and the stdio/ACP/JSON-RPC app packages out of
core/ and ui/ into a new packages/examples/ group, renamed with a -demo
suffix so the npm name marks them as non-product surface:

  core/agent-core   -> examples/agent-spine-demo  (dsh-agent-spine-demo)
  ui/stdio-agent    -> examples/stdio-demo        (dsh-stdio-demo)
  ui/acp-agent      -> examples/acp-demo          (dsh-acp-demo)
  ui/jsonrpc-agent  -> examples/jsonrpc-demo      (dsh-jsonrpc-demo)

Update every code/config/test reference and reference-only doc mentions, and
regenerate module-graph, config-catalog, and doc-graphs. The jsonrpc bin
(dsh-jsonrpc-agent) and single-file exe (dsh-jsonrpc-agent-pkg) keep their
names; the SDK runtime-startup surface is reconciled separately.
2026-07-15 16:46:05 +08:00
Tianyi Cui ad18165668 Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	package.json
2026-07-15 16:40:54 +08:00
imccyu 7b0310cac4 fix(scripts): run publint/tsc via node JS entry, not a shell .cmd shim
shell:true space-joins the executable and args UNESCAPED (Node DEP0190), so
an absolute .cmd path breaks whenever the repo path contains spaces and
`pnpm run hygiene` fails. Invoke publint's (`node_modules/publint/src/cli.js`)
and tsc's (`node_modules/typescript/bin/tsc`) JS entry through process.execPath
instead — no shell, extension-agnostic, identical on every platform, matching
the pattern already used by doc-typecheck.ts.

Addresses ds-review-bot on #324.
2026-07-15 16:38:22 +08:00
Huanqi Cao 65d07a490f fix(scripts): handle .cmd bin shims on Windows (CVE-2024-27980)
execFileSync on a .cmd shim returns EINVAL on recent Node without shell:true. Same bug class as install-lefthook.mjs. Affected publint-all.ts and verify-node-next-types.ts.

(cherry picked from commit 5ae40bee1c840fbbdd197ee15907aa660a343c52)
2026-07-15 16:09:12 +08:00
Huanqi Cao d42b118fe3 Spawn tsc by its JS entry so doc-typecheck runs on Windows
execFileSync('node_modules/.bin/tsc') spawns an extensionless shim
that is not executable on Windows (the CVE-2024-27980 class the
sibling scripts hit); the catch treated the spawn failure as a compile
failure with empty diagnostics. The .cmd shim would need shell:true,
which concatenates args unescaped - a hazard for the temp project
path - so invoke typescript/bin/tsc through the current node instead;
identical behavior on every platform.

Note this gate had never actually run on this Windows checkout: with
the pre-eol=lf CRLF working copy the fence regex matched no ts blocks
('.' does not match \\r), so it reported 'no ts code blocks to check'
and exited green. The LF working tree surfaced the spawn bug; with
this fix the gate compiles all 21 blocks on Windows.

(cherry picked from commit b49993c28e068c2beb411eae1f0c8ac4985aa3ae)
2026-07-15 16:09:12 +08:00
Huanqi Cao 8e6ad0a347 fix(scripts): launch lefthook bin shim via shell on Windows
spawnSync on a .cmd shim returns EINVAL/null status on recent Node (CVE-2024-27980) unless shell:true, which made postinstall fail and blocked every 'pnpm run' on Windows.

(cherry picked from commit 65a08f889ff9738ddaceeeb724e6e24f3be4b2ea)
2026-07-15 16:09:12 +08:00
Tianyi Cui e7bae3aa3b Merge branch 'master' into feat/mcp-client 2026-07-15 15:50:59 +08:00
Yichen Jiang 17511ea0d8 Merge branch 'master' into codex/rfc-subagent-background-tasks 2026-07-15 15:33:53 +08:00
TianleLin 905b8ead9f Merge branch 'master' into feat/mcp-client 2026-07-15 15:22:32 +08:00
Tianyi Cui 627738c4ed Merge remote-tracking branch 'origin/master' into codex/simp-prune-code-runtime-surface 2026-07-15 13:58:44 +08:00
Yichen Jiang 40336f945a Merge remote-tracking branch 'origin/master' into codex/rfc-subagent-background-tasks 2026-07-15 13:38:22 +08:00
Yichen Jiang 3285b77d3c Merge remote-tracking branch 'origin/master' into codex/rfc-subagent-background-tasks
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-15 13:30:39 +08:00
Tianyi Cui 96851da571 Merge remote-tracking branch 'origin/master' into codex/simp-prune-web-seam-fields
# Conflicts:
#	docs/rfc/INDEX.md
2026-07-15 13:28:40 +08:00
Tianyi Cui 38ea10eee0 Merge remote-tracking branch 'origin/master' into codex/simp-prune-code-runtime-surface 2026-07-15 13:20:08 +08:00
Tianyi Cui ac820b68a6 Merge branch 'master' into feat/mcp-client 2026-07-15 11:35:45 +08:00
Yichen Jiang df8fe3bde4 Merge remote-tracking branch 'origin/master' into codex/rfc-subagent-background-tasks
# Conflicts:
#	docs/architecture.md
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.1.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.2.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.jsonl
#	examples/acp-agent/tests/snapshots/both-mode-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/permission-switching/session.jsonl
#	examples/acp-agent/tests/snapshots/skill-load/session.jsonl
#	examples/acp-agent/tests/snapshots/text-turn/session.jsonl
#	packages/README.md
2026-07-15 11:17:55 +08:00
Tianyi Cui 3ff4d2a051 Merge remote-tracking branch 'origin/master' into codex/simp-share-loader-smoke-harness 2026-07-15 01:49:01 +08:00
Tianyi Cui 9b8b17b6fa Merge remote-tracking branch 'origin/master' into codex/simp-prune-web-seam-fields 2026-07-15 01:49:00 +08:00
Tianyi Cui 5d3c995b4c Merge branch 'codex/simp-prune-tools-prompt-surface' into codex/simp-prune-code-runtime-surface 2026-07-15 01:48:59 +08:00
imccyu 8a390025ef fix: scan one-shot event listeners 2026-07-15 00:49:56 +08:00
Tianyi Cui aba1b18eac Merge branch 'codex/simp-prune-tools-prompt-surface' into codex/simp-prune-code-runtime-surface 2026-07-14 23:45:39 +08:00
imccyu b734567cc0 fix: lint 2026-07-14 23:44:48 +08:00
Tianyi Cui 0bbb2a5426 Merge remote-tracking branch 'origin/master' into codex/simp-share-loader-smoke-harness 2026-07-14 23:44:40 +08:00
Tianyi Cui 177144917d Merge remote-tracking branch 'origin/master' into codex/simp-prune-web-seam-fields 2026-07-14 23:44:38 +08:00
Tianyi Cui a673ee4888 Merge remote-tracking branch 'origin/master' into codex/pr202-merge-review 2026-07-14 23:42:36 +08:00
imccyu c67c3d9413 refactor: derive event graphs and scope invariants from TypeScript 2026-07-14 23:37:56 +08:00
Tianyi Cui 7cbed547c7 Merge remote-tracking branch 'origin/master' into codex/pr202-merge-review 2026-07-14 23:21:47 +08:00
Tianyi Cui 98c12676af Merge remote-tracking branch 'origin/master' into feat/mcp-client 2026-07-14 23:16:43 +08:00
Tianyi Cui 466bc01ed3 Merge remote-tracking branch 'origin/master' into codex/fix-acp-snapshot-fs-registration 2026-07-14 23:11:28 +08:00
Tianyi Cui 3caaa43797 fix(i18n): make translation contracts executable 2026-07-14 23:09:01 +08:00
Tianyi Cui 883948d1d5 Merge commit 'refs/review/pr-312-head' into codex/fix-pr172-review-findings
# Conflicts:
#	docs/i18n/translation-prompt.md
2026-07-14 22:46:36 +08:00
Tianyi Cui 19504f7e34 fix(i18n): resolve pairing workflow review findings 2026-07-14 22:38:17 +08:00