Class: SolidLoop::Mcp::CallContext
- Inherits:
-
Struct
- Object
- Struct
- SolidLoop::Mcp::CallContext
- Defined in:
- lib/solid_loop/mcp/call_context.rb
Overview
Caller identity handed to Transport#deliver. HTTP transports typically ignore it (auth travels in headers); in-process transports use it to reach domain state without a network hop.
Two caller shapes (see docs/decisions/mcp-server.md):
in-process agent — agent/loop set, principal from Base#mcp_principal
external via Server — agent/loop nil, principal = authorizer's return
Handlers must not assume agent/loop are present.
idempotency_key: stable per-ToolCall key for tools/call dispatches (nil
for non-tool traffic such as initialize/list). It also travels on the
wire as _meta["solidloop/idempotencyKey"]; handlers of irreversible
tools should dedupe on it because a crash between a remote side effect
and SolidLoop's executed_at checkpoint can re-deliver the invocation.
Instance Attribute Summary collapse
-
#agent ⇒ Object
Returns the value of attribute agent.
-
#idempotency_key ⇒ Object
Returns the value of attribute idempotency_key.
-
#loop ⇒ Object
Returns the value of attribute loop.
-
#principal ⇒ Object
Returns the value of attribute principal.
Instance Attribute Details
#agent ⇒ Object
Returns the value of attribute agent
17 18 19 |
# File 'lib/solid_loop/mcp/call_context.rb', line 17 def agent @agent end |
#idempotency_key ⇒ Object
Returns the value of attribute idempotency_key
17 18 19 |
# File 'lib/solid_loop/mcp/call_context.rb', line 17 def idempotency_key @idempotency_key end |
#loop ⇒ Object
Returns the value of attribute loop
17 18 19 |
# File 'lib/solid_loop/mcp/call_context.rb', line 17 def loop @loop end |
#principal ⇒ Object
Returns the value of attribute principal
17 18 19 |
# File 'lib/solid_loop/mcp/call_context.rb', line 17 def principal @principal end |