publishArtifact
Purpose and behavior
Section titled “Purpose and behavior”Encode a value with its contract, compute its SHA-256 digest and content-addressed id, then store the bytes with store.put(). Returns the ArtifactReference; producer and parents are recorded as given, not authenticated. Rejects when encoding fails, a parent reference is invalid or the store refuses the bytes.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”storeRequiredArtifactStoreStore that receives the encoded bytes under the artifact id.contractRequiredArtifactContract<T>Contract that validates and encodes the value; its name, version and encoding are recorded in the reference.valueRequiredTValue to publish; the contract validates it before encoding.optionsRequiredPublishArtifactOptionsProducer to record, ordered parent references and cancellation signal.options.producerRequiredArtifactProducerExecution, task key and attempt recorded in the reference and its id, as given: Outpost does not authenticate them.options.parentsOptionalreadonly ArtifactReference[] | undefinedReferences this artifact was derived from, in order; their ids are recorded in parents and in the id. An invalid or duplicated reference rejects the publication.options.signalOptionalAbortSignal | undefinedAborting it rejects the publication with the signal’s reason; bytes already stored are kept.