forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrewrite.py
More file actions
26 lines (20 loc) · 800 Bytes
/
Copy pathrewrite.py
File metadata and controls
26 lines (20 loc) · 800 Bytes
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
"""Descriptor-only slot for an optional external cassette rewrite binary."""
from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
@dataclass(frozen=True)
class RewriteLaunchDescriptor:
command: tuple[str, ...]
input_manifest: Path
output_manifest: Path
available: bool
def rewrite_launch_descriptor(
input_manifest: Path, output_manifest: Path, binary: str = "omi-replay-rewrite"
) -> RewriteLaunchDescriptor:
"""Describe, but never silently invoke, the optional rewrite integration."""
return RewriteLaunchDescriptor(
command=(binary, "--manifest", str(input_manifest), "--output", str(output_manifest)),
input_manifest=input_manifest,
output_manifest=output_manifest,
available=False,
)