alloy-runtime-types 0.2.76__tar.gz → 0.2.78__tar.gz

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.
Files changed (58) hide show
  1. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/PKG-INFO +1 -1
  2. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/knowledge.py +109 -32
  3. alloy_runtime_types-0.2.78/alloy_runtime_types/dtos/retrieval_diagnostics.py +72 -0
  4. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types.egg-info/PKG-INFO +1 -1
  5. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types.egg-info/SOURCES.txt +1 -0
  6. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/pyproject.toml +1 -1
  7. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/MANIFEST.in +0 -0
  8. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/README.md +0 -0
  9. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/__init__.py +0 -0
  10. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/credential_targets.py +0 -0
  11. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/__init__.py +0 -0
  12. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/admin.py +0 -0
  13. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/agents.py +0 -0
  14. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/api_keys.py +0 -0
  15. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/audio.py +0 -0
  16. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/auth.py +0 -0
  17. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/billing.py +0 -0
  18. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/content.py +0 -0
  19. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/credential_list.py +0 -0
  20. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/credentials.py +0 -0
  21. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/executions.py +0 -0
  22. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/generation.py +0 -0
  23. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/managed_tools.py +0 -0
  24. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/mcp_servers.py +0 -0
  25. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/messages.py +0 -0
  26. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/models.py +0 -0
  27. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/organization_credentials.py +0 -0
  28. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/organizations.py +0 -0
  29. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/pipeline.py +0 -0
  30. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/pipeline_costs.py +0 -0
  31. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/render.py +0 -0
  32. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/schedule.py +0 -0
  33. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/schemas.py +0 -0
  34. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/sessions.py +0 -0
  35. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/structured_filter.py +0 -0
  36. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/tags.py +0 -0
  37. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/templates.py +0 -0
  38. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/tool_configs.py +0 -0
  39. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/tools.py +0 -0
  40. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/users.py +0 -0
  41. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/dtos/webhook_triggers.py +0 -0
  42. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/__init__.py +0 -0
  43. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/agent_enums.py +0 -0
  44. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/api_key_scope.py +0 -0
  45. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/content_enums.py +0 -0
  46. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/member_role.py +0 -0
  47. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/model_enums.py +0 -0
  48. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/ownership_scope.py +0 -0
  49. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/provider.py +0 -0
  50. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/schema_enums.py +0 -0
  51. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/template_enums.py +0 -0
  52. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/enums/tool_service.py +0 -0
  53. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/parsing/__init__.py +0 -0
  54. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types/parsing/filter_parser.py +0 -0
  55. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types.egg-info/dependency_links.txt +0 -0
  56. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types.egg-info/requires.txt +0 -0
  57. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/alloy_runtime_types.egg-info/top_level.txt +0 -0
  58. {alloy_runtime_types-0.2.76 → alloy_runtime_types-0.2.78}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alloy-runtime-types
3
- Version: 0.2.76
3
+ Version: 0.2.78
4
4
  Summary: Type definitions and DTOs for Alloy Runtime
5
5
  Keywords: alloy,api,dto,python,types
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -343,6 +343,10 @@ class CollectionDocumentStatusSummary(BaseModel):
343
343
  failed_documents: int
344
344
  duplicate_documents: int
345
345
  filtered_documents: int
346
+ staged_documents: int = Field(
347
+ default=0,
348
+ description="Documents accepted into bulk ingest intake but not yet promoted to the processing queue.",
349
+ )
346
350
 
347
351
 
348
352
  class ListCollectionDocumentStatusesResponse(BaseModel):
@@ -533,8 +537,8 @@ class SpeakerConfig(BaseModel):
533
537
  return self
534
538
 
535
539
 
536
- class IngestDocumentRequest(BaseModel):
537
- """Request to ingest a document.
540
+ class IngestDocumentItem(BaseModel):
541
+ """One document item in a bulk ingestion request.
538
542
 
539
543
  Preprocessing pipeline: Raw content → NormalizationStage → ContentTypeProcessor
540
544
  (transcript/markdown/document) → StructuralNormalizationStage → QualityFilterStage
@@ -545,9 +549,8 @@ class IngestDocumentRequest(BaseModel):
545
549
  removes page numbers, headers/footers, and fixes hyphenation.
