@sayknow-cli/natives 0.3.12 → 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 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 action answered by a remote client, after TS resolved the real
177
- * gate. `answer_json` is an optional JSON `ReplyAnswer`.
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 or `answer_json` is invalid.
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 a forwarded reply after TS failed to resolve its gate. `reason` is
185
- * one of the protocol reject reasons (default `invalid_answer`).
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 __piNativesV0_3_12(): void
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_12(): 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.
@@ -1479,6 +1504,8 @@ export interface ReplyEvent {
1479
1504
  answerJson: string
1480
1505
  /** Optional idempotency key supplied by the client. */
1481
1506
  idempotencyKey?: string
1507
+ /** One-shot receipt binding this callback to the atomically claimed reply. */
1508
+ replyReceiptId: string
1482
1509
  }
1483
1510
 
1484
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 __piNativesV0_3_12 = nativeBindings.__piNativesV0_3_12;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayknow-cli/natives",
3
- "version": "0.3.12",
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": "tsgo -p tsconfig.json --noEmit",
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.12",
65
- "@sayknow-cli/natives-darwin-x64": "0.3.12",
66
- "@sayknow-cli/natives-linux-arm64": "0.3.12",
67
- "@sayknow-cli/natives-linux-x64": "0.3.12",
68
- "@sayknow-cli/natives-win32-x64": "0.3.12"
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
  ".": {