PYTHONPUBLIC API

fastsim.api.artifacts

fastsim.api.artifacts 的公共 Python API;签名从 FastSim 源码直接提取。

源码 src/fastsim/api/artifacts.py

公开符号 3

class

ArtifactDescriptor

L37
class ArtifactDescriptor(object)

Path-free catalog metadata for one plugin-owned artifact.

字段类型默认值
artifact_idstr—
formatstr—
sha256str—
cache_hitbool—
class

ResolvedArtifact

L57
class ResolvedArtifact(ArtifactDescriptor)

Artifact location returned only after an asynchronous digest check. The digest and byte count describe the content observed during ``resolve``. A returned path is a verified-at-resolution capability, not an open-file snapshot; callers that retain it remain inside FastSim's cooperative plugin trust boundary.

字段类型默认值
requested_uristr—
resolved_uristr—
local_pathstr—
size_bytesint—
class

ScopedArtifactReadService

L83
class ScopedArtifactReadService(Protocol)

Resolve only the artifacts compiled for one plugin instance. ``resolve`` revalidates the file digest outside the application loop before returning its path. Retaining a path after service revocation is outside the cooperative in-process plugin trust boundary.

service_id
ScopedArtifactReadService.service_id(self) -> str
descriptors
ScopedArtifactReadService.descriptors(self) -> tuple[ArtifactDescriptor, ...]
resolve
async ScopedArtifactReadService.resolve(self, artifact_id: str) -> ResolvedArtifact