@sayknow-cli/natives 0.3.11 → 0.3.13
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 +36 -7
- package/native/index.js +2 -1
- package/package.json +7 -7
package/native/index.d.ts
CHANGED
|
@@ -173,19 +173,37 @@ export declare class NotificationServer {
|
|
|
173
173
|
*/
|
|
174
174
|
resolveLocal(id: string, answerJson?: string | undefined | null): void
|
|
175
175
|
/**
|
|
176
|
-
* Resolve an
|
|
177
|
-
*
|
|
176
|
+
* Resolve an unclaimed legacy action. Forward-mode replies are
|
|
177
|
+
* receipt-bound and must use `resolveClaim` instead.
|
|
178
178
|
*
|
|
179
179
|
* # Errors
|
|
180
|
-
* Fails if not started
|
|
180
|
+
* Fails if not started, `answer_json` is invalid, or the action is claimed.
|
|
181
181
|
*/
|
|
182
182
|
resolveClient(id: string, answerJson?: string | undefined | null, idempotencyKey?: string | undefined | null): void
|
|
183
|
+
/** Resolve a reply claim after durable semantic settlement. */
|
|
184
|
+
resolveClaim(replyReceiptId: string, answerJson?: string | undefined | null, idempotencyKey?: string | undefined | null): void
|
|
185
|
+
/** Close an invalid claim terminally. Retrying must use a fresh action id. */
|
|
186
|
+
closeClaimInvalid(replyReceiptId: string, reason: string): void
|
|
187
|
+
/** Cancel a claim as part of abort or shutdown cleanup. */
|
|
188
|
+
cancelClaim(replyReceiptId: string, reason: string): void
|
|
189
|
+
/**
|
|
190
|
+
* Unicast an origin-bound live acknowledgement and resolve with its exact
|
|
191
|
+
* correlated terminal outcome (or native timeout evidence).
|
|
192
|
+
*/
|
|
193
|
+
requestAskSelectedAck(replyReceiptId: string, requestJson: string): Promise<AskSelectedAckOutcomeEvent>
|
|
194
|
+
/**
|
|
195
|
+
* Select one current capable participant for a recovery acknowledgement and
|
|
196
|
+
* resolve with its exact terminal outcome.
|
|
197
|
+
*/
|
|
198
|
+
requestRecoveredAskSelectedAck(requestJson: string): Promise<AskSelectedAckOutcomeEvent>
|
|
199
|
+
/** Correlate and terminalize an acknowledgement request. */
|
|
200
|
+
cancelAskSelectedAck(requestId: string, commitKey: string, reason: string): AskSelectedAckOutcomeEvent
|
|
183
201
|
/**
|
|
184
|
-
* Reject
|
|
185
|
-
*
|
|
202
|
+
* Reject an unclaimed legacy reply. Claimed forward-mode replies must use
|
|
203
|
+
* `closeClaimInvalid` with the exact receipt.
|
|
186
204
|
*
|
|
187
205
|
* # Errors
|
|
188
|
-
* Fails if not started.
|
|
206
|
+
* Fails if not started or the action is claimed.
|
|
189
207
|
*/
|
|
190
208
|
reject(id: string, reason?: string | undefined | null): void
|
|
191
209
|
/**
|
|
@@ -298,7 +316,7 @@ export declare class Shell {
|
|
|
298
316
|
* `packages/natives/native/index.js` (which derives the name from
|
|
299
317
|
* `package.json#version`).
|
|
300
318
|
*/
|
|
301
|
-
export declare function
|
|
319
|
+
export declare function __piNativesV0_3_13(): void
|
|
302
320
|
|
|
303
321
|
/**
|
|
304
322
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -309,6 +327,13 @@ export declare function __piNativesV0_3_11(): void
|
|
|
309
327
|
*/
|
|
310
328
|
export declare function applyBashFixups(command: string): BashFixupResult
|
|
311
329
|
|
|
330
|
+
/** Typed terminal acknowledgement result returned by acknowledgement promises. */
|
|
331
|
+
export interface AskSelectedAckOutcomeEvent {
|
|
332
|
+
status: string
|
|
333
|
+
messageId?: number
|
|
334
|
+
reason?: string
|
|
335
|
+
}
|
|
336
|
+
|
|
312
337
|
/**
|
|
313
338
|
* Apply ast-grep rewrite rules to matching files; honors `dryRun` and returns
|
|
314
339
|
* a promise.
|
|
@@ -1459,6 +1484,8 @@ export interface PtyStartOptions {
|
|
|
1459
1484
|
shell?: string
|
|
1460
1485
|
}
|
|
1461
1486
|
|
|
1487
|
+
export declare function ptyTimeoutCount(): bigint
|
|
1488
|
+
|
|
1462
1489
|
/**
|
|
1463
1490
|
* Read an image from the system clipboard.
|
|
1464
1491
|
*
|
|
@@ -1477,6 +1504,8 @@ export interface ReplyEvent {
|
|
|
1477
1504
|
answerJson: string
|
|
1478
1505
|
/** Optional idempotency key supplied by the client. */
|
|
1479
1506
|
idempotencyKey?: string
|
|
1507
|
+
/** One-shot receipt binding this callback to the atomically claimed reply. */
|
|
1508
|
+
replyReceiptId: string
|
|
1480
1509
|
}
|
|
1481
1510
|
|
|
1482
1511
|
/**
|
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_3_13 = nativeBindings.__piNativesV0_3_13;
|
|
31
31
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
32
32
|
export const astEdit = nativeBindings.astEdit;
|
|
33
33
|
export const astGrep = nativeBindings.astGrep;
|
|
@@ -65,6 +65,7 @@ export const matchesLegacySequence = nativeBindings.matchesLegacySequence;
|
|
|
65
65
|
export const nativeBuildInfo = nativeBindings.nativeBuildInfo;
|
|
66
66
|
export const parseKey = nativeBindings.parseKey;
|
|
67
67
|
export const parseKittySequence = nativeBindings.parseKittySequence;
|
|
68
|
+
export const ptyTimeoutCount = nativeBindings.ptyTimeoutCount;
|
|
68
69
|
export const readImageFromClipboard = nativeBindings.readImageFromClipboard;
|
|
69
70
|
export const search = nativeBindings.search;
|
|
70
71
|
export const sliceWithWidth = nativeBindings.sliceWithWidth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sayknow-cli/natives",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
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://sayknow-cli.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
|
-
"@sayknow-cli/natives-darwin-arm64": "0.3.
|
|
65
|
-
"@sayknow-cli/natives-darwin-x64": "0.3.
|
|
66
|
-
"@sayknow-cli/natives-linux-arm64": "0.3.
|
|
67
|
-
"@sayknow-cli/natives-linux-x64": "0.3.
|
|
68
|
-
"@sayknow-cli/natives-win32-x64": "0.3.
|
|
64
|
+
"@sayknow-cli/natives-darwin-arm64": "0.3.13",
|
|
65
|
+
"@sayknow-cli/natives-darwin-x64": "0.3.13",
|
|
66
|
+
"@sayknow-cli/natives-linux-arm64": "0.3.13",
|
|
67
|
+
"@sayknow-cli/natives-linux-x64": "0.3.13",
|
|
68
|
+
"@sayknow-cli/natives-win32-x64": "0.3.13"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|