bunnyquery 1.15.0 → 1.15.2
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 +4 -2
- package/bunnyquery.js +182 -21
- package/dist/engine.cjs +178 -19
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.mts +211 -27
- package/dist/engine.d.ts +211 -27
- package/dist/engine.mjs +169 -20
- package/dist/engine.mjs.map +1 -1
- package/package.json +1 -1
- package/src/engine/config.ts +76 -23
- package/src/engine/duplicates.ts +115 -0
- package/src/engine/host.ts +12 -0
- package/src/engine/index.ts +20 -0
- package/src/engine/project_settings.ts +47 -6
- package/src/engine/prompts/index.ts +1 -0
- package/src/engine/prompts/indexing_user_message.ts +23 -0
- package/src/engine/requests.ts +11 -8
- package/src/engine/session.ts +108 -9
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
|
-
|
|
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 (
|
|
247
|
-
|
|
248
|
-
|
|
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
|
|
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(
|
|
1258
|
-
var rest = value.slice(
|
|
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 :
|
|
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,
|
|
@@ -4461,6 +4536,9 @@ var ChatSession = class {
|
|
|
4461
4536
|
this._liveIndexKey = "";
|
|
4462
4537
|
this._liveIndexAt = 0;
|
|
4463
4538
|
this._indexClaims = {};
|
|
4539
|
+
this._bgQueueByFile = null;
|
|
4540
|
+
this._bgQueueStamp = { arr: null, length: 0, first: void 0, last: void 0 };
|
|
4541
|
+
this._bgQueueIndexRebuilds = 0;
|
|
4464
4542
|
}
|
|
4465
4543
|
/** What the display layer needs to decide whether a run is finished. `keys` holds
|
|
4466
4544
|
* every file the server still has indexing work for; `checked` is false until the
|
|
@@ -4497,13 +4575,10 @@ var ChatSession = class {
|
|
|
4497
4575
|
*/
|
|
4498
4576
|
hasLiveIndexRun(storagePath) {
|
|
4499
4577
|
if (!storagePath) return false;
|
|
4500
|
-
var
|
|
4578
|
+
var scoped = this._indexClaimKey(storagePath);
|
|
4579
|
+
var claimed = this._indexClaims[scoped];
|
|
4501
4580
|
if (claimed && nowMs() - claimed < INDEX_DISPATCH_CLAIM_MS) return true;
|
|
4502
|
-
|
|
4503
|
-
for (var i = 0; i < this.bgTaskQueue.length; i++) {
|
|
4504
|
-
var e = this.bgTaskQueue[i];
|
|
4505
|
-
if (e && e.storagePath === storagePath && e.projectId === id.projectId && e.platform === id.platform) return true;
|
|
4506
|
-
}
|
|
4581
|
+
if (this._bgQueueIndex()[scoped] > 0) return true;
|
|
4507
4582
|
return this.state.messages.some(function(m) {
|
|
4508
4583
|
if (!m.isBackgroundTask || m.role !== "user" || m.isCancelled) return false;
|
|
4509
4584
|
if (!(m.isPendingQueued || m.isPendingInProcess || m.isSendingToServer)) return false;
|
|
@@ -4516,6 +4591,47 @@ var ChatSession = class {
|
|
|
4516
4591
|
var id = this.host.getIdentity();
|
|
4517
4592
|
return indexScopeKey(id.projectId, id.platform) + "|" + storagePath;
|
|
4518
4593
|
}
|
|
4594
|
+
/**
|
|
4595
|
+
* bgTaskQueue as a map: scoped path (indexScopeKey(projectId, platform) +
|
|
4596
|
+
* '|' + storagePath, the key the claims and the stops use) -> entries.
|
|
4597
|
+
*
|
|
4598
|
+
* The array stays the source of truth because the engine does not own every
|
|
4599
|
+
* write to it: both hosts hand in their own array (the dashboard a Vue
|
|
4600
|
+
* reactive one it pushes to from the Files page and splices from its
|
|
4601
|
+
* fallback poller), and tests push to it directly. So the map is DERIVED, and
|
|
4602
|
+
* rebuilt when a cheap stamp says the array changed: its identity, its length,
|
|
4603
|
+
* its first and its last entry.
|
|
4604
|
+
*
|
|
4605
|
+
* Why that stamp is exact for this array: every write to bgTaskQueue is either
|
|
4606
|
+
* a push of a NEW entry object or a splice that removes one (nothing inserts
|
|
4607
|
+
* in the middle, replaces in place or re-pushes a removed entry). Under those
|
|
4608
|
+
* two operations, same length plus same last entry means the same contents:
|
|
4609
|
+
* a push changes the last entry unless that same push is removed again, and a
|
|
4610
|
+
* removal changes the length unless a push restores it, which changes the
|
|
4611
|
+
* last entry. The first entry is in the stamp as margin. A rebuild is one
|
|
4612
|
+
* pass over the array, paid once per change instead of once per claim.
|
|
4613
|
+
*/
|
|
4614
|
+
_bgQueueIndex() {
|
|
4615
|
+
var q = this.bgTaskQueue;
|
|
4616
|
+
var n = q ? q.length : 0;
|
|
4617
|
+
var first = n ? q[0] : void 0;
|
|
4618
|
+
var last = n ? q[n - 1] : void 0;
|
|
4619
|
+
var st = this._bgQueueStamp;
|
|
4620
|
+
if (this._bgQueueByFile && st.arr === q && st.length === n && st.first === first && st.last === last) {
|
|
4621
|
+
return this._bgQueueByFile;
|
|
4622
|
+
}
|
|
4623
|
+
var idx = {};
|
|
4624
|
+
for (var i = 0; i < n; i++) {
|
|
4625
|
+
var e = q[i];
|
|
4626
|
+
if (!e || !e.storagePath) continue;
|
|
4627
|
+
var k = indexScopeKey(e.projectId, e.platform) + "|" + e.storagePath;
|
|
4628
|
+
idx[k] = (idx[k] || 0) + 1;
|
|
4629
|
+
}
|
|
4630
|
+
this._bgQueueByFile = idx;
|
|
4631
|
+
this._bgQueueStamp = { arr: q, length: n, first, last };
|
|
4632
|
+
this._bgQueueIndexRebuilds++;
|
|
4633
|
+
return idx;
|
|
4634
|
+
}
|
|
4519
4635
|
/**
|
|
4520
4636
|
* Take this file's indexing slot, or report that someone already has it.
|
|
4521
4637
|
*
|
|
@@ -8513,11 +8629,26 @@ var ChatSession = class {
|
|
|
8513
8629
|
if (!total) return Promise.reject(new Error("Empty attachment"));
|
|
8514
8630
|
var urls = [];
|
|
8515
8631
|
var anyIndexFailed = false;
|
|
8632
|
+
var reusedCount = 0;
|
|
8633
|
+
att.reused = false;
|
|
8516
8634
|
var chain = Promise.resolve();
|
|
8635
|
+
var findDuplicate = function(member) {
|
|
8636
|
+
if (typeof self.host.findDuplicateUpload !== "function") return Promise.resolve(null);
|
|
8637
|
+
var storedName = String(member.storagePath || "").split("/").filter(Boolean).pop() || member.file.name;
|
|
8638
|
+
return resolveSkipDuplicateFiles(id.projectId).then(function(on) {
|
|
8639
|
+
if (!on) return null;
|
|
8640
|
+
return Promise.resolve(self.host.findDuplicateUpload({ name: storedName, size: member.file.size })).then(function(hit) {
|
|
8641
|
+
return hit && typeof hit.storagePath === "string" && hit.storagePath ? hit.storagePath : null;
|
|
8642
|
+
});
|
|
8643
|
+
}).catch(function() {
|
|
8644
|
+
return null;
|
|
8645
|
+
});
|
|
8646
|
+
};
|
|
8517
8647
|
members.forEach(function(member, idx) {
|
|
8518
8648
|
chain = chain.then(function() {
|
|
8519
8649
|
var hadExists = false;
|
|
8520
8650
|
var skipped = false;
|
|
8651
|
+
var duplicateOf = null;
|
|
8521
8652
|
var existedBefore = false;
|
|
8522
8653
|
var onProg = function(p) {
|
|
8523
8654
|
if (p && p.total) {
|
|
@@ -8536,7 +8667,14 @@ var ChatSession = class {
|
|
|
8536
8667
|
}
|
|
8537
8668
|
});
|
|
8538
8669
|
};
|
|
8539
|
-
return
|
|
8670
|
+
return findDuplicate(member).then(function(dup) {
|
|
8671
|
+
if (dup) {
|
|
8672
|
+
duplicateOf = dup;
|
|
8673
|
+
console.log("[chat-engine] skipping an upload the user already has:", member.storagePath, "->", dup);
|
|
8674
|
+
return;
|
|
8675
|
+
}
|
|
8676
|
+
return doMemberUpload(true);
|
|
8677
|
+
}).catch(function(err) {
|
|
8540
8678
|
var code = err && (err.code || err.body && err.body.code);
|
|
8541
8679
|
var msg = err && (err.message || err.body && err.body.message || (typeof err === "string" ? err : ""));
|
|
8542
8680
|
var isExists = code === "EXISTS" || msg && /exist/i.test(msg);
|
|
@@ -8556,9 +8694,20 @@ var ChatSession = class {
|
|
|
8556
8694
|
});
|
|
8557
8695
|
}).then(function() {
|
|
8558
8696
|
if (skipped) return;
|
|
8559
|
-
return self.host.getTemporaryUrl(member.storagePath);
|
|
8697
|
+
return self.host.getTemporaryUrl(duplicateOf || member.storagePath);
|
|
8560
8698
|
}).then(function(url) {
|
|
8561
8699
|
if (skipped) return;
|
|
8700
|
+
if (duplicateOf) {
|
|
8701
|
+
urls.push({ name: member.relPath, url, storagePath: duplicateOf });
|
|
8702
|
+
reusedCount += 1;
|
|
8703
|
+
if (att.kind !== "folder") {
|
|
8704
|
+
att.uploadedUrl = url;
|
|
8705
|
+
att.storagePath = duplicateOf;
|
|
8706
|
+
att.reused = true;
|
|
8707
|
+
} else att.reusedCount = reusedCount;
|
|
8708
|
+
self.host.renderAttachmentChips();
|
|
8709
|
+
return;
|
|
8710
|
+
}
|
|
8562
8711
|
urls.push({ name: member.relPath, url, storagePath: member.storagePath });
|
|
8563
8712
|
if (att.kind !== "folder") {
|
|
8564
8713
|
att.uploadedUrl = url;
|
|
@@ -9186,6 +9335,6 @@ function buildChatDisplayList(messages, opts) {
|
|
|
9186
9335
|
return out;
|
|
9187
9336
|
}
|
|
9188
9337
|
|
|
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 };
|
|
9338
|
+
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
9339
|
//# sourceMappingURL=engine.mjs.map
|
|
9191
9340
|
//# sourceMappingURL=engine.mjs.map
|