testronaut 1.2.4 β†’ 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -127,7 +127,7 @@ Current supported providers:
127
127
 
128
128
  | Provider | Example Models |
129
129
  |-----------|----------------|
130
- | **OpenAI** | gpt-4o, gpt-4.1, o3, gpt-5, etc. |
130
+ | **OpenAI** | gpt-4o, gpt-4.1, o3, gpt-5, gpt-5.1, etc. |
131
131
  | **Google Gemini** | gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-8b |
132
132
 
133
133
  More providers coming soon (Anthropic, Mistral, etc.).
package/bin/cli.js CHANGED
@@ -810,16 +810,22 @@ async function serveLatestReport() {
810
810
  await new Promise((resolve, reject) => {
811
811
  server.once('error', reject);
812
812
  server.listen(0, '127.0.0.1', resolve);
813
-
814
- process.on('SIGINT', () => {
815
- console.log('\nπŸ›‘ Shutting down…');
816
- server.close(() => {
817
- resolve();
818
- process.exit(0);
819
- });
820
- });
821
813
  });
822
814
 
815
+ // Move signal handling to after server is listening
816
+ const shutdown = () => {
817
+ console.log('\nπŸ›‘ Shutting down…');
818
+ try {
819
+ server.close(); // best-effort; don’t wait for it
820
+ } catch (_) {
821
+ // ignore
822
+ }
823
+ process.exit(0);
824
+ };
825
+
826
+ process.once('SIGINT', shutdown);
827
+ process.once('SIGTERM', shutdown);
828
+
823
829
  const address = server.address();
824
830
  const port = typeof address === 'object' && address ? address.port : 0;
825
831
  const baseUrl = `http://127.0.0.1:${port}`;
package/bin/init.js CHANGED
@@ -94,9 +94,10 @@ export async function initializeTestronautProject() {
94
94
  { title: 'o3 (reasoning w/ native tool use)', value: 'o3' },
95
95
  { title: 'o4-mini (reasoning, cost-effective)', value: 'o4-mini' },
96
96
  // GPT-5 family (availability varies)
97
- { title: 'GPT-5 (latest reasoning model)', value: 'gpt-5' },
97
+ { title: 'GPT-5 (previous reasoning model)', value: 'gpt-5' },
98
98
  { title: 'GPT-5 mini (faster)', value: 'gpt-5-mini' },
99
99
  { title: 'GPT-5 nano (lightweight)', value: 'gpt-5-nano' },
100
+ { title: 'GPT-5.1 (latest reasoning model)', value: 'gpt-5.1' },
100
101
  ],
101
102
  // Keep prior selection highlighted if present; fallback to 4.1-mini.
102
103
  initial: pickInitialIndex(models, config.model, 'gpt-4.1-mini')
@@ -92,6 +92,7 @@ export function openAIModels() {
92
92
  'gpt-5',
93
93
  'gpt-5-mini',
94
94
  'gpt-5-nano',
95
+ 'gpt-5.1',
95
96
  ];
96
97
  }
97
98
 
package/core/turnLoop.js CHANGED
@@ -185,7 +185,6 @@ export const turnLoop = async (
185
185
  console.error('❌ Tool call structure invalid and no placeholders inserted.');
186
186
  step.events.push('❌ Tool call structure invalid and no placeholders inserted.');
187
187
  step.result = '❌ Failure';
188
- steps.push(step);
189
188
  recordStep(step);
190
189
  return steps;
191
190
  }
@@ -206,7 +205,6 @@ export const turnLoop = async (
206
205
  console.dir(unrespondedCalls, { depth: 5 });
207
206
  step.events.push('πŸ›‘ Detected assistant tool calls without matching tool responses');
208
207
  step.result = '❌ Failure';
209
- steps.push(step);
210
208
  recordStep(step);
211
209
  return steps;
212
210
  }
@@ -238,7 +236,6 @@ export const turnLoop = async (
238
236
  console.error('❌ Too many retries. Exiting.');
239
237
  step.events.push('❌ Too many retries. Exiting.');
240
238
  step.result = '❌ Failure';
241
- steps.push(step);
242
239
  recordStep(step);
243
240
  return steps;
244
241
  }
@@ -251,7 +248,6 @@ export const turnLoop = async (
251
248
  console.error('❌ Bad request:', err.message);
252
249
  step.events.push(`❌ Bad request: ${err.message}`);
253
250
  step.result = '❌ Failure';
254
- steps.push(step);
255
251
  recordStep(step);
256
252
  return steps;
257
253
  } else {
@@ -365,7 +361,6 @@ export const turnLoop = async (
365
361
  // Merge new assistant + tool responses back into conversation
366
362
  messages.push(msg, ...toolResponses);
367
363
  step.result = 'βœ… Passed';
368
- steps.push(step);
369
364
  recordStep(step);
370
365
  continue;
371
366
  }
@@ -377,7 +372,6 @@ export const turnLoop = async (
377
372
  if (finalResponse !== null) {
378
373
  step.events.push(finalResponse.finalMessage);
379
374
  step.result = finalResponse.success ? 'βœ… Mission Success' : '❌ Mission Failure';
380
- steps.push(step);
381
375
  recordStep(step);
382
376
  return { success: finalResponse.finalMessage, steps };
383
377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testronaut",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "main": "./runner/testronaut.js",
5
5
  "bin": {
6
6
  "testronaut": "./bin/cli.js"
@@ -35,6 +35,7 @@ import { wait } from './turnLoopUtils.js';
35
35
  */
36
36
  const DEFAULT_LIMITS = [
37
37
  // ── OpenAI (newer first) ────────────────────────────────────────────────
38
+ { test: /^gpt-5.1(-|$)/i, tpm: 120000 },
38
39
  { test: /^gpt-5(-|$)/i, tpm: 90000 },
39
40
  { test: /^gpt-5-mini(-|$)/i, tpm: 240000 },
40
41
  { test: /^gpt-5-nano(-|$)/i, tpm: 600000 },