Documentation
¶
Index ¶
- func ToolRequestWasAttempted(err error) bool
- func WithToolCallID(ctx context.Context, toolCallID string) context.Context
- func WithToolIdempotencyKey(ctx context.Context, key string) context.Context
- type ToolExecutionError
- type ToolExecutor
- func (e *ToolExecutor) Execute(ctx context.Context, tool *corev1alpha1.Tool, args json.RawMessage) (result string, err error)
- func (e *ToolExecutor) SetAuthSecretValue(name, key, value string)
- func (e *ToolExecutor) SetTransactionAuthority(token string, scopes []string)
- func (e *ToolExecutor) SetTransactionCredentialAuthority(enforced, allowed bool, secret string)
- func (e *ToolExecutor) SetTransactionExchangeConfig(config *TransactionExchangeConfig)
- type ToolRequestAttemptedError
- type TransactionExchangeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToolRequestWasAttempted ¶
ToolRequestWasAttempted reports whether err happened after the custom tool send path began.
func WithToolCallID ¶
WithToolCallID records the model provider's tool-call id for Tool CRD span metadata.
Types ¶
type ToolExecutionError ¶ added in v0.2.0
type ToolExecutionError struct {
Err error
}
ToolExecutionError reports a failure returned by an admitted tool call. Authorization, transport, cancellation, and malformed-response errors do not carry this marker. Callers must not expose its upstream diagnostic as an MCP result without applying their own disclosure policy.
func (ToolExecutionError) Error ¶ added in v0.2.0
func (e ToolExecutionError) Error() string
func (ToolExecutionError) Unwrap ¶ added in v0.2.0
func (e ToolExecutionError) Unwrap() error
type ToolExecutor ¶
type ToolExecutor struct {
// contains filtered or unexported fields
}
ToolExecutor handles execution of custom Tool CRDs via HTTP or MCP-over-HTTP.
func NewToolExecutor ¶
func NewToolExecutor() *ToolExecutor
NewToolExecutor creates a new tool executor
func NewToolExecutorForNamespace ¶
func NewToolExecutorForNamespace(namespace string, k8sClient kubernetes.Interface, httpClient *http.Client, resolvers ...outboundaccess.Resolver) *ToolExecutor
NewToolExecutorForNamespace creates a Tool CRD executor with explicit dependencies. Controller-side brokered AgentRuntime tool execution uses this path so Orka, not the remote backend, resolves tool credentials.
func (*ToolExecutor) Execute ¶
func (e *ToolExecutor) Execute(ctx context.Context, tool *corev1alpha1.Tool, args json.RawMessage) (result string, err error)
Execute executes a Tool CRD by making an HTTP request.
func (*ToolExecutor) SetAuthSecretValue ¶
func (e *ToolExecutor) SetAuthSecretValue(name, key, value string)
SetAuthSecretValue supplies an exact task-scoped Tool auth Secret snapshot.
func (*ToolExecutor) SetTransactionAuthority ¶
func (e *ToolExecutor) SetTransactionAuthority(token string, scopes []string)
SetTransactionAuthority sets task-scoped transaction authority. Calling it with an empty token intentionally disables fallback to process-global files.
func (*ToolExecutor) SetTransactionCredentialAuthority ¶
func (e *ToolExecutor) SetTransactionCredentialAuthority(enforced, allowed bool, secret string)
SetTransactionCredentialAuthority sets immutable Task authorization for outbound credentials.
func (*ToolExecutor) SetTransactionExchangeConfig ¶
func (e *ToolExecutor) SetTransactionExchangeConfig(config *TransactionExchangeConfig)
SetTransactionExchangeConfig supplies controller-resolved TTS settings.
type ToolRequestAttemptedError ¶
type ToolRequestAttemptedError struct {
Err error
}
ToolRequestAttemptedError wraps errors that occur after a custom tool request may already have reached the remote endpoint.
func (ToolRequestAttemptedError) Error ¶
func (e ToolRequestAttemptedError) Error() string
func (ToolRequestAttemptedError) Unwrap ¶
func (e ToolRequestAttemptedError) Unwrap() error
type TransactionExchangeConfig ¶
type TransactionExchangeConfig struct {
TTS contexttoken.TTSConfig
Exchanger contexttoken.Exchanger
SubjectTokenType string
OutboundScope string
}
TransactionExchangeConfig carries controller-resolved TTS settings for brokered Tool execution, where worker environment variables are unavailable.