Commit Graph
74 Commits
Author SHA1 Message Date
Tianyi Cui 98c043ab0f Merge branch 'master' into fix/pr-ci-reliability-20260906 2026-09-07 19:44:51 +08:00
pku-xht e9f1b6c53e Merge remote-tracking branch 'origin/master' into codex/subprocess-native-containment
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-16-explicit-turn-cancellation.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-16-explicit-turn-cancellation.md
#	.agents/notes/implemented/architecture/2026-07-16-explicit-turn-cancellation.zh.md
#	.agents/notes/implemented/architecture/2026-09-05-canonical-feedback-log.i18n.yaml
#	.agents/notes/implemented/architecture/2026-09-05-nonofficial-feedback-otel.i18n.yaml
#	.agents/notes/implemented/architecture/2026-09-06-embedded-stream-record-readers.i18n.yaml
#	.agents/notes/implemented/bug-fix/2026-09-03-normalized-unread-fs-tool-diagnostic.i18n.yaml
#	.agents/notes/implemented/bug-fix/2026-09-06-windows-python-console-spawn-wait.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-26-generic-file-upload.i18n.yaml
#	.agents/notes/implemented/feature/2026-09-07-model-switch-notice.i18n.yaml
#	.agents/notes/implemented/process/2026-09-03-semantic-issue-templates-and-policy.i18n.yaml
#	packages/shell/bash-local/tests/executor.spec.ts
#	packages/subprocess/subprocess-local/README.i18n.yaml
#	packages/subprocess/subprocess-local/README.md
#	packages/subprocess/subprocess-local/README.zh.md
#	packages/subprocess/subprocess-local/src/spawn.ts
#	packages/subprocess/subprocess-local/tests/spawn.spec.ts
#	packages/subprocess/win32-process/package.json
2026-09-07 17:43:45 +08:00
Tianyi Cui 1ca0df2e24 test(python): synchronize advanced snapshot workflow membership 2026-09-07 14:26:30 +08:00
Tianyi Cui 15345af731 fix(test): synchronize console enablement and verify fresh SDK file content 2026-09-07 10:43:46 +08:00
Tianyi Cui 6f21b112da fix: wait for the Python console runtime on Windows 2026-09-06 19:53:23 +08:00
ChinesezjcandTianyi Cui 02a029e679 Feedback is recorded in the session log and delivered through DeepSeek
Co-authored-by: Tianyi Cui <53024+tianyicui@users.noreply.github.com>
2026-09-05 23:21:22 +08:00
pku-xht cffb09b02c Merge commit '0d361e6eede9e8a739e776949aa7d5e3de4472da' into codex/subprocess-native-containment
# Conflicts:
#	snapshots/session/cordis-inspect-jsdoc/session.v2.jsonl
2026-09-04 00:56:00 +08:00
Tianyi Cui 91904d7c10 Merge commit 'fef079e5c9' into worktree/session-format-06-v2-snapshot-rollout
# Conflicts:
#	snapshots/session/fs-policy-reject/session.jsonl
2026-09-03 18:51:05 +08:00
Tianyi Cui 28b16c011a Merge commit 'a123cb0055' into worktree/session-format-05-v1-v2-chunk-migration
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
2026-09-03 18:39:44 +08:00
Tianyi Cui 3aef64797d Merge master into session format migration
# Conflicts:
#	packages/test-support/session-snapshot/src/harness.ts
#	scripts/smoke-python-runtime.py
2026-09-03 18:31:54 +08:00
Tianyi Cui e10f671167 Merge remote-tracking branch 'origin/worktree/session-format-05-v1-v2-chunk-migration' into worktree/session-format-06-v2-snapshot-rollout
# Conflicts:
#	apps/web/tests/scaffold.ts
#	apps/web/tests/subagent-conversation.e2e.ts
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.zh.md
#	packages/test-support/llm-replay/README.i18n.yaml
#	packages/test-support/llm-replay/README.md
#	packages/test-support/llm-replay/README.zh.md
#	packages/test-support/llm-replay/tests/llm-replay.spec.ts
#	snapshots/sdk/subagent-continuable-inheritance/session.1.v2.jsonl
#	snapshots/sdk/subagent-continuable/session.1.v2.jsonl
#	snapshots/sdk/subagent-dsh-sdk-diagnostic/session.v2.jsonl
#	snapshots/sdk/subagent-list-agents/session.1.v2.jsonl
#	snapshots/sdk/subagent-send-message/session.1.v2.jsonl
#	snapshots/session/agent-instructions/session.v2.jsonl
#	snapshots/session/headless.snapshot.ts
#	snapshots/web/schedule-catalog/session.v2.jsonl
2026-09-03 05:09:32 +08:00
Tianyi Cui 67c8a58854 fix(session): address v2 migration review 2026-09-03 04:45:41 +08:00
pku-xht 35b5d78749 Merge origin/master into subprocess containment 2026-09-02 23:41:30 +08:00
pku-xht fe873955b4 Merge master@313ac567 into subprocess native containment 2026-09-02 23:00:02 +08:00
imccyu 45a4868c88 test(python): pin packaged shell node resolution in the runtime smoke
The new keyless sdk-spawn-node scenario drives the platform shell tool
through a command starting with node and requires the machine's own Node
version in the tool result with no PKG_EXECPATH in the child environment,
so a pkg upgrade that re-records the child-process patch cannot silently
restore the hijack. Runs on every target through --scenario all.
2026-09-02 21:36:23 +08:00
Tianyi Cui f693946509 test(snapshot): roll corpus forward to format v2 2026-09-02 04:18:52 +08:00
Tianyi Cui f99b06eaed feat(session)!: embed assistant streams in format v2 2026-09-02 04:00:01 +08:00
Tianyi Cui d1521ea783 feat(session)!: add released format migration 2026-09-01 22:12:21 +08:00
Dudu-0223 b91e7ce366 Unify adjacent Agent messaging 2026-08-30 14:14:46 +08:00
pku-xht a825b8d042 fix(subprocess): close native containment contract gaps 2026-08-29 05:56:29 +08:00
pku-xht a95f0b368f fix(subprocess): contain escaped descendants with native owners 2026-08-28 18:15:49 +08:00
pku-xht 678cfdfdb4 Merge commit '0c177e17a23692d018a79bae59ac9a2db6eba59c' into codex/subprocess-native-containment
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-10-single-file-executable-sdk-runtime-distribution.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-10-single-file-executable-sdk-runtime-distribution.md
#	.agents/notes/implemented/architecture/2026-07-10-single-file-executable-sdk-runtime-distribution.zh.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/input.json
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/bundle/acp-app/package.json
#	packages/examples/jsonrpc-demo/src/packaged-bin.ts
#	packages/subagent/subagent-acp/src/run.ts
#	packages/subagent/subagent-acp/tests/subagent-acp.spec.ts
#	packages/subprocess/subprocess-local/README.i18n.yaml
#	packages/subprocess/subprocess-local/README.md
#	packages/subprocess/subprocess-local/README.zh.md
#	pnpm-lock.yaml
#	scripts/smoke-python-runtime.py
2026-08-25 23:22:25 +08:00
Tianyi Cui aa801a418a test(python): share advanced runtime profile patch 2026-08-25 12:21:51 +08:00
Tianyi Cui 026a37fc07 ci(python): gate the Windows x64 installed wheel
Add node24-win-x64 to the required pull-request and public-release matrices on a native windows-2025 runner, and publish the same win_amd64 artifact from the GitLab tag pipeline. GitHub uses Git Bash for the shared release script while selecting the Windows venv's Scripts/python.exe explicitly; the Linux and macOS legs retain their existing commands and native checks.

