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/dist/engine.d.mts CHANGED
@@ -291,18 +291,29 @@ interface ChatEngineConfig {
291
291
  * OpenAI's `web_search` are attached to a chat request only when this
292
292
  * resolves to true.
293
293
  *
294
- * OPTIONAL, AND UNSET IS NOT FALSE. When the host leaves it out, the engine
295
- * reads the project's own setting (`web_access` in the `bq::settings`
296
- * record, see project_settings.ts) and falls back to OFF, so the project
297
- * owner's switch on the Project Settings page decides for every client that
298
- * does not override it. A host that sets a boolean here overrides the
299
- * project for its own page, both ways. Resolution: this option, then the
300
- * project setting, then false.
294
+ * OPTIONAL. The project's own setting (`web_access` in the `bq::settings`
295
+ * record, see project_settings.ts; off unless the owner turned it on) is the
296
+ * CEILING, and this option may only restrict below it:
297
+ * effective = projectSetting && webAccess !== false
298
+ * So `false` here turns the web off for this page whatever the project says,
299
+ * and `true` or unset follows the project. A value above the project setting
300
+ * has no effect: the owner's switch is what lets an answer out onto the web.
301
301
  *
302
302
  * Chat turns only. An indexing pass keeps the tools it has today, since the
303
303
  * worker hands it rendered pages and extracted text and not a URL to fetch.
304
304
  */
305
305
  webAccess?: boolean;
306
+ /**
307
+ * Whether a chat attachment that the signed-in user already uploaded to this
308
+ * project (same file name, same size, same uploader) is SKIPPED: not uploaded
309
+ * again, not indexed again, the turn using the stored copy's url. Same
310
+ * ceiling rule as `webAccess`, against the project's `skip_duplicate_files`
311
+ * setting, which is ON unless the owner turned it off:
312
+ * effective = projectSetting && skipDuplicateFiles !== false
313
+ * `false` here lets this page re-upload duplicates on a project that skips
314
+ * them; `true` or unset follows the project. See duplicates.ts for the check.
315
+ */
316
+ skipDuplicateFiles?: boolean;
306
317
  /**
307
318
  * skapi.forwardRequestFinalize, bound to the consumer's skapi instance.
308
319
  * Stores the version of a streamed turn that history should keep (the engine
@@ -399,20 +410,36 @@ interface ChatEngineConfig {
399
410
  declare function configureChatEngine(config: ChatEngineConfig): void;
400
411
  declare function chatEngineConfig(): ChatEngineConfig;
401
412
  /**
402
- * The web switch for a chat turn, SYNCHRONOUSLY: the host's `webAccess` option
403
- * when it is a boolean, else the project's cached `web_access` setting, else
404
- * false. For a template or a prompt builder, which have nowhere to await. Reads
405
- * the cache as it stands, so before the settings fetch settles it answers the
406
- * default; request builders use resolveWebAccess below instead.
413
+ * The web switch for a chat turn, SYNCHRONOUSLY: the project's cached
414
+ * `web_access` setting (off unless the owner turned it on), restricted by the
415
+ * host's `webAccess` option when that is `false`. For a template or a prompt
416
+ * builder, which have nowhere to await. Reads the cache as it stands, so before
417
+ * the settings fetch settles it answers the default; request builders use
418
+ * resolveWebAccess below instead.
407
419
  */
408
420
  declare function webAccessEnabled(service?: string): boolean;
409
421
  /**
410
- * The same switch, awaiting the project's settings record when the host did not
411
- * decide. Never rejects: a failed or impossible read (no reader injected, a
412
- * signed-out visitor on a require_login project) settles as "unset", which is
413
- * off. Cheap after the first call per project: the store dedupes and caches.
422
+ * The same switch, awaiting the project's settings record. Never rejects: a
423
+ * failed or impossible read (no reader injected, a signed-out visitor on a
424
+ * require_login project) settles as "unset", which is off. Cheap after the first
425
+ * call per project: the store dedupes and caches. `override` is a per-call host
426
+ * value that may only restrict (see underCeiling).
427
+ */
428
+ declare function resolveWebAccess(service?: string, override?: boolean): Promise<boolean>;
429
+ /**
430
+ * The skip-duplicates switch for an upload, SYNCHRONOUSLY: the project's cached
431
+ * `skip_duplicate_files` setting (on unless the owner turned it off), restricted
432
+ * by the host's `skipDuplicateFiles` option when that is `false`. Answers the
433
+ * default before the settings fetch settles; the upload path uses
434
+ * resolveSkipDuplicateFiles below.
414
435
  */
