render

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValidEnv      = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$")
	InvalidEnv    = regexp.MustCompile("^(OBOT|GPTSCRIPT|KNOW)")
	ValidImage    = regexp.MustCompile("^[a-zA-Z0-9_][a-zA-Z0-9_.-:/]*$")
	ValidToolType = regexp.MustCompile("^(container|script|javascript|python)$")
)
View Source
var DefaultAgentParams = []string{
	"message", "Message to send",
}

Functions

func CustomTool added in v0.5.0

func CustomTool(ctx context.Context, c client.Client, tool v1.Tool) (toolDefs []gptscript.ToolDef, _ error)

func IsExternalTool

func IsExternalTool(tool string) bool

func IsValidEnv added in v0.7.1

func IsValidEnv(env string) error

func IsValidImage added in v0.7.1

func IsValidImage(image string) error

func IsValidToolType added in v0.7.1

func IsValidToolType(toolType types.ToolType) error

func OAuthAppEnv

func OAuthAppEnv(ctx context.Context, db kclient.Client, oauthAppNames []string, thread *v1.Thread, namespace, serverURL string) (extraEnv []string, _ error)

func ResolveToolReference

func ResolveToolReference(ctx context.Context, c kclient.Client, toolRefType types.ToolReferenceType, ns, name string) (string, error)

Types

type AgentOptions

type AgentOptions struct {
	Thread          *v1.Thread
	WorkflowStepID  string
	UserID          string
	UserIsAdmin     bool
	IgnoreMCPErrors bool
}

type RenderedAgent added in v0.11.0

type RenderedAgent struct {
	Tools     []gptscript.ToolDef
	Env       []string
	MCPErrors []string
}

func Agent

func Agent(ctx context.Context, tokenService *ephemeral.TokenService, mcpSessionManager *mcp.SessionManager, db kclient.Client, agent *v1.Agent, serverURL string, opts AgentOptions) (RenderedAgent, error)

type WorkflowOptions

type WorkflowOptions struct {
	Step             *types.Step
	ManifestOverride *types.WorkflowManifest
	Input            string
}

Jump to

Keyboard shortcuts

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