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/README.md
CHANGED
|
@@ -400,6 +400,40 @@ knowledge rather than duplicating it. That includes the file's contents list, it
|
|
|
400
400
|
search glossary and everything search has learned about it from people's
|
|
401
401
|
questions and corrections, which the dialog says.
|
|
402
402
|
|
|
403
|
+
### Files with the same content
|
|
404
|
+
|
|
405
|
+
Files whose stored bytes are identical (same md5 and size, same kind of file, whoever
|
|
406
|
+
uploaded them and whatever they are called) share **one index**. The first one is
|
|
407
|
+
indexed as usual and becomes the original; every later one is linked to it on the
|
|
408
|
+
server in a second or two, with no AI call, and search, outlines and totals count the
|
|
409
|
+
content once. The project's **Share one index for identical files** setting (the
|
|
410
|
+
`share_identical_files` key of `bq::settings`, **on** unless the owner turned it off)
|
|
411
|
+
decides it: while it is on, the engine adds `share_identical: true` to the
|
|
412
|
+
`_skapi_file_urls` entry of every file's FIRST indexing pass (never a continue pass),
|
|
413
|
+
and BunnyQuery's MCP reads the key again before it links anything. There is no
|
|
414
|
+
`init()` option for it.
|
|
415
|
+
|
|
416
|
+
- **In the chat** a linked file's row reads "Indexed <file>" with "Same content as
|
|
417
|
+
<original>: linked in 1.2 s, no AI used" in place of the pass count. When the model
|
|
418
|
+
cites it, it cites the original and says the copy is the same file.
|
|
419
|
+
- **A copy only links to a file at least as open as itself** (private to the same
|
|
420
|
+
uploader's private files, authorized or public; authorized to authorized or public;
|
|
421
|
+
public to public), so a link never points a reader at rows they could not read, and
|
|
422
|
+
the server answers a reader who cannot read the original as having no index rather
|
|
423
|
+
than naming it.
|
|
424
|
+
- **Overwriting an original** sends its copies to indexing again: the oldest becomes
|
|
425
|
+
the new original (one real AI run) and the others link to it. A copy overwritten with
|
|
426
|
+
different bytes simply gets its own index. Only the copies the overwriting user may
|
|
427
|
+
re-index are sent (their own uploads; every copy for the project owner). Another
|
|
428
|
+
user's copy keeps its link, the server answers it as having no index once the
|
|
429
|
+
original holds other content (never the new content), and the Files page shows it
|
|
430
|
+
red with a Reindex.
|
|
431
|
+
|
|
432
|
+
The engine's `identical.ts` exports what both clients use: `copyStatusOf` (a copy's
|
|
433
|
+
"Indexed via", "Waiting for", "Original removed or failed" state from its markers and
|
|
434
|
+
the live claim ids), `listLinkedCopies`, `listContentClaims`, `copiesToPromote` (with `promotableCopies`),
|
|
435
|
+
`indexGroupLinkedLabel`, and the owner's `findIdenticalFiles` / `linkIdenticalFile`.
|
|
436
|
+
|
|
403
437
|
### Filenames
|
|
404
438
|
|
|
405
439
|
Storage keys preserve Unicode letters, digits and spaces, NFC-normalized, so
|
|
@@ -695,7 +729,7 @@ page waits for a second look, and puts the answer in `state.indexQueues[projectI
|
|
|
695
729
|
## OAuth & redirects
|
|
696
730
|
|
|
697
731
|
BunnyQuery connects to your AI agent through an MCP OAuth server
|
|
698
|
-
(`mcp.skapi.com` in production, `mcp
|
|
732
|
+
(`mcp.skapi.com` in production, `mcp.broadwayinc.computer` when
|
|
699
733
|
`dev: true`). After authorization, the OAuth server redirects back to **the current
|
|
700
734
|
host page**: BunnyQuery reads the `?code=…&state=…` parameters, completes the
|
|
701
735
|
exchange, and cleans them from the URL automatically. No dedicated callback page is
|