@gajae-code/natives 0.15.2 → 0.15.3

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
@@ -212,7 +212,7 @@ export declare class NotificationServer {
212
212
  * # Errors
213
213
  * Fails if not started or `frame_json` is not a valid `ServerMessage`.
214
214
  */
215
- pushFrame(frameJson: string): void
215
+ pushFrame(frameJson: string, excludedConnectionIds?: Array<string> | undefined | null): void
216
216
  /**
217
217
  * Deliver a frame through every authenticated connection and wait for each
218
218
  * socket writer to settle within `timeout_ms`.
@@ -220,22 +220,40 @@ export declare class NotificationServer {
220
220
  pushFrameAndWait(frameJson: string, timeoutMs: number): Promise<boolean>
221
221
  /**
222
222
  * Broadcast a TypeScript-constructed turn frame without re-parsing JSON.
223
- * External frames must continue through [`Self::push_frame`] for serde
224
- * validation.
223
+ * Returns whether at least one non-excluded transport accepted the raw
224
+ * frame. External frames must continue through [`Self::push_frame`] for
225
+ * serde validation.
225
226
  */
226
- pushTurnStreamUnchecked(sessionId: string, phase: string, text: string, finalAnswer?: boolean | undefined | null, messageRef?: string | undefined | null): void
227
+ pushTurnStreamUnchecked(sessionId: string, phase: string, text: string, finalAnswer?: boolean | undefined | null, messageRef?: string | undefined | null, excludedConnectionIds?: Array<string> | undefined | null): boolean
227
228
  /**
228
229
  * Broadcast a file attachment from raw N-API bytes, encoding the unchanged
229
230
  * base64 wire field only in Rust.
230
231
  */
231
- pushFileAttachmentUnchecked(sessionId: string, name: string, mime: string | undefined | null, data: Buffer, caption?: string | undefined | null): void
232
+ pushFileAttachmentUnchecked(sessionId: string, name: string, mime: string | undefined | null, data: Buffer, caption?: string | undefined | null, excludedConnectionIds?: Array<string> | undefined | null): void
232
233
  /**
233
234
  * Return counters guarding the known-good frame crossing against
234
235
  * regressions.
235
236
  */
236
237
  knownGoodFrameStats(): KnownGoodFrameStats
238
+ /**
239
+ * Proves that the loaded addon honors positioned-recipient exclusions on
240
+ * raw notification fan-out. Kept as an explicit executable capability so a
241
+ * stale linked addon cannot silently accept and ignore the optional N-API
242
+ * arguments.
243
+ */
244
+ supportsPositionedRawExclusion(): boolean
237
245
  /** Send a validated, bounded JSON envelope to one connected v3 SDK client. */
238
246
  sendTo(connectionId: string, json: string): void
247
+ /**
248
+ * Send a directed frame and return an opaque receipt bound to the exact
249
+ * connection generation that accepted it.
250
+ */
251
+ sendToWithReceipt(connectionId: string, json: string): string
252
+ /**
253
+ * Queue an idle action only on writer generations that also accepted its
254
+ * positioned or raw identity prerequisite.
255
+ */
256
+ queueIdleAfterDirected(prerequisiteJson: string, positionedReceipts: Array<string>, neededJson: string): DependentIdleDeliveryResult
239
257
  /**
240
258
  * Publish a replayable `session_ready` readiness signal. `ready_json` is a
241
259
  * JSON `SessionReady`. Unlike [`Self::push_frame`], this frame is buffered
@@ -526,7 +544,7 @@ export declare function __piNativesPublishOutcomeV1(): void
526
544
  * `packages/natives/native/index.js` (which derives the name from
527
545
  * `package.json#version`).
528
546
  */
529
- export declare function __piNativesV0_15_2(): void
547
+ export declare function __piNativesV0_15_3(): void
530
548
 
531
549
  /**
532
550
  * Apply conservative pre-execution rewrites to a bash command.
@@ -831,6 +849,13 @@ export declare function copyToClipboard(text: string): void
831
849
  */
832
850
  export declare function currentExecutablePath(): string | null
833
851
 
852
+ /** Explicit result of binding an idle action to an exact prerequisite cohort. */
853
+ export interface DependentIdleDeliveryResult {
854
+ status: 'queued' | 'no_recipients' | 'rejected' | 'partial'
855
+ recipientCount: number
856
+ queuedCount: number
857
+ }
858
+
834
859
  /**
835
860
  * Detect macOS system appearance via CoreFoundation.
836
861
  * Returns `"dark"` or `"light"` on macOS, `null` on other platforms.
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_15_2 = nativeBindings.__piNativesV0_15_2;
33
+ export const __piNativesV0_15_3 = nativeBindings.__piNativesV0_15_3;
34
34
  export const applyBashFixups = nativeBindings.applyBashFixups;
35
35
  export const applyOwnerOnlyFdSecurity = nativeBindings.applyOwnerOnlyFdSecurity;
36
36
  export const applyOwnerOnlyPathSecurity = nativeBindings.applyOwnerOnlyPathSecurity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gajae-code/natives",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
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.15.2",
65
- "@gajae-code/natives-darwin-x64": "0.15.2",
66
- "@gajae-code/natives-linux-arm64": "0.15.2",
67
- "@gajae-code/natives-linux-x64": "0.15.2",
68
- "@gajae-code/natives-win32-x64": "0.15.2"
64
+ "@gajae-code/natives-darwin-arm64": "0.15.3",
65
+ "@gajae-code/natives-darwin-x64": "0.15.3",
66
+ "@gajae-code/natives-linux-arm64": "0.15.3",
67
+ "@gajae-code/natives-linux-x64": "0.15.3",
68
+ "@gajae-code/natives-win32-x64": "0.15.3"
69
69
  },
70
70
  "exports": {
71
71
  ".": {