@yinaoxiong/paseo-client 0.18.2-personal.1 → 0.18.2-personal.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.
package/build-info.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "upstreamVersion": "0.18.2",
4
- "revision": 1,
5
- "version": "0.18.2-personal.1",
4
+ "revision": 2,
5
+ "version": "0.18.2-personal.2",
6
6
  "appVersion": "0.18.2",
7
- "androidVersionCode": 18002001,
8
- "iosBuildNumber": "18002999",
9
- "sourceSha": "35a005da22b19f1f747c07787b4a779e6d9a3708",
7
+ "androidVersionCode": 18002002,
8
+ "iosBuildNumber": "18002002",
9
+ "sourceSha": "96a72e49e867e89043fe70bbac4afe6921d1f477",
10
10
  "lockSha256": "8bcf4983ccfa57cfa444ec7ecbad301c8fef0fcc2c495df5176758cf1e2f2faa",
11
11
  "nodeVersion": "v24.21.0",
12
12
  "npmVersion": "11.19.0",
@@ -14,5 +14,5 @@
14
14
  "arch": "x64",
15
15
  "signature": "unsigned",
16
16
  "packageName": "@yinaoxiong/paseo-client",
17
- "desktopVersion": "0.18.2+personal.1"
17
+ "desktopVersion": "0.18.2+personal.2"
18
18
  }
@@ -1,6 +1,7 @@
1
1
  import { type DiffCompare, type DiffState } from "./diff/index.js";
2
2
  import { type HostRouteFrame } from "@getpaseo/protocol/binary-frames/host-route";
3
3
  import type { HostAdd, HostUpdate, HostDirectory } from "@getpaseo/protocol/hosts";
4
+ import type { UpdateScheduleNewAgentConfigInput } from "@getpaseo/protocol/schedule/types";
4
5
  import type { PluginListingDetail, PluginListingIndex } from "@getpaseo/protocol/plugin-registry";
5
6
  import { type TimelineMessage } from "./timeline-subscription/index.js";
6
7
  import { type OwnedSubscription, type TimelineSubscription } from "./connection/index.js";
@@ -590,16 +591,7 @@ export interface InspectScheduleOptions {
590
591
  id: string;
591
592
  requestId?: string;
592
593
  }
