@getpaseo/client 0.2.0-beta.1 → 0.2.0-beta.2

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.
@@ -1,7 +1,8 @@
1
1
  import type { z } from "zod";
2
2
  import { type ClientCapability } from "@getpaseo/protocol/client-capabilities";
3
+ import type { AgentAttentionNotificationPayload } from "@getpaseo/protocol/agent-attention-notification";
3
4
  import { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ServerInfoStatusPayload } from "@getpaseo/protocol/messages";
4
- import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileUploadResponse, FileExplorerResponse, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommit, ParsedDiffFile, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutForgeSetAutoMergeResponse, CheckoutGithubSetAutoMergeResponse, CheckoutForgeGetCheckDetailsResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, ForgeSearchResponse, ForgeSearchRequest, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconResponse, ProjectAddResponse, ProjectCreateDirectoryResponse, OpenProjectResponseMessage, WorkspaceGithubSearchRepositoriesResponse, ProjectGithubCloneProtocol, ProjectGithubCloneResponse, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, WorkspaceCreateRequest, WorkspaceRecoveryState } from "@getpaseo/protocol/messages";
5
+ import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileUploadResponse, FileExplorerResponse, FileVersion, FileWriteResult, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommit, ParsedDiffFile, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutForgeSetAutoMergeResponse, CheckoutGithubSetAutoMergeResponse, CheckoutForgeGetCheckDetailsResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, ForgeSearchResponse, ForgeSearchRequest, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconResponse, ProjectAddResponse, ProjectCreateDirectoryResponse, OpenProjectResponseMessage, WorkspaceGithubSearchRepositoriesResponse, ProjectGithubCloneProtocol, ProjectGithubCloneResponse, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, WorkspaceCreateRequest, WorkspaceRecoveryState } from "@getpaseo/protocol/messages";
5
6
  import type { AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentProviderNotice, AgentProvider, AgentSessionConfig } from "@getpaseo/protocol/agent-types";
6
7
  import type { MutableDaemonConfig, MutableDaemonConfigPatch } from "@getpaseo/protocol/messages";
7
8
  import { type DaemonTransportFactory, type WebSocketFactory } from "./daemon-client-transport.js";
@@ -52,6 +53,11 @@ export type DaemonEvent = {
52
53
  payload: Extract<SessionOutboundMessage, {
53
54
  type: "workspace_update";
54
55
  }>["payload"];
56
+ } | {
57
+ type: "project.update";
58
+ payload: Extract<SessionOutboundMessage, {
59
+ type: "project.update";
60
+ }>["payload"];
55
61
  } | {
56
62
  type: "workspace_setup_progress";
57
63
  workspaceId: string;
@@ -128,6 +134,13 @@ export interface SendMessageOptions {
128
134
  }>;
129
135
  attachments?: SendAgentMessageRequest["attachments"];
130
136
  }
137
+ export interface AgentAttentionRequiredNotification {
138
+ agentId: string;
139
+ reason: "finished" | "error" | "permission";
140
+ timestamp: string;
141
+ shouldNotify: boolean;
142
+ notification?: AgentAttentionNotificationPayload;
143
+ }
131
144
  type AgentConfigOverrides = Partial<Omit<AgentSessionConfig, "provider" | "cwd">>;
