Skip to content

Commit 68e4f6c

Browse files
committed
Fix the types for our .agents, by extracting SecretAgentDefinition for our base agents (includes all tools)
1 parent 02ef7c0 commit 68e4f6c

File tree

13 files changed

+57
-38
lines changed

13 files changed

+57
-38
lines changed

.agents/ask.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'ask',
77
version,
88
publisher,

.agents/base-experimental.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'base-experimental',
77
version,
88
publisher,

.agents/base-lite.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'base-lite',
77
version,
88
publisher,

.agents/base-max.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'base-max',
77
version,
88
publisher,

.agents/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'base',
77
version,
88
publisher,

.agents/claude4-gemini-thinking.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'claude4-gemini-thinking',
77
version,
88
publisher,

.agents/opensource/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { AgentDefinition } from '../types/agent-definition'
1+
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
22

3-
const definition: AgentDefinition = {
3+
const definition: SecretAgentDefinition = {
44
id: 'oss-model-base',
55
publisher: 'codebuff',
66
model: 'qwen/qwen3-235b-a22b-2507:fast',

.agents/superagent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { publisher, version } from './constants'
22

3-
import type { AgentDefinition } from './types/agent-definition'
3+
import type { SecretAgentDefinition } from './types/secret-agent-definition'
44

5-
const definition: AgentDefinition = {
5+
const definition: SecretAgentDefinition = {
66
id: 'superagent',
77
version,
88
publisher,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { AgentDefinition } from './agent-definition'
2+
import type * as Tools from './tools'
3+
export type { Tools }
4+
5+
export type AllToolNames =
6+
| Tools.ToolName
7+
| 'add_subgoal'
8+
| 'browser_logs'
9+
| 'create_plan'
10+
| 'spawn_agents_async'
11+
| 'spawn_agent_inline'
12+
| 'update_subgoal'
13+
14+
export interface SecretAgentDefinition
15+
extends Omit<AgentDefinition, 'toolNames'> {
16+
/** Tools this agent can use. */
17+
toolNames?: AllToolNames[]
18+
}

common/src/tools/compile-tool-definitions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import z from 'zod/v4'
22

3-
import { llmToolCallSchema, publishedTools } from './list'
3+
import { llmToolCallSchema } from './list'
4+
import { publishedTools } from './constants'
45

56
/**
67
* Compiles all tool definitions into a single TypeScript definition file content.

0 commit comments

Comments
 (0)