Documentation
¶
Index ¶
- Constants
- func LocalEnvPublicIDForAgent() string
- type Agent
- func (a *Agent) BinaryPath() string
- func (a *Agent) CodeAppServer() *appserver.Server
- func (a *Agent) Commit() string
- func (a *Agent) ConfigureControlPlane(ctx context.Context, setup ControlPlaneSetup) (ControlPlaneRuntimeStatus, error)
- func (a *Agent) ConnectControlPlane(ctx context.Context) error
- func (a *Agent) ConnectProvider(ctx context.Context, req ProviderLinkRequest) (*ProviderLinkResponse, error)
- func (a *Agent) ControlPlaneRuntimeStatus() ControlPlaneRuntimeStatus
- func (a *Agent) CurrentMaintenanceSnapshot() *syssvc.MaintenanceSnapshot
- func (a *Agent) CurrentRuntimeServiceSnapshot() runtimeservice.Snapshot
- func (a *Agent) DiagnosticsEnabled() bool
- func (a *Agent) DiagnosticsStore() *diagnostics.Store
- func (a *Agent) DisconnectControlPlane(ctx context.Context) error
- func (a *Agent) DisconnectDesktopModelSource() *ai.AIRuntimeStatus
- func (a *Agent) DisconnectProvider(ctx context.Context) (*ProviderLinkResponse, error)
- func (a *Agent) InstanceID() string
- func (a *Agent) PrepareDesktopModelSource(session ai.DesktopModelSourceSession) (*ai.AIRuntimeStatus, error)
- func (a *Agent) ProcessStartedAtUnixMS() int64
- func (a *Agent) ProviderLinkBinding() runtimeservice.ProviderLinkBinding
- func (a *Agent) Run(ctx context.Context) error
- func (a *Agent) RuntimePresentationSessions() []RuntimePresentationSession
- func (a *Agent) RuntimeServiceSnapshot() runtimeservice.Snapshot
- func (a *Agent) ServeDesktopModelSourceRPC(ctx context.Context, session ai.DesktopModelSourceSession, ...) error
- func (a *Agent) ServeLocalDirectSession(ctx context.Context, sess endpoint.Session, meta *session.Meta, ...) (err error)
- func (a *Agent) SetLocalUIBind(bind string)
- func (a *Agent) StartBackgroundServices(ctx context.Context)
- func (a *Agent) Version() string
- type ControlPlaneRuntimeStatus
- type ControlPlaneSetup
- type LocalDirectSessionOptions
- type Options
- type ProviderLinkError
- type ProviderLinkRequest
- type ProviderLinkResponse
- type RuntimePresentationSession
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 ( ProviderLinkErrorActiveWork = "PROVIDER_LINK_ACTIVE_WORK" ProviderLinkErrorBootstrapFailed = "PROVIDER_LINK_BOOTSTRAP_FAILED" ProviderLinkErrorAlreadyLinked = "PROVIDER_LINK_ALREADY_CONNECTED" ProviderLinkErrorDisconnectFailed = "PROVIDER_LINK_DISCONNECT_FAILED" ProviderLinkErrorDisconnectRejected = "PROVIDER_LINK_DISCONNECT_REJECTED" ProviderLinkErrorBindingNotCurrent = "PROVIDER_LINK_NOT_CURRENT" )
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 ¶
func LocalEnvPublicIDForAgent ¶ added in v0.6.8
func LocalEnvPublicIDForAgent() string
LocalEnvPublicIDForAgent avoids an import cycle with internal/localui.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) BinaryPath ¶ added in v0.6.8
func (*Agent) CodeAppServer ¶ added in v0.7.1
func (*Agent) ConfigureControlPlane ¶ added in v0.6.8
func (a *Agent) ConfigureControlPlane(ctx context.Context, setup ControlPlaneSetup) (ControlPlaneRuntimeStatus, error)
func (*Agent) ConnectControlPlane ¶ added in v0.6.8
func (*Agent) ConnectProvider ¶ added in v0.6.8
func (a *Agent) ConnectProvider(ctx context.Context, req ProviderLinkRequest) (*ProviderLinkResponse, error)
func (*Agent) ControlPlaneRuntimeStatus ¶ added in v0.6.8
func (a *Agent) ControlPlaneRuntimeStatus() ControlPlaneRuntimeStatus
func (*Agent) CurrentMaintenanceSnapshot ¶
func (a *Agent) CurrentMaintenanceSnapshot() *syssvc.MaintenanceSnapshot
func (*Agent) CurrentRuntimeServiceSnapshot ¶
func (a *Agent) CurrentRuntimeServiceSnapshot() runtimeservice.Snapshot
func (*Agent) DiagnosticsEnabled ¶
func (*Agent) DiagnosticsStore ¶
func (a *Agent) DiagnosticsStore() *diagnostics.Store
func (*Agent) DisconnectControlPlane ¶ added in v0.6.8
func (*Agent) DisconnectDesktopModelSource ¶ added in v0.6.8
func (a *Agent) DisconnectDesktopModelSource() *ai.AIRuntimeStatus
func (*Agent) DisconnectProvider ¶ added in v0.6.8
func (a *Agent) DisconnectProvider(ctx context.Context) (*ProviderLinkResponse, error)
func (*Agent) InstanceID ¶ added in v0.6.8
func (*Agent) PrepareDesktopModelSource ¶ added in v0.6.8
func (a *Agent) PrepareDesktopModelSource(session ai.DesktopModelSourceSession) (*ai.AIRuntimeStatus, error)
func (*Agent) ProcessStartedAtUnixMS ¶ added in v0.6.8
func (*Agent) ProviderLinkBinding ¶ added in v0.6.8
func (a *Agent) ProviderLinkBinding() runtimeservice.ProviderLinkBinding
func (*Agent) RuntimePresentationSessions ¶ added in v0.6.8
func (a *Agent) RuntimePresentationSessions() []RuntimePresentationSession
func (*Agent) RuntimeServiceSnapshot ¶
func (a *Agent) RuntimeServiceSnapshot() runtimeservice.Snapshot
func (*Agent) ServeDesktopModelSourceRPC ¶ added in v0.6.8
func (*Agent) ServeLocalDirectSession ¶
func (*Agent) SetLocalUIBind ¶ added in v0.6.8
func (*Agent) StartBackgroundServices ¶
type ControlPlaneRuntimeStatus ¶ added in v0.6.8
type ControlPlaneSetup ¶ added in v0.6.8
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
// InstanceID is a per-process runtime identity used by desktop lifecycle diagnostics.
InstanceID string
// LocalUIBind is the requested Local UI bind address before dynamic port resolution.
LocalUIBind 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
// LogOutput overrides the default runtime log sink.
//
// IMPORTANT: callers that reserve stdout for a machine protocol must pass
// a non-stdout sink so agent services cannot corrupt the protocol stream.
LogOutput io.Writer
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()
// OnControlConnecting is called before a control-channel connection attempt.
OnControlConnecting func()
// OnControlRetry is called after a failed control-channel attempt with the retry delay.
OnControlRetry func(error, time.Duration)
// OnControlDisabled is called when the runtime starts without a control channel.
OnControlDisabled func()
AccessGate *accessgate.Gate
}
type ProviderLinkError ¶ added in v0.6.8
func (*ProviderLinkError) Error ¶ added in v0.6.8
func (e *ProviderLinkError) Error() string
func (*ProviderLinkError) Unwrap ¶ added in v0.6.8
func (e *ProviderLinkError) Unwrap() error
type ProviderLinkRequest ¶ added in v0.6.8
type ProviderLinkRequest struct {
ProviderOrigin string
ProviderID string
EnvPublicID string
AccessPointOrigin string
BootstrapTicket string
ExpectedProviderOrigin string
ExpectedProviderID string
ExpectedEnvPublicID string
ExpectedAccessPointOrigin string
ExpectedGeneration int64
AllowRelinkWhenIdle bool
// contains filtered or unexported fields
}
type ProviderLinkResponse ¶ added in v0.6.8
type ProviderLinkResponse struct {
Binding runtimeservice.ProviderLinkBinding
}
type RuntimePresentationSession ¶ added in v0.6.8
Click to show internal directories.
Click to hide internal directories.