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.
| Method | Path | Operation |
|---|---|---|
POST | /v1/cambium/projections | Cambium projection ingest |
POST | /v1/advice/tools:rank | Cambium tool advisor rank |
POST /v1/cambium/projections
Cambium projection ingest
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Global auth bypass; this handler performs Cambium-specific caller authentication.
Request
Json — CambiumProjectionEnvelope
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
projectionId | String | Yes | |
target | String | Yes | |
sinkId | String | Yes | |
projectionClass | String | Yes | |
sourceEventId | String | Yes | |
streamId | String | Yes | |
sequence | u64 | Yes | |
globalSequence | u64 | Yes | |
traceId | Option<String> | No; optional or defaulted | |
spanId | Option<String> | No; optional or defaulted | |
scope | Value | Yes | |
lineage | Value | Yes | |
dataClass | String | Yes | |
redactionProfile | String | Yes | |
sourcePayloadHash | String | Yes | |
evidenceRefs | Vec<String> | No; optional or defaulted | Serde: default |
activitySummary | Option<String> | No; optional or defaulted | |
toolId | Option<String> | No; optional or defaulted | |
toolScoreSample | Option<Value> | No; optional or defaulted | Serde: rename = "toolScoreSample", default |
derived | bool | Yes | |
createdAt | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Global auth bypass; this handler performs Cambium-specific caller authentication.
Request
Json — ToolAdvisorRankRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
taskClass | Option<String> | No; optional or defaulted | |
taskIntent | Option<String> | No; optional or defaulted | |
scope | Value | Yes | |
sourceEventId | String | Yes | |
runId | Option<String> | No; optional or defaulted | |
candidates | Vec<String> | No; optional or defaulted | Serde: default |
policySourceRef | Option<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.