refactor: remove SERVICE_AGENT_TYPE legacy constant

SERVICE_AGENT_TYPE was always 'claude-code' in the unified service,
making it a misleading constant. Each group already has its own
agentType field.

- Removed SERVICE_AGENT_TYPE from config.ts
- Session functions now accept agentType parameter (default: 'claude-code')
- Task scheduler uses task-level agent_type for token rotation decisions
- All fallback defaults changed to 'claude-code' literal
- Logging uses 'unified' instead of the misleading type
This commit is contained in:
Eyejoker
2026-03-30 23:10:48 +09:00
parent 5562e30ce1
commit 4a5edaceb6
12 changed files with 56 additions and 54 deletions

View File

@@ -9,7 +9,6 @@ import {
POLL_INTERVAL,
REVIEWER_AGENT_TYPE,
SERVICE_ID,
SERVICE_AGENT_TYPE,
isSessionCommandSenderAllowed,
STATUS_CHANNEL_ID,
STATUS_UPDATE_INTERVAL,
@@ -194,7 +193,7 @@ function loadState(): void {
logger.info(
{
groupCount: Object.keys(registeredGroups).length,
agentType: SERVICE_AGENT_TYPE,
agentType: 'unified',
},
'State loaded',
);
@@ -520,7 +519,7 @@ async function main(): Promise<void> {
await startUnifiedDashboard({
assistantName: ASSISTANT_NAME,
serviceId: SERVICE_ID,
serviceAgentType: SERVICE_AGENT_TYPE,
serviceAgentType: 'claude-code',
statusChannelId: STATUS_CHANNEL_ID,
statusUpdateInterval: STATUS_UPDATE_INTERVAL,
usageUpdateInterval: USAGE_UPDATE_INTERVAL,