fc4ac98e9f
Wire DeepSeek Harness as an optional fourth code executor (default off) and add a loopback observation script that compares prompt tokens through headroom proxy with OPENAI_TARGET_API_URL pointed at the compat proxy. Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Local DeepSeek Harness executor dry-run probe.
|
|
*/
|
|
import { buildDshExecutorLaunchPlan, dshExecutorEnabled } from '../dsh-agent-launch.mjs';
|
|
|
|
if (!dshExecutorEnabled(process.env)) {
|
|
console.log('DSH_EXECUTOR_SKIP: MEMIND_TOOL_GATEWAY_DSH_ENABLED is off');
|
|
process.exit(0);
|
|
}
|
|
|
|
const plan = buildDshExecutorLaunchPlan({
|
|
cwd: process.cwd(),
|
|
instruction: process.env.MEMIND_DSH_SMOKE_TASK ?? 'List three files in the workspace root and stop.',
|
|
env: process.env,
|
|
runtimeEnv: {
|
|
DEEPSEEK_API_KEY: process.env.DEEPSEEK_API_KEY ?? process.env.OPENAI_API_KEY ?? '',
|
|
},
|
|
});
|
|
|
|
console.log('DSH_EXECUTOR_PLAN:');
|
|
console.log(JSON.stringify({
|
|
ok: plan.ok,
|
|
executor: plan.executor,
|
|
command: plan.command,
|
|
argsPreview: plan.args?.slice?.(0, 4),
|
|
cwd: plan.cwd,
|
|
message: plan.message ?? null,
|
|
}, null, 2));
|
|
|
|
if (!plan.ok) {
|
|
console.error('DSH_EXECUTOR_FAIL: launch plan unavailable');
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('DSH_EXECUTOR_OK: dry-run plan ready (use tool-gateway dry-run to execute)');
|