API referenceInstance API
GUIDE & REFERENCE

Cambium

Every registered cambium instance operation, with source-derived inputs, outputs, access policy, and errors.

This reference covers 2 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.

MethodPathOperation
POST/v1/cambium/projectionsCambium projection ingest
POST/v1/advice/tools:rankCambium tool advisor rank

POST /v1/cambium/projections

Cambium projection ingest

AvailabilitySource contract
Registrationalways registered
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Global auth bypass; this handler performs Cambium-specific caller authentication.

Request

JsonCambiumProjectionEnvelope

FieldRust typeRequired on inputNotes
projectionIdStringYes
targetStringYes
sinkIdStringYes
projectionClassStringYes
sourceEventIdStringYes
streamIdStringYes
sequenceu64Yes
globalSequenceu64Yes
traceIdOption<String>No; optional or defaulted
spanIdOption<String>No; optional or defaulted
scopeValueYes
lineageValueYes
dataClassStringYes
redactionProfileStringYes
sourcePayloadHashStringYes
evidenceRefsVec<String>No; optional or defaultedSerde: default
activitySummaryOption<String>No; optional or defaulted
toolIdOption<String>No; optional or defaulted
toolScoreSampleOption<Value>No; optional or defaultedSerde: rename = "toolScoreSample", default
derivedboolYes
createdAtStringYes
struct CambiumProjectionEnvelope {
    projection_id: String,
    target: String,
    sink_id: String,
    projection_class: String,
    source_event_id: String,
    stream_id: String,
    sequence: u64,
    global_sequence: u64,
    trace_id: Option<String>,
    span_id: Option<String>,
    scope: Value,
    lineage: Value,
    data_class: String,
    redaction_profile: String,
    source_payload_hash: String,
    #[serde(default)]
    evidence_refs: Vec<String>,
    activity_summary: Option<String>,
    tool_id: Option<String>,
    #[serde(rename = "toolScoreSample", default)]
    _tool_score_sample: Option<Value>,
    derived: bool,
    created_at: String,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

json!({
            "accepted": true,
            "projectionId": summary.projection_id,
            "projectionClass": summary.projection_class,
            "sourceEventId": summary.source_event_id,
            "akashaNamespace": summary.akasha_namespace
        })

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Explicit status constants: ACCEPTED.

Source: akasha-daemon/src/cambium.rs:259. Registration: akasha-daemon/src/main.rs:4362.

POST /v1/advice/tools:rank

Cambium tool advisor rank

AvailabilitySource contract
Registrationalways registered
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Global auth bypass; this handler performs Cambium-specific caller authentication.

Request

JsonToolAdvisorRankRequest

FieldRust typeRequired on inputNotes
taskClassOption<String>No; optional or defaulted
taskIntentOption<String>No; optional or defaulted
scopeValueYes
sourceEventIdStringYes
runIdOption<String>No; optional or defaulted
candidatesVec<String>No; optional or defaultedSerde: default
policySourceRefOption<String>No; optional or defaulted
struct ToolAdvisorRankRequest {
    task_class: Option<String>,
    task_intent: Option<String>,
    scope: Value,
    source_event_id: String,
    run_id: Option<String>,
    #[serde(default)]
    candidates: Vec<String>,
    policy_source_ref: Option<String>,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

json!({
        "recommendationId": format!("akasha_tool_advisor_{}", sanitize_identifier(&req.source_event_id)),
        "taskClass": req.task_class,
        "taskIntent": req.task_intent,
        "sourceEventId": req.source_event_id,
        "runId": req.run_id,
        "scope": req.scope,
        "rankedTools": ranked_tools,
        "evidenceRefs": event_projections
            .iter()
            .flat_map(|projection| projection.evidence_refs.clone())
            .chain(std::iter::once(req.source_event_id))
            .collect::<Vec<_>>(),
        "policy": {
            "sourceRef": req.policy_source_ref.unwrap_or_else(|| "akasha://policy/default".to_string()),
            "deniedTools": denied_tools
        }
    })

Errors and validation

Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/cambium.rs:278. Registration: akasha-daemon/src/main.rs:4366.

On this page