@printobserver/sdk 0.16.3 → 0.18.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/dist/contract.d.ts +363 -3
- package/dist/contract.js +915 -5
- package/package.json +2 -2
package/dist/contract.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const CONTRACT_VERSION: string;
|
|
|
18
18
|
* Every operation this client exposes a method for, which is every operation
|
|
19
19
|
* the server declares and no other.
|
|
20
20
|
*/
|
|
21
|
-
export declare const OPERATION_NAMES: readonly ["prints", "status", "context", "image", "history", "events", "manifest_get", "look", "printer_look", "manifest_set", "spools", "spool", "printer_history", "preflight", "pause", "resume", "cancel", "start_print", "set_feedrate_factor", "set_flowrate_factor", "set_tool_target_c", "set_bed_target_c", "set_fan_percent", "acknowledge_failure", "close_print", "register_spool", "load_spool", "unload_spool", "adjust_spool", "retire_spool", "recover_status", "recover_lift", "recover_cool", "recover_fan", "recover_heat", "recover_park", "recover_home_xy", "recover_home_z", "bed_clear"];
|
|
21
|
+
export declare const OPERATION_NAMES: readonly ["prints", "status", "context", "image", "history", "events", "manifest_get", "look", "printer_look", "manifest_set", "spools", "spool", "printer_history", "preflight", "pause", "resume", "cancel", "start_print", "set_feedrate_factor", "set_flowrate_factor", "set_tool_target_c", "set_bed_target_c", "set_fan_percent", "acknowledge_failure", "close_print", "register_spool", "load_spool", "unload_spool", "adjust_spool", "retire_spool", "recover_status", "recover_lift", "recover_cool", "recover_fan", "recover_heat", "recover_park", "recover_home_xy", "recover_home_z", "bed_clear", "recheck_camera", "check_camera", "check_harness"];
|
|
22
22
|
/** What an operator's acknowledgement of a failure event asks for next. */
|
|
23
23
|
export type AcknowledgementDisposition = "continue" | "watch" | "stop";
|
|
24
24
|
/**
|
|
@@ -276,6 +276,19 @@ export interface AgentStopUnactedPayload {
|
|
|
276
276
|
/** What the agent said it saw, as its answer's summary put it. */
|
|
277
277
|
summary: string;
|
|
278
278
|
}
|
|
279
|
+
/** Why a print's alignment failed. */
|
|
280
|
+
export type AlignmentFailure = {
|
|
281
|
+
failure: "offset";
|
|
282
|
+
offset_px: number;
|
|
283
|
+
} | {
|
|
284
|
+
failure: "resolution";
|
|
285
|
+
expected: Array<number>;
|
|
286
|
+
got: Array<number>;
|
|
287
|
+
} | {
|
|
288
|
+
failure: "stream";
|
|
289
|
+
};
|
|
290
|
+
/** What one judgement of a print's first layer came to. */
|
|
291
|
+
export type AlignmentJudgedVerdict = "passed" | "inconclusive" | "failed";
|
|
279
292
|
/**
|
|
280
293
|
* Who may say the bed is clear: the operator, and no other actor.
|
|
281
294
|
*
|
|
@@ -323,6 +336,90 @@ export interface BedTemperature {
|
|
|
323
336
|
*/
|
|
324
337
|
target_c: number | null;
|
|
325
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* One check of the camera's alignment with its calibration, on the empty
|
|
341
|
+
* sheet: the answer to `check_camera` and the record a start names.
|
|
342
|
+
*
|
|
343
|
+
* An answer, so it admits fields beside its own the way every answer of the
|
|
344
|
+
* server does: a client that could not open `image_path` says so in a field
|
|
345
|
+
* of its own beside the rest.
|
|
346
|
+
*/
|
|
347
|
+
export interface CameraCheck {
|
|
348
|
+
/** The bed's height the check was judged at, as given, in millimetres. */
|
|
349
|
+
bed_z_mm: number;
|
|
350
|
+
/** When it was made. */
|
|
351
|
+
checked_at: Timestamp;
|
|
352
|
+
/**
|
|
353
|
+
* The correction a print started under this check is drawn through,
|
|
354
|
+
* its reference the landmarks found on this frame; present only when
|
|
355
|
+
* `aligned`.
|
|
356
|
+
*/
|
|
357
|
+
correction?: ViewCorrection | null;
|
|
358
|
+
/** The stored frame; null when there is none. */
|
|
359
|
+
frame?: ImageRef | null;
|
|
360
|
+
/** The check. */
|
|
361
|
+
id: CameraCheckId;
|
|
362
|
+
/**
|
|
363
|
+
* The absolute path, on the server's host, of the frame with the fitted
|
|
364
|
+
* sheet outline and the landmarks drawn; null when there is no frame.
|
|
365
|
+
*/
|
|
366
|
+
image_path?: string | null;
|
|
367
|
+
/**
|
|
368
|
+
* How many visible landmarks lie beyond the calibration's drift
|
|
369
|
+
* tolerance; null when there was no frame of the calibration's to search.
|
|
370
|
+
*/
|
|
371
|
+
landmarks_moved?: number | null;
|
|
372
|
+
/** What was found and what to do next, in one sentence. */
|
|
373
|
+
message: string;
|
|
374
|
+
/** The translation `aligned` is held to, in pixels. */
|
|
375
|
+
offset_limit_px: number;
|
|
376
|
+
/**
|
|
377
|
+
* The fitted translation's length, in pixels; null when the sheet could
|
|
378
|
+
* not be fitted.
|
|
379
|
+
*/
|
|
380
|
+
offset_px?: number | null;
|
|
381
|
+
/** The residual above which the frame is unjudgeable, in pixels. */
|
|
382
|
+
residual_limit_px: number;
|
|
383
|
+
/**
|
|
384
|
+
* The RMS distance of the sheet's found edges from the translated
|
|
385
|
+
* outline, in pixels; null when the sheet could not be fitted.
|
|
386
|
+
*/
|
|
387
|
+
residual_px?: number | null;
|
|
388
|
+
/** The sheet it was made on. */
|
|
389
|
+
sheet: SheetId;
|
|
390
|
+
/** Why it could not say; null unless the verdict is `unavailable`. */
|
|
391
|
+
unavailable_reason?: UnavailableReason | null;
|
|
392
|
+
/**
|
|
393
|
+
* What the fit could not judge; null unless the reason is `unjudgeable`,
|
|
394
|
+
* so never set on a frame whose landmarks show the camera moved.
|
|
395
|
+
*/
|
|
396
|
+
unjudgeable_cause?: UnjudgeableCause | null;
|
|
397
|
+
/** What it found. */
|
|
398
|
+
verdict: CameraCheckVerdict;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* A lowercase hyphenated version 7 UUID identifying one check of the
|
|
402
|
+
* camera's alignment on the empty build sheet.
|
|
403
|
+
*/
|
|
404
|
+
export type CameraCheckId = string;
|
|
405
|
+
/** Why a start naming a camera check was refused. */
|
|
406
|
+
export type CameraCheckObjection = {
|
|
407
|
+
objection: "unknown";
|
|
408
|
+
} | {
|
|
409
|
+
objection: "not_aligned";
|
|
410
|
+
verdict: CameraCheckVerdict;
|
|
411
|
+
} | {
|
|
412
|
+
objection: "other_sheet";
|
|
413
|
+
checked_on: SheetId;
|
|
414
|
+
declared: SheetId;
|
|
415
|
+
};
|
|
416
|
+
/** What one camera check found. */
|
|
417
|
+
export type CameraCheckVerdict = "aligned" | "not_aligned" | "unavailable";
|
|
418
|
+
/** One camera check, written into the printer timeline. */
|
|
419
|
+
export interface CameraCheckedPayload {
|
|
420
|
+
/** The check, as it was answered. */
|
|
421
|
+
camera_check: CameraCheck;
|
|
422
|
+
}
|
|
326
423
|
/**
|
|
327
424
|
* The camera gave no usable frame for a look or a periodic observation,
|
|
328
425
|
* however many times it was asked.
|
|
@@ -392,6 +489,35 @@ export interface CameraRetryPayload {
|
|
|
392
489
|
/** The HTTP status the camera answered. */
|
|
393
490
|
status: number;
|
|
394
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* One judgement of a print's camera view, on one frame: one for every
|
|
494
|
+
* judgement, whatever it found and whether or not it repeats the last.
|
|
495
|
+
*/
|
|
496
|
+
export interface CameraViewJudgedPayload {
|
|
497
|
+
/** The stored frame it was judged on. */
|
|
498
|
+
frame_sha256: string;
|
|
499
|
+
/** What it found. */
|
|
500
|
+
outcome: ViewOutcome;
|
|
501
|
+
/**
|
|
502
|
+
* Why the frame may not be drawn on: for the three refusals, and for a
|
|
503
|
+
* refit view, whose camera has moved since its calibration; null for an
|
|
504
|
+
* unshifted one.
|
|
505
|
+
*/
|
|
506
|
+
reason?: string | null;
|
|
507
|
+
/** The correction in force when the frame was judged; null when none was. */
|
|
508
|
+
view_correction?: ViewCorrection | null;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* A first-layer pass put a correction in force while the landmarks had moved
|
|
512
|
+
* from the calibration: the print's first, or one taken again after the
|
|
513
|
+
* camera moved again.
|
|
514
|
+
*/
|
|
515
|
+
export interface CameraViewRefitPayload {
|
|
516
|
+
/** The stored frame the correction was taken on. */
|
|
517
|
+
frame_sha256: string;
|
|
518
|
+
/** The correction now in force. */
|
|
519
|
+
view_correction: ViewCorrection;
|
|
520
|
+
}
|
|
395
521
|
/** The durable identity of one debit, so that a replay can never debit twice. */
|
|
396
522
|
export type ChargeKey = {
|
|
397
523
|
key: "print";
|
|
@@ -440,6 +566,19 @@ export interface ChargedFilament {
|
|
|
440
566
|
/** The spool charged. */
|
|
441
567
|
spool_id: SpoolId;
|
|
442
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* The image a print's checks are shown changed: its first check's image, and
|
|
571
|
+
* every check whose image kind or fallback code differs from the last one
|
|
572
|
+
* recorded.
|
|
573
|
+
*/
|
|
574
|
+
export interface CheckImageChangedPayload {
|
|
575
|
+
/** Why it was the whole frame; null for the three-panel image. */
|
|
576
|
+
fallback?: ImageFallback | null;
|
|
577
|
+
/** The stored frame the check's image was made of. */
|
|
578
|
+
frame_sha256: string;
|
|
579
|
+
/** Which image the check was shown. */
|
|
580
|
+
kind: ImageKind;
|
|
581
|
+
}
|
|
443
582
|
/** One mark a spool command cleared, and the spool it was cleared from. */
|
|
444
583
|
export interface ClearedMark {
|
|
445
584
|
/** The reason that no longer stands. */
|
|
@@ -752,6 +891,38 @@ export interface FileTallyRebaselinedPayload {
|
|
|
752
891
|
/** Where it lives, in the printer's own vocabulary. */
|
|
753
892
|
origin: string;
|
|
754
893
|
}
|
|
894
|
+
/** One judgement of a print's first-layer alignment, on one frame. */
|
|
895
|
+
export interface FirstLayerAlignmentJudgedPayload {
|
|
896
|
+
/**
|
|
897
|
+
* The correction the pass put in force, `[dx, dy]` pixels; null unless it
|
|
898
|
+
* passed.
|
|
899
|
+
*/
|
|
900
|
+
correction_px?: Array<number> | null;
|
|
901
|
+
/** The stored frame it was judged on. */
|
|
902
|
+
frame_sha256: string;
|
|
903
|
+
/**
|
|
904
|
+
* The peak smoothed contrast the layer was found at, in grey levels; null
|
|
905
|
+
* when it was not searched for.
|
|
906
|
+
*/
|
|
907
|
+
match_strength?: number | null;
|
|
908
|
+
/**
|
|
909
|
+
* How far the printed first layer was found from its uncorrected
|
|
910
|
+
* projection, in calibration pixels; null when it was not searched for.
|
|
911
|
+
*/
|
|
912
|
+
offset_px?: number | null;
|
|
913
|
+
/**
|
|
914
|
+
* `clearly_found` for a pass, `covered` or `not_clearly_found` for an
|
|
915
|
+
* inconclusive judgement, and the failure's own sentence for a failure.
|
|
916
|
+
*/
|
|
917
|
+
reason: string;
|
|
918
|
+
/** What it came to. */
|
|
919
|
+
verdict: AlignmentJudgedVerdict;
|
|
920
|
+
/**
|
|
921
|
+
* The correction in force when the frame was judged; null before the
|
|
922
|
+
* print's first pass.
|
|
923
|
+
*/
|
|
924
|
+
view_correction?: ViewCorrection | null;
|
|
925
|
+
}
|
|
755
926
|
/**
|
|
756
927
|
* The XY rectangle every extruding move of a file lies inside, in
|
|
757
928
|
* millimetres.
|
|
@@ -783,6 +954,31 @@ export interface GcodeIndexedPayload {
|
|
|
783
954
|
/** How many layers it plans. */
|
|
784
955
|
layers: number;
|
|
785
956
|
}
|
|
957
|
+
/**
|
|
958
|
+
* Whether the supervising agent's harness can run a turn right now, why not
|
|
959
|
+
* when it cannot, and what to do about it.
|
|
960
|
+
*/
|
|
961
|
+
export interface HarnessReadiness {
|
|
962
|
+
/** The configured harness identity, `supervisor.harness`. */
|
|
963
|
+
harness: string;
|
|
964
|
+
/**
|
|
965
|
+
* What to do about it: `printobserver sign-in` when a sign-in would fix
|
|
966
|
+
* it, and a sentence otherwise; null when it is ready.
|
|
967
|
+
*/
|
|
968
|
+
next_step: string | null;
|
|
969
|
+
/** True only when `signed_in` is not `no` and `turn` is `answered`. */
|
|
970
|
+
ready: boolean;
|
|
971
|
+
/** Why it is not ready, in one plain sentence; null when it is. */
|
|
972
|
+
reason: string | null;
|
|
973
|
+
/** Whether the harness's own status command says it is signed in. */
|
|
974
|
+
signed_in: HarnessSignedIn;
|
|
975
|
+
/** What became of the check's one turn. */
|
|
976
|
+
turn: HarnessTurn;
|
|
977
|
+
}
|
|
978
|
+
/** Whether the harness says it is signed in. */
|
|
979
|
+
export type HarnessSignedIn = "yes" | "no" | "unknown";
|
|
980
|
+
/** What became of the check's one turn. */
|
|
981
|
+
export type HarnessTurn = "answered" | "failed" | "not_tried";
|
|
786
982
|
/** One tool heater whose target was above zero. */
|
|
787
983
|
export interface HeatedTool {
|
|
788
984
|
/** Its target, in degrees Celsius. */
|
|
@@ -824,8 +1020,17 @@ export interface ImageAnswer {
|
|
|
824
1020
|
/** The record. */
|
|
825
1021
|
record: ImageRecord;
|
|
826
1022
|
}
|
|
1023
|
+
/** Why a check or a look was shown the whole frame. */
|
|
1024
|
+
export interface ImageFallback {
|
|
1025
|
+
/** The reason, as a code. */
|
|
1026
|
+
code: WholeFrameReasonCode;
|
|
1027
|
+
/** The reason, in the sentence the image's note gives it in. */
|
|
1028
|
+
message: string;
|
|
1029
|
+
}
|
|
827
1030
|
/** A lowercase hyphenated version 7 UUID identifying one image. */
|
|
828
1031
|
export type ImageId = string;
|
|
1032
|
+
/** Which image a check or a look was shown. */
|
|
1033
|
+
export type ImageKind = "three_panel" | "whole_frame";
|
|
829
1034
|
/**
|
|
830
1035
|
* One image, stored beside the event it arrived with.
|
|
831
1036
|
*
|
|
@@ -934,6 +1139,14 @@ export interface JobError {
|
|
|
934
1139
|
export interface JobManifest {
|
|
935
1140
|
/** The range each named adjustable may take, inclusive. */
|
|
936
1141
|
allowed: Record<string, Range>;
|
|
1142
|
+
/**
|
|
1143
|
+
* The camera check, made on this manifest's `sheet` before the print, the
|
|
1144
|
+
* print is drawn through from its first check: a start naming one it
|
|
1145
|
+
* does not find `aligned` on that sheet is refused. Only a start reads
|
|
1146
|
+
* it: a manifest set on a print already started draws as before. A print
|
|
1147
|
+
* naming none draws only once its first layer is clearly found.
|
|
1148
|
+
*/
|
|
1149
|
+
camera_check?: CameraCheckId | null;
|
|
937
1150
|
/** The file this manifest is about, as the slicer named it. */
|
|
938
1151
|
file_name: string;
|
|
939
1152
|
/** The material the job is sliced for. */
|
|
@@ -1001,6 +1214,15 @@ export interface JobSnapshot {
|
|
|
1001
1214
|
/** The state the source reports the job to be in. */
|
|
1002
1215
|
state: PrinterState;
|
|
1003
1216
|
}
|
|
1217
|
+
/** The image a print's last check was shown, and when its frame was captured. */
|
|
1218
|
+
export interface LastCheckImage {
|
|
1219
|
+
/** When the check's frame was captured. */
|
|
1220
|
+
at: Timestamp;
|
|
1221
|
+
/** Why it was the whole frame; null for the three-panel image. */
|
|
1222
|
+
fallback?: ImageFallback | null;
|
|
1223
|
+
/** Which image the check was shown. */
|
|
1224
|
+
kind: ImageKind;
|
|
1225
|
+
}
|
|
1004
1226
|
/**
|
|
1005
1227
|
* What the last print laid down, read from its own G-code up to the last
|
|
1006
1228
|
* file position recorded for it.
|
|
@@ -1049,6 +1271,13 @@ export interface Look {
|
|
|
1049
1271
|
* gave none — which the history records as a port failure.
|
|
1050
1272
|
*/
|
|
1051
1273
|
frame?: ImageRef | null;
|
|
1274
|
+
/**
|
|
1275
|
+
* Why the image at `image_path` is the whole frame; absent for the
|
|
1276
|
+
* three-panel image, with no image, or when what made it gave no reason.
|
|
1277
|
+
*/
|
|
1278
|
+
image_fallback?: ImageFallback | null;
|
|
1279
|
+
/** Which image is at `image_path`; absent with no image. */
|
|
1280
|
+
image_kind?: ImageKind | null;
|
|
1052
1281
|
/**
|
|
1053
1282
|
* What the image at `image_path` is, and why it is that one, in one line;
|
|
1054
1283
|
* absent with no image, or when what made it says nothing.
|
|
@@ -1601,6 +1830,22 @@ export type PrintAction = {
|
|
|
1601
1830
|
outcome: PrintOutcome;
|
|
1602
1831
|
reason: string;
|
|
1603
1832
|
};
|
|
1833
|
+
/**
|
|
1834
|
+
* One print's first-layer alignment verdict, as it is kept under the state
|
|
1835
|
+
* directory — which the real-print suite's record reads.
|
|
1836
|
+
*/
|
|
1837
|
+
export type PrintAlignment = {
|
|
1838
|
+
verdict: "unavailable";
|
|
1839
|
+
} | {
|
|
1840
|
+
verdict: "pending";
|
|
1841
|
+
} | {
|
|
1842
|
+
verdict: "passed";
|
|
1843
|
+
correction_px?: Array<number>;
|
|
1844
|
+
offset_px: number;
|
|
1845
|
+
} | {
|
|
1846
|
+
verdict: "failed";
|
|
1847
|
+
reason: AlignmentFailure;
|
|
1848
|
+
};
|
|
1604
1849
|
/** One print's end, as its `print_ended` event stored it. */
|
|
1605
1850
|
export interface PrintEnded {
|
|
1606
1851
|
/** The `print_ended` event. */
|
|
@@ -1693,6 +1938,11 @@ export interface PrintSegmentKey {
|
|
|
1693
1938
|
}
|
|
1694
1939
|
/** A print started. */
|
|
1695
1940
|
export interface PrintStartedPayload {
|
|
1941
|
+
/**
|
|
1942
|
+
* The camera check its manifest named, which every check of the print is
|
|
1943
|
+
* drawn through; absent when it named none.
|
|
1944
|
+
*/
|
|
1945
|
+
camera_check?: CameraCheckId | null;
|
|
1696
1946
|
/** The file being printed, when it is known. */
|
|
1697
1947
|
file_name?: string | null;
|
|
1698
1948
|
/** The spool loaded on each tool as it started. */
|
|
@@ -1798,6 +2048,27 @@ export interface Range {
|
|
|
1798
2048
|
export type RawBytes = string;
|
|
1799
2049
|
/** What became of the prints a file's new tally generation counts. */
|
|
1800
2050
|
export type RebaselineDisposition = "accounted" | "unverified";
|
|
2051
|
+
/** What judging a print's camera again on a fresh frame answers. */
|
|
2052
|
+
export interface RecheckCameraAnswer {
|
|
2053
|
+
/** The print's first-layer alignment once judged. */
|
|
2054
|
+
alignment: PrintAlignment;
|
|
2055
|
+
/**
|
|
2056
|
+
* The absolute path of the fresh frame on this server's own filesystem,
|
|
2057
|
+
* stored with the first record of its judgement. This server always
|
|
2058
|
+
* answers it; a client that finds it names no file on its own host
|
|
2059
|
+
* answers why in its place, as it does every image path.
|
|
2060
|
+
*/
|
|
2061
|
+
frame_path?: string;
|
|
2062
|
+
/**
|
|
2063
|
+
* Why that image would be the whole frame; null for the three-panel
|
|
2064
|
+
* image.
|
|
2065
|
+
*/
|
|
2066
|
+
image_fallback?: ImageFallback | null;
|
|
2067
|
+
/** Which image a check of the print would be shown of this frame. */
|
|
2068
|
+
image_kind: ImageKind;
|
|
2069
|
+
/** The correction in force once judged; null when none is. */
|
|
2070
|
+
view_correction?: ViewCorrection | null;
|
|
2071
|
+
}
|
|
1801
2072
|
/**
|
|
1802
2073
|
* The whole recovery vocabulary, and there is no other.
|
|
1803
2074
|
*
|
|
@@ -1996,6 +2267,18 @@ export interface RecoveryTemperatures {
|
|
|
1996
2267
|
/** Each tool. */
|
|
1997
2268
|
tools: Array<ToolTemperature>;
|
|
1998
2269
|
}
|
|
2270
|
+
/**
|
|
2271
|
+
* One landmark of a correction's reference: where it was found on the frame
|
|
2272
|
+
* the correction was taken on.
|
|
2273
|
+
*/
|
|
2274
|
+
export interface ReferenceLandmark {
|
|
2275
|
+
/** The calibration's name for it. */
|
|
2276
|
+
name: string;
|
|
2277
|
+
/** How far from its calibrated place it was found, `[dx, dy]` pixels. */
|
|
2278
|
+
offset_px: Array<number>;
|
|
2279
|
+
/** The correlation it was found at. */
|
|
2280
|
+
score: number;
|
|
2281
|
+
}
|
|
1999
2282
|
/**
|
|
2000
2283
|
* Why a request was refused.
|
|
2001
2284
|
*
|
|
@@ -2058,7 +2341,12 @@ export type RejectionReason = {
|
|
|
2058
2341
|
sheet_refused: {
|
|
2059
2342
|
objection: SheetObjection;
|
|
2060
2343
|
};
|
|
2061
|
-
} | "sheet_not_declared" |
|
|
2344
|
+
} | "sheet_not_declared" | {
|
|
2345
|
+
camera_check_refused: {
|
|
2346
|
+
camera_check: CameraCheckId;
|
|
2347
|
+
objection: CameraCheckObjection;
|
|
2348
|
+
};
|
|
2349
|
+
} | "print_already_ended" | {
|
|
2062
2350
|
print_still_active: {
|
|
2063
2351
|
state: PrinterState;
|
|
2064
2352
|
};
|
|
@@ -2578,6 +2866,11 @@ export interface StatusAnswer {
|
|
|
2578
2866
|
interventions: Array<Intervention>;
|
|
2579
2867
|
/** The job, when a snapshot could be taken. */
|
|
2580
2868
|
job?: JobSnapshot | null;
|
|
2869
|
+
/**
|
|
2870
|
+
* The image the print's last check was shown, when its frame was
|
|
2871
|
+
* captured and why it was the whole frame; null before its first check.
|
|
2872
|
+
*/
|
|
2873
|
+
last_check_image?: LastCheckImage | null;
|
|
2581
2874
|
/**
|
|
2582
2875
|
* The changes the print's G-code plans, the one the printer waits at and
|
|
2583
2876
|
* the colour expected where its job stands; absent when the file plans
|
|
@@ -2695,6 +2988,10 @@ export interface UnattendedPrinterActivityPayload {
|
|
|
2695
2988
|
/** Every tool whose target is above zero. */
|
|
2696
2989
|
tools: Array<HeatedTool>;
|
|
2697
2990
|
}
|
|
2991
|
+
/** Why a camera check could not say whether the camera is aligned. */
|
|
2992
|
+
export type UnavailableReason = "no_frame" | "look_failed" | "frame_mismatch" | "no_calibration" | "unjudgeable";
|
|
2993
|
+
/** Why a frame could not show whether the camera is aligned. */
|
|
2994
|
+
export type UnjudgeableCause = "too_little_sheet_in_view" | "no_sheet_found" | "sheet_occluded" | "landmarks_hidden" | "fit_inconsistent";
|
|
2698
2995
|
/** One reason a spool's figure is in doubt, and since when. */
|
|
2699
2996
|
export interface UnverifiedMark {
|
|
2700
2997
|
/** Why the figure is in doubt. */
|
|
@@ -2721,6 +3018,38 @@ export type UnverifiedReason = {
|
|
|
2721
3018
|
file_name: string;
|
|
2722
3019
|
origin: string;
|
|
2723
3020
|
};
|
|
3021
|
+
/** How a print's drawings map the calibrated view onto the current frame. */
|
|
3022
|
+
export interface ViewCorrection {
|
|
3023
|
+
/**
|
|
3024
|
+
* The landmarks found agreeing on the frame the correction was taken on,
|
|
3025
|
+
* which later frames are compared against.
|
|
3026
|
+
*/
|
|
3027
|
+
landmarks: Array<ReferenceLandmark>;
|
|
3028
|
+
/**
|
|
3029
|
+
* Maps a pixel of the calibrated view to the current frame, in
|
|
3030
|
+
* homogeneous coordinates, row by row.
|
|
3031
|
+
*/
|
|
3032
|
+
matrix: Array<Array<number>>;
|
|
3033
|
+
/** The model `matrix` is of. */
|
|
3034
|
+
model: ViewModel;
|
|
3035
|
+
/**
|
|
3036
|
+
* The RMS distance between those landmarks' offsets and the correction's
|
|
3037
|
+
* shift, in pixels: how far the landmarks disagree with the part.
|
|
3038
|
+
*/
|
|
3039
|
+
residual_px: number;
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3042
|
+
* The model a `ViewCorrection` maps pixels by. Only `Self::Translation`
|
|
3043
|
+
* is ever written.
|
|
3044
|
+
*/
|
|
3045
|
+
export type ViewModel = "translation" | "similarity" | "affine" | "homography";
|
|
3046
|
+
/** What one judgement of the view found. */
|
|
3047
|
+
export type ViewOutcome = "unshifted" | "refit" | "landmarks_not_found" | "view_refit_rejected" | "frame_mismatch";
|
|
3048
|
+
/**
|
|
3049
|
+
* Why a check or a look was shown the whole frame: one code per reason the
|
|
3050
|
+
* server gives one.
|
|
3051
|
+
*/
|
|
3052
|
+
export type WholeFrameReasonCode = "no_print" | "no_calibration" | "no_stream" | "no_position" | "no_object" | "no_layer" | "toolpath_unread" | "alignment_pending" | "alignment_inconclusive" | "alignment_unavailable" | "alignment_failed" | "landmarks_not_found" | "view_refit_rejected" | "calibration_stale" | "frame_mismatch" | "paused" | "refused";
|
|
2724
3053
|
/** Where the machine homes Z, and whether doing so sweeps the bed. */
|
|
2725
3054
|
export interface ZHome {
|
|
2726
3055
|
/** Whether homing Z brings a gantry down over the whole bed. */
|
|
@@ -2748,16 +3077,21 @@ export interface EventPayloads {
|
|
|
2748
3077
|
agent_assessment: AgentAssessmentPayload;
|
|
2749
3078
|
agent_stop_unacted: AgentStopUnactedPayload;
|
|
2750
3079
|
bed_clear_asserted: BedClearAssertedPayload;
|
|
3080
|
+
camera_checked: CameraCheckedPayload;
|
|
2751
3081
|
camera_degraded: CameraDegradedPayload;
|
|
2752
3082
|
camera_look: CameraLookPayload;
|
|
2753
3083
|
camera_retry: CameraRetryPayload;
|
|
3084
|
+
camera_view_judged: CameraViewJudgedPayload;
|
|
3085
|
+
camera_view_refit: CameraViewRefitPayload;
|
|
2754
3086
|
charge_pended: ChargePendedPayload;
|
|
3087
|
+
check_image_changed: CheckImageChangedPayload;
|
|
2755
3088
|
detector_health_changed: DetectorHealthChangedPayload;
|
|
2756
3089
|
filament_change_planned_reached: FilamentChangePlannedReachedPayload;
|
|
2757
3090
|
filament_change_planned_resumed: FilamentChangePlannedResumedPayload;
|
|
2758
3091
|
filament_change_signalled: FilamentChangeSignalledPayload;
|
|
2759
3092
|
filament_consumed: FilamentConsumedPayload;
|
|
2760
3093
|
file_tally_rebaselined: FileTallyRebaselinedPayload;
|
|
3094
|
+
first_layer_alignment_judged: FirstLayerAlignmentJudgedPayload;
|
|
2761
3095
|
gcode_indexed: GcodeIndexedPayload;
|
|
2762
3096
|
intervention_expired: InterventionExpiredPayload;
|
|
2763
3097
|
malformed_external_event: MalformedExternalEventPayload;
|
|
@@ -2789,7 +3123,7 @@ export interface EventPayloads {
|
|
|
2789
3123
|
unattended_printer_activity: UnattendedPrinterActivityPayload;
|
|
2790
3124
|
}
|
|
2791
3125
|
/** Every kind the server declares a payload type for, in name order. */
|
|
2792
|
-
export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "agent_stop_unacted", "bed_clear_asserted", "camera_degraded", "camera_look", "camera_retry", "charge_pended", "detector_health_changed", "filament_change_planned_reached", "filament_change_planned_resumed", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "gcode_indexed", "intervention_expired", "malformed_external_event", "obico_failure_alert", "obico_printer_notification", "operator_acknowledgement", "periodic_observation", "port_failure", "preflight_checked", "print_ended", "print_started", "print_untracked", "printer_connection_changed", "printer_reset", "recovery_executed", "recovery_rejected", "recovery_requested", "spool_adjusted", "spool_command_rejected", "spool_loaded", "spool_registered", "spool_retired", "spool_unloaded", "spool_unverified", "startup_reconciliation", "supervision_session_closed", "supervision_session_opened", "unaccounted_print", "unattended_printer_activity"];
|
|
3126
|
+
export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "agent_stop_unacted", "bed_clear_asserted", "camera_checked", "camera_degraded", "camera_look", "camera_retry", "camera_view_judged", "camera_view_refit", "charge_pended", "check_image_changed", "detector_health_changed", "filament_change_planned_reached", "filament_change_planned_resumed", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "first_layer_alignment_judged", "gcode_indexed", "intervention_expired", "malformed_external_event", "obico_failure_alert", "obico_printer_notification", "operator_acknowledgement", "periodic_observation", "port_failure", "preflight_checked", "print_ended", "print_started", "print_untracked", "printer_connection_changed", "printer_reset", "recovery_executed", "recovery_rejected", "recovery_requested", "spool_adjusted", "spool_command_rejected", "spool_loaded", "spool_registered", "spool_retired", "spool_unloaded", "spool_unverified", "startup_reconciliation", "supervision_session_closed", "supervision_session_opened", "unaccounted_print", "unattended_printer_activity"];
|
|
2793
3127
|
/**
|
|
2794
3128
|
* The payload of one event as the type its kind declares, or `undefined` for
|
|
2795
3129
|
* an event of any other kind — one this client knows or one it does not. No
|
|
@@ -3173,4 +3507,30 @@ export declare class GeneratedClient extends GeneratedSurface {
|
|
|
3173
3507
|
* the reason, the value asked for and the range allowed.
|
|
3174
3508
|
*/
|
|
3175
3509
|
bedClear(reason: string): Promise<BedClearAnswer>;
|
|
3510
|
+
/**
|
|
3511
|
+
* Call `recheck_camera` on the configured supervisor.
|
|
3512
|
+
*
|
|
3513
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3514
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3515
|
+
* said no. A call whose reason is empty is refused here, before a request
|
|
3516
|
+
* is made, and the policy's own refusal arrives as `Rejected`, carrying
|
|
3517
|
+
* the reason, the value asked for and the range allowed.
|
|
3518
|
+
*/
|
|
3519
|
+
recheckCamera(printId: string, reason: string): Promise<RecheckCameraAnswer>;
|
|
3520
|
+
/**
|
|
3521
|
+
* Call `check_camera` on the configured supervisor.
|
|
3522
|
+
*
|
|
3523
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3524
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3525
|
+
* said no.
|
|
3526
|
+
*/
|
|
3527
|
+
checkCamera(sheet: SheetId, bedZMm: number): Promise<CameraCheck>;
|
|
3528
|
+
/**
|
|
3529
|
+
* Call `check_harness` on the configured supervisor.
|
|
3530
|
+
*
|
|
3531
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3532
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3533
|
+
* said no.
|
|
3534
|
+
*/
|
|
3535
|
+
checkHarness(): Promise<HarnessReadiness>;
|
|
3176
3536
|
}
|