Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion apps/agent-forge/server/__tests__/debugController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('DebugSession', () => {
await hookPromise;

// Step is one-shot: the next hook call does NOT pause again.
const secondPromise = session.hooks().onLLMResponse?.({} as any, 1);
const secondPromise = session.hooks().onLLMResponse?.({} as any, 1, {} as any);
await secondPromise;
expect(session.snapshot().paused).toBe(false);
});
Expand Down
2 changes: 1 addition & 1 deletion apps/agent-forge/server/compileHooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('compileHooksFromSpecPolicy', () => {
maxSteps: 1,
});

expect(execute).toHaveBeenCalledWith({ email: '[REDACTED]' }, {});
expect(execute).toHaveBeenCalledWith({ email: '[REDACTED]' }, expect.any(Object));
});

it('compiles a preGenerate hook that actually injects a message when the agent runs', async () => {
Expand Down
3 changes: 2 additions & 1 deletion apps/agent-forge/server/runRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
type ExecutionResult,
type Message,
resumeAfterApproval,
emptyRunUsage,
type AgentSpec,
} from '@loushy/build-ai-agent';
import { buildAgentFromSpec, extractFlowFromSpec } from './buildAgent';
Expand Down Expand Up @@ -616,7 +617,7 @@ export class RunManager extends EventEmitter {
text,
messages: [{ role: 'assistant', content: text }],
toolCalls: [],
usage: { promptTokens: 0, completionTokens: 0, totalTokens: 0 },
usage: emptyRunUsage(),
finishReason: 'stop',
steps: flowResult.steps,
};
Expand Down
1 change: 1 addition & 0 deletions src/execution/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ export type {
RunDoneEvent,
} from './agentEvents';
export type { AgentRun } from './agentRun';
export { emptyRunUsage } from './runUsage';
Loading