agent

package
v0.260514.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MPL-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// AgentTypeClaudeCode represents Claude Code agent
	AgentTypeClaudeCode = aiagent.AgentTypeClaudeCode

	// AgentTypeOpenCode represents OpenCode IDE extension
	AgentTypeOpenCode = aiagent.AgentTypeOpenCode

	// AgentTypeCodex represents the OpenAI Codex CLI
	AgentTypeCodex = aiagent.AgentTypeCodex
)

Re-export constants for backward compatibility

Variables

View Source
var (
	// ParseAgentType parses an agent type string, supporting aliases
	ParseAgentType = aiagent.ParseAgentType

	// ListAgentInfo returns information about all supported agent types
	ListAgentInfo = aiagent.ListAgentInfo

	// GetAgentInfo returns information about a specific agent type
	GetAgentInfo = aiagent.GetAgentInfo
)

Re-export functions for backward compatibility

View Source
var ClaudeCodeRequestModels = []string{
	"tingly/cc",
	"tingly/cc-haiku",
	"tingly/cc-sonnet",
	"tingly/cc-opus",
	"tingly/cc-default",
	"tingly/cc-subagent",
}

ClaudeCodeRequestModels defines all request models for Claude Code scenario When applying claude-code agent, all these rules should be updated for convenience

View Source
var CodexRequestModels = []string{
	"tingly-codex",
}

CodexRequestModels defines the default request models for the Codex scenario. Users typically add additional rules with their own request_model names; this list only seeds the default rule when none exists yet.

View Source
var OpenCodeRequestModels = []string{
	"tingly-opencode",
}

OpenCodeRequestModels defines all request models for OpenCode scenario

Functions

func BuildClaudeCodeEnv added in v0.260514.1

func BuildClaudeCodeEnv(baseURL, apiKey string, unified bool) map[string]string

BuildClaudeCodeEnv constructs environment variables for Claude Code. This function contains the business logic for unified vs separate mode.

func BuildClaudeCodeModelConfig added in v0.260514.1

func BuildClaudeCodeModelConfig(unified bool) aiagent.ClaudeCodeModelConfig

BuildClaudeCodeModelConfig constructs the model configuration for Claude Code. This contains the business logic for unified vs separate mode. Exported for use by HTTP handlers.

func BuildOpenCodeConfig added in v0.260514.1

func BuildOpenCodeConfig(configBaseURL, apiKey string, models map[string]interface{}) map[string]interface{}

BuildOpenCodeConfig constructs the OpenCode configuration object. This function contains the business logic for OpenCode config structure.

func CollectCodexModels added in v0.260514.1

func CollectCodexModels(rules []string) []string

CollectCodexModels deduplicates and preserves order of model names. This helper processes routing rules to extract unique model names.

Types

type AgentApply

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

AgentApply handles agent configuration with routing rules (Tingly-Box specific)

func NewAgentApply

func NewAgentApply(cfg *serverconfig.Config, host string) *AgentApply

NewAgentApply creates a new AgentApply instance

func (*AgentApply) ApplyAgent

func (aa *AgentApply) ApplyAgent(req *ApplyAgentRequest) (*ApplyAgentResult, error)

ApplyAgent applies configuration including routing rules This is the main entry point for Tingly-Box agent configuration

func (*AgentApply) RestoreAgent added in v0.260507.1

func (aa *AgentApply) RestoreAgent(req *RestoreAgentRequest) (*RestoreAgentResult, error)

RestoreAgent restores configuration files from backup

type AgentInfo

type AgentInfo = aiagent.AgentInfo

AgentInfo provides information about an agent type

type AgentType

type AgentType = aiagent.AgentType

AgentType represents the type of AI agent to configure

type ApplyAgentRequest

type ApplyAgentRequest = aiagent.ApplyAgentRequest

ApplyAgentRequest represents a request to apply agent configuration

type ApplyAgentResult

type ApplyAgentResult = aiagent.ApplyAgentResult

ApplyAgentResult represents the result of applying agent configuration

type RestoreAgentRequest added in v0.260507.1

type RestoreAgentRequest = aiagent.RestoreAgentRequest

RestoreAgentRequest represents a request to restore agent configuration

type RestoreAgentResult added in v0.260507.1

type RestoreAgentResult = aiagent.RestoreAgentResult

RestoreAgentResult represents the result of restoring agent configuration

Jump to

Keyboard shortcuts

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