opentray 0.32.0 → 0.33.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/README.md +34 -2
- package/dist/index.d.mts +404 -48
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +814 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -124,11 +124,43 @@ completed graceful close), the SDK reaches a terminal connection-dead state:
|
|
|
124
124
|
immediately with the same message instead of hanging on a dead socket.
|
|
125
125
|
- Event delivery stops. Eventful tray handles expose
|
|
126
126
|
`tray.onConnectionDead(handler)` — present on local broker transports — which
|
|
127
|
-
fires exactly once
|
|
128
|
-
|
|
127
|
+
fires exactly once per connection generation; treat it as the fail-loud signal
|
|
128
|
+
for that generation's cleanup.
|
|
129
129
|
- `destroy()` treats the sentinel as the requested end state, so a Quit issued
|
|
130
130
|
after broker death still settles.
|
|
131
131
|
|
|
132
|
+
### Transport robustness and supervision
|
|
133
|
+
|
|
134
|
+
The `createTray` runtime path wraps the broker connection in a supervised
|
|
135
|
+
transport. Consumer contract (full guidance in the public
|
|
136
|
+
`skills/opentray` reference `transport-robustness.md`):
|
|
137
|
+
|
|
138
|
+
- Every transport call is deadline-bounded (interactive 5 s, teardown 2 s,
|
|
139
|
+
bootstrap 10 s — exported as `INTERACTIVE_CALL_DEADLINE_MS`,
|
|
140
|
+
`TEARDOWN_CALL_DEADLINE_MS`, `BOOTSTRAP_CALL_DEADLINE_MS`; overridable per
|
|
141
|
+
call through the optional `request(frame, { deadlineMs })` transport
|
|
142
|
+
parameter). A budget that expires settles that one call with the typed
|
|
143
|
+
`TransportTimeoutError`; late replies are discarded statelessly. Deferred
|
|
144
|
+
operations follow the two-phase rule: the deadline bounds
|
|
145
|
+
dispatch-to-acceptance, and an accepted operation (a held modal dialog)
|
|
146
|
+
settles with its terminal or the typed transport-close rejection — never a
|
|
147
|
+
transport deadline.
|
|
148
|
+
- An *uninvited* connection death is detected by socket close/error or an
|
|
149
|
+
idle-gated heartbeat and recovers automatically with zero consumer code:
|
|
150
|
+
cooldown backoff, broker respawn through the same identity-gated connect
|
|
151
|
+
path, declarative journal replay (tray options, last-set mutations,
|
|
152
|
+
extension mounts), registered facade rebuilds, then a full state snapshot
|
|
153
|
+
re-emit. A bounded budget (3 attempts per 10 min, in-memory) caps the
|
|
154
|
+
loop; exhaustion is the terminal `abandoned` state where every call fails
|
|
155
|
+
fast with `TransportAbandonedError` (code `transport_abandoned`) and the
|
|
156
|
+
app keeps running headless. Caller-initiated teardown never recovers.
|
|
157
|
+
- Health projection: `tray.onTransportStateChange(handler)` publishes
|
|
158
|
+
edge-triggered `healthy | recovering | abandoned`. The optional
|
|
159
|
+
`runtimeOptions.recovery` object exposes the policy knobs (`enabled`,
|
|
160
|
+
`maxRestarts`, `windowMs`, `cooldownMs`, `backoffFactor`, `backoffCapMs`)
|
|
161
|
+
and the Tier 2 `restartApp` callback, which replaces in-process recovery
|
|
162
|
+
with exactly one hand-over invocation.
|
|
163
|
+
|
|
132
164
|
### Extension commands and deferred operations
|
|
133
165
|
|
|
134
166
|
`tray.requestExtension(ext, data)` (and the `TrayExtensionContext.request`
|
package/dist/index.d.mts
CHANGED
|
@@ -98,12 +98,69 @@ declare const resolveNativeExtensionArtifact: (artifact: NativeExtensionArtifact
|
|
|
98
98
|
declare const EMBEDDED_STAGING_MANIFEST_PATH = "platforms/manifest.json";
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/client.d.ts
|
|
101
|
+
/**
|
|
102
|
+
* Optional per-call transport budget (W1, harden-transport-robustness): a
|
|
103
|
+
* transport that enforces deadlines settles the call with a typed
|
|
104
|
+
* `TransportTimeoutError` when no correlated reply arrives within
|
|
105
|
+
* `deadlineMs`. The parameter is also the teardown-class marking channel
|
|
106
|
+
* later phases read to keep caller-initiated teardown out of recovery — the
|
|
107
|
+
* budget class, not a new protocol flag, distinguishes the call.
|
|
108
|
+
*/
|
|
109
|
+
interface TransportRequestOptions {
|
|
110
|
+
/** Per-call deadline budget in milliseconds; transports default to the interactive class. */
|
|
111
|
+
deadlineMs?: number;
|
|
112
|
+
}
|
|
101
113
|
interface OpenTrayTransport {
|
|
102
|
-
request(frame: ClientRequestFrame$1): Promise<ServerFrame$1>;
|
|
114
|
+
request(frame: ClientRequestFrame$1, options?: TransportRequestOptions): Promise<ServerFrame$1>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Default per-call deadline classes (W1, harden-transport-robustness;
|
|
118
|
+
* field-validated against the pnpm-pub silent-wedge incident): interactive
|
|
119
|
+
* calls settle or reject within 5 s, teardown-class frames within 2 s, and
|
|
120
|
+
* bootstrap-class round-trips (connection init and first bring-up) within
|
|
121
|
+
* 10 s. They live beside `OpenTrayTransport` because they are part of the
|
|
122
|
+
* generic transport call contract, not of one broker implementation.
|
|
123
|
+
*/
|
|
124
|
+
declare const INTERACTIVE_CALL_DEADLINE_MS = 5000;
|
|
125
|
+
declare const TEARDOWN_CALL_DEADLINE_MS = 2000;
|
|
126
|
+
declare const BOOTSTRAP_CALL_DEADLINE_MS = 10000;
|
|
127
|
+
/**
|
|
128
|
+
* Typed per-call deadline rejection: the transport's budget for one
|
|
129
|
+
* round-trip expired without a correlated reply. This is the third
|
|
130
|
+
* rejection class, distinct from transport-lost (the plain
|
|
131
|
+
* `BROKER_CONNECTION_CLOSED_MESSAGE` sentinel family, or the typed
|
|
132
|
+
* `extension_transport_closed` for accepted deferred operations) and from
|
|
133
|
+
* broker-rejected (`BrokerServerError` / `ExtensionOperationError`). An
|
|
134
|
+
* expiry settles exactly one call; it never declares the transport dead —
|
|
135
|
+
* death stays a socket-close/error (and, later, heartbeat) verdict.
|
|
136
|
+
*/
|
|
137
|
+
declare class TransportTimeoutError extends Error {
|
|
138
|
+
readonly requestId: RequestId;
|
|
139
|
+
readonly deadlineMs: number;
|
|
140
|
+
constructor(requestId: RequestId, deadlineMs: number);
|
|
103
141
|
}
|
|
104
142
|
type OpenTrayEventFrame = Extract<ServerFrame$1, {
|
|
105
143
|
type: "event" | "app-event" | "ext-event";
|
|
106
144
|
}>;
|
|
145
|
+
/**
|
|
146
|
+
* Supervision state vocabulary (W6 Tier 1, harden-transport-robustness):
|
|
147
|
+
* `healthy` (a live generation is serving), `recovering` (uninvited death was
|
|
148
|
+
* declared and in-process recovery is running), `abandoned` (terminal — the
|
|
149
|
+
* recovery budget is exhausted and every later call fails fast with the
|
|
150
|
+
* typed `TransportAbandonedError`). Edge-triggered through
|
|
151
|
+
* `onTransportStateChange`; the initial `healthy` state never fires.
|
|
152
|
+
*/
|
|
153
|
+
type TransportState = "healthy" | "recovering" | "abandoned";
|
|
154
|
+
/**
|
|
155
|
+
* Context handed to a facade rebuild callback after a supervised recovery
|
|
156
|
+
* (W4): the fresh generation number and the new generation's broker session
|
|
157
|
+
* id, so extension facades can re-create session-attributed native state
|
|
158
|
+
* against the live session instead of the dead one.
|
|
159
|
+
*/
|
|
160
|
+
interface TransportRebuildContext {
|
|
161
|
+
readonly generation: number;
|
|
162
|
+
readonly sessionId: string | undefined;
|
|
163
|
+
}
|
|
107
164
|
interface OpenTrayEventSource {
|
|
108
165
|
onEvent(listener: (frame: OpenTrayEventFrame) => void): () => void;
|
|
109
166
|
}
|
|
@@ -190,6 +247,22 @@ interface EventfulTrayHandle extends TrayHandle {
|
|
|
190
247
|
* stopped, and every later request rejects instead of hanging.
|
|
191
248
|
*/
|
|
192
249
|
onConnectionDead?(handler: (error: Error) => void): () => void;
|
|
250
|
+
/**
|
|
251
|
+
* Tier 1 transport-supervision state projection (W6,
|
|
252
|
+
* harden-transport-robustness). Present when the underlying transport is
|
|
253
|
+
* supervised (the `createTray` runtime path always supervises): fires
|
|
254
|
+
* edge-triggered `healthy | recovering | abandoned` transitions across
|
|
255
|
+
* connection generations; the current value is not replayed.
|
|
256
|
+
*/
|
|
257
|
+
onTransportStateChange?(handler: (state: TransportState) => void): () => void;
|
|
258
|
+
/**
|
|
259
|
+
* Facade rebuild registration (W4, harden-transport-robustness). Present
|
|
260
|
+
* on supervised transports: extension facades register one callback that
|
|
261
|
+
* re-creates their declarative native state (windows, styles,
|
|
262
|
+
* subscriptions) after the supervisor recovered a fresh generation.
|
|
263
|
+
* Callbacks run in registration order after the core journal replay.
|
|
264
|
+
*/
|
|
265
|
+
registerTransportRebuild?(rebuild: (context: TransportRebuildContext) => Promise<void>): void;
|
|
193
266
|
}
|
|
194
267
|
interface ExtensionLoadOptions {
|
|
195
268
|
name: string;
|
|
@@ -238,6 +311,326 @@ declare function createClient(transport: OpenTrayTransport, options?: CreateClie
|
|
|
238
311
|
declare function createTrayHandle(transport: OpenTrayConnection, appId: string, trayId: TrayId$1, nextRequestId?: () => RequestId): EventfulTrayHandle;
|
|
239
312
|
declare function createTrayHandle(transport: OpenTrayTransport, appId: string, trayId: TrayId$1, nextRequestId?: () => RequestId): TrayHandle;
|
|
240
313
|
//#endregion
|
|
314
|
+
//#region src/local-broker.d.ts
|
|
315
|
+
type LocalRuntimeEventFrame = Extract<ServerFrame$1, {
|
|
316
|
+
type: "event" | "app-event" | "ext-event";
|
|
317
|
+
}>;
|
|
318
|
+
/**
|
|
319
|
+
* Transport-close sentinel every pending request rejects with when the
|
|
320
|
+
* broker socket closes (the broker exits once its last session closes, so a
|
|
321
|
+
* caller racing its own teardown against that exit sees this message).
|
|
322
|
+
* Exported so the tray-handle destroy path can treat it as the desired end
|
|
323
|
+
* state instead of a failure (P3.6 quit-path finding, 2026-09-12).
|
|
324
|
+
*/
|
|
325
|
+
declare const BROKER_CONNECTION_CLOSED_MESSAGE = "broker connection closed";
|
|
326
|
+
/**
|
|
327
|
+
* Generic transport-close rejection code for every pending deferred operation
|
|
328
|
+
* (add-ext-dialog section 5.1 frozen): the core client carries no extension-specific
|
|
329
|
+
* branch. Extension facades map this shared code onto their public surface
|
|
330
|
+
* (e.g. ext-dialog's `dialog_transport_closed`) - that mapping is facade work,
|
|
331
|
+
* never core work.
|
|
332
|
+
*/
|
|
333
|
+
declare const EXTENSION_TRANSPORT_CLOSED_CODE = "extension_transport_closed";
|
|
334
|
+
/**
|
|
335
|
+
* Typed rejection every deferred operation settles with: the `error` payload
|
|
336
|
+
* branch of an `ext-operation-terminal` frame, or the generic
|
|
337
|
+
* `extension_transport_closed` rejection when the transport dies while an
|
|
338
|
+
* operation is pending. Consumers match on `code`; the human `message` is not
|
|
339
|
+
* a contract. `details` carries the wire error's structured payload when the
|
|
340
|
+
* extension supplied one.
|
|
341
|
+
*/
|
|
342
|
+
declare class ExtensionOperationError extends Error {
|
|
343
|
+
readonly code: string;
|
|
344
|
+
readonly details?: unknown;
|
|
345
|
+
constructor(code: string, message: string, options?: {
|
|
346
|
+
details?: unknown;
|
|
347
|
+
cause?: unknown;
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Typed handshake rejection for a Ready frame whose protocol version does not
|
|
352
|
+
* equal the version this client sent in its Init frame: a structurally valid
|
|
353
|
+
* Ready frame alone must never accept the session (add-ext-dialog batch A
|
|
354
|
+
* review P1-9). The message names both sides; consumers may match
|
|
355
|
+
* `instanceof` or the two numeric fields.
|
|
356
|
+
*/
|
|
357
|
+
declare class BrokerProtocolVersionError extends Error {
|
|
358
|
+
readonly clientProtocolVersion: number;
|
|
359
|
+
readonly brokerProtocolVersion: number;
|
|
360
|
+
constructor(clientProtocolVersion: number, brokerProtocolVersion: number);
|
|
361
|
+
}
|
|
362
|
+
interface LocalBrokerClient extends OpenTrayTransport {
|
|
363
|
+
readonly endpoint: string;
|
|
364
|
+
readonly callerLabel: string;
|
|
365
|
+
readonly sessionId: string;
|
|
366
|
+
/**
|
|
367
|
+
* Terminal connection-death state (D3, harden-lifecycle-ownership): true
|
|
368
|
+
* once the broker socket errored or closed. Pending and future requests
|
|
369
|
+
* reject; event delivery has stopped.
|
|
370
|
+
*/
|
|
371
|
+
readonly connectionDead: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Terminal connection-death notification; fires exactly once, either for a
|
|
374
|
+
* transport error or the transport-close sentinel, and also after a
|
|
375
|
+
* caller-initiated graceful `close()` completes.
|
|
376
|
+
*/
|
|
377
|
+
onConnectionDead(listener: (error: Error) => void): () => void;
|
|
378
|
+
/**
|
|
379
|
+
* Internal deadline-expiry observation seam (W1, harden-transport-robustness):
|
|
380
|
+
* not consumer API. A supervision layer (Phase C heartbeat) subscribes to
|
|
381
|
+
* attribute probe failures — an expiry settles one call and never declares
|
|
382
|
+
* the transport dead, but it counts as one liveness-failure signal.
|
|
383
|
+
*/
|
|
384
|
+
onDeadlineExpiry(listener: (expiry: TransportDeadlineExpiry) => void): () => void;
|
|
385
|
+
onEvent(listener: (frame: LocalRuntimeEventFrame) => void): () => void;
|
|
386
|
+
close(): Promise<void>;
|
|
387
|
+
}
|
|
388
|
+
/** Payload of the internal deadline-expiry seam: which call class budget expired. */
|
|
389
|
+
interface TransportDeadlineExpiry {
|
|
390
|
+
readonly requestId: RequestId;
|
|
391
|
+
readonly deadlineMs: number;
|
|
392
|
+
}
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/transport-supervision.d.ts
|
|
395
|
+
/**
|
|
396
|
+
* Typed fail-fast rejection for every call issued after supervision reached
|
|
397
|
+
* its terminal `abandoned` state: the recovery budget is exhausted and the
|
|
398
|
+
* runtime stays headless by design (the consumer process keeps running).
|
|
399
|
+
* Consumers match on `code` (`transport_abandoned`); `details` carries the
|
|
400
|
+
* budget facts `{ recoveries, windowMs }`.
|
|
401
|
+
*/
|
|
402
|
+
declare class TransportAbandonedError extends Error {
|
|
403
|
+
readonly code = "transport_abandoned";
|
|
404
|
+
readonly details: {
|
|
405
|
+
readonly recoveries: number;
|
|
406
|
+
readonly windowMs: number;
|
|
407
|
+
};
|
|
408
|
+
constructor(recoveries: number, windowMs: number);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Tier 0/2 recovery policy (W6). Every key has a working default; the whole
|
|
412
|
+
* object is optional — not configuring it means full default protection.
|
|
413
|
+
* Policy stays in the app; mechanism stays in the SDK.
|
|
414
|
+
*/
|
|
415
|
+
interface TransportRecoveryOptions {
|
|
416
|
+
/**
|
|
417
|
+
* Master switch (default `true`). `false` degrades supervision to today's
|
|
418
|
+
* behavior plus heartbeat death detection: declared death stays terminal
|
|
419
|
+
* per connection, no respawn, no `recovering`/`abandoned` transitions.
|
|
420
|
+
*/
|
|
421
|
+
enabled?: boolean;
|
|
422
|
+
/** Recovery attempts allowed per sliding `windowMs` (default 3). */
|
|
423
|
+
maxRestarts?: number;
|
|
424
|
+
/** Sliding budget window in milliseconds (default 600_000 = 10 min). */
|
|
425
|
+
windowMs?: number;
|
|
426
|
+
/** Cooldown before the first respawn attempt (default 1_000). */
|
|
427
|
+
cooldownMs?: number;
|
|
428
|
+
/** Multiplier applied to the cooldown after each failed attempt (default 2). */
|
|
429
|
+
backoffFactor?: number;
|
|
430
|
+
/** Backoff ceiling in milliseconds (default 30_000). */
|
|
431
|
+
backoffCapMs?: number;
|
|
432
|
+
/**
|
|
433
|
+
* Tier 2 hand-over (default: absent). When provided, an uninvited death
|
|
434
|
+
* performs a bounded teardown, invokes this callback exactly once, and goes
|
|
435
|
+
* terminal — the supervisor never performs in-process rebuild and never
|
|
436
|
+
* loops. The SDK never embeds app-process restart vectors itself.
|
|
437
|
+
*/
|
|
438
|
+
restartApp?: () => void | Promise<void>;
|
|
439
|
+
}
|
|
440
|
+
/** Constructor tuning for {@link createTransportSupervisor}. */
|
|
441
|
+
interface CreateTransportSupervisorOptions {
|
|
442
|
+
/**
|
|
443
|
+
* Establishes one broker connection generation. Production callers close
|
|
444
|
+
* over `connectLocalBroker` with the caller's original options so a
|
|
445
|
+
* respawn is exactly a reconnect: daemon lifecycle, identity gates, and
|
|
446
|
+
* lock reclaim all reapply unchanged.
|
|
447
|
+
*/
|
|
448
|
+
connect(): Promise<LocalBrokerClient>;
|
|
449
|
+
/** Idle gap before a health probe is sent (default 30 s). */
|
|
450
|
+
heartbeatIntervalMs?: number;
|
|
451
|
+
/** Per-probe deadline budget (default 3 s). */
|
|
452
|
+
probeDeadlineMs?: number;
|
|
453
|
+
/** Consecutive probe failures that declare death (default 3). */
|
|
454
|
+
heartbeatFailureThreshold?: number;
|
|
455
|
+
/** Recovery policy; every key defaulted (Tier 0). */
|
|
456
|
+
recovery?: TransportRecoveryOptions;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Supervised transport (W2/W4/W5/W6): a stable `OpenTrayConnection`-shaped
|
|
460
|
+
* proxy for the layers above (createClient, tray handles) that owns one
|
|
461
|
+
* broker connection per generation underneath. Consumer event subscriptions
|
|
462
|
+
* and the supervision state machine survive generation changes;
|
|
463
|
+
* per-connection surfaces (`onConnectionDead`) stay per-generation truth.
|
|
464
|
+
*/
|
|
465
|
+
declare class SupervisedLocalBrokerConnection {
|
|
466
|
+
private readonly connectFactory;
|
|
467
|
+
private readonly heartbeatIntervalMs;
|
|
468
|
+
private readonly probeDeadlineMs;
|
|
469
|
+
private readonly heartbeatFailureThreshold;
|
|
470
|
+
private readonly recoveryEnabled;
|
|
471
|
+
private readonly maxRestarts;
|
|
472
|
+
private readonly recoveryWindowMs;
|
|
473
|
+
private readonly cooldownMs;
|
|
474
|
+
private readonly backoffFactor;
|
|
475
|
+
private readonly backoffCapMs;
|
|
476
|
+
private readonly restartApp;
|
|
477
|
+
private connection;
|
|
478
|
+
private generation;
|
|
479
|
+
private state;
|
|
480
|
+
private journal;
|
|
481
|
+
private readonly eventListeners;
|
|
482
|
+
private readonly deadListeners;
|
|
483
|
+
private readonly stateListeners;
|
|
484
|
+
private readonly rebuildCallbacks;
|
|
485
|
+
private unwireGeneration;
|
|
486
|
+
private heartbeatTimer;
|
|
487
|
+
private heartbeatOrdinal;
|
|
488
|
+
private consecutiveHeartbeatFailures;
|
|
489
|
+
private lastSettledAt;
|
|
490
|
+
private restartTimestamps;
|
|
491
|
+
private callerInitiated;
|
|
492
|
+
private shutdownPromise;
|
|
493
|
+
constructor(connectFactory: () => Promise<LocalBrokerClient>, options: CreateTransportSupervisorOptions);
|
|
494
|
+
/** Current supervision state; edge events go to {@link onTransportStateChange}. */
|
|
495
|
+
get transportState(): TransportState;
|
|
496
|
+
/** Monotonic generation counter; each respawn/replay increments it once. */
|
|
497
|
+
get transportGeneration(): number;
|
|
498
|
+
/** Current generation's endpoint (proxy; absent before the first connect). */
|
|
499
|
+
get endpoint(): string;
|
|
500
|
+
/** Current generation's caller label (proxy; absent before the first connect). */
|
|
501
|
+
get callerLabel(): string;
|
|
502
|
+
/**
|
|
503
|
+
* Current generation's broker session id. Read dynamically so extension
|
|
504
|
+
* contexts and rebuild callbacks can attribute session-owned state to the
|
|
505
|
+
* live generation (the id changes on every respawn).
|
|
506
|
+
*/
|
|
507
|
+
get sessionId(): string;
|
|
508
|
+
/** True once the current generation's connection died (or none exists). */
|
|
509
|
+
get connectionDead(): boolean;
|
|
510
|
+
/**
|
|
511
|
+
* Establishes generation 0. A failure here propagates to the caller
|
|
512
|
+
* unchanged — supervision (heartbeat, recovery) only guards a connection
|
|
513
|
+
* that once existed; an app that never started is a plain startup failure.
|
|
514
|
+
*/
|
|
515
|
+
connect(): Promise<void>;
|
|
516
|
+
/**
|
|
517
|
+
* Forwards one request to the current generation. After the terminal
|
|
518
|
+
* `abandoned` state every call fails fast with {@link TransportAbandonedError}.
|
|
519
|
+
* A teardown-budget call (`deadlineMs === TEARDOWN_CALL_DEADLINE_MS`) marks
|
|
520
|
+
* the supervision caller-initiated: Phase A froze the budget class as the
|
|
521
|
+
* caller-intent channel, so a socket close racing caller-initiated destroy
|
|
522
|
+
* can never be misread as uninvited death.
|
|
523
|
+
*/
|
|
524
|
+
request(frame: ClientRequestFrame$1, options?: TransportRequestOptions): Promise<ServerFrame$1>;
|
|
525
|
+
/**
|
|
526
|
+
* Consumer event subscription that survives generation changes: each new
|
|
527
|
+
* generation's event stream fans out to the same listeners.
|
|
528
|
+
*/
|
|
529
|
+
onEvent(listener: (frame: OpenTrayEventFrame) => void): () => void;
|
|
530
|
+
/**
|
|
531
|
+
* Per-connection death notification, forwarded for every generation (D3
|
|
532
|
+
* semantics preserved: consumers using it for per-connection cleanup keep
|
|
533
|
+
* working; the supervision state machine is the new higher-level truth).
|
|
534
|
+
*/
|
|
535
|
+
onConnectionDead(listener: (error: Error) => void): () => void;
|
|
536
|
+
/**
|
|
537
|
+
* Tier 1 health projection (W6): edge-triggered `healthy | recovering |
|
|
538
|
+
* abandoned` transitions. The initial `healthy` state never fires —
|
|
539
|
+
* consumers reading the current state use `transportState`.
|
|
540
|
+
*/
|
|
541
|
+
onTransportStateChange(listener: (state: TransportState) => void): () => void;
|
|
542
|
+
/**
|
|
543
|
+
* Registers one facade rebuild callback (W4). Callbacks run in
|
|
544
|
+
* registration order after the core journal replay on every successful
|
|
545
|
+
* recovery, receiving the fresh generation number and session id so
|
|
546
|
+
* session-attributed native state can be re-created against the live
|
|
547
|
+
* broker session.
|
|
548
|
+
*/
|
|
549
|
+
registerTransportRebuild(rebuild: (context: TransportRebuildContext) => Promise<void>): void;
|
|
550
|
+
/**
|
|
551
|
+
* Graceful teardown channel (W4/W3): idempotent, marks the supervision
|
|
552
|
+
* caller-initiated synchronously (so the close-driven death event can
|
|
553
|
+
* never trigger recovery), stops the heartbeat, then closes the current
|
|
554
|
+
* generation within its bounded graceful-close budget.
|
|
555
|
+
*/
|
|
556
|
+
shutdown(): Promise<void>;
|
|
557
|
+
/** LocalBrokerClient structural compatibility: graceful close == shutdown. */
|
|
558
|
+
close(): Promise<void>;
|
|
559
|
+
private startHeartbeat;
|
|
560
|
+
private stopHeartbeat;
|
|
561
|
+
/**
|
|
562
|
+
* Idle-gated heartbeat (W2): a transport that keeps settling requests
|
|
563
|
+
* proves its own liveness, so the probe budget is spent only on silence.
|
|
564
|
+
* A probe failure of any rejection class (typed timeout, transport-lost,
|
|
565
|
+
* broker error frame) counts; a successful settlement resets the streak.
|
|
566
|
+
*/
|
|
567
|
+
private heartbeatTick;
|
|
568
|
+
private noteSuccessfulSettlement;
|
|
569
|
+
/**
|
|
570
|
+
* Subscribes this supervisor's stable listener sets to one generation.
|
|
571
|
+
* Event fanout and the death/expiry seams are wired before the generation
|
|
572
|
+
* becomes `this.connection` (recovery candidates are wired before replay)
|
|
573
|
+
* so no observable event window opens between adoption steps.
|
|
574
|
+
*/
|
|
575
|
+
private wireGeneration;
|
|
576
|
+
/**
|
|
577
|
+
* Death funnel: forwards the per-connection event first (D3 truth), stops
|
|
578
|
+
* this generation's wiring, then decides the supervision reaction. The
|
|
579
|
+
* state guard makes the reaction single-flight — deaths of candidates
|
|
580
|
+
* during an ongoing recovery only forward, they never nest recoveries.
|
|
581
|
+
*/
|
|
582
|
+
private handleGenerationDeath;
|
|
583
|
+
/**
|
|
584
|
+
* Tier 2 hand-over: bounded teardown of the current generation, the app's
|
|
585
|
+
* restart vector invoked exactly once, then terminal. No in-process
|
|
586
|
+
* rebuild, no loop — restart ownership belongs to the callback.
|
|
587
|
+
*/
|
|
588
|
+
private handOverToRestartApp;
|
|
589
|
+
/**
|
|
590
|
+
* In-process recovery (W4/W5): cooldown backoff → reconnect through the
|
|
591
|
+
* original connect options → journal replay → facade rebuilds → healthy.
|
|
592
|
+
* Every attempt consumes budget up front; a failed attempt (connect,
|
|
593
|
+
* replay, or rebuild — including artifact identity mismatches) retries
|
|
594
|
+
* inside the remaining budget until exhaustion abandons the runtime.
|
|
595
|
+
*/
|
|
596
|
+
private runRecovery;
|
|
597
|
+
private cooldownForBackoff;
|
|
598
|
+
/**
|
|
599
|
+
* Sliding-window budget: one timestamp per respawn attempt (successful or
|
|
600
|
+
* not — both are respawns the consumer experienced). In-memory per
|
|
601
|
+
* supervisor by ruling; a fresh `createTray` starts a fresh budget.
|
|
602
|
+
*/
|
|
603
|
+
private consumeRestartBudget;
|
|
604
|
+
/**
|
|
605
|
+
* Wires the candidate generation, replays the journal, and runs the
|
|
606
|
+
* facade rebuild callbacks. `this.connection` is committed only after the
|
|
607
|
+
* full sequence succeeds: consumer calls during recovery keep failing
|
|
608
|
+
* fast against the dead generation instead of racing a half-replayed
|
|
609
|
+
* broker. A failing candidate is unwired and closed (bounded) before the
|
|
610
|
+
* attempt is reported failed.
|
|
611
|
+
*/
|
|
612
|
+
private adoptGeneration;
|
|
613
|
+
/**
|
|
614
|
+
* Replays the declarative journal in record order with fresh request ids
|
|
615
|
+
* under the bootstrap deadline class. The resolved default app of the new
|
|
616
|
+
* generation becomes the appId authority: replayed frames are rewritten
|
|
617
|
+
* onto it, so app-scoped state follows broker truth instead of a stale
|
|
618
|
+
* generation's identity.
|
|
619
|
+
*/
|
|
620
|
+
private replayJournal;
|
|
621
|
+
private setState;
|
|
622
|
+
private commitJournalEntry;
|
|
623
|
+
/**
|
|
624
|
+
* Keyed entries replace in place at first-occurrence position (last-write-
|
|
625
|
+
* wins value, stable ordering); first occurrences append. Tray creations
|
|
626
|
+
* and mount declarations keep their creation order by construction.
|
|
627
|
+
*/
|
|
628
|
+
private upsertJournal;
|
|
629
|
+
private evictJournalTray;
|
|
630
|
+
}
|
|
631
|
+
/** Constructs a supervised transport around one connect factory. */
|
|
632
|
+
declare const createTransportSupervisor: (options: CreateTransportSupervisorOptions) => SupervisedLocalBrokerConnection;
|
|
633
|
+
//#endregion
|
|
241
634
|
//#region src/menu-input.d.ts
|
|
242
635
|
type CreateTrayMenuClickHandler = (event: TrayEventByType<"menuClick">) => void;
|
|
243
636
|
/** App-facing menu input accepted by top-level createTray and setMenu. */
|
|
@@ -296,6 +689,15 @@ interface OpenTrayRuntimeOptions {
|
|
|
296
689
|
/** Stable app-entry launch vector. Omitted/null snapshots the current invocation. */
|
|
297
690
|
appLaunch?: OpenTrayAppLaunchOptions$1 | null;
|
|
298
691
|
autoStart?: boolean;
|
|
692
|
+
/**
|
|
693
|
+
* Optional transport supervision policy (Tier 0/2,
|
|
694
|
+
* harden-transport-robustness). Every key has a working default; omitting
|
|
695
|
+
* the object entirely means full default protection: heartbeat death
|
|
696
|
+
* detection, automatic in-process recovery with journal replay, and a
|
|
697
|
+
* bounded restart budget. `enabled: false` keeps death detection but
|
|
698
|
+
* degrades to today's fail-fast behavior.
|
|
699
|
+
*/
|
|
700
|
+
recovery?: TransportRecoveryOptions;
|
|
299
701
|
}
|
|
300
702
|
/** App-facing tray options accepted by top-level createTray. */
|
|
301
703
|
interface CreateTrayOptions {
|
|
@@ -312,52 +714,6 @@ interface CreateTrayHandle extends Omit<EventfulTrayHandle, "setMenu" | "extend"
|
|
|
312
714
|
}
|
|
313
715
|
declare const createTray: (options: CreateTrayOptions, runtimeOptions?: OpenTrayRuntimeOptions) => Promise<CreateTrayHandle>;
|
|
314
716
|
//#endregion
|
|
315
|
-
//#region src/local-broker.d.ts
|
|
316
|
-
/**
|
|
317
|
-
* Transport-close sentinel every pending request rejects with when the
|
|
318
|
-
* broker socket closes (the broker exits once its last session closes, so a
|
|
319
|
-
* caller racing its own teardown against that exit sees this message).
|
|
320
|
-
* Exported so the tray-handle destroy path can treat it as the desired end
|
|
321
|
-
* state instead of a failure (P3.6 quit-path finding, 2026-09-12).
|
|
322
|
-
*/
|
|
323
|
-
declare const BROKER_CONNECTION_CLOSED_MESSAGE = "broker connection closed";
|
|
324
|
-
/**
|
|
325
|
-
* Generic transport-close rejection code for every pending deferred operation
|
|
326
|
-
* (add-ext-dialog section 5.1 frozen): the core client carries no extension-specific
|
|
327
|
-
* branch. Extension facades map this shared code onto their public surface
|
|
328
|
-
* (e.g. ext-dialog's `dialog_transport_closed`) - that mapping is facade work,
|
|
329
|
-
* never core work.
|
|
330
|
-
*/
|
|
331
|
-
declare const EXTENSION_TRANSPORT_CLOSED_CODE = "extension_transport_closed";
|
|
332
|
-
/**
|
|
333
|
-
* Typed rejection every deferred operation settles with: the `error` payload
|
|
334
|
-
* branch of an `ext-operation-terminal` frame, or the generic
|
|
335
|
-
* `extension_transport_closed` rejection when the transport dies while an
|
|
336
|
-
* operation is pending. Consumers match on `code`; the human `message` is not
|
|
337
|
-
* a contract. `details` carries the wire error's structured payload when the
|
|
338
|
-
* extension supplied one.
|
|
339
|
-
*/
|
|
340
|
-
declare class ExtensionOperationError extends Error {
|
|
341
|
-
readonly code: string;
|
|
342
|
-
readonly details?: unknown;
|
|
343
|
-
constructor(code: string, message: string, options?: {
|
|
344
|
-
details?: unknown;
|
|
345
|
-
cause?: unknown;
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Typed handshake rejection for a Ready frame whose protocol version does not
|
|
350
|
-
* equal the version this client sent in its Init frame: a structurally valid
|
|
351
|
-
* Ready frame alone must never accept the session (add-ext-dialog batch A
|
|
352
|
-
* review P1-9). The message names both sides; consumers may match
|
|
353
|
-
* `instanceof` or the two numeric fields.
|
|
354
|
-
*/
|
|
355
|
-
declare class BrokerProtocolVersionError extends Error {
|
|
356
|
-
readonly clientProtocolVersion: number;
|
|
357
|
-
readonly brokerProtocolVersion: number;
|
|
358
|
-
constructor(clientProtocolVersion: number, brokerProtocolVersion: number);
|
|
359
|
-
}
|
|
360
|
-
//#endregion
|
|
361
717
|
//#region src/app-icon.d.ts
|
|
362
718
|
declare const DEFAULT_APP_ICON_VARIANT: "default";
|
|
363
719
|
declare class InvalidAppIconError extends Error {
|
|
@@ -373,5 +729,5 @@ declare class AppIconVariantNotFoundError extends Error {
|
|
|
373
729
|
/** Validate an explicit AppIcon, including native file signatures, before broker startup. */
|
|
374
730
|
declare const validateAppIcon: (icon: unknown, platform?: NodeJS.Platform) => Promise<void>;
|
|
375
731
|
//#endregion
|
|
376
|
-
export { type AppEvent, type AppHandle, type AppIcon, type AppIconAsset, type AppIconSource, type AppIconVariant, AppIconVariantNotFoundError, type AppIconVariantOf, type AppId, type AppIdentity, type AppOptions, type AppRef, BROKER_CONNECTION_CLOSED_MESSAGE, type BrokerEndpointIdentity, type BrokerEndpointIdentityOptions, BrokerProtocolVersionError, BrokerServerError, type ClientFrame, type ClientRequestFrame, type CommandScope, type CreateClientOptions, type CreateTrayCheckItem, type CreateTrayHandle, type CreateTrayItem, type CreateTrayMenu, type CreateTrayMenu as TrayMenu, type CreateTrayMenuClickHandler, type CreateTrayMenuItem, type CreateTrayOptions, type CreateTrayRadioItem, type CreateTraySeparatorItem, type CreateTraySubmenuItem, DEFAULT_APP_ICON_VARIANT, type DarwinIcon, type DarwinIconText, EMBEDDED_STAGING_MANIFEST_PATH, EXTENSION_EVENT_RECORD_MAX_BYTES, EXTENSION_TRANSPORT_CLOSED_CODE, type EventfulTrayHandle, type ExpectedExtensionIdentity, type ExtOperationPayload, type ExtensionArtifactTarget, type ExtensionEnvelope, type ExtensionLoadOptions, ExtensionOperationError, type ExtensionRequestResult, type Icon, type IconCandidates, type IconImage, type IconText, InvalidAppIconError, type LinuxIcon, type Menu, type MenuItem, type MenuItemId, type MouseButton, NATIVE_EXTENSION_EMBEDDED_ERROR_CODES, NATIVE_EXTENSION_EMBEDDED_TARGET_MATRIX, type NativeExtensionArch, type NativeExtensionArtifact, NativeExtensionArtifactResolutionError, type NativeExtensionEmbeddedArtifact, NativeExtensionEmbeddedArtifactError, type NativeExtensionEmbeddedErrorReason, type NativeExtensionEmbeddedMatrixTarget, type NativeExtensionEmbeddedTarget, type NativeExtensionExpectedIdentity, type NativeExtensionFileArtifact, type NativeExtensionIdentitySource, type NativeExtensionPackageArtifact, type NativeExtensionPackageTarget, type NativeExtensionTarget, type OpenTrayAppBundleOptions, type OpenTrayAppLaunchOptions, type OpenTrayClient, type OpenTrayConnection, type OpenTrayEventFrame, type OpenTrayEventSource, type OpenTrayRuntimeOptions, type OpenTrayTransport, PROTOCOL_VERSION, type Rect, type ResolvedNativeExtensionArtifact, type ServerFrame, type SimpleIcon, type Tooltip, type TrayBoundsKind, type TrayBoundsResult, type TrayEvent, type TrayEventByType, type TrayEventType, type TrayExtension, type TrayExtensionContext, type TrayExtensionMountSpec, type TrayHandle, type TrayIcon, type TrayId, type TrayOptions, type TrayTooltip, type TypedExtensionError, type Win32Icon, createBrokerEndpointIdentity, createClient, createInitFrame, createTray, createTrayHandle, formatBrokerEndpointName, formatBrokerStateRoot, formatUnixSocketPath, formatWindowsPipeName, isSupportedProtocolVersion, resolveNativeExtensionArtifact, validateAppIcon };
|
|
732
|
+
export { type AppEvent, type AppHandle, type AppIcon, type AppIconAsset, type AppIconSource, type AppIconVariant, AppIconVariantNotFoundError, type AppIconVariantOf, type AppId, type AppIdentity, type AppOptions, type AppRef, BOOTSTRAP_CALL_DEADLINE_MS, BROKER_CONNECTION_CLOSED_MESSAGE, type BrokerEndpointIdentity, type BrokerEndpointIdentityOptions, BrokerProtocolVersionError, BrokerServerError, type ClientFrame, type ClientRequestFrame, type CommandScope, type CreateClientOptions, type CreateTransportSupervisorOptions, type CreateTrayCheckItem, type CreateTrayHandle, type CreateTrayItem, type CreateTrayMenu, type CreateTrayMenu as TrayMenu, type CreateTrayMenuClickHandler, type CreateTrayMenuItem, type CreateTrayOptions, type CreateTrayRadioItem, type CreateTraySeparatorItem, type CreateTraySubmenuItem, DEFAULT_APP_ICON_VARIANT, type DarwinIcon, type DarwinIconText, EMBEDDED_STAGING_MANIFEST_PATH, EXTENSION_EVENT_RECORD_MAX_BYTES, EXTENSION_TRANSPORT_CLOSED_CODE, type EventfulTrayHandle, type ExpectedExtensionIdentity, type ExtOperationPayload, type ExtensionArtifactTarget, type ExtensionEnvelope, type ExtensionLoadOptions, ExtensionOperationError, type ExtensionRequestResult, INTERACTIVE_CALL_DEADLINE_MS, type Icon, type IconCandidates, type IconImage, type IconText, InvalidAppIconError, type LinuxIcon, type Menu, type MenuItem, type MenuItemId, type MouseButton, NATIVE_EXTENSION_EMBEDDED_ERROR_CODES, NATIVE_EXTENSION_EMBEDDED_TARGET_MATRIX, type NativeExtensionArch, type NativeExtensionArtifact, NativeExtensionArtifactResolutionError, type NativeExtensionEmbeddedArtifact, NativeExtensionEmbeddedArtifactError, type NativeExtensionEmbeddedErrorReason, type NativeExtensionEmbeddedMatrixTarget, type NativeExtensionEmbeddedTarget, type NativeExtensionExpectedIdentity, type NativeExtensionFileArtifact, type NativeExtensionIdentitySource, type NativeExtensionPackageArtifact, type NativeExtensionPackageTarget, type NativeExtensionTarget, type OpenTrayAppBundleOptions, type OpenTrayAppLaunchOptions, type OpenTrayClient, type OpenTrayConnection, type OpenTrayEventFrame, type OpenTrayEventSource, type OpenTrayRuntimeOptions, type OpenTrayTransport, PROTOCOL_VERSION, type Rect, type ResolvedNativeExtensionArtifact, type ServerFrame, type SimpleIcon, type SupervisedLocalBrokerConnection, TEARDOWN_CALL_DEADLINE_MS, type Tooltip, TransportAbandonedError, type TransportRebuildContext, type TransportRecoveryOptions, type TransportRequestOptions, type TransportState, TransportTimeoutError, type TrayBoundsKind, type TrayBoundsResult, type TrayEvent, type TrayEventByType, type TrayEventType, type TrayExtension, type TrayExtensionContext, type TrayExtensionMountSpec, type TrayHandle, type TrayIcon, type TrayId, type TrayOptions, type TrayTooltip, type TypedExtensionError, type Win32Icon, createBrokerEndpointIdentity, createClient, createInitFrame, createTransportSupervisor, createTray, createTrayHandle, formatBrokerEndpointName, formatBrokerStateRoot, formatUnixSocketPath, formatWindowsPipeName, isSupportedProtocolVersion, resolveNativeExtensionArtifact, validateAppIcon };
|
|
377
733
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/native-extension-artifact.ts","../src/client.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/native-extension-artifact.ts","../src/client.ts","../src/local-broker.ts","../src/transport-supervision.ts","../src/menu-input.ts","../src/sdk.ts","../src/app-icon.ts"],"mappings":";;;;KAcY,mBAAA;AAAA,KACA,qBAAA,MAA2B,MAAA,CAAO,QAAA,IAAY,mBAAmB;AAAA,UAE5D,4BAAA;EACf,WAAA;EACA,WAAW;AAAA;AAAA,UAGI,6BAAA;EACf,cAAA;EACA,mBAAmB;AAAA;AAAA,UAGJ,8BAAA,SACP,6BAAA;EACR,IAAA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