agent

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FloeAppRedevenAgent = "com.floegence.redeven.agent"
	FloeAppRedevenCode  = "com.floegence.redeven.code"
	// FloeAppRedevenPortForward proxies an arbitrary HTTP service reachable from the agent.
	FloeAppRedevenPortForward = "com.floegence.redeven.portforward"
)

Floe app ids.

View Source
const (
	// TypeID_SESSIONS_LIST_ACTIVE returns currently active Flowersec channel sessions on the agent (server side).
	//
	// NOTE: This is a UI/auditing endpoint and MUST NOT be used as an authorization source of truth.
	//
	// The type_id must match Env App: internal/envapp/ui_src/src/ui/protocol/redeven_v1/typeIds.ts.
	TypeID_SESSIONS_LIST_ACTIVE uint32 = 5001
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(opts Options) (*Agent, error)

func (*Agent) CodeGateway

func (a *Agent) CodeGateway() *gateway.Gateway

func (*Agent) CurrentMaintenanceSnapshot

func (a *Agent) CurrentMaintenanceSnapshot() *syssvc.MaintenanceSnapshot

func (*Agent) CurrentRuntimeServiceSnapshot

func (a *Agent) CurrentRuntimeServiceSnapshot() runtimeservice.Snapshot

func (*Agent) DiagnosticsEnabled

func (a *Agent) DiagnosticsEnabled() bool

func (*Agent) DiagnosticsStore

func (a *Agent) DiagnosticsStore() *diagnostics.Store

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

func (*Agent) RuntimeServiceSnapshot

func (a *Agent) RuntimeServiceSnapshot() runtimeservice.Snapshot

func (*Agent) ServeLocalDirectSession

func (a *Agent) ServeLocalDirectSession(ctx context.Context, sess endpoint.Session, meta *session.Meta, opts LocalDirectSessionOptions) (err error)

func (*Agent) StartBackgroundServices

func (a *Agent) StartBackgroundServices(ctx context.Context)

type LocalDirectSessionOptions

type LocalDirectSessionOptions struct {
	AccessUnlocked            bool
	TraceID                   string
	ConnectArtifactIssuedAtMs int64
}

ServeLocalDirectSession serves an already-established direct (no tunnel) endpoint session.

The session metadata MUST be treated as authoritative and is used to enforce permission caps.

type Options

type Options struct {
	Config *config.Config
	// ConfigPath is the path used to load the config file (used to derive state_dir).
	ConfigPath string
	StateRoot  string
	// LocalUIEnabled indicates Local UI is enabled (e.g. `redeven run --mode hybrid|local`).
	//
	// When enabled, the agent is allowed to start even without a full bootstrap config.
	LocalUIEnabled bool
	// ControlChannelEnabled indicates whether the agent should connect to the control-plane control channel.
	//
	// In Local mode, this should be false even when the config is fully bootstrapped.
	ControlChannelEnabled bool
	// DesktopManaged disables CLI self-upgrade behaviors that do not apply when the
	// agent lifecycle is owned by a desktop shell package.
	DesktopManaged bool
	// EffectiveRunMode reports the current runtime mode exposed to the UI/control plane.
	EffectiveRunMode string
	// RemoteEnabled reports whether the current process has the remote control channel enabled.
	RemoteEnabled bool

	Version   string
	Commit    string
	BuildTime string

	// OnControlConnected is called once after the agent successfully connects to the
	// remote control channel and completes the initial register call.
	//
	// This hook is intended for CLI UX (e.g., printing the environment access URL)
	// and must not be used for authorization decisions.
	OnControlConnected func()

	AccessGate *accessgate.Gate
}

Jump to

Keyboard shortcuts

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