Documentation
¶
Overview ¶
Package ark provides shared utilities for the ark CLI.
Index ¶
- func InlineFileRefs(data []byte, baseDir string) ([]byte, error)
- func LoadFile(path string) ([]*arkonisv1alpha1.ArkTeam, map[string]*arkonisv1alpha1.ArkAgent, error)
- func ParseDocs(data []byte) ([]*arkonisv1alpha1.ArkTeam, map[string]*arkonisv1alpha1.ArkAgent, error)
- type FileRefConfigMap
- type RawDoc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InlineFileRefs ¶
InlineFileRefs walks raw multi-document YAML and resolves every systemPromptRef.fileRef.path relative to baseDir. The file content replaces the systemPromptRef block as an inline systemPrompt field.
Used by ark run and ark validate — no ConfigMap or cluster required. If any referenced file does not exist, an error is returned immediately.
func LoadFile ¶
func LoadFile(path string) ([]*arkonisv1alpha1.ArkTeam, map[string]*arkonisv1alpha1.ArkAgent, error)
LoadFile reads a multi-document YAML file and returns all ArkTeam (pipeline mode) and ArkAgent resources it contains. Unknown kinds are silently skipped — this matches the behaviour of kubectl apply -f.
func ParseDocs ¶
func ParseDocs(data []byte) ([]*arkonisv1alpha1.ArkTeam, map[string]*arkonisv1alpha1.ArkAgent, error)
ParseDocs parses raw multi-document YAML bytes into ArkTeam and ArkAgent objects. Exported so callers can parse in-memory YAML without a file (e.g. tests).
Types ¶
type FileRefConfigMap ¶
type FileRefConfigMap struct {
Name string // e.g. "my-team-researcher-prompt"
Key string // data key inside the ConfigMap — always "prompt"
Content string // full file content
SourcePath string // absolute path of the source file (for annotation)
ContentHash string // "sha256:" + first 16 hex chars (for change detection)
}
FileRefConfigMap describes a ConfigMap to be created for a fileRef resolution. Used by ark deploy to materialise fileRef prompts as cluster objects.
func ExtractFileRefs ¶
func ExtractFileRefs(data []byte, baseDir string) ([]byte, []FileRefConfigMap, error)
ExtractFileRefs walks raw multi-document YAML and resolves every systemPromptRef.fileRef.path relative to baseDir. Each fileRef is rewritten to a configMapKeyRef pointing at a generated ConfigMap.
Returns the rewritten YAML and the ConfigMap descriptors; callers must apply the ConfigMaps before applying the rewritten resources. Used by ark deploy.
func (FileRefConfigMap) ToYAML ¶
func (f FileRefConfigMap) ToYAML() []byte
ToYAML returns a serialised ConfigMap manifest ready to pipe to kubectl apply.
type RawDoc ¶
RawDoc is a single YAML document with its kind field extracted. Used by ark deploy to sort resources before applying.
func SplitRawDocs ¶
SplitRawDocs splits multi-document YAML into individual documents, extracting the kind field from each so callers can sort before applying.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package local provides a flow/team executor that runs pipeline steps directly in the current process — no Kubernetes cluster or Redis required.
|
Package local provides a flow/team executor that runs pipeline steps directly in the current process — no Kubernetes cluster or Redis required. |