@quikit/quikpilot-runner 9.3.0-rc.33 → 9.3.0-rc.34

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
@@ -150,6 +150,8 @@ it, the callback carries it as `unsuppliedInputs` (at most 10 functions, 5 names
150
150
  noticed" as a check. This is the shape of a change whose new tests pass only because they hand the function the field themselves. It can be
151
151
  wrong (a field that arrives from a database row or a request), so it only warns and never blocks. TypeScript is not covered (QUIKTR-1547).
152
152
 
153
+ **9.3.0-rc.34 — the first turn of a loop waits for a new response schema (QUIKTR-1581 follow-up).** The first call with a response schema the model provider has not seen recently is very slow (232 to 275 seconds measured on 19 Oct 2026 for a request that takes 5 to 8 once the provider has it) and fast afterwards. The targeting loop's turn limit was 180 seconds, the same as the AI Runtime's own provider timeout, so that first call was cut off every time, the provider never kept the schema, and runs fell back to the single targeting call (one found no file and failed). Now the FIRST turn of the targeting loop and of the code-writing loop waits up to 420 seconds; every later turn keeps its own limit (180 and 300), so a hung call does not cost the long wait twice. The targeting loop's whole-loop limit is 900 seconds (it was 600). A limit set by the caller still applies to every turn. Pair it with `OPENROUTER_TIMEOUT_SECONDS=420` on the AI Runtime (its default, 180, ends the call before the runner would). Nothing else changes.
154
+
153
155
  **9.3.0-rc.33 — search tools v2: small, pageable answers, an outline, `find_definition` (QUIKTR-1581, S6 release A; contract §36).** Needs the AI Runtime with `targeting-loop-3` and `codegen-loop-5` (each switched on by its own flag); without them every run is exactly as on rc.32 (the runner asks once, is refused before any model call, and goes on as the version it would have spoken). (1) **What the AI gets:** `list_files` shows one folder level (`path`) with file counts, or finds files by name or glob (`pattern`, the folder being changed first), 100 entries a page; `read_file` shows a 200-line window, answers a file over 400 lines or 20,000 characters with status `too_large` plus the file's outline and a suggested range (never the text), and with `mode: "outline"` lists a file's functions, classes and methods with their line ranges (JavaScript and TypeScript exactly, read with the parser the code checks already use; every other text file by keywords and indentation; no new dependency); `grep` first answers which files match and how often, and gives lines only with `mode: "lines"`, a page at a time (`limit`, `offset`); the new `find_definition` finds where a name is defined, nearest the asking file first, and exactly (marked `exact`) when the asking file imports it, through the project's own import shortcuts, a workspace package and up to 3 `export … from` barrels. Every cut answer carries `next.offset` and a sentence saying how to get the page. (2) **Stale edits:** an `edit_file` whose text is not found in a file this attempt changed since the AI read it answers `stale_read` ("read the lines again") instead of `no_match`. (3) **Only what is usable:** `loop.tools` lists the tools offered this run (no `call_function` unless it is on); the AI Runtime refuses a call to any other. (4) **Both views:** `targeting-loop-3` / `codegen-loop-5` carry either `workspaceListing` or `repoMap`; a refusal steps ONE version back (`targeting-loop-1` / `-2`, `codegen-loop-3` / `-4`) and a fix attempt does not ask again. Map mode keeps its rule of no per-file fallback. (5) `QUIKPILOT_TOOLS2=off` never asks for the v2 versions. (6) Listing mode and the earlier versions answer every tool byte for byte as before; the targeting loop record carries `contractVersion` only for `targeting-loop-3`. Checked on the real QuikIT checkout (a folder level 1,000 characters, a search's files 1,000, a big file's outline 3,400, a definition 200).
154
156
 
155
157
  **9.3.0-rc.32 — map mode: a one-page summary of a large repository instead of its file list (QUIKTR-1580, S5; contract §35).** Needs the AI Runtime with `targeting-loop-2` and `codegen-loop-4` (each switched on by its own flag) before a large repository can use it; a repository small enough for its list is exactly as before. (1) **When:** `QUIKPILOT_MAP=auto` (the default) switches map mode on only when the write folder's file list would cost more than 40,000 tokens on the wire, i.e. where the old way could not work (QuikProjects alone: about 69,000; the whole QuikIT repository: about 445,000; the pilot repository: about 1,000). `on` forces it on any repository, `off` never uses it. (2) **What the AI gets:** `repoMap` first in every request, in place of `workspaceListing`: the folder it may change, the folders it may read (that folder plus the local workspace packages its project depends on, read-only, at most 8, from the root `package.json` `workspaces` or `pnpm-workspace.yaml`), how many files they hold, a folder tree with counts, the file types, the project's own import shortcuts (tsconfig `paths`), packages and test layout, and its guidance files (`AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `README.md` of the write folder and every folder above it: tracked, not protected, scrubbed, 2,000 characters each and 6,000 in all). At most 4,000 tokens, the same bytes on the same commit (QuikIT: 3,966 for QuikProjects, 3,915 for the whole repository). The AI finds files with `list_files`, `grep` and `read_file` as before. (3) **The runner's answers:** a read, list or search outside the readable folders is answered `outside_read_scope` (from the path alone, never saying whether a file exists there), a change outside the write folder `outside_write_scope`; `not_found` and `exists` as before. (4) **No fallback:** map mode needs both loops, so it switches them on whatever `QUIKPILOT_TARGETING_MODE` / `QUIKPILOT_CODEGEN_MODE` say, and needs a test command (without one the run stops before any work, saying so). There is no single targeting call and no per-file code call to fall back to (both need the list): a map run that cannot finish ends with a plain sentence, recorded as `map_failed`. (5) **Smaller requests:** the discovered test files go on the wire only while they cost under 12,000 tokens (else the report's own no-signal form), at most 100 existing tests are named on the wire (the runner still holds every one), and old read outputs are dropped from 40,000 tokens on (the hard ceiling stays 90,000). On QuikProjects the first targeting request is about 18,000 tokens where the list alone was 69,000. (6) **The record:** both loop records gain `view`, `fileCount`, `readRoots`, `mapTokens`, `peakRequestTokens` and `failReason`, in map mode only. The job log gains `map.built` (counts) and `map.mode`.
package/dist/index.js CHANGED
@@ -39253,6 +39253,13 @@ function estimateRequestTokens(contextData) {
39253
39253
  return PROMPT_OVERHEAD_TOKENS + estimateTokens(JSON.stringify(contextData ?? {}, null, 2));
39254
39254
  }
39255
39255
 
39256
+ // src/turnTimeout.ts
39257
+ var FIRST_TURN_TIMEOUT_MS = 42e4;
39258
+ function turnTimeoutFor(turn, perTurnMs, setByCaller) {
39259
+ if (setByCaller || turn > 1) return perTurnMs;
39260
+ return Math.max(perTurnMs, FIRST_TURN_TIMEOUT_MS);
39261
+ }
39262
+
39256
39263
  // src/targetingLoop.ts
39257
39264
  var LOOP_CONTRACT_VERSION = "targeting-loop-1";
39258
39265
  var MAP_LOOP_CONTRACT_VERSION = "targeting-loop-2";
@@ -39303,7 +39310,7 @@ async function runTargetingLoop(args, deps) {
39303
39310
  const now = deps.now ?? Date.now;
39304
39311
  const log = deps.log ?? ((e) => console.log(JSON.stringify(e)));
39305
39312
  const turnTimeoutMs = deps.turnTimeoutMs ?? 18e4;
39306
- const deadlineMs = deps.deadlineMs ?? 6e5;
39313
+ const deadlineMs = deps.deadlineMs ?? 9e5;
39307
39314
  const env2 = {
39308
39315
  listing: new Set(args.listing),
39309
39316
  visible: buildVisibleListing(args.listing, readDenied(args.deniedPaths)),
@@ -39375,7 +39382,7 @@ async function runTargetingLoop(args, deps) {
39375
39382
  const turnStarted = now();
39376
39383
  let envelope;
39377
39384
  try {
39378
- envelope = await deps.post(contextData, AbortSignal.timeout(turnTimeoutMs));
39385
+ envelope = await deps.post(contextData, AbortSignal.timeout(turnTimeoutFor(turn, turnTimeoutMs, deps.turnTimeoutMs !== void 0)));
39379
39386
  } catch (err) {
39380
39387
  throw classifyTransport(err);
39381
39388
  }
@@ -39845,7 +39852,7 @@ async function runCodegenLoop(args, deps) {
39845
39852
  let envelope;
39846
39853
  sent = { entries: transcript.length, results: toolResults.length };
39847
39854
  try {
39848
- envelope = await deps.post(contextData, AbortSignal.timeout(turnTimeoutMs));
39855
+ envelope = await deps.post(contextData, AbortSignal.timeout(turnTimeoutFor(turn, turnTimeoutMs, deps.turnTimeoutMs !== void 0)));
39849
39856
  } catch (err) {
39850
39857
  throw classifyTransport2(err);
39851
39858
  }
@@ -42802,7 +42809,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
42802
42809
  var REPORT_COPY = "final-test-report.xml";
42803
42810
  var MAX_REPORT_BYTES = 5 * 1024 * 1024;
42804
42811
  var MAX_FILES = 200;
42805
- var RUNNER_VERSION = true ? "9.3.0-rc.33" : "dev";
42812
+ var RUNNER_VERSION = true ? "9.3.0-rc.34" : "dev";
42806
42813
  function safeDestination(base, repoPath) {
42807
42814
  if (!repoPath || (0, import_node_path21.isAbsolute)(repoPath)) return null;
42808
42815
  const destination = (0, import_node_path21.resolve)(base, repoPath);