presubmit 0.1.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.
Files changed (220) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +51 -0
  3. package/THIRD_PARTY_NOTICES.md +24 -0
  4. package/apps/web/dist/assets/FileCode-CZZH52o7.js +5 -0
  5. package/apps/web/dist/assets/FileCode-DovDO7Jh.css +1 -0
  6. package/apps/web/dist/assets/SettingsPage-CRvOwdjt.js +4 -0
  7. package/apps/web/dist/assets/SettingsPage-UbYSCwJj.css +1 -0
  8. package/apps/web/dist/assets/TerminalPanel-0sw-J6YS.css +1 -0
  9. package/apps/web/dist/assets/TerminalPanel-BqUjPWav.js +16 -0
  10. package/apps/web/dist/assets/index-BhqNNFja.js +54 -0
  11. package/apps/web/dist/assets/index-DD8VXy8H.css +1 -0
  12. package/apps/web/dist/assets/presubmit-mark-BBQ19Fmr.svg +7 -0
  13. package/apps/web/dist/assets/presubmit-mark-busy-CwBC-7on.svg +8 -0
  14. package/apps/web/dist/assets/react-vendor-wiHys0m2.js +9 -0
  15. package/apps/web/dist/assets/rolldown-runtime-hePW80VL.js +1 -0
  16. package/apps/web/dist/index.html +6 -0
  17. package/apps/web/dist/service-worker.js +11 -0
  18. package/dist/apps/server/src/agent-builder.js +204 -0
  19. package/dist/apps/server/src/attach.js +163 -0
  20. package/dist/apps/server/src/attachments.js +86 -0
  21. package/dist/apps/server/src/browser-access.js +131 -0
  22. package/dist/apps/server/src/check-provenance.js +95 -0
  23. package/dist/apps/server/src/check-supervisor.js +112 -0
  24. package/dist/apps/server/src/checks.js +402 -0
  25. package/dist/apps/server/src/child-collaboration-guidance.js +2 -0
  26. package/dist/apps/server/src/child-sessions.js +191 -0
  27. package/dist/apps/server/src/cli.js +162 -0
  28. package/dist/apps/server/src/conversation-search.js +12 -0
  29. package/dist/apps/server/src/coordinator-messages.js +72 -0
  30. package/dist/apps/server/src/dev-auth.js +54 -0
  31. package/dist/apps/server/src/dev-server.js +201 -0
  32. package/dist/apps/server/src/dev-worker.js +48 -0
  33. package/dist/apps/server/src/diagnostics.js +105 -0
  34. package/dist/apps/server/src/fast-mode.js +8 -0
  35. package/dist/apps/server/src/folder-picker.js +54 -0
  36. package/dist/apps/server/src/git-blobs.js +62 -0
  37. package/dist/apps/server/src/git-handoff.js +127 -0
  38. package/dist/apps/server/src/history-sources.js +59 -0
  39. package/dist/apps/server/src/hub.js +159 -0
  40. package/dist/apps/server/src/internal-transport.js +38 -0
  41. package/dist/apps/server/src/local-embeddings.js +70 -0
  42. package/dist/apps/server/src/ollama-setup.js +56 -0
  43. package/dist/apps/server/src/planning.js +30 -0
  44. package/dist/apps/server/src/project-agents.js +276 -0
  45. package/dist/apps/server/src/project-memory.js +94 -0
  46. package/dist/apps/server/src/projects.js +106 -0
  47. package/dist/apps/server/src/queued-launch.js +13 -0
  48. package/dist/apps/server/src/reply-search.js +172 -0
  49. package/dist/apps/server/src/review-context.js +60 -0
  50. package/dist/apps/server/src/review-refresh.js +14 -0
  51. package/dist/apps/server/src/reviewers.js +75 -0
  52. package/dist/apps/server/src/search-settings.js +22 -0
  53. package/dist/apps/server/src/semantic-history.js +186 -0
  54. package/dist/apps/server/src/server.js +4338 -0
  55. package/dist/apps/server/src/session-changes.js +181 -0
  56. package/dist/apps/server/src/session-router-settings.js +198 -0
  57. package/dist/apps/server/src/session-workspaces.js +135 -0
  58. package/dist/apps/server/src/sessions.js +579 -0
  59. package/dist/apps/server/src/shared-auth.js +70 -0
  60. package/dist/apps/server/src/shell-evaluator-settings.js +53 -0
  61. package/dist/apps/server/src/store.js +203 -0
  62. package/dist/apps/server/src/tailscale-process.js +115 -0
  63. package/dist/apps/server/src/tailscale-serve-worker.js +33 -0
  64. package/dist/apps/server/src/tailscale-serve.js +276 -0
  65. package/dist/apps/server/src/task-capacity.js +92 -0
  66. package/dist/apps/server/src/task-graph.js +190 -0
  67. package/dist/apps/server/src/task-logs.js +74 -0
  68. package/dist/apps/server/src/task-numbers.js +25 -0
  69. package/dist/apps/server/src/task-orchestrator.js +1088 -0
  70. package/dist/apps/server/src/terminal.js +182 -0
  71. package/dist/apps/server/src/terminals.js +80 -0
  72. package/dist/apps/server/src/tool-safety.js +2 -0
  73. package/dist/apps/server/src/workspace-lock.js +140 -0
  74. package/dist/apps/server/src/workspace-watcher.js +65 -0
  75. package/dist/apps/server/src/workspace.js +517 -0
  76. package/dist/packages/agent-pi/src/agent-builder-tool.js +32 -0
  77. package/dist/packages/agent-pi/src/agent-capabilities.js +44 -0
  78. package/dist/packages/agent-pi/src/ask-user.js +86 -0
  79. package/dist/packages/agent-pi/src/auth.js +510 -0
  80. package/dist/packages/agent-pi/src/check-tools.js +72 -0
  81. package/dist/packages/agent-pi/src/command-policy.js +246 -0
  82. package/dist/packages/agent-pi/src/coordinator-tools.js +122 -0
  83. package/dist/packages/agent-pi/src/fast-mode.js +67 -0
  84. package/dist/packages/agent-pi/src/file-tools.js +163 -0
  85. package/dist/packages/agent-pi/src/history-tool.js +40 -0
  86. package/dist/packages/agent-pi/src/history.js +34 -0
  87. package/dist/packages/agent-pi/src/index.js +177 -0
  88. package/dist/packages/agent-pi/src/ipc.js +314 -0
  89. package/dist/packages/agent-pi/src/jev-session-router.js +408 -0
  90. package/dist/packages/agent-pi/src/jev-tools.js +71 -0
  91. package/dist/packages/agent-pi/src/local-model.js +277 -0
  92. package/dist/packages/agent-pi/src/memory-tools.js +119 -0
  93. package/dist/packages/agent-pi/src/model.js +25 -0
  94. package/dist/packages/agent-pi/src/planning.js +206 -0
  95. package/dist/packages/agent-pi/src/resource-loader.js +23 -0
  96. package/dist/packages/agent-pi/src/review-tools.js +158 -0
  97. package/dist/packages/agent-pi/src/review-transition.js +73 -0
  98. package/dist/packages/agent-pi/src/review.js +40 -0
  99. package/dist/packages/agent-pi/src/routing.js +27 -0
  100. package/dist/packages/agent-pi/src/session-setup.js +118 -0
  101. package/dist/packages/agent-pi/src/shell-context.js +51 -0
  102. package/dist/packages/agent-pi/src/shell-policy.js +281 -0
  103. package/dist/packages/agent-pi/src/shell-safety.js +205 -0
  104. package/dist/packages/agent-pi/src/shell.js +121 -0
  105. package/dist/packages/agent-pi/src/snapshot-permissions.js +12 -0
  106. package/dist/packages/agent-pi/src/spike.js +41 -0
  107. package/dist/packages/agent-pi/src/task-tools.js +53 -0
  108. package/dist/packages/agent-pi/src/types.js +1 -0
  109. package/dist/packages/agent-pi/src/usage.js +30 -0
  110. package/dist/packages/agent-pi/src/worker.js +602 -0
  111. package/dist/packages/protocol/src/activity-summary.js +77 -0
  112. package/dist/packages/protocol/src/agents.js +301 -0
  113. package/dist/packages/protocol/src/browser-access.js +1 -0
  114. package/dist/packages/protocol/src/checks.js +40 -0
  115. package/dist/packages/protocol/src/child-sessions.js +28 -0
  116. package/dist/packages/protocol/src/command-policy.js +3 -0
  117. package/dist/packages/protocol/src/coordinator.js +135 -0
  118. package/dist/packages/protocol/src/delegation.js +40 -0
  119. package/dist/packages/protocol/src/git-diff.js +71 -0
  120. package/dist/packages/protocol/src/git-handoff.js +1 -0
  121. package/dist/packages/protocol/src/index.js +1 -0
  122. package/dist/packages/protocol/src/memory.js +46 -0
  123. package/dist/packages/protocol/src/metrics.js +70 -0
  124. package/dist/packages/protocol/src/planning.js +138 -0
  125. package/dist/packages/protocol/src/retrieval.js +36 -0
  126. package/dist/packages/protocol/src/reviewers.js +17 -0
  127. package/dist/packages/protocol/src/search.js +16 -0
  128. package/dist/packages/protocol/src/session-changes.js +29 -0
  129. package/dist/packages/protocol/src/session-router.js +123 -0
  130. package/dist/packages/protocol/src/shell-evaluator.js +43 -0
  131. package/dist/packages/protocol/src/task-graph.js +1 -0
  132. package/dist/packages/protocol/src/token-usage.js +17 -0
  133. package/dist/packages/protocol/src/user-questions.js +106 -0
  134. package/package.json +71 -0
  135. package/vendor/lancedb/NODEJS_THIRD_PARTY_LICENSES.md +668 -0
  136. package/vendor/lancedb/RUST_THIRD_PARTY_LICENSES.html +14607 -0
  137. package/vendor/lancedb/dist/arrow.d.ts +296 -0
  138. package/vendor/lancedb/dist/arrow.js +1145 -0
  139. package/vendor/lancedb/dist/arrow_type.d.ts +9 -0
  140. package/vendor/lancedb/dist/arrow_type.js +29 -0
  141. package/vendor/lancedb/dist/connection.d.ts +508 -0
  142. package/vendor/lancedb/dist/connection.js +298 -0
  143. package/vendor/lancedb/dist/embedding/embedding_function.d.ts +103 -0
  144. package/vendor/lancedb/dist/embedding/embedding_function.js +192 -0
  145. package/vendor/lancedb/dist/embedding/index.d.ts +37 -0
  146. package/vendor/lancedb/dist/embedding/index.js +108 -0
  147. package/vendor/lancedb/dist/embedding/openai.d.ts +16 -0
  148. package/vendor/lancedb/dist/embedding/openai.js +81 -0
  149. package/vendor/lancedb/dist/embedding/registry.d.ts +94 -0
  150. package/vendor/lancedb/dist/embedding/registry.js +221 -0
  151. package/vendor/lancedb/dist/embedding/transformers.d.ts +36 -0
  152. package/vendor/lancedb/dist/embedding/transformers.js +110 -0
  153. package/vendor/lancedb/dist/header.d.ts +162 -0
  154. package/vendor/lancedb/dist/header.js +217 -0
  155. package/vendor/lancedb/dist/index.d.ts +246 -0
  156. package/vendor/lancedb/dist/index.js +176 -0
  157. package/vendor/lancedb/dist/indices.d.ts +721 -0
  158. package/vendor/lancedb/dist/indices.js +166 -0
  159. package/vendor/lancedb/dist/materialized_view.d.ts +69 -0
  160. package/vendor/lancedb/dist/materialized_view.js +112 -0
  161. package/vendor/lancedb/dist/merge.d.ts +104 -0
  162. package/vendor/lancedb/dist/merge.js +120 -0
  163. package/vendor/lancedb/dist/native.d.ts +1193 -0
  164. package/vendor/lancedb/dist/native.js +688 -0
  165. package/vendor/lancedb/dist/oauth.d.ts +66 -0
  166. package/vendor/lancedb/dist/oauth.js +15 -0
  167. package/vendor/lancedb/dist/otel.d.ts +26 -0
  168. package/vendor/lancedb/dist/otel.js +114 -0
  169. package/vendor/lancedb/dist/permutation.d.ts +143 -0
  170. package/vendor/lancedb/dist/permutation.js +184 -0
  171. package/vendor/lancedb/dist/query.d.ts +663 -0
  172. package/vendor/lancedb/dist/query.js +966 -0
  173. package/vendor/lancedb/dist/rerankers/index.d.ts +5 -0
  174. package/vendor/lancedb/dist/rerankers/index.js +19 -0
  175. package/vendor/lancedb/dist/rerankers/rrf.d.ts +14 -0
  176. package/vendor/lancedb/dist/rerankers/rrf.js +28 -0
  177. package/vendor/lancedb/dist/sanitize.d.ts +32 -0
  178. package/vendor/lancedb/dist/sanitize.js +544 -0
  179. package/vendor/lancedb/dist/scannable.d.ts +92 -0
  180. package/vendor/lancedb/dist/scannable.js +200 -0
  181. package/vendor/lancedb/dist/schema.d.ts +16 -0
  182. package/vendor/lancedb/dist/schema.js +387 -0
  183. package/vendor/lancedb/dist/table.d.ts +1069 -0
  184. package/vendor/lancedb/dist/table.js +498 -0
  185. package/vendor/lancedb/dist/util.d.ts +14 -0
  186. package/vendor/lancedb/dist/util.js +77 -0
  187. package/vendor/lancedb/license_header.txt +2 -0
  188. package/vendor/lancedb/package.json +56 -0
  189. package/vendor/transformers/LICENSE +202 -0
  190. package/vendor/transformers/dist/transformers.cjs +30844 -0
  191. package/vendor/transformers/dist/transformers.mjs +31404 -0
  192. package/vendor/transformers/package.json +55 -0
  193. package/vendor/transformers/types/backends/onnx.d.ts +30 -0
  194. package/vendor/transformers/types/configs.d.ts +85 -0
  195. package/vendor/transformers/types/env.d.ts +110 -0
  196. package/vendor/transformers/types/generation/configuration_utils.d.ts +320 -0
  197. package/vendor/transformers/types/generation/logits_process.d.ts +354 -0
  198. package/vendor/transformers/types/generation/logits_sampler.d.ts +51 -0
  199. package/vendor/transformers/types/generation/parameters.d.ts +47 -0
  200. package/vendor/transformers/types/generation/stopping_criteria.d.ts +81 -0
  201. package/vendor/transformers/types/generation/streamers.d.ts +81 -0
  202. package/vendor/transformers/types/models/whisper/common_whisper.d.ts +8 -0
  203. package/vendor/transformers/types/models/whisper/generation_whisper.d.ts +76 -0
  204. package/vendor/transformers/types/models.d.ts +3684 -0
  205. package/vendor/transformers/types/ops/registry.d.ts +11 -0
  206. package/vendor/transformers/types/pipelines.d.ts +2402 -0
  207. package/vendor/transformers/types/processors.d.ts +924 -0
  208. package/vendor/transformers/types/tokenizers.d.ts +990 -0
  209. package/vendor/transformers/types/transformers.d.ts +13 -0
  210. package/vendor/transformers/types/utils/audio.d.ts +130 -0
  211. package/vendor/transformers/types/utils/constants.d.ts +2 -0
  212. package/vendor/transformers/types/utils/core.d.ts +98 -0
  213. package/vendor/transformers/types/utils/data-structures.d.ts +236 -0
  214. package/vendor/transformers/types/utils/devices.d.ts +18 -0
  215. package/vendor/transformers/types/utils/dtypes.d.ts +19 -0
  216. package/vendor/transformers/types/utils/generic.d.ts +11 -0
  217. package/vendor/transformers/types/utils/hub.d.ts +152 -0
  218. package/vendor/transformers/types/utils/image.d.ts +119 -0
  219. package/vendor/transformers/types/utils/maths.d.ts +280 -0
  220. package/vendor/transformers/types/utils/tensor.d.ts +418 -0
