Skip to content

Commit 84c5d20

Browse files
committed
Fix agent definition to not include Placeholders
1 parent 4018082 commit 84c5d20

File tree

3 files changed

+4
-34
lines changed

3 files changed

+4
-34
lines changed

.agents/types/agent-definition.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export interface AgentDefinition {
116116
/** Programmatically step the agent forward and run tools.
117117
*
118118
* You can either yield:
119-
* - A tool call object with toolName and args properties.
119+
* - A tool call object with toolName and input properties.
120120
* - 'STEP' to run agent's model and generate one assistant message.
121121
* - 'STEP_ALL' to run the agent's model until it uses the end_turn tool or stops includes no tool calls in a message.
122122
*
@@ -126,7 +126,7 @@ export interface AgentDefinition {
126126
* function* handleSteps({ agentStep, prompt, params}) {
127127
* const { toolResult } = yield {
128128
* toolName: 'read_files',
129-
* args: { paths: ['file1.txt', 'file2.txt'] }
129+
* input: { paths: ['file1.txt', 'file2.txt'] }
130130
* }
131131
* yield 'STEP_ALL'
132132
* }
@@ -136,7 +136,7 @@ export interface AgentDefinition {
136136
* while (true) {
137137
* yield {
138138
* toolName: 'spawn_agents',
139-
* args: {
139+
* input: {
140140
* agents: [
141141
* {
142142
* agent_type: 'thinker',

.agents/types/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export interface WebSearchParams {
173173
/** The search query to find relevant web content */
174174
query: string
175175
/** Search depth - 'standard' for quick results, 'deep' for more comprehensive search. Default is 'standard'. */
176-
depth: 'standard' | 'deep'
176+
depth?: 'standard' | 'deep'
177177
}
178178

179179
/**

common/src/templates/initial-agents-dir/types/agent-definition.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -320,33 +320,3 @@ export type ModelName =
320320
import type * as Tools from './tools'
321321
export type { Tools }
322322
type ToolName = Tools.ToolName
323-
324-
// ============================================================================
325-
// Placeholders (ported from backend/src/templates/types.ts)
326-
// ============================================================================
327-
328-
const placeholderNames = [
329-
'AGENT_NAME',
330-
'AGENTS_PROMPT',
331-
'CONFIG_SCHEMA',
332-
'FILE_TREE_PROMPT',
333-
'GIT_CHANGES_PROMPT',
334-
'INITIAL_AGENT_PROMPT',
335-
'KNOWLEDGE_FILES_CONTENTS',
336-
'PROJECT_ROOT',
337-
'REMAINING_STEPS',
338-
'SYSTEM_INFO_PROMPT',
339-
'TOOLS_PROMPT',
340-
'USER_CWD',
341-
'USER_INPUT_PROMPT',
342-
] as const
343-
344-
type PlaceholderType<T extends readonly string[]> = {
345-
[K in T[number]]: `{CODEBUFF_${K}}`
346-
}
347-
348-
export const PLACEHOLDER = Object.fromEntries(
349-
placeholderNames.map((name) => [name, `{CODEBUFF_${name}}` as const]),
350-
) as PlaceholderType<typeof placeholderNames>
351-
export type PlaceholderValue = (typeof PLACEHOLDER)[keyof typeof PLACEHOLDER]
352-
export const placeholderValues = Object.values(PLACEHOLDER)

0 commit comments

Comments
 (0)