@adhdev/daemon-core 0.7.9 → 0.7.10

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/dist/index.d.mts CHANGED
@@ -2205,6 +2205,7 @@ interface DevServerContext {
2205
2205
  };
2206
2206
  autoImplProcess: child_process.ChildProcess | null;
2207
2207
  sendCliSSE(data: any): void;
2208
+ handleRunScript(type: string, req: http.IncomingMessage, res: http.ServerResponse, parsedBody?: any): Promise<void>;
2208
2209
  findProviderDir(type: string): string | null;
2209
2210
  getLatestScriptVersionDir(scriptsDir: string): string | null;
2210
2211
  }
@@ -2244,7 +2245,7 @@ declare class DevServer implements DevServerContext {
2244
2245
  private handleListProviders;
2245
2246
  private handleProviderConfig;
2246
2247
  private handleSpawnTest;
2247
- private handleRunScript;
2248
+ handleRunScript(type: string, req: http.IncomingMessage, res: http.ServerResponse, parsedBody?: any): Promise<void>;
2248
2249
  private handleCdpEvaluate;
2249
2250
  private handleCdpClick;
2250
2251
  private handleCdpDomQuery;
@@ -2400,6 +2401,8 @@ interface DaemonInitConfig {
2400
2401
  getP2p: () => any;
2401
2402
  onStatusChange: () => void;
2402
2403
  removeAgentTracking: (key: string) => void;
2404
+ createPtyTransportFactory?: (params: CliTransportFactoryParams) => PtyTransportFactory | null;
2405
+ listHostedCliRuntimes?: () => Promise<HostedCliRuntimeDescriptor[]>;
2403
2406
  };
2404
2407
  /** CDP config */
2405
2408
  enabledIdes?: string[];
package/dist/index.d.ts CHANGED
@@ -2205,6 +2205,7 @@ interface DevServerContext {
2205
2205
  };
2206
2206
  autoImplProcess: child_process.ChildProcess | null;
2207
2207
  sendCliSSE(data: any): void;
2208
+ handleRunScript(type: string, req: http.IncomingMessage, res: http.ServerResponse, parsedBody?: any): Promise<void>;
2208
2209
  findProviderDir(type: string): string | null;
2209
2210
  getLatestScriptVersionDir(scriptsDir: string): string | null;
2210
2211
  }
@@ -2244,7 +2245,7 @@ declare class DevServer implements DevServerContext {
2244
2245
  private handleListProviders;
2245
2246
  private handleProviderConfig;
2246
2247
  private handleSpawnTest;
2247
- private handleRunScript;
2248
+ handleRunScript(type: string, req: http.IncomingMessage, res: http.ServerResponse, parsedBody?: any): Promise<void>;
2248
2249
  private handleCdpEvaluate;
2249
2250
  private handleCdpClick;
2250
2251
  private handleCdpDomQuery;
@@ -2400,6 +2401,8 @@ interface DaemonInitConfig {
2400
2401
  getP2p: () => any;
2401
2402
  onStatusChange: () => void;
2402
2403
  removeAgentTracking: (key: string) => void;
2404
+ createPtyTransportFactory?: (params: CliTransportFactoryParams) => PtyTransportFactory | null;
2405
+ listHostedCliRuntimes?: () => Promise<HostedCliRuntimeDescriptor[]>;
2403
2406
  };
2404
2407
  /** CDP config */
2405
2408
  enabledIdes?: string[];
package/dist/index.js CHANGED
@@ -685,6 +685,9 @@ var init_ghostty_vt_backend = __esm({
685
685
  terminal;
686
686
  constructor(options) {
687
687
  const binding = loadGhosttyVtBinding(true);
688
+ if (!binding) {
689
+ throw new Error("ghostty-vt backend requested but no binding is available");
690
+ }
688
691
  this.terminal = binding.createTerminal({
689
692
  cols: Math.max(1, options.cols | 0),
690
693
  rows: Math.max(1, options.rows | 0),
@@ -11999,7 +12002,7 @@ async function handleScriptsRun(ctx, req, res) {
11999
12002
  ctx.json(res, 400, { error: "type and script required" });
12000
12003
  return;
12001
12004
  }
12002
- await this.handleRunScript(type, req, res, body);
12005
+ await ctx.handleRunScript(type, req, res, body);
12003
12006
  }
12004
12007
  async function handleTypeAndSend(ctx, type, req, res) {
12005
12008
  const body = await ctx.readBody(req);
@@ -12040,7 +12043,7 @@ async function handleTypeAndSendAt(ctx, type, req, res) {
12040
12043
  }
12041
12044
  }
12042
12045
  async function handleScriptHints(ctx, type, _req, res) {
12043
- const dir = this.findProviderDir(type);
12046
+ const dir = ctx.findProviderDir(type);
12044
12047
  if (!dir) {
12045
12048
  ctx.json(res, 404, { error: `Provider not found: ${type}` });
12046
12049
  return;