diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 6c6af23c..e15f2126 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -181,6 +181,31 @@ Commands: persona-maker with the task as input, or exits non-zero (non-TTY) with a hint. Exit codes: 0 match, 2 no match, 3 picker unavailable. + deploy [flags] + Deploy a persona as a managed agent. Modes: + --mode dev run the persona locally (default if + no Daytona/workspace creds resolve) + --mode sandbox run inside a Daytona sandbox + (default when creds resolve) + --mode cloud POST persona + bundle to the + workforce cloud workspace + Flags: + --workspace pick a non-default workspace + --no-connect skip integration-connect prompts + (fail if any integration is missing) + --byo-sandbox force BYO Daytona auth + --detach background the runner instead of + streaming logs in the foreground + --bundle-out emit the bundle to and exit + without launching + --dry-run validate the persona; no side effects + --cloud-url override the workforce cloud URL + --input KEY=value override a declared persona input + (repeat for multiple) + login Connect this machine to a workforce workspace. The + browser-based flow is rolling out; until then it prints + the WORKFORCE_WORKSPACE_ID / WORKFORCE_WORKSPACE_TOKEN + env-var setup instructions and exits non-zero. Options: -h, --help Show this help text. @@ -207,6 +232,9 @@ Examples: agentworkforce harness check agentworkforce pick "review this PR for security issues" agentworkforce agent "$(agentworkforce pick "fix the flaky test in foo.test.ts")" + agentworkforce deploy ./personas/weekly-digest.json --mode cloud + agentworkforce deploy ./personas/weekly-digest.json --mode sandbox --input TOPIC="Deploy v1" + agentworkforce login `; function die(msg: string, withUsage = true): never { diff --git a/packages/cli/src/deploy-command.ts b/packages/cli/src/deploy-command.ts index ba5d8a94..c22756d1 100644 --- a/packages/cli/src/deploy-command.ts +++ b/packages/cli/src/deploy-command.ts @@ -11,7 +11,7 @@ import { const DEFAULT_CLOUD_URL = 'https://agentrelay.com'; /** - * Argv parser + dispatcher for `workforce deploy [flags]`. + * Argv parser + dispatcher for `agentworkforce deploy [flags]`. * Keeps cli.ts itself slim — the file is already a large dispatcher and * each command lands in its own module when it grows past trivial. */ @@ -47,7 +47,7 @@ export async function runDeploy(args: readonly string[]): Promise { process.exit(exit.code); } catch (err) { process.stderr.write( - `\nworkforce deploy failed: ${err instanceof Error ? err.message : String(err)}\n` + `\nagentworkforce deploy failed: ${err instanceof Error ? err.message : String(err)}\n` ); process.exit(1); } @@ -73,7 +73,7 @@ export async function runLogin(args: readonly string[]): Promise { ?? process.env.WORKFORCE_WORKSPACE_ID?.trim() ?? (await io.prompt('Workspace ID')).trim(); if (!workspace) { - process.stderr.write('workforce login failed: workspace is required; pass --workspace or set WORKFORCE_WORKSPACE_ID\n'); + process.stderr.write('agentworkforce login failed: workspace is required; pass --workspace or set WORKFORCE_WORKSPACE_ID\n'); process.exit(1); } @@ -90,13 +90,13 @@ export async function runLogin(args: readonly string[]): Promise { process.exit(0); } catch (err) { process.stderr.write( - `\nworkforce login failed: ${err instanceof Error ? err.message : String(err)}\n` + `\nagentworkforce login failed: ${err instanceof Error ? err.message : String(err)}\n` ); process.exit(1); } } -const DEPLOY_USAGE = `usage: workforce deploy [flags] +const DEPLOY_USAGE = `usage: agentworkforce deploy [flags] Flags: --mode dev|sandbox|cloud Pick a run mode (default: sandbox if Daytona/workspace creds resolve, else dev) @@ -115,7 +115,7 @@ Flags: -h, --help Print this message `; -const LOGIN_USAGE = `usage: workforce login [flags] +const LOGIN_USAGE = `usage: agentworkforce login [flags] Connect this machine to a workforce workspace using the browser OAuth flow. The resulting workspace token is stored in the OS keychain when available, @@ -202,7 +202,7 @@ export function parseDeployArgs(args: readonly string[]): DeployOptions { } if (!personaPath) { - die('deploy: missing persona path. Usage: workforce deploy '); + die('deploy: missing persona path. Usage: agentworkforce deploy '); } return {