repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/native_media.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=too-many-branches,too-many-statements """Resolve all media attached to one user request for a file-native Specialist.""" from __future__ import annotations import asyncio import subprocess import tempfile from collections.abc import Mapping, Sequence from...
563
20,731
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/prompts/__init__.py
.py
# -*- coding: utf-8 -*- """Placeholder-verified prompts owned by the file-native Creator Runtime.""" from __future__ import annotations from dataclasses import dataclass from pathlib import Path import re _PROMPT_ROOT = Path(__file__).resolve().parent _PLACEHOLDER = re.compile(r"\{\{([a-zA-Z0-9_]+)\}\}") @dataclas...
153
4,543
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/file_agent_runtime/prompts/tts_guidance.py
.py
# -*- coding: utf-8 -*- """Narration/voice prompt sections, built from the configured TTS model. Speech guidance is injected only when it is actually true for the running deployment. Three states matter and each produces different text: - no TTS configured: nothing is injected, matching the tool registry which hide...
160
7,550
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/manual_edit_store.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """File-native net Manual Edit Buffer for frontend Project commits. The Buffer is context for the next Agent request, not an operation log. It therefore keeps only the first unconsumed ``before`` and latest ``after`` for each Project target. Consumption atomically renames...
541
19,676
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/errors.py
.py
# -*- coding: utf-8 -*- """Errors raised by the filesystem-backed Creator Runtime primitives. The primitives deliberately do not depend on the HTTP/domain error hierarchy. A caller at an API boundary can therefore map these storage errors without making the file layer aware of FastAPI or of the legacy SQLite Runtime. ...
141
4,491
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/field_blocks.py
.py
# -*- coding: utf-8 -*- """Short TTL field blocks used to reduce Project editing conflicts.""" from __future__ import annotations from collections.abc import Callable from contextlib import contextmanager from datetime import datetime, timedelta import hmac import os from pathlib import Path import secrets from uuid ...
294
10,092
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/reconciliation.py
.py
# -*- coding: utf-8 -*- # pylint: disable=too-many-return-statements """Startup reconciliation between terminal Task heads and their Runs. Task and SpecialistRun heads are separate crash-safe aggregates. A process can therefore stop after terminalizing a Task but before applying the matching Run transition. This mod...
179
5,673
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/locking.py
.py
# -*- coding: utf-8 -*- """Short cross-process locks for filesystem Runtime stores. Lock files are stable coordination inodes and are intentionally never unlinked after release. Removing an advisory lock file can create two lock domains when one process still has the old inode open. """ from __future__ import annota...
180
6,340
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_store.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=redefined-builtin,too-many-public-methods # pylint: disable=use-sequence-for-iteration """File-native SpecialistRun, Task, authorization and quarantine storage. The store is deliberately independent from the legacy SQL Runtime. Mutable entity heads use at...
1,971
71,218
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/models.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Pydantic records persisted below one Project's ``runtime/`` directory.""" from __future__ import annotations from datetime import UTC, datetime from enum import StrEnum from typing import Annotated, Any, Literal from pydantic import ( AfterValidator, BaseModel,...
518
18,208
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/execution_models.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Typed records for file-native SpecialistRun and Task execution state.""" from __future__ import annotations from enum import StrEnum from typing import Any, Literal from pydantic import Field, model_validator from domain.enums import ( SpecialistRole, Speciali...
305
10,924
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/jsonl_store.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=consider-using-max-builtin,not-callable """Append-only JSONL streams with durable monotonic sequence numbers.""" from __future__ import annotations from datetime import datetime import json import logging import os from pathlib import Path from typing imp...
475
17,987
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/__init__.py
.py
# -*- coding: utf-8 -*- """Filesystem primitives for the SQLite-free Creator Runtime. This package is intentionally side-effect free and does not import the legacy ``services.runtime`` database. Higher-level services compose these primitives inside one Project's ``runtime/`` directory. """ from .atomic_store import ...
245
6,605
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/media_probe.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Shared ffprobe/ffmpeg metadata probing for Creator runtime services.""" from __future__ import annotations from dataclasses import dataclass import json import re import subprocess from services.runtime_files.runtime_dependencies import ( resolve_ffmpeg, resolv...
238
6,956
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/status_projection.py
.py
# -*- coding: utf-8 -*- # pylint: disable=too-many-branches,too-many-return-statements """Authoritative Agent status projection from file-native Runtime records. The global status bar must describe durable Runtime truth, not whichever page happens to be mounted. Session records describe gates and the main Agent; Task...
385
13,859
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/path_safety.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Safe filesystem segments for Runtime-owned record paths.""" from __future__ import annotations import hashlib import re from .errors import RuntimeFileValidationError _SAFE_RUNTIME_SEGMENT = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._:-]{0,191}$") _MAX_HASHED_PREFIX_LENGTH...
58
1,682
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/atomic_store.py
.py
# -*- coding: utf-8 -*- # pylint: disable=not-callable """Crash-safe JSON records backed by same-directory atomic publication.""" from __future__ import annotations from collections.abc import Callable, Mapping, Sequence from dataclasses import dataclass import errno import hashlib import json import logging import o...
560
17,954
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/idempotency_store.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Filesystem idempotency reservations with payload-drift detection.""" from __future__ import annotations from dataclasses import dataclass import hashlib import logging import os from pathlib import Path import re from typing import Any from uuid import uuid4 from .atom...
403
13,155
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/safe_remote_download.py
.py
# -*- coding: utf-8 -*- """SSRF-safe, bounded HTTP(S) download primitives. Every caller uses the same URL, DNS, connected-peer, redirect, compression and size policy. Small consumers may materialize bytes; large-media consumers keep the validated response streaming into their own staging/file boundary. """ from __fut...
465
16,350
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/session_store.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=too-many-public-methods,too-many-statements """Filesystem session aggregate for the SQLite-free Creator Runtime. The store deliberately owns only short, durable state transitions. Provider and model calls must happen outside its Project-wide lock. Curren...
2,465
92,707
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/runtime_files/runtime_dependencies.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=too-many-return-statements """Creator-owned native executable dependency management. QwenPaw installs Python requirements for plugins. Creator additionally needs native executables, so this module gives those tools one explicit, testable resolution bounda...
486
16,052
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/motion_templates.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=line-too-long,redefined-builtin """Trusted deterministic templates for common decorative motion motifs.""" from __future__ import annotations from html import escape import re MOTION_TEMPLATE_VERSION = 1 SUPPORTED_MOTIFS = frozenset( { "paw_t...
232
12,292
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/image_execution.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=raise-missing-from,too-many-branches,too-many-statements # pylint: disable=try-except-raise """Task-first image generation against the file-native Project authority. One invocation freezes its Project snapshot, records a stable Run/Task/Attempt, calls the ...
2,860
109,318
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/motion_blueprints.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=line-too-long """Parameterized GSAP motion blueprints (hyperframes-style catalog blocks). Free-form VLM documents fail the render truth gates often (empty t=0 frames, loop seams), and the single fixed fallback template made every caption look identical. Bl...
781
34,419
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/secure_video_stream.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=protected-access,too-many-boolean-expressions # pylint: disable=too-many-return-statements """Secure, streaming materialization for file-native R2V provider output. The materializer has one deliberately narrow authority: it may read a local provider result...
1,041
38,298
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/audio_execution.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """TTS audio generation and character voice enrollment over Project files. Synthesized narration lands as an immutable audio ``SourceAssetVersion`` (the type ``AudioCreation`` Timeline elements reference); voice enrollment writes a ``CharacterVoice`` binding onto one charac...
581
20,968
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/element_adapter.py
.py
# -*- coding: utf-8 -*- """Shared helpers for media tools that operate on Timeline Elements.""" from __future__ import annotations from typing import Any from domain.errors import ConflictError, NotFoundError, ValidationError from services.project_files.models import ( ArtifactSlot, ElementOutput, Projec...
164
5,651
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/ffmpeg.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """FFmpeg capability projection for the file-native media runtime.""" from __future__ import annotations from typing import Any from services.runtime_files.runtime_dependencies import resolve_ffmpeg def ffmpeg_readiness() -> dict[str, Any]: path = resolve_ffmpeg() ...
34
786
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/visual_reference_resolution.py
.py
# -*- coding: utf-8 -*- """Resolve R2V visual references through Element-to-Variant bindings.""" from __future__ import annotations from collections.abc import Iterable from domain.errors import ValidationError from services.project_files.models import Project, R2VCreation, VisualEntity def _owner_entity_id(owner_...
189
6,179
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/transitions.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """xfade/acrossfade filter-chain construction for Element transitions. A Timeline Element with ``creation.type=transition`` explicitly references two adjacent main-track Elements, and its span sits inside the time intersection of both endpoint spans. This module translates ...
213
6,926
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/transient_errors.py
.py
# -*- coding: utf-8 -*- """Shared transient-failure classification for media execution services. Transient provider failures may be retried on a derived durable slot; deterministic rejections (safety refusals, validation errors) never are. Markers are matched case-insensitively against the persisted task error. """ f...
80
2,841
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/__init__.py
.py
# -*- coding: utf-8 -*- """File-native media execution services. The package owns provider execution and convergence into ``project.json``. It deliberately depends only on the filesystem Project and Runtime stores. """ from .image_execution import ( ExistingImageProvider, FileImageExecutionResult, FileIma...
63
1,739
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/beat_grid.py
.py
# -*- coding: utf-8 -*- """BGM beat grid for cut-point / transition snapping (WT-B5). Ports the upstream video-edit beat-sync methodology's measurement side: a beat grid extracted once per music track, which cut points and transition insertions can snap to. ``librosa`` is an optional dependency — when it is missing th...
93
3,062
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/motion_overlay.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=too-many-return-statements,consider-using-with,line-too-long # pylint: disable=too-many-branches,too-many-statements """Deterministic HTML/CSS motion-graphic rendering for overlay Elements. A ``MotionGraphic`` document is a self-contained HTML page whose v...
1,994
73,965
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/keyframe_cache.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Persistent local JPEG previews for immutable source-video versions.""" from __future__ import annotations from dataclasses import dataclass from hashlib import sha256 import math import os from pathlib import Path, PurePosixPath import stat import subprocess from thread...
259
8,063
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/r2v_execution.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=protected-access,raise-missing-from # pylint: disable=too-many-boolean-expressions,too-many-branches # pylint: disable=too-many-return-statements,too-many-statements # pylint: disable=try-except-raise,unused-argument """Restart-safe, file-native reference-t...
4,803
178,632
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/overlay.py
.py
# -*- coding: utf-8 -*- # pylint: disable=too-many-branches,too-many-statements """Deterministic editorial-copy renderers used by AI Edit execution. The AI Editing Director owns all copy generation. These tools only turn an already validated ``overlay_copy`` payload into pixels and composite those pixels over a prepa...
936
28,464
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/local_execution.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=consider-using-with,raise-missing-from,too-many-branches # pylint: disable=too-many-statements,unused-argument,too-many-return-statements """File-native local video execution for edit and composition commands. The service freezes one ``project.json`` snaps...
4,562
172,094
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/motion_engine.py
.py
# -*- coding: utf-8 -*- """Deterministic JS engine assets for ``html_js`` motion documents. An ``html_js`` motion document drives its animation from an inline script through the ``window.__hf = { duration, seek }`` protocol (a minimal subset of the HyperFrames runtime contract). This module owns everything the render...
309
11,096
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/visual_design_readiness.py
.py
# -*- coding: utf-8 -*- """Deterministic visual-design admission before storyboard generation.""" from __future__ import annotations from dataclasses import dataclass from domain.errors import ValidationError from services.project_files.models import Project, R2VCreation, VisualEntity @dataclass(frozen=True, slots...
197
7,218
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/review_admission.py
.py
# -*- coding: utf-8 -*- """Deterministic media admission while generated artifacts await review.""" from __future__ import annotations from dataclasses import dataclass from typing import Sequence from domain.errors import ReviewPendingError from models.config import ( MEDIA_REVIEW_AUTO_APPROVE, get_media_re...
166
5,831
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/motion_design.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=too-many-branches,too-many-statements,too-many-locals # pylint: disable=too-many-return-statements,line-too-long """VLM-driven motion-graphic design for Timeline edit segments. ``design_motion_overlays`` runs two passes over one Timeline. Pass A looks at ...
2,450
105,135
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/media_files/call_budget.py
.py
# -*- coding: utf-8 -*- """Per-project media call budget: the wallet fuse for unattended runs. Call counts are the honest spend metric — every task record of a billable media kind is one provider invocation, counted from durable facts (no new persisted state, same philosophy as the work graph). FAILED tasks count too:...
60
1,859
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/validators/source_intelligence.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=too-many-branches,too-many-statements """Authoritative validation for direct Source Intelligence analysis versions.""" from __future__ import annotations from collections.abc import Mapping, Sequence from typing import Any from domain.errors import Stora...
172
6,653
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/validators/__init__.py
.py
# -*- coding: utf-8 -*- from .base import ValidationIssue, ValidationReport __all__ = ["ValidationIssue", "ValidationReport"]
5
127
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/validators/transaction.py
.py
# -*- coding: utf-8 -*- # pylint: disable=unused-argument """Deterministic complete_current_change pre-seal checks.""" from __future__ import annotations from dataclasses import dataclass from .base import ValidationReport @dataclass(frozen=True, slots=True) class CompletionSnapshot: transaction_id: str st...
42
1,253
QwenPaw
plugins/apps/qwenpaw-creator/backend/services/validators/base.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations from dataclasses import dataclass from typing import Iterable @dataclass(frozen=True, slots=True) class ValidationIssue: code: str message: str target_ref: str | None = None @dataclass(frozen=True, slots=True) class ValidationReport: issues...
36
806
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_document_reader.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Per-format fixtures for the vendored document reader.""" from __future__ import annotations import asyncio from pathlib import Path import pytest from domain.errors import ValidationError from services.document_reader import ( MAX_INDEXED_TEXT_CHARS, MAX_TEXT_...
322
11,384
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_seed_demo_projects.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import importlib.util import json import sys from pathlib import Path import httpx BACKEND_DIR = Path(__file__).resolve().parents[1] SCRIPT_PATH = BACKEND_DIR / "scripts" / "seed_demo_projects.py" SPEC = importlib.util.spec_from_file_location( "seed_dem...
161
5,580
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_vlm_content_parts_golden.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=line-too-long,protected-access,unnecessary-lambda # pylint: disable=useless-return from __future__ import annotations import asyncio from contextlib import asynccontextmanager import pytest from models import vlm_model pytestmark = pytest.mark.unit ...
285
7,975
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_runtime_dependencies.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access from __future__ import annotations from hashlib import sha256 import io import os from pathlib import Path from collections.abc import Iterator import pytest from services.runtime_files import runtime_dependencies as dependencies @pytest.fixture(autouse=Tr...
221
6,891
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_object_grounding.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import asyncio import io from PIL import Image from services import object_grounding def _png_bytes(size=(100, 200), color="white") -> bytes: output = io.BytesIO() Image.new("RGB", size, color=color).save(output, format="PNG") return output.ge...
148
4,052
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_agentscope_tool_protocol.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations import asyncio import pytest from services.file_agent_runtime.tool_protocol import ( NativeToolTextStream, NonNativeToolMarkupError, contains_non_native_tool_markup, ) pytestmark = pytest.mark.unit def test_native_text_st...
76
2,094
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/test_web_grounding.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=line-too-long,protected-access,unused-argument # pylint: disable=use-implicit-booleaness-not-comparison import asyncio import io import json import httpx import pytest import respx from PIL import Image from services.web_grounding import pipeline as web_g...
4,067
129,169
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/conftest.py
.py
# -*- coding: utf-8 -*- import sys from pathlib import Path BACKEND_DIR = Path(__file__).resolve().parents[1] if str(BACKEND_DIR) not in sys.path: sys.path.insert(0, str(BACKEND_DIR))
8
189
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/workspace/test_content_store_windows_portability.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import errno import os from pathlib import Path import pytest from services.runtime_files import atomic_store as atomic_store_module from services.workspace import content_store as content_store_module from services.workspace.content_store import ContentStor...
37
1,106
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_source_memory.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access """Source memory trigger/artifacts/query dispatch and projection tests.""" from __future__ import annotations import asyncio import json from datetime import UTC, datetime from pathlib import Path from types import SimpleNamespace import pytest from domain.e...
1,615
52,540
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_source_observation.py
.py
# -*- coding: utf-8 -*- # pylint: disable=redefined-outer-name,unused-argument,protected-access """Tests for services.media.source_observation (observe_source_clip).""" from __future__ import annotations import asyncio from pathlib import Path from types import SimpleNamespace import pytest from domain.enums import...
465
15,140
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_audio_mixing.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access,use-implicit-booleaness-not-comparison # flake8: noqa: E501 from __future__ import annotations from pathlib import Path from services.media_files.local_execution import ( FfmpegLocalMediaRunner, LocalMediaExecutionSpec, ) from domain.enums import Cre...
174
5,269
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_ai_edit_overlay_tools.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access from __future__ import annotations from pathlib import Path import pytest from services.media_files import overlay as overlay_tools pytestmark = pytest.mark.unit class _Completed: returncode = 0 stdout = "" stderr = "" def _install_render_fa...
171
4,559
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_media_probe.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import json import subprocess import pytest from services.runtime_files import media_probe def test_ffprobe_json_is_normalized(monkeypatch: pytest.MonkeyPatch) -> None: payload = { "streams": [ {"codec_type": "video", "width": 1920,...
119
3,315
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_beat_grid_and_crop_zoom.py
.py
# -*- coding: utf-8 -*- # pylint: disable=redefined-outer-name,protected-access """Tests for beat_grid (WT-B5) and grounding crop-zoom (WT-A4).""" from __future__ import annotations import asyncio import io import sys import pytest from PIL import Image from services import object_grounding from services.media_file...
135
4,744
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/media/test_source_video_reader.py
.py
# -*- coding: utf-8 -*- # pylint: disable=redefined-outer-name,unused-argument,protected-access """Tests for services.media.source_video_reader (read_source_video).""" from __future__ import annotations import asyncio from pathlib import Path from types import SimpleNamespace import pytest from domain.enums import ...
352
12,042
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/architecture/test_cold_start.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations import os from pathlib import Path import subprocess import sys def test_dev_app_imports_in_a_cold_interpreter(tmp_path: Path) -> None: """A fresh process must not depend on a lucky prior import order.""" environment = { ...
33
862
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/vendored/test_video_memory_toolkit.py
.py
# -*- coding: utf-8 -*- """Locks the 9 memory query surfaces over a prebuilt graph fixture.""" from __future__ import annotations import numpy as np import pytest from vendor.media_toolkit.video_memory.embeddings import EmbeddingIndex from vendor.media_toolkit.video_memory.schema import ( Edge, Entity, Hi...
339
11,654
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/vendored/test_new_renderers.py
.py
# -*- coding: utf-8 -*- """Tests for the geo/drawio/model3d/latex renderers (WT-A3).""" from __future__ import annotations import json from pathlib import Path import pytest from vendor.media_toolkit.renderers import ( SUPPORTED_EXTENSIONS, get_renderer, renderer_module_name, ) pytestmark = pytest.mark...
106
3,227
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/vendored/test_video_memory_segmentation.py
.py
# -*- coding: utf-8 -*- """Vendored video-memory segmentation planning tests.""" from __future__ import annotations import numpy as np from vendor.media_toolkit.video_memory.segmentation import ( compute_cut_scores, decode_jpeg_to_hls, find_optimal_threshold, plan_segments, ) def _frame(color: tuple...
90
2,706
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_store.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access,use-implicit-booleaness-not-comparison from __future__ import annotations from datetime import datetime, timedelta, timezone import json import os import pytest from services.project_files import ( Project, ProjectAlreadyExists, ProjectConflict, ...
377
11,818
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_schema_prompt.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import hashlib from services.project_files.agent_tools import ( AgentProjectToolContext, AgentProjectTools, ) from services.project_files.models import Project from services.project_files.schema_prompt import build_project_schema_prompt from services....
50
1,780
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_cast_lineup_models.py
.py
# -*- coding: utf-8 -*- """Master cast lineup and canonical-variant data model (relative consistency). P0 backend scope of docs/proposals/master-cast-lineup: the lineup is the group anchor for cross-character scale/style/palette consistency; the canonical variant locks intra-character identity across costumes. """ fro...
175
5,272
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_agent_tools.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access from __future__ import annotations from datetime import datetime, timezone import hashlib import inspect from pydantic import ValidationError import pytest from services.project_files.agent_tools import ( AGENT_PROJECT_TOOL_SCHEMAS, AgentProjectToolC...
729
23,680
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_migrations.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import json import pytest from services.project_files.migrations import ( PROJECT_MIGRATIONS, migrate_project_document, ) from services.project_files.models import Project, motion_document_file_id from services.project_files.serialization import ( ...
743
25,050
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_json_pointer_and_jq.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import shutil import subprocess import pytest from services.project_files import jq_transform as jq_transform_module from services.project_files.jq_transform import ( JqLimits, JqProjectTransformer, JqTransformError, ) from services.project_files...
195
6,203
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_patch_project.py
.py
# -*- coding: utf-8 -*- """patch_project: flat ops assemble the document, the Runtime owns depth.""" from __future__ import annotations import json import pytest from services.project_files.agent_tools import ( AgentProjectToolContext, AgentProjectToolError, AgentProjectTools, ) from services.project_fil...
327
10,297
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_locator_map.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations from services.project_files.locator_map import derive_ui_locator def _project() -> dict: return { "assets": { "files_by_id": { "file-img": {"media_type": "image/png"}, "file-vid": {"media_type": "video...
147
4,827
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_storyboard_auto_continue.py
.py
# -*- coding: utf-8 -*- """Approved storyboards auto-start their video under allow_all authorization. The Runtime never auto-resumed a paused specialist: after approval the mainline had to re-delegate, and models routinely skipped that step while claiming the video was already running (2026-08 incidents). """ # pylint...
191
5,566
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_candidate_normalization.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import pytest from services.project_files.agent_tools import ( AgentProjectToolContext, AgentProjectToolError, AgentProjectTools, ) from services.project_files.candidate_normalization import ( normalize_project_candidate, ) from services.proje...
221
6,947
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_timeline_element_poc.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=protected-access from __future__ import annotations import asyncio from datetime import UTC, datetime import hashlib import json from types import SimpleNamespace import pytest from pydantic import ValidationError from domain.enums import CreatorCommandT...
595
19,404
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_models_and_serialization.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations from datetime import datetime, timezone import json import pytest from pydantic import ValidationError from services.project_files import ( CanonicalJsonError, Project, canonical_json_bytes, load_project_document, loa...
492
16,123
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_commit_boundary.py
.py
# -*- coding: utf-8 -*- # pylint: disable=protected-access,use-implicit-booleaness-not-comparison from __future__ import annotations import threading import pytest from domain.enums import TransactionStatus from services.project_files.commit import ( ProjectCommitBoundary, ProjectCommitError, ProtectedFi...
1,057
34,920
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_edit_impact.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import re from services.project_files.edit_impact import ( apply_frontend_edit_impacts, summarize_committed_edit_impact, ) def _project() -> dict: return { "timelines": { "items": { "timeline:main": { ...
256
8,935
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_recovery.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations import json from datetime import timedelta from pathlib import Path import pytest from domain.enums import TransactionStatus from services.project_files import commit as commit_module from services.project_files.commit import ( CommitJournalState, Pe...
1,153
37,475
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_assets.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations from datetime import datetime, timedelta, timezone import hashlib from io import BytesIO import os import pytest from services.project_files.assets import ( AssetAlreadyExists, AssetFileCorrupt, AssetFileNotRegular, Asset...
368
11,500
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_file_review.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=protected-access,unused-variable from __future__ import annotations from concurrent.futures import ThreadPoolExecutor from threading import Event import pytest from services.project_files.commit import ProjectCommitBoundary from services.project_files.fa...
946
31,110
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/project_files/test_poller.py
.py
# -*- coding: utf-8 -*- from __future__ import annotations from datetime import timedelta import os import pytest from services.project_files.models import Project from services.project_files.poller import ProjectPoller from services.project_files.store import ProjectNotFound, ProjectStore def test_poller_keeps_la...
93
2,834
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/source_analysis/test_source_analysis_service.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=protected-access,use-implicit-booleaness-not-comparison from __future__ import annotations import asyncio from datetime import UTC, datetime import json from pathlib import Path from types import SimpleNamespace import httpx from fastapi import FastAPI im...
1,064
36,108
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/source_analysis/test_document_source_intelligence.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=protected-access """Document source flow: read_document tool + document-flavored index.""" from __future__ import annotations import asyncio import json from pathlib import Path import pytest from api.file_asset_routes import _AssetInput, _ingest_many_s...
1,351
46,728
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/render_review/test_frames.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Unit tests for review frame extraction and the ebur128 audio profile.""" from __future__ import annotations import subprocess from pathlib import Path import pytest from services.render_review.frames import ( RenderReviewError, _frame_timestamps, _segment_...
185
5,634
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/render_review/test_protocol.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Unit tests for the six-dimension review protocol and report schema.""" from __future__ import annotations import json import pytest from schemas.render_review import ( AudioProfile, LoudnessSegment, RenderReviewReport, ReviewDimension, ReviewFindin...
304
9,388
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/render_review/test_eval_set.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Manual eval-set regression for the six-dimension review prompt. Runs the *real* VLM against the curated fixture cases under ``tests/fixtures/render_review/cases`` and grades the report against the human-annotated ``expected.json``. Prompt iteration bar: zero missed defec...
223
7,659
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/render_review/test_review_loop.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 # pylint: disable=redefined-outer-name,unused-argument,protected-access """Review loop tests: stubbed VLM pass/revise states, round cap, switch off.""" from __future__ import annotations import asyncio import json import threading from pathlib import Path from types import...
887
30,302
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/render_review/test_scene_review.py
.py
# -*- coding: utf-8 -*- # pylint: disable=redefined-outer-name,unused-argument,protected-access """Tests for the scene-loop pre-compose review (WT-B4).""" from __future__ import annotations import asyncio import json from pathlib import Path from types import SimpleNamespace import pytest from domain.enums import T...
388
12,885
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/services/test_tts_specialist_tools.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Dynamic registration of the TTS specialist tools.""" from __future__ import annotations import pytest from domain.enums import SpecialistRole from domain.errors import PermissionDeniedError from services.specialist_tools import FileSpecialistToolRegistry def _registr...
110
3,274
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/services/test_s2v_specialist_tools.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Dynamic registration of the s2v (digital human) specialist tool.""" from __future__ import annotations import pytest from domain.enums import SpecialistRole from domain.errors import PermissionDeniedError from services.specialist_tools import FileSpecialistToolRegistry...
104
3,374
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/observability/test_tracing.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations import asyncio import json import logging from fastapi import Depends, FastAPI, Request, Response from httpx import ASGITransport, AsyncClient import pytest from api.dependencies import bind_creator_trace_request from schemas.observabili...
408
13,525
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/prompts/test_active_prompt_surface.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations import json from domain.enums import SpecialistRole from services.file_agent_runtime.prompts import ( FILE_AGENT_PROMPT_SPECS, load_file_agent_prompt, render_creator_system_prompt, ) from services.file_agent_runtime.subagents ...
212
8,109
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/prompts/test_r2v_video_model_guidance.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 from __future__ import annotations from domain.enums import SpecialistRole from models import config as model_config from services.file_agent_runtime.subagents import specialist_system_prompt def _render_r2v_prompt() -> str: return specialist_system_prompt( S...
47
1,367
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/prompts/test_tts_prompt_guidance.py
.py
# -*- coding: utf-8 -*- # flake8: noqa: E501 """Narration guidance must describe exactly the configured model's abilities. The injected text is the agent's only source of truth about speech: promising a system voice a model does not have makes it retry synthesis that can never succeed, and hiding the "design a voice f...
147
4,932
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/run_review/test_review_env_overrides.py
.py
# -*- coding: utf-8 -*- """Review tier env overrides must be discoverable, never ghost state. Field incident (2026-08-07): review ran with the settings-center toggles off because stale ``CREATOR_*_REVIEW_ENABLED=1`` vars stayed injected in the launch command. The resolver keeps env-wins semantics (CI and emergency ove...
46
1,546
QwenPaw
plugins/apps/qwenpaw-creator/backend/tests/run_review/test_vendored_rules.py
.py
# -*- coding: utf-8 -*- """Vendored review rules and gates: content and behavior regression.""" from __future__ import annotations import shutil import subprocess from pathlib import Path import pytest from vendor.media_toolkit import frame_stats, review_gates from vendor.media_toolkit.review_rubrics import ( A...
188
5,161