skillpackage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package skillpackage owns the private package registry and its Core contracts. It never executes package contents or changes Runtime Worker delivery semantics.

Index

Constants

View Source
const Feature = "skill_packages.v1"
View Source
const MaxBindings = 5
View Source
const MaxPayloadBytes = 65536
View Source
const MetadataKey = "_openlinker_skill_packages"

Variables

View Source
var ErrInvalidReceipt = errors.New("invalid skill package receipt")

Functions

func CompatibleProviders

func CompatibleProviders(features []string) []string

func RecordReceipt

func RecordReceipt(ctx context.Context, tx pgx.Tx, runID, agentID uuid.UUID, event string, payload []byte) error

RecordReceipt is called only after Core's ordinary event principal, active Attempt, lease, fence and sequence checks, in that same transaction.

func Snapshot

func Snapshot(ctx context.Context, tx pgx.Tx, runID, agentID uuid.UUID) error

Snapshot uses the Run creation transaction. It never places private files in caller-visible request_metadata; only authenticated assignment queries join it.

func ValidateAssignment

func ValidateAssignment(value any, features []string) error

Types

type Bundle

type Bundle struct {
	RequiredCommands []string          `json:"required_commands"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	Files            map[string]string `json:"files"`
	CapabilityIDs    []string          `json:"capability_ids"`
	Providers        []string          `json:"providers"`
}

func ValidateImport

func ValidateImport(req ImportRequest) (Bundle, string, string, error)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(pool *pgxpool.Pool) *Handler

func (*Handler) Bind

func (h *Handler) Bind(c echo.Context) error

func (*Handler) Bindings

func (h *Handler) Bindings(c echo.Context) error

func (*Handler) Detail

func (h *Handler) Detail(c echo.Context) error

func (*Handler) Import

func (h *Handler) Import(c echo.Context) error

func (*Handler) List

func (h *Handler) List(c echo.Context) error

func (*Handler) Register

func (h *Handler) Register(api *echo.Group, auth echo.MiddlewareFunc)

func (*Handler) Unbind

func (h *Handler) Unbind(c echo.Context) error

func (*Handler) Version

func (h *Handler) Version(c echo.Context) error

type ImportRequest

type ImportRequest struct {
	RequiredCommands []string          `json:"required_commands"`
	Version          string            `json:"version"`
	Files            map[string]string `json:"files"`
	CapabilityIDs    []string          `json:"capability_ids"`
	Providers        []string          `json:"providers"`
}

type Receipt

type Receipt struct {
	Bindings  []ReceiptBinding `json:"bindings"`
	ErrorCode string           `json:"error_code,omitempty"`
}

type ReceiptBinding

type ReceiptBinding struct {
	BindingID uuid.UUID `json:"binding_id"`
	VersionID uuid.UUID `json:"version_id"`
	Digest    string    `json:"digest"`
}

type ValidationError

type ValidationError struct{ Code, Message string }

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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