@gajae-code/natives 0.11.10 → 0.12.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.
package/native/index.d.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+ /**
4
+ * macOS computer-use controller.
5
+ *
6
+ * This declaration and the named JS export are available on every platform so
7
+ * consumers can import them portably; the native controller itself is built
8
+ * only on macOS.
9
+ */
3
10
  export declare class ComputerController {
4
11
  constructor()
5
12
  screenshot(): ComputerScreenshot
@@ -484,7 +491,7 @@ export declare function __piNativesPublishOutcomeV1(): void
484
491
  * `packages/natives/native/index.js` (which derives the name from
485
492
  * `package.json#version`).
486
493
  */
487
- export declare function __piNativesV0_11_10(): void
494
+ export declare function __piNativesV0_12_0(): void
488
495
 
489
496
  /**
490
497
  * Apply conservative pre-execution rewrites to a bash command.
@@ -1891,6 +1898,8 @@ export interface PresentationLease {
1891
1898
  registrationEpoch: number
1892
1899
  }
1893
1900
 
1901
+ export declare function probeWindowsJobMemory(): WindowsJobMemoryProbeResult
1902
+
1894
1903
  /** Current state of a process reference. */
1895
1904
  export declare enum ProcessStatus {
1896
1905
  /** The referenced process is still running. */
@@ -2282,6 +2291,21 @@ export declare function visibleWidth(text: string, tabWidth: number): number
2282
2291
  /** Calculate visible widths of many strings, excluding ANSI escape sequences. */
2283
2292
  export declare function visibleWidths(lines: Array<string>, tabWidth: number): Array<number>
2284
2293
 
2294
+ export interface WindowsJobMemoryProbeResult {
2295
+ kind: string
2296
+ platform: string
2297
+ isInJob?: boolean
2298
+ jobMemoryLimitBytes?: string
2299
+ jobMemoryUsedBytes?: string
2300
+ peakJobMemoryUsedBytes?: string
2301
+ processMemoryLimitBytes?: string
2302
+ processPrivateUsageBytes?: string
2303
+ processWorkingSetBytes?: string
2304
+ peakProcessWorkingSetBytes?: string
2305
+ call?: string
2306
+ code?: string
2307
+ }
2308
+
2285
2309
  /** Profiling results returned to JavaScript. */
2286
2310
  export interface WorkProfile {
2287
2311
  /** Folded stack format for flamegraph tools. */
package/native/index.js CHANGED
@@ -30,7 +30,7 @@ export const Shell = nativeBindings.Shell;
30
30
 
31
31
  // functions
32
32
  export const __piNativesPublishOutcomeV1 = nativeBindings.__piNativesPublishOutcomeV1;
33
- export const __piNativesV0_11_10 = nativeBindings.__piNativesV0_11_10;
33
+ export const __piNativesV0_12_0 = nativeBindings.__piNativesV0_12_0;
34
34
  export const applyBashFixups = nativeBindings.applyBashFixups;
35
35
  export const applyOwnerOnlyFdSecurity = nativeBindings.applyOwnerOnlyFdSecurity;
36
36
  export const applyOwnerOnlyPathSecurity = nativeBindings.applyOwnerOnlyPathSecurity;
@@ -75,6 +75,7 @@ export const nativeBuildInfo = nativeBindings.nativeBuildInfo;
75
75
  export const openRecoveryFsRoot = nativeBindings.openRecoveryFsRoot;
76
76
  export const parseKey = nativeBindings.parseKey;
77
77
  export const parseKittySequence = nativeBindings.parseKittySequence;
78
+ export const probeWindowsJobMemory = nativeBindings.probeWindowsJobMemory;
78
79
  export const ptyTimeoutCount = nativeBindings.ptyTimeoutCount;
79
80
  export const readImageFromClipboard = nativeBindings.readImageFromClipboard;
80
81
  export const renameNoReplacePath = nativeBindings.renameNoReplacePath;
@@ -79,6 +79,12 @@ export interface CachedEmbeddedExtractionIsFreshInput {
79
79
 
80
80
  export function cachedEmbeddedExtractionIsFresh(input: CachedEmbeddedExtractionIsFreshInput): boolean;
81
81
 
82
+ export function validateLoadedBindings(
83
+ ctx: { versionSentinelExport: string; packageVersion: string },
84
+ bindings: Record<string, unknown>,
85
+ candidate: string,
86
+ ): void;
87
+
82
88
  export interface LoaderContext {
83
89
  isCompiledBinary: boolean;
84
90
  platformTag: string;
@@ -401,7 +401,7 @@ function maybeStageNodeModulesAddon(ctx, errors) {
401
401
  return stagedPath;
402
402
  }
403
403
 
404
- function validateLoadedBindings(ctx, bindings, candidate) {
404
+ export function validateLoadedBindings(ctx, bindings, candidate) {
405
405
  if (typeof bindings[ctx.versionSentinelExport] !== "function") {
406
406
  throw new Error(
407
407
  `Loaded ${candidate} but it does not expose the @gajae-code/natives@${ctx.packageVersion} ` +
@@ -418,6 +418,9 @@ function validateLoadedBindings(ctx, bindings, candidate) {
418
418
  if (typeof bindings.renameNoReplacePath !== "function") {
419
419
  throw new Error(`Loaded ${candidate} but it lacks required atomic publish capability \`renameNoReplacePath\`.`);
420
420
  }
421
+ if (typeof bindings.probeWindowsJobMemory !== "function") {
422
+ throw new Error(`Loaded ${candidate} but it lacks required memory probe capability \`probeWindowsJobMemory\`.`);
423
+ }
421
424
  }
422
425
 
423
426
  function buildHelpMessage(ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gajae-code/natives",
3
- "version": "0.11.10",
3
+ "version": "0.12.0",
4
4
  "description": "Native Rust bindings for grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
5
5
  "type": "module",
6
6
  "homepage": "https://gajae-code.com",
@@ -61,11 +61,11 @@
61
61
  "README.md"
62
62
  ],
63
63
  "optionalDependencies": {
64
- "@gajae-code/natives-darwin-arm64": "0.11.10",
65
- "@gajae-code/natives-darwin-x64": "0.11.10",
66
- "@gajae-code/natives-linux-arm64": "0.11.10",
67
- "@gajae-code/natives-linux-x64": "0.11.10",
68
- "@gajae-code/natives-win32-x64": "0.11.10"
64
+ "@gajae-code/natives-darwin-arm64": "0.12.0",
65
+ "@gajae-code/natives-darwin-x64": "0.12.0",
66
+ "@gajae-code/natives-linux-arm64": "0.12.0",
67
+ "@gajae-code/natives-linux-x64": "0.12.0",
68
+ "@gajae-code/natives-win32-x64": "0.12.0"
69
69
  },
70
70
  "exports": {
71
71
  ".": {