@rig-c/review 2.7.0 → 2.8.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/docs/PANELS.md +1 -1
- package/docs/PARTS_VIEW.md +2 -0
- package/docs/REVIEW_PACKAGE.md +32 -14
- package/docs/STABILITY.md +80 -4
- package/docs/WORKFLOWS.md +3 -1
- package/package.json +2 -2
- package/src/handoff.ts +192 -25
- package/src/interview-project.ts +186 -10
- package/src/job-act.ts +59 -11
- package/src/job-api.ts +194 -13
- package/src/job-contract.ts +117 -7
- package/src/job-front.ts +165 -26
- package/src/job-host.ts +118 -1
- package/src/job-session.ts +193 -46
- package/src/job-source.ts +88 -16
- package/src/joined-project.ts +83 -12
- package/src/manifest.ts +5 -3
- package/src/open.ts +5 -4
- package/src/rebuild.ts +445 -51
- package/src/reference.ts +3 -3
- package/src/server.ts +2 -2
- package/src/stage-parts.ts +47 -15
- package/web/catalog-en.ts +6 -0
- package/web/catalog-ko.ts +6 -0
- package/web/job-session.ts +483 -84
- package/web/main.ts +353 -43
- package/web/part-selection.ts +2 -0
- package/web/parts.ts +22 -4
- package/web/rebuild-client.ts +14 -2
- package/web/stage-nav.ts +20 -12
package/src/job-front.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Disjoint live-job routes. The backend receives the original authenticated Request. */
|
|
2
|
-
import { JOB_API_SCHEMA, JOB_ACT_SCHEMA, type JobErrorCode, type JobHostPorts, type JobId, type JobResult, type JobReviewerBinding } from './job-contract.ts';
|
|
2
|
+
import { JOB_API_SCHEMA, JOB_ACT_SCHEMA, type JobErrorCode, type JobHostPorts, type JobId, type JobPublicationMode, type JobResult, type JobReviewerBinding } from './job-contract.ts';
|
|
3
3
|
import { createJobHostPorts, jobBody, jobHash, jobId, jobObject, jobPartsEnumeratorVersion } from './job-api.ts';
|
|
4
4
|
import { JobSession } from './job-session.ts';
|
|
5
|
-
import { assertJobRoot, captureJobRoot, type JobRootIdentity } from './job-source.ts';
|
|
5
|
+
import { assertJobRoot, captureJobRoot, isRetainedRecordSource, type JobRootIdentity } from './job-source.ts';
|
|
6
6
|
import type { JobWorkerOptions } from './job-worker.ts';
|
|
7
7
|
import { JobError, JobStore } from './job-store.ts';
|
|
8
8
|
import { loadReview, safeFile, packagePath, type ReviewPackage } from './manifest.ts';
|
|
@@ -194,7 +194,7 @@ interface RetainedView {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
/** The host reads only the committed retained snapshot and its sealed file inventory. */
|
|
197
|
-
function retainedPublicationRoutes(session: JobSession) {
|
|
197
|
+
export function retainedPublicationRoutes(session: JobSession) {
|
|
198
198
|
const views = new Map<string, Promise<RetainedView>>();
|
|
199
199
|
return async (jobId: string, publicationId: string, key: string, path: string, request: Request): Promise<Response> => {
|
|
200
200
|
if (jobId !== session.jobId) return failure('JOB_UNKNOWN', 404);
|
|
@@ -202,6 +202,47 @@ function retainedPublicationRoutes(session: JobSession) {
|
|
|
202
202
|
return await session.readPublicationResponse(publicationId, async retained => {
|
|
203
203
|
const display = session.displayPublication(publicationId);
|
|
204
204
|
if (key !== display.publication.instanceKey) return failure('JOB_DISPLAY_MISMATCH', 409);
|
|
205
|
+
const json = (value: unknown) => new Response(request.method === 'HEAD' ? null : JSON.stringify(value), {
|
|
206
|
+
headers: {...headers, 'Content-Type': 'application/json'},
|
|
207
|
+
});
|
|
208
|
+
const sealedFile = async (relativePath: string) => {
|
|
209
|
+
const seal = retained.seals.find(file => file.path === relativePath);
|
|
210
|
+
if (!seal) return failure('JOB_SOURCE_UNRETAINABLE', 404);
|
|
211
|
+
const file = await safeFile(retained.snapshotRoot, relativePath);
|
|
212
|
+
return serveReference(request, file, seal.sha256, headers);
|
|
213
|
+
};
|
|
214
|
+
if (isRetainedRecordSource(retained)) {
|
|
215
|
+
if (path === 'api/review') {
|
|
216
|
+
return json({
|
|
217
|
+
recordSource: retained.source,
|
|
218
|
+
sourceHash: retained.source.sourceHash,
|
|
219
|
+
assetsBase: display.routes.assetsBase,
|
|
220
|
+
capabilities: {
|
|
221
|
+
playback: false,
|
|
222
|
+
interview: retained.questions.length > 0,
|
|
223
|
+
preRig: false,
|
|
224
|
+
modeling: false,
|
|
225
|
+
motion: false,
|
|
226
|
+
feedback: true,
|
|
227
|
+
audio: false,
|
|
228
|
+
},
|
|
229
|
+
feedbackCatalog: {slots: null},
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
if (path === 'api/interview') {
|
|
233
|
+
return json({questions: retained.questions.map(question => ({...question,
|
|
234
|
+
images: question.images.map((image, index) => ({name: image.name,
|
|
235
|
+
url: `/api/interview/image/${question.ref.sha256}/${index}`})),
|
|
236
|
+
}))});
|
|
237
|
+
}
|
|
238
|
+
const interview = /^api\/interview\/image\/([a-f0-9]{64})\/(0|[1-9]\d*)$/.exec(path);
|
|
239
|
+
if (interview) {
|
|
240
|
+
const image = retained.questions.find(question => question.ref.sha256 === interview[1])?.images[Number(interview[2])];
|
|
241
|
+
if (!image) return failure('JOB_SOURCE_UNRETAINABLE', 404);
|
|
242
|
+
return await sealedFile(image.ref.path);
|
|
243
|
+
}
|
|
244
|
+
return failure('JOB_REQUEST_INVALID', 404);
|
|
245
|
+
}
|
|
205
246
|
let pending = views.get(publicationId);
|
|
206
247
|
if (!pending) {
|
|
207
248
|
pending = (async () => {
|
|
@@ -226,15 +267,6 @@ function retainedPublicationRoutes(session: JobSession) {
|
|
|
226
267
|
}
|
|
227
268
|
const {review, parts} = await pending;
|
|
228
269
|
await assertReviewUnchanged(review);
|
|
229
|
-
const json = (value: unknown) => new Response(request.method === 'HEAD' ? null : JSON.stringify(value), {
|
|
230
|
-
headers: {...headers, 'Content-Type': 'application/json'},
|
|
231
|
-
});
|
|
232
|
-
const sealedFile = async (relativePath: string) => {
|
|
233
|
-
const seal = retained.seals.find(file => file.path === relativePath);
|
|
234
|
-
if (!seal) return failure('JOB_SOURCE_UNRETAINABLE', 404);
|
|
235
|
-
const file = await safeFile(retained.snapshotRoot, relativePath);
|
|
236
|
-
return serveReference(request, file, seal.sha256, headers);
|
|
237
|
-
};
|
|
238
270
|
if (path === 'api/review') {
|
|
239
271
|
return json({
|
|
240
272
|
manifest: review.manifest,
|
|
@@ -247,15 +279,22 @@ function retainedPublicationRoutes(session: JobSession) {
|
|
|
247
279
|
sourcePainting: review.sourcePainting && {...review.sourcePainting, url: '/review-painting'},
|
|
248
280
|
feedbackCatalog: review.feedbackCatalog,
|
|
249
281
|
assetsBase: display.routes.assetsBase,
|
|
250
|
-
capabilities: {playback: !!review.manifest.model,
|
|
282
|
+
capabilities: {playback: !!review.manifest.model,
|
|
283
|
+
interview: retained.questions.length > 0 ||
|
|
284
|
+
(retained.interview?.records.length ?? 0) > 0 ||
|
|
285
|
+
(retained.interview?.diagnostics.length ?? 0) > 0,
|
|
251
286
|
preRig: retained.source.selector?.kind === 'draft', modeling: false, motion: false, feedback: true, audio: false},
|
|
252
287
|
});
|
|
253
288
|
}
|
|
254
289
|
if (path === 'api/interview') {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
290
|
+
const interview = retained.interview !== undefined ? retained.interview : display.publication.interview;
|
|
291
|
+
return json({
|
|
292
|
+
questions: retained.questions.map(question => ({...question,
|
|
293
|
+
images: question.images.map((image, index) => ({name: image.name,
|
|
294
|
+
url: `/api/interview/image/${question.ref.sha256}/${index}`})),
|
|
295
|
+
})),
|
|
296
|
+
...(interview === undefined ? {} : {interview}),
|
|
297
|
+
});
|
|
259
298
|
}
|
|
260
299
|
const interview = /^api\/interview\/image\/([a-f0-9]{64})\/(0|[1-9]\d*)$/.exec(path);
|
|
261
300
|
if (interview) {
|
|
@@ -311,6 +350,9 @@ export interface JobHostRecord {
|
|
|
311
350
|
/** Absent on older records whose hook identity cannot be established. */
|
|
312
351
|
readerId?: string | null;
|
|
313
352
|
bindingId?: string | null;
|
|
353
|
+
/** Present when the host runs in record-and-package mode. */
|
|
354
|
+
publicationMode?: JobPublicationMode;
|
|
355
|
+
recordReaderId?: string | null;
|
|
314
356
|
}
|
|
315
357
|
|
|
316
358
|
export type JobHostListenerIncarnation = string;
|
|
@@ -497,11 +539,43 @@ function freezeExpectation(value: JobHostReuseExpectation): JobHostReuseExpectat
|
|
|
497
539
|
}
|
|
498
540
|
|
|
499
541
|
export function jobHostIdentity(startup: JobHostOptions) {
|
|
500
|
-
|
|
542
|
+
if (startup.publicationMode !== undefined && startup.publicationMode !== 'package-only' && startup.publicationMode !== 'record-and-package') {
|
|
543
|
+
throw new JobHostOptionError('JOB_HOST_OPTION_ID_INVALID', 'readPublished', null, String(startup.publicationMode));
|
|
544
|
+
}
|
|
545
|
+
const isRecordMode = startup.publicationMode === 'record-and-package' || startup.readRecordPublished !== undefined;
|
|
546
|
+
let readerId: string | null;
|
|
547
|
+
let recordReaderId: string | null;
|
|
548
|
+
let publicationMode: JobPublicationMode;
|
|
549
|
+
if (isRecordMode) {
|
|
550
|
+
if (startup.publicationMode === 'package-only') {
|
|
551
|
+
throw new JobHostOptionError('JOB_HOST_OPTION_ID_INVALID', 'readPublished', 'package-only', startup.recordReaderId ?? startup.readerId);
|
|
552
|
+
}
|
|
553
|
+
if (typeof startup.readRecordPublished !== 'function') {
|
|
554
|
+
throw new JobHostOptionError('JOB_HOST_OPTION_ID_INVALID', 'readPublished', null, startup.recordReaderId ?? startup.readerId);
|
|
555
|
+
}
|
|
556
|
+
if (startup.recordReaderId !== undefined) {
|
|
557
|
+
recordReaderId = declaredHostId('readPublished', startup.readRecordPublished, startup.recordReaderId);
|
|
558
|
+
readerId = declaredHostId('readPublished', startup.readPublished, startup.readerId);
|
|
559
|
+
} else {
|
|
560
|
+
recordReaderId = declaredHostId('readPublished', startup.readRecordPublished, startup.readerId);
|
|
561
|
+
if (startup.readPublished !== undefined && typeof startup.readPublished !== 'function') {
|
|
562
|
+
throw new JobHostOptionError('JOB_HOST_OPTION_ID_INVALID', 'readPublished', null, startup.readerId);
|
|
563
|
+
}
|
|
564
|
+
readerId = startup.readPublished ? recordReaderId : null;
|
|
565
|
+
}
|
|
566
|
+
publicationMode = 'record-and-package';
|
|
567
|
+
} else {
|
|
568
|
+
if (startup.recordReaderId !== undefined) {
|
|
569
|
+
throw new JobHostOptionError('JOB_HOST_OPTION_ID_INVALID', 'readPublished', null, startup.recordReaderId);
|
|
570
|
+
}
|
|
571
|
+
readerId = declaredHostId('readPublished', startup.readPublished, startup.readerId);
|
|
572
|
+
recordReaderId = null;
|
|
573
|
+
publicationMode = 'package-only';
|
|
574
|
+
}
|
|
501
575
|
const bindingId = declaredHostId('installWriterBinding', startup.installWriterBinding, startup.bindingId);
|
|
502
576
|
const partsEnumeratorId = declaredHostId('partsEnumerator', startup.partsEnumerator?.enumerate, startup.partsEnumeratorId);
|
|
503
577
|
const partsEnumeratorVersion = startup.partsEnumerator?.version ?? null;
|
|
504
|
-
return {readerId, bindingId, partsEnumeratorId, partsEnumeratorVersion};
|
|
578
|
+
return {readerId, bindingId, partsEnumeratorId, partsEnumeratorVersion, publicationMode, recordReaderId};
|
|
505
579
|
}
|
|
506
580
|
|
|
507
581
|
export async function installJobWriterBinding(session: JobSession, startup: JobHostOptions, origin: string): Promise<void> {
|
|
@@ -510,6 +584,19 @@ export async function installJobWriterBinding(session: JobSession, startup: JobH
|
|
|
510
584
|
}
|
|
511
585
|
|
|
512
586
|
export function assertJobHostCompatible(record: JobHostRecord, identity: ReturnType<typeof jobHostIdentity>): void {
|
|
587
|
+
const recordMode: JobPublicationMode = record.publicationMode ?? 'package-only';
|
|
588
|
+
const recordReaderId = record.recordReaderId ?? null;
|
|
589
|
+
if (recordMode !== identity.publicationMode) {
|
|
590
|
+
throw new JobHostOptionError(
|
|
591
|
+
'JOB_HOST_REUSE_MISMATCH',
|
|
592
|
+
'readPublished',
|
|
593
|
+
recordReaderId ?? record.readerId ?? recordMode,
|
|
594
|
+
identity.recordReaderId ?? identity.readerId ?? identity.publicationMode,
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
if (recordReaderId !== identity.recordReaderId) {
|
|
598
|
+
throw new JobHostOptionError('JOB_HOST_REUSE_MISMATCH', 'readPublished', recordReaderId, identity.recordReaderId);
|
|
599
|
+
}
|
|
513
600
|
for (const [option, actual, requested] of [
|
|
514
601
|
['readPublished', record.readerId, identity.readerId],
|
|
515
602
|
['installWriterBinding', record.bindingId, identity.bindingId],
|
|
@@ -531,7 +618,12 @@ function buildAttachment(session: JobSession, origin: string, listenerIncarnatio
|
|
|
531
618
|
if (live.status !== 'active') throw new JobHostAttachError('closed', 'acceptance');
|
|
532
619
|
return freezeExpectation({jobId: session.jobId, origin, listenerIncarnation, binding: {
|
|
533
620
|
root: live.root.path, stateDir: live.stateDir, fingerprint: live.fingerprint,
|
|
534
|
-
reviewer: live.reviewer,
|
|
621
|
+
reviewer: live.reviewer,
|
|
622
|
+
readerId: identity.readerId ?? identity.recordReaderId,
|
|
623
|
+
bindingId: identity.bindingId,
|
|
624
|
+
partsEnumeratorId: identity.partsEnumeratorId,
|
|
625
|
+
partsEnumeratorVersion: identity.partsEnumeratorVersion,
|
|
626
|
+
apiSchema: live.apiSchema, actSchema: live.actSchema,
|
|
535
627
|
}});
|
|
536
628
|
}
|
|
537
629
|
|
|
@@ -598,8 +690,23 @@ export function createJobRequestContext(session: JobSession, startup: JobHostOpt
|
|
|
598
690
|
listenerIncarnation: string = hubIncarnation ?? randomUUID(), accepting: () => boolean = () => true) {
|
|
599
691
|
const ports = createJobHostPorts(session, new URL(origin).origin);
|
|
600
692
|
// This legacy GET projection and its property order are deliberately unchanged.
|
|
601
|
-
const record: JobHostRecord = {
|
|
602
|
-
|
|
693
|
+
const record: JobHostRecord = {
|
|
694
|
+
schema: 'rig-review-job-host/1',
|
|
695
|
+
apiSchema: JOB_API_SCHEMA,
|
|
696
|
+
actSchema: JOB_ACT_SCHEMA,
|
|
697
|
+
readerId: identity.readerId,
|
|
698
|
+
bindingId: identity.bindingId,
|
|
699
|
+
partsEnumeratorId: identity.partsEnumeratorId,
|
|
700
|
+
partsEnumeratorVersion: identity.partsEnumeratorVersion,
|
|
701
|
+
...(identity.publicationMode === 'record-and-package' ? {
|
|
702
|
+
publicationMode: identity.publicationMode,
|
|
703
|
+
recordReaderId: identity.recordReaderId,
|
|
704
|
+
} : {}),
|
|
705
|
+
jobId: session.jobId,
|
|
706
|
+
origin,
|
|
707
|
+
fingerprint: startup.fingerprint,
|
|
708
|
+
pid: process.pid,
|
|
709
|
+
};
|
|
603
710
|
const front = createJobFront({origin, ports, resource, hubIncarnation, publication: retainedPublicationRoutes(session)});
|
|
604
711
|
let requests = 0, stopped = false, published = false;
|
|
605
712
|
let captured: ObservedFiles;
|
|
@@ -824,7 +931,13 @@ async function attachJobHost(options: JobHostOptions): Promise<JobOwnerHost> {
|
|
|
824
931
|
fingerprint,
|
|
825
932
|
reviewer,
|
|
826
933
|
...(port !== undefined ? { port } : {}),
|
|
934
|
+
...(options.publicationMode !== undefined ? { publicationMode: options.publicationMode } : {}),
|
|
827
935
|
...(options.readPublished ? { readPublished: options.readPublished, readerId: identity.readerId! } : {}),
|
|
936
|
+
...(options.readRecordPublished ? {
|
|
937
|
+
readRecordPublished: options.readRecordPublished,
|
|
938
|
+
recordReaderId: identity.recordReaderId!,
|
|
939
|
+
...(options.readerId !== undefined && !options.readPublished ? { readerId: options.readerId } : {}),
|
|
940
|
+
} : {}),
|
|
828
941
|
...(options.installWriterBinding ? { installWriterBinding: options.installWriterBinding, bindingId: identity.bindingId! } : {}),
|
|
829
942
|
...(options.partsEnumerator ? { partsEnumerator: {...options.partsEnumerator}, partsEnumeratorId: identity.partsEnumeratorId! } : {}),
|
|
830
943
|
...(options.afterSnapshot ? { afterSnapshot: options.afterSnapshot } : {}),
|
|
@@ -870,7 +983,10 @@ async function attachJobHost(options: JobHostOptions): Promise<JobOwnerHost> {
|
|
|
870
983
|
if (fingerprint !== expected.binding.fingerprint) throw reuseMismatch('fingerprint', expected.binding.fingerprint, fingerprint);
|
|
871
984
|
if (reviewer.id !== expected.binding.reviewer.id) throw reuseMismatch('reviewer.id', expected.binding.reviewer.id, reviewer.id);
|
|
872
985
|
if (reviewer.role !== expected.binding.reviewer.role) throw reuseMismatch('reviewer.role', expected.binding.reviewer.role, reviewer.role);
|
|
873
|
-
|
|
986
|
+
const requestedBindingReaderId = identity.readerId ?? identity.recordReaderId;
|
|
987
|
+
if (requestedBindingReaderId !== expected.binding.readerId) {
|
|
988
|
+
throw reuseMismatch('readerId', expected.binding.readerId, requestedBindingReaderId);
|
|
989
|
+
}
|
|
874
990
|
if (identity.bindingId !== expected.binding.bindingId) throw reuseMismatch('bindingId', expected.binding.bindingId, identity.bindingId);
|
|
875
991
|
if (identity.partsEnumeratorId !== expected.binding.partsEnumeratorId) {
|
|
876
992
|
throw reuseMismatch('partsEnumeratorId', expected.binding.partsEnumeratorId, identity.partsEnumeratorId);
|
|
@@ -996,15 +1112,37 @@ async function attachJobHost(options: JobHostOptions): Promise<JobOwnerHost> {
|
|
|
996
1112
|
if (descriptor.fingerprint !== expected.binding.fingerprint) {
|
|
997
1113
|
throw reuseMismatch('fingerprint', expected.binding.fingerprint, descriptor.fingerprint);
|
|
998
1114
|
}
|
|
1115
|
+
const descriptorMode = Object.hasOwn(descriptor, 'publicationMode') ? descriptor.publicationMode : 'package-only';
|
|
1116
|
+
if (descriptorMode !== 'package-only' && descriptorMode !== 'record-and-package') {
|
|
1117
|
+
throw new JobHostAttachError('read', 'record');
|
|
1118
|
+
}
|
|
1119
|
+
const descriptorRecordReaderId = Object.hasOwn(descriptor, 'recordReaderId') ? descriptor.recordReaderId : null;
|
|
1120
|
+
if (descriptorRecordReaderId !== null && (typeof descriptorRecordReaderId !== 'string' || !descriptorRecordReaderId)) {
|
|
1121
|
+
throw new JobHostAttachError('read', 'record');
|
|
1122
|
+
}
|
|
1123
|
+
if (descriptorMode === 'package-only' && descriptorRecordReaderId !== null ||
|
|
1124
|
+
descriptorMode === 'record-and-package' && descriptorRecordReaderId === null) {
|
|
1125
|
+
throw new JobHostAttachError('read', 'record');
|
|
1126
|
+
}
|
|
999
1127
|
for (const field of ['readerId', 'bindingId', 'partsEnumeratorId', 'partsEnumeratorVersion'] as const) {
|
|
1000
1128
|
const val = descriptor[field];
|
|
1001
1129
|
if (!Object.hasOwn(descriptor, field) || val !== null && (typeof val !== 'string' || !val)) {
|
|
1002
1130
|
throw new JobHostAttachError('read', 'record');
|
|
1003
1131
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1132
|
+
const compareVal = field === 'readerId' ? (val ?? descriptorRecordReaderId) : val;
|
|
1133
|
+
if (compareVal !== expected.binding[field]) {
|
|
1134
|
+
throw reuseMismatch(field, expected.binding[field], (compareVal ?? null) as string | null);
|
|
1006
1135
|
}
|
|
1007
1136
|
}
|
|
1137
|
+
if (descriptorMode !== identity.publicationMode ||
|
|
1138
|
+
descriptor.readerId !== identity.readerId ||
|
|
1139
|
+
descriptorRecordReaderId !== identity.recordReaderId) {
|
|
1140
|
+
throw reuseMismatch(
|
|
1141
|
+
'readerId',
|
|
1142
|
+
(descriptor.readerId ?? descriptorRecordReaderId ?? descriptorMode) as string | null,
|
|
1143
|
+
identity.readerId ?? identity.recordReaderId ?? identity.publicationMode,
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1008
1146
|
for (const field of ['apiSchema', 'actSchema'] as const) {
|
|
1009
1147
|
const val = descriptor[field];
|
|
1010
1148
|
if (typeof val !== 'string' || !val) {
|
|
@@ -1109,7 +1247,8 @@ function validatedHostRefusal(raw: unknown, status: number): Error | null {
|
|
|
1109
1247
|
function snapshotHostOptions(options: JobHostOptions): JobHostOptions {
|
|
1110
1248
|
const copy = ownData(options);
|
|
1111
1249
|
if (copy.reuseOnly !== undefined && Object.keys(copy).some(key => ![
|
|
1112
|
-
'root', 'stateDir', 'fingerprint', 'reviewer', '
|
|
1250
|
+
'root', 'stateDir', 'fingerprint', 'reviewer', 'publicationMode', 'readPublished', 'readerId',
|
|
1251
|
+
'readRecordPublished', 'recordReaderId', 'installWriterBinding',
|
|
1113
1252
|
'bindingId', 'partsEnumerator', 'partsEnumeratorId', 'port', 'reuseOnly', 'afterSnapshot', 'afterDirectorySync',
|
|
1114
1253
|
].includes(key))) throw new JobError('JOB_REQUEST_INVALID');
|
|
1115
1254
|
if (copy.partsEnumerator !== undefined) copy.partsEnumerator = {...exactKeys(copy.partsEnumerator, ['version', 'enumerate'])};
|
package/src/job-host.ts
CHANGED
|
@@ -13,11 +13,24 @@ export type {
|
|
|
13
13
|
} from './job-front.ts';
|
|
14
14
|
export type {JobSessionOptions, JobSession} from './job-session.ts';
|
|
15
15
|
export type {JobWorkerOptions} from './job-worker.ts';
|
|
16
|
-
export
|
|
16
|
+
export {prepareJobRecordSource} from './job-source.ts';
|
|
17
|
+
export type {
|
|
18
|
+
JobPublicationReader,
|
|
19
|
+
JobPublishedContext,
|
|
20
|
+
JobRetainedRecordSource,
|
|
21
|
+
JobRetainedSource,
|
|
22
|
+
JobRetainedSourceV3,
|
|
23
|
+
JobRootIdentity,
|
|
24
|
+
} from './job-source.ts';
|
|
25
|
+
export {parseRecordAct} from './job-api.ts';
|
|
26
|
+
export {prepareJobRecordAct} from './job-act.ts';
|
|
17
27
|
export {
|
|
18
28
|
JOB_CAPABILITIES,
|
|
19
29
|
JOB_API_SCHEMA,
|
|
30
|
+
JOB_API_V3_SCHEMA,
|
|
20
31
|
JOB_ACT_SCHEMA,
|
|
32
|
+
JOB_RECORD_ACT_SCHEMA,
|
|
33
|
+
JOB_RECORD_READER_ID,
|
|
21
34
|
JOB_PARTS_ENUMERATOR_RANGE,
|
|
22
35
|
JOB_ENABLED_ACT_KINDS,
|
|
23
36
|
JOB_RESERVED_ACT_KINDS,
|
|
@@ -26,6 +39,16 @@ export {
|
|
|
26
39
|
JOB_ERROR_CODES,
|
|
27
40
|
} from './job-contract.ts';
|
|
28
41
|
export type {
|
|
42
|
+
ActV3,
|
|
43
|
+
AgentRequestV3,
|
|
44
|
+
ApiResponseV3,
|
|
45
|
+
AskRequestV3,
|
|
46
|
+
CloseRequestV3,
|
|
47
|
+
DisplayPublicationV3,
|
|
48
|
+
EventV3,
|
|
49
|
+
FetchActRequestV3,
|
|
50
|
+
JobCapabilitiesV3,
|
|
51
|
+
JobDisplayPublicationV3,
|
|
29
52
|
JobEnabledActKind,
|
|
30
53
|
JobReservedActKind,
|
|
31
54
|
JobActKind,
|
|
@@ -55,33 +78,127 @@ export type {
|
|
|
55
78
|
JobUIActValues,
|
|
56
79
|
JobActSources,
|
|
57
80
|
JobAct,
|
|
81
|
+
JobActV3,
|
|
58
82
|
JobLegacyAct,
|
|
59
83
|
JobRigReviewAct,
|
|
60
84
|
JobRigStill,
|
|
61
85
|
JobRigCapture,
|
|
62
86
|
JobSubject,
|
|
63
87
|
JobPendingAsk,
|
|
88
|
+
JobPendingAskV3,
|
|
89
|
+
JobProjectRecord,
|
|
90
|
+
JobInterviewJson,
|
|
91
|
+
JobInterviewRecord,
|
|
92
|
+
JobInterviewDiagnostic,
|
|
93
|
+
JobInterviewDiagnostics,
|
|
64
94
|
JobPublication,
|
|
95
|
+
JobPublicationMode,
|
|
96
|
+
JobPublicationV3,
|
|
65
97
|
JobStatus,
|
|
98
|
+
JobStatusV3,
|
|
99
|
+
JobPublishResultV3,
|
|
66
100
|
JobPublishRequest,
|
|
101
|
+
JobPublishRequestV3,
|
|
67
102
|
JobAskRequest,
|
|
103
|
+
JobAskRequestV3,
|
|
68
104
|
JobNextRequest,
|
|
105
|
+
JobNextRequestV3,
|
|
69
106
|
JobCloseRequest,
|
|
107
|
+
JobCloseRequestV3,
|
|
70
108
|
JobAgentRequest,
|
|
109
|
+
JobAgentRequestV3,
|
|
71
110
|
JobFetchActRequest,
|
|
111
|
+
JobFetchActRequestV3,
|
|
72
112
|
JobErrorCode,
|
|
73
113
|
JobFailure,
|
|
74
114
|
JobResult,
|
|
75
115
|
JobEvent,
|
|
116
|
+
JobEventV3,
|
|
76
117
|
JobNextValue,
|
|
118
|
+
JobNextValueV3,
|
|
119
|
+
JobOptionContext,
|
|
120
|
+
JobOptionSource,
|
|
121
|
+
JobPlanContext,
|
|
122
|
+
JobPlanSource,
|
|
123
|
+
JobRecordAct,
|
|
124
|
+
JobRecordActKind,
|
|
125
|
+
JobRecordCheckpointSubject,
|
|
126
|
+
JobRecordContextBase,
|
|
127
|
+
JobRecordFreeze,
|
|
128
|
+
JobRecordHostHooks,
|
|
129
|
+
JobRecordOptionResult,
|
|
130
|
+
JobRecordPartsIdentity,
|
|
131
|
+
JobRecordPicksSubject,
|
|
132
|
+
JobRecordPlanResult,
|
|
133
|
+
JobRecordPlanSubject,
|
|
134
|
+
JobRecordPublicationReader,
|
|
135
|
+
JobRecordPublishedContext,
|
|
136
|
+
JobRecordReaderInput,
|
|
137
|
+
JobRecordReopenSubject,
|
|
138
|
+
JobRecordReopenValue,
|
|
139
|
+
JobRecordResult,
|
|
140
|
+
JobRecordSignoffStage,
|
|
141
|
+
JobRecordSignoffSubject,
|
|
142
|
+
JobRecordSignoffValue,
|
|
143
|
+
JobRecordSource,
|
|
144
|
+
JobRecordSourceBase,
|
|
145
|
+
JobRecordSubject,
|
|
146
|
+
JobRecordUIActValues,
|
|
147
|
+
JobRecordUISubmission,
|
|
77
148
|
JobResponseValues,
|
|
149
|
+
JobResponseValuesV3,
|
|
78
150
|
JobApiResponse,
|
|
151
|
+
JobApiResponseV3,
|
|
152
|
+
JobSourceV3,
|
|
79
153
|
JobUISubmission,
|
|
154
|
+
JobUISubmissionV3,
|
|
80
155
|
JobDisplayAcknowledgment,
|
|
81
156
|
JobDisplayReceipt,
|
|
82
157
|
JobDisplayPublication,
|
|
83
158
|
JobHostPorts,
|
|
84
159
|
JobConsumerGrant,
|
|
160
|
+
NextRequestV3,
|
|
161
|
+
NextValueV3,
|
|
162
|
+
OptionContext,
|
|
163
|
+
OptionSource,
|
|
164
|
+
PackageResultV3,
|
|
165
|
+
PendingAskV3,
|
|
166
|
+
PlanContext,
|
|
167
|
+
PlanSource,
|
|
168
|
+
ProjectRecord,
|
|
169
|
+
PublicationV3,
|
|
170
|
+
PublishRequestV3,
|
|
171
|
+
PublishResultV3,
|
|
172
|
+
ReaderValue,
|
|
173
|
+
RecordAct,
|
|
174
|
+
RecordActKind,
|
|
175
|
+
RecordCheckpointSubject,
|
|
176
|
+
RecordContextBase,
|
|
177
|
+
RecordFreeze,
|
|
178
|
+
RecordHostHooks,
|
|
179
|
+
RecordOptionResult,
|
|
180
|
+
RecordPartsIdentity,
|
|
181
|
+
RecordPicksSubject,
|
|
182
|
+
RecordPlanResult,
|
|
183
|
+
RecordPlanSubject,
|
|
184
|
+
RecordPublicationReader,
|
|
185
|
+
RecordPublishedContext,
|
|
186
|
+
RecordReaderInput,
|
|
187
|
+
RecordReopenSubject,
|
|
188
|
+
RecordReopenValue,
|
|
189
|
+
RecordResult,
|
|
190
|
+
RecordSignoffStage,
|
|
191
|
+
RecordSignoffSubject,
|
|
192
|
+
RecordSignoffValue,
|
|
193
|
+
RecordSource,
|
|
194
|
+
RecordSourceBase,
|
|
195
|
+
RecordSubject,
|
|
196
|
+
RecordUIActValues,
|
|
197
|
+
RecordUISubmission,
|
|
198
|
+
ResponseValuesV3,
|
|
199
|
+
SourceV3,
|
|
200
|
+
StatusV3,
|
|
201
|
+
UISubmissionV3,
|
|
85
202
|
} from './job-contract.ts';
|
|
86
203
|
|
|
87
204
|
export {assertJobImageSetCapability} from './job-image-set.ts';
|