@visulima/vis 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (172) hide show
  1. package/CHANGELOG.md +1117 -24
  2. package/LICENSE.md +11958 -0
  3. package/README.md +344 -20
  4. package/dashboard/dist/index.html +152 -0
  5. package/dist/bin.js +1 -146
  6. package/dist/binx.js +3 -0
  7. package/dist/config/index.d.ts +3154 -0
  8. package/dist/config/index.js +1 -0
  9. package/dist/generate/index.d.ts +157 -0
  10. package/dist/generate/index.js +1 -0
  11. package/dist/packem_chunks/bin.js +1415 -0
  12. package/dist/packem_chunks/bloom-status.js +2 -0
  13. package/dist/packem_chunks/bloom-sync.js +2 -0
  14. package/dist/packem_chunks/cache-attestation.js +1 -0
  15. package/dist/packem_chunks/config.js +19 -0
  16. package/dist/packem_chunks/devtools.js +82 -0
  17. package/dist/packem_chunks/doctor-probe.js +2 -0
  18. package/dist/packem_chunks/fix.js +11 -0
  19. package/dist/packem_chunks/handler.js +1 -0
  20. package/dist/packem_chunks/handler10.js +1 -0
  21. package/dist/packem_chunks/handler11.js +5 -0
  22. package/dist/packem_chunks/handler12.js +1 -0
  23. package/dist/packem_chunks/handler13.js +27 -0
  24. package/dist/packem_chunks/handler14.js +5 -0
  25. package/dist/packem_chunks/handler15.js +1 -0
  26. package/dist/packem_chunks/handler16.js +1 -0
  27. package/dist/packem_chunks/handler17.js +1 -0
  28. package/dist/packem_chunks/handler18.js +1 -0
  29. package/dist/packem_chunks/handler19.js +1 -0
  30. package/dist/packem_chunks/handler2.js +4 -0
  31. package/dist/packem_chunks/handler20.js +5 -0
  32. package/dist/packem_chunks/handler21.js +2 -0
  33. package/dist/packem_chunks/handler22.js +2 -0
  34. package/dist/packem_chunks/handler23.js +1 -0
  35. package/dist/packem_chunks/handler24.js +1 -0
  36. package/dist/packem_chunks/handler25.js +5 -0
  37. package/dist/packem_chunks/handler26.js +1 -0
  38. package/dist/packem_chunks/handler27.js +3 -0
  39. package/dist/packem_chunks/handler28.js +1 -0
  40. package/dist/packem_chunks/handler29.js +7 -0
  41. package/dist/packem_chunks/handler3.js +4 -0
  42. package/dist/packem_chunks/handler30.js +33 -0
  43. package/dist/packem_chunks/handler31.js +3 -0
  44. package/dist/packem_chunks/handler32.js +8 -0
  45. package/dist/packem_chunks/handler33.js +1 -0
  46. package/dist/packem_chunks/handler34.js +5 -0
  47. package/dist/packem_chunks/handler35.js +11 -0
  48. package/dist/packem_chunks/handler36.js +3 -0
  49. package/dist/packem_chunks/handler37.js +22 -0
  50. package/dist/packem_chunks/handler38.js +61 -0
  51. package/dist/packem_chunks/handler39.js +3 -0
  52. package/dist/packem_chunks/handler4.js +6 -0
  53. package/dist/packem_chunks/handler40.js +6 -0
  54. package/dist/packem_chunks/handler41.js +24 -0
  55. package/dist/packem_chunks/handler42.js +153 -0
  56. package/dist/packem_chunks/handler43.js +25 -0
  57. package/dist/packem_chunks/handler44.js +10 -0
  58. package/dist/packem_chunks/handler45.js +708 -0
  59. package/dist/packem_chunks/handler46.js +24 -0
  60. package/dist/packem_chunks/handler47.js +322 -0
  61. package/dist/packem_chunks/handler48.js +48 -0
  62. package/dist/packem_chunks/handler49.js +3 -0
  63. package/dist/packem_chunks/handler5.js +8 -0
  64. package/dist/packem_chunks/handler50.js +27 -0
  65. package/dist/packem_chunks/handler51.js +195 -0
  66. package/dist/packem_chunks/handler52.js +34 -0
  67. package/dist/packem_chunks/handler6.js +1 -0
  68. package/dist/packem_chunks/handler7.js +1 -0
  69. package/dist/packem_chunks/handler8.js +1 -0
  70. package/dist/packem_chunks/handler9.js +1 -0
  71. package/dist/packem_chunks/heal-accept.js +10 -0
  72. package/dist/packem_chunks/heal.js +14 -0
  73. package/dist/packem_chunks/help-command.js +8 -0
  74. package/dist/packem_chunks/index.js +7 -0
  75. package/dist/packem_chunks/keys-refresh.js +4 -0
  76. package/dist/packem_chunks/list.js +3 -0
  77. package/dist/packem_chunks/loader.js +4 -0
  78. package/dist/packem_chunks/loader2.js +1 -0
  79. package/dist/packem_chunks/prune.js +3 -0
  80. package/dist/packem_chunks/run.js +1 -0
  81. package/dist/packem_chunks/status.js +2 -0
  82. package/dist/packem_chunks/sync.js +2 -0
  83. package/dist/packem_chunks/sync2.js +2 -0
  84. package/dist/packem_chunks/tar.js +3 -0
  85. package/dist/packem_chunks/tripwire.js +2 -0
  86. package/dist/packem_chunks/verify-lockfile.js +2 -0
  87. package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +12 -0
  88. package/dist/packem_shared/_commonjsHelpers-CLblCigl.js +1 -0
  89. package/dist/packem_shared/advisories-BxXiKFbL.js +1 -0
  90. package/dist/packem_shared/affected-shas-BdnlfiV1.js +1 -0
  91. package/dist/packem_shared/ai-analysis-KP8b5lc0.js +68 -0
  92. package/dist/packem_shared/ai-fix-BkPUHA0z.js +43 -0
  93. package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
  94. package/dist/packem_shared/applyDefaults-BogleaFi.js +1 -0
  95. package/dist/packem_shared/build-scripts-DE6U8jVq.js +1 -0
  96. package/dist/packem_shared/cyclonedx-BpGVHqSW.js +4 -0
  97. package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
  98. package/dist/packem_shared/dependency-scan-BUbOcMwX.js +1 -0
  99. package/dist/packem_shared/docker-CTE3s4LW.js +60 -0
  100. package/dist/packem_shared/failure-log-34Wl3npC.js +2 -0
  101. package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
  102. package/dist/packem_shared/glob-D_7bct6p-D8itOHsr.js +1 -0
  103. package/dist/packem_shared/index-D1xC1Y_R.js +1 -0
  104. package/dist/packem_shared/index-DH-5hsrC.js +1 -0
  105. package/dist/packem_shared/index-hoWfZmNo.js +30 -0
  106. package/dist/packem_shared/license-zZU7aavK.js +1 -0
  107. package/dist/packem_shared/lifecycle-CXaqPGAQ.js +2 -0
  108. package/dist/packem_shared/lockfile-CrT86D6d.js +1 -0
  109. package/dist/packem_shared/lockfile-Cu2BH6bl.js +1 -0
  110. package/dist/packem_shared/manifests-BzWpKW8F.js +1 -0
  111. package/dist/packem_shared/min-release-age-BPVXwPUg.js +34 -0
  112. package/dist/packem_shared/native-config-sync-BRZZetn3.js +21 -0
  113. package/dist/packem_shared/osv-bloom-DSZcHLsM.js +2 -0
  114. package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
  115. package/dist/packem_shared/peer-warnings-EvSJ18gE.js +1 -0
  116. package/dist/packem_shared/pm-runner-DmKT2FqF.js +1 -0
  117. package/dist/packem_shared/provenance-DkCA8BrN.js +1 -0
  118. package/dist/packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js +1 -0
  119. package/dist/packem_shared/registry-keys-Mixm4eAY.js +1 -0
  120. package/dist/packem_shared/resolve-explicit-D5E72FfN.js +5 -0
  121. package/dist/packem_shared/runtime-check-CilFOqUU.js +1 -0
  122. package/dist/packem_shared/s1ngularity-Qxc6tRRI.js +1 -0
  123. package/dist/packem_shared/scan-progress-DVtCtI2z.js +2 -0
  124. package/dist/packem_shared/selectors-DkgYFzdq.js +3 -0
  125. package/dist/packem_shared/signatures-byuFrtAH.js +2 -0
  126. package/dist/packem_shared/spinner-C8xs6QZv.js +1 -0
  127. package/dist/packem_shared/spinners-f91Rbo99-Bjf3NcO0.js +1 -0
  128. package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
  129. package/dist/packem_shared/tabs-xZkm6Y_J.js +1 -0
  130. package/dist/packem_shared/toolchain-DoG6b_G_.js +5 -0
  131. package/dist/packem_shared/typosquats-BiDxQj7R.js +1 -0
  132. package/dist/packem_shared/use-measured-height-Lea6TCVD.js +1 -0
  133. package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
  134. package/dist/packem_shared/verify-cLcZwKqe.js +1 -0
  135. package/dist/packem_shared/vis-update-app-BCKzlqj8.js +1 -0
  136. package/dist/packem_shared/watch-DEL0yol9.js +1 -0
  137. package/dist/packem_shared/watch-loop-C31Ar7BX.js +11 -0
  138. package/index.d.ts +436 -0
  139. package/index.js +613 -0
  140. package/package.json +71 -26
  141. package/schemas/project.schema.json +991 -0
  142. package/schemas/vis-config.schema.json +4958 -0
  143. package/skills/vis/SKILL.md +96 -0
  144. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  145. package/templates/buildkite-ci/template.yml +20 -0
  146. package/dist/ai-analysis.d.ts +0 -40
  147. package/dist/ai-cache.d.ts +0 -21
  148. package/dist/bin.d.ts +0 -1
  149. package/dist/catalog.d.ts +0 -110
  150. package/dist/commands/affected.d.ts +0 -3
  151. package/dist/commands/ai.d.ts +0 -3
  152. package/dist/commands/analyze.d.ts +0 -3
  153. package/dist/commands/check.d.ts +0 -3
  154. package/dist/commands/graph.d.ts +0 -3
  155. package/dist/commands/hook/constants.d.ts +0 -8
  156. package/dist/commands/hook/index.d.ts +0 -3
  157. package/dist/commands/hook/install.d.ts +0 -7
  158. package/dist/commands/hook/migrate.d.ts +0 -27
  159. package/dist/commands/hook/uninstall.d.ts +0 -3
  160. package/dist/commands/migrate/constants.d.ts +0 -12
  161. package/dist/commands/migrate/deps.d.ts +0 -32
  162. package/dist/commands/migrate/index.d.ts +0 -3
  163. package/dist/commands/migrate/json.d.ts +0 -20
  164. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  165. package/dist/commands/migrate/types.d.ts +0 -20
  166. package/dist/commands/run.d.ts +0 -3
  167. package/dist/commands/staged.d.ts +0 -3
  168. package/dist/commands/update.d.ts +0 -3
  169. package/dist/config.d.ts +0 -40
  170. package/dist/config.js +0 -1
  171. package/dist/package-manager.d.ts +0 -23
  172. package/dist/workspace.d.ts +0 -58
