@ixo/flow-work 0.3.0 → 0.4.1
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 +135 -9
- package/dist/capability.d.ts +21 -10
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/input-requests.d.ts +65 -0
- package/dist/input-requests.d.ts.map +1 -0
- package/dist/input-requests.js +397 -0
- package/dist/input-requests.js.map +1 -0
- package/dist/input.d.ts +199 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +198 -0
- package/dist/input.js.map +1 -0
- package/dist/listener.d.ts +28 -0
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +105 -4
- package/dist/listener.js.map +1 -1
- package/dist/matrix-port.d.ts +21 -3
- package/dist/matrix-port.d.ts.map +1 -1
- package/dist/matrix-port.js +47 -1
- package/dist/matrix-port.js.map +1 -1
- package/dist/protocol.d.ts +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/protocol.js.map +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { canonicalJson } from './protocol.js';
|
|
3
|
+
import { FLOW_WORK_INPUT_INDEX_EVENT, FLOW_WORK_INPUT_PROTOCOL_VERSION, FLOW_WORK_INPUT_REQUEST_EVENT, FLOW_WORK_INPUT_RESPONSE_EVENT, FLOW_WORK_INPUT_RESPONSE_REL_TYPE, flowWorkInputIndexSchema, flowWorkInputRequestSchema, parseInputRequest, parseInputResponse, responseAnswersRequest, } from './input.js';
|
|
4
|
+
export class FlowWorkInputError extends Error {
|
|
5
|
+
code;
|
|
6
|
+
constructor(code, message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.name = 'FlowWorkInputError';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function requestStateKey(sender, nodeId, requestKey) {
|
|
13
|
+
return sha256({ sender, nodeId, requestKey });
|
|
14
|
+
}
|
|
15
|
+
export function computeInputContentHash(content) {
|
|
16
|
+
return sha256(content);
|
|
17
|
+
}
|
|
18
|
+
export class InputRequestCoordinator {
|
|
19
|
+
options;
|
|
20
|
+
pending = new Set();
|
|
21
|
+
inFlight = new Map();
|
|
22
|
+
unsubscribe;
|
|
23
|
+
started = false;
|
|
24
|
+
lifecycleController = new AbortController();
|
|
25
|
+
constructor(options) {
|
|
26
|
+
this.options = options;
|
|
27
|
+
}
|
|
28
|
+
start() {
|
|
29
|
+
if (this.started)
|
|
30
|
+
return;
|
|
31
|
+
this.started = true;
|
|
32
|
+
if (this.lifecycleController.signal.aborted) {
|
|
33
|
+
this.lifecycleController = new AbortController();
|
|
34
|
+
}
|
|
35
|
+
this.unsubscribe = this.options.port.onRoomEvent((event) => {
|
|
36
|
+
for (const matcher of this.pending)
|
|
37
|
+
matcher.accept(event);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
stop() {
|
|
41
|
+
this.started = false;
|
|
42
|
+
this.lifecycleController.abort();
|
|
43
|
+
this.unsubscribe?.();
|
|
44
|
+
this.unsubscribe = undefined;
|
|
45
|
+
for (const matcher of [...this.pending])
|
|
46
|
+
matcher.abort();
|
|
47
|
+
this.pending.clear();
|
|
48
|
+
}
|
|
49
|
+
request(scope, params) {
|
|
50
|
+
const { signal: _signal, deadline: requestedDeadline, ...wireParams } = params;
|
|
51
|
+
const deadline = requestedDeadline ?? scope.bindingDeadline;
|
|
52
|
+
const parsed = flowWorkInputRequestSchema.safeParse({
|
|
53
|
+
...wireParams,
|
|
54
|
+
protocolVersion: FLOW_WORK_INPUT_PROTOCOL_VERSION,
|
|
55
|
+
invocationId: scope.invocationId,
|
|
56
|
+
deadline,
|
|
57
|
+
});
|
|
58
|
+
if (!parsed.success) {
|
|
59
|
+
throw new FlowWorkInputError('invalid_request', parsed.error.issues.map((issue) => issue.message).join('; '));
|
|
60
|
+
}
|
|
61
|
+
if (params.requestKey.includes(scope.invocationId)) {
|
|
62
|
+
this.options.logger.warn('[flow-work] requestKey embeds invocationId - this key rotates per attempt and will re-ask the human on every retry');
|
|
63
|
+
}
|
|
64
|
+
const request = parsed.data;
|
|
65
|
+
const self = this.options.port.getUserId();
|
|
66
|
+
if (!self) {
|
|
67
|
+
throw new FlowWorkInputError('send_failed', 'Cannot request input without an authenticated Matrix user id.');
|
|
68
|
+
}
|
|
69
|
+
const stateKey = requestStateKey(self, scope.nodeId, request.requestKey);
|
|
70
|
+
const contentHash = computeInputContentHash(contentForHash(request));
|
|
71
|
+
const inFlightKey = `${scope.roomId}\u0000${stateKey}\u0000${scope.inputHash}`;
|
|
72
|
+
const existing = this.inFlight.get(inFlightKey);
|
|
73
|
+
if (existing) {
|
|
74
|
+
if (existing.contentHash !== contentHash) {
|
|
75
|
+
throw new FlowWorkInputError('request_conflict', `Interactive request '${request.requestKey}' changed while awaiting a response.`);
|
|
76
|
+
}
|
|
77
|
+
return existing.promise;
|
|
78
|
+
}
|
|
79
|
+
const promise = this.run(scope, combineSignals(params.signal, this.lifecycleController.signal), request, stateKey, contentHash);
|
|
80
|
+
this.inFlight.set(inFlightKey, {
|
|
81
|
+
contentHash,
|
|
82
|
+
promise,
|
|
83
|
+
});
|
|
84
|
+
const clearInFlight = () => {
|
|
85
|
+
if (this.inFlight.get(inFlightKey)?.promise === promise) {
|
|
86
|
+
this.inFlight.delete(inFlightKey);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
void promise.then(clearInFlight, clearInFlight);
|
|
90
|
+
return promise;
|
|
91
|
+
}
|
|
92
|
+
async run(scope, signal, request, stateKey, contentHash) {
|
|
93
|
+
throwIfAborted(signal);
|
|
94
|
+
const self = this.options.port.getUserId();
|
|
95
|
+
let requestEventId;
|
|
96
|
+
let requestDeadline = request.deadline;
|
|
97
|
+
for (const event of this.options.port.stateEvents(scope.roomId, FLOW_WORK_INPUT_INDEX_EVENT)) {
|
|
98
|
+
if (event.stateKey !== stateKey || event.sender !== self)
|
|
99
|
+
continue;
|
|
100
|
+
const parsed = flowWorkInputIndexSchema.safeParse(event.content);
|
|
101
|
+
if (!parsed.success || parsed.data.inputHash !== scope.inputHash)
|
|
102
|
+
continue;
|
|
103
|
+
if (parsed.data.contentHash !== contentHash) {
|
|
104
|
+
throw new FlowWorkInputError('request_conflict', `Interactive request '${request.requestKey}' conflicts with its durable index.`);
|
|
105
|
+
}
|
|
106
|
+
requestEventId = parsed.data.requestEventId;
|
|
107
|
+
requestDeadline = parsed.data.deadline;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
if (!requestEventId) {
|
|
111
|
+
const adopted = this.adoptRecentRequest(scope.roomId, self, request.requestKey, contentHash);
|
|
112
|
+
if (adopted) {
|
|
113
|
+
requestEventId = adopted.eventId;
|
|
114
|
+
requestDeadline = adopted.request.deadline ?? requestDeadline;
|
|
115
|
+
await this.writeIndex(scope, stateKey, adopted.request, requestEventId, contentHash, requestDeadline);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (requestEventId) {
|
|
119
|
+
const historical = await this.historyWinner(scope.roomId, requestEventId, request);
|
|
120
|
+
if (historical) {
|
|
121
|
+
return outcomeFrom(historical, requestEventId, true, this.options.now());
|
|
122
|
+
}
|
|
123
|
+
if (this.options.now() >= requestDeadline) {
|
|
124
|
+
return { status: 'expired', requestEventId, deadline: requestDeadline };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (!requestEventId) {
|
|
128
|
+
if (this.options.now() >= requestDeadline) {
|
|
129
|
+
return { status: 'expired', deadline: requestDeadline };
|
|
130
|
+
}
|
|
131
|
+
const sendEnd = Math.min(requestDeadline, scope.bindingDeadline);
|
|
132
|
+
while (!requestEventId && this.options.now() < sendEnd) {
|
|
133
|
+
throwIfAborted(signal);
|
|
134
|
+
try {
|
|
135
|
+
const result = (await this.options.port.sendEvent(scope.roomId, FLOW_WORK_INPUT_REQUEST_EVENT, request));
|
|
136
|
+
requestEventId = result?.eventId;
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
this.options.logger.warn(`[flow-work] input request send failed in ${scope.roomId}: ${errorMessage(error)}`);
|
|
140
|
+
}
|
|
141
|
+
if (!requestEventId) {
|
|
142
|
+
const adopted = this.adoptRecentRequest(scope.roomId, self, request.requestKey, contentHash);
|
|
143
|
+
requestEventId = adopted?.eventId;
|
|
144
|
+
}
|
|
145
|
+
if (!requestEventId)
|
|
146
|
+
await delay(this.retryMs(), signal);
|
|
147
|
+
}
|
|
148
|
+
if (!requestEventId) {
|
|
149
|
+
throw new FlowWorkInputError('send_failed', `Could not post interactive request '${request.requestKey}'.`);
|
|
150
|
+
}
|
|
151
|
+
await this.writeIndex(scope, stateKey, request, requestEventId, contentHash, requestDeadline);
|
|
152
|
+
}
|
|
153
|
+
return this.awaitResponse(scope.roomId, requestEventId, request, requestDeadline, scope.bindingDeadline, signal);
|
|
154
|
+
}
|
|
155
|
+
adoptRecentRequest(roomId, sender, requestKey, contentHash) {
|
|
156
|
+
for (const event of this.options.port.recentEvents(roomId, 200)) {
|
|
157
|
+
if (event.type !== FLOW_WORK_INPUT_REQUEST_EVENT ||
|
|
158
|
+
event.sender !== sender ||
|
|
159
|
+
!event.eventId) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const parsed = parseInputRequest(event.content);
|
|
163
|
+
if (parsed.success &&
|
|
164
|
+
parsed.data.requestKey === requestKey &&
|
|
165
|
+
computeInputContentHash(contentForHash(parsed.data)) === contentHash) {
|
|
166
|
+
return { eventId: event.eventId, request: parsed.data };
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
async writeIndex(scope, stateKey, request, requestEventId, contentHash, deadline) {
|
|
172
|
+
const content = {
|
|
173
|
+
protocolVersion: FLOW_WORK_INPUT_PROTOCOL_VERSION,
|
|
174
|
+
requestEventId,
|
|
175
|
+
requestKey: request.requestKey,
|
|
176
|
+
invocationId: request.invocationId ?? scope.invocationId,
|
|
177
|
+
nodeId: scope.nodeId,
|
|
178
|
+
attempt: scope.attempt,
|
|
179
|
+
inputHash: scope.inputHash,
|
|
180
|
+
contentHash,
|
|
181
|
+
deadline,
|
|
182
|
+
};
|
|
183
|
+
try {
|
|
184
|
+
await this.options.port.sendStateEvent(scope.roomId, FLOW_WORK_INPUT_INDEX_EVENT, stateKey, content);
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
if (isForbidden(error)) {
|
|
188
|
+
this.options.logger.warn(`[flow-work] input_index_denied roomId=${scope.roomId}: ${errorMessage(error)}`);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
this.options.logger.warn(`[flow-work] input index write failed in ${scope.roomId}; restart dedupe is degraded: ${errorMessage(error)}`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
async historyWinner(roomId, requestEventId, request) {
|
|
196
|
+
const events = await this.options.port.relatedEvents(roomId, requestEventId, FLOW_WORK_INPUT_RESPONSE_REL_TYPE);
|
|
197
|
+
return events
|
|
198
|
+
.filter((event) => validResponse(event, request, requestEventId))
|
|
199
|
+
.sort(compareRoomEvents)[0];
|
|
200
|
+
}
|
|
201
|
+
awaitResponse(roomId, requestEventId, request, requestDeadline, bindingDeadline, signal) {
|
|
202
|
+
return new Promise((resolve, reject) => {
|
|
203
|
+
let settled = false;
|
|
204
|
+
const timers = new Set();
|
|
205
|
+
const finish = (outcome) => {
|
|
206
|
+
if (settled)
|
|
207
|
+
return;
|
|
208
|
+
settled = true;
|
|
209
|
+
cleanup();
|
|
210
|
+
resolve(outcome);
|
|
211
|
+
};
|
|
212
|
+
const fail = (error) => {
|
|
213
|
+
if (settled)
|
|
214
|
+
return;
|
|
215
|
+
settled = true;
|
|
216
|
+
cleanup();
|
|
217
|
+
reject(error);
|
|
218
|
+
};
|
|
219
|
+
const matcher = {
|
|
220
|
+
roomId,
|
|
221
|
+
requestEventId,
|
|
222
|
+
request,
|
|
223
|
+
accept: (event) => {
|
|
224
|
+
if (event.roomId !== roomId ||
|
|
225
|
+
event.type !== FLOW_WORK_INPUT_RESPONSE_EVENT) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const relation = relationEventId(event.content);
|
|
229
|
+
if (relation !== requestEventId)
|
|
230
|
+
return;
|
|
231
|
+
if (!validResponse(event, request, requestEventId)) {
|
|
232
|
+
this.options.logger.warn(`[flow-work] ignored malformed input response for ${requestEventId}`);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
finish(outcomeFrom(event, requestEventId, false, this.options.now()));
|
|
236
|
+
},
|
|
237
|
+
abort: () => fail(new FlowWorkInputError('aborted', `Interactive request '${request.requestKey}' was aborted.`)),
|
|
238
|
+
};
|
|
239
|
+
const onAbort = () => matcher.abort();
|
|
240
|
+
const cleanup = () => {
|
|
241
|
+
this.pending.delete(matcher);
|
|
242
|
+
for (const timer of timers)
|
|
243
|
+
clearTimeout(timer);
|
|
244
|
+
timers.clear();
|
|
245
|
+
signal?.removeEventListener('abort', onAbort);
|
|
246
|
+
};
|
|
247
|
+
const sweep = async (fromHistory = true) => {
|
|
248
|
+
try {
|
|
249
|
+
const winner = await this.historyWinner(roomId, requestEventId, request);
|
|
250
|
+
if (winner) {
|
|
251
|
+
finish(outcomeFrom(winner, requestEventId, fromHistory, this.options.now()));
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
this.options.logger.warn(`[flow-work] input relation sweep failed for ${requestEventId}: ${errorMessage(error)}`);
|
|
257
|
+
}
|
|
258
|
+
return false;
|
|
259
|
+
};
|
|
260
|
+
const finishAtBoundary = async () => {
|
|
261
|
+
if (settled || (await sweep()))
|
|
262
|
+
return;
|
|
263
|
+
if (requestDeadline <= bindingDeadline) {
|
|
264
|
+
finish({
|
|
265
|
+
status: 'expired',
|
|
266
|
+
requestEventId,
|
|
267
|
+
deadline: requestDeadline,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
fail(new FlowWorkInputError('await_window_closed', `Attempt window closed while awaiting '${request.requestKey}'.`));
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
const boundary = Math.min(requestDeadline, bindingDeadline);
|
|
275
|
+
const scheduleBoundary = () => {
|
|
276
|
+
const remaining = boundary - this.options.now();
|
|
277
|
+
if (remaining <= 0) {
|
|
278
|
+
void finishAtBoundary();
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const timer = setTimeout(() => {
|
|
282
|
+
timers.delete(timer);
|
|
283
|
+
scheduleBoundary();
|
|
284
|
+
}, Math.min(remaining, 2_147_483_647));
|
|
285
|
+
timer.unref?.();
|
|
286
|
+
timers.add(timer);
|
|
287
|
+
};
|
|
288
|
+
const sweepEvery = Math.max(60_000, this.retryMs());
|
|
289
|
+
const scheduleSweep = () => {
|
|
290
|
+
if (settled)
|
|
291
|
+
return;
|
|
292
|
+
const timer = setTimeout(() => {
|
|
293
|
+
timers.delete(timer);
|
|
294
|
+
void sweep().finally(scheduleSweep);
|
|
295
|
+
}, sweepEvery);
|
|
296
|
+
timer.unref?.();
|
|
297
|
+
timers.add(timer);
|
|
298
|
+
};
|
|
299
|
+
this.pending.add(matcher);
|
|
300
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
301
|
+
if (signal?.aborted) {
|
|
302
|
+
onAbort();
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
scheduleBoundary();
|
|
306
|
+
scheduleSweep();
|
|
307
|
+
void sweep();
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
retryMs() {
|
|
311
|
+
return Number.isFinite(this.options.retryMs) && this.options.retryMs >= 0
|
|
312
|
+
? this.options.retryMs
|
|
313
|
+
: 1_000;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function contentForHash(request) {
|
|
317
|
+
const { protocolVersion: _protocolVersion, invocationId: _invocationId, deadline: _deadline, ...content } = request;
|
|
318
|
+
return content;
|
|
319
|
+
}
|
|
320
|
+
function sha256(value) {
|
|
321
|
+
return `sha256:${createHash('sha256').update(canonicalJson(value)).digest('hex')}`;
|
|
322
|
+
}
|
|
323
|
+
function validResponse(event, request, requestEventId) {
|
|
324
|
+
if (!event.eventId || event.type !== FLOW_WORK_INPUT_RESPONSE_EVENT) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
const parsed = parseInputResponse(event.content);
|
|
328
|
+
return (parsed.success &&
|
|
329
|
+
responseAnswersRequest(parsed.data, request, requestEventId));
|
|
330
|
+
}
|
|
331
|
+
function outcomeFrom(event, requestEventId, fromHistory, now) {
|
|
332
|
+
const parsed = parseInputResponse(event.content);
|
|
333
|
+
if (!parsed.success || !event.eventId) {
|
|
334
|
+
throw new Error('Cannot create an input outcome from an invalid response.');
|
|
335
|
+
}
|
|
336
|
+
return {
|
|
337
|
+
status: 'answered',
|
|
338
|
+
response: parsed.data,
|
|
339
|
+
requestEventId,
|
|
340
|
+
responseEventId: event.eventId,
|
|
341
|
+
sender: event.sender ?? '',
|
|
342
|
+
respondedAtMs: event.originServerTs ?? now,
|
|
343
|
+
fromHistory,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function compareRoomEvents(left, right) {
|
|
347
|
+
const leftTs = left.originServerTs ?? Number.POSITIVE_INFINITY;
|
|
348
|
+
const rightTs = right.originServerTs ?? Number.POSITIVE_INFINITY;
|
|
349
|
+
return (leftTs - rightTs || (left.eventId ?? '').localeCompare(right.eventId ?? ''));
|
|
350
|
+
}
|
|
351
|
+
function relationEventId(content) {
|
|
352
|
+
if (!content || typeof content !== 'object' || Array.isArray(content)) {
|
|
353
|
+
return undefined;
|
|
354
|
+
}
|
|
355
|
+
const relation = content['m.relates_to'];
|
|
356
|
+
if (!relation || typeof relation !== 'object' || Array.isArray(relation)) {
|
|
357
|
+
return undefined;
|
|
358
|
+
}
|
|
359
|
+
const eventId = relation.event_id;
|
|
360
|
+
return typeof eventId === 'string' ? eventId : undefined;
|
|
361
|
+
}
|
|
362
|
+
function throwIfAborted(signal) {
|
|
363
|
+
if (signal?.aborted) {
|
|
364
|
+
throw new FlowWorkInputError('aborted', 'Interactive request was aborted.');
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
function combineSignals(caller, lifecycle) {
|
|
368
|
+
return caller ? AbortSignal.any([caller, lifecycle]) : lifecycle;
|
|
369
|
+
}
|
|
370
|
+
function delay(ms, signal) {
|
|
371
|
+
return new Promise((resolve, reject) => {
|
|
372
|
+
if (signal?.aborted) {
|
|
373
|
+
reject(new FlowWorkInputError('aborted', 'Interactive request was aborted.'));
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const onAbort = () => {
|
|
377
|
+
clearTimeout(timer);
|
|
378
|
+
reject(new FlowWorkInputError('aborted', 'Interactive request was aborted.'));
|
|
379
|
+
};
|
|
380
|
+
const timer = setTimeout(() => {
|
|
381
|
+
signal?.removeEventListener('abort', onAbort);
|
|
382
|
+
resolve();
|
|
383
|
+
}, Math.max(0, ms));
|
|
384
|
+
timer.unref?.();
|
|
385
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
function isForbidden(error) {
|
|
389
|
+
if (!error || typeof error !== 'object')
|
|
390
|
+
return false;
|
|
391
|
+
const record = error;
|
|
392
|
+
return record.errcode === 'M_FORBIDDEN' || record.code === 'M_FORBIDDEN';
|
|
393
|
+
}
|
|
394
|
+
function errorMessage(error) {
|
|
395
|
+
return error instanceof Error ? error.message : String(error);
|
|
396
|
+
}
|
|
397
|
+
//# sourceMappingURL=input-requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-requests.js","sourceRoot":"","sources":["../src/input-requests.ts"],"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gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,OAAO,MAAM,CAAC,OAAO,KAAK,aAAa,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,CAAC;AAC3E,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Interactive-input sub-protocol v1 wire constants and schemas. */
|
|
3
|
+
export declare const FLOW_WORK_INPUT_REQUEST_EVENT = "ixo.flow.work.input.request";
|
|
4
|
+
export declare const FLOW_WORK_INPUT_RESPONSE_EVENT = "ixo.flow.work.input.response";
|
|
5
|
+
export declare const FLOW_WORK_INPUT_INDEX_EVENT = "ixo.flow.work.input.index";
|
|
6
|
+
export declare const FLOW_WORK_INPUT_RESPONSE_REL_TYPE = "m.reference";
|
|
7
|
+
export declare const FLOW_WORK_INPUT_PROTOCOL_VERSION = 1;
|
|
8
|
+
export declare const FLOW_WORK_INPUT_TEMPLATES: readonly ["approval", "select", "entity-select", "entity-protocol-select", "suggestion", "text"];
|
|
9
|
+
export type FlowWorkInputTemplate = (typeof FLOW_WORK_INPUT_TEMPLATES)[number];
|
|
10
|
+
export declare const flowWorkInputTargetSchema: z.ZodObject<{
|
|
11
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
did: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type FlowWorkInputTarget = z.infer<typeof flowWorkInputTargetSchema>;
|
|
15
|
+
export declare const flowWorkSelectOptionSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
label: z.ZodString;
|
|
18
|
+
description: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export type FlowWorkSelectOption = z.infer<typeof flowWorkSelectOptionSchema>;
|
|
21
|
+
export declare const flowWorkEntityOptionSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
label: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type FlowWorkEntityOption = z.infer<typeof flowWorkEntityOptionSchema>;
|
|
26
|
+
export declare const flowWorkInputRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
template: z.ZodLiteral<"approval">;
|
|
28
|
+
approveLabel: z.ZodOptional<z.ZodString>;
|
|
29
|
+
rejectLabel: z.ZodOptional<z.ZodString>;
|
|
30
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
31
|
+
requestKey: z.ZodString;
|
|
32
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
did: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
deadline: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
title: z.ZodOptional<z.ZodString>;
|
|
39
|
+
prompt: z.ZodString;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
template: z.ZodLiteral<"select">;
|
|
42
|
+
options: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
label: z.ZodString;
|
|
45
|
+
description: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
48
|
+
requestKey: z.ZodString;
|
|
49
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
50
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
did: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
deadline: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
title: z.ZodOptional<z.ZodString>;
|
|
56
|
+
prompt: z.ZodString;
|
|
57
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
+
template: z.ZodLiteral<"entity-select">;
|
|
59
|
+
options: z.ZodArray<z.ZodObject<{
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
label: z.ZodString;
|
|
62
|
+
}, z.core.$strict>>;
|
|
63
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
64
|
+
requestKey: z.ZodString;
|
|
65
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
68
|
+
did: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
deadline: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
title: z.ZodOptional<z.ZodString>;
|
|
72
|
+
prompt: z.ZodString;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
template: z.ZodLiteral<"entity-protocol-select">;
|
|
75
|
+
entityDid: z.ZodString;
|
|
76
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
77
|
+
requestKey: z.ZodString;
|
|
78
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
79
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
did: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strict>>;
|
|
83
|
+
deadline: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
title: z.ZodOptional<z.ZodString>;
|
|
85
|
+
prompt: z.ZodString;
|
|
86
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
87
|
+
template: z.ZodLiteral<"suggestion">;
|
|
88
|
+
suggestion: z.ZodObject<{
|
|
89
|
+
kind: z.ZodString;
|
|
90
|
+
name: z.ZodString;
|
|
91
|
+
did: z.ZodString;
|
|
92
|
+
address: z.ZodOptional<z.ZodString>;
|
|
93
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
94
|
+
capability: z.ZodString;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
97
|
+
requestKey: z.ZodString;
|
|
98
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
did: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strict>>;
|
|
103
|
+
deadline: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
title: z.ZodOptional<z.ZodString>;
|
|
105
|
+
prompt: z.ZodString;
|
|
106
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
107
|
+
template: z.ZodLiteral<"text">;
|
|
108
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
109
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
112
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
114
|
+
requestKey: z.ZodString;
|
|
115
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
117
|
+
matrixUserId: z.ZodOptional<z.ZodString>;
|
|
118
|
+
did: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strict>>;
|
|
120
|
+
deadline: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
title: z.ZodOptional<z.ZodString>;
|
|
122
|
+
prompt: z.ZodString;
|
|
123
|
+
}, z.core.$strict>], "template">;
|
|
124
|
+
export type FlowWorkInputRequest = z.infer<typeof flowWorkInputRequestSchema>;
|
|
125
|
+
export declare const flowWorkInputRelatesToSchema: z.ZodObject<{
|
|
126
|
+
rel_type: z.ZodLiteral<"m.reference">;
|
|
127
|
+
event_id: z.ZodString;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
export type FlowWorkInputRelatesTo = z.infer<typeof flowWorkInputRelatesToSchema>;
|
|
130
|
+
/** Response readers intentionally strip unknown fields for version tolerance. */
|
|
131
|
+
export declare const flowWorkInputResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
|
+
template: z.ZodLiteral<"approval">;
|
|
133
|
+
approved: z.ZodBoolean;
|
|
134
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
135
|
+
requestKey: z.ZodString;
|
|
136
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
137
|
+
'm.relates_to': z.ZodObject<{
|
|
138
|
+
rel_type: z.ZodLiteral<"m.reference">;
|
|
139
|
+
event_id: z.ZodString;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
template: z.ZodLiteral<"select">;
|
|
143
|
+
optionId: z.ZodString;
|
|
144
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
145
|
+
requestKey: z.ZodString;
|
|
146
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
147
|
+
'm.relates_to': z.ZodObject<{
|
|
148
|
+
rel_type: z.ZodLiteral<"m.reference">;
|
|
149
|
+
event_id: z.ZodString;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
template: z.ZodLiteral<"entity-select">;
|
|
153
|
+
entityId: z.ZodString;
|
|
154
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
155
|
+
requestKey: z.ZodString;
|
|
156
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
157
|
+
'm.relates_to': z.ZodObject<{
|
|
158
|
+
rel_type: z.ZodLiteral<"m.reference">;
|
|
159
|
+
event_id: z.ZodString;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
template: z.ZodLiteral<"entity-protocol-select">;
|
|
163
|
+
optionId: z.ZodString;
|
|
164
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
165
|
+
requestKey: z.ZodString;
|
|
166
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
167
|
+
'm.relates_to': z.ZodObject<{
|
|
168
|
+
rel_type: z.ZodLiteral<"m.reference">;
|
|
169
|
+
event_id: z.ZodString;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
template: z.ZodLiteral<"text">;
|
|
173
|
+
text: z.ZodString;
|
|
174
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
175
|
+
requestKey: z.ZodString;
|
|
176
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
177
|
+
'm.relates_to': z.ZodObject<{
|
|
178
|
+
rel_type: z.ZodLiteral<"m.reference">;
|
|
179
|
+
event_id: z.ZodString;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
}, z.core.$strip>], "template">;
|
|
182
|
+
export type FlowWorkInputResponse = z.infer<typeof flowWorkInputResponseSchema>;
|
|
183
|
+
export declare const flowWorkInputIndexSchema: z.ZodObject<{
|
|
184
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
185
|
+
requestEventId: z.ZodString;
|
|
186
|
+
requestKey: z.ZodString;
|
|
187
|
+
invocationId: z.ZodString;
|
|
188
|
+
nodeId: z.ZodString;
|
|
189
|
+
attempt: z.ZodNumber;
|
|
190
|
+
inputHash: z.ZodString;
|
|
191
|
+
contentHash: z.ZodString;
|
|
192
|
+
deadline: z.ZodNumber;
|
|
193
|
+
}, z.core.$strict>;
|
|
194
|
+
export type FlowWorkInputIndex = z.infer<typeof flowWorkInputIndexSchema>;
|
|
195
|
+
export declare function parseInputRequest(content: unknown): z.ZodSafeParseResult<FlowWorkInputRequest>;
|
|
196
|
+
export declare function parseInputResponse(content: unknown): z.ZodSafeParseResult<FlowWorkInputResponse>;
|
|
197
|
+
export declare function inputRequestIdentity(roomId: string, sender: string, requestKey: string): string;
|
|
198
|
+
export declare function responseAnswersRequest(response: FlowWorkInputResponse, request: FlowWorkInputRequest, requestEventId: string): boolean;
|
|
199
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oEAAoE;AACpE,eAAO,MAAM,6BAA6B,gCAAgC,CAAC;AAC3E,eAAO,MAAM,8BAA8B,iCAAiC,CAAC;AAC7E,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AACvE,eAAO,MAAM,iCAAiC,gBAAgB,CAAC;AAC/D,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAalD,eAAO,MAAM,yBAAyB,kGAO5B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,eAAO,MAAM,yBAAyB;;;kBASnC,CAAC;AACJ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;kBAM5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;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