bunnyquery 1.19.2 → 1.20.0
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 +25 -4
- package/bunnyquery.css +21 -0
- package/bunnyquery.js +316 -44
- package/dist/engine.cjs +286 -39
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.mts +96 -1
- package/dist/engine.d.ts +96 -1
- package/dist/engine.mjs +285 -40
- package/dist/engine.mjs.map +1 -1
- package/package.json +1 -1
- package/src/engine/config.ts +36 -0
- package/src/engine/index.ts +4 -0
- package/src/engine/prompts/chat_system_prompt.ts +36 -41
- package/src/engine/prompts/indexing_system_prompt.ts +5 -5
- package/src/engine/prompts/indexing_user_message.ts +3 -3
- package/src/engine/requests.ts +8 -2
- package/src/engine/session.ts +268 -10
- package/styles/chat.css +21 -0
package/dist/engine.d.mts
CHANGED
|
@@ -682,6 +682,27 @@ interface ChatEngineConfig {
|
|
|
682
682
|
* `liveStreamingRealtime`; that name is now ignored.
|
|
683
683
|
*/
|
|
684
684
|
liveStreaming?: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Request STATUS PUSH over skapi's websocket (skapi-js 2.5.0 or newer, plus the
|
|
687
|
+
* backend that knows `notify`). Indexing passes are dispatched with `notify: true`,
|
|
688
|
+
* their polls then read the row once a minute instead of every few seconds while
|
|
689
|
+
* status frames are arriving, and read it at once when a frame names them. The
|
|
690
|
+
* engine also listens with `onRequestStatus` while a chat view is open: a frame for
|
|
691
|
+
* a pass it holds nothing for picks that pass up, and a (re)connected socket runs
|
|
692
|
+
* the return catch-up (ChatSession.catchUpHistory), since frames sent while it was
|
|
693
|
+
* down are lost.
|
|
694
|
+
*
|
|
695
|
+
* Off by default for the same reason as `liveStreaming`: it keeps a websocket open
|
|
696
|
+
* on the host's skapi instance. The dashboard owns its instance and opts in; the
|
|
697
|
+
* widget leaves it to the embedder. Needs `onRequestStatus` below too: without it,
|
|
698
|
+
* or on an older skapi-js, nothing changes. Every frame is a hint: polls and
|
|
699
|
+
* listings still decide every status on screen.
|
|
700
|
+
*/
|
|
701
|
+
statusPush?: boolean;
|
|
702
|
+
/** skapi.onRequestStatus, bound to the consumer's skapi instance (skapi-js 2.5.0+). */
|
|
703
|
+
onRequestStatus?: (callback: (event: any) => void) => () => void;
|
|
704
|
+
/** skapi.isRequestStatusLive, bound to the consumer's skapi instance (skapi-js 2.5.0+). */
|
|
705
|
+
isRequestStatusLive?: () => boolean;
|
|
685
706
|
/**
|
|
686
707
|
* Whether a CHAT answer may reach the open web: Claude's `web_fetch` and
|
|
687
708
|
* OpenAI's `web_search` are attached to a chat request only when this
|
|
@@ -829,6 +850,12 @@ interface ChatEngineConfig {
|
|
|
829
850
|
}
|
|
830
851
|
declare function configureChatEngine(config: ChatEngineConfig): void;
|
|
831
852
|
declare function chatEngineConfig(): ChatEngineConfig;
|
|
853
|
+
/** True when the consumer has opted in to live streaming of chat turns. */
|
|
854
|
+
/** Socket delivery of the stream: the host asked (`liveStreaming`) AND the turn streams. */
|
|
855
|
+
/** Request status push is on: the host asked for it and handed over onRequestStatus. */
|
|
856
|
+
declare function statusPushEnabled(): boolean;
|
|
857
|
+
/** Status frames are arriving right now (false when status push is off). */
|
|
858
|
+
declare function statusPushLive(): boolean;
|
|
832
859
|
/**
|
|
833
860
|
* The web switch for a chat turn, SYNCHRONOUSLY: the project's cached
|
|
834
861
|
* `web_access` setting (off unless the owner turned it on), restricted by the
|
|
@@ -2971,6 +2998,7 @@ type BgTaskEntry = {
|
|
|
2971
2998
|
status: 'running' | 'pending';
|
|
2972
2999
|
poll: ((opts: {
|
|
2973
3000
|
latency: number;
|
|
3001
|
+
notify?: boolean;
|
|
2974
3002
|
onResponse?: (res: any, meta?: {
|
|
2975
3003
|
executed?: number;
|
|
2976
3004
|
}) => void;
|
|
@@ -4531,6 +4559,9 @@ declare class ChatSession {
|
|
|
4531
4559
|
* settleDeadStagedMessages). Today the cache dies with the page too and every
|
|
4532
4560
|
* restored stage is live; this stays correct if that ever changes. */
|
|
4533
4561
|
private _liveStages;
|
|
4562
|
+
/** Answers whose "Wrong answer?" was already sent, by server id (else local id),
|
|
4563
|
+
* so a history refetch that rebuilds the bubble does not offer it again. */
|
|
4564
|
+
private _wrongReported;
|
|
4534
4565
|
/** Files the SERVER currently has unresolved indexing work for, by the same key
|
|
4535
4566
|
* a collapsed row uses (storage path, else filename), and whether we have asked
|
|
4536
4567
|
* even once for this chat.
|
|
@@ -5359,6 +5390,31 @@ declare class ChatSession {
|
|
|
5359
5390
|
onQueuedSendResponse(_composed: string, response: any, platform: string, serverId?: string, ownerKey?: string): void;
|
|
5360
5391
|
onQueuedSendError(_composed: string, err: any, serverId?: string, ownerKey?: string): void;
|
|
5361
5392
|
cancelQueuedMessage(msg: ChatMessage, idx: number): void;
|
|
5393
|
+
/** The button's label and the message it sends, read off the session so the
|
|
5394
|
+
* clients need no extra import. */
|
|
5395
|
+
readonly wrongAnswerLabel: string;
|
|
5396
|
+
readonly wrongAnswerMessage: string;
|
|
5397
|
+
/**
|
|
5398
|
+
* Does this bubble get the "Wrong answer?" button: the free function's gate,
|
|
5399
|
+
* and only on the latest answer, because the message it sends names no answer
|
|
5400
|
+
* and the model reads it right after the last one. An answer already reported
|
|
5401
|
+
* keeps its (disabled) button after the complaint turn lands below it.
|
|
5402
|
+
*/
|
|
5403
|
+
canReportWrongAnswer(msg: ChatMessage): boolean;
|
|
5404
|
+
/** True when no chat turn follows `msg` in state.messages. Indexing rows and
|
|
5405
|
+
* cancelled turns do not count (neither reaches the model's history). Matched
|
|
5406
|
+
* by identity or by item id, since agent.vue hands in reactive proxies. */
|
|
5407
|
+
private _isLatestAnswer;
|
|
5408
|
+
/** True once this answer's "Wrong answer?" was sent (one click per answer). */
|
|
5409
|
+
wrongAnswerReported(msg: ChatMessage): boolean;
|
|
5410
|
+
/**
|
|
5411
|
+
* The "Wrong answer?" button: sends WRONG_ANSWER_MESSAGE as an ordinary visible
|
|
5412
|
+
* user turn through dispatchComposedMessage, so it reads the same after a reload
|
|
5413
|
+
* and both clients behave alike. The answer is marked first, so the button goes
|
|
5414
|
+
* disabled at once. False when the bubble does not qualify or was already used.
|
|
5415
|
+
* `pinned` is the caller's usual pinned identity and prompt (agent.vue pins them).
|
|
5416
|
+
*/
|
|
5417
|
+
reportWrongAnswer(msg: ChatMessage, pinned?: PinnedDispatchContext): boolean;
|
|
5362
5418
|
/**
|
|
5363
5419
|
* Stop waiting for the reply to the chat turn that is running now, and move on.
|
|
5364
5420
|
*
|
|
@@ -5597,6 +5653,45 @@ declare class ChatSession {
|
|
|
5597
5653
|
/** Start the ADOPT_TICK_MS follow-up if this page is tracking live indexing work and
|
|
5598
5654
|
* is visible. Idempotent; each tick re-checks and stops when the work is gone, the tab
|
|
5599
5655
|
* is hidden (resume restarts it through refreshLiveIndexState) or the view closed. */
|
|
5656
|
+
private _catchUpAt;
|
|
5657
|
+
private _catchUpTimer;
|
|
5658
|
+
private _returnWatchTimer;
|
|
5659
|
+
private _returnWatchAt;
|
|
5660
|
+
private _returnListeners;
|
|
5661
|
+
private _statusUnsub;
|
|
5662
|
+
private _statusNudgeTimer;
|
|
5663
|
+
private _statusNudgeAt;
|
|
5664
|
+
private _statusSeenConnect;
|
|
5665
|
+
/**
|
|
5666
|
+
* Re-read the chat from the server now (see the rule above). Safe to call from any
|
|
5667
|
+
* number of triggers at once: calls within CATCH_UP_MIN_GAP_MS of the last one run
|
|
5668
|
+
* once, at the end of the gap. Nothing happens while no chat view is mounted (the
|
|
5669
|
+
* mount loads the chat anyway) or while background polling is paused (the tab is
|
|
5670
|
+
* hidden: showing it calls this again).
|
|
5671
|
+
*/
|
|
5672
|
+
catchUpHistory(): Promise<void>;
|
|
5673
|
+
/**
|
|
5674
|
+
* Watch for the moments the user comes back without the tab being hidden first: the
|
|
5675
|
+
* computer waking from sleep (the timer finds a gap far longer than its interval),
|
|
5676
|
+
* the network coming back, a page restored from the back-forward cache. Also starts
|
|
5677
|
+
* the status push listener. Runs while a chat view is mounted and stops itself when
|
|
5678
|
+
* none is.
|
|
5679
|
+
*/
|
|
5680
|
+
private _ensureReturnWatch;
|
|
5681
|
+
/** Listen to request status frames while a chat view is mounted (statusPush on). */
|
|
5682
|
+
private _startStatusPush;
|
|
5683
|
+
private _stopStatusPush;
|
|
5684
|
+
/**
|
|
5685
|
+
* One status frame event. 'connected' (first connection, and every reconnect after a
|
|
5686
|
+
* drop, a sleep or the planned renewal) catches up, because frames sent while the
|
|
5687
|
+
* socket was down are lost. A status change of an indexing pass this page does not
|
|
5688
|
+
* poll runs the queue check now instead of at its next heartbeat; a pass that IS polled
|
|
5689
|
+
* was already woken by skapi-js itself. Chat turns are left to their own polls.
|
|
5690
|
+
*/
|
|
5691
|
+
private _onRequestStatus;
|
|
5692
|
+
/** Run the queue check (adopt, settle by listing, page progress) now, at most once per
|
|
5693
|
+
* STATUS_NUDGE_MIN_GAP_MS, then let the heartbeat carry on. */
|
|
5694
|
+
private _nudgeQueueCheck;
|
|
5600
5695
|
private _ensureAdoptTick;
|
|
5601
5696
|
/** The last COMPLETE running+pending look at this user's bg queue: which pass ids were
|
|
5602
5697
|
* live. Complete means both lists came back shorter than their limit, so a tracked pass
|
|
@@ -5758,4 +5853,4 @@ declare class ChatSession {
|
|
|
5758
5853
|
bumpGate(): void;
|
|
5759
5854
|
}
|
|
5760
5855
|
|
|
5761
|
-
export { ANSWER_MODES, ANSWER_MODE_HINTS, ANSWER_MODE_LABELS, ANSWER_MODE_OPTIONS, ANSWER_MODE_SETTING_LABEL, type AiAgentPlatform, type AnchorBoxEl, type AnchorRowEl, type AnswerMode, 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 ChatTurnContext, type Citation, type CitationLinkPart, type ClaudeMcpServerRequest, type ClaudeMcpToolConfig, type ClaudeMessage, type ClaudeRole, type ComposedUserMessage, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_LIMIT, DUPLICATE_LOOKUP_MAX_CANDIDATES, DUPLICATE_LOOKUP_TIMEOUT_MS, 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, FINDINGS_TABLE, FINDING_ID_PREFIX, 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 IndexResetResult, 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 SearchFinding, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StoredCopyIndexing, 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, answerModeFrom, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEffortFields, 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, keyWords as findingKeyWords, findingsForTurn, 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, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, providerBodyWasRead, readExpiredAttachmentHref, readyProjectSettings, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, resetFileIndexOnServer, resolveAnswerMode, 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 };
|
|
5856
|
+
export { ANSWER_MODES, ANSWER_MODE_HINTS, ANSWER_MODE_LABELS, ANSWER_MODE_OPTIONS, ANSWER_MODE_SETTING_LABEL, type AiAgentPlatform, type AnchorBoxEl, type AnchorRowEl, type AnswerMode, 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 ChatTurnContext, type Citation, type CitationLinkPart, type ClaudeMcpServerRequest, type ClaudeMcpToolConfig, type ClaudeMessage, type ClaudeRole, type ComposedUserMessage, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_LIMIT, DUPLICATE_LOOKUP_MAX_CANDIDATES, DUPLICATE_LOOKUP_TIMEOUT_MS, 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, FINDINGS_TABLE, FINDING_ID_PREFIX, 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 IndexResetResult, 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 SearchFinding, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StoredCopyIndexing, 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, answerModeFrom, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEffortFields, 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, keyWords as findingKeyWords, findingsForTurn, 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, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, providerBodyWasRead, readExpiredAttachmentHref, readyProjectSettings, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, resetFileIndexOnServer, resolveAnswerMode, resolveImagePreviewUrl, resolveSkipDuplicateFiles, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, shouldRescueInFlightMessage, skapiSupportsStreaming, skipDuplicateFilesEnabled, skipDuplicateFilesFrom, statusPushEnabled, statusPushLive, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
|
package/dist/engine.d.ts
CHANGED
|
@@ -682,6 +682,27 @@ interface ChatEngineConfig {
|
|
|
682
682
|
* `liveStreamingRealtime`; that name is now ignored.
|
|
683
683
|
*/
|
|
684
684
|
liveStreaming?: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Request STATUS PUSH over skapi's websocket (skapi-js 2.5.0 or newer, plus the
|
|
687
|
+
* backend that knows `notify`). Indexing passes are dispatched with `notify: true`,
|
|
688
|
+
* their polls then read the row once a minute instead of every few seconds while
|
|
689
|
+
* status frames are arriving, and read it at once when a frame names them. The
|
|
690
|
+
* engine also listens with `onRequestStatus` while a chat view is open: a frame for
|
|
691
|
+
* a pass it holds nothing for picks that pass up, and a (re)connected socket runs
|
|
692
|
+
* the return catch-up (ChatSession.catchUpHistory), since frames sent while it was
|
|
693
|
+
* down are lost.
|
|
694
|
+
*
|
|
695
|
+
* Off by default for the same reason as `liveStreaming`: it keeps a websocket open
|
|
696
|
+
* on the host's skapi instance. The dashboard owns its instance and opts in; the
|
|
697
|
+
* widget leaves it to the embedder. Needs `onRequestStatus` below too: without it,
|
|
698
|
+
* or on an older skapi-js, nothing changes. Every frame is a hint: polls and
|
|
699
|
+
* listings still decide every status on screen.
|
|
700
|
+
*/
|
|
701
|
+
statusPush?: boolean;
|
|
702
|
+
/** skapi.onRequestStatus, bound to the consumer's skapi instance (skapi-js 2.5.0+). */
|
|
703
|
+
onRequestStatus?: (callback: (event: any) => void) => () => void;
|
|
704
|
+
/** skapi.isRequestStatusLive, bound to the consumer's skapi instance (skapi-js 2.5.0+). */
|
|
705
|
+
isRequestStatusLive?: () => boolean;
|
|
685
706
|
/**
|
|
686
707
|
* Whether a CHAT answer may reach the open web: Claude's `web_fetch` and
|
|
687
708
|
* OpenAI's `web_search` are attached to a chat request only when this
|
|
@@ -829,6 +850,12 @@ interface ChatEngineConfig {
|
|
|
829
850
|
}
|
|
830
851
|
declare function configureChatEngine(config: ChatEngineConfig): void;
|
|
831
852
|
declare function chatEngineConfig(): ChatEngineConfig;
|
|
853
|
+
/** True when the consumer has opted in to live streaming of chat turns. */
|
|
854
|
+
/** Socket delivery of the stream: the host asked (`liveStreaming`) AND the turn streams. */
|
|
855
|
+
/** Request status push is on: the host asked for it and handed over onRequestStatus. */
|
|
856
|
+
declare function statusPushEnabled(): boolean;
|
|
857
|
+
/** Status frames are arriving right now (false when status push is off). */
|
|
858
|
+
declare function statusPushLive(): boolean;
|
|
832
859
|
/**
|
|
833
860
|
* The web switch for a chat turn, SYNCHRONOUSLY: the project's cached
|
|
834
861
|
* `web_access` setting (off unless the owner turned it on), restricted by the
|
|
@@ -2971,6 +2998,7 @@ type BgTaskEntry = {
|
|
|
2971
2998
|
status: 'running' | 'pending';
|
|
2972
2999
|
poll: ((opts: {
|
|
2973
3000
|
latency: number;
|
|
3001
|
+
notify?: boolean;
|
|
2974
3002
|
onResponse?: (res: any, meta?: {
|
|
2975
3003
|
executed?: number;
|
|
2976
3004
|
}) => void;
|
|
@@ -4531,6 +4559,9 @@ declare class ChatSession {
|
|
|
4531
4559
|
* settleDeadStagedMessages). Today the cache dies with the page too and every
|
|
4532
4560
|
* restored stage is live; this stays correct if that ever changes. */
|
|
4533
4561
|
private _liveStages;
|
|
4562
|
+
/** Answers whose "Wrong answer?" was already sent, by server id (else local id),
|
|
4563
|
+
* so a history refetch that rebuilds the bubble does not offer it again. */
|
|
4564
|
+
private _wrongReported;
|
|
4534
4565
|
/** Files the SERVER currently has unresolved indexing work for, by the same key
|
|
4535
4566
|
* a collapsed row uses (storage path, else filename), and whether we have asked
|
|
4536
4567
|
* even once for this chat.
|
|
@@ -5359,6 +5390,31 @@ declare class ChatSession {
|
|
|
5359
5390
|
onQueuedSendResponse(_composed: string, response: any, platform: string, serverId?: string, ownerKey?: string): void;
|
|
5360
5391
|
onQueuedSendError(_composed: string, err: any, serverId?: string, ownerKey?: string): void;
|
|
5361
5392
|
cancelQueuedMessage(msg: ChatMessage, idx: number): void;
|
|
5393
|
+
/** The button's label and the message it sends, read off the session so the
|
|
5394
|
+
* clients need no extra import. */
|
|
5395
|
+
readonly wrongAnswerLabel: string;
|
|
5396
|
+
readonly wrongAnswerMessage: string;
|
|
5397
|
+
/**
|
|
5398
|
+
* Does this bubble get the "Wrong answer?" button: the free function's gate,
|
|
5399
|
+
* and only on the latest answer, because the message it sends names no answer
|
|
5400
|
+
* and the model reads it right after the last one. An answer already reported
|
|
5401
|
+
* keeps its (disabled) button after the complaint turn lands below it.
|
|
5402
|
+
*/
|
|
5403
|
+
canReportWrongAnswer(msg: ChatMessage): boolean;
|
|
5404
|
+
/** True when no chat turn follows `msg` in state.messages. Indexing rows and
|
|
5405
|
+
* cancelled turns do not count (neither reaches the model's history). Matched
|
|
5406
|
+
* by identity or by item id, since agent.vue hands in reactive proxies. */
|
|
5407
|
+
private _isLatestAnswer;
|
|
5408
|
+
/** True once this answer's "Wrong answer?" was sent (one click per answer). */
|
|
5409
|
+
wrongAnswerReported(msg: ChatMessage): boolean;
|
|
5410
|
+
/**
|
|
5411
|
+
* The "Wrong answer?" button: sends WRONG_ANSWER_MESSAGE as an ordinary visible
|
|
5412
|
+
* user turn through dispatchComposedMessage, so it reads the same after a reload
|
|
5413
|
+
* and both clients behave alike. The answer is marked first, so the button goes
|
|
5414
|
+
* disabled at once. False when the bubble does not qualify or was already used.
|
|
5415
|
+
* `pinned` is the caller's usual pinned identity and prompt (agent.vue pins them).
|
|
5416
|
+
*/
|
|
5417
|
+
reportWrongAnswer(msg: ChatMessage, pinned?: PinnedDispatchContext): boolean;
|
|
5362
5418
|
/**
|
|
5363
5419
|
* Stop waiting for the reply to the chat turn that is running now, and move on.
|
|
5364
5420
|
*
|
|
@@ -5597,6 +5653,45 @@ declare class ChatSession {
|
|
|
5597
5653
|
/** Start the ADOPT_TICK_MS follow-up if this page is tracking live indexing work and
|
|
5598
5654
|
* is visible. Idempotent; each tick re-checks and stops when the work is gone, the tab
|
|
5599
5655
|
* is hidden (resume restarts it through refreshLiveIndexState) or the view closed. */
|
|
5656
|
+
private _catchUpAt;
|
|
5657
|
+
private _catchUpTimer;
|
|
5658
|
+
private _returnWatchTimer;
|
|
5659
|
+
private _returnWatchAt;
|
|
5660
|
+
private _returnListeners;
|
|
5661
|
+
private _statusUnsub;
|
|
5662
|
+
private _statusNudgeTimer;
|
|
5663
|
+
private _statusNudgeAt;
|
|
5664
|
+
private _statusSeenConnect;
|
|
5665
|
+
/**
|
|
5666
|
+
* Re-read the chat from the server now (see the rule above). Safe to call from any
|
|
5667
|
+
* number of triggers at once: calls within CATCH_UP_MIN_GAP_MS of the last one run
|
|
5668
|
+
* once, at the end of the gap. Nothing happens while no chat view is mounted (the
|
|
5669
|
+
* mount loads the chat anyway) or while background polling is paused (the tab is
|
|
5670
|
+
* hidden: showing it calls this again).
|
|
5671
|
+
*/
|
|
5672
|
+
catchUpHistory(): Promise<void>;
|
|
5673
|
+
/**
|
|
5674
|
+
* Watch for the moments the user comes back without the tab being hidden first: the
|
|
5675
|
+
* computer waking from sleep (the timer finds a gap far longer than its interval),
|
|
5676
|
+
* the network coming back, a page restored from the back-forward cache. Also starts
|
|
5677
|
+
* the status push listener. Runs while a chat view is mounted and stops itself when
|
|
5678
|
+
* none is.
|
|
5679
|
+
*/
|
|
5680
|
+
private _ensureReturnWatch;
|
|
5681
|
+
/** Listen to request status frames while a chat view is mounted (statusPush on). */
|
|
5682
|
+
private _startStatusPush;
|
|
5683
|
+
private _stopStatusPush;
|
|
5684
|
+
/**
|
|
5685
|
+
* One status frame event. 'connected' (first connection, and every reconnect after a
|
|
5686
|
+
* drop, a sleep or the planned renewal) catches up, because frames sent while the
|
|
5687
|
+
* socket was down are lost. A status change of an indexing pass this page does not
|
|
5688
|
+
* poll runs the queue check now instead of at its next heartbeat; a pass that IS polled
|
|
5689
|
+
* was already woken by skapi-js itself. Chat turns are left to their own polls.
|
|
5690
|
+
*/
|
|
5691
|
+
private _onRequestStatus;
|
|
5692
|
+
/** Run the queue check (adopt, settle by listing, page progress) now, at most once per
|
|
5693
|
+
* STATUS_NUDGE_MIN_GAP_MS, then let the heartbeat carry on. */
|
|
5694
|
+
private _nudgeQueueCheck;
|
|
5600
5695
|
private _ensureAdoptTick;
|
|
5601
5696
|
/** The last COMPLETE running+pending look at this user's bg queue: which pass ids were
|
|
5602
5697
|
* live. Complete means both lists came back shorter than their limit, so a tracked pass
|
|
@@ -5758,4 +5853,4 @@ declare class ChatSession {
|
|
|
5758
5853
|
bumpGate(): void;
|
|
5759
5854
|
}
|
|
5760
5855
|
|
|
5761
|
-
export { ANSWER_MODES, ANSWER_MODE_HINTS, ANSWER_MODE_LABELS, ANSWER_MODE_OPTIONS, ANSWER_MODE_SETTING_LABEL, type AiAgentPlatform, type AnchorBoxEl, type AnchorRowEl, type AnswerMode, 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 ChatTurnContext, type Citation, type CitationLinkPart, type ClaudeMcpServerRequest, type ClaudeMcpToolConfig, type ClaudeMessage, type ClaudeRole, type ComposedUserMessage, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_LIMIT, DUPLICATE_LOOKUP_MAX_CANDIDATES, DUPLICATE_LOOKUP_TIMEOUT_MS, 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, FINDINGS_TABLE, FINDING_ID_PREFIX, 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 IndexResetResult, 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 SearchFinding, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StoredCopyIndexing, 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, answerModeFrom, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEffortFields, 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, keyWords as findingKeyWords, findingsForTurn, 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, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, providerBodyWasRead, readExpiredAttachmentHref, readyProjectSettings, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, resetFileIndexOnServer, resolveAnswerMode, 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 };
|
|
5856
|
+
export { ANSWER_MODES, ANSWER_MODE_HINTS, ANSWER_MODE_LABELS, ANSWER_MODE_OPTIONS, ANSWER_MODE_SETTING_LABEL, type AiAgentPlatform, type AnchorBoxEl, type AnchorRowEl, type AnswerMode, 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 ChatTurnContext, type Citation, type CitationLinkPart, type ClaudeMcpServerRequest, type ClaudeMcpToolConfig, type ClaudeMessage, type ClaudeRole, type ComposedUserMessage, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_LIMIT, DUPLICATE_LOOKUP_MAX_CANDIDATES, DUPLICATE_LOOKUP_TIMEOUT_MS, 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, FINDINGS_TABLE, FINDING_ID_PREFIX, 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 IndexResetResult, 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 SearchFinding, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StoredCopyIndexing, 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, answerModeFrom, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEffortFields, 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, keyWords as findingKeyWords, findingsForTurn, 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, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, providerBodyWasRead, readExpiredAttachmentHref, readyProjectSettings, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, resetFileIndexOnServer, resolveAnswerMode, resolveImagePreviewUrl, resolveSkipDuplicateFiles, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, shouldRescueInFlightMessage, skapiSupportsStreaming, skipDuplicateFilesEnabled, skipDuplicateFilesFrom, statusPushEnabled, statusPushLive, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
|