Merge master into unified subagent activations

Integrate master 78ae4fc2d4d8ecaebb4b674028f781a358b92cc9 after the four
independent review fixes. Keep this base update separate from those fixes
and from subsequent review changes so the integration is independently
reviewable and the observed-master checkpoint remains preserved.

Retain activation-owned execution, caller-independent local discovery,
and unconditional parent final-answer delivery. Preserve master's preset
scoped scheduling tools and all delegated-child schedule deny rules. Move
the new scheduling regression from the removed driver package into the
surviving subagent package and run it through a real Spawn activation.

Preserve master's removal of runtime invariant plugins, dependencies,
exports, and test mounts. Keep context disposal before fixture directory
cleanup. Combine Python workflow ordering with activation/catalog events
without inventing unsupported source-plane import paths.

Keep all frozen Agent Note archives byte-for-byte identical to master;
do not accept Git's automatic edits to renamed archived notes. Retain
current lifecycle and delivery facts in active documentation, repair its
links, and regenerate catalogs/persistence schemas from merged source.
All 62 master persistence roots remain; only subagent/catalog gains the
PR's external membership extension. Keep master's third-party lock graph
and update only workspace dependency changes.

Validation before this checkpoint: 683 focused tests passed, seven
Windows-only cases skipped; 2,772 archived artifacts verified. Generated
catalog and active-pair checks passed. Fresh artifact build and remaining
build-dependent documentation checks continue before publication.
This commit is contained in:
Tianyi Cui committed 2026-10-05 23:49:47 +08:00
commit 9dcc8fa985
4943 files changed
+102212 -113475

No files matched your search

