Commit Graph
32 Commits
Author SHA1 Message Date
Tianyi Cui 4cadf096ce Remove the stdio agent 2026-07-20 19:26:04 +08:00
Tianyi Cui e8eddc7ef8 Rename RFCs to Agent Notes 2026-07-19 22:52:03 +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
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 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
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 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
Tianyi Cui 59dc310bb5 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/architecture.md
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	examples/coding-agent/tests/code-mode.e2e.ts
#	examples/coding-agent/tests/coding-task.e2e.ts
#	examples/coding-agent/tests/compaction.e2e.ts
#	examples/coding-agent/tests/full-loop.e2e.ts
#	examples/coding-agent/tests/todo-write.e2e.ts
#	examples/cordis-agent/tests/cordis-tools.e2e.ts
#	packages/bash/tool-bash/tests/integration.spec.ts
#	packages/bash/tool-bash/tests/tools.spec.ts
#	packages/compact/compact-basic/tests/compact-loop-repro.spec.ts
#	packages/context/time-context/tests/time-context.spec.ts
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/cordis/tool-cordis/tests/integration.spec.ts
#	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/cancel.spec.ts
#	packages/core/agent-loop/tests/config-session-id.spec.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	packages/core/agent-loop/tests/coverage-edges.spec.ts
#	packages/core/agent-loop/tests/interception.spec.ts
#	packages/core/agent-loop/tests/loop.spec.ts
#	packages/core/agent-loop/tests/properties.spec.ts
#	packages/core/agent-loop/tests/request-cache.e2e.ts
#	packages/core/agent-loop/tests/request-reconstruction.spec.ts
#	packages/core/agent-loop/tests/resume.spec.ts
#	packages/core/agent-loop/tests/scope-lifecycle.spec.ts
#	packages/core/agent-loop/tests/tool-order.spec.ts
#	packages/core/agent-loop/tests/turn-stop.spec.ts
#	packages/core/agent/src/types.ts
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/tests/agent-core.spec.ts
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/src/index.ts
#	packages/examples/stdio-demo/tests/stdio-agent.spec.ts
#	packages/fs/tool-fs/tests/fs-tools.e2e.ts
#	packages/guard/repeat-tool-guard/tests/repeat-tool-guard.spec.ts
#	packages/hooks/hooks-claude/tests/bridge.spec.ts
#	packages/hooks/hooks-claude/tests/coverage.spec.ts
#	packages/hooks/hooks-codex/tests/bridge.spec.ts
#	packages/hooks/hooks-codex/tests/coverage.spec.ts
#	packages/subagent/subagent-fork/tests/multi-subagent.spec.ts
#	packages/subagent/subagent-fork/tests/subagent-fork.spec.ts
#	packages/subagent/subagent-inprocess/tests/structured.spec.ts
#	packages/subagent/subagent-inprocess/tests/subagent-inprocess.spec.ts
#	packages/subagent/subagent-spawn/tests/spawn.e2e.ts
#	packages/subagent/subagent-spawn/tests/subagent-spawn.spec.ts
#	packages/todo/tool-todo/tests/integration.spec.ts
#	packages/ui/acp/tests/dispose.spec.ts
#	packages/ui/acp/tests/edges.spec.ts
#	packages/workflow/workflow-workerthread/tests/integration.spec.ts
2026-07-18 12:21:15 +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
Tianyi Cui d56cc8d424 fix(stdio): close startup failure gaps 2026-07-16 02:00:56 +08:00
Tianyi Cui c148090961 test(sdk): cover invalid generated session ids 2026-07-16 01:07:59 +08:00
Tianyi Cui 828d6004ba fix(sdk): share generated session identity 2026-07-16 00:51:12 +08:00
imccyu 8f9c13ffaa test(sdk): restore tooling coverage 2026-07-15 23:26:40 +08:00
imccyu 394706fa3c fix(sdk): address remaining tooling review findings 2026-07-15 23:17:29 +08:00
imccyu d8f6251e3a feat: rename dsh to dsh-sdk 2026-07-15 23:17:29 +08:00
imccyu e150bc446d fix(sdk): address project tooling review findings 2026-07-15 23:17:29 +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