bankai/rules/store

Types

pub type Artifact {
  Artifact(hash: String, name: String, approved: Bool)
}

Constructors

  • Artifact(hash: String, name: String, approved: Bool)
pub type Audit {
  Audit(
    sequence: Int,
    hash: String,
    caller: String,
    input_hash: String,
    task_id: String,
    task_hash: String,
    duration_ns: Int,
    outcome: String,
    result: String,
  )
}

Constructors

  • Audit(
      sequence: Int,
      hash: String,
      caller: String,
      input_hash: String,
      task_id: String,
      task_hash: String,
      duration_ns: Int,
      outcome: String,
      result: String,
    )

Values

pub fn append_audit(
  workspace: String,
  hash: String,
  caller: String,
  input_hash: String,
  task_id: String,
  task_hash: String,
  duration_ns: Int,
  outcome: String,
  result_text: String,
) -> Result(Int, String)
pub fn approve(
  workspace: String,
  hash: String,
) -> Result(Nil, String)
pub fn artifact_to_json(artifact: Artifact) -> json.Json
pub fn audit_to_json(audit: Audit) -> json.Json
pub fn audits(
  workspace: String,
  hash: String,
) -> Result(List(Audit), String)

Empty hash means the complete local audit stream.

pub fn get(
  workspace: String,
  hash: String,
) -> Result(#(String, String), String)
pub fn init(workspace: String) -> Result(Nil, String)
pub fn is_approved(
  workspace: String,
  hash: String,
) -> Result(Bool, String)
pub fn list(workspace: String) -> Result(List(Artifact), String)
pub fn register(
  workspace: String,
  name: String,
  source: String,
) -> Result(String, String)
pub fn reset_workspace_for_test(
  workspace: String,
) -> Result(Nil, String)

Test-only cleanup for one workspace. It never drops schemas or other rows.

pub fn revoke(
  workspace: String,
  hash: String,
) -> Result(Nil, String)
pub fn source_hash(source: String) -> String
Search Document