Skip to main content

Module computation

Module computation 

Source
Expand description

Attested Computation concepts (§10).

An Attested Computation carries not just what a value means but a sanctioned way to compute it, so a consumer can confirm an agent ran the blessed computation instead of improvising its own. Provenance (§5.1) answers “where did this claim come from”; attestation answers “was this number produced the way we said it must be.”

---
type: Attested Computation
runtime: bigquery
parameters:
  - { name: year, type: integer, required: true }
executor:
  resource: references/skills/run-on-bq.md
  receipt: [job_id, executed_sql, result]
attester:
  resource: references/attesters/revenue.py
---

# Computation

    SELECT SUM(amount) AS revenue
    FROM finance.recognized_revenue
    WHERE fiscal_year = @year

This crate records and checks the contract; it never executes anything. Running the computation, producing a receipt, and running the attester over that receipt are consumer-side concerns, and the runtime artifacts they produce are explicitly not stored in the bundle (§10.5). What AttestedComputation gives you is the contract in typed form: the runtime that defines what parameters mean, the computation itself (inline or by path), and the executor/attester interfaces.

Structs§

AttestedComputation
The contract of an Attested Computation concept: its top-level frontmatter (§10.2) plus the computation itself (§10.3).
Attester
The deterministic check (§10.2).
Executor
How the computation is run (§10.2).
InlineComputation
A computation held in the body under # Computation (§10.3).
Parameter
One typed, named hole an agent may fill (§10.2).

Enums§

ComputationSource
Where the sanctioned computation lives (§10.3).

Constants§

ATTESTED_COMPUTATION_TYPE
The type value that marks a concept as an Attested Computation (§10.1).
COMPUTATION_HEADING
The conventional body heading that introduces an inline computation (§4.2).

Functions§

contract_path_candidates
Resolves a contract’s path-valued fields to bundle-relative candidates (§6.2), as (field, raw, candidates).
extract_inline_computation
Extracts the code block under a # Computation heading (§10.3).