offagent 0.10.0__py3-none-any.whl
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.
- offagent/__init__.py +3 -0
- offagent/__main__.py +5 -0
- offagent/adapters/__init__.py +1 -0
- offagent/adapters/docx_adapter.py +1237 -0
- offagent/adapters/embedding_provider.py +132 -0
- offagent/adapters/pptx_adapter.py +940 -0
- offagent/adapters/xlsx_adapter.py +1266 -0
- offagent/app/__init__.py +1 -0
- offagent/app/progress.py +52 -0
- offagent/app/services.py +4267 -0
- offagent/config.py +287 -0
- offagent/domain/__init__.py +1 -0
- offagent/domain/locators.py +444 -0
- offagent/domain/models.py +477 -0
- offagent/domain/text_fragments.py +136 -0
- offagent/errors.py +29 -0
- offagent/indexing/__init__.py +1 -0
- offagent/indexing/store.py +795 -0
- offagent/interfaces/__init__.py +1 -0
- offagent/interfaces/cli.py +438 -0
- offagent/interfaces/cli_output.py +139 -0
- offagent/interfaces/cli_progress.py +120 -0
- offagent/interfaces/mcp.py +1145 -0
- offagent/interfaces/mcp_converters.py +80 -0
- offagent/interfaces/mcp_models.py +923 -0
- offagent/objects/__init__.py +3 -0
- offagent/objects/base.py +26 -0
- offagent/objects/docx_objects.py +951 -0
- offagent/objects/pptx_objects.py +895 -0
- offagent/objects/xlsx_objects.py +962 -0
- offagent/path_policy.py +42 -0
- offagent/storage/__init__.py +1 -0
- offagent/storage/versioning.py +31 -0
- offagent-0.10.0.dist-info/METADATA +546 -0
- offagent-0.10.0.dist-info/RECORD +39 -0
- offagent-0.10.0.dist-info/WHEEL +5 -0
- offagent-0.10.0.dist-info/entry_points.txt +2 -0
- offagent-0.10.0.dist-info/licenses/LICENSE +21 -0
- offagent-0.10.0.dist-info/top_level.txt +1 -0
offagent/app/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Application services."""
|
offagent/app/progress.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Protocol, Self
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ProgressReporter(Protocol):
|
|
8
|
+
def on_index_start(self, total_files: int) -> None:
|
|
9
|
+
"""Called once before the first file is processed."""
|
|
10
|
+
|
|
11
|
+
def on_file_start(self, path: Path, index: int, total: int) -> None:
|
|
12
|
+
"""Called when processing of a single file begins."""
|
|
13
|
+
|
|
14
|
+
def on_embedding_start(self, path: Path, item_count: int) -> None:
|
|
15
|
+
"""Called immediately before embedding generation starts for a file."""
|
|
16
|
+
|
|
17
|
+
def on_embedding_item(self, done: int, total: int) -> None:
|
|
18
|
+
"""Called after each embedding vector is produced."""
|
|
19
|
+
|
|
20
|
+
def on_file_done(self, path: Path, items_indexed: int) -> None:
|
|
21
|
+
"""Called after a file has been fully processed and committed."""
|
|
22
|
+
|
|
23
|
+
def on_index_done(self, files_indexed: int, files_skipped: int) -> None:
|
|
24
|
+
"""Called once after all files have been processed."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class NullProgressReporter:
|
|
28
|
+
"""No-op reporter used when live progress is suppressed."""
|
|
29
|
+
|
|
30
|
+
def __enter__(self) -> Self:
|
|
31
|
+
return self
|
|
32
|
+
|
|
33
|
+
def __exit__(self, *args: object) -> None:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
def on_index_start(self, total_files: int) -> None:
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
def on_file_start(self, path: Path, index: int, total: int) -> None:
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
def on_embedding_start(self, path: Path, item_count: int) -> None:
|
|
43
|
+
return None
|
|
44
|
+
|
|
45
|
+
def on_embedding_item(self, done: int, total: int) -> None:
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
def on_file_done(self, path: Path, items_indexed: int) -> None:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
def on_index_done(self, files_indexed: int, files_skipped: int) -> None:
|
|
52
|
+
return None
|