chore(cli): enable strict TypeScript config
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
import { Command } from 'commander'
|
import { Command } from 'commander'
|
||||||
import { runPsCommand } from './ps.js'
|
import { runPsCommand } from './ps.js'
|
||||||
|
import { runRunCommand } from './run.js'
|
||||||
|
import { runSendCommand } from './send.js'
|
||||||
|
import { runStopCommand } from './stop.js'
|
||||||
import { withOutput } from '../../output/index.js'
|
import { withOutput } from '../../output/index.js'
|
||||||
|
|
||||||
export function createAgentCommand(): Command {
|
export function createAgentCommand(): Command {
|
||||||
@@ -14,5 +17,26 @@ export function createAgentCommand(): Command {
|
|||||||
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||||
.action(withOutput(runPsCommand))
|
.action(withOutput(runPsCommand))
|
||||||
|
|
||||||
|
agent
|
||||||
|
.command('run')
|
||||||
|
.description('Create and start an agent with a task')
|
||||||
|
.argument('<prompt>', 'The task/prompt for the agent')
|
||||||
|
.option('-d, --detach', 'Run in background (detached)')
|
||||||
|
.option('--name <name>', 'Assign a name/title to the agent')
|
||||||
|
.option('--provider <provider>', 'Agent provider: claude | codex | opencode', 'claude')
|
||||||
|
.option('--mode <mode>', 'Provider-specific mode (e.g., plan, default, bypass)')
|
||||||
|
.option('--cwd <path>', 'Working directory (default: current)')
|
||||||
|
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||||
|
.action(withOutput(runRunCommand))
|
||||||
|
|
||||||
|
agent
|
||||||
|
.command('send')
|
||||||
|
.description('Send a message/task to an existing agent')
|
||||||
|
.argument('<id>', 'Agent ID (or prefix)')
|
||||||
|
.argument('<prompt>', 'The message/task to send')
|
||||||
|
.option('--no-wait', 'Return immediately (default: wait for completion)')
|
||||||
|
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||||
|
.action(withOutput(runSendCommand))
|
||||||
|
|
||||||
return agent
|
return agent
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noImplicitReturns": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"exclude": ["node_modules", "dist", "src/**/*.test.ts"]
|
"exclude": ["node_modules", "dist", "src/**/*.test.ts"]
|
||||||
|
|||||||
Reference in New Issue
Block a user