|
|
@@ -10,6 +10,7 @@ import { Command, CommanderError } from 'commander'
|
|
|
import type { Context } from '@deepseek-ai/cordis'
|
|
|
import { parseCmdline } from '@deepseek-ai/dsh-cmdline'
|
|
|
import { boundJsonLine } from './json-stream.ts'
|
|
|
+import { internals } from './startup-internals.ts'
|
|
|
|
|
|
/** Stable Cordis plugin name. */
|
|
|
export const name = 'headless-startup'
|
|
|
@@ -30,15 +31,6 @@ export interface HeadlessStartupValues {
|
|
|
json: boolean
|
|
|
}
|
|
|
|
|
|
-/** Process facts the provider reads; tests substitute them. */
|
|
|
-export const internals: {
|
|
|
- stdinIsTty: () => boolean
|
|
|
- stdout: { write(chunk: string): unknown }
|
|
|
-} = {
|
|
|
- stdinIsTty: () => process.stdin.isTTY,
|
|
|
- stdout: process.stdout,
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* This app's command: the task positional, its options, and its help text.
|
|
|
* @returns a fresh program, so one process can parse more than once (tests).
|