132
145
  export interface CreateAgentRequestOptions extends AgentConfigOverrides {
133
146
  config?: AgentSessionConfig;
@@ -135,6 +148,7 @@ export interface CreateAgentRequestOptions extends AgentConfigOverrides {
135
148
  cwd?: string;
136
149
  env?: CreateAgentRequestMessage["env"];
137
150
  workspaceId?: string;
151
+ callerAgentId?: string;
138
152
  initialPrompt?: string;
139
153
  clientMessageId?: string;
140
154
  outputSchema?: Record<string, unknown>;
@@ -196,6 +210,7 @@ export interface FileReadResult {
196
210
  path: string;
197
211
  kind: LegacyFileExplorerFilePayload["kind"];
198
212
  modifiedAt: string;
213
+ revision?: string;
199
214
  }
200
215
  export interface FileUploadInput {
201
216
  fileName: string;
@@ -477,9 +492,6 @@ export interface CreateScheduleOptions {
477
492
  prompt: string;
478
493
  name?: string | null;
479
494
  cadence: {
480
- type: "every";
481
- everyMs: number;
482
- } | {
483
495
  type: "cron";
484
496
  expression: string;
485
497
  timezone?: string;
@@ -533,9 +545,6 @@ export interface UpdateScheduleOptions {
533
545
  name?: string | null;
534
546
  prompt?: string;
535
547
  cadence?: {
536
- type: "every";
537
- everyMs: number;
538
- } | {
539
548
  type: "cron";
540
549
  expression: string;
541
550
  timezone?: string;
@@ -594,6 +603,7 @@ export declare class DaemonClient {
594
603
  private connectionState;
595
604
  private checkoutDiffSubscriptions;
596
605
  private terminalDirectorySubscriptions;
606
+ private fileSubscriptions;
597
607
  private readonly terminalStreams;
598
608
  private pendingBinaryFileReads;
599
609
  private activeBinaryFileTransfers;
@@ -630,6 +640,7 @@ export declare class DaemonClient {
630
640
  type: TType;
631
641
  }>) => void): () => void;
632
642
  on(handler: DaemonEventHandler): () => void;
643
+ onAgentAttentionRequired(handler: (notification: AgentAttentionRequiredNotification) => void): () => void;
633
644
  /**
634
645
  * Send a session message. For fire-and-forget messages (heartbeats, etc.),
635
646
  * failures are suppressed if `suppressSendErrors` is configured.
@@ -715,6 +726,7 @@ export declare class DaemonClient {
715
726
  fetchAgent(agentId: string, options?: LegacyFetchAgentOptions): Promise<FetchAgentResult | null>;
716
727
  private resubscribeCheckoutDiffSubscriptions;
717
728
  private resubscribeTerminalDirectorySubscriptions;
729
+ private resubscribeFileSubscriptions;
718
730
  createAgent(options: CreateAgentRequestOptions): Promise<AgentSnapshotPayload>;
719
731
  deleteAgent(agentId: string): Promise<void>;
720
732
  archiveAgent(agentId: string): Promise<{
@@ -748,6 +760,7 @@ export declare class DaemonClient {
748
760
  timeout?: number;
749
761
  }): Promise<ProviderSubagentListPayload>;
750
762
  fetchProviderSubagentTimeline(parentAgentId: string, subagentId: string, options?: FetchProviderSubagentTimelineOptions): Promise<ProviderSubagentTimelinePayload>;
763
+ setAgentTimelineSubscription(agentIds: string[]): Promise<void>;
751
764
  buildAgentForkContext(agentId: string, options?: AgentForkContextOptions): Promise<AgentForkContextPayload>;
752
765
  sendAgentMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<void>;
753
766
  sendMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<void>;
@@ -912,6 +925,20 @@ export declare class DaemonClient {
912
925
  private requestFileExplorer;
913
926
  listDirectory(cwd: string, path: string, requestId?: string): Promise<FileExplorerDirectoryPayload>;
914
927
  readFile(cwd: string, path: string, requestId?: string): Promise<FileReadResult>;
928
+ subscribeFile(input: {
929
+ cwd: string;
930
+ path: string;
931
+ }, onUpdate: (version: FileVersion) => void): Promise<{
932
+ initial: FileVersion;
933
+ unsubscribe: () => void;
934
+ }>;
935
+ writeFile(input: {
936
+ cwd: string;
937
+ path: string;
938
+ content: string;
939
+ expectedModifiedAt: string;
940
+ expectedRevision?: string;
941
+ }): Promise<FileWriteResult>;
915
942
  uploadFile(input: FileUploadInput): Promise<FileUploadResult>;
916
943
  requestDownloadToken(cwd: string, path: string, requestId?: string): Promise<FileDownloadTokenPayload>;
917
944
  requestProjectIcon(cwd: string, requestId?: string): Promise<ProjectIconResponse["payload"]>;
@@ -938,6 +965,40 @@ export declare class DaemonClient {
938
965
  config: MutableDaemonConfig;
939
966
  }>;
940
967
  getDaemonStatus(options?: DaemonStatusOptions): Promise<DaemonStatusPayload>;
968
+ connectHub(hubUrl: string, token: string, requestId?: string): Promise<{
969
+ requestId: string;
970
+ status: {
971
+ state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
972
+ daemonId: string | null;
973
+ hubOrigin: string | null;
974
+ scopes: string[];
975
+ connectedAt: string | null;
976
+ lastError: string | null;
977
+ };
978
+ }>;
979
+ getHubStatus(requestId?: string): Promise<{
980
+ requestId: string;
981
+ status: {
982
+ state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
983
+ daemonId: string | null;
984
+ hubOrigin: string | null;
985
+ scopes: string[];
986
+ connectedAt: string | null;
987
+ lastError: string | null;
988
+ };
989
+ }>;
990
+ disconnectHub(force?: boolean, requestId?: string): Promise<{
991
+ requestId: string;
992
+ status: {
993
+ state: "connecting" | "connected" | "not_connected" | "reconnecting" | "disconnecting" | "revoked";
994
+ daemonId: string | null;
995
+ hubOrigin: string | null;
996
+ scopes: string[];
997
+ connectedAt: string | null;
998
+ lastError: string | null;
999
+ };
1000
+ warning?: string | undefined;
1001
+ }>;
941
1002
  getDaemonPairingOffer(options?: DaemonPairingOfferOptions): Promise<DaemonPairingOfferPayload>;
942
1003
  collectDiagnostics(requestId?: string): Promise<DiagnosticsPayload>;
943
1004
  patchDaemonConfig(config: MutableDaemonConfigPatch, requestId?: string): Promise<{
@@ -1028,6 +1089,7 @@ export declare class DaemonClient {
1028
1089
  waitForTerminalStreamEvent(predicate: (event: TerminalStreamEvent) => boolean, timeout?: number): Promise<TerminalStreamEvent>;
1029
1090
  private createRequestId;
1030
1091
  getLastServerInfoMessage(): ServerInfoStatusPayload | null;
1092
+ private requireHubRelationshipSupport;
1031
1093
  private resolveTransportUrlForAttempt;
1032
1094
  private sendHelloMessage;
1033
1095
  private disposeTransport;
@@ -158,6 +158,7 @@ function legacyExplorerFileToBytes(file) {
158
158
  path: file.path,
159
159
  kind: file.kind,
160
160
  modifiedAt: file.modifiedAt,
161
+ revision: file.revision,
161
162
  };
162
163
  }
163
164
  function binaryFileKind(mime, encoding) {
@@ -230,6 +231,7 @@ export class DaemonClient {
230
231
  this.connectionState = { status: "idle" };
231
232
  this.checkoutDiffSubscriptions = new Map();
232
233
  this.terminalDirectorySubscriptions = new Map();
234
+ this.fileSubscriptions = new Map();
233
235
  this.terminalStreams = new TerminalStreamRouter();
234
236
  this.pendingBinaryFileReads = new Map();
235
237
  this.activeBinaryFileTransfers = new Map();
@@ -478,6 +480,7 @@ export class DaemonClient {
478
480
  this.rejectPendingSendQueue(new Error("Daemon client closed"));
479
481
  this.rejectPingProbe(new Error("Daemon client closed"));
480
482
  this.terminalStreams.clearSlots();
483
+ this.fileSubscriptions.clear();
481
484
  this.lastServerInfoMessage = null;
482
485
  if (this.runtimeMetricsInterval) {
483
486
  clearInterval(this.runtimeMetricsInterval);
@@ -556,6 +559,28 @@ export class DaemonClient {
556
559
  }
557
560
  };
558
561
  }
562
+ onAgentAttentionRequired(handler) {
563
+ const unsubscribeLegacy = this.on("agent_stream", (message) => {
564
+ if (message.payload.event.type !== "attention_required") {
565
+ return;
566
+ }
567
+ const event = message.payload.event;
568
+ handler({
569
+ agentId: message.payload.agentId,
570
+ reason: event.reason,
571
+ timestamp: event.timestamp,
572
+ shouldNotify: event.shouldNotify,
573
+ ...(event.notification ? { notification: event.notification } : {}),
574
+ });
575
+ });
576
+ const unsubscribeDedicated = this.on("agent_attention_required", (message) => {
577
+ handler(message.payload);
578
+ });
579
+ return () => {
580
+ unsubscribeLegacy();
581
+ unsubscribeDedicated();
582
+ };
583
+ }
559
584
  // ============================================================================
560
585
  // Core Send Helpers
561
586
  // ============================================================================
@@ -1183,6 +1208,21 @@ export class DaemonClient {
1183
1208
  });
1184
1209
  }
1185
1210
  }
1211
+ resubscribeFileSubscriptions() {
1212
+ for (const [subscriptionId, subscription] of this.fileSubscriptions) {
1213
+ void this.sendCorrelatedSessionRequest({
1214
+ message: {
1215
+ type: "fs.file.subscribe.request",
1216
+ cwd: subscription.cwd,
1217
+ path: subscription.path,
1218
+ subscriptionId,
1219
+ },
1220
+ responseType: "fs.file.subscribe.response",
1221
+ })
1222
+ .then((payload) => subscription.onUpdate(payload.initial))
1223
+ .catch(() => undefined);
1224
+ }
1225
+ }
1186
1226
  // ============================================================================
1187
1227
  // Agent Lifecycle
1188
1228
  // ============================================================================
@@ -1195,6 +1235,7 @@ export class DaemonClient {
1195
1235
  config,
1196
1236
  ...(options.env ? { env: options.env } : {}),
1197
1237
  ...(options.workspaceId !== undefined ? { workspaceId: options.workspaceId } : {}),
1238
+ ...(options.callerAgentId !== undefined ? { callerAgentId: options.callerAgentId } : {}),
1198
1239
  ...(options.initialPrompt ? { initialPrompt: options.initialPrompt } : {}),
1199
1240
  ...(options.clientMessageId ? { clientMessageId: options.clientMessageId } : {}),
1200
1241
  ...(options.outputSchema ? { outputSchema: options.outputSchema } : {}),
@@ -1563,6 +1604,32 @@ export class DaemonClient {
1563
1604
  }
1564
1605
  return payload;
1565
1606
  }
1607
+ async setAgentTimelineSubscription(agentIds) {
1608
+ // COMPAT(selectiveAgentTimeline): added in v0.1.106. Old daemons keep their
1609
+ // legacy global stream and do not understand this RPC. Remove after
1610
+ // 2027-01-12 once the supported daemon floor is >= v0.1.106.
1611
+ if (!this.lastServerInfoMessage?.features?.selectiveAgentTimeline) {
1612
+ return;
1613
+ }
1614
+ const requestId = this.createRequestId();
1615
+ const normalizedAgentIds = [...new Set(agentIds)].sort();
1616
+ const message = SessionInboundMessageSchema.parse({
1617
+ type: "agent.timeline.set_subscription.request",
1618
+ agentIds: normalizedAgentIds,
1619
+ requestId,
1620
+ });
1621
+ await this.sendRequest({
1622
+ requestId,
1623
+ message,
1624
+ options: { skipQueue: true },
1625
+ select: (response) => {
1626
+ if (response.type !== "agent.timeline.set_subscription.response") {
1627
+ return null;
1628
+ }
1629
+ return response.payload.requestId === requestId ? response.payload : null;
1630
+ },
1631
+ });
1632
+ }
1566
1633
  async buildAgentForkContext(agentId, options = {}) {
1567
1634
  const resolvedRequestId = this.createRequestId(options.requestId);
1568
1635
  const message = SessionInboundMessageSchema.parse({
@@ -2616,6 +2683,43 @@ export class DaemonClient {
2616
2683
  this.activeBinaryFileTransfers.delete(resolvedRequestId);
2617
2684
  }
2618
2685
  }
2686
+ async subscribeFile(input, onUpdate) {
2687
+ const subscriptionId = this.createRequestId();
2688
+ this.fileSubscriptions.set(subscriptionId, { ...input, onUpdate });
2689
+ try {
2690
+ const payload = await this.sendCorrelatedSessionRequest({
2691
+ message: {
2692
+ type: "fs.file.subscribe.request",
2693
+ cwd: input.cwd,
2694
+ path: input.path,
2695
+ subscriptionId,
2696
+ },
2697
+ responseType: "fs.file.subscribe.response",
2698
+ });
2699
+ return {
2700
+ initial: payload.initial,
2701
+ unsubscribe: () => {
2702
+ if (!this.fileSubscriptions.delete(subscriptionId))
2703
+ return;
2704
+ void this.sendCorrelatedSessionRequest({
2705
+ message: { type: "fs.file.unsubscribe.request", subscriptionId },
2706
+ responseType: "fs.file.unsubscribe.response",
2707
+ }).catch(() => undefined);
2708
+ },
2709
+ };
2710
+ }
2711
+ catch (error) {
2712
+ this.fileSubscriptions.delete(subscriptionId);
2713
+ throw error;
2714
+ }
2715
+ }
2716
+ async writeFile(input) {
2717
+ const payload = await this.sendCorrelatedSessionRequest({
2718
+ message: { type: "fs.file.write.request", ...input },
2719
+ responseType: "fs.file.write.response",
2720
+ });
2721
+ return payload.result;
2722
+ }
2619
2723
  async uploadFile(input) {
2620
2724
  const bytes = asUint8Array(input.bytes);
2621
2725
  if (!bytes) {
@@ -2761,6 +2865,30 @@ export class DaemonClient {
2761
2865
  timeout: options?.timeout,
2762
2866
  });
2763
2867
  }
2868
+ async connectHub(hubUrl, token, requestId) {
2869
+ this.requireHubRelationshipSupport();
2870
+ return this.sendCorrelatedSessionRequest({
2871
+ requestId,
2872
+ message: { type: "hub.management.daemon.connect.request", hubUrl, token },
2873
+ responseType: "hub.management.daemon.connect.response",
2874
+ });
2875
+ }
2876
+ async getHubStatus(requestId) {
2877
+ this.requireHubRelationshipSupport();
2878
+ return this.sendCorrelatedSessionRequest({
2879
+ requestId,
2880
+ message: { type: "hub.management.daemon.get_status.request" },
2881
+ responseType: "hub.management.daemon.get_status.response",
2882
+ });
2883
+ }
2884
+ async disconnectHub(force = false, requestId) {
2885
+ this.requireHubRelationshipSupport();
2886
+ return this.sendCorrelatedSessionRequest({
2887
+ requestId,
2888
+ message: { type: "hub.management.daemon.disconnect.request", force },
2889
+ responseType: "hub.management.daemon.disconnect.response",
2890
+ });
2891
+ }
2764
2892
  async getDaemonPairingOffer(options) {
2765
2893
  return this.sendCorrelatedSessionRequest({
2766
2894
  requestId: options?.requestId,
@@ -3449,6 +3577,12 @@ export class DaemonClient {
3449
3577
  getLastServerInfoMessage() {
3450
3578
  return this.lastServerInfoMessage;
3451
3579
  }
3580
+ requireHubRelationshipSupport() {
3581
+ // COMPAT(hubRelationship): added in v0.1.X, drop the gate when floor >= v0.1.X.
3582
+ if (this.lastServerInfoMessage?.features?.hubRelationship !== true) {
3583
+ throw new Error("Update the host to use Hub relationship management.");
3584
+ }
3585
+ }
3452
3586
  resolveTransportUrlForAttempt() {
3453
3587
  return this.config.url;
3454
3588
  }
@@ -3472,6 +3606,7 @@ export class DaemonClient {
3472
3606
  [CLIENT_CAPS.reasoningMergeEnum]: true,
3473
3607
  [CLIENT_CAPS.terminalReflowableSnapshot]: true,
3474
3608
  [CLIENT_CAPS.providerSubagents]: true,
3609
+ [CLIENT_CAPS.projectUpdates]: true,
3475
3610
  ...this.config.capabilities,
3476
3611
  },
3477
3612
  ...(this.config.appVersion ? { appVersion: this.config.appVersion } : {}),
@@ -3628,6 +3763,7 @@ export class DaemonClient {
3628
3763
  size: frame.metadata.size,
3629
3764
  encoding: frame.metadata.encoding,
3630
3765
  modifiedAt: frame.metadata.modifiedAt,
3766
+ revision: frame.metadata.revision,
3631
3767
  chunks: [],
3632
3768
  });
3633
3769
  return;
@@ -3649,6 +3785,7 @@ export class DaemonClient {
3649
3785
  path: transfer.path,
3650
3786
  kind: binaryFileKind(transfer.mime, transfer.encoding),
3651
3787
  modifiedAt: transfer.modifiedAt,
3788
+ revision: transfer.revision,
3652
3789
  });
3653
3790
  this.handleSessionMessage({
3654
3791
  type: "file_explorer_response",
@@ -3797,6 +3934,7 @@ export class DaemonClient {
3797
3934
  this.startLivenessHeartbeat();
3798
3935
  this.resubscribeCheckoutDiffSubscriptions();
3799
3936
  this.resubscribeTerminalDirectorySubscriptions();
3937
+ this.resubscribeFileSubscriptions();
3800
3938
  this.flushPendingSendQueue();
3801
3939
  this.resolveConnect();
3802
3940
  }
@@ -3805,6 +3943,11 @@ export class DaemonClient {
3805
3943
  if (consumerMessage.type === "terminal_stream_exit") {
3806
3944
  this.terminalStreams.removeTerminal(consumerMessage.payload.terminalId);
3807
3945
  }
3946
+ if (consumerMessage.type === "fs.file.update") {
3947
+ this.fileSubscriptions
3948
+ .get(consumerMessage.payload.subscriptionId)
3949
+ ?.onUpdate(consumerMessage.payload.version);
3950
+ }
3808
3951
  if (this.rawMessageListeners.size > 0) {
3809
3952
  for (const handler of this.rawMessageListeners) {
3810
3953
  try {
@@ -3881,6 +4024,8 @@ export class DaemonClient {
3881
4024
  workspaceId: msg.payload.kind === "upsert" ? msg.payload.workspace.id : msg.payload.id,
3882
4025
  payload: msg.payload,
3883
4026
  };
4027
+ case "project.update":
4028
+ return { type: "project.update", payload: msg.payload };
3884
4029
  case "workspace_setup_progress":
3885
4030
  return {
3886
4031
  type: "workspace_setup_progress",
package/dist/index.d.ts CHANGED
@@ -118,13 +118,13 @@ export interface PaseoAgentCreateOptions extends PaseoAgentConfigOverrides {
118
118
  provider?: CreateAgentRequestMessage["config"]["provider"];
119
119
  cwd?: string;
120
120
  workspaceId?: string;
121
+ callerAgentId?: string;
121
122
  initialPrompt?: string;
122
123
  clientMessageId?: string;
123
124
  outputSchema?: Record<string, unknown>;
124
125
  images?: CreateAgentRequestMessage["images"];
125
126
  attachments?: CreateAgentRequestMessage["attachments"];
126
127
  git?: CreateAgentRequestMessage["git"];
127
- worktreeName?: string;
128
128
  requestId?: string;
129
129
  labels?: Record<string, string>;
130
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/client",
3
- "version": "0.2.0-beta.1",
3
+ "version": "0.2.0-beta.2",
4
4
  "description": "Paseo client SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -35,8 +35,8 @@
35
35
  "test": "vitest run"
36
36
  },
37
37
  "dependencies": {
38
- "@getpaseo/protocol": "0.2.0-beta.1",
39
- "@getpaseo/relay": "0.2.0-beta.1",
38
+ "@getpaseo/protocol": "0.2.0-beta.2",
39
+ "@getpaseo/relay": "0.2.0-beta.2",
40
40
  "zod": "^4.4.3"
41
41
  },
42
42
  "devDependencies": {