@printobserver/sdk 0.2.0 → 0.4.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.
@@ -8,15 +8,17 @@
8
8
  */
9
9
  import { GeneratedSurface } from "./surface.ts";
10
10
  /**
11
- * The version of the server contract these types were generated from, which
12
- * is the version the type crate declares in the tree they came from.
11
+ * The version of the server contract these types were generated from. A
12
+ * published package reports the release version it was built at; used from a
13
+ * checkout, this module reports that checkout's workspace version, and
14
+ * refuses to import when it cannot read one.
13
15
  */
14
- export declare const CONTRACT_VERSION = "0.2.0";
16
+ export declare const CONTRACT_VERSION: string;
15
17
  /**
16
18
  * Every operation this client exposes a method for, which is every operation
17
19
  * the server declares and no other.
18
20
  */
19
- export declare const OPERATION_NAMES: readonly ["status", "context", "image", "history", "manifest_get", "manifest_set", "pause", "resume", "cancel", "start_print", "set_feedrate_factor", "set_flowrate_factor", "set_tool_target_c", "set_bed_target_c", "set_fan_percent", "acknowledge_failure"];
21
+ export declare const OPERATION_NAMES: readonly ["prints", "status", "context", "image", "history", "manifest_get", "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", "register_spool", "load_spool", "unload_spool", "adjust_spool", "retire_spool"];
20
22
  /** What an operator's acknowledgement of a failure event asks for next. */
21
23
  export type AcknowledgementDisposition = "continue" | "watch" | "stop";
22
24
  /** What one mutating request left behind it. */
@@ -48,7 +50,7 @@ export type ActionId = string;
48
50
  * the
49
51
  * payload lives on `PrintAction` itself.
50
52
  */
51
- export type ActionKind = "pause" | "resume" | "cancel" | "start_print" | "set_feedrate_factor" | "set_flowrate_factor" | "set_tool_target_c" | "set_bed_target_c" | "set_fan_percent" | "acknowledge_failure";
53
+ export type ActionKind = "pause" | "resume" | "cancel" | "start_print" | "set_feedrate_factor" | "set_flowrate_factor" | "set_tool_target_c" | "set_bed_target_c" | "set_fan_percent" | "acknowledge_failure" | "register_spool" | "load_spool" | "unload_spool" | "adjust_spool" | "retire_spool";
52
54
  /**
53
55
  * One request, the decision taken on it, and what became of it.
54
56
  *
@@ -132,6 +134,56 @@ export interface AgentAssessmentPayload {
132
134
  /** The session the turn ran in. */
133
135
  session_name: string;
134
136
  }
137
+ /**
138
+ * Somebody took a fresh look at the print.
139
+ *
140
+ * Written down before the camera is asked for a frame, so that a frame the
141
+ * camera would not give is recorded against a look that is already in the
142
+ * history; the frame itself, when there is one, is this event's image.
143
+ */
144
+ export interface CameraLookPayload {
145
+ /**
146
+ * The events for the print that arrived while it waited, and that it
147
+ * handed to whoever looked, oldest first.
148
+ */
149
+ delivered?: Array<EventId>;
150
+ /**
151
+ * How long the look waited for something to happen before it was taken,
152
+ * in whole seconds.
153
+ */
154
+ waited_s: number;
155
+ }
156
+ /** The durable identity of one debit, so that a replay can never debit twice. */
157
+ export type ChargeKey = {
158
+ key: "print";
159
+ print_id: PrintId;
160
+ segment: number;
161
+ tool: number;
162
+ } | {
163
+ key: "unobserved";
164
+ file_name: string;
165
+ generation: number;
166
+ origin: string;
167
+ print_number: number;
168
+ tool: number;
169
+ };
170
+ /** How the length a charge debits was worked out. */
171
+ export type ChargeMethod = "slicer_estimate" | "gcode_extrusion" | "file_fraction" | "unobserved_estimate";
172
+ /**
173
+ * Filament a tool fed after an unconfirmed filament change was held for the
174
+ * next spool loaded onto that tool, or confirmed on it.
175
+ */
176
+ export interface ChargePendedPayload {
177
+ /** What was held. */
178
+ pending: PendingCharge;
179
+ }
180
+ /** One mark a spool command cleared, and the spool it was cleared from. */
181
+ export interface ClearedMark {
182
+ /** The reason that no longer stands. */
183
+ reason: UnverifiedReason;
184
+ /** The spool the mark was cleared from. */
185
+ spool_id: SpoolId;
186
+ }
135
187
  /**
136
188
  * How sure the agent is.
137
189
  *
@@ -175,9 +227,12 @@ export interface ErrorAnswer {
175
227
  /** A lowercase hyphenated version 7 UUID identifying one event. */
176
228
  export type EventId = string;
177
229
  /**
178
- * What every arm of `EventRecord` carries beside its own payload.
179
- *
180
- * One event, as the store holds it.
230
+ * The name one kind of event is written down under: lowercase `snake_case`,
231
+ * declared by the domain that owns the event.
232
+ */
233
+ export type EventKind = string;
234
+ /**
235
+ * One event, as the store holds it and the server serves it.
181
236
  *
182
237
  * `raw` holds the bytes exactly as received for an externally sourced event
183
238
  * and is absent for an internally raised one — it is what makes the history
@@ -186,11 +241,15 @@ export type EventId = string;
186
241
  * system
187
242
  * knows.
188
243
  */
