Skip to content

Commit 1b85e5b

Browse files
committed
Tweak
1 parent ac9afe7 commit 1b85e5b

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

npm-app/src/index.ts

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,19 @@ import { type CostMode } from '@codebuff/common/constants'
77
import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
88
import { Command, Option } from 'commander'
99
import { 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'
1412
import { cliArguments, cliOptions } from './cli-definitions'
1513
import { handlePublish } from './cli-handlers/publish'
1614
import { npmAppVersion } from './config'
1715
import { createTemplateProject } from './create-template-project'
1816
import { 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'
2918
import { recreateShell, runTerminalCommand } from './terminal/run-command'
30-
import { initAnalytics, trackEvent } from './utils/analytics'
19+
import { trackEvent } from './utils/analytics'
3120
import { logger } from './utils/logger'
3221

3322
import type { CliOptions } from './types'
34-
import { validateAgentDefinitionsIfAuthenticated } from './utils/agent-validation'
3523

3624
async 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

Comments
 (0)