593
- export interface UpdateScheduleNewAgentConfig {
594
- provider?: string;
595
- model?: string | null;
596
- modeId?: string | null;
597
- thinkingOptionId?: string | null;
598
- featureValues?: Record<string, unknown> | null;
599
- archiveOnFinish?: boolean;
600
- isolation?: "local" | "worktree";
601
- cwd?: string;
602
- }
594
+ export type UpdateScheduleNewAgentConfig = UpdateScheduleNewAgentConfigInput;
603
595
  export interface UpdateScheduleOptions {
604
596
  id: string;
605
597
  name?: string | null;
@@ -1158,6 +1150,7 @@ export declare class DaemonClientCore {
1158
1150
  audioPlayed(id: string): Promise<void>;
1159
1151
  getCheckoutStatus(cwd: string, options?: {
1160
1152
  requestId?: string;
1153
+ projectSelection?: boolean;
1161
1154
  }): Promise<CheckoutStatusPayload>;
1162
1155
  private normalizeCheckoutDiffCompare;
1163
1156
  getCheckoutDiff(cwd: string, compare: {
@@ -1190,7 +1183,9 @@ export declare class DaemonClientCore {
1190
1183
  }, requestId?: string): Promise<CheckoutMergeFromBasePayload>;
1191
1184
  checkoutPull(cwd: string, requestId?: string): Promise<CheckoutPullPayload>;
1192
1185
  checkoutPush(cwd: string, requestId?: string): Promise<CheckoutPushPayload>;
1193
- checkoutRefresh(cwd: string, requestId?: string): Promise<CheckoutRefreshPayload>;
1186
+ checkoutRefresh(cwd: string, requestId?: string, options?: {
1187
+ includeForge?: boolean;
1188
+ }): Promise<CheckoutRefreshPayload>;
1194
1189
  listCheckoutCommits(cwd: string, requestId?: string): Promise<{
1195
1190
  baseRef: string | null;
1196
1191
  commits: CheckoutCommit[];
@@ -1235,7 +1230,9 @@ export declare class DaemonClientCore {
1235
1230
  checkRunId?: number;
1236
1231
  workflowRunId?: number;
1237
1232
  }, requestId?: string): Promise<CheckoutGithubGetCheckDetailsPayload>;
1238
- checkoutPrStatus(cwd: string, requestId?: string): Promise<CheckoutPrStatusPayload>;
1233
+ checkoutPrStatus(cwd: string, requestId?: string, options?: {
1234
+ projectSelection?: boolean;
1235
+ }): Promise<CheckoutPrStatusPayload>;
1239
1236
  pullRequestTimeline(input: {
1240
1237
  cwd: string;
1241
1238
  prNumber: number;
@@ -1528,6 +1525,7 @@ export declare class DaemonClientCore {
1528
1525
  contextWindowMaxTokens?: number | undefined;
1529
1526
  };
1530
1527
  }>;
1528
+ supportsSideChatCreationIdentity(): boolean;
1531
1529
  private requireNativeSideChat;
1532
1530
  listCommands(options: ListCommandsOptions): Promise<ListCommandsPayload>;
1533
1531
  listCommands(agentId: string, requestId?: string): Promise<ListCommandsPayload>;
@@ -2,6 +2,7 @@ import { DiffStreamRouter, DiffSubscriptionError, } from "./diff/index.js";
2
2
  import { ChunkedTransport, ChunkedTransportProtocolError, } from "@getpaseo/protocol/chunked-transport";
3
3
  import { HOST_ROUTE_OPCODE, encodeHostRouteFrame, decodeHostRouteFrame, } from "@getpaseo/protocol/binary-frames/host-route";
4
4
  import { messageTooLargeError } from "./daemon-client-transport-utils.js";
5
+ import { normalizeScheduleTarget, normalizeScheduleUpdateConfig, } from "@getpaseo/protocol/schedule/normalize-options";
5
6
  import { legacyUsageIcon } from "./legacy-usage-icons.js";
6
7
  import { subscribeTimeline } from "./timeline-subscription/index.js";
7
8
  import { ProviderSnapshotUpdates } from "./provider-snapshots/index.js";
@@ -376,6 +377,25 @@ function buildFetchAgentsRequest(options, requestId, codec) {
376
377
  : {}),
377
378
  });
378
379
  }
380
+ function normalizeScheduleMessage(msg) {
381
+ switch (msg.type) {
382
+ case "schedule/list/response":
383
+ for (const schedule of msg.payload.schedules) {
384
+ schedule.target = normalizeScheduleTarget(schedule.target);
385
+ }
386
+ break;
387
+ case "schedule/create/response":
388
+ case "schedule/inspect/response":
389
+ case "schedule/pause/response":
390
+ case "schedule/resume/response":
391
+ case "schedule/run-once/response":
392
+ case "schedule/update/response":
393
+ if (msg.payload.schedule) {
394
+ msg.payload.schedule.target = normalizeScheduleTarget(msg.payload.schedule.target);
395
+ }
396
+ break;
397
+ }
398
+ }
379
399
  export class DaemonClientCore {
380
400
  constructor(config) {
381
401
  this.config = config;
@@ -3326,7 +3346,8 @@ export class DaemonClientCore {
3326
3346
  // ============================================================================
3327
3347
  async getCheckoutStatus(cwd, options) {
3328
3348
  const requestId = options?.requestId;
3329
- if (!requestId) {
3349
+ const deduplicate = !requestId && !options?.projectSelection;
3350
+ if (deduplicate) {
3330
3351
  const existing = this.checkoutStatusInFlight.get(cwd);
3331
3352
  if (existing) {
3332
3353
  return existing;
@@ -3337,6 +3358,7 @@ export class DaemonClientCore {
3337
3358
  type: "checkout_status_request",
3338
3359
  cwd,
3339
3360
  requestId: resolvedRequestId,
3361
+ ...(options?.projectSelection ? { projectSelection: true } : {}),
3340
3362
  });
3341
3363
  const responsePromise = this.sendRequest({
3342
3364
  requestId: resolvedRequestId,
@@ -3352,7 +3374,7 @@ export class DaemonClientCore {
3352
3374
  return msg.payload;
3353
3375
  },
3354
3376
  });
3355
- if (!requestId) {
3377
+ if (deduplicate) {
3356
3378
  this.checkoutStatusInFlight.set(cwd, responsePromise);
3357
3379
  void responsePromise
3358
3380
  .finally(() => {
@@ -3475,12 +3497,16 @@ export class DaemonClientCore {
3475
3497
  responseType: "checkout_push_response",
3476
3498
  });
3477
3499
  }
3478
- async checkoutRefresh(cwd, requestId) {
3500
+ async checkoutRefresh(cwd, requestId, options) {
3501
+ if (options?.includeForge === false &&
3502
+ this.lastServerInfoMessage?.features?.checkoutLocalRefresh !== true)
3503
+ throw new Error("Update this host to refresh Git without contacting its forge");
3479
3504
  return this.sendCorrelatedSessionRequest({
3480
3505
  requestId,
3481
3506
  message: {
3482
3507
  type: "checkout.refresh.request",
3483
3508
  cwd,
3509
+ ...(options?.includeForge !== undefined ? { includeForge: options.includeForge } : {}),
3484
3510
  },
3485
3511
  responseType: "checkout.refresh.response",
3486
3512
  });
@@ -3605,12 +3631,13 @@ export class DaemonClientCore {
3605
3631
  },
3606
3632
  });
3607
3633
  }
3608
- async checkoutPrStatus(cwd, requestId) {
3634
+ async checkoutPrStatus(cwd, requestId, options) {
3609
3635
  return this.sendCorrelatedSessionRequest({
3610
3636
  requestId,
3611
3637
  message: {
3612
3638
  type: "checkout_pr_status_request",
3613
3639
  cwd,
3640
+ ...(options?.projectSelection ? { projectSelection: true } : {}),
3614
3641
  },
3615
3642
  responseType: "checkout_pr_status_response",
3616
3643
  });
@@ -4601,6 +4628,11 @@ export class DaemonClientCore {
4601
4628
  }
4602
4629
  async executeSideChat(agentId, sideId, action) {
4603
4630
  this.requireNativeSideChat();
4631
+ if ((action.kind === "create" || action.kind === "close") &&
4632
+ action.creationId !== undefined &&
4633
+ !this.supportsSideChatCreationIdentity()) {
4634
+ throw new Error("Update this host to safely open a new Codex side chat");
4635
+ }
4604
4636
  const response = await this.sendCorrelatedSessionRequest({
4605
4637
  message: { type: "agent.sidechat.execute.request", agentId, sideId, action },
4606
4638
  responseType: "agent.sidechat.execute.response",
@@ -4612,6 +4644,9 @@ export class DaemonClientCore {
4612
4644
  this.requireNativeSideChat();
4613
4645
  return this.observe("agent.sidechat.subscribe.response", { type: "agent.sidechat.subscribe.request", agentId }, { signal });
4614
4646
  }
4647
+ supportsSideChatCreationIdentity() {
4648
+ return this.lastServerInfoMessage?.features?.sideChatCreationIdentity === true;
4649
+ }
4615
4650
  requireNativeSideChat() {
4616
4651
  if (this.lastServerInfoMessage?.features?.nativeSideChat !== true) {
4617
4652
  throw new Error("Update this host to use native Codex side chats");
@@ -5298,17 +5333,20 @@ export class DaemonClientCore {
5298
5333
  }
5299
5334
  async scheduleCreate(options) {
5300
5335
  if (options.target.type === "new-agent") {
5301
- this.requireContextWindowSettings(options.target.config.featureValues);
5302
- this.requireContextWindowSettings(options.target.config.providerOptions);
5303
5336
  this.requireScheduleAgentSettings(options.target.config.featureValues);
5304
5337
  }
5338
+ const target = options.target.type === "new-agent"
5339
+ ? normalizeScheduleTarget(options.target)
5340
+ : options.target;
5341
+ if (target.type === "new-agent")
5342
+ this.requireContextWindowSettings(target.config.providerOptions);
5305
5343
  return this.sendCorrelatedSessionRequest({
5306
5344
  requestId: options.requestId,
5307
5345
  message: {
5308
5346
  type: "schedule/create",
5309
5347
  prompt: options.prompt,
5310
5348
  cadence: options.cadence,
5311
- target: options.target,
5349
+ target,
5312
5350
  ...(options.name ? { name: options.name } : {}),
5313
5351
  ...(typeof options.maxRuns === "number" ? { maxRuns: options.maxRuns } : {}),
5314
5352
  ...(options.expiresAt ? { expiresAt: options.expiresAt } : {}),
@@ -5386,32 +5424,35 @@ export class DaemonClientCore {
5386
5424
  responseType: "schedule/run-once/response",
5387
5425
  });
5388
5426
  }
5389
- async requireCompatibleScheduleUpdate(options) {
5390
- this.requireScheduleAgentSettings(options.newAgentConfig?.featureValues);
5391
- const patch = options.newAgentConfig;
5392
- // Old daemons retain hidden model-specific features on identity changes.
5393
- // Inspect only when needed; ordinary edits and same-identity submissions remain compatible.
5394
- if (!this.lastServerInfoMessage?.features?.scheduleAgentSettings &&
5395
- (patch?.provider !== undefined || patch?.model !== undefined)) {
5396
- const current = await this.scheduleInspect({ id: options.id });
5397
- if (current.error || !current.schedule)
5398
- throw new Error(current.error ?? "Schedule not found");
5399
- if (current.schedule.target.type === "new-agent") {
5400
- const config = current.schedule.target.config;
5401
- const providerChanged = patch.provider !== undefined && patch.provider.trim() !== config.provider;
5402
- const modelChanged = patch.model !== undefined && (patch.model?.trim() || undefined) !== config.model;
5403
- if (providerChanged || modelChanged)
5404
- this.requireScheduleAgentSettings(config.featureValues);
5405
- }
5427
+ async requireCompatibleScheduleUpdate(id, patch) {
5428
+ const changesOptions = patch.providerOptions !== undefined;
5429
+ this.requireScheduleAgentSettings(patch.providerOptions);
5430
+ if (!changesOptions && patch.provider === undefined && patch.model === undefined)
5431
+ return;
5432
+ // Older private builds advertised settings support while handling only featureValues updates.
5433
+ const current = await this.scheduleInspect({ id });
5434
+ if (current.error || !current.schedule)
5435
+ throw new Error(current.error ?? "Schedule not found");
5436
+ if (current.supportsProviderOptionsUpdate)
5437
+ return;
5438
+ if (current.schedule.target.type !== "new-agent")
5439
+ return;
5440
+ const config = current.schedule.target.config;
5441
+ const providerChanged = patch.provider !== undefined && patch.provider.trim() !== config.provider;
5442
+ const modelChanged = patch.model !== undefined && (patch.model?.trim() || undefined) !== config.model;
5443
+ if (changesOptions ||
5444
+ ((providerChanged || modelChanged) && Object.keys(config.providerOptions ?? {}).length)) {
5445
+ throw new Error("This host does not support providerOptions updates for schedules. Update the host daemon before changing schedule features.");
5406
5446
  }
5407
5447
  }
5408
5448
  async scheduleUpdate(options) {
5409
- this.requireContextWindowSettings(options.newAgentConfig?.featureValues);
5410
- this.requireScheduleAgentSettings(options.newAgentConfig?.featureValues);
5411
- if (!this.lastServerInfoMessage?.features?.scheduleAgentSettings &&
5412
- (options.newAgentConfig?.provider !== undefined ||
5413
- options.newAgentConfig?.model !== undefined)) {
5414
- await this.requireCompatibleScheduleUpdate(options);
5449
+ const patch = options.newAgentConfig && normalizeScheduleUpdateConfig(options.newAgentConfig);
5450
+ this.requireContextWindowSettings(patch?.providerOptions);
5451
+ if (patch &&
5452
+ (patch.providerOptions !== undefined ||
5453
+ patch.provider !== undefined ||
5454
+ patch.model !== undefined)) {
5455
+ await this.requireCompatibleScheduleUpdate(options.id, patch);
5415
5456
  }
5416
5457
  return this.sendCorrelatedSessionRequest({
5417
5458
  requestId: options.requestId,
@@ -5421,7 +5462,7 @@ export class DaemonClientCore {
5421
5462
  ...(options.name !== undefined ? { name: options.name } : {}),
5422
5463
  ...(options.prompt !== undefined ? { prompt: options.prompt } : {}),
5423
5464
  ...(options.cadence !== undefined ? { cadence: options.cadence } : {}),
5424
- ...(options.newAgentConfig !== undefined ? { newAgentConfig: options.newAgentConfig } : {}),
5465
+ ...(patch === undefined ? {} : { newAgentConfig: patch }),
5425
5466
  ...(options.maxRuns !== undefined ? { maxRuns: options.maxRuns } : {}),
5426
5467
  ...(options.expiresAt !== undefined ? { expiresAt: options.expiresAt } : {}),
5427
5468
  },
@@ -6014,6 +6055,7 @@ export class DaemonClientCore {
6014
6055
  handleSessionMessage(msg) {
6015
6056
  msg = this.owned.normalize(msg);
6016
6057
  msg = this.legacyProviderOptions()?.normalize(msg) ?? msg;
6058
+ normalizeScheduleMessage(msg);
6017
6059
  if (msg.type === "fs.download.response") {
6018
6060
  this.streamingDownloads.get(msg.payload.requestId)?.response(msg.payload.error);
6019
6061
  }
@@ -1,4 +1,4 @@
1
- import { DiffOpcode, materializeDiffFile, } from "@getpaseo/protocol/binary-frames/diff";
1
+ import { isSupersededDiffError, DiffOpcode, materializeDiffFile, } from "@getpaseo/protocol/binary-frames/diff";
2
2
  /** Owns revision assembly. End, rather than a local body count, commits the snapshot. */
3
3
  export class DiffStream {
4
4
  constructor(publish) {
@@ -37,6 +37,8 @@ export class DiffStream {
37
37
  }
38
38
  this.pending = null;
39
39
  if (frame.error) {
40
+ if (isSupersededDiffError(frame.error))
41
+ return;
40
42
  this.committed = null;
41
43
  this.publish({ phase: "error", revision: frame.revision, error: frame.error });
42
44
  return;
package/dist/index.d.ts CHANGED
@@ -324,7 +324,9 @@ export interface PaseoAgentBackgroundWorkSubscribeOptions {
324
324
  onError?: (error: unknown) => void;
325
325
  }
326
326
  export interface PaseoSideChatActions {
327
- create(): Promise<import("@getpaseo/protocol/messages").SideChatSnapshot>;
327
+ supportsCreationIdentity?(): boolean;
328
+ create(creationId?: string): Promise<import("@getpaseo/protocol/messages").SideChatSnapshot>;
329
+ retireCreation?(creationId: string): Promise<import("@getpaseo/protocol/messages").SideChatSnapshot>;
328
330
  send(sideId: string, text: string, idempotencyKey: string): Promise<import("@getpaseo/protocol/messages").SideChatSnapshot>;
329
331
  stop(sideId: string): Promise<import("@getpaseo/protocol/messages").SideChatSnapshot>;
330
332
  close(sideId: string): Promise<import("@getpaseo/protocol/messages").SideChatSnapshot>;
package/dist/index.js CHANGED
@@ -497,7 +497,9 @@ function createAgentHandleFactory(daemonClient, listen, subscribeTimeline, obser
497
497
  return result;
498
498
  },
499
499
  sidechat: {
500
- create: () => daemonClient.executeSideChat(id, undefined, { kind: "create" }),
500
+ supportsCreationIdentity: () => daemonClient.supportsSideChatCreationIdentity(),
501
+ create: (creationId) => daemonClient.executeSideChat(id, undefined, { kind: "create", creationId }),
502
+ retireCreation: (creationId) => daemonClient.executeSideChat(id, undefined, { kind: "close", creationId }),
501
503
  send: (sideId, text, idempotencyKey) => daemonClient.executeSideChat(id, sideId, { kind: "send", text, idempotencyKey }),
502
504
  stop: (sideId) => daemonClient.executeSideChat(id, sideId, { kind: "stop" }),
503
505
  close: (sideId) => daemonClient.executeSideChat(id, sideId, { kind: "close" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yinaoxiong/paseo-client",
3
- "version": "0.18.2-personal.1",
3
+ "version": "0.18.2-personal.2",
4
4
  "description": "Paseo client SDK package",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -50,7 +50,7 @@
50
50
  "tag": "latest"
51
51
  },
52
52
  "dependencies": {
53
- "@getpaseo/protocol": "npm:@yinaoxiong/paseo-protocol@0.18.2-personal.1",
53
+ "@getpaseo/protocol": "npm:@yinaoxiong/paseo-protocol@0.18.2-personal.2",
54
54
  "@getpaseo/relay": "0.18.2",
55
55
  "ws": "8.20.0",
56
56
  "zod": "4.4.3"