Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package permission provides permission types compatible with Crush's interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrorPermissionDenied = &PermissionDeniedError{}
ErrorPermissionDenied is returned when a permission is denied.
Functions ¶
This section is empty.
Types ¶
type PermissionDeniedError ¶
type PermissionDeniedError struct{}
PermissionDeniedError represents a permission denied error.
func (*PermissionDeniedError) Error ¶
func (e *PermissionDeniedError) Error() string
type PermissionNotification ¶
PermissionNotification represents a permission grant/deny notification.
type PermissionRequest ¶
type PermissionRequest struct {
ID string
ToolName string
ToolCallID string
SessionID string
Description string
Arguments string
Priority string
Timeout int32
Path string // File path for file-related tools
Params any // Tool-specific parameters (type-assert to specific param type)
}
PermissionRequest represents a tool permission request.
type Service ¶
type Service interface {
SetSkipRequests(skip bool)
SkipRequests() bool
Grant(perm PermissionRequest)
GrantPersistent(perm PermissionRequest)
Deny(perm PermissionRequest)
IsGranted(toolCallID string) bool
Subscribe(ctx context.Context) <-chan pubsub.Event[PermissionRequest]
SubscribeNotifications(ctx context.Context) <-chan pubsub.Event[PermissionNotification]
AutoApproveSession(sessionID string)
}
Service defines the permission service interface.