@bytetrue/byspace 0.11.2 → 0.11.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.
Files changed (18) hide show
  1. package/node_modules/@getpaseo/client/dist/daemon-client.d.ts +6 -2
  2. package/node_modules/@getpaseo/client/dist/daemon-client.js +13 -2
  3. package/node_modules/@getpaseo/client/package.json +3 -3
  4. package/node_modules/@getpaseo/highlight/package.json +1 -1
  5. package/node_modules/@getpaseo/plugin/package.json +5 -5
  6. package/node_modules/@getpaseo/protocol/package.json +1 -1
  7. package/node_modules/@getpaseo/relay/package.json +1 -1
  8. package/node_modules/@getpaseo/server/dist/server/server/agent/agent-manager.d.ts +2 -0
  9. package/node_modules/@getpaseo/server/dist/server/server/agent/agent-manager.js +26 -0
  10. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/{index-b212198c3637c3d62c7f576170b813d4.js → index-dc967c46563553e5ecaba6b78fe47585.js} +15 -15
  11. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/index-dc967c46563553e5ecaba6b78fe47585.js.br +0 -0
  12. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/{index-b212198c3637c3d62c7f576170b813d4.js.gz → index-dc967c46563553e5ecaba6b78fe47585.js.gz} +0 -0
  13. package/node_modules/@getpaseo/server/dist/server/web-ui/index.html +1 -1
  14. package/node_modules/@getpaseo/server/dist/server/web-ui/index.html.br +0 -0
  15. package/node_modules/@getpaseo/server/dist/server/web-ui/index.html.gz +0 -0
  16. package/node_modules/@getpaseo/server/package.json +6 -6
  17. package/package.json +8 -8
  18. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/index-b212198c3637c3d62c7f576170b813d4.js.br +0 -0
@@ -167,6 +167,10 @@ export interface CreateAgentRequestOptions extends AgentConfigOverrides {
167
167
  worktreeName?: string;
168
168
  requestId?: string;
169
169
  labels?: Record<string, string>;
170
+ /** Overrides the session RPC timeout for the create request. Agent creation
171
+ * spawns a provider process (CLI boot, auth, skills scan); e2e seeds on cold
172
+ * CI machines legitimately exceed the 60s interactive default. */
173
+ timeout?: number;
170
174
  }
171
175
  export interface CreatePaseoWorktreeInput extends Pick<CreatePaseoWorktreeRequest, "cwd" | "projectId" | "worktreeSlug" | "firstAgentContext" | "refName" | "action" | "checkoutSource" | "githubPrNumber"> {
172
176
  }
@@ -815,7 +819,7 @@ export declare class DaemonClient {
815
819
  checkoutCommit(cwd: string, input: {
816
820
  message?: string;
817
821
  addAll?: boolean;
818
- }, requestId?: string): Promise<CheckoutCommitPayload>;
822
+ }, requestId?: string, timeout?: number): Promise<CheckoutCommitPayload>;
819
823
  checkoutMerge(cwd: string, input: {
820
824
  baseRef?: string;
821
825
  strategy?: "merge" | "squash";
@@ -839,7 +843,7 @@ export declare class DaemonClient {
839
843
  title?: string;
840
844
  body?: string;
841
845
  baseRef?: string;
842
- }, requestId?: string): Promise<CheckoutPrCreatePayload>;
846
+ }, requestId?: string, timeout?: number): Promise<CheckoutPrCreatePayload>;
843
847
  checkoutPrMerge(cwd: string, input: {
844
848
  method: CheckoutPrMergeMethod;
845
849
  }, requestId?: string): Promise<CheckoutPrMergePayload>;
@@ -19,6 +19,14 @@ const perfNow = typeof performance !== "undefined" && typeof performance.now ===
19
19
  ? () => performance.now()
20
20
  : () => Date.now();
21
21
  const PROJECT_GITHUB_CLONE_TIMEOUT_MS = 5 * 60 * 1000;
