pack

package
v0.1.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package pack defines the gridctl pack manifest: a versioned selector over a repo's skills, agents, context rule fragments, and gateway wiring, so one git import configures a whole team setup. This package is deliberately thin — types, parsing, and validation only. There is no pack engine: the CLI expands a manifest into calls against the existing kind managers (skillsync, agentsync, contexts, wiring), which own every write.

Field names align with the Claude Code plugin.json family where the semantics match (name, version, description, author, skills, agents), so a pack maps onto that ecosystem instead of fighting it. The word "bundle" is avoided: the MCP ecosystem uses it for .mcpb, a single-server archive format.

Index

Constants

View Source
const APIVersion = "gridctl.dev/v1"

APIVersion is the current manifest schema, emitted by everything gridctl writes and documented as the value authors should use.

View Source
const Kind = "Pack"

Kind is the manifest's required kind value.

View Source
const LegacyAPIVersion = "gridctl.dev/v1alpha1"

LegacyAPIVersion is the pre-1.0 alpha schema. It is structurally identical to APIVersion and stays accepted indefinitely so packs authored before the graduation keep importing (Article IX).

View Source
const ManifestFileName = "gridctl-pack.yaml"

ManifestFileName is the fixed manifest location at a repo root.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name string `yaml:"name,omitempty" json:"name,omitempty"`
	URL  string `yaml:"url,omitempty" json:"url,omitempty"`
}

Author identifies a pack's maintainer (plugin.json-aligned subset).

type Manifest

type Manifest struct {
	APIVersion  string `yaml:"apiVersion" json:"apiVersion"`
	Kind        string `yaml:"kind" json:"kind"`
	Name        string `yaml:"name" json:"name"`
	Version     string `yaml:"version,omitempty" json:"version,omitempty"`
	Description string `yaml:"description,omitempty" json:"description,omitempty"`
	Author      Author `yaml:"author,omitempty" json:"author,omitempty"`
	// Skills and Agents select resources by name from the same repo's
	// discovery. Empty means every discovered resource of that kind.
	Skills []string `yaml:"skills,omitempty" json:"skills,omitempty"`
	Agents []string `yaml:"agents,omitempty" json:"agents,omitempty"`
	// Wiring asks apply to ensure the gateway entry is present in the
	// selected clients (empty Clients = all detected).
	Wiring  bool     `yaml:"wiring,omitempty" json:"wiring,omitempty"`
	Clients []string `yaml:"clients,omitempty" json:"clients,omitempty"`
	// Rules selects context rule fragments from the pack repo's
	// rules/*.md (or fragments/*.md) discovery. Empty means none
	// (rules are opt-in, never import-all).
	Rules []string `yaml:"rules,omitempty" json:"rules,omitempty"`
}

Manifest is a parsed gridctl-pack.yaml.

func Parse

func Parse(data []byte) (*Manifest, error)

Parse decodes and validates a manifest.

func ParseFile

func ParseFile(path string) (*Manifest, error)

ParseFile reads and parses a manifest from path. A missing file reports os.IsNotExist-compatible errors so callers can distinguish "no manifest" from "broken manifest".

func (*Manifest) Validate

func (m *Manifest) Validate() error

Validate checks the manifest's schema envelope and name.

func (*Manifest) Warnings

func (m *Manifest) Warnings() []string

Warnings reports advisory conditions a valid manifest still carries. Currently none; the reserved-rules warning was removed when the rules fragment library activated.

Jump to

Keyboard shortcuts

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