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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,7 +293,7 @@ MIT License
293
293
  Copyright (c) 2026 Sander Land
294
294
  (measured tokenizer vocabulary data, reconstruction model, and reference
295
295
  implementation: https://github.com/sanderland/ctok)
296
- Copyright (c) 2026 Can Bölük and the Oh My Pi contributors
296
+ Copyright (c) 2026 Can Bölük and the omp contributors
297
297
  Copyright (c) 2026 Stencil Labs, Inc.
298
298
  (Rust implementation and the compact binary vocabulary encoding in
299
299
  crates/pi-natives/src/utok/claude)
package/native/index.d.ts CHANGED
@@ -648,7 +648,27 @@ export declare function __ompInstallTokioRuntime(): void
648
648
  * `packages/natives/native/index.js` (which derives the name from
649
649
  * `package.json#version`).
650
650
  */
651
- export declare function __piNativesV18_2_10(): void
651
+ export declare function __piNativesV18_3_0(): void
652
+
653
+ /**
654
+ * Reports whether the on-device model can generate, as an `availability`
655
+ * event JSON: `{available, reason?, contextSize?, variant?, vision?,
656
+ * toolCalling?}`.
657
+ */
658
+ export declare function appleFmAvailability(): Promise<string>
659
+
660
+ /**
661
+ * Cancels a generation; its stream then ends with a `cancelled` error event.
662
+ * Unknown or finished handles are ignored.
663
+ */
664
+ export declare function appleFmCancel(handle: number): void
665
+
666
+ /**
667
+ * Starts one model turn for a JSON request and streams JSON events to
668
+ * `on_event` until a terminal `done` or `error` event. Returns a handle for
669
+ * [`apple_fm_cancel`].
670
+ */
671
+ export declare function appleFmGenerate(request: string, onEvent: (err: null | Error, event: string) => void): number
652
672
 
653
673
  /**
654
674
  * Apply ast-grep rewrite rules to matching files; honors `dryRun` and returns
@@ -1007,7 +1027,7 @@ export declare function cosineSimilarityPairs(vectors: Float64Array, count: numb
1007
1027
  * use ordinary encoding (no special-token handling) and the Claude
1008
1028
  * encodings count message content without the fixed per-message frame.
1009
1029
  * Defaults to `o200k_base`; pass a `Claude*` encoding for exact Claude
1010
- * counts, or the matching family encoding for Qwen/DeepSeek/Kimi/GLM.
1030
+ * counts, or the matching family encoding for Qwen/DeepSeek/Kimi/GLM/Jev.
1011
1031
  */
1012
1032
  export declare function countTokens(input: string | string[], encoding?: Encoding | undefined | null): number
1013
1033
 
@@ -1451,7 +1471,9 @@ export declare enum Encoding {
1451
1471
  /** Kimi K2 … K3. */
1452
1472
  KimiK2 = 'KimiK2',
1453
1473
  /** GLM-5.x exact; GLM-4.x near-exact. */
1454
- Glm5 = 'Glm5'
1474
+ Glm5 = 'Glm5',
1475
+ /** `TypeSafe` Jev 1.13 judgment `state` (request frame excluded). */
1476
+ Jev = 'Jev'
1455
1477
  }
1456
1478
 
1457
1479
  /**
@@ -1479,7 +1501,7 @@ export declare function execReplace(argv: Array<string>): void
1479
1501
  */
1480
1502
  export declare function executeShell(options: ShellExecuteOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<ShellRunResult>
1481
1503
 
1482
- /** Locate `*** SM:EDIT path` payloads the model emitted as plain text. */
1504
+ /** Locate `*** Edit File: path` payloads the model emitted as plain text. */
1483
1505
  export declare function extractInlineSloppyRegions(text: string): Array<InlineSloppyRegion>
1484
1506
 
1485
1507
  /**
package/native/index.js CHANGED
@@ -45,7 +45,10 @@ export const VcsRepo = nativeBindings.VcsRepo;
45
45
 
46
46
  // functions
47
47
  export const __ompInstallTokioRuntime = nativeBindings.__ompInstallTokioRuntime ?? missingNativeExport("__ompInstallTokioRuntime");
48
- export const __piNativesV18_2_10 = nativeBindings.__piNativesV18_2_10;
48
+ export const __piNativesV18_3_0 = nativeBindings.__piNativesV18_3_0;
49
+ export const appleFmAvailability = nativeBindings.appleFmAvailability ?? missingNativeExport("appleFmAvailability");
50
+ export const appleFmCancel = nativeBindings.appleFmCancel ?? missingNativeExport("appleFmCancel");
51
+ export const appleFmGenerate = nativeBindings.appleFmGenerate ?? missingNativeExport("appleFmGenerate");
49
52
  export const astEdit = nativeBindings.astEdit ?? missingNativeExport("astEdit");
50
53
  export const astGrep = nativeBindings.astGrep ?? missingNativeExport("astGrep");
51
54
  export const astMatch = nativeBindings.astMatch ?? missingNativeExport("astMatch");
@@ -163,6 +166,7 @@ export const Encoding = {
163
166
  DeepSeekV3: "DeepSeekV3",
164
167
  KimiK2: "KimiK2",
165
168
  Glm5: "Glm5",
169
+ Jev: "Jev",
166
170
  };
167
171
  export const FileType = {
168
172
  File: 1,
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-natives",
3
- "version": "18.2.10",
3
+ "version": "18.3.0",
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",
7
- "author": "Stencil Labs, Inc.",
7
+ "author": {
8
+ "name": "Stencil Labs, Inc.",
9
+ "url": "https://stencil.so"
10
+ },
8
11
  "license": "MIT",
9
12
  "repository": {
10
13
  "type": "git",
@@ -104,11 +107,11 @@
104
107
  }
105
108
  },
106
109
  "optionalDependencies": {
107
- "@oh-my-pi/pi-natives-linux-x64": "18.2.10",
108
- "@oh-my-pi/pi-natives-linux-arm64": "18.2.10",
109
- "@oh-my-pi/pi-natives-darwin-x64": "18.2.10",
110
- "@oh-my-pi/pi-natives-darwin-arm64": "18.2.10",
111
- "@oh-my-pi/pi-natives-win32-x64": "18.2.10",
112
- "@oh-my-pi/pi-natives-win32-arm64": "18.2.10"
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"
113
116
  }
114
117
  }