@getpaseo/client 0.7.0-beta.2 → 0.7.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,7 +103,7 @@ export type BrowserAutomationExecuteResponseMessage = BrowserAutomationExecuteRe
103
103
  export interface DaemonClientConfig {
104
104
  url: string;
105
105
  clientId: string;
106
- clientType?: "mobile" | "browser" | "cli" | "mcp";
106
+ clientType?: "mobile" | "browser" | "cli" | "mcp" | "hub";
107
107
  appVersion?: string;
108
108
  runtimeGeneration?: number | null;
109
109
  password?: string;
@@ -997,13 +997,27 @@ export declare class DaemonClient {
997
997
  }>;
998
998
  getDaemonStatus(options?: DaemonStatusOptions): Promise<DaemonStatusPayload>;
999
999
  reloadDaemonConfig(requestId?: string): Promise<DaemonConfigReloadResponse["payload"]>;
1000
- connectHub(hubUrl: string, token: string, requestId?: string): Promise<{
1000
+ connectHub(hubUrl: string, token: string, permissions?: readonly string[], requestId?: string): Promise<{
1001
1001
  requestId: string;
1002
1002
  status: {
1003
1003
  state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
1004
1004
  daemonId: string | null;
1005
1005
  hubOrigin: string | null;
1006
- scopes: string[];
1006
+ permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
1007
+ connectedAt: string | null;
1008
+ lastError: string | null;
1009
+ };
1010
+ }>;
1011
+ updateHubPermissions(input: {
1012
+ grant?: readonly string[];
1013
+ revoke?: readonly string[];
1014
+ }, requestId?: string): Promise<{
1015
+ requestId: string;
1016
+ status: {
1017
+ state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
1018
+ daemonId: string | null;
1019
+ hubOrigin: string | null;
1020
+ permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
1007
1021
  connectedAt: string | null;
1008
1022
  lastError: string | null;
1009
1023
  };
@@ -1014,7 +1028,7 @@ export declare class DaemonClient {
1014
1028
  state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
1015
1029
  daemonId: string | null;
1016
1030
  hubOrigin: string | null;
1017
- scopes: string[];
1031
+ permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
1018
1032
  connectedAt: string | null;
1019
1033
  lastError: string | null;
1020
1034
  };
@@ -1025,7 +1039,7 @@ export declare class DaemonClient {
1025
1039
  state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
1026
1040
  daemonId: string | null;
1027
1041
  hubOrigin: string | null;
1028
- scopes: string[];
1042
+ permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
1029
1043
  connectedAt: string | null;
1030
1044
  lastError: string | null;
1031
1045
  };
@@ -3132,14 +3132,26 @@ export class DaemonClient {
3132
3132
  message: { type: "daemon.config.reload.request" },
3133
3133
  });
3134
3134
  }
3135
- async connectHub(hubUrl, token, requestId) {
3135
+ async connectHub(hubUrl, token, permissions = [], requestId) {
3136
3136
  this.requireHubRelationshipSupport();
3137
3137
  return this.sendCorrelatedSessionRequest({
3138
3138
  requestId,
3139
- message: { type: "hub.management.daemon.connect.request", hubUrl, token },
3139
+ message: { type: "hub.management.daemon.connect.request", hubUrl, token, permissions },
3140
3140
  responseType: "hub.management.daemon.connect.response",
3141
3141
  });
3142
3142
  }
3143
+ async updateHubPermissions(input, requestId) {
3144
+ this.requireHubRelationshipSupport();
3145
+ return this.sendCorrelatedSessionRequest({
3146
+ requestId,
3147
+ message: {
3148
+ type: "hub.management.daemon.permissions.update.request",
3149
+ grant: input.grant ?? [],
3150
+ revoke: input.revoke ?? [],
3151
+ },
3152
+ responseType: "hub.management.daemon.permissions.update.response",
3153
+ });
3154
+ }
3143
3155
  async getHubStatus(requestId) {
3144
3156
  this.requireHubRelationshipSupport();
3145
3157
  return this.sendCorrelatedSessionRequest({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/client",
3
- "version": "0.7.0-beta.2",
3
+ "version": "0.7.0-beta.3",
4
4
  "description": "Paseo client SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -39,8 +39,8 @@
39
39
  "test": "vitest run"
40
40
  },
41
41
  "dependencies": {
42
- "@getpaseo/protocol": "0.7.0-beta.2",
43
- "@getpaseo/relay": "0.7.0-beta.2",
42
+ "@getpaseo/protocol": "0.7.0-beta.3",
43
+ "@getpaseo/relay": "0.7.0-beta.3",
44
44
  "zod": "^4.4.3"
45
45
  },
46
46
  "devDependencies": {