-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1796 lines (1796 loc) · 65 KB
/
openapi.json
File metadata and controls
1796 lines (1796 loc) · 65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"components": {
"schemas": {
"BatchInferProgress": {
"description": "Aggregate progress for a batched infer job across all language groups.",
"properties": {
"language_groups": {
"additionalProperties": {
"$ref": "#/components/schemas/LanguageGroupProgress"
},
"description": "Per-language-group progress, keyed by language code.\nUses BTreeMap for deterministic JSON serialization.",
"propertyNames": {
"type": "string"
},
"type": "object"
}
},
"required": [
"language_groups"
],
"type": "object"
},
"ClientPath": {
"description": "A path on the submitting client's filesystem.\n\nThe server MUST NOT do filesystem I/O on this directly — it's metadata\nonly. The only way to convert it to a [`ServerPath`] for I/O is via\n[`assume_shared_filesystem`](Self::assume_shared_filesystem), which\nrequires the caller to verify that the server shares the client's\nfilesystem (paths_mode with a local daemon).\n\nDeliberately does NOT implement `AsRef<Path>` to prevent accidental\nfilesystem operations.",
"type": "string"
},
"ContentType": {
"description": "Engine category that supports backend overrides.\n\nCurrently only ASR and FA have multiple engine backends.\nOther inference tasks (morphosyntax, utseg, translate, coref)\nalways use their single built-in engine.\nMIME-like content discriminator for file results.",
"enum": [
"chat",
"csv",
"text"
],
"type": "string"
},
"DisplayPath": {
"description": "Display path for a file within a job: either a bare basename\n(`\"sample.cha\"`) for single-file input or a relative forward-slash path\n(`\"PWA/TYO_a1.cha\"`) for directory input with subdirectories.\n\nBackslashes are normalized to forward slashes on construction so the value\nis platform-independent regardless of whether the CLI ran on Windows.\n\nThis type replaces the former `FileName` which incorrectly rejected path\nseparators during deserialization even though the system routinely carries\nrelative paths.",
"type": "string"
},
"DurationSeconds": {
"description": "Duration measured in fractional seconds.",
"format": "double",
"type": "number"
},
"ErrorResponse": {
"description": "Standard error response body, matching FastAPI's `HTTPException` format.\n\nAll non-2xx responses from the server use this shape so that clients\ncan parse errors uniformly. The one exception is\n[`ServerError::JobConflict`](crate::error::ServerError::JobConflict),\nwhich nests a `conflicts` array inside `detail`.",
"properties": {
"detail": {
"description": "Human-readable description of what went wrong. For validation\nerrors this includes the specific field or constraint that failed.",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
"ExecutionMode": {
"description": "How a job reaches its execution host.",
"enum": [
"local",
"staged_remote",
"explicit_remote"
],
"type": "string"
},
"ExecutionPlan": {
"description": "Execution plan describing where and how a job is processed.\n\nAttached to `Job` and projected into `JobInfo` for API consumers.\nThe `stage` field tracks progress through the staged-remote lifecycle;\nfor local and explicit-remote jobs it is always [`ExecutionStage::Done`]\nonce the job finishes.",
"properties": {
"execution_host": {
"description": "Hostname of the machine executing the job (e.g. `\"net\"`, `\"davida\"`).",
"type": "string"
},
"mode": {
"$ref": "#/components/schemas/ExecutionMode",
"description": "How the job is being executed."
},
"remote_job_id": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/JobId",
"description": "For staged-remote jobs: the job ID on the remote server.\n`None` until the remote job is submitted."
}
]
},
"stage": {
"$ref": "#/components/schemas/ExecutionStage",
"description": "Current lifecycle stage of the execution plan."
}
},
"required": [
"mode",
"execution_host",
"stage"
],
"type": "object"
},
"ExecutionStage": {
"description": "Lifecycle stage of a staged-remote execution plan.\n\nFor [`ExecutionMode::Local`] and [`ExecutionMode::ExplicitRemote`] jobs,\nthe stage is always [`Done`](ExecutionStage::Done) on completion.",
"enum": [
"staging",
"executing",
"copying_back",
"done",
"failed"
],
"type": "string"
},
"FailureCategory": {
"description": "Broad classification for failures seen by the control plane.\n\nRetry behavior should be defined against these categories rather than raw\nerror strings.",
"enum": [
"validation",
"parse_error",
"input_missing",
"worker_crash",
"worker_timeout",
"worker_protocol",
"provider_transient",
"provider_terminal",
"memory_pressure",
"cancelled",
"system"
],
"type": "string"
},
"FilePayload": {
"description": "A single CHAT file submitted by the client.",
"properties": {
"content": {
"description": "Full CHAT file text.",
"type": "string"
},
"filename": {
"$ref": "#/components/schemas/DisplayPath",
"description": "Original filename (e.g. \"01DM_18.cha\")."
}
},
"required": [
"filename",
"content"
],
"type": "object"
},
"FileProgressStage": {
"description": "Machine-readable sub-stage within a file's processing lifecycle.\n\nThis is more specific than [`FileStatusKind`]. For example, a file may be\nin the coarse `Processing` status while its current progress stage is\n`Aligning`, `BuildingChat`, or `RetryScheduled`.\n\nThe API exposes this enum so clients can branch on stable stage codes\nwithout parsing human-facing display labels.",
"enum": [
"processing",
"reading",
"resolving_audio",
"recovering_utterance_timing",
"recovering_timing_fallback",
"aligning",
"transcribing",
"benchmarking",
"checking_cache",
"applying_results",
"post_processing",
"building_chat",
"segmenting_utterances",
"analyzing_morphosyntax",
"finalizing",
"writing",
"parsing",
"analyzing",
"segmenting",
"translating",
"resolving_coreference",
"comparing",
"retry_scheduled"
],
"type": "string"
},
"FileResult": {
"description": "Result for a single processed file.",
"properties": {
"content": {
"description": "Processed file content (CHAT text or CSV). Empty string when\n`error` is `Some`.",
"type": "string"
},
"content_type": {
"$ref": "#/components/schemas/ContentType",
"description": "MIME-like content discriminator: `\"chat\"` for CHAT files (default),\n`\"csv\"` for tabular output (e.g. opensmile features)."
},
"error": {
"description": "Human-readable error message if this file failed processing.\n`None` for successfully processed files.",
"type": [
"string",
"null"
]
},
"filename": {
"$ref": "#/components/schemas/DisplayPath",
"description": "Display path for this file: a bare basename (`\"sample.cha\"`) or a\nrelative forward-slash path (`\"PWA/TYO_a1.cha\"`) for directory input.\nBackslashes are normalized to forward slashes on construction."
},
"provenance": {
"description": "Processing provenance extracted from the output CHAT file.\nEach entry records one batchalign3 command that was applied\n(command name, engine version, timestamp). Empty for non-CHAT\noutput or files that failed processing.",
"items": {
"$ref": "#/components/schemas/ProvenanceEntry"
},
"type": "array"
}
},
"required": [
"filename"
],
"type": "object"
},
"FileStatusEntry": {
"description": "Per-file status within a job.\n\nTracks processing state, timing, progress, and error details for a\nsingle file. The server updates these entries as workers report\nresults, and they are included in `JobInfo.file_statuses`.",
"properties": {
"bug_report_id": {
"description": "Opaque identifier linking to a persisted bug report (for post-mortem\nanalysis). Generated by the server when a file fails unexpectedly.",
"type": [
"string",
"null"
]
},
"error": {
"description": "Human-readable error message. Present only when `status` is `Error`.",
"type": [
"string",
"null"
]
},
"error_category": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/FailureCategory",
"description": "Broad classification of the failure. Helps the dashboard and retry\nlogic group failures without parsing free-form messages."
}
]
},
"error_codes": {
"description": "CHAT validation error codes (e.g. `[\"E362\", \"E704\"]`) when the failure\nwas a validation rejection. Empty or absent for non-validation errors.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"error_line": {
"description": "1-based line number in the CHAT file where the first error was\ndetected, if applicable.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"filename": {
"$ref": "#/components/schemas/DisplayPath",
"description": "Display path for this file: a bare basename (`\"sample.cha\"`) or a\nrelative forward-slash path (`\"PWA/TYO_a1.cha\"`) for directory input.\nBackslashes are normalized to forward slashes on construction."
},
"finished_at": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/UnixTimestamp",
"description": "Unix timestamp (seconds since epoch) when processing finished\n(successfully or with error)."
}
]
},
"next_eligible_at": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/UnixTimestamp",
"description": "When the file is deferred for a retry, the earliest unix timestamp at\nwhich another attempt should start. `None` when no retry is pending."
}
]
},
"progress_current": {
"description": "Number of sub-steps completed so far (e.g. utterances processed).\nUsed with `progress_total` to drive progress bars.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"progress_label": {
"description": "Human-readable label for the current processing stage\n(e.g. \"Morphosyntax\", \"Forced Alignment\").\n\nThis is derived from `progress_stage` by the server so operators can\nrender friendly text without hard-coding label mappings in every UI.",
"type": [
"string",
"null"
]
},
"progress_stage": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/FileProgressStage",
"description": "Machine-readable code for the current in-flight processing stage.\n\nThis is the stable field clients should use for branching or\nconditional UI. [`Self::progress_label`] is derived display text."
}
]
},
"progress_total": {
"description": "Total number of sub-steps expected for this file.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"started_at": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/UnixTimestamp",
"description": "Unix timestamp (seconds since epoch) when the worker began processing\nthis file."
}
]
},
"status": {
"$ref": "#/components/schemas/FileStatusKind",
"description": "Current lifecycle state of this file."
}
},
"required": [
"filename",
"status"
],
"type": "object"
},
"FileStatusKind": {
"description": "Per-file lifecycle states within a job.\n\nEach file in a job tracks its own status independently. On job restart,\nonly files in resumable states (`Queued`, `Processing`, `Interrupted`) are\nre-queued; `Done` and `Error` files are left as-is.",
"enum": [
"queued",
"processing",
"done",
"error",
"interrupted"
],
"type": "string"
},
"HealthResponse": {
"description": "`GET /health` response.\n\nProvides a snapshot of server liveness, capacity, and operational\nmetrics. The CLI uses this for daemon version checks (`build_hash`) and\ncapability probing.",
"properties": {
"active_jobs": {
"description": "Number of jobs currently in `Queued` or `Running` state.",
"format": "int64",
"type": "integer"
},
"attempts_retried": {
"description": "Cumulative count of attempts that were explicitly marked retryable.",
"format": "int64",
"type": "integer"
},
"attempts_started": {
"description": "Cumulative count of work-unit attempts started since server start.",
"format": "int64",
"type": "integer"
},
"build_hash": {
"description": "Build fingerprint — changes on every rebuild. Used for stale-binary\ndetection during development. Empty string from older servers.",
"type": "string"
},
"cache_backend": {
"description": "Utterance cache backend in use: `\"sqlite\"` (default).",
"type": "string"
},
"capabilities": {
"description": "Batchalign commands this server can process (e.g. `[\"morphotag\",\n\"align\", \"transcribe\"]`). Determined by probing worker capabilities\nat startup.",
"items": {
"type": "string"
},
"type": "array"
},
"deferred_work_units": {
"description": "Cumulative count of work units that were deferred for later execution.",
"format": "int64",
"type": "integer"
},
"forced_terminal_errors": {
"description": "Cumulative count of files that were force-terminated (e.g. OOM-killed\nworkers, stuck processes) since server start.",
"format": "int64",
"type": "integer"
},
"free_threaded": {
"description": "Whether the Python workers are running on free-threaded Python\n(3.14t+). Affects memory budgets and concurrency strategy.",
"type": "boolean"
},
"host_memory_active_leases": {
"description": "Human-readable labels for active coordinator leases.",
"items": {
"type": "string"
},
"type": "array"
},
"host_memory_error": {
"description": "Snapshot error surfaced when the host-memory ledger cannot be read.",
"type": [
"string",
"null"
]
},
"host_memory_job_leases": {
"description": "Number of active job-execution leases in the host coordinator.",
"format": "int64",
"type": "integer"
},
"host_memory_ml_test_locks": {
"description": "Number of active machine-wide ML test locks in the host coordinator.",
"format": "int64",
"type": "integer"
},
"host_memory_pressure": {
"$ref": "#/components/schemas/HostMemoryPressureLevel",
"description": "Host-memory pressure classification derived from current OS memory plus\nactive cross-process reservations."
},
"host_memory_reserved_mb": {
"$ref": "#/components/schemas/MemoryMb",
"description": "Total memory currently reserved by the host-memory coordinator."
},
"host_memory_startup_leases": {
"description": "Number of active worker/model startup leases in the host coordinator.",
"format": "int64",
"type": "integer"
},
"job_slots_available": {
"description": "Number of additional jobs the server can accept right now, based on\nmemory and concurrency limits.",
"format": "int64",
"type": "integer"
},
"live_worker_keys": {
"description": "Active worker keys (`target:lang`) currently loaded in the pool.\nInfer-task workers use labels such as `infer:asr:eng`.",
"items": {
"type": "string"
},
"type": "array"
},
"live_workers": {
"description": "Number of currently live Python worker processes.",
"format": "int64",
"type": "integer"
},
"loaded_pipelines": {
"description": "Pipelines currently loaded in memory (warm workers). A subset of\n`capabilities` — only commands whose workers have been spawned.",
"items": {
"type": "string"
},
"type": "array"
},
"media_mapping_keys": {
"description": "Named keys from `server.yaml` `media_mappings`, each mapping a\nlogical name (e.g. \"childes-data\") to a filesystem root.",
"items": {
"type": "string"
},
"type": "array"
},
"media_roots": {
"description": "Filesystem directories the server searches for media files (audio/video).\nConfigured via `server.yaml` `media_roots`.",
"items": {
"type": "string"
},
"type": "array"
},
"memory_gate_aborts": {
"description": "Backward-compat counter for job deferrals caused by host-memory\nadmission pressure.",
"format": "int64",
"type": "integer"
},
"memory_gate_threshold_mb": {
"$ref": "#/components/schemas/MemoryMb",
"description": "Host-memory reserve threshold in MB from server config. 0 means the\ncoordinator will not keep explicit free-memory headroom."
},
"node_id": {
"$ref": "#/components/schemas/NodeId",
"description": "Identifier of the current server node."
},
"status": {
"$ref": "#/components/schemas/HealthStatus",
"description": "Server health status. Always `Ok` in the current implementation\n(the endpoint itself being reachable implies health), but future\nversions may report degraded states."
},
"system_memory_available_mb": {
"$ref": "#/components/schemas/MemoryMb",
"description": "Available memory in MB (free + reclaimable). On macOS this is\n`free + purgeable` which can undercount; see `sysinfo` docs."
},
"system_memory_total_mb": {
"$ref": "#/components/schemas/MemoryMb",
"description": "Total physical memory in MB."
},
"system_memory_used_mb": {
"$ref": "#/components/schemas/MemoryMb",
"description": "Used memory in MB (`total - available`)."
},
"version": {
"description": "Server software version (e.g. `\"0.6.0\"`). Used by the CLI to\ndetect stale daemons and auto-restart them.",
"type": "string"
},
"warmup_status": {
"$ref": "#/components/schemas/WarmupStatus",
"description": "Background warmup lifecycle state: `\"not_started\"`, `\"in_progress\"`,\nor `\"complete\"`. Clients can poll this to know when the server is\nfully ready for low-latency jobs."
},
"worker_crashes": {
"description": "Cumulative count of worker process crashes since server start.\nA high rate suggests resource exhaustion or buggy engine code.",
"format": "int64",
"type": "integer"
},
"workers_available": {
"description": "Backward-compat alias for `job_slots_available`. Older clients read\nthis field; newer clients prefer `job_slots_available`.",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"HealthStatus": {
"description": "Server health status.",
"enum": [
"ok"
],
"type": "string"
},
"HostMemoryPressureLevel": {
"description": "Host-wide memory pressure level derived from the current memory snapshot and\nreserved headroom.",
"enum": [
"healthy",
"guarded",
"constrained",
"critical"
],
"type": "string"
},
"JobControlPlaneBackendKind": {
"description": "Control-plane backend that currently owns orchestration for a server job.",
"enum": [
"temporal",
"test"
],
"type": "string"
},
"JobControlPlaneInfo": {
"description": "Backend-owned orchestration metadata for a job projection.",
"properties": {
"backend": {
"$ref": "#/components/schemas/JobControlPlaneBackendKind",
"description": "Control-plane backend that produced this projection."
},
"temporal": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TemporalWorkflowExecutionInfo",
"description": "Temporal workflow execution metadata when `backend == temporal`."
}
]
}
},
"required": [
"backend"
],
"type": "object"
},
"JobId": {
"description": "Server-assigned identifier for a job (non-empty).",
"type": "string"
},
"JobInfo": {
"description": "`GET /jobs/{id}` response — job progress.\n\nContains full detail about a single job, including per-file statuses.\nPolled by the CLI to drive progress bars and by the dashboard for\nlive-updating tables.",
"properties": {
"active_lease": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/LeaseRecord",
"description": "Active lease information when this job is currently claimed by a node."
}
]
},
"batch_progress": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/BatchInferProgress",
"description": "Per-language-group progress for batched text commands (morphotag,\nutseg, translate, coref). Present only while a batch is in flight."
}
]
},
"command": {
"$ref": "#/components/schemas/ReleasedCommand",
"description": "Batchalign command that was submitted (e.g. \"morphotag\", \"align\")."
},
"completed_at": {
"description": "ISO 8601 timestamp of when the job reached a terminal state.",
"type": [
"string",
"null"
]
},
"completed_files": {
"description": "Number of files that have finished processing (status `Done`).\nInvariant: `0 <= completed_files <= total_files`.",
"format": "int64",
"type": "integer"
},
"control_plane": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/JobControlPlaneInfo",
"description": "Server control-plane metadata for this job when returned by a server."
}
]
},
"current_file": {
"description": "Filename currently being processed. `None` when the job is queued\nor has reached a terminal state.",
"type": [
"string",
"null"
]
},
"duration_s": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/DurationSeconds",
"description": "Wall-clock duration from first file dispatched to last file finished,\nin seconds. `None` while the job is still active."
}
]
},
"error": {
"description": "Job-level error message (e.g. worker pool exhaustion, memory gate\ntimeout). Distinct from per-file errors in `file_statuses`.",
"type": [
"string",
"null"
]
},
"execution_plan": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ExecutionPlan",
"description": "Execution plan describing where and how this job is processed.\nPresent for staged-remote jobs; `None` for local execution."
}
]
},
"file_statuses": {
"description": "Per-file processing status, one entry per submitted file.",
"items": {
"$ref": "#/components/schemas/FileStatusEntry"
},
"type": "array"
},
"job_id": {
"$ref": "#/components/schemas/JobId",
"description": "Server-assigned UUID (v4) for this job."
},
"lang": {
"$ref": "#/components/schemas/LanguageSpec",
"description": "Language specification: a resolved ISO 639-3 code or `\"auto\"`."
},
"next_eligible_at": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/UnixTimestamp",
"description": "When the job is deferred before execution, the earliest unix timestamp\nat which it should be retried. `None` when the job is immediately\neligible to run."
}
]
},
"num_workers": {
"description": "Number of concurrent Python workers used for this job. Determined\nby the pool at dispatch time. `None` for queued jobs.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"options": {
"description": "Typed submitted command options captured at job creation time.\n\nThe dashboard uses this to show the original argument/config payload for\ndebugging and operator review without reconstructing a lossy CLI string."
},
"source_dir": {
"description": "Client's original input directory path, used for display in the\ndashboard and CLI output. May be empty for content-mode submissions.",
"type": "string"
},
"status": {
"$ref": "#/components/schemas/JobStatus",
"description": "Current lifecycle state of the job."
},
"submitted_at": {
"description": "ISO 8601 timestamp of when the job was submitted (e.g.\n`\"2026-01-15T10:00:00Z\"`).",
"type": [
"string",
"null"
]
},
"submitted_by": {
"description": "IP address or Tailscale identifier of the submitting client.\nUsed for conflict detection (same `submitted_by` + filename =\nduplicate).",
"type": [
"string",
"null"
]
},
"submitted_by_name": {
"description": "Human-readable hostname of the submitting machine, resolved from\nTailscale or reverse DNS. For dashboard display only.",
"type": [
"string",
"null"
]
},
"total_files": {
"description": "Total number of files in this job (immutable after submission).",
"format": "int64",
"type": "integer"
}
},
"required": [
"job_id",
"status",
"command",
"options",
"total_files",
"completed_files"
],
"type": "object"
},
"JobListItem": {
"description": "Summary for job listing (`GET /jobs` response element).\n\nA lighter-weight projection of [`JobInfo`] without per-file statuses,\nsuitable for listing many jobs at once.",
"properties": {
"active_lease": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/LeaseRecord",
"description": "Active lease information when this job is currently claimed by a node."
}
]
},
"command": {
"$ref": "#/components/schemas/ReleasedCommand",
"description": "Batchalign command (e.g. \"morphotag\", \"align\")."
},
"completed_at": {
"description": "ISO 8601 timestamp of when the job reached a terminal state.",
"type": [
"string",
"null"
]
},
"completed_files": {
"description": "Number of files that finished successfully (`Done`).",
"format": "int64",
"type": "integer"
},
"control_plane": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/JobControlPlaneInfo",
"description": "Server control-plane metadata for this job when returned by a server."
}
]
},
"duration_s": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/DurationSeconds",
"description": "Wall-clock duration in seconds. `None` while the job is active."
}
]
},
"error_files": {
"description": "Number of files that ended in `Error` status.",
"format": "int64",
"type": "integer"
},
"job_id": {
"$ref": "#/components/schemas/JobId",
"description": "Server-assigned UUID (v4) for this job."
},
"lang": {
"$ref": "#/components/schemas/LanguageSpec",
"description": "Language specification: a resolved ISO 639-3 code or `\"auto\"`."
},
"next_eligible_at": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/UnixTimestamp",
"description": "When the job is deferred before execution, the earliest unix timestamp\nat which it should be retried. `None` when immediately eligible."
}
]
},
"num_workers": {
"description": "Number of concurrent Python workers used for this job.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"source_dir": {
"description": "Client's original input directory path, for display.",
"type": "string"
},
"status": {
"$ref": "#/components/schemas/JobStatus",
"description": "Current lifecycle state of the job."
},
"submitted_at": {
"description": "ISO 8601 timestamp of submission.",
"type": [
"string",
"null"
]
},
"submitted_by": {
"description": "IP address or Tailscale identifier of the submitting client.",
"type": [
"string",
"null"
]
},
"submitted_by_name": {
"description": "Human-readable hostname of the submitting machine.",
"type": [
"string",
"null"
]
},
"total_files": {
"description": "Total number of files in this job.",
"format": "int64",
"type": "integer"
}
},
"required": [
"job_id",
"status",
"command",
"total_files",
"completed_files"
],
"type": "object"
},
"JobResultResponse": {
"description": "`GET /jobs/{id}/results` response — completed job results.",
"properties": {
"files": {
"description": "Per-file results (empty until the job completes).",
"items": {
"$ref": "#/components/schemas/FileResult"
},
"type": "array"
},
"job_id": {
"$ref": "#/components/schemas/JobId",
"description": "Unique job identifier."
},
"status": {
"$ref": "#/components/schemas/JobStatus",
"description": "Terminal status of the job."
}
},
"required": [
"job_id",
"status"
],
"type": "object"
},
"JobStatus": {
"description": "Lifecycle states for a job — mirrors `JobStatus` enum.\n\nJobs progress through a linear lifecycle: `Queued -> Running -> {terminal}`.\nTerminal states (`Completed`, `Failed`, `Cancelled`, `Interrupted`) are\npermanent and never transition further. Only `Cancelled` and `Failed` jobs\ncan be restarted (which resets them to `Queued`).",
"enum": [
"queued",
"running",
"completed",
"failed",
"cancelled",
"interrupted",
"writeback_failed"
],
"type": "string"
},
"JobSubmission": {
"description": "`POST /jobs` request body.",
"properties": {
"before_paths": {
"description": "Absolute paths to \"before\" files for incremental processing\n(paths_mode only). When non-empty, the diff engine compares each\nbefore file against its corresponding source_path and only\nreprocesses changed utterances.\n\nMust be the same length as `source_paths` when non-empty.",
"items": {
"$ref": "#/components/schemas/ClientPath"
},
"type": "array"
},
"command": {
"$ref": "#/components/schemas/ReleasedCommand",
"description": "Batchalign command (align, morphotag, etc.)."
},
"debug_traces": {
"description": "When true, the server collects detailed algorithm traces for\nvisualization (DP alignment matrices, ASR pipeline stages, FA\ntimelines, retokenization mappings). Defaults to false — zero\noverhead when off.",
"type": "boolean"
},
"display_names": {
"description": "Human-readable filenames for display (paths_mode only, optional).",
"items": {
"type": "string"
},
"type": "array"
},
"files": {
"description": "CHAT files to process.",
"items": {
"$ref": "#/components/schemas/FilePayload"
},
"type": "array"
},
"lang": {
"$ref": "#/components/schemas/LanguageSpec",
"description": "Language specification: a 3-letter ISO code or `\"auto\"` for\nASR-driven detection."
},
"media_files": {
"description": "Media filenames for the server to resolve from media_roots (transcribe only).",
"items": {
"type": "string"
},
"type": "array"
},
"media_mapping": {
"$ref": "#/components/schemas/MediaMappingKey",
"description": "Key into server's media_mappings config (e.g. \"childes-data\")."
},
"media_subdir": {
"$ref": "#/components/schemas/RepoRelativePath",
"description": "Subdirectory under the mapped root (e.g. \"Eng-NA/MacWhinney/0young-ASR\")."
},
"num_speakers": {
"$ref": "#/components/schemas/NumSpeakers",
"description": "Number of speakers."
},
"options": {
"description": "Typed command options (engine selections, processing flags, etc.)."
},
"output_paths": {
"description": "Absolute paths to write output files to (paths_mode only).",
"items": {
"$ref": "#/components/schemas/ClientPath"
},
"type": "array"
},
"paths_mode": {
"description": "When true, server reads/writes files directly via source_paths/output_paths.",
"type": "boolean"
},
"source_dir": {
"$ref": "#/components/schemas/ClientPath",
"description": "Client's input directory path (for dashboard display)."
},
"source_paths": {
"description": "Absolute paths to read input files from (paths_mode only).",
"items": {
"$ref": "#/components/schemas/ClientPath"
},
"type": "array"
}
},
"required": [
"command",
"options"
],
"type": "object"
},
"LanguageCode3": {
"description": "3-letter ISO 639-3 language code (e.g. `\"eng\"`, `\"spa\"`).\n\nConstruction validates that the value is exactly 3 ASCII alphabetic\ncharacters, lowercased. Sentinel values like `\"auto\"` are rejected — use\n[`LanguageSpec`] at boundaries where auto-detection is meaningful.",
"type": "string"