@@ -0,0 +1,1193 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare class BranchContents {
4
+ parentBranch?: string
5
+ parentVersion: number
6
+ manifestSize: number
7
+ }
8
+
9
+ export declare class Branches {
10
+ list(): Promise<Record<string, BranchContents>>
11
+ create(name: string, fromRef?: string | undefined | null, fromVersion?: number | undefined | null): Promise<Table>
12
+ checkout(name: string, version?: number | undefined | null): Promise<Table>
13
+ delete(name: string): Promise<void>
14
+ diff(fromBranch: string): Promise<Record<string, unknown>>
15
+ cherryPick(fromBranch: string, dryRun?: boolean | undefined | null): Promise<Record<string, unknown>>
16
+ }
17
+
18
+ export declare class Connection {
19
+ /** Create a new Connection instance from the given URI. */
20
+ static new(uri: string, options: ConnectionOptions, headerProvider?: JsHeaderProvider | undefined | null): Promise<Connection>
21
+ /** Create a new Connection instance backed by a namespace implementation. */
22
+ static newWithNamespace(implName: string, properties: Record<string, string>, options: ConnectNamespaceOptions): Promise<Connection>
23
+ display(): string
24
+ isOpen(): boolean
25
+ close(): void
26
+ /** List all tables in the dataset. */
27
+ tableNames(namespacePath?: Array<string> | undefined | null, startAfter?: string | undefined | null, limit?: number | undefined | null): Promise<Array<string>>
28
+ /** List a page of tables in the database. */
29
+ listTables(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null): Promise<ListTablesResponse>
30
+ /**
31
+ * Create table from a Apache Arrow IPC (file) buffer.
32
+ *
33
+ * Parameters:
34
+ * - name: The name of the table.
35
+ * - buf: The buffer containing the IPC file.
36
+ */
37
+ createTable(name: string, buf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
38
+ createEmptyTable(name: string, schemaBuf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
39
+ createMaterializedView(name: string, source: string, projections?: Array<Array<string>> | undefined | null, filter?: string | undefined | null, limit?: number | undefined | null): Promise<Table>
40
+ openMaterializedView(name: string): Promise<Table>
41
+ listMaterializedViews(): Promise<Array<string>>
42
+ openTable(name: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null, indexCacheSize?: number | undefined | null): Promise<Table>
43
+ cloneTable(targetTableName: string, sourceUri: string, targetNamespacePath: Array<string> | undefined | null, sourceVersion: number | undefined | null, sourceTag: string | undefined | null, isShallow: boolean): Promise<Table>
44
+ /** Drop table with the name. Or raise an error if the table does not exist. */
45
+ dropTable(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
46
+ /** Start dropping a table and return its cleanup job. */
47
+ dropTableAsync(name: string, namespacePath?: Array<string> | undefined | null): Promise<Job>
48
+ dropAllTables(namespacePath?: Array<string> | undefined | null): Promise<void>
49
+ /**
50
+ * A `Job` handle for a server-side job by id.
51
+ *
52
+ * The handle is constructed without a server round trip; an unknown id
53
+ * surfaces when the handle is used.
54
+ */
55
+ job(jobId: string): Job
56
+ /** List server-side jobs across the database's tables. */
57
+ listJobs(): Promise<Array<JobInfo>>
58
+ /**
59
+ * Describe a single server-side job by id. `null` when the server has
60
+ * no such job.
61
+ */
62
+ getJob(jobId: string): Promise<JobDescription | null>
63
+ /**
64
+ * Request cancellation of a server-side job by id. Returns true if the
65
+ * server accepted the cancellation, false if no such job exists.
66
+ */
67
+ cancelJob(jobId: string): Promise<boolean>
68
+ /**
69
+ * The lifecycle event history of a server-side job (all jobs when
70
+ * `job_id` is null), as an Arrow IPC stream buffer. Empty when there is
71
+ * no history.
72
+ */
73
+ jobHistory(jobId?: string | undefined | null): Promise<Buffer>
74
+ /** Describe a namespace and return its properties. */
75
+ describeNamespace(namespacePath: Array<string>): Promise<DescribeNamespaceResponse>
76
+ /** List child namespaces under the given namespace path */
77
+ listNamespaces(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null): Promise<ListNamespacesResponse>
78
+ /** Create a new namespace with optional properties. */
79
+ createNamespace(namespacePath: Array<string>, mode?: string | undefined | null, properties?: Record<string, string> | undefined | null): Promise<CreateNamespaceResponse>
80
+ /** Drop a namespace. */
81
+ dropNamespace(namespacePath: Array<string>, mode?: string | undefined | null, behavior?: string | undefined | null): Promise<DropNamespaceResponse>
82
+ /**
83
+ * Rename a table. `current_namespace_path` and `new_namespace_path` default to
84
+ * the root namespace when omitted; the caller is expected to either pass both
85
+ * or pass neither.
86
+ */
87
+ renameTable(currentName: string, newName: string, currentNamespacePath?: Array<string> | undefined | null, newNamespacePath?: Array<string> | undefined | null): Promise<void>
88
+ }
89
+
90
+ export declare class Index {
91
+ static ivfPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
92
+ static ivfRq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
93
+ static ivfFlat(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
94
+ static btree(): Index
95
+ static bitmap(): Index
96
+ static labelList(): Index
97
+ static fm(): Index
98
+ static fts(withPosition?: boolean | undefined | null, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null, blockSize?: number | undefined | null): Index
99
+ static hnswPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
100
+ static hnswSq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
101
+ }
102
+
103
+ /** A handle to an operation that may still be running. */
104
+ export declare class Job {
105
+ /**
106
+ * Identifies the operation on the server that is running it. Operations
107
+ * that run in this process have no server id. The value is opaque.
108
+ */
109
+ get id(): string | null
110
+ /**
111
+ * The operation's current lifecycle state: "running", "finished",
112
+ * "failed", or "cancelled".
113
+ *
114
+ * A point snapshot; unlike {@link Job.wait} it does not block or reject
115
+ * on a terminal failure state. States a newer server reports that this
116
+ * client version does not know pass through as-is.
117
+ */
118
+ status(): Promise<string>
119
+ /** Wait until the operation reaches a terminal state. */
120
+ wait(): Promise<void>
121
+ /** Request cancellation. Cancelling a finished operation is a no-op. */
122
+ cancel(): Promise<void>
123
+ }
124
+
125
+ export declare class JsFullTextQuery {
126
+ static matchQuery(query: string, column: string, boost: number, fuzziness: number | undefined | null, maxExpansions: number, operator: string, prefixLength: number): JsFullTextQuery
127
+ static phraseQuery(query: string, column: string, slop: number): JsFullTextQuery
128
+ static boostQuery(positive: JsFullTextQuery, negative: JsFullTextQuery, negativeBoost?: number | undefined | null): JsFullTextQuery
129
+ static multiMatchQuery(query: string, columns: Array<string>, boosts: Array<number> | undefined | null, operator: string): JsFullTextQuery
130
+ static booleanQuery(queries: Array<[string, JsFullTextQuery]>): JsFullTextQuery
131
+ get queryType(): string
132
+ }
133
+
134
+ /**
135
+ * JavaScript HeaderProvider implementation that wraps a JavaScript callback.
136
+ * This is the only native header provider - all header provider implementations
137
+ * should provide a JavaScript function that returns headers.
138
+ */
139
+ export declare class JsHeaderProvider {
140
+ /** Create a new JsHeaderProvider from a JavaScript callback */
141
+ constructor(getHeadersCallback: () => Promise<Record<string, string>>)
142
+ }
143
+
144
+ /**
145
+ * A Rust-side view of a JS-constructed `Scannable`.
146
+ *
147
+ * Held in JS as the return value of the `Scannable` class constructor. When
148
+ * passed to a consumer that accepts `impl lancedb::data::scannable::Scannable`,
149
+ * the consumer invokes `scan_as_stream()` to pull batches through the JS
150
+ * callback.
151
+ */
152
+ export declare class NapiScannable {
153
+ /**
154
+ * Construct a new `NapiScannable`.
155
+ *
156
+ * - `schema_buf` — Arrow IPC File buffer carrying only the schema (no batches).
157
+ * - `num_rows` — optional row count hint; not validated against the stream.
158
+ * - `rescannable` — whether `get_next_batch` may be re-driven after the
159
+ * scan completes.
160
+ * - `get_next_batch` -- JS callback that yields the next batch as an Arrow
161
+ * IPC Stream message wrapped in a `Buffer`, or `null` at EOF. The
162
+ * `isStart` argument is `true` on the first call of each new scan;
163
+ * JS uses it to discard any cached iterator before pulling.
164
+ */
165
+ constructor(schemaBuf: Buffer, numRows: number | undefined | null, rescannable: boolean, getNextBatch: (arg: boolean) => Promise<Buffer | undefined | null>)
166
+ }
167
+
168
+ /** A builder used to create and run a merge insert operation */
169
+ export declare class NativeMergeInsertBuilder {
170
+ whenMatchedUpdateAll(condition?: string | undefined | null): NativeMergeInsertBuilder
171
+ whenNotMatchedInsertAll(): NativeMergeInsertBuilder
172
+ whenNotMatchedBySourceDelete(filter?: string | undefined | null): NativeMergeInsertBuilder
173
+ setTimeout(timeout: number): void
174
+ useIndex(useIndex: boolean): NativeMergeInsertBuilder
175
+ useLsm(enable: boolean): NativeMergeInsertBuilder
176
+ validateSingleShard(validateSingleShard: boolean): NativeMergeInsertBuilder
177
+ execute(buf: Buffer): Promise<MergeResult>
178
+ }
179
+
180
+ export declare class PermutationBuilder {
181
+ persist(connection: Connection, tableName: string): PermutationBuilder
182
+ /** Configure random splits */
183
+ splitRandom(options: SplitRandomOptions): PermutationBuilder
184
+ /** Configure hash-based splits */
185
+ splitHash(options: SplitHashOptions): PermutationBuilder
186
+ /** Configure sequential splits */
187
+ splitSequential(options: SplitSequentialOptions): PermutationBuilder
188
+ /** Configure calculated splits */
189
+ splitCalculated(options: SplitCalculatedOptions): PermutationBuilder
190
+ /** Configure shuffling */
191
+ shuffle(options: ShuffleOptions): PermutationBuilder
192
+ /** Configure filtering */
193
+ filter(filter: string): PermutationBuilder
194
+ /** Execute the permutation builder and create the table */
195
+ execute(): Promise<Table>
196
+ }
197
+
198
+ export declare class Query {
199
+ onlyIf(predicate: string): void
200
+ fullTextSearch(query: object): void
201
+ select(columns: Array<[string, string]>): void
202
+ selectColumns(columns: Array<string>): void
203
+ limit(limit: number): void
204
+ offset(offset: number): void
205
+ nearestTo(vector: Float32Array): VectorQuery
206
+ nearestToRaw(data: Uint8Array, dtype: string): VectorQuery
207
+ fastSearch(): void
208
+ withRowId(): void
209
+ useLsm(enable: boolean): void
210
+ orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
211
+ outputSchema(): Promise<Buffer>
212
+ execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
213
+ explainPlan(verbose: boolean): Promise<string>
214
+ analyzePlan(distributedMetrics?: string | undefined | null): Promise<string>
215
+ }
216
+
217
+ /** Typescript-style Async Iterator over RecordBatches */
218
+ export declare class RecordBatchIterator {
219
+ next(): Promise<Buffer | null>
220
+ }
221
+
222
+ /** Wrapper around rust RRFReranker */
223
+ export declare class RrfReranker {
224
+ static tryNew(k: Float32Array): Promise<RrfReranker>
225
+ rerankHybrid(query: string, vecResults: Buffer, ftsResults: Buffer): Promise<Buffer>
226
+ }
227
+ export type RRFReranker = RrfReranker
228
+
229
+ /**
230
+ * A session for managing caches and object stores across LanceDB operations.
231
+ *
232
+ * Sessions allow you to configure cache sizes for index and metadata caches,
233
+ * which can significantly impact memory use and performance. They can
234
+ * also be re-used across multiple connections to share the same cache state.
235
+ */
236
+ export declare class Session {
237
+ /**
238
+ * Create a new session with custom cache sizes.
239
+ *
240
+ * # Parameters
241
+ *
242
+ * - `index_cache_size_bytes`: The size of the index cache in bytes.
243
+ * Index data is stored in memory in this cache to speed up queries.
244
+ * Defaults to 6GB if not specified.
245
+ * - `metadata_cache_size_bytes`: The size of the metadata cache in bytes.
246
+ * The metadata cache stores file metadata and schema information in memory.
247
+ * This cache improves scan and write performance.
248
+ * Defaults to 1GB if not specified.
249
+ */
250
+ constructor(indexCacheSizeBytes?: bigint | undefined | null, metadataCacheSizeBytes?: bigint | undefined | null)
251
+ /**
252
+ * Create a session with default cache sizes.
253
+ *
254
+ * This is equivalent to creating a session with 6GB index cache
255
+ * and 1GB metadata cache.
256
+ */
257
+ static default(): Session
258
+ /** Get the current size of the session caches in bytes. */
259
+ sizeBytes(): bigint
260
+ /** Get the approximate number of items cached in the session. */
261
+ approxNumItems(): number
262
+ }
263
+
264
+ export declare class Table {
265
+ name: string
266
+ display(): string
267
+ isOpen(): boolean
268
+ close(): void
269
+ /** Return Schema as empty Arrow IPC file. */
270
+ schema(): Promise<Buffer>
271
+ add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void): Promise<AddResult>
272
+ countRows(filter?: string | undefined | null): Promise<number>
273
+ delete(predicate: string): Promise<DeleteResult>
274
+ createIndex(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null, name?: string | undefined | null, train?: boolean | undefined | null): Promise<void>
275
+ createIndexAsync(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null, name?: string | undefined | null, train?: boolean | undefined | null): Promise<Job>
276
+ dropIndex(indexName: string): Promise<void>
277
+ prewarmIndex(indexName: string): Promise<void>
278
+ prewarmData(columns?: Array<string> | undefined | null): Promise<void>
279
+ waitForIndex(indexNames: Array<string>, timeoutS: number): Promise<void>
280
+ stats(): Promise<TableStatistics>
281
+ initialStorageOptions(): Promise<Record<string, string> | null>
282
+ latestStorageOptions(): Promise<Record<string, string> | null>
283
+ update(onlyIf: string | undefined | null, columns: Array<[string, string]>): Promise<UpdateResult>
284
+ query(): Query
285
+ /** Return a read-only table handle pinned to the current query revision. */
286
+ querySnapshot(): Promise<Table>
287
+ takeOffsets(offsets: Array<number>): TakeQuery
288
+ takeRowIds(rowIds: Array<bigint>): TakeQuery
289
+ vectorSearch(vector: Float32Array): VectorQuery
290
+ addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
291
+ addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
292
+ refreshColumn(column: string): Promise<RefreshColumnResult>
293
+ refreshColumnAsync(column: string): Promise<Job>
294
+ refreshMaterializedView(full?: boolean | undefined | null, sourceVersion?: number | undefined | null): Promise<RefreshMaterializedViewResult>
295
+ addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
296
+ alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
297
+ updateFieldMetadata(updates: Array<FieldMetadataUpdate>): Promise<UpdateFieldMetadataResult>
298
+ dropColumns(columns: Array<string>): Promise<DropColumnsResult>
299
+ setUnenforcedPrimaryKey(columns: Array<string>): Promise<void>
300
+ setLsmWriteSpec(spec: LsmWriteSpec): Promise<void>
301
+ unsetLsmWriteSpec(): Promise<void>
302
+ getLsmWriteSpec(): Promise<LsmWriteSpec | null>
303
+ closeLsmWriters(): Promise<void>
304
+ flushLsm(): Promise<void>
305
+ compactLsm(): Promise<void>
306
+ checkpointLsm(): Promise<void>
307
+ getLsmStats(includeGenerationRows: boolean): Promise<LsmStats | null>
308
+ version(): Promise<number>
309
+ checkoutCurrent(): Promise<Table>
310
+ checkout(version: number): Promise<void>
311
+ checkoutTag(tag: string): Promise<void>
312
+ checkoutLatest(): Promise<void>
313
+ listVersions(): Promise<Array<Version>>
314
+ restore(): Promise<void>
315
+ tags(): Promise<Tags>
316
+ branches(): Promise<Branches>
317
+ /** The branch this handle is scoped to, or `null` for the main branch. */
318
+ currentBranch(): string | null
319
+ optimize(olderThanMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null): Promise<OptimizeStats>
320
+ listIndices(): Promise<Array<IndexConfig>>
321
+ tokenize(query: string, column?: string | undefined | null, indexName?: string | undefined | null): Promise<Array<FtsToken>>
322
+ indexStats(indexName: string): Promise<IndexStatistics | null>
323
+ mergeInsert(on: Array<string>): NativeMergeInsertBuilder
324
+ usesV2ManifestPaths(): Promise<boolean>
325
+ migrateManifestPathsV2(): Promise<void>
326
+ }
327
+
328
+ export declare class TagContents {
329
+ version: number
330
+ manifestSize: number
331
+ }
332
+
333
+ export declare class Tags {
334
+ list(): Promise<Record<string, TagContents>>
335
+ getVersion(tag: string): Promise<number>
336
+ create(tag: string, version: number): Promise<void>
337
+ delete(tag: string): Promise<void>
338
+ update(tag: string, version: number): Promise<void>
339
+ }
340
+
341
+ export declare class TakeQuery {
342
+ select(columns: Array<[string, string]>): void
343
+ selectColumns(columns: Array<string>): void
344
+ withRowId(): void
345
+ useLsm(enable: boolean): void
346
+ outputSchema(): Promise<Buffer>
347
+ execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
348
+ explainPlan(verbose: boolean): Promise<string>
349
+ analyzePlan(distributedMetrics?: string | undefined | null): Promise<string>
350
+ }
351
+
352
+ export declare class VectorQuery {
353
+ column(column: string): void
354
+ addQueryVector(vector: Float32Array): void
355
+ addQueryVectorRaw(data: Uint8Array, dtype: string): void
356
+ distanceType(distanceType: string): void
357
+ postfilter(): void
358
+ refineFactor(refineFactor: number): void
359
+ nprobes(nprobe: number): void
360
+ minimumNprobes(minimumNprobe: number): void
361
+ maximumNprobes(maximumNprobes: number): void
362
+ distanceRange(lowerBound?: number | undefined | null, upperBound?: number | undefined | null): void
363
+ ef(ef: number): void
364
+ bypassVectorIndex(): void
365
+ onlyIf(predicate: string): void
366
+ fullTextSearch(query: object): void
367
+ select(columns: Array<[string, string]>): void
368
+ selectColumns(columns: Array<string>): void
369
+ limit(limit: number): void
370
+ offset(offset: number): void
371
+ fastSearch(): void
372
+ withRowId(): void
373
+ useLsm(enable: boolean): void
374
+ rerank(rerankHybrid: (arg: RerankHybridCallbackArgs) => Promise<Buffer>): void
375
+ orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
376
+ outputSchema(): Promise<Buffer>
377
+ execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
378
+ explainPlan(verbose: boolean): Promise<string>
379
+ analyzePlan(distributedMetrics?: string | undefined | null): Promise<string>
380
+ }
381
+
382
+ export interface AddColumnsResult {
383
+ version: number
384
+ }
385
+
386
+ /** A definition of a new column to add to a table. */
387
+ export interface AddColumnsSql {
388
+ /** The name of the new column. */
389
+ name: string
390
+ /**
391
+ * The values to populate the new column with, as a SQL expression.
392
+ * The expression can reference other columns in the table.
393
+ */
394
+ valueSql: string
395
+ }
396
+
397
+ export interface AddResult {
398
+ version: number
399
+ }
400
+
401
+ export interface AlterColumnsResult {
402
+ version: number
403
+ }
404
+
405
+ /**
406
+ * Live state of one bucket. A table is N buckets on one node; flattening to a
407
+ * single number hides the one hot bucket that is usually why someone opened
408
+ * this endpoint.
409
+ */
410
+ export interface BucketStats {
411
+ /** The shard this bucket writes. */
412
+ shardId: string
413
+ /** `"Active"` or `"Sealed"` (drop-table 2PC in flight). */
414
+ status: string
415
+ /** Epoch of the writer that currently owns the shard. */
416
+ writerEpoch: number
417
+ /** Version of the shard manifest these numbers were read from. */
418
+ manifestVersion: number
419
+ /** The generation the active memtable will become. */
420
+ currentGeneration: number
421
+ /** WAL position replay resumes from. */
422
+ replayAfterWalEntryPosition: number
423
+ /**
424
+ * Highest WAL position the writer has seen. The difference against
425
+ * `replayAfterWalEntryPosition` is the WAL lag.
426
+ */
427
+ walEntryPositionLastSeen: number
428
+ /** Flushed L0 generations not yet merged into the base table. */
429
+ generations: Array<GenerationStats>
430
+ /**
431
+ * Whether a pass owns this bucket's compaction latch right now. Says *a*
432
+ * driver is running, not *whose*, and the latch is held from dispatch —
433
+ * including while the pass queues for a pod-wide compactor permit. Read it
434
+ * as "do not pile on", never as "mine is progressing".
435
+ */
436
+ compacting: boolean
437
+ /**
438
+ * Oldest first, active last. Absent for a `"Sealed"` bucket, whose
439
+ * in-memory state is torn down.
440
+ */
441
+ memtables?: Array<MemtableStats>
442
+ }
443
+
444
+ export interface ClientConfig {
445
+ userAgent?: string
446
+ retryConfig?: RetryConfig
447
+ timeoutConfig?: TimeoutConfig
448
+ extraHeaders?: Record<string, string>
449
+ idDelimiter?: string
450
+ tlsConfig?: TlsConfig
451
+ /**
452
+ * User identifier for tracking purposes.
453
+ *
454
+ * This is sent as the `x-lancedb-user-id` header in requests to LanceDB Cloud/Enterprise.
455
+ * It can be set directly, or via the `LANCEDB_USER_ID` environment variable.
456
+ * Alternatively, set `LANCEDB_USER_ID_ENV_KEY` to specify another environment
457
+ * variable that contains the user ID value.
458
+ */
459
+ userId?: string
460
+ }
461
+
462
+ /**
463
+ * A definition of a column alteration. The alteration changes the column at
464
+ * `path` to have the new name `name`, to be nullable if `nullable` is true,
465
+ * and to have the data type `data_type`. At least one of `rename` or `nullable`
466
+ * must be provided.
467
+ */
468
+ export interface ColumnAlteration {
469
+ /**
470
+ * The path to the column to alter. This is a dot-separated path to the column.
471
+ * If it is a top-level column then it is just the name of the column. If it is
472
+ * a nested column then it is the path to the column, e.g. "a.b.c" for a column
473
+ * `c` nested inside a column `b` nested inside a column `a`.
474
+ */
475
+ path: string
476
+ /**
477
+ * The new name of the column. If not provided then the name will not be changed.
478
+ * This must be distinct from the names of all other columns in the table.
479
+ */
480
+ rename?: string
481
+ /**
482
+ * A new data type for the column. If not provided then the data type will not be changed.
483
+ * Changing data types is limited to casting to the same general type. For example, these
484
+ * changes are valid:
485
+ * * `int32` -> `int64` (integers)
486
+ * * `double` -> `float` (floats)
487
+ * * `string` -> `large_string` (strings)
488
+ * But these changes are not:
489
+ * * `int32` -> `double` (mix integers and floats)
490
+ * * `string` -> `int32` (mix strings and integers)
491
+ */
492
+ dataType?: string
493
+ /** Set the new nullability. Note that a nullable column cannot be made non-nullable. */
494
+ nullable?: boolean
495
+ }
496
+
497
+ export interface ColumnOrdering {
498
+ ascending: boolean
499
+ nullsFirst: boolean
500
+ columnName: string
501
+ }
502
+
503
+ /** Statistics about a compaction operation. */
504
+ export interface CompactionStats {
505
+ /** The number of fragments removed */
506
+ fragmentsRemoved: number
507
+ /** The number of new, compacted fragments added */
508
+ fragmentsAdded: number
509
+ /** The number of data files removed */
510
+ filesRemoved: number
511
+ /** The number of new, compacted data files added */
512
+ filesAdded: number
513
+ }
514
+
515
+ export interface ConnectionOptions {
516
+ /**
517
+ * The interval, in seconds, at which to check for updates to the table
518
+ * from other processes. If None, then consistency is not checked. For
519
+ * performance reasons, this is the default. For strong consistency, set
520
+ * this to zero seconds. Then every read will check for updates from other
521
+ * processes. As a compromise, you can set this to a non-zero value for
522
+ * eventual consistency. If more than that interval has passed since the
523
+ * last check, then the table will be checked for updates. Note: this
524
+ * consistency only applies to read operations. Write operations are
525
+ * always consistent.
526
+ *
527
+ * Stronger consistency is not free. The smaller the interval, the more
528
+ * often each read pays the cost of checking for updates against object
529
+ * storage, raising per-read latency and cost.
530
+ */
531
+ readConsistencyInterval?: number
532
+ /**
533
+ * (For LanceDB OSS only): configuration for object storage.
534
+ *
535
+ * The available options are described at https://docs.lancedb.com/storage/
536
+ */
537
+ storageOptions?: Record<string, string>
538
+ /**
539
+ * (For LanceDB OSS only): use directory namespace manifests as the source
540
+ * of truth for table metadata. Existing directory-listed root tables are
541
+ * migrated into the manifest on access.
542
+ */
543
+ manifestEnabled?: boolean
544
+ /**
545
+ * (For LanceDB OSS only): extra properties for the backing namespace
546
+ * client used by manifest-enabled native connections.
547
+ */
548
+ namespaceClientProperties?: Record<string, string>
549
+ /**
550
+ * (For LanceDB OSS only): the session to use for this connection. Holds
551
+ * shared caches and other session-specific state.
552
+ */
553
+ session?: Session
554
+ /** (For LanceDB cloud only): configuration for the remote HTTP client. */
555
+ clientConfig?: ClientConfig
556
+ /**
557
+ * (For LanceDB cloud only): the API key to use with LanceDB Cloud.
558
+ *
559
+ * Can also be set via the environment variable `LANCEDB_API_KEY`.
560
+ */
561
+ apiKey?: string
562
+ /**
563
+ * (For LanceDB cloud only): the region to use for LanceDB cloud.
564
+ * Defaults to 'us-east-1'.
565
+ */
566
+ region?: string
567
+ /**
568
+ * (For LanceDB cloud only): the host to use for LanceDB cloud. Used
569
+ * for testing purposes.
570
+ */
571
+ hostOverride?: string
572
+ /**
573
+ * (For LanceDB cloud only): OAuth configuration for IdP-based
574
+ * authentication (e.g., Azure Entra ID). When set, token acquisition
575
+ * and refresh are handled entirely in Rust. TypeScript users should pass
576
+ * the public `OAuthConfig` type exported from `@lancedb/lancedb`.
577
+ */
578
+ oauthConfig?: OAuthConfig
579
+ }
580
+
581
+ export interface ConnectNamespaceOptions {
582
+ /**
583
+ * The interval, in seconds, at which to check for updates to the table
584
+ * from other processes. If None, then consistency is not checked. For
585
+ * performance reasons, this is the default. For strong consistency, set
586
+ * this to zero seconds. Then every read will check for updates from other
587
+ * processes. As a compromise, you can set this to a non-zero value for
588
+ * eventual consistency.
589
+ */
590
+ readConsistencyInterval?: number
591
+ /**
592
+ * Configuration for object storage. The available options are described
593
+ * at https://docs.lancedb.com/storage/
594
+ */
595
+ storageOptions?: Record<string, string>
596
+ /** Extra properties for the backing namespace client. */
597
+ namespaceClientProperties?: Record<string, string>
598
+ /**
599
+ * The session to use for this connection. Holds shared caches and other
600
+ * session-specific state.
601
+ */
602
+ session?: Session
603
+ }
604
+
605
+ export interface CreateNamespaceResponse {
606
+ properties?: Record<string, string>
607
+ transactionId?: string
608
+ }
609
+
610
+ export interface DeleteResult {
611
+ numDeletedRows: number
612
+ version: number
613
+ }
614
+
615
+ export interface DescribeNamespaceResponse {
616
+ properties?: Record<string, string>
617
+ }
618
+
619
+ export interface DropColumnsResult {
620
+ version: number
621
+ }
622
+
623
+ export interface DropNamespaceResponse {
624
+ properties?: Record<string, string>
625
+ transactionId?: Array<string>
626
+ }
627
+
628
+ /**
629
+ * A per-field metadata update, addressed by dot-path. Merges into the field's
630
+ * existing metadata by default; a `null` value deletes a key, and `replace`
631
+ * swaps the field's entire metadata map.
632
+ */
633
+ export interface FieldMetadataUpdate {
634
+ /** Dot-separated path to the field (e.g. "embedding" or "a.b.c"). */
635
+ path: string
636
+ /** Metadata keys to set; a `null` value deletes that key. */
637
+ metadata: Record<string, string | undefined | null>
638
+ /** If true, replace the field's entire metadata map instead of merging. */
639
+ replace?: boolean
640
+ }
641
+
642
+ export interface FragmentStatistics {
643
+ /** The number of fragments in the table */
644
+ numFragments: number
645
+ /** The number of uncompacted fragments in the table */
646
+ numSmallFragments: number
647
+ /** Statistics on the number of rows in the table fragments */
648
+ lengths: FragmentSummaryStats
649
+ }
650
+
651
+ export interface FragmentSummaryStats {
652
+ /** The number of rows in the fragment with the fewest rows */
653
+ min: number
654
+ /** The number of rows in the fragment with the most rows */
655
+ max: number
656
+ /** The mean number of rows in the fragments */
657
+ mean: number
658
+ /** The 25th percentile of number of rows in the fragments */
659
+ p25: number
660
+ /** The 50th percentile of number of rows in the fragments */
661
+ p50: number
662
+ /** The 75th percentile of number of rows in the fragments */
663
+ p75: number
664
+ /** The 99th percentile of number of rows in the fragments */
665
+ p99: number
666
+ }
667
+
668
+ /** A token produced by the tokenizer configured on a full-text search index. */
669
+ export interface FtsToken {
670
+ /** The token text after the index tokenizer has applied its filters. */
671
+ text: string
672
+ /** The token position used by full-text query matching. */
673
+ position: number
674
+ }
675
+
676
+ /** One flushed L0 generation. */
677
+ export interface GenerationStats {
678
+ /** The generation number. Increases as memtables are sealed into L0. */
679
+ generation: number
680
+ /** On-disk size of the generation. */
681
+ bytes: number
682
+ /**
683
+ * Present only when `includeGenerationRows` was requested. Off by default
684
+ * because each count opens an uncached Lance dataset.
685
+ */
686
+ rows?: number
687
+ }
688
+
689
+ /** A description of an index currently configured on a column */
690
+ export interface IndexConfig {
691
+ /** The name of the index */
692
+ name: string
693
+ /** The type of the index */
694
+ indexType: string
695
+ /**
696
+ * The columns in the index
697
+ *
698
+ * Currently this is always an array of size 1. In the future there may
699
+ * be more columns to represent composite indices.
700
+ */
701
+ columns: Array<string>
702
+ /**
703
+ * The UUID of the first segment of the index.
704
+ *
705
+ * `undefined` for remote tables, which do not yet surface this.
706
+ */
707
+ indexUuid?: string
708
+ /**
709
+ * The protobuf type URL, a precise type identifier for the index.
710
+ *
711
+ * `undefined` for remote tables.
712
+ */
713
+ typeUrl?: string
714
+ /**
715
+ * When the index was created.
716
+ *
717
+ * `undefined` for remote tables or indices created before timestamps were tracked.
718
+ */
719
+ createdAt?: Date
720
+ /**
721
+ * The number of rows indexed, across all segments.
722
+ *
723
+ * `undefined` for remote tables.
724
+ */
725
+ numIndexedRows?: number
726
+ /**
727
+ * The number of rows not yet covered by this index.
728
+ *
729
+ * `undefined` for remote tables.
730
+ */
731
+ numUnindexedRows?: number
732
+ /**
733
+ * The total size in bytes of all index files across all segments.
734
+ *
735
+ * `undefined` for remote tables or indices without size tracking.
736
+ */
737
+ sizeBytes?: number
738
+ /**
739
+ * The number of segments that make up the index.
740
+ *
741
+ * `undefined` for remote tables.
742
+ */
743
+ numSegments?: number
744
+ /**
745
+ * The on-disk index format version.
746
+ *
747
+ * `undefined` for remote tables.
748
+ */
749
+ indexVersion?: number
750
+ /**
751
+ * Index-type-specific details parsed as a JavaScript object.
752
+ *
753
+ * Falls back to a raw string if JSON parsing fails. `undefined` for
754
+ * remote tables or when details are unavailable.
755
+ */
756
+ indexDetails?: any
757
+ }
758
+
759
+ export interface IndexStatistics {
760
+ /** The number of rows indexed by the index */
761
+ numIndexedRows: number
762
+ /** The number of rows not indexed */
763
+ numUnindexedRows: number
764
+ /** The type of the index */
765
+ indexType: string
766
+ /**
767
+ * The type of the distance function used by the index. This is only
768
+ * present for vector indices. Scalar and full text search indices do
769
+ * not have a distance function.
770
+ */
771
+ distanceType?: string
772
+ /** The number of parts this index is split into. */
773
+ numIndices?: number
774
+ }
775
+
776
+ /** A described job from `Connection.getJob`. */
777
+ export interface JobDescription {
778
+ jobId: string
779
+ jobType: string
780
+ /** Lifecycle state: "running", "finished", "failed", or "cancelled". */
781
+ state: string
782
+ /** When the job was created, in milliseconds since the epoch. */
783
+ creationMs: number
784
+ /** The job-type-specific specification as a JSON string, when present. */
785
+ specJson?: string
786
+ /**
787
+ * Why the job failed, when the job is failed and the server reports a
788
+ * reason.
789
+ */
790
+ failure?: JobFailureInfo
791
+ }
792
+
793
+ /** The server's account of why a job failed. */
794
+ export interface JobFailureInfo {
795
+ phase?: string
796
+ message?: string
797
+ retryable?: boolean
798
+ }
799
+
800
+ /** A row from `Connection.listJobs`: one server-side job. */
801
+ export interface JobInfo {
802
+ /**
803
+ * The job id -- what `Connection.getJob` and `Connection.cancelJob`
804
+ * accept.
805
+ */
806
+ jobId: string
807
+ /** The table the job runs against, without URI or namespace. */
808
+ table: string
809
+ jobType: string
810
+ /** Lifecycle state: "running", "finished", "failed", or "cancelled". */
811
+ state: string
812
+ /** When the job was created, in milliseconds since the epoch. */
813
+ createdAtMillis: number
814
+ }
815
+
816
+ /** The catalog of described LanceDB metrics. Empty until the recorder is installed. */
817
+ export declare function lancedbMetricsCatalog(): Array<MetricDescription>
818
+
819
+ export interface ListNamespacesResponse {
820
+ namespaces: Array<string>
821
+ pageToken?: string
822
+ }
823
+
824
+ export interface ListTablesResponse {
825
+ tables: Array<string>
826
+ pageToken?: string
827
+ }
828
+
829
+ /**
830
+ * Live per-bucket LSM state, as returned by `Table#getLsmStats`.
831
+ *
832
+ * Nothing here is derived: sums and differences (total L0 bytes, WAL lag) are
833
+ * the caller's to compute.
834
+ */
835
+ export interface LsmStats {
836
+ /** One entry per bucket backing this table. */
837
+ buckets: Array<BucketStats>
838
+ }
839
+
840
+ /**
841
+ * Specification selecting Lance's MemWAL LSM-style write path for
842
+ * `mergeInsert`.
843
+ *
844
+ * `specType` must be `"bucket"`, `"identity"`, or `"unsharded"`. For
845
+ * `"bucket"`, `column` and `numBuckets` are required; for `"identity"`,
846
+ * `column` is required.
847
+ */
848
+ export interface LsmWriteSpec {
849
+ /** One of `"bucket"`, `"identity"`, or `"unsharded"`. */
850
+ specType: string
851
+ /** Bucket and identity variants: the sharding column. */
852
+ column?: string
853
+ /** Bucket variant: the number of buckets, in `[1, 1024]`. */
854
+ numBuckets?: number
855
+ /**
856
+ * Indexes the MemWAL keeps up to date. Omitted resolves every
857
+ * maintainable index on install; an empty array means none.
858
+ */
859
+ maintainedIndexes?: Array<string>
860
+ /** Default `ShardWriter` configuration recorded in the MemWAL index. */
861
+ writerConfigDefaults?: Record<string, string>
862
+ }
863
+
864
+ /** One in-memory memtable. */
865
+ export interface MemtableStats {
866
+ /** The generation this memtable will become once sealed. */
867
+ generation: number
868
+ /** Rows currently buffered. */
869
+ rows: number
870
+ /** Estimated in-memory size. */
871
+ bytes: number
872
+ /** Record batches currently buffered. */
873
+ batches: number
874
+ /**
875
+ * Names of the indexes this memtable carries. An absent name is the whole
876
+ * answer to "why is my fresh-tier search on that column brute-force".
877
+ */
878
+ indexes: Array<string>
879
+ }
880
+
881
+ export interface MergeResult {
882
+ version: number
883
+ numInsertedRows: number
884
+ numUpdatedRows: number
885
+ numDeletedRows: number
886
+ numAttempts: number
887
+ numRows: number
888
+ }
889
+
890
+ /** One cumulative histogram bucket: all samples with value `<= le`. */
891
+ export interface MetricBucket {
892
+ /** The inclusive upper bound of the bucket, or `"+Inf"` for the final bucket. */
893
+ le: string
894
+ /** Cumulative number of samples less than or equal to `le`. */
895
+ cumulativeCount: number
896
+ }
897
+
898
+ /** A described metric, used by the JavaScript layer to create instruments up front. */
899
+ export interface MetricDescription {
900
+ name: string
901
+ kind: string
902
+ unit?: string
903
+ description: string
904
+ }
905
+
906
+ /**
907
+ * One aggregated metric data point. For counters and gauges only `value` is
908
+ * set; for histograms `buckets` (cumulative `le` counts), `count`, and `sum`
909
+ * are set.
910
+ */
911
+ export interface MetricPoint {
912
+ name: string
913
+ kind: string
914
+ attributes: Record<string, string>
915
+ value?: number
916
+ buckets?: Array<MetricBucket>
917
+ count?: number
918
+ sum?: number
919
+ }
920
+
921
+ /**
922
+ * OAuth configuration for LanceDB authentication.
923
+ *
924
+ * This is the generated napi-rs binding shape. TypeScript users should prefer
925
+ * the public `OAuthConfig` type exported from `@lancedb/lancedb`.
926
+ *
927
+ * All token acquisition and refresh is handled in the Rust layer.
928
+ */
929
+ export interface OAuthConfig {
930
+ /**
931
+ * OIDC issuer URL or OAuth authority URL.
932
+ * For Azure: `https://login.microsoftonline.com/{tenant_id}/v2.0`
933
+ */
934
+ issuerUrl: string
935
+ /** Application / Client ID. */
936
+ clientId: string
937
+ /**
938
+ * OAuth scopes to request. For Azure managed identity, exactly one scope
939
+ * or resource is required. For example: `["api://{app_id}/.default"]`
940
+ */
941
+ scopes: Array<string>
942
+ /** Authentication flow: "client_credentials" or "azure_managed_identity" */
943
+ flow?: string
944
+ /** Client secret (required for client_credentials). */
945
+ clientSecret?: string
946
+ /** Client ID for user-assigned managed identity (azure_managed_identity). */
947
+ managedIdentityClientId?: string
948
+ /**
949
+ * Seconds before expiry to trigger proactive refresh (default: 300).
950
+ * Keep this well below the token TTL; if it is greater than or equal to
951
+ * the TTL, each request refreshes the token.
952
+ */
953
+ refreshBufferSecs?: number
954
+ }
955
+
956
+ export interface OpenTableOptions {
957
+ storageOptions?: Record<string, string>
958
+ }
959
+
960
+ /** Statistics about an optimize operation */
961
+ export interface OptimizeStats {
962
+ /** Statistics about the compaction operation */
963
+ compaction: CompactionStats
964
+ /** Statistics about the removal operation */
965
+ prune: RemovalStats
966
+ }
967
+
968
+ /** Create a permutation builder for the given table */
969
+ export declare function permutationBuilder(table: Table): PermutationBuilder
970
+
971
+ export interface RefreshColumnResult {
972
+ rowsFilled: number
973
+ version: number
974
+ }
975
+
976
+ export interface RefreshMaterializedViewResult {
977
+ /** How the view was brought up to date: "rebuild", "incremental" or "no_op". */
978
+ mode: string
979
+ rowsWritten: number
980
+ sourceVersion: number
981
+ version: number
982
+ }
983
+
984
+ /**
985
+ * Install the LanceDB metrics recorder as the process-global `metrics` recorder.
986
+ *
987
+ * Returns `true` if the recorder is installed (now or previously). Returns
988
+ * `false` if a *different* recorder is already installed — `metrics` allows
989
+ * only one global recorder per process, so LanceDB cannot coexist with another.
990
+ */
991
+ export declare function registerLancedbMetricsRecorder(): boolean
992
+
993
+ /** Statistics about a cleanup operation */
994
+ export interface RemovalStats {
995
+ /** The number of bytes removed */
996
+ bytesRemoved: number
997
+ /** The number of old versions removed */
998
+ oldVersionsRemoved: number
999
+ }
1000
+
1001
+ export interface RerankHybridCallbackArgs {
1002
+ query: string
1003
+ vecResults: Buffer
1004
+ ftsResults: Buffer
1005
+ }
1006
+
1007
+ /** Retry configuration for the remote HTTP client. */
1008
+ export interface RetryConfig {
1009
+ /**
1010
+ * The maximum number of retries for a request. Default is 3. You can also
1011
+ * set this via the environment variable `LANCE_CLIENT_MAX_RETRIES`.
1012
+ */
1013
+ retries?: number
1014
+ /**
1015
+ * The maximum number of retries for connection errors. Default is 3. You
1016
+ * can also set this via the environment variable `LANCE_CLIENT_CONNECT_RETRIES`.
1017
+ */
1018
+ connectRetries?: number
1019
+ /**
1020
+ * The maximum number of retries for read errors. Default is 3. You can also
1021
+ * set this via the environment variable `LANCE_CLIENT_READ_RETRIES`.
1022
+ */
1023
+ readRetries?: number
1024
+ /**
1025
+ * The backoff factor to apply between retries. Default is 0.25. Between each retry
1026
+ * the client will wait for the amount of seconds:
1027
+ * `{backoff factor} * (2 ** ({number of previous retries}))`. So for the default
1028
+ * of 0.25, the first retry will wait 0.25 seconds, the second retry will wait 0.5
1029
+ * seconds, the third retry will wait 1 second, etc.
1030
+ *
1031
+ * You can also set this via the environment variable
1032
+ * `LANCE_CLIENT_RETRY_BACKOFF_FACTOR`.
1033
+ */
1034
+ backoffFactor?: number
1035
+ /**
1036
+ * The jitter to apply to the backoff factor, in seconds. Default is 0.25.
1037
+ *
1038
+ * A random value between 0 and `backoff_jitter` will be added to the backoff
1039
+ * factor in seconds. So for the default of 0.25 seconds, between 0 and 250
1040
+ * milliseconds will be added to the sleep between each retry.
1041
+ *
1042
+ * You can also set this via the environment variable
1043
+ * `LANCE_CLIENT_RETRY_BACKOFF_JITTER`.
1044
+ */
1045
+ backoffJitter?: number
1046
+ /**
1047
+ * The HTTP status codes for which to retry the request. Default is
1048
+ * [429, 500, 502, 503].
1049
+ *
1050
+ * You can also set this via the environment variable
1051
+ * `LANCE_CLIENT_RETRY_STATUSES`. Use a comma-separated list of integers.
1052
+ */
1053
+ statuses?: Array<number>
1054
+ }
1055
+
1056
+ export interface ShuffleOptions {
1057
+ seed?: number
1058
+ clumpSize?: number
1059
+ }
1060
+
1061
+ /**
1062
+ * A point-in-time snapshot of every recorded metric. Empty until the recorder
1063
+ * is installed.
1064
+ */
1065
+ export declare function snapshotLancedbMetrics(): Array<MetricPoint>
1066
+
1067
+ export interface SplitCalculatedOptions {
1068
+ calculation: string
1069
+ splitNames?: Array<string>
1070
+ }
1071
+
1072
+ export interface SplitHashOptions {
1073
+ columns: Array<string>
1074
+ splitWeights: Array<number>
1075
+ discardWeight?: number
1076
+ splitNames?: Array<string>
1077
+ }
1078
+
1079
+ export interface SplitRandomOptions {
1080
+ ratios?: Array<number>
1081
+ counts?: Array<number>
1082
+ fixed?: number
1083
+ seed?: number
1084
+ clumpSize?: number
1085
+ splitNames?: Array<string>
1086
+ }
1087
+
1088
+ export interface SplitSequentialOptions {
1089
+ ratios?: Array<number>
1090
+ counts?: Array<number>
1091
+ fixed?: number
1092
+ splitNames?: Array<string>
1093
+ }
1094
+
1095
+ export interface TableStatistics {
1096
+ /**
1097
+ * The total size, in bytes, of the table's data files, index files, and
1098
+ * overlay files
1099
+ *
1100
+ * Read from the manifest, so this excludes deletion files and manifests.
1101
+ */
1102
+ totalBytes: number
1103
+ /** The number of rows in the table */
1104
+ numRows: number
1105
+ /** The number of indices in the table */
1106
+ numIndices: number
1107
+ /** Statistics on table fragments */
1108
+ fragmentStats: FragmentStatistics
1109
+ }
1110
+
1111
+ /** Timeout configuration for remote HTTP client. */
1112
+ export interface TimeoutConfig {
1113
+ /**
1114
+ * The overall timeout for the entire request in seconds. This includes
1115
+ * connection, send, and read time. If the entire request doesn't complete
1116
+ * within this time, it will fail. Default is None (no overall timeout).
1117
+ * This can also be set via the environment variable `LANCE_CLIENT_TIMEOUT`,
1118
+ * as an integer number of seconds.
1119
+ */
1120
+ timeout?: number
1121
+ /**
1122
+ * The timeout for establishing a connection in seconds. Default is 120
1123
+ * seconds (2 minutes). This can also be set via the environment variable
1124
+ * `LANCE_CLIENT_CONNECT_TIMEOUT`, as an integer number of seconds.
1125
+ */
1126
+ connectTimeout?: number
1127
+ /**
1128
+ * The timeout for reading data from the server in seconds. Default is 300
1129
+ * seconds (5 minutes). This can also be set via the environment variable
1130
+ * `LANCE_CLIENT_READ_TIMEOUT`, as an integer number of seconds.
1131
+ */
1132
+ readTimeout?: number
1133
+ /**
1134
+ * The timeout for keeping idle connections in the connection pool in seconds.
1135
+ * Default is 300 seconds (5 minutes). This can also be set via the
1136
+ * environment variable `LANCE_CLIENT_CONNECTION_TIMEOUT`, as an integer
1137
+ * number of seconds.
1138
+ */
1139
+ poolIdleTimeout?: number
1140
+ }
1141
+
1142
+ /** TLS/mTLS configuration for the remote HTTP client. */
1143
+ export interface TlsConfig {
1144
+ /** Path to the client certificate file (PEM format) for mTLS authentication. */
1145
+ certFile?: string
1146
+ /** Path to the client private key file (PEM format) for mTLS authentication. */
1147
+ keyFile?: string
1148
+ /** Path to the CA certificate file (PEM format) for server verification. */
1149
+ sslCaCert?: string
1150
+ /** Whether to verify the hostname in the server's certificate. */
1151
+ assertHostname?: boolean
1152
+ }
1153
+
1154
+ export declare function tokenize(query: string, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null): Array<FtsToken>
1155
+
1156
+ export interface UpdateFieldMetadataResult {
1157
+ version: number
1158
+ }
1159
+
1160
+ export interface UpdateResult {
1161
+ rowsUpdated: number
1162
+ version: number
1163
+ }
1164
+
1165
+ export interface Version {
1166
+ version: number
1167
+ timestamp: number
1168
+ metadata: Record<string, string>
1169
+ }
1170
+
1171
+ /**
1172
+ * Progress snapshot for a write operation, delivered to the JS callback
1173
+ * passed to `Table.add`.
1174
+ */
1175
+ export interface WriteProgressInfo {
1176
+ /** Number of rows written so far. */
1177
+ outputRows: number
1178
+ /** Number of bytes written so far. */
1179
+ outputBytes: number
1180
+ /**
1181
+ * Total rows expected, if the input source reports it.
1182
+ * Always set on the final callback (where `done` is `true`).
1183
+ */
1184
+ totalRows?: number
1185
+ /** Wall-clock seconds since monitoring started. */
1186
+ elapsedSeconds: number
1187
+ /** Number of parallel write tasks currently in flight. */
1188
+ activeTasks: number
1189
+ /** Total number of parallel write tasks (the write parallelism). */
1190
+ totalTasks: number
1191
+ /** `true` for the final callback; `false` otherwise. */
1192
+ done: boolean
1193
+ }