@adhdev/daemon-core 0.9.23 → 0.9.24

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.
@@ -162,6 +162,7 @@ export interface SessionChatTailUpdate extends ReadChatSyncResult {
162
162
  interactionId?: string;
163
163
  seq: number;
164
164
  timestamp: number;
165
+ error?: string;
165
166
  }
166
167
  export interface SessionRuntimeOutputUpdate {
167
168
  topic: 'session.runtime_output';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/session-host-core",
3
- "version": "0.9.23",
3
+ "version": "0.9.24",
4
4
  "description": "ADHDev local session host core \u2014 session registry, protocol, buffers",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.23",
3
+ "version": "0.9.24",
4
4
  "description": "ADHDev daemon core \u2014 CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2414,8 +2414,12 @@ export class ProviderCliAdapter implements CliAdapter {
2414
2414
  if (buttonIndex in this.approvalKeys) {
2415
2415
  this.ptyProcess.write(this.approvalKeys[buttonIndex]);
2416
2416
  } else {
2417
+ const buttonCount = Array.isArray(modal?.buttons) ? modal.buttons.length : 0;
2418
+ const clampedIndex = buttonCount > 0
2419
+ ? Math.min(Math.max(0, buttonIndex), buttonCount - 1)
2420
+ : Math.max(0, buttonIndex);
2417
2421
  const DOWN = '\x1B[B';
2418
- const keys = DOWN.repeat(Math.max(0, buttonIndex)) + '\r';
2422
+ const keys = DOWN.repeat(clampedIndex) + '\r';
2419
2423
  this.ptyProcess.write(keys);
2420
2424
  }
2421
2425
  }
@@ -423,8 +423,8 @@ class SessionHostRuntimeTransport implements PtyRuntimeTransport {
423
423
  } catch { /* noop */ }
424
424
  try {
425
425
  await this.client.close();
426
- } catch {
427
- if (destroy) throw new Error(`Failed to close session host client: ${this.options.runtimeId}`);
426
+ } catch (err) {
427
+ if (destroy) throw err instanceof Error ? err : new Error(`Failed to close session host client: ${this.options.runtimeId}`);
428
428
  }
429
429
  }
430
430
  }
@@ -215,6 +215,7 @@ export interface SessionChatTailUpdate extends ReadChatSyncResult {
215
215
  interactionId?: string;
216
216
  seq: number;
217
217
  timestamp: number;
218
+ error?: string;
218
219
  }
219
220
 
220
221
  export interface SessionRuntimeOutputUpdate {