Run the complete installed-wheel keyless suite and the trusted two-turn DeepSeek smoke on Windows exactly as on the existing targets. Make the minimal blackbox choose persistent PowerShell on Windows, keep advanced and restart snapshots platform-stable by disabling both one-shot shell variants, locate the generated dsh.exe console command, and validate text lines without assuming POSIX newlines.

Workflow tests pin the four-target matrix, Windows runner and wheel tag, cross-platform venv selection, GitLab publication dependency, and full blackbox invocation. The existing POSIX minimal snapshot changes only its platform-neutral prompt wording; Windows owns a separate model-visible snapshot.
2026-08-24 19:09:40 +08:00
Tianyi Cui e2920f0109 fix(sdk-minimal): make the SDK model argument authoritative
Stop narrowing the standalone DeepSeek adapter to a DSH_MODEL-derived one-entry catalog. The direct adapter already accepts model ids outside its advisory catalog, so retain only the DSH_CONTEXT_WINDOW fallback and let the JSON-RPC initialize model be the single runtime selection.

Remove model mirroring from minimal.py and the packaged smoke. The keyless process now initializes deepseek-v4-pro without DSH_MODEL, while the packaged scenario continues to use its unlisted smoke-model; together they prove both cataloged and arbitrary SDK model arguments reach the adapter directly.