22
+ /**
23
+ * Git metadata RPCs (commit message, PR title/body) run agent LLM generation
24
+ * with retries before the actual git/forge call, so they can legitimately take
25
+ * far longer than the 60s default session RPC timeout. The client timed out
26
+ * first and surfaced an error while the daemon kept going and still completed
27
+ * the operation.
28
+ */
29
+ const CHECKOUT_GIT_METADATA_TIMEOUT_MS = 5 * 60 * 1000;
22
30
  function normalizePassword(value) {
23
31
  if (typeof value !== "string") {
24
32
  return null;
@@ -1432,6 +1440,7 @@ export class DaemonClient {
1432
1440
  const status = await this.sendRequest({
1433
1441
  requestId,
1434
1442
  message,
1443
+ timeout: options.timeout,
1435
1444
  options: { skipQueue: true },
1436
1445
  select: (msg) => {
1437
1446
  if (msg.type !== "status") {
@@ -2504,7 +2513,7 @@ export class DaemonClient {
2504
2513
  subscriptionId,
2505
2514
  });
2506
2515
  }
2507
- async checkoutCommit(cwd, input, requestId) {
2516
+ async checkoutCommit(cwd, input, requestId, timeout) {
2508
2517
  return this.sendCorrelatedSessionRequest({
2509
2518
  requestId,
2510
2519
  message: {
@@ -2514,6 +2523,7 @@ export class DaemonClient {
2514
2523
  addAll: input.addAll,
2515
2524
  },
2516
2525
  responseType: "checkout_commit_response",
2526
+ timeout: timeout ?? CHECKOUT_GIT_METADATA_TIMEOUT_MS,
2517
2527
  });
2518
2528
  }
2519
2529
  async checkoutMerge(cwd, input, requestId) {
@@ -2601,7 +2611,7 @@ export class DaemonClient {
2601
2611
  }
2602
2612
  return { file: payload.file };
2603
2613
  }
2604
- async checkoutPrCreate(cwd, input, requestId) {
2614
+ async checkoutPrCreate(cwd, input, requestId, timeout) {
2605
2615
  return this.sendCorrelatedSessionRequest({
2606
2616
  requestId,
2607
2617
  message: {
@@ -2612,6 +2622,7 @@ export class DaemonClient {
2612
2622
  baseRef: input.baseRef,
2613
2623
  },
2614
2624
  responseType: "checkout_pr_create_response",
2625
+ timeout: timeout ?? CHECKOUT_GIT_METADATA_TIMEOUT_MS,
2615
2626
  });
2616
2627
  }
2617
2628
  async checkoutPrMerge(cwd, input, requestId) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/client",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "BySpace 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.11.2",
43
- "@getpaseo/relay": "0.11.2"
42
+ "@getpaseo/protocol": "0.11.3",
43
+ "@getpaseo/relay": "0.11.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^20.9.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/highlight",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.map",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/plugin",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "BySpace plugin SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "dependencies": {},
44
44
  "devDependencies": {
45
- "@getpaseo/client": "0.11.2",
46
- "@getpaseo/protocol": "0.11.2",
45
+ "@getpaseo/client": "0.11.3",
46
+ "@getpaseo/protocol": "0.11.3",
47
47
  "@types/node": "^20.9.0",
48
48
  "@types/react": "~19.2.0",
49
49
  "react": "19.1.0",
@@ -52,7 +52,7 @@
52
52
  "zod": "^4.4.3"
53
53
  },
54
54
  "peerDependencies": {
55
- "@getpaseo/client": "0.11.2",
56
- "@getpaseo/protocol": "0.11.2"
55
+ "@getpaseo/client": "0.11.3",
56
+ "@getpaseo/protocol": "0.11.3"
57
57
  }
58
58
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/protocol",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "BySpace shared protocol schemas and wire types",
5
5
  "files": [
6
6
  "dist",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/relay",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "BySpace relay for bridging daemon and client connections",
5
5
  "files": [
6
6
  "dist",
@@ -248,6 +248,7 @@ export declare class AgentManager {
248
248
  private readonly agentRegistrationTasks;
249
249
  private readonly inFlightAgentCloses;
250
250
  private readonly lifecycleMutationTails;
251
+ private readonly draftCommandsCache;
251
252
  private readonly agentStreamCoalescer;
252
253
  private mcpBaseUrl;
253
254
  private readonly mcpAuthToken;
@@ -295,6 +296,7 @@ export declare class AgentManager {
295
296
  listProviderAvailability(): Promise<ProviderAvailability[]>;
296
297
  getProviderAvailability(provider: AgentProvider): Promise<ProviderAvailability>;
297
298
  listDraftCommands(config: AgentSessionConfig): Promise<AgentSlashCommand[]>;
299
+ private uncachedListDraftCommands;
298
300
  listDraftFeatures(config: AgentSessionConfig): Promise<AgentFeature[]>;
299
301
  getAgent(id: string): ManagedAgent | null;
300
302
  waitForAgentClose(agentId: string): Promise<void>;
@@ -17,6 +17,7 @@ import { resolveCreateAgentTitles } from "./create-agent-title.js";
17
17
  import { ProviderSubagentStore, } from "./provider-subagents/store.js";
18
18
  const RELOAD_SESSION_CLOSE_TIMEOUT_MS = 3000;
19
19
  const INTERRUPT_SESSION_TIMEOUT_MS = 2000;
20
+ const DRAFT_COMMANDS_CACHE_TTL_MS = 30000;
20
21
  const STORED_AGENT_CAPABILITIES = {
21
22
  supportsStreaming: false,
22
23
  supportsSessionPersistence: true,
@@ -269,6 +270,7 @@ export class AgentManager {
269
270
  this.agentRegistrationTasks = new Set();
270
271
  this.inFlightAgentCloses = new Map();
271
272
  this.lifecycleMutationTails = new Map();
273
+ this.draftCommandsCache = new Map();
272
274
  this.paseoToolsEnabled = true;
273
275
  this.paseoToolCatalogFactory = null;
274
276
  this.acceptingAgentRegistrations = true;
@@ -518,6 +520,30 @@ export class AgentManager {
518
520
  if (!normalizedConfig.model) {
519
521
  return [];
520
522
  }
523
+ // Draft listings spawn a throwaway provider process (pi boots a full RPC session),
524
+ // so reuse a recent result for the same config. Short TTL: commands rarely change,
525
+ // but freshly installed skills should appear without a daemon restart.
526
+ const cacheKey = JSON.stringify([
527
+ normalizedConfig.provider,
528
+ normalizedConfig.cwd,
529
+ normalizedConfig.model,
530
+ normalizedConfig.thinkingOptionId ?? null,
531
+ normalizedConfig.modeId ?? null,
532
+ ]);
533
+ const cached = this.draftCommandsCache.get(cacheKey);
534
+ if (cached && cached.expiresAt > Date.now()) {
535
+ return cached.promise;
536
+ }
537
+ const promise = this.uncachedListDraftCommands(client, normalizedConfig);
538
+ this.draftCommandsCache.set(cacheKey, {
539
+ expiresAt: Date.now() + DRAFT_COMMANDS_CACHE_TTL_MS,
540
+ promise,
541
+ });
542
+ // Do not keep failed listings cached; a retry should hit the provider again.
543
+ promise.catch(() => this.draftCommandsCache.delete(cacheKey));
544
+ return promise;
545
+ }
546
+ async uncachedListDraftCommands(client, normalizedConfig) {
521
547
  const available = await client.isAvailable();
522
548
  if (!available) {
523
549
  throw new Error(`Provider '${normalizedConfig.provider}' is not available. Please ensure the CLI is installed.`);