bunnyquery 1.21.7 → 1.21.13
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 +35 -1
- package/bunnyquery.js +347 -22
- package/dist/engine.cjs +449 -11
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.mts +280 -1
- package/dist/engine.d.ts +280 -1
- package/dist/engine.mjs +425 -12
- package/dist/engine.mjs.map +1 -1
- package/package.json +1 -1
- package/src/engine/host.ts +7 -0
- package/src/engine/identical.ts +448 -0
- package/src/engine/index.ts +41 -0
- package/src/engine/indexing_groups.ts +42 -1
- package/src/engine/office.ts +2 -0
- package/src/engine/project_settings.ts +37 -0
- package/src/engine/prompts/chat_system_prompt.ts +4 -2
- package/src/engine/requests.ts +38 -2
- package/src/engine/session.ts +74 -1
package/dist/engine.d.mts
CHANGED
|
@@ -130,6 +130,7 @@ type ProjectSettingsData = {
|
|
|
130
130
|
chat_greeting?: unknown;
|
|
131
131
|
web_access?: unknown;
|
|
132
132
|
skip_duplicate_files?: unknown;
|
|
133
|
+
share_identical_files?: unknown;
|
|
133
134
|
answer_mode?: unknown;
|
|
134
135
|
[key: string]: unknown;
|
|
135
136
|
};
|
|
@@ -179,6 +180,27 @@ declare const DEFAULT_SKIP_DUPLICATE_FILES = true;
|
|
|
179
180
|
declare function normalizeSkipDuplicateFiles(value: any): boolean;
|
|
180
181
|
/** The switch held in a settings-record `data`, true when unset. */
|
|
181
182
|
declare function skipDuplicateFilesFrom(data: ProjectSettingsData | null | undefined): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Whether files with the same CONTENT share one index (owner, 2026-11-26). Same record,
|
|
185
|
+
* its own `share_identical_files` key. Not the skip above, which is about one uploader's
|
|
186
|
+
* same-named file: this compares stored bytes, whoever uploaded them and whatever they are
|
|
187
|
+
* called. The first such file is indexed as usual (the original); every later one is
|
|
188
|
+
* LINKED to it on the server with no AI call (the MCP's content-dedup.js), and search,
|
|
189
|
+
* outlines and totals count the content once.
|
|
190
|
+
*
|
|
191
|
+
* ON BY DEFAULT, for the same reason as skip_duplicate_files: a second index of the same
|
|
192
|
+
* bytes costs a second AI run and doubles every row. Only the literal `false` turns it
|
|
193
|
+
* off. The clients send `share_identical: true` on a run's FIRST pass while it is on
|
|
194
|
+
* (requests.ts notifyAgentSaveAttachment), and the MCP reads this key again before it
|
|
195
|
+
* links anything, so a client holding an old copy of the settings cannot link against
|
|
196
|
+
* the owner's choice.
|
|
197
|
+
*/
|
|
198
|
+
declare const SHARE_IDENTICAL_FILES_KEY = "share_identical_files";
|
|
199
|
+
declare const DEFAULT_SHARE_IDENTICAL_FILES = true;
|
|
200
|
+
/** Narrow a stored value to the switch: only the literal `false` is off. */
|
|
201
|
+
declare function normalizeShareIdenticalFiles(value: any): boolean;
|
|
202
|
+
/** The switch held in a settings-record `data`, true when unset. */
|
|
203
|
+
declare function shareIdenticalFilesFrom(data: ProjectSettingsData | null | undefined): boolean;
|
|
182
204
|
/**
|
|
183
205
|
* How much the model thinks before a CHAT answer. Same record, its own
|
|
184
206
|
* `answer_mode` key. Optional, and absent on almost every project.
|
|
@@ -326,6 +348,11 @@ declare function projectWebAccess(service: string): boolean;
|
|
|
326
348
|
* awaiting form (config.ts resolveSkipDuplicateFiles).
|
|
327
349
|
*/
|
|
328
350
|
declare function projectSkipDuplicateFiles(service: string): boolean;
|
|
351
|
+
/**
|
|
352
|
+
* Sync convenience: the project's share-identical-files setting, true until the fetch
|
|
353
|
+
* settles or when the project never set it (the MCP checks the stored value again).
|
|
354
|
+
*/
|
|
355
|
+
declare function projectShareIdenticalFiles(service: string): boolean;
|
|
329
356
|
/**
|
|
330
357
|
* Sync convenience: the project's answer mode, 'standard' until the fetch
|
|
331
358
|
* settles or when the project never set it. The request builders use the
|
|
@@ -1142,6 +1169,8 @@ type FileUrlDirective = {
|
|
|
1142
1169
|
path: string;
|
|
1143
1170
|
/** The exact baked url string in the request body to replace with a fresh one. */
|
|
1144
1171
|
url: string;
|
|
1172
|
+
/** Indexing first pass only: link to an indexed file with the same bytes (see requests.ts). */
|
|
1173
|
+
share_identical?: boolean;
|
|
1145
1174
|
};
|
|
1146
1175
|
/**
|
|
1147
1176
|
* True when a file should be EXTRACTED SERVER-SIDE (text inlined for indexing)
|
|
@@ -3385,6 +3414,18 @@ interface ChatHost {
|
|
|
3385
3414
|
} | null> | {
|
|
3386
3415
|
storagePath: string;
|
|
3387
3416
|
} | null;
|
|
3417
|
+
/**
|
|
3418
|
+
* Optional. Every linked copy of the project, read fresh (one shared index for
|
|
3419
|
+
* identical files; the engine's listLinkedCopies is the ready-made implementation).
|
|
3420
|
+
* With it, an Overwrite of an ORIGINAL sends its copies again afterwards (the oldest
|
|
3421
|
+
* becomes the new original, the others link to it). Missing or null: nothing is sent.
|
|
3422
|
+
*/
|
|
3423
|
+
findLinkedCopies?(): Promise<Map<string, {
|
|
3424
|
+
original: string;
|
|
3425
|
+
claim?: string;
|
|
3426
|
+
linkedAt?: number;
|
|
3427
|
+
owner?: string | null;
|
|
3428
|
+
}> | null>;
|
|
3388
3429
|
/** Map a relative path to the consumer's db storage key (e.g. uid-prefixed). */
|
|
3389
3430
|
storagePathFor(relPath: string): string;
|
|
3390
3431
|
getMimeType(name: string): string | null;
|
|
@@ -3622,8 +3663,23 @@ type AttachmentSaveInfo = {
|
|
|
3622
3663
|
* as image blocks; the resume loop advances this by a window each pass.
|
|
3623
3664
|
*/
|
|
3624
3665
|
renderFrom?: number;
|
|
3666
|
+
/**
|
|
3667
|
+
* One shared index for identical files: whether this FIRST pass may be linked to an
|
|
3668
|
+
* already indexed file with the same bytes (the worker then runs no AI for it).
|
|
3669
|
+
* Omitted: the project's `share_identical_files` setting decides (on unless the owner
|
|
3670
|
+
* turned it off). `false` never asks. Never sent on a continue pass.
|
|
3671
|
+
*/
|
|
3672
|
+
shareIdentical?: boolean;
|
|
3625
3673
|
};
|
|
3626
3674
|
declare function notifyAgentSaveAttachment(info: AttachmentSaveInfo): Promise<any>;
|
|
3675
|
+
/**
|
|
3676
|
+
* A provider answer that arrives as its JSON TEXT, read as the document it is. The worker
|
|
3677
|
+
* stores the answer it writes itself (a linked copy's "Same content as ...", identical.ts
|
|
3678
|
+
* parseLinkedReply) as a JSON string, and a status read hands that body back unparsed, so
|
|
3679
|
+
* the live row read no text from it until a reload brought the server's response_text.
|
|
3680
|
+
* Anything else is handed back as it came.
|
|
3681
|
+
*/
|
|
3682
|
+
declare function providerDocument(response: any): any;
|
|
3627
3683
|
declare function extractClaudeText(response: any): any;
|
|
3628
3684
|
declare function extractOpenAIText(response: any): any;
|
|
3629
3685
|
declare function listClaudeModels(service: string, owner: string): Promise<any>;
|
|
@@ -4549,6 +4605,15 @@ type IndexingGroup = {
|
|
|
4549
4605
|
* it through indexGroupDurationLabel, which also holds it back from any row that is
|
|
4550
4606
|
* not a finished 'done'. */
|
|
4551
4607
|
durationMs?: number;
|
|
4608
|
+
/** This run LINKED the file to an already indexed file with the same content (one
|
|
4609
|
+
* shared index for identical files, identical.ts): no AI ran and the file has no
|
|
4610
|
+
* rows or pages of its own. `original` is the original's storage path when the run::
|
|
4611
|
+
* record named it, else the file name the linked pass's answer gave; `ms` how long
|
|
4612
|
+
* the link took. Read it through indexGroupLinkedLabel. */
|
|
4613
|
+
linked?: {
|
|
4614
|
+
original: string;
|
|
4615
|
+
ms?: number;
|
|
4616
|
+
};
|
|
4552
4617
|
};
|
|
4553
4618
|
type DisplayEntry = {
|
|
4554
4619
|
kind: 'message';
|
|
@@ -4651,6 +4716,13 @@ type RunStubInfo = {
|
|
|
4651
4716
|
/** Chat that owns this run. Absent on records minted before it was
|
|
4652
4717
|
* stamped; see BuildDisplayListOptions.stubPlatform. */
|
|
4653
4718
|
platform?: 'claude' | 'openai';
|
|
4719
|
+
/** The run linked the file to an identical file's index (identical.ts): the record's
|
|
4720
|
+
* `linked: true` and the original's storage path (`alias_of`). */
|
|
4721
|
+
linked?: boolean;
|
|
4722
|
+
alias_of?: string;
|
|
4723
|
+
/** How long the link itself took on the server (ms); the record's started..finished
|
|
4724
|
+
* span also holds the time the pass waited in the queue, so it is not used. */
|
|
4725
|
+
link_ms?: number;
|
|
4654
4726
|
};
|
|
4655
4727
|
/** A 'working' run record older than this with no live-queue confirmation is
|
|
4656
4728
|
* treated as unknown rather than live: a chain that died without reaching any
|
|
@@ -4678,6 +4750,12 @@ declare function runRecordDurationMs(rec?: {
|
|
|
4678
4750
|
* and the widget print the same text in the same place.
|
|
4679
4751
|
*/
|
|
4680
4752
|
declare function indexGroupDurationLabel(group?: IndexingGroup | null): string;
|
|
4753
|
+
/**
|
|
4754
|
+
* A linked copy's row line ("Same content as A.tif: linked in 0.4 s, no AI used"), or ''
|
|
4755
|
+
* for any other row. Shared so agent.vue and the widget print the same text in the same
|
|
4756
|
+
* place (they show it instead of the pass count and duration).
|
|
4757
|
+
*/
|
|
4758
|
+
declare function indexGroupLinkedLabel(group?: IndexingGroup | null): string;
|
|
4681
4759
|
declare function buildChatDisplayList(messages: ChatMessage[], opts?: BuildDisplayListOptions): DisplayEntry[];
|
|
4682
4760
|
|
|
4683
4761
|
/**
|
|
@@ -5178,6 +5256,30 @@ declare class ChatSession {
|
|
|
5178
5256
|
size?: number;
|
|
5179
5257
|
mime?: string;
|
|
5180
5258
|
}>): Promise<number>;
|
|
5259
|
+
/**
|
|
5260
|
+
* ONE SHARED INDEX FOR IDENTICAL FILES: the linked copies that lose their original when
|
|
5261
|
+
* `removed` files (or every file under `folders`) go away, per original, oldest first
|
|
5262
|
+
* (identical.ts copiesToPromote). Read through host.findLinkedCopies, fresh, and it has
|
|
5263
|
+
* to be read BEFORE the delete or reset: those remove nothing from the copies' markers,
|
|
5264
|
+
* but a later sweep could no longer tell whose copies they were once a new original
|
|
5265
|
+
* exists. Never rejects; [] without the hook or on any failure.
|
|
5266
|
+
*/
|
|
5267
|
+
collectLinkedCopies(removed: string[], folders?: string[]): Promise<{
|
|
5268
|
+
original: string;
|
|
5269
|
+
copies: string[];
|
|
5270
|
+
}[]>;
|
|
5271
|
+
/**
|
|
5272
|
+
* Send the copies of a removed or overwritten original again (owner decision
|
|
5273
|
+
* 2026-11-26): each list's oldest copy first, so its first pass claims the content and
|
|
5274
|
+
* is indexed for real (one AI run), then the others, which link to it with no AI call.
|
|
5275
|
+
* The share flag rides on every first pass while the project's switch is on (requests.ts
|
|
5276
|
+
* notifyAgentSaveAttachment). Through reindexStoredFiles, so each copy keeps its access
|
|
5277
|
+
* group and shows as a "Reindexing" row. Resolves to the number of files queued.
|
|
5278
|
+
*/
|
|
5279
|
+
promoteLinkedCopies(plan: {
|
|
5280
|
+
original: string;
|
|
5281
|
+
copies: string[];
|
|
5282
|
+
}[]): Promise<number>;
|
|
5181
5283
|
/**
|
|
5182
5284
|
* The same question, asked of the SERVER when this page cannot answer it.
|
|
5183
5285
|
*
|
|
@@ -6729,4 +6831,181 @@ declare class ChatSession {
|
|
|
6729
6831
|
bumpGate(): void;
|
|
6730
6832
|
}
|
|
6731
6833
|
|
|
6732
|
-
|
|
6834
|
+
/** Tag on every linked copy's done:: marker. */
|
|
6835
|
+
declare const LINKED_COPY_TAG = "bq_linked";
|
|
6836
|
+
/** unique_id prefix of the content claims. */
|
|
6837
|
+
declare const CONTENT_CLAIM_PREFIX = "cas::";
|
|
6838
|
+
/** What a linked copy's done:: (or run::) record says about its link. */
|
|
6839
|
+
type LinkedMarker = {
|
|
6840
|
+
/** Storage path of the original whose index this copy shares. */
|
|
6841
|
+
original: string;
|
|
6842
|
+
/** The claim id the link was made under ("cas::<scope>::<key>"), when recorded. */
|
|
6843
|
+
claim?: string;
|
|
6844
|
+
/** When the link was written (ms), when recorded. */
|
|
6845
|
+
linkedAt?: number;
|
|
6846
|
+
/** The copy's own access group, when recorded. */
|
|
6847
|
+
group?: string | number | null;
|
|
6848
|
+
/** The copy's uploader, when recorded. */
|
|
6849
|
+
owner?: string | null;
|
|
6850
|
+
/** The content key the copy was linked under, when recorded. */
|
|
6851
|
+
contentKey?: string;
|
|
6852
|
+
};
|
|
6853
|
+
/** The link a done:: or run:: record's `data` describes, or null when it is not a linked copy's. */
|
|
6854
|
+
declare function linkedMarkerOf(data: any): LinkedMarker | null;
|
|
6855
|
+
/** The last segment of a storage path. */
|
|
6856
|
+
declare function fileNameOf(path: string): string;
|
|
6857
|
+
type CopyStatusKind = 'linked' | 'waiting' | 'original_failed' | 'original_removed';
|
|
6858
|
+
type CopyStatus = {
|
|
6859
|
+
kind: CopyStatusKind;
|
|
6860
|
+
/** Storage path of the original. */
|
|
6861
|
+
original: string;
|
|
6862
|
+
/** The chip's text. */
|
|
6863
|
+
label: string;
|
|
6864
|
+
/** The chip's tooltip. */
|
|
6865
|
+
title: string;
|
|
6866
|
+
/** True for the two states in which the copy has no index anyone can search (red). */
|
|
6867
|
+
broken: boolean;
|
|
6868
|
+
};
|
|
6869
|
+
/** What the original's own markers say, for copyStatusOf. */
|
|
6870
|
+
type OriginalState = {
|
|
6871
|
+
/** The original has a done:: marker of its own (not a linked one). */
|
|
6872
|
+
done?: boolean;
|
|
6873
|
+
/** Its newest run:: record's status, when there is one. */
|
|
6874
|
+
run?: string;
|
|
6875
|
+
/** The content key its own done:: marker records (the MCP writes it when the original
|
|
6876
|
+
* finishes), when known. Different from the copy's: the original now holds other content. */
|
|
6877
|
+
contentKey?: string;
|
|
6878
|
+
};
|
|
6879
|
+
/**
|
|
6880
|
+
* A linked copy's status for the Files page and the widget:
|
|
6881
|
+
* 'original_removed' its claim id is not among the live claims (the original was deleted,
|
|
6882
|
+
* or reset and not indexed again), or the original has no markers left;
|
|
6883
|
+
* 'original_failed' the original's newest run ended in an error or was cancelled;
|
|
6884
|
+
* 'waiting' the original is still being indexed;
|
|
6885
|
+
* 'linked' the original is indexed: search and totals count the content once.
|
|
6886
|
+
* `liveClaims` is the set of live "cas::" ids (listContentClaims), or null when it could not
|
|
6887
|
+
* be read: then the claim is not used as evidence either way.
|
|
6888
|
+
*/
|
|
6889
|
+
declare function copyStatusOf(marker: LinkedMarker, original?: OriginalState | null, liveClaims?: Set<string> | null): CopyStatus;
|
|
6890
|
+
/** "1 copy" / "3 copies": the chip on an original. */
|
|
6891
|
+
declare function copyCountLabel(n: number): string;
|
|
6892
|
+
/** The tooltip of an original's copy chip, naming the copies. */
|
|
6893
|
+
declare function copyCountTitle(copies: string[]): string;
|
|
6894
|
+
/** Copies per original, oldest link first: Map(original path -> copy paths). */
|
|
6895
|
+
declare function copiesByOriginal(linked: Map<string, LinkedMarker> | {
|
|
6896
|
+
[path: string]: LinkedMarker;
|
|
6897
|
+
}): Map<string, string[]>;
|
|
6898
|
+
/**
|
|
6899
|
+
* A short duration for a link ("0.4 s", "1.9 s", "12 s", then formatIndexDuration's words).
|
|
6900
|
+
* A link takes about a second, so the whole-second helper would print nothing for it.
|
|
6901
|
+
*/
|
|
6902
|
+
declare function formatLinkDuration(ms?: number): string;
|
|
6903
|
+
/** The chat indexing row's line for a linked copy: "Same content as A: linked in 0.4 s, no AI used". */
|
|
6904
|
+
declare function linkedRowLabel(original: string, ms?: number): string;
|
|
6905
|
+
/**
|
|
6906
|
+
* A linked pass's answer, as the worker writes it ("[skapi] Same content as "A.tif": linked
|
|
6907
|
+
* to its index in 1.9 s, no AI used. ..."), read back: { original (the file NAME it gives),
|
|
6908
|
+
* ms }, or null for any other text.
|
|
6909
|
+
*/
|
|
6910
|
+
declare function parseLinkedReply(text: any): {
|
|
6911
|
+
original: string;
|
|
6912
|
+
ms?: number;
|
|
6913
|
+
} | null;
|
|
6914
|
+
/** Who sends the copies again: the signed-in user, and whether they own the project. */
|
|
6915
|
+
type PromotionActor = {
|
|
6916
|
+
userId?: string | null;
|
|
6917
|
+
isProjectOwner?: boolean;
|
|
6918
|
+
};
|
|
6919
|
+
/**
|
|
6920
|
+
* The linked copies `actor` may send to indexing again (review 2026-11-26): every copy for the
|
|
6921
|
+
* project owner, otherwise only the copies the actor uploaded (the marker's copy_owner). Another
|
|
6922
|
+
* user's copy is never re-indexed from this user's session: it would read that user's file
|
|
6923
|
+
* (perhaps a private one) and write its index under this user's records and upload group. A copy
|
|
6924
|
+
* left out keeps its link; once the original holds other content the server answers it as having
|
|
6925
|
+
* no index, the Files page shows it red ("Original removed or failed") and its Reindex fixes it.
|
|
6926
|
+
*/
|
|
6927
|
+
declare function promotableCopies(linked: Map<string, LinkedMarker> | {
|
|
6928
|
+
[path: string]: LinkedMarker;
|
|
6929
|
+
}, actor: PromotionActor): Map<string, LinkedMarker>;
|
|
6930
|
+
/**
|
|
6931
|
+
* The copies to send again when originals go away (a delete, a folder delete, an Overwrite
|
|
6932
|
+
* of an original), per original, oldest first. The first copy of each list becomes the new
|
|
6933
|
+
* original (one real AI run, sent with the share flag so it claims the content); the others
|
|
6934
|
+
* are sent after it and link to it. Copies that are themselves being removed are left out, and
|
|
6935
|
+
* with `actor`, the copies that user may not re-index (promotableCopies).
|
|
6936
|
+
* `removed`: the storage paths going away; `removedFolders`: folder paths whose whole
|
|
6937
|
+
* content goes away.
|
|
6938
|
+
*/
|
|
6939
|
+
declare function copiesToPromote(linked: Map<string, LinkedMarker> | {
|
|
6940
|
+
[path: string]: LinkedMarker;
|
|
6941
|
+
}, removed: string[], removedFolders?: string[], actor?: PromotionActor | null): {
|
|
6942
|
+
original: string;
|
|
6943
|
+
copies: string[];
|
|
6944
|
+
}[];
|
|
6945
|
+
/**
|
|
6946
|
+
* The live content claim ids of a project ("cas::..."), from one prefix listing of unique
|
|
6947
|
+
* ids (open to every signed-in caller, whatever group the claim is in), or null when it
|
|
6948
|
+
* could not be read or was cut off (then absence proves nothing).
|
|
6949
|
+
*/
|
|
6950
|
+
declare function listContentClaims(skapi: any, service: string, maxPages?: number): Promise<Set<string> | null>;
|
|
6951
|
+
/**
|
|
6952
|
+
* Every linked copy of a project, fresh: Map(copy path -> LinkedMarker), from the done::
|
|
6953
|
+
* markers tagged "bq_linked". Null when it could not be read. Used before a delete or an
|
|
6954
|
+
* Overwrite, where a 30-second-old sweep could miss a copy linked a moment ago.
|
|
6955
|
+
*/
|
|
6956
|
+
declare function listLinkedCopies(skapi: any, service: string, maxPages?: number): Promise<Map<string, LinkedMarker> | null>;
|
|
6957
|
+
type IdenticalFileEntry = {
|
|
6958
|
+
path: string;
|
|
6959
|
+
group?: any;
|
|
6960
|
+
uploader?: string | null;
|
|
6961
|
+
indexed?: boolean;
|
|
6962
|
+
indexed_at?: number | null;
|
|
6963
|
+
};
|
|
6964
|
+
type IdenticalGroup = {
|
|
6965
|
+
content_key: string;
|
|
6966
|
+
original: IdenticalFileEntry;
|
|
6967
|
+
copies: IdenticalFileEntry[];
|
|
6968
|
+
};
|
|
6969
|
+
type IdenticalScan = {
|
|
6970
|
+
complete: boolean;
|
|
6971
|
+
scanned: number;
|
|
6972
|
+
total: number;
|
|
6973
|
+
groups: IdenticalGroup[];
|
|
6974
|
+
skipped?: {
|
|
6975
|
+
path: string;
|
|
6976
|
+
reason: string;
|
|
6977
|
+
}[];
|
|
6978
|
+
};
|
|
6979
|
+
/**
|
|
6980
|
+
* The owner's scan for identical files that are indexed separately (MCP
|
|
6981
|
+
* /internal/identical-files). Calls again while the server says it is not complete (each
|
|
6982
|
+
* call keeps what the last one read), up to `maxCalls`. `onProgress` hears each answer.
|
|
6983
|
+
* Rejects with the server's words when it refuses (not the owner, no session).
|
|
6984
|
+
*/
|
|
6985
|
+
declare function findIdenticalFiles(args: {
|
|
6986
|
+
service: string;
|
|
6987
|
+
owner?: string;
|
|
6988
|
+
maxCalls?: number;
|
|
6989
|
+
budgetS?: number;
|
|
6990
|
+
onProgress?: (scan: IdenticalScan) => void;
|
|
6991
|
+
}): Promise<IdenticalScan>;
|
|
6992
|
+
/**
|
|
6993
|
+
* Link one copy to an original the owner confirmed (MCP /internal/identical-link, no AI):
|
|
6994
|
+
* the copy's own index is removed and it shares the original's. Resolves to the server's
|
|
6995
|
+
* answer ({ linked: true, ... }) or { linked: false, reason } when it was refused. Never
|
|
6996
|
+
* rejects.
|
|
6997
|
+
*/
|
|
6998
|
+
declare function linkIdenticalFile(args: {
|
|
6999
|
+
service: string;
|
|
7000
|
+
owner?: string;
|
|
7001
|
+
copy: string;
|
|
7002
|
+
original: string;
|
|
7003
|
+
}): Promise<{
|
|
7004
|
+
linked: boolean;
|
|
7005
|
+
reason?: string;
|
|
7006
|
+
[k: string]: any;
|
|
7007
|
+
}>;
|
|
7008
|
+
/** Plain words for identical-link's refusal reasons. */
|
|
7009
|
+
declare function identicalLinkReasonText(reason?: string): string;
|
|
7010
|
+
|
|
7011
|
+
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, CONTENT_CLAIM_PREFIX, 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, type CopyStatus, type CopyStatusKind, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SHARE_IDENTICAL_FILES, 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, 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 IdenticalFileEntry, type IdenticalGroup, type IdenticalScan, type ImagePreviewContext, type IndexQueueIdentity, type IndexQueueSnapshot, type IndexQueueWatchHandle, type IndexQueueWatchOptions, type IndexResetResult, type IndexRunPatch, type IndexRunStatus, type IndexingAttachmentInfo, type IndexingFileRef, type IndexingGroup, type IndexingGroupStatus, type IndexingRequestRef, type IndexingSystemPromptParams, type InlineLinkContext, type InlineLinkMarkupOptions, type InlineLinkPart, LINKED_COPY_TAG, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, LOOK_DEADLINE_MS, LOOK_FAST_MS, LOOK_SLOW_MS, LOOK_STALE_MS, type LinkedMarker, type LiveStreamUpdate, type LookOutcome, type LookRequest, LookScheduler, type LookTrigger, 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, NOT_SENT_TEXT, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, type OpenAIMessage, type OpenItem, type OpenItemInit, type OriginalState, 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, type PromotionActor, RENDER_FROM_TOKEN, REQUEST_GONE_TEXT, REQUEST_UNREACHABLE_TEXT, 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, SHARE_IDENTICAL_FILES_KEY, STREAM_POLL_INTERVAL, type ScrollAnchor, type ScrollAnchorOptions, type SseChunk, type SseParser, type SseProvider, type SseSnapshot, type SseToolCall, type StoredCopyIndexing, type StreamDispatchContext, TOOL_AND_RESPONSE_BUFFER, type TerminalContext, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, UPLOAD_CANCELLED_MESSAGE, type UploadAccessGroup, type VisionProfile, XML_EXTS, __resetSplitHistoryState, accessSettingFrom, adoptLiveTextIntoRunningRow, 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, copiesByOriginal, copiesToPromote, copyCountLabel, copyCountTitle, copyStatusOf, createHistoryFiller, createInlineLinkRegex, createScrollAnchor, createSseParser, crefSupported, csrEnvelopeError, encodePathSegments, encodingClassForExt, ensureHtmlCharset, ensureXmlEncoding, escapeInlineHtml, escapeRtfNonAscii, estimateMessageTokens, estimateTextTokens, extOf, extractClaudeText, extractLastUserTextFromRequest, extractOpenAIText, extractRemotePathFromAttachmentHref, extractRetrievalNote, fetchLiveIndexingKeys, fileNameOf, fillHistoryViewport, filterListByClearHorizon, findAttachmentParser, findDuplicateUpload, findIdenticalFiles, formatChatTimestamp, formatDuration, formatIndexDuration, formatLinkDuration, formatRetrievalNote, getAttachmentParsers, getChatHistory, getContextWindow, getErrorMessage, getExpiredAttachmentVisiblePath, getInputTokenBudget, getMaxOutputTokens, getModelContextWindow, getProjectContextWindow, getSplitChatHistory, getVisionProfile, groupAttachmentFailures, hasBom, hydrateImagePreviews, identicalLinkReasonText, indexDoneUniqueId, indexGroupDurationLabel, indexGroupLinkedLabel, indexScopeKey, indexingAccessGroup, isAuthExpiredError, isBgIndexingQueue, isCsrStatusEnvelope, isDataToolName, isDuplicateCandidateId, isErrorResponseBody, isHttpUrlLike, isImageVisionFile, isIndexingRequestText, isLinkUnavailable, isNonRetryableRequestError, isNotExistsError, isOfficeFile, isPagedReadFile, isPreviewableImagePath, isProviderApiKeyError, isRetriedFailure, isRetrievalNote, isReturnTrigger, isServerExtractable, isServiceDbAttachmentHref, isTransportFailure, isUploadCancelledError, isWindowedReadFile, linkIdenticalFile, linkUnavailableKeyForHref, linkUnavailableKeyForPath, linkUnavailableKeysForPath, linkedMarkerOf, linkedRowLabel, listClaudeModels, listContentClaims, listLinkedCopies, listOpenAIModels, listedRequestText, liveSafePrefix, loadProjectSettings, looksLikeRtf, makeExtractPlaceholder, mapHistoryListToMessages, markImagePreviewStale, mayKeepStreamedAnswer, messageTimeMs, mintCacheBustStamp, needsBomForExt, newClientRef, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeShareIdenticalFiles, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, parseLinkedReply, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectShareIdenticalFiles, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, promotableCopies, providerBodyWasRead, providerDocument, readExpiredAttachmentHref, readyProjectSettings, reconcilerReadsEnabled, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, requestIdTimeMs, resetFileIndexOnServer, resolveAnswerMode, resolveImagePreviewUrl, resolveSkipDuplicateFiles, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, runRecordDurationMs, runSettleSideEffect, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, shareIdenticalFilesFrom, shouldRescueInFlightMessage, sideEffectDone, skapiSupportsStreaming, skipDuplicateFilesEnabled, skipDuplicateFilesFrom, splitLabelForFit, statusPushEnabled, statusPushLive, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
|