@bastani/atomic-natives 0.9.2-alpha.1 → 0.9.3-alpha.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.3-alpha.1] - 2026-06-25
6
+
7
+ ### Added
8
+
9
+ - Added a Rust-backed `PtySession` N-API surface using `portable-pty`, enabling Atomic's `bash` tool to execute `pty: true` calls through a real PTY/ConPTY with output streaming, resize, kill, timeout, shell, cwd, and environment support ([#1483](https://github.com/bastani-inc/atomic/issues/1483)).
10
+ - Added oh-my-pi-derived native `glob`, `grep`, in-memory `search`, `hasMatch`, and filesystem scan-cache invalidation N-API bindings for Atomic's full-level `find`/`search` tool parity, backed by the Rust `ignore`, `globset`, and ripgrep crates ([#1483](https://github.com/bastani-inc/atomic/issues/1483)).
11
+
12
+ ## [0.9.2] - 2026-06-23
13
+
14
+ ### Changed
15
+
16
+ - Published the stable Atomic 0.9.2 release for the native transport package; no functional native transport changes were made after 0.9.1.
17
+
5
18
  ## [0.9.2-alpha.1] - 2026-06-23
6
19
 
7
20
  ### Changed
package/README.md CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  Native Rust bindings for Atomic via N-API.
4
4
 
5
- This package follows the same layout as `can1357/oh-my-pi`'s `packages/natives`: Rust code lives in `crates/atomic-natives`, while this package contains the generated NAPI-RS JavaScript loader (`native/index.js`), generated TypeScript declarations (`native/index.d.ts`), and release-time optional platform packages.
5
+ Rust code lives in `crates/atomic-natives`, while this package contains the generated NAPI-RS JavaScript loader (`native/index.js`), generated TypeScript declarations (`native/index.d.ts`), and release-time optional platform packages.
6
6
 
7
- The first native surface is the Cursor HTTP/2 transport binding used by the bundled Cursor provider.
7
+ Native surfaces include the Cursor HTTP/2 transport binding used by the bundled Cursor provider, a Rust-backed PTY session used by the `bash` tool when `pty: true` is requested, and oh-my-pi-derived `glob`/`grep`/`search` bindings used by Atomic's built-in `find` and `search` tools for full-level parity.
package/native/index.d.ts CHANGED
@@ -7,6 +7,45 @@ export declare class CursorH2NativeStream {
7
7
  cancel(): Promise<void>
8
8
  }
9
9
 
