@12ui/design 0.2.14 → 0.2.15
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/dist/bounded-concurrency.d.ts +13 -0
- package/dist/bounded-concurrency.d.ts.map +1 -0
- package/dist/bounded-concurrency.js +43 -0
- package/dist/bounded-concurrency.js.map +1 -0
- package/dist/branch-downloads.d.ts +10 -0
- package/dist/branch-downloads.d.ts.map +1 -1
- package/dist/branch-downloads.js +20 -0
- package/dist/branch-downloads.js.map +1 -1
- package/dist/branch-execution.d.ts +2 -0
- package/dist/branch-execution.d.ts.map +1 -1
- package/dist/branch-execution.js +157 -38
- package/dist/branch-execution.js.map +1 -1
- package/dist/branch-materialize.d.ts +23 -12
- package/dist/branch-materialize.d.ts.map +1 -1
- package/dist/branch-materialize.js +55 -38
- package/dist/branch-materialize.js.map +1 -1
- package/dist/branch-page-conversion.d.ts +93 -5
- package/dist/branch-page-conversion.d.ts.map +1 -1
- package/dist/branch-page-conversion.js +356 -180
- package/dist/branch-page-conversion.js.map +1 -1
- package/dist/branch-progress.d.ts +24 -0
- package/dist/branch-progress.d.ts.map +1 -1
- package/dist/branch-progress.js +35 -6
- package/dist/branch-progress.js.map +1 -1
- package/dist/branch-run-record.d.ts +11 -0
- package/dist/branch-run-record.d.ts.map +1 -1
- package/dist/branch-run-record.js.map +1 -1
- package/dist/branch-status.d.ts.map +1 -1
- package/dist/branch-status.js +3 -0
- package/dist/branch-status.js.map +1 -1
- package/dist/cli-arguments.d.ts.map +1 -1
- package/dist/cli-arguments.js +1 -0
- package/dist/cli-arguments.js.map +1 -1
- package/dist/cli-branch-command.d.ts +10 -1
- package/dist/cli-branch-command.d.ts.map +1 -1
- package/dist/cli-branch-command.js +60 -11
- package/dist/cli-branch-command.js.map +1 -1
- package/dist/cli-capabilities.d.ts +25 -2
- package/dist/cli-capabilities.d.ts.map +1 -1
- package/dist/cli-capabilities.js +24 -1
- package/dist/cli-capabilities.js.map +1 -1
- package/dist/cli-package-command.d.ts +11 -0
- package/dist/cli-package-command.d.ts.map +1 -1
- package/dist/cli-package-command.js +24 -8
- package/dist/cli-package-command.js.map +1 -1
- package/dist/cli-progress.d.ts +81 -5
- package/dist/cli-progress.d.ts.map +1 -1
- package/dist/cli-progress.js +108 -5
- package/dist/cli-progress.js.map +1 -1
- package/dist/cli.js +17 -7
- package/dist/cli.js.map +1 -1
- package/dist/conversion-receipt.d.ts +127 -0
- package/dist/conversion-receipt.d.ts.map +1 -0
- package/dist/conversion-receipt.js +184 -0
- package/dist/conversion-receipt.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy-skill-catalog.d.ts.map +1 -1
- package/dist/legacy-skill-catalog.js +25 -0
- package/dist/legacy-skill-catalog.js.map +1 -1
- package/dist/package-client.d.ts +28 -0
- package/dist/package-client.d.ts.map +1 -1
- package/dist/package-client.js +21 -1
- package/dist/package-client.js.map +1 -1
- package/dist/package-source-refusal.d.ts +17 -0
- package/dist/package-source-refusal.d.ts.map +1 -0
- package/dist/package-source-refusal.js +61 -0
- package/dist/package-source-refusal.js.map +1 -0
- package/dist/package-submission.d.ts +31 -0
- package/dist/package-submission.d.ts.map +1 -1
- package/dist/package-submission.js +30 -7
- package/dist/package-submission.js.map +1 -1
- package/package.json +1 -1
- package/skills/design/SKILL.md +4 -1
- package/skills/design-branch/SKILL.md +3 -2
|
@@ -1,206 +1,382 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
1
|
import { branchPackageKey } from './branch-identity.js';
|
|
2
|
+
import { BRANCH_PAGE_CONCURRENCY_DEFAULT } from './cli-progress.js';
|
|
3
|
+
import { createConcurrencyLimiter } from './bounded-concurrency.js';
|
|
4
|
+
import { readBranchScreenBytes } from './branch-downloads.js';
|
|
5
|
+
import { reusableConversionId, } from './conversion-receipt.js';
|
|
3
6
|
import { normalizePageViewports, } from './branch-viewport-normalization.js';
|
|
7
|
+
import { isSourceConversionRefusal, sourceConversionRefusalViewportId, } from './package-source-refusal.js';
|
|
4
8
|
import { submitConversionPackage, } from './package-submission.js';
|
|
5
9
|
export const WINNER_VIEWPORT_ID = 'winner';
|
|
6
|
-
const
|
|
10
|
+
export const DEFAULT_PACKAGE_MODEL = 'standard';
|
|
7
11
|
const orderedViewports = (plan, page) => plan.screens
|
|
8
12
|
.filter((screen) => page.slots.includes(screen.slot))
|
|
9
13
|
.sort((left, right) => left.viewportOrdinal - right.viewportOrdinal)
|
|
10
14
|
.map((screen) => ({ slot: screen.slot, ordinal: screen.viewportOrdinal }));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The reuse claim, gated on proof rather than on intent.
|
|
17
|
+
*
|
|
18
|
+
* A normalized winner is no longer the bytes any earlier conversion was
|
|
19
|
+
* admitted with, so a declared `--source-conversion-id` would assert a digest
|
|
20
|
+
* the server will disprove and turn a convertible page into a failed one. A
|
|
21
|
+
* receipt is keyed on the bytes actually submitted, so it survives
|
|
22
|
+
* normalization — the same approved design reconciled to the same server canvas
|
|
23
|
+
* produces the same bytes — and it is only honoured on an exact digest match.
|
|
24
|
+
*/
|
|
25
|
+
export const winnerReuseConversionId = (args) => {
|
|
26
|
+
if (args.settings.sourceConversionId && !args.normalized)
|
|
27
|
+
return args.settings.sourceConversionId;
|
|
28
|
+
return reusableConversionId({
|
|
29
|
+
receipts: args.receipts,
|
|
30
|
+
sha256: args.submittedSha256,
|
|
31
|
+
model: args.model,
|
|
32
|
+
boughtBy: args.runId,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The same page, with the attachment the server just disproved dropped.
|
|
37
|
+
*
|
|
38
|
+
* A reuse claim is proved against durable evidence BEFORE the package row
|
|
39
|
+
* exists, so its refusal costs nothing and leaves nothing behind: the identical
|
|
40
|
+
* request without the attachment is a first admission, not a second one. The
|
|
41
|
+
* page's key is derived from the run, the page, and the ordered digests of the
|
|
42
|
+
* bytes being submitted (`branchPackageKey`) — never from the attachment — so
|
|
43
|
+
* the retry replays under the SAME key and the reuse stays what it always was:
|
|
44
|
+
* an optimisation over bytes the page is carrying anyway.
|
|
45
|
+
*
|
|
46
|
+
* Null when the failure is not that refusal, or names no attachment this page
|
|
47
|
+
* actually sent. Then there is nothing a retry would change, and the page
|
|
48
|
+
* settles failed exactly as it did before.
|
|
49
|
+
*/
|
|
50
|
+
const withoutRefusedAttachment = (viewports, error) => {
|
|
51
|
+
if (!isSourceConversionRefusal(error))
|
|
52
|
+
return null;
|
|
53
|
+
const attached = viewports.filter((viewport) => viewport.sourceConversionId);
|
|
54
|
+
const named = sourceConversionRefusalViewportId(error);
|
|
55
|
+
const refused = named === null
|
|
56
|
+
? attached
|
|
57
|
+
: attached.filter((viewport) => viewport.id === named);
|
|
58
|
+
// A refusal naming a viewport that carried no attachment is a contract this
|
|
59
|
+
// client does not recognise; dropping every attachment is then the only
|
|
60
|
+
// reading that can still be right.
|
|
61
|
+
const dropped = refused.length > 0 ? refused : attached;
|
|
62
|
+
if (dropped.length === 0)
|
|
63
|
+
return null;
|
|
64
|
+
const dropping = new Set(dropped.map((viewport) => viewport.id));
|
|
65
|
+
return {
|
|
66
|
+
viewports: viewports.map((viewport) => (dropping.has(viewport.id)
|
|
67
|
+
// Rebuilt without the claim, and with the bytes it was always carrying.
|
|
68
|
+
? {
|
|
69
|
+
id: viewport.id,
|
|
54
70
|
ordinal: viewport.ordinal,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// admitted with, so the reuse claim would be false. Buy it instead of
|
|
84
|
-
// asserting a digest the server will disprove.
|
|
85
|
-
const reuse = entry.input.id === WINNER_VIEWPORT_ID
|
|
86
|
-
&& args.settings.sourceConversionId
|
|
87
|
-
&& !resolved.normalized;
|
|
71
|
+
imagePath: viewport.imagePath,
|
|
72
|
+
bytes: viewport.bytes,
|
|
73
|
+
mediaType: viewport.mediaType,
|
|
74
|
+
}
|
|
75
|
+
: viewport)),
|
|
76
|
+
disproven: dropped.map((viewport) => ({
|
|
77
|
+
viewportId: viewport.id,
|
|
78
|
+
conversionId: viewport.sourceConversionId,
|
|
79
|
+
detail: error.message,
|
|
80
|
+
})),
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export const convertBranchPage = async (args) => {
|
|
84
|
+
const { page } = args;
|
|
85
|
+
const planned = orderedViewports(args.plan, page);
|
|
86
|
+
const missing = planned.filter((viewport) => !args.screens.has(viewport.slot));
|
|
87
|
+
if (missing.length > 0) {
|
|
88
|
+
return {
|
|
89
|
+
status: 'skipped',
|
|
90
|
+
reason: `Page ${page.id} is missing screen(s) ${missing.map((entry) => entry.slot).join(', ')},`
|
|
91
|
+
+ ' so its viewports do not stack into a whole page. The screens that did land are on'
|
|
92
|
+
+ ' disk; redraw the gap and re-run with --resume before converting this page.',
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
// Collect the page's pixels first, tagging which side declares the width.
|
|
96
|
+
const sources = [];
|
|
97
|
+
if (page.startsFromWinner) {
|
|
98
|
+
if (!args.winner) {
|
|
88
99
|
return {
|
|
89
|
-
id: entry.input.id,
|
|
90
|
-
ordinal: entry.ordinal,
|
|
91
|
-
imagePath: entry.path,
|
|
92
|
-
bytes: resolved.bytes,
|
|
93
|
-
mediaType: resolved.mediaType,
|
|
94
|
-
...(reuse ? { sourceConversionId: args.settings.sourceConversionId } : {}),
|
|
95
|
-
};
|
|
96
|
-
});
|
|
97
|
-
if (viewports.length === 0) {
|
|
98
|
-
conversions.set(page.id, {
|
|
99
100
|
status: 'skipped',
|
|
100
|
-
reason: `Page ${page.id}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
if (viewports.length === 1 && page.startsFromWinner) {
|
|
105
|
-
conversions.set(page.id, {
|
|
106
|
-
status: 'skipped',
|
|
107
|
-
reason: 'The approved screen already is the whole page — the server planned no'
|
|
108
|
-
+ ' continuations for it. Convert it on its own with'
|
|
109
|
-
+ ' `12ui convert <winner> --output layerdoc --export html`.',
|
|
110
|
-
});
|
|
111
|
-
continue;
|
|
101
|
+
reason: `Page ${page.id} starts from the approved screen, whose bytes are not available`
|
|
102
|
+
+ ' locally, so viewport 1 of the page is missing.',
|
|
103
|
+
};
|
|
112
104
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
sources.push({
|
|
106
|
+
ordinal: 1,
|
|
107
|
+
path: args.winner.path,
|
|
108
|
+
input: {
|
|
109
|
+
id: WINNER_VIEWPORT_ID,
|
|
110
|
+
bytes: await readBranchScreenBytes(args.winner),
|
|
111
|
+
mediaType: 'image/png',
|
|
112
|
+
width: args.winner.width,
|
|
113
|
+
height: args.winner.height,
|
|
114
|
+
// The winner came from somewhere else; it is the side that moves.
|
|
115
|
+
canonical: false,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
for (const viewport of planned) {
|
|
120
|
+
const screen = args.screens.get(viewport.slot);
|
|
121
|
+
sources.push({
|
|
122
|
+
ordinal: viewport.ordinal,
|
|
123
|
+
path: screen.path,
|
|
124
|
+
input: {
|
|
125
|
+
id: viewport.slot,
|
|
126
|
+
bytes: await readBranchScreenBytes(screen),
|
|
127
|
+
mediaType: 'image/png',
|
|
128
|
+
width: screen.width,
|
|
129
|
+
height: screen.height,
|
|
130
|
+
// Drawn by the server on the run's fixed canvas: this is the width.
|
|
131
|
+
canonical: true,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
const model = args.settings.model ?? DEFAULT_PACKAGE_MODEL;
|
|
136
|
+
let normalization;
|
|
137
|
+
try {
|
|
138
|
+
normalization = await normalizePageViewports(sources.map((entry) => entry.input));
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
return {
|
|
142
|
+
status: 'failed',
|
|
143
|
+
output: args.settings.output,
|
|
144
|
+
error: error instanceof Error ? error.message : String(error),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
const normalizedById = new Map(normalization.viewports.map((entry) => [entry.id, entry]));
|
|
148
|
+
const viewports = sources.map((entry) => {
|
|
149
|
+
const resolved = normalizedById.get(entry.input.id);
|
|
150
|
+
const reuse = entry.input.id === WINNER_VIEWPORT_ID
|
|
151
|
+
? winnerReuseConversionId({
|
|
152
|
+
settings: args.settings,
|
|
153
|
+
submittedSha256: resolved.sha256,
|
|
154
|
+
normalized: resolved.normalized,
|
|
155
|
+
receipts: args.winnerReceipts ?? [],
|
|
156
|
+
runId: args.plan.runId,
|
|
157
|
+
model,
|
|
158
|
+
})
|
|
159
|
+
: undefined;
|
|
160
|
+
return {
|
|
161
|
+
id: entry.input.id,
|
|
162
|
+
ordinal: entry.ordinal,
|
|
163
|
+
imagePath: entry.path,
|
|
164
|
+
bytes: resolved.bytes,
|
|
165
|
+
mediaType: resolved.mediaType,
|
|
166
|
+
...(reuse ? { sourceConversionId: reuse } : {}),
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
if (viewports.length === 0) {
|
|
170
|
+
return { status: 'skipped', reason: `Page ${page.id} has no viewport to convert.` };
|
|
171
|
+
}
|
|
172
|
+
if (viewports.length === 1 && page.startsFromWinner) {
|
|
173
|
+
return {
|
|
174
|
+
status: 'skipped',
|
|
175
|
+
reason: 'The approved screen already is the whole page — the server planned no'
|
|
176
|
+
+ ' continuations for it. Convert it on its own with'
|
|
177
|
+
+ ' `12ui convert <winner> --output layerdoc --export html`.',
|
|
120
178
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
179
|
+
}
|
|
180
|
+
// The page's identity. Its viewports travel per submission instead, because a
|
|
181
|
+
// disproven attachment changes them and nothing else about the page.
|
|
182
|
+
const input = {
|
|
183
|
+
id: page.id,
|
|
184
|
+
ordinal: page.index,
|
|
185
|
+
kind: page.kind,
|
|
186
|
+
...(page.title ? { title: page.title } : {}),
|
|
187
|
+
...(page.purpose ? { purpose: page.purpose } : {}),
|
|
188
|
+
};
|
|
189
|
+
// Keyed on the bytes actually submitted, so a retry after normalization
|
|
190
|
+
// replays the same package instead of buying the page again.
|
|
191
|
+
const idempotencyKey = branchPackageKey({
|
|
192
|
+
runId: args.plan.runId,
|
|
193
|
+
pageIndex: page.index,
|
|
194
|
+
viewportSha256s: viewports.map((viewport) => normalizedById.get(viewport.id).sha256),
|
|
195
|
+
output: args.settings.output,
|
|
196
|
+
...(args.settings.model ? { model: args.settings.model } : {}),
|
|
197
|
+
...(args.settings.responsiveQuality
|
|
198
|
+
? { responsiveQuality: args.settings.responsiveQuality }
|
|
199
|
+
: {}),
|
|
200
|
+
});
|
|
201
|
+
const normalizedRecord = normalization.viewports
|
|
202
|
+
.filter((viewport) => viewport.normalized)
|
|
203
|
+
.map((viewport) => ({
|
|
204
|
+
id: viewport.id,
|
|
205
|
+
fromWidth: viewport.original.width,
|
|
206
|
+
fromHeight: viewport.original.height,
|
|
207
|
+
fromSha256: viewport.original.sha256,
|
|
208
|
+
toWidth: viewport.width,
|
|
209
|
+
toHeight: viewport.height,
|
|
210
|
+
toSha256: viewport.sha256,
|
|
211
|
+
}));
|
|
212
|
+
const normalizationRecord = {
|
|
213
|
+
...(normalization.canonicalWidth === null
|
|
214
|
+
? {}
|
|
215
|
+
: { canonicalWidth: normalization.canonicalWidth }),
|
|
216
|
+
...(normalizedRecord.length > 0 ? { normalizedViewports: normalizedRecord } : {}),
|
|
217
|
+
};
|
|
218
|
+
const disproven = [];
|
|
219
|
+
const disproofRecord = () => (disproven.length > 0 ? { disprovenReuse: disproven } : {});
|
|
220
|
+
// The reconciliation is a fact about what was submitted, so it belongs in
|
|
221
|
+
// the record whether or not the submission was accepted — a failed page
|
|
222
|
+
// is exactly when an operator needs to know what the bytes were.
|
|
223
|
+
const failedPage = (error) => ({
|
|
224
|
+
status: 'failed',
|
|
225
|
+
idempotencyKey,
|
|
226
|
+
output: args.settings.output,
|
|
227
|
+
...normalizationRecord,
|
|
228
|
+
...disproofRecord(),
|
|
229
|
+
error: error instanceof Error ? error.message : String(error),
|
|
230
|
+
});
|
|
231
|
+
// Whether a package row exists yet. An attachment is proved at admission,
|
|
232
|
+
// before anything durable is created, so only a failure with no admitted
|
|
233
|
+
// package can be that refusal — and only then can the same key carry a
|
|
234
|
+
// different body without being a `409 idempotency_conflict`.
|
|
235
|
+
let admitted = false;
|
|
236
|
+
const submit = async (submitted) => await submitConversionPackage({
|
|
237
|
+
client: args.client,
|
|
238
|
+
outDir: args.pagesDirectory,
|
|
239
|
+
submission: {
|
|
127
240
|
output: args.settings.output,
|
|
128
241
|
...(args.settings.model ? { model: args.settings.model } : {}),
|
|
129
242
|
...(args.settings.responsiveQuality
|
|
130
243
|
? { responsiveQuality: args.settings.responsiveQuality }
|
|
131
244
|
: {}),
|
|
245
|
+
pages: [{ ...input, viewports: [...submitted] }],
|
|
246
|
+
idempotencyKey,
|
|
247
|
+
},
|
|
248
|
+
onSubmitted: () => { admitted = true; },
|
|
249
|
+
...(args.timeoutMs === undefined ? {} : { timeoutMs: args.timeoutMs }),
|
|
250
|
+
...(args.onProgress ? { onProgress: args.onProgress } : {}),
|
|
251
|
+
...(args.signal ? { signal: args.signal } : {}),
|
|
252
|
+
});
|
|
253
|
+
let result;
|
|
254
|
+
try {
|
|
255
|
+
result = await submit(viewports);
|
|
256
|
+
}
|
|
257
|
+
catch (error) {
|
|
258
|
+
// A disproven reuse costs one retry of the same page, never the page: its
|
|
259
|
+
// other screens are already paid for by the time anything could refuse it.
|
|
260
|
+
const retry = admitted ? null : withoutRefusedAttachment(viewports, error);
|
|
261
|
+
if (!retry)
|
|
262
|
+
return failedPage(error);
|
|
263
|
+
disproven.push(...retry.disproven);
|
|
264
|
+
for (const entry of retry.disproven)
|
|
265
|
+
args.onReuseDisproven?.(entry);
|
|
266
|
+
try {
|
|
267
|
+
result = await submit(retry.viewports);
|
|
268
|
+
}
|
|
269
|
+
catch (retryError) {
|
|
270
|
+
return failedPage(retryError);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
const converted = result.pages[0];
|
|
274
|
+
const winnerChild = converted?.viewports?.find((viewport) => (viewport.id === WINNER_VIEWPORT_ID
|
|
275
|
+
&& viewport.status === 'succeeded'
|
|
276
|
+
&& viewport.conversionId));
|
|
277
|
+
if (winnerChild?.conversionId && result.expiresAt) {
|
|
278
|
+
args.onWinnerConversion?.({
|
|
279
|
+
sha256: normalizedById.get(WINNER_VIEWPORT_ID).sha256,
|
|
280
|
+
conversionId: winnerChild.conversionId,
|
|
281
|
+
model,
|
|
282
|
+
expiresAt: result.expiresAt,
|
|
132
283
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
...(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
284
|
+
}
|
|
285
|
+
return converted?.status === 'succeeded'
|
|
286
|
+
? {
|
|
287
|
+
status: 'succeeded',
|
|
288
|
+
packageId: result.packageId,
|
|
289
|
+
idempotencyKey,
|
|
290
|
+
output: args.settings.output,
|
|
291
|
+
...normalizationRecord,
|
|
292
|
+
...disproofRecord(),
|
|
293
|
+
...(converted.conversionId ? { conversionId: converted.conversionId } : {}),
|
|
294
|
+
...(converted.outFile ? { outFile: converted.outFile } : {}),
|
|
295
|
+
...(converted.sha256 ? { sha256: converted.sha256 } : {}),
|
|
296
|
+
...(converted.bytes === undefined ? {} : { bytes: converted.bytes }),
|
|
297
|
+
}
|
|
298
|
+
: {
|
|
299
|
+
status: 'failed',
|
|
300
|
+
packageId: result.packageId,
|
|
301
|
+
idempotencyKey,
|
|
302
|
+
output: args.settings.output,
|
|
303
|
+
...normalizationRecord,
|
|
304
|
+
...disproofRecord(),
|
|
305
|
+
error: converted?.error ?? `Package ${result.packageId} produced no page.`,
|
|
149
306
|
};
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Every page settles, whatever happens to any one of them. A page whose own
|
|
310
|
+
* bytes could not even be delivered is recorded as a failed conversion rather
|
|
311
|
+
* than thrown: a throw would abandon the sibling packages already running,
|
|
312
|
+
* which are paid work whose results would then never reach the sentinel.
|
|
313
|
+
*/
|
|
314
|
+
const settlePageConversion = async (args) => {
|
|
315
|
+
try {
|
|
316
|
+
return await convertBranchPage(args);
|
|
317
|
+
}
|
|
318
|
+
catch (error) {
|
|
319
|
+
return {
|
|
320
|
+
status: 'failed',
|
|
321
|
+
output: args.settings.output,
|
|
322
|
+
error: error instanceof Error ? error.message : String(error),
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* The one owner of "which pages are converting, and how many at once".
|
|
328
|
+
*
|
|
329
|
+
* Pages are handed in as they become eligible rather than all at the end, so a
|
|
330
|
+
* page whose screens landed in the first wave is already converting while the
|
|
331
|
+
* rest of the run is still generating. `prepare` runs inside the page's own
|
|
332
|
+
* slot, which is what keeps a delivery for a page that has not started from
|
|
333
|
+
* competing with the packages that are already paid for.
|
|
334
|
+
*/
|
|
335
|
+
export const createBranchPageConversions = (args) => {
|
|
336
|
+
const limiter = createConcurrencyLimiter(args.concurrency ?? BRANCH_PAGE_CONCURRENCY_DEFAULT);
|
|
337
|
+
const conversions = new Map();
|
|
338
|
+
const enqueued = new Map();
|
|
339
|
+
return {
|
|
340
|
+
start: (plan, page) => {
|
|
341
|
+
if (enqueued.has(page.id))
|
|
342
|
+
return;
|
|
343
|
+
enqueued.set(page.id, limiter(async () => {
|
|
344
|
+
const prepared = await args.prepare(page, plan);
|
|
345
|
+
conversions.set(page.id, await settlePageConversion({
|
|
346
|
+
client: args.client,
|
|
347
|
+
plan,
|
|
348
|
+
page,
|
|
349
|
+
screens: prepared.screens,
|
|
350
|
+
settings: args.settings,
|
|
351
|
+
pagesDirectory: args.pagesDirectory,
|
|
352
|
+
...(prepared.winner ? { winner: prepared.winner } : {}),
|
|
353
|
+
...(args.timeoutMs === undefined ? {} : { timeoutMs: args.timeoutMs }),
|
|
354
|
+
...(args.winnerReceipts ? { winnerReceipts: args.winnerReceipts } : {}),
|
|
355
|
+
...(args.onProgress
|
|
356
|
+
? { onProgress: (event) => args.onProgress(page.id, event) }
|
|
159
357
|
: {}),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
: {}),
|
|
167
|
-
...(args.signal ? { signal: args.signal } : {}),
|
|
168
|
-
});
|
|
169
|
-
const converted = result.pages[0];
|
|
170
|
-
conversions.set(page.id, converted?.status === 'succeeded'
|
|
171
|
-
? {
|
|
172
|
-
status: 'succeeded',
|
|
173
|
-
packageId: result.packageId,
|
|
174
|
-
idempotencyKey,
|
|
175
|
-
output: args.settings.output,
|
|
176
|
-
...normalizationRecord,
|
|
177
|
-
...(converted.conversionId ? { conversionId: converted.conversionId } : {}),
|
|
178
|
-
...(converted.outFile ? { outFile: converted.outFile } : {}),
|
|
179
|
-
...(converted.sha256 ? { sha256: converted.sha256 } : {}),
|
|
180
|
-
...(converted.bytes === undefined ? {} : { bytes: converted.bytes }),
|
|
181
|
-
}
|
|
182
|
-
: {
|
|
358
|
+
...(args.onWinnerConversion ? { onWinnerConversion: args.onWinnerConversion } : {}),
|
|
359
|
+
...(args.onReuseDisproven ? { onReuseDisproven: args.onReuseDisproven } : {}),
|
|
360
|
+
...(args.signal ? { signal: args.signal } : {}),
|
|
361
|
+
}));
|
|
362
|
+
}).catch((error) => {
|
|
363
|
+
conversions.set(page.id, {
|
|
183
364
|
status: 'failed',
|
|
184
|
-
packageId: result.packageId,
|
|
185
|
-
idempotencyKey,
|
|
186
365
|
output: args.settings.output,
|
|
187
|
-
|
|
188
|
-
error: converted?.error ?? `Package ${result.packageId} produced no page.`,
|
|
366
|
+
error: error instanceof Error ? error.message : String(error),
|
|
189
367
|
});
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
//
|
|
194
|
-
// is
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
return conversions;
|
|
368
|
+
}));
|
|
369
|
+
},
|
|
370
|
+
settled: async () => {
|
|
371
|
+
// Draining can itself enqueue: a page becomes eligible while an earlier
|
|
372
|
+
// one is still in flight. Keep draining until nothing new arrived.
|
|
373
|
+
let counted = -1;
|
|
374
|
+
while (enqueued.size !== counted) {
|
|
375
|
+
counted = enqueued.size;
|
|
376
|
+
await Promise.all([...enqueued.values()]);
|
|
377
|
+
}
|
|
378
|
+
return conversions;
|
|
379
|
+
},
|
|
380
|
+
};
|
|
205
381
|
};
|
|
206
382
|
//# sourceMappingURL=branch-page-conversion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-page-conversion.js","sourceRoot":"","sources":["../src/branch-page-conversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAKxD,OAAO,EACL,sBAAsB,GAGvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uBAAuB,GAIxB,MAAM,yBAAyB,CAAC;AAqBjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAI3C,MAAM,eAAe,GAAG,KAAK,EAAE,MAA8B,EAAuB,EAAE,CAAC,CACrF,IAAI,UAAU,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAC5C,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,IAA0B,EAC1B,IAA2C,EACN,EAAE,CAAC,IAAI,CAAC,OAAO;KACnD,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACpD,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;KACnE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,eAAe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