415
- declare function resolveWebAccess(service?: string): Promise<boolean>;
436
+ declare function skipDuplicateFilesEnabled(service?: string): boolean;
437
+ /**
438
+ * The same switch, awaiting the project's settings record. Never rejects: a
439
+ * failed read settles as "unset", which for this switch is ON (the default), so
440
+ * a project that cannot be read still skips duplicates unless the host said no.
441
+ */
442
+ declare function resolveSkipDuplicateFiles(service?: string): Promise<boolean>;
416
443
  /**
417
444
  * True when a streamed turn whose answer never reached its row can be READ BACK.
418
445
  *
@@ -509,6 +536,65 @@ declare function streamRecoveryEnabled(): boolean;
509
536
  */
510
537
  declare function skapiSupportsStreaming(sk: any): boolean;
511
538
 
539
+ /**
540
+ * Duplicate-upload detection for chat attachments (reliability plan, owner's
541
+ * yes 2026-10-12): "has the signed-in user already uploaded THIS file to this
542
+ * project?", answered from the file records the upload path already writes.
543
+ *
544
+ * WHAT COUNTS AS THE SAME FILE. Same name, same size in bytes, same uploader.
545
+ * Every upload creates a `src::<storagePath>` record (table `file_summaries`)
546
+ * whose `data.size_bytes` is the byte count and whose `user_id` is the
547
+ * uploader, so a lookup by name narrowed by those two fields finds a file
548
+ * without reading its bytes. A different user's identical file is NOT a
549
+ * duplicate: that user's copy sits at a different access group and path and
550
+ * may be invisible to this one.
551
+ *
552
+ * HOW THE NAME IS FOUND. `getUniqueId` with `condition: '<='` is an ENDS-WITH
553
+ * match on the record id (served from the reversed proxy rows), and a file
554
+ * record's id ends with the file's name: `src::<name>` for a file at the
555
+ * root, `src::<folders>/<name>` otherwise. The match is then narrowed to
556
+ * exactly those two shapes, so `src::report.pdf` is not found by "port.pdf",
557
+ * and to the `src::` prefix, because the `run::` and `done::` index markers
558
+ * end with the same path and are not files.
559
+ *
560
+ * NEVER THROWS. A failed or refused lookup (a signed-out visitor on a
561
+ * require_login project, a region without the proxy rows yet, a network
562
+ * error) answers null, and null means "upload as usual": the check exists to
563
+ * save an indexing run, and must never be able to cost one.
564
+ *
565
+ * TRANSPORT-FREE like the rest of the engine: the caller hands in the skapi
566
+ * instance it owns. The widget passes its own; a host with no instance simply
567
+ * does not wire the hook and uploads as before.
568
+ */
569
+ /** The record found, with the storage path the stored file lives at. */
570
+ type DuplicateUploadMatch = {
571
+ /** The stored file's db storage path (the record id without `src::`). */
572
+ storagePath: string;
573
+ /** The matching `src::` record id. */
574
+ uniqueId: string;
575
+ /** The file record as read. */
576
+ record: any;
577
+ };
578
+ type DuplicateUploadFile = {
579
+ /** The file name as it is STORED: the last segment of the storage path. */
580
+ name: string;
581
+ /** Size in bytes. */
582
+ size: number;
583
+ };
584
+ /** The `src::` records to read before giving up; a name is rarely shared this widely. */
585
+ declare const DUPLICATE_LOOKUP_MAX_CANDIDATES = 25;
586
+ /** Narrow an ends-with listing to real file records for exactly this name. */
587
+ declare function isDuplicateCandidateId(uniqueId: unknown, name: string): boolean;
588
+ /**
589
+ * The first `src::` record for `file.name` whose `data.size_bytes` equals
590
+ * `file.size` and whose `user_id` is `userId`, or null. `opts.service` is passed
591
+ * through to both skapi calls when given (the widget names the project on every
592
+ * call); otherwise the instance's own project is queried.
593
+ */
594
+ declare function findDuplicateUpload(skapi: any, file: DuplicateUploadFile, userId: string, opts?: {
595
+ service?: string;
596
+ }): Promise<DuplicateUploadMatch | null>;
597
+
512
598
  /**
513
599
  * Office-file server-side extraction helpers.
514
600
  *
@@ -815,6 +901,20 @@ declare function buildIndexingRenderMessage(attachment: IndexingAttachmentInfo,
815
901
  * of the window it is rendering; passing an explicit label produces a ready-to-send message.
816
902
  */
