bunnyquery 1.20.0 → 1.20.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.
package/dist/engine.d.mts CHANGED
@@ -5726,7 +5726,13 @@ declare class ChatSession {
5726
5726
  * Save where a hard search found its answer (findings.ts), through the host's
5727
5727
  * saveSearchFinding hook. Never for an indexing pass, never twice for one turn, never
5728
5728
  * throws, never waited on.
5729
+ *
5730
+ * OFF since 1.20.1 (owner, 2026-11-24): the MCP's searchText now learns which page answered
5731
+ * a question by itself (learned links, read first by every search), so the chat no longer
5732
+ * reads "search_findings" first (that read cost 7 to 8 s at the start of every turn in
5733
+ * production) and nothing is saved here. SAVE_SEARCH_FINDINGS turns it back on.
5729
5734
  */
5735
+ static SAVE_SEARCH_FINDINGS: boolean;
5730
5736
  private _saveFindings;
5731
5737
  /**
5732
5738
  * Chats-only history (owner, 2026-11-21): on when the host can list a file's passes
package/dist/engine.d.ts CHANGED
@@ -5726,7 +5726,13 @@ declare class ChatSession {
5726
5726
  * Save where a hard search found its answer (findings.ts), through the host's
5727
5727
  * saveSearchFinding hook. Never for an indexing pass, never twice for one turn, never
5728
5728
  * throws, never waited on.
5729
+ *
5730
+ * OFF since 1.20.1 (owner, 2026-11-24): the MCP's searchText now learns which page answered
5731
+ * a question by itself (learned links, read first by every search), so the chat no longer
5732
+ * reads "search_findings" first (that read cost 7 to 8 s at the start of every turn in
5733
+ * production) and nothing is saved here. SAVE_SEARCH_FINDINGS turns it back on.
5729
5734
  */
5735
+ static SAVE_SEARCH_FINDINGS: boolean;
5730
5736
  private _saveFindings;
5731
5737
  /**
5732
5738
  * Chats-only history (owner, 2026-11-21): on when the host can list a file's passes
package/dist/engine.mjs CHANGED
@@ -860,7 +860,6 @@ Scope: Only answer questions about this project and its data. Do not answer ques
860
860
  Knowledge lookup: before saying you don't know, or that something isn't in the chat history, ALWAYS search this project's data with the tools: the project's data lives in its database, not in the earlier messages of this chat.
861
861
  ${groundingRules}
862
862
  ${webRule}
863
- SAVED FINDINGS FIRST: where an earlier search found an answer is saved in table "search_findings" (one record per file page; its tags are the key words of the question that led there and of the search terms, stored lowercase without spaces). Before any other search, call getRecords with table_name "search_findings", access_group ${indexGroupLiteral} and tags set to ONE specific key word of the question (a name or a term, in the user's words; when nothing comes back, try one more word, or the word in the documents' language). A finding gives data.path and data.page: read THAT page (searchText with that path and the question's words) and answer from the page itself, quoting and citing it as usual. A finding is only a pointer, never the answer: when its page does not answer the question, or nothing is found, search as below.
864
863
  FINDING THE DATA: the database is the way in, for every kind of file. Follow the search path in getTables' description, with one exception for this project: when getTables' one page is the whole list (end_of_list true), skip its table-name search even when no name fits: you already see every table, and a table is never named after a company, a person or a single fact, so when no table fits, the answer is in a document's text: use searchText (DOCUMENTS below). Pick EVERY table that could hold the answer, not the first that fits. Read getIndexes and getTags one page each, never with fetch_all: name and tag lists can be millions of characters long and are never read whole, so when the name is not on that page, search for it with the user's words as their descriptions say. Never call getTags with neither table_name nor tag: that lists every tag of every table. Then getRecords in that table and group with the selector that matched (an index, one exact tag, or none for the whole table), always with fetch_all true. WHERE INDEXED CONTENT LIVES: a document's extracted content (PDF, Word, slides, scans) is in table "document_entries", one record per row / entry / section, with its page in "page"; spreadsheet rows are in "spreadsheet_rows". Files indexed before 2026-11-20 may still hold theirs in other tables, so a file's records are found wherever they are with getRecords reference "src::<path>" (see the access group rule below); every later mention of a file's records means this call. Every stored file has a record whose unique_id is "src::<its storage path>", so getUniqueId with unique_id "src::" and condition "gte" lists every file across every table (add the start of a path to narrow it; condition "lte" with a file name alone finds it in any folder).
865
864
  NUMBERS FROM A SPREADSHEET are computed from the ROWS, never from one page and never from a guess. Each row of each sheet is one record in its table: reference "src::<path>", unique_id "row::<path>#<sheet>#R<n>", the cells by header name, plus "_sheet", "_row", "_grain" ("detail" or "summary") and, on a total or preamble row, "_row_type". Its tags carry the file name, the sheet, the grain and up to four key values of the row (a name, a code), so getRecords with one exact tag selects every row about that thing across all the files in the table. Workbooks state the same money more than once: a detail sheet, then per-song, per-album and per-artist sheets that re-total it, plus a summary. Use rows whose "_grain" is "detail" and whose "_row_type" is not "total", pick ONE sheet per file and say which, and never add a sheet to its summary. Fetch the COMPLETE matching set, keep only the rows whose column or tag names what was asked, then add them up carefully, in groups, and check that the group sums agree with the grand total. A FILE TOTAL IS NOT A ROW'S TOTAL: the biggest number on a summary sheet is the whole file, not the thing asked about, so check every figure is scoped to what the question named (filter by the column that identifies it). Quote the row count, the sheet(s) and the file(s) the figure was made from and label it as calculated.
866
865
  ${documentRules}
@@ -9408,12 +9407,8 @@ var _ChatSession = class _ChatSession {
9408
9407
  this.state.messages.splice(idx + 1, 0, placeholder);
9409
9408
  return true;
9410
9409
  }
9411
- /**
9412
- * Save where a hard search found its answer (findings.ts), through the host's
9413
- * saveSearchFinding hook. Never for an indexing pass, never twice for one turn, never
9414
- * throws, never waited on.
9415
- */
9416
9410
  _saveFindings(itemId, body, answer, note) {
9411
+ if (!_ChatSession.SAVE_SEARCH_FINDINGS) return;
9417
9412
  try {
9418
9413
  var save = chatEngineConfig().saveSearchFinding;
9419
9414
  if (typeof save !== "function" || !note || !body) return;
@@ -11011,6 +11006,17 @@ var _ChatSession = class _ChatSession {
11011
11006
  this.state.gateRefreshToken += 1;
11012
11007
  }
11013
11008
  };
11009
+ /**
11010
+ * Save where a hard search found its answer (findings.ts), through the host's
11011
+ * saveSearchFinding hook. Never for an indexing pass, never twice for one turn, never
11012
+ * throws, never waited on.
11013
+ *
11014
+ * OFF since 1.20.1 (owner, 2026-11-24): the MCP's searchText now learns which page answered
11015
+ * a question by itself (learned links, read first by every search), so the chat no longer
11016
+ * reads "search_findings" first (that read cost 7 to 8 s at the start of every turn in
11017
+ * production) and nothing is saved here. SAVE_SEARCH_FINDINGS turns it back on.
11018
+ */
11019
+ _ChatSession.SAVE_SEARCH_FINDINGS = false;
11014
11020
  /** How many passes one "Load more" brings into a file's row. */
11015
11021
  _ChatSession.RUN_PASS_PAGE = 10;
11016
11022
  var ChatSession = _ChatSession;