@actana/sdk 0.2.2
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/LICENSE +21 -0
- package/README.md +66 -0
- package/dist/core-client.d.ts +616 -0
- package/dist/core-client.d.ts.map +1 -0
- package/dist/core-client.js +1036 -0
- package/dist/core-client.js.map +1 -0
- package/dist/core-link-cursor-storage.d.ts +32 -0
- package/dist/core-link-cursor-storage.d.ts.map +1 -0
- package/dist/core-link-cursor-storage.js +66 -0
- package/dist/core-link-cursor-storage.js.map +1 -0
- package/dist/core-link-frames.d.ts +1123 -0
- package/dist/core-link-frames.d.ts.map +1 -0
- package/dist/core-link-frames.js +349 -0
- package/dist/core-link-frames.js.map +1 -0
- package/dist/core-link-socket.d.ts +54 -0
- package/dist/core-link-socket.d.ts.map +1 -0
- package/dist/core-link-socket.js +74 -0
- package/dist/core-link-socket.js.map +1 -0
- package/dist/core-link-transport.d.ts +177 -0
- package/dist/core-link-transport.d.ts.map +1 -0
- package/dist/core-link-transport.js +432 -0
- package/dist/core-link-transport.js.map +1 -0
- package/dist/core-registration-blob.d.ts +52 -0
- package/dist/core-registration-blob.d.ts.map +1 -0
- package/dist/core-registration-blob.js +61 -0
- package/dist/core-registration-blob.js.map +1 -0
- package/dist/core-session.d.ts +321 -0
- package/dist/core-session.d.ts.map +1 -0
- package/dist/core-session.js +660 -0
- package/dist/core-session.js.map +1 -0
- package/dist/durable-core-client.d.ts +172 -0
- package/dist/durable-core-client.d.ts.map +1 -0
- package/dist/durable-core-client.js +264 -0
- package/dist/durable-core-client.js.map +1 -0
- package/dist/terminal-screen.d.ts +139 -0
- package/dist/terminal-screen.d.ts.map +1 -0
- package/dist/terminal-screen.js +807 -0
- package/dist/terminal-screen.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
import { type CoreLinkErrorCode, type CoreLinkEvent, type CoreLinkHarnessAvailabilityMap, type CoreLinkLaunchProcessKillResult, type CoreLinkMultiConnectionCapability, type CoreLinkProjectMutation, type CoreLinkProjectSnapshot, type CoreLinkPtyReplay, type CoreLinkPtySpawnOptions, type CoreLinkRequestFrame, type CoreLinkResponseFrame, type CoreLinkSessionSnapshot, type CoreLinkSessionTakenFrom, type CoreLinkTaskMutation, type CoreLinkTaskSnapshot } from "./core-link-frames.ts";
|
|
2
|
+
import { CoreLinkTransport, type CoreLinkAuthErrorReason, type CoreLinkDataFrame, type CoreLinkExitFrame, type CoreLinkHeartbeatOptions } from "./core-link-transport.ts";
|
|
3
|
+
import { type CoreLinkSocketFactory, type CoreLinkTlsMaterial } from "./core-link-socket.ts";
|
|
4
|
+
import { type CoreRegistrationBlob } from "./core-registration-blob.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Request frames that only mean anything against a Core announcing
|
|
7
|
+
* `multiConnection` on `ready` (ADR 0024 D11) — the one list
|
|
8
|
+
* {@link CoreClient.canSendMultiConnectionFrames} guards.
|
|
9
|
+
*
|
|
10
|
+
* `ptySubscribe` / `ptyUnsubscribe` (ADR 0024 D2) are the first entries: a Core
|
|
11
|
+
* that fans a PTY out per subscription is exactly a multi-connection Core, and
|
|
12
|
+
* one that never announced the capability has no subscription list to put a PTY
|
|
13
|
+
* on. The Session lock's `claim` / `release` / `forceTakeover` (D3–D7) joined
|
|
14
|
+
* them for the same reason in its own key: a single-connection Core has no lock
|
|
15
|
+
* table to address, because it evicts every client but one and therefore has
|
|
16
|
+
* nothing for a lock to arbitrate between. `reclaim` (D9) is the sharpest of the
|
|
17
|
+
* three: a single-connection Core evicts its predecessor on connect *already*,
|
|
18
|
+
* so the frame asks for what that Core has just done, out of a lock table it
|
|
19
|
+
* does not have.
|
|
20
|
+
*
|
|
21
|
+
* Being in this set is not the whole story for a frame whose caller has
|
|
22
|
+
* something better to do than fail. A caller that can degrade consults
|
|
23
|
+
* {@link CoreClient.canSendMultiConnectionFrames} and takes the
|
|
24
|
+
* single-connection route itself — see {@link CoreClient.ptySubscribe} and
|
|
25
|
+
* {@link CoreClient.claim}, which both do exactly that. The rejection in
|
|
26
|
+
* {@link CoreClient.request} is the backstop for callers that ask without
|
|
27
|
+
* checking, not the designed path for the frames listed here.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MULTI_CONNECTION_ONLY_FRAME_TYPES: ReadonlySet<CoreLinkRequestFrame["type"]>;
|
|
30
|
+
/**
|
|
31
|
+
* The rejection a caller gets when the Core answers a request with an `error`
|
|
32
|
+
* frame — carrying that frame's machine-readable {@link CoreLinkErrorCode}
|
|
33
|
+
* alongside its prose (issue 144).
|
|
34
|
+
*
|
|
35
|
+
* `code` exists precisely so a caller does not have to match on `message`, and a
|
|
36
|
+
* client that threw a bare `Error` would put the parsing back that the field was
|
|
37
|
+
* added to remove. It is optional on the wire and optional here: absent on every
|
|
38
|
+
* error that shipped before the field, so a reader takes the code when it is
|
|
39
|
+
* there and falls back to the message when it is not — never the reverse.
|
|
40
|
+
*
|
|
41
|
+
* `session-locked` is its first value and the reason this class exists: a
|
|
42
|
+
* mutation refused because another Core client holds that Session throws,
|
|
43
|
+
* whereas a mutation aimed at a Session this Core no longer has resolves
|
|
44
|
+
* (`ok: false` / `task: null`). One of the two is worth retrying after a claim
|
|
45
|
+
* and the other never is, and telling them apart is the caller's whole job.
|
|
46
|
+
*/
|
|
47
|
+
export declare class CoreLinkRequestError extends Error {
|
|
48
|
+
/** The `code` off the `error` frame, when it carried one. */
|
|
49
|
+
readonly code?: CoreLinkErrorCode;
|
|
50
|
+
constructor(message: string, code?: CoreLinkErrorCode);
|
|
51
|
+
}
|
|
52
|
+
/** Thrown when a bearer is refused: `expired`, `bad-signature`, `malformed`. */
|
|
53
|
+
export declare class CoreLinkAuthError extends Error {
|
|
54
|
+
readonly reason: CoreLinkAuthErrorReason;
|
|
55
|
+
constructor(reason: CoreLinkAuthErrorReason);
|
|
56
|
+
}
|
|
57
|
+
/** What a connected Core told this client about itself, on `ready` and `authOk`. */
|
|
58
|
+
export type CoreConnectionInfo = {
|
|
59
|
+
/** The protocol version off `ready`, or null when the frame carried none. */
|
|
60
|
+
protocolVersion: string | null;
|
|
61
|
+
/** Does this build speak that version? See `coreLinkProtocolCompatible`. */
|
|
62
|
+
compatible: boolean;
|
|
63
|
+
/** The `multiConnection` capability, or null on a single-connection Core. */
|
|
64
|
+
multiConnection: CoreLinkMultiConnectionCapability | null;
|
|
65
|
+
/** The `coreId` off `authOk`; null when no bearer was configured. */
|
|
66
|
+
coreId: string | null;
|
|
67
|
+
/** The bearer's expiry off `authOk`; null when no bearer was configured. */
|
|
68
|
+
bearerExpiresAt: number | null;
|
|
69
|
+
};
|
|
70
|
+
export type CoreClientOptions = {
|
|
71
|
+
/** The core-link URL to dial. Ignored when {@link CoreClientOptions.blob} is set. */
|
|
72
|
+
url?: string;
|
|
73
|
+
/** PEM material for the mTLS handshake (ADR 0002). Ignored when `blob` is set. */
|
|
74
|
+
tls?: CoreLinkTlsMaterial | null;
|
|
75
|
+
/**
|
|
76
|
+
* The signed bearer presented in the `auth` frame (ADR 0002). Required by
|
|
77
|
+
* every real Core; omitted only by a loopback rig or a test.
|
|
78
|
+
*/
|
|
79
|
+
bearer?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* A registration blob — endpoint, PEM material and bearer in one object, which
|
|
82
|
+
* is how a Core client is actually configured (#129 D1/D9). Set this and the
|
|
83
|
+
* three fields above are read off it.
|
|
84
|
+
*/
|
|
85
|
+
blob?: CoreRegistrationBlob;
|
|
86
|
+
/**
|
|
87
|
+
* How to open the socket. Defaults to the Node `ws` dial with the `tls`
|
|
88
|
+
* material — the only transport that can present a client certificate.
|
|
89
|
+
* Injectable for tests and for a runtime with its own WebSocket.
|
|
90
|
+
*/
|
|
91
|
+
createSocket?: CoreLinkSocketFactory;
|
|
92
|
+
/** Deadline for {@link CoreClient.connect}. Default 30s. */
|
|
93
|
+
connectTimeoutMs?: number;
|
|
94
|
+
/** Default deadline for one request. Default 30s. */
|
|
95
|
+
requestTimeoutMs?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Arm the connection heartbeat. Off by default here and on in
|
|
98
|
+
* {@link DurableCoreClient} — see {@link CoreLinkTransport}.
|
|
99
|
+
*/
|
|
100
|
+
heartbeat?: CoreLinkHeartbeatOptions | false;
|
|
101
|
+
/**
|
|
102
|
+
* This client's stable Core client id, presented on every connection so a Core
|
|
103
|
+
* reaps the socket this one replaces (ADR 0024 D9).
|
|
104
|
+
*
|
|
105
|
+
* Default: a fresh id per instance. That is honest rather than a shortcut —
|
|
106
|
+
* the id's job is to span a *reconnect*, and only a client that reconnects has
|
|
107
|
+
* one to span. Pass one explicitly to make it outlive the process, and keep it
|
|
108
|
+
* per Core client: it must never be anything off the registration blob, which
|
|
109
|
+
* is machine-scoped, or the Panel, the CLI and every automation on that
|
|
110
|
+
* machine become one client, each reconnect reaping the others.
|
|
111
|
+
*/
|
|
112
|
+
clientId?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Overrides {@link MULTI_CONNECTION_ONLY_FRAME_TYPES}. Exists only so a test
|
|
115
|
+
* can drive the rejection in {@link CoreClient.request} with a stand-in frame
|
|
116
|
+
* type: the real entries all degrade at their call sites rather than reach
|
|
117
|
+
* that backstop. Production never passes it.
|
|
118
|
+
*/
|
|
119
|
+
multiConnectionOnlyFrameTypes?: ReadonlySet<string>;
|
|
120
|
+
};
|
|
121
|
+
/** Default deadline for a dial: `ready` plus, with a bearer, `authOk`. */
|
|
122
|
+
export declare const DEFAULT_CONNECT_TIMEOUT_MS = 30000;
|
|
123
|
+
/** Default deadline for one request/response round trip. */
|
|
124
|
+
export declare const DEFAULT_REQUEST_TIMEOUT_MS = 30000;
|
|
125
|
+
type Unsubscribe = () => void;
|
|
126
|
+
/**
|
|
127
|
+
* A Core client over one core link.
|
|
128
|
+
*
|
|
129
|
+
* Lifecycle: construct, `await connect()`, ask, `close()`. Construction opens
|
|
130
|
+
* nothing — a client you have not connected has sent no bytes, which is what
|
|
131
|
+
* makes `connect()`'s rejection the one place a dial failure is reported.
|
|
132
|
+
*/
|
|
133
|
+
export declare class CoreClient {
|
|
134
|
+
/** The URL this client dials. Public because a log line without it is a riddle. */
|
|
135
|
+
readonly url: string;
|
|
136
|
+
/**
|
|
137
|
+
* This client's Core client id — the same string on every connection it opens,
|
|
138
|
+
* which is the whole of what makes a reconnect reclaimable (ADR 0024 D9).
|
|
139
|
+
*
|
|
140
|
+
* Readonly: an id that moved between connections would reclaim nothing and
|
|
141
|
+
* leave the predecessor holding its Sessions for the full heartbeat timeout,
|
|
142
|
+
* which is the exact failure the frame exists to remove.
|
|
143
|
+
*/
|
|
144
|
+
readonly clientId: string;
|
|
145
|
+
protected readonly createSocket: CoreLinkSocketFactory;
|
|
146
|
+
protected readonly bearer: string | null;
|
|
147
|
+
protected readonly heartbeat: CoreLinkHeartbeatOptions | false;
|
|
148
|
+
private readonly connectTimeoutMs;
|
|
149
|
+
private readonly requestTimeoutMs;
|
|
150
|
+
private readonly multiConnectionOnlyFrameTypes;
|
|
151
|
+
protected transport: CoreLinkTransport | null;
|
|
152
|
+
protected closed: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* True once a `subscribe` has gone out for this client — see
|
|
155
|
+
* {@link subscribeEvents}. Per client rather than per connection: it records
|
|
156
|
+
* that this client *wants* the event stream, which is what a reconnecting
|
|
157
|
+
* subclass re-asks for, and what stops a second caller asking twice.
|
|
158
|
+
*/
|
|
159
|
+
private eventsSubscribed;
|
|
160
|
+
/** True once this connection has been established — reset per connection. */
|
|
161
|
+
private established;
|
|
162
|
+
/** Requests written to no socket yet. They survive a reconnect; a timeout is what ends them. */
|
|
163
|
+
private readonly queue;
|
|
164
|
+
/** Requests on the wire right now, so a dying socket can fail them at once. */
|
|
165
|
+
private readonly inFlight;
|
|
166
|
+
private connectPromise;
|
|
167
|
+
private connectSettle;
|
|
168
|
+
/** This connection's `ready` frame; null before it lands and after a drop. */
|
|
169
|
+
private ready;
|
|
170
|
+
/**
|
|
171
|
+
* This Core's `multiConnection` capability as announced on the *current*
|
|
172
|
+
* connection; null when absent and before `ready` lands.
|
|
173
|
+
*
|
|
174
|
+
* Re-read on every `ready` rather than remembered across connections: a Core
|
|
175
|
+
* can be downgraded, and a stale `true` here would send frames the Core no
|
|
176
|
+
* longer understands. Null until the frame arrives, so the gate is closed
|
|
177
|
+
* during the window where the answer is genuinely unknown.
|
|
178
|
+
*/
|
|
179
|
+
private multiConnection;
|
|
180
|
+
private authOkFrame;
|
|
181
|
+
private readonly readyListeners;
|
|
182
|
+
private readonly dataListeners;
|
|
183
|
+
private readonly exitListeners;
|
|
184
|
+
private readonly eventListeners;
|
|
185
|
+
private readonly eventsReplayedListeners;
|
|
186
|
+
private readonly authOkListeners;
|
|
187
|
+
private readonly authErrorListeners;
|
|
188
|
+
private readonly disconnectedListeners;
|
|
189
|
+
private readonly reclaimedListeners;
|
|
190
|
+
constructor(opts: CoreClientOptions);
|
|
191
|
+
/** Build a client straight off a registration blob (#129 D1). */
|
|
192
|
+
static fromRegistrationBlob(blob: CoreRegistrationBlob, opts?: Omit<CoreClientOptions, "blob" | "url" | "tls" | "bearer">): CoreClient;
|
|
193
|
+
/**
|
|
194
|
+
* Open the link and settle when the Core has said who it is: resolves after
|
|
195
|
+
* `ready` and, when a bearer is configured, after `authOk`.
|
|
196
|
+
*
|
|
197
|
+
* Idempotent **while it is in flight** — a second call returns the first
|
|
198
|
+
* call's promise, so two callers racing to connect share one socket rather
|
|
199
|
+
* than opening two. Once it settles the memo is dropped, and what a later
|
|
200
|
+
* call gets is the state of the link *now*: the current connection's info if
|
|
201
|
+
* one is up, and a fresh attempt if none is.
|
|
202
|
+
*
|
|
203
|
+
* That distinction is the whole point. A memo kept past its rejection is a
|
|
204
|
+
* client that reports itself permanently unconnectable — a durable client
|
|
205
|
+
* whose connect deadline expired once would hand every later caller that same
|
|
206
|
+
* rejection long after its supervisor had reconnected, because nothing here
|
|
207
|
+
* ever cleared it (issue 153 review, note 3; #156 builds on this).
|
|
208
|
+
*
|
|
209
|
+
* Rejects on a refused bearer, on a socket that closed before it was
|
|
210
|
+
* established, and on the connect deadline. A {@link DurableCoreClient} keeps
|
|
211
|
+
* retrying underneath regardless; what rejects there is this promise, not the
|
|
212
|
+
* client.
|
|
213
|
+
*/
|
|
214
|
+
connect(): Promise<CoreConnectionInfo>;
|
|
215
|
+
/**
|
|
216
|
+
* Is a reconnect already pending, so `connect()` must not dial itself? Never
|
|
217
|
+
* for a one-shot client, which has no supervisor; {@link DurableCoreClient}
|
|
218
|
+
* overrides it with its backoff timer.
|
|
219
|
+
*/
|
|
220
|
+
protected reconnectScheduled(): boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Open one connection and wire it to this client. The transport is per socket;
|
|
223
|
+
* every listener above is per client, which is what lets a durable subclass
|
|
224
|
+
* replace the former without anything above noticing.
|
|
225
|
+
*/
|
|
226
|
+
protected openTransport(): void;
|
|
227
|
+
/**
|
|
228
|
+
* The connection is up, authenticated if it had to be, and the capability off
|
|
229
|
+
* `ready` is known. What a fresh connection owes the Core goes here.
|
|
230
|
+
*
|
|
231
|
+
* `reclaim` is the whole of it for a one-shot client, and it is fire-and-forget
|
|
232
|
+
* by design (ADR 0024 D9): nothing waits on the answer, because the locks have
|
|
233
|
+
* already moved by the time it is written, and a reclaim that never lands costs
|
|
234
|
+
* the 45-second heartbeat timeout it was shortening — a slower path to the same
|
|
235
|
+
* state, never a wrong one.
|
|
236
|
+
*
|
|
237
|
+
* Overridden by {@link DurableCoreClient}, which owes the Core rather more.
|
|
238
|
+
*/
|
|
239
|
+
protected onConnectionEstablished(): void;
|
|
240
|
+
/**
|
|
241
|
+
* Establish the connection once both halves of "established" are true: the
|
|
242
|
+
* Core has said who it is (`ready`), and the link can be written to (open, and
|
|
243
|
+
* authenticated when a bearer was configured).
|
|
244
|
+
*
|
|
245
|
+
* **Whichever lands last is what triggers it**, and that is not a fixed order.
|
|
246
|
+
* With a bearer it is `authOk`, well after `ready`. Without one, writability
|
|
247
|
+
* rides the socket opening and `ready` normally follows — but a Core that got
|
|
248
|
+
* its frame in first would otherwise have the connection's opening frames sent
|
|
249
|
+
* against a socket that is not writable yet, and a `subscribe` dropped there is
|
|
250
|
+
* a client that never receives an event again. Waiting for both removes the
|
|
251
|
+
* ordering assumption instead of relying on it.
|
|
252
|
+
*/
|
|
253
|
+
private maybeEstablish;
|
|
254
|
+
/** The socket is gone. A one-shot client is done; a durable one reconnects. */
|
|
255
|
+
protected onConnectionClosed(reason?: string): void;
|
|
256
|
+
private settleConnect;
|
|
257
|
+
private failConnect;
|
|
258
|
+
/** What the current connection said about itself. */
|
|
259
|
+
connectionInfo(): CoreConnectionInfo;
|
|
260
|
+
/** True once the Core has accepted this connection's bearer. */
|
|
261
|
+
isAuthenticated(): boolean;
|
|
262
|
+
/** True while a link is up and able to carry a frame. */
|
|
263
|
+
isConnected(): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* May this Core be sent frames only a multi-connection Core understands — the
|
|
266
|
+
* Session lock's `claim`, the per-connection PTY subscription, and whatever
|
|
267
|
+
* else lands under ADR 0024?
|
|
268
|
+
*
|
|
269
|
+
* **The one predicate to consult before sending any such frame.** False means
|
|
270
|
+
* do not send it: not send-and-handle-the-error, not send-and-hope. The Core on
|
|
271
|
+
* the other end is a single-connection build that would answer an unknown frame
|
|
272
|
+
* with an error frame at best, and the caller is expected to have a
|
|
273
|
+
* single-connection path already — that path is what shipped before this
|
|
274
|
+
* capability existed.
|
|
275
|
+
*
|
|
276
|
+
* False before `ready` lands and after a drop, for as long as the answer is
|
|
277
|
+
* unknown. A caller that needs the capability at startup awaits
|
|
278
|
+
* {@link connect}, whose answer carries it, rather than reading this on the
|
|
279
|
+
* first tick.
|
|
280
|
+
*/
|
|
281
|
+
canSendMultiConnectionFrames(): boolean;
|
|
282
|
+
/**
|
|
283
|
+
* This connection's `multiConnection` capability, or null. For callers that
|
|
284
|
+
* need the version rather than the yes/no — the gate is
|
|
285
|
+
* {@link canSendMultiConnectionFrames}.
|
|
286
|
+
*/
|
|
287
|
+
multiConnectionCapability(): CoreLinkMultiConnectionCapability | null;
|
|
288
|
+
/** Hang up. Rejects every outstanding request; fires no `onDisconnected`. */
|
|
289
|
+
close(): void;
|
|
290
|
+
/**
|
|
291
|
+
* Send any core-link request frame and resolve with the Core's raw response
|
|
292
|
+
* frame — errors included, as frames rather than rejections.
|
|
293
|
+
*
|
|
294
|
+
* This is the seam a router forwards through. A router that had to go through
|
|
295
|
+
* the typed methods below would unwrap each response only to re-wrap it, and
|
|
296
|
+
* would have to invent a shape for the failures those methods turn into
|
|
297
|
+
* rejections. Handing it the frame keeps it a router rather than a translator.
|
|
298
|
+
*
|
|
299
|
+
* The `reqId` on the frame passed in is ignored — the transport owns
|
|
300
|
+
* correlation on its own socket, and the returned frame carries the id it
|
|
301
|
+
* assigned. A caller matching answers to its own callers (the Panel does,
|
|
302
|
+
* across many browsers) keys on its own id and rewrites it on the way back.
|
|
303
|
+
*
|
|
304
|
+
* A frame issued while no link is up is **queued, not refused**: it goes out
|
|
305
|
+
* when one comes up, or its deadline ends it. That is what makes a call made
|
|
306
|
+
* during a reconnect work rather than needing every call site to retry.
|
|
307
|
+
*/
|
|
308
|
+
request(frame: CoreLinkRequestFrame, timeoutMs?: number): Promise<CoreLinkResponseFrame>;
|
|
309
|
+
/**
|
|
310
|
+
* Send now if there is an established link, otherwise hold it for the next
|
|
311
|
+
* one.
|
|
312
|
+
*
|
|
313
|
+
* **Established, not merely writable.** On the no-bearer path writability
|
|
314
|
+
* rides the socket opening and can land before `ready`, so a request *issued*
|
|
315
|
+
* in that window would go out ahead of the `reclaim` and `subscribe` this
|
|
316
|
+
* connection owes the Core — the ordering `onConnectionEstablished` documents
|
|
317
|
+
* as load-bearing, and the same property `onWritable`'s guard keeps for a
|
|
318
|
+
* request that was already queued. Both doors, one rule: nothing reaches the
|
|
319
|
+
* wire before the connection has been established (issue 153 review, #156).
|
|
320
|
+
*/
|
|
321
|
+
private dispatch;
|
|
322
|
+
/** Drain what was waiting for a link, in the order it was asked for. */
|
|
323
|
+
private flushQueue;
|
|
324
|
+
/**
|
|
325
|
+
* Fail every request that was on the wire when the socket died. Their replies
|
|
326
|
+
* can never arrive, so leaving them pending only makes a caller wait out its
|
|
327
|
+
* whole deadline before it can retry on the next connection.
|
|
328
|
+
*/
|
|
329
|
+
private failInFlight;
|
|
330
|
+
private forget;
|
|
331
|
+
private settle;
|
|
332
|
+
/** Send a request and unwrap the Core's answer into the value it carries. */
|
|
333
|
+
protected rpc(frame: CoreLinkRequestFrame, timeoutMs?: number): Promise<unknown>;
|
|
334
|
+
/**
|
|
335
|
+
* Send a fire-and-forget frame on the current connection. False when there is
|
|
336
|
+
* no writable connection to put it on — for the frames whose answer is a
|
|
337
|
+
* stream and whose retry is the next connection re-sending them anyway.
|
|
338
|
+
*/
|
|
339
|
+
protected sendNow(frame: CoreLinkRequestFrame, reqIdPrefix?: string): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Present this client's Core client id, so the Core closes the socket this
|
|
342
|
+
* connection replaces and moves its Session locks here (ADR 0024 D9).
|
|
343
|
+
*
|
|
344
|
+
* The answer is not discarded, though (issue 147). `taskIds` names the Sessions
|
|
345
|
+
* whose locks came across, and that is a fact no layer above can derive: this
|
|
346
|
+
* connection did not claim them, the Core logged no event for the transfer —
|
|
347
|
+
* the locks moved in place, which is exactly the atomicity D9 needs — so until
|
|
348
|
+
* something asks for a fresh snapshot nothing else on the link says this client
|
|
349
|
+
* is holding them again. Hence {@link onReclaimed}.
|
|
350
|
+
*
|
|
351
|
+
* **Against a Core that does not announce `multiConnection`, this sends
|
|
352
|
+
* nothing** — the same consult-the-gate-and-degrade shape
|
|
353
|
+
* {@link ptySubscribe} and {@link claim} take, and here the degraded behaviour
|
|
354
|
+
* is not merely acceptable but identical: such a Core evicts the previous
|
|
355
|
+
* connection when this one opens, which is precisely what the frame asks for.
|
|
356
|
+
*/
|
|
357
|
+
protected sendReclaim(): void;
|
|
358
|
+
/**
|
|
359
|
+
* One PTY's bytes, as the transport parsed them. Nothing above re-parses a raw
|
|
360
|
+
* message: this is the frame, typed against the SDK's own schema.
|
|
361
|
+
*
|
|
362
|
+
* A Core sends a PTY's `data` only to the connections that asked for it, so
|
|
363
|
+
* {@link ptySubscribe} is what makes this fire at all against a
|
|
364
|
+
* multi-connection Core.
|
|
365
|
+
*/
|
|
366
|
+
onData(cb: (frame: CoreLinkDataFrame) => void): Unsubscribe;
|
|
367
|
+
/** One PTY's exit, on the same terms as {@link onData}. */
|
|
368
|
+
onExit(cb: (frame: CoreLinkExitFrame) => void): Unsubscribe;
|
|
369
|
+
/**
|
|
370
|
+
* Notified on every connection's `ready` frame with what the Core says about
|
|
371
|
+
* itself — the protocol version, whether this build speaks it, and the
|
|
372
|
+
* `multiConnection` capability. Fires on every (re)connect, so a Core that
|
|
373
|
+
* comes back after an update reports itself compatible with no extra plumbing.
|
|
374
|
+
*/
|
|
375
|
+
onReady(cb: (info: CoreConnectionInfo) => void): Unsubscribe;
|
|
376
|
+
/**
|
|
377
|
+
* Domain events off the Core's monotonic log — task status, hooks, session
|
|
378
|
+
* finish, PTY lifecycle. A one-shot client receives only what arrives while it
|
|
379
|
+
* is connected; the cursor, the replay and the dedupe that make a *gap*
|
|
380
|
+
* recoverable are {@link DurableCoreClient}'s.
|
|
381
|
+
*/
|
|
382
|
+
onEvent(cb: (msg: {
|
|
383
|
+
event: CoreLinkEvent;
|
|
384
|
+
}) => void): Unsubscribe;
|
|
385
|
+
/**
|
|
386
|
+
* Ask this Core for its event log: the tail past `lastEventId`, then live
|
|
387
|
+
* push for as long as this connection lasts.
|
|
388
|
+
*
|
|
389
|
+
* Fire-and-forget, because the answer is a *stream* — the replay tail as
|
|
390
|
+
* `event` frames and the {@link onEventsReplayed} marker behind them — rather
|
|
391
|
+
* than a reqId-correlated response. Returns false when there was no writable
|
|
392
|
+
* connection to put the frame on.
|
|
393
|
+
*
|
|
394
|
+
* A one-shot client sends this only if it is asked to. That is the difference
|
|
395
|
+
* between the two entry points here: {@link DurableCoreClient} owes the Core a
|
|
396
|
+
* subscribe on every connection and sends one through this method, whereas a
|
|
397
|
+
* program that connects to ask one question wants no event stream at all.
|
|
398
|
+
* What made it public is the session layer (issue 155): a script that starts a
|
|
399
|
+
* Session and waits for the harness to finish is reading the Core's own
|
|
400
|
+
* report of that, and the report is an event.
|
|
401
|
+
*
|
|
402
|
+
* `lastEventId` defaults to 0, which asks for the whole tail the Core will
|
|
403
|
+
* serve. That is the honest default for a caller with no cursor — the
|
|
404
|
+
* alternative is inventing a high-water mark, and a cursor that runs ahead of
|
|
405
|
+
* the log stops live push entirely. A caller that keeps a cursor passes it.
|
|
406
|
+
*/
|
|
407
|
+
subscribeEvents(lastEventId?: number): boolean;
|
|
408
|
+
/**
|
|
409
|
+
* Has a `subscribe` gone out on this client's behalf?
|
|
410
|
+
*
|
|
411
|
+
* For a caller that needs the event stream but does not know whether the
|
|
412
|
+
* client it was handed is already receiving one — a durable client subscribes
|
|
413
|
+
* itself, a one-shot client does not, and a second subscribe would replay the
|
|
414
|
+
* tail a second time.
|
|
415
|
+
*/
|
|
416
|
+
isSubscribedToEvents(): boolean;
|
|
417
|
+
/** Notified when a `subscribe` replay tail has been fully streamed. */
|
|
418
|
+
onEventsReplayed(cb: (msg: {
|
|
419
|
+
lastEventId: number;
|
|
420
|
+
}) => void): Unsubscribe;
|
|
421
|
+
/**
|
|
422
|
+
* Notified once per connection when the Core accepts the bearer. `exp` is the
|
|
423
|
+
* session expiry — a caller can hint "session expires at".
|
|
424
|
+
*/
|
|
425
|
+
onAuthOk(cb: (msg: {
|
|
426
|
+
coreId: string;
|
|
427
|
+
exp: number;
|
|
428
|
+
}) => void): Unsubscribe;
|
|
429
|
+
/**
|
|
430
|
+
* Notified when the Core refuses the bearer. The Core closes the socket right
|
|
431
|
+
* after; an expired bearer keeps failing until a reissued blob is pasted (ADR
|
|
432
|
+
* 0003).
|
|
433
|
+
*/
|
|
434
|
+
onAuthError(cb: (msg: {
|
|
435
|
+
reason: CoreLinkAuthErrorReason;
|
|
436
|
+
}) => void): Unsubscribe;
|
|
437
|
+
/**
|
|
438
|
+
* Notified whenever the socket goes down — a dropped connection, a Core
|
|
439
|
+
* restart, a dial that never completed. `close()` does not fire it: that is
|
|
440
|
+
* this client hanging up, not the Core going away.
|
|
441
|
+
*/
|
|
442
|
+
onDisconnected(cb: (msg: {
|
|
443
|
+
error?: string;
|
|
444
|
+
}) => void): Unsubscribe;
|
|
445
|
+
/**
|
|
446
|
+
* What this client's `reclaim` reaped, once per connection that sent one (ADR
|
|
447
|
+
* 0024 D9, issue 147 is its consumer).
|
|
448
|
+
*
|
|
449
|
+
* Fires only on a Core that announces `multiConnection`, because only such a
|
|
450
|
+
* Core is sent the frame at all. `taskIds` is often empty and an empty list
|
|
451
|
+
* never means the id was unknown — it means this client held nothing when its
|
|
452
|
+
* previous socket went quiet, which is the ordinary case.
|
|
453
|
+
*/
|
|
454
|
+
onReclaimed(cb: (msg: {
|
|
455
|
+
replaced: boolean;
|
|
456
|
+
taskIds: string[];
|
|
457
|
+
}) => void): Unsubscribe;
|
|
458
|
+
/** Hand one event to the listeners. Overridden where a cursor is kept. */
|
|
459
|
+
protected deliverEvent(event: CoreLinkEvent): void;
|
|
460
|
+
/** Hand the end-of-replay marker on. Overridden where a cursor is kept. */
|
|
461
|
+
protected deliverEventsReplayed(lastEventId: number): void;
|
|
462
|
+
spawn(opts: CoreLinkPtySpawnOptions): Promise<{
|
|
463
|
+
ptyId: string;
|
|
464
|
+
}>;
|
|
465
|
+
write(ptyId: string, data: string): Promise<boolean>;
|
|
466
|
+
resize(ptyId: string, cols: number, rows: number): Promise<boolean>;
|
|
467
|
+
kill(ptyId: string): Promise<boolean>;
|
|
468
|
+
killLaunchProcesses(opts: {
|
|
469
|
+
cwd: string;
|
|
470
|
+
commands: string[];
|
|
471
|
+
ports?: number[];
|
|
472
|
+
}): Promise<CoreLinkLaunchProcessKillResult>;
|
|
473
|
+
findByTask(taskId: string): Promise<{
|
|
474
|
+
ptyId: string | null;
|
|
475
|
+
}>;
|
|
476
|
+
/**
|
|
477
|
+
* See {@link CoreLinkRequestFrame} `replay` — `sinceSeq` asks for the tail past
|
|
478
|
+
* a cursor (a reattach); omitting it asks for the whole scrollback.
|
|
479
|
+
*/
|
|
480
|
+
replay(ptyId: string, sinceSeq?: number): Promise<CoreLinkPtyReplay>;
|
|
481
|
+
/**
|
|
482
|
+
* Ask this Core for one PTY's byte stream (ADR 0024 D2). Until a client
|
|
483
|
+
* subscribes, {@link onData}/{@link onExit} never fire for that `ptyId` — a
|
|
484
|
+
* Core fans output out to the connections that asked and to no others.
|
|
485
|
+
*
|
|
486
|
+
* `catchUp` says a `replay` for this PTY follows and the Core must hold the
|
|
487
|
+
* live stream until it has been served, so the caller never paints live bytes
|
|
488
|
+
* in front of its own scrollback. A caller that sets it owes that replay;
|
|
489
|
+
* nothing else releases the hold.
|
|
490
|
+
*
|
|
491
|
+
* **Against a Core that does not announce `multiConnection`, this sends nothing
|
|
492
|
+
* and resolves** (ADR 0024 D11). That is the deliberate single-connection
|
|
493
|
+
* fallback, not a swallowed failure: such a Core fans every PTY out to every
|
|
494
|
+
* connection, so the caller is already receiving the bytes it just asked for,
|
|
495
|
+
* and the subscription it would send is a frame that Core has no vocabulary
|
|
496
|
+
* for. Resolving says what is true — this client renders that PTY — which is
|
|
497
|
+
* the only thing the caller acts on.
|
|
498
|
+
*/
|
|
499
|
+
ptySubscribe(ptyId: string, opts?: {
|
|
500
|
+
catchUp?: boolean;
|
|
501
|
+
}): Promise<void>;
|
|
502
|
+
/**
|
|
503
|
+
* Stop receiving one PTY's stream. Same fallback as {@link ptySubscribe}, for
|
|
504
|
+
* the same reason: against a capability-less Core there is no subscription to
|
|
505
|
+
* drop, because its fan-out is unconditional and cannot be narrowed by a frame
|
|
506
|
+
* it does not know.
|
|
507
|
+
*/
|
|
508
|
+
ptyUnsubscribe(ptyId: string): Promise<void>;
|
|
509
|
+
/**
|
|
510
|
+
* Take this Session's write lock (ADR 0024 D6).
|
|
511
|
+
*
|
|
512
|
+
* `granted: false` means another Core client holds it — an answer, not a
|
|
513
|
+
* failure, and the only way past it is {@link forceTakeover}. Idempotent for a
|
|
514
|
+
* client that already holds the Session.
|
|
515
|
+
*
|
|
516
|
+
* **Against a Core that does not announce `multiConnection`, this sends nothing
|
|
517
|
+
* and answers `{ supported: false, granted: false }`.** Such a Core evicts
|
|
518
|
+
* every client but one, so there is nothing for a lock to arbitrate between and
|
|
519
|
+
* no table to put a claim in.
|
|
520
|
+
*
|
|
521
|
+
* `supported: false` must never be rendered as read-only. It says this Core has
|
|
522
|
+
* no Session lock at all, so every mutation this client makes will be served —
|
|
523
|
+
* the opposite of what `granted: false` says. A caller that treats the two the
|
|
524
|
+
* same makes a single-connection Core look permanently locked to an operator
|
|
525
|
+
* who is in fact its only client.
|
|
526
|
+
*/
|
|
527
|
+
claim(taskId: string): Promise<{
|
|
528
|
+
supported: boolean;
|
|
529
|
+
granted: boolean;
|
|
530
|
+
}>;
|
|
531
|
+
/**
|
|
532
|
+
* Give this Session's write lock back (ADR 0024 D7).
|
|
533
|
+
*
|
|
534
|
+
* `released: false` means this client did not hold it — idempotent, not an
|
|
535
|
+
* error, so a caller releasing on teardown does not have to know whether it had
|
|
536
|
+
* already lost the lock to a takeover. Same capability fallback as
|
|
537
|
+
* {@link claim}: nothing goes on the wire to a Core with no lock table, and
|
|
538
|
+
* `supported: false` says there was never a lock to give back.
|
|
539
|
+
*/
|
|
540
|
+
release(taskId: string): Promise<{
|
|
541
|
+
supported: boolean;
|
|
542
|
+
released: boolean;
|
|
543
|
+
}>;
|
|
544
|
+
/**
|
|
545
|
+
* Take this Session's write lock whoever holds it (ADR 0024 D7).
|
|
546
|
+
*
|
|
547
|
+
* The answer to a hung client, and the reason the lock needs no idle timeout.
|
|
548
|
+
* Unrecoverable by design: the previous holder's in-flight keystrokes are gone
|
|
549
|
+
* and its next mutation is refused. `takenFrom` names who lost it so a caller
|
|
550
|
+
* can say so rather than infer it — taking an unheld Session is an ordinary
|
|
551
|
+
* claim by another name.
|
|
552
|
+
*
|
|
553
|
+
* Same capability fallback as {@link claim}, answering `takenFrom: "nobody"`:
|
|
554
|
+
* there was nobody to take it from, because there is no lock on such a Core to
|
|
555
|
+
* take.
|
|
556
|
+
*/
|
|
557
|
+
forceTakeover(taskId: string): Promise<{
|
|
558
|
+
supported: boolean;
|
|
559
|
+
takenFrom: CoreLinkSessionTakenFrom;
|
|
560
|
+
}>;
|
|
561
|
+
/**
|
|
562
|
+
* List every project on this Core as a live snapshot. The Core is the source of
|
|
563
|
+
* truth; a client holds none. The returned `path` is a machine path on the
|
|
564
|
+
* Core — only the Core can validate it.
|
|
565
|
+
*/
|
|
566
|
+
projectsList(): Promise<CoreLinkProjectSnapshot[]>;
|
|
567
|
+
/**
|
|
568
|
+
* List every active (non-archived) task on this Core, optionally filtered to
|
|
569
|
+
* one project.
|
|
570
|
+
*
|
|
571
|
+
* `archivedCount` is how many archived rows the same scope holds — a scalar,
|
|
572
|
+
* never the rows (ADR 0019). Use {@link archivedTasksList} for those.
|
|
573
|
+
*/
|
|
574
|
+
tasksList(projectId?: string): Promise<{
|
|
575
|
+
tasks: CoreLinkTaskSnapshot[];
|
|
576
|
+
archivedCount: number;
|
|
577
|
+
}>;
|
|
578
|
+
/**
|
|
579
|
+
* List every archived task on this Core, optionally filtered to one project
|
|
580
|
+
* (ADR 0019) — a separate frame from {@link tasksList}, so an active answer
|
|
581
|
+
* stays free of archived rows by construction rather than by what a caller
|
|
582
|
+
* remembers to pass.
|
|
583
|
+
*/
|
|
584
|
+
archivedTasksList(projectId?: string): Promise<CoreLinkTaskSnapshot[]>;
|
|
585
|
+
/**
|
|
586
|
+
* Create / rename / archive a project on this Core. The Core validates the
|
|
587
|
+
* machine path server-side; an invalid path comes back as an `error` frame that
|
|
588
|
+
* rejects this promise. Returns `null` when a `rename`/`archive` targets a
|
|
589
|
+
* missing row.
|
|
590
|
+
*/
|
|
591
|
+
projectsMutate(mutation: CoreLinkProjectMutation): Promise<CoreLinkProjectSnapshot | null>;
|
|
592
|
+
/** Create / update / delete a task. Returns `null` when it targets a missing row. */
|
|
593
|
+
tasksMutate(mutation: CoreLinkTaskMutation): Promise<CoreLinkTaskSnapshot | null>;
|
|
594
|
+
/**
|
|
595
|
+
* List every active session on this Core (optionally filtered to one project).
|
|
596
|
+
* A session's `ptyId` is set when the Core has a live PTY for that task — which
|
|
597
|
+
* is how a client knows what it can reattach to.
|
|
598
|
+
*/
|
|
599
|
+
sessionsList(projectId?: string): Promise<CoreLinkSessionSnapshot[]>;
|
|
600
|
+
/**
|
|
601
|
+
* Snapshot of this Core's CLI availability. Live updates arrive as
|
|
602
|
+
* `agents:availabilityChanged` events on {@link onEvent}; this is how a client
|
|
603
|
+
* hydrates without waiting for the next probe tick.
|
|
604
|
+
*/
|
|
605
|
+
agentsAvailabilityList(): Promise<CoreLinkHarnessAvailabilityMap>;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Turn a response frame into the value the typed methods promise, or throw the
|
|
609
|
+
* failure it carries. The two failure frames (`spawnError`, `error`) become
|
|
610
|
+
* rejections here so a caller of `spawn()` sees an exception rather than a frame
|
|
611
|
+
* it has to inspect; {@link CoreClient.request} bypasses this and hands the frame
|
|
612
|
+
* over untouched.
|
|
613
|
+
*/
|
|
614
|
+
export declare function unwrapResponse(msg: CoreLinkResponseFrame): unknown;
|
|
615
|
+
export {};
|
|
616
|
+
//# sourceMappingURL=core-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-client.d.ts","sourceRoot":"","sources":["../src/core-client.ts"],"names":[],"mappings":"AAuBA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,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