car-runtime 0.24.0 → 0.24.1

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.
Files changed (2) hide show
  1. package/index.d.ts +22 -5
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -160,8 +160,14 @@ export class CarRuntime {
160
160
  /**
161
161
  * Set replan configuration on this runtime.
162
162
  * `maxReplans` = 0 disables replanning (default).
163
+ * `replanOnRejected` (default false): when true, validator/policy/capability
164
+ * rejections (not just runtime failures) also trigger rollback + replan.
163
165
  */
164
- setReplanConfig(maxReplans: number, delayMs?: number | null): Promise<void>;
166
+ setReplanConfig(
167
+ maxReplans: number,
168
+ delayMs?: number | null,
169
+ replanOnRejected?: boolean | null,
170
+ ): Promise<void>;
165
171
 
166
172
  // --- State ---
167
173
 
@@ -326,9 +332,17 @@ export class CarRuntime {
326
332
  /**
327
333
  * Generate with full tracking. Returns JSON with `text`, `tool_calls`,
328
334
  * `usage`, `model_used`, `latency_ms`, `time_to_first_token_ms`,
329
- * `trace_id`. `time_to_first_token_ms` is wall-clock to the first
330
- * sampled token (populated by local Candle/MLX paths; `null` for
331
- * non-streaming remote calls).
335
+ * `trace_id`, `stop_reason`. `time_to_first_token_ms` is wall-clock to
336
+ * the first sampled token (populated by local Candle/MLX paths; `null`
337
+ * for non-streaming remote calls). `stop_reason` is the raw provider
338
+ * termination reason (OpenAI `finish_reason`, Anthropic `stop_reason`,
339
+ * Google `finishReason`); `null` for local backends or providers that
340
+ * don't report one. A value of `"length"`/`"max_tokens"`/`"MAX_TOKENS"`
341
+ * means the output was truncated at the token cap. On local Qwen3
342
+ * hybrid-thinking models it is also set to `"thinking_recovered"` when
343
+ * reasoning consumed the whole token budget and the runtime retried
344
+ * with reasoning suppressed to produce a direct answer, or
345
+ * `"thinking_truncated"` when even that retry was empty (car-releases#60).
332
346
  *
333
347
  * **Note:** intent is not exposed on the tracked path until the
334
348
  * positional argument list is converted to an options object —
@@ -481,7 +495,10 @@ export class CarRuntime {
481
495
  /**
482
496
  * Unified registry (local + remote). Returns JSON array of
483
497
  * `{ id, name, provider, capabilities, param_count, size_mb,
484
- * context_length, available, is_local, public_benchmarks }`.
498
+ * context_length, available, is_local, max_output_tokens,
499
+ * public_benchmarks }`. `max_output_tokens` is the registry-declared
500
+ * per-model output ceiling (`null` when the entry omits it; callers
501
+ * then fall back to a fraction of `context_length`).
485
502
  * `public_benchmarks` is `[{ name, score, harness?, source_url?,
486
503
  * measured_at? }]` with score on a 0.0–1.0 scale; ships empty in
487
504
  * the built-in catalog and is populated via curated registry data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "Common Agent Runtime — a deterministic execution layer for AI agents",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",