@ketd/gemini-cli-sdk 0.3.3 → 0.3.5
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 +174 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +162 -3
- package/dist/index.d.ts +162 -3
- package/dist/index.js +170 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,118 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { EventEmitter as EventEmitter$1 } from 'node:events';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Logger utility for Gemini CLI SDK
|
|
6
|
+
*
|
|
7
|
+
* Provides a configurable logging interface that can be customized by SDK consumers.
|
|
8
|
+
* By default, logs go to console. Users can provide their own logger implementation.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Log level enumeration
|
|
12
|
+
*/
|
|
13
|
+
declare enum LogLevel {
|
|
14
|
+
DEBUG = 0,
|
|
15
|
+
INFO = 1,
|
|
16
|
+
WARN = 2,
|
|
17
|
+
ERROR = 3,
|
|
18
|
+
SILENT = 4
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Logger interface that SDK consumers can implement
|
|
22
|
+
*/
|
|
23
|
+
interface Logger {
|
|
24
|
+
debug(message: string, ...args: unknown[]): void;
|
|
25
|
+
info(message: string, ...args: unknown[]): void;
|
|
26
|
+
warn(message: string, ...args: unknown[]): void;
|
|
27
|
+
error(message: string, ...args: unknown[]): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Logger configuration options
|
|
31
|
+
*/
|
|
32
|
+
interface LoggerOptions {
|
|
33
|
+
/** Custom logger implementation */
|
|
34
|
+
logger?: Logger;
|
|
35
|
+
/** Minimum log level to output (default: INFO, or DEBUG if debug=true) */
|
|
36
|
+
level?: LogLevel;
|
|
37
|
+
/** Prefix for all log messages (e.g., '[GeminiSDK]') */
|
|
38
|
+
prefix?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Silent logger that outputs nothing
|
|
42
|
+
*/
|
|
43
|
+
declare const silentLogger: Logger;
|
|
44
|
+
/**
|
|
45
|
+
* SDK Logger class
|
|
46
|
+
*
|
|
47
|
+
* Wraps a logger implementation with level filtering and prefix support.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* // Use default console logger
|
|
52
|
+
* const logger = new SDKLogger({ level: LogLevel.DEBUG });
|
|
53
|
+
*
|
|
54
|
+
* // Use custom logger
|
|
55
|
+
* const logger = new SDKLogger({
|
|
56
|
+
* logger: myCustomLogger,
|
|
57
|
+
* prefix: '[MyApp]',
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* logger.debug('Debug message');
|
|
61
|
+
* logger.error('Error occurred', { details: '...' });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare class SDKLogger implements Logger {
|
|
65
|
+
private logger;
|
|
66
|
+
private level;
|
|
67
|
+
private prefix;
|
|
68
|
+
constructor(options?: LoggerOptions);
|
|
69
|
+
/**
|
|
70
|
+
* Update logger configuration
|
|
71
|
+
*/
|
|
72
|
+
configure(options: Partial<LoggerOptions>): void;
|
|
73
|
+
/**
|
|
74
|
+
* Set log level
|
|
75
|
+
*/
|
|
76
|
+
setLevel(level: LogLevel): void;
|
|
77
|
+
/**
|
|
78
|
+
* Set custom logger implementation
|
|
79
|
+
*/
|
|
80
|
+
setLogger(logger: Logger): void;
|
|
81
|
+
private formatMessage;
|
|
82
|
+
debug(message: string, ...args: unknown[]): void;
|
|
83
|
+
info(message: string, ...args: unknown[]): void;
|
|
84
|
+
warn(message: string, ...args: unknown[]): void;
|
|
85
|
+
error(message: string, ...args: unknown[]): void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Global SDK logger instance
|
|
89
|
+
*
|
|
90
|
+
* Used internally by SDK components. Can be configured by SDK consumers.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* import { sdkLogger, LogLevel } from '@google/gemini-cli-sdk';
|
|
95
|
+
*
|
|
96
|
+
* // Configure global logger
|
|
97
|
+
* sdkLogger.setLevel(LogLevel.DEBUG);
|
|
98
|
+
* sdkLogger.setLogger(myCustomLogger);
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
declare const sdkLogger: SDKLogger;
|
|
102
|
+
/**
|
|
103
|
+
* Create a component-specific logger
|
|
104
|
+
*
|
|
105
|
+
* @param component - Component name for the prefix (e.g., 'GeminiStreamClient')
|
|
106
|
+
* @param options - Logger options
|
|
107
|
+
*/
|
|
108
|
+
declare function createLogger(component: string, options?: LoggerOptions): SDKLogger;
|
|
109
|
+
|
|
4
110
|
/**
|
|
5
111
|
* Type definitions for Gemini CLI SDK
|
|
6
112
|
*
|
|
7
113
|
* Based on Gemini CLI v0.21.0+ interface specification
|
|
8
114
|
*/
|
|
115
|
+
|
|
9
116
|
/**
|
|
10
117
|
* Gemini CLI configuration options
|
|
11
118
|
*/
|
|
@@ -95,6 +202,21 @@ interface GeminiOptions {
|
|
|
95
202
|
* If not provided, falls back to Gemini CLI's built-in approval mechanism
|
|
96
203
|
*/
|
|
97
204
|
onPermissionRequest?: (request: ToolPermissionRequest) => Promise<ToolPermissionDecision>;
|
|
205
|
+
/**
|
|
206
|
+
* Custom logger implementation
|
|
207
|
+
* If not provided, uses console with [GeminiSDK] prefix
|
|
208
|
+
* Set to silentLogger to disable all logging
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```typescript
|
|
212
|
+
* import { silentLogger } from '@google/gemini-cli-sdk';
|
|
213
|
+
*
|
|
214
|
+
* const stream = query('Hello', {
|
|
215
|
+
* logger: silentLogger, // Disable all logging
|
|
216
|
+
* });
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
logger?: Logger;
|
|
98
220
|
}
|
|
99
221
|
/**
|
|
100
222
|
* Tool permission request
|
|
@@ -384,7 +506,7 @@ interface UserInputMessage {
|
|
|
384
506
|
/**
|
|
385
507
|
* Control subtypes for control messages
|
|
386
508
|
*/
|
|
387
|
-
type ControlSubtype = 'interrupt' | 'cancel' | 'shutdown' | 'truncate_history';
|
|
509
|
+
type ControlSubtype = 'interrupt' | 'cancel' | 'shutdown' | 'truncate_history' | 'resume_session';
|
|
388
510
|
/**
|
|
389
511
|
* Interrupt control - stop current processing
|
|
390
512
|
*/
|
|
@@ -400,12 +522,21 @@ interface TruncateHistoryControl {
|
|
|
400
522
|
/** Index from which to truncate (0-based, inclusive) */
|
|
401
523
|
fromIndex: number;
|
|
402
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* Resume session control - load history from a session file
|
|
527
|
+
* Used when warm pool adapter is assigned to a real session
|
|
528
|
+
*/
|
|
529
|
+
interface ResumeSessionControl {
|
|
530
|
+
subtype: 'resume_session';
|
|
531
|
+
/** Path to the session file to resume from */
|
|
532
|
+
sessionFilePath: string;
|
|
533
|
+
}
|
|
403
534
|
/**
|
|
404
535
|
* Control message sent to CLI
|
|
405
536
|
*/
|
|
406
537
|
interface ControlInputMessage {
|
|
407
538
|
type: JsonInputMessageType.CONTROL;
|
|
408
|
-
control: InterruptControl | TruncateHistoryControl;
|
|
539
|
+
control: InterruptControl | TruncateHistoryControl | ResumeSessionControl;
|
|
409
540
|
session_id?: string;
|
|
410
541
|
}
|
|
411
542
|
/**
|
|
@@ -569,6 +700,21 @@ interface GeminiStreamOptions {
|
|
|
569
700
|
* @example '/path/to/session-2025-01-01T12-00-abc123.json'
|
|
570
701
|
*/
|
|
571
702
|
resumeSessionFilePath?: string;
|
|
703
|
+
/**
|
|
704
|
+
* Custom logger implementation
|
|
705
|
+
* If not provided, uses console with [GeminiStreamClient] prefix
|
|
706
|
+
* Set to silentLogger to disable all logging
|
|
707
|
+
*
|
|
708
|
+
* @example
|
|
709
|
+
* ```typescript
|
|
710
|
+
* import { silentLogger, GeminiStreamClient } from '@google/gemini-cli-sdk';
|
|
711
|
+
*
|
|
712
|
+
* const client = new GeminiStreamClient({
|
|
713
|
+
* logger: silentLogger, // Disable all logging
|
|
714
|
+
* });
|
|
715
|
+
* ```
|
|
716
|
+
*/
|
|
717
|
+
logger?: Logger;
|
|
572
718
|
}
|
|
573
719
|
|
|
574
720
|
/**
|
|
@@ -733,6 +879,7 @@ declare class GeminiStreamClient extends EventEmitter$1 {
|
|
|
733
879
|
private initEvent;
|
|
734
880
|
private initTimeout;
|
|
735
881
|
private tempSettingsPath;
|
|
882
|
+
private logger;
|
|
736
883
|
constructor(options: GeminiStreamOptions);
|
|
737
884
|
/**
|
|
738
885
|
* Start the Gemini CLI process
|
|
@@ -760,6 +907,18 @@ declare class GeminiStreamClient extends EventEmitter$1 {
|
|
|
760
907
|
* @param fromIndex - Index from which to truncate (0-based, inclusive)
|
|
761
908
|
*/
|
|
762
909
|
truncateHistory(fromIndex: number): Promise<void>;
|
|
910
|
+
/**
|
|
911
|
+
* Resume session from a session file
|
|
912
|
+
*
|
|
913
|
+
* This sends a control message to the CLI to:
|
|
914
|
+
* 1. Load history from the specified session file
|
|
915
|
+
* 2. Update the ChatRecordingService to use the session file
|
|
916
|
+
*
|
|
917
|
+
* Used when a warm pool adapter is assigned to a real session that has history.
|
|
918
|
+
*
|
|
919
|
+
* @param sessionFilePath - Path to the session file to resume from
|
|
920
|
+
*/
|
|
921
|
+
resumeSession(sessionFilePath: string): Promise<void>;
|
|
763
922
|
/**
|
|
764
923
|
* Stop the CLI process
|
|
765
924
|
*/
|
|
@@ -875,4 +1034,4 @@ declare function formatDuration(ms: number): string;
|
|
|
875
1034
|
*/
|
|
876
1035
|
declare function formatTokens(tokens: number): string;
|
|
877
1036
|
|
|
878
|
-
export { type ControlInputMessage, type ControlSubtype, type ErrorEvent, ExitCode, GeminiClient, type GeminiOptions, GeminiSDKError, GeminiStreamClient, type GeminiStreamOptions, type HooksConfiguration, type InitEvent, type InterruptControl, type JsonInputMessage, JsonInputMessageType, type JsonStreamEvent, JsonStreamEventType, type MCPServerConfig, type MCPServersConfig, type MessageEvent, ProcessStatus, type QueryResult, type ResultEvent, type StreamStats, type ThoughtEvent, type ToolPermissionDecision, type ToolPermissionRequest, type ToolResultEvent, type ToolUseEvent, type TruncateHistoryControl, type UserInputMessage, findGeminiCLI, formatDuration, formatTokens, getApiKey, query, validateApiKey, validateModel };
|
|
1037
|
+
export { type ControlInputMessage, type ControlSubtype, type ErrorEvent, ExitCode, GeminiClient, type GeminiOptions, GeminiSDKError, GeminiStreamClient, type GeminiStreamOptions, type HooksConfiguration, type InitEvent, type InterruptControl, type JsonInputMessage, JsonInputMessageType, type JsonStreamEvent, JsonStreamEventType, LogLevel, type Logger, type LoggerOptions, type MCPServerConfig, type MCPServersConfig, type MessageEvent, ProcessStatus, type QueryResult, type ResultEvent, type ResumeSessionControl, SDKLogger, type StreamStats, type ThoughtEvent, type ToolPermissionDecision, type ToolPermissionRequest, type ToolResultEvent, type ToolUseEvent, type TruncateHistoryControl, type UserInputMessage, createLogger, findGeminiCLI, formatDuration, formatTokens, getApiKey, query, sdkLogger, silentLogger, validateApiKey, validateModel };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,118 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { EventEmitter as EventEmitter$1 } from 'node:events';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Logger utility for Gemini CLI SDK
|
|
6
|
+
*
|
|
7
|
+
* Provides a configurable logging interface that can be customized by SDK consumers.
|
|
8
|
+
* By default, logs go to console. Users can provide their own logger implementation.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Log level enumeration
|
|
12
|
+
*/
|
|
13
|
+
declare enum LogLevel {
|
|
14
|
+
DEBUG = 0,
|
|
15
|
+
INFO = 1,
|
|
16
|
+
WARN = 2,
|
|
17
|
+
ERROR = 3,
|
|
18
|
+
SILENT = 4
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Logger interface that SDK consumers can implement
|
|
22
|
+
*/
|
|
23
|
+
interface Logger {
|
|
24
|
+
debug(message: string, ...args: unknown[]): void;
|
|
25
|
+
info(message: string, ...args: unknown[]): void;
|
|
26
|
+
warn(message: string, ...args: unknown[]): void;
|
|
27
|
+
error(message: string, ...args: unknown[]): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Logger configuration options
|
|
31
|
+
*/
|
|
32
|
+
interface LoggerOptions {
|
|
33
|
+
/** Custom logger implementation */
|
|
34
|
+
logger?: Logger;
|
|
35
|
+
/** Minimum log level to output (default: INFO, or DEBUG if debug=true) */
|
|
36
|
+
level?: LogLevel;
|
|
37
|
+
/** Prefix for all log messages (e.g., '[GeminiSDK]') */
|
|
38
|
+
prefix?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Silent logger that outputs nothing
|
|
42
|
+
*/
|
|
43
|
+
declare const silentLogger: Logger;
|
|
44
|
+
/**
|
|
45
|
+
* SDK Logger class
|
|
46
|
+
*
|
|
47
|
+
* Wraps a logger implementation with level filtering and prefix support.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* // Use default console logger
|
|
52
|
+
* const logger = new SDKLogger({ level: LogLevel.DEBUG });
|
|
53
|
+
*
|
|
54
|
+
* // Use custom logger
|
|
55
|
+
* const logger = new SDKLogger({
|
|
56
|
+
* logger: myCustomLogger,
|
|
57
|
+
* prefix: '[MyApp]',
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* logger.debug('Debug message');
|
|
61
|
+
* logger.error('Error occurred', { details: '...' });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare class SDKLogger implements Logger {
|
|
65
|
+
private logger;
|
|
66
|
+
private level;
|
|
67
|
+
private prefix;
|
|
68
|
+
constructor(options?: LoggerOptions);
|
|
69
|
+
/**
|
|
70
|
+
* Update logger configuration
|
|
71
|
+
*/
|
|
72
|
+
configure(options: Partial<LoggerOptions>): void;
|
|
73
|
+
/**
|
|
74
|
+
* Set log level
|
|
75
|
+
*/
|
|
76
|
+
setLevel(level: LogLevel): void;
|
|
77
|
+
/**
|
|
78
|
+
* Set custom logger implementation
|
|
79
|
+
*/
|
|
80
|
+
setLogger(logger: Logger): void;
|
|
81
|
+
private formatMessage;
|
|
82
|
+
debug(message: string, ...args: unknown[]): void;
|
|
83
|
+
info(message: string, ...args: unknown[]): void;
|
|
84
|
+
warn(message: string, ...args: unknown[]): void;
|
|
85
|
+
error(message: string, ...args: unknown[]): void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Global SDK logger instance
|
|
89
|
+
*
|
|
90
|
+
* Used internally by SDK components. Can be configured by SDK consumers.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* import { sdkLogger, LogLevel } from '@google/gemini-cli-sdk';
|
|
95
|
+
*
|
|
96
|
+
* // Configure global logger
|
|
97
|
+
* sdkLogger.setLevel(LogLevel.DEBUG);
|
|
98
|
+
* sdkLogger.setLogger(myCustomLogger);
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
declare const sdkLogger: SDKLogger;
|
|
102
|
+
/**
|
|
103
|
+
* Create a component-specific logger
|
|
104
|
+
*
|
|
105
|
+
* @param component - Component name for the prefix (e.g., 'GeminiStreamClient')
|
|
106
|
+
* @param options - Logger options
|
|
107
|
+
*/
|
|
108
|
+
declare function createLogger(component: string, options?: LoggerOptions): SDKLogger;
|
|
109
|
+
|
|
4
110
|
/**
|
|
5
111
|
* Type definitions for Gemini CLI SDK
|
|
6
112
|
*
|
|
7
113
|
* Based on Gemini CLI v0.21.0+ interface specification
|
|
8
114
|
*/
|
|
115
|
+
|
|
9
116
|
/**
|
|
10
117
|
* Gemini CLI configuration options
|
|
11
118
|
*/
|
|
@@ -95,6 +202,21 @@ interface GeminiOptions {
|
|
|
95
202
|
* If not provided, falls back to Gemini CLI's built-in approval mechanism
|
|
96
203
|
*/
|
|
97
204
|
onPermissionRequest?: (request: ToolPermissionRequest) => Promise<ToolPermissionDecision>;
|
|
205
|
+
/**
|
|
206
|
+
* Custom logger implementation
|
|
207
|
+
* If not provided, uses console with [GeminiSDK] prefix
|
|
208
|
+
* Set to silentLogger to disable all logging
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```typescript
|
|
212
|
+
* import { silentLogger } from '@google/gemini-cli-sdk';
|
|
213
|
+
*
|
|
214
|
+
* const stream = query('Hello', {
|
|
215
|
+
* logger: silentLogger, // Disable all logging
|
|
216
|
+
* });
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
logger?: Logger;
|
|
98
220
|
}
|
|
99
221
|
/**
|
|
100
222
|
* Tool permission request
|
|
@@ -384,7 +506,7 @@ interface UserInputMessage {
|
|
|
384
506
|
/**
|
|
385
507
|
* Control subtypes for control messages
|
|
386
508
|
*/
|
|
387
|
-
type ControlSubtype = 'interrupt' | 'cancel' | 'shutdown' | 'truncate_history';
|
|
509
|
+
type ControlSubtype = 'interrupt' | 'cancel' | 'shutdown' | 'truncate_history' | 'resume_session';
|
|
388
510
|
/**
|
|
389
511
|
* Interrupt control - stop current processing
|
|
390
512
|
*/
|
|
@@ -400,12 +522,21 @@ interface TruncateHistoryControl {
|
|
|
400
522
|
/** Index from which to truncate (0-based, inclusive) */
|
|
401
523
|
fromIndex: number;
|
|
402
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* Resume session control - load history from a session file
|
|
527
|
+
* Used when warm pool adapter is assigned to a real session
|
|
528
|
+
*/
|
|
529
|
+
interface ResumeSessionControl {
|
|
530
|
+
subtype: 'resume_session';
|
|
531
|
+
/** Path to the session file to resume from */
|
|
532
|
+
sessionFilePath: string;
|
|
533
|
+
}
|
|
403
534
|
/**
|
|
404
535
|
* Control message sent to CLI
|
|
405
536
|
*/
|
|
406
537
|
interface ControlInputMessage {
|
|
407
538
|
type: JsonInputMessageType.CONTROL;
|
|
408
|
-
control: InterruptControl | TruncateHistoryControl;
|
|
539
|
+
control: InterruptControl | TruncateHistoryControl | ResumeSessionControl;
|
|
409
540
|
session_id?: string;
|
|
410
541
|
}
|
|
411
542
|
/**
|
|
@@ -569,6 +700,21 @@ interface GeminiStreamOptions {
|
|
|
569
700
|
* @example '/path/to/session-2025-01-01T12-00-abc123.json'
|
|
570
701
|
*/
|
|
571
702
|
resumeSessionFilePath?: string;
|
|
703
|
+
/**
|
|
704
|
+
* Custom logger implementation
|
|
705
|
+
* If not provided, uses console with [GeminiStreamClient] prefix
|
|
706
|
+
* Set to silentLogger to disable all logging
|
|
707
|
+
*
|
|
708
|
+
* @example
|
|
709
|
+
* ```typescript
|
|
710
|
+
* import { silentLogger, GeminiStreamClient } from '@google/gemini-cli-sdk';
|
|
711
|
+
*
|
|
712
|
+
* const client = new GeminiStreamClient({
|
|
713
|
+
* logger: silentLogger, // Disable all logging
|
|
714
|
+
* });
|
|
715
|
+
* ```
|
|
716
|
+
*/
|
|
717
|
+
logger?: Logger;
|
|
572
718
|
}
|
|
573
719
|
|
|
574
720
|
/**
|
|
@@ -733,6 +879,7 @@ declare class GeminiStreamClient extends EventEmitter$1 {
|
|
|
733
879
|
private initEvent;
|
|
734
880
|
private initTimeout;
|
|
735
881
|
private tempSettingsPath;
|
|
882
|
+
private logger;
|
|
736
883
|
constructor(options: GeminiStreamOptions);
|
|
737
884
|
/**
|
|
738
885
|
* Start the Gemini CLI process
|
|
@@ -760,6 +907,18 @@ declare class GeminiStreamClient extends EventEmitter$1 {
|
|
|
760
907
|
* @param fromIndex - Index from which to truncate (0-based, inclusive)
|
|
761
908
|
*/
|
|
762
909
|
truncateHistory(fromIndex: number): Promise<void>;
|
|
910
|
+
/**
|
|
911
|
+
* Resume session from a session file
|
|
912
|
+
*
|
|
913
|
+
* This sends a control message to the CLI to:
|
|
914
|
+
* 1. Load history from the specified session file
|
|
915
|
+
* 2. Update the ChatRecordingService to use the session file
|
|
916
|
+
*
|
|
917
|
+
* Used when a warm pool adapter is assigned to a real session that has history.
|
|
918
|
+
*
|
|
919
|
+
* @param sessionFilePath - Path to the session file to resume from
|
|
920
|
+
*/
|
|
921
|
+
resumeSession(sessionFilePath: string): Promise<void>;
|
|
763
922
|
/**
|
|
764
923
|
* Stop the CLI process
|
|
765
924
|
*/
|
|
@@ -875,4 +1034,4 @@ declare function formatDuration(ms: number): string;
|
|
|
875
1034
|
*/
|
|
876
1035
|
declare function formatTokens(tokens: number): string;
|
|
877
1036
|
|
|
878
|
-
export { type ControlInputMessage, type ControlSubtype, type ErrorEvent, ExitCode, GeminiClient, type GeminiOptions, GeminiSDKError, GeminiStreamClient, type GeminiStreamOptions, type HooksConfiguration, type InitEvent, type InterruptControl, type JsonInputMessage, JsonInputMessageType, type JsonStreamEvent, JsonStreamEventType, type MCPServerConfig, type MCPServersConfig, type MessageEvent, ProcessStatus, type QueryResult, type ResultEvent, type StreamStats, type ThoughtEvent, type ToolPermissionDecision, type ToolPermissionRequest, type ToolResultEvent, type ToolUseEvent, type TruncateHistoryControl, type UserInputMessage, findGeminiCLI, formatDuration, formatTokens, getApiKey, query, validateApiKey, validateModel };
|
|
1037
|
+
export { type ControlInputMessage, type ControlSubtype, type ErrorEvent, ExitCode, GeminiClient, type GeminiOptions, GeminiSDKError, GeminiStreamClient, type GeminiStreamOptions, type HooksConfiguration, type InitEvent, type InterruptControl, type JsonInputMessage, JsonInputMessageType, type JsonStreamEvent, JsonStreamEventType, LogLevel, type Logger, type LoggerOptions, type MCPServerConfig, type MCPServersConfig, type MessageEvent, ProcessStatus, type QueryResult, type ResultEvent, type ResumeSessionControl, SDKLogger, type StreamStats, type ThoughtEvent, type ToolPermissionDecision, type ToolPermissionRequest, type ToolResultEvent, type ToolUseEvent, type TruncateHistoryControl, type UserInputMessage, createLogger, findGeminiCLI, formatDuration, formatTokens, getApiKey, query, sdkLogger, silentLogger, validateApiKey, validateModel };
|