Update the bundle, tutorial, SDK/example references, and owning Agent Notes to keep DSH_MODEL only as minimal.py's optional default input, never as a second value callers must synchronize.
2026-08-24 17:28:29 +08:00
Tianyi Cui 79a8f667f7 refactor(python): launch the minimal example through sdk-minimal
Make minimal.py select the shipped sdk-minimal profile directly and pass its selected model into the profile-owned adapter catalog. The Python SDK still starts only the bundled dsh CLI with an explicit Harness home; it no longer supplies an invocation overlay for this mode.

Drive both the source keyless process test and installed-wheel smoke through the same named profile. The keyless test pins the generated profile manifest and exact two-tool model request, while the packaged smoke keeps the persistent-shell, editor, session-log, and model-visible snapshot evidence.

Delete minimal.patch.yml and the unused complete-config/replay fixtures. Their composition now has one owner in @deepseek-ai/dsh-sdk-minimal, so the example and tests cannot drift into separate launch trees.
2026-08-24 17:28:28 +08:00
Tianyi Cui c2ad69344f fix(python-sdk): make the minimal profile an explicit allowlist
Give the SDK JSON-RPC server a per-root tool filter and let deployments mark the configured persona as the complete system prompt. The checked-in minimal overlay now names only bash and str_replace_editor, so later global tools and unrelated guidance from dsh-base cannot appear implicitly.

Keep the shared SDK host services and packaged Web capability intact. Only workspace instructions, compaction, and the conflicting one-shot Bash row remain disabled. Unit coverage pins the configuration paths, and a real dsh profile smoke proves the assembled prompt and exact two-tool request.
2026-08-24 17:28:28 +08:00
Tianyi Cui 01da043737 test(python): prove installed dsh profile customization
Migrate the packaged-runtime smoke inventory from complete Cordis trees to the sdk profile plus ordered patches. Preserve the focused minimal and advanced behaviors, update the generated durable snapshots for explicit permission events and the smaller RunResult, and keep worker, MCP, ripgrep, PTY/editor, direct JSON-RPC, and real-provider coverage.

