Skip to content

Commit b3552ea

Browse files
committed
move templates/types to agent-runtime
1 parent eb4f18f commit b3552ea

17 files changed

+26
-17
lines changed

backend/src/__tests__/agent-id-resolution.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from '@codebuff/common/util/agent-name-normalization'
66
import { describe, expect, it, beforeEach } from 'bun:test'
77

8-
import type { AgentTemplate } from '../templates/types'
8+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
99

1010
describe('Agent ID Resolution', () => {
1111
let mockRegistry: Record<string, AgentTemplate>

backend/src/__tests__/agent-registry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
clearDatabaseCache,
2323
} from '../templates/agent-registry'
2424

25-
import type { AgentTemplate } from '../templates/types'
25+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2626
import type { AgentRuntimeDeps } from '@codebuff/common/types/contracts/agent-runtime'
2727
import type { Logger } from '@codebuff/common/types/contracts/logger'
2828
import type { DynamicAgentTemplate } from '@codebuff/common/types/dynamic-agent-template'

backend/src/__tests__/cost-aggregation.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { mainPrompt } from '../main-prompt'
1919
import * as agentRegistry from '../templates/agent-registry'
2020
import * as websocketAction from '../websockets/websocket-action'
2121

22-
import type { AgentTemplate } from '../templates/types'
22+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2323
import type { ServerAction } from '@codebuff/common/actions'
2424
import type {
2525
AgentRuntimeDeps,

backend/src/__tests__/loop-agent-steps.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { clearAgentGeneratorCache } from '../run-programmatic-step'
3030
import { mockFileContext } from './test-utils'
3131

3232
import type { getAgentTemplate } from '../templates/agent-registry'
33-
import type { AgentTemplate } from '../templates/types'
33+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
3434
import type { StepGenerator } from '@codebuff/common/types/agent-template'
3535
import type {
3636
AgentRuntimeDeps,

backend/src/__tests__/malformed-tool-call.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import { mockFileContext } from './test-utils'
2222
import { processStreamWithTools } from '../tools/stream-parser'
2323

24-
import type { AgentTemplate } from '../templates/types'
24+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2525
import type {
2626
AgentRuntimeDeps,
2727
AgentRuntimeScopedDeps,

backend/src/__tests__/prompt-caching-subagents.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616

1717
import { loopAgentSteps } from '../run-agent-step'
1818

19-
import type { AgentTemplate } from '../templates/types'
19+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2020
import type {
2121
AgentRuntimeDeps,
2222
AgentRuntimeScopedDeps,

backend/src/__tests__/run-agent-step-tools.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { runAgentStep } from '../run-agent-step'
2525
import { clearAgentGeneratorCache } from '../run-programmatic-step'
2626
import { asUserMessage } from '../util/messages'
2727

28-
import type { AgentTemplate } from '../templates/types'
28+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2929
import type {
3030
AgentRuntimeDeps,
3131
AgentRuntimeScopedDeps,

backend/src/__tests__/run-programmatic-step.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import { mockFileContext } from './test-utils'
2020
import * as toolExecutor from '../tools/tool-executor'
2121
import * as requestContext from '../websockets/request-context'
2222

23-
import type { AgentTemplate, StepGenerator } from '../templates/types'
23+
import type {
24+
AgentTemplate,
25+
StepGenerator,
26+
} from '@codebuff/agent-runtime/templates/types'
2427
import type { PublicAgentState } from '@codebuff/common/types/agent-template'
2528
import type { AgentRuntimeScopedDeps } from '@codebuff/common/types/contracts/agent-runtime'
2629
import type { SendActionFn } from '@codebuff/common/types/contracts/client'

backend/src/__tests__/sandbox-generator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { mockFileContext } from './test-utils'
1616
import * as agentRun from '../agent-run'
1717
import * as requestContext from '../websockets/request-context'
1818

19-
import type { AgentTemplate } from '../templates/types'
19+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2020
import type {
2121
AgentRuntimeDeps,
2222
AgentRuntimeScopedDeps,

backend/src/__tests__/subagent-streaming.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import { assembleLocalAgentTemplates } from '../templates/agent-registry'
2121
import { handleSpawnAgents } from '../tools/handlers/tool/spawn-agents'
2222
import * as loggerModule from '../util/logger'
2323

24-
import type { AgentTemplate } from '../templates/types'
2524
import type { SendSubagentChunk } from '../tools/handlers/tool/spawn-agents'
25+
import type { AgentTemplate } from '@codebuff/agent-runtime/templates/types'
2626
import type { CodebuffToolCall } from '@codebuff/common/tools/list'
2727
import type { Mock } from 'bun:test'
2828

0 commit comments

Comments
 (0)