brains-mcp 1.61.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -0
- package/dist/access/projectShares.d.ts +48 -0
- package/dist/access/projectShares.d.ts.map +1 -0
- package/dist/access/projectShares.js +203 -0
- package/dist/access/projectShares.js.map +1 -0
- package/dist/access/sharedInstructionsNote.d.ts +37 -0
- package/dist/access/sharedInstructionsNote.d.ts.map +1 -0
- package/dist/access/sharedInstructionsNote.js +76 -0
- package/dist/access/sharedInstructionsNote.js.map +1 -0
- package/dist/admin/seedUsers.d.ts +23 -0
- package/dist/admin/seedUsers.d.ts.map +1 -0
- package/dist/admin/seedUsers.js +168 -0
- package/dist/admin/seedUsers.js.map +1 -0
- package/dist/api/openapi.d.ts +2 -0
- package/dist/api/openapi.d.ts.map +1 -0
- package/dist/api/openapi.js +942 -0
- package/dist/api/openapi.js.map +1 -0
- package/dist/auth/clientStore.d.ts +43 -0
- package/dist/auth/clientStore.d.ts.map +1 -0
- package/dist/auth/clientStore.js +168 -0
- package/dist/auth/clientStore.js.map +1 -0
- package/dist/auth/deleteAccount.d.ts +34 -0
- package/dist/auth/deleteAccount.d.ts.map +1 -0
- package/dist/auth/deleteAccount.js +203 -0
- package/dist/auth/deleteAccount.js.map +1 -0
- package/dist/auth/oauth.d.ts +118 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/auth/oauth.js +491 -0
- package/dist/auth/oauth.js.map +1 -0
- package/dist/auth/patStore.d.ts +87 -0
- package/dist/auth/patStore.d.ts.map +1 -0
- package/dist/auth/patStore.js +308 -0
- package/dist/auth/patStore.js.map +1 -0
- package/dist/auth/supabase.d.ts +15 -0
- package/dist/auth/supabase.d.ts.map +1 -0
- package/dist/auth/supabase.js +66 -0
- package/dist/auth/supabase.js.map +1 -0
- package/dist/auth/tokenStore.d.ts +73 -0
- package/dist/auth/tokenStore.d.ts.map +1 -0
- package/dist/auth/tokenStore.js +261 -0
- package/dist/auth/tokenStore.js.map +1 -0
- package/dist/backup/drive.d.ts +24 -0
- package/dist/backup/drive.d.ts.map +1 -0
- package/dist/backup/drive.js +70 -0
- package/dist/backup/drive.js.map +1 -0
- package/dist/billing/tierStore.d.ts +59 -0
- package/dist/billing/tierStore.d.ts.map +1 -0
- package/dist/billing/tierStore.js +152 -0
- package/dist/billing/tierStore.js.map +1 -0
- package/dist/digest/activityDigest.d.ts +32 -0
- package/dist/digest/activityDigest.d.ts.map +1 -0
- package/dist/digest/activityDigest.js +299 -0
- package/dist/digest/activityDigest.js.map +1 -0
- package/dist/digest/digestCron.d.ts +40 -0
- package/dist/digest/digestCron.d.ts.map +1 -0
- package/dist/digest/digestCron.js +146 -0
- package/dist/digest/digestCron.js.map +1 -0
- package/dist/digest/digestPreferences.d.ts +25 -0
- package/dist/digest/digestPreferences.d.ts.map +1 -0
- package/dist/digest/digestPreferences.js +79 -0
- package/dist/digest/digestPreferences.js.map +1 -0
- package/dist/digest/emailSender.d.ts +20 -0
- package/dist/digest/emailSender.d.ts.map +1 -0
- package/dist/digest/emailSender.js +35 -0
- package/dist/digest/emailSender.js.map +1 -0
- package/dist/drive/client.d.ts +43 -0
- package/dist/drive/client.d.ts.map +1 -0
- package/dist/drive/client.js +282 -0
- package/dist/drive/client.js.map +1 -0
- package/dist/drive/errors.d.ts +27 -0
- package/dist/drive/errors.d.ts.map +1 -0
- package/dist/drive/errors.js +51 -0
- package/dist/drive/errors.js.map +1 -0
- package/dist/drive/fileCache.d.ts +22 -0
- package/dist/drive/fileCache.d.ts.map +1 -0
- package/dist/drive/fileCache.js +57 -0
- package/dist/drive/fileCache.js.map +1 -0
- package/dist/governance/accessControl.d.ts +87 -0
- package/dist/governance/accessControl.d.ts.map +1 -0
- package/dist/governance/accessControl.js +179 -0
- package/dist/governance/accessControl.js.map +1 -0
- package/dist/html/components.d.ts +8 -0
- package/dist/html/components.d.ts.map +1 -0
- package/dist/html/components.js +19 -0
- package/dist/html/components.js.map +1 -0
- package/dist/html/layout.d.ts +7 -0
- package/dist/html/layout.d.ts.map +1 -0
- package/dist/html/layout.js +24 -0
- package/dist/html/layout.js.map +1 -0
- package/dist/html/metricsUi.d.ts +8 -0
- package/dist/html/metricsUi.d.ts.map +1 -0
- package/dist/html/metricsUi.js +271 -0
- package/dist/html/metricsUi.js.map +1 -0
- package/dist/httpServer.d.ts +19 -0
- package/dist/httpServer.d.ts.map +1 -0
- package/dist/httpServer.js +3913 -0
- package/dist/httpServer.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs/asyncJobRegistry.d.ts +30 -0
- package/dist/jobs/asyncJobRegistry.d.ts.map +1 -0
- package/dist/jobs/asyncJobRegistry.js +70 -0
- package/dist/jobs/asyncJobRegistry.js.map +1 -0
- package/dist/observability/metricsQuery.d.ts +41 -0
- package/dist/observability/metricsQuery.d.ts.map +1 -0
- package/dist/observability/metricsQuery.js +106 -0
- package/dist/observability/metricsQuery.js.map +1 -0
- package/dist/observability/relevanceSignal.d.ts +26 -0
- package/dist/observability/relevanceSignal.d.ts.map +1 -0
- package/dist/observability/relevanceSignal.js +95 -0
- package/dist/observability/relevanceSignal.js.map +1 -0
- package/dist/observability/requestEvents.d.ts +31 -0
- package/dist/observability/requestEvents.d.ts.map +1 -0
- package/dist/observability/requestEvents.js +54 -0
- package/dist/observability/requestEvents.js.map +1 -0
- package/dist/observability/slowQueryAlert.d.ts +25 -0
- package/dist/observability/slowQueryAlert.d.ts.map +1 -0
- package/dist/observability/slowQueryAlert.js +67 -0
- package/dist/observability/slowQueryAlert.js.map +1 -0
- package/dist/observability/zeroResultTriage.d.ts +22 -0
- package/dist/observability/zeroResultTriage.d.ts.map +1 -0
- package/dist/observability/zeroResultTriage.js +116 -0
- package/dist/observability/zeroResultTriage.js.map +1 -0
- package/dist/search/embeddings.d.ts +31 -0
- package/dist/search/embeddings.d.ts.map +1 -0
- package/dist/search/embeddings.js +91 -0
- package/dist/search/embeddings.js.map +1 -0
- package/dist/search/fileWatcher.d.ts +28 -0
- package/dist/search/fileWatcher.d.ts.map +1 -0
- package/dist/search/fileWatcher.js +103 -0
- package/dist/search/fileWatcher.js.map +1 -0
- package/dist/search/hotQueryCache.d.ts +31 -0
- package/dist/search/hotQueryCache.d.ts.map +1 -0
- package/dist/search/hotQueryCache.js +103 -0
- package/dist/search/hotQueryCache.js.map +1 -0
- package/dist/search/postgresIndex.d.ts +439 -0
- package/dist/search/postgresIndex.d.ts.map +1 -0
- package/dist/search/postgresIndex.js +1610 -0
- package/dist/search/postgresIndex.js.map +1 -0
- package/dist/search/sqliteIndex.d.ts +66 -0
- package/dist/search/sqliteIndex.d.ts.map +1 -0
- package/dist/search/sqliteIndex.js +342 -0
- package/dist/search/sqliteIndex.js.map +1 -0
- package/dist/server.d.ts +43 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +532 -0
- package/dist/server.js.map +1 -0
- package/dist/session/bundle.d.ts +53 -0
- package/dist/session/bundle.d.ts.map +1 -0
- package/dist/session/bundle.js +97 -0
- package/dist/session/bundle.js.map +1 -0
- package/dist/storage/client.d.ts +157 -0
- package/dist/storage/client.d.ts.map +1 -0
- package/dist/storage/client.js +825 -0
- package/dist/storage/client.js.map +1 -0
- package/dist/tools/addWebhookPattern.d.ts +15 -0
- package/dist/tools/addWebhookPattern.d.ts.map +1 -0
- package/dist/tools/addWebhookPattern.js +15 -0
- package/dist/tools/addWebhookPattern.js.map +1 -0
- package/dist/tools/appendLog.d.ts +18 -0
- package/dist/tools/appendLog.d.ts.map +1 -0
- package/dist/tools/appendLog.js +18 -0
- package/dist/tools/appendLog.js.map +1 -0
- package/dist/tools/auditIndex.d.ts +15 -0
- package/dist/tools/auditIndex.d.ts.map +1 -0
- package/dist/tools/auditIndex.js +165 -0
- package/dist/tools/auditIndex.js.map +1 -0
- package/dist/tools/batchDeletePages.d.ts +18 -0
- package/dist/tools/batchDeletePages.d.ts.map +1 -0
- package/dist/tools/batchDeletePages.js +143 -0
- package/dist/tools/batchDeletePages.js.map +1 -0
- package/dist/tools/coerce.d.ts +3 -0
- package/dist/tools/coerce.d.ts.map +1 -0
- package/dist/tools/coerce.js +12 -0
- package/dist/tools/coerce.js.map +1 -0
- package/dist/tools/createPage.d.ts +24 -0
- package/dist/tools/createPage.d.ts.map +1 -0
- package/dist/tools/createPage.js +99 -0
- package/dist/tools/createPage.js.map +1 -0
- package/dist/tools/createPages.d.ts +51 -0
- package/dist/tools/createPages.d.ts.map +1 -0
- package/dist/tools/createPages.js +91 -0
- package/dist/tools/createPages.js.map +1 -0
- package/dist/tools/deletePage.d.ts +19 -0
- package/dist/tools/deletePage.d.ts.map +1 -0
- package/dist/tools/deletePage.js +127 -0
- package/dist/tools/deletePage.js.map +1 -0
- package/dist/tools/exportWiki.d.ts +48 -0
- package/dist/tools/exportWiki.d.ts.map +1 -0
- package/dist/tools/exportWiki.js +233 -0
- package/dist/tools/exportWiki.js.map +1 -0
- package/dist/tools/extractLinks.d.ts +14 -0
- package/dist/tools/extractLinks.d.ts.map +1 -0
- package/dist/tools/extractLinks.js +25 -0
- package/dist/tools/extractLinks.js.map +1 -0
- package/dist/tools/generateClaudeInstructions.d.ts +27 -0
- package/dist/tools/generateClaudeInstructions.d.ts.map +1 -0
- package/dist/tools/generateClaudeInstructions.js +263 -0
- package/dist/tools/generateClaudeInstructions.js.map +1 -0
- package/dist/tools/generateGptInstructions.d.ts +27 -0
- package/dist/tools/generateGptInstructions.d.ts.map +1 -0
- package/dist/tools/generateGptInstructions.js +208 -0
- package/dist/tools/generateGptInstructions.js.map +1 -0
- package/dist/tools/getBacklinks.d.ts +12 -0
- package/dist/tools/getBacklinks.d.ts.map +1 -0
- package/dist/tools/getBacklinks.js +13 -0
- package/dist/tools/getBacklinks.js.map +1 -0
- package/dist/tools/getRelated.d.ts +12 -0
- package/dist/tools/getRelated.d.ts.map +1 -0
- package/dist/tools/getRelated.js +13 -0
- package/dist/tools/getRelated.js.map +1 -0
- package/dist/tools/healthCheck.d.ts +5 -0
- package/dist/tools/healthCheck.d.ts.map +1 -0
- package/dist/tools/healthCheck.js +167 -0
- package/dist/tools/healthCheck.js.map +1 -0
- package/dist/tools/importBrainSource.d.ts +36 -0
- package/dist/tools/importBrainSource.d.ts.map +1 -0
- package/dist/tools/importBrainSource.js +314 -0
- package/dist/tools/importBrainSource.js.map +1 -0
- package/dist/tools/importWikiZip.d.ts +60 -0
- package/dist/tools/importWikiZip.d.ts.map +1 -0
- package/dist/tools/importWikiZip.js +379 -0
- package/dist/tools/importWikiZip.js.map +1 -0
- package/dist/tools/initProject.d.ts +34 -0
- package/dist/tools/initProject.d.ts.map +1 -0
- package/dist/tools/initProject.js +443 -0
- package/dist/tools/initProject.js.map +1 -0
- package/dist/tools/instructionContext.d.ts +60 -0
- package/dist/tools/instructionContext.d.ts.map +1 -0
- package/dist/tools/instructionContext.js +210 -0
- package/dist/tools/instructionContext.js.map +1 -0
- package/dist/tools/listArchivedPages.d.ts +17 -0
- package/dist/tools/listArchivedPages.d.ts.map +1 -0
- package/dist/tools/listArchivedPages.js +51 -0
- package/dist/tools/listArchivedPages.js.map +1 -0
- package/dist/tools/listPages.d.ts +28 -0
- package/dist/tools/listPages.d.ts.map +1 -0
- package/dist/tools/listPages.js +166 -0
- package/dist/tools/listPages.js.map +1 -0
- package/dist/tools/listWebhooks.d.ts +7 -0
- package/dist/tools/listWebhooks.d.ts.map +1 -0
- package/dist/tools/listWebhooks.js +10 -0
- package/dist/tools/listWebhooks.js.map +1 -0
- package/dist/tools/movePage.d.ts +18 -0
- package/dist/tools/movePage.d.ts.map +1 -0
- package/dist/tools/movePage.js +182 -0
- package/dist/tools/movePage.js.map +1 -0
- package/dist/tools/pageHistory.d.ts +36 -0
- package/dist/tools/pageHistory.d.ts.map +1 -0
- package/dist/tools/pageHistory.js +60 -0
- package/dist/tools/pageHistory.js.map +1 -0
- package/dist/tools/patchPage.d.ts +141 -0
- package/dist/tools/patchPage.d.ts.map +1 -0
- package/dist/tools/patchPage.js +287 -0
- package/dist/tools/patchPage.js.map +1 -0
- package/dist/tools/pullSessionBundle.d.ts +34 -0
- package/dist/tools/pullSessionBundle.d.ts.map +1 -0
- package/dist/tools/pullSessionBundle.js +432 -0
- package/dist/tools/pullSessionBundle.js.map +1 -0
- package/dist/tools/purgeWiki.d.ts +23 -0
- package/dist/tools/purgeWiki.d.ts.map +1 -0
- package/dist/tools/purgeWiki.js +113 -0
- package/dist/tools/purgeWiki.js.map +1 -0
- package/dist/tools/pushSessionBundle.d.ts +139 -0
- package/dist/tools/pushSessionBundle.d.ts.map +1 -0
- package/dist/tools/pushSessionBundle.js +282 -0
- package/dist/tools/pushSessionBundle.js.map +1 -0
- package/dist/tools/readGovernanceAudit.d.ts +17 -0
- package/dist/tools/readGovernanceAudit.d.ts.map +1 -0
- package/dist/tools/readGovernanceAudit.js +21 -0
- package/dist/tools/readGovernanceAudit.js.map +1 -0
- package/dist/tools/readPage.d.ts +13 -0
- package/dist/tools/readPage.d.ts.map +1 -0
- package/dist/tools/readPage.js +46 -0
- package/dist/tools/readPage.js.map +1 -0
- package/dist/tools/removeWebhook.d.ts +14 -0
- package/dist/tools/removeWebhook.d.ts.map +1 -0
- package/dist/tools/removeWebhook.js +12 -0
- package/dist/tools/removeWebhook.js.map +1 -0
- package/dist/tools/resolveProject.d.ts +58 -0
- package/dist/tools/resolveProject.d.ts.map +1 -0
- package/dist/tools/resolveProject.js +175 -0
- package/dist/tools/resolveProject.js.map +1 -0
- package/dist/tools/restorePage.d.ts +47 -0
- package/dist/tools/restorePage.d.ts.map +1 -0
- package/dist/tools/restorePage.js +111 -0
- package/dist/tools/restorePage.js.map +1 -0
- package/dist/tools/searchPages.d.ts +28 -0
- package/dist/tools/searchPages.d.ts.map +1 -0
- package/dist/tools/searchPages.js +372 -0
- package/dist/tools/searchPages.js.map +1 -0
- package/dist/tools/setWebhook.d.ts +30 -0
- package/dist/tools/setWebhook.d.ts.map +1 -0
- package/dist/tools/setWebhook.js +30 -0
- package/dist/tools/setWebhook.js.map +1 -0
- package/dist/tools/shareProject.d.ts +25 -0
- package/dist/tools/shareProject.d.ts.map +1 -0
- package/dist/tools/shareProject.js +56 -0
- package/dist/tools/shareProject.js.map +1 -0
- package/dist/tools/suggestLinks.d.ts +29 -0
- package/dist/tools/suggestLinks.d.ts.map +1 -0
- package/dist/tools/suggestLinks.js +214 -0
- package/dist/tools/suggestLinks.js.map +1 -0
- package/dist/tools/updatePage.d.ts +27 -0
- package/dist/tools/updatePage.d.ts.map +1 -0
- package/dist/tools/updatePage.js +118 -0
- package/dist/tools/updatePage.js.map +1 -0
- package/dist/webhooks/dispatch.d.ts +49 -0
- package/dist/webhooks/dispatch.d.ts.map +1 -0
- package/dist/webhooks/dispatch.js +159 -0
- package/dist/webhooks/dispatch.js.map +1 -0
- package/dist/webhooks/webhookRules.d.ts +34 -0
- package/dist/webhooks/webhookRules.d.ts.map +1 -0
- package/dist/webhooks/webhookRules.js +129 -0
- package/dist/webhooks/webhookRules.js.map +1 -0
- package/dist/wiki/frontmatter.d.ts +45 -0
- package/dist/wiki/frontmatter.d.ts.map +1 -0
- package/dist/wiki/frontmatter.js +68 -0
- package/dist/wiki/frontmatter.js.map +1 -0
- package/dist/wiki/index.d.ts +22 -0
- package/dist/wiki/index.d.ts.map +1 -0
- package/dist/wiki/index.js +203 -0
- package/dist/wiki/index.js.map +1 -0
- package/dist/wiki/ingestPolicy.d.ts +18 -0
- package/dist/wiki/ingestPolicy.d.ts.map +1 -0
- package/dist/wiki/ingestPolicy.js +64 -0
- package/dist/wiki/ingestPolicy.js.map +1 -0
- package/dist/wiki/layoutLint.d.ts +51 -0
- package/dist/wiki/layoutLint.d.ts.map +1 -0
- package/dist/wiki/layoutLint.js +146 -0
- package/dist/wiki/layoutLint.js.map +1 -0
- package/dist/wiki/links.d.ts +6 -0
- package/dist/wiki/links.d.ts.map +1 -0
- package/dist/wiki/links.js +45 -0
- package/dist/wiki/links.js.map +1 -0
- package/dist/wiki/log.d.ts +58 -0
- package/dist/wiki/log.d.ts.map +1 -0
- package/dist/wiki/log.js +126 -0
- package/dist/wiki/log.js.map +1 -0
- package/dist/wiki/path.d.ts +8 -0
- package/dist/wiki/path.d.ts.map +1 -0
- package/dist/wiki/path.js +25 -0
- package/dist/wiki/path.js.map +1 -0
- package/dist/wiki/storageLimits.d.ts +163 -0
- package/dist/wiki/storageLimits.d.ts.map +1 -0
- package/dist/wiki/storageLimits.js +281 -0
- package/dist/wiki/storageLimits.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* postgresIndex.ts
|
|
3
|
+
*
|
|
4
|
+
* Supabase Postgres-backed search and listing index for wiki pages.
|
|
5
|
+
*
|
|
6
|
+
* Mirrors the SqliteSearchIndex public surface so callers can swap between
|
|
7
|
+
* backends without changing their code. Uses the Supabase PostgREST REST API
|
|
8
|
+
* (no extra SDK dependency — same raw-fetch pattern as SupabaseStorageClient).
|
|
9
|
+
*
|
|
10
|
+
* Auto-selected when STORAGE_BACKEND=supabase. Override with SEARCH_BACKEND=sqlite|scan.
|
|
11
|
+
*
|
|
12
|
+
* Table schema: scripts/supabase-pages-index.sql
|
|
13
|
+
*/
|
|
14
|
+
import type { WikiFrontmatter } from "../wiki/frontmatter.js";
|
|
15
|
+
import type { IndexedSearchResult, IndexedSearchResponse } from "./sqliteIndex.js";
|
|
16
|
+
export interface PageListEntry {
|
|
17
|
+
name: string;
|
|
18
|
+
title: string;
|
|
19
|
+
summary: string;
|
|
20
|
+
updated: string;
|
|
21
|
+
status: string;
|
|
22
|
+
tags: string[];
|
|
23
|
+
created: string;
|
|
24
|
+
modified: string;
|
|
25
|
+
revision?: string;
|
|
26
|
+
}
|
|
27
|
+
/** A cross-account project-share grant (BRA-368): read as `owner`'s own pages under `folder`. */
|
|
28
|
+
export interface GrantScope {
|
|
29
|
+
userId: string;
|
|
30
|
+
folder: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ListPagesOptions {
|
|
33
|
+
tag?: string;
|
|
34
|
+
status?: string;
|
|
35
|
+
userId?: string;
|
|
36
|
+
/** When set, only pages with access_level ≤ this value are returned. */
|
|
37
|
+
accessLevel?: number;
|
|
38
|
+
/** ISO datetime — only pages with modified > changedAfter are returned. */
|
|
39
|
+
changedAfter?: string;
|
|
40
|
+
/** When true, returns only name + modified (skips heavy fields). */
|
|
41
|
+
compact?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Active project-share grants (BRA-368) for the requesting user. When set,
|
|
44
|
+
* results are merged with each grant owner's pages under their granted
|
|
45
|
+
* folder prefix — otherwise a grantee's shared content is invisible to
|
|
46
|
+
* listing (only reachable by exact path).
|
|
47
|
+
*/
|
|
48
|
+
grantScopes?: GrantScope[];
|
|
49
|
+
/** Internal: restricts a single-scope query to pages under this folder prefix. Set by listPages() for each grant scope — not for direct callers. */
|
|
50
|
+
pathPrefix?: string;
|
|
51
|
+
/** Restrict results to pages under this folder prefix (without trailing slash), e.g. "projects/brainsapp". */
|
|
52
|
+
folder?: string;
|
|
53
|
+
/** Max rows to return. Unset means unbounded (existing behavior) — callers should pass one. */
|
|
54
|
+
limit?: number;
|
|
55
|
+
/** Rows to skip, for pagination. Only exact for the no-grants case; grant-scoped merges are best-effort. */
|
|
56
|
+
offset?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface SearchOptions {
|
|
59
|
+
query: string;
|
|
60
|
+
tag?: string;
|
|
61
|
+
maxResults: number;
|
|
62
|
+
userId?: string;
|
|
63
|
+
/** When set, only pages with access_level ≤ this value are returned. */
|
|
64
|
+
accessLevel?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Restrict candidates to a single Lobe (folder prefix). Pass the folder path
|
|
67
|
+
* without a trailing slash, e.g. `"projects/brainsapp"`. Only pages whose
|
|
68
|
+
* name starts with `folder/` are considered, eliminating cross-Lobe noise at
|
|
69
|
+
* scale. Omit to search the full corpus.
|
|
70
|
+
*/
|
|
71
|
+
folder?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Active project-share grants (BRA-368) for the requesting user. When set,
|
|
74
|
+
* each grant owner's pages under their granted folder are also searched
|
|
75
|
+
* and merged into the results — otherwise a grantee's shared content is
|
|
76
|
+
* invisible to search (only reachable by exact path).
|
|
77
|
+
*/
|
|
78
|
+
grantScopes?: GrantScope[];
|
|
79
|
+
}
|
|
80
|
+
export interface HybridSearchResult extends IndexedSearchResult {
|
|
81
|
+
hybridScore: number;
|
|
82
|
+
ftsScore: number;
|
|
83
|
+
vecScore: number;
|
|
84
|
+
}
|
|
85
|
+
export interface HybridSearchResponse {
|
|
86
|
+
results: HybridSearchResult[];
|
|
87
|
+
totalMatches: number;
|
|
88
|
+
queryMs: number;
|
|
89
|
+
backend: "postgres-hybrid";
|
|
90
|
+
}
|
|
91
|
+
export interface HybridSearchResult extends IndexedSearchResult {
|
|
92
|
+
hybridScore: number;
|
|
93
|
+
ftsScore: number;
|
|
94
|
+
vecScore: number;
|
|
95
|
+
}
|
|
96
|
+
export interface HybridSearchResponse {
|
|
97
|
+
results: HybridSearchResult[];
|
|
98
|
+
totalMatches: number;
|
|
99
|
+
queryMs: number;
|
|
100
|
+
backend: "postgres-hybrid";
|
|
101
|
+
}
|
|
102
|
+
export interface ArchivedPageRow {
|
|
103
|
+
id: string;
|
|
104
|
+
originalPath: string;
|
|
105
|
+
originalFolder: string;
|
|
106
|
+
title: string;
|
|
107
|
+
tags: string[];
|
|
108
|
+
content: string;
|
|
109
|
+
revision: string;
|
|
110
|
+
sizeBytes: number;
|
|
111
|
+
reason: string;
|
|
112
|
+
deletedAt: string;
|
|
113
|
+
deletedBy: string;
|
|
114
|
+
restoredAt: string;
|
|
115
|
+
restoredBy: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ArchivePageInput {
|
|
118
|
+
userId: string;
|
|
119
|
+
originalPath: string;
|
|
120
|
+
originalFolder: string;
|
|
121
|
+
title?: string;
|
|
122
|
+
tags?: string[];
|
|
123
|
+
content: string;
|
|
124
|
+
revision?: string;
|
|
125
|
+
sizeBytes?: number;
|
|
126
|
+
reason?: string;
|
|
127
|
+
deletedBy: string;
|
|
128
|
+
}
|
|
129
|
+
export declare function getPostgresSearchIndex(): PostgresSearchIndex;
|
|
130
|
+
export declare class PostgresSearchIndex {
|
|
131
|
+
private readonly supabaseUrl;
|
|
132
|
+
private readonly serviceRoleKey;
|
|
133
|
+
private readonly baseUrl;
|
|
134
|
+
private readonly linksBaseUrl;
|
|
135
|
+
private readonly archivedPagesBaseUrl;
|
|
136
|
+
private readonly eventsBaseUrl;
|
|
137
|
+
private readonly headers;
|
|
138
|
+
constructor();
|
|
139
|
+
isConfigured(): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Lightweight connectivity check. Uses a HEAD + count=exact to verify the
|
|
142
|
+
* Supabase REST endpoint is reachable without fetching any row data.
|
|
143
|
+
*/
|
|
144
|
+
ping(userId?: string): Promise<{
|
|
145
|
+
ok: boolean;
|
|
146
|
+
rowCount?: number;
|
|
147
|
+
error?: string;
|
|
148
|
+
}>;
|
|
149
|
+
/**
|
|
150
|
+
* Count active (non-archived) pages for a user. Returns 0 when not configured
|
|
151
|
+
* or when the request fails. Uses HEAD + count=exact to avoid fetching rows.
|
|
152
|
+
*/
|
|
153
|
+
countActivePages(userId: string): Promise<number>;
|
|
154
|
+
/**
|
|
155
|
+
* Append one activity event.
|
|
156
|
+
*
|
|
157
|
+
* Replaces the read-modify-write of log.md that every page write used to
|
|
158
|
+
* perform: Storage has no append primitive, so appending to a 460 KB file
|
|
159
|
+
* meant moving ~920 KB and took 2.6-3.6s measured against production. An
|
|
160
|
+
* indexed insert is O(1) (GH #417).
|
|
161
|
+
*
|
|
162
|
+
* Throws on failure so callers can decide — the write paths log a warning
|
|
163
|
+
* rather than failing the page write, but a silent no-op is what let the
|
|
164
|
+
* old log.md problem go unnoticed, so the error is not swallowed here.
|
|
165
|
+
*/
|
|
166
|
+
appendEvent(input: {
|
|
167
|
+
userId: string;
|
|
168
|
+
type: string;
|
|
169
|
+
title: string;
|
|
170
|
+
detail?: string;
|
|
171
|
+
}): Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* Read activity events for one user since a cutoff date (inclusive,
|
|
174
|
+
* `YYYY-MM-DD`). Newest first. Returns null when Postgres is unavailable so
|
|
175
|
+
* the caller can fall back to parsing log.md rather than silently reporting
|
|
176
|
+
* no activity.
|
|
177
|
+
*/
|
|
178
|
+
listEvents(userId: string, sinceDate: string, limit?: number): Promise<Array<{
|
|
179
|
+
date: string;
|
|
180
|
+
type: string;
|
|
181
|
+
title: string;
|
|
182
|
+
}> | null>;
|
|
183
|
+
/**
|
|
184
|
+
* Fetch every row matching `params`, following limit/offset until exhausted.
|
|
185
|
+
*
|
|
186
|
+
* PostgREST clamps a result set to its configured max-rows (1000 here) and
|
|
187
|
+
* returns 200 OK. A truncated response is byte-identical to a complete one —
|
|
188
|
+
* no error, no flag — so any "fetch everything then aggregate in JS" call site
|
|
189
|
+
* silently computes on partial input and returns a confident wrong answer.
|
|
190
|
+
* That has now happened four times: the bundle folder filter undercounted 164
|
|
191
|
+
* against 213 (#432), listProjectInventory lost a whole project whose pages
|
|
192
|
+
* all fell in the truncated tail (#445), and audit_index reported ~174
|
|
193
|
+
* fabricated unindexed pages by diffing a capped snapshot against full
|
|
194
|
+
* storage (#449).
|
|
195
|
+
*
|
|
196
|
+
* Callers that need a whole table must route through here rather than issuing
|
|
197
|
+
* an unbounded request. Returns null on transport/HTTP failure, which callers
|
|
198
|
+
* must treat as "unknown" — never as "empty", since that is exactly how a
|
|
199
|
+
* partial read becomes a wrong answer.
|
|
200
|
+
*
|
|
201
|
+
* Pages by keyset (`name > last seen`), not by offset, and always sorts by
|
|
202
|
+
* `name.asc`. Two reasons, both of which offset paging gets wrong:
|
|
203
|
+
*
|
|
204
|
+
* - **Never infer the end from a short page.** `rows.length < pageSize` is
|
|
205
|
+
* only "the end" if pageSize happens to be ≤ the server's max-rows. That
|
|
206
|
+
* is a Supabase dashboard setting on a different system, and staging and
|
|
207
|
+
* prod are configured independently. If max-rows is ever lowered below
|
|
208
|
+
* pageSize, the first page comes back short and an offset walk stops
|
|
209
|
+
* there — silently returning a truncated list from the very helper written
|
|
210
|
+
* to prevent that, with no round-number tell to notice it by. Keyset walks
|
|
211
|
+
* until a page comes back empty, so it is correct whatever the cap is.
|
|
212
|
+
* - **Offset is not stable against concurrent writes.** A page created with
|
|
213
|
+
* an earlier-sorting name mid-walk shifts every later row down by one and
|
|
214
|
+
* drops exactly one real page from the snapshot. During an audit that page
|
|
215
|
+
* then looks unindexed, and cleanup would "repair" it by overwriting its
|
|
216
|
+
* DB row from Storage. Keyset resumes from a value, not a position, so an
|
|
217
|
+
* insert behind the cursor cannot displace anything.
|
|
218
|
+
*
|
|
219
|
+
* Requires `name` in the select — it is the cursor. Returns null if it is
|
|
220
|
+
* missing rather than looping.
|
|
221
|
+
*/
|
|
222
|
+
private fetchAllRows;
|
|
223
|
+
/**
|
|
224
|
+
* Every indexed page name for a user, complete — not capped at max-rows.
|
|
225
|
+
*
|
|
226
|
+
* Exists because audit_index compares the index against storage, and a
|
|
227
|
+
* truncated index snapshot makes every missing row look like an unindexed
|
|
228
|
+
* page. Applies the same exclusions as listPages so the two agree on what
|
|
229
|
+
* counts as a page.
|
|
230
|
+
*
|
|
231
|
+
* Returns null if any page of the walk fails. Callers must not fall back to a
|
|
232
|
+
* partial list — an incomplete audit is worse than no audit, because it
|
|
233
|
+
* invites a "repair" of pages that were never broken.
|
|
234
|
+
*/
|
|
235
|
+
listAllPageNames(userId?: string): Promise<string[] | null>;
|
|
236
|
+
/**
|
|
237
|
+
* One row per project: slug, page count, and the root readme's title/aliases.
|
|
238
|
+
*
|
|
239
|
+
* Two requests rather than one per project. Aliases come from the readme's
|
|
240
|
+
* frontmatter and are how a nickname reaches the right project — the
|
|
241
|
+
* cressida/nessie case, where the slug never appears in what the user typed.
|
|
242
|
+
*
|
|
243
|
+
* Anchored to `projects/<slug>/readme.md` exactly. A looser match picks up
|
|
244
|
+
* nested readmes — cetera-pds alone has nine — and reports one project many
|
|
245
|
+
* times (GH #430).
|
|
246
|
+
*/
|
|
247
|
+
listProjectInventory(userId: string): Promise<Array<{
|
|
248
|
+
slug: string;
|
|
249
|
+
pageCount: number;
|
|
250
|
+
parentSlug?: string;
|
|
251
|
+
title?: string;
|
|
252
|
+
aliases?: string[];
|
|
253
|
+
}> | null>;
|
|
254
|
+
/**
|
|
255
|
+
* Full-text hits per project, for when the slug does not appear in what the
|
|
256
|
+
* user typed. Returns a slug -> hit-count map.
|
|
257
|
+
*/
|
|
258
|
+
countProjectContentHits(context: string, userId: string): Promise<Map<string, number>>;
|
|
259
|
+
countArchivedPages(userId: string): Promise<number>;
|
|
260
|
+
archivePage(input: ArchivePageInput): Promise<{
|
|
261
|
+
id: string;
|
|
262
|
+
}>;
|
|
263
|
+
listArchivedPages(options: {
|
|
264
|
+
userId: string;
|
|
265
|
+
limit?: number;
|
|
266
|
+
includeRestored?: boolean;
|
|
267
|
+
originalPath?: string;
|
|
268
|
+
}): Promise<ArchivedPageRow[]>;
|
|
269
|
+
getArchivedPageForRestore(input: {
|
|
270
|
+
userId: string;
|
|
271
|
+
archiveId?: string;
|
|
272
|
+
originalPath?: string;
|
|
273
|
+
deletedAt?: string;
|
|
274
|
+
}): Promise<ArchivedPageRow | null>;
|
|
275
|
+
markArchivedPageRestored(archiveId: string, userId: string, restoredBy: string): Promise<void>;
|
|
276
|
+
/**
|
|
277
|
+
* Insert or update a page in the index.
|
|
278
|
+
* Non-blocking: callers should fire-and-forget with `.catch(() => {})`.
|
|
279
|
+
*/
|
|
280
|
+
upsertPage(name: string, frontmatter: WikiFrontmatter, content: string, revision: string, modifiedTime: string, userId?: string, contentModifiedTime?: string): Promise<void>;
|
|
281
|
+
/**
|
|
282
|
+
* Conditionally update a page row only if it still has `expectedRevision`.
|
|
283
|
+
* Returns false (no throw) when the row's revision has moved or the row is
|
|
284
|
+
* gone — that's a concurrent-write signal, not an error. Used by
|
|
285
|
+
* patch_page's CAS retry loop (GH #500): unlike upsertPage's unconditional
|
|
286
|
+
* merge-duplicates upsert, this scopes the write with a `revision=eq.` filter
|
|
287
|
+
* so a concurrent writer between read and write can't be silently clobbered.
|
|
288
|
+
*/
|
|
289
|
+
casUpdatePage(name: string, frontmatter: WikiFrontmatter, content: string, expectedRevision: string, newRevision: string, modifiedTime: string, userId?: string, contentModifiedTime?: string): Promise<boolean>;
|
|
290
|
+
/**
|
|
291
|
+
* Insert a brand-new page row only if one doesn't already exist.
|
|
292
|
+
* Returns false (no throw) when a concurrent writer already created the
|
|
293
|
+
* row — that's the insert-side counterpart of casUpdatePage (GH #500):
|
|
294
|
+
* patch_page's "first write, no row to CAS against" branch previously fell
|
|
295
|
+
* back to upsertPage's unconditional merge-duplicates upsert, so two
|
|
296
|
+
* concurrent first writes on the same new page could silently clobber one
|
|
297
|
+
* another with no conflict ever reported. `resolution=ignore-duplicates`
|
|
298
|
+
* makes the INSERT a no-op on a (user_id, name) collision instead of
|
|
299
|
+
* merging, and `return=representation` lets us tell a real insert apart
|
|
300
|
+
* from a no-op by whether a row came back.
|
|
301
|
+
*/
|
|
302
|
+
casInsertPage(name: string, frontmatter: WikiFrontmatter, content: string, newRevision: string, modifiedTime: string, userId?: string, contentModifiedTime?: string): Promise<boolean>;
|
|
303
|
+
/**
|
|
304
|
+
* Generate an embedding for a page and store it in the embedding column.
|
|
305
|
+
* Called fire-and-forget from upsertPage.
|
|
306
|
+
*/
|
|
307
|
+
generateAndStoreEmbedding(name: string, title: string, summary: string, content: string, userId?: string): Promise<void>;
|
|
308
|
+
/**
|
|
309
|
+
* Write a pre-computed embedding vector to the pages table.
|
|
310
|
+
* Used by generateAndStoreEmbedding and the backfill script.
|
|
311
|
+
*/
|
|
312
|
+
storeEmbedding(name: string, userId: string, embedding: number[]): Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Remove a page from the index by name.
|
|
315
|
+
* Non-blocking: callers should fire-and-forget with `.catch(() => {})`.
|
|
316
|
+
*/
|
|
317
|
+
deletePage(name: string, userId?: string): Promise<void>;
|
|
318
|
+
/**
|
|
319
|
+
* Remove multiple pages and their wiki_links in two batch HTTP requests per chunk.
|
|
320
|
+
* Avoids N×2 serial round-trips when purging or reconciling many rows at once.
|
|
321
|
+
*/
|
|
322
|
+
deletePages(names: string[], userId?: string): Promise<void>;
|
|
323
|
+
syncPageLinks(name: string, content: string, userId?: string): Promise<{
|
|
324
|
+
linkCount: number;
|
|
325
|
+
}>;
|
|
326
|
+
getOutboundLinkCount(name: string, userId?: string): Promise<number>;
|
|
327
|
+
getBacklinks(name: string, userId?: string, accessLevel?: number): Promise<string[]>;
|
|
328
|
+
getRelatedPages(name: string, userId?: string, accessLevel?: number): Promise<string[]>;
|
|
329
|
+
/**
|
|
330
|
+
* Filter a list of page names to only those where `access_level <= accessLevel`
|
|
331
|
+
* for the given user. Used to enforce Hive mode governance in link-graph operations.
|
|
332
|
+
* Queries the `wiki_pages` table (columns: `name`, `user_id`, `access_level`).
|
|
333
|
+
*/
|
|
334
|
+
private filterPagesByAccessLevel;
|
|
335
|
+
extractLinksForStalePages(filter: {
|
|
336
|
+
tags?: string[];
|
|
337
|
+
folder?: string;
|
|
338
|
+
userId?: string;
|
|
339
|
+
}): Promise<{
|
|
340
|
+
pagesProcessed: number;
|
|
341
|
+
linksExtracted: number;
|
|
342
|
+
}>;
|
|
343
|
+
private deleteLinksForSource;
|
|
344
|
+
private stampLinksExtractedAt;
|
|
345
|
+
private fetchPageContent;
|
|
346
|
+
/**
|
|
347
|
+
* Read a single page row from the DB for the hot path (read_page, patch_page).
|
|
348
|
+
* Returns null when not configured, row not found, or on any error so the
|
|
349
|
+
* caller can fall back to Supabase Storage transparently.
|
|
350
|
+
*/
|
|
351
|
+
fetchPageRow(name: string, userId?: string): Promise<{
|
|
352
|
+
fileId: string;
|
|
353
|
+
name: string;
|
|
354
|
+
content: string;
|
|
355
|
+
revision: string;
|
|
356
|
+
modifiedTime: string;
|
|
357
|
+
} | null>;
|
|
358
|
+
/**
|
|
359
|
+
* List all pages, with optional tag and status filters.
|
|
360
|
+
* Returns lightweight entries — no content.
|
|
361
|
+
*/
|
|
362
|
+
listPages(options?: ListPagesOptions): Promise<PageListEntry[]>;
|
|
363
|
+
private listPagesSingleScope;
|
|
364
|
+
/**
|
|
365
|
+
* Targeted existence check for health_check's taxonomy verification — point
|
|
366
|
+
* lookups instead of diffing against a bulk listPages() fetch. A bulk fetch
|
|
367
|
+
* ordered by modified.desc is bounded by PostgREST's default row cap, so on
|
|
368
|
+
* wikis past ~1000 pages, old/rarely-touched seed pages silently age out of
|
|
369
|
+
* the window and false-flag as "missing" (see GH #358). Point lookups by
|
|
370
|
+
* exact name / folder prefix are correct regardless of wiki size.
|
|
371
|
+
*
|
|
372
|
+
* Checks both the clean name and the legacy `users/<userId>/`-prefixed
|
|
373
|
+
* variant some accounts have from an older populate script, matching the
|
|
374
|
+
* normalization the bulk-fetch approach used to do.
|
|
375
|
+
*/
|
|
376
|
+
checkTaxonomy(userId: string, requiredSeedPages: string[], requiredFolders: string[]): Promise<{
|
|
377
|
+
missingSeedPages: string[];
|
|
378
|
+
missingFolders: string[];
|
|
379
|
+
}>;
|
|
380
|
+
/**
|
|
381
|
+
* Full-text search using Postgres tsvector / tsquery.
|
|
382
|
+
* Returns ranked results compatible with IndexedSearchResponse.
|
|
383
|
+
*/
|
|
384
|
+
search(options: SearchOptions): Promise<IndexedSearchResponse>;
|
|
385
|
+
private searchSingleScope;
|
|
386
|
+
private runFtsQuery;
|
|
387
|
+
/**
|
|
388
|
+
* Relevance-ordered FTS via the search_pages_ranked RPC (orders by ts_rank in
|
|
389
|
+
* Postgres). Returns null when the function isn't deployed (PGRST202 / 404) so
|
|
390
|
+
* the caller can fall back to the REST filter.
|
|
391
|
+
*/
|
|
392
|
+
private runRankedQuery;
|
|
393
|
+
/**
|
|
394
|
+
* Re-trigger the FTS update trigger for all rows where fts_vector is NULL.
|
|
395
|
+
* Needed when rows were inserted before the trigger was applied (e.g. after a
|
|
396
|
+
* Supabase project migration). Safe to call multiple times — a second call is
|
|
397
|
+
* a no-op because no null rows remain.
|
|
398
|
+
*/
|
|
399
|
+
reindexFts(userId?: string): Promise<{
|
|
400
|
+
updated: number;
|
|
401
|
+
}>;
|
|
402
|
+
/**
|
|
403
|
+
* Score-based hybrid retrieval: FTS (weight 0.3) + vector cosine similarity (weight 0.7).
|
|
404
|
+
* Calls the search_pages_hybrid stored function deployed by embedding-migration.sql.
|
|
405
|
+
* Returns null when the function isn't deployed or embedding is unavailable.
|
|
406
|
+
*/
|
|
407
|
+
searchHybrid(options: SearchOptions): Promise<HybridSearchResponse | null>;
|
|
408
|
+
/** No-op: connection is stateless (each call is an independent HTTP request). */
|
|
409
|
+
close(): void;
|
|
410
|
+
}
|
|
411
|
+
interface FtsRow {
|
|
412
|
+
name: string;
|
|
413
|
+
title: string;
|
|
414
|
+
summary: string;
|
|
415
|
+
updated: string | null;
|
|
416
|
+
modified: string | null;
|
|
417
|
+
tags: string[];
|
|
418
|
+
content?: string;
|
|
419
|
+
}
|
|
420
|
+
/** Lowercase, strip punctuation, split into tokens. */
|
|
421
|
+
export declare function tokenizeQuery(query: string): string[];
|
|
422
|
+
/** Drop stopwords — but never return empty (keep originals if all were stopwords). */
|
|
423
|
+
export declare function stripStopwords(tokens: string[]): string[];
|
|
424
|
+
/**
|
|
425
|
+
* Tokens usable for a *matched-on* relevance signal: stopwords and sub-3-char
|
|
426
|
+
* tokens excluded, since both produce false-positive substring hits (e.g. the
|
|
427
|
+
* stopword "is" or "or" appearing inside "History"/"Editor").
|
|
428
|
+
*/
|
|
429
|
+
export declare function matchableTokens(query: string): string[];
|
|
430
|
+
/**
|
|
431
|
+
* Prefix match on a word boundary (mirrors the `token:*` prefix semantics used
|
|
432
|
+
* in the tsquery builder below) — not a bare substring test. Prevents a token
|
|
433
|
+
* like "type" from being credited for matching inside "stereotype".
|
|
434
|
+
*/
|
|
435
|
+
export declare function tokenMatchesText(text: string, token: string): boolean;
|
|
436
|
+
/** Stable sort by descending term-overlap; ties keep the incoming (recency) order. */
|
|
437
|
+
export declare function rankByOverlap(rows: FtsRow[], tokens: string[]): FtsRow[];
|
|
438
|
+
export {};
|
|
439
|
+
//# sourceMappingURL=postgresIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresIndex.d.ts","sourceRoot":"","sources":["../../src/search/postgresIndex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAInF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iGAAiG;AACjG,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,UAAU,EAAE,CAA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