bundle

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 1 Imported by: 0

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 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"`
	ModelPrefs  *models.ModelPrefs `json:"model_prefs,omitempty"`
}

type BundlePersona

type BundlePersona struct {
	Content      string        `json:"content"`
	BundledRules []models.Slug `json:"bundled_rules"`
}

type BundleRule

type BundleRule struct {
	Entries []models.RuleEntry `json:"entries"`
}

type BundleSoul

type BundleSoul struct {
	Content string `json:"content"`
}

type BundleState

type BundleState struct {
	Soul    models.Slug   `json:"soul"`
	Persona models.Slug   `json:"persona"`
	Rules   []models.Slug `json:"rules"`
}

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"`
	State         *BundleState                  `json:"state,omitempty"`
}

type ImportResult

type ImportResult struct {
	Imported struct {
		Souls    int  `json:"souls"`
		Personas int  `json:"personas"`
		Rules    int  `json:"rules"`
		Brains   int  `json:"brains"`
		State    bool `json:"state"`
	} `json:"imported"`
	Warnings []string `json:"warnings"`
}

Jump to

Keyboard shortcuts

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