mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
Rename the tool-presentation transport from code-mode to ptc everywhere that is not written into session logs: the mode config value becomes 'ptc', the preset directory/id becomes ptc, the demo becomes demo:ptc, the dispatch waterfall becomes tools/ptc-dispatch-log (types PtcDispatch*), the prompt rule becomes tools:ptc-only, source/test files become ptc.ts etc., and prose says PTC mode / PTC 模式. The session-persistent vocabulary (durable events tool/code-dispatch*, logged plugin name tools-code-mode, sub-call id segment :code:) intentionally stays and moves in the stacked persistence PR, which is blocked until the SESSION_FORMAT_VERSION v0→v1 migration lands with it. run_code, its code parameter, CodeSdkLanguage, CodeRunFailedError, the dsh-code-runtime family, third-party codex names, and frozen archived notes keep their names.
19 lines
574 B
JavaScript
19 lines
574 B
JavaScript
/** Run one headless task through the shipped PTC mode composition. Requires a model credential. */
|
|
import { spawn } from 'node:child_process'
|
|
|
|
const task = process.argv.slice(2).join(' ').trim()
|
|
|| 'Inspect this repository with PTC mode and report its top-level architecture.'
|
|
|
|
const child = spawn(process.execPath, [
|
|
'--import',
|
|
'tsx/esm',
|
|
'apps/cli/src/bin.ts',
|
|
'--profile',
|
|
'headless',
|
|
task,
|
|
], {
|
|
stdio: 'inherit',
|
|
env: { ...process.env, DSH_TOOLS_MODE: 'ptc' },
|
|
})
|
|
child.on('exit', (code, signal) => { process.exit(signal !== null ? 1 : code ?? 1) })
|