10
+ export declare class PtySession {
11
+ constructor()
12
+ start(options: PtyStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<PtyRunResult>
13
+ write(data: string): void
14
+ resize(cols: number, rows: number): void
15
+ kill(): void
16
+ }
17
+
18
+ export interface BlockRange {
19
+ /** 1-indexed inclusive first line of the resolved block. */
20
+ startLine: number
21
+ /** 1-indexed inclusive last line of the resolved block. */
22
+ endLine: number
23
+ }
24
+
25
+ /**
26
+ * Resolve the block beginning on `options.line`. Returns `None` when the
27
+ * language is unrecognized, the line is out of range / blank, no node begins
28
+ * there, or the resolved subtree contains a syntax error.
29
+ */
30
+ export declare function blockRangeAt(options: BlockRangeOptions): BlockRange | null
31
+
32
+ export interface BlockRangeOptions {
33
+ /** Source code to inspect. */
34
+ code: string
35
+ /** File path used to infer the language by extension. */
36
+ path: string
37
+ /** 1-indexed source line the block must begin on. */
38
+ line: number
39
+ }
40
+
41
+ /** A context line (before or after a match). */
42
+ export interface ContextLine {
43
+ /** 1-indexed line number in the source file. */
44
+ lineNumber: number
45
+ /** Raw line content (trimmed line ending). */
46
+ line: string
47
+ }
48
+
10
49
  export declare function cursorH2CancelOperation(operationId: string): Promise<void>
11
50
 
12
51
  export declare function cursorH2OpenStream(configJson: string, initialBody?: Buffer | undefined | null): Promise<CursorH2NativeStream>
@@ -18,3 +57,302 @@ export interface CursorH2UnaryResponse {
18
57
  headersJson: string
19
58
  body: Buffer
20
59
  }
60
+
61
+ /** Resolved filesystem entry kind for glob filters and match metadata. */
62
+ export declare const enum FileType {
63
+ /** Regular file. */
64
+ File = 1,
65
+ /** Directory. */
66
+ Dir = 2,
67
+ /** Symbolic link. */
68
+ Symlink = 3
69
+ }
70
+
71
+ /**
72
+ * Find filesystem entries matching a glob pattern.
73
+ *
74
+ * Resolves the search root, scans entries, applies glob and optional file-type
75
+ * filters, and optionally streams each accepted match through `on_match`.
76
+ *
77
+ * If `sortByMtime` is enabled with a finite `maxResults`, uncached scans keep
78
+ * only the current top results while traversing instead of collecting the full
79
+ * tree.
80
+ *
81
+ * # Errors
82
+ * Returns an error when the search path cannot be resolved, the path is not a
83
+ * directory, the glob pattern is invalid, or cancellation/timeout is
84
+ * triggered.
85
+ */
86
+ export declare function glob(options: GlobOptions, onMatch?: ((error: Error | null, match: GlobMatch) => void) | undefined | null): Promise<GlobResult>
87
+
88
+ /** A single filesystem entry from a directory scan. */
89
+ export interface GlobMatch {
90
+ /** Relative path from the search root, using forward slashes. */
91
+ path: string
92
+ /** Resolved filesystem type for the match. */
93
+ fileType: FileType
94
+ /**
95
+ * Modification time in milliseconds since Unix epoch (from
96
+ * `symlink_metadata`).
97
+ */
98
+ mtime?: number
99
+ /** File size in bytes for regular files. */
100
+ size?: number
101
+ }
102
+
103
+ /** Input options for `glob`, including traversal, filtering, and cancellation. */
104
+ export interface GlobOptions {
105
+ /** Glob pattern to match (e.g., "*.ts"). */
106
+ pattern: string
107
+ /** Directory to search. */
108
+ path: string
109
+ /**
110
+ * Filter by file type: "file", "dir", or "symlink". Symlinks are
111
+ * matched for file/dir filters based on their target type.
112
+ */
113
+ fileType?: FileType
114
+ /** Match simple patterns recursively by default (`*.ts` -> recursive). */
115
+ recursive?: boolean
116
+ /** Include hidden files (default: false). */
117
+ hidden?: boolean
118
+ /** Maximum number of results to return. */
119
+ maxResults?: number
120
+ /** Respect .gitignore files (default: true). */
121
+ gitignore?: boolean
122
+ /** Enable shared filesystem scan cache (default: false). */
123
+ cache?: boolean
124
+ /** Sort results by mtime (most recent first) before applying limit. */
125
+ sortByMtime?: boolean
126
+ /**
127
+ * Include `node_modules` entries when the pattern does not explicitly
128
+ * mention them.
129
+ */
130
+ includeNodeModules?: boolean
131
+ /** Abort signal for cancelling the operation. */
132
+ signal?: unknown
133
+ /** Timeout in milliseconds for the operation. */
134
+ timeoutMs?: number
135
+ }
136
+
137
+ /** Result payload returned by a glob operation. */
138
+ export interface GlobResult {
139
+ /** Matched filesystem entries. */
140
+ matches: Array<GlobMatch>
141
+ /** Number of returned matches (`matches.len()`), clamped to `u32::MAX`. */
142
+ totalMatches: number
143
+ }
144
+
145
+ /**
146
+ * Search files for a regex pattern.
147
+ *
148
+ * # Arguments
149
+ * - `options`: Pattern, path, filters, and output mode.
150
+ * - `on_match`: Optional callback invoked per match/result.
151
+ *
152
+ * # Returns
153
+ * Aggregated results across matching files.
154
+ */
155
+ export declare function grep(options: GrepOptions, onMatch?: ((error: Error | null, match: GrepMatch) => void) | undefined | null): Promise<GrepResult>
156
+
157
+ /** A single match in a grep result. */
158
+ export interface GrepMatch {
159
+ /** File path for the match (relative for directory searches). */
160
+ path: string
161
+ /** 1-indexed line number (0 for count-only entries). */
162
+ lineNumber: number
163
+ /** The matched line content (empty for count-only entries). */
164
+ line: string
165
+ /** Context lines before the match. */
166
+ contextBefore?: Array<ContextLine>
167
+ /** Context lines after the match. */
168
+ contextAfter?: Array<ContextLine>
169
+ /** Whether the line was truncated. */
170
+ truncated?: boolean
171
+ /** Per-file match count (count mode only). */
172
+ matchCount?: number
173
+ }
174
+
175
+ /** Options for searching files on disk. */
176
+ export interface GrepOptions {
177
+ /** Regex pattern to search for. */
178
+ pattern: string
179
+ /** Directory or file to search. */
180
+ path: string
181
+ /** Workspace/root used to evaluate path-qualified glob filters for explicit files. */
182
+ cwd?: string
183
+ /** Glob filter for filenames (e.g., "*.ts"). */
184
+ glob?: string
185
+ /** Filter by file type (e.g., "js", "py", "rust"). */
186
+ type?: string
187
+ /** Case-insensitive search. */
188
+ ignoreCase?: boolean
189
+ /** Enable multiline matching. */
190
+ multiline?: boolean
191
+ /** Include hidden files (default: true). */
192
+ hidden?: boolean
193
+ /** Respect .gitignore files (default: true). */
194
+ gitignore?: boolean
195
+ /** Enable shared filesystem scan cache (default: false). */
196
+ cache?: boolean
197
+ /** Maximum number of matches to return. */
198
+ maxCount?: number
199
+ /** Skip first N matches. */
200
+ offset?: number
201
+ /** Lines of context before matches. */
202
+ contextBefore?: number
203
+ /** Lines of context after matches. */
204
+ contextAfter?: number
205
+ /** Lines of context before/after matches (legacy). */
206
+ context?: number
207
+ /** Truncate lines longer than this (characters). */
208
+ maxColumns?: number
209
+ /** Output mode (content, filesWithMatches, or count). */
210
+ mode?: GrepOutputMode
211
+ /**
212
+ * Maximum matches collected per file (content mode). Keeps one hot file
213
+ * from exhausting the global `max_count` budget before other files are
214
+ * reached.
215
+ */
216
+ maxCountPerFile?: number
217
+ /** Abort signal for cancelling the operation. */
218
+ signal?: unknown
219
+ /** Timeout in milliseconds for the operation. */
220
+ timeoutMs?: number
221
+ }
222
+
223
+ /** Output mode for [`search`] and [`grep`] (string values match JS callers). */
224
+ export declare const enum GrepOutputMode {
225
+ /** Emit matched lines (and optional context lines). */
226
+ Content = 'content',
227
+ /** Emit per-file or total counts instead of line content. */
228
+ Count = 'count',
229
+ /** Emit one row per file that matched, without line content. */
230
+ FilesWithMatches = 'filesWithMatches'
231
+ }
232
+
233
+ /** Result of searching files. */
234
+ export interface GrepResult {
235
+ /** Matches or per-file counts, depending on output mode. */
236
+ matches: Array<GrepMatch>
237
+ /**
238
+ * Total matches across all files, or matched file count in filesWithMatches
239
+ * mode.
240
+ */
241
+ totalMatches: number
242
+ /** Number of files with at least one match. */
243
+ filesWithMatches: number
244
+ /** Number of files searched. */
245
+ filesSearched: number
246
+ /** Whether the limit/offset stopped the search early. */
247
+ limitReached?: boolean
248
+ /** Number of files skipped because they exceed the size limit. */
249
+ skippedOversized?: number
250
+ }
251
+
252
+ /**
253
+ * Quick check if content matches a pattern.
254
+ *
255
+ * # Arguments
256
+ * - `content`: `Uint8Array`/`Buffer` (zero-copy) or `string` (UTF-8).
257
+ * - `pattern`: `Uint8Array`/`Buffer` (zero-copy) or `string` (UTF-8).
258
+ * - `ignore_case`: Case-insensitive matching.
259
+ * - `multiline`: Enable multiline regex mode.
260
+ *
261
+ * # Returns
262
+ * True if any match exists; false on no match.
263
+ */
264
+ export declare function hasMatch(content: string | Uint8Array, pattern: string | Uint8Array, ignoreCase?: boolean | undefined | null, multiline?: boolean | undefined | null): boolean
265
+
266
+ /**
267
+ * Invalidate the filesystem scan cache.
268
+ *
269
+ * When called with a path, removes entries for roots containing that path.
270
+ * When called without a path, clears the entire cache.
271
+ *
272
+ * Intended to be called after agent file mutations (write, edit, rename,
273
+ * delete).
274
+ */
275
+ export declare function invalidateFsScanCache(path?: string | undefined | null): void
276
+
277
+ /** A single match in the content. */
278
+ export interface Match {
279
+ /** 1-indexed line number. */
280
+ lineNumber: number
281
+ /** The matched line content. */
282
+ line: string
283
+ /** Context lines before the match. */
284
+ contextBefore?: Array<ContextLine>
285
+ /** Context lines after the match. */
286
+ contextAfter?: Array<ContextLine>
287
+ /** Whether the line was truncated. */
288
+ truncated?: boolean
289
+ }
290
+
291
+ export interface PtyRunResult {
292
+ exitCode?: number
293
+ cancelled: boolean
294
+ timedOut: boolean
295
+ }
296
+
297
+ export interface PtyStartOptions {
298
+ command: string
299
+ cwd?: string
300
+ env?: Record<string, string>
301
+ timeoutMs?: number
302
+ signal?: unknown
303
+ cols?: number
304
+ rows?: number
305
+ shell?: string
306
+ shellArgs?: Array<string>
307
+ commandTransport?: string
308
+ closeStdinAfterCommand?: boolean
309
+ }
310
+
311
+ /**
312
+ * Search content for a pattern (one-shot, compiles pattern each time).
313
+ * For repeated searches with the same pattern, use [`grep`] with file filters.
314
+ *
315
+ * # Arguments
316
+ * - `content`: `Uint8Array`/`Buffer` (zero-copy) or `string` (UTF-8).
317
+ * - `options`: Regex settings, context, and output mode.
318
+ *
319
+ * # Returns
320
+ * Match list plus counts/limit status; errors are surfaced in `error`.
321
+ */
322
+ export declare function search(content: string | Uint8Array, options: SearchOptions): SearchResult
323
+
324
+ /** Options for searching file content. */
325
+ export interface SearchOptions {
326
+ /** Regex pattern to search for. */
327
+ pattern: string
328
+ /** Case-insensitive search. */
329
+ ignoreCase?: boolean
330
+ /** Enable multiline matching. */
331
+ multiline?: boolean
332
+ /** Maximum number of matches to return. */
333
+ maxCount?: number
334
+ /** Skip first N matches. */
335
+ offset?: number
336
+ /** Lines of context before matches. */
337
+ contextBefore?: number
338
+ /** Lines of context after matches. */
339
+ contextAfter?: number
340
+ /** Lines of context before/after matches (legacy). */
341
+ context?: number
342
+ /** Truncate lines longer than this (characters). */
343
+ maxColumns?: number
344
+ /** Output mode (content or count). */
345
+ mode?: GrepOutputMode
346
+ }
347
+
348
+ /** Result of searching content. */
349
+ export interface SearchResult {
350
+ /** All matches found. */
351
+ matches: Array<Match>
352
+ /** Total number of matches (may exceed `matches.len()` due to offset/limit). */
353
+ matchCount: number
354
+ /** Whether the limit was reached. */
355
+ limitReached: boolean
356
+ /** Error message, if any. */
357
+ error?: string
358
+ }
package/native/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('@bastani/atomic-natives-android-arm64')
79
79
  const bindingPackageVersion = require('@bastani/atomic-natives-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -93,8 +93,8 @@ function requireNative() {
93
93
  try {
94
94
  const binding = require('@bastani/atomic-natives-android-arm-eabi')
95
95
  const bindingPackageVersion = require('@bastani/atomic-natives-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -114,8 +114,8 @@ function requireNative() {
114
114
  try {
115
115
  const binding = require('@bastani/atomic-natives-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -130,8 +130,8 @@ function requireNative() {
130
130
  try {
131
131
  const binding = require('@bastani/atomic-natives-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('@bastani/atomic-natives-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -163,8 +163,8 @@ function requireNative() {
163
163
  try {
164
164
  const binding = require('@bastani/atomic-natives-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -182,8 +182,8 @@ function requireNative() {
182
182
  try {
183
183
  const binding = require('@bastani/atomic-natives-darwin-universal')
184
184
  const bindingPackageVersion = require('@bastani/atomic-natives-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -198,8 +198,8 @@ function requireNative() {
198
198
  try {
199
199
  const binding = require('@bastani/atomic-natives-darwin-x64')
200
200
  const bindingPackageVersion = require('@bastani/atomic-natives-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -214,8 +214,8 @@ function requireNative() {
214
214
  try {
215
215
  const binding = require('@bastani/atomic-natives-darwin-arm64')
216
216
  const bindingPackageVersion = require('@bastani/atomic-natives-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -234,8 +234,8 @@ function requireNative() {
234
234
  try {
235
235
  const binding = require('@bastani/atomic-natives-freebsd-x64')
236
236
  const bindingPackageVersion = require('@bastani/atomic-natives-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('@bastani/atomic-natives-freebsd-arm64')
252
252
  const bindingPackageVersion = require('@bastani/atomic-natives-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -271,8 +271,8 @@ function requireNative() {
271
271
  try {
272
272
  const binding = require('@bastani/atomic-natives-linux-x64-musl')
273
273
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -287,8 +287,8 @@ function requireNative() {
287
287
  try {
288
288
  const binding = require('@bastani/atomic-natives-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -305,8 +305,8 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require('@bastani/atomic-natives-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -321,8 +321,8 @@ function requireNative() {
321
321
  try {
322
322
  const binding = require('@bastani/atomic-natives-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -339,8 +339,8 @@ function requireNative() {
339
339
  try {
340
340
  const binding = require('@bastani/atomic-natives-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -355,8 +355,8 @@ function requireNative() {
355
355
  try {
356
356
  const binding = require('@bastani/atomic-natives-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -373,8 +373,8 @@ function requireNative() {
373
373
  try {
374
374
  const binding = require('@bastani/atomic-natives-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -389,8 +389,8 @@ function requireNative() {
389
389
  try {
390
390
  const binding = require('@bastani/atomic-natives-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -407,8 +407,8 @@ function requireNative() {
407
407
  try {
408
408
  const binding = require('@bastani/atomic-natives-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -423,8 +423,8 @@ function requireNative() {
423
423
  try {
424
424
  const binding = require('@bastani/atomic-natives-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('@bastani/atomic-natives-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('@bastani/atomic-natives-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -476,8 +476,8 @@ function requireNative() {
476
476
  try {
477
477
  const binding = require('@bastani/atomic-natives-openharmony-arm64')
478
478
  const bindingPackageVersion = require('@bastani/atomic-natives-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -492,8 +492,8 @@ function requireNative() {
492
492
  try {
493
493
  const binding = require('@bastani/atomic-natives-openharmony-x64')
494
494
  const bindingPackageVersion = require('@bastani/atomic-natives-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -508,8 +508,8 @@ function requireNative() {
508
508
  try {
509
509
  const binding = require('@bastani/atomic-natives-openharmony-arm')
510
510
  const bindingPackageVersion = require('@bastani/atomic-natives-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '0.9.2-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 0.9.2-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '0.9.3-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 0.9.3-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -587,6 +587,15 @@ if (!nativeBinding) {
587
587
 
588
588
  module.exports = nativeBinding
589
589
  module.exports.CursorH2NativeStream = nativeBinding.CursorH2NativeStream
590
+ module.exports.PtySession = nativeBinding.PtySession
591
+ module.exports.blockRangeAt = nativeBinding.blockRangeAt
590
592
  module.exports.cursorH2CancelOperation = nativeBinding.cursorH2CancelOperation
591
593
  module.exports.cursorH2OpenStream = nativeBinding.cursorH2OpenStream
592
594
  module.exports.cursorH2RequestUnary = nativeBinding.cursorH2RequestUnary
595
+ module.exports.FileType = nativeBinding.FileType
596
+ module.exports.glob = nativeBinding.glob
597
+ module.exports.grep = nativeBinding.grep
598
+ module.exports.GrepOutputMode = nativeBinding.GrepOutputMode
599
+ module.exports.hasMatch = nativeBinding.hasMatch
600
+ module.exports.invalidateFsScanCache = nativeBinding.invalidateFsScanCache
601
+ module.exports.search = nativeBinding.search
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic-natives",
3
- "version": "0.9.2-alpha.1",
3
+ "version": "0.9.3-alpha.1",
4
4
  "description": "Native Rust bindings for Atomic via N-API",
5
5
  "homepage": "https://github.com/bastani-inc/atomic",
6
6
  "author": "Bastani",
@@ -50,6 +50,7 @@
50
50
  "files": [
51
51
  "native/index.js",
52
52
  "native/index.d.ts",
53
+ "native/*.node",
53
54
  "README.md",
54
55
  "CHANGELOG.md"
55
56
  ],
@@ -58,11 +59,11 @@
58
59
  "access": "public"
59
60
  },
60
61
  "optionalDependencies": {
61
- "@bastani/atomic-natives-win32-x64-msvc": "0.9.2-alpha.1",
62
- "@bastani/atomic-natives-darwin-x64": "0.9.2-alpha.1",
63
- "@bastani/atomic-natives-linux-x64-gnu": "0.9.2-alpha.1",
64
- "@bastani/atomic-natives-linux-arm64-gnu": "0.9.2-alpha.1",
65
- "@bastani/atomic-natives-darwin-arm64": "0.9.2-alpha.1",
66
- "@bastani/atomic-natives-win32-arm64-msvc": "0.9.2-alpha.1"
62
+ "@bastani/atomic-natives-win32-x64-msvc": "0.9.3-alpha.1",
63
+ "@bastani/atomic-natives-darwin-x64": "0.9.3-alpha.1",
64
+ "@bastani/atomic-natives-linux-x64-gnu": "0.9.3-alpha.1",
65
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.9.3-alpha.1",
66
+ "@bastani/atomic-natives-darwin-arm64": "0.9.3-alpha.1",
67
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.9.3-alpha.1"
67
68
  }
68
69
  }