@edgible-team/sdk
    Preparing search index...

    Class NodeArtifactShipper

    ArtifactShipper over the platform's ingest flow: docker save → digest → (idempotency probe) → per serving device: mint session, wait for awaiting-upload, stream the bundle to the ingest URL, poll until completed → register by digest. Requires docker on PATH.

    Implements

    Index

    Constructors

    Methods

    • docker save the image, then deliver its bytes to each serving device. Idempotent by digest: if the platform already holds an ArtifactRecord for the computed digest, upload + register are skipped and every device is reported as an un-delivered (already-present) entry.

      Parameters

      Returns Promise<ArtifactShipResult>

      ARTIFACT_SAVE_FAILED when docker save cannot be spawned or exits non-zero; ARTIFACT_UPLOAD_FAILED / ARTIFACT_STREAM_FAILED when an ingest PUT errors.

      ARTIFACT_DELIVERY_TIMEOUT when a session does not reach the target state within totalTimeoutMs.

    • Deliver a PRE-MADE, content-addressed archive tar at an EXPLICIT path to the serving devices as a kind:'archive' artifact. The generalized core of shipArchiveFile; catalog compose-bundle delivery (a registry download in a temp dir, not a build context) enters here. The caller owns verifying that the file's bytes hash to digest before delivery — the agent re-checks on receipt regardless.

      Parameters

      • req: {
            applicationId: string;
            bundlePath: string;
            deviceIds: string[];
            digest: string;
            role: string;
        }

      Returns Promise<ArtifactShipResult>

    • Phase 5 (remote build): deliver a PRE-MADE archive tar (a compose build context the producer already packed + content-addressed) to the serving devices as a kind:'archive' artifact — NO docker save. The tar lives at the deterministic buildContextTarPath for its digest. Same delivery mechanics as ship (idempotent by digest, per-device upload via the resumable ingest path, register once on-device), so the agent extracts it before docker compose build.

      Parameters

      • req: { applicationId: string; deviceIds: string[]; digest: string; role: string }

      Returns Promise<ArtifactShipResult>