mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
# Description of Changes Change Stirling Engine to support deleting documents automatically. This happens both on user logout and after an amount of time specified by the Java when ingesting a document (allowing for personal documents to have short lifetimes but org documents to be left in the db with no expiry date). Also sets up an [ACL policy](https://en.wikipedia.org/wiki/Access-control_list) for the documents so the database knows which users have access to which documents. This is not fully implemented in the Java, so currently all docs are treated as having a single owner, the uploader, but theoretically when we need to support org storage, we shouldn't need to change the db schema.
214 lines
4.9 KiB
Python
214 lines
4.9 KiB
Python
from .agent_drafts import (
|
|
AgentDraft,
|
|
AgentDraftRequest,
|
|
AgentDraftResponse,
|
|
AgentDraftWorkflowResponse,
|
|
AgentRevisionRequest,
|
|
AgentRevisionResponse,
|
|
AgentRevisionWorkflowResponse,
|
|
)
|
|
from .agent_specs import AgentSpec, AgentSpecStep, AiToolAgentStep
|
|
from .comments import CommentSpec
|
|
from .common import (
|
|
AiFile,
|
|
ArtifactKind,
|
|
ConversationMessage,
|
|
ExtractedFileText,
|
|
GenerateFileResponse,
|
|
MathAuditorToolReportArtifact,
|
|
NeedContentFileRequest,
|
|
NeedContentResponse,
|
|
NeedIngestResponse,
|
|
PdfContentType,
|
|
PdfTextSelection,
|
|
StepKind,
|
|
SupportedCapability,
|
|
ToolOperationStep,
|
|
ToolReportArtifact,
|
|
WorkflowOutcome,
|
|
format_conversation_history,
|
|
format_file_names,
|
|
)
|
|
from .contradiction import (
|
|
Claim,
|
|
Contradiction,
|
|
ContradictionReport,
|
|
ContradictionSeverity,
|
|
)
|
|
from .documents import (
|
|
DeleteDocumentResponse,
|
|
IngestDocumentRequest,
|
|
IngestDocumentResponse,
|
|
Page,
|
|
PageRange,
|
|
PageText,
|
|
PurgeOwnerResponse,
|
|
)
|
|
from .execution import (
|
|
AgentExecutionRequest,
|
|
CannotContinueExecutionAction,
|
|
CompletedExecutionAction,
|
|
ExecutionContext,
|
|
ExecutionStepResult,
|
|
NextExecutionAction,
|
|
ToolCallExecutionAction,
|
|
)
|
|
from .health import HealthResponse
|
|
from .ledger import (
|
|
Discrepancy,
|
|
DiscrepancyKind,
|
|
Evidence,
|
|
Folio,
|
|
FolioManifest,
|
|
FolioType,
|
|
Requisition,
|
|
Severity,
|
|
Verdict,
|
|
)
|
|
from .orchestrator import (
|
|
ExtractedTextArtifact,
|
|
OrchestratorRequest,
|
|
OrchestratorResponse,
|
|
UnsupportedCapabilityResponse,
|
|
WorkflowArtifact,
|
|
)
|
|
from .pdf_comments import (
|
|
PdfCommentInstruction,
|
|
PdfCommentReport,
|
|
PdfCommentRequest,
|
|
PdfCommentResponse,
|
|
TextChunk,
|
|
)
|
|
from .pdf_edit import (
|
|
EditCannotDoResponse,
|
|
EditClarificationRequest,
|
|
EditPlanResponse,
|
|
PdfEditRequest,
|
|
PdfEditResponse,
|
|
PdfEditTerminalResponse,
|
|
)
|
|
from .pdf_questions import (
|
|
PdfQuestionAnswerResponse,
|
|
PdfQuestionNotFoundResponse,
|
|
PdfQuestionOrchestrateResponse,
|
|
PdfQuestionRequest,
|
|
PdfQuestionResponse,
|
|
PdfQuestionTerminalResponse,
|
|
)
|
|
from .pdf_review import PdfReviewOrchestrateResponse
|
|
from .pdf_to_markdown import (
|
|
LayoutFragment,
|
|
LayoutLine,
|
|
PageLayout,
|
|
PageLayoutArtifact,
|
|
PageLayoutFileEntry,
|
|
PdfToMarkdownCannotDoResponse,
|
|
PdfToMarkdownOrchestrateResponse,
|
|
PdfToMarkdownRequest,
|
|
PdfToMarkdownResponse,
|
|
)
|
|
from .progress import (
|
|
ProgressEvent,
|
|
WholeDocCompressionRound,
|
|
WholeDocReadDone,
|
|
WholeDocReadStarted,
|
|
WholeDocSliceDone,
|
|
)
|
|
|
|
__all__ = [
|
|
"AiFile",
|
|
"AgentDraft",
|
|
"AgentDraftRequest",
|
|
"AgentDraftResponse",
|
|
"AgentDraftWorkflowResponse",
|
|
"AgentExecutionRequest",
|
|
"AgentRevisionRequest",
|
|
"AgentRevisionResponse",
|
|
"AgentRevisionWorkflowResponse",
|
|
"AgentSpec",
|
|
"AgentSpecStep",
|
|
"AiToolAgentStep",
|
|
"ArtifactKind",
|
|
"CannotContinueExecutionAction",
|
|
"Claim",
|
|
"CommentSpec",
|
|
"CompletedExecutionAction",
|
|
"Contradiction",
|
|
"ContradictionReport",
|
|
"ContradictionSeverity",
|
|
"ConversationMessage",
|
|
"DeleteDocumentResponse",
|
|
"PurgeOwnerResponse",
|
|
"PdfToMarkdownCannotDoResponse",
|
|
"PdfToMarkdownOrchestrateResponse",
|
|
"PdfToMarkdownRequest",
|
|
"PdfToMarkdownResponse",
|
|
"Discrepancy",
|
|
"DiscrepancyKind",
|
|
"EditCannotDoResponse",
|
|
"EditClarificationRequest",
|
|
"EditPlanResponse",
|
|
"Evidence",
|
|
"ExecutionContext",
|
|
"ExecutionStepResult",
|
|
"ExtractedFileText",
|
|
"ExtractedTextArtifact",
|
|
"Folio",
|
|
"FolioManifest",
|
|
"FolioType",
|
|
"format_conversation_history",
|
|
"format_file_names",
|
|
"GenerateFileResponse",
|
|
"HealthResponse",
|
|
"IngestDocumentRequest",
|
|
"IngestDocumentResponse",
|
|
"MathAuditorToolReportArtifact",
|
|
"NeedContentFileRequest",
|
|
"NeedContentResponse",
|
|
"NeedIngestResponse",
|
|
"NextExecutionAction",
|
|
"OrchestratorRequest",
|
|
"OrchestratorResponse",
|
|
"LayoutFragment",
|
|
"LayoutLine",
|
|
"Page",
|
|
"PageLayout",
|
|
"PageLayoutArtifact",
|
|
"PageLayoutFileEntry",
|
|
"PageRange",
|
|
"PageText",
|
|
"PdfCommentInstruction",
|
|
"PdfCommentReport",
|
|
"PdfCommentRequest",
|
|
"PdfCommentResponse",
|
|
"PdfContentType",
|
|
"PdfEditRequest",
|
|
"PdfEditResponse",
|
|
"PdfEditTerminalResponse",
|
|
"PdfQuestionAnswerResponse",
|
|
"PdfQuestionNotFoundResponse",
|
|
"PdfQuestionOrchestrateResponse",
|
|
"PdfQuestionRequest",
|
|
"PdfQuestionResponse",
|
|
"PdfQuestionTerminalResponse",
|
|
"PdfReviewOrchestrateResponse",
|
|
"PdfTextSelection",
|
|
"ProgressEvent",
|
|
"Requisition",
|
|
"Severity",
|
|
"StepKind",
|
|
"SupportedCapability",
|
|
"TextChunk",
|
|
"ToolCallExecutionAction",
|
|
"ToolOperationStep",
|
|
"ToolReportArtifact",
|
|
"UnsupportedCapabilityResponse",
|
|
"Verdict",
|
|
"WholeDocCompressionRound",
|
|
"WholeDocReadDone",
|
|
"WholeDocReadStarted",
|
|
"WholeDocSliceDone",
|
|
"WorkflowArtifact",
|
|
"WorkflowOutcome",
|
|
]
|