gaunt-sloth-assistant 0.9.11 → 0.9.13
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/.gsloth.guidelines.md +4 -5
- package/dist/consoleUtils.d.ts +43 -0
- package/dist/consoleUtils.js +162 -16
- package/dist/consoleUtils.js.map +1 -1
- package/dist/core/GthAgentRunner.js +1 -1
- package/dist/core/GthAgentRunner.js.map +1 -1
- package/dist/core/GthLangChainAgent.js +1 -1
- package/dist/core/GthLangChainAgent.js.map +1 -1
- package/dist/debugUtils.d.ts +26 -10
- package/dist/debugUtils.js +31 -78
- package/dist/debugUtils.js.map +1 -1
- package/dist/fileUtils.d.ts +70 -0
- package/dist/fileUtils.js +191 -0
- package/dist/fileUtils.js.map +1 -0
- package/dist/globalConfigUtils.d.ts +5 -0
- package/dist/globalConfigUtils.js +6 -0
- package/dist/globalConfigUtils.js.map +1 -1
- package/dist/modules/interactiveSessionModule.js +11 -0
- package/dist/modules/interactiveSessionModule.js.map +1 -1
- package/dist/pathUtils.d.ts +63 -0
- package/dist/pathUtils.js +143 -10
- package/dist/pathUtils.js.map +1 -1
- package/dist/presets/anthropic.js +1 -1
- package/dist/presets/anthropic.js.map +1 -1
- package/dist/systemUtils.d.ts +3 -17
- package/dist/systemUtils.js +11 -71
- package/dist/systemUtils.js.map +1 -1
- package/dist/utils.d.ts +2 -26
- package/dist/utils.js +9 -97
- package/dist/utils.js.map +1 -1
- package/package.json +8 -9
package/.gsloth.guidelines.md
CHANGED
|
@@ -32,7 +32,7 @@ Please abstain from using relative imports, only use them when no other choices
|
|
|
32
32
|
|
|
33
33
|
- Make sure API key handling and environment variables
|
|
34
34
|
- Make sure no personal data is present in code
|
|
35
|
-
- **
|
|
35
|
+
- **Make sure that API keys are NOT accidentally included into diff.**
|
|
36
36
|
- Check for proper input sanitization
|
|
37
37
|
- Verify output validation and sanitization
|
|
38
38
|
|
|
@@ -52,7 +52,7 @@ Use [llmUtils.ts](src/llmUtils.ts) to access LLM.
|
|
|
52
52
|
|
|
53
53
|
## Testing (Important)
|
|
54
54
|
|
|
55
|
-
Tests are located in `spec
|
|
55
|
+
Tests are located in `spec/`. Integration tests are located in `integration-tests/`.
|
|
56
56
|
|
|
57
57
|
- In spec files never import mocked files themselves, mock them, and a tested file should import them.
|
|
58
58
|
- Always import the tested file dynamically within the test.
|
|
@@ -68,7 +68,6 @@ Example test
|
|
|
68
68
|
|
|
69
69
|
```typescript
|
|
70
70
|
import {beforeEach, describe, expect, it, vi} from 'vitest';
|
|
71
|
-
import {writeFileSync} from "node:fs";
|
|
72
71
|
|
|
73
72
|
const consoleUtilsMock = {
|
|
74
73
|
display: vi.fn(),
|
|
@@ -80,7 +79,7 @@ const consoleUtilsMock = {
|
|
|
80
79
|
};
|
|
81
80
|
vi.mock('#src/consoleUtils.js', () => consoleUtilsMock);
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
const fsUtilsMock = {
|
|
84
83
|
existsSync: vi.fn(),
|
|
85
84
|
readFileSync: vi.fn(),
|
|
86
85
|
writeFileSync: vi.fn(),
|
|
@@ -96,7 +95,7 @@ describe('specialUtil', () => {
|
|
|
96
95
|
});
|
|
97
96
|
|
|
98
97
|
it('specialFunction should eventually write test contents to a file', async () => {
|
|
99
|
-
|
|
98
|
+
fsUtilsMock.readFileSync.mockImplementation((path: string) => {
|
|
100
99
|
if (path.includes('inputFile.txt')) return 'TEST CONTENT';
|
|
101
100
|
return '';
|
|
102
101
|
});
|
package/dist/consoleUtils.d.ts
CHANGED
|
@@ -1,4 +1,47 @@
|
|
|
1
1
|
import { StatusUpdateCallback } from '#src/core/GthLangChainAgent.js';
|
|
2
|
+
export interface LogConfig {
|
|
3
|
+
enableDebug: boolean;
|
|
4
|
+
enableSession: boolean;
|
|
5
|
+
debugFile?: string;
|
|
6
|
+
sessionFile?: string;
|
|
7
|
+
useColor: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const getUseColour: () => boolean;
|
|
10
|
+
export declare const setUseColour: (useColour: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Initialize debug logging based on config
|
|
13
|
+
*/
|
|
14
|
+
export declare function initDebugLogging(enabled: boolean): void;
|
|
15
|
+
/**
|
|
16
|
+
* Log a debug message to the log file
|
|
17
|
+
*/
|
|
18
|
+
export declare function debugLog(message: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Log multiple lines with proper formatting
|
|
21
|
+
*/
|
|
22
|
+
export declare function debugLogMultiline(title: string, content: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Log an object using Node.js inspect with reasonable depth
|
|
25
|
+
*/
|
|
26
|
+
export declare function debugLogObject(title: string, obj: unknown): void;
|
|
27
|
+
/**
|
|
28
|
+
* Log error with stack trace
|
|
29
|
+
*/
|
|
30
|
+
export declare function debugLogError(context: string, error: unknown): void;
|
|
31
|
+
export declare const log: (message: string) => void;
|
|
32
|
+
export declare const error: (message: string) => void;
|
|
33
|
+
export declare const warn: (message: string) => void;
|
|
34
|
+
export declare const info: (message: string) => void;
|
|
35
|
+
export declare const debug: (message: string) => void;
|
|
36
|
+
export declare const stream: (chunk: string) => boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Configure unified logging system
|
|
39
|
+
*/
|
|
40
|
+
export declare function configureLogging(config: Partial<LogConfig>): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get current logging configuration
|
|
43
|
+
*/
|
|
44
|
+
export declare function getLoggingConfig(): LogConfig;
|
|
2
45
|
export declare const initSessionLogging: (logFileName: string, enableLogging: boolean) => void;
|
|
3
46
|
export declare const flushSessionLog: () => void;
|
|
4
47
|
export declare const stopSessionLogging: () => void;
|
package/dist/consoleUtils.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { closeLogStream, initLogStream, writeToLogStream } from '#src/fileUtils.js';
|
|
2
|
+
import { appendFileSync, mkdirSync } from 'node:fs';
|
|
3
|
+
import { dirname, resolve } from 'node:path';
|
|
4
|
+
import { inspect } from 'node:util';
|
|
5
|
+
const unifiedLoggingState = {
|
|
4
6
|
sessionLogFile: undefined,
|
|
5
7
|
enableSessionLogging: false,
|
|
8
|
+
debugLogFile: 'gaunt-sloth.log',
|
|
9
|
+
enableDebugLogging: false,
|
|
10
|
+
useColour: false,
|
|
6
11
|
};
|
|
7
12
|
// ANSI color codes
|
|
8
13
|
const ANSI_COLORS = {
|
|
@@ -15,23 +20,161 @@ const ANSI_COLORS = {
|
|
|
15
20
|
};
|
|
16
21
|
// Helper functions for ANSI coloring
|
|
17
22
|
function colorText(text, color) {
|
|
18
|
-
if (!
|
|
23
|
+
if (!unifiedLoggingState.useColour) {
|
|
19
24
|
return text;
|
|
20
25
|
}
|
|
21
26
|
return `${ANSI_COLORS[color]}${text}${ANSI_COLORS.reset}`;
|
|
22
27
|
}
|
|
28
|
+
// Color setting functions
|
|
29
|
+
export const getUseColour = () => {
|
|
30
|
+
return unifiedLoggingState.useColour;
|
|
31
|
+
};
|
|
32
|
+
export const setUseColour = (useColour) => {
|
|
33
|
+
unifiedLoggingState.useColour = useColour;
|
|
34
|
+
};
|
|
23
35
|
// Stream-based logging function
|
|
24
36
|
const writeToSessionLog = (message) => {
|
|
25
|
-
if (
|
|
37
|
+
if (unifiedLoggingState.enableSessionLogging) {
|
|
26
38
|
// Strip ANSI color codes before logging to file
|
|
27
39
|
const cleanMessage = message.replace(/\x1b\[[0-9;]*m/g, '');
|
|
28
40
|
writeToLogStream(cleanMessage);
|
|
29
41
|
}
|
|
30
42
|
};
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// DEBUG LOGGING FUNCTIONS (merged from debugUtils.ts)
|
|
45
|
+
// =============================================================================
|
|
46
|
+
/**
|
|
47
|
+
* Initialize debug logging based on config
|
|
48
|
+
*/
|
|
49
|
+
export function initDebugLogging(enabled) {
|
|
50
|
+
unifiedLoggingState.enableDebugLogging = enabled;
|
|
51
|
+
if (enabled) {
|
|
52
|
+
// Ensure the log file directory exists
|
|
53
|
+
const logPath = resolve(unifiedLoggingState.debugLogFile);
|
|
54
|
+
const logDir = dirname(logPath);
|
|
55
|
+
try {
|
|
56
|
+
mkdirSync(logDir, { recursive: true });
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
// Directory might already exist, ignore error
|
|
61
|
+
}
|
|
62
|
+
// Log initialization
|
|
63
|
+
debugLog('=== Debug logging initialized ===');
|
|
64
|
+
debugLog(`Timestamp: ${new Date().toISOString()}`);
|
|
65
|
+
debugLog(`Log file: ${logPath}`);
|
|
66
|
+
debugLog('================================\n');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Log a debug message to the log file
|
|
71
|
+
*/
|
|
72
|
+
export function debugLog(message) {
|
|
73
|
+
if (!unifiedLoggingState.enableDebugLogging)
|
|
74
|
+
return;
|
|
75
|
+
const timestamp = new Date().toISOString();
|
|
76
|
+
const logEntry = `[${timestamp}] ${message}\n`;
|
|
77
|
+
try {
|
|
78
|
+
appendFileSync(resolve(unifiedLoggingState.debugLogFile), logEntry, 'utf8');
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
// Ignore logging errors to prevent breaking the main flow
|
|
82
|
+
console.error('Failed to write to debug log:', error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Log multiple lines with proper formatting
|
|
87
|
+
*/
|
|
88
|
+
export function debugLogMultiline(title, content) {
|
|
89
|
+
if (!unifiedLoggingState.enableDebugLogging)
|
|
90
|
+
return;
|
|
91
|
+
debugLog(`=== ${title} ===`);
|
|
92
|
+
debugLog(content);
|
|
93
|
+
debugLog(`=== End ${title} ===\n`);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Log an object using Node.js inspect with reasonable depth
|
|
97
|
+
*/
|
|
98
|
+
export function debugLogObject(title, obj) {
|
|
99
|
+
if (!unifiedLoggingState.enableDebugLogging)
|
|
100
|
+
return;
|
|
101
|
+
try {
|
|
102
|
+
// Use Node.js inspect with reasonable depth and no colors for log files
|
|
103
|
+
const formatted = inspect(obj, { showHidden: false, depth: 3, colors: false });
|
|
104
|
+
debugLogMultiline(title, formatted);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
debugLog(`Failed to inspect ${title}: ${error}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Log error with stack trace
|
|
112
|
+
*/
|
|
113
|
+
export function debugLogError(context, error) {
|
|
114
|
+
if (!unifiedLoggingState.enableDebugLogging)
|
|
115
|
+
return;
|
|
116
|
+
debugLog(`❌ Error in ${context}:`);
|
|
117
|
+
if (error instanceof Error) {
|
|
118
|
+
debugLog(` Message: ${error.message}`);
|
|
119
|
+
if (error.stack) {
|
|
120
|
+
debugLog(' Stack trace:');
|
|
121
|
+
error.stack.split('\n').forEach((line) => debugLog(` ${line}`));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
debugLog(` Error: ${String(error)}`);
|
|
126
|
+
}
|
|
127
|
+
debugLog('');
|
|
128
|
+
}
|
|
129
|
+
// =============================================================================
|
|
130
|
+
// CONSOLE LOGGING FUNCTIONS (merged from systemUtils.ts)
|
|
131
|
+
// =============================================================================
|
|
132
|
+
// Console-related functions - these write directly to console streams
|
|
133
|
+
export const log = (message) => console.log(message);
|
|
134
|
+
export const error = (message) => console.error(message);
|
|
135
|
+
export const warn = (message) => console.warn(message);
|
|
136
|
+
export const info = (message) => console.info(message);
|
|
137
|
+
export const debug = (message) => console.debug(message);
|
|
138
|
+
export const stream = (chunk) => process.stdout.write(chunk);
|
|
139
|
+
// =============================================================================
|
|
140
|
+
// UNIFIED CONFIGURATION FUNCTIONS
|
|
141
|
+
// =============================================================================
|
|
142
|
+
/**
|
|
143
|
+
* Configure unified logging system
|
|
144
|
+
*/
|
|
145
|
+
export function configureLogging(config) {
|
|
146
|
+
if (config.enableDebug !== undefined) {
|
|
147
|
+
initDebugLogging(config.enableDebug);
|
|
148
|
+
}
|
|
149
|
+
if (config.debugFile !== undefined) {
|
|
150
|
+
unifiedLoggingState.debugLogFile = config.debugFile;
|
|
151
|
+
}
|
|
152
|
+
if (config.enableSession !== undefined && config.sessionFile !== undefined) {
|
|
153
|
+
initSessionLogging(config.sessionFile, config.enableSession);
|
|
154
|
+
}
|
|
155
|
+
if (config.useColor !== undefined) {
|
|
156
|
+
setUseColour(config.useColor);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get current logging configuration
|
|
161
|
+
*/
|
|
162
|
+
export function getLoggingConfig() {
|
|
163
|
+
return {
|
|
164
|
+
enableDebug: unifiedLoggingState.enableDebugLogging,
|
|
165
|
+
enableSession: unifiedLoggingState.enableSessionLogging,
|
|
166
|
+
debugFile: unifiedLoggingState.debugLogFile,
|
|
167
|
+
sessionFile: unifiedLoggingState.sessionLogFile,
|
|
168
|
+
useColor: unifiedLoggingState.useColour,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// =============================================================================
|
|
172
|
+
// SESSION LOGGING FUNCTIONS
|
|
173
|
+
// =============================================================================
|
|
31
174
|
// Public functions for session logging management
|
|
32
175
|
export const initSessionLogging = (logFileName, enableLogging) => {
|
|
33
|
-
|
|
34
|
-
|
|
176
|
+
unifiedLoggingState.sessionLogFile = enableLogging ? logFileName : undefined;
|
|
177
|
+
unifiedLoggingState.enableSessionLogging = enableLogging;
|
|
35
178
|
if (enableLogging && logFileName) {
|
|
36
179
|
initLogStream(logFileName);
|
|
37
180
|
}
|
|
@@ -42,32 +185,35 @@ export const flushSessionLog = () => {
|
|
|
42
185
|
};
|
|
43
186
|
export const stopSessionLogging = () => {
|
|
44
187
|
closeLogStream();
|
|
45
|
-
|
|
46
|
-
|
|
188
|
+
unifiedLoggingState.sessionLogFile = undefined;
|
|
189
|
+
unifiedLoggingState.enableSessionLogging = false;
|
|
47
190
|
};
|
|
191
|
+
// =============================================================================
|
|
192
|
+
// DISPLAY FUNCTIONS (enhanced with unified logging)
|
|
193
|
+
// =============================================================================
|
|
48
194
|
export function displayError(message) {
|
|
49
195
|
const coloredMessage = colorText(message, 'red');
|
|
50
196
|
writeToSessionLog(message + '\n');
|
|
51
|
-
|
|
197
|
+
log(coloredMessage);
|
|
52
198
|
}
|
|
53
199
|
export function displayWarning(message) {
|
|
54
200
|
const coloredMessage = colorText(message, 'yellow');
|
|
55
201
|
writeToSessionLog(message + '\n');
|
|
56
|
-
|
|
202
|
+
warn(coloredMessage);
|
|
57
203
|
}
|
|
58
204
|
export function displaySuccess(message) {
|
|
59
205
|
const coloredMessage = colorText(message, 'green');
|
|
60
206
|
writeToSessionLog(message + '\n');
|
|
61
|
-
|
|
207
|
+
log(coloredMessage);
|
|
62
208
|
}
|
|
63
209
|
export function displayInfo(message) {
|
|
64
210
|
const coloredMessage = colorText(message, 'dim');
|
|
65
211
|
writeToSessionLog(message + '\n');
|
|
66
|
-
|
|
212
|
+
info(coloredMessage);
|
|
67
213
|
}
|
|
68
214
|
export function display(message) {
|
|
69
215
|
writeToSessionLog(message + '\n');
|
|
70
|
-
|
|
216
|
+
log(message);
|
|
71
217
|
}
|
|
72
218
|
export function formatInputPrompt(message) {
|
|
73
219
|
return colorText(message, 'magenta');
|
|
@@ -77,11 +223,11 @@ export function displayDebug(message) {
|
|
|
77
223
|
if (message instanceof Error) {
|
|
78
224
|
const stackTrace = message.stack || '';
|
|
79
225
|
writeToSessionLog(stackTrace + '\n');
|
|
80
|
-
|
|
226
|
+
debug(stackTrace);
|
|
81
227
|
}
|
|
82
228
|
else if (message !== undefined) {
|
|
83
229
|
writeToSessionLog(message + '\n');
|
|
84
|
-
|
|
230
|
+
debug(message);
|
|
85
231
|
}
|
|
86
232
|
}
|
|
87
233
|
// Create status update callback
|
package/dist/consoleUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleUtils.js","sourceRoot":"","sources":["../src/consoleUtils.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"consoleUtils.js","sourceRoot":"","sources":["../src/consoleUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,MAAM,mBAAmB,GAAwB;IAC/C,cAAc,EAAE,SAAS;IACzB,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,iBAAiB;IAC/B,kBAAkB,EAAE,KAAK;IACzB,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,mBAAmB;AACnB,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,UAAU;IACf,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,UAAU;IACnB,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,qCAAqC;AACrC,SAAS,SAAS,CAAC,IAAY,EAAE,KAA+B;IAC9D,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC;AAC5D,CAAC;AAED,0BAA0B;AAC1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAY,EAAE;IACxC,OAAO,mBAAmB,CAAC,SAAS,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAkB,EAAQ,EAAE;IACvD,mBAAmB,CAAC,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@@
|
|
|
1
1
|
import { GthLangChainAgent } from '#src/core/GthLangChainAgent.js';
|
|
2
2
|
import { executeHooks } from '#src/utils.js';
|
|
3
3
|
import { getNewRunnableConfig } from '#src/llmUtils.js';
|
|
4
|
-
import { initDebugLogging, debugLog, debugLogError, debugLogObject } from '#src/
|
|
4
|
+
import { initDebugLogging, debugLog, debugLogError, debugLogObject } from '#src/consoleUtils.js';
|
|
5
5
|
/**
|
|
6
6
|
* Agent simplifies interaction with LLM and reduces it to calling a few methods
|
|
7
7
|
* {@link GthAgentRunner#init} and {@link GthAgentRunner#processMessages}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GthAgentRunner.js","sourceRoot":"","sources":["../../src/core/GthAgentRunner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gCAAgC,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GthAgentRunner.js","sourceRoot":"","sources":["../../src/core/GthAgentRunner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gCAAgC,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjG;;;GAGG;AACH,MAAM,OAAO,cAAc;IACjB,YAAY,CAAuB;IACnC,KAAK,GAA6B,IAAI,CAAC;IACvC,MAAM,GAAqB,IAAI,CAAC;IAChC,SAAS,GAA0B,IAAI,CAAC;IAEhD,YAAY,YAAkC;QAC5C,IA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Tools } from '#src/builtInToolsConfig.js';
|
|
2
2
|
import { displayInfo } from '#src/consoleUtils.js';
|
|
3
|
-
import { debugLog, debugLogError, debugLogObject } from '#src/
|
|
3
|
+
import { debugLog, debugLogError, debugLogObject } from '#src/consoleUtils.js';
|
|
4
4
|
import { createAuthProviderAndAuthenticate } from '#src/mcp/OAuthClientProviderImpl.js';
|
|
5
5
|
import { stopWaitingForEscape, waitForEscape } from '#src/systemUtils.js';
|
|
6
6
|
import { formatToolCalls, ProgressIndicator } from '#src/utils.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GthLangChainAgent.js","sourceRoot":"","sources":["../../src/core/GthLangChainAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GthLangChainAgent.js","sourceRoot":"","sources":["../../src/core/GthLangChainAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,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,IAAI,oBAAoB,CAAC;gBAC9B,gBAAgB,EAAE,IAAI;gBACtB,4BAA4B,EAAE,IAAI;gBAClC,wBAAwB,EAAE,KAAK;gBAC/B,UAAU,EAAE,UAAU;aACvB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,2BAA2B,CAAC,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
package/dist/debugUtils.d.ts
CHANGED
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @fileoverview DEPRECATED: This file is deprecated and will be removed in a future release.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ DEPRECATION NOTICE ⚠️
|
|
5
|
+
*
|
|
6
|
+
* All debug logging functionality has been moved to `#src/consoleUtils.js` as part of the
|
|
7
|
+
* unified logging system. Please update your imports:
|
|
8
|
+
*
|
|
9
|
+
* OLD: import { debugLog, debugLogError, ... } from '#src/debugUtils.js';
|
|
10
|
+
* NEW: import { debugLog, debugLogError, ... } from '#src/consoleUtils.js';
|
|
11
|
+
*
|
|
12
|
+
* This file provides backward compatibility re-exports but will be removed in Release 4.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use `#src/consoleUtils.js` instead
|
|
3
15
|
*/
|
|
4
|
-
export
|
|
16
|
+
export {
|
|
5
17
|
/**
|
|
6
|
-
*
|
|
18
|
+
* @deprecated Use `import { initDebugLogging } from '#src/consoleUtils.js'` instead
|
|
7
19
|
*/
|
|
8
|
-
|
|
20
|
+
initDebugLogging,
|
|
9
21
|
/**
|
|
10
|
-
*
|
|
22
|
+
* @deprecated Use `import { debugLog } from '#src/consoleUtils.js'` instead
|
|
11
23
|
*/
|
|
12
|
-
|
|
24
|
+
debugLog,
|
|
13
25
|
/**
|
|
14
|
-
*
|
|
26
|
+
* @deprecated Use `import { debugLogMultiline } from '#src/consoleUtils.js'` instead
|
|
15
27
|
*/
|
|
16
|
-
|
|
28
|
+
debugLogMultiline,
|
|
17
29
|
/**
|
|
18
|
-
*
|
|
30
|
+
* @deprecated Use `import { debugLogObject } from '#src/consoleUtils.js'` instead
|
|
19
31
|
*/
|
|
20
|
-
|
|
32
|
+
debugLogObject,
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use `import { debugLogError } from '#src/consoleUtils.js'` instead
|
|
35
|
+
*/
|
|
36
|
+
debugLogError, } from '#src/consoleUtils.js';
|
package/dist/debugUtils.js
CHANGED
|
@@ -1,89 +1,42 @@
|
|
|
1
|
-
import { appendFileSync, mkdirSync } from 'node:fs';
|
|
2
|
-
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { inspect } from 'node:util';
|
|
4
|
-
const DEBUG_LOG_FILE = 'gaunt-sloth.log';
|
|
5
|
-
let debugEnabled = false;
|
|
6
1
|
/**
|
|
7
|
-
*
|
|
2
|
+
* @fileoverview DEPRECATED: This file is deprecated and will be removed in a future release.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ DEPRECATION NOTICE ⚠️
|
|
5
|
+
*
|
|
6
|
+
* All debug logging functionality has been moved to `#src/consoleUtils.js` as part of the
|
|
7
|
+
* unified logging system. Please update your imports:
|
|
8
|
+
*
|
|
9
|
+
* OLD: import { debugLog, debugLogError, ... } from '#src/debugUtils.js';
|
|
10
|
+
* NEW: import { debugLog, debugLogError, ... } from '#src/consoleUtils.js';
|
|
11
|
+
*
|
|
12
|
+
* This file provides backward compatibility re-exports but will be removed in Release 4.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use `#src/consoleUtils.js` instead
|
|
8
15
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
mkdirSync(logDir, { recursive: true });
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
// Directory might already exist, ignore error
|
|
21
|
-
}
|
|
22
|
-
// Log initialization
|
|
23
|
-
debugLog('=== Debug logging initialized ===');
|
|
24
|
-
debugLog(`Timestamp: ${new Date().toISOString()}`);
|
|
25
|
-
debugLog(`Log file: ${logPath}`);
|
|
26
|
-
debugLog('================================\n');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
16
|
+
// Issue deprecation warning once when this module is first imported
|
|
17
|
+
console.warn('⚠️ DEPRECATION WARNING: debugUtils.ts is deprecated. ' +
|
|
18
|
+
'Please import debug logging functions from #src/consoleUtils.js instead. ' +
|
|
19
|
+
'This compatibility layer will be removed in Release 4.');
|
|
20
|
+
// Re-export all debug logging functions from the unified consoleUtils
|
|
21
|
+
export {
|
|
29
22
|
/**
|
|
30
|
-
*
|
|
23
|
+
* @deprecated Use `import { initDebugLogging } from '#src/consoleUtils.js'` instead
|
|
31
24
|
*/
|
|
32
|
-
|
|
33
|
-
if (!debugEnabled)
|
|
34
|
-
return;
|
|
35
|
-
const timestamp = new Date().toISOString();
|
|
36
|
-
const logEntry = `[${timestamp}] ${message}\n`;
|
|
37
|
-
try {
|
|
38
|
-
appendFileSync(resolve(DEBUG_LOG_FILE), logEntry, 'utf8');
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
// Ignore logging errors to prevent breaking the main flow
|
|
42
|
-
console.error('Failed to write to debug log:', error);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
25
|
+
initDebugLogging,
|
|
45
26
|
/**
|
|
46
|
-
*
|
|
27
|
+
* @deprecated Use `import { debugLog } from '#src/consoleUtils.js'` instead
|
|
47
28
|
*/
|
|
48
|
-
|
|
49
|
-
if (!debugEnabled)
|
|
50
|
-
return;
|
|
51
|
-
debugLog(`=== ${title} ===`);
|
|
52
|
-
debugLog(content);
|
|
53
|
-
debugLog(`=== End ${title} ===\n`);
|
|
54
|
-
}
|
|
29
|
+
debugLog,
|
|
55
30
|
/**
|
|
56
|
-
*
|
|
31
|
+
* @deprecated Use `import { debugLogMultiline } from '#src/consoleUtils.js'` instead
|
|
57
32
|
*/
|
|
58
|
-
|
|
59
|
-
if (!debugEnabled)
|
|
60
|
-
return;
|
|
61
|
-
try {
|
|
62
|
-
// Use Node.js inspect with reasonable depth and no colors for log files
|
|
63
|
-
const formatted = inspect(obj, { showHidden: false, depth: 3, colors: false });
|
|
64
|
-
debugLogMultiline(title, formatted);
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
debugLog(`Failed to inspect ${title}: ${error}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
33
|
+
debugLogMultiline,
|
|
70
34
|
/**
|
|
71
|
-
*
|
|
35
|
+
* @deprecated Use `import { debugLogObject } from '#src/consoleUtils.js'` instead
|
|
72
36
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
debugLog(` Message: ${error.message}`);
|
|
79
|
-
if (error.stack) {
|
|
80
|
-
debugLog(' Stack trace:');
|
|
81
|
-
error.stack.split('\n').forEach((line) => debugLog(` ${line}`));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
debugLog(` Error: ${String(error)}`);
|
|
86
|
-
}
|
|
87
|
-
debugLog('');
|
|
88
|
-
}
|
|
37
|
+
debugLogObject,
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `import { debugLogError } from '#src/consoleUtils.js'` instead
|
|
40
|
+
*/
|
|
41
|
+
debugLogError, } from '#src/consoleUtils.js';
|
|
89
42
|
//# sourceMappingURL=debugUtils.js.map
|
package/dist/debugUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugUtils.js","sourceRoot":"","sources":["../src/debugUtils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"debugUtils.js","sourceRoot":"","sources":["../src/debugUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oEAAoE;AACpE,OAAO,CAAC,IAAI,CACV,wDAAwD;IACtD,2EAA2E;IAC3E,wDAAwD,CAC3D,CAAC;AAEF,sEAAsE;AACtE,OAAO;AACL;;GAEG;AACH,gBAAgB;AAChB;;GAEG;AACH,QAAQ;AACR;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,cAAc;AACd;;GAEG;AACH,aAAa,GACd,MAAM,sBAAsB,CAAC"}
|