package/index.d.ts ADDED
@@ -0,0 +1,436 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ /**
4
+ * Opaque handle wrapping a decoded `BloomFilter`. JS calls back into
5
+ * `osv_bloom_probe` / `osv_bloom_probe_batch` with this handle. Arc so
6
+ * the same filter can fan out to multiple probe calls without copying
7
+ * the bitset.
8
+ */
9
+ export declare class OsvBloomHandle {
10
+ /**
11
+ * `n` field from the filter header — entry count the upstream
12
+ * builder inserted. Exposed for `vis advisories bloom status`.
13
+ */
14
+ get entriesInserted(): number;
15
+ /**
16
+ * `m` field — bit count. Returned as a decimal string so the full
17
+ * u64 round-trips without JS-Number precision loss; today's filter
18
+ * is ~3.1M bits but the wire format reserves 64-bit headroom.
19
+ */
20
+ get bitCountString(): string;
21
+ /** `k` field — hash-function count per probe. */
22
+ get hashCount(): number;
23
+ /**
24
+ * `built_at_unix_seconds` — UNIX seconds the upstream builder
25
+ * recorded, as a decimal string. JS reconstructs via
26
+ * `new Date(Number(s) * 1000)`. Use this in status output rather
27
+ * than the local fetch time.
28
+ */
29
+ get builtAtUnixSecondsString(): string;
30
+ /**
31
+ * `format_version` — currently 1. Surfaced so JS can flag a
32
+ * version-mismatch warning without re-decoding.
33
+ */
34
+ get formatVersion(): number;
35
+ }
36
+
37
+ export interface AddOptions {
38
+ packages: Array<string>;
39
+ saveDev: boolean;
40
+ exact: boolean;
41
+ peer: boolean;
42
+ optional: boolean;
43
+ global: boolean;
44
+ workspace: boolean;
45
+ workspaceRoot: boolean;
46
+ filter: Array<string>;
47
+ }
48
+
49
+ /**
50
+ * Ingest one OSV ecosystem dump into the local SQLite. Async because the
51
+ * zip → JSON → INSERT pipeline can take seconds; we run it on a libuv worker
52
+ * so the main JS thread is free.
53
+ */
54
+ export declare function advisoriesIngest(options: AdvisoryIngestOptions, onProgress: (current: number, total: number) => void): Promise<AdvisoryIngestResult>;
55
+
56
+ /**
57
+ * Synchronous query path. Returns one `AdvisoryQueryResult` per input,
58
+ * preserving order, so callers can zip back to their lockfile rows by index.
59
+ */
60
+ export declare function advisoriesQuery(dbPath: string, queries: Array<AdvisoryQuery>): Array<AdvisoryQueryResult>;
61
+
62
+ export declare function advisoriesStatus(dbPath: string): AdvisoryDbStatus;
63
+
64
+ export interface AdvisoryDbStatus {
65
+ exists: boolean;
66
+ ecosystems: Array<AdvisoryEcosystemStatus>;
67
+ sizeBytes: number;
68
+ schemaVersion: number;
69
+ }
70
+
71
+ export interface AdvisoryEcosystemStatus {
72
+ name: string;
73
+ advisoryCount: number;
74
+ lastSyncIso: string;
75
+ manifestEtag?: string;
76
+ }
77
+
78
+ export interface AdvisoryIngestOptions {
79
+ /** Path to a previously-downloaded OSV dump zip on disk. */
80
+ zipPath: string;
81
+ dbPath: string;
82
+ ecosystem: string;
83
+ /**
84
+ * HTTP ETag header to write into the `manifest_etag` meta row for this
85
+ * ecosystem. `null` when the server didn't send one.
86
+ */
87
+ manifestEtag?: string;
88
+ }
89
+
90
+ export interface AdvisoryIngestResult {
91
+ advisoriesIngested: number;
92
+ durationMs: number;
93
+ }
94
+
95
+ export interface AdvisoryQuery {
96
+ ecosystem: string;
97
+ name: string;
98
+ version: string;
99
+ }
100
+
101
+ export interface AdvisoryQueryResult {
102
+ name: string;
103
+ version: string;
104
+ vulnerabilities: Array<NativeVulnerabilityJs>;
105
+ }
106
+
107
+ /**
108
+ * Returns the full prek-identify tag universe. Used by the vis migrator
109
+ * to validate `types:` / `types_or:` / `exclude_types:` filters in
110
+ * migrated `.pre-commit-config.yaml` files — anything outside this set
111
+ * (and outside the vis-specific overlay) is surfaced as a warning.
112
+ */
113
+ export declare function allKnownTags(): Array<string>;
114
+
115
+ export interface CleanResult {
116
+ /** Directories that were removed */
117
+ removed: Array<string>;
118
+ /** Directories that failed to remove (with error messages) */
119
+ errors: Array<string>;
120
+ /** Lockfiles that were removed (when --lockfile flag used) */
121
+ lockfilesRemoved: Array<string>;
122
+ }
123
+
124
+ /**
125
+ * Safely removes all node_modules directories in a workspace.
126
+ *
127
+ * Uses Rust's `fs::remove_dir_all` which correctly handles symlinks and
128
+ * NTFS junctions on Windows without following them into targets.
129
+ *
130
+ * When `remove_lockfile` is true, also removes lockfiles from the root.
131
+ */
132
+ export declare function cleanWorkspace(root: string, removeLockfile: boolean): CleanResult;
133
+
134
+ export interface DetectedPackageManager {
135
+ /** The package manager name: "pnpm", "npm", "yarn", "bun", or "deno" */
136
+ name: string;
137
+ /** The version string from packageManager field, or None if unknown */
138
+ version?: string;
139
+ /**
140
+ * Build metadata (sha256 hash) appended to packageManager field by
141
+ * corepack. `parts[1].split('+').next()` strips it from `version`;
142
+ * this field preserves it for callers that want to verify the pin.
143
+ */
144
+ buildMeta?: string;
145
+ /** Whether this is a monorepo/workspace */
146
+ isWorkspace: boolean;
147
+ }
148
+
149
+ /**
150
+ * Detects the package manager for the project at the given path.
151
+ * Priority: packageManager field > lockfiles > config files >
152
+ * `npm_config_user_agent` env var > default (pnpm).
153
+ *
154
+ * `opts` lets callers skip individual sources. `None` opts default
155
+ * to "use the source".
156
+ *
157
+ * Returns `napi::Result` so any I/O errors surface as JS exceptions.
158
+ */
159
+ export declare function detectPackageManager(cwd: string, opts?: DetectPackageManagerOptions | undefined | null): DetectedPackageManager;
160
+
161
+ /**
162
+ * Options controlling which detection sources to consult.
163
+ *
164
+ * Matches nypm's `detectPackageManager` opts. All flags are
165
+ * `Option<bool>` so callers can omit them; `None` is treated as the
166
+ * default (use the source). Mirrors the JS-side ergonomics where
167
+ * `{}` enables every source.
168
+ */
169
+ export interface DetectPackageManagerOptions {
170
+ /** Skip reading the `packageManager` field in package.json. */
171
+ ignorePackageJson?: boolean;
172
+ /** Skip lockfile walk (pnpm-lock.yaml, yarn.lock, …). */
173
+ ignoreLockFile?: boolean;
174
+ /**
175
+ * Skip the `npm_config_user_agent` env-var fallback. Set by every
176
+ * PM when running scripts; lets a tool spawned from `pnpm run x`
177
+ * know it's pnpm even without a lockfile.
178
+ */
179
+ ignoreArgv?: boolean;
180
+ }
181
+
182
+ export interface DlxOptions {
183
+ package: string;
184
+ args: Array<string>;
185
+ additionalPackages: Array<string>;
186
+ shellMode: boolean;
187
+ silent: boolean;
188
+ }
189
+
190
+ export interface EditorconfigDefaults {
191
+ indent?: string;
192
+ lineEnding?: string;
193
+ }
194
+
195
+ export interface ExecOptions {
196
+ command: string;
197
+ args: Array<string>;
198
+ shellMode: boolean;
199
+ recursive: boolean;
200
+ workspaceRoot: boolean;
201
+ parallel: boolean;
202
+ reverse: boolean;
203
+ filter: Array<string>;
204
+ }
205
+
206
+ /**
207
+ * Executes a package manager command synchronously.
208
+ * Uses Rust's std::process::Command for maximum performance.
209
+ * Only allowed binaries can be executed (see ALLOWED_BINS).
210
+ *
211
+ * Returns `napi::Result<ExecResult>` -- throws a JS error for disallowed
212
+ * binaries or spawn failures, returns ExecResult with exit code otherwise.
213
+ */
214
+ export declare function execPmCommand(bin: string, args: Array<string>, cwd: string): ExecResult;
215
+
216
+ /**
217
+ * Executes a package manager command with inherited stdio (interactive).
218
+ * Returns exit code. Throws JS error for disallowed binaries or spawn failures.
219
+ */
220
+ export declare function execPmCommandInteractive(bin: string, args: Array<string>, cwd: string): number;
221
+
222
+ export interface ExecResult {
223
+ code: number;
224
+ stdout: string;
225
+ stderr: string;
226
+ }
227
+
228
+ export interface InstallOptions {
229
+ frozenLockfile: boolean;
230
+ prod: boolean;
231
+ dev: boolean;
232
+ noOptional: boolean;
233
+ force: boolean;
234
+ ignoreScripts: boolean;
235
+ lockfileOnly: boolean;
236
+ offline: boolean;
237
+ silent: boolean;
238
+ recursive: boolean;
239
+ workspaceRoot: boolean;
240
+ filter: Array<string>;
241
+ }
242
+
243
+ /**
244
+ * ABI compatibility version. Bump this whenever any `#[napi]` function
245
+ * signature changes so the TypeScript loader can reject stale `.node`
246
+ * files (e.g. a local build from before the change) that would
247
+ * otherwise silently misinterpret arguments.
248
+ *
249
+ * Version history:
250
+ * 1 — initial versioned ABI. `resolve_link` gained a `version` parameter.
251
+ * 2 — added `resolve_editorconfig_defaults` (replaces the `editorconfig` npm package).
252
+ * 3 — added prek-identify bindings: `tags_from_path`, `tags_from_paths`,
253
+ * `parse_shebang`, `all_known_tags`.
254
+ * 4 — added offline advisories: `advisories_ingest`, `advisories_query`,
255
+ * `advisories_status`. Backed by bundled SQLite (rusqlite) + zip.
256
+ * 5 — added osv-bloom prefilter: `osv_bloom_decode`, `osv_bloom_probe`,
257
+ * `osv_bloom_probe_batch`. Backed by `blake3` keyed-hash double-hashing.
258
+ */
259
+ export const NATIVE_BINDING_VERSION: number;
260
+
261
+ export interface NativeSortPackageJsonOptions {
262
+ /** Enable formatted output with newlines (default: true) */
263
+ pretty?: boolean;
264
+ /** Alphabetize script commands (default: false) */
265
+ sortScripts?: boolean;
266
+ }
267
+
268
+ export interface NativeVulnerabilityJs {
269
+ id: string;
270
+ aliases: Array<string>;
271
+ /** Normalized severity: "CRITICAL" | "HIGH" | "MODERATE" | "LOW" | "UNKNOWN". */
272
+ severity: string;
273
+ summary: string;
274
+ fixedVersions: Array<string>;
275
+ cvssScore?: number;
276
+ }
277
+
278
+ export interface OsvBloomBatchHit {
279
+ /**
280
+ * Index into the input batch array. Lets JS reconstruct which
281
+ * lockfile row triggered the hit without re-walking the inputs.
282
+ */
283
+ index: number;
284
+ name: string;
285
+ version: string;
286
+ }
287
+
288
+ export interface OsvBloomBatchQuery {
289
+ name: string;
290
+ version: string;
291
+ }
292
+
293
+ /**
294
+ * Decode a v1 osv-bloom filter from `bytes` (the on-disk `filter.bin`).
295
+ * Returns an opaque handle; reuse it for every probe call until the
296
+ * JS-side cache invalidates.
297
+ */
298
+ export declare function osvBloomDecode(bytes: Buffer): OsvBloomHandle;
299
+
300
+ /**
301
+ * Probe a single `(name, version)` pair. Returns `true` when the pair
302
+ * *might* be a known-malicious advisory — callers must escalate to an
303
+ * authoritative source for `(name, version)` confirmation.
304
+ *
305
+ * The version is encoded into a semver-major bucket per the upstream
306
+ * scheme; the wildcard bucket is also probed so advisories with
307
+ * unbounded ranges still match. Unparseable versions probe only the
308
+ * wildcard bucket.
309
+ */
310
+ export declare function osvBloomProbe(handle: OsvBloomHandle, name: string, version: string): boolean;
311
+
312
+ /**
313
+ * Batch variant. Returns only the hits, with their original index — the
314
+ * expected hit rate is well under 1%, so allocating one bool per input
315
+ * (`Vec<bool>` of length N) would dominate the cost. Order of returned
316
+ * hits matches input order.
317
+ */
318
+ export declare function osvBloomProbeBatch(handle: OsvBloomHandle, queries: Array<OsvBloomBatchQuery>): Array<OsvBloomBatchHit>;
319
+
320
+ export interface OutdatedOptions {
321
+ packages: Array<string>;
322
+ long: boolean;
323
+ format: string;
324
+ recursive: boolean;
325
+ filter: Array<string>;
326
+ workspaceRoot: boolean;
327
+ prod: boolean;
328
+ dev: boolean;
329
+ noOptional: boolean;
330
+ compatible: boolean;
331
+ global: boolean;
332
+ }
333
+
334
+ /**
335
+ * Parses the shebang line of an executable file, returning the
336
+ * interpreter argv (e.g. `["python3"]`, `["env", "node"]`). Returns an
337
+ * empty vector when the file has no shebang or cannot be read — mirrors
338
+ * pre-commit's behavior of treating "no shebang" as "no interpreter
339
+ * tags" rather than as an error.
340
+ */
341
+ export declare function parseShebang(path: string): Array<string>;
342
+
343
+ export interface ProgressPayload {
344
+ current: number;
345
+ total: number;
346
+ }
347
+
348
+ export interface RemoveOptions {
349
+ packages: Array<string>;
350
+ saveDev: boolean;
351
+ global: boolean;
352
+ recursive: boolean;
353
+ workspaceRoot: boolean;
354
+ filter: Array<string>;
355
+ }
356
+
357
+ export declare function resolveAdd(pm: string, version: string, opts: AddOptions): ResolvedCommand;
358
+
359
+ export interface ResolvedCommand {
360
+ bin: string;
361
+ args: Array<string>;
362
+ warnings: Array<string>;
363
+ }
364
+
365
+ export declare function resolveDedupe(pm: string, version: string, check: boolean): ResolvedCommand;
366
+
367
+ export declare function resolveDlx(pm: string, version: string, opts: DlxOptions): ResolvedCommand;
368
+
369
+ /**
370
+ * Resolves `.editorconfig` defaults for `file_path` using the spec-compliant
371
+ * `ec4rs` parser. Mirrors the previous `editorconfig` npm package surface
372
+ * consumed by `src/util/editorconfig.ts`: returns the indent string and a
373
+ * normalized line-ending tag, or `None` for either when no usable value is
374
+ * configured. Parse / IO failures collapse to an empty result so callers can
375
+ * fall back to content sniffing without try/catch noise.
376
+ */
377
+ export declare function resolveEditorconfigDefaults(filePath: string): EditorconfigDefaults;
378
+
379
+ export declare function resolveExec(pm: string, version: string, opts: ExecOptions): ResolvedCommand;
380
+
381
+ export declare function resolveInstall(pm: string, version: string, opts: InstallOptions): ResolvedCommand;
382
+
383
+ export declare function resolveLink(pm: string, version: string, target?: string | undefined | null): ResolvedCommand;
384
+
385
+ export declare function resolveOutdated(pm: string, version: string, opts: OutdatedOptions): ResolvedCommand;
386
+
387
+ export declare function resolvePmCommand(pm: string, version: string, subcommand: string, extraArgs: Array<string>): ResolvedCommand;
388
+
389
+ export declare function resolveRemove(pm: string, version: string, opts: RemoveOptions): ResolvedCommand;
390
+
391
+ export declare function resolveUnlink(pm: string, version: string, packages: Array<string>, recursive: boolean): ResolvedCommand;
392
+
393
+ export declare function resolveWhy(pm: string, version: string, opts: WhyOptions): ResolvedCommand;
394
+
395
+ export declare function sortPackageJsonString(contents: string): string;
396
+
397
+ export declare function sortPackageJsonStringWithOptions(contents: string, options: NativeSortPackageJsonOptions): string;
398
+
399
+ /**
400
+ * Classifies a single file path using `prek-identify`. Returns the set of
401
+ * tags (extensions, interpreters, metadata) that pre-commit / prek would
402
+ * associate with the file. Errors collapse to an empty vector so callers
403
+ * don't need try/catch — the vis hook runtime treats "unclassified" and
404
+ * "no tags" identically.
405
+ */
406
+ export declare function tagsFromPath(path: string): Array<string>;
407
+
408
+ /**
409
+ * Batch variant of [`tags_from_path`]. Returns one tag list per input
410
+ * path in the same order. Errors for individual paths collapse to empty
411
+ * vectors so partial classification failures don't fail the whole batch
412
+ * (the same behavior pre-commit applies when stat-ing a deleted staged
413
+ * file mid-run).
414
+ */
415
+ export declare function tagsFromPaths(paths: Array<string>): Array<Array<string>>;
416
+
417
+ /**
418
+ * Finds the full path to a binary using `which`-style lookup.
419
+ * Returns None if not found.
420
+ */
421
+ export declare function whichBin(name: string): string | null;
422
+
423
+ export interface WhyOptions {
424
+ packages: Array<string>;
425
+ json: boolean;
426
+ long: boolean;
427
+ parseable: boolean;
428
+ recursive: boolean;
429
+ dev: boolean;
430
+ prod: boolean;
431
+ noOptional: boolean;
432
+ global: boolean;
433
+ /** Depth limit. Uses Option<i32> directly (napi supports it). */
434
+ depth?: number;
435
+ filter: Array<string>;
436
+ }