mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Move the agent-spine bundle and the stdio/ACP/JSON-RPC app packages out of core/ and ui/ into a new packages/examples/ group, renamed with a -demo suffix so the npm name marks them as non-product surface: core/agent-core -> examples/agent-spine-demo (dsh-agent-spine-demo) ui/stdio-agent -> examples/stdio-demo (dsh-stdio-demo) ui/acp-agent -> examples/acp-demo (dsh-acp-demo) ui/jsonrpc-agent -> examples/jsonrpc-demo (dsh-jsonrpc-demo) Update every code/config/test reference and reference-only doc mentions, and regenerate module-graph, config-catalog, and doc-graphs. The jsonrpc bin (dsh-jsonrpc-agent) and single-file exe (dsh-jsonrpc-agent-pkg) keep their names; the SDK runtime-startup surface is reconciled separately.
36 lines
1.4 KiB
JavaScript
36 lines
1.4 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Boot an ACP stdio server from `cordis.yml`; usage is
|
|
* `dsh-acp-demo [--config path]`, defaulting to `./cordis.yml`. Shared env
|
|
* loading, Loader guards, snapshot config selection, and settled-tree boot live
|
|
* in dsh-app-boot. Replay skips `.env` and selects sibling
|
|
* `cordis.snapshot.yml` so a stray key cannot trigger a model call. EOF disposes
|
|
* and flushes snapshot runs; editors normally own process lifetime. Stdout is
|
|
* reserved for JSON-RPC, so diagnostics go only to stderr.
|
|
* @module @deepseek-ai/dsh-acp-demo/bin
|
|
*/
|
|
|
|
import { parseArgs } from 'node:util'
|
|
import { boot, installFailLoud, loadEnv, resolveConfigPath } from '@deepseek-ai/dsh-app-boot'
|
|
|
|
const NAME = 'dsh-acp-demo'
|
|
|
|
/* v8 ignore start -- thin self-executing composition over the unit-tested
|
|
dsh-app-boot helpers; exercised end-to-end by the snapshot suite and the
|
|
built-bin smoke */
|
|
installFailLoud(NAME)
|
|
const snapshotMode = process.env['DSH_SNAPSHOT']
|
|
if (snapshotMode !== 'replay') loadEnv(NAME)
|
|
const { values } = parseArgs({
|
|
args: process.argv.slice(2),
|
|
options: { config: { type: 'string', short: 'c' } },
|
|
strict: true,
|
|
})
|
|
const ctx = await boot(NAME, resolveConfigPath(values.config ?? './cordis.yml', snapshotMode))
|
|
if (snapshotMode !== undefined) {
|
|
process.stdin.on('end', () => {
|
|
void ctx.fiber.dispose().then(() => { process.exit(0) })
|
|
})
|
|
}
|
|
/* v8 ignore stop */
|