Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(identity Identity, node NodeAPI, runtime runtimeapi.Runtime, artifacts publicartifacts.Store, state *ConnectionState) *Client
type ConnectionState ¶
type ConnectionState struct {
// contains filtered or unexported fields
}
ConnectionState 只记录当前节点桥接是否已完成 NexusDock 握手。 配置是否存在由启动配置判断,避免把“已配对”和“已连接”混成同一个状态。
func (*ConnectionState) Connected ¶
func (s *ConnectionState) Connected() bool
func (*ConnectionState) SetConnected ¶
func (s *ConnectionState) SetConnected(connected bool)
type Identity ¶
type NodeAPI ¶ added in v0.8.2
type NodeAPI interface {
ToolNames() []string
ToolDescriptors() []map[string]any
UIResources() []protocol.UIResourceCapability
ToolContractHash() string
AgentDockLocalContext(context.Context) (map[string]any, error)
Invoke(context.Context, string, map[string]any) (map[string]any, error)
ReadAppResource(string) (map[string]any, error)
}
NodeAPI 由 Nexus Bridge 消费方定义,只包含握手和远程 operation 真正需要的节点能力。
type PairOptions ¶
type Status ¶
type Status struct {
Paired bool `json:"paired"`
Endpoint string `json:"endpoint,omitempty"`
NodeID string `json:"node_id,omitempty"`
DeviceID string `json:"device_id,omitempty"`
DeviceTokenStored bool `json:"device_token_stored"`
}
Status 是控制面板可安全展示的配对状态,不暴露 Device Token 本身。
func ReadStatus ¶
Click to show internal directories.
Click to hide internal directories.