@printobserver/sdk 0.17.0 → 0.20.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 +340 -77
- package/dist/contract.js +817 -257
- 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", "recheck_camera"];
|
|
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
|
/**
|
|
@@ -154,6 +154,16 @@ export interface AgentAssessment {
|
|
|
154
154
|
export interface AgentAssessmentPayload {
|
|
155
155
|
/** What the agent answered with. */
|
|
156
156
|
assessment: AgentAssessment;
|
|
157
|
+
/**
|
|
158
|
+
* The image the turn was handed, and the event it was the check of;
|
|
159
|
+
* absent when the turn was handed none.
|
|
160
|
+
*
|
|
161
|
+
* Every check image is a file of its own, never written over by a
|
|
162
|
+
* later check, so this names the exact bytes this turn judged however
|
|
163
|
+
* many turns ran after it. A turn reads it nowhere: its own
|
|
164
|
+
* conversation holds the image it was handed.
|
|
165
|
+
*/
|
|
166
|
+
check_image?: TurnCheckImage | null;
|
|
157
167
|
/** The session the turn ran in. */
|
|
158
168
|
session_name: string;
|
|
159
169
|
}
|
|
@@ -213,7 +223,7 @@ export interface AgentContext {
|
|
|
213
223
|
*/
|
|
214
224
|
recent_events: Array<AgentEvent>;
|
|
215
225
|
/** What the slicer planned at the job's current file position. */
|
|
216
|
-
slicer?:
|
|
226
|
+
slicer?: AgentSlicerPlan | null;
|
|
217
227
|
}
|
|
218
228
|
/**
|
|
219
229
|
* One event of the print's, as a turn reads it: what happened, when, and the
|
|
@@ -243,6 +253,35 @@ export interface AgentHeater {
|
|
|
243
253
|
/** The temperature it is driving towards. */
|
|
244
254
|
target_c?: number | null;
|
|
245
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* One stop the print's own G-code plans, as a turn reads it: `PlannedChange`
|
|
258
|
+
* numbered the way a person counts a print's changes, the first being 1.
|
|
259
|
+
*
|
|
260
|
+
* The record a change is kept under counts from 0, as the file's own order
|
|
261
|
+
* does; a turn is never handed that count, so that the number it reads and
|
|
262
|
+
* the
|
|
263
|
+
* number it says are the ones the operator says.
|
|
264
|
+
*/
|
|
265
|
+
export interface AgentPlannedChange {
|
|
266
|
+
/**
|
|
267
|
+
* The colour loaded at it, as `#RRGGBB` in upper case; null for an
|
|
268
|
+
* `M601`, and for an `M600` whose file names no colour.
|
|
269
|
+
*/
|
|
270
|
+
color: string | null;
|
|
271
|
+
/** What it stops the print for. */
|
|
272
|
+
kind: PlannedChangeKind;
|
|
273
|
+
/**
|
|
274
|
+
* The first layer printed after it, counting the first as 1: the layer
|
|
275
|
+
* whose `;Z:` is the change's height.
|
|
276
|
+
*/
|
|
277
|
+
layer: number;
|
|
278
|
+
/** Its number among the file's changes, counting from 1 in file order. */
|
|
279
|
+
number: number;
|
|
280
|
+
/** The byte offset of the first byte of its `M600` or `M601` line. */
|
|
281
|
+
offset_bytes: number;
|
|
282
|
+
/** That layer's height, in millimetres. */
|
|
283
|
+
z_mm: number;
|
|
284
|
+
}
|
|
246
285
|
/** The print a context is about. */
|
|
247
286
|
export interface AgentPrint {
|
|
248
287
|
/** Why it ended, once it has. */
|
|
@@ -259,6 +298,75 @@ export interface AgentPrinter {
|
|
|
259
298
|
/** Each tool's heater, in order. */
|
|
260
299
|
tools?: Array<AgentHeater>;
|
|
261
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* What the slicer planned at the job's current file position, as a turn
|
|
303
|
+
* reads
|
|
304
|
+
* it: `SlicerPlan` with each planned change an `AgentPlannedChange`.
|
|
305
|
+
*/
|
|
306
|
+
export interface AgentSlicerPlan {
|
|
307
|
+
/** Each setting in force the plan at this height says is wrong. */
|
|
308
|
+
at_odds?: Array<PlanMismatch>;
|
|
309
|
+
/**
|
|
310
|
+
* The planned change the printer is waiting at now, for a person to
|
|
311
|
+
* finish; absent when it is waiting at none.
|
|
312
|
+
*/
|
|
313
|
+
change_waiting?: AgentPlannedChange | null;
|
|
314
|
+
/**
|
|
315
|
+
* The colour the print should be laying at the current position, as
|
|
316
|
+
* `#RRGGBB`; absent when the file plans no change or names no colour
|
|
317
|
+
* there.
|
|
318
|
+
*/
|
|
319
|
+
expected_color?: string | null;
|
|
320
|
+
/** The part-cooling fan speed, in percent. */
|
|
321
|
+
fan_percent?: SetValue | null;
|
|
322
|
+
/** The final layer's height, in millimetres. */
|
|
323
|
+
final_z_mm?: number | null;
|
|
324
|
+
/** The flow factor, one meaning one hundred percent. */
|
|
325
|
+
flow_factor?: SetValue | null;
|
|
326
|
+
/**
|
|
327
|
+
* The layer the print is in, counting the first as 1; absent before the
|
|
328
|
+
* first.
|
|
329
|
+
*/
|
|
330
|
+
layer?: number | null;
|
|
331
|
+
/** The slicer's own estimate of the minutes left, at the current position. */
|
|
332
|
+
minutes_left?: number | null;
|
|
333
|
+
/**
|
|
334
|
+
* The slicer's own count of the minutes to that change, from the latest
|
|
335
|
+
* `M73 C` the position has reached; absent when there is no next change
|
|
336
|
+
* or no count.
|
|
337
|
+
*/
|
|
338
|
+
minutes_to_next_change?: number | null;
|
|
339
|
+
/**
|
|
340
|
+
* The next change the file plans after the current position; absent when
|
|
341
|
+
* it plans none there.
|
|
342
|
+
*/
|
|
343
|
+
next_change?: AgentPlannedChange | null;
|
|
344
|
+
/** How many objects the file lays down; absent when it labels none. */
|
|
345
|
+
object_count?: number | null;
|
|
346
|
+
/**
|
|
347
|
+
* The bed area each object the file lays down covers, unnamed, as
|
|
348
|
+
* `[x_min, y_min, x_max, y_max]` in whole millimetres, in the order of
|
|
349
|
+
* the file's object numbers.
|
|
350
|
+
*/
|
|
351
|
+
objects?: Array<Array<number>>;
|
|
352
|
+
/**
|
|
353
|
+
* How far the plan has risen since an earlier frame; absent before any
|
|
354
|
+
* frame is half an hour old.
|
|
355
|
+
*/
|
|
356
|
+
rise?: Rise | null;
|
|
357
|
+
/**
|
|
358
|
+
* What the current layer lays material as, in the order the file first
|
|
359
|
+
* names each: `Perimeter`, `Support material`, `Bridge infill`.
|
|
360
|
+
*/
|
|
361
|
+
types?: Array<string>;
|
|
362
|
+
/**
|
|
363
|
+
* The facts the file does not state, which are therefore unknown rather
|
|
364
|
+
* than absent.
|
|
365
|
+
*/
|
|
366
|
+
unknown?: Array<PlanFact>;
|
|
367
|
+
/** The current layer's height, in millimetres. */
|
|
368
|
+
z_mm?: number | null;
|
|
369
|
+
}
|
|
262
370
|
/**
|
|
263
371
|
* The agent answered that a running print should stop, and asked for no
|
|
264
372
|
* pause or cancel — not even when asked again — so nothing stopped it.
|
|
@@ -336,6 +444,90 @@ export interface BedTemperature {
|
|
|
336
444
|
*/
|
|
337
445
|
target_c: number | null;
|
|
338
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* One check of the camera's alignment with its calibration, on the empty
|
|
449
|
+
* sheet: the answer to `check_camera` and the record a start names.
|
|
450
|
+
*
|
|
451
|
+
* An answer, so it admits fields beside its own the way every answer of the
|
|
452
|
+
* server does: a client that could not open `image_path` says so in a field
|
|
453
|
+
* of its own beside the rest.
|
|
454
|
+
*/
|
|
455
|
+
export interface CameraCheck {
|
|
456
|
+
/** The bed's height the check was judged at, as given, in millimetres. */
|
|
457
|
+
bed_z_mm: number;
|
|
458
|
+
/** When it was made. */
|
|
459
|
+
checked_at: Timestamp;
|
|
460
|
+
/**
|
|
461
|
+
* The correction a print started under this check is drawn through,
|
|
462
|
+
* its reference the landmarks found on this frame; present only when
|
|
463
|
+
* `aligned`.
|
|
464
|
+
*/
|
|
465
|
+
correction?: ViewCorrection | null;
|
|
466
|
+
/** The stored frame; null when there is none. */
|
|
467
|
+
frame?: ImageRef | null;
|
|
468
|
+
/** The check. */
|
|
469
|
+
id: CameraCheckId;
|
|
470
|
+
/**
|
|
471
|
+
* The absolute path, on the server's host, of the frame with the fitted
|
|
472
|
+
* sheet outline and the landmarks drawn; null when there is no frame.
|
|
473
|
+
*/
|
|
474
|
+
image_path?: string | null;
|
|
475
|
+
/**
|
|
476
|
+
* How many visible landmarks lie beyond the calibration's drift
|
|
477
|
+
* tolerance; null when there was no frame of the calibration's to search.
|
|
478
|
+
*/
|
|
479
|
+
landmarks_moved?: number | null;
|
|
480
|
+
/** What was found and what to do next, in one sentence. */
|
|
481
|
+
message: string;
|
|
482
|
+
/** The translation `aligned` is held to, in pixels. */
|
|
483
|
+
offset_limit_px: number;
|
|
484
|
+
/**
|
|
485
|
+
* The fitted translation's length, in pixels; null when the sheet could
|
|
486
|
+
* not be fitted.
|
|
487
|
+
*/
|
|
488
|
+
offset_px?: number | null;
|
|
489
|
+
/** The residual above which the frame is unjudgeable, in pixels. */
|
|
490
|
+
residual_limit_px: number;
|
|
491
|
+
/**
|
|
492
|
+
* The RMS distance of the sheet's found edges from the translated
|
|
493
|
+
* outline, in pixels; null when the sheet could not be fitted.
|
|
494
|
+
*/
|
|
495
|
+
residual_px?: number | null;
|
|
496
|
+
/** The sheet it was made on. */
|
|
497
|
+
sheet: SheetId;
|
|
498
|
+
/** Why it could not say; null unless the verdict is `unavailable`. */
|
|
499
|
+
unavailable_reason?: UnavailableReason | null;
|
|
500
|
+
/**
|
|
501
|
+
* What the fit could not judge; null unless the reason is `unjudgeable`,
|
|
502
|
+
* so never set on a frame whose landmarks show the camera moved.
|
|
503
|
+
*/
|
|
504
|
+
unjudgeable_cause?: UnjudgeableCause | null;
|
|
505
|
+
/** What it found. */
|
|
506
|
+
verdict: CameraCheckVerdict;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* A lowercase hyphenated version 7 UUID identifying one check of the
|
|
510
|
+
* camera's alignment on the empty build sheet.
|
|
511
|
+
*/
|
|
512
|
+
export type CameraCheckId = string;
|
|
513
|
+
/** Why a start naming a camera check was refused. */
|
|
514
|
+
export type CameraCheckObjection = {
|
|
515
|
+
objection: "unknown";
|
|
516
|
+
} | {
|
|
517
|
+
objection: "not_aligned";
|
|
518
|
+
verdict: CameraCheckVerdict;
|
|
519
|
+
} | {
|
|
520
|
+
objection: "other_sheet";
|
|
521
|
+
checked_on: SheetId;
|
|
522
|
+
declared: SheetId;
|
|
523
|
+
};
|
|
524
|
+
/** What one camera check found. */
|
|
525
|
+
export type CameraCheckVerdict = "aligned" | "not_aligned" | "unavailable";
|
|
526
|
+
/** One camera check, written into the printer timeline. */
|
|
527
|
+
export interface CameraCheckedPayload {
|
|
528
|
+
/** The check, as it was answered. */
|
|
529
|
+
camera_check: CameraCheck;
|
|
530
|
+
}
|
|
339
531
|
/**
|
|
340
532
|
* The camera gave no usable frame for a look or a periodic observation,
|
|
341
533
|
* however many times it was asked.
|
|
@@ -408,10 +600,20 @@ export interface CameraRetryPayload {
|
|
|
408
600
|
/**
|
|
409
601
|
* One judgement of a print's camera view, on one frame: one for every
|
|
410
602
|
* judgement, whatever it found and whether or not it repeats the last.
|
|
603
|
+
*
|
|
604
|
+
* `view_correction` is what the frame was judged *against*, so it repeats
|
|
605
|
+
* from check to check for as long as one correction stays in force;
|
|
606
|
+
* `landmarks` and `residual_px` are what was measured on *this* frame.
|
|
411
607
|
*/
|
|
412
608
|
export interface CameraViewJudgedPayload {
|
|
413
609
|
/** The stored frame it was judged on. */
|
|
414
610
|
frame_sha256: string;
|
|
611
|
+
/**
|
|
612
|
+
* Every landmark of the calibration as this frame showed it, in the
|
|
613
|
+
* calibration's order; absent when the frame could not be searched, as
|
|
614
|
+
* one of another size or stream cannot.
|
|
615
|
+
*/
|
|
616
|
+
landmarks?: Array<JudgedLandmark>;
|
|
415
617
|
/** What it found. */
|
|
416
618
|
outcome: ViewOutcome;
|
|
417
619
|
/**
|
|
@@ -420,7 +622,25 @@ export interface CameraViewJudgedPayload {
|
|
|
420
622
|
* unshifted one.
|
|
421
623
|
*/
|
|
422
624
|
reason?: string | null;
|
|
423
|
-
/**
|
|
625
|
+
/**
|
|
626
|
+
* The RMS distance, over this frame's visible landmarks, between where
|
|
627
|
+
* it showed them and where the judgement expected them: the correction
|
|
628
|
+
* in force's reference, over the landmarks it names, or each landmark's
|
|
629
|
+
* calibrated place when none is in force. Absent when no landmark it
|
|
630
|
+
* compared was visible.
|
|
631
|
+
*/
|
|
632
|
+
residual_px?: number | null;
|
|
633
|
+
/**
|
|
634
|
+
* The version of this record: the schema's maximum for every record
|
|
635
|
+
* this server writes, and 1 for a record stating none, which was written
|
|
636
|
+
* before `landmarks` and `residual_px` existed.
|
|
637
|
+
*/
|
|
638
|
+
schema_version?: number;
|
|
639
|
+
/**
|
|
640
|
+
* The correction in force when the frame was judged; null when none was.
|
|
641
|
+
* Its landmarks are the reference this frame was compared against, found
|
|
642
|
+
* on the frame the correction was taken on rather than on this one.
|
|
643
|
+
*/
|
|
424
644
|
view_correction?: ViewCorrection | null;
|
|
425
645
|
}
|
|
426
646
|
/**
|
|
@@ -870,6 +1090,31 @@ export interface GcodeIndexedPayload {
|
|
|
870
1090
|
/** How many layers it plans. */
|
|
871
1091
|
layers: number;
|
|
872
1092
|
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Whether the supervising agent's harness can run a turn right now, why not
|
|
1095
|
+
* when it cannot, and what to do about it.
|
|
1096
|
+
*/
|
|
1097
|
+
export interface HarnessReadiness {
|
|
1098
|
+
/** The configured harness identity, `supervisor.harness`. */
|
|
1099
|
+
harness: string;
|
|
1100
|
+
/**
|
|
1101
|
+
* What to do about it: `printobserver sign-in` when a sign-in would fix
|
|
1102
|
+
* it, and a sentence otherwise; null when it is ready.
|
|
1103
|
+
*/
|
|
1104
|
+
next_step: string | null;
|
|
1105
|
+
/** True only when `signed_in` is not `no` and `turn` is `answered`. */
|
|
1106
|
+
ready: boolean;
|
|
1107
|
+
/** Why it is not ready, in one plain sentence; null when it is. */
|
|
1108
|
+
reason: string | null;
|
|
1109
|
+
/** Whether the harness's own status command says it is signed in. */
|
|
1110
|
+
signed_in: HarnessSignedIn;
|
|
1111
|
+
/** What became of the check's one turn. */
|
|
1112
|
+
turn: HarnessTurn;
|
|
1113
|
+
}
|
|
1114
|
+
/** Whether the harness says it is signed in. */
|
|
1115
|
+
export type HarnessSignedIn = "yes" | "no" | "unknown";
|
|
1116
|
+
/** What became of the check's one turn. */
|
|
1117
|
+
export type HarnessTurn = "answered" | "failed" | "not_tried";
|
|
873
1118
|
/** One tool heater whose target was above zero. */
|
|
874
1119
|
export interface HeatedTool {
|
|
875
1120
|
/** Its target, in degrees Celsius. */
|
|
@@ -1030,6 +1275,14 @@ export interface JobError {
|
|
|
1030
1275
|
export interface JobManifest {
|
|
1031
1276
|
/** The range each named adjustable may take, inclusive. */
|
|
1032
1277
|
allowed: Record<string, Range>;
|
|
1278
|
+
/**
|
|
1279
|
+
* The camera check, made on this manifest's `sheet` before the print, the
|
|
1280
|
+
* print is drawn through from its first check: a start naming one it
|
|
1281
|
+
* does not find `aligned` on that sheet is refused. Only a start reads
|
|
1282
|
+
* it: a manifest set on a print already started draws as before. A print
|
|
1283
|
+
* naming none draws only once its first layer is clearly found.
|
|
1284
|
+
*/
|
|
1285
|
+
camera_check?: CameraCheckId | null;
|
|
1033
1286
|
/** The file this manifest is about, as the slicer named it. */
|
|
1034
1287
|
file_name: string;
|
|
1035
1288
|
/** The material the job is sliced for. */
|
|
@@ -1097,6 +1350,30 @@ export interface JobSnapshot {
|
|
|
1097
1350
|
/** The state the source reports the job to be in. */
|
|
1098
1351
|
state: PrinterState;
|
|
1099
1352
|
}
|
|
1353
|
+
/** One landmark of the calibration as one judged frame showed it. */
|
|
1354
|
+
export interface JudgedLandmark {
|
|
1355
|
+
/**
|
|
1356
|
+
* How far it lies from where the correction in force's reference had it,
|
|
1357
|
+
* in pixels; absent when no correction is in force or its reference does
|
|
1358
|
+
* not name this landmark.
|
|
1359
|
+
*/
|
|
1360
|
+
from_reference_px?: number | null;
|
|
1361
|
+
/** The calibration's name for it. */
|
|
1362
|
+
name: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* How far from its calibrated place this frame showed it, `[dx, dy]`
|
|
1365
|
+
* pixels.
|
|
1366
|
+
*/
|
|
1367
|
+
offset_px: Array<number>;
|
|
1368
|
+
/** The correlation it was found at. */
|
|
1369
|
+
score: number;
|
|
1370
|
+
/**
|
|
1371
|
+
* Whether it was found at all, rather than hidden by the head, the
|
|
1372
|
+
* gantry or a part; a hidden landmark's offset is where its search
|
|
1373
|
+
* scored best, and counts for nothing.
|
|
1374
|
+
*/
|
|
1375
|
+
visible: boolean;
|
|
1376
|
+
}
|
|
1100
1377
|
/** The image a print's last check was shown, and when its frame was captured. */
|
|
1101
1378
|
export interface LastCheckImage {
|
|
1102
1379
|
/** When the check's frame was captured. */
|
|
@@ -1821,6 +2098,11 @@ export interface PrintSegmentKey {
|
|
|
1821
2098
|
}
|
|
1822
2099
|
/** A print started. */
|
|
1823
2100
|
export interface PrintStartedPayload {
|
|
2101
|
+
/**
|
|
2102
|
+
* The camera check its manifest named, which every check of the print is
|
|
2103
|
+
* drawn through; absent when it named none.
|
|
2104
|
+
*/
|
|
2105
|
+
camera_check?: CameraCheckId | null;
|
|
1824
2106
|
/** The file being printed, when it is known. */
|
|
1825
2107
|
file_name?: string | null;
|
|
1826
2108
|
/** The spool loaded on each tool as it started. */
|
|
@@ -2219,7 +2501,12 @@ export type RejectionReason = {
|
|
|
2219
2501
|
sheet_refused: {
|
|
2220
2502
|
objection: SheetObjection;
|
|
2221
2503
|
};
|
|
2222
|
-
} | "sheet_not_declared" |
|
|
2504
|
+
} | "sheet_not_declared" | {
|
|
2505
|
+
camera_check_refused: {
|
|
2506
|
+
camera_check: CameraCheckId;
|
|
2507
|
+
objection: CameraCheckObjection;
|
|
2508
|
+
};
|
|
2509
|
+
} | "print_already_ended" | {
|
|
2223
2510
|
print_still_active: {
|
|
2224
2511
|
state: PrinterState;
|
|
2225
2512
|
};
|
|
@@ -2352,78 +2639,6 @@ export interface SignalPosition {
|
|
|
2352
2639
|
/** The position. */
|
|
2353
2640
|
position: FilePosition;
|
|
2354
2641
|
}
|
|
2355
|
-
/**
|
|
2356
|
-
* What the slicer planned at the print's current file position: the shape
|
|
2357
|
-
* and place of what should be printing, read from the print's own G-code.
|
|
2358
|
-
*
|
|
2359
|
-
* These are the slicer's plan rather than an observation: a feature named
|
|
2360
|
-
* here is part of the design at this height, and nothing here says how well
|
|
2361
|
-
* it printed.
|
|
2362
|
-
*/
|
|
2363
|
-
export interface SlicerPlan {
|
|
2364
|
-
/** Each setting in force the plan at this height says is wrong. */
|
|
2365
|
-
at_odds?: Array<PlanMismatch>;
|
|
2366
|
-
/**
|
|
2367
|
-
* The planned change the printer is waiting at now, for a person to
|
|
2368
|
-
* finish; absent when it is waiting at none.
|
|
2369
|
-
*/
|
|
2370
|
-
change_waiting?: PlannedChange | null;
|
|
2371
|
-
/**
|
|
2372
|
-
* The colour the print should be laying at the current position, as
|
|
2373
|
-
* `#RRGGBB`; absent when the file plans no change or names no colour
|
|
2374
|
-
* there.
|
|
2375
|
-
*/
|
|
2376
|
-
expected_color?: string | null;
|
|
2377
|
-
/** The part-cooling fan speed, in percent. */
|
|
2378
|
-
fan_percent?: SetValue | null;
|
|
2379
|
-
/** The final layer's height, in millimetres. */
|
|
2380
|
-
final_z_mm?: number | null;
|
|
2381
|
-
/** The flow factor, one meaning one hundred percent. */
|
|
2382
|
-
flow_factor?: SetValue | null;
|
|
2383
|
-
/**
|
|
2384
|
-
* The layer the print is in, counting the first as 1; absent before the
|
|
2385
|
-
* first.
|
|
2386
|
-
*/
|
|
2387
|
-
layer?: number | null;
|
|
2388
|
-
/** The slicer's own estimate of the minutes left, at the current position. */
|
|
2389
|
-
minutes_left?: number | null;
|
|
2390
|
-
/**
|
|
2391
|
-
* The slicer's own count of the minutes to that change, from the latest
|
|
2392
|
-
* `M73 C` the position has reached; absent when there is no next change
|
|
2393
|
-
* or no count.
|
|
2394
|
-
*/
|
|
2395
|
-
minutes_to_next_change?: number | null;
|
|
2396
|
-
/**
|
|
2397
|
-
* The next change the file plans after the current position; absent when
|
|
2398
|
-
* it plans none there.
|
|
2399
|
-
*/
|
|
2400
|
-
next_change?: PlannedChange | null;
|
|
2401
|
-
/** How many objects the file lays down; absent when it labels none. */
|
|
2402
|
-
object_count?: number | null;
|
|
2403
|
-
/**
|
|
2404
|
-
* The bed area each object the file lays down covers, unnamed, as
|
|
2405
|
-
* `[x_min, y_min, x_max, y_max]` in whole millimetres, in the order of
|
|
2406
|
-
* the file's object numbers.
|
|
2407
|
-
*/
|
|
2408
|
-
objects?: Array<Array<number>>;
|
|
2409
|
-
/**
|
|
2410
|
-
* How far the plan has risen since an earlier frame; absent before any
|
|
2411
|
-
* frame is half an hour old.
|
|
2412
|
-
*/
|
|
2413
|
-
rise?: Rise | null;
|
|
2414
|
-
/**
|
|
2415
|
-
* What the current layer lays material as, in the order the file first
|
|
2416
|
-
* names each: `Perimeter`, `Support material`, `Bridge infill`.
|
|
2417
|
-
*/
|
|
2418
|
-
types?: Array<string>;
|
|
2419
|
-
/**
|
|
2420
|
-
* The facts the file does not state, which are therefore unknown rather
|
|
2421
|
-
* than absent.
|
|
2422
|
-
*/
|
|
2423
|
-
unknown?: Array<PlanFact>;
|
|
2424
|
-
/** The current layer's height, in millimetres. */
|
|
2425
|
-
z_mm?: number | null;
|
|
2426
|
-
}
|
|
2427
2642
|
/** A spool's remaining figure was corrected. */
|
|
2428
2643
|
export interface SpoolAdjustedPayload {
|
|
2429
2644
|
/** Who corrected it. */
|
|
@@ -2824,6 +3039,33 @@ export interface ToolTemperature {
|
|
|
2824
3039
|
/** The tool, in the printer's own numbering. */
|
|
2825
3040
|
tool: number;
|
|
2826
3041
|
}
|
|
3042
|
+
/**
|
|
3043
|
+
* The image one supervision turn was handed: where it is, which event it was
|
|
3044
|
+
* the check of, and what the turn was told about it.
|
|
3045
|
+
*/
|
|
3046
|
+
export interface TurnCheckImage {
|
|
3047
|
+
/**
|
|
3048
|
+
* The event the turn was about — the observation or alert whose check
|
|
3049
|
+
* this image is.
|
|
3050
|
+
*/
|
|
3051
|
+
event_id: EventId;
|
|
3052
|
+
/**
|
|
3053
|
+
* Why it is the whole frame; absent for the three-panel image, or when
|
|
3054
|
+
* what made it gave no reason.
|
|
3055
|
+
*/
|
|
3056
|
+
fallback?: ImageFallback | null;
|
|
3057
|
+
/** When the frame it shows was captured, when the turn was told. */
|
|
3058
|
+
frame_captured_at?: Timestamp | null;
|
|
3059
|
+
/** Which image it is; absent when what made it did not say. */
|
|
3060
|
+
kind?: ImageKind | null;
|
|
3061
|
+
/**
|
|
3062
|
+
* The line the turn was told what the image is in; absent when what
|
|
3063
|
+
* made it said nothing.
|
|
3064
|
+
*/
|
|
3065
|
+
note?: string | null;
|
|
3066
|
+
/** Where the image's bytes are, absolute on the supervisor's own host. */
|
|
3067
|
+
path: string;
|
|
3068
|
+
}
|
|
2827
3069
|
/** A print this system never saw was found in the printer's own tally. */
|
|
2828
3070
|
export interface UnaccountedPrintPayload {
|
|
2829
3071
|
/** Whether it was charged against a spool. */
|
|
@@ -2861,6 +3103,10 @@ export interface UnattendedPrinterActivityPayload {
|
|
|
2861
3103
|
/** Every tool whose target is above zero. */
|
|
2862
3104
|
tools: Array<HeatedTool>;
|
|
2863
3105
|
}
|
|
3106
|
+
/** Why a camera check could not say whether the camera is aligned. */
|
|
3107
|
+
export type UnavailableReason = "no_frame" | "look_failed" | "frame_mismatch" | "no_calibration" | "unjudgeable";
|
|
3108
|
+
/** Why a frame could not show whether the camera is aligned. */
|
|
3109
|
+
export type UnjudgeableCause = "too_little_sheet_in_view" | "no_sheet_found" | "sheet_occluded" | "landmarks_hidden" | "fit_inconsistent";
|
|
2864
3110
|
/** One reason a spool's figure is in doubt, and since when. */
|
|
2865
3111
|
export interface UnverifiedMark {
|
|
2866
3112
|
/** Why the figure is in doubt. */
|
|
@@ -2946,6 +3192,7 @@ export interface EventPayloads {
|
|
|
2946
3192
|
agent_assessment: AgentAssessmentPayload;
|
|
2947
3193
|
agent_stop_unacted: AgentStopUnactedPayload;
|
|
2948
3194
|
bed_clear_asserted: BedClearAssertedPayload;
|
|
3195
|
+
camera_checked: CameraCheckedPayload;
|
|
2949
3196
|
camera_degraded: CameraDegradedPayload;
|
|
2950
3197
|
camera_look: CameraLookPayload;
|
|
2951
3198
|
camera_retry: CameraRetryPayload;
|
|
@@ -2991,7 +3238,7 @@ export interface EventPayloads {
|
|
|
2991
3238
|
unattended_printer_activity: UnattendedPrinterActivityPayload;
|
|
2992
3239
|
}
|
|
2993
3240
|
/** Every kind the server declares a payload type for, in name order. */
|
|
2994
|
-
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", "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"];
|
|
3241
|
+
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"];
|
|
2995
3242
|
/**
|
|
2996
3243
|
* The payload of one event as the type its kind declares, or `undefined` for
|
|
2997
3244
|
* an event of any other kind — one this client knows or one it does not. No
|
|
@@ -3385,4 +3632,20 @@ export declare class GeneratedClient extends GeneratedSurface {
|
|
|
3385
3632
|
* the reason, the value asked for and the range allowed.
|
|
3386
3633
|
*/
|
|
3387
3634
|
recheckCamera(printId: string, reason: string): Promise<RecheckCameraAnswer>;
|
|
3635
|
+
/**
|
|
3636
|
+
* Call `check_camera` on the configured supervisor.
|
|
3637
|
+
*
|
|
3638
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3639
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3640
|
+
* said no.
|
|
3641
|
+
*/
|
|
3642
|
+
checkCamera(sheet: SheetId, bedZMm: number): Promise<CameraCheck>;
|
|
3643
|
+
/**
|
|
3644
|
+
* Call `check_harness` on the configured supervisor.
|
|
3645
|
+
*
|
|
3646
|
+
* Rejects with `Unreachable` when nothing answered, with `Unreadable` when
|
|
3647
|
+
* the answer could not be read, and with `Refused` when the supervisor
|
|
3648
|
+
* said no.
|
|
3649
|
+
*/
|
|
3650
|
+
checkHarness(): Promise<HarnessReadiness>;
|
|
3388
3651
|
}
|