@coda-console/plugin-check 0.8.20 → 0.8.22
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 +3 -3
- package/check/agent.mjs +2 -1
- package/check/coda/adapters/call-limit.mjs +56 -0
- package/check/coda/adapters/clock.mjs +48 -0
- package/check/coda/adapters/plugin-command.mjs +171 -0
- package/check/coda/adapters/plugin-modules.mjs +505 -0
- package/check/coda/adapters/plugin-stream-services.mjs +53 -0
- package/check/coda/adapters/plugin-test-host.d.mts +316 -0
- package/check/coda/adapters/plugin-test-host.mjs +404 -0
- package/check/coda/adapters/process-relay.mjs +74 -0
- package/check/coda/adapters/provider-api.mjs +147 -40
- package/check/coda/application/contributions.mjs +1 -0
- package/check/coda/builtin.json +66 -67
- package/check/coda/components/composers/schemas.mjs +4 -2
- package/check/coda/components/concurrency-groups/schemas.mjs +102 -0
- package/check/coda/components/plugins/plugin-extensions.mjs +104 -10
- package/check/coda/components/plugins/plugin-rules.mjs +19 -1
- package/check/coda/components/plugins/plugin-source-rules.mjs +34 -14
- package/check/coda/components/plugins/process-contributions.mjs +9 -0
- package/check/coda/components/prompt-recovery/prompt-recovery.mjs +2 -49
- package/check/coda/components/protocols/record-rules.mjs +70 -0
- package/check/coda/components/protocols/types.mjs +22 -4
- package/check/coda/components/workflows/contributions.mjs +2 -6
- package/check/coda/contract.json +29 -21
- package/check/coda/domain/errors.mjs +5 -1
- package/check/coda/domain/resume-prompt.mjs +93 -0
- package/check/coda/domain/session-env.mjs +1 -1
- package/check/coda/resources/plugins/resources/panels/panels.mjs +26 -17
- package/check/coda/resources/plugins/resources/panels/rules.mjs +0 -4
- package/check/coda/resources/plugins/resources/panels/sign-in.mjs +32 -41
- package/check/manifest.mjs +0 -1
- package/check/panel.mjs +6 -5
- package/package.json +2 -2
- package/check/coda/adapters/admission-api.mjs +0 -22
- package/check/coda/components/protocols/creation.mjs +0 -19
- package/check/coda/domain/resource-admission.mjs +0 -15
- package/check/coda/resources/plugins/resources/panels/command.mjs +0 -46
- package/check/command.mjs +0 -48
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
// Types of what a plugin's module queries and answers by (docs/plugins.md「调用」, coda#2749 3.1 and 第 7 节), and of the test
|
|
2
|
+
// host (plugin-test-host.mjs), and of the records (coda#2749 3.7). All on the trial surface: they may change from one
|
|
3
|
+
// version of Coda to the next. Only these members of `coda` are typed here; the others are not yet.
|
|
4
|
+
import type { Readable, Writable } from 'node:stream';
|
|
5
|
+
|
|
6
|
+
export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
|
|
7
|
+
/** A record: its protocol and its ID, the space's one. */
|
|
8
|
+
export type Ref = { kind: string; id: string };
|
|
9
|
+
/**
|
|
10
|
+
* A record this plugin writes, as it names it: its protocol and the plugin's own key (1–256 characters: a device's udid,
|
|
11
|
+
* `account:group`, a source's name). Its ID is derived by the host from this backend, the plugin, the kind and the key,
|
|
12
|
+
* the same every time; the plugin makes no ID, nor keeps a table from its keys to IDs.
|
|
13
|
+
*/
|
|
14
|
+
export type KeyRef = { kind: string; key: string };
|
|
15
|
+
/** A record a call is of, as its handler is given it: with its `key` when it is this plugin's own on this machine. */
|
|
16
|
+
export type HandledRef = Ref & { key?: string };
|
|
17
|
+
/** How much a call that failed did: nothing, some of it, or none can say. */
|
|
18
|
+
export type Effects = 'none' | 'some' | 'unknown';
|
|
19
|
+
|
|
20
|
+
/** A failed call, as its caller sees it and as `coda.error` makes it. */
|
|
21
|
+
export interface CallError extends Error {
|
|
22
|
+
code: string;
|
|
23
|
+
effects?: Effects;
|
|
24
|
+
retryAfterMs?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface QueryOptions {
|
|
28
|
+
/** Going off, the call is given up: it fails as an `AbortError`. */
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
/** Milliseconds; at most the operation's own `timeout`, or 30 seconds. */
|
|
31
|
+
timeout?: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CallOptions {
|
|
35
|
+
/**
|
|
36
|
+
* The call's idempotency key, by default a new one: made again with the same key and the same content, it is the same call,
|
|
37
|
+
* not done again, its outcome the first one's; with other content it is refused (`idempotency_conflict`, `none`).
|
|
38
|
+
*/
|
|
39
|
+
id?: string;
|
|
40
|
+
/** Going off, the call is cancelled and not waited on: it fails as an `AbortError`. */
|
|
41
|
+
signal?: AbortSignal;
|
|
42
|
+
/** Milliseconds it is waited on; past them it is given up (its callee asked to cancel) and fails as a `TimeoutError`. */
|
|
43
|
+
timeout?: number;
|
|
44
|
+
/** How the call goes, as its handler says it (`ctx.progress`): a hint; only the latest is kept, and it may be lost. */
|
|
45
|
+
onProgress?(value: Json): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** What a handler of a call is given beside its input. A handler of a query, and `resume`, have no `progress` nor `ask`. */
|
|
49
|
+
export interface Context {
|
|
50
|
+
/** This call's ID, the host's, unique: the same for the same caller's same request. */
|
|
51
|
+
id: string;
|
|
52
|
+
/** The record the call is of; with its `key` when it is this plugin's own. */
|
|
53
|
+
record: HandledRef;
|
|
54
|
+
/**
|
|
55
|
+
* Goes off when the caller gives up or cancels (`AbortError`) or the deadline passes (a query's `timeout`, a doing
|
|
56
|
+
* call's `TimeoutError`). A doing call's handler still ends it: thrown its reason, it is cancelled or timed out.
|
|
57
|
+
*/
|
|
58
|
+
signal: AbortSignal;
|
|
59
|
+
/** When the call's time is up, in milliseconds since the epoch; a doing call may have none. */
|
|
60
|
+
deadline: number | null;
|
|
61
|
+
/** `coda.query` under this call: given up on with it, and given at most the time it has left. Only queries. */
|
|
62
|
+
query: Coda['query'];
|
|
63
|
+
/**
|
|
64
|
+
* `coda.spawn` under this call: ended as `signal` goes off, and, still running, once the call has ended (its handler
|
|
65
|
+
* returned or threw, or the host ended it). One `name`d outlives it.
|
|
66
|
+
*/
|
|
67
|
+
spawn: Coda['spawn'];
|
|
68
|
+
/** A doing call's: how it goes, a hint; only the latest is kept, and it may be lost. */
|
|
69
|
+
progress?(value: Json): void;
|
|
70
|
+
/** A doing call's: a question to whoever answers it, its answer once given; one at a time. */
|
|
71
|
+
ask?(question: Json): Promise<Json>;
|
|
72
|
+
/**
|
|
73
|
+
* A doing call's handler's, and its `resume`'s: `coda.call` made by this call, so that it is cancelled as this call is;
|
|
74
|
+
* given up on with it, and given at most the time it has left. Made again by the same `id` in `resume`, it is the call
|
|
75
|
+
* made before the process ended, its outcome waited on again.
|
|
76
|
+
*/
|
|
77
|
+
call?: Coda['call'];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Its return value is the result; what it throws, the failure (`coda.error`, or anything else as `handler_error`). */
|
|
81
|
+
export type Handler = (input: Json, ctx: Context) => Json | Promise<Json>;
|
|
82
|
+
/** A doing call handed to a process of the plugin's that ended before its handler did. */
|
|
83
|
+
export interface Interrupted {
|
|
84
|
+
/** The call's ID, as its handler was given it (`ctx.id`). */
|
|
85
|
+
id: string;
|
|
86
|
+
record: HandledRef;
|
|
87
|
+
op: string;
|
|
88
|
+
input: Json;
|
|
89
|
+
/** The last progress its handler gave, only a hint: no evidence of what was done. */
|
|
90
|
+
progress: Json | null;
|
|
91
|
+
/** Whether it was asked to be cancelled. */
|
|
92
|
+
canceled: boolean;
|
|
93
|
+
/** The calls it made that have ended; not filled yet: a `resume` makes its calls again by their `id` to learn how they ended. */
|
|
94
|
+
children: { record: Ref; op: string; outcome: Json }[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Says how such a call ended, as a handler does, once a later process of the plugin's has the module activated: its
|
|
98
|
+
* return value the result, what it throws the failure. Given 30 seconds; its `ctx` is a query's handler's (no `progress`
|
|
99
|
+
* nor `ask`). Asked to be cancelled, or past its deadline, before it is called, its `ctx.signal` has gone off already
|
|
100
|
+
* (`AbortError`, `TimeoutError`). It may be called more than once, its process ending meanwhile: it only says, and does
|
|
101
|
+
* nothing.
|
|
102
|
+
*/
|
|
103
|
+
export type Resume = (call: Interrupted, ctx: Context) => Json | Promise<Json>;
|
|
104
|
+
|
|
105
|
+
export interface Disposable { dispose(): void }
|
|
106
|
+
|
|
107
|
+
export interface SpawnOptions {
|
|
108
|
+
/** Its working directory; by default the plugin's directory. */
|
|
109
|
+
cwd?: string;
|
|
110
|
+
/** Added over the environment of the plugin's processes. */
|
|
111
|
+
env?: Record<string, string>;
|
|
112
|
+
/**
|
|
113
|
+
* One of the names the manifest's `contributes.processes` declares: the process outlives the call or the module that
|
|
114
|
+
* started it, until it exits or the plugin is uninstalled. One at a time: while one of the name runs, another fails
|
|
115
|
+
* (`conflict`). It has no input, and its output goes to `<plugin's state directory>/processes/<name>.log`, written anew
|
|
116
|
+
* each time it starts and never rotated: its handle's streams are `null`.
|
|
117
|
+
*/
|
|
118
|
+
name?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** A process the host started for the module, as Node's ChildProcess has the most of it. */
|
|
122
|
+
export interface Process {
|
|
123
|
+
pid: number;
|
|
124
|
+
/** `null` for a named one, as for a ChildProcess whose stdio is not piped. */
|
|
125
|
+
stdin: Writable | null;
|
|
126
|
+
/**
|
|
127
|
+
* Read it, or `resume()` it to drop it: what is not read holds the process once a window of it waits. `null` for a
|
|
128
|
+
* named one: its output is in its log.
|
|
129
|
+
*/
|
|
130
|
+
stdout: Readable | null;
|
|
131
|
+
stderr: Readable | null;
|
|
132
|
+
/**
|
|
133
|
+
* Once the process has exited and all of `stdout` and `stderr` is in them, ended. Fails (`interrupted`) if the
|
|
134
|
+
* plugin's host stops first: the host ends the process.
|
|
135
|
+
*/
|
|
136
|
+
exited: Promise<{ code: number | null; signal: string | null }>;
|
|
137
|
+
/** Sends it `signal` (SIGTERM by default), the process alone, as `ChildProcess.kill` does. */
|
|
138
|
+
kill(signal?: string): void;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface Settings {
|
|
142
|
+
/** This plugin's own settings as they are now (secrets are not among them); asked each time. */
|
|
143
|
+
get(): Promise<Json>;
|
|
144
|
+
/** Told the new settings after they are written; `dispose()` stops it, as does the module stopping. */
|
|
145
|
+
onChange(fn: (settings: Json) => void): Disposable;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* A record as it is read (`get`, `list`, `watch`): its holder's backend (`owner`) and the machine it is on (`location`),
|
|
150
|
+
* its own ID, the plugin that holds it (`plugin`; `coda` for Coda's own), the key this plugin named it by (only of its own
|
|
151
|
+
* on this machine; no other plugin, nor any other machine, is told it), whether it is this machine's (`local`: the holder's original; another's is a copy, which only its holder
|
|
152
|
+
* writes), its spec and status as written, the records they refer to by their IDs (`get` reads them wherever they are
|
|
153
|
+
* held), its labels, and a version that changes as it does. In a space every machine's records are read on every other but
|
|
154
|
+
* Coda's composers and submissions, only on the machine that wrote them, and its runs and cards, which the catalog does not take.
|
|
155
|
+
*/
|
|
156
|
+
export interface Entry {
|
|
157
|
+
owner: string;
|
|
158
|
+
location: string;
|
|
159
|
+
id: string;
|
|
160
|
+
plugin: string;
|
|
161
|
+
key?: string;
|
|
162
|
+
local: boolean;
|
|
163
|
+
spec: { [key: string]: Json };
|
|
164
|
+
status: { [key: string]: Json };
|
|
165
|
+
labels?: Record<string, string>;
|
|
166
|
+
version: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A record as `put` writes it, and `replace` each: its spec and its labels (none: none) whole; its status as given, or, not
|
|
170
|
+
* given, as the record has it (a new one's empty), as a status is the one's that keeps it so.
|
|
171
|
+
*/
|
|
172
|
+
export interface RecordValue {
|
|
173
|
+
spec: { [key: string]: Json };
|
|
174
|
+
status?: { [key: string]: Json };
|
|
175
|
+
labels?: Record<string, string>;
|
|
176
|
+
}
|
|
177
|
+
/** `local`: this machine's records only; `available` (by default): every machine's in the space. `id`: of that ID only. */
|
|
178
|
+
export interface RecordFilter { scope?: 'local' | 'available'; id?: string }
|
|
179
|
+
/** A record read anew, made or gone: by its ID, as it is now, or as it was last. */
|
|
180
|
+
export interface RecordChange { type: 'ADDED' | 'MODIFIED' | 'DELETED'; id: string; entry: Entry }
|
|
181
|
+
|
|
182
|
+
export interface Coda {
|
|
183
|
+
/** Handles an operation of a protocol the plugin implements: a query (`safe`) or a doing call (any other, `idempotent` among them). */
|
|
184
|
+
handle(kind: string, operation: string, handler: Handler | { run: Handler; resume?: Resume }): Disposable;
|
|
185
|
+
/** `self` is no protocol: `handle('self', …)` throws `invalid_input`. */
|
|
186
|
+
self: {
|
|
187
|
+
/**
|
|
188
|
+
* Handles a query only the plugin's own processes make (`coda self <name> [input]`), listed in no manifest: its
|
|
189
|
+
* `ctx.record` is `{ kind: 'self', id: <plugin's ID> }`; given 30 seconds; one not registered fails as `not_found`.
|
|
190
|
+
*/
|
|
191
|
+
handle(name: string, handler: Handler): Disposable;
|
|
192
|
+
};
|
|
193
|
+
/** Queries a record: only a `safe` operation. Fails with a `CallError`, its `effects` always `none`. */
|
|
194
|
+
query(record: Ref, operation: string, input?: Json, options?: QueryOptions): Promise<Json>;
|
|
195
|
+
/**
|
|
196
|
+
* Does an operation of a record that is not `safe` (an `idempotent` one too), as this plugin, through Coda's call kernel: its
|
|
197
|
+
* result. Fails with a `CallError`, its `code` and `effects` as the callee said them; cancelled, as an `AbortError`; past
|
|
198
|
+
* `timeout`, as a `TimeoutError`.
|
|
199
|
+
*/
|
|
200
|
+
call(record: Ref, operation: string, input?: Json, options?: CallOptions): Promise<Json>;
|
|
201
|
+
error(code: string, message: string, more?: { effects?: Effects; retryAfterMs?: number }): CallError;
|
|
202
|
+
/**
|
|
203
|
+
* Starts a process for the module: until it stops (the plugin host's process ends, the plugin is uninstalled), or, with
|
|
204
|
+
* `name`, beyond it. What it leaves in its group as it exits is ended with it. Fails as `spawn_failed`: of `none`
|
|
205
|
+
* effect if it never started, of `unknown` if it started and could not be registered (killed with its group at once).
|
|
206
|
+
*/
|
|
207
|
+
spawn(command: string, args?: string[], options?: SpawnOptions): Promise<Process>;
|
|
208
|
+
/** This plugin's own settings. */
|
|
209
|
+
settings: Settings;
|
|
210
|
+
/**
|
|
211
|
+
* One record of a kind, of its ID (a record's ID is the space's one): this machine's, else the one another machine
|
|
212
|
+
* holds; `null` for none. Read after what the module wrote before.
|
|
213
|
+
*/
|
|
214
|
+
get(record: Ref): Promise<Entry | null>;
|
|
215
|
+
/** The records of a kind, this machine's first; read after what the module wrote before. */
|
|
216
|
+
list(kind: string, filter?: RecordFilter): Promise<Entry[]>;
|
|
217
|
+
/**
|
|
218
|
+
* Watches a kind's records: each there is given as `ADDED` first, then each change. Gone over again whole if the host
|
|
219
|
+
* restarts (the module is activated anew). Done once the first are given.
|
|
220
|
+
*/
|
|
221
|
+
watch(kind: string, fn: (change: RecordChange) => void, filter?: RecordFilter): Promise<Disposable>;
|
|
222
|
+
/**
|
|
223
|
+
* Makes or replaces a record this plugin holds (`RecordValue`), or makes one of a kind it implements, by its key; another's
|
|
224
|
+
* it may not write (`forbidden`). What people read of it is in its spec. Done once it is read so, with its entry (its
|
|
225
|
+
* `id`, the host's, and its `key`); refused (`invalid_input` for a key not 1–256 characters, an `id` given, or a value
|
|
226
|
+
* its kind's schemas, or the space's 64 KiB a record, refuse; `conflict` for a group named as another here), nothing was
|
|
227
|
+
* written. The module's writes are done one after another, as it made them.
|
|
228
|
+
*/
|
|
229
|
+
put(record: KeyRef, value: RecordValue): Promise<Entry>;
|
|
230
|
+
/** Deletes a record this plugin holds, by its key; one not there is no failure. */
|
|
231
|
+
delete(record: KeyRef): Promise<void>;
|
|
232
|
+
/**
|
|
233
|
+
* Every record this plugin holds of a kind, given whole by their keys: each written as `put` writes it, and those it
|
|
234
|
+
* holds and no longer gives deleted; another plugin's of the kind are left. All of it is done, or nothing; done, with
|
|
235
|
+
* the entries given, in their order.
|
|
236
|
+
*/
|
|
237
|
+
replace(kind: string, entries: (RecordValue & { key: string })[]): Promise<Entry[]>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** A protocol a plugin implements, some of its operations by commands: operation name to the file that implements it. */
|
|
241
|
+
export interface ProtocolImplementation {
|
|
242
|
+
kind: string;
|
|
243
|
+
commands: Record<string, string>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** The plugin under test, as its manifest has it. Processes it starts are real children of the test's, with no token. */
|
|
247
|
+
export interface TestPlugin {
|
|
248
|
+
id?: string;
|
|
249
|
+
path?: string;
|
|
250
|
+
state?: string;
|
|
251
|
+
/** The protocols it defines (`contributes.protocols`). */
|
|
252
|
+
protocols?: object[];
|
|
253
|
+
/**
|
|
254
|
+
* The protocols it implements (`contributes.protocolImplementations`): a protocol's name, its operations all its module's;
|
|
255
|
+
* or `{ kind, commands }`, the operations in `commands` each implemented by a file of the plugin's (its path from `path`),
|
|
256
|
+
* the rest its module's. Such a command is run as Coda runs it, its call in its environment as its `ctx` has it
|
|
257
|
+
* (`CODA_RECORD_KIND`, `CODA_RECORD_ID`, `CODA_RECORD_KEY` of a record the plugin holds, `CODA_CALL_ID`, `CODA_DEADLINE`
|
|
258
|
+
* when it has one), but with no token: `coda progress`, `coda ask`, `coda query` and `coda self` in it are not answered
|
|
259
|
+
* by the test host.
|
|
260
|
+
*/
|
|
261
|
+
protocolImplementations?: (string | ProtocolImplementation)[];
|
|
262
|
+
/** The names of the processes it declares (`contributes.processes`): a named `spawn` of any other fails (`not_found`). */
|
|
263
|
+
processes?: string[];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface TestCallOptions extends QueryOptions {
|
|
267
|
+
/** A doing call's progress, as its handler says it. */
|
|
268
|
+
onProgress?(value: Json): void;
|
|
269
|
+
/** Answers a doing call's question (`ctx.ask`); without it, the question fails. */
|
|
270
|
+
answer?(question: Json): Json | Promise<Json>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface TestHost {
|
|
274
|
+
/** The plugin's `coda`, for its module's `activate`. */
|
|
275
|
+
coda: Coda & Record<string, unknown>;
|
|
276
|
+
/**
|
|
277
|
+
* Calls the plugin's module as a caller would: a query, or a doing call, which ends as its handler ends it. An operation
|
|
278
|
+
* one of its commands implements is run as Coda runs it: its input on standard input, its exit code first, its output
|
|
279
|
+
* the result, checked as the operation defines it.
|
|
280
|
+
*/
|
|
281
|
+
call(record: Ref, operation: string, input?: Json, options?: TestCallOptions): Promise<Json>;
|
|
282
|
+
/**
|
|
283
|
+
* Asks what the module registered with `coda.self.handle(name, …)`, as `coda self` does: its answer, or its failure;
|
|
284
|
+
* `not_found` for a name not registered. Given up on with `signal`, it fails as an `AbortError`;
|
|
285
|
+
* past 30 seconds, as a `timeout`.
|
|
286
|
+
*/
|
|
287
|
+
self(name: string, input?: Json, options?: { signal?: AbortSignal }): Promise<Json>;
|
|
288
|
+
/**
|
|
289
|
+
* Hands a doing call left by an ended process to its operation's `resume`, as Coda does, with its `deadline` (epoch ms,
|
|
290
|
+
* `ctx.deadline`) or none: `canceled`, or the deadline past by the host's clock, its `ctx.signal` has gone off already
|
|
291
|
+
* (`AbortError`, `TimeoutError`); its result, or its failure; with no `resume`, an `interrupted` failure of unknown effect.
|
|
292
|
+
*/
|
|
293
|
+
resume(record: Ref, operation: string, call?: { id?: string; input?: Json; progress?: Json | null; canceled?: boolean; deadline?: number | null }): Promise<Json>;
|
|
294
|
+
/** Writes the plugin's settings again, as the backend does: `coda.settings.get` gives them, and `onChange` is told. */
|
|
295
|
+
setSettings(settings: Json): Promise<void>;
|
|
296
|
+
close(): Promise<unknown>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export function createTestHost(options?: {
|
|
300
|
+
plugin?: TestPlugin;
|
|
301
|
+
/** The plugin's settings to begin with. */
|
|
302
|
+
settings?: Json;
|
|
303
|
+
/** What the calls' deadlines go by (`Clock` of clock.mjs), for a test to move; by default the wall clock. */
|
|
304
|
+
clock?: { now(): number; at(time: number, fn: () => void): () => void; close(): void };
|
|
305
|
+
/** Answers the module's queries of records of protocols it does not implement. */
|
|
306
|
+
call?: (record: Ref, operation: string, input: Json, options: { signal: AbortSignal | null; deadline: number | null }) => Json | Promise<Json>;
|
|
307
|
+
/**
|
|
308
|
+
* Others' records the module reads: another machine's (`owner`, by default `other`; `location`, by default its owner;
|
|
309
|
+
* `plugin`, the plugin that holds it, by default the plugin under test), or, `owner` `TEST_OWNER`, another plugin's on this
|
|
310
|
+
* one (`plugin` by default `other`), which the module may not write. What the module writes is on
|
|
311
|
+
* this machine (`TEST_OWNER`). The space's 64 KiB a record is not held to here.
|
|
312
|
+
*/
|
|
313
|
+
records?: (Ref & RecordValue & { plugin?: string; owner?: string; location?: string })[];
|
|
314
|
+
}): TestHost;
|
|
315
|
+
/** This machine's backend in the test host: the `owner` and `location` of the records the module writes. */
|
|
316
|
+
export const TEST_OWNER: string;
|