Documentation
¶
Overview ¶
Package bundle defines the content-bundle serialization format used by pack export/import (file-based CLI) and admin export/import (HTTP). These are wire types, not domain types — they exist to ship Soul / Persona / Rule / Brain / Procedure / Skill content between systems with a stable schema.
Index ¶
Constants ¶
View Source
const SchemaVersion = 1
SchemaVersion is the current ContentBundle schema version. Import rejects bundles whose SchemaVersion does not match.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleBrain ¶
type BundleBrain struct {
SoulSlug models.Slug `json:"soul_slug"`
PersonaSlug models.Slug `json:"persona_slug"`
RuleSlugs []models.Slug `json:"rule_slugs"`
ProcedureSlug models.Slug `json:"procedure_slug,omitempty"`
SkillSlugs []models.Slug `json:"skill_slugs,omitempty"`
ModelPrefs *models.ModelPrefs `json:"model_prefs,omitempty"`
}
type BundlePersona ¶
type BundleProcedure ¶ added in v0.6.0
type BundleProcedure struct {
Content string `json:"content"`
}
type BundleRule ¶
type BundleSkill ¶ added in v0.6.0
type BundleSkill struct {
Description string `json:"description"`
Body string `json:"body"`
Triggers []string `json:"triggers,omitempty"`
Version int `json:"version"`
Scope string `json:"scope"`
}
BundleSkill is the wire form of a workspace skill — full body and metadata so import can reconstruct the row exactly. Triggers and version round-trip cleanly; scope is required.
type BundleSoul ¶
type BundleSoul struct {
Content string `json:"content"`
}
type BundleState ¶
type ContentBundle ¶
type ContentBundle struct {
SchemaVersion int `json:"schema_version"`
Souls map[models.Slug]BundleSoul `json:"souls"`
Personas map[models.Slug]BundlePersona `json:"personas"`
Rules map[models.Slug]BundleRule `json:"rules"`
Brains map[models.Slug]BundleBrain `json:"brains"`
Procedures map[models.Slug]BundleProcedure `json:"procedures"`
Skills map[models.Slug]BundleSkill `json:"skills,omitempty"`
State *BundleState `json:"state,omitempty"`
// ProjectStates carries per-project layer overrides keyed by project
// slug. State (above) is the workspace-scope layer; this map is
// every project-scope layer in the workspace. Either may be empty.
ProjectStates map[string]*BundleState `json:"project_states,omitempty"`
}
type ImportResult ¶
type ImportResult struct {
Imported struct {
Souls int `json:"souls"`
Personas int `json:"personas"`
Rules int `json:"rules"`
Brains int `json:"brains"`
Procedures int `json:"procedures"`
Skills int `json:"skills"`
State bool `json:"state"`
ProjectStates int `json:"project_states"`
} `json:"imported"`
Warnings []string `json:"warnings"`
}
Click to show internal directories.
Click to hide internal directories.