546
550
  """
547
551
 
548
- collection_id: str | UUID = Field(
549
- ..., description="Target collection identifier - can be UUID or collection name"
550
- )
552
+ model_config = ConfigDict(extra="forbid")
553
+
551
554
  title: str = Field(..., min_length=1, max_length=500, description="Document title")
552
555
  content: str = Field(..., min_length=1, description="Document text content")
553
556
  question_gen_agent_id: str | UUID | None = Field(
@@ -630,11 +633,6 @@ class IngestDocumentRequest(BaseModel):
630
633
  "meeting date, publication date). If omitted, falls back to metadata['source_date'] if present "
631
634
  "and parseable. Stored as UTC timestamptz.",
632
635
  )
633
- dry_run: bool = Field(
634
- default=False,
635
- description="If True, only preprocess the document and return the result without persisting. "
636
- "Useful for testing preprocessing pipeline output.",
637
- )
638
636
 
639
637
  @model_validator(mode="after")
640
638
  def validate_speaker_config_for_transcript(self) -> Self:
@@ -670,32 +668,111 @@ class IngestDocumentRequest(BaseModel):
670
668
  return self
671
669
 
672
670
 
673
- class IngestDocumentResponse(BaseModel):
674
- """Response from ingesting a document.
671
+ class IngestDocumentsRequest(BaseModel):
672
+ """Request to stage one or more documents for ingestion."""
675
673
 
676
- New documents are usually queued for background processing.
677
- Exact duplicate replays may instead return the existing document directly.
674
+ collection_id: str | UUID = Field(
675
+ ..., description="Target collection identifier - can be UUID or collection name"
676
+ )
677
+ documents: list[IngestDocumentItem] = Field(
678
+ ...,
679
+ min_length=1,
680
+ max_length=500,
681
+ description="Documents to ingest in request order.",
682
+ )
678
683
 
