declarative

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDockerAvailable

func CheckDockerAvailable() error

CheckDockerAvailable returns nil if docker is reachable, or an error. Exported for use in tests.

func InjectArctlLabels

func InjectArctlLabels(yamlPath string) ([]byte, error)

InjectArctlLabels reads the v1alpha1 envelope at yamlPath and, if a sibling arctl.yaml exists with framework+language, injects matching arctl.dev/* labels into metadata.labels for buildable kinds (Agent, MCPServer). Other kinds and files without an arctl.yaml sibling pass through unchanged.

Multi-document YAML files are supported: each document is patched independently, then re-emitted as a single multi-doc stream.

func LoadDotEnv

func LoadDotEnv(projectDir string) (map[string]string, error)

LoadDotEnv reads .env from projectDir if present. Missing file is not an error.

func ModelProviderEnvKeys

func ModelProviderEnvKeys(provider string) []string

ModelProviderEnvKeys returns the env keys an Agent of the given provider requires. Unknown providers return nil — arctl validates nothing extra and the runtime errors when constructing the model client. The escape hatch supports custom shims and providers added to templates ahead of this map.

func NewApplyCmd

func NewApplyCmd(deps cliruntime.Deps) *cobra.Command

NewApplyCmd returns a new "apply" cobra command. Each call creates an independent command with its own flag state, which is required for testing since cobra flags accumulate across Execute() calls on the same command instance.

func NewBuildCmd

func NewBuildCmd(deps cliruntime.Deps) *cobra.Command

NewBuildCmd returns a new "build" cobra command.

func NewDeleteCmd

func NewDeleteCmd(deps cliruntime.Deps) *cobra.Command

func NewExtensionKind

func NewExtensionKind(k ExtensionKind) *scheme.Kind

NewExtensionKind converts a downstream extension kind into CLI dispatch metadata without mutating the package-global kind registry.

func NewGetCmd

func NewGetCmd(deps cliruntime.Deps) *cobra.Command

NewGetCmd returns a new "get" cobra command.

func NewInitCmd

func NewInitCmd(deps cliruntime.Deps) *cobra.Command

NewInitCmd returns a new "init" cobra command.

func NewPullCmd

func NewPullCmd(deps cliruntime.Deps) *cobra.Command

func NewRunCmd

func NewRunCmd(_ cliruntime.Deps) *cobra.Command

NewRunCmd returns a new "run" cobra command.

func NewWaitCmd

func NewWaitCmd(deps cliruntime.Deps) *cobra.Command

NewWaitCmd returns a new "wait" cobra command.

func RegisterExtensionKind

func RegisterExtensionKind(k ExtensionKind)

RegisterExtensionKind registers a downstream v1alpha1 kind with the declarative get/list/delete commands. Apply/delete -f only need the v1alpha1.Default scheme registration; this hook covers explicit CLI commands like `arctl get accesspolicy NAME`.

func ValidateRequiredEnv

func ValidateRequiredEnv(env map[string]string, extraEnv, required []string) error

ValidateRequiredEnv returns an error listing every required key not in any of: .env file map, --env CLI overrides, or the process env. Empty string values are treated as missing — `arctl init` writes a `.env` with empty placeholders, and an unfilled placeholder is not a satisfied var.

extraEnv is the slice of `KEY=VALUE` strings from `--env`/`-e` flags, the same shape mergeEnv consumes.

Types

type ExtensionKind

type ExtensionKind struct {
	Name          string
	Plural        string
	CanonicalKind string
	Aliases       []string
	TableColumns  []scheme.Column
	NewObject     func() v1alpha1.Object
	Row           func(v1alpha1.Object) []string
}

ExtensionKind describes a downstream v1alpha1 kind that should participate in the generic declarative CLI get/list/delete dispatch.

Directories

Path Synopsis
Package chat is the interactive A2A chat TUI launched after `arctl run` brings an agent up.
Package chat is the interactive A2A chat TUI launched after `arctl run` brings an agent up.
Package inspector launches MCP Inspector as a subprocess.
Package inspector launches MCP Inspector as a subprocess.
Package mcpresolve turns a catalog MCPServer ref (name + tag) into a ResolvedMCP describing the URL and headers (if remote) the caller should wire into local-dev .env.
Package mcpresolve turns a catalog MCPServer ref (name + tag) into a ResolvedMCP describing the URL and headers (if remote) the caller should wire into local-dev .env.

Jump to

Keyboard shortcuts

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