817
903
  declare function buildIndexingRenderContinueTemplate(attachment: IndexingAttachmentInfo, placeholder: string, pageLabel?: string): string;
904
+ /**
905
+ * Verbatim page text for SCANNED pages (reliability plan 3.1, owner's yes 2026-10-12).
906
+ *
907
+ * The worker writes a `__PAGES__` record per page. A page WITH a text layer is written
908
+ * server-side before the model call; a page WITHOUT one (a scan) can only come from the
909
+ * model, and the worker's `_fill_vision_pages` fills it from a posted record that names
910
+ * the page (`page`) and carries `page_text`. The signal the model has is the label the
911
+ * worker puts before each image: "Embedded text layer for this page" appears under the
912
+ * label exactly when the page has one (the layer ships the text with the first strip of
913
+ * a page), so "no such block" is "no text layer", and that is the whole rule. Fixed table
914
+ * name, as the system prompt demands for every content kind. Kept short: the owner pays
915
+ * output tokens for the transcription itself, not for the instruction.
916
+ */
917
+ declare const PAGE_TEXT_TABLE = "page_texts";
818
918
  /**
819
919
  * User message for a WINDOWED file: the worker splices ONE window of the file's rows or
820
920
  * text into this message at `placeholder`, then continues from the reader's own cursor
@@ -2289,9 +2389,11 @@ type CallClaudeWithMcpParams = {
2289
2389
  onResponse?: (res: any) => void;
2290
2390
  onError?: (err: any) => void;
2291
2391
  /**
2292
- * Attach Claude's `web_fetch` to this turn. Omitted means "ask the engine":
2293
- * the host's `webAccess` config option, then the project's `web_access`
2294
- * setting, then off. See config.ts resolveWebAccess.
2392
+ * Attach Claude's `web_fetch` to this turn. A per-call host value under the
2393
+ * same ceiling rule as the config option: the project's `web_access` setting
2394
+ * is the most a turn can have, and `false` here (or in the config) takes it
2395
+ * off. Omitted follows the config option and the project. See config.ts
2396
+ * resolveWebAccess.
2295
2397
  */
2296
2398
  webAccess?: boolean;
2297
2399
  };
