@0perator/operator 0.1.171 → 0.1.222

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.
@@ -432,7 +432,7 @@ export async function runTurn(userInput, conversation, opts) {
432
432
  const messages = buildMessages(opts.systemPrompt, conversation.all);
433
433
  // Clamp generation to the room left after the real prompt (incl. tool_calls args + schemas) so a
434
434
  // deep-session request never overflows the window into a truncated reply. See clampMaxTokens.
435
- const maxTokens = clampMaxTokens(messages, compactionOptsFor(endpoint), opts.maxTokens ?? 8192);
435
+ const maxTokens = clampMaxTokens(messages, compactionOptsFor(endpoint), opts.maxTokens ?? 16384);
436
436
  try {
437
437
  response = await chat(messages, {
438
438
  base: endpoint.base,
@@ -82,8 +82,8 @@ const LOOP_MIN_LINE_LEN = 12; // ignore short/structural lines (braces, bullets,
82
82
  const LOOP_LINE_REPEATS = 6; // same substantial line seen this many times => degenerate
83
83
  const LOOP_TAIL = 260; // chars of tail scanned for a back-to-back repeating cycle
84
84
  const LOOP_CHECK_EVERY = 200; // only run the scan every ~N new chars (cheap amortization)
85
- const RUNAWAY_CHARS = 120_000; // a round is capped at max_tokens (~8k => ~33k chars); far past that is a
86
- // decode loop or a stream/render duplication, never a real answer — hard stop.
85
+ const RUNAWAY_CHARS = 260_000; // with 32K output tokens the model can legitimately produce ~130K chars;
86
+ // 260K gives 2x headroom before cutting a decode loop or stream duplication.
87
87
  function hasAlpha(s) {
88
88
  return /[a-zA-Z]/.test(s);
89
89
  }
@@ -186,7 +186,7 @@ function requestBody(messages, o, stream) {
186
186
  // so keep this exact shape. Servers without llama.cpp speculation ignore the field (same contract
187
187
  // as cache_prompt). Escape hatch when a retuned/high-acceptance bless lands: enableSpeculation: true.
188
188
  ...(o.enableSpeculation ? {} : { speculative: { ngram: { enabled: false } } }),
189
- max_tokens: o.maxTokens ?? 8192, temperature: o.temperature ?? 0.7,
189
+ max_tokens: o.maxTokens ?? 32768, temperature: o.temperature ?? 0.7,
190
190
  ...(o.tools?.length ? { tools: o.tools, tool_choice: "auto", parallel_tool_calls: true } : {}),
191
191
  // /think: re-enable the model's native reasoning for THIS request, overriding the server's
192
192
  // enable_thinking:false default (set for speed). Verified this per-request override works on the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0perator/operator",
3
- "version": "0.1.171",
3
+ "version": "0.1.222",
4
4
  "description": "Operator (KODE) — TypeScript + Ink terminal coding agent. Full-frame render, single-engine core shared across CLI/web/mobile; runs against a local Aurora model.",
5
5
  "type": "module",
6
6
  "bin": {