@@ -113,42 +113,6 @@ describe("Codex Provider Definition", () => {
113113 expect ( result . argv . some ( ( a : string ) => a . startsWith ( "notify=" ) ) ) . toBe ( false ) ;
114114 } ) ;
115115
116- it ( "injects notify bridge arguments when bridgeScriptPath is provided" , ( ) => {
117- const config : ProviderConfig = { additionalArgs : [ "--flag" ] , envVars : { } } ;
118- const ctx = {
119- sessionId : "session-123" ,
120- workspacePath : "/workspace" ,
121- bridgeScriptPath : "/home/test/.coder-studio/hooks/codex-bridge.js" ,
122- } ;
123-
124- const result = codexDefinition . buildCommand ( config , ctx ) ;
125-
126- expect ( result . argv ) . toEqual ( [
127- "codex" ,
128- "-c" ,
129- 'notify=["node","/home/test/.coder-studio/hooks/codex-bridge.js"]' ,
130- "--flag" ,
131- ] ) ;
132- } ) ;
133-
134- it ( "keeps notify injection ahead of additional args with paths that contain spaces" , ( ) => {
135- const config : ProviderConfig = { additionalArgs : [ "--flag" ] , envVars : { } } ;
136- const ctx = {
137- sessionId : "session-123" ,
138- workspacePath : "/workspace" ,
139- bridgeScriptPath : "/home/with space/codex bridge.js" ,
140- } ;
141-
142- const result = codexDefinition . buildCommand ( config , ctx ) ;
143-
144- expect ( result . argv ) . toEqual ( [
145- "codex" ,
146- "-c" ,
147- 'notify=["node","/home/with space/codex bridge.js"]' ,
148- "--flag" ,
149- ] ) ;
150- } ) ;
151-
152116 it ( "should include additional arguments and env vars" , ( ) => {
153117 const config : ProviderConfig = {
154118 additionalArgs : [ "--flag" ] ,
@@ -168,40 +132,6 @@ describe("Codex Provider Definition", () => {
168132 } ) ;
169133 } ) ;
170134
171- describe ( "buildResumeCommand" , ( ) => {
172- it ( "builds a resume command and retains notify bridge injection" , ( ) => {
173- const config : ProviderConfig = { additionalArgs : [ "--flag" ] , envVars : { TOKEN : "abc" } } ;
174- const ctx = {
175- sessionId : "session-123" ,
176- workspacePath : "/workspace" ,
177- bridgeScriptPath : "/bridge.js" ,
178- } ;
179-
180- const result = codexDefinition . buildResumeCommand ?.( config , ctx , "thread-uuid-1" ) ;
181-
182- expect ( result ) . toEqual ( {
183- argv : [ "codex" , "resume" , "thread-uuid-1" , "-c" , 'notify=["node","/bridge.js"]' , "--flag" ] ,
184- env : {
185- TOKEN : "abc" ,
186- CODER_STUDIO_SESSION_ID : "session-123" ,
187- } ,
188- cwd : "/workspace" ,
189- } ) ;
190- } ) ;
191-
192- it ( "omits notify injection on resume when bridgeScriptPath is missing" , ( ) => {
193- const config : ProviderConfig = { additionalArgs : [ "--flag" ] , envVars : { } } ;
194- const ctx = {
195- sessionId : "session-123" ,
196- workspacePath : "/workspace" ,
197- } ;
198-
199- const result = codexDefinition . buildResumeCommand ?.( config , ctx , "thread-uuid-1" ) ;
200-
201- expect ( result ?. argv ) . toEqual ( [ "codex" , "resume" , "thread-uuid-1" , "--flag" ] ) ;
202- } ) ;
203- } ) ;
204-
205135 describe ( "buildSupervisorEvalCommand" , ( ) => {
206136 it ( "builds a supervisor eval command with codex exec --json" , ( ) => {
207137 const result = codexDefinition . buildSupervisorEvalCommand ?.(
@@ -267,17 +197,11 @@ describe("Codex Provider Definition", () => {
267197 expect ( codexDefinition . idleHeuristics ?. idleDebounceMs ) . toBe ( 3000 ) ;
268198 } ) ;
269199
270- it ( "keeps legacy hook fields absent while exposing resume and transcript resolution " , ( ) => {
200+ it ( "does not expose legacy hooks or transcript helpers " , ( ) => {
271201 expect ( "hooks" in codexDefinition ) . toBe ( false ) ;
272- expect ( codexDefinition . buildResumeCommand ) . toBeTypeOf ( "function" ) ;
273- expect ( codexDefinition . resolveTranscriptPath ) . toBeTypeOf ( "function" ) ;
202+ expect ( " buildResumeCommand" in codexDefinition ) . toBe ( false ) ;
203+ expect ( " resolveTranscriptPath" in codexDefinition ) . toBe ( false ) ;
274204 expect ( "readTranscriptExcerpt" in codexDefinition ) . toBe ( false ) ;
275205 } ) ;
276206 } ) ;
277-
278- describe ( "resolveTranscriptPath" , ( ) => {
279- it ( "returns undefined when providerSessionId is absent" , ( ) => {
280- expect ( codexDefinition . resolveTranscriptPath ?.( { id : "sess-1" } ) ) . toBeUndefined ( ) ;
281- } ) ;
282- } ) ;
283207} ) ;
0 commit comments