@operad-io/engine 0.1.1 → 0.3.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/config.schema.json +2 -1
- package/package.json +1 -1
- package/src/config/config.ts +74 -45
- package/src/flow/types.ts +4 -0
- package/src/flow/validate.ts +5 -0
- package/src/http/index.ts +2 -0
- package/src/http/plugins.ts +68 -0
- package/src/http/server.ts +342 -48
- package/src/kernel/decide.ts +115 -30
- package/src/kernel/state.ts +9 -0
- package/src/kernel/types.ts +25 -40
- package/src/log/open-log.ts +2 -5
- package/src/log/sqlite.ts +127 -85
- package/src/log/types.ts +35 -9
- package/src/loop/code-watch.ts +108 -2
- package/src/loop/older-code.ts +3 -4
- package/src/loop/serve.ts +122 -95
- package/src/notify/notify.ts +2 -6
- package/src/platform/atomic-write.ts +163 -0
- package/src/platform/file-lock.ts +43 -21
- package/src/platform/git-program.ts +108 -0
- package/src/platform/index.ts +3 -0
- package/src/platform/kept-workers.ts +290 -0
- package/src/platform/process-group.ts +11 -3
- package/src/platform/sqlite-open.ts +20 -6
- package/src/platform/sqlite-schema.ts +30 -0
- package/src/platform/step-reap.ts +33 -18
- package/src/platform/watch.ts +1 -11
- package/src/plugin/action-schema.ts +59 -1
- package/src/plugin/choice-info.ts +133 -0
- package/src/plugin/context.ts +279 -0
- package/src/plugin/declared-flows.ts +3 -10
- package/src/plugin/errors.ts +9 -0
- package/src/plugin/freeze.ts +12 -0
- package/src/plugin/harness.ts +28 -0
- package/src/plugin/index.ts +8 -7
- package/src/plugin/install.ts +265 -17
- package/src/plugin/keys.ts +2 -12
- package/src/plugin/load.ts +47 -23
- package/src/plugin/logger.ts +14 -0
- package/src/plugin/open-store.ts +0 -6
- package/src/plugin/question-form.ts +323 -0
- package/src/plugin/registry.ts +519 -76
- package/src/plugin/secrets.ts +14 -24
- package/src/plugin/semver.ts +52 -0
- package/src/plugin/settings.ts +1 -9
- package/src/plugin/sqlite-store.ts +94 -64
- package/src/plugin/store.ts +5 -0
- package/src/plugin/types.ts +575 -21
- package/src/plugin/validate.ts +402 -26
- package/src/runner/answer.ts +26 -68
- package/src/runner/ask.ts +227 -28
- package/src/runner/cancel.ts +10 -7
- package/src/runner/grants.ts +2 -2
- package/src/runner/index.ts +1 -3
- package/src/runner/limits.ts +2 -2
- package/src/runner/runner.ts +15 -14
- package/src/runner/service.ts +52 -19
- package/src/runner/step-worker.ts +9 -0
- package/src/testing/answer.ts +69 -0
- package/src/testing/clock-manual.ts +152 -0
- package/src/testing/config.ts +16 -0
- package/src/testing/fs.ts +172 -0
- package/src/testing/home.ts +43 -0
- package/src/testing/index.ts +19 -0
- package/src/testing/types.ts +2 -0
- package/src/testing/world.ts +9 -2
- package/src/trigger/kernel.ts +13 -46
- package/src/trigger/rules.ts +22 -12
- package/src/trigger/types.ts +2 -6
- package/src/util.ts +99 -0
- package/src/views/event-line.ts +22 -0
- package/src/views/history.ts +36 -19
- package/src/views/live-logs.ts +313 -0
- package/src/views/pending.ts +23 -5
- package/src/views/presentation.ts +629 -81
- package/src/views/running.ts +5 -5
- package/src/views/settings.ts +205 -66
- package/src/views/types.ts +8 -2
- package/src/views/uploads.ts +15 -7
- package/triggers.schema.json +4 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watches the log files of active runs for growth the fact log never sees.
|
|
3
|
+
*
|
|
4
|
+
* A step writes its lines to a file under `<store>/logs/<plugin>/runs/<run>/`.
|
|
5
|
+
* That write touches no database, so the run log records no fact for it and a
|
|
6
|
+
* client that re-reads a section only on an event would not see the unfinished
|
|
7
|
+
* content grow. This watcher announces the run's object when a file in its run
|
|
8
|
+
* directory changes. It only learns that a file changed: it never reads the
|
|
9
|
+
* file and never writes.
|
|
10
|
+
*
|
|
11
|
+
* The watch is the fast path; a timer checks the files' size and time as the
|
|
12
|
+
* fallback, so a write the platform does not report still arrives. Both the
|
|
13
|
+
* watch and the timer come from the platform helpers, as the run log's own
|
|
14
|
+
* watcher does.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { readdirSync, statSync } from "node:fs";
|
|
18
|
+
import { join } from "node:path";
|
|
19
|
+
import type { LogBackend } from "../log/types.ts";
|
|
20
|
+
import { runLogDirectory } from "../plugin/logger.ts";
|
|
21
|
+
import { messageOf } from "../plugin/errors.ts";
|
|
22
|
+
import type { PluginRegistry } from "../plugin/registry.ts";
|
|
23
|
+
import type { ObjectRef, PluginStore, StoredObject } from "../plugin/types.ts";
|
|
24
|
+
import { isRecord, parseObjectId } from "../util.ts";
|
|
25
|
+
|
|
26
|
+
/** One file's fingerprint: enough to tell that it changed, never its text. */
|
|
27
|
+
type FileStamp = string;
|
|
28
|
+
|
|
29
|
+
/** The directories watched for one run, and what each file looked like last. */
|
|
30
|
+
interface WatchedRun {
|
|
31
|
+
readonly runId: string;
|
|
32
|
+
readonly object: ObjectRef;
|
|
33
|
+
readonly stops: Map<string, () => void>;
|
|
34
|
+
readonly files: Map<string, Map<string, FileStamp>>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface LiveLogWatchOptions {
|
|
38
|
+
/** The store root the plugins write their logs under. */
|
|
39
|
+
readonly storeRoot: string;
|
|
40
|
+
readonly registry: PluginRegistry;
|
|
41
|
+
readonly store: PluginStore;
|
|
42
|
+
readonly log: LogBackend;
|
|
43
|
+
/** The platform's directory watch; the owner resolves it from its options. */
|
|
44
|
+
readonly watch: (
|
|
45
|
+
directory: string,
|
|
46
|
+
onChange: (filename: string | null) => void,
|
|
47
|
+
) => () => void;
|
|
48
|
+
/** The platform's repeating timer, the fallback for a write no watch reports. */
|
|
49
|
+
readonly repeat: (ms: number, callback: () => void) => () => void;
|
|
50
|
+
readonly pollMs: number;
|
|
51
|
+
/** Announces that an object's live content grew. */
|
|
52
|
+
readonly onGrowth: (object: ObjectRef) => void;
|
|
53
|
+
readonly onLog?: ((message: string) => void) | undefined;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Whether `path` is a directory now. */
|
|
57
|
+
function isDirectory(path: string): boolean {
|
|
58
|
+
try {
|
|
59
|
+
return statSync(path).isDirectory();
|
|
60
|
+
} catch {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** The fingerprint of one file, or undefined when it is gone or unreadable. */
|
|
66
|
+
function stampOf(path: string): FileStamp | undefined {
|
|
67
|
+
try {
|
|
68
|
+
const stat = statSync(path);
|
|
69
|
+
if (!stat.isFile()) return undefined;
|
|
70
|
+
return `${stat.ino}:${stat.size}:${stat.mtimeMs}`;
|
|
71
|
+
} catch {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Every file in a run directory and its fingerprint, by name. */
|
|
77
|
+
function snapshotOf(directory: string): Map<string, FileStamp> {
|
|
78
|
+
const files = new Map<string, FileStamp>();
|
|
79
|
+
let names: string[];
|
|
80
|
+
try {
|
|
81
|
+
names = readdirSync(directory);
|
|
82
|
+
} catch {
|
|
83
|
+
return files;
|
|
84
|
+
}
|
|
85
|
+
for (const name of names) {
|
|
86
|
+
const stamp = stampOf(join(directory, name));
|
|
87
|
+
if (stamp !== undefined) files.set(name, stamp);
|
|
88
|
+
}
|
|
89
|
+
return files;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Whether two directory snapshots differ in a file's presence or fingerprint. */
|
|
93
|
+
function snapshotsDiffer(
|
|
94
|
+
before: Map<string, FileStamp>,
|
|
95
|
+
after: Map<string, FileStamp>,
|
|
96
|
+
): boolean {
|
|
97
|
+
if (before.size !== after.size) return true;
|
|
98
|
+
for (const [name, stamp] of after) {
|
|
99
|
+
if (before.get(name) !== stamp) return true;
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Watches the step logs of every active run whose object has a live section,
|
|
106
|
+
* and tells its owner when one of those logs grows. A run with no log
|
|
107
|
+
* directory yet is picked up on the next check, once the directory exists.
|
|
108
|
+
*/
|
|
109
|
+
export class LiveLogWatch {
|
|
110
|
+
private readonly options: LiveLogWatchOptions;
|
|
111
|
+
private readonly runs = new Map<string, WatchedRun>();
|
|
112
|
+
private readonly stopRepeat: () => void;
|
|
113
|
+
private syncing: Promise<void> | undefined;
|
|
114
|
+
private again = false;
|
|
115
|
+
private closed = false;
|
|
116
|
+
|
|
117
|
+
constructor(options: LiveLogWatchOptions) {
|
|
118
|
+
this.options = options;
|
|
119
|
+
this.stopRepeat = options.repeat(options.pollMs, () => this.tick());
|
|
120
|
+
void this.sync();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Re-reads the active runs and retries the directories that did not exist
|
|
125
|
+
* yet. The views call it whenever the run log says something changed; the
|
|
126
|
+
* repeating timer calls it too, so a run is found without one.
|
|
127
|
+
*/
|
|
128
|
+
sync(): Promise<void> {
|
|
129
|
+
if (this.closed) return Promise.resolve();
|
|
130
|
+
const running = this.syncing;
|
|
131
|
+
if (running !== undefined) {
|
|
132
|
+
// A change that arrives while a refresh runs is looked at once more.
|
|
133
|
+
this.again = true;
|
|
134
|
+
return running;
|
|
135
|
+
}
|
|
136
|
+
const work = this.refresh().finally(() => {
|
|
137
|
+
this.syncing = undefined;
|
|
138
|
+
if (this.again) {
|
|
139
|
+
this.again = false;
|
|
140
|
+
void this.sync();
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
this.syncing = work;
|
|
144
|
+
return work;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Stops every watch and timer this watcher opened. */
|
|
148
|
+
close(): void {
|
|
149
|
+
if (this.closed) return;
|
|
150
|
+
this.closed = true;
|
|
151
|
+
this.stopRepeat();
|
|
152
|
+
for (const runId of [...this.runs.keys()]) this.forget(runId);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
private tick(): void {
|
|
156
|
+
void this.sync().then(() => this.poll());
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Adds the active runs that are not watched and drops the ones that ended. */
|
|
160
|
+
private async refresh(): Promise<void> {
|
|
161
|
+
if (this.closed) return;
|
|
162
|
+
let active: readonly { readonly runId: string; readonly object: string }[];
|
|
163
|
+
try {
|
|
164
|
+
active = await this.options.log.runs({ active: true });
|
|
165
|
+
} catch (error) {
|
|
166
|
+
this.options.onLog?.(
|
|
167
|
+
`could not read the active runs for watching their logs: ${messageOf(error)}`,
|
|
168
|
+
);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (this.closed) return;
|
|
172
|
+
const seen = new Set<string>();
|
|
173
|
+
for (const run of active) {
|
|
174
|
+
const parsed = parseObjectId(run.object);
|
|
175
|
+
if (parsed === undefined) continue;
|
|
176
|
+
if (!(await this.hasLiveSection(parsed.type, parsed.id))) continue;
|
|
177
|
+
seen.add(run.runId);
|
|
178
|
+
if (this.runs.has(run.runId)) continue;
|
|
179
|
+
this.runs.set(run.runId, {
|
|
180
|
+
runId: run.runId,
|
|
181
|
+
object: parsed,
|
|
182
|
+
stops: new Map(),
|
|
183
|
+
files: new Map(),
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
for (const runId of [...this.runs.keys()]) {
|
|
187
|
+
if (!seen.has(runId)) this.forget(runId);
|
|
188
|
+
}
|
|
189
|
+
if (this.closed) return;
|
|
190
|
+
for (const watched of this.runs.values()) this.ensureDirectories(watched);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** Whether any of the object's sections says its content still grows. */
|
|
194
|
+
private async hasLiveSection(type: string, id: string): Promise<boolean> {
|
|
195
|
+
const views = this.options.registry.viewsFor(type)?.views;
|
|
196
|
+
if (views === undefined) return false;
|
|
197
|
+
let object: StoredObject | undefined;
|
|
198
|
+
try {
|
|
199
|
+
object = await this.options.store.get(type, id);
|
|
200
|
+
} catch {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
if (object === undefined) return false;
|
|
204
|
+
let sections: unknown;
|
|
205
|
+
try {
|
|
206
|
+
sections = views.sections(object);
|
|
207
|
+
} catch {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
if (!Array.isArray(sections)) return false;
|
|
211
|
+
return sections.some((entry) => isRecord(entry) && entry.live === true);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** Watches every loaded plugin's directory for this run that exists now. */
|
|
215
|
+
private ensureDirectories(watched: WatchedRun): void {
|
|
216
|
+
const wanted = new Set(
|
|
217
|
+
this.options.registry
|
|
218
|
+
.names()
|
|
219
|
+
.map((plugin) =>
|
|
220
|
+
runLogDirectory(this.options.storeRoot, plugin, watched.runId),
|
|
221
|
+
),
|
|
222
|
+
);
|
|
223
|
+
for (const directory of new Set([
|
|
224
|
+
...watched.stops.keys(),
|
|
225
|
+
...watched.files.keys(),
|
|
226
|
+
])) {
|
|
227
|
+
if (wanted.has(directory)) continue;
|
|
228
|
+
this.stopDirectory(watched, directory);
|
|
229
|
+
}
|
|
230
|
+
for (const directory of wanted) {
|
|
231
|
+
if (watched.stops.has(directory)) continue;
|
|
232
|
+
const before = watched.files.get(directory);
|
|
233
|
+
if (!isDirectory(directory)) {
|
|
234
|
+
// An empty baseline: the first line a directory that is not there yet
|
|
235
|
+
// receives is growth, even when it lands before the watch is opened.
|
|
236
|
+
watched.files.set(directory, new Map());
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
// The snapshot is taken before the watch opens, so a write between the
|
|
240
|
+
// two is found by the fallback check instead of entering the baseline.
|
|
241
|
+
const after = snapshotOf(directory);
|
|
242
|
+
const stop = this.options.watch(directory, (filename) =>
|
|
243
|
+
this.grew(watched, directory, filename),
|
|
244
|
+
);
|
|
245
|
+
watched.stops.set(directory, stop);
|
|
246
|
+
watched.files.set(directory, after);
|
|
247
|
+
// A directory the run start already had is not growth: that start
|
|
248
|
+
// announced the object. One that appeared later may hold lines no event
|
|
249
|
+
// has announced yet, so its first content is announced now.
|
|
250
|
+
if (before !== undefined && snapshotsDiffer(before, after)) {
|
|
251
|
+
this.options.onGrowth(watched.object);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* One directory watch fired. The file it names is remembered by its
|
|
258
|
+
* fingerprint, so the fallback check does not announce the same write again.
|
|
259
|
+
*/
|
|
260
|
+
private grew(
|
|
261
|
+
watched: WatchedRun,
|
|
262
|
+
directory: string,
|
|
263
|
+
filename: string | null,
|
|
264
|
+
): void {
|
|
265
|
+
if (this.closed) return;
|
|
266
|
+
if (this.runs.get(watched.runId) !== watched) return;
|
|
267
|
+
const files = watched.files.get(directory) ?? new Map<string, FileStamp>();
|
|
268
|
+
if (filename === null) {
|
|
269
|
+
watched.files.set(directory, snapshotOf(directory));
|
|
270
|
+
} else {
|
|
271
|
+
const path = join(directory, filename);
|
|
272
|
+
const stamp = stampOf(path);
|
|
273
|
+
if (stamp === undefined) files.delete(filename);
|
|
274
|
+
else files.set(filename, stamp);
|
|
275
|
+
watched.files.set(directory, files);
|
|
276
|
+
}
|
|
277
|
+
this.options.onGrowth(watched.object);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* The fallback check: a file whose size or time changed since the last look
|
|
282
|
+
* is growth the platform did not report.
|
|
283
|
+
*/
|
|
284
|
+
private poll(): void {
|
|
285
|
+
if (this.closed) return;
|
|
286
|
+
for (const watched of this.runs.values()) {
|
|
287
|
+
let grew = false;
|
|
288
|
+
for (const directory of watched.stops.keys()) {
|
|
289
|
+
const before = watched.files.get(directory) ?? new Map<string, FileStamp>();
|
|
290
|
+
const after = snapshotOf(directory);
|
|
291
|
+
watched.files.set(directory, after);
|
|
292
|
+
if (snapshotsDiffer(before, after)) grew = true;
|
|
293
|
+
}
|
|
294
|
+
if (grew) this.options.onGrowth(watched.object);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** Stops watching one run and forgets it. */
|
|
299
|
+
private forget(runId: string): void {
|
|
300
|
+
const watched = this.runs.get(runId);
|
|
301
|
+
if (watched === undefined) return;
|
|
302
|
+
for (const directory of [...watched.stops.keys()]) {
|
|
303
|
+
this.stopDirectory(watched, directory);
|
|
304
|
+
}
|
|
305
|
+
this.runs.delete(runId);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
private stopDirectory(watched: WatchedRun, directory: string): void {
|
|
309
|
+
watched.stops.get(directory)?.();
|
|
310
|
+
watched.stops.delete(directory);
|
|
311
|
+
watched.files.delete(directory);
|
|
312
|
+
}
|
|
313
|
+
}
|
package/src/views/pending.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/** The pending view: every run waiting for a person, with what can be done. */
|
|
2
2
|
|
|
3
3
|
import { OLDER_CODE_ITEM_ID, OLDER_CODE_PROMPT, servesOlderCode } from "../loop/older-code.ts";
|
|
4
|
+
import { runLookup } from "../loop/serve.ts";
|
|
4
5
|
import { objectLink } from "../http/link.ts";
|
|
5
6
|
import type { LogBackend, RunInfo } from "../log/types.ts";
|
|
6
7
|
import type { PluginRegistry } from "../plugin/registry.ts";
|
|
7
8
|
import type { Views, ViewRow } from "./presentation.ts";
|
|
8
|
-
import type { PendingActionView } from "../plugin/types.ts";
|
|
9
|
+
import type { ChoiceInfo, PendingActionView } from "../plugin/types.ts";
|
|
10
|
+
import type { AskQuestion } from "../plugin/types.ts";
|
|
9
11
|
import { answerableAsks, scanAsks } from "../runner/ask.ts";
|
|
10
12
|
import { parseObjectKey, readState } from "../runner/service.ts";
|
|
11
13
|
import type { RefusedStart, TriggerCandidate } from "../trigger/types.ts";
|
|
@@ -26,6 +28,13 @@ export interface PendingItem {
|
|
|
26
28
|
readonly step: string | null;
|
|
27
29
|
readonly prompt: string;
|
|
28
30
|
readonly choices: readonly string[];
|
|
31
|
+
/** What each choice is, when the question said; see `ChoiceInfo`. */
|
|
32
|
+
readonly choiceInfo?: Readonly<Record<string, ChoiceInfo>> | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The form the person fills in, when the agent asked questions. A client that
|
|
35
|
+
* does not know it shows `prompt` and `choices` as before.
|
|
36
|
+
*/
|
|
37
|
+
readonly questions?: readonly AskQuestion[] | undefined;
|
|
29
38
|
/**
|
|
30
39
|
* The question's wait id, which an answer quotes. Absent when the item asks
|
|
31
40
|
* nothing (a candidate or a standing item).
|
|
@@ -77,8 +86,12 @@ export async function listPending(
|
|
|
77
86
|
step: state.step,
|
|
78
87
|
prompt: open.prompt,
|
|
79
88
|
choices: open.choices,
|
|
89
|
+
...(open.choiceInfo === undefined
|
|
90
|
+
? {}
|
|
91
|
+
: { choiceInfo: open.choiceInfo }),
|
|
92
|
+
...(open.questions === undefined ? {} : { questions: open.questions }),
|
|
80
93
|
waitId: open.waitId,
|
|
81
|
-
actions: await actionsFor(registry,
|
|
94
|
+
actions: await actionsFor(registry, run),
|
|
82
95
|
kind: "run",
|
|
83
96
|
...objectFields(run.object),
|
|
84
97
|
});
|
|
@@ -92,13 +105,19 @@ export async function listPending(
|
|
|
92
105
|
waitObject !== undefined && (await registry.answeredAutomatically(waitObject));
|
|
93
106
|
// A wait that is about to be answered automatically is no person's to answer.
|
|
94
107
|
if (auto && options.withAuto !== true) continue;
|
|
95
|
-
const actions = await actionsFor(registry,
|
|
108
|
+
const actions = await actionsFor(registry, run);
|
|
96
109
|
items.push({
|
|
97
110
|
runId: run.runId,
|
|
98
111
|
flow: run.flow,
|
|
99
112
|
step: state.step,
|
|
100
113
|
prompt: state.wait.prompt,
|
|
101
114
|
choices: state.wait.choices,
|
|
115
|
+
...(state.wait.choiceInfo === undefined
|
|
116
|
+
? {}
|
|
117
|
+
: { choiceInfo: state.wait.choiceInfo }),
|
|
118
|
+
...(state.wait.questions === undefined
|
|
119
|
+
? {}
|
|
120
|
+
: { questions: state.wait.questions }),
|
|
102
121
|
waitId: state.wait.id,
|
|
103
122
|
actions,
|
|
104
123
|
kind: "run",
|
|
@@ -138,7 +157,7 @@ export async function listPending(
|
|
|
138
157
|
});
|
|
139
158
|
}
|
|
140
159
|
|
|
141
|
-
for (const item of await registry.standing()) {
|
|
160
|
+
for (const item of await registry.standing(runLookup(log))) {
|
|
142
161
|
items.push({
|
|
143
162
|
runId: `${item.plugin}:${item.id}`,
|
|
144
163
|
flow: item.plugin,
|
|
@@ -181,7 +200,6 @@ export async function listPending(
|
|
|
181
200
|
|
|
182
201
|
async function actionsFor(
|
|
183
202
|
registry: PluginRegistry,
|
|
184
|
-
_log: LogBackend,
|
|
185
203
|
run: RunInfo,
|
|
186
204
|
): Promise<readonly PendingActionView[]> {
|
|
187
205
|
const object = parseObjectKey(run.object);
|