spec

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRequest = errors.New("invalid Skill runtime request")
	ErrSkillNotFound  = errors.New("runtime Skill not found")
)

Functions

This section is empty.

Types

type CloseSkillSessionRequest

type CloseSkillSessionRequest struct {
	SessionID agentskillsSpec.SessionID `path:"sessionID" required:"true"`
}

type CloseSkillSessionResponse

type CloseSkillSessionResponse struct{}

type CreateSkillSessionRequest

type CreateSkillSessionRequest struct {
	Body *CreateSkillSessionRequestBody
}

CreateSkillSessionRequest creates a session using stable source identities.

type CreateSkillSessionRequestBody

type CreateSkillSessionRequestBody struct {
	// Optional: close this previous session (best-effort) before creating a new one.
	CloseSessionID agentskillsSpec.SessionID `json:"closeSessionID,omitempty"`

	MaxActivePerSession int        `json:"maxActivePerSession,omitempty"`
	AllowSkillRefs      []SkillRef `json:"allowSkillRefs,omitempty"`
	ActiveSkillRefs     []SkillRef `json:"activeSkillRefs,omitempty"`

	// Workspace scopes Artifact-based Skill references in this session.
	// Installed Skill references remain valid without this field.
	Workspace *collection.CollectionRef `json:"workspace,omitempty"`
}

type CreateSkillSessionResponse

type CreateSkillSessionResponse struct {
	Body *CreateSkillSessionResponseBody
}

type CreateSkillSessionResponseBody

type CreateSkillSessionResponseBody struct {
	SessionID       agentskillsSpec.SessionID `json:"sessionID"`
	ActiveSkillRefs []SkillRef                `json:"activeSkillRefs"`
}

type GetSkillsPromptRequest

type GetSkillsPromptRequest struct {
	Body *GetSkillsPromptRequestBody
}

type GetSkillsPromptRequestBody

type GetSkillsPromptRequestBody struct {
	Filter *RuntimeSkillFilter `json:"filter,omitempty"`
}

type GetSkillsPromptResponse

type GetSkillsPromptResponse struct {
	Body *GetSkillsPromptResponseBody
}

type GetSkillsPromptResponseBody

type GetSkillsPromptResponseBody struct {
	Prompt string `json:"prompt"`
}

type InvokeSkillToolRequest

type InvokeSkillToolRequest struct {
	Body *InvokeSkillToolRequestBody
}

type InvokeSkillToolRequestBody

type InvokeSkillToolRequestBody struct {
	SessionID agentskillsSpec.SessionID `json:"sessionID"      required:"true"`
	ToolName  string                    `json:"toolName"       required:"true"` // "skills-load" | "skills-unload" | "skills-readresource" | "skills-runscript"
	Args      JSONRawString             `json:"args,omitempty"`                 // JSON object string
}

type InvokeSkillToolResponse

type InvokeSkillToolResponse struct {
	Body *InvokeSkillToolResponseBody
}

type InvokeSkillToolResponseBody

type InvokeSkillToolResponseBody struct {
	Outputs      []llmtoolsSpec.ToolOutputUnion `json:"outputs,omitempty"`
	Meta         map[string]any                 `json:"meta,omitempty"`
	IsBuiltIn    bool                           `json:"isBuiltIn"`
	IsError      bool                           `json:"isError,omitempty"`
	ErrorMessage string                         `json:"errorMessage,omitempty"`
}

type JSONRawString

type JSONRawString = string

JSONRawString mirrors the ToolRuntime API style; it's a raw JSON string.

type ListRuntimeSkillsRequest

type ListRuntimeSkillsRequest struct {
	Body *ListRuntimeSkillsRequestBody
}

type ListRuntimeSkillsRequestBody

type ListRuntimeSkillsRequestBody struct {
	Filter *RuntimeSkillFilter `json:"filter,omitempty"`
}

type ListRuntimeSkillsResponse

type ListRuntimeSkillsResponse struct {
	Body *ListRuntimeSkillsResponseBody
}

type ListRuntimeSkillsResponseBody

type ListRuntimeSkillsResponseBody struct {
	Skills []RuntimeSkillListItem `json:"skills"`
}

