@@ -13,6 +13,9 @@ import * as jobCmd from './commands/job.js';
1313import * as memoryCmd from './commands/memory.js' ;
1414import * as deployCmd from './commands/deploy.js' ;
1515import * as runCmd from './commands/run.js' ;
16+ import * as authCmd from './commands/auth.js' ;
17+ import * as auditCmd from './commands/audit.js' ;
18+ import * as contractsCmd from './commands/contracts.js' ;
1619import * as http from './http.js' ;
1720import * as out from './output.js' ;
1821
2326 agent-os <command> <subcommand> [options]
2427
2528COMMANDS
29+ login Store API key [--api-key <key>] [--host <url>]
30+ logout Clear stored API key
31+
2632 agent create Create an agent --type <type> --name <name> [--oversight <level>]
2733 agent list List agents
2834 agent start Start an agent <id> --job '<json>'
@@ -38,6 +44,9 @@ COMMANDS
3844 run <type> Run a single agent --topic <topic> [--model <m>] [--provider <p>]
3945 run pipeline Run a pipeline --contract <name> --topic <topic>
4046
47+ contracts list List available contracts
48+ audit Show audit trail <pipeline-id>
49+
4150 deploy docker Deploy with Docker
4251 deploy fly Deploy to Fly.io [--region <region>] [--app <name>]
4352
@@ -148,6 +157,29 @@ export async function main(argv) {
148157 out . info ( `agent-os v${ getVersion ( ) } ` ) ;
149158 break ;
150159
160+ case 'login' :
161+ await authCmd . login ( args , opts ) ;
162+ break ;
163+
164+ case 'logout' :
165+ await authCmd . logout ( args , opts ) ;
166+ break ;
167+
168+ case 'audit' :
169+ // subcommand becomes the first positional arg for audit
170+ await auditCmd . trail ( subcommand ? [ subcommand , ...args ] : args , opts ) ;
171+ break ;
172+
173+ case 'contracts' :
174+ switch ( subcommand ) {
175+ case 'list' : await contractsCmd . listContracts ( args , opts ) ; break ;
176+ default :
177+ out . error ( `Unknown contracts command: ${ subcommand } ` ) ;
178+ out . info ( 'Available: list' ) ;
179+ process . exit ( 1 ) ;
180+ }
181+ break ;
182+
151183 case 'health' : {
152184 const result = await http . get ( '/api/v1/health' , opts ) ;
153185 if ( opts . json ) {
0 commit comments