perf(deps): align desktop dependencies and share client libraries
This commit is contained in:
1 parent
cc11f9145c
commit
64c5255843
95 files changed
+520
-473
No files matched your search
@@ -66,7 +66,7 @@
|
||||
"js-yaml": "^4.2.0",
|
||||
"koffi": "3.1.1",
|
||||
"pnpm": "11.7.0",
|
||||
"sharp": "^0.35.3",
|
||||
"sharp": "0.35.5",
|
||||
"typescript": "^6.0.3",
|
||||
"@deepseek-ai/dsh-deepseek-account": "workspace:*",
|
||||
"@types/ws": "^8.18.1",
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -75,6 +75,6 @@
|
||||
"@deepseek-ai/dsh-util-crypto": "workspace:*",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
"@deepseek-ai/dsh-user-approval": "workspace:*",
|
||||
"@deepseek-ai/dsh-user-questions": "workspace:*",
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-command-feedback": "workspace:*",
|
||||
"@deepseek-ai/dsh-api-terminal-controller": "workspace:*",
|
||||
"@deepseek-ai/dsh-plugin-manager": "workspace:*",
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"@deepseek-ai/dsh-deque": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"mime-types": "^3.0.2",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@xterm/headless": "^6.0.0",
|
||||
"@xterm/addon-serialize": "^0.14.0",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/dsh-subprocess": "workspace:*",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"@deepseek-ai/dsh-deque": "workspace:*",
|
||||
"@deepseek-ai/dsh-native-command": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"@deepseek-ai/dsh-deque": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-lazy-require": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"sharp": "^0.35.3"
|
||||
"sharp": "0.35.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-attachment": "workspace:*",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.29.0",
|
||||
"chokidar": "^4.0.3",
|
||||
"chokidar": "5.0.0",
|
||||
"picomatch": "^4.0.3",
|
||||
"@deepseek-ai/schemastery": "workspace:~"
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"execa": "^10.0.0",
|
||||
"yaml": "^2.9.0",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-credentials": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"lib/typert.remote-client.d.ts"
|
||||
],
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/dsh-brand": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
en: 45740a56e931d094
|
||||
zh: b3362af77c804459
|
||||
/deepseek-ai-dsh-client-modules/use-this-package/sharing-modules:
|
||||
en: 0aaf0693db8bb203
|
||||
zh: 9f4738cdc6b55c26
|
||||
en: 1778b5a63ecde5e8
|
||||
zh: 537b4f8c755af8ad
|
||||
/deepseek-ai-dsh-client-modules/use-this-package/build-requirements:
|
||||
en: b6a4d3b901c89efe
|
||||
zh: 615b5f3eec41f281
|
||||
|
||||
@@ -43,7 +43,7 @@ An open Web page follows the Host's complete module graph through the HMR transp
|
||||
|
||||
### Sharing modules
|
||||
|
||||
The shell seeds a frozen module table (`PLATFORM_MODULES`: React, Cordis, and static UI libraries); every dynamic bundle resolves its externals against exactly that baseline. `dsh.client.external` adds only exact non-baseline requests, each answered by the dynamic package row it names or an exact static-table key. Type-only imports are erased and create no request. Composition rejects malformed requests, missing suppliers, self-requests, and synchronous request cycles.
|
||||
The shell seeds a frozen module table ([`PLATFORM_MODULES`](../web/README.md#the-shared-module-table)); every dynamic bundle resolves its externals against exactly that baseline. `dsh.client.external` adds only exact non-baseline requests, each answered by the dynamic package row it names or an exact static-table key. Type-only imports are erased and create no request. Composition rejects malformed requests, missing suppliers, self-requests, and synchronous request cycles.
|
||||
|
||||
### Build requirements
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ application combo 脚本只携带每个插件的 `client.js` 入口,并在启
|
||||
|
||||
### 共享模块
|
||||
|
||||
外壳初始化一张冻结的模块表(`PLATFORM_MODULES`:React、Cordis 与静态 UI 库);每个动态 bundle 都精确针对该基座解析其 external。`dsh.client.external` 只添加基座之外的精确请求;系统会将每个请求解析到其指定的动态包 row 或完全匹配的静态表键。纯类型 import 会被擦除,不产生请求。组合阶段会拒绝畸形请求、缺失提供方、自请求与同步请求环。
|
||||
外壳初始化一张冻结的模块表([`PLATFORM_MODULES`](../web/README.zh.md#the-shared-module-table));每个动态 bundle 都精确针对该基座解析其 external。`dsh.client.external` 只添加基座之外的精确请求;系统会将每个请求解析到其指定的动态包 row 或完全匹配的静态表键。纯类型 import 会被擦除,不产生请求。组合阶段会拒绝畸形请求、缺失提供方、自请求与同步请求环。
|
||||
|
||||
### 构建要求
|
||||
|
||||
|
||||
@@ -77,6 +77,6 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -491,7 +491,7 @@ function clientConfig(id: string, entry: string, clientBanner?: (fileName: strin
|
||||
deps: {
|
||||
neverBundle: isRequested,
|
||||
// Anything NOT requested from the loader module table must inline
|
||||
// (wire/type layers, zod, clsx — every non-shared dep). A require() the
|
||||
// (wire/type layers, clsx — every non-shared dep). A require() the
|
||||
// table cannot answer is a guaranteed runtime throw, so the rule is the
|
||||
// package's own request list: requested specifiers stay imports,
|
||||
// everything else is bundled.
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"@lexical/headless": "^0.49.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"@types/react-dom": "~18.3.0",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"lexical": "^0.49.0",
|
||||
"clsx": "^2.0.0",
|
||||
"@lexical/utils": "^0.49.0",
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-timeout": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*"
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@
|
||||
"picomatch": "^4.0.4",
|
||||
"clsx": "^2.0.0",
|
||||
"@deepseek-ai/dsh-util-crypto": "workspace:*",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-client-shortcuts": "workspace:*",
|
||||
"@deepseek-ai/dsh-brand": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -50,6 +50,7 @@ describe('tsdown client artifact', () => {
|
||||
['react', await import('react')],
|
||||
['react/jsx-runtime', await import('react/jsx-runtime')],
|
||||
['react-dom', await import('react-dom')],
|
||||
['@tanstack/react-virtual', await import('@tanstack/react-virtual')],
|
||||
['@deepseek-ai/dsh-client-store', await import('@deepseek-ai/dsh-client-store')],
|
||||
['@deepseek-ai/dsh-client-ui-conversation/client', await import('@deepseek-ai/dsh-client-ui-conversation/client')],
|
||||
['@deepseek-ai/dsh-client-ui-primitives', await import('@deepseek-ai/dsh-client-ui-primitives')],
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
en: f3b01aa878764e5c
|
||||
zh: f02eab65d441bfe0
|
||||
/deepseek-ai-dsh-client-web/use-this-package/the-boot-page:
|
||||
en: add354591107b80d
|
||||
zh: 41136254a00d785e
|
||||
en: 1757ef1631612ff5
|
||||
zh: d2d3fd0313908c12
|
||||
/deepseek-ai-dsh-client-web/use-this-package/the-shared-module-table:
|
||||
en: 8380cd70b861a3a8
|
||||
zh: 5a331deb7ad8fca1
|
||||
en: 33b256e108a7bd6a
|
||||
zh: 3b2b1368721803b7
|
||||
/deepseek-ai-dsh-client-web/use-this-package/configuration:
|
||||
en: 942959cb40ee31a1
|
||||
zh: 9c86ac2cf6a13976
|
||||
|
||||
@@ -39,9 +39,12 @@ Boot runs in two stages: the module stage adopts the parser-loaded bootstrap bat
|
||||
|
||||
The boot page uses plain DOM and local CSS, so bundle and plugin-activation failures remain visible: it shows one spinner node whose CSS arc grows as entries activate, and reports per-entry status. The spinner and its animation phase persist until the full UI replaces the boot page. A plugin that fails import or activation is reported by name with the reason (missing service, import failure, or state) instead of a blank page. The console contains the original import error.
|
||||
|
||||
<a id="the-shared-module-table"></a>
|
||||
### The shared module table
|
||||
|
||||
`PLATFORM_MODULES` (in `src/platform.ts`) names the shell-seeded shared modules — React, Cordis, and static UI libraries — and together with `PRELOADED_CLIENT_EXTERNALS` (the parser-preloaded runtime row) defines the implicit external baseline every dynamic bundle resolves against. `dsh.client.external` adds only exact non-baseline requests; see [shared modules and the module graph](../AGENTS.md#shared-modules-and-the-module-graph).
|
||||
`PLATFORM_MODULES` (in `src/platform.ts`) names the shell-seeded shared modules — React, Cordis, Zod (`zod`), TanStack Virtual (`@tanstack/react-virtual`), and static UI libraries — and together with `PRELOADED_CLIENT_EXTERNALS` (the parser-preloaded runtime row) defines the implicit external baseline every dynamic bundle resolves against. `dsh.client.external` adds only exact non-baseline requests; see [shared modules and the module graph](../AGENTS.md#shared-modules-and-the-module-graph).
|
||||
|
||||
Built-in and installed browser plugins in the same page receive the same module instances. The shell supplies the dependency versions declared in this package's `package.json`; the module table does not negotiate versions per plugin. External plugins that use these modules must target a host that provides the required specifiers and APIs, and keep those imports external when building their client bundle. Inlined dependencies remain private to their bundle; Host code and Workers resolve their dependencies separately.
|
||||
|
||||
### Configuration
|
||||
|
||||
|
||||
@@ -39,9 +39,12 @@ kind: "package-library"
|
||||
|
||||
启动页只使用原生 DOM 与本地 CSS,因此 bundle 与插件激活失败保持可见:它显示一个 spinner 节点,其 CSS 圆弧随 entry 激活而增长,并逐 entry 报告状态。spinner 及其动画相位会一直保留,直到完整 UI 替换启动页。导入或激活失败的插件会按名称报告并给出原因(缺失服务、导入失败或状态),而不是白屏。控制台包含原始导入错误。
|
||||
|
||||
<a id="the-shared-module-table"></a>
|
||||
### 共享模块表
|
||||
|
||||
`PLATFORM_MODULES`(位于 `src/platform.ts`)列出外壳预置的共享模块——React、Cordis 与静态 UI 库——并与 `PRELOADED_CLIENT_EXTERNALS`(parser 预载的运行时行)一起定义每个动态 bundle 解析所依据的隐式 external 基座。`dsh.client.external` 只添加基座之外的精确请求;参见[共享模块与模块图](../AGENTS.md#shared-modules-and-the-module-graph)。
|
||||
`PLATFORM_MODULES`(位于 `src/platform.ts`)列出外壳预置的共享模块——React、Cordis、Zod(`zod`)、TanStack Virtual(`@tanstack/react-virtual`)与静态 UI 库——并与 `PRELOADED_CLIENT_EXTERNALS`(parser 预载的运行时行)一起定义每个动态 bundle 解析所依据的隐式 external 基座。`dsh.client.external` 只添加基座之外的精确请求;参见[共享模块与模块图](../AGENTS.md#shared-modules-and-the-module-graph)。
|
||||
|
||||
同一页面中的内置浏览器插件和已安装的浏览器插件获得相同的模块实例。外壳提供本包 `package.json` 声明的依赖版本,模块表不会为每个插件协商版本。使用这些模块的外部插件必须以提供所需模块标识符和 API 的宿主为目标,并在构建客户端 bundle 时将相应导入保留为 external。内联依赖仍归各自 bundle 私有;Host 代码与 Worker 单独解析其依赖。
|
||||
|
||||
### 配置
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"typescript": "^6.0.3",
|
||||
"@deepseek-ai/dsh-host-webserver": "workspace:*"
|
||||
"@deepseek-ai/dsh-host-webserver": "workspace:*",
|
||||
"zod": "4.6.5",
|
||||
"@tanstack/react-virtual": "3.14.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
/** The module specifiers the shell shares into the frozen module table. */
|
||||
export const PLATFORM_MODULES = [
|
||||
'react', 'react/jsx-runtime', 'react-dom', 'react-dom/client', '@deepseek-ai/cordis',
|
||||
'zod', '@tanstack/react-virtual',
|
||||
'@deepseek-ai/dsh-client-store',
|
||||
'@deepseek-ai/dsh-client-ui-slots',
|
||||
'@deepseek-ai/dsh-client-ui-primitives',
|
||||
|
||||
@@ -11,6 +11,8 @@ import * as ReactJsxRuntime from 'react/jsx-runtime'
|
||||
import * as ReactDom from 'react-dom'
|
||||
import * as ReactDomClient from 'react-dom/client'
|
||||
import * as Cordis from '@deepseek-ai/cordis'
|
||||
import * as Zod from 'zod'
|
||||
import * as ReactVirtual from '@tanstack/react-virtual'
|
||||
import * as ClientStore from '@deepseek-ai/dsh-client-store'
|
||||
import * as UiSlots from '@deepseek-ai/dsh-client-ui-slots'
|
||||
import * as UiPrimitives from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
@@ -31,6 +33,8 @@ export function getStaticModules(): Record<string, unknown> {
|
||||
'react-dom': ReactDom,
|
||||
'react-dom/client': ReactDomClient,
|
||||
'@deepseek-ai/cordis': Cordis,
|
||||
'zod': Zod,
|
||||
'@tanstack/react-virtual': ReactVirtual,
|
||||
'@deepseek-ai/dsh-client-store': ClientStore,
|
||||
'@deepseek-ai/dsh-client-ui-slots': UiSlots,
|
||||
'@deepseek-ai/dsh-client-ui-primitives': UiPrimitives,
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/dsh-agent": "workspace:*",
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-llm-deepseek-api-key": "workspace:*",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.3",
|
||||
"chokidar": "5.0.0",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"yaml": "^2.9.0"
|
||||
},
|
||||
|
||||
@@ -47,6 +47,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,6 @@
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
en: fea3ad16a77fc478
|
||||
zh: cf551a8a2d183f93
|
||||
/deepseek-ai-dsh-experimental-browser-use-stagehand-native/understand-the-implementation:
|
||||
en: 63e42e22af64f7df
|
||||
zh: d8218ad3e12a8ebe
|
||||
en: 4e656c3eae3c0fa5
|
||||
zh: 431142e13f775dff
|
||||
/deepseek-ai-dsh-experimental-browser-use-stagehand-native/further-exploration:
|
||||
en: eff8f4541eb26ca7
|
||||
zh: 76a61fe9bd48df2a
|
||||
|
||||
@@ -90,7 +90,7 @@ env -u NODE_USE_ENV_PROXY DSH_STAGEHAND_E2E=1 pnpm exec vitest run --config vite
|
||||
|
||||
The host owns each launched Chromium process and its temporary profile before waiting for CDP readiness. Chromium receives the standard scrubbed child environment, preserving paths, locale, and proxy settings while excluding credential-shaped variables and DSH identity. Both modes connect the SDK inside a dedicated Worker. The Worker receives no ambient environment except the explicit source TypeScript configuration path, so its CDP connection does not inherit host proxy settings. SDK close waits for active operations. Cleanup terminates the connection Worker after the configured SDK grace; launch also kills and awaits its owned Chromium process before removing the profile. Attached external browsers remain open. Cleanup failures follow the [ownership limits](#known-limitations-and-deferred-work) below.
|
||||
|
||||
The [native runtime](src/native.ts) passes the explicit model configuration to Stagehand's public initialization API. Stagehand owns the model requests, response validation, and token accounting inside its browser extension. DSH records browser tool inputs and returned data, including SDK result metadata, through the existing Session log. Underlying inference request/response capture and integration into DSH Session usage accounting are deferred.
|
||||
The [native runtime](src/native.ts) passes the explicit model configuration to Stagehand's public initialization API. The adapter pins Zod to the version required by Stagehand because extraction passes Zod schemas to the SDK. Stagehand owns the model requests, response validation, and token accounting inside its browser extension. DSH records browser tool inputs and returned data, including SDK result metadata, through the existing Session log. Underlying inference request/response capture and integration into DSH Session usage accounting are deferred.
|
||||
|
||||
No invariant companion is published: every browser operation uses the resource owner's single acquired handle, with no separately maintained browser relationship to compare.
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ env -u NODE_USE_ENV_PROXY DSH_STAGEHAND_E2E=1 pnpm exec vitest run --config vite
|
||||
|
||||
宿主在等待 CDP 就绪前即拥有启动的 Chromium 进程及其临时配置目录。Chromium 接收标准清理后的子进程环境,保留路径、区域设置和代理配置,排除凭据形式的变量及 DSH 身份信息。两种模式都在独立 Worker 中连接 SDK。Worker 除显式的源码 TypeScript 配置路径外不接收宿主环境,因此其 CDP 连接不继承宿主代理设置。SDK 关闭会等待活动操作。清理在配置的 SDK 宽限时间后终止连接 Worker;启动模式还会终止并等待自有 Chromium 进程退出,再移除配置目录。外部连接的浏览器保持运行。清理失败遵循下方的[所有权限制](#known-limitations-and-deferred-work)。
|
||||
|
||||
[原生运行时](src/native.ts)将显式模型配置传入 Stagehand 的公开初始化 API。Stagehand 在其浏览器扩展中负责模型请求、响应验证与 token 计量。DSH 通过现有 Session 日志记录浏览器工具输入和返回数据,包括 SDK 结果元数据。底层推理请求/响应捕获及其与 DSH Session 用量计量的集成均属暂缓工作。
|
||||
[原生运行时](src/native.ts)将显式模型配置传入 Stagehand 的公开初始化 API。适配器将 Zod 固定为 Stagehand 要求的版本,因为提取操作会向 SDK 传递 Zod schema。Stagehand 在其浏览器扩展中负责模型请求、响应验证与 token 计量。DSH 通过现有 Session 日志记录浏览器工具输入和返回数据,包括 SDK 结果元数据。底层推理请求/响应捕获及其与 DSH Session 用量计量的集成均属暂缓工作。
|
||||
|
||||
此包不发布不变量配套模块:每次浏览器操作都使用资源所有者获取的唯一句柄,没有独立维护、需要比较的浏览器关系。
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"@deepseek-ai/dsh-mcp-client": "workspace:*",
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.4.3",
|
||||
"@deepseek-ai/dsh-subprocess": "workspace:*",
|
||||
"@puppeteer/browsers": "3.2.2"
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"@deepseek-ai/dsh-mcp-client": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@trycua/cua-driver": "0.28.0",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@deepseek-ai/dsh-timeout": "workspace:*",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"sherpa-onnx-node": "1.13.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"@deepseek-ai/node-addon-system": "workspace:~",
|
||||
"@types/picomatch": "^3.0.2",
|
||||
"@types/readable-stream": "^4.0.24",
|
||||
"chokidar": "^5.0.0"
|
||||
"chokidar": "5.0.0"
|
||||
},
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis-plugin-include": "workspace:~",
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis-plugin-include": "workspace:~",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.3",
|
||||
"chokidar": "5.0.0",
|
||||
"koffi": "3.1.1",
|
||||
"@deepseek-ai/schemastery": "workspace:~"
|
||||
},
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-agent": "workspace:*",
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@opentelemetry/api-logs": "^0.220.0",
|
||||
"@opentelemetry/otlp-exporter-base": "^0.220.0",
|
||||
"@opentelemetry/sdk-logs": "^0.220.0"
|
||||
"@opentelemetry/api-logs": "0.222.0",
|
||||
"@opentelemetry/otlp-exporter-base": "0.222.0",
|
||||
"@opentelemetry/sdk-logs": "0.222.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-crypto": "workspace:*",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-agent": "workspace:*",
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-shell": "workspace:*",
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"@deepseek-ai/dsh-tools": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/schemastery": "workspace:~"
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-crypto": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-timeout": "workspace:*",
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"@deepseek-ai/dsh-http-proxy": "workspace:*",
|
||||
"@modelcontextprotocol/server": "2.0.0",
|
||||
"@modelcontextprotocol/node": "2.0.0",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"@deepseek-ai/dsh-mcp-resources": "workspace:*",
|
||||
"@deepseek-ai/dsh-system-prompt": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-agent": "workspace:*",
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-app-boot": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3",
|
||||
"zod": "4.6.5",
|
||||
"js-yaml": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-agent": "workspace:*",
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@js-temporal/polyfill": "0.5.1",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/dsh-session": "workspace:*",
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis-plugin-include": "workspace:~",
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@opentelemetry/api-logs": "^0.220.0",
|
||||
"@opentelemetry/otlp-exporter-base": "^0.220.0",
|
||||
"@opentelemetry/sdk-logs": "^0.220.0",
|
||||
"@opentelemetry/api-logs": "0.222.0",
|
||||
"@opentelemetry/otlp-exporter-base": "0.222.0",
|
||||
"@opentelemetry/sdk-logs": "0.222.0",
|
||||
"@deepseek-ai/schemastery": "workspace:~"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"@deepseek-ai/dsh-session-projection": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"dependencies": {
|
||||
"chokidar": "^5.0.0",
|
||||
"chokidar": "5.0.0",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"yaml": "^2.4.2"
|
||||
},
|
||||
|
||||
@@ -68,6 +68,6 @@
|
||||
"@deepseek-ai/dsh-ptc-runtime": "workspace:*",
|
||||
"@deepseek-ai/dsh-attachment-local": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-fs": "workspace:*",
|
||||
"sharp": "^0.35.3"
|
||||
"sharp": "0.35.5"
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/dsh-invariants": "workspace:*",
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@modelcontextprotocol/sdk": "^1.29.0",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"@deepseek-ai/dsh-chunked-list": "workspace:*",
|
||||
"@deepseek-ai/dsh-util-values": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
en: f141a9d909c555d8
|
||||
zh: e4f5b690ccb1337c
|
||||
/deepseek-ai-dsh-otel/understand-the-implementation:
|
||||
en: 0976ab2c661529bb
|
||||
zh: 9653db33fc70195d
|
||||
en: 3c475a975498a19a
|
||||
zh: ae7e26fc2450a222
|
||||
/deepseek-ai-dsh-otel/further-exploration:
|
||||
en: ee17b991de098cc0
|
||||
zh: f90257e411921f2b
|
||||
|
||||
@@ -36,6 +36,8 @@ Headers are explicit. The service does not add a channel header or inherit ambie
|
||||
|
||||
`src/index.ts` registers the service; `event-log.ts` owns ordinary SDK batching; `session-log.ts` owns byte/count scheduling; `transport.ts` supplies the Session SDK JSON HTTP delegate; `event-transport.ts` uses Got for cancellable ordinary-event HTTP requests and retry waits with SDK serialization and export accounting. No global OTel provider is installed. The Session processor measures each record once, groups conservative sizes, and waits for the SDK concurrency queue to clear after every callback before sending another request.
|
||||
|
||||
OpenTelemetry SDK dependencies use exact versions from one coordinated release across this service and its two adapters. Exporter self-metrics use the SDK's no-op meter; channels create no metrics pipeline.
|
||||
|
||||
No runtime invariant companion is published: channel creation registers no independent domain state, and collector delivery cannot be inferred from local queues. Composition tests exercise independent channels and service removal; adapter tests cover dependent-fiber cleanup and feedback authorization.
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
|
||||
@@ -36,6 +36,8 @@ Header 显式提供。服务不会附加 channel header,也不继承环境中
|
||||
|
||||
`src/index.ts` 注册服务;`event-log.ts` 负责普通事件的 SDK 聚合;`session-log.ts` 负责字节和条数调度;`transport.ts` 提供 Session 的 SDK JSON HTTP delegate;`event-transport.ts` 使用 Got 实现可取消的普通事件 HTTP 请求和重试等待,序列化与导出计数仍由 SDK 负责。不安装全局 OTel provider。Session processor 对每条记录只计量一次,按保守大小组包,并在每次回调后等待 SDK 并发队列清理完成才发送下一请求。
|
||||
|
||||
本服务及其两个适配器的 OpenTelemetry SDK 依赖使用同一配套版本系列的精确版本。Exporter 自身的指标使用 SDK 的空操作 meter;通道不创建指标上报管线。
|
||||
|
||||
不发布运行时不变式伴生入口:通道创建不注册独立领域状态,无法从本地队列推断 collector 是否收到记录。组合测试覆盖独立通道和服务移除;适配器测试覆盖依赖 fiber 清理与反馈授权。
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
"@opentelemetry/api-logs": "^0.220.0",
|
||||
"@opentelemetry/otlp-exporter-base": "^0.220.0",
|
||||
"@opentelemetry/resources": "^2.9.0",
|
||||
"@opentelemetry/sdk-logs": "^0.220.0",
|
||||
"@opentelemetry/core": "2.9.0",
|
||||
"@opentelemetry/otlp-transformer": "^0.220.0",
|
||||
"@opentelemetry/api-logs": "0.222.0",
|
||||
"@opentelemetry/otlp-exporter-base": "0.222.0",
|
||||
"@opentelemetry/resources": "2.11.0",
|
||||
"@opentelemetry/sdk-logs": "0.222.0",
|
||||
"@opentelemetry/core": "2.11.0",
|
||||
"@opentelemetry/otlp-transformer": "0.222.0",
|
||||
"got": "^14.6.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -3,7 +3,8 @@ import type { Agent as HttpsAgent } from 'node:https'
|
||||
import { gzipSync } from 'node:zlib'
|
||||
import got from 'got'
|
||||
import { createOtlpNetworkExportDelegate, OTLPExporterBase, type OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base'
|
||||
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer'
|
||||
import { createOtlpHttpExporterMetrics } from '@opentelemetry/otlp-exporter-base/node-http'
|
||||
import { JsonLogsSerializer, LogsExporterMetricsHelper } from '@opentelemetry/otlp-transformer'
|
||||
import type { LogRecordExporter } from '@opentelemetry/sdk-logs'
|
||||
import { logTransportOptions } from './transport.ts'
|
||||
|
||||
@@ -16,7 +17,8 @@ import { logTransportOptions } from './transport.ts'
|
||||
export function createEventLogExporter(options: OTLPExporterNodeConfigBase & { url: string }, signal: AbortSignal): LogRecordExporter {
|
||||
const config = logTransportOptions(options)
|
||||
let agent: ReturnType<typeof config.agentFactory> | undefined
|
||||
const exporter = new OTLPExporterBase(createOtlpNetworkExportDelegate(config, JsonLogsSerializer, {
|
||||
const metrics = createOtlpHttpExporterMetrics('otlp_http_log_exporter', LogsExporterMetricsHelper, config.url, undefined)
|
||||
const exporter = new OTLPExporterBase(createOtlpNetworkExportDelegate(config, JsonLogsSerializer, metrics, {
|
||||
async send(data, timeoutMillis) {
|
||||
signal.throwIfAborted()
|
||||
agent ??= config.agentFactory(new URL(config.url).protocol)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** Explicit OTLP JSON transport for feedback-authorized Session logs. */
|
||||
import { createOtlpHttpExportDelegate, getSharedConfigurationFromEnvironment, httpAgentFactoryFromOptions } from '@opentelemetry/otlp-exporter-base/node-http'
|
||||
import { getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults, OTLPExporterBase, type OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base'
|
||||
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer'
|
||||
import { JsonLogsSerializer, LogsExporterMetricsHelper } from '@opentelemetry/otlp-transformer'
|
||||
import type { LogRecordExporter } from '@opentelemetry/sdk-logs'
|
||||
|
||||
/**
|
||||
@@ -10,7 +10,9 @@ import type { LogRecordExporter } from '@opentelemetry/sdk-logs'
|
||||
* @returns the exporter owned by one independent log pipeline.
|
||||
*/
|
||||
export function createLogExporter(options: OTLPExporterNodeConfigBase & { url: string }): LogRecordExporter {
|
||||
return new OTLPExporterBase(createOtlpHttpExportDelegate(logTransportOptions(options), JsonLogsSerializer))
|
||||
return new OTLPExporterBase(createOtlpHttpExportDelegate(
|
||||
logTransportOptions(options), JsonLogsSerializer, 'otlp_http_log_exporter', LogsExporterMetricsHelper, undefined,
|
||||
))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/dsh-agent": "workspace:*",
|
||||
|
||||
@@ -42,6 +42,6 @@
|
||||
"@deepseek-ai/dsh-tool-cordis": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-registry": "workspace:*",
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,6 @@
|
||||
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
|
||||
"@deepseek-ai/dsh-typert-registry": "workspace:*",
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
|
||||
@@ -33,6 +33,6 @@
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
},
|
||||
"dependencies": {
|
||||
"undici": "^8.10.0"
|
||||
"undici": "8.11.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"dependencies": {
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"ipaddr.js": "^2.5.0",
|
||||
"undici": "^8.10.0"
|
||||
"undici": "8.11.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh-brand": "workspace:*",
|
||||
"zod": "^4.4.3"
|
||||
"zod": "4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
Generated
+392
-367
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user