fix: unify agentType value domain to 'claude-code' | 'codex'

The streamed-output-evaluator used 'claude' while the rest of the
codebase used 'claude-code'. Align the evaluator type and all call
sites (message-agent-executor, task-scheduler) to use the canonical
'claude-code' | 'codex' domain consistently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eyejoker
2026-03-25 15:51:09 +09:00
parent 8fee2ab3fc
commit 273d52d3da
4 changed files with 8 additions and 8 deletions

View File

@@ -147,7 +147,7 @@ export async function runAgentForGroup(
resetSessionRequested = true;
}
const evaluation = evaluateStreamedOutput(output, streamedState, {
agentType: isClaudeCodeAgent ? 'claude' : 'codex',
agentType: isClaudeCodeAgent ? 'claude-code' : 'codex',
provider,
suppressClaudeAuthErrorOutput: provider === 'claude',
trackSuccessNullResult: true,

View File

@@ -40,7 +40,7 @@ function freshState(): StreamedOutputState {
}
const claudeOpts: EvaluateStreamedOutputOptions = {
agentType: 'claude',
agentType: 'claude-code',
provider: 'claude',
};
@@ -91,7 +91,7 @@ describe('evaluateStreamedOutput', () => {
const result = evaluateStreamedOutput(
successOutput('Hello'),
freshState(),
{ agentType: 'claude', provider: 'fallback' },
{ agentType: 'claude-code', provider: 'fallback' },
);
expect(result.shouldForwardOutput).toBe(true);
expect(result.state.sawOutput).toBe(true);
@@ -130,7 +130,7 @@ describe('evaluateStreamedOutput', () => {
const result = evaluateStreamedOutput(
successOutput('banner text'),
freshState(),
{ agentType: 'claude', provider: 'fallback' },
{ agentType: 'claude-code', provider: 'fallback' },
);
// Non-primary: skip banner check, forward normally
expect(result.shouldForwardOutput).toBe(true);
@@ -244,7 +244,7 @@ describe('evaluateStreamedOutput', () => {
it('does not track for non-primary Claude', () => {
const result = evaluateStreamedOutput(successOutput(null), freshState(), {
agentType: 'claude',
agentType: 'claude-code',
provider: 'fallback',
trackSuccessNullResult: true,
});

View File

@@ -19,7 +19,7 @@ export interface StreamedOutputState {
}
export interface EvaluateStreamedOutputOptions {
agentType: 'claude' | 'codex';
agentType: 'claude-code' | 'codex';
provider: string;
suppressClaudeAuthErrorOutput?: boolean;
trackSuccessNullResult?: boolean;
@@ -40,7 +40,7 @@ export function evaluateStreamedOutput(
): EvaluateStreamedOutputResult {
const nextState: StreamedOutputState = { ...state };
const isPrimaryClaude =
options.agentType === 'claude' && options.provider === 'claude';
options.agentType === 'claude-code' && options.provider === 'claude';
const isPrimaryCodex =
options.agentType === 'codex' && options.provider === 'codex';

View File

@@ -331,7 +331,7 @@ async function runTask(
streamedOutput,
streamedState,
{
agentType: isClaudeAgent ? 'claude' : 'codex',
agentType: isClaudeAgent ? 'claude-code' : 'codex',
provider,
shortCircuitTriggeredErrors: true,
},