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
- Variables
- func ArchiveDirectory(name string, packageID uuid.UUID) string
- func BuildArchive(directory string, files map[string]string) ([]byte, error)
- func CompatibleProviders(features []string) []string
- func RecordReceipt(ctx context.Context, tx pgx.Tx, runID, agentID uuid.UUID, event string, ...) error
- func Snapshot(ctx context.Context, tx pgx.Tx, runID, agentID uuid.UUID) error
- func ValidateAssignment(value any, features []string) error
- type Bundle
- type Handler
- func (h *Handler) Bind(c echo.Context) error
- func (h *Handler) Bindings(c echo.Context) error
- func (h *Handler) Detail(c echo.Context) error
- func (h *Handler) Import(c echo.Context) error
- func (h *Handler) ImportPublished(c echo.Context) error
- func (h *Handler) List(c echo.Context) error
- func (h *Handler) PublicArchive(c echo.Context) error
- func (h *Handler) PublicBundle(c echo.Context) error
- func (h *Handler) PublicDetail(c echo.Context) error
- func (h *Handler) PublicFile(c echo.Context) error
- func (h *Handler) PublicList(c echo.Context) error
- func (h *Handler) PublicVersion(c echo.Context) error
- func (h *Handler) Publish(c echo.Context) error
- func (h *Handler) Register(api *echo.Group, auth echo.MiddlewareFunc)
- func (h *Handler) RegisterPublic(api *echo.Group)
- func (h *Handler) SetVisibility(c echo.Context) error
- func (h *Handler) Unbind(c echo.Context) error
- func (h *Handler) Version(c echo.Context) error
- func (h *Handler) Withdraw(c echo.Context) error
- type ImportRequest
- type Receipt
- type ReceiptBinding
- type ValidationError
Constants ¶
const Feature = "skill_packages.v1"
const MaxBindings = 5
const MaxPayloadBytes = 65536
const MetadataKey = "_openlinker_skill_packages"
Variables ¶
var ErrInvalidReceipt = errors.New("invalid skill package receipt")
Functions ¶
func ArchiveDirectory ¶ added in v0.4.0
func BuildArchive ¶ added in v0.4.0
BuildArchive writes only the package files, sorted, stored uncompressed and with fixed metadata so identical versions produce identical bytes.
func CompatibleProviders ¶
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 ¶
Snapshot uses the Run creation transaction. It never places private files in caller-visible request_metadata; only authenticated assignment queries join it.
func ValidateAssignment ¶
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 (*Handler) ImportPublished ¶ added in v0.4.0
ImportPublished creates the caller's own private copy of a published version. Exact stored bytes are copied after re-validation; the copy keeps provenance IDs but no foreign key, so later withdrawal never affects it. Retrying the same source version returns the existing copy with 200.
func (*Handler) PublicArchive ¶ added in v0.4.0
func (*Handler) PublicBundle ¶ added in v0.4.0
PublicBundle returns the exact stored bytes so `sha256sum` matches digest. It is an archival/verification format, not an owner import request.
func (*Handler) PublicVersion ¶ added in v0.4.0
func (*Handler) RegisterPublic ¶ added in v0.4.0
func (*Handler) SetVisibility ¶ added in v0.4.0
type ImportRequest ¶
type Receipt ¶
type Receipt struct {
Bindings []ReceiptBinding `json:"bindings"`
ErrorCode string `json:"error_code,omitempty"`
}
type ReceiptBinding ¶
type ValidationError ¶
type ValidationError struct{ Code, Message string }
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string