mandala-computer-mcp 0.1.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/LICENSE +21 -0
- package/README.md +544 -0
- package/dist/api.d.ts +186 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +932 -0
- package/dist/api.js.map +1 -0
- package/dist/cli.d.ts +55 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +292 -0
- package/dist/cli.js.map +1 -0
- package/dist/errors.d.ts +560 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +873 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +406 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +1679 -0
- package/dist/events.js.map +1 -0
- package/dist/format.d.ts +125 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +180 -0
- package/dist/format.js.map +1 -0
- package/dist/http.d.ts +46 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +792 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/paths.d.ts +394 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +677 -0
- package/dist/paths.js.map +1 -0
- package/dist/server.d.ts +18 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +97 -0
- package/dist/server.js.map +1 -0
- package/dist/session.d.ts +78 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +166 -0
- package/dist/session.js.map +1 -0
- package/dist/stdio.d.ts +11 -0
- package/dist/stdio.d.ts.map +1 -0
- package/dist/stdio.js +43 -0
- package/dist/stdio.js.map +1 -0
- package/dist/tools/agent.d.ts +16 -0
- package/dist/tools/agent.d.ts.map +1 -0
- package/dist/tools/agent.js +147 -0
- package/dist/tools/agent.js.map +1 -0
- package/dist/tools/computers.d.ts +3 -0
- package/dist/tools/computers.d.ts.map +1 -0
- package/dist/tools/computers.js +1037 -0
- package/dist/tools/computers.js.map +1 -0
- package/dist/tools/events.d.ts +3 -0
- package/dist/tools/events.d.ts.map +1 -0
- package/dist/tools/events.js +1077 -0
- package/dist/tools/events.js.map +1 -0
- package/dist/tools/guest.d.ts +3 -0
- package/dist/tools/guest.d.ts.map +1 -0
- package/dist/tools/guest.js +761 -0
- package/dist/tools/guest.js.map +1 -0
- package/dist/tools/input.d.ts +3 -0
- package/dist/tools/input.d.ts.map +1 -0
- package/dist/tools/input.js +240 -0
- package/dist/tools/input.js.map +1 -0
- package/dist/tools/snapshots.d.ts +3 -0
- package/dist/tools/snapshots.d.ts.map +1 -0
- package/dist/tools/snapshots.js +333 -0
- package/dist/tools/snapshots.js.map +1 -0
- package/dist/tools/templates.d.ts +3 -0
- package/dist/tools/templates.d.ts.map +1 -0
- package/dist/tools/templates.js +492 -0
- package/dist/tools/templates.js.map +1 -0
- package/dist/tools/types.d.ts +18 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/webhooks.d.ts +3 -0
- package/dist/tools/webhooks.d.ts.map +1 -0
- package/dist/tools/webhooks.js +260 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,GAAG,cAAc,CAAC;CAChC;AAED,MAAM,OAAO,QAAS,SAAQ,YAAY;IAiB7B;IACA;IAjBF,IAAI,GAAG,UAAU,CAAC;IAC3B;;;;;;;;;;;OAWG;IACM,MAAM,CAAU;IACzB,YACE,OAAe,EACN,MAAc,EACd,IAAc;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHN,WAAM,GAAN,MAAM,CAAQ;Q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,CAAC;IACpF,IAAI,GAAG,YAAY,iBAAiB;QAAE,OAAO,KAAK,CAAC;IACnD,IAAI,GAAG,YAAY,cAAc;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QACrC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QAChF,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a computer is doing, held open on this side of the model.
|
|
3
|
+
*
|
|
4
|
+
* `GET computers/:id/events` (platform OPL-3785) is a websocket that says what
|
|
5
|
+
* a computer is doing without being asked, so that an agent stops paying for a
|
|
6
|
+
* screenshot to learn that nothing has changed. Every other client of that
|
|
7
|
+
* stream hands it to its caller as an iterator, because every other caller sits
|
|
8
|
+
* in a loop. A model does not: it takes turns, and between two turns there is
|
|
9
|
+
* nobody here to read a socket.
|
|
10
|
+
*
|
|
11
|
+
* So the socket lives HERE, in the session, and the model holds nothing but a
|
|
12
|
+
* cursor. One connection per computer, opened the first time a tool asks about
|
|
13
|
+
* it, kept across turns, reaped when nothing has asked for a while. What
|
|
14
|
+
* arrives while the model is thinking goes into a bounded ring, and the next
|
|
15
|
+
* `poll_events` or `wait_for_event` is handed it in order. The model never
|
|
16
|
+
* learns that a socket exists.
|
|
17
|
+
*
|
|
18
|
+
* That is the whole of OPL-3926's decision, and the alternative it rejects is
|
|
19
|
+
* worth naming: an MCP `resources/subscribe` and a `notifications/*` doorbell.
|
|
20
|
+
* The spec's notification filter is a closed vocabulary — `toolsListChanged`,
|
|
21
|
+
* `promptsListChanged`, `resourcesListChanged`, `resourceSubscriptions` — with
|
|
22
|
+
* no channel for a server's own domain events, so a `window.opened` could only
|
|
23
|
+
* ride in as `resources/updated` on some URI, and that notification carries a
|
|
24
|
+
* URI and no payload. The model would still have to read. Which makes the
|
|
25
|
+
* doorbell an addition to this file rather than a replacement for it, and one
|
|
26
|
+
* whose bell nothing on the other end rings yet.
|
|
27
|
+
*
|
|
28
|
+
* Written against the `events_url` entry in the platform's `web/lib/apidoc.ts`,
|
|
29
|
+
* which is the reference this must not contradict.
|
|
30
|
+
*/
|
|
31
|
+
import type { Api } from './api.js';
|
|
32
|
+
/**
|
|
33
|
+
* The part of a `WebSocket` this file uses.
|
|
34
|
+
*
|
|
35
|
+
* Structural rather than a named class, so undici's, the global one and a
|
|
36
|
+
* test's stand-in all satisfy it without any of them being imported at the call
|
|
37
|
+
* site. Nothing here ever sends: the stream is one-way, and the reference says
|
|
38
|
+
* nothing a client writes to it means anything.
|
|
39
|
+
*/
|
|
40
|
+
export type EventSocket = {
|
|
41
|
+
addEventListener(type: 'open', fn: () => void): void;
|
|
42
|
+
addEventListener(type: 'message', fn: (ev: {
|
|
43
|
+
data: unknown;
|
|
44
|
+
}) => void): void;
|
|
45
|
+
addEventListener(type: 'error', fn: () => void): void;
|
|
46
|
+
addEventListener(type: 'close', fn: () => void): void;
|
|
47
|
+
close(): void;
|
|
48
|
+
};
|
|
49
|
+
export type EventSocketFactory = (url: string) => EventSocket;
|
|
50
|
+
/**
|
|
51
|
+
* undici's `WebSocket`, not Node's global one.
|
|
52
|
+
*
|
|
53
|
+
* The same choice `api.ts` makes about `fetch` and for a plainer reason: this
|
|
54
|
+
* package already depends on undici, `engines` says Node 20.3 and the global
|
|
55
|
+
* `WebSocket` did not arrive unflagged until Node 22. A server that worked on
|
|
56
|
+
* the Node it claims to support for every tool except these two would be a
|
|
57
|
+
* worse failure than not shipping them, because it only appears at the moment
|
|
58
|
+
* somebody waits for something.
|
|
59
|
+
*/
|
|
60
|
+
export declare const defaultEventSocket: EventSocketFactory;
|
|
61
|
+
/**
|
|
62
|
+
* One frame off the stream, as the platform wrote it.
|
|
63
|
+
*
|
|
64
|
+
* Deliberately NOT re-shaped into a typed union the way the SDKs do. What
|
|
65
|
+
* reads this is a model reading JSON, so the platform's own spelling is the
|
|
66
|
+
* one worth handing over — and the reference promises the vocabulary grows,
|
|
67
|
+
* so a frame this build has never heard of has to arrive intact rather than be
|
|
68
|
+
* flattened into whatever fields this file happened to know about.
|
|
69
|
+
*/
|
|
70
|
+
export type ComputerEvent = Record<string, unknown> & {
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* One nominated tree, as the opening frame reports it back.
|
|
75
|
+
*
|
|
76
|
+
* `path` is the nomination as the HOST normalised it, and that is the spelling
|
|
77
|
+
* every `file.changed` carries in `watch` — so a client matching on what it
|
|
78
|
+
* sent matches nothing the day the two differ. What this server does about that
|
|
79
|
+
* is {@link Subscription.hostPath}: it goes on nominating in its own spelling,
|
|
80
|
+
* because that is what every reconnect has to re-send, and matches in the
|
|
81
|
+
* host's.
|
|
82
|
+
*
|
|
83
|
+
* `armed` is the field a client gets wrong. A tree is not being watched because
|
|
84
|
+
* the socket accepted the nomination: the guest has to be asked, and on a
|
|
85
|
+
* computer nobody has opened a terminal on the host must install the watcher
|
|
86
|
+
* into the guest first. `true` here means live NOW and no event is coming to
|
|
87
|
+
* say so — somebody else nominated it first and the guest answers a nomination
|
|
88
|
+
* once. `false` means wait for `{watch, armed: true}` on the stream. The same
|
|
89
|
+
* split as `ready`: state in `hello`, transitions on the stream.
|
|
90
|
+
*/
|
|
91
|
+
export type Watched = {
|
|
92
|
+
path: string;
|
|
93
|
+
armed: boolean;
|
|
94
|
+
};
|
|
95
|
+
/** The opening frame, once per connection. */
|
|
96
|
+
export type Hello = {
|
|
97
|
+
computer: string;
|
|
98
|
+
cursor: string;
|
|
99
|
+
/** Whether the desktop has ALREADY been announced ready for the session it is in. */
|
|
100
|
+
ready: boolean;
|
|
101
|
+
/** What THIS computer can emit — not everything the platform knows how to. */
|
|
102
|
+
events: string[];
|
|
103
|
+
/** The desktop as this host last saw it. Absent when a cursor was honoured. */
|
|
104
|
+
windows?: unknown[];
|
|
105
|
+
/**
|
|
106
|
+
* The trees this stream reports `file.changed` under, normalised by the host.
|
|
107
|
+
*
|
|
108
|
+
* ABSENT rather than empty when nothing was nominated, and the difference is
|
|
109
|
+
* the one that matters here: absent is also what a host that has never heard
|
|
110
|
+
* of `&watch=` sends back to a nomination, and this server has to be able to
|
|
111
|
+
* tell "you asked for nothing" from "this host cannot honour what you asked
|
|
112
|
+
* for" without waiting out a timeout to discover it.
|
|
113
|
+
*/
|
|
114
|
+
watching?: Watched[];
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* How many trees ONE stream may nominate, which is the platform's own cap.
|
|
118
|
+
*
|
|
119
|
+
* There is a second, larger one this client cannot enforce: a computer watches
|
|
120
|
+
* at most 32 distinct trees across every stream open on it, and a nomination
|
|
121
|
+
* past that is refused on the upgrade — which reaches a websocket client as a
|
|
122
|
+
* socket that would not open and nothing else. See {@link Subscription.nominate}
|
|
123
|
+
* for what is done about that.
|
|
124
|
+
*/
|
|
125
|
+
export declare const MAX_WATCHES = 4;
|
|
126
|
+
/** The platform's bound on one nominated path, in BYTES rather than characters. */
|
|
127
|
+
export declare const MAX_WATCH_PATH_BYTES = 256;
|
|
128
|
+
/**
|
|
129
|
+
* A nominated path, in the spelling the host will accept — or a refusal saying
|
|
130
|
+
* why it will not.
|
|
131
|
+
*
|
|
132
|
+
* A mirror of the platform's `cleanWatchPath`, and mirrored rather than left to
|
|
133
|
+
* the server for one reason: a path the host refuses is a `400` on the UPGRADE,
|
|
134
|
+
* and an upgrade that fails reaches a websocket client as an error event with
|
|
135
|
+
* no status and no body. Undici says "Received network error or non-101 status
|
|
136
|
+
* code" and that is the whole of it. So a bad path sent optimistically is
|
|
137
|
+
* indistinguishable here from a host that is down, and the answer a model would
|
|
138
|
+
* get is a reconnect loop under "could not open the event stream" — for a
|
|
139
|
+
* mistake that is entirely visible before anything is sent.
|
|
140
|
+
*
|
|
141
|
+
* Normalising rather than refusing the shapes people actually type is the
|
|
142
|
+
* platform's choice and is kept: a trailing slash and a `.` segment name one
|
|
143
|
+
* directory unambiguously. What must not happen is normalising SILENTLY, since
|
|
144
|
+
* the cleaned form is what events carry and what a caller has to match on — so
|
|
145
|
+
* the tools say what a path became when it changed.
|
|
146
|
+
*/
|
|
147
|
+
export declare function cleanWatchPath(input: string): string;
|
|
148
|
+
/** How many events one computer may hold for a model that has not read them. */
|
|
149
|
+
export declare const MAX_BUFFERED = 1024;
|
|
150
|
+
/** How long a subscription nothing has asked about is kept open. */
|
|
151
|
+
export declare const IDLE_REAP_MS: number;
|
|
152
|
+
/** What a read of the buffer hands back. */
|
|
153
|
+
export type Delivery = {
|
|
154
|
+
events: ComputerEvent[];
|
|
155
|
+
/** Where the caller is now, to pass back as `since`. */
|
|
156
|
+
cursor: string;
|
|
157
|
+
/** Events that were in the buffer and are not in this batch. Nothing is lost. */
|
|
158
|
+
more: number;
|
|
159
|
+
/**
|
|
160
|
+
* What was lost before it could be read, and why — `undefined` when nothing
|
|
161
|
+
* was. `events: null` is a number this server does not know rather than none:
|
|
162
|
+
* a platform gap says the history is short, not how short.
|
|
163
|
+
*/
|
|
164
|
+
loss?: Loss;
|
|
165
|
+
/** The opening frame of the connection now open, if one has landed. */
|
|
166
|
+
hello?: Hello;
|
|
167
|
+
/** True on the first read of a subscription: the caller has no earlier place. */
|
|
168
|
+
attached: boolean;
|
|
169
|
+
};
|
|
170
|
+
export type Loss = {
|
|
171
|
+
events: number | null;
|
|
172
|
+
reason: string;
|
|
173
|
+
};
|
|
174
|
+
/** Whether a subscription can still be expected to produce anything. */
|
|
175
|
+
export type SubscriptionState = {
|
|
176
|
+
status: 'connecting' | 'open';
|
|
177
|
+
}
|
|
178
|
+
/** Nothing more will arrive, and reopening would answer the same way. */
|
|
179
|
+
| {
|
|
180
|
+
status: 'stopped';
|
|
181
|
+
reason: string;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* One computer's event stream, held across turns.
|
|
185
|
+
*
|
|
186
|
+
* Single-consumer, like the session it belongs to. It keeps its own place in
|
|
187
|
+
* the platform's stream so that a socket which drops mid-turn resumes rather
|
|
188
|
+
* than restarts, and it keeps the model's place in the buffer so that a model
|
|
189
|
+
* which asks nothing for four turns is still handed what happened during them.
|
|
190
|
+
*/
|
|
191
|
+
export declare class Subscription {
|
|
192
|
+
#private;
|
|
193
|
+
readonly computerId: string;
|
|
194
|
+
constructor(api: Api, computerId: string, socketFor: EventSocketFactory, since?: string, watches?: string[]);
|
|
195
|
+
/** The trees this stream nominates, in this client's own spelling. */
|
|
196
|
+
get nominations(): string[];
|
|
197
|
+
/**
|
|
198
|
+
* Where a REPLACEMENT for this subscription should start.
|
|
199
|
+
*
|
|
200
|
+
* The position after the last event the MODEL was handed — deliberately not
|
|
201
|
+
* `#resume`, which is after the last event this SOCKET received. The two are
|
|
202
|
+
* the same only when the model is caught up, and the case where they differ
|
|
203
|
+
* is the case this exists for: events arrive, the model is busy on another
|
|
204
|
+
* computer, the idle sweep reaps the subscription and its ring goes with it.
|
|
205
|
+
* Handing the replacement `#resume` there would ask the platform to replay
|
|
206
|
+
* from AFTER the unread events — losing exactly what the memory was meant to
|
|
207
|
+
* preserve, and losing it silently, since a `since` the platform can honour
|
|
208
|
+
* produces no gap.
|
|
209
|
+
*
|
|
210
|
+
* Before anything has been delivered the answer is where this stream began,
|
|
211
|
+
* which replays the whole buffer.
|
|
212
|
+
*/
|
|
213
|
+
get resumeCursor(): string | undefined;
|
|
214
|
+
get state(): SubscriptionState;
|
|
215
|
+
get idleMs(): number;
|
|
216
|
+
/** What this computer can emit, as last stated. `undefined` before `hello`. */
|
|
217
|
+
get eventTypes(): string[] | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The trees nominated on this stream, and whether each is live yet.
|
|
220
|
+
*
|
|
221
|
+
* In the HOST's spelling, because that is the one every event carries and so
|
|
222
|
+
* the one a reader of this has to be able to match on.
|
|
223
|
+
*/
|
|
224
|
+
get watching(): Watched[];
|
|
225
|
+
/** What the host calls a tree this stream nominated. Its own name until it says. */
|
|
226
|
+
hostPath(nominated: string): string;
|
|
227
|
+
/** Whether this tree is being watched right now. */
|
|
228
|
+
isArmed(path: string): boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Which arming of this tree is current.
|
|
231
|
+
*
|
|
232
|
+
* Compared rather than read: a caller holds the number from when it started
|
|
233
|
+
* waiting and asks whether it still holds, which is how a re-arm ends a wait
|
|
234
|
+
* that was looking for file paths.
|
|
235
|
+
*/
|
|
236
|
+
armGeneration(path: string): number;
|
|
237
|
+
/** The last thing this tree said it had lost, if it has said one since arming. */
|
|
238
|
+
lostFor(path: string): string | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* Whether this host honoured the nomination at all.
|
|
241
|
+
*
|
|
242
|
+
* `undefined` while nothing has been nominated or no opening frame has been
|
|
243
|
+
* seen since. `false` is a host with no `file.changed` — see
|
|
244
|
+
* {@link #watchingEchoed}.
|
|
245
|
+
*/
|
|
246
|
+
get watchesHonoured(): boolean | undefined;
|
|
247
|
+
/** Whether the connection now open nominated this tree and has greeted. */
|
|
248
|
+
nominationLive(path: string): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Whether this tree is being watched RIGHT NOW, connection included.
|
|
251
|
+
*
|
|
252
|
+
* The question {@link isArmed} does not answer and the one a quiet answer has
|
|
253
|
+
* to be built on. `#armed` is what the last opening frame said, and it is
|
|
254
|
+
* deliberately not cleared when a socket dies — clearing it would make every
|
|
255
|
+
* routine reconnect look like a re-arm, which is a "go and re-read the tree"
|
|
256
|
+
* for an interruption the platform's own replay covered. But a tree on a
|
|
257
|
+
* connection that is not up is not being watched at this instant, and a tool
|
|
258
|
+
* that said "watched for the whole of that and still is" while reconnecting
|
|
259
|
+
* would be wrong about the half of that sentence it can actually check.
|
|
260
|
+
*/
|
|
261
|
+
watchLive(path: string): boolean;
|
|
262
|
+
/** Whether this stream is still nominating this tree at all. */
|
|
263
|
+
nominates(path: string): boolean;
|
|
264
|
+
/** Whether the connection carrying this tree was refused. See {@link WATCH_SHED_AFTER}. */
|
|
265
|
+
watchWasRefused(path: string): boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Whether this tree went unwatched between a previous subscription and this
|
|
268
|
+
* one, and has not been told about it yet. Reading it CLEARS it: it is a
|
|
269
|
+
* thing to say once.
|
|
270
|
+
*/
|
|
271
|
+
takeInterruption(path: string): boolean;
|
|
272
|
+
/** Mark it in use, so the idle sweep leaves it alone. */
|
|
273
|
+
touch(): void;
|
|
274
|
+
/**
|
|
275
|
+
* Ask this stream to report file changes under a tree.
|
|
276
|
+
*
|
|
277
|
+
* The one thing on this socket that has to be ASKED for: without a nomination
|
|
278
|
+
* no `file.changed` can arrive at all, which makes a watch a connection
|
|
279
|
+
* parameter rather than an event type to add to a list. So nominating
|
|
280
|
+
* something new reopens the connection — with this subscription's own
|
|
281
|
+
* `since`, so the reconnect resumes rather than restarts and nothing on the
|
|
282
|
+
* stream is missed by it.
|
|
283
|
+
*
|
|
284
|
+
* Already-nominated is a no-op that moves the tree to the front of the queue,
|
|
285
|
+
* and that ordering is what {@link MAX_WATCHES} costs: a fifth tree evicts the
|
|
286
|
+
* one nobody has asked about for longest. Evicting rather than refusing is
|
|
287
|
+
* deliberate — a model that has moved on to a different directory should not
|
|
288
|
+
* have to know that four earlier ones are in the way — but it is never
|
|
289
|
+
* SILENT, because a dropped watch is a tree that stops reporting. The caller
|
|
290
|
+
* is handed what went and says so.
|
|
291
|
+
*
|
|
292
|
+
* It says only what it EVICTED, and not whether it reopened anything. The
|
|
293
|
+
* caller has a sharper question than "did this change something" —
|
|
294
|
+
* {@link nominationLive}, which asks whether the open connection is carrying
|
|
295
|
+
* the tree — and the two differ in the case that matters: a nomination this
|
|
296
|
+
* call did not change can still be off the wire, because the connection
|
|
297
|
+
* carrying it dropped a moment ago.
|
|
298
|
+
*/
|
|
299
|
+
nominate(path: string): {
|
|
300
|
+
evicted?: string;
|
|
301
|
+
};
|
|
302
|
+
/** Open the socket, if it is not already open. Returns at once. */
|
|
303
|
+
start(): void;
|
|
304
|
+
/** Close the socket and stop reconnecting. The buffer goes with it. */
|
|
305
|
+
close(reason?: string): void;
|
|
306
|
+
/**
|
|
307
|
+
* Everything the model has not been handed, oldest first.
|
|
308
|
+
*
|
|
309
|
+
* `since` is an override rather than the ordinary way in. A model that passes
|
|
310
|
+
* nothing gets what it has not seen, which is what "what happened while I was
|
|
311
|
+
* thinking" means and is the call that cannot be got wrong; a model that
|
|
312
|
+
* keeps a cursor can rewind or resume with one. Both are the same position in
|
|
313
|
+
* the end — this class holds it either way.
|
|
314
|
+
*/
|
|
315
|
+
read(opts?: {
|
|
316
|
+
since?: string;
|
|
317
|
+
limit: number;
|
|
318
|
+
through?: number;
|
|
319
|
+
}): Delivery;
|
|
320
|
+
/**
|
|
321
|
+
* Where a read or a wait starts: the model's own place, or the cursor it named.
|
|
322
|
+
*
|
|
323
|
+
* A cursor this buffer cannot place is not an error and not silence. It may
|
|
324
|
+
* be from before the socket opened, from before a reap, or simply not one of
|
|
325
|
+
* ours; either way the events between there and here are not something this
|
|
326
|
+
* server holds, and saying so is the whole of the gap discipline — never a
|
|
327
|
+
* frame the model has to interpret, always a sentence and, from the tool, the
|
|
328
|
+
* state it would otherwise have gone to reconcile against.
|
|
329
|
+
*/
|
|
330
|
+
resolveFrom(since?: string): number;
|
|
331
|
+
/**
|
|
332
|
+
* Wait for an event this predicate accepts, or for the deadline.
|
|
333
|
+
*
|
|
334
|
+
* Resolves with the matching event's index, or `undefined` for a wait that
|
|
335
|
+
* ended without one — a deadline, a caller who hung up, or a stream that
|
|
336
|
+
* stopped. None of those three is an error here and the caller says which.
|
|
337
|
+
*/
|
|
338
|
+
waitFor(matches: (ev: ComputerEvent) => boolean, deadline: AbortSignal, cancel?: AbortSignal, since?: string, abandon?: () => boolean): Promise<number | undefined>;
|
|
339
|
+
/**
|
|
340
|
+
* Wait until this subscription has an opening frame, or has stopped.
|
|
341
|
+
*
|
|
342
|
+
* Separate from {@link waitFor} rather than expressed as a predicate over it,
|
|
343
|
+
* and the reason is worth keeping: `waitFor` evaluates its predicate against
|
|
344
|
+
* BUFFERED EVENTS, so a condition that is not about an event — "has hello
|
|
345
|
+
* landed" — is never evaluated at all on a computer where nothing is
|
|
346
|
+
* happening. Written that way it does not answer late, it answers at the
|
|
347
|
+
* deadline, on the one call where the deadline is twenty seconds.
|
|
348
|
+
*/
|
|
349
|
+
attached(deadline: AbortSignal, cancel?: AbortSignal): Promise<void>;
|
|
350
|
+
/**
|
|
351
|
+
* Wait until the open connection is carrying this tree and has greeted.
|
|
352
|
+
*
|
|
353
|
+
* The counterpart to {@link attached} for a nomination, and separate for the
|
|
354
|
+
* reason the two of them are separate from {@link waitFor}: what is being
|
|
355
|
+
* waited for is not an event, so a predicate over the ring would never be
|
|
356
|
+
* evaluated on a computer where nothing is happening. `attached` cannot serve
|
|
357
|
+
* here either — it is satisfied the moment `#types` is set, which a
|
|
358
|
+
* nomination does not clear, so it would return at once and leave the caller
|
|
359
|
+
* reading the PREVIOUS connection's `watching`.
|
|
360
|
+
*/
|
|
361
|
+
nominated(path: string, deadline: AbortSignal, cancel?: AbortSignal): Promise<void>;
|
|
362
|
+
/**
|
|
363
|
+
* Wait until this tree is actually being watched.
|
|
364
|
+
*
|
|
365
|
+
* The whole reason a file watch needs its own wait. `hello` accepting a
|
|
366
|
+
* nomination is not the tree being watched: the guest has to be asked, and on
|
|
367
|
+
* a computer nobody has opened a terminal on the host installs the watcher
|
|
368
|
+
* into the guest first — seconds, not milliseconds. inotify reports changes
|
|
369
|
+
* and not state, so nothing that happens in that window is ever reported.
|
|
370
|
+
* Returning before this is what makes a tool say "nothing changed" about a
|
|
371
|
+
* window during which nothing was watching, which is the one sentence a
|
|
372
|
+
* server whose whole promise is that it was listening must not say.
|
|
373
|
+
*
|
|
374
|
+
* Returns on the deadline, on a stopped stream, and on an `unwatchable` —
|
|
375
|
+
* which is the one `lost` that means the tree is not being watched at all,
|
|
376
|
+
* and so is not something more waiting will fix. The caller reads
|
|
377
|
+
* {@link isArmed} to find out which it got.
|
|
378
|
+
*/
|
|
379
|
+
armedWait(path: string, deadline: AbortSignal, cancel?: AbortSignal): Promise<void>;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Every computer this session is listening to.
|
|
383
|
+
*
|
|
384
|
+
* One per session and not one per process, for the reason `Session` itself is:
|
|
385
|
+
* over the HTTP transport each caller arrives with their own key, and a
|
|
386
|
+
* process-wide hub would hold one caller's socket open for another caller's
|
|
387
|
+
* computer.
|
|
388
|
+
*/
|
|
389
|
+
export declare class EventHub {
|
|
390
|
+
#private;
|
|
391
|
+
constructor(api: Api, socketFor?: EventSocketFactory);
|
|
392
|
+
/** This computer's subscription, opened if this is the first ask. */
|
|
393
|
+
open(computerId: string): Subscription;
|
|
394
|
+
/**
|
|
395
|
+
* Drop one, so the next ask opens a fresh socket and a fresh buffer.
|
|
396
|
+
*
|
|
397
|
+
* `remember` is the difference between a stream this session may want to
|
|
398
|
+
* resume — reaped for idleness, stopped on a computer somebody suspended —
|
|
399
|
+
* and one there is nothing left to resume: a deleted computer's cursor names
|
|
400
|
+
* a position in a stream that no longer exists.
|
|
401
|
+
*/
|
|
402
|
+
drop(computerId: string, reason: string, remember?: boolean): void;
|
|
403
|
+
/** Close every socket. The session is over, or the process is going away. */
|
|
404
|
+
closeAll(): void;
|
|
405
|
+
}
|
|
406
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,OAAO,KAAK,EAA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