Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /zloeber_SecretZero /src /secretzero /generators /traits.py
| """Capability flags resolved from registered generator classes.""" | |
| from __future__ import annotations | |
| from typing import TYPE_CHECKING | |
| from secretzero.bundles.registry import get_bundle_registry | |
| if TYPE_CHECKING: | |
| from secretzero.bundles.registry import BundleRegistry | |
| from secretzero.models import Secret | |
| def secret_prompts_like_static( | |
| secret: Secret, | |
| registry: BundleRegistry | None = None, | |
| ) -> bool: | |
| """True when the secret's generator is registered and uses static-style prompting. | |
| Used by agent sync, web forms, and dashboard instead of hard-coding | |
| ``kind == "static"``. | |
| """ | |
| reg = registry or get_bundle_registry() | |
| cls = reg.get_generator_class(secret.kind) | |
| if cls is None: | |
| return False | |
| return bool(getattr(cls, "PROMPTS_LIKE_STATIC", False)) | |
Xet Storage Details
- Size:
- 812 Bytes
- Xet hash:
- ee6be10dab6d57f5349abac9e0533adf558818b34a83855be594389faaec7799
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.