Skip to content

vendor_connectors.meshy.persistence.repository

Task repository for manifest storage and retrieval.

TaskRepositoryFile-backed repository for task manifests with atomic operations.
_utc_nowReturn current UTC time with timezone info.

Return current UTC time with timezone info.

class vendor_connectors.meshy.persistence.repository.TaskRepository(base_path: str = ‘client/public/models’)

Section titled “class vendor_connectors.meshy.persistence.repository.TaskRepository(base_path: str = ‘client/public/models’)”

File-backed repository for task manifests with atomic operations.

Get path to project manifest file.

Load manifest for a project, creating empty one if missing.

Args: project: Project name (e.g., “otter”, “beaver”)

Returns: ProjectManifest instance

Atomically save project manifest to disk.

Args: manifest: ProjectManifest to save

Get asset manifest by spec hash.

Args: project: Project name spec_hash: Asset spec hash

Returns: AssetManifest if found, None otherwise

Insert or update asset manifest.

Args: project: Project name asset_manifest: AssetManifest to save

Record task status update in manifest.

Args: project: Project name spec_hash: Asset spec hash task_id: Meshy task ID status: New status string service: Service name (text3d, rigging, etc) payload: Request payload result_paths: Result URLs/paths artifacts: Downloaded artifacts source: Update source (orchestrator, webhook, manual) error: Error message if failed

List all assets with pending/in-progress tasks.

Args: project: Project name

Returns: List of AssetManifest with non-terminal tasks

Find asset by task ID (for webhook lookups).

Args: task_id: Meshy task ID project: Optional project to narrow search

Returns: Tuple of (project, spec_hash, AssetManifest) if found

Compute deterministic hash for task spec.

Args: spec: Task specification dictionary

Returns: SHA256 hex digest of canonicalized spec

Record a task submission to the manifest (idempotent).

Args: submission: TaskSubmission with task_id, project, service, etc.

Raises: ValueError: If submission data is invalid