Documentation
¶
Index ¶
- Constants
- Variables
- func BuildClaudeCodeEnv(baseURL, apiKey string, unified bool) map[string]string
- func BuildClaudeCodeModelConfig(unified bool) aiagent.ClaudeCodeModelConfig
- func BuildOpenCodeConfig(configBaseURL, apiKey string, models map[string]interface{}) map[string]interface{}
- func CollectCodexModels(rules []string) []string
- type AgentApply
- type AgentInfo
- type AgentType
- type ApplyAgentRequest
- type ApplyAgentResult
- type RestoreAgentRequest
- type RestoreAgentResult
Constants ¶
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 ¶
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
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
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.
var OpenCodeRequestModels = []string{
"tingly-opencode",
}
OpenCodeRequestModels defines all request models for OpenCode scenario
Functions ¶
func BuildClaudeCodeEnv ¶ added in v0.260514.1
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
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 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