Commit 6077d32
committed
feat(grpc): enforce service policy, add presigned_url target, strongly-typed status enums
- Enforce the same ServicePolicy as REST on every RPC (allowed_target_types,
max_sources_per_request, S3 pairing, presigned-url gating, OCR presets,
image export modes); violations abort with INVALID_ARGUMENT
- Add PreSignedUrlTarget to the Target oneof with REST-parity restrictions
- Replace string status/component_type with ConversionStatus and
DoclingComponentType enums plus *_raw forward-compat companions
- Sanitize unhandled errors via PublicErrorInterceptor, mirroring
REST's debug_error_details behavior; full tracebacks stay server-side
- Document batch-convert stance and policy/error behavior in docs/grpc
- buf lint + buf format -w; regenerate stubs; add policy, sanitization,
and enum-drift tests
Signed-off-by: Kristian Rickert <krickert@gmail.com>1 parent a08448e commit 6077d32
9 files changed
Lines changed: 806 additions & 128 deletions
File tree
- docling_serve/grpc
- gen/ai/docling/serve/v1
- docs/grpc
- proto/ai/docling/serve/v1
- tests
Lines changed: 98 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| 297 | + | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
| |||
564 | 567 | | |
565 | 568 | | |
566 | 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 | + | |
567 | 616 | | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
573 | 620 | | |
574 | 621 | | |
575 | 622 | | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
576 | 629 | | |
577 | 630 | | |
578 | 631 | | |
| |||
641 | 694 | | |
642 | 695 | | |
643 | 696 | | |
644 | | - | |
645 | | - | |
646 | | - | |
| 697 | + | |
647 | 698 | | |
648 | 699 | | |
649 | 700 | | |
650 | 701 | | |
651 | | - | |
| 702 | + | |
652 | 703 | | |
653 | 704 | | |
| 705 | + | |
| 706 | + | |
654 | 707 | | |
655 | 708 | | |
656 | 709 | | |
| |||
679 | 732 | | |
680 | 733 | | |
681 | 734 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
692 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
693 | 745 | | |
694 | 746 | | |
695 | 747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments