dr-debug 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Saswat Mohanty (https://github.com/SazWhatician)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # 🩺 Dr. Debug (`dr-debug`)
2
+
3
+ > **Autonomous In-Browser AI Debugging & Observability Agent**
4
+ > Diagnoses client substrate crashes, network failures, memory leaks, and DOM anomalies directly within the browser runtime using Re-Act diagnostic loops.
5
+
6
+ [![npm version](https://img.shields.io/npm/v/dr-debug.svg?color=blue)](https://www.npmjs.com/package/dr-debug)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
9
+
10
+ Created by **Saswat Mohanty** ([@SazWhatician](https://github.com/SazWhatician))
11
+ - **GitHub:** [https://github.com/SazWhatician/DebugCopilot](https://github.com/SazWhatician/DebugCopilot)
12
+ - **LinkedIn:** [https://www.linkedin.com/in/saswat-mohanty-0a4549331/](https://www.linkedin.com/in/saswat-mohanty-0a4549331/)
13
+
14
+ ---
15
+
16
+ ## ⚡ Installation
17
+
18
+ Install via npm, pnpm, or yarn:
19
+
20
+ ```bash
21
+ npm install dr-debug
22
+ ```
23
+
24
+ Or run via CDN / HTML script tag:
25
+
26
+ ```html
27
+ <script type="module" src="https://unpkg.com/dr-debug/dist/standalone.js"></script>
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 🚀 Quick Start
33
+
34
+ ### 1. In Any Modern JavaScript / TypeScript Project
35
+
36
+ ```typescript
37
+ import { DrDebug } from 'dr-debug'
38
+
39
+ // Initialize the autonomous debugging copilot
40
+ const doctor = new DrDebug({
41
+ apiKey: process.env.GROQ_API_KEY || 'your-llm-api-key',
42
+ model: 'llama-3.3-70b-versatile', // or 'openai:gpt-4o', 'claude-3-5-sonnet', or local 'litert'
43
+ enableUI: true, // Renders the sleek Shadow DOM HUD & floating widget
44
+ enableDocker: true, // Connects with local Docker bridge for backend logs
45
+ enableMCP: true // Enables IDE live synchronization
46
+ })
47
+
48
+ // Trigger diagnostic investigations programmatically
49
+ await doctor.investigate('Investigate recent API failures on checkout')
50
+ ```
51
+
52
+ ### 2. Standalone In-Browser Drop-In (Zero Bundler Required)
53
+
54
+ Add this script to your `index.html` or entry template:
55
+
56
+ ```html
57
+ <script
58
+ type="module"
59
+ src="https://unpkg.com/dr-debug/dist/standalone.js"
60
+ data-api-key="your-api-key"
61
+ data-model="llama-3.3-70b-versatile">
62
+ </script>
63
+ ```
64
+
65
+ ---
66
+
67
+ ## 🔬 Core Capabilities
68
+
69
+ - **Deep Substrate Telemetry Interception**: Monkeypatches and observes `fetch`, `XMLHttpRequest`, `console.error`, `window.onerror`, unhandled promise rejections, and Performance API metrics without leaking into application state.
70
+ - **Shadow DOM Diagnostic HUD**: Complete glassmorphic DevTools panel rendered into a sealed Shadow Root to ensure zero CSS collisions with host websites.
71
+ - **Re-Act Autonomous Loop**: Multi-turn reasoning agent that queries DOM trees, searches console logs, verifies network payloads, and generates concrete code diff solutions.
72
+ - **Docker Log Correlation**: Streams backend container logs and correlates them with frontend network timeouts to pinpoint full-stack root causes.
73
+ - **MCP Protocol Bridge**: Syncs tab telemetry with Cursor, VS Code, and Claude Code via Model Context Protocol.
74
+
75
+ ---
76
+
77
+ ## 🛠️ Configuration Options
78
+
79
+ | Option | Type | Default | Description |
80
+ |:---|:---|:---|:---|
81
+ | `apiKey` | `string` | `undefined` | LLM API key (Groq, OpenAI, Anthropic, or Gemini) |
82
+ | `model` | `string` | `'llama-3.3-70b-versatile'` | Target model name or provider format |
83
+ | `enableUI` | `boolean` | `true` | Show floating button and diagnostic modal |
84
+ | `enableDocker` | `boolean` | `false` | Enable Docker container telemetry sync |
85
+ | `enableMCP` | `boolean` | `false` | Enable Model Context Protocol websocket bridge |
86
+ | `mcpPort` | `number` | `9999` | Port for local MCP daemon bridge |
87
+
88
+ ---
89
+
90
+ ## 📄 License
91
+
92
+ MIT © [Saswat Mohanty](https://github.com/SazWhatician)
@@ -0,0 +1,51 @@
1
+ import { DebugController } from '@dr-debug/controller';
2
+ import { DrDebugCore, type InvestigationOptions, type InvestigationResult } from '@dr-debug/core';
3
+ import { type ILLMClient, type LiteRTConfig } from '@dr-debug/llms';
4
+ import { DrDebugUI } from '@dr-debug/ui';
5
+ export interface DrDebugOptions {
6
+ model?: string;
7
+ apiKey?: string;
8
+ baseURL?: string;
9
+ liteRT?: LiteRTConfig;
10
+ llmClient?: ILLMClient;
11
+ maxSteps?: number;
12
+ language?: string;
13
+ enableUI?: boolean;
14
+ autoInvestigate?: boolean;
15
+ enableMCP?: boolean;
16
+ enableDocker?: boolean;
17
+ mcpPort?: number;
18
+ }
19
+ export declare class DrDebug {
20
+ private controller;
21
+ private core;
22
+ private llmClient;
23
+ private ui?;
24
+ private options;
25
+ private isAutoInvestigating;
26
+ private mcpSocket?;
27
+ private syncInterval?;
28
+ private lastInvestigation;
29
+ constructor(options?: DrDebugOptions);
30
+ updateLLMConfig(config: Partial<DrDebugOptions>): void;
31
+ testLLMConnection(config?: Partial<DrDebugOptions>): Promise<{
32
+ success: boolean;
33
+ message: string;
34
+ }>;
35
+ getController(): DebugController;
36
+ /**
37
+ * The full paste-ready incident brief for an external coding agent
38
+ * (Claude Code / Antigravity / Cursor). Composed from live telemetry, and
39
+ * folds in the last agent investigation when one has run.
40
+ */
41
+ getSessionDebugPrompt(): string;
42
+ getLastInvestigation(): InvestigationResult | null;
43
+ getCore(): DrDebugCore;
44
+ getUI(): DrDebugUI | undefined;
45
+ investigate(goal?: string, options?: InvestigationOptions): Promise<InvestigationResult>;
46
+ syncUIStatus(): void;
47
+ private handleAutoTrigger;
48
+ private connectToMCPBridge;
49
+ destroy(): void;
50
+ }
51
+ //# sourceMappingURL=DrDebug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrDebug.d.ts","sourceRoot":"","sources":["../src/DrDebug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EACL,WAAW,EAGX,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,YAAY,EAElB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,SAAS,CAAC,EAAE,UAAU,CAAA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@@
1
+ import { DebugController } from '@dr-debug/controller';
2
+ import { DrDebugCore, generateSessionDebugPrompt, HeuristicLLMClient } from '@dr-debug/core';
3
+ import { LiteRTClient, OpenAIClient } from '@dr-debug/llms';
4
+ import { DrDebugUI } from '@dr-debug/ui';
5
+ export class DrDebug {
6
+ controller;
7
+ core;
8
+ llmClient;
9
+ ui;
10
+ options;
11
+ isAutoInvestigating = false;
12
+ mcpSocket;
13
+ syncInterval;
14
+ lastInvestigation = null;
15
+ constructor(options = {}) {
16
+ this.options = options;
17
+ // 1. Substrate Controller
18
+ this.controller = new DebugController();
19
+ this.controller.init();
20
+ // 2. LLM Client Resolution
21
+ if (options.llmClient) {
22
+ this.llmClient = options.llmClient;
23
+ }
24
+ else if (options.liteRT || (options.model && options.model.toLowerCase().includes('litert'))) {
25
+ this.llmClient = new LiteRTClient(options.liteRT || { modelName: options.model });
26
+ }
27
+ else if (options.apiKey || options.baseURL || options.model) {
28
+ this.llmClient = new OpenAIClient({
29
+ apiKey: options.apiKey || '',
30
+ baseURL: options.baseURL,
31
+ model: options.model || 'gpt-4o'
32
+ });
33
+ }
34
+ else {
35
+ // No model configured: use the deterministic local engine rather than a
36
+ // simulated one, so an unconfigured install still gives real answers.
37
+ this.llmClient = new HeuristicLLMClient(this.controller);
38
+ }
39
+ // 3. Core Diagnostic Loop
40
+ this.core = new DrDebugCore(this.controller, this.llmClient);
41
+ // 4. Shadow DOM UI Cockpit
42
+ const shouldEnableUI = options.enableUI !== false && typeof document !== 'undefined';
43
+ if (shouldEnableUI) {
44
+ this.ui = new DrDebugUI({
45
+ onInvestigate: async (goal) => {
46
+ await this.investigate(goal);
47
+ },
48
+ getController: () => this.controller,
49
+ getSessionPrompt: () => this.getSessionDebugPrompt(),
50
+ onSaveSettings: (settings) => {
51
+ this.updateLLMConfig(settings);
52
+ },
53
+ onTestConnection: async (settings) => {
54
+ return await this.testLLMConnection(settings);
55
+ }
56
+ });
57
+ this.syncUIStatus();
58
+ // Real-time telemetry sync for badge and triage drawer
59
+ if (typeof window !== 'undefined') {
60
+ this.syncInterval = setInterval(() => {
61
+ this.syncUIStatus();
62
+ }, 800);
63
+ }
64
+ }
65
+ // 5. Auto-investigate on uncaught errors if configured
66
+ if (options.autoInvestigate && typeof window !== 'undefined') {
67
+ window.addEventListener('error', () => this.handleAutoTrigger());
68
+ window.addEventListener('unhandledrejection', () => this.handleAutoTrigger());
69
+ }
70
+ // 6. Connect to local Dr. Debug MCP Daemon if enabled
71
+ if (options.enableMCP && typeof window !== 'undefined' && typeof WebSocket !== 'undefined') {
72
+ this.connectToMCPBridge(options.mcpPort || 9229);
73
+ }
74
+ // 7. Connect to host Docker Bridge if enabled
75
+ if (options.enableDocker !== false && typeof window !== 'undefined') {
76
+ this.controller.connectDockerBridge(options.mcpPort || 9229);
77
+ }
78
+ }
79
+ updateLLMConfig(config) {
80
+ this.options = { ...this.options, ...config };
81
+ if (config.llmClient) {
82
+ this.llmClient = config.llmClient;
83
+ }
84
+ else if (config.liteRT || (config.model && config.model.toLowerCase().includes('litert'))) {
85
+ this.llmClient = new LiteRTClient(config.liteRT || { modelName: config.model });
86
+ }
87
+ else if (config.apiKey || config.baseURL || config.model) {
88
+ this.llmClient = new OpenAIClient({
89
+ apiKey: config.apiKey || '',
90
+ baseURL: config.baseURL,
91
+ model: config.model || 'llama-3.3-70b-versatile'
92
+ });
93
+ }
94
+ this.core = new DrDebugCore(this.controller, this.llmClient);
95
+ }
96
+ async testLLMConnection(config) {
97
+ const targetConfig = config ? { ...this.options, ...config } : this.options;
98
+ let client;
99
+ if (targetConfig.liteRT || (targetConfig.model && targetConfig.model.toLowerCase().includes('litert'))) {
100
+ client = new LiteRTClient(targetConfig.liteRT || { modelName: targetConfig.model });
101
+ }
102
+ else {
103
+ client = new OpenAIClient({
104
+ apiKey: targetConfig.apiKey || '',
105
+ baseURL: targetConfig.baseURL,
106
+ model: targetConfig.model || 'llama-3.3-70b-versatile'
107
+ });
108
+ }
109
+ if (client instanceof OpenAIClient) {
110
+ return await client.testConnection();
111
+ }
112
+ return { success: true, message: 'On-device engine ready' };
113
+ }
114
+ getController() {
115
+ return this.controller;
116
+ }
117
+ /**
118
+ * The full paste-ready incident brief for an external coding agent
119
+ * (Claude Code / Antigravity / Cursor). Composed from live telemetry, and
120
+ * folds in the last agent investigation when one has run.
121
+ */
122
+ getSessionDebugPrompt() {
123
+ return generateSessionDebugPrompt(this.controller.getSnapshot(), {
124
+ investigation: this.lastInvestigation
125
+ });
126
+ }
127
+ getLastInvestigation() {
128
+ return this.lastInvestigation;
129
+ }
130
+ getCore() {
131
+ return this.core;
132
+ }
133
+ getUI() {
134
+ return this.ui;
135
+ }
136
+ async investigate(goal, options = {}) {
137
+ const activeGoal = goal || 'Diagnose all active browser errors, network failures, and performance bottlenecks.';
138
+ // Automatically prepare and show HUD cockpit
139
+ this.ui?.clearTimeline();
140
+ this.ui?.switchTab('timeline');
141
+ this.ui?.openCockpit();
142
+ this.ui?.updatePillStatus(this.controller.getConsoleEntries().filter((e) => e.level === 'error').length, this.controller.getNetworkRecords().filter((r) => r.isFailed).length, this.controller.getNetworkRecords().filter((r) => r.isSlow && !r.isFailed).length, true);
143
+ let currentHypothesis = 'Reading telemetry buffers and forming initial hypothesis...';
144
+ let currentStepNumber = 1;
145
+ this.ui?.showThinking(currentHypothesis);
146
+ try {
147
+ const result = await this.core.investigate(activeGoal, {
148
+ maxSteps: options.maxSteps ?? this.options.maxSteps ?? 8,
149
+ signal: options.signal,
150
+ onStepStart: (stepNumber) => {
151
+ currentStepNumber = stepNumber;
152
+ options.onStepStart?.(stepNumber);
153
+ },
154
+ onReflection: (reflection) => {
155
+ currentHypothesis = reflection.working_hypothesis;
156
+ this.ui?.showThinking(reflection.working_hypothesis);
157
+ options.onReflection?.(reflection);
158
+ },
159
+ onToolResult: (toolName, toolResult) => {
160
+ this.ui?.addTimelineStep({
161
+ stepNumber: currentStepNumber,
162
+ hypothesis: currentHypothesis,
163
+ toolName,
164
+ toolOutput: toolResult
165
+ });
166
+ options.onToolResult?.(toolName, toolResult);
167
+ },
168
+ onDone: (res) => {
169
+ options.onDone?.(res);
170
+ }
171
+ });
172
+ // Retained so the "Copy for AI" brief can include the agent's conclusion.
173
+ this.lastInvestigation = result;
174
+ if (this.ui) {
175
+ this.ui.showPrescription({
176
+ diagnosis: result.diagnosis,
177
+ rootCause: result.rootCause,
178
+ fix: result.fix || '',
179
+ confidence: result.confidence,
180
+ filesToModify: result.filesToModify
181
+ });
182
+ }
183
+ return result;
184
+ }
185
+ catch (err) {
186
+ if (this.ui) {
187
+ this.ui.showPrescription({
188
+ diagnosis: `AI Investigation failed: ${err.message || 'Unknown error'}`,
189
+ rootCause: err.message?.includes('API key') || err.message?.includes('401') || err.message?.includes('404')
190
+ ? `LLM Authentication/Configuration error: ${err.message}. Check your API key or chosen model in the config bar.`
191
+ : (err.message || 'Execution error during Re-Act investigation'),
192
+ confidence: 0,
193
+ fix: ''
194
+ });
195
+ }
196
+ throw err;
197
+ }
198
+ finally {
199
+ this.syncUIStatus();
200
+ }
201
+ }
202
+ syncUIStatus() {
203
+ if (!this.ui)
204
+ return;
205
+ const errors = this.controller.getConsoleEntries().filter((e) => e.level === 'error');
206
+ const failedNet = this.controller.getNetworkRecords().filter((r) => r.isFailed);
207
+ const slowNet = this.controller.getNetworkRecords().filter((r) => r.isSlow && !r.isFailed);
208
+ const allProblemNet = this.controller.getNetworkRecords().filter((r) => r.isFailed || r.isSlow);
209
+ const memory = this.controller.getMemorySnapshot();
210
+ this.ui.updatePillStatus(errors.length, failedNet.length, slowNet.length, false);
211
+ this.ui.updateTriage({
212
+ errors: errors.map((e) => e.message),
213
+ slowRequests: allProblemNet.map((r) => `${r.method} ${r.url} ${r.status ? `[${r.status}]` : ''} (${Math.round(r.duration || 0)}ms)`),
214
+ memory: memory
215
+ ? {
216
+ usedMB: Math.round((memory.usedJSHeapSize || 0) / (1024 * 1024)),
217
+ totalMB: Math.round((memory.totalJSHeapSize || 0) / (1024 * 1024))
218
+ }
219
+ : undefined
220
+ });
221
+ // Sync full-stack causal topology graph
222
+ const graph = this.controller.getCausalGraph();
223
+ this.ui.updateCausalGraph(graph);
224
+ // Sync Errors Matrix & Histogram
225
+ this.ui.updateErrors();
226
+ // Sync Docker telemetry & live container logs
227
+ this.ui.updateDocker();
228
+ }
229
+ async handleAutoTrigger() {
230
+ if (this.isAutoInvestigating)
231
+ return;
232
+ this.isAutoInvestigating = true;
233
+ try {
234
+ await this.investigate('Autonomous diagnosis triggered by uncaught runtime exception.');
235
+ }
236
+ finally {
237
+ this.isAutoInvestigating = false;
238
+ }
239
+ }
240
+ connectToMCPBridge(port = 9229) {
241
+ try {
242
+ const tabId = `tab_${Date.now()}`;
243
+ const ws = new WebSocket(`ws://localhost:${port}/browser?tabId=${tabId}`);
244
+ this.mcpSocket = ws;
245
+ ws.onopen = () => {
246
+ const state = this.controller.getSnapshot();
247
+ ws.send(JSON.stringify({
248
+ type: 'TELEMETRY_SYNC',
249
+ state: {
250
+ ...state,
251
+ serializedXml: this.controller.serialize(),
252
+ diagnosticMatrix: this.controller.getDiagnosticMatrix(),
253
+ interactionsHuman: this.controller.getInteractionReplayHuman()
254
+ }
255
+ }));
256
+ };
257
+ ws.onmessage = async (evt) => {
258
+ try {
259
+ const msg = JSON.parse(evt.data);
260
+ if (msg.type === 'EVAL_SCRIPT') {
261
+ try {
262
+ const res = window.eval(msg.expression);
263
+ ws.send(JSON.stringify({ type: 'COMMAND_RESPONSE', commandId: msg.commandId, result: res }));
264
+ }
265
+ catch (err) {
266
+ ws.send(JSON.stringify({ type: 'COMMAND_RESPONSE', commandId: msg.commandId, error: err.message }));
267
+ }
268
+ }
269
+ }
270
+ catch {
271
+ // Ignore parse errors
272
+ }
273
+ };
274
+ ws.onerror = () => {
275
+ // Silently handle offline local daemon
276
+ };
277
+ }
278
+ catch {
279
+ // MCP bridge is optional
280
+ }
281
+ }
282
+ destroy() {
283
+ if (this.syncInterval) {
284
+ clearInterval(this.syncInterval);
285
+ this.syncInterval = undefined;
286
+ }
287
+ if (this.mcpSocket) {
288
+ this.mcpSocket.close();
289
+ this.mcpSocket = undefined;
290
+ }
291
+ this.controller.destroy();
292
+ this.ui?.destroy();
293
+ }
294
+ }
295
+ // Auto-bootstrap via <script> tag attributes (when explicitly configured)
296
+ if (typeof document !== 'undefined' && typeof window !== 'undefined') {
297
+ const currentScript = document.currentScript;
298
+ if (currentScript && currentScript.dataset) {
299
+ const dataset = currentScript.dataset;
300
+ if (dataset.autoInit === 'true' || dataset.drDebug !== undefined || (dataset.model && dataset.autoInit !== 'false')) {
301
+ const instance = new DrDebug({
302
+ model: dataset.model,
303
+ apiKey: dataset.apiKey,
304
+ baseURL: dataset.baseUrl,
305
+ autoInvestigate: dataset.autoInvestigate === 'true',
306
+ language: dataset.lang || 'en-US'
307
+ });
308
+ window.drDebug = instance;
309
+ }
310
+ }
311
+ }
312
+ //# sourceMappingURL=DrDebug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrDebug.js","sourceRoot":"","sources":["../src/DrDebug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,kBAAkB,EAGnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,YAAY,EAEZ,YAAY,EACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAiBxC,MAAM,OAAO,OAAO;IACV,UAAU,CAAiB;IAC3B,IAAI,CAAa;IACjB,SAAS,CAAY;IACrB,EAAE,CAAY;IACd,OAAO,CAAgB;IACvB,mBAAmB,GAAG,KAAK,CAAA;IAC3B,SAAS,CAAY;IACrB,YAAY,CAAM;IAClB,iBAAiB,GAA+B,IAAI,CAAA;IAE5D,YAAY,UAA0B,EAAE;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,0BAA0B;QAC1B,IAAI,CAAC,UA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AI,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACrE,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAyC,CAAA;IACxE,IAAI,aAAa,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;QAC3C,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAA;QACrC,IAAI,OAAO,CAAC,QAAQ,KAAK,MAAM,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,EAAE,CAAC;YACpH,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC;gBAC3B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,eAAe,EAAE,OAAO,CAAC,eAAe,KAAK,MAAM;gBACnD,QAAQ,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO;aAClC,CAAC,CACD;YAAC,MAAc,CAAC,OAAO,GAAG,QAAQ,CAAA;QACrC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { DrDebug, type DrDebugOptions } from './DrDebug.js';
2
+ export * from '@dr-debug/controller';
3
+ export * from '@dr-debug/core';
4
+ export * from '@dr-debug/llms';
5
+ export * from '@dr-debug/ui';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAC3D,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}