|
f0106a3…
|
leo
|
1 |
# Models API Reference |
|
f0106a3…
|
leo
|
2 |
|
|
f0106a3…
|
leo
|
3 |
::: video_processor.models |
|
3551b80…
|
noreply
|
4 |
|
|
3551b80…
|
noreply
|
5 |
--- |
|
3551b80…
|
noreply
|
6 |
|
|
3551b80…
|
noreply
|
7 |
## Overview |
|
3551b80…
|
noreply
|
8 |
|
|
3551b80…
|
noreply
|
9 |
The `video_processor.models` module defines all Pydantic data models used throughout PlanOpticon for structured output, serialization, and validation. These models represent everything from individual transcript segments to complete batch processing manifests. |
|
3551b80…
|
noreply
|
10 |
|
|
3551b80…
|
noreply
|
11 |
All models inherit from `pydantic.BaseModel` and support JSON serialization via `.model_dump_json()` and deserialization via `.model_validate_json()`. |
|
3551b80…
|
noreply
|
12 |
|
|
3551b80…
|
noreply
|
13 |
--- |
|
3551b80…
|
noreply
|
14 |
|
|
3551b80…
|
noreply
|
15 |
## Enumerations |
|
3551b80…
|
noreply
|
16 |
|
|
3551b80…
|
noreply
|
17 |
### DiagramType |
|
3551b80…
|
noreply
|
18 |
|
|
3551b80…
|
noreply
|
19 |
Types of visual content detected in video frames. |
|
3551b80…
|
noreply
|
20 |
|
|
3551b80…
|
noreply
|
21 |
```python |
|
3551b80…
|
noreply
|
22 |
from video_processor.models import DiagramType |
|
3551b80…
|
noreply
|
23 |
``` |
|
3551b80…
|
noreply
|
24 |
|
|
3551b80…
|
noreply
|
25 |
| Value | Description | |
|
3551b80…
|
noreply
|
26 |
|---|---| |
|
3551b80…
|
noreply
|
27 |
| `flowchart` | Process flow or decision tree diagrams | |
|
3551b80…
|
noreply
|
28 |
| `sequence` | Sequence or interaction diagrams | |
|
3551b80…
|
noreply
|
29 |
| `architecture` | System architecture diagrams | |
|
3551b80…
|
noreply
|
30 |
| `whiteboard` | Whiteboard drawings or sketches | |
|
3551b80…
|
noreply
|
31 |
| `chart` | Data charts (bar, line, pie, scatter) | |
|
3551b80…
|
noreply
|
32 |
| `table` | Tabular data | |
|
3551b80…
|
noreply
|
33 |
| `slide` | Presentation slides | |
|
3551b80…
|
noreply
|
34 |
| `screenshot` | Application screenshots or screen shares | |
|
3551b80…
|
noreply
|
35 |
| `unknown` | Unclassified visual content | |
|
3551b80…
|
noreply
|
36 |
|
|
3551b80…
|
noreply
|
37 |
### OutputFormat |
|
3551b80…
|
noreply
|
38 |
|
|
3551b80…
|
noreply
|
39 |
Available output formats for processing results. |
|
3551b80…
|
noreply
|
40 |
|
|
3551b80…
|
noreply
|
41 |
| Value | Description | |
|
3551b80…
|
noreply
|
42 |
|---|---| |
|
3551b80…
|
noreply
|
43 |
| `markdown` | Markdown text | |
|
3551b80…
|
noreply
|
44 |
| `json` | JSON data | |
|
3551b80…
|
noreply
|
45 |
| `html` | HTML document | |
|
3551b80…
|
noreply
|
46 |
| `pdf` | PDF document | |
|
3551b80…
|
noreply
|
47 |
| `svg` | SVG vector graphic | |
|
3551b80…
|
noreply
|
48 |
| `png` | PNG raster image | |
|
3551b80…
|
noreply
|
49 |
|
|
3551b80…
|
noreply
|
50 |
### PlanningEntityType |
|
3551b80…
|
noreply
|
51 |
|
|
3551b80…
|
noreply
|
52 |
Classification types for entities in a planning taxonomy. |
|
3551b80…
|
noreply
|
53 |
|
|
3551b80…
|
noreply
|
54 |
| Value | Description | |
|
3551b80…
|
noreply
|
55 |
|---|---| |
|
3551b80…
|
noreply
|
56 |
| `goal` | Project goals or objectives | |
|
3551b80…
|
noreply
|
57 |
| `requirement` | Functional or non-functional requirements | |
|
3551b80…
|
noreply
|
58 |
| `constraint` | Limitations or constraints | |
|
3551b80…
|
noreply
|
59 |
| `decision` | Decisions made during planning | |
|
3551b80…
|
noreply
|
60 |
| `risk` | Identified risks | |
|
3551b80…
|
noreply
|
61 |
| `assumption` | Planning assumptions | |
|
3551b80…
|
noreply
|
62 |
| `dependency` | External or internal dependencies | |
|
3551b80…
|
noreply
|
63 |
| `milestone` | Project milestones | |
|
3551b80…
|
noreply
|
64 |
| `task` | Actionable tasks | |
|
3551b80…
|
noreply
|
65 |
| `feature` | Product features | |
|
3551b80…
|
noreply
|
66 |
|
|
3551b80…
|
noreply
|
67 |
### PlanningRelationshipType |
|
3551b80…
|
noreply
|
68 |
|
|
3551b80…
|
noreply
|
69 |
Relationship types within a planning taxonomy. |
|
3551b80…
|
noreply
|
70 |
|
|
3551b80…
|
noreply
|
71 |
| Value | Description | |
|
3551b80…
|
noreply
|
72 |
|---|---| |
|
3551b80…
|
noreply
|
73 |
| `requires` | Entity A requires entity B | |
|
3551b80…
|
noreply
|
74 |
| `blocked_by` | Entity A is blocked by entity B | |
|
3551b80…
|
noreply
|
75 |
| `has_risk` | Entity A has an associated risk B | |
|
3551b80…
|
noreply
|
76 |
| `depends_on` | Entity A depends on entity B | |
|
3551b80…
|
noreply
|
77 |
| `addresses` | Entity A addresses entity B | |
|
3551b80…
|
noreply
|
78 |
| `has_tradeoff` | Entity A involves a tradeoff with entity B | |
|
3551b80…
|
noreply
|
79 |
| `delivers` | Entity A delivers entity B | |
|
3551b80…
|
noreply
|
80 |
| `implements` | Entity A implements entity B | |
|
3551b80…
|
noreply
|
81 |
| `parent_of` | Entity A is the parent of entity B | |
|
3551b80…
|
noreply
|
82 |
|
|
3551b80…
|
noreply
|
83 |
--- |
|
3551b80…
|
noreply
|
84 |
|
|
3551b80…
|
noreply
|
85 |
## Protocols |
|
3551b80…
|
noreply
|
86 |
|
|
3551b80…
|
noreply
|
87 |
### ProgressCallback |
|
3551b80…
|
noreply
|
88 |
|
|
3551b80…
|
noreply
|
89 |
A runtime-checkable protocol for receiving pipeline progress updates. Implement this interface to integrate custom progress reporting (e.g., web UI, logging). |
|
3551b80…
|
noreply
|
90 |
|
|
3551b80…
|
noreply
|
91 |
```python |
|
3551b80…
|
noreply
|
92 |
from video_processor.models import ProgressCallback |
|
3551b80…
|
noreply
|
93 |
|
|
3551b80…
|
noreply
|
94 |
class MyProgress: |
|
3551b80…
|
noreply
|
95 |
def on_step_start(self, step: str, index: int, total: int) -> None: |
|
3551b80…
|
noreply
|
96 |
print(f"Starting {step} ({index}/{total})") |
|
3551b80…
|
noreply
|
97 |
|
|
3551b80…
|
noreply
|
98 |
def on_step_complete(self, step: str, index: int, total: int) -> None: |
|
3551b80…
|
noreply
|
99 |
print(f"Completed {step} ({index}/{total})") |
|
3551b80…
|
noreply
|
100 |
|
|
3551b80…
|
noreply
|
101 |
def on_progress(self, step: str, percent: float, message: str = "") -> None: |
|
3551b80…
|
noreply
|
102 |
print(f"{step}: {percent:.0f}% {message}") |
|
3551b80…
|
noreply
|
103 |
|
|
3551b80…
|
noreply
|
104 |
assert isinstance(MyProgress(), ProgressCallback) # True |
|
3551b80…
|
noreply
|
105 |
``` |
|
3551b80…
|
noreply
|
106 |
|
|
3551b80…
|
noreply
|
107 |
**Methods:** |
|
3551b80…
|
noreply
|
108 |
|
|
3551b80…
|
noreply
|
109 |
| Method | Parameters | Description | |
|
3551b80…
|
noreply
|
110 |
|---|---|---| |
|
3551b80…
|
noreply
|
111 |
| `on_step_start` | `step: str`, `index: int`, `total: int` | Called when a pipeline step begins | |
|
3551b80…
|
noreply
|
112 |
| `on_step_complete` | `step: str`, `index: int`, `total: int` | Called when a pipeline step finishes | |
|
3551b80…
|
noreply
|
113 |
| `on_progress` | `step: str`, `percent: float`, `message: str` | Called with incremental progress updates | |
|
3551b80…
|
noreply
|
114 |
|
|
3551b80…
|
noreply
|
115 |
--- |
|
3551b80…
|
noreply
|
116 |
|
|
3551b80…
|
noreply
|
117 |
## Transcript Models |
|
3551b80…
|
noreply
|
118 |
|
|
3551b80…
|
noreply
|
119 |
### TranscriptSegment |
|
3551b80…
|
noreply
|
120 |
|
|
3551b80…
|
noreply
|
121 |
A single segment of transcribed audio with timing and optional speaker identification. |
|
3551b80…
|
noreply
|
122 |
|
|
3551b80…
|
noreply
|
123 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
124 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
125 |
| `start` | `float` | *required* | Start time in seconds | |
|
3551b80…
|
noreply
|
126 |
| `end` | `float` | *required* | End time in seconds | |
|
3551b80…
|
noreply
|
127 |
| `text` | `str` | *required* | Transcribed text content | |
|
3551b80…
|
noreply
|
128 |
| `speaker` | `Optional[str]` | `None` | Speaker identifier (e.g., "Speaker 1") | |
|
3551b80…
|
noreply
|
129 |
| `confidence` | `Optional[float]` | `None` | Transcription confidence score (0.0 to 1.0) | |
|
3551b80…
|
noreply
|
130 |
|
|
3551b80…
|
noreply
|
131 |
```json |
|
3551b80…
|
noreply
|
132 |
{ |
|
3551b80…
|
noreply
|
133 |
"start": 12.5, |
|
3551b80…
|
noreply
|
134 |
"end": 15.3, |
|
3551b80…
|
noreply
|
135 |
"text": "We should migrate to the new API by next quarter.", |
|
3551b80…
|
noreply
|
136 |
"speaker": "Alice", |
|
3551b80…
|
noreply
|
137 |
"confidence": 0.95 |
|
3551b80…
|
noreply
|
138 |
} |
|
3551b80…
|
noreply
|
139 |
``` |
|
3551b80…
|
noreply
|
140 |
|
|
3551b80…
|
noreply
|
141 |
--- |
|
3551b80…
|
noreply
|
142 |
|
|
3551b80…
|
noreply
|
143 |
## Content Extraction Models |
|
3551b80…
|
noreply
|
144 |
|
|
3551b80…
|
noreply
|
145 |
### ActionItem |
|
3551b80…
|
noreply
|
146 |
|
|
3551b80…
|
noreply
|
147 |
An action item extracted from transcript or diagram content. |
|
3551b80…
|
noreply
|
148 |
|
|
3551b80…
|
noreply
|
149 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
150 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
151 |
| `action` | `str` | *required* | The action to be taken | |
|
3551b80…
|
noreply
|
152 |
| `assignee` | `Optional[str]` | `None` | Person responsible for the action | |
|
3551b80…
|
noreply
|
153 |
| `deadline` | `Optional[str]` | `None` | Deadline or timeframe | |
|
3551b80…
|
noreply
|
154 |
| `priority` | `Optional[str]` | `None` | Priority level (e.g., "high", "medium", "low") | |
|
3551b80…
|
noreply
|
155 |
| `context` | `Optional[str]` | `None` | Additional context or notes | |
|
3551b80…
|
noreply
|
156 |
| `source` | `Optional[str]` | `None` | Where this was found: `"transcript"`, `"diagram"`, or `"both"` | |
|
3551b80…
|
noreply
|
157 |
|
|
3551b80…
|
noreply
|
158 |
```json |
|
3551b80…
|
noreply
|
159 |
{ |
|
3551b80…
|
noreply
|
160 |
"action": "Migrate authentication service to OAuth 2.0", |
|
3551b80…
|
noreply
|
161 |
"assignee": "Bob", |
|
3551b80…
|
noreply
|
162 |
"deadline": "Q2 2026", |
|
3551b80…
|
noreply
|
163 |
"priority": "high", |
|
3551b80…
|
noreply
|
164 |
"context": "at 245s", |
|
3551b80…
|
noreply
|
165 |
"source": "transcript" |
|
3551b80…
|
noreply
|
166 |
} |
|
3551b80…
|
noreply
|
167 |
``` |
|
3551b80…
|
noreply
|
168 |
|
|
3551b80…
|
noreply
|
169 |
### KeyPoint |
|
3551b80…
|
noreply
|
170 |
|
|
3551b80…
|
noreply
|
171 |
A key point extracted from content, optionally linked to diagrams. |
|
3551b80…
|
noreply
|
172 |
|
|
3551b80…
|
noreply
|
173 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
174 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
175 |
| `point` | `str` | *required* | The key point text | |
|
3551b80…
|
noreply
|
176 |
| `topic` | `Optional[str]` | `None` | Topic or category | |
|
3551b80…
|
noreply
|
177 |
| `details` | `Optional[str]` | `None` | Supporting details | |
|
3551b80…
|
noreply
|
178 |
| `timestamp` | `Optional[float]` | `None` | Timestamp in video (seconds) | |
|
3551b80…
|
noreply
|
179 |
| `source` | `Optional[str]` | `None` | Where this was found | |
|
3551b80…
|
noreply
|
180 |
| `related_diagrams` | `List[int]` | `[]` | Indices of related diagrams in the manifest | |
|
3551b80…
|
noreply
|
181 |
|
|
3551b80…
|
noreply
|
182 |
```json |
|
3551b80…
|
noreply
|
183 |
{ |
|
3551b80…
|
noreply
|
184 |
"point": "Team decided to use FalkorDB for graph storage", |
|
3551b80…
|
noreply
|
185 |
"topic": "Architecture", |
|
3551b80…
|
noreply
|
186 |
"details": "Embedded database avoids infrastructure overhead for CLI use", |
|
3551b80…
|
noreply
|
187 |
"timestamp": 342.0, |
|
3551b80…
|
noreply
|
188 |
"source": "transcript", |
|
3551b80…
|
noreply
|
189 |
"related_diagrams": [0, 2] |
|
3551b80…
|
noreply
|
190 |
} |
|
3551b80…
|
noreply
|
191 |
``` |
|
3551b80…
|
noreply
|
192 |
|
|
3551b80…
|
noreply
|
193 |
--- |
|
3551b80…
|
noreply
|
194 |
|
|
3551b80…
|
noreply
|
195 |
## Diagram Models |
|
3551b80…
|
noreply
|
196 |
|
|
3551b80…
|
noreply
|
197 |
### DiagramResult |
|
3551b80…
|
noreply
|
198 |
|
|
3551b80…
|
noreply
|
199 |
Result from diagram extraction and analysis. Contains structured data extracted from visual content, along with paths to output files. |
|
3551b80…
|
noreply
|
200 |
|
|
3551b80…
|
noreply
|
201 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
202 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
203 |
| `frame_index` | `int` | *required* | Index of the source frame | |
|
3551b80…
|
noreply
|
204 |
| `timestamp` | `Optional[float]` | `None` | Timestamp in video (seconds) | |
|
3551b80…
|
noreply
|
205 |
| `diagram_type` | `DiagramType` | `unknown` | Type of diagram detected | |
|
3551b80…
|
noreply
|
206 |
| `confidence` | `float` | `0.0` | Detection confidence (0.0 to 1.0) | |
|
3551b80…
|
noreply
|
207 |
| `description` | `Optional[str]` | `None` | Detailed description of the diagram | |
|
3551b80…
|
noreply
|
208 |
| `text_content` | `Optional[str]` | `None` | All visible text, preserving structure | |
|
3551b80…
|
noreply
|
209 |
| `elements` | `List[str]` | `[]` | Identified elements or components | |
|
3551b80…
|
noreply
|
210 |
| `relationships` | `List[str]` | `[]` | Identified relationships (e.g., `"A -> B: connects"`) | |
|
3551b80…
|
noreply
|
211 |
| `mermaid` | `Optional[str]` | `None` | Mermaid syntax representation | |
|
3551b80…
|
noreply
|
212 |
| `chart_data` | `Optional[Dict[str, Any]]` | `None` | Extractable chart data (`labels`, `values`, `chart_type`) | |
|
3551b80…
|
noreply
|
213 |
| `image_path` | `Optional[str]` | `None` | Relative path to original frame image | |
|
3551b80…
|
noreply
|
214 |
| `svg_path` | `Optional[str]` | `None` | Relative path to rendered SVG | |
|
3551b80…
|
noreply
|
215 |
| `png_path` | `Optional[str]` | `None` | Relative path to rendered PNG | |
|
3551b80…
|
noreply
|
216 |
| `mermaid_path` | `Optional[str]` | `None` | Relative path to mermaid source file | |
|
3551b80…
|
noreply
|
217 |
|
|
3551b80…
|
noreply
|
218 |
```json |
|
3551b80…
|
noreply
|
219 |
{ |
|
3551b80…
|
noreply
|
220 |
"frame_index": 5, |
|
3551b80…
|
noreply
|
221 |
"timestamp": 120.0, |
|
3551b80…
|
noreply
|
222 |
"diagram_type": "architecture", |
|
3551b80…
|
noreply
|
223 |
"confidence": 0.92, |
|
3551b80…
|
noreply
|
224 |
"description": "Microservices architecture showing API gateway, auth service, and database layer", |
|
3551b80…
|
noreply
|
225 |
"text_content": "API Gateway\nAuth Service\nUser DB\nPostgreSQL", |
|
3551b80…
|
noreply
|
226 |
"elements": ["API Gateway", "Auth Service", "User DB", "PostgreSQL"], |
|
3551b80…
|
noreply
|
227 |
"relationships": ["API Gateway -> Auth Service: authenticates", "Auth Service -> User DB: queries"], |
|
3551b80…
|
noreply
|
228 |
"mermaid": "graph LR\n A[API Gateway] --> B[Auth Service]\n B --> C[User DB]", |
|
3551b80…
|
noreply
|
229 |
"chart_data": null, |
|
3551b80…
|
noreply
|
230 |
"image_path": "diagrams/diagram_0.jpg", |
|
3551b80…
|
noreply
|
231 |
"svg_path": null, |
|
3551b80…
|
noreply
|
232 |
"png_path": null, |
|
3551b80…
|
noreply
|
233 |
"mermaid_path": "diagrams/diagram_0.mermaid" |
|
3551b80…
|
noreply
|
234 |
} |
|
3551b80…
|
noreply
|
235 |
``` |
|
3551b80…
|
noreply
|
236 |
|
|
3551b80…
|
noreply
|
237 |
### ScreenCapture |
|
3551b80…
|
noreply
|
238 |
|
|
3551b80…
|
noreply
|
239 |
A screengrab fallback created when diagram extraction fails or confidence is too low for full analysis. |
|
3551b80…
|
noreply
|
240 |
|
|
3551b80…
|
noreply
|
241 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
242 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
243 |
| `frame_index` | `int` | *required* | Index of the source frame | |
|
3551b80…
|
noreply
|
244 |
| `timestamp` | `Optional[float]` | `None` | Timestamp in video (seconds) | |
|
3551b80…
|
noreply
|
245 |
| `caption` | `Optional[str]` | `None` | Brief description of the content | |
|
3551b80…
|
noreply
|
246 |
| `image_path` | `Optional[str]` | `None` | Relative path to screenshot image | |
|
3551b80…
|
noreply
|
247 |
| `confidence` | `float` | `0.0` | Detection confidence that triggered fallback | |
|
3551b80…
|
noreply
|
248 |
|
|
3551b80…
|
noreply
|
249 |
```json |
|
3551b80…
|
noreply
|
250 |
{ |
|
3551b80…
|
noreply
|
251 |
"frame_index": 8, |
|
3551b80…
|
noreply
|
252 |
"timestamp": 195.0, |
|
3551b80…
|
noreply
|
253 |
"caption": "Code editor showing a Python function definition", |
|
3551b80…
|
noreply
|
254 |
"image_path": "captures/capture_0.jpg", |
|
3551b80…
|
noreply
|
255 |
"confidence": 0.45 |
|
3551b80…
|
noreply
|
256 |
} |
|
3551b80…
|
noreply
|
257 |
``` |
|
3551b80…
|
noreply
|
258 |
|
|
3551b80…
|
noreply
|
259 |
--- |
|
3551b80…
|
noreply
|
260 |
|
|
3551b80…
|
noreply
|
261 |
## Knowledge Graph Models |
|
3551b80…
|
noreply
|
262 |
|
|
3551b80…
|
noreply
|
263 |
### Entity |
|
3551b80…
|
noreply
|
264 |
|
|
3551b80…
|
noreply
|
265 |
An entity in the knowledge graph, representing a person, concept, technology, or other named item extracted from content. |
|
3551b80…
|
noreply
|
266 |
|
|
3551b80…
|
noreply
|
267 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
268 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
269 |
| `name` | `str` | *required* | Entity name | |
|
3551b80…
|
noreply
|
270 |
| `type` | `str` | `"concept"` | Entity type: `"person"`, `"concept"`, `"technology"`, `"time"`, `"diagram"` | |
|
3551b80…
|
noreply
|
271 |
| `descriptions` | `List[str]` | `[]` | Accumulated descriptions of this entity | |
|
3551b80…
|
noreply
|
272 |
| `source` | `Optional[str]` | `None` | Source attribution: `"transcript"`, `"diagram"`, or `"both"` | |
|
3551b80…
|
noreply
|
273 |
| `occurrences` | `List[Dict[str, Any]]` | `[]` | Occurrences with source, timestamp, and text context | |
|
3551b80…
|
noreply
|
274 |
|
|
3551b80…
|
noreply
|
275 |
```json |
|
3551b80…
|
noreply
|
276 |
{ |
|
3551b80…
|
noreply
|
277 |
"name": "FalkorDB", |
|
3551b80…
|
noreply
|
278 |
"type": "technology", |
|
3551b80…
|
noreply
|
279 |
"descriptions": ["Embedded graph database", "Supports Cypher queries"], |
|
3551b80…
|
noreply
|
280 |
"source": "both", |
|
3551b80…
|
noreply
|
281 |
"occurrences": [ |
|
3551b80…
|
noreply
|
282 |
{"source": "transcript", "timestamp": 120.0, "text": "We chose FalkorDB for graph storage"}, |
|
3551b80…
|
noreply
|
283 |
{"source": "diagram", "text": "FalkorDB Lite"} |
|
3551b80…
|
noreply
|
284 |
] |
|
3551b80…
|
noreply
|
285 |
} |
|
3551b80…
|
noreply
|
286 |
``` |
|
3551b80…
|
noreply
|
287 |
|
|
3551b80…
|
noreply
|
288 |
### Relationship |
|
3551b80…
|
noreply
|
289 |
|
|
3551b80…
|
noreply
|
290 |
A directed relationship between two entities in the knowledge graph. |
|
3551b80…
|
noreply
|
291 |
|
|
3551b80…
|
noreply
|
292 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
293 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
294 |
| `source` | `str` | *required* | Source entity name | |
|
3551b80…
|
noreply
|
295 |
| `target` | `str` | *required* | Target entity name | |
|
3551b80…
|
noreply
|
296 |
| `type` | `str` | `"related_to"` | Relationship type (e.g., `"uses"`, `"manages"`, `"related_to"`) | |
|
3551b80…
|
noreply
|
297 |
| `content_source` | `Optional[str]` | `None` | Content source identifier | |
|
3551b80…
|
noreply
|
298 |
| `timestamp` | `Optional[float]` | `None` | Timestamp in seconds | |
|
3551b80…
|
noreply
|
299 |
|
|
3551b80…
|
noreply
|
300 |
```json |
|
3551b80…
|
noreply
|
301 |
{ |
|
3551b80…
|
noreply
|
302 |
"source": "PlanOpticon", |
|
3551b80…
|
noreply
|
303 |
"target": "FalkorDB", |
|
3551b80…
|
noreply
|
304 |
"type": "uses", |
|
3551b80…
|
noreply
|
305 |
"content_source": "transcript", |
|
3551b80…
|
noreply
|
306 |
"timestamp": 125.0 |
|
3551b80…
|
noreply
|
307 |
} |
|
3551b80…
|
noreply
|
308 |
``` |
|
3551b80…
|
noreply
|
309 |
|
|
3551b80…
|
noreply
|
310 |
### SourceRecord |
|
3551b80…
|
noreply
|
311 |
|
|
3551b80…
|
noreply
|
312 |
A content source registered in the knowledge graph for provenance tracking. |
|
3551b80…
|
noreply
|
313 |
|
|
3551b80…
|
noreply
|
314 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
315 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
316 |
| `source_id` | `str` | *required* | Unique identifier for this source | |
|
3551b80…
|
noreply
|
317 |
| `source_type` | `str` | *required* | Source type: `"video"`, `"document"`, `"url"`, `"api"`, `"manual"` | |
|
3551b80…
|
noreply
|
318 |
| `title` | `str` | *required* | Human-readable title | |
|
3551b80…
|
noreply
|
319 |
| `path` | `Optional[str]` | `None` | Local file path | |
|
3551b80…
|
noreply
|
320 |
| `url` | `Optional[str]` | `None` | URL if applicable | |
|
3551b80…
|
noreply
|
321 |
| `mime_type` | `Optional[str]` | `None` | MIME type of the source | |
|
3551b80…
|
noreply
|
322 |
| `ingested_at` | `str` | *auto* | ISO format ingestion timestamp (auto-generated) | |
|
3551b80…
|
noreply
|
323 |
| `metadata` | `Dict[str, Any]` | `{}` | Additional source metadata | |
|
3551b80…
|
noreply
|
324 |
|
|
3551b80…
|
noreply
|
325 |
```json |
|
3551b80…
|
noreply
|
326 |
{ |
|
3551b80…
|
noreply
|
327 |
"source_id": "vid_abc123", |
|
3551b80…
|
noreply
|
328 |
"source_type": "video", |
|
3551b80…
|
noreply
|
329 |
"title": "Sprint Planning Meeting - Jan 15", |
|
3551b80…
|
noreply
|
330 |
"path": "/recordings/sprint-planning.mp4", |
|
3551b80…
|
noreply
|
331 |
"url": null, |
|
3551b80…
|
noreply
|
332 |
"mime_type": "video/mp4", |
|
3551b80…
|
noreply
|
333 |
"ingested_at": "2026-01-15T10:30:00", |
|
3551b80…
|
noreply
|
334 |
"metadata": {"duration": 3600, "resolution": "1920x1080"} |
|
3551b80…
|
noreply
|
335 |
} |
|
3551b80…
|
noreply
|
336 |
``` |
|
3551b80…
|
noreply
|
337 |
|
|
3551b80…
|
noreply
|
338 |
### KnowledgeGraphData |
|
3551b80…
|
noreply
|
339 |
|
|
3551b80…
|
noreply
|
340 |
Serializable knowledge graph data containing all nodes, relationships, and source provenance. |
|
3551b80…
|
noreply
|
341 |
|
|
3551b80…
|
noreply
|
342 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
343 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
344 |
| `nodes` | `List[Entity]` | `[]` | Graph nodes/entities | |
|
3551b80…
|
noreply
|
345 |
| `relationships` | `List[Relationship]` | `[]` | Graph relationships | |
|
3551b80…
|
noreply
|
346 |
| `sources` | `List[SourceRecord]` | `[]` | Content sources for provenance tracking | |
|
3551b80…
|
noreply
|
347 |
|
|
3551b80…
|
noreply
|
348 |
--- |
|
3551b80…
|
noreply
|
349 |
|
|
3551b80…
|
noreply
|
350 |
## Planning Models |
|
3551b80…
|
noreply
|
351 |
|
|
3551b80…
|
noreply
|
352 |
### PlanningEntity |
|
3551b80…
|
noreply
|
353 |
|
|
3551b80…
|
noreply
|
354 |
An entity classified for planning purposes, with priority and status tracking. |
|
3551b80…
|
noreply
|
355 |
|
|
3551b80…
|
noreply
|
356 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
357 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
358 |
| `name` | `str` | *required* | Entity name | |
|
3551b80…
|
noreply
|
359 |
| `planning_type` | `PlanningEntityType` | *required* | Planning classification | |
|
3551b80…
|
noreply
|
360 |
| `description` | `str` | `""` | Detailed description | |
|
3551b80…
|
noreply
|
361 |
| `priority` | `Optional[str]` | `None` | Priority: `"high"`, `"medium"`, `"low"` | |
|
3551b80…
|
noreply
|
362 |
| `status` | `Optional[str]` | `None` | Status: `"identified"`, `"confirmed"`, `"resolved"` | |
|
3551b80…
|
noreply
|
363 |
| `source_entities` | `List[str]` | `[]` | Names of source KG entities this was derived from | |
|
3551b80…
|
noreply
|
364 |
| `metadata` | `Dict[str, Any]` | `{}` | Additional metadata | |
|
3551b80…
|
noreply
|
365 |
|
|
3551b80…
|
noreply
|
366 |
```json |
|
3551b80…
|
noreply
|
367 |
{ |
|
3551b80…
|
noreply
|
368 |
"name": "Migrate to OAuth 2.0", |
|
3551b80…
|
noreply
|
369 |
"planning_type": "task", |
|
3551b80…
|
noreply
|
370 |
"description": "Replace custom auth with OAuth 2.0 across all services", |
|
3551b80…
|
noreply
|
371 |
"priority": "high", |
|
3551b80…
|
noreply
|
372 |
"status": "identified", |
|
3551b80…
|
noreply
|
373 |
"source_entities": ["OAuth", "Authentication Service"], |
|
3551b80…
|
noreply
|
374 |
"metadata": {} |
|
3551b80…
|
noreply
|
375 |
} |
|
3551b80…
|
noreply
|
376 |
``` |
|
3551b80…
|
noreply
|
377 |
|
|
3551b80…
|
noreply
|
378 |
--- |
|
3551b80…
|
noreply
|
379 |
|
|
3551b80…
|
noreply
|
380 |
## Processing and Metadata Models |
|
3551b80…
|
noreply
|
381 |
|
|
3551b80…
|
noreply
|
382 |
### ProcessingStats |
|
3551b80…
|
noreply
|
383 |
|
|
3551b80…
|
noreply
|
384 |
Statistics about a processing run, including model usage tracking. |
|
3551b80…
|
noreply
|
385 |
|
|
3551b80…
|
noreply
|
386 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
387 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
388 |
| `start_time` | `Optional[str]` | `None` | ISO format start time | |
|
3551b80…
|
noreply
|
389 |
| `end_time` | `Optional[str]` | `None` | ISO format end time | |
|
3551b80…
|
noreply
|
390 |
| `duration_seconds` | `Optional[float]` | `None` | Total processing time | |
|
3551b80…
|
noreply
|
391 |
| `frames_extracted` | `int` | `0` | Number of frames extracted from video | |
|
3551b80…
|
noreply
|
392 |
| `people_frames_filtered` | `int` | `0` | Frames filtered out (contained people/webcam) | |
|
3551b80…
|
noreply
|
393 |
| `diagrams_detected` | `int` | `0` | Number of diagrams detected | |
|
3551b80…
|
noreply
|
394 |
| `screen_captures` | `int` | `0` | Number of screen captures saved | |
|
3551b80…
|
noreply
|
395 |
| `transcript_duration_seconds` | `Optional[float]` | `None` | Duration of transcribed audio | |
|
3551b80…
|
noreply
|
396 |
| `models_used` | `Dict[str, str]` | `{}` | Map of task to model used (e.g., `{"vision": "gpt-4o"}`) | |
|
3551b80…
|
noreply
|
397 |
|
|
3551b80…
|
noreply
|
398 |
### VideoMetadata |
|
3551b80…
|
noreply
|
399 |
|
|
3551b80…
|
noreply
|
400 |
Metadata about the source video file. |
|
3551b80…
|
noreply
|
401 |
|
|
3551b80…
|
noreply
|
402 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
403 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
404 |
| `title` | `str` | *required* | Video title | |
|
3551b80…
|
noreply
|
405 |
| `source_path` | `Optional[str]` | `None` | Original video file path | |
|
3551b80…
|
noreply
|
406 |
| `duration_seconds` | `Optional[float]` | `None` | Video duration in seconds | |
|
3551b80…
|
noreply
|
407 |
| `resolution` | `Optional[str]` | `None` | Video resolution (e.g., `"1920x1080"`) | |
|
3551b80…
|
noreply
|
408 |
| `processed_at` | `str` | *auto* | ISO format processing timestamp | |
|
3551b80…
|
noreply
|
409 |
|
|
3551b80…
|
noreply
|
410 |
--- |
|
3551b80…
|
noreply
|
411 |
|
|
3551b80…
|
noreply
|
412 |
## Manifest Models |
|
3551b80…
|
noreply
|
413 |
|
|
3551b80…
|
noreply
|
414 |
### VideoManifest |
|
3551b80…
|
noreply
|
415 |
|
|
3551b80…
|
noreply
|
416 |
The single source of truth for a video processing run. Contains all output paths, inline structured data, and processing statistics. |
|
3551b80…
|
noreply
|
417 |
|
|
3551b80…
|
noreply
|
418 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
419 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
420 |
| `version` | `str` | `"1.0"` | Manifest schema version | |
|
3551b80…
|
noreply
|
421 |
| `video` | `VideoMetadata` | *required* | Source video metadata | |
|
3551b80…
|
noreply
|
422 |
| `stats` | `ProcessingStats` | *default* | Processing statistics | |
|
3551b80…
|
noreply
|
423 |
| `transcript_json` | `Optional[str]` | `None` | Relative path to transcript JSON | |
|
3551b80…
|
noreply
|
424 |
| `transcript_txt` | `Optional[str]` | `None` | Relative path to transcript text | |
|
3551b80…
|
noreply
|
425 |
| `transcript_srt` | `Optional[str]` | `None` | Relative path to SRT subtitles | |
|
3551b80…
|
noreply
|
426 |
| `analysis_md` | `Optional[str]` | `None` | Relative path to analysis Markdown | |
|
3551b80…
|
noreply
|
427 |
| `analysis_html` | `Optional[str]` | `None` | Relative path to analysis HTML | |
|
3551b80…
|
noreply
|
428 |
| `analysis_pdf` | `Optional[str]` | `None` | Relative path to analysis PDF | |
|
3551b80…
|
noreply
|
429 |
| `knowledge_graph_json` | `Optional[str]` | `None` | Relative path to knowledge graph JSON | |
|
3551b80…
|
noreply
|
430 |
| `knowledge_graph_db` | `Optional[str]` | `None` | Relative path to knowledge graph DB | |
|
3551b80…
|
noreply
|
431 |
| `key_points_json` | `Optional[str]` | `None` | Relative path to key points JSON | |
|
3551b80…
|
noreply
|
432 |
| `action_items_json` | `Optional[str]` | `None` | Relative path to action items JSON | |
|
3551b80…
|
noreply
|
433 |
| `key_points` | `List[KeyPoint]` | `[]` | Inline key points data | |
|
3551b80…
|
noreply
|
434 |
| `action_items` | `List[ActionItem]` | `[]` | Inline action items data | |
|
3551b80…
|
noreply
|
435 |
| `diagrams` | `List[DiagramResult]` | `[]` | Inline diagram results | |
|
3551b80…
|
noreply
|
436 |
| `screen_captures` | `List[ScreenCapture]` | `[]` | Inline screen captures | |
|
3551b80…
|
noreply
|
437 |
| `frame_paths` | `List[str]` | `[]` | Relative paths to extracted frames | |
|
3551b80…
|
noreply
|
438 |
|
|
3551b80…
|
noreply
|
439 |
```python |
|
3551b80…
|
noreply
|
440 |
from video_processor.models import VideoManifest, VideoMetadata |
|
3551b80…
|
noreply
|
441 |
|
|
3551b80…
|
noreply
|
442 |
manifest = VideoManifest( |
|
3551b80…
|
noreply
|
443 |
video=VideoMetadata(title="Sprint Planning"), |
|
3551b80…
|
noreply
|
444 |
key_points=[...], |
|
3551b80…
|
noreply
|
445 |
action_items=[...], |
|
3551b80…
|
noreply
|
446 |
diagrams=[...], |
|
3551b80…
|
noreply
|
447 |
) |
|
3551b80…
|
noreply
|
448 |
|
|
3551b80…
|
noreply
|
449 |
# Serialize to JSON |
|
3551b80…
|
noreply
|
450 |
manifest.model_dump_json(indent=2) |
|
3551b80…
|
noreply
|
451 |
|
|
3551b80…
|
noreply
|
452 |
# Load from file |
|
3551b80…
|
noreply
|
453 |
loaded = VideoManifest.model_validate_json(Path("manifest.json").read_text()) |
|
3551b80…
|
noreply
|
454 |
``` |
|
3551b80…
|
noreply
|
455 |
|
|
3551b80…
|
noreply
|
456 |
### BatchVideoEntry |
|
3551b80…
|
noreply
|
457 |
|
|
3551b80…
|
noreply
|
458 |
Summary of a single video within a batch processing run. |
|
3551b80…
|
noreply
|
459 |
|
|
3551b80…
|
noreply
|
460 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
461 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
462 |
| `video_name` | `str` | *required* | Video file name | |
|
3551b80…
|
noreply
|
463 |
| `manifest_path` | `str` | *required* | Relative path to the video's manifest file | |
|
3551b80…
|
noreply
|
464 |
| `status` | `str` | `"pending"` | Processing status: `"pending"`, `"completed"`, `"failed"` | |
|
3551b80…
|
noreply
|
465 |
| `error` | `Optional[str]` | `None` | Error message if processing failed | |
|
3551b80…
|
noreply
|
466 |
| `diagrams_count` | `int` | `0` | Number of diagrams detected | |
|
3551b80…
|
noreply
|
467 |
| `action_items_count` | `int` | `0` | Number of action items extracted | |
|
3551b80…
|
noreply
|
468 |
| `key_points_count` | `int` | `0` | Number of key points extracted | |
|
3551b80…
|
noreply
|
469 |
| `duration_seconds` | `Optional[float]` | `None` | Processing duration | |
|
3551b80…
|
noreply
|
470 |
|
|
3551b80…
|
noreply
|
471 |
### BatchManifest |
|
3551b80…
|
noreply
|
472 |
|
|
3551b80…
|
noreply
|
473 |
Manifest for a batch processing run across multiple videos. |
|
3551b80…
|
noreply
|
474 |
|
|
3551b80…
|
noreply
|
475 |
| Field | Type | Default | Description | |
|
3551b80…
|
noreply
|
476 |
|---|---|---|---| |
|
3551b80…
|
noreply
|
477 |
| `version` | `str` | `"1.0"` | Manifest schema version | |
|
3551b80…
|
noreply
|
478 |
| `title` | `str` | `"Batch Processing Results"` | Batch title | |
|
3551b80…
|
noreply
|
479 |
| `processed_at` | `str` | *auto* | ISO format timestamp | |
|
3551b80…
|
noreply
|
480 |
| `stats` | `ProcessingStats` | *default* | Aggregated processing statistics | |
|
3551b80…
|
noreply
|
481 |
| `videos` | `List[BatchVideoEntry]` | `[]` | Per-video summaries | |
|
3551b80…
|
noreply
|
482 |
| `total_videos` | `int` | `0` | Total number of videos in batch | |
|
3551b80…
|
noreply
|
483 |
| `completed_videos` | `int` | `0` | Successfully processed videos | |
|
3551b80…
|
noreply
|
484 |
| `failed_videos` | `int` | `0` | Videos that failed processing | |
|
3551b80…
|
noreply
|
485 |
| `total_diagrams` | `int` | `0` | Total diagrams across all videos | |
|
3551b80…
|
noreply
|
486 |
| `total_action_items` | `int` | `0` | Total action items across all videos | |
|
3551b80…
|
noreply
|
487 |
| `total_key_points` | `int` | `0` | Total key points across all videos | |
|
3551b80…
|
noreply
|
488 |
| `batch_summary_md` | `Optional[str]` | `None` | Relative path to batch summary Markdown | |
|
3551b80…
|
noreply
|
489 |
| `merged_knowledge_graph_json` | `Optional[str]` | `None` | Relative path to merged KG JSON | |
|
3551b80…
|
noreply
|
490 |
| `merged_knowledge_graph_db` | `Optional[str]` | `None` | Relative path to merged KG database | |
|
3551b80…
|
noreply
|
491 |
|
|
3551b80…
|
noreply
|
492 |
```python |
|
3551b80…
|
noreply
|
493 |
from video_processor.models import BatchManifest |
|
3551b80…
|
noreply
|
494 |
|
|
3551b80…
|
noreply
|
495 |
batch = BatchManifest( |
|
3551b80…
|
noreply
|
496 |
title="Weekly Recordings", |
|
3551b80…
|
noreply
|
497 |
total_videos=5, |
|
3551b80…
|
noreply
|
498 |
completed_videos=4, |
|
3551b80…
|
noreply
|
499 |
failed_videos=1, |
|
3551b80…
|
noreply
|
500 |
) |
|
3551b80…
|
noreply
|
501 |
``` |