+2 -2
View File
@@ -9,8 +9,8 @@
en: 8e99640e4936332d
zh: 729d5de1e0ad2869
/python-contributor-workflows/validate-the-sdk:
en: 0830603b2ed0ecc0
zh: 252809ba6cad5848
en: 056ed331f3d26a20
zh: 94c23570878f4a23
/python-contributor-workflows/run-against-node-source:
en: 4d30c74632781443
zh: 13191cb05f99dd31
+1 -1
View File
@@ -40,7 +40,7 @@ SDK scenarios compare committed expected output under `scripts/snapshots/python-
The `advanced` and `restart` comparisons match native delivery qualifiers against each input's own Session generation, including SDK events and notifications. Captured and other delivery generations retain their numeric values. Each side must use one generation across its Session roles, and fresh logs must identify the current writer. Comparison never rewrites committed recordings.
Trusted pull requests and master pushes also run `--scenario sdk-live --installed-wheel` on each selected native target. That scenario performs two tool-using turns against `https://api.deepseek.com`: it checks the created file immediately, replaces its content with a host-only random challenge, and requires the second turn to copy the changed content into a fresh receipt without modifying the source. Both turns must complete with the exact sentinel answer and a model-requested tool call; external byte comparisons check the files. Missing repository secrets fail instead of self-skipping. Fork and Dependabot pull requests run the complete keyless installed-wheel path but receive no key.
Trusted pull requests and master pushes also run `--scenario sdk-live --installed-wheel` on each selected native target. That scenario performs two tool-using turns against `https://api.deepseek.com`: it checks the created file immediately, replaces its content with a host-only random challenge, and requires the second turn to copy the changed content into a fresh receipt without modifying the source. Both turns must complete with a standalone sentinel acknowledgement and a model-requested tool call; the acknowledgement may precede or follow explanation, and external byte comparisons check the files. Missing repository secrets fail instead of self-skipping. Fork and Dependabot pull requests run the complete keyless installed-wheel path but receive no key.
An interactive smoke test needs `DEEPSEEK_API_KEY` in the environment or repository-root `.env`:
+1 -1
View File
@@ -40,7 +40,7 @@ SDK 场景会比对 `scripts/snapshots/python-sdk-single-exe/` 下已提交的
`advanced` 与 `restart` 的比较按每份输入自身的 Session 代际匹配原生 delivery 限定值,包括 SDK 事件与通知。捕获的代际及其他 delivery 代际保留数值。每一侧的 Session 角色必须使用同一个代际,新日志必须标识当前写入器。比较绝不重写已提交的记录。
可信拉取请求与 master 推送还会在各自选定的原生目标上运行 `--scenario sdk-live --installed-wheel`。该场景面向 `https://api.deepseek.com` 执行两个使用工具的轮次:立即检查已创建文件,将其内容替换为仅宿主知道的随机挑战值,并要求第二轮将变更后的内容复制到全新的回执文件,且不修改源文件。两个轮次都必须完成、返回精确的哨兵答案并由模型请求调用工具;文件通过外部逐字节比较验证。仓库密钥缺失时失败,而不是自行 skip。Fork 与 Dependabot 拉取请求会运行完整的 keyless 安装后 wheel 路径,但不会获得密钥。
可信拉取请求与 master 推送还会在各自选定的原生目标上运行 `--scenario sdk-live --installed-wheel`。该场景面向 `https://api.deepseek.com` 执行两个使用工具的轮次:立即检查已创建文件,将其内容替换为仅宿主知道的随机挑战值,并要求第二轮将变更后的内容复制到全新的回执文件,且不修改源文件。两个轮次都必须完成、返回独占一行的哨兵确认并由模型请求调用工具;确认可以位于解释之前或之后,文件通过外部逐字节比较验证。仓库密钥缺失时失败,而不是自行 skip。Fork 与 Dependabot 拉取请求会运行完整的 keyless 安装后 wheel 路径,但不会获得密钥。
交互式冒烟测试需要环境变量或仓库根目录 `.env` 中存在 `DEEPSEEK_API_KEY`:
+11 -1
View File
@@ -14,11 +14,14 @@
"@deepseek-ai/dsh": "workspace:*",
"@deepseek-ai/dsh-acp": "workspace:*",
"@deepseek-ai/dsh-agent": "workspace:*",
"@deepseek-ai/dsh-agent-default-model": "workspace:*",
"@deepseek-ai/dsh-agent-instructions": "workspace:*",
"@deepseek-ai/dsh-agent-loop": "workspace:*",
"@deepseek-ai/dsh-agent-preset-registry": "workspace:*",
"@deepseek-ai/dsh-agent-tool-presentation": "workspace:*",
"@deepseek-ai/dsh-anonymous-user-id": "workspace:*",
"@deepseek-ai/dsh-api-gateway": "workspace:*",
"@deepseek-ai/dsh-api-session-controller": "workspace:*",
"@deepseek-ai/dsh-app-boot": "workspace:*",
"@deepseek-ai/dsh-atomic-write": "workspace:*",
"@deepseek-ai/dsh-attachment": "workspace:*",
@@ -27,9 +30,12 @@
"@deepseek-ai/dsh-bash-local": "workspace:*",
"@deepseek-ai/dsh-brand": "workspace:*",
"@deepseek-ai/dsh-client-connection": "workspace:*",
"@deepseek-ai/dsh-client-file-upload": "workspace:*",
"@deepseek-ai/dsh-cmdline": "workspace:*",
"@deepseek-ai/dsh-command-feedback": "workspace:*",
"@deepseek-ai/dsh-file-reference": "workspace:*",
"@deepseek-ai/dsh-message-feedback": "workspace:*",
"@deepseek-ai/dsh-native-command": "workspace:*",
"@deepseek-ai/dsh-ptc-runtime": "workspace:*",
"@deepseek-ai/dsh-ptc-runtime-node": "workspace:*",
"@deepseek-ai/dsh-command-compact": "workspace:*",
@@ -57,7 +63,6 @@
"@deepseek-ai/dsh-host-plugin-inventory": "workspace:*",
"@deepseek-ai/dsh-host-webserver": "workspace:*",
"@deepseek-ai/dsh-http-proxy": "workspace:*",
"@deepseek-ai/dsh-invariants": "workspace:*",
"@deepseek-ai/dsh-jobs": "workspace:*",
"@deepseek-ai/dsh-jobs-local": "workspace:*",
"@deepseek-ai/dsh-launch-environment": "workspace:*",
@@ -79,6 +84,7 @@
"@deepseek-ai/dsh-sandbox": "workspace:*",
"@deepseek-ai/dsh-sandbox-local": "workspace:*",
"@deepseek-ai/dsh-sandbox-policy": "workspace:*",
"@deepseek-ai/dsh-schedule": "workspace:*",
"@deepseek-ai/dsh-scope": "workspace:*",
"@deepseek-ai/dsh-sdk-jsonrpc-server": "workspace:*",
"@deepseek-ai/dsh-sdk-protocol": "workspace:*",
@@ -102,6 +108,7 @@
"@deepseek-ai/dsh-skill-office": "workspace:*",
"@deepseek-ai/dsh-storage": "workspace:*",
"@deepseek-ai/dsh-storage-domain": "workspace:*",
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
"@deepseek-ai/dsh-tool-workspace-dependencies": "workspace:*",
"@deepseek-ai/dsh-spill": "workspace:*",
"@deepseek-ai/dsh-subagent": "workspace:*",
@@ -113,6 +120,7 @@
"@deepseek-ai/dsh-system-prompt": "workspace:*",
"@deepseek-ai/dsh-terminal": "workspace:*",
"@deepseek-ai/dsh-terminal-bash": "workspace:*",
"@deepseek-ai/dsh-time-context": "workspace:*",
"@deepseek-ai/dsh-timeout": "workspace:*",
"@deepseek-ai/dsh-token-meter": "workspace:*",
"@deepseek-ai/dsh-tool-ask-user": "workspace:*",
@@ -142,6 +150,7 @@
"@deepseek-ai/dsh-user-questions": "workspace:*",
"@deepseek-ai/dsh-util-time": "workspace:*",
"@deepseek-ai/dsh-util-values": "workspace:*",
"@deepseek-ai/dsh-util-workspace-path": "workspace:*",
"@deepseek-ai/dsh-web": "workspace:*",
"@deepseek-ai/dsh-web-fetch-http": "workspace:*",
"@deepseek-ai/dsh-web-search-deepseek": "workspace:*",
@@ -150,6 +159,7 @@
"@deepseek-ai/dsh-workflow": "workspace:*",
"@deepseek-ai/dsh-workflow-ptc": "workspace:*",
"@deepseek-ai/dsh-otel": "workspace:*",
"@deepseek-ai/dsh-workspace": "workspace:*",
"@deepseek-ai/schemastery": "workspace:~"
}
}
+17 -3
View File
@@ -111,6 +111,20 @@ def test_live_smoke_requires_fresh_external_content(live_smoke: SimpleNamespace)
assert live_smoke.closed and not live_smoke.root.exists()
@pytest.mark.parametrize("label", ["create", "verify"])
def test_live_smoke_accepts_file_details_after_acknowledgement(
live_smoke: SimpleNamespace, label: str,
) -> None:
setattr(live_smoke, f"{label}_result", live_result(final_response=(
"PYTHON_SDK_LIVE_OK\n\n"
"File created at `live-api-marker.txt` — 18 bytes, no BOM, no trailing newline."
)))
SMOKE["smoke_sdk_live"]()
assert len(live_smoke.prompts) == 2
assert len(live_smoke.checked_logs) == 1
assert live_smoke.closed and not live_smoke.root.exists()
@pytest.mark.parametrize("label", ["create", "verify"])
@pytest.mark.parametrize(("overrides", "message"), [
({"finish_reason": "error"}, "turn ended with 'error'"),
@@ -728,11 +742,11 @@ def test_profile_plugin_failure_reports_native_exit_status(monkeypatch: pytest.M
@pytest.mark.parametrize("prefix", ["", "File created with exactly 18 bytes.\n\n"])
def test_live_turn_accepts_explanation_before_final_sentinel(prefix: str) -> None:
def test_live_turn_accepts_explanation_before_acknowledgement(prefix: str) -> None:
SMOKE["assert_live_turn"]("create", live_result(final_response=prefix + SMOKE["LIVE_API_SENTINEL"]))
@pytest.mark.parametrize("answer", ["", "PYTHON_SDK_LIVE_OK but the operation failed", "PYTHON_SDK_LIVE_OK\nFailure"])
def test_live_turn_rejects_missing_final_sentinel(answer: str) -> None:
@pytest.mark.parametrize("answer", ["", "File created.", "PYTHON_SDK_LIVE_OK but the operation failed"])
def test_live_turn_rejects_missing_standalone_acknowledgement(answer: str) -> None:
with pytest.raises(AssertionError, match="turn returned"):
SMOKE["assert_live_turn"]("create", live_result(final_response=answer))