type RenderSkillRequest

type RenderSkillRequest struct {
	Body *RenderSkillRequestBody
}

type RenderSkillRequestBody

type RenderSkillRequestBody struct {
	SkillRef  SkillRef          `json:"skillRef"            required:"true"`
	Arguments map[string]string `json:"arguments,omitempty"`

	// Workspace is required when SkillRef.Artifact is present and prevents an
	// ArtifactRef from being resolved outside its selected Workspace.
	Workspace *collection.CollectionRef `json:"workspace,omitempty"`
}

type RenderSkillResponse

type RenderSkillResponse struct {
	Body *RenderSkillResponseBody
}

type RenderSkillResponseBody

type RenderSkillResponseBody struct {
	Text string `json:"text"`

	Insert agentskillsSpec.SkillInsert `json:"insert"`

	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	DisplayName string `json:"displayName,omitempty"`

	// SourceTags are tags parsed from SKILL.md frontmatter.
	SourceTags []string `json:"sourceTags,omitempty"`

	Resources agentskillsSpec.SkillResourceInfo `json:"resources"`

	Arguments        []agentskillsSpec.SkillArgument `json:"arguments,omitempty"`
	AppliedArguments map[string]string               `json:"appliedArguments,omitempty"`
	RawFrontmatter   map[string]any                  `json:"rawFrontmatter,omitempty"`
	Warnings         []string                        `json:"warnings,omitempty"`
}

type RuntimeSkillFilter

type RuntimeSkillFilter struct {
	Types          []string                      `json:"types,omitempty"`
	Inserts        []agentskillsSpec.SkillInsert `json:"inserts,omitempty"`
	LocationPrefix string                        `json:"locationPrefix,omitempty"`
	AllowSkillRefs []SkillRef                    `json:"allowSkillRefs,omitempty"`

	// Workspace scopes Artifact-based Skill references. It is required when
	// AllowSkillRefs contains one or more Workspace Artifact references.
	Workspace *collection.CollectionRef `json:"workspace,omitempty"`

	SessionID agentskillsSpec.SessionID     `json:"sessionID,omitempty"`
	Activity  agentskillsSpec.SkillActivity `json:"activity,omitempty"`
}

type RuntimeSkillListItem

type RuntimeSkillListItem struct {
	SkillRef SkillRef `json:"skillRef"`

	// Copy of the runtime-facing identity fields (excluding Location) + runtime-indexed metadata.
	// These are read-only and exist only for display/debug.
	Type        string `json:"type,omitempty"`
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	Description string `json:"description,omitempty"`
	Digest      string `json:"digest,omitempty"`

	Insert    agentskillsSpec.SkillInsert     `json:"insert,omitempty"`
	Arguments []agentskillsSpec.SkillArgument `json:"arguments,omitempty"`
	// SourceTags are tags parsed from SKILL.md frontmatter.
	SourceTags     []string                          `json:"sourceTags,omitempty"`
	Resources      agentskillsSpec.SkillResourceInfo `json:"resources"`
	RawFrontmatter map[string]any                    `json:"rawFrontmatter,omitempty"`
	Warnings       []string                          `json:"warnings,omitempty"`

	// Session-scoped.
	IsActive bool `json:"isActive,omitempty"`

	// Runtime/provider error (if any) for this skill record.
	ErrorMessage string `json:"errorMessage,omitempty"`
}

RuntimeSkillListItem is the public runtime listing shape keyed by store identity (SkillRef). SkillDef is intentionally NOT exposed.

type SkillRef

type SkillRef struct {
	Artifact  *artifact.ArtifactRef        `json:"artifact,omitempty"`
	BundleID  skillstoreSpec.SkillBundleID `json:"bundleID,omitempty"`
	SkillSlug skillstoreSpec.SkillSlug     `json:"skillSlug,omitempty"`
	SkillID   skillstoreSpec.SkillID       `json:"skillID,omitempty"`
}

SkillRef is a stable runtime-facing identity.

Installed references retain their existing bundle and Skill fields until the standalone Skill Store is migrated. Workspace Skills use ArtifactRef only.

Jump to

Keyboard shortcuts

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