feat: add deepseek-harness workbench plugin and console diagnosis API
- console: GET /api/workflows/{id}, /runs/{run_id}, /runs/{run_id}/diagnosis
(journal trace + sanitized bounded log tails, workflow/run pairing enforced)
- workbench/: dsh 宿主插件(7 个工作流工具、中文系统提示词、失败监控器、
本机回环桥接服务)+ 侧边栏面板客户端包(sidebar.footer.action 与
shell.overlay 追加插槽)+ 降级独立面板 + 一键启动脚本
- adapters/browser: 收敛 looks_like_login_url 到共享层,修复
jd_main_image_collector 对 gyxx_flow.accounts 的越层导入
- tests: 新端点覆盖;replay_policy 断言对齐已迁移的 catalog(repeatable)
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* 构建客户端包:esbuild(CJS / browser / 平台模块外置)+ dsh 模块加载器包装。
|
||||
* 包装协议与 dsh 官方 tsdown 产物一致:
|
||||
* window.__ModuleLoader__.load({ id, factory: (require) => { ... return module.exports } })
|
||||
*/
|
||||
|
||||
import { build } from 'esbuild'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const PKG_ID = '@gyxx/dsh-plugin-gyxx-workbench'
|
||||
|
||||
// dsh 平台共享模块表(packages/client/web/src/platform.ts 的 PLATFORM_MODULES)
|
||||
const PLATFORM_EXTERNALS = [
|
||||
'react',
|
||||
'react/jsx-runtime',
|
||||
'react-dom',
|
||||
'react-dom/client',
|
||||
'@deepseek-ai/cordis',
|
||||
'@deepseek-ai/dsh-client-store',
|
||||
'@deepseek-ai/dsh-client-ui-slots',
|
||||
'@deepseek-ai/dsh-client-ui-primitives',
|
||||
]
|
||||
|
||||
await build({
|
||||
absWorkingDir: root,
|
||||
entryPoints: ['client/src/index.jsx'],
|
||||
bundle: true,
|
||||
format: 'cjs',
|
||||
platform: 'browser',
|
||||
target: 'es2020',
|
||||
outfile: 'lib/client.js',
|
||||
external: PLATFORM_EXTERNALS,
|
||||
loader: { '.css': 'text' },
|
||||
jsx: 'automatic',
|
||||
sourcemap: true,
|
||||
minify: false,
|
||||
define: {
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV ?? 'production'),
|
||||
},
|
||||
banner: {
|
||||
js: `window.__ModuleLoader__.load({ id: ${JSON.stringify(PKG_ID)}, factory: (require) => {`,
|
||||
},
|
||||
footer: { js: 'return module.exports; } });' },
|
||||
logLevel: 'info',
|
||||
})
|
||||
|
||||
console.log('built lib/client.js')
|
||||
Reference in New Issue
Block a user