679
- When dry_run=True, includes processed_content and diff fields.
680
- """
681
684
 
682
- document_id: UUID | None = None # None when dry_run=True
683
- title: str
684
- status: IngestResponseStatus
685
- message: str
685
+ class IngestDocumentRequest(IngestDocumentItem):
686
+ """Internal single-document promotion request used by ingestion workers."""
687
+
688
+ collection_id: str | UUID = Field(
689
+ ..., description="Target collection identifier - can be UUID or collection name"
690
+ )
691
+ dry_run: bool = Field(
692
+ default=False,
693
+ description="Internal single-document preprocessing preview flag.",
694
+ )
695
+
696
+
697
+ BulkIngestItemStatus = Literal[
698
+ "staged",
699
+ "duplicate_external_id",
700
+ "duplicate_content",
701
+ "duplicate_within_batch",
702
+ "queued",
703
+ "filtered",
704
+ "failed",
705
+ ]
706
+
707
+ BulkIngestOperationStatus = Literal[
708
+ "accepted",
709
+ "dispatching",
710
+ "waiting_for_capacity",
711
+ "completed",
712
+ "failed",
713
+ ]
714
+
715
+
716
+ class IngestDocumentItemResult(BaseModel):
717
+ ordinal: int
718
+ item_id: UUID
686
719
  external_id: str | None = None
687
- # Dry run fields
688
- dry_run: bool = False
689
- processed_content: str | None = None
690
- preprocessing_metadata: dict[str, Any] | None = None
691
- rejected: bool = False
692
- rejection_reason: str | None = None
693
- # Diff fields (only populated when dry_run=True)
694
- diff_raw: list[dict[str, Any]] | None = None
695
- diff_unified: str | None = None
696
- diff_html: str | None = None
697
- diff_markers: str | None = None
698
- diff_stats: dict[str, Any] | None = None
720
+ status: BulkIngestItemStatus
721
+ result_reason: str | None = None
722
+ document_id: UUID | None = None
723
+
724
+
725
+ class IngestDocumentsResponse(BaseModel):
726
+ """Response from staging a bulk document ingestion operation."""
727
+
728
+ operation_id: UUID
729
+ status: BulkIngestOperationStatus
730
+ submitted_count: int
731
+ staged_count: int
732
+ duplicate_external_id_count: int
733
+ duplicate_content_count: int
734
+ duplicate_within_batch_count: int
735
+ queued_count: int = 0
736
+ failed_count: int = 0
737
+ items: list[IngestDocumentItemResult]
738
+
739
+
740
+ IngestDocumentResponse = IngestDocumentsResponse
741
+
742
+
743
+ class BulkIngestOperationItemStatus(BaseModel):
744
+ item_id: UUID
745
+ ordinal: int
746
+ external_id: str | None = None
747
+ status: BulkIngestItemStatus
748
+ result_reason: str | None = None
749
+ document_id: UUID | None = None
750
+ created_at: datetime
751
+ updated_at: datetime
752
+ queued_at: datetime | None = None
753
+ completed_at: datetime | None = None
754
+
755
+
756
+ class GetBulkIngestOperationResponse(BaseModel):
757
+ operation_id: UUID
758
+ collection_id: UUID
759
+ status: BulkIngestOperationStatus
760
+ submitted_count: int
761
+ staged_count: int
762
+ duplicate_external_id_count: int
763
+ duplicate_content_count: int
764
+ duplicate_within_batch_count: int
765
+ queued_count: int
766
+ failed_count: int
767
+ queued_at: datetime
768
+ started_at: datetime | None = None
769
+ last_heartbeat_at: datetime | None = None
770
+ completed_at: datetime | None = None
771
+ error_message: str | None = None
772
+ items: list[BulkIngestOperationItemStatus]
773
+ limit: int
774
+ offset: int
775
+ total_items: int
699
776
 
700
777
 
701
778
  class DocumentSummary(BaseModel):
@@ -0,0 +1,72 @@
1
+ """Public retrieval diagnostics DTO consumed by SDK, CLI, and server code."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Literal
6
+
7
+ from pydantic import BaseModel, ConfigDict, Field, computed_field, model_validator
8
+
9
+ DiagnosticSeverity = Literal["info", "warning", "error"]
10
+
11
+ DiagnosticCode = Literal[
12
+ "decomposition_timeout",
13
+ "decomposition_failed",
14
+ "hyde_timeout",
15
+ "hyde_fallback",
16
+ "voyage_degraded",
17
+ "semantic_no_results",
18
+ "sparse_overfetch_exhausted",
19
+ "question_low_headroom",
20
+ "subquery_fanout_timeout",
21
+ "subquery_fanout_failed",
22
+ "tool_cancelled",
23
+ "tool_errored",
24
+ "no_collections_configured",
25
+ "configured_collections_not_found",
26
+ "collection_filter_not_found",
27
+ ]
28
+
29
+ DiagnosticStatus = Literal["ok", "degraded", "failed"]
30
+
31
+
32
+ def _empty_warnings() -> list["RetrievalDiagnosticWarning"]:
33
+ return []
34
+
35
+
36
+ class RetrievalDiagnosticWarning(BaseModel):
37
+ model_config = ConfigDict(extra="forbid")
38
+
39
+ code: DiagnosticCode
40
+ severity: DiagnosticSeverity
41
+ message: str
42
+ fields: dict[str, object] = Field(default_factory=dict)
43
+
44
+
45
+ class RetrievalDiagnostics(BaseModel):
46
+ model_config = ConfigDict(extra="forbid")
47
+
48
+ warnings: list[RetrievalDiagnosticWarning] = Field(default_factory=_empty_warnings)
49
+
50
+ @model_validator(mode="before")
51
+ @classmethod
52
+ def _discard_computed_round_trip_fields(
53
+ cls, data: dict[str, object]
54
+ ) -> dict[str, object]:
55
+ cleaned = dict(data)
56
+ cleaned.pop("status", None)
57
+ cleaned.pop("degraded", None)
58
+ return cleaned
59
+
60
+ @computed_field
61
+ @property
62
+ def status(self) -> DiagnosticStatus:
63
+ if any(w.severity == "error" for w in self.warnings):
64
+ return "failed"
65
+ if self.warnings:
66
+ return "degraded"
67
+ return "ok"
68
+
69
+ @computed_field
70
+ @property
71
+ def degraded(self) -> bool:
72
+ return self.status != "ok"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alloy-runtime-types
3
- Version: 0.2.76
3
+ Version: 0.2.78
4
4
  Summary: Type definitions and DTOs for Alloy Runtime
5
5
  Keywords: alloy,api,dto,python,types
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -30,6 +30,7 @@ alloy_runtime_types/dtos/organizations.py
30
30
  alloy_runtime_types/dtos/pipeline.py
31
31
  alloy_runtime_types/dtos/pipeline_costs.py
32
32
  alloy_runtime_types/dtos/render.py
33
+ alloy_runtime_types/dtos/retrieval_diagnostics.py
33
34
  alloy_runtime_types/dtos/schedule.py
34
35
  alloy_runtime_types/dtos/schemas.py
35
36
  alloy_runtime_types/dtos/sessions.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "alloy-runtime-types"
7
- version = "0.2.76"
7
+ version = "0.2.78"
8
8
  description = "Type definitions and DTOs for Alloy Runtime"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13"