codeapp

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FloeAppCode is the floe_app id used for code-server sessions.
	FloeAppCode = "com.floegence.redeven.code"
)

Variables

This section is empty.

Functions

func IsValidCodeSpaceID

func IsValidCodeSpaceID(id string) bool

IsValidCodeSpaceID enforces a DNS-safe label: - allowed: [a-z0-9-] - length: 1..48 - no leading/trailing '-'

It intentionally matches the control-plane validation to avoid subtle routing bugs.

func ValidateControlplaneBaseURL added in v0.6.8

func ValidateControlplaneBaseURL(raw string) error

Types

type Options

type Options struct {
	Logger    *slog.Logger
	StateDir  string
	StateRoot string
	// ConfigPath is the absolute path to the runtime config file (used to persist settings updates from the Env App UI).
	ConfigPath          string
	ControlplaneBaseURL string

	// CodeServerPortMin/Max configures the dynamic port range used for code-server processes.
	// If unset/invalid, a safe default range is used.
	CodeServerPortMin int
	CodeServerPortMax int

	// Env/App-level context (used by AI tools).
	AgentHomeDir    string
	FilesystemScope *filesystemscope.Registry
	Shell           string

	AIConfig    *config.AIConfig
	Audit       *auditlog.Store
	Diagnostics *diagnostics.Store
	Terminal    *terminal.Manager
	// LocalUIEnabled enables Local UI-specific runtime behavior such as shorter
	// code-server reconnection grace and local gateway routing.
	LocalUIEnabled          bool
	ResolveSessionMeta      func(channelID string) (*session.Meta, bool)
	ResolveSessionTunnelURL func(channelID string) (string, bool)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts Options) (*Service, error)

func (*Service) AI

func (s *Service) AI() *ai.Service

func (*Service) AppendCodeRuntimeImportChunk added in v0.6.10

func (s *Service) AppendCodeRuntimeImportChunk(ctx context.Context, uploadID string, chunkIndex int64, body io.Reader) (gateway.CodeRuntimeImportChunkResult, error)

func (*Service) CancelCodeRuntimeOperation

func (s *Service) CancelCodeRuntimeOperation(ctx context.Context) (gateway.CodeRuntimeStatus, error)

func (*Service) Close

func (s *Service) Close() error

func (*Service) CodeRuntimeStatus

func (s *Service) CodeRuntimeStatus(ctx context.Context) (gateway.CodeRuntimeStatus, error)

func (*Service) CompleteCodeRuntimeImportSession added in v0.6.10

func (s *Service) CompleteCodeRuntimeImportSession(ctx context.Context, uploadID string) (gateway.CodeRuntimeStatus, error)

func (*Service) CreateCodeRuntimeImportSession added in v0.6.10

func (s *Service) CreateCodeRuntimeImportSession(ctx context.Context, manifest gateway.CodeRuntimeArtifactManifest) (gateway.CodeRuntimeImportSession, error)

func (*Service) CreateSpace

func (*Service) DeleteSpace

func (s *Service) DeleteSpace(ctx context.Context, codeSpaceID string) error

func (*Service) ExternalOriginForCodeSpace

func (s *Service) ExternalOriginForCodeSpace(codeSpaceID string) (string, error)

func (*Service) ExternalOriginForEnvApp

func (s *Service) ExternalOriginForEnvApp(envPublicID string) (string, error)

func (*Service) ExternalOriginForPortForward

func (s *Service) ExternalOriginForPortForward(forwardID string) (string, error)

func (*Service) Gateway

func (s *Service) Gateway() *gateway.Gateway

func (*Service) GatewayURL

func (s *Service) GatewayURL() string

func (*Service) ListSpaces

func (s *Service) ListSpaces(ctx context.Context) ([]gateway.SpaceStatus, error)

func (*Service) RemoveCodeRuntimeVersion

func (s *Service) RemoveCodeRuntimeVersion(ctx context.Context, version string) (gateway.CodeRuntimeStatus, error)

func (*Service) ResolveCodeServerPort

func (s *Service) ResolveCodeServerPort(ctx context.Context, codeSpaceID string) (int, error)

func (*Service) SelectCodeRuntimeVersion

func (s *Service) SelectCodeRuntimeVersion(ctx context.Context, version string) (gateway.CodeRuntimeStatus, error)

func (*Service) SetControlplaneBaseURL added in v0.6.8

func (s *Service) SetControlplaneBaseURL(raw string) error

func (*Service) StartSpace

func (s *Service) StartSpace(ctx context.Context, codeSpaceID string) (*gateway.SpaceStatus, error)

func (*Service) StopSpace

func (s *Service) StopSpace(ctx context.Context, codeSpaceID string) error

func (*Service) UpdateSpace

func (s *Service) UpdateSpace(ctx context.Context, codeSpaceID string, req gateway.UpdateSpaceRequest) (*gateway.SpaceStatus, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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