contracts

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package contracts contains host-integration value types shared across host adapters and the root compatibility facade.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUnsupported

func AddUnsupported(items *[]UnsupportedMapping, field, value, reason string)

AddUnsupported appends a structured unsupported-field diagnostic to a mapping.

func FirstNonBlank

func FirstNonBlank(values ...string) string

FirstNonBlank returns the first non-empty trimmed value from values.

func NormalizeHost

func NormalizeHost(host string) string

NormalizeHost canonicalizes host identifiers used in config and session keys.

Types

type ConfigDocument

type ConfigDocument struct {
	APIKey    string                   `json:"apiKey,omitempty"`
	BaseURL   string                   `json:"baseUrl,omitempty"`
	PeerName  string                   `json:"peerName,omitempty"`
	Workspace string                   `json:"workspace,omitempty"`
	Hosts     map[string]RuntimeConfig `json:"hosts,omitempty"`
}

ConfigDocument is the shared ~/.honcho/config.json shape needed for host-scoped config isolation fixtures.

type ConfigPatch

type ConfigPatch struct {
	Workspace       *string
	AIPeer          *string
	PeerName        *string
	RecallMode      *string
	ObservationMode *string
	SessionStrategy *string
}

ConfigPatch updates only one hosts.<name> block.

type ExternalCompatibility

type ExternalCompatibility struct {
	InternalService   string
	ExternalToolNames []string
}

ExternalCompatibility records the internal/external naming contract.

func HonchoExternalCompatibility

func HonchoExternalCompatibility() ExternalCompatibility

HonchoExternalCompatibility returns the current public Honcho-compatible tool names while keeping the implementation service named Goncho.

type Input

type Input struct {
	Host             string
	Workspace        string
	PeerName         string
	AIPeer           string
	SessionStrategy  string
	WorkingDirectory string
	Repository       string
	Branch           string
	HostSessionID    string
	ChatInstanceID   string
	CharacterName    string
	RecallMode       string
}

Input is the host-facing compatibility fixture input. It models the shared Honcho concepts used by current hosts without importing or running those hosts' plugins.

type Mapping

type Mapping struct {
	Host              string
	WorkspaceID       string
	UserPeerID        string
	AIPeerID          string
	SessionStrategy   string
	SessionKey        string
	RecallMode        string
	InjectContext     bool
	ExposeTools       bool
	InternalService   string
	ExternalToolNames []string
	Unsupported       []UnsupportedMapping
}

Mapping is the internal Goncho interpretation of one host configuration.

type RuntimeConfig

type RuntimeConfig struct {
	Workspace       string `json:"workspace,omitempty"`
	AIPeer          string `json:"aiPeer,omitempty"`
	PeerName        string `json:"peerName,omitempty"`
	RecallMode      string `json:"recallMode,omitempty"`
	ObservationMode string `json:"observationMode,omitempty"`
	SessionStrategy string `json:"sessionStrategy,omitempty"`
}

RuntimeConfig is one hosts.<name> block from the Honcho shared config.

type SillyTavernInput

type SillyTavernInput struct {
	Workspace                string
	PeerMode                 string
	PeerName                 string
	PersonaName              string
	SessionNaming            string
	ChatInstanceID           string
	CharacterName            string
	CustomSessionName        string
	ExistingSessionKey       string
	ResetActiveSession       bool
	GroupCharacterNames      []string
	ExistingCharacterPeerIDs []string
	MessageCharacterName     string
	EnrichmentMode           string
	UnsupportedPanelKnobs    []string
}

SillyTavernInput models the Honcho SillyTavern panel decisions Goncho needs to preserve without importing the browser extension or Node plugin.

type SillyTavernMapping

type SillyTavernMapping struct {
	WorkspaceID               string
	UserPeerID                string
	SessionKey                string
	OrphanedSessionKey        string
	CharacterPeerIDs          []string
	LazyAddedCharacterPeerIDs []string
	InjectContext             bool
	UseReasoning              bool
	ReasoningToolName         string
	ExposeTools               bool
	ExternalToolNames         []string
	Unsupported               []UnsupportedMapping
}

SillyTavernMapping is Goncho's fixture-level interpretation of the SillyTavern host contract.

type UnsupportedMapping

type UnsupportedMapping struct {
	Field  string
	Value  string
	Reason string
}

UnsupportedMapping explains a host compatibility input that Goncho cannot safely accept yet.

Jump to

Keyboard shortcuts

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