fix(boot): require enabled tool executors at startup
This commit is contained in:
1 parent
2f69e7f181
commit
4439153073
8 files changed
+12
-8
No files matched your search
@@ -9,8 +9,8 @@
|
||||
en: 73002a2963b9ea27
|
||||
zh: a67ea382d7c70c61
|
||||
/mount-a-tool-executor/change:
|
||||
en: 2adab658221d48a2
|
||||
zh: 91573940e81bcba2
|
||||
en: b47c04b407b204a9
|
||||
zh: f3f54c9b25eb1951
|
||||
/mount-a-tool-executor/migration:
|
||||
en: 411860d06f1013ea
|
||||
zh: 615e044545d89b55
|
||||
@@ -9,7 +9,7 @@ English | [中文](guide.zh.md)
|
||||
|
||||
## Change
|
||||
|
||||
`@deepseek-ai/dsh-tools` keeps tool registration and executor selection, but no longer accepts `mode` or `maxParallelSubCalls`. Native and PTC execution require `@deepseek-ai/dsh-tool-executor-native` or `@deepseek-ai/dsh-tool-executor-ptc`. Shipped profiles mount an executor; custom compositions must add one. The existing `dsh-agent-tool-presentation` selector remains supported but is deprecated.
|
||||
`@deepseek-ai/dsh-tools` keeps tool registration and executor selection, but no longer accepts `mode` or `maxParallelSubCalls`. Native and PTC execution require `@deepseek-ai/dsh-tool-executor-native` or `@deepseek-ai/dsh-tool-executor-ptc`. Shipped profiles mount an executor; custom compositions must add one. The existing `dsh-agent-tool-presentation` selector remains supported but is deprecated. Enabled `tool-executor-native` and `tool-executor-ptc` rows are required at startup; invalid executor configuration now stops startup.
|
||||
|
||||
## Migration
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ description: "工具执行模式从 dsh-tools 配置移至显式执行器插件
|
||||
|
||||
## 变更
|
||||
|
||||
`@deepseek-ai/dsh-tools` 保留工具注册和执行器选择,但不再接受 `mode` 或 `maxParallelSubCalls`。原生和 PTC 执行分别要求 `@deepseek-ai/dsh-tool-executor-native` 或 `@deepseek-ai/dsh-tool-executor-ptc`。内置 profile 已挂载执行器,自定义组合必须添加一个。现有 `dsh-agent-tool-presentation` 选择器仍受支持,但已弃用。
|
||||
`@deepseek-ai/dsh-tools` 保留工具注册和执行器选择,但不再接受 `mode` 或 `maxParallelSubCalls`。原生和 PTC 执行分别要求 `@deepseek-ai/dsh-tool-executor-native` 或 `@deepseek-ai/dsh-tool-executor-ptc`。内置 profile 已挂载执行器,自定义组合必须添加一个。现有 `dsh-agent-tool-presentation` 选择器仍受支持,但已弃用。 启用的 `tool-executor-native` 和 `tool-executor-ptc` 条目属于启动必需项;无效的执行器配置会终止启动。
|
||||
|
||||
## 迁移
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
en: 2fdfe02f2ed4a258
|
||||
zh: d748228ece579c4a
|
||||
/deepseek-ai-dsh-app-boot/use-this-package/starting-the-app:
|
||||
en: 4a424cd401556f20
|
||||
zh: 0b34dd18e0db6cea
|
||||
en: 65bf2834b81f87da
|
||||
zh: c864ac60a3005b99
|
||||
/deepseek-ai-dsh-app-boot/use-this-package/profiles:
|
||||
en: d2d520668668292c
|
||||
zh: b7deeab27032a3ad
|
||||
|
||||
@@ -40,7 +40,7 @@ installFailLoud('dsh')
|
||||
const ctx = await boot('dsh', resolveConfigPath(argv[2], process.env.DSH_SNAPSHOT))
|
||||
```
|
||||
|
||||
`installFailLoud` writes one labelled `util.inspect` diagnostic to stderr for an unhandled rejection or an uncaught exception, awaits the surface's release hook under a fixed timeout, and exits 1; control never returns to the failed operation, because only the throw site knows which state is intact, and the event loop runs only until the release settles or times out. With that entry point, startup keeps every plugin that can activate. An enabled failed plugin produces a labelled warning. A failed required entry makes startup dispose the whole app and exit nonzero; required ids absent from a profile and disabled required entries do not affect startup. The global required list covers shared Agent execution, application endpoints, and Web bootstrap/transport: `agent-loop`, `webserver`, `web-runtime`, `modules`, `connection`, `headless-runner`, `acp`, and `sdk-jsonrpc-server`.
|
||||
`installFailLoud` writes one labelled `util.inspect` diagnostic to stderr for an unhandled rejection or an uncaught exception, awaits the surface's release hook under a fixed timeout, and exits 1; control never returns to the failed operation, because only the throw site knows which state is intact, and the event loop runs only until the release settles or times out. With that entry point, startup keeps every plugin that can activate. An enabled failed plugin produces a labelled warning. A failed required entry makes startup dispose the whole app and exit nonzero; required ids absent from a profile and disabled required entries do not affect startup. The global required list covers shared Agent execution, application endpoints, and Web bootstrap/transport: `agent-loop`, `tool-executor-native`, `tool-executor-ptc`, `webserver`, `web-runtime`, `modules`, `connection`, `headless-runner`, `acp`, and `sdk-jsonrpc-server`.
|
||||
|
||||
<a id="profiles"></a>
|
||||
### Profiles
|
||||
|
||||
@@ -40,7 +40,7 @@ installFailLoud('dsh')
|
||||
const ctx = await boot('dsh', resolveConfigPath(argv[2], process.env.DSH_SNAPSHOT))
|
||||
```
|
||||
|
||||
`installFailLoud` 会为未处理 rejection 或未捕获异常向 stderr 写一条带标签的 `util.inspect` 诊断,在固定超时内等待界面的 release 钩子,然后以 1 退出;控制流不会回到失败的操作,因为只有抛出点知道哪些状态仍然完整,事件循环只运行到 release 结束或超时。有了这个入口,启动会保留所有能够激活的插件。启用但失败的插件会产生带标签的警告。required entry 失败时,启动会拆卸整个应用并以非零码退出;profile 中不存在的 required id 和已禁用的 required entry 不影响启动。全局 required list 覆盖共享 Agent 执行、应用 endpoint,以及 Web 启动与传输:`agent-loop`、`webserver`、`web-runtime`、`modules`、`connection`、`headless-runner`、`acp` 和 `sdk-jsonrpc-server`。
|
||||
`installFailLoud` 会为未处理 rejection 或未捕获异常向 stderr 写一条带标签的 `util.inspect` 诊断,在固定超时内等待界面的 release 钩子,然后以 1 退出;控制流不会回到失败的操作,因为只有抛出点知道哪些状态仍然完整,事件循环只运行到 release 结束或超时。有了这个入口,启动会保留所有能够激活的插件。启用但失败的插件会产生带标签的警告。required entry 失败时,启动会拆卸整个应用并以非零码退出;profile 中不存在的 required id 和已禁用的 required entry 不影响启动。全局 required list 覆盖共享 Agent 执行、应用 endpoint,以及 Web 启动与传输:`agent-loop`、`tool-executor-native`、`tool-executor-ptc`、`webserver`、`web-runtime`、`modules`、`connection`、`headless-runner`、`acp` 和 `sdk-jsonrpc-server`。
|
||||
|
||||
<a id="profiles"></a>
|
||||
### Profile
|
||||
|
||||
@@ -950,6 +950,8 @@ const FIBER_DISPOSED = 4 as FiberState.DISPOSED
|
||||
*/
|
||||
const requiredStartupEntryIds = new Set<string>([
|
||||
'agent-loop',
|
||||
'tool-executor-native',
|
||||
'tool-executor-ptc',
|
||||
'webserver',
|
||||
'web-runtime',
|
||||
'modules',
|
||||
|
||||
@@ -557,6 +557,8 @@ describe('installFailLoud', () => {
|
||||
describe('auditStartupEntries', () => {
|
||||
const requiredIds = [
|
||||
'agent-loop',
|
||||
'tool-executor-native',
|
||||
'tool-executor-ptc',
|
||||
'webserver',
|
||||
'web-runtime',
|
||||
'modules',
|
||||
|
||||
Reference in new issue
Block a user