flayer.profiles.artifacts¶
flayer.profiles.artifacts ¶
Bounded artifact bundles with exclusive ownership and verified local cleanup.
ArtifactError ¶
Bases: ContractError
An artifact is invalid, foreign, changed, busy, or unavailable for safe storage.
Artifact
dataclass
¶
Artifact(name: str, content: bytes, sensitive: bool = True)
ArtifactBundle
dataclass
¶
ArtifactBundle(identity: StackIdentity, kind: str, name: str, files: tuple[Artifact, ...])
BuildDeviceBundle ¶
BuildDeviceBundle(identity: StackIdentity, device_id: str, transport: str, files: tuple[Artifact, ...]) -> ArtifactBundle
Wrap externally issued transport files without generating or validating credentials.
Source code in installed/flayer/profiles/artifacts.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
ReadArtifactFile ¶
ReadArtifactFile(path: str | Path) -> bytes
Read only a private artifact; never expose filesystem paths or bytes in failures.
Source code in installed/flayer/profiles/artifacts.py
290 291 292 293 294 295 296 297 298 299 300 301 302 | |
WriteArtifactBundle ¶
WriteArtifactBundle(root: str | Path, bundle: ArtifactBundle) -> Path
Publish a new manifest-last bundle exclusively and roll back only created files.
Source code in installed/flayer/profiles/artifacts.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | |
ReadOwnedArtifactFile ¶
ReadOwnedArtifactFile(path: str | Path, identity: StackIdentity, *, kind: str, name: str) -> bytes
Authorize one exact file through the complete unchanged bundle ownership manifest.
Source code in installed/flayer/profiles/artifacts.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | |
RemoveArtifactBundle ¶
RemoveArtifactBundle(root: str | Path, identity: StackIdentity, *, kind: str, name: str) -> bool
Remove only exact, unchanged owned files; never recurse or delete provider resources.
Source code in installed/flayer/profiles/artifacts.py
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | |