Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/lib/agent-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import ora from 'ora';
import { join } from 'path';
import { join, basename, extname } from 'path';
import { existsSync, readFileSync } from 'fs';
import {
findSquadsDir,
Expand All @@ -15,7 +15,7 @@
import {
type RunOptions,
DEFAULT_TIMEOUT_MINUTES,
SOFT_DEADLINE_RATIO,

Check warning on line 18 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (20)

'SOFT_DEADLINE_RATIO' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 18 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (22)

'SOFT_DEADLINE_RATIO' is defined but never used. Allowed unused vars must match /^_/u
} from './run-types.js';
import {
generateExecutionId,
Expand All @@ -36,7 +36,7 @@
executeWithClaude,
executeWithProvider,
verifyExecution,
preflightExecutorCheck,

Check warning on line 39 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (20)

'preflightExecutorCheck' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 39 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (22)

'preflightExecutorCheck' is defined but never used. Allowed unused vars must match /^_/u
} from './execution-engine.js';
import {
type ContextRole,
Expand All @@ -55,9 +55,9 @@
import { parseCooldown } from './cron.js';
import {
colors,
bold,

Check warning on line 58 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (20)

'bold' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 58 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (22)

'bold' is defined but never used. Allowed unused vars must match /^_/u
RESET,
gradient,

Check warning on line 60 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (20)

'gradient' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 60 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (22)

'gradient' is defined but never used. Allowed unused vars must match /^_/u
icons,
writeLine,
} from './terminal.js';
Expand All @@ -67,8 +67,8 @@
} from './llm-clis.js';
import { loadSession } from './auth.js';
import { getApiUrl } from './env-config.js';
import { pushCognitionSignal } from './api-client.js';

Check warning on line 70 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (20)

'pushCognitionSignal' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 70 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (22)

'pushCognitionSignal' is defined but never used. Allowed unused vars must match /^_/u
import { findMemoryDir } from './memory.js';

Check warning on line 71 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (20)

'findMemoryDir' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 71 in src/lib/agent-runner.ts

View workflow job for this annotation

GitHub Actions / build (22)

'findMemoryDir' is defined but never used. Allowed unused vars must match /^_/u

// ── Operational constants (no magic numbers) ──────────────────────────
export const DRYRUN_DEF_MAX_CHARS = 500;
Expand All @@ -80,6 +80,10 @@
squadName: string,
options: RunOptions & { execute?: boolean }
): Promise<void> {
// Normalize: strip path prefix and extension if a full file path was passed
if (agentName.includes('/') || agentName.includes('\\')) {
agentName = basename(agentName, extname(agentName));
}
const spinner = ora(`Running agent: ${agentName}`).start();
const startMs = Date.now();
const startTime = new Date(startMs).toISOString();
Expand Down
Loading