189
- export interface EventRecordCommon {
244
+ export interface EventRecord {
190
245
  /** This event's identifier, minted by the store. */
191
246
  id: EventId;
192
247
  /** The image it arrived with, when it arrived with one. */
193
248
  image?: ImageRef | null;
249
+ /** Which event this is. */
250
+ kind: EventKind;
251
+ /** What it carries, in the form its kind declares. */
252
+ payload: unknown;
194
253
  /** The print it belongs to, when it belongs to one. */
195
254
  print_id?: PrintId | null;
196
255
  /** The bytes exactly as received, for an externally sourced event. */
@@ -201,68 +260,116 @@ export interface EventRecordCommon {
201
260
  source: EventSource;
202
261
  }
203
262
  /**
204
- * One event, as the store holds it.
205
- *
206
- * `raw` holds the bytes exactly as received for an externally sourced event
207
- * and is absent for an internally raised one — it is what makes the history
208
- * auditable when a normalization turns out to be wrong. `print_id` is
209
- * optional, because an externally sourced event may name no print this
210
- * system
211
- * knows.
263
+ * Where an event came from, as the bare string the domain that raised it
264
+ * declares for itself.
212
265
  */
213
- export type EventRecord = (EventRecordCommon & {
214
- kind: "obico_failure_alert";
215
- payload: ObicoFailureAlertPayload;
216
- }) | (EventRecordCommon & {
217
- kind: "obico_printer_notification";
218
- payload: ObicoPrinterNotificationPayload;
219
- }) | (EventRecordCommon & {
220
- kind: "malformed_external_event";
221
- payload: MalformedExternalEventPayload;
222
- }) | (EventRecordCommon & {
223
- kind: "action_requested";
224
- payload: ActionRequestedPayload;
225
- }) | (EventRecordCommon & {
226
- kind: "action_executed";
227
- payload: ActionExecutedPayload;
228
- }) | (EventRecordCommon & {
229
- kind: "action_rejected";
230
- payload: ActionRejectedPayload;
231
- }) | (EventRecordCommon & {
232
- kind: "intervention_expired";
233
- payload: InterventionExpiredPayload;
234
- }) | (EventRecordCommon & {
235
- kind: "supervision_session_opened";
236
- payload: SupervisionSessionOpenedPayload;
237
- }) | (EventRecordCommon & {
238
- kind: "supervision_session_closed";
239
- payload: SupervisionSessionClosedPayload;
240
- }) | (EventRecordCommon & {
241
- kind: "agent_assessment";
242
- payload: AgentAssessmentPayload;
243
- }) | (EventRecordCommon & {
244
- kind: "operator_acknowledgement";
245
- payload: OperatorAcknowledgementPayload;
246
- }) | (EventRecordCommon & {
247
- kind: "port_failure";
248
- payload: PortFailurePayload;
249
- }) | (EventRecordCommon & {
250
- kind: "startup_reconciliation";
251
- payload: StartupReconciliationPayload;
252
- });
253
- /** Where an event came from. */
254
- export type EventSource = "obico" | "operator" | "agent" | "system";
266
+ export type EventSource = string;
255
267
  /** What happened when an accepted action reached the printer. */
256
268
  export type ExecutionOutcome = "succeeded" | {
257
269
  failed: {
258
270
  reason: string;
259
271
  };
260
272
  };
273
+ /** A filament change was signalled during a print. */
274
+ export interface FilamentChangeSignalledPayload {
275
+ /** The position the spool was charged up to, when one was known. */
276
+ position?: FilePosition | null;
277
+ /**
278
+ * Whether that position was read when the signal was handled, rather than
279
+ * being the last one recorded; never with no position at all.
280
+ */
281
+ position_read_at_signal: boolean;
282
+ /** The kind of the alert that carried the signal. */
283
+ source_kind: EventKind;
284
+ /** The spool that was on it, when one was tracked. */
285
+ spool_id?: SpoolId | null;
286
+ /** The tool the change was signalled for, when it is known. */
287
+ tool?: number | null;
288
+ }
289
+ /** Filament was charged against a spool, or recorded uncharged. */
290
+ export interface FilamentConsumedPayload {
291
+ /**
292
+ * The file's analysed length for the tool, in millimetres, when it had
293
+ * one.
294
+ */
295
+ analysed_length_mm?: number | null;
296
+ /** The durable identity of this debit. */
297
+ charge_key: ChargeKey;
298
+ /**
299
+ * The density the grams were worked out with, in grams per cubic
300
+ * centimetre.
301
+ */
302
+ density_g_cm3?: number | null;
303
+ /** The diameter the grams were worked out with, in millimetres. */
304
+ diameter_mm?: number | null;
305
+ /**
306
+ * What that length weighs, in grams, when a spool gave its diameter and
307
+ * density.
308
+ */
309
+ grams?: number | null;
310
+ /** How much was fed, in millimetres. */
311
+ length_mm: number;
312
+ /** How the length was worked out. */
313
+ method: ChargeMethod;
314
+ /** Anything a reader needs to make sense of the figure. */
315
+ note?: string | null;
316
+ /** How far into the file the charge runs, when that was read. */
317
+ position?: FilePosition | null;
318
+ /** The spool's figure after it, in grams. */
319
+ remaining_after_g?: number | null;
320
+ /** The spool's figure before the charge, in grams. */
321
+ remaining_before_g?: number | null;
322
+ /**
323
+ * The spool charged; absent when nothing was tracked on the tool, and the
324
+ * filament was recorded uncharged.
325
+ */
326
+ spool_id?: SpoolId | null;
327
+ /** The tool that fed it. */
328
+ tool: number;
329
+ }
261
330
  /**
262
331
  * A file name a printer's own file API can be asked for: no path separator,
263
332
  * no NUL byte, no `.` or `..` segment, no drive prefix, and not empty.
264
333
  */
265
334
  export type FileName = string;
335
+ /** How far into its file a print had got, and when that was read. */
336
+ export interface FilePosition {
337
+ /** The byte the printer had read the file up to. */
338
+ bytes: number;
339
+ /** When the position was read. */
340
+ observed_at: Timestamp;
341
+ /** The file's size in bytes, when it was known. */
342
+ size_bytes?: number | null;
343
+ }
344
+ /**
345
+ * The printer's tally for a file went down — the file was deleted and
346
+ * uploaded again — so the file's tally generation advanced, and the new
347
+ * count
348
+ * is that generation's growth from zero.
349
+ *
350
+ * The rebaseline itself marks no spool; only an `unverified` disposition
351
+ * does.
352
+ */
353
+ export interface FileTallyRebaselinedPayload {
354
+ /** What became of the prints the new generation counts. */
355
+ disposition: RebaselineDisposition;
356
+ /** The file whose tally went down. */
357
+ file_name: string;
358
+ /** The failed prints the new tally counts. */
359
+ new_failures: number;
360
+ /** The generation it is in now. */
361
+ new_generation: number;
362
+ /** The completed prints the new tally counts. */
363
+ new_successes: number;
364
+ /** The failed prints the old tally counted. */
365
+ old_failures: number;
366
+ /** The generation the tally was in. */
367
+ old_generation: number;
368
+ /** The completed prints the old tally counted. */
369
+ old_successes: number;
370
+ /** Where it lives, in the printer's own vocabulary. */
371
+ origin: string;
372
+ }
266
373
  /**
267
374
  * One heater, as a source reported it.
268
375
  *
@@ -426,10 +533,20 @@ export interface JobSnapshot {
426
533
  error?: string | null;
427
534
  /** The whole print's estimated duration, in whole seconds. */
428
535
  estimated_print_time_s?: number | null;
536
+ /**
537
+ * The filament the source's analysis of the file says each tool uses;
538
+ * empty when the source reported none.
539
+ */
540
+ filament?: Array<ToolFilament>;
429
541
  /** The name of the file being printed, as the source reported it. */
430
542
  file_name?: string | null;
431
543
  /** Where the file lives, in the source's own vocabulary. */
432
544
  file_origin?: string | null;
545
+ /**
546
+ * How far into the file the printer has read, in bytes, when the source
547
+ * reported it.
548
+ */
549
+ file_position_bytes?: number | null;
433
550
  /** How long the print has left, in whole seconds. */
434
551
  print_time_left_s?: number | null;
435
552
  /** How long the print has been running, in whole seconds. */
@@ -439,6 +556,48 @@ export interface JobSnapshot {
439
556
  /** The state the source reports the job to be in. */
440
557
  state: PrinterState;
441
558
  }
559
+ /** One spool loaded on one tool, as a print started. */
560
+ export interface LoadedSpool {
561
+ /** The spool loaded on it. */
562
+ spool_id: SpoolId;
563
+ /** The tool, in the printer's own numbering. */
564
+ tool: number;
565
+ }
566
+ /**
567
+ * One fresh look at a print.
568
+ *
569
+ * An answer rather than a record, so it admits fields beside its own the way
570
+ * every answer of the server does: a client that could not open the frame's
571
+ * path says so in a field of its own beside the rest of the answer.
572
+ */
573
+ export interface Look {
574
+ /**
575
+ * The events for this print that arrived while the look waited, oldest
576
+ * first; the look returned early when there were any.
577
+ */
578
+ arrived?: Array<EventRecord>;
579
+ /**
580
+ * Whether the print is paused and the pause is the detector's, which is
581
+ * what an adjustment asked for now would be applied under.
582
+ */
583
+ detector_paused: boolean;
584
+ /**
585
+ * The look itself, as it was written into the print's history, carrying
586
+ * the frame as its image when there is one.
587
+ */
588
+ event: EventRecord;
589
+ /**
590
+ * The frame the camera gave, absent when no camera is configured or it
591
+ * gave none — which the history records as a port failure.
592
+ */
593
+ frame?: ImageRef | null;
594
+ /** The absolute path the frame's bytes are at, on the supervisor's host. */
595
+ image_path?: string | null;
596
+ /** The job the printer reports now, absent when it could not be read. */
597
+ job?: JobSnapshot | null;
598
+ /** The printer's state now, absent when it could not be read. */
599
+ printer?: PrinterSnapshot | null;
600
+ }
442
601
  /**
443
602
  * An external body arrived that could not be read.
444
603
  *
@@ -523,6 +682,72 @@ export interface OperatorAcknowledgementPayload {
523
682
  /** What the operator asked for next. */
524
683
  disposition: AcknowledgementDisposition;
525
684
  }
685
+ /**
686
+ * Filament a tool fed after a filament change nobody has confirmed, held
687
+ * until
688
+ * somebody says which spool fed it.
689
+ *
690
+ * A length rather than grams, because the grams follow the spool that takes
691
+ * it.
692
+ */
693
+ export interface PendingCharge {
694
+ /**
695
+ * The file's analysed length for the tool, in millimetres, when it had
696
+ * one.
697
+ */
698
+ analysed_length_mm?: number | null;
699
+ /** The key of the print segment the filament was fed in. */
700
+ charge_key: ChargeKey;
701
+ /** How much was fed, in millimetres. */
702
+ length_mm: number;
703
+ /** How that length was worked out. */
704
+ method: ChargeMethod;
705
+ /** Anything a reader needs to make sense of the figure. */
706
+ note?: string | null;
707
+ /** When it was held. */
708
+ pended_at: Timestamp;
709
+ /** How far into the file the segment ran, when that was read. */
710
+ position?: FilePosition | null;
711
+ /** The print it was fed in. */
712
+ print_id: PrintId;
713
+ /** The tool that fed it. */
714
+ tool: number;
715
+ }
716
+ /** One pending charge a spool command took. */
717
+ export interface PendingTaken {
718
+ /** The key it is charged under. */
719
+ charge_key: ChargeKey;
720
+ /** The print it was fed in. */
721
+ print_id: PrintId;
722
+ }
723
+ /**
724
+ * The supervisor looked in on an active print on its own schedule, with no
725
+ * detector having said anything about it.
726
+ *
727
+ * What a failure detector never alerts on — a progress that stopped moving,
728
+ * a
729
+ * heater whose target fell to nothing mid-print, a fan cut at a bridge, a
730
+ * wall
731
+ * going thin — is still on the machine and in the camera's frame, so every
732
+ * active print is given one of these each interval and a turn on it. It
733
+ * carries what the printer reported as it was taken; the frame the camera
734
+ * gave
735
+ * at the same moment, untagged by any detector, is this event's image.
736
+ */
737
+ export interface PeriodicObservationPayload {
738
+ /** How often these are taken, in whole seconds. */
739
+ interval_s: number;
740
+ /**
741
+ * The job the printer reported as the observation was taken, absent when
742
+ * it could not be read.
743
+ */
744
+ job?: JobSnapshot | null;
745
+ /**
746
+ * The printer's state as the observation was taken, absent when it could
747
+ * not be read — which the history records as a port failure.
748
+ */
749
+ printer?: PrinterSnapshot | null;
750
+ }
526
751
  /** The decision policy took on one request. */
527
752
  export type PolicyDecision = "accepted" | {
528
753
  rejected: RejectionReason;
@@ -558,7 +783,60 @@ export interface PortFailurePayload {
558
783
  * be
559
784
  * a second version of one fact.
560
785
  */
561
- export type PortFailureSite = "printer_snapshot" | "printer_job" | "image_write" | "supervision_turn";
786
+ export type PortFailureSite = "printer_snapshot" | "printer_job" | "image_write" | "supervision_turn" | "camera_look" | "detector_acknowledgement";
787
+ /** What a filament check found for one print. */
788
+ export interface Preflight {
789
+ /** When the check was made. */
790
+ checked_at: Timestamp;
791
+ /** The file the print is of. */
792
+ file_name: string;
793
+ /** What it found for each tool. */
794
+ tools: Array<PreflightTool>;
795
+ /**
796
+ * The worst of the tools' verdicts, in the order insufficient,
797
+ * unverified spool, no analysis, warned, overridden, unchecked, passed.
798
+ */
799
+ verdict: PreflightVerdict;
800
+ }
801
+ /** What a filament check answers. */
802
+ export interface PreflightAnswer {
803
+ /** What the check found, read now. */
804
+ preflight: Preflight;
805
+ }
806
+ /** The filament check before a start was made. */
807
+ export interface PreflightCheckedPayload {
808
+ /** The start it was made for, when it was made for one. */
809
+ action_id?: ActionId | null;
810
+ /** What the check found. */
811
+ preflight: Preflight;
812
+ }
813
+ /** What a filament check found for one tool. */
814
+ export interface PreflightTool {
815
+ /** The margin asked for beyond that, in grams. */
816
+ buffer_g?: number | null;
817
+ /**
818
+ * The loaded spool's marks at the check, oldest first, whatever the
819
+ * verdict, so a spool both short and unverified says both.
820
+ */
821
+ marks?: Array<UnverifiedMark>;
822
+ /** What the spool holds, in grams. */
823
+ remaining_g?: number | null;
824
+ /** What the print needs from it, in grams, when the file's analysis says. */
825
+ required_g?: number | null;
826
+ /** The spool loaded on it, when one is. */
827
+ spool_id?: SpoolId | null;
828
+ /**
829
+ * That spool's name, beside its identifier, so a reader need not look it
830
+ * up.
831
+ */
832
+ spool_name?: string | null;
833
+ /** The tool, in the printer's own numbering. */
834
+ tool: number;
835
+ /** What the check found for this tool. */
836
+ verdict: PreflightVerdict;
837
+ }
838
+ /** What a filament check found, for one tool or for a whole print. */
839
+ export type PreflightVerdict = "passed" | "unchecked" | "insufficient" | "unverified_spool" | "no_analysis" | "overridden" | "warned";
562
840
  /** The whole vocabulary an actor may ask for, and there is no other. */
563
841
  export type PrintAction = {
564
842
  action: "pause";
@@ -577,6 +855,7 @@ export type PrintAction = {
577
855
  actor: Actor;
578
856
  file_name: FileName;
579
857
  manifest: JobManifest;
858
+ override_filament_check?: boolean;
580
859
  reason: string;
581
860
  } | {
582
861
  action: "set_feedrate_factor";
@@ -635,14 +914,27 @@ export interface PrintContext {
635
914
  /** A bounded list of this print's events, newest first. */
636
915
  recent_events: Array<EventRecord>;
637
916
  }
917
+ /** A print ended. */
918
+ export interface PrintEndedPayload {
919
+ /** How far into its file it last read, when that was read. */
920
+ last_position?: FilePosition | null;
921
+ /** How it ended. */
922
+ outcome: PrintOutcome;
923
+ /** Why it ended, in the words the end was recorded with. */
924
+ reason: string;
925
+ /** The state the printer was in as it ended. */
926
+ state: PrinterState;
927
+ }
638
928
  /** A lowercase hyphenated version 7 UUID identifying one print. */
639
929
  export type PrintId = string;
930
+ /** How a print ended. */
931
+ export type PrintOutcome = "completed" | "cancelled" | "failed";
640
932
  /**
641
933
  * One print, and the record supervision keys from.
642
934
  *
643
- * Obico's own print id is carried beside this record's identifier rather
644
- * than
645
- * as it, because a print may be observed before Obico has one.
935
+ * The provider's own print id is carried beside this record's identifier
936
+ * rather than as it, because a print may be observed before the provider
937
+ * that reports it has one.
646
938
  */
647
939
  export interface PrintRecord {
648
940
  /** Why it ended, if it has. */
@@ -653,15 +945,65 @@ export interface PrintRecord {
653
945
  file_name?: string | null;
654
946
  /** This print's identifier, minted by the store. */
655
947
  id: PrintId;
948
+ /**
949
+ * The longest running time, in whole seconds, the printer reported for
950
+ * this print's job at a read that found it printing rather than paused.
951
+ *
952
+ * The time a job has spent printing only grows, pause or no pause, so a
953
+ * job of this print's file reporting less — by more than
954
+ * `listing::JOB_IDENTITY_TOLERANCE_S` — is a later job. Absent until a
955
+ * read finds the job printing.
956
+ */
957
+ job_print_time_s?: number | null;
958
+ /**
959
+ * When the printer's job this print records began, as the printer's own
960
+ * running time put it at the latest read that found the job running or
961
+ * paused: the instant of that read, less the running time it reported.
962
+ *
963
+ * `OctoPrint` counts a pause into the running time until the job resumes
964
+ * and then takes the pause back out, so a pause moves this later: a read
965
+ * putting it further than `listing::JOB_IDENTITY_TOLERANCE_S` from the one
966
+ * recorded resets it, rather than it being fixed once. Absent when no read
967
+ * has
968
+ * found this print's job reporting a running time — a print opened by an
969
+ * alert or a start before any read, and every print recorded before this
970
+ * was.
971
+ */
972
+ job_started_at?: Timestamp | null;
656
973
  /** Every manifest range this print narrowed to the envelope's. */
657
974
  narrowings: Array<ManifestNarrowing>;
658
- /** Obico's own identifier for the print, when Obico has one. */
659
- obico_print_id?: number | null;
660
975
  /** When the print was opened. */
661
976
  opened_at: Timestamp;
977
+ /**
978
+ * The provider's own identifier for the print, whichever provider
979
+ * reported it, when one has.
980
+ */
981
+ provider_print_id?: number | null;
662
982
  /** The state the print is in. */
663
983
  state: PrinterState;
664
984
  }
985
+ /** A print started. */
986
+ export interface PrintStartedPayload {
987
+ /** The file being printed, when it is known. */
988
+ file_name?: string | null;
989
+ /** The spool loaded on each tool as it started. */
990
+ loaded: Array<LoadedSpool>;
991
+ /** The filament check made before it started, when one was. */
992
+ preflight?: Preflight | null;
993
+ /**
994
+ * The action that started it; absent when the print was observed rather
995
+ * than started through this system.
996
+ */
997
+ started_by?: ActionId | null;
998
+ }
999
+ /**
1000
+ * A print that was already open when spool tracking was installed: it is
1001
+ * never charged, and this says why it carries no charge.
1002
+ */
1003
+ export interface PrintUntrackedPayload {
1004
+ /** Why the print carries no charge. */
1005
+ reason: string;
1006
+ }
665
1007
  /** A printer, as a source reported it at one instant. */
666
1008
  export interface PrinterSnapshot {
667
1009
  /** The bed heater, when the printer reports one. */
@@ -690,6 +1032,24 @@ export interface PrinterSnapshot {
690
1032
  export type PrinterState = "operational" | "paused" | "printing" | "cancelling" | "error" | "offline" | {
691
1033
  unknown: string;
692
1034
  };
1035
+ /**
1036
+ * What the prints read answers: every print, and the one the printer is
1037
+ * running.
1038
+ *
1039
+ * An open print's recorded `state` is the state it was opened in, which is
1040
+ * `printing` whether or not the machine is paused now; what the machine is
1041
+ * doing is the status read's answer.
1042
+ */
1043
+ export interface PrintsAnswer {
1044
+ /**
1045
+ * The print the printer's current job belongs to, present exactly when the
1046
+ * printer reports a job it is printing or has paused. Absent when the
1047
+ * printer could not be read.
1048
+ */
1049
+ active?: PrintId | null;
1050
+ /** Every print this server holds, ended or not, most recently opened first. */
1051
+ prints: Array<PrintRecord>;
1052
+ }
693
1053
  /** An inclusive pair of 64-bit floats. */
694
1054
  export interface Range {
695
1055
  /** The highest value the range admits, inclusive. */
@@ -699,6 +1059,8 @@ export interface Range {
699
1059
  }
700
1060
  /** Bytes exactly as received, base64-encoded. */
701
1061
  export type RawBytes = string;
1062
+ /** What became of the prints a file's new tally generation counts. */
1063
+ export type RebaselineDisposition = "accounted" | "unverified";
702
1064
  /**
703
1065
  * Why a request was refused.
704
1066
  *
@@ -729,6 +1091,32 @@ export type RejectionReason = {
729
1091
  unsupported_adjustable: {
730
1092
  adjustable: Adjustable;
731
1093
  };
1094
+ } | {
1095
+ insufficient_filament: {
1096
+ buffer_g: number;
1097
+ remaining_g: number;
1098
+ required_g: number;
1099
+ spool_id: SpoolId;
1100
+ spool_name: string;
1101
+ tool: number;
1102
+ unverified?: UnverifiedReason | null;
1103
+ };
1104
+ } | {
1105
+ unverified_spool: {
1106
+ reason: UnverifiedReason;
1107
+ spool_id: SpoolId;
1108
+ spool_name: string;
1109
+ tool: number;
1110
+ };
1111
+ } | {
1112
+ analysis_unavailable: {
1113
+ file_name: string;
1114
+ waited_s: number;
1115
+ };
1116
+ } | {
1117
+ spool_refused: {
1118
+ detail: string;
1119
+ };
732
1120
  };
733
1121
  /**
734
1122
  * A value as a source reported it, flagged when it is outside the
@@ -740,6 +1128,227 @@ export interface Reported {
740
1128
  /** One shape of the contracts, which say nothing more about it. */
741
1129
  value: number;
742
1130
  }
1131
+ /** A spool's remaining figure was corrected. */
1132
+ export interface SpoolAdjustedPayload {
1133
+ /** Who corrected it. */
1134
+ actor: Actor;
1135
+ /** Every mark the correction cleared. */
1136
+ cleared_marks?: Array<ClearedMark>;
1137
+ /**
1138
+ * The scale reading the figure was worked out from, when it was given as
1139
+ * one.
1140
+ */
1141
+ gross_g?: number | null;
1142
+ /** Why. */
1143
+ reason: string;
1144
+ /** Its figure after, in grams. */
1145
+ remaining_after_g: number;
1146
+ /** Its figure before, in grams, after any pending charge it took. */
1147
+ remaining_before_g: number;
1148
+ /** The spool corrected. */
1149
+ spool_id: SpoolId;
1150
+ /**
1151
+ * The pending charges the correction took first, each also its own
1152
+ * `filament_consumed` event under its key.
1153
+ */
1154
+ took_pending?: Array<PendingTaken>;
1155
+ }
1156
+ /**
1157
+ * What one spool's read answers: the spool, and the newest of the printer's
1158
+ * own events that name it.
1159
+ */
1160
+ export interface SpoolAnswer {
1161
+ /** The newest timeline events naming it, newest first. */
1162
+ recent: Array<EventRecord>;
1163
+ /** The spool, retired or not. */
1164
+ spool: SpoolRecord;
1165
+ }
1166
+ /** The whole vocabulary of the spool ledger, and there is no other. */
1167
+ export type SpoolCommand = {
1168
+ command: "register_spool";
1169
+ actor: Actor;
1170
+ color?: string | null;
1171
+ density_g_cm3?: number | null;
1172
+ diameter_mm?: number | null;
1173
+ initial_g: number;
1174
+ material: string;
1175
+ name: string;
1176
+ reason: string;
1177
+ remaining_g?: number | null;
1178
+ tare_g?: number | null;
1179
+ } | {
1180
+ command: "load_spool";
1181
+ actor: Actor;
1182
+ reason: string;
1183
+ spool_id: SpoolId;
1184
+ tool: number;
1185
+ } | {
1186
+ command: "unload_spool";
1187
+ actor: Actor;
1188
+ reason: string;
1189
+ spool_id: SpoolId;
1190
+ } | {
1191
+ command: "adjust_spool";
1192
+ actor: Actor;
1193
+ gross_g?: number | null;
1194
+ reason: string;
1195
+ remaining_g?: number | null;
1196
+ spool_id: SpoolId;
1197
+ } | {
1198
+ command: "retire_spool";
1199
+ actor: Actor;
1200
+ reason: string;
1201
+ spool_id: SpoolId;
1202
+ };
1203
+ /**
1204
+ * What a spool command answers, accepted or refused.
1205
+ *
1206
+ * A refusal is the same shape and deliberately so: the decision carries the
1207
+ * grant or the ledger's own reason, and the events are the record the
1208
+ * refusal
1209
+ * wrote.
1210
+ */
1211
+ export interface SpoolCommandAnswer {
1212
+ /** The decision taken on the command. */
1213
+ decision: PolicyDecision;
1214
+ /** Every event it wrote, in the order they were written. */
1215
+ events: Array<EventRecord>;
1216
+ /** The spool it was about, as the command left it, when there is one. */
1217
+ spool?: SpoolRecord | null;
1218
+ }
1219
+ /** A spool command was refused. */
1220
+ export interface SpoolCommandRejectedPayload {
1221
+ /** The command, as it was asked for. */
1222
+ command: SpoolCommand;
1223
+ /** The whole decision, carrying which refusal it was. */
1224
+ decision: PolicyDecision;
1225
+ }
1226
+ /** A lowercase hyphenated version 7 UUID identifying one registered spool. */
1227
+ export type SpoolId = string;
1228
+ /** A spool was loaded onto a tool, or confirmed as never having left it. */
1229
+ export interface SpoolLoadedPayload {
1230
+ /** Who loaded it. */
1231
+ actor: Actor;
1232
+ /** Every mark the load cleared, on either spool. */
1233
+ cleared_marks?: Array<ClearedMark>;
1234
+ /** Why. */
1235
+ reason: string;
1236
+ /** The spool the load swapped off the tool, when it was occupied. */
1237
+ replaced?: SpoolId | null;
1238
+ /** The spool loaded. */
1239
+ spool_id: SpoolId;
1240
+ /**
1241
+ * The pending charges the load took, each also its own
1242
+ * `filament_consumed` event under its key.
1243
+ */
1244
+ took_pending?: Array<PendingTaken>;
1245
+ /** The tool, in the printer's own numbering. */
1246
+ tool: number;
1247
+ }
1248
+ /** One spool the operator registered, and what is known of it now. */
1249
+ export interface SpoolRecord {
1250
+ /** The filament's colour, when the operator gave one. */
1251
+ color?: string | null;
1252
+ /** The material's density, in grams per cubic centimetre; above zero. */
1253
+ density_g_cm3: number;
1254
+ /** The filament's diameter, in millimetres; above zero. */
1255
+ diameter_mm: number;
1256
+ /** This spool's identifier, minted when it was registered. */
1257
+ id: SpoolId;
1258
+ /** The net filament on the spool when it was full, in grams; above zero. */
1259
+ initial_g: number;
1260
+ /** The tool the spool is loaded on, when it is loaded. */
1261
+ loaded_on_tool?: number | null;
1262
+ /** The material, as given and trimmed, such as `PLA`; never empty. */
1263
+ material: string;
1264
+ /** The operator's own label for the spool; never empty. */
1265
+ name: string;
1266
+ /** When the spool was registered. */
1267
+ registered_at: Timestamp;
1268
+ /**
1269
+ * The filament left, in grams.
1270
+ *
1271
+ * Always the initial figure less every charge plus every correction. A
1272
+ * charge is never refused or clamped, so this may go below zero.
1273
+ */
1274
+ remaining_g: number;
1275
+ /** When the spool was retired, if it has been. */
1276
+ retired_at?: Timestamp | null;
1277
+ /** The empty spool's own weight, in grams, when the operator gave it. */
1278
+ tare_g?: number | null;
1279
+ /** How far the remaining figure can be trusted. */
1280
+ trust: SpoolTrust;
1281
+ /** When anything about the spool last changed. */
1282
+ updated_at: Timestamp;
1283
+ }
1284
+ /** A spool was registered. */
1285
+ export interface SpoolRegisteredPayload {
1286
+ /** Who registered it. */
1287
+ actor: Actor;
1288
+ /** Why. */
1289
+ reason: string;
1290
+ /** The spool, as it was registered. */
1291
+ spool: SpoolRecord;
1292
+ }
1293
+ /** A spool was retired. */
1294
+ export interface SpoolRetiredPayload {
1295
+ /** Who retired it. */
1296
+ actor: Actor;
1297
+ /** Why. */
1298
+ reason: string;
1299
+ /** Its figure as it was retired, in grams. */
1300
+ remaining_g: number;
1301
+ /** The spool retired. */
1302
+ spool_id: SpoolId;
1303
+ }
1304
+ /** How far a spool's remaining figure can be trusted. */
1305
+ export type SpoolTrust = {
1306
+ state: "verified";
1307
+ } | {
1308
+ state: "unverified";
1309
+ marks: Array<UnverifiedMark>;
1310
+ };
1311
+ /** A spool was unloaded from its tool. */
1312
+ export interface SpoolUnloadedPayload {
1313
+ /** Who unloaded it. */
1314
+ actor: Actor;
1315
+ /** Why. */
1316
+ reason: string;
1317
+ /** The spool unloaded. */
1318
+ spool_id: SpoolId;
1319
+ /** The tool it left. */
1320
+ tool: number;
1321
+ }
1322
+ /** A spool was marked as one whose figure is in doubt. */
1323
+ export interface SpoolUnverifiedPayload {
1324
+ /** Why its figure is in doubt. */
1325
+ reason: UnverifiedReason;
1326
+ /** The spool marked. */
1327
+ spool_id: SpoolId;
1328
+ }
1329
+ /**
1330
+ * What the spools read answers.
1331
+ *
1332
+ * `at_a_glance` is one line per spool, in the order `spools` lists them,
1333
+ * composed here so that what is left on each spool is the first thing a
1334
+ * reader of either rendering meets rather than a figure inside a whole
1335
+ * record. Its name is what puts it first: both renderings walk an answer's
1336
+ * fields in name order, ahead of `pending` and `spools`.
1337
+ */
1338
+ export interface SpoolsAnswer {
1339
+ /** One line per spool in `spools`, in the same order. */
1340
+ at_a_glance: Array<string>;
1341
+ /**
1342
+ * Every charge held after a filament change nobody has confirmed, oldest
1343
+ * first: what the next spool loaded on that tool is charged.
1344
+ */
1345
+ pending: Array<PendingCharge>;
1346
+ /**
1347
+ * Every spool, retired ones only when asked for, most recently registered
1348
+ * first.
1349
+ */
1350
+ spools: Array<SpoolRecord>;
1351
+ }
743
1352
  /**
744
1353
  * What one restart put back the way it found it.
745
1354
  *
@@ -813,8 +1422,114 @@ export interface SupervisionSessionOpenedPayload {
813
1422
  /** The session's own name in the harness. */
814
1423
  session_name: string;
815
1424
  }
1425
+ /** What a printer history read answers: one page of the printer's own events. */
1426
+ export interface TimelineAnswer {
1427
+ /** The events, newest first. */
1428
+ events: Array<EventRecord>;
1429
+ /**
1430
+ * The cursor for the following, older page, given as `before`; absent
1431
+ * when there is none.
1432
+ */
1433
+ next?: EventId | null;
1434
+ }
816
1435
  /** An instant in UTC, as an RFC 3339 string with a zero offset. */
817
1436
  export type Timestamp = string;
1437
+ /** The filament one tool feeds, as a length and, when it is known, a volume. */
1438
+ export interface ToolFilament {
1439
+ /** The length of filament fed, in millimetres. */
1440
+ length_mm: number;
1441
+ /** The tool, in the printer's own numbering. */
1442
+ tool: number;
1443
+ /**
1444
+ * The volume of filament fed, in cubic centimetres, when the source
1445
+ * reported one.
1446
+ */
1447
+ volume_cm3?: number | null;
1448
+ }
1449
+ /** A print this system never saw was found in the printer's own tally. */
1450
+ export interface UnaccountedPrintPayload {
1451
+ /** Whether it was charged against a spool. */
1452
+ charged: boolean;
1453
+ /** The file that was printed. */
1454
+ file_name: string;
1455
+ /** When it was printed, when the printer says. */
1456
+ printed_at?: Timestamp | null;
1457
+ /** Whether it completed. */
1458
+ success: boolean;
1459
+ }
1460
+ /** One reason a spool's figure is in doubt, and since when. */
1461
+ export interface UnverifiedMark {
1462
+ /** Why the figure is in doubt. */
1463
+ reason: UnverifiedReason;
1464
+ /** When the spool was marked for it. */
1465
+ since: Timestamp;
1466
+ }
1467
+ /** Why a spool's figure is in doubt. */
1468
+ export type UnverifiedReason = {
1469
+ reason: "uncharged_print";
1470
+ print_id: PrintId;
1471
+ } | {
1472
+ reason: "unaccounted_print";
1473
+ file_name: string;
1474
+ printed_at: Timestamp;
1475
+ } | {
1476
+ reason: "filament_change_unconfirmed";
1477
+ print_id: PrintId;
1478
+ } | {
1479
+ reason: "filament_change_unconfirmed_position";
1480
+ print_id: PrintId;
1481
+ } | {
1482
+ reason: "tally_reset";
1483
+ file_name: string;
1484
+ origin: string;
1485
+ };
1486
+ /**
1487
+ * Every kind the server declares a payload type for, keyed by the kind's
1488
+ * name, and the type each payload has. A kind this client does not know
1489
+ * flows through `EventRecord` untouched, and is in no table.
1490
+ */
1491
+ export interface EventPayloads {
1492
+ action_executed: ActionExecutedPayload;
1493
+ action_rejected: ActionRejectedPayload;
1494
+ action_requested: ActionRequestedPayload;
1495
+ agent_assessment: AgentAssessmentPayload;
1496
+ camera_look: CameraLookPayload;
1497
+ charge_pended: ChargePendedPayload;
1498
+ filament_change_signalled: FilamentChangeSignalledPayload;
1499
+ filament_consumed: FilamentConsumedPayload;
1500
+ file_tally_rebaselined: FileTallyRebaselinedPayload;
1501
+ intervention_expired: InterventionExpiredPayload;
1502
+ malformed_external_event: MalformedExternalEventPayload;
1503
+ obico_failure_alert: ObicoFailureAlertPayload;
1504
+ obico_printer_notification: ObicoPrinterNotificationPayload;
1505
+ operator_acknowledgement: OperatorAcknowledgementPayload;
1506
+ periodic_observation: PeriodicObservationPayload;
1507
+ port_failure: PortFailurePayload;
1508
+ preflight_checked: PreflightCheckedPayload;
1509
+ print_ended: PrintEndedPayload;
1510
+ print_started: PrintStartedPayload;
1511
+ print_untracked: PrintUntrackedPayload;
1512
+ spool_adjusted: SpoolAdjustedPayload;
1513
+ spool_command_rejected: SpoolCommandRejectedPayload;
1514
+ spool_loaded: SpoolLoadedPayload;
1515
+ spool_registered: SpoolRegisteredPayload;
1516
+ spool_retired: SpoolRetiredPayload;
1517
+ spool_unloaded: SpoolUnloadedPayload;
1518
+ spool_unverified: SpoolUnverifiedPayload;
1519
+ startup_reconciliation: StartupReconciliationPayload;
1520
+ supervision_session_closed: SupervisionSessionClosedPayload;
1521
+ supervision_session_opened: SupervisionSessionOpenedPayload;
1522
+ unaccounted_print: UnaccountedPrintPayload;
1523
+ }
1524
+ /** Every kind the server declares a payload type for, in name order. */
1525
+ export declare const EVENT_KINDS: readonly ["action_executed", "action_rejected", "action_requested", "agent_assessment", "camera_look", "charge_pended", "filament_change_signalled", "filament_consumed", "file_tally_rebaselined", "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", "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"];
1526
+ /**
1527
+ * The payload of one event as the type its kind declares, or `undefined` for
1528
+ * an event of any other kind — one this client knows or one it does not. No
1529
+ * validation beyond the kind's name: the payload is the document the server
1530
+ * sent, handed on as the type the table says it is.
1531
+ */
1532
+ export declare function payloadOf<K extends keyof EventPayloads>(event: EventRecord, kind: K): EventPayloads[K] | undefined;
818
1533
  /**
819
1534
  * One method per operation the server declares.
820
1535
  *
@@ -823,6 +1538,14 @@ export type Timestamp = string;
823
1538
  * vocabulary are hand-written, and this class is written against them.
824
1539
  */
825
1540
  export declare class GeneratedClient extends GeneratedSurface {
1541
+ /**
1542
+ * Call `prints` on the configured supervisor.
1543
+ *
1544
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1545
+ * the answer could not be read, and with `Refused` when the supervisor
1546
+ * said no.
1547
+ */
1548
+ prints(): Promise<PrintsAnswer>;
826
1549
  /**
827
1550
  * Call `status` on the configured supervisor.
828
1551
  *
@@ -863,6 +1586,14 @@ export declare class GeneratedClient extends GeneratedSurface {
863
1586
  * said no.
864
1587
  */
865
1588
  manifestGet(printId: string): Promise<ManifestAnswer>;
1589
+ /**
1590
+ * Call `look` on the configured supervisor.
1591
+ *
1592
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1593
+ * the answer could not be read, and with `Refused` when the supervisor
1594
+ * said no.
1595
+ */
1596
+ look(printId: string, waitS?: number): Promise<Look>;
866
1597
  /**
867
1598
  * Call `manifest_set` on the configured supervisor.
868
1599
  *
@@ -873,6 +1604,38 @@ export declare class GeneratedClient extends GeneratedSurface {
873
1604
  * the reason, the value asked for and the range allowed.
874
1605
  */
875
1606
  manifestSet(printId: string, reason: string, manifest: JobManifest): Promise<ManifestAnswer>;
1607
+ /**
1608
+ * Call `spools` on the configured supervisor.
1609
+ *
1610
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1611
+ * the answer could not be read, and with `Refused` when the supervisor
1612
+ * said no.
1613
+ */
1614
+ spools(includeRetired?: boolean): Promise<SpoolsAnswer>;
1615
+ /**
1616
+ * Call `spool` on the configured supervisor.
1617
+ *
1618
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1619
+ * the answer could not be read, and with `Refused` when the supervisor
1620
+ * said no.
1621
+ */
1622
+ spool(spoolId: string): Promise<SpoolAnswer>;
1623
+ /**
1624
+ * Call `printer_history` on the configured supervisor.
1625
+ *
1626
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1627
+ * the answer could not be read, and with `Refused` when the supervisor
1628
+ * said no.
1629
+ */
1630
+ printerHistory(kinds?: Array<string>, since?: string, until?: string, spoolId?: string, before?: string, limit?: number): Promise<TimelineAnswer>;
1631
+ /**
1632
+ * Call `preflight` on the configured supervisor.
1633
+ *
1634
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1635
+ * the answer could not be read, and with `Refused` when the supervisor
1636
+ * said no.
1637
+ */
1638
+ preflight(fileName: string): Promise<PreflightAnswer>;
876
1639
  /**
877
1640
  * Call `pause` on the configured supervisor.
878
1641
  *
@@ -912,7 +1675,7 @@ export declare class GeneratedClient extends GeneratedSurface {
912
1675
  * is made, and the policy's own refusal arrives as `Rejected`, carrying
913
1676
  * the reason, the value asked for and the range allowed.
914
1677
  */
915
- startPrint(printId: string, fileName: FileName, manifest: JobManifest, reason: string): Promise<ActionAnswer>;
1678
+ startPrint(printId: string, fileName: FileName, manifest: JobManifest, reason: string, overrideFilamentCheck?: boolean): Promise<ActionAnswer>;
916
1679
  /**
917
1680
  * Call `set_feedrate_factor` on the configured supervisor.
918
1681
  *
@@ -973,4 +1736,54 @@ export declare class GeneratedClient extends GeneratedSurface {
973
1736
  * the reason, the value asked for and the range allowed.
974
1737
  */
975
1738
  acknowledgeFailure(printId: string, disposition: AcknowledgementDisposition, eventId: EventId, reason: string): Promise<ActionAnswer>;
1739
+ /**
1740
+ * Call `register_spool` on the configured supervisor.
1741
+ *
1742
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1743
+ * the answer could not be read, and with `Refused` when the supervisor
1744
+ * said no. A call whose reason is empty is refused here, before a request
1745
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
1746
+ * the reason, the value asked for and the range allowed.
1747
+ */
1748
+ registerSpool(initialG: number, material: string, name: string, reason: string, color?: string, densityGCm3?: number, diameterMm?: number, remainingG?: number, tareG?: number): Promise<SpoolCommandAnswer>;
1749
+ /**
1750
+ * Call `load_spool` on the configured supervisor.
1751
+ *
1752
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1753
+ * the answer could not be read, and with `Refused` when the supervisor
1754
+ * said no. A call whose reason is empty is refused here, before a request
1755
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
1756
+ * the reason, the value asked for and the range allowed.
1757
+ */
1758
+ loadSpool(spoolId: string, reason: string, tool: number): Promise<SpoolCommandAnswer>;
1759
+ /**
1760
+ * Call `unload_spool` on the configured supervisor.
1761
+ *
1762
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1763
+ * the answer could not be read, and with `Refused` when the supervisor
1764
+ * said no. A call whose reason is empty is refused here, before a request
1765
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
1766
+ * the reason, the value asked for and the range allowed.
1767
+ */
1768
+ unloadSpool(spoolId: string, reason: string): Promise<SpoolCommandAnswer>;
1769
+ /**
1770
+ * Call `adjust_spool` on the configured supervisor.
1771
+ *
1772
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1773
+ * the answer could not be read, and with `Refused` when the supervisor
1774
+ * said no. A call whose reason is empty is refused here, before a request
1775
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
1776
+ * the reason, the value asked for and the range allowed.
1777
+ */
1778
+ adjustSpool(spoolId: string, reason: string, grossG?: number, remainingG?: number): Promise<SpoolCommandAnswer>;
1779
+ /**
1780
+ * Call `retire_spool` on the configured supervisor.
1781
+ *
1782
+ * Rejects with `Unreachable` when nothing answered, with `Unreadable` when
1783
+ * the answer could not be read, and with `Refused` when the supervisor
1784
+ * said no. A call whose reason is empty is refused here, before a request
1785
+ * is made, and the policy's own refusal arrives as `Rejected`, carrying
1786
+ * the reason, the value asked for and the range allowed.
1787
+ */
1788
+ retireSpool(spoolId: string, reason: string): Promise<SpoolCommandAnswer>;
976
1789
  }