fix worker forreal
This commit is contained in:
@@ -95,7 +95,8 @@ describe('agent event normalization', () => {
|
||||
),
|
||||
).toContainEqual({
|
||||
kind: 'assistant_delta',
|
||||
content: 'I updated the auth provider.',
|
||||
content: 'I updated the auth provider.\n\n',
|
||||
externalMessageId: 'item-1',
|
||||
});
|
||||
|
||||
expect(
|
||||
@@ -125,6 +126,24 @@ describe('agent event normalization', () => {
|
||||
kind: 'error',
|
||||
message: '{\n "message": "request failed"\n}',
|
||||
});
|
||||
|
||||
expect(
|
||||
normalizeCodexJsonLine(
|
||||
JSON.stringify({
|
||||
type: 'item.completed',
|
||||
item: {
|
||||
id: 'item-warning',
|
||||
type: 'error',
|
||||
message:
|
||||
'`[features].codex_hooks` is deprecated. Use `[features].hooks` instead.',
|
||||
},
|
||||
}),
|
||||
),
|
||||
).toContainEqual({
|
||||
kind: 'status',
|
||||
status:
|
||||
'`[features].codex_hooks` is deprecated. Use `[features].hooks` instead.',
|
||||
});
|
||||
});
|
||||
|
||||
test('normalizes Codex tool item lifecycle events', () => {
|
||||
@@ -141,7 +160,7 @@ describe('agent event normalization', () => {
|
||||
),
|
||||
).toContainEqual({
|
||||
kind: 'tool_started',
|
||||
name: 'local_shell_call',
|
||||
name: 'Command',
|
||||
input: 'bash -lc rg Authentik',
|
||||
externalMessageId: 'tool-1',
|
||||
});
|
||||
@@ -160,10 +179,30 @@ describe('agent event normalization', () => {
|
||||
),
|
||||
).toContainEqual({
|
||||
kind: 'tool_completed',
|
||||
name: 'local_shell_call',
|
||||
name: 'Command',
|
||||
output: 'apps/web/auth.ts',
|
||||
externalMessageId: 'tool-1',
|
||||
});
|
||||
|
||||
expect(
|
||||
normalizeCodexJsonLine(
|
||||
JSON.stringify({
|
||||
type: 'item.completed',
|
||||
item: {
|
||||
id: 'tool-2',
|
||||
type: 'exec_command',
|
||||
command: 'cat package.json',
|
||||
aggregated_output: '{"scripts":{"build":"turbo build"}}',
|
||||
exit_code: 0,
|
||||
},
|
||||
}),
|
||||
),
|
||||
).toContainEqual({
|
||||
kind: 'tool_completed',
|
||||
name: 'Command',
|
||||
output: '{"scripts":{"build":"turbo build"}}',
|
||||
externalMessageId: 'tool-2',
|
||||
});
|
||||
});
|
||||
|
||||
test('normalizes OpenCode assistant, tool, and permission events', () => {
|
||||
|
||||
Reference in New Issue
Block a user