feat(cli): add runner start with optional SRT sandboxing

This commit is contained in:
yiling
2026-11-17 16:12:03 +08:00
parent d801d166bb
commit 3e992c0e9d
17 changed files with 1867 additions and 56 deletions
+15
View File
@@ -7,6 +7,7 @@ import { cliExtensions } from './operations/extensions'
import { registerOperationCommands } from './operations/generate'
import type { Output } from './operations/render'
import { version } from '../package.json'
import { startRunner } from './runner/client'
export interface ProgramOptions {
callOperation?: CallOperation
@@ -43,6 +44,20 @@ export function createProgram(options: ProgramOptions = {}): Command {
extensions: cliExtensions,
})
program
.command('runner')
.description('Connect a local bash runner to Shumai.')
.command('start')
.description('Run in the foreground using a key created in Settings → Agent Runners.')
.option('--url <url>', 'Shumai server URL (or SHUMAI_API_SERVER).')
.option('--key <key>', 'Runner key (prefer SHUMAI_RUNNER_KEY to avoid shell history).')
.option('--cwd <directory>', 'Runner workspace directory (defaults to the current directory).')
.option(
'--srt <file>',
'Wrap bash commands with locally installed srt using this JSON settings file.',
)
.action(startRunner)
program
.command('upload')
.description('Upload a local file or folder to a parent folder.')