Repository navigation
Replies: 4 comments
|
import { getPaseoClient, useHosts } from "@getpaseo/plugin/client";
const hosts = useHosts(); // [{ serverId, label, status }], offline hosts included
const api = getPaseoClient(hosts[0].serverId); // PaseoApi over the app's existing connection
const { entries } = await api.agents.list();
Two differences from your post:
The lifecycle rules matter for a long-lived dashboard: a retained API survives a reconnect of the same connection, but is released when the app switches or replaces the connection, and you reacquire it and recreate subscriptions. Those cases are in the plugin reference, with a runnable surface at plugin-examples/hosts. This is in the v0.9.0-beta.1 pre-release. The current stable release is v0.8.0, which does not include it, and the next stable version number is not decided yet. Thanks for describing the Agents dash case down to the hook you wanted, it made the API easy to settle. |
|
I can confirm it works. Thanks! |
|
Merged PR #8906 adds cross-host |
|
Agents dash can now pass This will ship in the next beta. If you try it, please let me know how it goes. How to join the beta |
Uh oh!
There was an error while loading. Please reload this page.
I’m building an “Agents dash” plugin that groups workspaces and agents by status. I want one dashboard showing activity across every connected Paseo host.
Paseo already combines matching plugin sidebar contributions into one entry, with a host picker. However, the surface’s
usePaseo(),useRpc(), and navigation capabilities operate on one selected host. This allows switching between hosts, but not aggregating them.What would be enough, would be an
useHosts()hook that gives access to paseo and rpc of all hosts the plugin is installed on. The surface can be rendered by either one of the hosts, just all of them would be able to enumarate and communicate with other hosts.The proposed capabilities would be:
Existing surfaces would retain their current behavior.
For my plugin, or any similar one, this would let the client merge workspace and agent subscriptions into one list, while sending archive actions and plugin-specific unread marks to the originating host. An unavailable host would show its status without blocking the rest of the dashboard.
All reactions