happy-coder 0.1.13 → 0.2.0

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/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var types = require('./types-hotUTaWz.cjs');
3
+ var types = require('./types-CkPUFpfr.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('fs');
package/dist/lib.d.cts CHANGED
@@ -333,7 +333,16 @@ declare const UserMessageSchema: z.ZodObject<{
333
333
  text: string;
334
334
  }>;
335
335
  localKey: z.ZodOptional<z.ZodString>;
336
- sentFrom: z.ZodOptional<z.ZodEnum<["mobile", "cli"]>>;
336
+ meta: z.ZodOptional<z.ZodObject<{
337
+ sentFrom: z.ZodOptional<z.ZodString>;
338
+ permissionMode: z.ZodOptional<z.ZodString>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ sentFrom?: string | undefined;
341
+ permissionMode?: string | undefined;
342
+ }, {
343
+ sentFrom?: string | undefined;
344
+ permissionMode?: string | undefined;
345
+ }>>;
337
346
  }, "strip", z.ZodTypeAny, {
338
347
  content: {
339
348
  type: "text";
@@ -341,7 +350,10 @@ declare const UserMessageSchema: z.ZodObject<{
341
350
  };
342
351
  role: "user";
343
352
  localKey?: string | undefined;
344
- sentFrom?: "mobile" | "cli" | undefined;
353
+ meta?: {
354
+ sentFrom?: string | undefined;
355
+ permissionMode?: string | undefined;
356
+ } | undefined;
345
357
  }, {
346
358
  content: {
347
359
  type: "text";
@@ -349,7 +361,10 @@ declare const UserMessageSchema: z.ZodObject<{
349
361
  };
350
362
  role: "user";
351
363
  localKey?: string | undefined;
352
- sentFrom?: "mobile" | "cli" | undefined;
364
+ meta?: {
365
+ sentFrom?: string | undefined;
366
+ permissionMode?: string | undefined;
367
+ } | undefined;
353
368
  }>;
354
369
  type UserMessage = z.infer<typeof UserMessageSchema>;
355
370
  type Metadata = {
@@ -362,6 +377,7 @@ type Metadata = {
362
377
  text: string;
363
378
  updatedAt: number;
364
379
  };
380
+ machineId?: string;
365
381
  };
366
382
  type AgentState = {
367
383
  controlledByUser?: boolean | null | undefined;
@@ -410,6 +426,9 @@ declare class ApiSessionClient extends EventEmitter {
410
426
  } | {
411
427
  type: 'message';
412
428
  message: string;
429
+ } | {
430
+ type: 'permission-mode-changed';
431
+ mode: 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan';
413
432
  }, id?: string): void;
414
433
  /**
415
434
  * Send a ping message to keep the connection alive
@@ -519,6 +538,7 @@ declare class Logger {
519
538
  debugLargeJson(message: string, object: unknown, maxStringLength?: number, maxArrayLength?: number): void;
520
539
  info(message: string, ...args: unknown[]): void;
521
540
  infoDeveloper(message: string, ...args: unknown[]): void;
541
+ daemonDebug(message: string, ...args: unknown[]): void;
522
542
  private logToConsole;
523
543
  private logToFile;
524
544
  }
@@ -533,14 +553,17 @@ declare function initLoggerWithGlobalConfiguration(): void;
533
553
  */
534
554
  declare class Configuration {
535
555
  readonly serverUrl: string;
556
+ readonly installationLocation: 'global' | 'local';
557
+ readonly isDaemonProcess: boolean;
536
558
  readonly happyDir: string;
537
559
  readonly logsDir: string;
560
+ readonly daemonLogsDir: string;
538
561
  readonly settingsFile: string;
539
562
  readonly privateKeyFile: string;
540
563
  readonly daemonPidFile: string;
541
- constructor(location: 'global' | 'local' | string);
564
+ constructor(location: 'global' | 'local' | string, serverUrl?: string);
542
565
  }
543
566
  declare let configuration: Configuration;
544
- declare function initializeConfiguration(location: 'global' | 'local' | string): void;
567
+ declare function initializeConfiguration(location: 'global' | 'local' | string, serverUrl?: string): void;
545
568
 
546
569
  export { ApiClient, ApiSessionClient, type RawJSONLines, RawJSONLinesSchema, configuration, initLoggerWithGlobalConfiguration, initializeConfiguration, logger };
package/dist/lib.d.mts CHANGED
@@ -333,7 +333,16 @@ declare const UserMessageSchema: z.ZodObject<{
333
333
  text: string;
334
334
  }>;
335
335
  localKey: z.ZodOptional<z.ZodString>;
336
- sentFrom: z.ZodOptional<z.ZodEnum<["mobile", "cli"]>>;
336
+ meta: z.ZodOptional<z.ZodObject<{
337
+ sentFrom: z.ZodOptional<z.ZodString>;
338
+ permissionMode: z.ZodOptional<z.ZodString>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ sentFrom?: string | undefined;
341
+ permissionMode?: string | undefined;
342
+ }, {
343
+ sentFrom?: string | undefined;
344
+ permissionMode?: string | undefined;
345
+ }>>;
337
346
  }, "strip", z.ZodTypeAny, {
338
347
  content: {
339
348
  type: "text";
@@ -341,7 +350,10 @@ declare const UserMessageSchema: z.ZodObject<{
341
350
  };
342
351
  role: "user";
343
352
  localKey?: string | undefined;
344
- sentFrom?: "mobile" | "cli" | undefined;
353
+ meta?: {
354
+ sentFrom?: string | undefined;
355
+ permissionMode?: string | undefined;
356
+ } | undefined;
345
357
  }, {
346
358
  content: {
347
359
  type: "text";
@@ -349,7 +361,10 @@ declare const UserMessageSchema: z.ZodObject<{
349
361
  };
350
362
  role: "user";
351
363
  localKey?: string | undefined;
352
- sentFrom?: "mobile" | "cli" | undefined;
364
+ meta?: {
365
+ sentFrom?: string | undefined;
366
+ permissionMode?: string | undefined;
367
+ } | undefined;
353
368
  }>;
354
369
  type UserMessage = z.infer<typeof UserMessageSchema>;
355
370
  type Metadata = {
@@ -362,6 +377,7 @@ type Metadata = {
362
377
  text: string;
363
378
  updatedAt: number;
364
379
  };
380
+ machineId?: string;
365
381
  };
366
382
  type AgentState = {
367
383
  controlledByUser?: boolean | null | undefined;
@@ -410,6 +426,9 @@ declare class ApiSessionClient extends EventEmitter {
410
426
  } | {
411
427
  type: 'message';
412
428
  message: string;
429
+ } | {
430
+ type: 'permission-mode-changed';
431
+ mode: 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan';
413
432
  }, id?: string): void;
414
433
  /**
415
434
  * Send a ping message to keep the connection alive
@@ -519,6 +538,7 @@ declare class Logger {
519
538
  debugLargeJson(message: string, object: unknown, maxStringLength?: number, maxArrayLength?: number): void;
520
539
  info(message: string, ...args: unknown[]): void;
521
540
  infoDeveloper(message: string, ...args: unknown[]): void;
541
+ daemonDebug(message: string, ...args: unknown[]): void;
522
542
  private logToConsole;
523
543
  private logToFile;
524
544
  }
@@ -533,14 +553,17 @@ declare function initLoggerWithGlobalConfiguration(): void;
533
553
  */
534
554
  declare class Configuration {
535
555
  readonly serverUrl: string;
556
+ readonly installationLocation: 'global' | 'local';
557
+ readonly isDaemonProcess: boolean;
536
558
  readonly happyDir: string;
537
559
  readonly logsDir: string;
560
+ readonly daemonLogsDir: string;
538
561
  readonly settingsFile: string;
539
562
  readonly privateKeyFile: string;
540
563
  readonly daemonPidFile: string;
541
- constructor(location: 'global' | 'local' | string);
564
+ constructor(location: 'global' | 'local' | string, serverUrl?: string);
542
565
  }
543
566
  declare let configuration: Configuration;
544
- declare function initializeConfiguration(location: 'global' | 'local' | string): void;
567
+ declare function initializeConfiguration(location: 'global' | 'local' | string, serverUrl?: string): void;
545
568
 
546
569
  export { ApiClient, ApiSessionClient, type RawJSONLines, RawJSONLinesSchema, configuration, initLoggerWithGlobalConfiguration, initializeConfiguration, logger };
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, i as initLoggerWithGlobalConfiguration, b as initializeConfiguration, l as logger } from './types-D39L8JSd.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, i as initLoggerWithGlobalConfiguration, b as initializeConfiguration, l as logger } from './types-DNu8okOb.mjs';
2
2
  import 'axios';
3
3
  import 'chalk';
4
4
  import 'fs';