MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / parseAgentId

Function parseAgentId

evals/buffbench/run-buffbench.ts:24–42  ·  view source on GitHub ↗
(agent: string)

Source from the content-addressed store, hash-verified

22import type { AgentEvalResults, EvalDataV2, EvalCommitV2 } from './types'
23
24function parseAgentId(agent: string): {
25 agentId: string
26 externalAgentType?: ExternalAgentType
27} {
28 if (agent.startsWith('external:')) {
29 const externalType = agent.slice('external:'.length) as ExternalAgentType
30 if (
31 externalType !== 'claude' &&
32 externalType !== 'codex' &&
33 externalType !== 'opencode'
34 ) {
35 throw new Error(
36 `Unknown external agent type: ${externalType}. Supported: claude, codex, opencode`,
37 )
38 }
39 return { agentId: agent, externalAgentType: externalType }
40 }
41 return { agentId: agent }
42}
43
44async function runTask(options: {
45 client: CodebuffClient

Callers 1

runTaskFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected