bunnyquery 1.15.0 → 1.15.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.mjs CHANGED
@@ -71,6 +71,13 @@ function normalizeWebAccess(value) {
71
71
  function webAccessFrom(data) {
72
72
  return data ? normalizeWebAccess(data.web_access) : DEFAULT_WEB_ACCESS;
73
73
  }
74
+ var DEFAULT_SKIP_DUPLICATE_FILES = true;
75
+ function normalizeSkipDuplicateFiles(value) {
76
+ return value !== false;
77
+ }
78
+ function skipDuplicateFilesFrom(data) {
79
+ return data ? normalizeSkipDuplicateFiles(data.skip_duplicate_files) : DEFAULT_SKIP_DUPLICATE_FILES;
80
+ }
74
81
  var CHAT_GREETING_MAX_LENGTH = 400;
75
82
  function normalizeChatGreeting(value) {
76
83
  if (typeof value !== "string") return "";
@@ -157,6 +164,9 @@ function projectChatGreeting(service) {
157
164
  function projectWebAccess(service) {
158
165
  return webAccessFrom(cachedProjectSettings(service));
159
166
  }
167
+ function projectSkipDuplicateFiles(service) {
168
+ return skipDuplicateFilesFrom(cachedProjectSettings(service));
169
+ }
160
170
  function setProjectSettings(service, data) {
161
171
  if (!service) return;
162
172
  cache.set(service, { data: data || null, settled: true, inflight: null });
@@ -236,16 +246,29 @@ function liveStreamingRealtimeEnabled() {
236
246
  function liveStreamingEnabled() {
237
247
  return _config?.liveStreaming === true;
238
248
  }
249
+ function underCeiling(projectSetting, option, override) {
250
+ if (!projectSetting) return false;
251
+ if (option === false) return false;
252
+ if (override === false) return false;
253
+ return true;
254
+ }
239
255
  function webAccessEnabled(service) {
240
256
  const opt = _config ? _config.webAccess : void 0;
241
- if (typeof opt === "boolean") return opt;
242
- return webAccessFrom(service ? cachedProjectSettings(service) : null);
257
+ return underCeiling(webAccessFrom(service ? cachedProjectSettings(service) : null), opt);
243
258
  }
244
- function resolveWebAccess(service) {
259
+ function resolveWebAccess(service, override) {
245
260
  const opt = _config ? _config.webAccess : void 0;
246
- if (typeof opt === "boolean") return Promise.resolve(opt);
247
- if (!service) return Promise.resolve(false);
248
- return loadProjectSettings(service).then(webAccessFrom, () => false);
261
+ if (!service) return Promise.resolve(underCeiling(webAccessFrom(null), opt, override));
262
+ return loadProjectSettings(service).then(webAccessFrom, () => false).then((setting) => underCeiling(setting, opt, override));
263
+ }
264
+ function skipDuplicateFilesEnabled(service) {
265
+ const opt = _config ? _config.skipDuplicateFiles : void 0;
266
+ return underCeiling(skipDuplicateFilesFrom(service ? cachedProjectSettings(service) : null), opt);
267
+ }
268
+ function resolveSkipDuplicateFiles(service) {
269
+ const opt = _config ? _config.skipDuplicateFiles : void 0;
270
+ if (!service) return Promise.resolve(underCeiling(skipDuplicateFilesFrom(null), opt));
271
+ return loadProjectSettings(service).then(skipDuplicateFilesFrom, () => skipDuplicateFilesFrom(null)).then((setting) => underCeiling(setting, opt));
249
272
  }
250
273
  function streamRecoveryEnabled() {
251
274
  if (!_config) return false;
@@ -261,6 +284,54 @@ function pollOpt() {
261
284
  return p === void 0 ? {} : { poll: p };
262
285
  }
263
286
 
287
+ // src/engine/duplicates.ts
288
+ var DUPLICATE_LOOKUP_MAX_CANDIDATES = 25;
289
+ var SRC_PREFIX = "src::";
290
+ function isDuplicateCandidateId(uniqueId, name) {
291
+ if (typeof uniqueId !== "string" || !name) return false;
292
+ if (uniqueId.indexOf(SRC_PREFIX) !== 0) return false;
293
+ if (uniqueId === SRC_PREFIX + name) return true;
294
+ const tail = "/" + name;
295
+ return uniqueId.length > SRC_PREFIX.length + tail.length && uniqueId.slice(-tail.length) === tail;
296
+ }
297
+ function listOf(res) {
298
+ if (!res) return [];
299
+ if (Array.isArray(res)) return res;
300
+ return Array.isArray(res.list) ? res.list : [];
301
+ }
302
+ async function findDuplicateUpload(skapi, file, userId, opts) {
303
+ try {
304
+ if (!skapi || typeof skapi.getUniqueId !== "function" || typeof skapi.getRecords !== "function") return null;
305
+ const name = file && typeof file.name === "string" ? file.name : "";
306
+ const size = file && typeof file.size === "number" ? file.size : NaN;
307
+ if (!name || !(size >= 0) || !userId) return null;
308
+ const service = opts && opts.service ? { service: opts.service } : {};
309
+ const found = listOf(await skapi.getUniqueId(Object.assign({ unique_id: name, condition: "<=" }, service)));
310
+ const ids = [];
311
+ for (const item of found) {
312
+ const id = item && typeof item === "object" ? item.unique_id : item;
313
+ if (isDuplicateCandidateId(id, name) && ids.indexOf(id) === -1) ids.push(id);
314
+ if (ids.length >= DUPLICATE_LOOKUP_MAX_CANDIDATES) break;
315
+ }
316
+ for (const uniqueId of ids) {
317
+ let record = null;
318
+ try {
319
+ record = listOf(await skapi.getRecords(Object.assign({ unique_id: uniqueId }, service)))[0] || null;
320
+ } catch {
321
+ continue;
322
+ }
323
+ if (!record || typeof record !== "object") continue;
324
+ const data = record.data && typeof record.data === "object" ? record.data : null;
325
+ if (!data || data.size_bytes !== size) continue;
326
+ if (record.user_id !== userId) continue;
327
+ return { storagePath: uniqueId.slice(SRC_PREFIX.length), uniqueId, record };
328
+ }
329
+ return null;
330
+ } catch {
331
+ return null;
332
+ }
333
+ }
334
+
264
335
  // src/engine/office.ts
265
336
  var OFFICE_FILE_EXTENSIONS = /* @__PURE__ */ new Set([
266
337
  "doc",
@@ -673,6 +744,10 @@ function buildRenderMeta(attachment) {
673
744
  ` : "") + `- access group (use this for EVERY record you write for this file): ${indexingAccessGroup(attachment)}
674
745
  `;
675
746
  }
747
+ var PAGE_TEXT_TABLE = "page_texts";
748
+ var PAGE_TEXT_RULE = `PAGE TEXT for pages WITHOUT a text layer: for EVERY page whose label (its first label, when the page is split into strips) carries NO "Embedded text layer" block, ALSO post exactly ONE record in table "${PAGE_TEXT_TABLE}" with data {"page": <its document page number from the label, 1-based>, "page_text": "<the page's complete text exactly as printed, verbatim, in reading order, nothing summarised or left out>"}, reference "src::" + the storage path above, in addition to the records above. A page WITH an embedded text layer gets NO such record: its text is already stored.
749
+
750
+ `;
676
751
  function buildRenderDatafy(placeholder) {
677
752
  return `
678
753
  ${placeholder}
@@ -683,7 +758,7 @@ Each image is preceded by a label giving its DOCUMENT PAGE number. That label is
683
758
 
684
759
  Transcribe COMPLETELY, not representatively. A table with twenty rows gets twenty records, not a sample of the first few - if a page has more rows than you can save comfortably, still save them all rather than summarising. Where a page carries an embedded text layer it is quoted above that page's image: it is the exact text and should be preferred over reading the pixels, with the image used for layout, tables, stamps and handwriting.
685
760
 
686
- Save records for THIS window of pages only, then stop and report what you saved. Do NOT try to read the rest of the file and do NOT worry about the pages after this window: if any remain, the next window is rendered and sent to you automatically. Report only the pages you were actually shown - never imply you have seen the whole document.`;
761
+ ` + PAGE_TEXT_RULE + `Save records for THIS window of pages only, then stop and report what you saved. Do NOT try to read the rest of the file and do NOT worry about the pages after this window: if any remain, the next window is rendered and sent to you automatically. Report only the pages you were actually shown - never imply you have seen the whole document.`;
687
762
  }
688
763
  function buildIndexingWindowMessage(attachment, placeholder, isContinuation, positionLabel) {
689
764
  const src = `src::${attachment.storagePath}`;
@@ -1225,7 +1300,7 @@ var RETRIEVAL_NOTE_PREFIX = "[Retrieval note, not shown to the user";
1225
1300
  var FILE_KEYS = ["path", "storage_path", "storagePath", "file", "file_path", "filePath"];
1226
1301
  var TABLE_KEYS = ["table_name", "tableName"];
1227
1302
  var GROUP_KEYS = ["access_group", "accessGroup"];
1228
- var SRC_PREFIX = "src::";
1303
+ var SRC_PREFIX2 = "src::";
1229
1304
  var RESULT_WALK_MAX_NODES = 400;
1230
1305
  var RESULT_WALK_MAX_DEPTH = 5;
1231
1306
  function isWebToolName(name) {
@@ -1254,8 +1329,8 @@ function pushHit(list, path, page) {
1254
1329
  }
1255
1330
  function pathFromSrcId(value) {
1256
1331
  if (typeof value !== "string") return null;
1257
- if (value.indexOf(SRC_PREFIX) !== 0) return null;
1258
- var rest = value.slice(SRC_PREFIX.length).trim();
1332
+ if (value.indexOf(SRC_PREFIX2) !== 0) return null;
1333
+ var rest = value.slice(SRC_PREFIX2.length).trim();
1259
1334
  return rest ? rest : null;
1260
1335
  }
1261
1336
  function parseJsonLoose(value) {
@@ -2924,7 +2999,7 @@ async function callClaudeWithMcp({
2924
2999
  fileUrls,
2925
3000
  webAccess
2926
3001
  }) {
2927
- const web = typeof webAccess === "boolean" ? webAccess : await resolveWebAccess(service);
3002
+ const web = await resolveWebAccess(service, typeof webAccess === "boolean" ? webAccess : void 0);
2928
3003
  const mcpServerDefinition = {
2929
3004
  type: "url",
2930
3005
  name: mcpServer.name,
@@ -8513,11 +8588,26 @@ var ChatSession = class {
8513
8588
  if (!total) return Promise.reject(new Error("Empty attachment"));
8514
8589
  var urls = [];
8515
8590
  var anyIndexFailed = false;
8591
+ var reusedCount = 0;
8592
+ att.reused = false;
8516
8593
  var chain = Promise.resolve();
8594
+ var findDuplicate = function(member) {
8595
+ if (typeof self.host.findDuplicateUpload !== "function") return Promise.resolve(null);
8596
+ var storedName = String(member.storagePath || "").split("/").filter(Boolean).pop() || member.file.name;
8597
+ return resolveSkipDuplicateFiles(id.projectId).then(function(on) {
8598
+ if (!on) return null;
8599
+ return Promise.resolve(self.host.findDuplicateUpload({ name: storedName, size: member.file.size })).then(function(hit) {
8600
+ return hit && typeof hit.storagePath === "string" && hit.storagePath ? hit.storagePath : null;
8601
+ });
8602
+ }).catch(function() {
8603
+ return null;
8604
+ });
8605
+ };
8517
8606
  members.forEach(function(member, idx) {
8518
8607
  chain = chain.then(function() {
8519
8608
  var hadExists = false;
8520
8609
  var skipped = false;
8610
+ var duplicateOf = null;
8521
8611
  var existedBefore = false;
8522
8612
  var onProg = function(p) {
8523
8613
  if (p && p.total) {
@@ -8536,7 +8626,14 @@ var ChatSession = class {
8536
8626
  }
8537
8627
  });
8538
8628
  };
8539
- return doMemberUpload(true).catch(function(err) {
8629
+ return findDuplicate(member).then(function(dup) {
8630
+ if (dup) {
8631
+ duplicateOf = dup;
8632
+ console.log("[chat-engine] skipping an upload the user already has:", member.storagePath, "->", dup);
8633
+ return;
8634
+ }
8635
+ return doMemberUpload(true);
8636
+ }).catch(function(err) {
8540
8637
  var code = err && (err.code || err.body && err.body.code);
8541
8638
  var msg = err && (err.message || err.body && err.body.message || (typeof err === "string" ? err : ""));
8542
8639
  var isExists = code === "EXISTS" || msg && /exist/i.test(msg);
@@ -8556,9 +8653,20 @@ var ChatSession = class {
8556
8653
  });
8557
8654
  }).then(function() {
8558
8655
  if (skipped) return;
8559
- return self.host.getTemporaryUrl(member.storagePath);
8656
+ return self.host.getTemporaryUrl(duplicateOf || member.storagePath);
8560
8657
  }).then(function(url) {
8561
8658
  if (skipped) return;
8659
+ if (duplicateOf) {
8660
+ urls.push({ name: member.relPath, url, storagePath: duplicateOf });
8661
+ reusedCount += 1;
8662
+ if (att.kind !== "folder") {
8663
+ att.uploadedUrl = url;
8664
+ att.storagePath = duplicateOf;
8665
+ att.reused = true;
8666
+ } else att.reusedCount = reusedCount;
8667
+ self.host.renderAttachmentChips();
8668
+ return;
8669
+ }
8562
8670
  urls.push({ name: member.relPath, url, storagePath: member.storagePath });
8563
8671
  if (att.kind !== "folder") {
8564
8672
  att.uploadedUrl = url;
@@ -9186,6 +9294,6 @@ function buildChatDisplayList(messages, opts) {
9186
9294
  return out;
9187
9295
  }
9188
9296
 
9189
- export { BG_INDEXING_QUEUE_SUFFIX, BOM, BOM_EXTS, CHAT_GREETING_MAX_LENGTH, CLAUDE_INPUT_CAP_RATIO, CLAUDE_PER_REQUEST_INPUT_CAP, CONTEXT_WINDOW_BY_MODEL, CONTEXT_WINDOW_DEFAULT, ChatSession, DATA_TOOL_NAMES, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, EMPTY_INDEXING_REPLY, EXPIRED_ATTACHMENT_URL_HOST, EXPIRED_ATTACHMENT_URL_ORIGIN, EXPIRED_LINK_REFRESH_EXPIRES_SECONDS, EXT_CONTENT_TYPES, HISTORY_BUDGET_RATIO, HISTORY_FILL_SLACK_PX, HISTORY_TOKEN_BUDGET, HTML_EXTS, HTML_HEAD_WINDOW, IMAGE_PREVIEWS_PER_MESSAGE, INDEXING_COMPLETE_MARKER, INDEXING_MAX_OUTPUT_TOKENS, INLINE_LINK_GLYPH, INLINE_LINK_UNAVAILABLE_GLYPH, INLINE_LINK_UNAVAILABLE_SUFFIX, INPUT_CAP_RATIO, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, MAX_CONCURRENT_BG_POLLS, MAX_HISTORY_FILL_PAGES, MAX_HISTORY_MESSAGES, MAX_OUTPUT_BY_MODEL, MAX_OUTPUT_TOKENS, MAX_PARSED_CONTENT_CHARS, MCP_NAME, MINT_CACHE_GENERATION, MIN_INPUT_TOKEN_BUDGET, MIN_PER_REQUEST_INPUT_CAP, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, POLL_INTERVAL, PRESIGN_SAFETY_MARGIN_MS, PREVIEWABLE_IMAGE_CONTENT_TYPES, PREVIEW_BROWSER_CACHE_SECONDS, PREVIEW_LAYOUT_BOX_SELECTOR, PREVIEW_URL_EXPIRES_SECONDS, PROJECT_SETTINGS_ACCESS_GROUP, PROJECT_SETTINGS_TABLE, PROJECT_SETTINGS_UNIQUE_ID, RENDER_FROM_TOKEN, RETRIEVAL_NOTES_MAX, RETRIEVAL_NOTES_TOKEN_BUDGET, RETRIEVAL_NOTE_MAX_CHARS, RETRIEVAL_NOTE_MAX_ITEMS, RETRIEVAL_NOTE_PREFIX, RTF_EXTS, RUN_RECORD_WORKING_STALE_MS, STREAM_POLL_INTERVAL, TOOL_AND_RESPONSE_BUFFER, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, XML_EXTS, __resetSplitHistoryState, accessSettingFrom, adoptLocalAnswerIntoPage, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEngineConfig, chatGreetingFrom, chatStreamWiring, citationFileName, citationLinkPart, citationsFor, classifyInlineLink, clearAttachmentParsers, clearImagePreviewCache, clearProjectSettings, composeUserMessage, configureChatEngine, configureProjectSettings, contentTypeForExt, createHistoryFiller, createInlineLinkRegex, createScrollAnchor, createSseParser, csrEnvelopeError, encodePathSegments, encodingClassForExt, ensureHtmlCharset, ensureXmlEncoding, escapeInlineHtml, escapeRtfNonAscii, estimateMessageTokens, estimateTextTokens, extOf, extractClaudeText, extractLastUserTextFromRequest, extractOpenAIText, extractRemotePathFromAttachmentHref, extractRetrievalNote, fetchLiveIndexingKeys, fillHistoryViewport, filterListByClearHorizon, findAttachmentParser, formatChatTimestamp, formatDuration, formatRetrievalNote, getAttachmentParsers, getChatHistory, getContextWindow, getErrorMessage, getExpiredAttachmentVisiblePath, getInputTokenBudget, getMaxOutputTokens, getModelContextWindow, getProjectContextWindow, getSplitChatHistory, getVisionProfile, groupAttachmentFailures, hasBom, hydrateImagePreviews, indexDoneUniqueId, indexScopeKey, indexingAccessGroup, isAuthExpiredError, isBgIndexingQueue, isCsrStatusEnvelope, isDataToolName, isErrorResponseBody, isHttpUrlLike, isImageVisionFile, isIndexingRequestText, isLinkUnavailable, isNonRetryableRequestError, isOfficeFile, isPagedReadFile, isPreviewableImagePath, isProviderApiKeyError, isRetriedFailure, isRetrievalNote, isServerExtractable, isServiceDbAttachmentHref, isWindowedReadFile, linkUnavailableKeyForHref, linkUnavailableKeyForPath, linkUnavailableKeysForPath, listClaudeModels, listOpenAIModels, liveSafePrefix, loadProjectSettings, looksLikeRtf, makeExtractPlaceholder, mapHistoryListToMessages, markImagePreviewStale, mayKeepStreamedAnswer, mintCacheBustStamp, needsBomForExt, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectUploadAccessGroup, projectWebAccess, providerBodyWasRead, readExpiredAttachmentHref, readyProjectSettings, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, resolveImagePreviewUrl, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, shouldRescueInFlightMessage, skapiSupportsStreaming, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
9297
+ export { BG_INDEXING_QUEUE_SUFFIX, BOM, BOM_EXTS, CHAT_GREETING_MAX_LENGTH, CLAUDE_INPUT_CAP_RATIO, CLAUDE_PER_REQUEST_INPUT_CAP, CONTEXT_WINDOW_BY_MODEL, CONTEXT_WINDOW_DEFAULT, ChatSession, DATA_TOOL_NAMES, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_MAX_CANDIDATES, EMPTY_INDEXING_REPLY, EXPIRED_ATTACHMENT_URL_HOST, EXPIRED_ATTACHMENT_URL_ORIGIN, EXPIRED_LINK_REFRESH_EXPIRES_SECONDS, EXT_CONTENT_TYPES, HISTORY_BUDGET_RATIO, HISTORY_FILL_SLACK_PX, HISTORY_TOKEN_BUDGET, HTML_EXTS, HTML_HEAD_WINDOW, IMAGE_PREVIEWS_PER_MESSAGE, INDEXING_COMPLETE_MARKER, INDEXING_MAX_OUTPUT_TOKENS, INLINE_LINK_GLYPH, INLINE_LINK_UNAVAILABLE_GLYPH, INLINE_LINK_UNAVAILABLE_SUFFIX, INPUT_CAP_RATIO, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, MAX_CONCURRENT_BG_POLLS, MAX_HISTORY_FILL_PAGES, MAX_HISTORY_MESSAGES, MAX_OUTPUT_BY_MODEL, MAX_OUTPUT_TOKENS, MAX_PARSED_CONTENT_CHARS, MCP_NAME, MINT_CACHE_GENERATION, MIN_INPUT_TOKEN_BUDGET, MIN_PER_REQUEST_INPUT_CAP, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, PAGE_TEXT_TABLE, POLL_INTERVAL, PRESIGN_SAFETY_MARGIN_MS, PREVIEWABLE_IMAGE_CONTENT_TYPES, PREVIEW_BROWSER_CACHE_SECONDS, PREVIEW_LAYOUT_BOX_SELECTOR, PREVIEW_URL_EXPIRES_SECONDS, PROJECT_SETTINGS_ACCESS_GROUP, PROJECT_SETTINGS_TABLE, PROJECT_SETTINGS_UNIQUE_ID, RENDER_FROM_TOKEN, RETRIEVAL_NOTES_MAX, RETRIEVAL_NOTES_TOKEN_BUDGET, RETRIEVAL_NOTE_MAX_CHARS, RETRIEVAL_NOTE_MAX_ITEMS, RETRIEVAL_NOTE_PREFIX, RTF_EXTS, RUN_RECORD_WORKING_STALE_MS, STREAM_POLL_INTERVAL, TOOL_AND_RESPONSE_BUFFER, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, XML_EXTS, __resetSplitHistoryState, accessSettingFrom, adoptLocalAnswerIntoPage, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEngineConfig, chatGreetingFrom, chatStreamWiring, citationFileName, citationLinkPart, citationsFor, classifyInlineLink, clearAttachmentParsers, clearImagePreviewCache, clearProjectSettings, composeUserMessage, configureChatEngine, configureProjectSettings, contentTypeForExt, createHistoryFiller, createInlineLinkRegex, createScrollAnchor, createSseParser, csrEnvelopeError, encodePathSegments, encodingClassForExt, ensureHtmlCharset, ensureXmlEncoding, escapeInlineHtml, escapeRtfNonAscii, estimateMessageTokens, estimateTextTokens, extOf, extractClaudeText, extractLastUserTextFromRequest, extractOpenAIText, extractRemotePathFromAttachmentHref, extractRetrievalNote, fetchLiveIndexingKeys, fillHistoryViewport, filterListByClearHorizon, findAttachmentParser, findDuplicateUpload, formatChatTimestamp, formatDuration, formatRetrievalNote, getAttachmentParsers, getChatHistory, getContextWindow, getErrorMessage, getExpiredAttachmentVisiblePath, getInputTokenBudget, getMaxOutputTokens, getModelContextWindow, getProjectContextWindow, getSplitChatHistory, getVisionProfile, groupAttachmentFailures, hasBom, hydrateImagePreviews, indexDoneUniqueId, indexScopeKey, indexingAccessGroup, isAuthExpiredError, isBgIndexingQueue, isCsrStatusEnvelope, isDataToolName, isDuplicateCandidateId, isErrorResponseBody, isHttpUrlLike, isImageVisionFile, isIndexingRequestText, isLinkUnavailable, isNonRetryableRequestError, isOfficeFile, isPagedReadFile, isPreviewableImagePath, isProviderApiKeyError, isRetriedFailure, isRetrievalNote, isServerExtractable, isServiceDbAttachmentHref, isWindowedReadFile, linkUnavailableKeyForHref, linkUnavailableKeyForPath, linkUnavailableKeysForPath, listClaudeModels, listOpenAIModels, liveSafePrefix, loadProjectSettings, looksLikeRtf, makeExtractPlaceholder, mapHistoryListToMessages, markImagePreviewStale, mayKeepStreamedAnswer, mintCacheBustStamp, needsBomForExt, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeSkipDuplicateFiles, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, providerBodyWasRead, readExpiredAttachmentHref, readyProjectSettings, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, resolveImagePreviewUrl, resolveSkipDuplicateFiles, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, shouldRescueInFlightMessage, skapiSupportsStreaming, skipDuplicateFilesEnabled, skipDuplicateFilesFrom, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
9190
9298
  //# sourceMappingURL=engine.mjs.map
9191
9299
  //# sourceMappingURL=engine.mjs.map