Context identity ADTs for channel isolation.
Two value objects + two pure projection functions. All channel buffers (memory, catchup, async, hivemind) derive their keys from these types — eliminates ad-hoc string construction.
SRP: Pure domain logic, no I/O. Follows kanban/domain.clj precedent.
Context identity ADTs for channel isolation. Two value objects + two pure projection functions. All channel buffers (memory, catchup, async, hivemind) derive their keys from these types — eliminates ad-hoc string construction. SRP: Pure domain logic, no I/O. Follows kanban/domain.clj precedent.
(->caller-id kw__1777__auto__)Coerce a keyword to a CallerId variant (no data fields). Returns nil if keyword is not a valid variant.
Coerce a keyword to a CallerId variant (no data fields). Returns nil if keyword is not a valid variant.
(->project-scope kw__1777__auto__)Coerce a keyword to a ProjectScope variant (no data fields). Returns nil if keyword is not a valid variant.
Coerce a keyword to a ProjectScope variant (no data fields). Returns nil if keyword is not a valid variant.
(caller-id variant-kw__1774__auto__)(caller-id variant-kw__1774__auto__ data__1775__auto__)Construct a CallerId variant. (caller-id variant-keyword) for enum variants (caller-id variant-keyword data-map) for data variants
Throws ex-info for unknown variants.
Construct a CallerId variant. (caller-id variant-keyword) for enum variants (caller-id variant-keyword data-map) for data variants Throws ex-info for unknown variants.
(caller-id-key cid)Derive session-scoped buffer key from caller only. For piggyback channels where one session = one project.
Derive session-scoped buffer key from caller only. For piggyback channels where one session = one project.
(caller-id-string caller-id)Extract the raw string from a CallerId ADT.
Extract the raw string from a CallerId ADT.
(caller-id? x__1776__auto__)True if x is a CallerId ADT value.
True if x is a CallerId ADT value.
Caller identity — who is making the MCP request. Extracted from _caller_id (CLAUDE_SWARM_SLAVE_ID).
Caller identity — who is making the MCP request. Extracted from _caller_id (CLAUDE_SWARM_SLAVE_ID).
(make-buffer-key cid pscope)Derive buffer key vector from caller + scope. Canonical key for ALL channel buffers.
Derive buffer key vector from caller + scope. Canonical key for ALL channel buffers.
(make-piggyback-agent-id cid pscope)Derive piggyback agent ID string from caller + scope. Used for scoped piggyback channel identification.
Derive piggyback agent ID string from caller + scope. Used for scoped piggyback channel identification.
(parse-caller-id raw)Coerce raw _caller_id string to CallerId ADT. nil or "coordinator" → :caller/coordinator.
Coerce raw _caller_id string to CallerId ADT. nil or "coordinator" → :caller/coordinator.
(parse-project-scope raw)Coerce raw project-id string to ProjectScope ADT. nil → :project/global.
Coerce raw project-id string to ProjectScope ADT. nil → :project/global.
(project-scope variant-kw__1774__auto__)(project-scope variant-kw__1774__auto__ data__1775__auto__)Construct a ProjectScope variant. (project-scope variant-keyword) for enum variants (project-scope variant-keyword data-map) for data variants
Throws ex-info for unknown variants.
Construct a ProjectScope variant. (project-scope variant-keyword) for enum variants (project-scope variant-keyword data-map) for data variants Throws ex-info for unknown variants.
(project-scope-string project-scope)Extract the raw string from a ProjectScope ADT (nil for global).
Extract the raw string from a ProjectScope ADT (nil for global).
(project-scope? x__1776__auto__)True if x is a ProjectScope ADT value.
True if x is a ProjectScope ADT value.
Project scope — which project context the request targets.
Project scope — which project context the request targets.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |