From e38f8292d4e2f48c327a4c5c18e02da93f27714f Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Wed, 28 Jan 2026 23:22:22 +0700 Subject: [PATCH] chore(cli): enable strict TypeScript config --- packages/cli/src/commands/agent/index.ts | 24 ++++++++++++++++++++++++ packages/cli/tsconfig.json | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/agent/index.ts b/packages/cli/src/commands/agent/index.ts index ae116d097..6351a20bc 100644 --- a/packages/cli/src/commands/agent/index.ts +++ b/packages/cli/src/commands/agent/index.ts @@ -1,5 +1,8 @@ import { Command } from 'commander' 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' export function createAgentCommand(): Command { @@ -14,5 +17,26 @@ export function createAgentCommand(): Command { .option('--host ', 'Daemon host:port (default: localhost:6767)') .action(withOutput(runPsCommand)) + agent + .command('run') + .description('Create and start an agent with a task') + .argument('', 'The task/prompt for the agent') + .option('-d, --detach', 'Run in background (detached)') + .option('--name ', 'Assign a name/title to the agent') + .option('--provider ', 'Agent provider: claude | codex | opencode', 'claude') + .option('--mode ', 'Provider-specific mode (e.g., plan, default, bypass)') + .option('--cwd ', 'Working directory (default: current)') + .option('--host ', 'Daemon host:port (default: localhost:6767)') + .action(withOutput(runRunCommand)) + + agent + .command('send') + .description('Send a message/task to an existing agent') + .argument('', 'Agent ID (or prefix)') + .argument('', 'The message/task to send') + .option('--no-wait', 'Return immediately (default: wait for completion)') + .option('--host ', 'Daemon host:port (default: localhost:6767)') + .action(withOutput(runSendCommand)) + return agent } diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 0a76a2787..366ff8032 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -10,7 +10,8 @@ "sourceMap": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true }, "include": ["src/**/*"], "exclude": ["node_modules", "dist", "src/**/*.test.ts"]