Documentation
¶
Index ¶
- Constants
- func ActiveCoreBinary(runtimeRoot string, manifest Manifest) string
- func DefaultRuntimeRoot() string
- func DispatchControlRequest(ctx context.Context, request desktopcontrol.Request, ...) (any, error)
- func OpenCoreLog(runtimeRoot string) (io.WriteCloser, error)
- func PathForBinary(binaryPath string) string
- func PrepareCoreEnvironment(runtimeRoot string) error
- func RunConfigCommand(ctx context.Context, args []string, stdout, stderr io.Writer) error
- func RunServiceCommand(ctx context.Context, args []string, stdout, stderr io.Writer) error
- func RunTunnelCommand(ctx context.Context, args []string, stdout, stderr io.Writer) error
- func Save(path string, manifest Manifest) error
- func SelectInteractiveTaskSessionID(sessions []InteractiveSession, expectedUserSID string, currentSessionID int, ...) (int, error)
- type ConfigUpdateRequest
- type ControlRuntimeStatus
- type InteractiveSession
- type Manifest
- type ServiceStatus
- type TunnelConfigureRequest
- type TunnelStatus
Constants ¶
const SchemaVersion = 1
const WindowsCoreStartTimeout = 60 * time.Second
WindowsCoreStartTimeout 是 Windows Core 从启动请求到健康端点可用的统一预算。 Scheduled Task、DPAPI 恢复和 Runtime/Plugin 初始化都可能发生在冷启动路径中; 更新、迁移和安装器必须复用同一预算,避免外层更短的健康检查提前误判并触发回滚。
Variables ¶
This section is empty.
Functions ¶
func ActiveCoreBinary ¶ added in v0.9.0
ActiveCoreBinary 返回当前真正承载 Core 的 generation 二进制。 旧布局没有 active-version.json 时回退 manifest.agentdock_binary,保持迁移兼容。
func DefaultRuntimeRoot ¶ added in v0.7.3
func DefaultRuntimeRoot() string
DefaultRuntimeRoot 只由 macOS App 内置后台服务使用;其他平台继续要求调用方显式传入。
func DispatchControlRequest ¶
func DispatchControlRequest(ctx context.Context, request desktopcontrol.Request, runtimeStatus ControlRuntimeStatus) (any, error)
DispatchControlRequest 是后台核心的本地控制 API。这里只暴露桌面日常管理能力, 安装、卸载和提权仍由系统安装器负责。
func OpenCoreLog ¶ added in v0.8.2
func OpenCoreLog(runtimeRoot string) (io.WriteCloser, error)
func PathForBinary ¶
func PrepareCoreEnvironment ¶
func RunConfigCommand ¶
func RunServiceCommand ¶
func RunTunnelCommand ¶
func SelectInteractiveTaskSessionID ¶ added in v0.9.0
func SelectInteractiveTaskSessionID(sessions []InteractiveSession, expectedUserSID string, currentSessionID int, currentUserSID string, consoleSessionID uint32) (int, error)
SelectInteractiveTaskSessionID 把 InteractiveToken 任务钉到确定的用户会话。 规则必须与 launch-windows-process.ps1 / 兼容垫片里的实现保持一致: UAC 提权会保留原 Session ID,优先用调用方已验证会话,避免 RDP 被重定向到 console。
Types ¶
type ConfigUpdateRequest ¶
type ConfigUpdateRequest struct {
RuntimeRoot string
Port int
LogLevel string
OAuthAccessTokenTTL string
MCPAppsMode agentconfig.MCPAppsMode
BrowserEnabled bool
BrowserCDPURL string
BrowserReuseExistingCDP bool
ACPEnabled bool
ACPProfiles []agentconfig.ACPProfile
ACPDefaultProfile string
}
ConfigUpdateRequest 是桌面端保存日常运行设置时使用的结构化请求。
type ControlRuntimeStatus ¶ added in v0.8.0
type ControlRuntimeStatus struct {
NexusConnected bool
}
type InteractiveSession ¶ added in v0.9.0
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schema_version"`
InstallRoot string `json:"install_root,omitempty"`
AgentDockHome string `json:"agentdock_home,omitempty"`
AgentDockDefaultDir string `json:"agentdock_default_dir,omitempty"`
AgentDockBinary string `json:"agentdock_binary"`
TrayBinary string `json:"tray_binary,omitempty"`
AgentDockLauncher string `json:"agentdock_launcher,omitempty"`
AgentDockTaskName string `json:"agentdock_task_name,omitempty"`
PrivilegeMode string `json:"privilege_mode,omitempty"`
CloudflaredBinary string `json:"cloudflared_binary,omitempty"`
CloudflaredLauncher string `json:"cloudflared_launcher,omitempty"`
StartupValueName string `json:"startup_value_name,omitempty"`
TrayStartupValueName string `json:"tray_startup_value_name,omitempty"`
CloudflaredStartupValueName string `json:"cloudflared_startup_value_name,omitempty"`
Host string `json:"host"`
Port int `json:"port"`
LocalMCPURL string `json:"local_mcp_url"`
TunnelMode string `json:"tunnel_mode"`
PublicURL string `json:"public_url,omitempty"`
InstallChannel string `json:"install_channel"`
}
func LoadForBinary ¶
func (Manifest) UsesScheduledTask ¶
type ServiceStatus ¶
type ServiceStatus struct {
Running bool `json:"running"`
Healthy bool `json:"healthy"`
StartupEnabled bool `json:"startup_enabled"`
NexusConnected bool `json:"nexus_connected"`
}
ServiceStatus 是桌面端和 CLI 共享的结构化运行状态。 生命周期操作统一返回 JSON,避免桌面端继续解析 PowerShell 文本。
type TunnelConfigureRequest ¶
Source Files
¶
- config_command.go
- config_other.go
- control.go
- default_runtime_other.go
- health_timeout.go
- logging.go
- logging_linux.go
- manifest.go
- process_environment_linux.go
- quick_tunnel_log.go
- runtime_unix.go
- service_command.go
- service_linux.go
- service_task_other.go
- task_session.go
- tunnel_cloudflared.go
- tunnel_command.go
- tunnel_log_cursor.go
- tunnel_retry.go
- tunnel_service_linux.go
- tunnel_unix.go