Help us shape the future of Go! Take the 2026 Go Developer Survey

spec

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package spec defines the organisation specification shared by the Terraform provider, the Kubernetes API types and the controller. It is the single source of truth for field names and validation (design §4.6).

+kubebuilder:object:generate=true

Index

Constants

View Source
const DefaultsVersion = 1

DefaultsVersion identifies the set of defaults applied by the compiler. It is recorded in every effective manifest so that defaults are visible (§4.6).

View Source
const MaxSpecBytes = 256 * 1024

MaxSpecBytes is the documented size limit of a serialised specification (§13.3, ADR-0007). Large instruction documents must be referenced.

View Source
const SchemaVersion = "v1alpha1"

SchemaVersion is the version of the organisation specification schema.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelBinding

type ChannelBinding struct {
	Connection     string `json:"connection"`
	ExternalUserID string `json:"external_user_id"`
	Seat           string `json:"seat"`
	// Mode is direct_message.
	// +optional
	Mode string `json:"mode,omitempty"`
}

func (*ChannelBinding) DeepCopy

func (in *ChannelBinding) DeepCopy() *ChannelBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChannelBinding.

func (*ChannelBinding) DeepCopyInto

func (in *ChannelBinding) DeepCopyInto(out *ChannelBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Connection

type Connection struct {
	// Adapter is slack, linear, anthropic or fake-* in tests.
	Adapter string `json:"adapter"`
	// +optional
	AccountID string `json:"account_id,omitempty"`
	// +optional
	EndpointRef string `json:"endpoint_ref,omitempty"`
	// SecretRef points at a secret in a supported manager (vault:..., k8s:...).
	// +optional
	SecretRef string `json:"secret_ref,omitempty"`
	// Ownership is external (default, never deleted) or managed.
	// +optional
	Ownership string `json:"ownership,omitempty"`
	// Required connections must authenticate before the organisation is ready.
	// +optional
	Required *bool `json:"required,omitempty"`
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connection.

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecutionProfile

type ExecutionProfile struct {
	// Backend is the sandbox backend, initially kubernetes.
	Backend string `json:"backend"`
	// ServiceClass is interactive or background.
	// +optional
	ServiceClass string `json:"service_class,omitempty"`
	// IdlePolicy is warm, warm_then_stop or suspend.
	// +optional
	IdlePolicy string `json:"idle_policy,omitempty"`
	// +optional
	IdleTimeout string `json:"idle_timeout,omitempty"`
	// +optional
	CPURequest string `json:"cpu_request,omitempty"`
	// +optional
	CPULimit string `json:"cpu_limit,omitempty"`
	// +optional
	MemoryRequest string `json:"memory_request,omitempty"`
	// +optional
	MemoryLimit string `json:"memory_limit,omitempty"`
	// +optional
	WorkspaceSizeGB int64 `json:"workspace_size_gb,omitempty"`
	// StorageClass is the storage class of the seat workspace volume. Empty
	// uses the cluster default.
	// +optional
	StorageClass string `json:"storage_class,omitempty"`
	// +optional
	RequiredFeatures []string `json:"required_features,omitempty"`
}

func (*ExecutionProfile) DeepCopy

func (in *ExecutionProfile) DeepCopy() *ExecutionProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionProfile.

func (*ExecutionProfile) DeepCopyInto

func (in *ExecutionProfile) DeepCopyInto(out *ExecutionProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Grant

type Grant struct {
	// Subject is seat:<key> or team:<key>.
	Subject string `json:"subject"`
	// Resource is connection:<key>, memory:<key> or workspace:<key>.
	Resource   string   `json:"resource"`
	Operations []string `json:"operations"`
	// +optional
	Targets []string `json:"targets,omitempty"`
}

func (*Grant) DeepCopy

func (in *Grant) DeepCopy() *Grant

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Grant.

func (*Grant) DeepCopyInto

func (in *Grant) DeepCopyInto(out *Grant)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HarnessProfile

type HarnessProfile struct {
	// Adapter is the harness adapter name, e.g. claude-code or fake.
	Adapter string `json:"adapter"`
	// ImageDigest pins the harness image (image@sha256:... or a local tag in dev).
	ImageDigest string `json:"image_digest"`
	// ModelConnection names a connection with a model adapter.
	// +optional
	ModelConnection string `json:"model_connection,omitempty"`
	// +optional
	Model string `json:"model,omitempty"`
	// +optional
	RequiredCapabilities []string `json:"required_capabilities,omitempty"`
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

func (*HarnessProfile) DeepCopy

func (in *HarnessProfile) DeepCopy() *HarnessProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarnessProfile.

func (*HarnessProfile) DeepCopyInto

func (in *HarnessProfile) DeepCopyInto(out *HarnessProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemoryStore

type MemoryStore struct {
	// Retention is retain or delete.
	// +optional
	Retention string `json:"retention,omitempty"`
	// +optional
	BackingClass string `json:"backing_class,omitempty"`
	// +optional
	CapacityMB int64 `json:"capacity_mb,omitempty"`
}

func (*MemoryStore) DeepCopy

func (in *MemoryStore) DeepCopy() *MemoryStore

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryStore.

func (*MemoryStore) DeepCopyInto

func (in *MemoryStore) DeepCopyInto(out *MemoryStore)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MessageRoute

type MessageRoute struct {
	// From is seat:<key> or team:<key>.
	From string `json:"from"`
	// To is seat:<key> or team:<key>.
	To string `json:"to"`
	// Reply permits the recipient to reply within conversations opened on this route.
	// +optional
	Reply bool `json:"reply,omitempty"`
	// Bidirectional permits both directions.
	// +optional
	Bidirectional bool `json:"bidirectional,omitempty"`
}

func (*MessageRoute) DeepCopy

func (in *MessageRoute) DeepCopy() *MessageRoute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MessageRoute.

func (*MessageRoute) DeepCopyInto

func (in *MessageRoute) DeepCopyInto(out *MessageRoute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OrganizationSpec

type OrganizationSpec struct {
	// Key is the stable organisation key.
	Key string `json:"key"`
	// DisplayName is the human-readable organisation name.
	DisplayName string `json:"display_name"`
	// DataRetention applies to the organisation when it is deleted: retain or delete.
	// +optional
	DataRetention string `json:"data_retention,omitempty"`

	// +optional
	CultureRefs []string `json:"culture_refs,omitempty"`
	// +optional
	TeamTemplates map[string]TeamTemplate `json:"team_templates,omitempty"`
	// +optional
	Teams map[string]Team `json:"teams,omitempty"`
	// +optional
	MemoryStores map[string]MemoryStore `json:"memory_stores,omitempty"`
	// +optional
	SharedWorkspaces map[string]SharedWorkspace `json:"shared_workspaces,omitempty"`
	// +optional
	HarnessProfiles map[string]HarnessProfile `json:"harness_profiles,omitempty"`
	// +optional
	ExecutionProfiles map[string]ExecutionProfile `json:"execution_profiles,omitempty"`
	// +optional
	SandboxProfiles map[string]SandboxProfile `json:"sandbox_profiles,omitempty"`
	// +optional
	Connections map[string]Connection `json:"connections,omitempty"`
	// +optional
	Seats map[string]Seat `json:"seats,omitempty"`
	// +optional
	Grants map[string]Grant `json:"grants,omitempty"`
	// +optional
	MessageRoutes map[string]MessageRoute `json:"message_routes,omitempty"`
	// +optional
	ChannelBindings map[string]ChannelBinding `json:"channel_bindings,omitempty"`
}

OrganizationSpec is the declared organisation. Maps are keyed by stable keys.

func (*OrganizationSpec) DeepCopy

func (in *OrganizationSpec) DeepCopy() *OrganizationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationSpec.

func (*OrganizationSpec) DeepCopyInto

func (in *OrganizationSpec) DeepCopyInto(out *OrganizationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SandboxProfile

type SandboxProfile struct {
	// NetworkPolicy is deny_all_except_platform (default) or a named policy ref.
	// +optional
	NetworkPolicyRef string `json:"network_policy_ref,omitempty"`
	// +optional
	FilesystemPolicyRef string `json:"filesystem_policy_ref,omitempty"`
	// +optional
	RuntimeClass string `json:"runtime_class,omitempty"`
	// +optional
	RequiredEnforcement []string `json:"required_enforcement,omitempty"`
}

func (*SandboxProfile) DeepCopy

func (in *SandboxProfile) DeepCopy() *SandboxProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SandboxProfile.

func (*SandboxProfile) DeepCopyInto

func (in *SandboxProfile) DeepCopyInto(out *SandboxProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Seat

type Seat struct {
	RoleRef string `json:"role_ref"`
	// +optional
	Teams            []string `json:"teams,omitempty"`
	HarnessProfile   string   `json:"harness_profile"`
	ExecutionProfile string   `json:"execution_profile"`
	SandboxProfile   string   `json:"sandbox_profile"`
	// +optional
	PersonalMemory string `json:"personal_memory,omitempty"`
	// +optional
	Workspace *WorkspaceBinding `json:"workspace,omitempty"`
	// +optional
	DisplayName string `json:"display_name,omitempty"`
	// +optional
	InstructionRefs []string `json:"instruction_refs,omitempty"`
	// AdoptFrom explicitly adopts the retained data of a retired seat ID (§4.1).
	// +optional
	AdoptFrom string `json:"adopt_from,omitempty"`
}

func (*Seat) DeepCopy

func (in *Seat) DeepCopy() *Seat

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Seat.

func (*Seat) DeepCopyInto

func (in *Seat) DeepCopyInto(out *Seat)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SharedWorkspace

type SharedWorkspace struct {
	// +optional
	StorageClass string `json:"storage_class,omitempty"`
	// AccessMode is ReadWriteMany or ReadOnlyMany.
	AccessMode string `json:"access_mode"`
	// +optional
	SizeGB int64 `json:"size_gb,omitempty"`
	// +optional
	Retention string `json:"retention,omitempty"`
}

func (*SharedWorkspace) DeepCopy

func (in *SharedWorkspace) DeepCopy() *SharedWorkspace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedWorkspace.

func (*SharedWorkspace) DeepCopyInto

func (in *SharedWorkspace) DeepCopyInto(out *SharedWorkspace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Team

type Team struct {
	// +optional
	Template string `json:"template,omitempty"`
	// +optional
	InstructionRefs []string `json:"instruction_refs,omitempty"`
	// SharedMemory maps memory store keys to operations granted to members.
	// +optional
	SharedMemory map[string][]string `json:"shared_memory,omitempty"`
	// +optional
	Parameters map[string]string `json:"parameters,omitempty"`
}

Team is a concrete grouping of seats. Membership is declared on seats only.

func (*Team) DeepCopy

func (in *Team) DeepCopy() *Team

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Team.

func (*Team) DeepCopyInto

func (in *Team) DeepCopyInto(out *Team)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TeamTemplate

type TeamTemplate struct {
	// +optional
	Extends string `json:"extends,omitempty"`
	// +optional
	InstructionRefs []string `json:"instruction_refs,omitempty"`
	// Roles maps a role key to its role instruction reference.
	// +optional
	Roles map[string]string `json:"roles,omitempty"`
	// SharedMemory names memory stores granted to the team instantiating the template.
	// +optional
	SharedMemory map[string][]string `json:"shared_memory,omitempty"`
	// +optional
	Parameters map[string]string `json:"parameters,omitempty"`
}

TeamTemplate is a reusable team definition. Templates may extend one other template; merge rules are documented in pkg/compile.

func (*TeamTemplate) DeepCopy

func (in *TeamTemplate) DeepCopy() *TeamTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamTemplate.

func (*TeamTemplate) DeepCopyInto

func (in *TeamTemplate) DeepCopyInto(out *TeamTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkspaceBinding

type WorkspaceBinding struct {
	// +optional
	Persistent bool `json:"persistent,omitempty"`
	// +optional
	Shared []string `json:"shared,omitempty"`
}

func (*WorkspaceBinding) DeepCopy

func (in *WorkspaceBinding) DeepCopy() *WorkspaceBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceBinding.

func (*WorkspaceBinding) DeepCopyInto

func (in *WorkspaceBinding) DeepCopyInto(out *WorkspaceBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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