happy-coder 0.9.0-6 → 0.9.1
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.cjs +1044 -1089
- package/dist/index.mjs +797 -824
- package/dist/lib.cjs +4 -4
- package/dist/lib.d.cts +48 -3
- package/dist/lib.d.mts +48 -3
- package/dist/lib.mjs +4 -4
- package/dist/{types-DJOX-XG-.mjs → types-BS8Pr3Im.mjs} +588 -204
- package/dist/{types-a-nJyP-e.cjs → types-DNUk09Np.cjs} +486 -71
- package/package.json +5 -5
package/dist/lib.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var types = require('./types-
|
|
3
|
+
var types = require('./types-DNUk09Np.cjs');
|
|
4
4
|
require('axios');
|
|
5
5
|
require('chalk');
|
|
6
6
|
require('fs');
|
|
7
|
+
require('node:fs');
|
|
7
8
|
require('node:os');
|
|
8
9
|
require('node:path');
|
|
9
10
|
require('node:fs/promises');
|
|
10
|
-
require('node:fs');
|
|
11
|
-
require('node:events');
|
|
12
|
-
require('socket.io-client');
|
|
13
11
|
require('zod');
|
|
14
12
|
require('node:crypto');
|
|
15
13
|
require('tweetnacl');
|
|
14
|
+
require('node:events');
|
|
15
|
+
require('socket.io-client');
|
|
16
16
|
require('expo-server-sdk');
|
|
17
17
|
|
|
18
18
|
|
package/dist/lib.d.cts
CHANGED
|
@@ -379,6 +379,12 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
379
379
|
metadataVersion: z.ZodNumber;
|
|
380
380
|
agentState: z.ZodNullable<z.ZodAny>;
|
|
381
381
|
agentStateVersion: z.ZodNumber;
|
|
382
|
+
connectivityStatus: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["neverConnected", "online", "offline"]>, z.ZodString]>>;
|
|
383
|
+
connectivityStatusSince: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
connectivityStatusReason: z.ZodOptional<z.ZodString>;
|
|
385
|
+
state: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["running", "archiveRequested", "archived"]>, z.ZodString]>>;
|
|
386
|
+
stateSince: z.ZodOptional<z.ZodNumber>;
|
|
387
|
+
stateReason: z.ZodOptional<z.ZodString>;
|
|
382
388
|
}, "strip", z.ZodTypeAny, {
|
|
383
389
|
id: string;
|
|
384
390
|
seq: number;
|
|
@@ -388,6 +394,12 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
388
394
|
agentStateVersion: number;
|
|
389
395
|
metadata?: any;
|
|
390
396
|
agentState?: any;
|
|
397
|
+
connectivityStatus?: string | undefined;
|
|
398
|
+
connectivityStatusSince?: number | undefined;
|
|
399
|
+
connectivityStatusReason?: string | undefined;
|
|
400
|
+
state?: string | undefined;
|
|
401
|
+
stateSince?: number | undefined;
|
|
402
|
+
stateReason?: string | undefined;
|
|
391
403
|
}, {
|
|
392
404
|
id: string;
|
|
393
405
|
seq: number;
|
|
@@ -397,6 +409,12 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
397
409
|
agentStateVersion: number;
|
|
398
410
|
metadata?: any;
|
|
399
411
|
agentState?: any;
|
|
412
|
+
connectivityStatus?: string | undefined;
|
|
413
|
+
connectivityStatusSince?: number | undefined;
|
|
414
|
+
connectivityStatusReason?: string | undefined;
|
|
415
|
+
state?: string | undefined;
|
|
416
|
+
stateSince?: number | undefined;
|
|
417
|
+
stateReason?: string | undefined;
|
|
400
418
|
}>;
|
|
401
419
|
type Session = z.infer<typeof SessionSchema>;
|
|
402
420
|
/**
|
|
@@ -461,6 +479,12 @@ declare const MachineSchema: z.ZodObject<{
|
|
|
461
479
|
activeAt: z.ZodNumber;
|
|
462
480
|
createdAt: z.ZodNumber;
|
|
463
481
|
updatedAt: z.ZodNumber;
|
|
482
|
+
connectivityStatus: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["neverConnected", "online", "offline"]>, z.ZodString]>>;
|
|
483
|
+
connectivityStatusSince: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
connectivityStatusReason: z.ZodOptional<z.ZodString>;
|
|
485
|
+
state: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["running", "archiveRequested", "archived"]>, z.ZodString]>>;
|
|
486
|
+
stateSince: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
stateReason: z.ZodOptional<z.ZodString>;
|
|
464
488
|
}, "strip", z.ZodTypeAny, {
|
|
465
489
|
id: string;
|
|
466
490
|
createdAt: number;
|
|
@@ -471,6 +495,12 @@ declare const MachineSchema: z.ZodObject<{
|
|
|
471
495
|
activeAt: number;
|
|
472
496
|
metadata?: any;
|
|
473
497
|
daemonState?: any;
|
|
498
|
+
connectivityStatus?: string | undefined;
|
|
499
|
+
connectivityStatusSince?: number | undefined;
|
|
500
|
+
connectivityStatusReason?: string | undefined;
|
|
501
|
+
state?: string | undefined;
|
|
502
|
+
stateSince?: number | undefined;
|
|
503
|
+
stateReason?: string | undefined;
|
|
474
504
|
}, {
|
|
475
505
|
id: string;
|
|
476
506
|
createdAt: number;
|
|
@@ -481,6 +511,12 @@ declare const MachineSchema: z.ZodObject<{
|
|
|
481
511
|
activeAt: number;
|
|
482
512
|
metadata?: any;
|
|
483
513
|
daemonState?: any;
|
|
514
|
+
connectivityStatus?: string | undefined;
|
|
515
|
+
connectivityStatusSince?: number | undefined;
|
|
516
|
+
connectivityStatusReason?: string | undefined;
|
|
517
|
+
state?: string | undefined;
|
|
518
|
+
stateSince?: number | undefined;
|
|
519
|
+
stateReason?: string | undefined;
|
|
484
520
|
}>;
|
|
485
521
|
type Machine = z.infer<typeof MachineSchema>;
|
|
486
522
|
declare const UserMessageSchema: z.ZodObject<{
|
|
@@ -571,6 +607,7 @@ type Metadata = {
|
|
|
571
607
|
updatedAt: number;
|
|
572
608
|
};
|
|
573
609
|
machineId?: string;
|
|
610
|
+
claudeSessionId?: string;
|
|
574
611
|
tools?: string[];
|
|
575
612
|
slashCommands?: string[];
|
|
576
613
|
homeDir?: string;
|
|
@@ -578,6 +615,10 @@ type Metadata = {
|
|
|
578
615
|
startedFromDaemon?: boolean;
|
|
579
616
|
hostPid?: number;
|
|
580
617
|
startedBy?: 'daemon' | 'terminal';
|
|
618
|
+
lifecycleState?: 'running' | 'archiveRequested' | 'archived' | string;
|
|
619
|
+
lifecycleStateSince?: number;
|
|
620
|
+
archivedBy?: string;
|
|
621
|
+
archiveReason?: string;
|
|
581
622
|
};
|
|
582
623
|
type AgentState = {
|
|
583
624
|
controlledByUser?: boolean | null | undefined;
|
|
@@ -615,6 +656,9 @@ interface TrackedSession {
|
|
|
615
656
|
happySessionMetadataFromLocalWebhook?: Metadata;
|
|
616
657
|
pid: number;
|
|
617
658
|
childProcess?: ChildProcess;
|
|
659
|
+
error?: string;
|
|
660
|
+
directoryCreated?: boolean;
|
|
661
|
+
message?: string;
|
|
618
662
|
}
|
|
619
663
|
|
|
620
664
|
/**
|
|
@@ -723,9 +767,9 @@ declare class ApiClient {
|
|
|
723
767
|
* - File output location: ~/.handy/logs/<date time in local timezone>.log
|
|
724
768
|
*/
|
|
725
769
|
declare class Logger {
|
|
726
|
-
readonly
|
|
770
|
+
readonly logFilePath: string;
|
|
727
771
|
private dangerouslyUnencryptedServerLoggingUrl;
|
|
728
|
-
constructor(
|
|
772
|
+
constructor(logFilePath?: string);
|
|
729
773
|
localTimezoneTimestamp(): string;
|
|
730
774
|
debug(message: string, ...args: unknown[]): void;
|
|
731
775
|
debugLargeJson(message: string, object: unknown, maxStringLength?: number, maxArrayLength?: number): void;
|
|
@@ -748,10 +792,11 @@ declare class Configuration {
|
|
|
748
792
|
readonly isDaemonProcess: boolean;
|
|
749
793
|
readonly happyHomeDir: string;
|
|
750
794
|
readonly logsDir: string;
|
|
751
|
-
readonly daemonLogsDir: string;
|
|
752
795
|
readonly settingsFile: string;
|
|
753
796
|
readonly privateKeyFile: string;
|
|
754
797
|
readonly daemonStateFile: string;
|
|
798
|
+
readonly daemonLockFile: string;
|
|
799
|
+
readonly currentCliVersion: string;
|
|
755
800
|
readonly isExperimentalEnabled: boolean;
|
|
756
801
|
constructor();
|
|
757
802
|
}
|
package/dist/lib.d.mts
CHANGED
|
@@ -379,6 +379,12 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
379
379
|
metadataVersion: z.ZodNumber;
|
|
380
380
|
agentState: z.ZodNullable<z.ZodAny>;
|
|
381
381
|
agentStateVersion: z.ZodNumber;
|
|
382
|
+
connectivityStatus: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["neverConnected", "online", "offline"]>, z.ZodString]>>;
|
|
383
|
+
connectivityStatusSince: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
connectivityStatusReason: z.ZodOptional<z.ZodString>;
|
|
385
|
+
state: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["running", "archiveRequested", "archived"]>, z.ZodString]>>;
|
|
386
|
+
stateSince: z.ZodOptional<z.ZodNumber>;
|
|
387
|
+
stateReason: z.ZodOptional<z.ZodString>;
|
|
382
388
|
}, "strip", z.ZodTypeAny, {
|
|
383
389
|
id: string;
|
|
384
390
|
seq: number;
|
|
@@ -388,6 +394,12 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
388
394
|
agentStateVersion: number;
|
|
389
395
|
metadata?: any;
|
|
390
396
|
agentState?: any;
|
|
397
|
+
connectivityStatus?: string | undefined;
|
|
398
|
+
connectivityStatusSince?: number | undefined;
|
|
399
|
+
connectivityStatusReason?: string | undefined;
|
|
400
|
+
state?: string | undefined;
|
|
401
|
+
stateSince?: number | undefined;
|
|
402
|
+
stateReason?: string | undefined;
|
|
391
403
|
}, {
|
|
392
404
|
id: string;
|
|
393
405
|
seq: number;
|
|
@@ -397,6 +409,12 @@ declare const SessionSchema: z.ZodObject<{
|
|
|
397
409
|
agentStateVersion: number;
|
|
398
410
|
metadata?: any;
|
|
399
411
|
agentState?: any;
|
|
412
|
+
connectivityStatus?: string | undefined;
|
|
413
|
+
connectivityStatusSince?: number | undefined;
|
|
414
|
+
connectivityStatusReason?: string | undefined;
|
|
415
|
+
state?: string | undefined;
|
|
416
|
+
stateSince?: number | undefined;
|
|
417
|
+
stateReason?: string | undefined;
|
|
400
418
|
}>;
|
|
401
419
|
type Session = z.infer<typeof SessionSchema>;
|
|
402
420
|
/**
|
|
@@ -461,6 +479,12 @@ declare const MachineSchema: z.ZodObject<{
|
|
|
461
479
|
activeAt: z.ZodNumber;
|
|
462
480
|
createdAt: z.ZodNumber;
|
|
463
481
|
updatedAt: z.ZodNumber;
|
|
482
|
+
connectivityStatus: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["neverConnected", "online", "offline"]>, z.ZodString]>>;
|
|
483
|
+
connectivityStatusSince: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
connectivityStatusReason: z.ZodOptional<z.ZodString>;
|
|
485
|
+
state: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["running", "archiveRequested", "archived"]>, z.ZodString]>>;
|
|
486
|
+
stateSince: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
stateReason: z.ZodOptional<z.ZodString>;
|
|
464
488
|
}, "strip", z.ZodTypeAny, {
|
|
465
489
|
id: string;
|
|
466
490
|
createdAt: number;
|
|
@@ -471,6 +495,12 @@ declare const MachineSchema: z.ZodObject<{
|
|
|
471
495
|
activeAt: number;
|
|
472
496
|
metadata?: any;
|
|
473
497
|
daemonState?: any;
|
|
498
|
+
connectivityStatus?: string | undefined;
|
|
499
|
+
connectivityStatusSince?: number | undefined;
|
|
500
|
+
connectivityStatusReason?: string | undefined;
|
|
501
|
+
state?: string | undefined;
|
|
502
|
+
stateSince?: number | undefined;
|
|
503
|
+
stateReason?: string | undefined;
|
|
474
504
|
}, {
|
|
475
505
|
id: string;
|
|
476
506
|
createdAt: number;
|
|
@@ -481,6 +511,12 @@ declare const MachineSchema: z.ZodObject<{
|
|
|
481
511
|
activeAt: number;
|
|
482
512
|
metadata?: any;
|
|
483
513
|
daemonState?: any;
|
|
514
|
+
connectivityStatus?: string | undefined;
|
|
515
|
+
connectivityStatusSince?: number | undefined;
|
|
516
|
+
connectivityStatusReason?: string | undefined;
|
|
517
|
+
state?: string | undefined;
|
|
518
|
+
stateSince?: number | undefined;
|
|
519
|
+
stateReason?: string | undefined;
|
|
484
520
|
}>;
|
|
485
521
|
type Machine = z.infer<typeof MachineSchema>;
|
|
486
522
|
declare const UserMessageSchema: z.ZodObject<{
|
|
@@ -571,6 +607,7 @@ type Metadata = {
|
|
|
571
607
|
updatedAt: number;
|
|
572
608
|
};
|
|
573
609
|
machineId?: string;
|
|
610
|
+
claudeSessionId?: string;
|
|
574
611
|
tools?: string[];
|
|
575
612
|
slashCommands?: string[];
|
|
576
613
|
homeDir?: string;
|
|
@@ -578,6 +615,10 @@ type Metadata = {
|
|
|
578
615
|
startedFromDaemon?: boolean;
|
|
579
616
|
hostPid?: number;
|
|
580
617
|
startedBy?: 'daemon' | 'terminal';
|
|
618
|
+
lifecycleState?: 'running' | 'archiveRequested' | 'archived' | string;
|
|
619
|
+
lifecycleStateSince?: number;
|
|
620
|
+
archivedBy?: string;
|
|
621
|
+
archiveReason?: string;
|
|
581
622
|
};
|
|
582
623
|
type AgentState = {
|
|
583
624
|
controlledByUser?: boolean | null | undefined;
|
|
@@ -615,6 +656,9 @@ interface TrackedSession {
|
|
|
615
656
|
happySessionMetadataFromLocalWebhook?: Metadata;
|
|
616
657
|
pid: number;
|
|
617
658
|
childProcess?: ChildProcess;
|
|
659
|
+
error?: string;
|
|
660
|
+
directoryCreated?: boolean;
|
|
661
|
+
message?: string;
|
|
618
662
|
}
|
|
619
663
|
|
|
620
664
|
/**
|
|
@@ -723,9 +767,9 @@ declare class ApiClient {
|
|
|
723
767
|
* - File output location: ~/.handy/logs/<date time in local timezone>.log
|
|
724
768
|
*/
|
|
725
769
|
declare class Logger {
|
|
726
|
-
readonly
|
|
770
|
+
readonly logFilePath: string;
|
|
727
771
|
private dangerouslyUnencryptedServerLoggingUrl;
|
|
728
|
-
constructor(
|
|
772
|
+
constructor(logFilePath?: string);
|
|
729
773
|
localTimezoneTimestamp(): string;
|
|
730
774
|
debug(message: string, ...args: unknown[]): void;
|
|
731
775
|
debugLargeJson(message: string, object: unknown, maxStringLength?: number, maxArrayLength?: number): void;
|
|
@@ -748,10 +792,11 @@ declare class Configuration {
|
|
|
748
792
|
readonly isDaemonProcess: boolean;
|
|
749
793
|
readonly happyHomeDir: string;
|
|
750
794
|
readonly logsDir: string;
|
|
751
|
-
readonly daemonLogsDir: string;
|
|
752
795
|
readonly settingsFile: string;
|
|
753
796
|
readonly privateKeyFile: string;
|
|
754
797
|
readonly daemonStateFile: string;
|
|
798
|
+
readonly daemonLockFile: string;
|
|
799
|
+
readonly currentCliVersion: string;
|
|
755
800
|
readonly isExperimentalEnabled: boolean;
|
|
756
801
|
constructor();
|
|
757
802
|
}
|
package/dist/lib.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-BS8Pr3Im.mjs';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'chalk';
|
|
4
4
|
import 'fs';
|
|
5
|
+
import 'node:fs';
|
|
5
6
|
import 'node:os';
|
|
6
7
|
import 'node:path';
|
|
7
8
|
import 'node:fs/promises';
|
|
8
|
-
import 'node:fs';
|
|
9
|
-
import 'node:events';
|
|
10
|
-
import 'socket.io-client';
|
|
11
9
|
import 'zod';
|
|
12
10
|
import 'node:crypto';
|
|
13
11
|
import 'tweetnacl';
|
|
12
|
+
import 'node:events';
|
|
13
|
+
import 'socket.io-client';
|
|
14
14
|
import 'expo-server-sdk';
|