@getpaseo/client 0.7.0-beta.1 → 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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AgentSnapshotPayload, CreateAgentRequestMessage, FetchWorkspacesRequestMessage, FetchWorkspacesResponseMessage, GetProvidersSnapshotResponseMessage, ListAvailableProvidersResponse, ListProviderFeaturesRequestMessage, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ProjectListRequestMessage, ProjectListResponseMessage, ListProviderModesResponseMessage, MutableDaemonConfig, MutableDaemonConfigPatch, ProviderDiagnosticResponseMessage, ProjectPlacementPayload, WorkspaceProjectDescriptorPayload, RefreshProvidersSnapshotResponseMessage, SendAgentMessageRequest, SessionOutboundMessage, WorkspaceDescriptorPayload, WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
1
+ import type { AgentSnapshotPayload, CreateAgentRequestMessage, FetchWorkspacesRequestMessage, FetchWorkspacesResponseMessage, GetProvidersSnapshotResponseMessage, ListAvailableProvidersResponse, ListCommandsResponse, ListProviderFeaturesRequestMessage, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ProjectListRequestMessage, ProjectListResponseMessage, ListProviderModesResponseMessage, MutableDaemonConfig, MutableDaemonConfigPatch, ProviderDiagnosticResponseMessage, ProjectPlacementPayload, WorkspaceProjectDescriptorPayload, RefreshProvidersSnapshotResponseMessage, SendAgentMessageRequest, SessionOutboundMessage, WorkspaceDescriptorPayload, WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
2
2
  import { DaemonClient } from "./daemon-client.js";
3
3
  import type { FetchAgentsEntry, FetchAgentsOptions, FetchAgentsPageInfo, FetchAgentTimelineCursor, FetchAgentTimelineDirection, FetchAgentTimelinePayload, FetchAgentTimelineProjection, WaitForFinishResult } from "./daemon-client.js";
4
4
  export type ConnectionState = {
@@ -178,6 +178,10 @@ export interface PaseoAgentRunOptions extends PaseoAgentSendOptions {
178
178
  timeoutMs?: number;
179
179
  }
180
180
  export type PaseoAgentRunResult = WaitForFinishResult;
181
+ export interface PaseoAgentCommandsOptions {
182
+ requestId?: string;
183
+ }
184
+ export type PaseoAgentCommandsResult = ListCommandsResponse["payload"];
181
185
  export type PaseoAgentUpdate = Extract<SessionOutboundMessage, {
182
186
  type: "agent_update";
183
187
  }>["payload"];
@@ -200,9 +204,25 @@ export interface PaseoAgentTimelineHandle {
200
204
  }
201
205
  export interface PaseoAgentHandle {
202
206
  readonly id: string;
207
+ /**
208
+ * `workspaceId` through `archivedAt` mirror the last snapshot this handle
209
+ * observed. A handle from `ref()` reads `null` for all of them until
210
+ * `refresh()`, `run()`, `waitForFinish()`, a timeline refetch, or
211
+ * `subscribe()` delivers a snapshot. Optional snapshot values also read as
212
+ * `null`; use `current()` when you need to distinguish those states.
213
+ */
203
214
  readonly workspaceId: string | null;
204
215
  readonly cwd: string | null;
205
216
  readonly status: PaseoAgent["status"] | null;
217
+ readonly capabilities: PaseoAgent["capabilities"] | null;
218
+ readonly availableModes: PaseoAgent["availableModes"] | null;
219
+ readonly pendingPermissions: PaseoAgent["pendingPermissions"] | null;
220
+ readonly activeTurn: NonNullable<PaseoAgent["activeTurn"]> | null;
221
+ readonly lastUsage: NonNullable<PaseoAgent["lastUsage"]> | null;
222
+ readonly lastError: NonNullable<PaseoAgent["lastError"]> | null;
223
+ readonly features: NonNullable<PaseoAgent["features"]> | null;
224
+ readonly runtimeInfo: NonNullable<PaseoAgent["runtimeInfo"]> | null;
225
+ readonly archivedAt: NonNullable<PaseoAgent["archivedAt"]> | null;
206
226
  readonly timeline: PaseoAgentTimelineHandle;
207
227
  current(): PaseoAgent | null;
208
228
  refresh(requestId?: string): Promise<PaseoAgentRefetchResult | null>;
@@ -211,6 +231,14 @@ export interface PaseoAgentHandle {
211
231
  run(text: string, options?: PaseoAgentRunOptions): Promise<PaseoAgentRunResult>;
212
232
  /** Waits for the current turn, including one started with `prompt`. */
213
233
  waitForFinish(timeoutMs?: number): Promise<PaseoAgentRunResult>;
234
+ /**
235
+ * Asks the running session for the slash commands and skills it actually
236
+ * loaded. Providers answer from the live session, so this sees built-in and
237
+ * bundled entries that no directory scan can find. The payload carries its own
238
+ * `error` string; a provider that cannot answer reports it there rather than
239
+ * rejecting.
240
+ */
241
+ commands(options?: PaseoAgentCommandsOptions): Promise<PaseoAgentCommandsResult>;
214
242
  archive(): Promise<{
215
243
  archivedAt: string;
216
244
  }>;
package/dist/index.js CHANGED
@@ -191,6 +191,33 @@ function createAgentHandleFactory(daemonClient) {
191
191
  get status() {
192
192
  return current?.status ?? null;
193
193
  },
194
+ get capabilities() {
195
+ return current?.capabilities ?? null;
196
+ },
197
+ get availableModes() {
198
+ return current?.availableModes ?? null;
199
+ },
200
+ get pendingPermissions() {
201
+ return current?.pendingPermissions ?? null;
202
+ },
203
+ get activeTurn() {
204
+ return current?.activeTurn ?? null;
205
+ },
206
+ get lastUsage() {
207
+ return current?.lastUsage ?? null;
208
+ },
209
+ get lastError() {
210
+ return current?.lastError ?? null;
211
+ },
212
+ get features() {
213
+ return current?.features ?? null;
214
+ },
215
+ get runtimeInfo() {
216
+ return current?.runtimeInfo ?? null;
217
+ },
218
+ get archivedAt() {
219
+ return current?.archivedAt ?? null;
220
+ },
194
221
  current: () => current,
195
222
  refresh: async (requestId) => {
196
223
  const result = await daemonClient.fetchAgent({ agentId: id, requestId });
@@ -216,6 +243,7 @@ function createAgentHandleFactory(daemonClient) {
216
243
  }
217
244
  return result;
218
245
  },
246
+ commands: (options) => daemonClient.listCommands({ agentId: id, ...options }),
219
247
  archive: async () => {
220
248
  const result = await daemonClient.archiveAgent(id);
221
249
  if (current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/client",
3
- "version": "0.7.0-beta.1",
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.1",
43
- "@getpaseo/relay": "0.7.0-beta.1",
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": {