@hyperdrive.bot/fleet-client 0.3.162 → 0.3.164

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.
@@ -531,6 +531,9 @@ export type FetchAgentsOptions = Omit<FetchAgentsRequest, "type" | "requestId">
531
531
  timeout?: number;
532
532
  };
533
533
  export type FetchAgentsEntry = FetchAgentsPayload["entries"][number];
534
+ export type GetAgentsByIdsPayload = Extract<SessionOutboundMessage, {
535
+ type: "get_agents_by_ids_response";
536
+ }>["payload"];
534
537
  export type FetchAgentsPageInfo = FetchAgentsPayload["pageInfo"];
535
538
  type FetchAgentHistoryPayload = Extract<SessionOutboundMessage, {
536
539
  type: "fetch_agent_history_response";
@@ -909,6 +912,16 @@ export declare class DaemonClient {
909
912
  private stopLivenessHeartbeat;
910
913
  private scheduleNextLivenessHeartbeat;
911
914
  fetchAgents(options?: FetchAgentsOptions): Promise<FetchAgentsPayload>;
915
+ /**
916
+ * Resolve up to 200 agents by id without a list load. Requires
917
+ * server_info.features.agentDirectoryDelta.
918
+ */
919
+ getAgentsByIds(ids: string[], options?: {
920
+ requestId?: string;
921
+ timeout?: number;
922
+ fields?: FetchAgentsOptions["fields"];
923
+ scope?: "active";
924
+ }): Promise<GetAgentsByIdsPayload>;
912
925
  fetchAgentHistory(options?: FetchAgentHistoryOptions): Promise<FetchAgentHistoryPayload>;
913
926
  fetchRecentProviderSessions(options?: FetchRecentProviderSessionsOptions): Promise<FetchRecentProviderSessionsPayload>;
914
927
  fetchWorkspaces(options?: FetchWorkspacesOptions): Promise<FetchWorkspacesPayload>;
@@ -1028,6 +1028,9 @@ export class DaemonClient {
1028
1028
  ...(options?.sort ? { sort: options.sort } : {}),
1029
1029
  ...(options?.page ? { page: options.page } : {}),
1030
1030
  ...(options?.subscribe ? { subscribe: options.subscribe } : {}),
1031
+ ...(options?.sinceCursor ? { sinceCursor: options.sinceCursor } : {}),
1032
+ ...(options?.fields ? { fields: options.fields } : {}),
1033
+ ...(options?.query ? { query: options.query } : {}),
1031
1034
  });
1032
1035
  return this.sendRequest({
1033
1036
  requestId: resolvedRequestId,
@@ -1045,6 +1048,35 @@ export class DaemonClient {
1045
1048
  },
1046
1049
  });
1047
1050
  }
1051
+ /**
1052
+ * Resolve up to 200 agents by id without a list load. Requires
1053
+ * server_info.features.agentDirectoryDelta.
1054
+ */
1055
+ async getAgentsByIds(ids, options) {
1056
+ const resolvedRequestId = this.createRequestId(options?.requestId);
1057
+ const message = SessionInboundMessageSchema.parse({
1058
+ type: "get_agents_by_ids_request",
1059
+ requestId: resolvedRequestId,
1060
+ ids,
1061
+ ...(options?.fields ? { fields: options.fields } : {}),
1062
+ ...(options?.scope ? { scope: options.scope } : {}),
1063
+ });
1064
+ return this.sendRequest({
1065
+ requestId: resolvedRequestId,
1066
+ message,
1067
+ timeout: options?.timeout,
1068
+ options: { skipQueue: true },
1069
+ select: (msg) => {
1070
+ if (msg.type !== "get_agents_by_ids_response") {
1071
+ return null;
1072
+ }
1073
+ if (msg.payload.requestId !== resolvedRequestId) {
1074
+ return null;
1075
+ }
1076
+ return msg.payload;
1077
+ },
1078
+ });
1079
+ }
1048
1080
  async fetchAgentHistory(options) {
1049
1081
  const resolvedRequestId = this.createRequestId(options?.requestId);
1050
1082
  const message = SessionInboundMessageSchema.parse({
@@ -4735,6 +4767,7 @@ export class DaemonClient {
4735
4767
  [CLIENT_CAPS.customModeIcons]: true,
4736
4768
  [CLIENT_CAPS.reasoningMergeEnum]: true,
4737
4769
  [CLIENT_CAPS.terminalReflowableSnapshot]: true,
4770
+ [CLIENT_CAPS.agentDirectoryDelta]: true,
4738
4771
  ...this.config.capabilities,
4739
4772
  },
4740
4773
  ...(this.config.appVersion ? { appVersion: this.config.appVersion } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperdrive.bot/fleet-client",
3
- "version": "0.3.162",
3
+ "version": "0.3.164",
4
4
  "description": "Paseo client SDK package",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -36,8 +36,8 @@
36
36
  "test": "vitest run"
37
37
  },
38
38
  "dependencies": {
39
- "@hyperdrive.bot/fleet-protocol": "0.3.162",
40
- "@hyperdrive.bot/fleet-relay": "0.3.162",
39
+ "@hyperdrive.bot/fleet-protocol": "0.3.164",
40
+ "@hyperdrive.bot/fleet-relay": "0.3.164",
41
41
  "zod": "^4.4.3"
42
42
  },
43
43
  "devDependencies": {