@gajae-code/natives 0.9.6 → 0.10.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 +34 -8
- package/native/index.js +1 -1
- package/package.json +7 -7
package/native/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export declare class ComputerController {
|
|
|
12
12
|
keypress(expectedEpoch: number | undefined | null, keys: Array<string>): void
|
|
13
13
|
wait(expectedEpoch: number | undefined | null, ms: number): void
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* Long-lived macOS appearance observer.
|
|
18
17
|
*
|
|
@@ -173,19 +172,37 @@ export declare class NotificationServer {
|
|
|
173
172
|
*/
|
|
174
173
|
resolveLocal(id: string, answerJson?: string | undefined | null): void
|
|
175
174
|
/**
|
|
176
|
-
* Resolve an
|
|
177
|
-
*
|
|
175
|
+
* Resolve an unclaimed legacy action. Forward-mode replies are
|
|
176
|
+
* receipt-bound and must use `resolveClaim` instead.
|
|
178
177
|
*
|
|
179
178
|
* # Errors
|
|
180
|
-
* Fails if not started
|
|
179
|
+
* Fails if not started, `answer_json` is invalid, or the action is claimed.
|
|
181
180
|
*/
|
|
182
181
|
resolveClient(id: string, answerJson?: string | undefined | null, idempotencyKey?: string | undefined | null): void
|
|
182
|
+
/** Resolve a reply claim after durable semantic settlement. */
|
|
183
|
+
resolveClaim(replyReceiptId: string, answerJson?: string | undefined | null, idempotencyKey?: string | undefined | null): void
|
|
184
|
+
/** Close an invalid claim terminally. Retrying must use a fresh action id. */
|
|
185
|
+
closeClaimInvalid(replyReceiptId: string, reason: string): void
|
|
186
|
+
/** Cancel a claim as part of abort or shutdown cleanup. */
|
|
187
|
+
cancelClaim(replyReceiptId: string, reason: string): void
|
|
188
|
+
/**
|
|
189
|
+
* Unicast an origin-bound live acknowledgement and resolve with its exact
|
|
190
|
+
* correlated terminal outcome (or native timeout evidence).
|
|
191
|
+
*/
|
|
192
|
+
requestAskSelectedAck(replyReceiptId: string, requestJson: string): Promise<AskSelectedAckOutcomeEvent>
|
|
193
|
+
/**
|
|
194
|
+
* Select one current capable participant for a recovery acknowledgement and
|
|
195
|
+
* resolve with its exact terminal outcome.
|
|
196
|
+
*/
|
|
197
|
+
requestRecoveredAskSelectedAck(requestJson: string): Promise<AskSelectedAckOutcomeEvent>
|
|
198
|
+
/** Correlate and terminalize an acknowledgement request. */
|
|
199
|
+
cancelAskSelectedAck(requestId: string, commitKey: string, reason: string): AskSelectedAckOutcomeEvent
|
|
183
200
|
/**
|
|
184
|
-
* Reject
|
|
185
|
-
*
|
|
201
|
+
* Reject an unclaimed legacy reply. Claimed forward-mode replies must use
|
|
202
|
+
* `closeClaimInvalid` with the exact receipt.
|
|
186
203
|
*
|
|
187
204
|
* # Errors
|
|
188
|
-
* Fails if not started.
|
|
205
|
+
* Fails if not started or the action is claimed.
|
|
189
206
|
*/
|
|
190
207
|
reject(id: string, reason?: string | undefined | null): void
|
|
191
208
|
/**
|
|
@@ -298,7 +315,7 @@ export declare class Shell {
|
|
|
298
315
|
* `packages/natives/native/index.js` (which derives the name from
|
|
299
316
|
* `package.json#version`).
|
|
300
317
|
*/
|
|
301
|
-
export declare function
|
|
318
|
+
export declare function __piNativesV0_10_0(): void
|
|
302
319
|
|
|
303
320
|
/**
|
|
304
321
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -309,6 +326,13 @@ export declare function __piNativesV0_9_6(): void
|
|
|
309
326
|
*/
|
|
310
327
|
export declare function applyBashFixups(command: string): BashFixupResult
|
|
311
328
|
|
|
329
|
+
/** Typed terminal acknowledgement result returned by acknowledgement promises. */
|
|
330
|
+
export interface AskSelectedAckOutcomeEvent {
|
|
331
|
+
status: string
|
|
332
|
+
messageId?: number
|
|
333
|
+
reason?: string
|
|
334
|
+
}
|
|
335
|
+
|
|
312
336
|
/**
|
|
313
337
|
* Apply ast-grep rewrite rules to matching files; honors `dryRun` and returns
|
|
314
338
|
* a promise.
|
|
@@ -1479,6 +1503,8 @@ export interface ReplyEvent {
|
|
|
1479
1503
|
answerJson: string
|
|
1480
1504
|
/** Optional idempotency key supplied by the client. */
|
|
1481
1505
|
idempotencyKey?: string
|
|
1506
|
+
/** One-shot receipt binding this callback to the atomically claimed reply. */
|
|
1507
|
+
replyReceiptId: string
|
|
1482
1508
|
}
|
|
1483
1509
|
|
|
1484
1510
|
/**
|
package/native/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export const PtySession = nativeBindings.PtySession;
|
|
|
27
27
|
export const Shell = nativeBindings.Shell;
|
|
28
28
|
|
|
29
29
|
// functions
|
|
30
|
-
export const
|
|
30
|
+
export const __piNativesV0_10_0 = nativeBindings.__piNativesV0_10_0;
|
|
31
31
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
32
32
|
export const astEdit = nativeBindings.astEdit;
|
|
33
33
|
export const astGrep = nativeBindings.astGrep;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gajae-code/natives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "bun scripts/build-native.ts",
|
|
33
33
|
"check": "biome check . && bun run check:types",
|
|
34
|
-
"check:types": "
|
|
34
|
+
"check:types": "tsc -p tsconfig.json --noEmit",
|
|
35
35
|
"lint": "biome lint .",
|
|
36
36
|
"test": "bun test",
|
|
37
37
|
"fix": "biome check --write --unsafe .",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"README.md"
|
|
62
62
|
],
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@gajae-code/natives-darwin-arm64": "0.
|
|
65
|
-
"@gajae-code/natives-darwin-x64": "0.
|
|
66
|
-
"@gajae-code/natives-linux-arm64": "0.
|
|
67
|
-
"@gajae-code/natives-linux-x64": "0.
|
|
68
|
-
"@gajae-code/natives-win32-x64": "0.
|
|
64
|
+
"@gajae-code/natives-darwin-arm64": "0.10.0",
|
|
65
|
+
"@gajae-code/natives-darwin-x64": "0.10.0",
|
|
66
|
+
"@gajae-code/natives-linux-arm64": "0.10.0",
|
|
67
|
+
"@gajae-code/natives-linux-x64": "0.10.0",
|
|
68
|
+
"@gajae-code/natives-win32-x64": "0.10.0"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|