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 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.
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
}
Click to show internal directories.
Click to hide internal directories.