mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
Add node24-win-x64 as the only supported Windows runtime target and publish it as a py3-none-win_amd64 wheel containing the conventional dsh and ripgrep .exe payload names. Keep Windows ARM64 rejected explicitly so Python cannot claim a carrier that CI and release automation do not build. Teach the pkg builder to require a native x64 Windows host, validate both node-pty ConPTY addons, copy @vscode's win32 ripgrep executable, and recognize pkg's .exe output. Extend runtime resolution, wheel staging, payload validation, and the preset closure check so the Windows-specific PowerShell plugins and sidecars fail loud when omitted. The sidecar resolver now maps a packaged main.exe to main-rg.exe; focused TypeScript and Python tests cover that name, the win_amd64 manifest, x64-only host selection, complete wheel payload, ConPTY inventory, and platform-conditioned plugin closure.
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
/** Resolve the native node-pty input used by the Python SDK runtime builder. */
|
|
|
|
import { existsSync } from 'node:fs'
|
|
import { join } from 'node:path'
|
|
|
|
/**
|
|
* Prefer the workflow's manylinux build and fall back to node-pty's target prebuild.
|
|
* @param packageDirectory - installed node-pty package directory.
|
|
* @param arch - Linux target architecture.
|
|
* @returns the existing addon path.
|
|
*/
|
|
export function resolveLinuxNodePtyAddon(
|
|
packageDirectory: string,
|
|
arch: 'x64' | 'arm64',
|
|
): string {
|
|
const built = join(packageDirectory, 'build', 'Release', 'pty.node')
|
|
if (existsSync(built)) return built
|
|
const prebuilt = join(packageDirectory, 'prebuilds', `linux-${arch}`, 'pty.node')
|
|
if (existsSync(prebuilt)) return prebuilt
|
|
throw new Error(
|
|
`build-exe-for-python-sdk: node-pty addon is absent from both ${built} and ${prebuilt}.`,
|
|
)
|
|
}
|
|
|
|
/**
|
|
* Require both node-pty addons used by the Windows ConPTY backend.
|
|
* @param packageDirectory - staged node-pty package directory.
|
|
* @param arch - Windows target architecture.
|
|
* @returns the existing addon paths in load order.
|
|
*/
|
|
export function resolveWindowsNodePtyAddons(
|
|
packageDirectory: string,
|
|
arch: 'x64',
|
|
): string[] {
|
|
const directory = join(packageDirectory, 'prebuilds', `win32-${arch}`)
|
|
const addons = [
|
|
join(directory, 'conpty.node'),
|
|
join(directory, 'conpty_console_list.node'),
|
|
]
|
|
const missing = addons.filter(path => !existsSync(path))
|
|
if (missing.length > 0) {
|
|
throw new Error(`build-exe-for-python-sdk: Windows node-pty addons are missing: ${missing.join(', ')}.`)
|
|
}
|
|
return addons
|
|
}
|