prompt

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KindText         = "text"
	KindFile         = "file"
	KindTemplate     = "template"
	KindTemplateFile = "template_file"
)

Variables

View Source
var (
	ErrInvalidSource    = errors.New("invalid instruction source")
	ErrUnknownWorkspace = errors.New("unknown workspace")
	ErrSourceBounds     = errors.New("instruction source exceeds bounds")
	ErrInvalidTemplate  = errors.New("invalid instruction template")
	ErrRenderBounds     = errors.New("rendered instruction exceeds bounds")
)

Functions

func NewSkillSource

func NewSkillSource(skills []FrozenSkill, selected []string) adkskill.Source

Types

type Data

type Data struct {
	Workflow     WorkflowData   `json:"Workflow"`
	Step         StepData       `json:"Step"`
	Predecessors map[string]any `json:"Predecessors"`
	Runtime      RuntimeData    `json:"Runtime"`
}

type FileSource

type FileSource struct {
	Workspace string `json:"workspace"`
	Path      string `json:"path"`
	MaxBytes  int    `json:"max_bytes"`
}

type Frozen

type Frozen struct {
	Kind           string   `json:"kind"`
	Workspace      string   `json:"workspace,omitempty"`
	Path           string   `json:"path,omitempty"`
	Source         string   `json:"source"`
	Digest         string   `json:"digest"`
	MaxSourceBytes int      `json:"max_source_bytes"`
	MaxOutputBytes int      `json:"max_output_bytes"`
	Dependencies   []string `json:"dependencies,omitempty"`
	DirectValues   []string `json:"direct_values,omitempty"`
	Rendering      string   `json:"render"`
}

func Admit

func Admit(source Source, workspaces map[string]string) (Frozen, error)

func (Frozen) Render

func (f Frozen) Render(data Data) (string, error)

type FrozenSkill

type FrozenSkill struct {
	Name      string      `json:"name"`
	Workspace string      `json:"workspace"`
	Path      string      `json:"path"`
	Digest    string      `json:"digest"`
	Files     []SkillFile `json:"files"`
}

func FreezeSkills

func FreezeSkills(requests map[string]SkillRequest, workspaces map[string]string) ([]FrozenSkill, error)

type RuntimeData

type RuntimeData struct {
	RunID   string `json:"RunID"`
	Attempt int    `json:"Attempt"`
}

type SkillFile

type SkillFile struct {
	Path    string `json:"path"`
	Content string `json:"content"`
	Digest  string `json:"digest"`
}

type SkillRequest

type SkillRequest struct {
	Workspace string
	Path      string
}

type Source

type Source struct {
	Kind           string
	Text           string
	File           FileSource
	MaxOutputBytes int
}

type StepData

type StepData struct {
	ID     string         `json:"ID"`
	Inputs map[string]any `json:"Inputs"`
}

type WorkflowData

type WorkflowData struct {
	Name   string         `json:"Name"`
	Inputs map[string]any `json:"Inputs"`
}

Jump to

Keyboard shortcuts

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