mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-08 01:43:07 +00:00
feat(codex): use hook to obtain the session id and transcript path
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { buildMcpServerConfigArgs, buildDeveloperInstructionsArg } from './codexMcpConfig';
|
||||
import {
|
||||
buildMcpServerConfigArgs,
|
||||
buildDeveloperInstructionsArg,
|
||||
buildSessionStartHookConfigArgs
|
||||
} from './codexMcpConfig';
|
||||
|
||||
describe('codexMcpConfig', () => {
|
||||
describe('buildMcpServerConfigArgs', () => {
|
||||
@@ -90,4 +94,15 @@ describe('codexMcpConfig', () => {
|
||||
expect(args[1]).toContain('\\\\');
|
||||
});
|
||||
});
|
||||
|
||||
describe('buildSessionStartHookConfigArgs', () => {
|
||||
it('builds a SessionStart hook config override', () => {
|
||||
const args = buildSessionStartHookConfigArgs(4312, 'secret-token');
|
||||
|
||||
expect(args[0]).toBe('-c');
|
||||
expect(args[1]).toContain('hooks.SessionStart=[');
|
||||
expect(args[1]).toContain('type = "command"');
|
||||
expect(args[1]).toContain('hook-forwarder --port 4312 --token secret-token');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user