Commit Graph

71 Commits

Author SHA1 Message Date
Tianyi Cui
34aabc4183 test(sdk): snapshot suite over the SDK path; docs for the SDK stack
- examples/jsonrpc-agent gains its first snapshot suite (sdk.snapshot.ts):
  the real dsh-jsonrpc-agent runtime driven through the real dsh-sdk-client,
  keyless llm-replay behind a new cordis.snapshot.yml overlay; three recorded
  scenarios (text turn, bash tool, spawn subagent) pin the notification
  stream, the SDK turn result, and the persisted parent+child session logs.
- Bilingual READMEs for dsh-sdk-protocol / dsh-sdk-client / dsh-subagent-sdk;
  sdk/ and subagent/ group tables extended; dsh-jsonrpc README points at the
  extracted protocol package; Agent Note (en+zh) owns the decision.
- The proposed make-jsonrpc-directional note is updated for the transport's
  new home and its second (client) consumer.
- Model Experience sentence allowlist entries for the two client-side
  packages; module graph + config catalog regenerated; i18n pairings
  recorded. doc-sync passes 24/24.
2026-07-27 04:37:23 +08:00
Tianyi Cui
4ad37344a8 feat(sdk): TypeScript SDK client + shared wire protocol + SDK subagent backend
- @deepseek-ai/dsh-sdk-protocol: extract the line transport from dsh-jsonrpc
  and name the request/result/notification wire types both ends share; error
  responses preserve wire code/data via JsonRpcResponseError.
- @deepseek-ai/dsh-sdk-client: TypeScript twin of the Python SDK — spawns the
  dsh-jsonrpc-agent runtime as a subprocess, drives stdio JSON-RPC turns
  (DeepSeekHarness high-level API + HarnessClient protocol client), scopes
  notifications to session trees client-side, and reaps the child through the
  shared subprocess dispose ladder.
- @deepseek-ai/dsh-subagent-sdk: out-of-process subagent backend driving a
  child harness runtime through the TS SDK; shares cwd resolution with
  subagent-acp via new dsh-subagent-subprocess cwd helpers.
- Keyless unit suites drive real subprocesses (scripted fake runtime peer);
  100% per-file coverage on all touched packages.
2026-07-27 03:21:06 +08:00
Tianyi Cui
226dc7a249 docs: translate remaining READMEs 2026-07-26 05:06:39 +08:00
Tianyi Cui
2beaa18f42 Merge remote-tracking branch 'origin/master' into worktree/acp-automation-protocol
# Conflicts:
#	packages/support/acp-snapshot/README.md
2026-07-25 02:07:28 +08:00
Tianyi Cui
f9a638b8a6 Stabilize master CI across platforms 2026-07-25 00:10:37 +08:00
Tianyi Cui
e819a586b0 refactor(acp): reduce bridge to automation protocol 2026-07-24 01:40:25 +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
af1e40e7c6 Merge master into feat/xdg-single-root-home 2026-07-21 21:20: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
e97290ba9e docs(telemetry): state anonymous id as per-harness-home, not per-machine
The consolidated resolver scopes the anonymous id to $DSH_HOME rather
than the machine. Update the module contract, README, and Agent Note to
say per-harness-home explicitly instead of over-claiming a machine-global
identity, and record why DSH_HOME scoping is the intended single-root
meaning rather than a regression.
2026-07-21 15:57:17 +08:00
Turtle
fac3fc090f fix(paths): treat empty DSH_HOME as unset; isolate telemetry env test
Review fixes for #462:
- resolveDshHome now treats an empty or whitespace-only $DSH_HOME as
  unset, so a blank override never resolves the home to cwd via
  resolve(''). Restores the guard telemetry's old resolver carried.
- The default-env telemetry test asserts only that globalConfigDir()
  returns an absolute path, so a machine DSH_HOME without a .dsh suffix
  cannot break it.