Add an installed-only external bundle scenario that invokes the wheel's dsh plugin command with a local file package, verifies profile manifest reconciliation, imports @deepseek-ai/cordis as a peer, asserts the packaged proxy returns the exact host Context instance, and proves its system-prompt contribution reaches the model. Migrate the repository source e2e and runnable minimal example to the same profile grammar.
2026-08-24 17:28:26 +08:00
Tianyi Cui 3c1c6a89b1 test(python): gate installed runtime wheels across release targets (#2953)
* test(python): exercise installed wheels as black boxes

Add an installed-wheel mode that refuses source/editable imports, repository working directories, mismatched SDK/runtime versions, unpinned runtime dependencies, and executables outside the installed runtime distribution. The mode resolves the wheel-owned executable itself, so callers cannot accidentally prove an explicit checkout artifact.

Add a real-API scenario that drives two tool-using turns through the public synchronous SDK, verifies the file bytes outside the agent, checks completed turn/tool events and persistence, and projects provider failures without retaining credential-bearing error text. The existing deterministic scenario set remains the keyless behavior oracle.

Refs #2952.

* ci(python): require installed-wheel checks on every release target

Move the complete deterministic runtime scenarios behind construction and clean installation of the SDK and matching runtime wheels. Each native leg runs outside the checkout with source-resolution environment variables removed; Linux manylinux smokes assert the same installed provenance.

Expand the required pull-request call from Linux x64 to Linux x64, Linux arm64, and macOS arm64. Trusted heads receive only DEEPSEEK_API_KEY_EXTERNAL for a fail-loud live two-turn smoke on each carrier, while fork and Dependabot heads retain the full keyless path without exposing secrets.

Pin the reusable secret declaration, matrix call, aggregate dependency, untrusted-head condition, and live/keyless commands in the workflow contract test.

Refs #2952.

* docs(testing): make installed wheels the Python CI authority

Record the clean-wheel provenance boundary, complete keyless scenario set, trusted real-API contract, secret handling, and three-target required topology in a new implemented testing decision. Update the SEA distribution and portable-CI authorities plus the Python contributor reference to describe the same current state.

Archive the fully superseded Linux-x64-only decision after consolidating its rationale and alternatives into the new owner. Preserve its bilingual triplet as a sealed historical snapshot and redirect every active current-state reference.

Refs #2952.
2026-08-23 16:53:55 +08:00
Tianyi Cui 32c32932f9 chore(repo): wire profile apps and the renamed runtime through builds
Update workspace manifests, the lockfile, Host project references, Knip inputs, package constraints, vendoring rewrites, and Python runtime build/smoke scripts for sdk-app, acp-app, and @deepseek-ai/dsh-sdk-python-runtime. Add the ACP hook packages to the dsh dependency closure so installed profile materialization resolves the same plugins as source workspaces.

Keep Python distribution outputs deliberately unchanged: the wheel modules, executable names, and smoke targets retain their public identities even though their private npm carrier moved. Constraint fixtures pin the new package locations and catch missing application dependencies on every platform.
2026-08-23 10:59:01 +08:00
Tianyi Cui 1c7af99c80 feat(deepseek): apply session upload review feedback 2026-08-22 22:55:02 +08:00
Tianyi Cui d72ff1f49a docs: harden chain-of-thought leakage audits 2026-08-22 13:39:00 +08:00
Tianyi Cui 934976732d docs: purge residual chain-of-thought leakage 2026-08-22 13:10:23 +08:00
pku-xht a17c5822b5 Merge master into native containment
# Conflicts:
#	packages/subprocess/win32-process/package.json
#	scripts/check-workspace-constraints.ts
2026-08-21 22:10:22 +08:00
pku-xht 273c2847e5 fix(subprocess): support packaged native runner 2026-08-21 01:17:12 +08:00
_Kerman 04a5e4b592 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-2702
# Conflicts:
#	examples/acp-agent/tests/snapshots/product-subagent-result-diagnostic/session.jsonl
2026-08-19 14:06:11 +08:00
_Kerman b6e61f61ac test: omit persistence envelopes from session snapshots 2026-08-18 18:27:01 +08:00
fz 7bb766fc82 fix(python-sdk): make runtime readiness explicit 2026-08-18 17:36:59 +08:00
fz ee5280bd6e fix(python-sdk): harden packaged runtime behavior 2026-08-18 14:38:42 +08:00
fz 94f6fd1306 Support MCP in packaged Python runtime 2026-08-18 13:50:53 +08:00
fz f41a524453 Merge remote-tracking branch 'origin/master' into feat/python-sdk-standard-agent-runtime
# Conflicts:
#	scripts/smoke-python-runtime.py
2026-08-17 20:46:31 +08:00
Yichen Jiang 8692a1b76b test(python): pin the minimal composition's model-visible surface
The Python lane never compared what the minimal composition shows the
model: the mock model only asserted system-role messages, and the
advanced snapshot tokenizes the assembled system prompt and tool
schemas.

The sdk-minimal scenario now records model-visible.json — every model
request's advertised tool schemas verbatim and its message list, with
system and user text kept and assistant/tool payloads reduced to call
identity so the expected output replays on macOS and Linux. It excludes
the dynamic runtime-context snapshot, which the same composition emits
on macOS and not on Linux (#2488).

AGENTS.md and the testing policy name both SDKs as independent
projections of the agent loop, session lifecycle, and SessionEventMap.
2026-08-17 16:49:14 +08:00
fz e20f560992 feat(python-sdk): support bundled preset runtime dependencies 2026-08-14 13:06:21 +08:00
imccyu db6b14eb5b fix: rebase 4 2026-08-13 02:38:16 +08:00
Tianyi Cui a2d0f7f411 refactor: apply repository naming contract
Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
2026-08-13 00:54:38 +08:00
Yichen Jiang 08941c71e3 fix(ci): require Python runtime release path 2026-08-12 16:30:35 +08:00
Yichen Jiang 4445de9921 Prepare Python SDK public PyPI publication 2026-08-11 17:16:35 +08:00
Yichen Jiang 4481637684 fix(python): package the minimal runtime closure 2026-08-10 20:55:02 +08:00
Yichen Jiang 3957ce007a Merge branch 'worktree-llm-dynamic-config' into worktree-llm-web-config
# Conflicts:
#	apps/cli/cordis.yml
#	apps/cli/package.json
#	apps/cli/tests/tui-keyless-smoke.e2e.ts
#	apps/web/tests/details-session-lifecycle.e2e.ts
#	apps/web/tests/snapshots/code-mode-round/ui.expected.md
#	apps/web/tests/snapshots/cordis-tool-round/ui.expected.md
#	apps/web/tests/snapshots/fresh-round-trip/ui.expected.md
#	apps/web/tests/snapshots/lifecycle-chrome/hero.expected.md
#	apps/web/tests/snapshots/lifecycle-chrome/reloaded.expected.md
#	apps/web/tests/snapshots/live-interactions/cancel.expected.md
#	apps/web/tests/snapshots/live-interactions/error-auth.expected.md
#	apps/web/tests/snapshots/live-interactions/retry.expected.md
#	apps/web/tests/snapshots/message-actions/ui.expected.md
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	apps/web/tests/snapshots/seeded-history/ui.expected.md
#	apps/web/tests/snapshots/steering/mid-steer.expected.md
#	apps/web/tests/snapshots/steering/settled.expected.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/user/guide/config.i18n.yaml
#	docs/user/guide/config.md
#	docs/user/guide/config.zh.md
#	docs/user/guide/index.i18n.yaml
#	docs/user/guide/index.md
#	docs/user/guide/index.zh.md
#	examples/acp-agent/tests/snapshots/subagent-fork/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-mixed/session.2.jsonl
#	examples/cordis-agent/cordis.yml
#	examples/cordis-agent/tests/cordis-tools.e2e.ts
#	examples/headless-agent/tests/semantic-checkpoint-snapshots/tool-outcome-unknown/session.expected.jsonl
#	examples/headless-agent/tests/subagent-inheritance-snapshots/parent-override/parent.expected.jsonl
#	examples/tui-agent/code-mode.cordis.yml
#	examples/tui-agent/cordis.yml
#	packages/examples/tui-demo/README.md
#	packages/examples/tui-demo/README.zh.md
#	packages/host/apiproxy/README.i18n.yaml
#	packages/pty/tool-bash-persistent/README.i18n.yaml
#	packages/ui/tui/tests/snapshots/status-diagnostics-narrow.expected.txt
#	packages/ui/tui/tests/snapshots/status-diagnostics.expected.txt
#	pnpm-lock.yaml
#	scripts/snapshots/python-sdk-single-exe/advanced/result.json
#	scripts/snapshots/python-sdk-single-exe/advanced/session.1.jsonl
#	scripts/snapshots/python-sdk-single-exe/advanced/session.2.jsonl
#	scripts/snapshots/python-sdk-single-exe/advanced/session.jsonl
2026-07-30 20:15:40 +08:00
Tianyi Cui 5de69975f0 test(python): stabilize executable snapshot 2026-07-29 22:56:14 +08:00