agentfootprint 18.3.0 → 19.0.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/CAPABILITIES.md +2 -0
- package/dist/core/agent/runtime/configuration/configure.js +6 -0
- package/dist/core/agent/runtime/configuration/configure.js.map +1 -1
- package/dist/core/agent/runtime/configuration/values.js.map +1 -1
- package/dist/core/agent/runtime/native/initialize.js +1 -0
- package/dist/core/agent/runtime/native/initialize.js.map +1 -1
- package/dist/esm/core/agent/runtime/configuration/configure.js +6 -0
- package/dist/esm/core/agent/runtime/configuration/configure.js.map +1 -1
- package/dist/esm/core/agent/runtime/configuration/types.d.ts +5 -1
- package/dist/esm/core/agent/runtime/configuration/values.d.ts +1 -0
- package/dist/esm/core/agent/runtime/configuration/values.js.map +1 -1
- package/dist/esm/core/agent/runtime/native/initialize.js +1 -0
- package/dist/esm/core/agent/runtime/native/initialize.js.map +1 -1
- package/dist/esm/core/agent/types/observation.d.ts +34 -1
- package/dist/esm/hosting/durability.d.ts +10 -0
- package/dist/esm/hosting/durability.js +54 -30
- package/dist/esm/hosting/durability.js.map +1 -1
- package/dist/esm/hosting/standingAgent/artifacts/accountParts.d.ts +3 -2
- package/dist/esm/hosting/standingAgent/artifacts/accountParts.js +9 -4
- package/dist/esm/hosting/standingAgent/artifacts/accountParts.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/observe.d.ts +1 -1
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/recorders/observability/FlowchartRecorder.d.ts +8 -120
- package/dist/esm/recorders/observability/FlowchartRecorder.js +16 -0
- package/dist/esm/recorders/observability/FlowchartRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.d.ts +9 -0
- package/dist/esm/recorders/observability/recordingParts/format.d.ts +87 -12
- package/dist/esm/recorders/observability/recordingParts/format.js +136 -17
- package/dist/esm/recorders/observability/recordingParts/format.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/open.d.ts +41 -7
- package/dist/esm/recorders/observability/recordingParts/open.js +32 -6
- package/dist/esm/recorders/observability/recordingParts/open.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/partReader.d.ts +25 -2
- package/dist/esm/recorders/observability/recordingParts/partReader.js +183 -15
- package/dist/esm/recorders/observability/recordingParts/partReader.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/split.d.ts +13 -0
- package/dist/esm/recorders/observability/recordingParts/split.js +135 -26
- package/dist/esm/recorders/observability/recordingParts/split.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/subflowPayloads.d.ts +124 -0
- package/dist/esm/recorders/observability/recordingParts/subflowPayloads.js +389 -0
- package/dist/esm/recorders/observability/recordingParts/subflowPayloads.js.map +1 -0
- package/dist/esm/recorders/observability/stepGraphTypes.d.ts +139 -0
- package/dist/esm/recorders/observability/stepGraphTypes.js +10 -0
- package/dist/esm/recorders/observability/stepGraphTypes.js.map +1 -0
- package/dist/hosting/durability.js +54 -30
- package/dist/hosting/durability.js.map +1 -1
- package/dist/hosting/standingAgent/artifacts/accountParts.js +9 -4
- package/dist/hosting/standingAgent/artifacts/accountParts.js.map +1 -1
- package/dist/observe.js.map +1 -1
- package/dist/recorders/observability/FlowchartRecorder.js +16 -0
- package/dist/recorders/observability/FlowchartRecorder.js.map +1 -1
- package/dist/recorders/observability/recordingParts/format.js +139 -18
- package/dist/recorders/observability/recordingParts/format.js.map +1 -1
- package/dist/recorders/observability/recordingParts/open.js +30 -4
- package/dist/recorders/observability/recordingParts/open.js.map +1 -1
- package/dist/recorders/observability/recordingParts/partReader.js +182 -14
- package/dist/recorders/observability/recordingParts/partReader.js.map +1 -1
- package/dist/recorders/observability/recordingParts/split.js +134 -25
- package/dist/recorders/observability/recordingParts/split.js.map +1 -1
- package/dist/recorders/observability/recordingParts/subflowPayloads.js +396 -0
- package/dist/recorders/observability/recordingParts/subflowPayloads.js.map +1 -0
- package/dist/recorders/observability/stepGraphTypes.js +11 -0
- package/dist/recorders/observability/stepGraphTypes.js.map +1 -0
- package/dist/types/core/agent/runtime/configuration/configure.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/configuration/types.d.ts +5 -1
- package/dist/types/core/agent/runtime/configuration/types.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/configuration/values.d.ts +1 -0
- package/dist/types/core/agent/runtime/configuration/values.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/native/initialize.d.ts.map +1 -1
- package/dist/types/core/agent/types/observation.d.ts +34 -1
- package/dist/types/core/agent/types/observation.d.ts.map +1 -1
- package/dist/types/hosting/durability.d.ts +10 -0
- package/dist/types/hosting/durability.d.ts.map +1 -1
- package/dist/types/hosting/standingAgent/artifacts/accountParts.d.ts +3 -2
- package/dist/types/hosting/standingAgent/artifacts/accountParts.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/observe.d.ts +1 -1
- package/dist/types/observe.d.ts.map +1 -1
- package/dist/types/recorders/observability/FlowchartRecorder.d.ts +8 -120
- package/dist/types/recorders/observability/FlowchartRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts +9 -0
- package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/format.d.ts +87 -12
- package/dist/types/recorders/observability/recordingParts/format.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/open.d.ts +41 -7
- package/dist/types/recorders/observability/recordingParts/open.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/partReader.d.ts +25 -2
- package/dist/types/recorders/observability/recordingParts/partReader.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/split.d.ts +13 -0
- package/dist/types/recorders/observability/recordingParts/split.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/subflowPayloads.d.ts +125 -0
- package/dist/types/recorders/observability/recordingParts/subflowPayloads.d.ts.map +1 -0
- package/dist/types/recorders/observability/stepGraphTypes.d.ts +140 -0
- package/dist/types/recorders/observability/stepGraphTypes.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -4,26 +4,29 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Role: Lens. The one place a part's bytes become values: the size cap
|
|
6
6
|
* before any store call, the source's metadata and digest checks,
|
|
7
|
-
* bounded unpacking, then the payload's own fields — its format
|
|
8
|
-
*
|
|
7
|
+
* bounded unpacking, then the payload's own fields — its format (the
|
|
8
|
+
* one the index's format names: a v2 index v2 parts, a v1 index v1
|
|
9
|
+
* parts), its run, its position and its exact key set, and in format 2
|
|
10
|
+
* its stored sub-flow payloads, exactly the ones the index places there.
|
|
9
11
|
* Reads: the part source it is handed.
|
|
10
12
|
* Emits: N/A.
|
|
11
13
|
*/
|
|
12
14
|
import { utf8Length } from '../../../lib/utf8.js';
|
|
13
15
|
import { toWireJson } from '../../../lib/wireJson.js';
|
|
14
16
|
import { PackedRecordingError, PackedRecordingTooLargeError, isPackedRecording, } from '../recordingPack.js';
|
|
15
|
-
import {
|
|
17
|
+
import { RECORDING_INDEX_FORMAT, assign, isPlainObject, ownValue, partFormatOf, } from './format.js';
|
|
16
18
|
import { unpackPart } from './packing.js';
|
|
19
|
+
import { payloadClaims, restorePayloads, resultValueFor, } from './subflowPayloads.js';
|
|
17
20
|
function unavailable(reason) {
|
|
18
21
|
return Object.freeze({ status: 'unavailable', reason });
|
|
19
22
|
}
|
|
20
23
|
/** The exact own keys of a payload object, the run's `runId` among them iff the index has one. */
|
|
21
|
-
function exactKeys(value, keys, runId) {
|
|
24
|
+
function exactKeys(value, keys, runId, format) {
|
|
22
25
|
const expected = runId === undefined ? keys : [...keys, 'runId'];
|
|
23
26
|
const own = Object.keys(value);
|
|
24
27
|
return (own.length === expected.length &&
|
|
25
28
|
expected.every((key) => own.includes(key)) &&
|
|
26
|
-
ownValue(value, 'format') ===
|
|
29
|
+
ownValue(value, 'format') === format &&
|
|
27
30
|
ownValue(value, 'runId') === runId);
|
|
28
31
|
}
|
|
29
32
|
/** The object's own keys equal `expected` exactly; returns its entries. */
|
|
@@ -37,17 +40,63 @@ function keyed(value, expected) {
|
|
|
37
40
|
}
|
|
38
41
|
/** Reads the parts of one admitted index through one source. */
|
|
39
42
|
export function partReader(index, source, caps) {
|
|
43
|
+
const v2 = index.format === RECORDING_INDEX_FORMAT;
|
|
44
|
+
const partFormat = partFormatOf(index.format);
|
|
40
45
|
const results = index.parts.map(() => new Set());
|
|
41
46
|
const aliases = index.parts.map(() => new Set());
|
|
47
|
+
/** Per part: execution key → the kinds stored there. */
|
|
48
|
+
const storedKinds = index.parts.map(() => new Map());
|
|
49
|
+
const byKey = new Map();
|
|
42
50
|
for (const invocation of index.invocations) {
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
byKey.set(invocation.key, invocation);
|
|
52
|
+
if (invocation.part === null)
|
|
53
|
+
continue;
|
|
54
|
+
results[invocation.part]?.add(invocation.key);
|
|
55
|
+
const kinds = ['entry', 'exit'].filter((kind) => invocation.payloads?.[kind] === 'stored');
|
|
56
|
+
if (kinds.length > 0)
|
|
57
|
+
storedKinds[invocation.part]?.set(invocation.key, kinds);
|
|
45
58
|
}
|
|
46
59
|
for (const { key, part } of index.unmounted)
|
|
47
60
|
results[part]?.add(key);
|
|
48
61
|
for (const alias of index.aliases)
|
|
49
62
|
if ('part' in alias)
|
|
50
63
|
aliases[alias.part]?.add(alias.name);
|
|
64
|
+
/** Every invocation with a part, to its `subflowId`: the owners the payload rule is run with. */
|
|
65
|
+
const owners = new Map();
|
|
66
|
+
for (const invocation of index.invocations) {
|
|
67
|
+
if (invocation.part !== null)
|
|
68
|
+
owners.set(invocation.key, invocation.subflowId);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A restored value's plain JSON bytes, measured: the index's figure is only a
|
|
72
|
+
* claim. `undefined` when the value is too deep for this runtime's stack to
|
|
73
|
+
* write: a resource bound of this reader (`too-large`), as when unpacking.
|
|
74
|
+
*/
|
|
75
|
+
const plainBytesOf = (value) => {
|
|
76
|
+
try {
|
|
77
|
+
return utf8Length(toWireJson(value));
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
if (err instanceof RangeError)
|
|
81
|
+
return undefined;
|
|
82
|
+
throw err;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
/** The stored payloads member of a v2 part: exactly the keys and kinds the index places there. */
|
|
86
|
+
function storedPayloads(value, expected) {
|
|
87
|
+
const held = keyed(value, new Set(expected.keys()));
|
|
88
|
+
if (held === undefined)
|
|
89
|
+
return undefined;
|
|
90
|
+
const out = new Map();
|
|
91
|
+
for (const [key, member] of held) {
|
|
92
|
+
const kinds = expected.get(key);
|
|
93
|
+
const values = keyed(member, new Set(kinds));
|
|
94
|
+
if (values === undefined)
|
|
95
|
+
return undefined;
|
|
96
|
+
out.set(key, Object.fromEntries(values));
|
|
97
|
+
}
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
51
100
|
/**
|
|
52
101
|
* Cap, fetch, parse, unpack: a payload object, or why there is none. `limit`
|
|
53
102
|
* bounds the stored bytes before any store call and the PLAIN bytes a packed
|
|
@@ -103,7 +152,7 @@ export function partReader(index, source, caps) {
|
|
|
103
152
|
if (!('payload' in loaded))
|
|
104
153
|
return loaded;
|
|
105
154
|
const { payload } = loaded;
|
|
106
|
-
if (!exactKeys(payload, ['format', 'part', 'recording'], index.runId)) {
|
|
155
|
+
if (!exactKeys(payload, ['format', 'part', 'recording'], index.runId, partFormat)) {
|
|
107
156
|
return unavailable('part-changed');
|
|
108
157
|
}
|
|
109
158
|
const recording = ownValue(payload, 'recording');
|
|
@@ -129,15 +178,64 @@ export function partReader(index, source, caps) {
|
|
|
129
178
|
if (!('payload' in loaded))
|
|
130
179
|
return loaded;
|
|
131
180
|
const { payload } = loaded;
|
|
132
|
-
|
|
133
|
-
|
|
181
|
+
const keys = v2
|
|
182
|
+
? ['format', 'part', 'results', 'aliases', 'payloads']
|
|
183
|
+
: ['format', 'part', 'results', 'aliases'];
|
|
184
|
+
if (!exactKeys(payload, keys, index.runId, partFormat) || ownValue(payload, 'part') !== part) {
|
|
134
185
|
return unavailable('part-changed');
|
|
135
186
|
}
|
|
136
187
|
const held = keyed(ownValue(payload, 'results'), results[part]);
|
|
137
188
|
const named = keyed(ownValue(payload, 'aliases'), aliases[part]);
|
|
138
|
-
|
|
189
|
+
const stored = v2
|
|
190
|
+
? storedPayloads(ownValue(payload, 'payloads'), storedKinds[part])
|
|
191
|
+
: new Map();
|
|
192
|
+
if (held === undefined || named === undefined || stored === undefined) {
|
|
193
|
+
return unavailable('part-changed');
|
|
194
|
+
}
|
|
195
|
+
return { results: held, aliases: named, payloads: stored, plainBytes: loaded.plainBytes };
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* One invocation's moved payloads, served from the part that holds its
|
|
199
|
+
* result: `undefined` when none of its payloads moved (format 1 always). A
|
|
200
|
+
* `'same'` value is the result's own object, shared. Its bytes are measured
|
|
201
|
+
* and must equal the index's `restoredBytes` for the invocation; otherwise
|
|
202
|
+
* the part does not match its index (`part-changed`).
|
|
203
|
+
*/
|
|
204
|
+
function payloadsOf(key, contents) {
|
|
205
|
+
const invocation = byKey.get(key);
|
|
206
|
+
const places = invocation?.payloads;
|
|
207
|
+
if (places === undefined)
|
|
208
|
+
return undefined;
|
|
209
|
+
let measured = 0;
|
|
210
|
+
let tooDeep = false;
|
|
211
|
+
const slot = (kind) => {
|
|
212
|
+
const at = places[kind];
|
|
213
|
+
if (at === undefined)
|
|
214
|
+
return undefined;
|
|
215
|
+
const value = at === 'same'
|
|
216
|
+
? resultValueFor(contents.results.get(key), kind)
|
|
217
|
+
: contents.payloads.get(key)?.[kind];
|
|
218
|
+
if (at === 'same' && value !== undefined) {
|
|
219
|
+
const bytes = plainBytesOf(value);
|
|
220
|
+
if (bytes === undefined)
|
|
221
|
+
tooDeep = true;
|
|
222
|
+
else
|
|
223
|
+
measured += bytes;
|
|
224
|
+
}
|
|
225
|
+
return value === undefined
|
|
226
|
+
? Object.freeze({ status: 'unavailable', reason: 'part-changed' })
|
|
227
|
+
: Object.freeze({ status: 'ready', value });
|
|
228
|
+
};
|
|
229
|
+
const entry = slot('entry');
|
|
230
|
+
const exit = slot('exit');
|
|
231
|
+
if (tooDeep)
|
|
232
|
+
return unavailable('too-large');
|
|
233
|
+
if (measured !== (invocation?.restoredBytes ?? 0))
|
|
139
234
|
return unavailable('part-changed');
|
|
140
|
-
return {
|
|
235
|
+
return Object.freeze({
|
|
236
|
+
...(entry !== undefined && { entry }),
|
|
237
|
+
...(exit !== undefined && { exit }),
|
|
238
|
+
});
|
|
141
239
|
}
|
|
142
240
|
/**
|
|
143
241
|
* Every part, in order; the first one that is unavailable makes the whole
|
|
@@ -146,12 +244,20 @@ export function partReader(index, source, caps) {
|
|
|
146
244
|
* the rest of the budget is refused before it expands.
|
|
147
245
|
*/
|
|
148
246
|
async function whole(signal, maxBytes) {
|
|
149
|
-
|
|
247
|
+
// The payloads restored from results are bytes of the whole that no part's
|
|
248
|
+
// text counts. The index's figure for them is a CLAIM: it is reserved here,
|
|
249
|
+
// provisionally (so an honest index is refused before any part is read),
|
|
250
|
+
// and released below, where every restored value is measured and charged.
|
|
251
|
+
const claimed = index.subflowPayloads?.restoredBytes ?? 0;
|
|
252
|
+
let remaining = maxBytes - claimed;
|
|
253
|
+
if (remaining < 0)
|
|
254
|
+
return unavailable('too-large');
|
|
150
255
|
const root = await base(signal, remaining);
|
|
151
256
|
if ('reason' in root)
|
|
152
257
|
return root;
|
|
153
258
|
remaining -= root.plainBytes;
|
|
154
259
|
const found = {};
|
|
260
|
+
const stored = new Map();
|
|
155
261
|
for (let at = 0; at < index.parts.length; at++) {
|
|
156
262
|
const contents = await invocations(at, signal, remaining);
|
|
157
263
|
if ('reason' in contents)
|
|
@@ -161,12 +267,74 @@ export function partReader(index, source, caps) {
|
|
|
161
267
|
assign(found, key, value);
|
|
162
268
|
for (const [name, value] of contents.aliases)
|
|
163
269
|
assign(found, name, value);
|
|
270
|
+
for (const [key, value] of contents.payloads)
|
|
271
|
+
stored.set(key, value);
|
|
272
|
+
}
|
|
273
|
+
const recording = root.recording;
|
|
274
|
+
const counts = index.subflowPayloads;
|
|
275
|
+
if (counts !== undefined) {
|
|
276
|
+
remaining += claimed;
|
|
277
|
+
const measured = new Map();
|
|
278
|
+
let over = false;
|
|
279
|
+
const restored = restorePayloads(recording, (key, kind) => {
|
|
280
|
+
const at = byKey.get(key)?.payloads?.[kind];
|
|
281
|
+
const value = at === 'same'
|
|
282
|
+
? resultValueFor(ownValue(found, key), kind)
|
|
283
|
+
: at === 'stored'
|
|
284
|
+
? stored.get(key)?.[kind]
|
|
285
|
+
: undefined;
|
|
286
|
+
if (value === undefined)
|
|
287
|
+
return undefined;
|
|
288
|
+
if (at === 'same') {
|
|
289
|
+
// Charged as it is restored; refused the moment the budget is spent.
|
|
290
|
+
const bytes = plainBytesOf(value);
|
|
291
|
+
if (bytes === undefined) {
|
|
292
|
+
over = true;
|
|
293
|
+
return undefined;
|
|
294
|
+
}
|
|
295
|
+
measured.set(key, (measured.get(key) ?? 0) + bytes);
|
|
296
|
+
remaining -= bytes;
|
|
297
|
+
if (remaining < 0) {
|
|
298
|
+
over = true;
|
|
299
|
+
return undefined;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return { value };
|
|
303
|
+
}, counts.same + counts.stored, counts.rows);
|
|
304
|
+
if (over)
|
|
305
|
+
return unavailable('too-large');
|
|
306
|
+
if (!restored)
|
|
307
|
+
return unavailable('part-changed');
|
|
308
|
+
// Every figure the index states, against what was measured and restored:
|
|
309
|
+
// each invocation's restored bytes (their sum is the total, admitted), and
|
|
310
|
+
// the payload rule run again over the restored rows, which must move
|
|
311
|
+
// exactly the payloads the index places and keep the rest for the
|
|
312
|
+
// reasons it counts.
|
|
313
|
+
for (const invocation of index.invocations) {
|
|
314
|
+
if ((invocation.restoredBytes ?? 0) !== (measured.get(invocation.key) ?? 0)) {
|
|
315
|
+
return unavailable('part-changed');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const claims = payloadClaims(ownValue(recording, 'snapshot'), owners);
|
|
319
|
+
const placed = new Set();
|
|
320
|
+
for (const invocation of index.invocations) {
|
|
321
|
+
for (const kind of ['entry', 'exit']) {
|
|
322
|
+
if (invocation.payloads?.[kind] !== undefined)
|
|
323
|
+
placed.add(`${kind}:${invocation.key}`);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (claims.kept.ambiguous !== counts.kept.ambiguous ||
|
|
327
|
+
claims.kept.notLast !== counts.kept.notLast ||
|
|
328
|
+
claims.kept.noPart !== counts.kept.noPart ||
|
|
329
|
+
claims.moved.size !== placed.size ||
|
|
330
|
+
[...claims.moved].some((slot) => !placed.has(slot))) {
|
|
331
|
+
return unavailable('part-changed');
|
|
332
|
+
}
|
|
164
333
|
}
|
|
165
334
|
for (const alias of index.aliases) {
|
|
166
335
|
if ('key' in alias)
|
|
167
336
|
assign(found, alias.name, ownValue(found, alias.key));
|
|
168
337
|
}
|
|
169
|
-
const recording = root.recording;
|
|
170
338
|
const snapshot = ownValue(recording, 'snapshot');
|
|
171
339
|
if (index.hasSubflowResults && isPlainObject(snapshot)) {
|
|
172
340
|
assign(snapshot, 'subflowResults', found);
|
|
@@ -183,6 +351,6 @@ export function partReader(index, source, caps) {
|
|
|
183
351
|
}
|
|
184
352
|
return Object.freeze({ status: 'ready' });
|
|
185
353
|
}
|
|
186
|
-
return { base, invocations, whole, check };
|
|
354
|
+
return { base, invocations, payloadsOf, whole, check };
|
|
187
355
|
}
|
|
188
356
|
//# sourceMappingURL=partReader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partReader.js","sourceRoot":"","sources":["../../../../../src/recorders/observability/recordingParts/partReader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD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,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC7C,CAAC"}
|
|
1
|
+
{"version":3,"file":"partReader.js","sourceRoot":"","sources":["../../../../../src/recorders/observability/recordingParts/partReader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,MAAM,EACN,aAAa,EACb,QAAQ,EACR,YAAY,GAIb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,eAAe,EACf,cAAc,GAEf,MAAM,sBAAsB,CAAC;AAW9B,SAAS,WAAW,CAAC,MAA6B;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;AAC1D,CAAC;AAkCD,kGAAkG;AAClG,SAAS,SAAS,CAChB,KAA8B,EAC9B,IAAuB,EACvB,KAAc,EACd,MAAc;IAEd,MAAM,QAAQ,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,OAAO,CACL,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QAC9B,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC1C,QAAQ,CAAC,KAAK,EAAE,QAAQ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AAC;gBACzB,OAAO,WAAW,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
* • A path alias whose JSON text equals one stored result's text is stored
|
|
21
21
|
* only as `{ name, key }`: byte equality is the proof, so nothing the
|
|
22
22
|
* whole recording held is lost.
|
|
23
|
+
* • Format 2 (what the writer writes): a sub-flow invocation's entry and
|
|
24
|
+
* exit payloads leave the base row for the invocation's part, on proof
|
|
25
|
+
* only (`subflowPayloads.ts`). A stored payload is grouped WITH its result: the
|
|
26
|
+
* two are one unit for the target, never split across parts. A reader
|
|
27
|
+
* of a whole recording cuts format 1 (`subflowPayloads: 'in-row'`), so
|
|
28
|
+
* every read of a whole recording is what it was before format 2.
|
|
23
29
|
*
|
|
24
30
|
* ── Determinism ─────────────────────────────────────────────────────────────
|
|
25
31
|
* Every part's text is a function of the recording, the run id and `packed`
|
|
@@ -50,6 +56,13 @@ export interface SplitRecordingOptions {
|
|
|
50
56
|
readonly packed?: boolean;
|
|
51
57
|
/** The part size target. Default {@link RECORDING_PART_TARGET_BYTES}. */
|
|
52
58
|
readonly targetBytes?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Where sub-flow boundary payloads go. `'with-invocation'` (the default, and
|
|
61
|
+
* all the writer writes) cuts format 2; `'in-row'` cuts format 1, every
|
|
62
|
+
* payload in the base row: what a reader of a WHOLE recording uses, so its
|
|
63
|
+
* reads stay what they were.
|
|
64
|
+
*/
|
|
65
|
+
readonly subflowPayloads?: 'with-invocation' | 'in-row';
|
|
53
66
|
}
|
|
54
67
|
/**
|
|
55
68
|
* Cut a live recording (`recordRun` · `toRecording()`), through the wire rule
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
* • A path alias whose JSON text equals one stored result's text is stored
|
|
21
21
|
* only as `{ name, key }`: byte equality is the proof, so nothing the
|
|
22
22
|
* whole recording held is lost.
|
|
23
|
+
* • Format 2 (what the writer writes): a sub-flow invocation's entry and
|
|
24
|
+
* exit payloads leave the base row for the invocation's part, on proof
|
|
25
|
+
* only (`subflowPayloads.ts`). A stored payload is grouped WITH its result: the
|
|
26
|
+
* two are one unit for the target, never split across parts. A reader
|
|
27
|
+
* of a whole recording cuts format 1 (`subflowPayloads: 'in-row'`), so
|
|
28
|
+
* every read of a whole recording is what it was before format 2.
|
|
23
29
|
*
|
|
24
30
|
* ── Determinism ─────────────────────────────────────────────────────────────
|
|
25
31
|
* Every part's text is a function of the recording, the run id and `packed`
|
|
@@ -30,10 +36,30 @@
|
|
|
30
36
|
import { computeArtifactDigest } from '../../../artifacts/payload.js';
|
|
31
37
|
import { utf8Length } from '../../../lib/utf8.js';
|
|
32
38
|
import { toWireJson } from '../../../lib/wireJson.js';
|
|
33
|
-
import { RECORDING_INDEX_FORMAT,
|
|
39
|
+
import { RECORDING_INDEX_FORMAT, RECORDING_INDEX_FORMAT_V1, RECORDING_PARTS_LIMITS, RECORDING_PART_TARGET_BYTES, assign, isName, isPlainObject, ownValue, partFormatOf, } from './format.js';
|
|
34
40
|
import { walkRecordedInvocations } from './invocations.js';
|
|
35
41
|
import { packPart } from './packing.js';
|
|
42
|
+
import { cutPayloads } from './subflowPayloads.js';
|
|
36
43
|
import { RecordingSplitError } from './splitError.js';
|
|
44
|
+
/** The stored (not `'same'`) payloads of one invocation, as JSON text. */
|
|
45
|
+
function storedOf(moved) {
|
|
46
|
+
if (moved === undefined)
|
|
47
|
+
return undefined;
|
|
48
|
+
const entry = moved.entry?.place === 'stored' ? moved.entry.text : undefined;
|
|
49
|
+
const exit = moved.exit?.place === 'stored' ? moved.exit.text : undefined;
|
|
50
|
+
if (entry === undefined && exit === undefined)
|
|
51
|
+
return undefined;
|
|
52
|
+
return { ...(entry !== undefined && { entry }), ...(exit !== undefined && { exit }) };
|
|
53
|
+
}
|
|
54
|
+
/** The JSON text of one invocation's stored payloads member: `{"entry":…,"exit":…}`. */
|
|
55
|
+
function storedText(stored) {
|
|
56
|
+
const members = [];
|
|
57
|
+
if (stored.entry !== undefined)
|
|
58
|
+
members.push(`"entry":${stored.entry}`);
|
|
59
|
+
if (stored.exit !== undefined)
|
|
60
|
+
members.push(`"exit":${stored.exit}`);
|
|
61
|
+
return `{${members.join(',')}}`;
|
|
62
|
+
}
|
|
37
63
|
/** A placeholder ref of the minted length, to measure an index before refs exist. */
|
|
38
64
|
const PLACEHOLDER_REF = `art_${'0'.repeat(22)}`;
|
|
39
65
|
/**
|
|
@@ -78,14 +104,20 @@ export async function splitRecordingData(data, options = {}) {
|
|
|
78
104
|
}
|
|
79
105
|
const snapshot = ownValue(data, 'snapshot');
|
|
80
106
|
const walk = walkRecordedInvocations(snapshot);
|
|
81
|
-
const
|
|
107
|
+
const v2 = options.subflowPayloads !== 'in-row';
|
|
108
|
+
const format = v2 ? RECORDING_INDEX_FORMAT : RECORDING_INDEX_FORMAT_V1;
|
|
109
|
+
const partFormat = partFormatOf(format);
|
|
110
|
+
const cut = v2 ? cutPayloads(snapshot, walk.invocations) : undefined;
|
|
111
|
+
const entry = (slot, key, value, stored) => {
|
|
82
112
|
const text = serialize(() => toWireJson(value));
|
|
83
|
-
return { slot, key, value, text, bytes: utf8Length(text) };
|
|
113
|
+
return { slot, key, value, text, bytes: utf8Length(text), ...(stored && { stored }) };
|
|
84
114
|
};
|
|
85
115
|
const results = [];
|
|
86
116
|
for (const invocation of walk.invocations) {
|
|
87
|
-
if ('result' in invocation)
|
|
88
|
-
|
|
117
|
+
if ('result' in invocation) {
|
|
118
|
+
const stored = storedOf(cut?.moved.get(invocation.key));
|
|
119
|
+
results.push(entry('results', invocation.key, invocation.result, stored));
|
|
120
|
+
}
|
|
89
121
|
}
|
|
90
122
|
for (const { key, result } of walk.unmounted)
|
|
91
123
|
results.push(entry('results', key, result));
|
|
@@ -108,7 +140,11 @@ export async function splitRecordingData(data, options = {}) {
|
|
|
108
140
|
let current = [];
|
|
109
141
|
let size = 0;
|
|
110
142
|
for (const item of stored) {
|
|
111
|
-
|
|
143
|
+
// A result and its stored payloads are one unit: they share a part.
|
|
144
|
+
const beside = item.stored === undefined
|
|
145
|
+
? 0
|
|
146
|
+
: utf8Length(toWireJson(item.key)) + utf8Length(storedText(item.stored)) + 2;
|
|
147
|
+
const cost = utf8Length(toWireJson(item.key)) + item.bytes + 2 + beside;
|
|
112
148
|
if (current.length > 0 && size + cost > target) {
|
|
113
149
|
groups.push(current);
|
|
114
150
|
current = [];
|
|
@@ -135,11 +171,12 @@ export async function splitRecordingData(data, options = {}) {
|
|
|
135
171
|
aliasPart.set(item.key, at);
|
|
136
172
|
});
|
|
137
173
|
const resultBytes = new Map(results.map((item) => [item.key, item.bytes]));
|
|
138
|
-
const head = (part) => `{"format":${toWireJson(
|
|
174
|
+
const head = (part) => `{"format":${toWireJson(partFormat)}` +
|
|
139
175
|
(runId !== undefined ? `,"runId":${toWireJson(runId)}` : '') +
|
|
140
176
|
`,"part":${toWireJson(part)}`;
|
|
141
177
|
const partTexts = groups.map((group, at) => {
|
|
142
178
|
const slot = (name) => group.filter((item) => item.slot === name);
|
|
179
|
+
const withStored = group.filter((item) => item.stored !== undefined);
|
|
143
180
|
if (packed) {
|
|
144
181
|
const fold = (items) => {
|
|
145
182
|
const out = {};
|
|
@@ -147,22 +184,39 @@ export async function splitRecordingData(data, options = {}) {
|
|
|
147
184
|
assign(out, item.key, item.value);
|
|
148
185
|
return out;
|
|
149
186
|
};
|
|
187
|
+
const storedFold = () => {
|
|
188
|
+
const out = {};
|
|
189
|
+
for (const item of withStored) {
|
|
190
|
+
const moved = cut?.moved.get(item.key);
|
|
191
|
+
const member = {};
|
|
192
|
+
if (moved?.entry?.place === 'stored')
|
|
193
|
+
assign(member, 'entry', moved.entry.value);
|
|
194
|
+
if (moved?.exit?.place === 'stored')
|
|
195
|
+
assign(member, 'exit', moved.exit.value);
|
|
196
|
+
assign(out, item.key, member);
|
|
197
|
+
}
|
|
198
|
+
return out;
|
|
199
|
+
};
|
|
150
200
|
return serialize(() => toWireJson(packPart({
|
|
151
|
-
format:
|
|
201
|
+
format: partFormat,
|
|
152
202
|
...(runId !== undefined && { runId }),
|
|
153
203
|
part: at,
|
|
154
204
|
results: fold(slot('results')),
|
|
155
205
|
aliases: fold(slot('aliases')),
|
|
206
|
+
...(v2 && { payloads: storedFold() }),
|
|
156
207
|
})));
|
|
157
208
|
}
|
|
158
209
|
const members = (items) => items.map((item) => `${toWireJson(item.key)}:${item.text}`).join(',');
|
|
159
|
-
|
|
210
|
+
const payloads = withStored
|
|
211
|
+
.map((item) => item.stored === undefined ? '' : `${toWireJson(item.key)}:${storedText(item.stored)}`)
|
|
212
|
+
.join(',');
|
|
213
|
+
return (`${head(at)},"results":{${members(slot('results'))}},"aliases":{${members(slot('aliases'))}}` + (v2 ? `,"payloads":{${payloads}}}` : '}'));
|
|
160
214
|
});
|
|
161
215
|
const basePayload = {
|
|
162
|
-
format:
|
|
216
|
+
format: partFormat,
|
|
163
217
|
...(runId !== undefined && { runId }),
|
|
164
218
|
part: 'base',
|
|
165
|
-
recording: withoutResults(data, snapshot),
|
|
219
|
+
recording: withoutResults(data, snapshot, cut?.recorders),
|
|
166
220
|
};
|
|
167
221
|
const baseText = serialize(() => toWireJson(packed ? packPart(basePayload) : basePayload));
|
|
168
222
|
const withDigest = async (text) => ({
|
|
@@ -176,15 +230,32 @@ export async function splitRecordingData(data, options = {}) {
|
|
|
176
230
|
parts.push(await withDigest(text));
|
|
177
231
|
const invocations = walk.invocations.map((invocation) => {
|
|
178
232
|
const part = partOf.get(invocation.key);
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
: {
|
|
233
|
+
if (part === undefined) {
|
|
234
|
+
return {
|
|
182
235
|
key: invocation.key,
|
|
183
236
|
path: invocation.path,
|
|
184
237
|
subflowId: invocation.subflowId,
|
|
185
|
-
part,
|
|
186
|
-
bytes: resultBytes.get(invocation.key),
|
|
238
|
+
part: null,
|
|
187
239
|
};
|
|
240
|
+
}
|
|
241
|
+
const moved = cut?.moved.get(invocation.key);
|
|
242
|
+
const places = moved === undefined
|
|
243
|
+
? undefined
|
|
244
|
+
: {
|
|
245
|
+
...(moved.entry !== undefined && { entry: moved.entry.place }),
|
|
246
|
+
...(moved.exit !== undefined && { exit: moved.exit.place }),
|
|
247
|
+
};
|
|
248
|
+
const restored = [moved?.entry, moved?.exit].reduce((sum, one) => (one?.place === 'same' ? sum + one.bytes : sum), 0);
|
|
249
|
+
const hasSame = moved?.entry?.place === 'same' || moved?.exit?.place === 'same';
|
|
250
|
+
return {
|
|
251
|
+
key: invocation.key,
|
|
252
|
+
path: invocation.path,
|
|
253
|
+
subflowId: invocation.subflowId,
|
|
254
|
+
part,
|
|
255
|
+
bytes: resultBytes.get(invocation.key),
|
|
256
|
+
...(places !== undefined && { payloads: places }),
|
|
257
|
+
...(hasSame && { restoredBytes: restored }),
|
|
258
|
+
};
|
|
188
259
|
});
|
|
189
260
|
const unmounted = walk.unmounted.map(({ key }) => ({
|
|
190
261
|
key,
|
|
@@ -195,20 +266,27 @@ export async function splitRecordingData(data, options = {}) {
|
|
|
195
266
|
return key !== undefined ? { name, key } : { name, part: aliasPart.get(name) };
|
|
196
267
|
});
|
|
197
268
|
const draft = {
|
|
269
|
+
format,
|
|
198
270
|
...(runId !== undefined && { runId }),
|
|
199
271
|
...(walk.snapshotRunId !== undefined && { snapshotRunId: walk.snapshotRunId }),
|
|
200
272
|
packed,
|
|
201
273
|
complete: walk.complete,
|
|
202
274
|
hasSubflowResults: walk.hasSubflowResults,
|
|
203
275
|
base: { bytes: base.bytes, digest: base.digest },
|
|
204
|
-
parts: parts.map((part, at) =>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
276
|
+
parts: parts.map((part, at) => {
|
|
277
|
+
const group = groups[at];
|
|
278
|
+
const results = group.filter((item) => item.slot === 'results').length;
|
|
279
|
+
if (!v2)
|
|
280
|
+
return { bytes: part.bytes, digest: part.digest, results };
|
|
281
|
+
const payloads = group.reduce((sum, item) => sum +
|
|
282
|
+
(item.stored?.entry !== undefined ? 1 : 0) +
|
|
283
|
+
(item.stored?.exit !== undefined ? 1 : 0), 0);
|
|
284
|
+
return { bytes: part.bytes, digest: part.digest, results, payloads };
|
|
285
|
+
}),
|
|
209
286
|
invocations,
|
|
210
287
|
aliases,
|
|
211
288
|
unmounted,
|
|
289
|
+
...(cut !== undefined && { subflowPayloads: cut.counts }),
|
|
212
290
|
};
|
|
213
291
|
const measured = recordingIndexText(draft, {
|
|
214
292
|
base: PLACEHOLDER_REF,
|
|
@@ -228,7 +306,7 @@ export function recordingIndexText(draft, refs) {
|
|
|
228
306
|
throw new TypeError('recordingIndexText: one ref per part is required.');
|
|
229
307
|
}
|
|
230
308
|
const index = {
|
|
231
|
-
format:
|
|
309
|
+
format: draft.format,
|
|
232
310
|
...(draft.runId !== undefined && { runId: draft.runId }),
|
|
233
311
|
...(draft.snapshotRunId !== undefined && { snapshotRunId: draft.snapshotRunId }),
|
|
234
312
|
packed: draft.packed,
|
|
@@ -240,6 +318,7 @@ export function recordingIndexText(draft, refs) {
|
|
|
240
318
|
bytes: part.bytes,
|
|
241
319
|
digest: part.digest,
|
|
242
320
|
results: part.results,
|
|
321
|
+
...(part.payloads !== undefined && { payloads: part.payloads }),
|
|
243
322
|
})),
|
|
244
323
|
invocations: draft.invocations.map((invocation) => invocation.part === null
|
|
245
324
|
? {
|
|
@@ -254,24 +333,54 @@ export function recordingIndexText(draft, refs) {
|
|
|
254
333
|
subflowId: invocation.subflowId,
|
|
255
334
|
part: invocation.part,
|
|
256
335
|
bytes: invocation.bytes,
|
|
336
|
+
...(invocation.payloads !== undefined && {
|
|
337
|
+
payloads: {
|
|
338
|
+
...(invocation.payloads.entry !== undefined && {
|
|
339
|
+
entry: invocation.payloads.entry,
|
|
340
|
+
}),
|
|
341
|
+
...(invocation.payloads.exit !== undefined && { exit: invocation.payloads.exit }),
|
|
342
|
+
},
|
|
343
|
+
}),
|
|
344
|
+
...(invocation.restoredBytes !== undefined && {
|
|
345
|
+
restoredBytes: invocation.restoredBytes,
|
|
346
|
+
}),
|
|
257
347
|
}),
|
|
258
348
|
aliases: draft.aliases.map((alias) => 'key' in alias
|
|
259
349
|
? { name: alias.name, key: alias.key }
|
|
260
350
|
: { name: alias.name, part: alias.part }),
|
|
261
351
|
unmounted: draft.unmounted.map(({ key, part }) => ({ key, part })),
|
|
352
|
+
...(draft.subflowPayloads !== undefined && {
|
|
353
|
+
subflowPayloads: {
|
|
354
|
+
same: draft.subflowPayloads.same,
|
|
355
|
+
stored: draft.subflowPayloads.stored,
|
|
356
|
+
restoredBytes: draft.subflowPayloads.restoredBytes,
|
|
357
|
+
rows: [...draft.subflowPayloads.rows],
|
|
358
|
+
kept: {
|
|
359
|
+
ambiguous: draft.subflowPayloads.kept.ambiguous,
|
|
360
|
+
notLast: draft.subflowPayloads.kept.notLast,
|
|
361
|
+
noPart: draft.subflowPayloads.kept.noPart,
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
}),
|
|
262
365
|
};
|
|
263
366
|
return toWireJson(index);
|
|
264
367
|
}
|
|
265
|
-
/**
|
|
266
|
-
|
|
368
|
+
/**
|
|
369
|
+
* The recording with the snapshot's `subflowResults` key removed and, when
|
|
370
|
+
* payloads moved, `recorders` replaced by the cut's marked rows; every other
|
|
371
|
+
* key in place.
|
|
372
|
+
*/
|
|
373
|
+
function withoutResults(data, snapshot, recorders) {
|
|
267
374
|
const out = {};
|
|
268
375
|
for (const key of Object.keys(data)) {
|
|
269
376
|
const value = ownValue(data, key);
|
|
270
377
|
if (key === 'snapshot' && isPlainObject(snapshot)) {
|
|
271
378
|
const stripped = {};
|
|
272
379
|
for (const field of Object.keys(snapshot)) {
|
|
273
|
-
if (field
|
|
274
|
-
|
|
380
|
+
if (field === 'subflowResults')
|
|
381
|
+
continue;
|
|
382
|
+
const kept = field === 'recorders' && recorders !== undefined ? recorders : undefined;
|
|
383
|
+
assign(stripped, field, kept ?? ownValue(snapshot, field));
|
|
275
384
|
}
|
|
276
385
|
assign(out, key, stripped);
|
|
277
386
|
}
|