Documentation ¶
Overview ¶
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
- Variables
- func AutodevDebugError(autodev_config *autodev.AutodevConfig)
- func AutodevEntrypoint(cmd *cobra.Command, args []string)
- func CleanupDocker(dockerfile_path string) error
- func Compile(args []string)
- func ControlCreateAgent(control_config *ControlConfig, args []string)
- func ControlPost(control_config *ControlConfig, args []string)
- func DoGoUpdate() error
- func DoPythonUpdate() error
- func Execute()
- func GenerateControllerConfig(cmd *cobra.Command, args []string)
- func GenerateCoreUtils(cmd *cobra.Command, args []string)
- func GenerateEntrypoint(cmd *cobra.Command, args []string)
- func GenerateGoAgent(cmd *cobra.Command, args []string, config *GenerateConfig)
- func GeneratePythonAgent(cmd *cobra.Command, args []string, config *GenerateConfig)
- func GetRunnerName() string
- func Green(in string) string
- func HasSpec(agent_dir string) bool
- func ImageExists(dockerfile_path string) (exists bool, err error)
- func ParseDockerfileDependencies(config *autodev.AutodevConfig, ctx context.Context, ...) ([]string, []string, error)
- func ParsePythonScriptImports(config *autodev.AutodevConfig, ctx context.Context, ...) ([]string, error)
- func PromptYesNo(message string) bool
- func Red(in string) string
- func Run(args []string)
- func StartMAS(args []string)
- func StartRunner(args []string)
- func StartServer(cmd *cobra.Command, args []string)
- func UpdateDockerfile(config *autodev.AutodevConfig, ctx context.Context, ...) error
- func UsesMamba(dockerfile string) bool
- type CompileFunc
- type CompileResult
- type CompileStatus
- type CompileType
- type ControlConfig
- type GenerateConfig
Constants ¶
This section is empty.
Variables ¶
var ( RUNNER_type string RUNNER_name string RUNNER_data_root string )
var GLOBAL_control_user string
TODO: This is context that needs to be passed down to the subcommands, for now, I'm working on something else and just need the functionality, but I'm sure there is a more correct way to do this.
var UpdateConfig = struct { do_python bool do_core_tool bool accept_prerelease bool }{}
var VERSION_string string
Functions ¶
func AutodevDebugError ¶
func AutodevDebugError(autodev_config *autodev.AutodevConfig)
func AutodevEntrypoint ¶
func CleanupDocker ¶
func ControlCreateAgent ¶
func ControlCreateAgent(control_config *ControlConfig, args []string)
func ControlPost ¶
func ControlPost(control_config *ControlConfig, args []string)
func DoGoUpdate ¶
func DoGoUpdate() error
func DoPythonUpdate ¶
func DoPythonUpdate() error
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GenerateCoreUtils ¶
GenerateCoreUtils creates a core utilities directory for the Python client API in the core project directory.
func GenerateEntrypoint ¶
GenerateEntrypoint runs the Usage function when a subcommand is not used with `core generate`.
func GenerateGoAgent ¶
func GenerateGoAgent(cmd *cobra.Command, args []string, config *GenerateConfig)
GenerateGoAgent creates a new standalone Go agent in the core project directory.
func GeneratePythonAgent ¶
func GeneratePythonAgent(cmd *cobra.Command, args []string, config *GenerateConfig)
GeneratePython agent creates a new Python agent in the core project directory.
func GetRunnerName ¶
func GetRunnerName() string
func ImageExists ¶
func ParseDockerfileDependencies ¶
func ParseDockerfileDependencies(config *autodev.AutodevConfig, ctx context.Context, model *genai.GenerativeModel, dockerfile_code string) ([]string, []string, error)
ParseDockerfileDependencies parses all system and Python dependencies.
func ParsePythonScriptImports ¶
func ParsePythonScriptImports(config *autodev.AutodevConfig, ctx context.Context, model *genai.GenerativeModel, python_code string) ([]string, error)
ParsePythonScriptImports parses all Python-based agent code and extracts imported packages.
func PromptYesNo ¶
func Run ¶
func Run(args []string)
Run runs agents in a core project. It supports Python and Go agents.
func StartRunner ¶
func StartRunner(args []string)
func StartServer ¶
StartServer launches a core blackboard server on a specified address.
func UpdateDockerfile ¶
func UpdateDockerfile(config *autodev.AutodevConfig, ctx context.Context, model *genai.GenerativeModel, path string, py_deps []string) error
UpdateDockerfile updates the pip install portion of a Dockerfile and saves to disk.
NOTE: As of right now, only Python packages need to be handled by UpdateDockerfile, and we assume the user isn't using micromamba/conda to manage their dependencies. If they are, we put the onus of dependency management back onto the user. This seems to be fair because we are handling the most basic use-case: a call to pip install from the Dockerfile, which is likely how a lay-user would initially attempt to write their Dockerfile.
Types ¶
type CompileFunc ¶
type CompileFunc func() CompileResult
func GetCompileFunction ¶
func GetCompileFunction(agent_dir_name string) CompileFunc
NOTE: Every agent will determine what compilation to run via this function. All heuristics for determining what sort of agent we're trying to compile must go here. In no uncertain terms: docker should be the preferred approach for all agents eventually. This function essentially enforces the opinions of the developers (John and Josh) about what best practices are for agents. We return functions here to give more control over how and where they are called (i.e. allow for easy calling inside of a goroutine)
type CompileResult ¶
type CompileResult struct { Type CompileType Status CompileStatus BuildContext string // using docker terminology here, but this just means the root build directory Error error BuildMessage string // Summary of what happened and how to get help (if needed) Stdout []byte Stderr []byte }
func CompileDocker ¶
func CompileDocker(dockerfile_path string) (compile_result CompileResult)
CompileDocker builds a Docker image for the agent on the current machine
func CompileGo ¶
func CompileGo(project_path string) CompileResult
func CompilePython ¶
func CompilePython() CompileResult
func SkipCompile ¶
func SkipCompile(message string) CompileResult
func (CompileResult) TableHeader ¶
func (c CompileResult) TableHeader() string
func (CompileResult) TableString ¶
func (c CompileResult) TableString() string
type CompileStatus ¶
type CompileStatus int
NOTE: Compiler functions. Adding new compilation mechanisms should be done here.
const ( CompileStatusSuccess CompileStatus = iota CompileStatusFailure )
func (CompileStatus) String ¶
func (i CompileStatus) String() string
type CompileType ¶
type CompileType int
NOTE: Compiler functions. Adding new compilation mechanisms should be done here.
const ( CompileTypeSkipped CompileType = iota CompileTypeDocker CompileTypeGo CompileTypePython )
func (CompileType) String ¶
func (i CompileType) String() string
type ControlConfig ¶
type ControlConfig struct {
// contains filtered or unexported fields
}
ControlConfig is a convenience structure for the control command. NOTE: I think we may still occasionally a more global configuration structure. In this case, there's context that we want to ensure that the subcommands have (such as if the control user wants to set a specific username other than )
type GenerateConfig ¶
Source Files ¶
- autodev.go
- autodev_debug.go
- autodev_dockerfile.go
- colors.go
- compile.go
- compile_docker.go
- compilestatus_string.go
- compiletype_string.go
- config.go
- control.go
- control_createagent.go
- control_hacf.go
- control_halt.go
- control_post.go
- generate.go
- generate_controllerconfig.go
- generate_coreutils.go
- generate_goagent.go
- generate_pythonagent.go
- init.go
- pull.go
- push.go
- registry.go
- root.go
- run.go
- start.go
- start_chat.go
- start_mas.go
- start_network_benchmark.go
- start_ping.go
- start_pong.go
- start_registry.go
- start_runner.go
- start_server.go
- start_slipnet_notify.go
- update.go
- version.go
Directories ¶
Path | Synopsis |
---|---|
A simple agent that notices blackboard changing
|
A simple agent that notices blackboard changing |
client-apis
|
|
This is intended to be a light wrapper to make automatically loading context easier to configure with yaml or json
|
This is intended to be a light wrapper to make automatically loading context easier to configure with yaml or json |