2026-07-21 14:43:38 +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
Tianyi Cui
7eee0b48b7 Merge codex/invariant-service-seam into codex/invariant-service-review-fixes
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.i18n.yaml
#	scripts/test-invariants.ts
2026-07-21 01:25:18 +08:00
Tianyi Cui
55ef21d9d5 Merge origin/master into codex/invariant-service-seam
# Conflicts:
#	docs/config-catalog.md
#	docs/event-producer-consumer.md
#	docs/module-graph.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/tui-demo/package.json
#	packages/support/invariants/src/scoped-events.generated.ts
#	packages/ui/acp/package.json
#	packages/ui/tui/package.json
#	packages/ui/tui/tests/tui.spec.ts
#	pnpm-lock.yaml
2026-07-21 01:13:28 +08:00
Tianyi Cui
9848fdf93e refactor: remove unrelated helper extractions 2026-07-21 00:25:51 +08:00
Tianyi Cui
e92b34bd7e fix(invariants): enforce runtime relationships 2026-07-20 23:16:08 +08:00
Tianyi Cui
78472196c8 Merge branch 'codex/goal-session' into codex/commands
# Conflicts:
#	docs/architecture.md
#	docs/capability-seams.md
#	docs/config-catalog.md
#	docs/module-graph.md
#	knip.json
#	packages/examples/README.md
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/src/index.ts
#	packages/examples/tui-demo/package.json
#	packages/ui/README.md
#	packages/ui/tui/src/index.ts
2026-07-20 22:05:51 +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
6a9e52acbc Merge latest master into invariant service seam
# Conflicts:
#	.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md
#	docs/capability-seams.md
#	docs/event-producer-consumer.md
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/stdio-demo/tests/built-bin.e2e.ts
#	scripts/gen-doc-graphs.ts
2026-07-20 20:58:46 +08:00
Tianyi Cui
78eb93f7e6 Merge branch 'master' into worktree-windows-runtime 2026-07-20 20:39:13 +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
Tianyi Cui
e80fc3e61b fix(invariants): join package checks at startup 2026-07-20 01:53:09 +08:00
Tianyi Cui
4f1a0fe015 Merge codex/goal-session into codex/commands 2026-07-20 01:30:43 +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
b46dfe08a2 Merge remote-tracking branch 'origin/master' into codex/invariant-service-seam
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.md
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.zh.md
#	.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md
#	.agents/notes/implemented/feature/2026-07-07-session-prefix.md
#	.agents/notes/implemented/process/2026-07-14-typescript-program-backed-semantic-gates.i18n.yaml
#	docs/architecture.md
#	docs/config-catalog.md
#	docs/core-data-structures/session.md
#	docs/rfc/INDEX.md
#	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
#	packages/support/invariants/README.md
#	packages/support/invariants/src/index.ts
#	packages/support/invariants/tests/invariants.spec.ts
2026-07-20 00:25:31 +08:00
Tianyi Cui
400b4658ef Merge remote-tracking branch 'origin/codex/goal-session' into codex/commands 2026-07-19 23:05:08 +08:00
Tianyi Cui
e8eddc7ef8 Rename RFCs to Agent Notes 2026-07-19 22:52:03 +08:00
Tianyi Cui
4cb9c7ada2 Merge remote-tracking branch 'origin/codex/goal-session' into codex/commands
# Conflicts:
#	packages/examples/stdio-demo/README.md
#	packages/ui/tui/README.md
2026-07-19 22:40:13 +08:00
Tianyi Cui
433670a754 feat(invariants): require package-owned companions 2026-07-19 22:13:50 +08:00
Tianyi Cui
2850c22b7a feat(ui): add plugin command registry 2026-07-19 22:11:59 +08:00
Tianyi Cui
c225b4956e docs(telemetry): document cache effect 2026-07-19 21:53:31 +08:00
Tianyi Cui
2bc4791f84 Merge remote-tracking branch 'origin/master' into codex/pr370-review-20260719 2026-07-19 21:21:53 +08:00
imccyu
6eabba8021 Merge branch 'master' into worktree-windows-runtime 2026-07-19 21:08:12 +08:00
Tianyi Cui
9d310ecc27 feat(invariants): add package-owned service seam 2026-07-19 19:19:57 +08:00
Tianyi Cui
a278374e8f docs: structure model experience fields 2026-07-19 18:08:42 +08:00
Tianyi Cui
bcc920369c docs: document package KV cache effects 2026-07-19 17:39:50 +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
Tianyi Cui
5767a8d467 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-19 03:04:19 +08:00
Tianyi Cui
1e4de0deaa fix(sdk): pin generated project build tool 2026-07-19 03:02:42 +08:00
imccyu
7a5d3ae5ce fix(telemetry): stop bearer redaction from eating plain prose
The bearer rule matched any 8+ run of letters after the word, so
package.json prose like "uses bearer authentication" lost its
following word to the placeholder. Real bearer credentials always
carry a digit; require one in the candidate token.
2026-07-18 22:10:22 +08:00
imccyu
e674f4c20e fix(telemetry): withhold package.json when cordis.yml is absent
buildTelemetryPayload read the two reported files independently, so a
dsh-sdk command mistakenly run in an arbitrary non-SDK directory (no
cordis.yml, e.g. any unrelated repo) still uploaded that directory's
package.json — dependency names and metadata of a project that never
opted into the SDK toolchain. Gate the manifest on cordis.yml presence:
without the config the directory is not an SDK project and its manifest
is not ours to report. Consent semantics are unchanged.
2026-07-18 22:10:22 +08:00
imccyu
013db6e8f0 fix(create-sdk): keep --json stdout pure NDJSON
The SKILL.md contract says every stdout line is one JSON event, but
createProject wrote the Created/Next-steps templates to stdout and the
default install/build path inherited the launcher's stdio, so package-
manager child output interleaved with the event stream. Under --json,
route human progress to stderr and run install/build through a
NodeCommandRunner that redirects child stdout+stderr to stderr.
2026-07-18 22:10:22 +08:00
imccyu
78f21bf703 fix(sdk): list create <source> and headless flags in usage help
dsh-sdk's usage template predates the create command and create-sdk's
predates --config/--config-json/--json, so --help hid both surfaces the
README already documents. Pin each with a help-output assertion.
2026-07-18 22:10:22 +08:00