aichat

package module
v1.21.73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CobraToolFilter added in v1.21.48

type CobraToolFilter func(captools.ToolInfo) bool

type CobraToolProvider added in v1.21.48

type CobraToolProvider struct {
	// contains filtered or unexported fields
}

CobraToolProvider projects Clicky RPC operations into Captain's provider- neutral tool contract. Provider execution and transport remain in Captain.

func NewCobraToolProvider added in v1.21.48

func NewCobraToolProvider(options CobraToolProviderOptions) (*CobraToolProvider, error)

func (*CobraToolProvider) Strategies added in v1.21.59

func (p *CobraToolProvider) Strategies() []api.PermissionStrategy

func (*CobraToolProvider) ToolPolicy added in v1.21.59

func (p *CobraToolProvider) ToolPolicy() api.PermissionPolicy

ToolPolicy and Strategies are the permission model this provider was built with, for the caller to pass into captools.ResolveOptions alongside the tool set. They are returned rather than applied because resolution belongs to captain, which sees every tool source at once.

func (*CobraToolProvider) ToolSet added in v1.21.48

ToolSet builds the executable tool set. Its context is not just a cancellation handle: it is the last point at which the caller's request-scoped values are in hand, so each handler captures them (see scopedContext).

type CobraToolProviderOptions added in v1.21.48

type CobraToolProviderOptions struct {
	Root   *cobra.Command
	Filter CobraToolFilter
	// Policy and Strategies are the caller's permission model, carried to captain
	// rather than applied here. This is the seam where a command tree is handed
	// over, and so the place its authority layering is stated: Strategies derive
	// an answer for the tools no rule mentions (nil takes captain's default of
	// HTTP method, then safety hints), and Policy is the ordered rule list —
	// preset first, user last — that overrides them.
	Policy     api.PermissionPolicy
	Strategies []api.PermissionStrategy
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL