@@ -7,31 +7,19 @@ import { type CostMode } from '@codebuff/common/constants'
77import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
88import { Command , Option } from 'commander'
99import { red } from 'picocolors'
10- import { CodebuffClient , type AgentConfig } from '@codebuff/sdk'
10+ import { CodebuffClient , type AgentDefinition } from '@codebuff/sdk'
1111
12- import { displayLoadedAgents , loadLocalAgents } from './agents/load-agents'
13- import { CLI } from './cli'
1412import { cliArguments , cliOptions } from './cli-definitions'
1513import { handlePublish } from './cli-handlers/publish'
1614import { npmAppVersion } from './config'
1715import { createTemplateProject } from './create-template-project'
1816import { printModeLog , setPrintMode } from './display/print-mode'
19- import { enableSquashNewlines } from './display/squash-newlines'
20- import { loadCodebuffConfig } from './json-config/parser'
21- import {
22- getProjectRoot ,
23- getWorkingDirectory ,
24- initializeProjectRootAndWorkingDir ,
25- initProjectFileContextWithWorker ,
26- } from './project-files'
27- import { rageDetectors } from './rage-detectors'
28- import { logAndHandleStartup } from './startup-process-handler'
17+ import { initializeProjectRootAndWorkingDir } from './project-files'
2918import { recreateShell , runTerminalCommand } from './terminal/run-command'
30- import { initAnalytics , trackEvent } from './utils/analytics'
19+ import { trackEvent } from './utils/analytics'
3120import { logger } from './utils/logger'
3221
3322import type { CliOptions } from './types'
34- import { validateAgentDefinitionsIfAuthenticated } from './utils/agent-validation'
3523
3624async function codebuff ( {
3725 initialInput,
@@ -80,19 +68,20 @@ async function codebuff({
8068 console . log ( 'client created' )
8169 console . log ( 'starting run' )
8270
83- const agentConfig : AgentConfig = {
71+ const agentDefinition : AgentDefinition = {
8472 id : 'my-awesome-agent' ,
8573 displayName : 'My awesome agent' ,
8674 model : 'openai/gpt-5' ,
8775 instructionsPrompt : 'Do something awesome' ,
76+ spawnerPrompt : 'Spawner for my awesome agent' ,
8877 }
8978 const run = await client . run ( {
9079 agent : agent ?? 'base' ,
9180 prompt : initialInput ?? 'hi' ,
9281 handleEvent : ( event ) => {
9382 console . log ( 'event:' , event )
9483 } ,
95- agentConfigs : [
84+ agentDefinitions : [
9685 {
9786 id : 'my-awesome-agent' ,
9887 displayName : 'My awesome agent' ,
0 commit comments