Documentation
¶
Index ¶
- Constants
- func EncodeWorkspaceCollectionV1Body(value WorkspaceCollectionV1Body) (json.RawMessage, error)
- func MarshalSkillCollectionV1(value SkillCollectionV1) ([]byte, error)
- func MarshalWorkspaceCollectionV1(value WorkspaceCollectionV1) ([]byte, error)
- func SkillCollectionV1JSONSchema() []byte
- func ValidateShareableCollectionMetadata(logicalName string, logicalVersion string, displayName string, ...) error
- func WorkspaceCollectionV1JSONSchema() []byte
- type ContentRef
- type SkillCollectionV1
- type WorkspaceCollectionV1
- type WorkspaceCollectionV1Body
- type WorkspaceDirectoryRootV1
- type WorkspaceDiscoveryV1
Constants ¶
const ( SkillCollectionV1FileName = "collection.json" SkillCollectionV1Kind = "skill.bundle" SkillCollectionV1SchemaID = "skill.bundle.v1" SkillCollectionV1SchemaVersion = "v1" SkillCollectionV1MemberFormat = "agent.skill-entrypoint/v1" SkillCollectionV1MemberRole = "agent.skill" )
const ( WorkspaceCollectionV1FileName = "workspace.json" WorkspaceCollectionV1Kind = "workspace.collection" WorkspaceCollectionV1SchemaID = "workspace.collection.v1" WorkspaceCollectionV1SchemaVersion = "v1" )
Variables ¶
This section is empty.
Functions ¶
func EncodeWorkspaceCollectionV1Body ¶
func EncodeWorkspaceCollectionV1Body( value WorkspaceCollectionV1Body, ) (json.RawMessage, error)
func MarshalSkillCollectionV1 ¶
func MarshalSkillCollectionV1(value SkillCollectionV1) ([]byte, error)
func MarshalWorkspaceCollectionV1 ¶
func MarshalWorkspaceCollectionV1( value WorkspaceCollectionV1, ) ([]byte, error)
func SkillCollectionV1JSONSchema ¶
func SkillCollectionV1JSONSchema() []byte
func ValidateShareableCollectionMetadata ¶
func ValidateShareableCollectionMetadata( logicalName string, logicalVersion string, displayName string, description string, labels map[string]string, ) error
ValidateShareableCollectionMetadata validates metadata shared by portable collection schemas and local collection records.
It intentionally does not require a document digest, members, or package bytes. Those belong to document canonicalization and package hydration.
func WorkspaceCollectionV1JSONSchema ¶
func WorkspaceCollectionV1JSONSchema() []byte
Types ¶
type ContentRef ¶
type ContentRef struct {
Locator string `json:"locator,omitempty"`
URI string `json:"uri,omitempty"`
SubresourceLocator string `json:"subresourceLocator,omitempty"`
Digest *string `json:"digest,omitempty"`
MediaType string `json:"mediaType,omitempty"`
Role string `json:"role,omitempty"`
}
func (ContentRef) Clone ¶
func (v ContentRef) Clone() ContentRef
type SkillCollectionV1 ¶
type SkillCollectionV1 struct {
Digest *string `json:"digest,omitempty"`
Kind string `json:"kind"`
SchemaID string `json:"schemaID"`
SchemaVersion string `json:"schemaVersion"`
LogicalName string `json:"logicalName"`
LogicalVersion string `json:"logicalVersion,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Body json.RawMessage `json:"body"`
Members []ContentRef `json:"members,omitempty"`
}
SkillCollectionV1 is the public Go wire schema for collection.json.
It intentionally uses ordinary strings and json.RawMessage rather than internal Artifact Store value types. Semantic conversion and validation are supplied by the registered artifact-family codec.
func CanonicalizeSkillCollectionV1 ¶
func CanonicalizeSkillCollectionV1( input SkillCollectionV1, ) (SkillCollectionV1, error)
CanonicalizeSkillCollectionV1 validates a shareable collection document, deterministically orders its members, calculates its digest, and verifies a supplied digest when one is present.
Member digests intentionally remain optional. They can be supplied by a sharer or enriched later by package hydration when member bytes exist.
func ParseSkillCollectionV1 ¶
func ParseSkillCollectionV1(raw []byte) (SkillCollectionV1, error)
ParseSkillCollectionV1 validates structural and semantic input but does not calculate or verify a supplied document digest. Call CanonicalizeSkillCollectionV1 when the digest must be calculated or verified.
func (SkillCollectionV1) Clone ¶
func (v SkillCollectionV1) Clone() SkillCollectionV1
func (SkillCollectionV1) Validate ¶
func (v SkillCollectionV1) Validate() error
Validate accepts both shareable input documents without a digest and canonical documents with a digest. CanonicalizeSkillCollectionV1 additionally calculates and verifies the digest.
func (SkillCollectionV1) ValidateEnvelope ¶
func (v SkillCollectionV1) ValidateEnvelope() error
type WorkspaceCollectionV1 ¶
type WorkspaceCollectionV1 struct {
Digest *string `json:"digest,omitempty"`
Kind string `json:"kind"`
SchemaID string `json:"schemaID"`
SchemaVersion string `json:"schemaVersion"`
LogicalName string `json:"logicalName"`
LogicalVersion string `json:"logicalVersion,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Body json.RawMessage `json:"body"`
Members []ContentRef `json:"members,omitempty"`
}
WorkspaceCollectionV1 is the portable workspace.json schema model.
Digest is optional on input. CanonicalizeWorkspaceCollectionV1 always calculates and returns a digest.
func CanonicalizeWorkspaceCollectionV1 ¶
func CanonicalizeWorkspaceCollectionV1( input WorkspaceCollectionV1, ) (WorkspaceCollectionV1, error)
func ParseWorkspaceCollectionV1 ¶
func ParseWorkspaceCollectionV1( raw []byte, ) (WorkspaceCollectionV1, error)
func (WorkspaceCollectionV1) Clone ¶
func (v WorkspaceCollectionV1) Clone() WorkspaceCollectionV1
func (WorkspaceCollectionV1) Validate ¶
func (v WorkspaceCollectionV1) Validate() error
type WorkspaceCollectionV1Body ¶
type WorkspaceCollectionV1Body struct {
Discovery WorkspaceDiscoveryV1 `json:"discovery"`
}
func DecodeWorkspaceCollectionV1Body ¶
func DecodeWorkspaceCollectionV1Body( raw json.RawMessage, ) (WorkspaceCollectionV1Body, error)
type WorkspaceDiscoveryV1 ¶
type WorkspaceDiscoveryV1 struct {
AdditionalLocators []string `json:"additionalLocators,omitempty"`
AdditionalRoots []WorkspaceDirectoryRootV1 `json:"additionalRoots,omitempty"`
IncludeReadme bool `json:"includeReadme,omitempty"`
}