@@ -2877,6 +2979,25 @@ interface ChatHost {
2877
2979
  * setting existed.
2878
2980
  */
2879
2981
  uploadAccessGroup?(storagePath: string): 'public' | 'authorized' | 'private' | undefined | Promise<'public' | 'authorized' | 'private' | undefined>;
2982
+ /**
2983
+ * "Has the signed-in user already uploaded this file to this project?" Asked
2984
+ * BEFORE a member's bytes go up, only while the skip-duplicates switch resolves
2985
+ * on (config.ts resolveSkipDuplicateFiles: the project's `skip_duplicate_files`
2986
+ * setting, on by default, restricted by the host's `skipDuplicateFiles: false`).
2987
+ * `file.name` is the name as STORED (the last segment of the storage path the
2988
+ * host itself produced), `file.size` the byte count. A match means the member
2989
+ * is neither uploaded nor indexed: the turn takes the stored copy's url and
2990
+ * the chip says so. Null, a rejection or a missing hook all mean "upload as
2991
+ * usual"; the engine's findDuplicateUpload is the ready-made implementation.
2992
+ */
2993
+ findDuplicateUpload?(file: {
2994
+ name: string;
2995
+ size: number;
2996
+ }): Promise<{
2997
+ storagePath: string;
2998
+ } | null> | {
2999
+ storagePath: string;
3000
+ } | null;
2880
3001
  /** Map a relative path to the consumer's db storage key (e.g. uid-prefixed). */
2881
3002
  storagePathFor(relPath: string): string;
2882
3003
  getMimeType(name: string): string | null;
@@ -3934,6 +4055,17 @@ declare class ChatSession {
3934
4055
  /** Files this client has an index dispatch in flight for, by scoped path ->
3935
4056
  * wall clock. See claimIndexRun. */
3936
4057
  private _indexClaims;
4058
+ /** bgTaskQueue by the SAME scoped path the claims use -> how many entries
4059
+ * name that file. Derived from the array, never written to directly: see
4060
+ * _bgQueueIndex for when it is rebuilt and why that is exact. */
4061
+ private _bgQueueByFile;
4062
+ /** What _bgQueueByFile was built from: the array itself, its length and its
4063
+ * first and last entries. Equal stamp = equal contents (see _bgQueueIndex). */
4064
+ private _bgQueueStamp;
4065
+ /** How many times the index was rebuilt. Diagnostics and tests only: a
4066
+ * 3,000-file batch should build it a few thousand times at most (once per
4067
+ * push or settle), never once per claim. */
4068
+ _bgQueueIndexRebuilds: number;
3937
4069
  constructor(host: ChatHost);
3938
4070
  /** What the display layer needs to decide whether a run is finished. `keys` holds
3939
4071
  * every file the server still has indexing work for; `checked` is false until the
@@ -3975,6 +4107,27 @@ declare class ChatSession {
3975
4107
  /** Storage paths are project-relative, and one ChatSession serves every
3976
4108
  * project, so a claim has to be scoped the way a stop is (_indexKeyOf). */
3977
4109
  private _indexClaimKey;
4110
+ /**
4111
+ * bgTaskQueue as a map: scoped path (indexScopeKey(projectId, platform) +
4112
+ * '|' + storagePath, the key the claims and the stops use) -> entries.
4113
+ *
4114
+ * The array stays the source of truth because the engine does not own every
4115
+ * write to it: both hosts hand in their own array (the dashboard a Vue
4116
+ * reactive one it pushes to from the Files page and splices from its
4117
+ * fallback poller), and tests push to it directly. So the map is DERIVED, and
4118
+ * rebuilt when a cheap stamp says the array changed: its identity, its length,
4119
+ * its first and its last entry.
4120
+ *
4121
+ * Why that stamp is exact for this array: every write to bgTaskQueue is either
4122
+ * a push of a NEW entry object or a splice that removes one (nothing inserts
4123
+ * in the middle, replaces in place or re-pushes a removed entry). Under those
4124
+ * two operations, same length plus same last entry means the same contents:
4125
+ * a push changes the last entry unless that same push is removed again, and a
4126
+ * removal changes the length unless a push restores it, which changes the
4127
+ * last entry. The first entry is in the stamp as margin. A rebuild is one
4128
+ * pass over the array, paid once per change instead of once per claim.
4129
+ */
4130
+ private _bgQueueIndex;
3978
4131
  /**
3979
4132
  * Take this file's indexing slot, or report that someone already has it.
3980
4133
  *
@@ -5022,6 +5175,7 @@ type ProjectSettingsData = {
5022
5175
  upload_access_group?: unknown;
5023
5176
  chat_greeting?: unknown;
5024
5177
  web_access?: unknown;
5178
+ skip_duplicate_files?: unknown;
5025
5179
  [key: string]: unknown;
5026
5180
  };
5027
5181
  /**
@@ -5034,18 +5188,42 @@ type ProjectSettingsData = {
5034
5188
  * database alone. Only the literal `true` turns it on: this record is public and
5035
5189
  * a client must never read a value it did not write as permission.
5036
5190
  *
5037
- * Resolution order, applied by the engine where the chat request is built:
5038
- * 1. the host's `webAccess` init/config option, when it is a boolean;
5039
- * 2. this setting, when the project has set it;
5040
- * 3. off.
5041
- * Indexing requests are not governed by this: an indexing pass keeps the tools
5042
- * it has today (see requests.ts notifyAgentSaveAttachment).
5191
+ * Resolution, applied by the engine where the chat request is built (config.ts
5192
+ * resolveWebAccess): THIS SETTING IS THE CEILING and the host may only restrict.
5193
+ * effective = projectSetting && hostOption !== false
5194
+ * A host's `webAccess: false` turns a project that is on off for its own page;
5195
+ * a host's `true` on a project that is off has no effect, because the owner's
5196
+ * switch is the one that lets an answer out onto the web. Indexing requests are
5197
+ * not governed by this: an indexing pass keeps the tools it has today (see
5198
+ * requests.ts notifyAgentSaveAttachment).
5043
5199
  */
5044
5200
  declare const DEFAULT_WEB_ACCESS = false;
5045
5201
  /** Narrow a stored value to the switch: only `true` is on. */
5046
5202
  declare function normalizeWebAccess(value: any): boolean;
5047
5203
  /** The switch held in a settings-record `data`, false when unset. */
5048
5204
  declare function webAccessFrom(data: ProjectSettingsData | null | undefined): boolean;
5205
+ /**
5206
+ * Whether an upload that is byte-for-byte the SAME FILE the signed-in user
5207
+ * already has in this project (same name, same size, same uploader) is skipped:
5208
+ * not uploaded again and not indexed again, with the chat turn using the stored
5209
+ * copy. Same record, its own `skip_duplicate_files` key.
5210
+ *
5211
+ * ON BY DEFAULT: a second copy of a file costs a second indexing run, which is
5212
+ * the single most expensive thing a project does, and answers from two copies
5213
+ * of one document double every row. Only the literal `false` turns it off: this
5214
+ * record is public and a client must never read a value it did not write.
5215
+ *
5216
+ * Resolution is the same ceiling rule as `web_access` (config.ts
5217
+ * resolveSkipDuplicateFiles): effective = projectSetting && hostOption !== false.
5218
+ * The host's `skipDuplicateFiles: false` lets its page re-upload duplicates on
5219
+ * a project that skips them; a host's `true` on a project that turned it off has
5220
+ * no effect.
5221
+ */
5222
+ declare const DEFAULT_SKIP_DUPLICATE_FILES = true;
5223
+ /** Narrow a stored value to the switch: only the literal `false` is off. */
5224
+ declare function normalizeSkipDuplicateFiles(value: any): boolean;
5225
+ /** The switch held in a settings-record `data`, true when unset. */
5226
+ declare function skipDuplicateFilesFrom(data: ProjectSettingsData | null | undefined): boolean;
5049
5227
  /**
5050
5228
  * Longest custom opening line the dashboard will store.
5051
5229
  *
@@ -5148,6 +5326,12 @@ declare function projectChatGreeting(service: string): string;
5148
5326
  * reads the stored value rather than the cold-cache default.
5149
5327
  */
5150
5328
  declare function projectWebAccess(service: string): boolean;
5329
+ /**
5330
+ * Sync convenience: the project's skip-duplicates setting, true until the fetch
5331
+ * settles or when the project never set it. The upload path prefers the
5332
+ * awaiting form (config.ts resolveSkipDuplicateFiles).
5333
+ */
5334
+ declare function projectSkipDuplicateFiles(service: string): boolean;
5151
5335
  /**
5152
5336
  * Adopt a value the caller just WROTE, so the settings page reflects its own
5153
5337
  * save without a re-fetch.
@@ -5168,4 +5352,4 @@ declare function patchProjectSettings(service: string, patch: ProjectSettingsDat
5168
5352
  */
5169
5353
  declare function clearProjectSettings(service?: string): void;
5170
5354
 
5171
- export { type AiAgentPlatform, type AnchorBoxEl, type AnchorRowEl, type AttachmentFailureGroup, type AttachmentParser, type AttachmentSaveInfo, BG_INDEXING_QUEUE_SUFFIX, BOM, BOM_EXTS, type BgTaskEntry, type BoundedChatOptions, type BuildDisplayListOptions, type BuildIndexingUserMessageOptions, CHAT_GREETING_MAX_LENGTH, CLAUDE_INPUT_CAP_RATIO, CLAUDE_PER_REQUEST_INPUT_CAP, CONTEXT_WINDOW_BY_MODEL, CONTEXT_WINDOW_DEFAULT, type CallClaudeWithMcpParams, type ChatEngineConfig, type ChatGreetingParams, type ChatGreetingParts, type ChatHost, type ChatIdentity, type ChatMessage, ChatSession, type ChatState, type ChatStreamWiring, type ChatSystemPromptParams, type Citation, type CitationLinkPart, type ClaudeMcpServerRequest, type ClaudeMcpToolConfig, type ClaudeMessage, type ClaudeRole, type ComposedUserMessage, DATA_TOOL_NAMES, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, type DisplayEntry, EMPTY_INDEXING_REPLY, EXPIRED_ATTACHMENT_URL_HOST, EXPIRED_ATTACHMENT_URL_ORIGIN, EXPIRED_LINK_REFRESH_EXPIRES_SECONDS, EXT_CONTENT_TYPES, type EncodingClass, type ExtractDirective, type FillHistoryViewportOptions, 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, type ImagePreviewContext, type IndexRunPatch, type IndexRunStatus, type IndexingAttachmentInfo, type IndexingFileRef, type IndexingGroup, type IndexingGroupStatus, type IndexingRequestRef, type IndexingSystemPromptParams, type InlineLinkContext, type InlineLinkMarkupOptions, type InlineLinkPart, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, type LiveStreamUpdate, 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, type MapHistoryOptions, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, type OpenAIMessage, 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, type ParsedAiAgent, type PinnedDispatchContext, type PreviewImageEl, type ProjectAccessSetting, type ProjectSettingsData, type ProjectSettingsReader, 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, type RenderableInlineLink, type RescueDecisionContext, type RetrievalHit, type RetrievalNote, type RowAnchor, type RunStubInfo, STREAM_POLL_INTERVAL, type ScrollAnchor, type ScrollAnchorOptions, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StreamDispatchContext, TOOL_AND_RESPONSE_BUFFER, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, type UploadAccessGroup, type VisionProfile, 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 };
5355
+ export { type AiAgentPlatform, type AnchorBoxEl, type AnchorRowEl, type AttachmentFailureGroup, type AttachmentParser, type AttachmentSaveInfo, BG_INDEXING_QUEUE_SUFFIX, BOM, BOM_EXTS, type BgTaskEntry, type BoundedChatOptions, type BuildDisplayListOptions, type BuildIndexingUserMessageOptions, CHAT_GREETING_MAX_LENGTH, CLAUDE_INPUT_CAP_RATIO, CLAUDE_PER_REQUEST_INPUT_CAP, CONTEXT_WINDOW_BY_MODEL, CONTEXT_WINDOW_DEFAULT, type CallClaudeWithMcpParams, type ChatEngineConfig, type ChatGreetingParams, type ChatGreetingParts, type ChatHost, type ChatIdentity, type ChatMessage, ChatSession, type ChatState, type ChatStreamWiring, type ChatSystemPromptParams, type Citation, type CitationLinkPart, type ClaudeMcpServerRequest, type ClaudeMcpToolConfig, type ClaudeMessage, type ClaudeRole, type ComposedUserMessage, 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, type DisplayEntry, type DuplicateUploadFile, type DuplicateUploadMatch, EMPTY_INDEXING_REPLY, EXPIRED_ATTACHMENT_URL_HOST, EXPIRED_ATTACHMENT_URL_ORIGIN, EXPIRED_LINK_REFRESH_EXPIRES_SECONDS, EXT_CONTENT_TYPES, type EncodingClass, type ExtractDirective, type FillHistoryViewportOptions, 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, type ImagePreviewContext, type IndexRunPatch, type IndexRunStatus, type IndexingAttachmentInfo, type IndexingFileRef, type IndexingGroup, type IndexingGroupStatus, type IndexingRequestRef, type IndexingSystemPromptParams, type InlineLinkContext, type InlineLinkMarkupOptions, type InlineLinkPart, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, type LiveStreamUpdate, 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, type MapHistoryOptions, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, type OpenAIMessage, 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, type ParsedAiAgent, type PinnedDispatchContext, type PreviewImageEl, type ProjectAccessSetting, type ProjectSettingsData, type ProjectSettingsReader, 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, type RenderableInlineLink, type RescueDecisionContext, type RetrievalHit, type RetrievalNote, type RowAnchor, type RunStubInfo, STREAM_POLL_INTERVAL, type ScrollAnchor, type ScrollAnchorOptions, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StreamDispatchContext, TOOL_AND_RESPONSE_BUFFER, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, type UploadAccessGroup, type VisionProfile, 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 };