Commit Graph
3368 Commits
Author SHA1 Message Date
Tianyi Cui 64e920fad7 Merge remote-tracking branch 'origin/master' into feat/tui-package 2026-07-19 02:10:33 +08:00
Tianyi Cui 7b076a1e01 Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract 2026-07-19 02:10:25 +08:00
Tianyi Cui fed4cfe8ff Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-19 01:57:31 +08:00
Tianyi Cui 21e1a08b55 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-19 01:57:27 +08:00
Tianyi Cui 18653a9ff7 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop
# Conflicts:
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/tests/agent.spec.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	website/zh-CN/api/harness/agent-loop.md
#	website/zh-CN/api/harness/events.md
2026-07-19 01:57:18 +08:00
Tianyi Cui b61e68ae8c Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-19 01:55:29 +08:00
Tianyi Cui f65f4b82d7 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/src/index.ts
#	packages/core/agent-loop/tests/agent.spec.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	website/zh-CN/api/harness/agent-loop.md
2026-07-19 01:54:03 +08:00
Tianyi Cui 3b924a9327 Merge remote-tracking branch 'origin/feat/tui-package' into codex/tui-snapshot-testing 2026-07-19 01:49:42 +08:00
Tianyi Cui a514130548 Merge remote-tracking branch 'origin/master' into feat/tui-package 2026-07-19 01:48:39 +08:00
Tianyi Cui a45f0d73f3 Merge branch 'codex/simp-compaction-surface' into codex/simp-agent-entry-state 2026-07-19 01:47:42 +08:00
Tianyi Cui 3c03ca8a3c Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-19 01:47:42 +08:00
Tianyi Cui 2704cab46f Merge remote-tracking branch 'origin/master' into codex/simp-shared-acp-test-launcher 2026-07-19 01:44:38 +08:00
Tianyi Cui c866aa8ca6 Merge remote-tracking branch 'origin/master' into codex/simp-snapshot-fixture-inventory 2026-07-19 01:33:26 +08:00
Tianyi Cui e68cef1be1 test(tui): replay recorded sessions through real tools 2026-07-19 01:31:55 +08:00
Tianyi Cui 8e366c3071 test(tui): snapshot semantic terminal state 2026-07-18 22:31:04 +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
Yichen Jiang 5190e10d27 Merge latest agent execution context base 2026-07-18 21:42:38 +08:00
Yichen Jiang cddb79e844 Merge branch 'worktree/agent-execution-context-rfc' into worktree/explicit-turn-signal 2026-07-18 21:33:17 +08:00
Tianyi Cui 864b7bfd65 Merge remote-tracking branch 'origin/master' into feat/tui-package
# Conflicts:
#	docs/architecture.md
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	examples/coding-agent/cordis.yml
#	examples/echo-agent/cordis.yml
#	knip.json
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/tests/config-session-id.spec.ts
#	packages/examples/README.md
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/tests/stdio-agent.spec.ts
2026-07-18 21:20:47 +08:00
Yichen Jiang 0e4785cdb7 Merge origin/master into worktree/agent-execution-context-rfc 2026-07-18 21:20:30 +08:00
Yichen Jiang 619da217d8 Merge branch 'master' into worktree/fix-sqlite-file-permissions 2026-07-18 21:17:01 +08:00
Yichen Jiang b2ccf235dc Merge branch 'master' into worktree/pi-ai-manual-e2e 2026-07-18 21:16:46 +08:00
Tianyi Cui 78f68dbbb9 docs(agent-loop): track scheduler drain follow-up 2026-07-18 20:35:58 +08:00
Tianyi Cui 3b52d216f3 Merge branch 'master' into parallel-tool-call 2026-07-18 20:18:24 +08:00
imccyu ed418827c2 chore(sdk): satisfy CI gates — config catalog, md-wrap, knip
Regenerate docs/config-catalog.md for the telemetry package, unwrap the
design doc's multi-line blockquote paragraphs, and stop exporting the
create-sdk headless spec internals that have no external consumer.
2026-07-18 16:32:08 +08:00
imccyu 64f64724e5 fix(subprocess): honor Windows termination semantics 2026-07-18 16:25:51 +08:00
imccyu d36dc6ece9 test(windows): replace POSIX-only filesystem fixtures 2026-07-18 16:25:16 +08:00
imccyu 560ce3b539 feat(dsh-sdk): launcher telemetry reporting around every command
Wrap runDshSdkCommand so each command times itself and, in a finally block,
resolves consent (option A) and sends one best-effort, fire-and-forget telemetry
event (redacted cordis.yml + package.json content; never reads .env). Never
affects the command's exit code. Adds dsh-scripts -> dsh-telemetry dependency.
Default-on via absent consent entry; opt-out by a disabled telemetry entry.
The config/create wizard opt-out toggle is deferred (see design doc).
2026-07-18 16:11:57 +08:00
imccyu ca7533880e feat(dsh-sdk): create <source> — add external plugin as native PM dependency + cordis mount
dsh-sdk create <source> adds a github (github:owner/repo#ref) or npm (pkg@version)
plugin as a package-manager-native dependency, then mounts the resolved dependency
in cordis.yml through ProjectEditSession. Adds PackageManager.add(spec) and
ProjectEditSession.addExternalPlugin(id, packageName). No giget/pacote. Per-file
100% coverage on the new/changed files.
2026-07-18 16:11:57 +08:00
imccyu 8052370155 chore(sdk): drop dsh-plugin-fetch (giget/pacote) — #2 will use native npm/pnpm deps
External-plugin creation will add a package-manager-native dependency
(github:owner/repo#ref or pkg@version) plus a cordis mount instead of fetching
tarballs into a temp dir, so the giget/pacote fetch package is no longer needed.
2026-07-18 16:11:56 +08:00
imccyu 472a683bdc feat(create-sdk): headless creation via --config/--config-json + NDJSON + skill
Add a headless create path: --config <file> / --config-json <json> supply a
structured project spec (answers + feature plan) that drives CreateWizard through
a HeadlessPromptPort, bypassing the TTY. --json emits NDJSON lifecycle events
(done / action-required / error) so an agent can fill a missing input and re-run.
Ship a thin SKILL.md playbook for agent-driven creation. Per-file 100% coverage.
2026-07-18 16:11:26 +08:00
imccyu a66b98d270 fix(telemetry): report unless telemetry entry is explicitly disabled
Per ccyu's decision (option A), remove the consent asymmetry in ConsentResolver:
telemetry is OFF only when cordis.yml has a telemetry entry with disabled: true.
A cordis.yml with no telemetry entry now reports (allowWhenEntryAbsent defaults
to true) rather than denying. No cordis.yml, an enabled entry, and DO_NOT_TRACK/CI
are unchanged. Both no-config and absent-entry defaults stay configurable.

Updates the module/README docs and the unit tests (file-present-but-no-entry and
non-object/non-sequence roots now report). Per-file 100% coverage holds.
2026-07-18 16:11:25 +08:00
imccyu fe668a6dfe feat(telemetry): greenfield dsh-sdk telemetry modules
Add @deepseek-ai/dsh-telemetry, a launcher-side (non-plugin) library for the
ConsentResolver (parses cordis.yml consent + DO_NOT_TRACK/CI), buildTelemetryPayload
(redacted cordis.yml + package.json full content, never .env), getOrCreateAnonymousId
(random UUID in a per-machine global config file), and TelemetryReporter
(fire-and-forget, never blocks or crashes the command).

Endpoint is a fixed .invalid placeholder pending the real endpoint. Launcher
dispatch wiring and the helper feature-catalog entry are intentionally out of
scope. Registers the package in tsconfig references, the module graph, and the
README model-experience audit map. Per-file 100% coverage.
2026-07-18 16:11:25 +08:00
imccyu 825a63ab01 feat(sdk): add dsh-plugin-fetch source + fetcher seam
Greenfield #2 "建插件" modules for the forthcoming `dsh-sdk create <source>`
command, in a new foundation-independent package so it touches none of the
dsh-scripts / dsh-helper / create-sdk hotspots the foundation refactor edits.

- `resolvePluginSource(spec)` parses `owner/repo[/subdir]#ref` (github) or
  `pkg@version` (npm) into a `PluginSource` discriminated union, failing loud on
  an ambiguous or malformed spec.
- `PluginFetcher<S>` seam + `fetchPlugin` tag dispatch returning a common
  `FetchedPlugin` (temp dir + immutable provenance).
- `GigetFetcher` (github) over @bluwy/giget-core: resolve `#ref` to a commit SHA
  first, download that SHA; provenance pins the SHA. Chosen over unjs/giget for
  its single runtime dep and absent install/action surface.
- `PacoteFetcher` (npm) over pacote: resolve the manifest, then extract the
  tarball verified against its registry integrity. Registry-only is enforced by
  the source resolver; extract runs no lifecycle scripts.
- Branded `CommitSha`/`Integrity`; network + temp-dir boundaries are injected so
  the logic is unit-tested at 100% per-file coverage without network.

Wiring (package.json pin, cordis.yml via ProjectEditSession with a confirmed
diff, install --ignore-scripts) and the launcher command registration land
later with the foundation.
2026-07-18 16:08:12 +08:00
imccyu dcd886798f feat(sdk): headless PromptPort + create/config headless plan
Add HeadlessPromptPort (fail-loud non-interactive PromptPort), thread
prefilled feature values through FeatureConfigurator, and let CreateWizard
and ConfigWorkflow accept a headless feature plan that skips the interactive
tree/suggests prompts. Per-file 100% coverage on all changed files.
2026-07-18 16:05:14 +08:00
imccyu 7d28b611b2 test(windows): align platform coverage ignores 2026-07-18 15:55:37 +08:00
Tianyi Cui 2b4641799e docs: expand session persistence event catalog 2026-07-18 15:11:51 +08:00
Tianyi Cui 50f0291b93 Merge latest origin/master into parallel-tool-call
# Conflicts:
#	docs/architecture.md
#	examples/acp-agent/tests/snapshots/bash-spill/session.jsonl
#	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
#	packages/core/agent-loop/src/loop.ts
2026-07-18 15:09:39 +08:00
Tianyi Cui 21ec178841 docs: tighten parallel tool-call prose 2026-07-18 14:59:26 +08:00
Tianyi Cui 7d9f0431fc Merge remote-tracking branch 'origin/master' into codex/simp-drop-unused-schema-default 2026-07-18 14:52:54 +08:00
Tianyi Cui 45600e74e4 Merge branch 'codex/simp-prune-llm-contract' into codex/simp-hide-llm-adapter-helpers 2026-07-18 14:52:54 +08:00
Tianyi Cui 90cbe2573b Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract 2026-07-18 14:52:54 +08:00
Tianyi Cui 4863746432 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-18 14:52:48 +08:00
Tianyi Cui f7bdc17ee3 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-18 14:52:43 +08:00
Tianyi Cui 2db38ecf05 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop
# Conflicts:
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
2026-07-18 14:52:34 +08:00
Tianyi Cui 7d34e33b9e Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-18 14:51:21 +08:00
Tianyi Cui d2426fed5d Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	packages/core/agent-loop/tests/loop.spec.ts
#	website/zh-CN/api/harness/events.md
2026-07-18 14:50:55 +08:00