-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb_api.openapi.yaml
More file actions
1368 lines (1368 loc) · 32.7 KB
/
Copy pathweb_api.openapi.yaml
File metadata and controls
1368 lines (1368 loc) · 32.7 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
openapi: 3.1.0
info:
title: Movi Web API
version: 2.0.0
paths:
/healthz:
get:
operationId: get_healthz
responses:
'200':
description: fallback-generated response
/api/jobs/history:
get:
operationId: get_api_jobs_history
responses:
'200':
description: fallback-generated response
/api/jobs:
get:
operationId: get_api_jobs
responses:
'200':
description: fallback-generated response
/api/jobs/stream:
get:
operationId: get_api_jobs_stream
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}:
get:
operationId: get_api_jobs_job_id
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/events:
get:
operationId: get_api_jobs_job_id_events
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/stream:
get:
operationId: get_api_jobs_job_id_stream
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/events/stream:
get:
operationId: get_api_jobs_job_id_events_stream
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/cancel:
post:
operationId: post_api_jobs_job_id_cancel
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/retry:
post:
operationId: post_api_jobs_job_id_retry
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest:
get:
operationId: get_api_jobs_job_id_manifest
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest/view:
get:
operationId: get_api_jobs_job_id_manifest_view
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest/{row_id}/preview:
get:
operationId: get_api_jobs_job_id_manifest_row_id_preview
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest/rows/{row_id}:
patch:
operationId: patch_api_jobs_job_id_manifest_rows_row_id
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest/batch:
post:
operationId: post_api_jobs_job_id_manifest_batch
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest/conflicts:
get:
operationId: get_api_jobs_job_id_manifest_conflicts
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/manifest/conflicts/resolve:
post:
operationId: post_api_jobs_job_id_manifest_conflicts_resolve
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/review-queue:
get:
operationId: get_review_queue
summary: Return review queue rows with explainability and deterministic copilot
hints
responses:
'200':
description: Review-only queue payload with deterministic guardrails and
batch suggestions.
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewQueueResponse'
/api/jobs/{job_id}/report:
get:
operationId: get_job_report
summary: Return persisted report payload enriched with Wave 2 review intelligence
context
responses:
'200':
description: Report payload plus review intelligence summary for frontends.
content:
application/json:
schema:
$ref: '#/components/schemas/JobReportResponse'
/api/jobs/{job_id}/audit:
get:
operationId: get_api_jobs_job_id_audit
responses:
'200':
description: fallback-generated response
/api/jobs/analyze:
post:
operationId: post_api_jobs_analyze
responses:
'200':
description: fallback-generated response
/api/preferences/runtime:
get:
operationId: get_api_preferences_runtime
responses:
'200':
description: fallback-generated response
post:
operationId: post_api_preferences_runtime
responses:
'200':
description: fallback-generated response
/api/preferences/runtime/validate:
post:
operationId: post_api_preferences_runtime_validate
responses:
'200':
description: fallback-generated response
/api/jobs/apply:
post:
operationId: post_api_jobs_apply
responses:
'200':
description: fallback-generated response
/api/jobs/rollback:
post:
operationId: post_api_jobs_rollback
responses:
'200':
description: fallback-generated response
/api/preferences/views:
get:
operationId: get_api_preferences_views
responses:
'200':
description: fallback-generated response
post:
operationId: post_api_preferences_views
responses:
'200':
description: fallback-generated response
delete:
operationId: delete_api_preferences_views
responses:
'200':
description: fallback-generated response
/api/preferences/naming-templates:
get:
operationId: get_api_preferences_naming-templates
responses:
'200':
description: fallback-generated response
post:
operationId: post_api_preferences_naming-templates
responses:
'200':
description: fallback-generated response
delete:
operationId: delete_api_preferences_naming-templates
responses:
'200':
description: fallback-generated response
/api/preferences/review-rules:
get:
operationId: get_api_preferences_review-rules
responses:
'200':
description: fallback-generated response
post:
operationId: post_api_preferences_review-rules
responses:
'200':
description: fallback-generated response
delete:
operationId: delete_api_preferences_review-rules
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/review-rules/preview:
post:
operationId: post_api_jobs_job_id_review-rules_preview
responses:
'200':
description: fallback-generated response
/api/jobs/{job_id}/review-rules/apply:
post:
operationId: apply_review_rule
summary: Apply a saved or inline rule to the overlay only
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewRuleApplyRequest'
responses:
'200':
description: Overlay-only rule application result. Execution remains disallowed.
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewRuleApplyResponse'
/api/jobs/{job_id}/review-rules/from-examples:
post:
operationId: draft_review_rule_from_examples
summary: Infer a draft rule from reviewed examples without saving or auto-applying
it
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewRuleFromExamplesRequest'
responses:
'200':
description: Draft-only response with explicit no-save and no-execute guardrails.
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewRuleDraftResponse'
/api/jobs/{job_id}/review-queue/batch-triage:
post:
operationId: batch_triage_review_queue
summary: Apply review queue edits to the overlay for a selected batch
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewQueueBatchTriageRequest'
responses:
'200':
description: Overlay-only batch triage response. Execution remains disallowed.
content:
application/json:
schema:
$ref: '#/components/schemas/ReviewQueueBatchTriageResponse'
/api/preferences/strategy-packs:
get:
operationId: list_strategy_packs
summary: List repo-shipped strategy packs with defaults and explainability
responses:
'200':
description: Strategy packs remain template defaults, not a plugin marketplace.
content:
application/json:
schema:
$ref: '#/components/schemas/StrategyPackListResponse'
/api/preferences/learned-rules:
get:
operationId: list_learned_rules
summary: List learned suggestions and clarify transient vs reusable scope
responses:
'200':
description: Suggestion-layer learned rules only; apply remains manual.
content:
application/json:
schema:
$ref: '#/components/schemas/LearnedRuleListResponse'
delete:
operationId: delete_api_preferences_learned-rules
responses:
'200':
description: fallback-generated response
/api/preferences/watch-sources:
get:
operationId: list_watch_sources
summary: List watch sources with strategy pack context
responses:
'200':
description: Watch sources stay local-first and only drive discovery plus
explicit analyze actions.
content:
application/json:
schema:
$ref: '#/components/schemas/WatchSourceListResponse'
post:
operationId: post_api_preferences_watch-sources
responses:
'200':
description: fallback-generated response
delete:
operationId: delete_api_preferences_watch-sources
responses:
'200':
description: fallback-generated response
/api/inbox/scan:
post:
operationId: scan_inbox_sources
summary: Discover inbox batches without auto-enqueueing analyze
responses:
'200':
description: Discovery-only inbox response with explicit analyze action
payloads.
content:
application/json:
schema:
$ref: '#/components/schemas/InboxScanResponse'
/api/inbox/analyze:
post:
operationId: start_inbox_analyze
summary: Explicitly start analyze from an inbox batch using strategy pack defaults
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InboxAnalyzeRequest'
responses:
'202':
description: Explicit inbox analyze bridge from discovery into review-first
analyze.
content:
application/json:
schema:
$ref: '#/components/schemas/InboxAnalyzeResponse'
components:
schemas:
ReviewExplainability:
type: object
required:
- bucket
- reason_codes
- reasons
- collection_confidence
- learned_suggestion_count
- edited
- has_conflict
properties:
bucket:
type: string
enum: &id001
- auto_safe
- needs_review
- conflict
- blocked
reason_codes:
type: array
items:
type: string
reasons:
type: array
items:
type: string
collection_confidence:
type: number
learned_suggestion_count:
type: integer
edited:
type: boolean
has_conflict:
type: boolean
ReviewQueueBatchSuggestion:
type: object
required:
- id
- kind
- label
- review_bucket
- count
- row_ids
- reason
- next_step
properties:
id:
type: string
kind:
type: string
enum:
- bucket
- collection
label:
type: string
review_bucket:
type: string
enum: *id001
collection_id:
type: string
count:
type: integer
row_ids:
type: array
items:
type: string
reason:
type: string
next_step:
type: string
ReviewCopilotReason:
type: object
required:
- key
- title
- count
- detail
properties:
key:
type: string
title:
type: string
count:
type: integer
detail:
type: string
ReviewCopilotPriority:
type: object
required:
- row_id
- file_name
- bucket
- reason
- suggested_action
- confidence
properties:
row_id:
type: string
file_name:
type: string
bucket:
type: string
enum: *id001
reason:
type: string
suggested_action:
type: string
confidence:
type: number
ReviewCopilotRuleOpportunity:
type: object
required:
- key
- title
- reason
- row_ids
- suggested_action
properties:
key:
type: string
title:
type: string
reason:
type: string
row_ids:
type: array
items:
type: string
suggested_action:
type: string
ReviewCopilotGuardrails:
type: object
required:
- review_only
- draft_only
- overlay_only
- execute_allowed
- auto_apply
- allowed_routes
properties:
review_only:
type: boolean
draft_only:
type: boolean
overlay_only:
type: boolean
execute_allowed:
type: boolean
auto_apply:
type: boolean
allowed_routes:
type: array
items:
type: string
ReviewCopilotSummary:
type: object
required:
- mode
- headline
- reasons
- priorities
- rule_opportunities
- batch_triage
- guardrails
properties:
mode:
type: string
headline:
type: string
reasons:
type: array
items:
$ref: '#/components/schemas/ReviewCopilotReason'
priorities:
type: array
items:
$ref: '#/components/schemas/ReviewCopilotPriority'
rule_opportunities:
type: array
items:
$ref: '#/components/schemas/ReviewCopilotRuleOpportunity'
batch_triage:
type: array
items:
$ref: '#/components/schemas/ReviewQueueBatchSuggestion'
guardrails:
$ref: '#/components/schemas/ReviewCopilotGuardrails'
ReviewBridge:
type: object
required:
- mode
- next_step
- review_queue_path
- batch_triage_path
- rule_from_examples_path
- needs_review_count
- conflict_count
- blocked_count
- collection_focus_ids
- rule_opportunity_keys
- execute_allowed
properties:
mode:
type: string
next_step:
type: string
review_queue_path:
type: string
batch_triage_path:
type: string
rule_from_examples_path:
type: string
needs_review_count:
type: integer
conflict_count:
type: integer
blocked_count:
type: integer
collection_focus_ids:
type: array
items:
type: string
rule_opportunity_keys:
type: array
items:
type: string
execute_allowed:
type: boolean
LearnedSuggestion:
type: object
required:
- signal_key
- signal_value
- suggestion_type
- suggestion_value
- confidence
- count
- confidence_label
- strength
- reuse_scope
- source
- reason
- explanation
- scope_reason
properties:
signal_key:
type: string
signal_value:
type: string
suggestion_type:
type: string
suggestion_value:
type: string
confidence:
type: number
count:
type: integer
confidence_label:
type: string
strength:
type: string
reuse_scope:
type: string
enum:
- transient
- reusable
source:
type: string
reason:
type: string
explanation:
type: string
scope_reason:
type: string
ManifestRow:
type: object
required:
- row_id
- file_name
- media_type
- category
- title
- tags
- status
- error_code
- target_path
- target_suggestion
- confidence
- original_path
- notes
- ignore
- metadata
properties:
row_id:
type: string
id:
type: string
file_name:
type: string
media_type:
type: string
category:
type: string
title:
type: string
tags:
type: array
items:
type: string
status:
type: string
error_code:
type: string
target_path:
type: string
target_suggestion:
type: string
dedupe_of:
type: string
confidence:
type: number
original_path:
type: string
notes:
type: string
ignore:
type: boolean
review_bucket:
type: string
enum: *id001
has_conflict:
type: boolean
edited:
type: boolean
collection_id:
type: string
collection_title:
type: string
collection_reason:
type: string
collection_confidence:
type: number
collection_capture_day:
type: string
collection_batch_hint:
type: string
collection_source_root:
type: string
collection_kind:
type: string
collection_next_step:
type: string
collection_explainability:
type: array
items:
type: string
learned_suggestions:
type: array
items:
$ref: '#/components/schemas/LearnedSuggestion'
review_explainability:
$ref: '#/components/schemas/ReviewExplainability'
metadata:
type: object
additionalProperties:
type: string
ReviewQueueSummary:
type: object
required:
- total
- auto_safe
- needs_review
- conflict
- blocked
properties:
total:
type: integer
auto_safe:
type: integer
needs_review:
type: integer
conflict:
type: integer
blocked:
type: integer
CollectionSummary:
type: object
required:
- id
- title
- reason
- confidence
- row_ids
- kind
- next_step
- capture_day
- batch_hint
- source_root
- dominant_media_type
- media_types
- explainability
properties:
id:
type: string
title:
type: string
reason:
type: string
confidence:
type: number
row_ids:
type: array
items:
type: string
kind:
type: string
next_step:
type: string
capture_day:
type: string
batch_hint:
type: string
source_root:
type: string
dominant_media_type:
type: string
media_types:
type: array
items:
type: string
explainability:
type: array
items:
type: string
ReviewQueueResponse:
type: object
required:
- job_id
- manifest_path
- overlay_path
- summary
- collections
- rows
- returned
properties:
job:
type: object
job_id:
type: string
manifest_path:
type: string
overlay_path:
type: string
overlay_updated_at:
type: string
summary:
$ref: '#/components/schemas/ReviewQueueSummary'
copilot_summary:
$ref: '#/components/schemas/ReviewCopilotSummary'
collections:
type: array
items:
$ref: '#/components/schemas/CollectionSummary'
rows:
type: array
items:
$ref: '#/components/schemas/ManifestRow'
returned:
type: integer
ReviewRuleAction:
type: object
properties:
set_category:
type: string
set_ignore:
type: boolean
target_pattern:
type: string
ReviewRuleCondition:
type: object
properties:
query:
type: string
statuses:
type: array
items:
type: string
media_types:
type: array
items:
type: string
categories:
type: array
items:
type: string
review_buckets:
type: array
items:
type: string
min_confidence:
type: number
max_confidence:
type: number
has_conflict:
type: boolean
ignore_state:
type: boolean
ReviewRuleApplyRequest:
type: object
properties:
rule_id:
type: string
rule:
type: object
additionalProperties: false
ReviewRuleFromExamplesRequest:
type: object
required:
- row_ids
properties:
row_ids:
type: array
items:
type: string
minItems: 2
maxItems: 5
name:
type: string
additionalProperties: false
ReviewRuleDraftExplainability:
type: object
required:
- selected_count
- selected_row_ids
- shared_media_types
- shared_review_buckets
- shared_query
- inferred_actions
- save_allowed
- apply_allowed
properties:
selected_count:
type: integer
selected_row_ids:
type: array
items:
type: string
shared_media_types:
type: array
items:
type: string
shared_review_buckets:
type: array
items:
type: string
shared_query:
type: string
inferred_actions:
type: array
items:
type: string
save_allowed:
type: boolean
apply_allowed:
type: boolean
ReviewRuleDraft:
type: object
required:
- name
- scope
- description
- version
- mode
- draft_source
- conditions
- actions
properties:
id:
type: string
name:
type: string
scope:
type: string
enum:
- manifest
- report
- jobs
description:
type: string
version:
type: integer
mode:
type: string
enum:
- draft_only
draft_source:
type: string
conditions:
$ref: '#/components/schemas/ReviewRuleCondition'
actions:
$ref: '#/components/schemas/ReviewRuleAction'
warnings:
type: array
items:
type: string
example_row_ids:
type: array
items:
type: string
explainability:
$ref: '#/components/schemas/ReviewRuleDraftExplainability'
ReviewRuleDraftResponse:
type: object
required:
- job_id
- selected_count
- selected_row_ids
- mode
- save_allowed
- apply_allowed
- execute_allowed
- draft
- warnings
properties:
job_id:
type: string
selected_count:
type: integer
selected_row_ids:
type: array
items:
type: string
mode:
type: string
enum:
- draft_only
save_allowed:
type: boolean
apply_allowed:
type: boolean