caller_context_set
- Category: sessions
- Access: write
- Audience: ordinary (an ordinary user normally calls this directly)
Purpose
Annotate own caller instance with asserted runtime metadata (zero authority).
Arguments
Required: instance_id.
Optional: model, variation, workspace.
-
instance_id. Note: Caller instance id (required). -
model. Note: Model label. -
variation. Note: Variation label. -
workspace. Note: Workspace path.
Result
JSON object with instance_id and updated 1.
Boundaries
Project-scoped reads; foreign projects read empty. Caller-owned rows only where applicable.
Lifecycle / side effects
Owned upsert through a transaction; foreign instances read as not found.
Errors
Bad types are rejected (strict validator). Failures move nothing (atomic).
Example
{
"instance_id": "conn_x",
"model": "m"
}
Result shape:
{
"instance_id": "conn_x",
"updated": 1
}