mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
Resolve packaged profile proxies with Node ESM import conditions from each package installation, and fail loud when an explicit runtime export or legacy main entry is missing. Serialize the shared profile fallback under the existing cross-process writer lock so concurrent dsh processes cannot observe partial proxies; either carrier now replaces the other carrier’s managed entry without manual cleanup. Give Python initialize its own 10-second default bound and name the selected profile in timeout diagnostics, while leaving ordinary agent turns unbounded by default. Package the dynamically resolved web frontend and skill-badge assets so the runtime wheel’s normal dsh profiles do not depend on pkg static-discovery accidents. Rewrite the root launch rule and every active stale SDK-runtime note to the shipped dsh profile architecture in both languages. Focused tests prove import-only and transitive package exports, lock contention, cross-carrier transitions, missing-entry failures, asset inventory, and bounded initialization.
28 lines
906 B
TypeScript
28 lines
906 B
TypeScript
import { spawnSync } from 'node:child_process'
|
|
import { resolve } from 'node:path'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
const root = resolve(import.meta.dirname, '..')
|
|
const script = resolve(root, 'scripts/build-exe-for-python-sdk.ts')
|
|
|
|
describe('Python runtime executable assets', () => {
|
|
it('packages the dynamically resolved web frontend distribution', () => {
|
|
const result = spawnSync(process.execPath, [
|
|
'--import',
|
|
'tsx/esm',
|
|
script,
|
|
'--skip-build',
|
|
'--dry-run',
|
|
'--targets=node24-macos-arm64',
|
|
], {
|
|
cwd: root,
|
|
encoding: 'utf8',
|
|
env: { ...process.env, npm_execpath: 'C:\\tools\\pnpm.cjs' },
|
|
})
|
|
|
|
expect(result.status).toBe(0)
|
|
expect(result.stdout).toContain('node_modules/@deepseek-ai/dsh-web-frontend/dist/**/*')
|
|
expect(result.stdout).toContain('node_modules/@deepseek-ai/dsh-skill-badge/assets/**/*')
|
|
})
|
|
})
|