gleamunison/agent_publish

Controlled agent publication: source -> tests -> signed evidence -> CAS and selected branch. No caller-supplied storage key or arbitrary CAS write.

Types

pub type Publication {
  Publication(
    branch: String,
    definitions: List(Published),
    admitted: Int,
  )
}

Constructors

  • Publication(
      branch: String,
      definitions: List(Published),
      admitted: Int,
    )
pub type Published {
  Published(name: String, content_ref: String)
}

Constructors

  • Published(name: String, content_ref: String)

Values

pub fn json(publication: Publication) -> String
pub fn publish_source(
  adapter: storage.StorageAdapter,
  source: String,
  branch: String,
  untrusted: Bool,
  log_directory: String,
) -> Result(Publication, String)
pub fn publish_target_with_signature(
  adapter: storage.StorageAdapter,
  source: String,
  branch: String,
  untrusted: Bool,
  log_directory: String,
  target: option.Option(String),
  expected_signature: String,
) -> Result(Publication, String)

A target-selected request may admit helpers, but only the named target supplies the signature contract. All subjects use the same admission path.

✨ Search Document