@oh-my-pi/pi-natives 18.3.0 → 18.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,8 +78,8 @@ below.
78
78
  uutils coreutils (https://github.com/uutils/coreutils), MIT
79
79
  --------------------------------------------------------------------------------
80
80
  Covers: base32, base64, basename, cat, cksum (shared checksum machinery),
81
- b2sum, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, comm, cut,
82
- date, dirname, head, hostname, ln, ls, mkdir, mktemp, mv, nproc, paste,
81
+ b2sum, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, comm, cp,
82
+ cut, date, dirname, head, hostname, ln, ls, mkdir, mktemp, mv, nproc, paste,
83
83
  printenv, readlink, realpath, rm, seq, sort, stat, tac, tail, tee, touch, tr,
84
84
  truncate, uname, uniq, wc, whoami, yes.
85
85
 
package/native/index.d.ts CHANGED
@@ -103,8 +103,10 @@ export declare class EditSession {
103
103
  /**
104
104
  * Open a session. `onPreview` (optional) receives every settled preview
105
105
  * batch; batches are delivered one at a time, in generation order.
106
+ * `resolveUrl` (optional) maps an internal URL target to its backing
107
+ * file; without it such targets fail as unresolved.
106
108
  */
107
- constructor(store: EditStore, policy: EditPolicy, onPreview?: ((error: Error | null, batch: EditPreviewBatch) => void) | undefined | null)
109
+ constructor(store: EditStore, policy: EditPolicy, onPreview?: ((error: Error | null, batch: EditPreviewBatch) => void) | undefined | null, resolveUrl?: ((error: Error | null, url: string) => Promise<EditUrlResolution>) | undefined | null)
108
110
  /** Append a raw streamed argument fragment. */
109
111
  push(delta: string): void
110
112
  /** Replace the buffer with the complete argument JSON (no-delta path). */
@@ -648,7 +650,7 @@ export declare function __ompInstallTokioRuntime(): void
648
650
  * `packages/natives/native/index.js` (which derives the name from
649
651
  * `package.json#version`).
650
652
  */
651
- export declare function __piNativesV18_3_0(): void
653
+ export declare function __piNativesV18_3_2(): void
652
654
 
653
655
  /**
654
656
  * Reports whether the on-device model can generate, as an `availability`
@@ -704,7 +706,10 @@ export interface AstFindOptions {
704
706
  patterns?: Array<string>
705
707
  /** Language override; otherwise inferred from file extension per candidate. */
706
708
  lang?: string
707
- /** Single file or directory to scan (combined with `glob` when set). */
709
+ /**
710
+ * Single file or directory to scan (combined with `glob` when set): a
711
+ * host path or an absolute `scheme://` URL.
712
+ */
708
713
  path?: string
709
714
  /** Optional glob filter relative to the search root. */
710
715
  glob?: string
@@ -727,6 +732,11 @@ export interface AstFindOptions {
727
732
  signal?: unknown
728
733
  /** Wall-clock timeout for the worker task in milliseconds. */
729
734
  timeoutMs?: number
735
+ /**
736
+ * Filesystem candidates are resolved, walked, and read through (native
737
+ * when absent).
738
+ */
739
+ filesystem?: ShellFilesystem
730
740
  }
731
741
 
732
742
  /** Aggregated search statistics and any parse or compile diagnostics. */
@@ -867,7 +877,10 @@ export interface AstReplaceOptions {
867
877
  * mixed-language paths rewrite each file in its own language.
868
878
  */
869
879
  lang?: string
870
- /** Single file or directory to rewrite. */
880
+ /**
881
+ * Single file or directory to rewrite: a host path or an absolute
882
+ * `scheme://` URL.
883
+ */
871
884
  path?: string
872
885
  /** Optional glob filter within the search root. */
873
886
  glob?: string
@@ -887,6 +900,11 @@ export interface AstReplaceOptions {
887
900
  signal?: unknown
888
901
  /** Wall-clock timeout for the worker task in milliseconds. */
889
902
  timeoutMs?: number
903
+ /**
904
+ * Filesystem candidates are resolved, walked, read, and written through
905
+ * (native when absent).
906
+ */
907
+ filesystem?: ShellFilesystem
890
908
  }
891
909
 
892
910
  /** Summary of an ast-grep rewrite pass, including whether disk writes occurred. */
@@ -1355,10 +1373,15 @@ export interface EditPolicy {
1355
1373
  enforceSeenLines: boolean
1356
1374
  blockAutoGenerated: boolean
1357
1375
  planActive: boolean
1358
- /** Root of the `local://` artifact sandbox; null when the session has none. */
1359
- localSandboxRoot?: string
1360
- /** Cached vault roots; null when the vault protocol is disabled. */
1361
- vaultRoots?: Array<EditVaultRoot>
1376
+ /** Registered internal URL schemes (router spec keys). */
1377
+ urlSchemes: Array<string>
1378
+ /**
1379
+ * The `urlSchemes` whose single-slash `scheme:/x` spelling aliases
1380
+ * `scheme://x` (spec `singleSlashAlias`).
1381
+ */
1382
+ urlAliasSchemes: Array<string>
1383
+ /** Plain-path roots writable in plan mode. */
1384
+ planWritableRoots: Array<string>
1362
1385
  homeDir: string
1363
1386
  /** The payload is a verbatim custom-format string, not JSON. */
1364
1387
  rawInput: boolean
@@ -1373,11 +1396,14 @@ export interface EditPreviewBatch {
1373
1396
  files: Array<EditFilePreview>
1374
1397
  }
1375
1398
 
1376
- /** A cached `vault://` root. */
1377
- export interface EditVaultRoot {
1378
- /** Vault name; `_` is the active vault. */
1379
- name: string
1380
- root: string
1399
+ /** Host answer for one internal URL (`resolveUrl`). */
1400
+ export interface EditUrlResolution {
1401
+ /** Absolute backing file; null when no local file backs the URL. */
1402
+ path?: string
1403
+ /** Model-facing refusal (read-only, disabled…); wins over `path`. */
1404
+ error?: string
1405
+ /** Writable while plan mode is active (sandbox-scoped scheme). */
1406
+ planWritable: boolean
1381
1407
  }
1382
1408
 
1383
1409
  /** Host write request; the host owns the bytes. */
@@ -1619,7 +1645,7 @@ export interface GlobMatch {
1619
1645
  export interface GlobOptions {
1620
1646
  /** Glob pattern to match (e.g., "*.ts"). */
1621
1647
  pattern: string
1622
- /** Directory to search. */
1648
+ /** Directory to search: a host path or an absolute `scheme://` URL. */
1623
1649
  path: string
1624
1650
  /**
1625
1651
  * Filter by file type: "file", "dir", or "symlink". Symlinks are
@@ -1647,6 +1673,11 @@ export interface GlobOptions {
1647
1673
  signal?: unknown
1648
1674
  /** Timeout in milliseconds for the operation. */
1649
1675
  timeoutMs?: number
1676
+ /**
1677
+ * Filesystem the search root is resolved and walked through (native when
1678
+ * absent).
1679
+ */
1680
+ filesystem?: ShellFilesystem
1650
1681
  }
1651
1682
 
1652
1683
  /** Result payload returned by a glob operation. */
@@ -1691,10 +1722,15 @@ export interface GrepMatch {
1691
1722
  export interface GrepOptions {
1692
1723
  /** Regex pattern to search for. */
1693
1724
  pattern: string
1694
- /** Directory or file to search. */
1725
+ /** Directory or file to search: a host path or an absolute `scheme://` URL. */
1695
1726
  path: string
1696
1727
  /** Glob filter for filenames (e.g., "*.ts"). */
1697
1728
  glob?: string
1729
+ /**
1730
+ * Match simple glob patterns at any depth (default: true; `*.ts` ->
1731
+ * `**\/*.ts`). Set false when `glob` is already relative to `path`.
1732
+ */
1733
+ recursive?: boolean
1698
1734
  /** Filter by file type (e.g., "js", "py", "rust"). */
1699
1735
  type?: string
1700
1736
  /** Case-insensitive search. */
@@ -1729,6 +1765,11 @@ export interface GrepOptions {
1729
1765
  signal?: unknown
1730
1766
  /** Timeout in milliseconds for the operation. */
1731
1767
  timeoutMs?: number
1768
+ /**
1769
+ * Filesystem every path is stat'ed, walked, and read through (native when
1770
+ * absent).
1771
+ */
1772
+ filesystem?: ShellFilesystem
1732
1773
  }
1733
1774
 
1734
1775
  /** Output mode for [`search`] and [`grep`] (string values match JS callers). */
@@ -2586,6 +2627,325 @@ export interface ShellExecuteOptions {
2586
2627
  minimizer?: MinimizerOptions
2587
2628
  /** Abort signal for cancelling the operation. */
2588
2629
  signal?: unknown
2630
+ /** Filesystem backing the command (native when absent). */
2631
+ filesystem?: ShellFilesystem
2632
+ }
2633
+
2634
+ /** Host filesystem injected into shell sessions. */
2635
+ export interface ShellFilesystem {
2636
+ /**
2637
+ * Services every routed operation; failures are returned as `error`
2638
+ * data rather than thrown.
2639
+ */
2640
+ handler: (error: Error | null, request: ShellFsRequest) => Promise<ShellFsResponse>
2641
+ /**
2642
+ * When true, every path without a `scheme://` prefix — and everything
2643
+ * beneath it — is the ordinary host filesystem: operations there run
2644
+ * natively (including recursive traversal and removal) and `handler` is
2645
+ * never consulted, so it cannot intercept any host subtree. Only URL
2646
+ * paths reach `handler`. When false or absent, `handler` is a fully
2647
+ * injected filesystem and receives every path, host paths included.
2648
+ */
2649
+ nativeLocalPaths?: boolean
2650
+ }
2651
+
2652
+ /** Permissions probed by an `access` request. */
2653
+ export interface ShellFsAccess {
2654
+ read: boolean
2655
+ write: boolean
2656
+ execute: boolean
2657
+ }
2658
+
2659
+ /** One directory entry. */
2660
+ export interface ShellFsDirEntry {
2661
+ name: string
2662
+ fileType: ShellFsFileType
2663
+ /** Entry metadata without following a final symlink, when already known. */
2664
+ metadata?: ShellFsMetadata
2665
+ }
2666
+
2667
+ /** A failed operation, reported as data so its errno identity survives. */
2668
+ export interface ShellFsError {
2669
+ /** Errno name such as `ENOENT`, `EACCES`, `EROFS`, `ENOTSUP`. */
2670
+ code: string
2671
+ message?: string
2672
+ }
2673
+
2674
+ /** File type on the filesystem wire. */
2675
+ export declare enum ShellFsFileType {
2676
+ /** Regular file. */
2677
+ File = 'file',
2678
+ /** Directory. */
2679
+ Dir = 'dir',
2680
+ /** Symbolic link. */
2681
+ Symlink = 'symlink',
2682
+ /** Named pipe. */
2683
+ Fifo = 'fifo',
2684
+ /** Unix domain socket. */
2685
+ Socket = 'socket',
2686
+ /** Character device. */
2687
+ Char = 'char',
2688
+ /** Block device. */
2689
+ Block = 'block'
2690
+ }
2691
+
2692
+ /**
2693
+ * File metadata. Absent optional fields mean the provider has no such value;
2694
+ * they are never fabricated.
2695
+ */
2696
+ export interface ShellFsMetadata {
2697
+ fileType: ShellFsFileType
2698
+ size: number | bigint
2699
+ /** Permission bits (`0o7777`). */
2700
+ mode: number
2701
+ /** Modification time, nanoseconds since the Unix epoch. */
2702
+ mtimeNs?: number | bigint
2703
+ /** Access time, nanoseconds since the Unix epoch. */
2704
+ atimeNs?: number | bigint
2705
+ /** Status change time, nanoseconds since the Unix epoch. */
2706
+ ctimeNs?: number | bigint
2707
+ /** Creation time, nanoseconds since the Unix epoch. */
2708
+ birthtimeNs?: number | bigint
2709
+ /** Device id; given together with `ino`. */
2710
+ dev?: number | bigint
2711
+ /** Inode number; given together with `dev`. */
2712
+ ino?: number | bigint
2713
+ nlink?: number | bigint
2714
+ rdev?: number | bigint
2715
+ /** Allocated 512-byte blocks; given together with `blksize`. */
2716
+ blocks?: number | bigint
2717
+ /** Preferred I/O block size; given together with `blocks`. */
2718
+ blksize?: number | bigint
2719
+ /** Owner user id; given together with `gid`. */
2720
+ uid?: number
2721
+ /** Owner group id; given together with `uid`. */
2722
+ gid?: number
2723
+ }
2724
+
2725
+ /** Which path components `canonicalize` requires to exist. */
2726
+ export declare enum ShellFsMissing {
2727
+ /** Every component must exist (`realpath`). */
2728
+ Existing = 'existing',
2729
+ /** Every component but the last must exist. */
2730
+ Normal = 'normal',
2731
+ /** No component needs to exist. */
2732
+ Missing = 'missing'
2733
+ }
2734
+
2735
+ /** Filesystem operation requested from a host [`ShellFilesystem`]. */
2736
+ export declare enum ShellFsOp {
2737
+ /** Metadata of `path`, following symlinks. Answer: `metadata`. */
2738
+ Metadata = 'metadata',
2739
+ /**
2740
+ * Metadata of `path` itself, not following a final symlink. Answer:
2741
+ * `metadata`.
2742
+ */
2743
+ SymlinkMetadata = 'symlinkMetadata',
2744
+ /** Entries of directory `path`. Answer: `entries`. */
2745
+ ReadDir = 'readDir',
2746
+ /** Canonical spelling of `path` per `missing`/`resolve`. Answer: `path`. */
2747
+ Canonicalize = 'canonicalize',
2748
+ /**
2749
+ * Host file or directory backing `path`, for user-facing commands that
2750
+ * print real locations (`realpath`, `readlink -f`). Answer: `path`, or
2751
+ * no `path` when nothing on the host backs it. Grants no access.
2752
+ */
2753
+ BackingPath = 'backingPath',
2754
+ /** Contents of symlink `path`. Answer: `path`. */
2755
+ ReadLink = 'readLink',
2756
+ /** Check `access` permissions on `path` (all false: existence). */
2757
+ Access = 'access',
2758
+ /** Open `path` with `open` flags. Answer: `handle`. */
2759
+ Open = 'open',
2760
+ /**
2761
+ * Read up to `length` bytes of `handle` at `offset`. Answer: `data`
2762
+ * (empty at end of file).
2763
+ */
2764
+ Read = 'read',
2765
+ /**
2766
+ * Write `data` to `handle` at `offset`, or at the end when `offset` is
2767
+ * absent (append handles). Answer: `written`, plus `offset` (end
2768
+ * position after the write) for appends.
2769
+ */
2770
+ Write = 'write',
2771
+ /** Flush buffered writes of `handle`. */
2772
+ Flush = 'flush',
2773
+ /** Release `handle`. Sent exactly once per opened handle. */
2774
+ Close = 'close',
2775
+ /** Metadata of the file behind `handle`. Answer: `metadata`. */
2776
+ FileMetadata = 'fileMetadata',
2777
+ /**
2778
+ * Query whether `handle` has a conflicting advisory write lock. Answer:
2779
+ * `locked`.
2780
+ */
2781
+ IsLocked = 'isLocked',
2782
+ /** Truncate or extend `handle` to `size` bytes. */
2783
+ SetLen = 'setLen',
2784
+ /** Set times of `handle` (`atimeNs`/`mtimeNs`; absent = unchanged). */
2785
+ FileSetTimes = 'fileSetTimes',
2786
+ /** Set permission bits `mode` of `handle`. */
2787
+ FileSetPermissions = 'fileSetPermissions',
2788
+ /** Persist `handle` (`dataOnly`: data without metadata). */
2789
+ Sync = 'sync',
2790
+ /** Create directory `path` (`recursive`, optional `mode`). */
2791
+ CreateDir = 'createDir',
2792
+ /** Remove non-directory `path`. */
2793
+ RemoveFile = 'removeFile',
2794
+ /** Remove empty directory `path`. */
2795
+ RemoveDir = 'removeDir',
2796
+ /** Remove directory `path` and everything below it. */
2797
+ RemoveDirAll = 'removeDirAll',
2798
+ /** Rename `path` to `target`. */
2799
+ Rename = 'rename',
2800
+ /** Create hard link `target` to existing `path`. */
2801
+ HardLink = 'hardLink',
2802
+ /** Create symlink `path` whose contents are `target` (verbatim). */
2803
+ Symlink = 'symlink',
2804
+ /** Set permission bits `mode` of `path` (following symlinks). */
2805
+ SetPermissions = 'setPermissions',
2806
+ /**
2807
+ * Set times of `path` (`atimeNs`/`mtimeNs`; absent = unchanged;
2808
+ * `follow`).
2809
+ */
2810
+ SetTimes = 'setTimes',
2811
+ /** Change owner `uid`/`gid` of `path` (absent = unchanged; `follow`). */
2812
+ Chown = 'chown',
2813
+ /** Statistics of the filesystem holding `path`. Answer: `statFs`. */
2814
+ StatFs = 'statFs',
2815
+ /**
2816
+ * Extended attribute `name` of `path`. Answer: `data`, or no `data`
2817
+ * when the attribute is absent.
2818
+ */
2819
+ GetXattr = 'getXattr',
2820
+ /** Set extended attribute `name` of `path` to `data`. */
2821
+ SetXattr = 'setXattr',
2822
+ /** Extended attribute names of `path`. Answer: `names`. */
2823
+ ListXattr = 'listXattr',
2824
+ /** Remove extended attribute `name` of `path`. */
2825
+ RemoveXattr = 'removeXattr',
2826
+ /**
2827
+ * Create node `path` of `fileType` with `mode` (and `device` for
2828
+ * character/block devices).
2829
+ */
2830
+ Mknod = 'mknod'
2831
+ }
2832
+
2833
+ /** Open flags for an `open` request (std `OpenOptions` semantics). */
2834
+ export interface ShellFsOpenFlags {
2835
+ read: boolean
2836
+ write: boolean
2837
+ append: boolean
2838
+ truncate: boolean
2839
+ create: boolean
2840
+ createNew: boolean
2841
+ /** Permission bits for a newly created file. */
2842
+ mode?: number
2843
+ /** Platform open flags beyond the portable set (`O_*`); absent when none. */
2844
+ customFlags?: number
2845
+ }
2846
+
2847
+ /** One filesystem request. Only the fields documented for `op` are set. */
2848
+ export interface ShellFsRequest {
2849
+ op: ShellFsOp
2850
+ /** Subject path, verbatim (URL spellings keep their authority). */
2851
+ path?: string
2852
+ /** Second path: rename/hard-link destination or symlink contents. */
2853
+ target?: string
2854
+ /** Provider handle id from a previous `open`. */
2855
+ handle?: number
2856
+ /** Byte offset for positional handle I/O. */
2857
+ offset?: bigint
2858
+ /** Maximum bytes to read. */
2859
+ length?: number
2860
+ /** New length for `setLen`. */
2861
+ size?: bigint
2862
+ /** Bytes to write (`write`) or attribute value (`setXattr`). */
2863
+ data?: Buffer
2864
+ open?: ShellFsOpenFlags
2865
+ access?: ShellFsAccess
2866
+ recursive?: boolean
2867
+ /** Permission bits (`0o7777`). */
2868
+ mode?: number
2869
+ /** Whether a final symlink is followed. */
2870
+ follow?: boolean
2871
+ /** Access time in nanoseconds since the Unix epoch. */
2872
+ atimeNs?: bigint
2873
+ /** Modification time in nanoseconds since the Unix epoch. */
2874
+ mtimeNs?: bigint
2875
+ uid?: number
2876
+ gid?: number
2877
+ /** `sync` persists data only, not metadata. */
2878
+ dataOnly?: boolean
2879
+ /** Extended attribute name. */
2880
+ name?: string
2881
+ /** Node type for `mknod`. */
2882
+ fileType?: ShellFsFileType
2883
+ /** Device number for character/block `mknod`. */
2884
+ device?: bigint
2885
+ missing?: ShellFsMissing
2886
+ resolve?: ShellFsResolve
2887
+ /**
2888
+ * Removal of temporary files the shell itself created, issued even after
2889
+ * the run was aborted. Serve it under the same policy, but without the
2890
+ * run's abort signal. Not a retry of a cancelled request.
2891
+ */
2892
+ cleanup?: boolean
2893
+ }
2894
+
2895
+ /** How `canonicalize` treats symlinks. */
2896
+ export declare enum ShellFsResolve {
2897
+ /** Resolve symlinks as encountered. */
2898
+ Physical = 'physical',
2899
+ /** Apply `..` lexically before resolving symlinks. */
2900
+ Logical = 'logical',
2901
+ /** Never resolve symlinks; normalize lexically only. */
2902
+ None = 'none'
2903
+ }
2904
+
2905
+ /**
2906
+ * Provider answer. Carries `error`, a native redirect (`local` /
2907
+ * `localTarget`), or the op's result fields.
2908
+ */
2909
+ export interface ShellFsResponse {
2910
+ error?: ShellFsError
2911
+ /** Run this operation natively on this host path instead. */
2912
+ local?: string
2913
+ /** Native host path replacing `target` (rename/hard-link destination). */
2914
+ localTarget?: string
2915
+ handle?: number
2916
+ /**
2917
+ * With an `open` redirect: the host file backs an immutable mount, so
2918
+ * the opened file refuses every mutation (EROFS), duplicates included.
2919
+ */
2920
+ readonly?: boolean
2921
+ data?: Uint8Array
2922
+ written?: number
2923
+ /** Result of an `isLocked` advisory-lock query. */
2924
+ locked?: boolean
2925
+ /** Handle position after an append write. */
2926
+ offset?: number | bigint
2927
+ path?: string
2928
+ metadata?: ShellFsMetadata
2929
+ entries?: Array<ShellFsDirEntry>
2930
+ names?: Array<string>
2931
+ statFs?: ShellFsStatFs
2932
+ }
2933
+
2934
+ /** Filesystem statistics. */
2935
+ export interface ShellFsStatFs {
2936
+ blockSize: number | bigint
2937
+ /** Optimal transfer size; defaults to `blockSize`. */
2938
+ ioSize?: number | bigint
2939
+ blocks: number | bigint
2940
+ blocksFree: number | bigint
2941
+ blocksAvailable: number | bigint
2942
+ files: number | bigint
2943
+ filesFree: number | bigint
2944
+ /** Filesystem type magic number. */
2945
+ fsType?: number | bigint
2946
+ fsTypeName?: string
2947
+ fsid?: number | bigint
2948
+ nameMax?: number | bigint
2589
2949
  }
2590
2950
 
2591
2951
  /** Options for configuring a persistent shell session. */
@@ -2596,6 +2956,8 @@ export interface ShellOptions {
2596
2956
  snapshotPath?: string
2597
2957
  /** Optional per-command output minimizer configuration. */
2598
2958
  minimizer?: MinimizerOptions
2959
+ /** Filesystem backing every run of this session (native when absent). */
2960
+ filesystem?: ShellFilesystem
2599
2961
  }
2600
2962
 
2601
2963
  /** Options for running a shell command. */
@@ -2610,6 +2972,11 @@ export interface ShellRunOptions {
2610
2972
  timeoutMs?: number
2611
2973
  /** Abort signal for cancelling the operation. */
2612
2974
  signal?: unknown
2975
+ /**
2976
+ * Filesystem for this run only, replacing the session's; the session's
2977
+ * filesystem applies again to later runs.
2978
+ */
2979
+ filesystem?: ShellFilesystem
2613
2980
  }
2614
2981
 
2615
2982
  /** Result of running a shell command. */
package/native/index.js CHANGED
@@ -45,7 +45,7 @@ export const VcsRepo = nativeBindings.VcsRepo;
45
45
 
46
46
  // functions
47
47
  export const __ompInstallTokioRuntime = nativeBindings.__ompInstallTokioRuntime ?? missingNativeExport("__ompInstallTokioRuntime");
48
- export const __piNativesV18_3_0 = nativeBindings.__piNativesV18_3_0;
48
+ export const __piNativesV18_3_2 = nativeBindings.__piNativesV18_3_2;
49
49
  export const appleFmAvailability = nativeBindings.appleFmAvailability ?? missingNativeExport("appleFmAvailability");
50
50
  export const appleFmCancel = nativeBindings.appleFmCancel ?? missingNativeExport("appleFmCancel");
51
51
  export const appleFmGenerate = nativeBindings.appleFmGenerate ?? missingNativeExport("appleFmGenerate");
@@ -206,4 +206,59 @@ export const ProcessStatus = {
206
206
  Running: "running",
207
207
  Exited: "exited",
208
208
  };
209
+ export const ShellFsFileType = {
210
+ File: "file",
211
+ Dir: "dir",
212
+ Symlink: "symlink",
213
+ Fifo: "fifo",
214
+ Socket: "socket",
215
+ Char: "char",
216
+ Block: "block",
217
+ };
218
+ export const ShellFsMissing = {
219
+ Existing: "existing",
220
+ Normal: "normal",
221
+ Missing: "missing",
222
+ };
223
+ export const ShellFsOp = {
224
+ Metadata: "metadata",
225
+ SymlinkMetadata: "symlinkMetadata",
226
+ ReadDir: "readDir",
227
+ Canonicalize: "canonicalize",
228
+ BackingPath: "backingPath",
229
+ ReadLink: "readLink",
230
+ Access: "access",
231
+ Open: "open",
232
+ Read: "read",
233
+ Write: "write",
234
+ Flush: "flush",
235
+ Close: "close",
236
+ FileMetadata: "fileMetadata",
237
+ IsLocked: "isLocked",
238
+ SetLen: "setLen",
239
+ FileSetTimes: "fileSetTimes",
240
+ FileSetPermissions: "fileSetPermissions",
241
+ Sync: "sync",
242
+ CreateDir: "createDir",
243
+ RemoveFile: "removeFile",
244
+ RemoveDir: "removeDir",
245
+ RemoveDirAll: "removeDirAll",
246
+ Rename: "rename",
247
+ HardLink: "hardLink",
248
+ Symlink: "symlink",
249
+ SetPermissions: "setPermissions",
250
+ SetTimes: "setTimes",
251
+ Chown: "chown",
252
+ StatFs: "statFs",
253
+ GetXattr: "getXattr",
254
+ SetXattr: "setXattr",
255
+ ListXattr: "listXattr",
256
+ RemoveXattr: "removeXattr",
257
+ Mknod: "mknod",
258
+ };
259
+ export const ShellFsResolve = {
260
+ Physical: "physical",
261
+ Logical: "logical",
262
+ None: "none",
263
+ };
209
264
  // --- end generated native exports ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-natives",
3
- "version": "18.3.0",
3
+ "version": "18.3.2",
4
4
  "description": "Native Rust bindings for PDF conversion, audio, WebRTC, grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
5
5
  "type": "module",
6
6
  "homepage": "https://omp.sh",
@@ -107,11 +107,11 @@
107
107
  }
108
108
  },
109
109
  "optionalDependencies": {
110
- "@oh-my-pi/pi-natives-linux-x64": "18.3.0",
111
- "@oh-my-pi/pi-natives-linux-arm64": "18.3.0",
112
- "@oh-my-pi/pi-natives-darwin-x64": "18.3.0",
113
- "@oh-my-pi/pi-natives-darwin-arm64": "18.3.0",
114
- "@oh-my-pi/pi-natives-win32-x64": "18.3.0",
115
- "@oh-my-pi/pi-natives-win32-arm64": "18.3.0"
110
+ "@oh-my-pi/pi-natives-linux-x64": "18.3.2",
111
+ "@oh-my-pi/pi-natives-linux-arm64": "18.3.2",
112
+ "@oh-my-pi/pi-natives-darwin-x64": "18.3.2",
113
+ "@oh-my-pi/pi-natives-darwin-arm64": "18.3.2",
114
+ "@oh-my-pi/pi-natives-win32-x64": "18.3.2",
115
+ "@oh-my-pi/pi-natives-win32-arm64": "18.3.2"
116
116
  }
117
117
  }