codelantern-agent-cli 0.0.0-stage → 1.0.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.
@@ -0,0 +1,546 @@
1
+ /**
2
+ * Core type definitions for Code Lantern CLI
3
+ */
4
+ type ModelRole = 'user' | 'model' | 'tool' | 'system';
5
+ interface FileAttachment {
6
+ path: string;
7
+ name: string;
8
+ mimeType: string;
9
+ size: number;
10
+ base64Data?: string;
11
+ textContent?: string;
12
+ }
13
+ interface ToolCallItem {
14
+ id: string;
15
+ name: string;
16
+ args: Record<string, unknown>;
17
+ }
18
+ interface ToolResultItem {
19
+ callId: string;
20
+ name: string;
21
+ result: unknown;
22
+ error?: string;
23
+ }
24
+ interface ConversationTurn {
25
+ role: ModelRole;
26
+ text?: string;
27
+ toolCalls?: ToolCallItem[];
28
+ toolResults?: ToolResultItem[];
29
+ attachments?: FileAttachment[];
30
+ timestamp: string;
31
+ }
32
+ interface TokenUsage {
33
+ promptTokens: number;
34
+ candidatesTokens: number;
35
+ totalTokens: number;
36
+ }
37
+ interface OrbitSession {
38
+ id: string;
39
+ title: string;
40
+ createdAt: string;
41
+ updatedAt: string;
42
+ workspace: string;
43
+ provider?: string;
44
+ model: string;
45
+ turns: ConversationTurn[];
46
+ totalUsage: TokenUsage;
47
+ activeSkills?: string[];
48
+ }
49
+ interface McpServerConfig {
50
+ command: string;
51
+ args?: string[];
52
+ env?: Record<string, string>;
53
+ disabled?: boolean;
54
+ }
55
+ type ProviderType = 'gemini' | 'openai' | 'anthropic' | 'openrouter' | 'custom';
56
+ interface ProviderConfig {
57
+ id: string;
58
+ name: string;
59
+ type: ProviderType;
60
+ baseUrl?: string;
61
+ apiKey?: string;
62
+ defaultModel?: string;
63
+ headers?: Record<string, string>;
64
+ disabled?: boolean;
65
+ }
66
+ interface ModelCapabilities {
67
+ streaming: boolean;
68
+ tools: boolean;
69
+ images: boolean;
70
+ reasoning: boolean;
71
+ contextWindow?: number;
72
+ }
73
+ interface ProviderModelInfo {
74
+ id: string;
75
+ name: string;
76
+ provider: string;
77
+ description?: string;
78
+ contextWindow?: number;
79
+ capabilities: ModelCapabilities;
80
+ pricing?: {
81
+ promptPer1k?: number;
82
+ completionPer1k?: number;
83
+ };
84
+ }
85
+ interface TimingDiagnostics {
86
+ providerInitMs?: number;
87
+ connectMs?: number;
88
+ ttftMs?: number;
89
+ streamMs?: number;
90
+ totalMs: number;
91
+ toolExecutionMs: Record<string, number>;
92
+ }
93
+ interface Skill {
94
+ name: string;
95
+ description: string;
96
+ path: string;
97
+ source: 'project' | 'user';
98
+ enabled: boolean;
99
+ content: string;
100
+ references?: string[];
101
+ tags?: string[];
102
+ }
103
+ interface OrbitConfig {
104
+ activeProvider: string;
105
+ defaultModel: string;
106
+ maxSteps: number;
107
+ temperature: number;
108
+ maxOutputTokens?: number;
109
+ yolo: boolean;
110
+ theme: 'default' | 'ocean' | 'minimal';
111
+ autoCompactThreshold: number;
112
+ mcpServers?: Record<string, McpServerConfig>;
113
+ timeoutMs: number;
114
+ firstTokenTimeoutMs: number;
115
+ showTiming: boolean;
116
+ lowLatency: boolean;
117
+ activeSkills: string[];
118
+ providers?: Record<string, ProviderConfig>;
119
+ }
120
+ interface ApprovalRequest {
121
+ type: 'file_edit' | 'file_write' | 'command';
122
+ summary: string;
123
+ details?: {
124
+ path?: string;
125
+ before?: string;
126
+ after?: string;
127
+ diff?: string;
128
+ command?: string;
129
+ };
130
+ }
131
+ type ApprovalDecision = 'allow' | 'deny' | 'yolo_all';
132
+ interface AgentContext {
133
+ workspace: string;
134
+ provider: string;
135
+ model: string;
136
+ yolo: boolean;
137
+ planMode: boolean;
138
+ jsonOutput: boolean;
139
+ maxSteps: number;
140
+ timeoutMs: number;
141
+ firstTokenTimeoutMs: number;
142
+ showTiming: boolean;
143
+ lowLatency: boolean;
144
+ activeSkills?: string[];
145
+ attachments?: FileAttachment[];
146
+ signal?: AbortSignal;
147
+ onStateChange?: (state: string) => void;
148
+ }
149
+ interface ToolDefinition {
150
+ name: string;
151
+ description: string;
152
+ parameters: {
153
+ type: 'object';
154
+ properties: Record<string, {
155
+ type: string;
156
+ description: string;
157
+ enum?: string[];
158
+ items?: {
159
+ type: string;
160
+ };
161
+ }>;
162
+ required?: string[];
163
+ };
164
+ readOnly?: boolean;
165
+ }
166
+ interface ToolExecutionContext {
167
+ workspace: string;
168
+ yolo: boolean;
169
+ planMode: boolean;
170
+ requestApproval: (request: ApprovalRequest) => Promise<boolean>;
171
+ signal?: AbortSignal;
172
+ }
173
+ interface ToolExecutionResult {
174
+ success: boolean;
175
+ output: string;
176
+ error?: string;
177
+ metadata?: Record<string, unknown>;
178
+ }
179
+
180
+ declare function getLanternHomeDir(): string;
181
+ declare function getConfigFilePath(): string;
182
+ declare function loadConfig(): OrbitConfig;
183
+ declare function saveConfig(config: OrbitConfig): void;
184
+ declare function setConfigValue(key: string, value: unknown): {
185
+ success: boolean;
186
+ error?: string;
187
+ updatedConfig?: OrbitConfig;
188
+ };
189
+ declare function getConfigValue<K extends keyof OrbitConfig>(key: K): OrbitConfig[K];
190
+
191
+ declare const DEFAULT_CONFIG: OrbitConfig;
192
+ declare const ALLOWED_CONFIG_KEYS: readonly ["activeProvider", "defaultModel", "maxSteps", "temperature", "maxOutputTokens", "yolo", "theme", "autoCompactThreshold", "timeoutMs", "firstTokenTimeoutMs", "showTiming", "lowLatency", "activeSkills"];
193
+ type ConfigKey = (typeof ALLOWED_CONFIG_KEYS)[number];
194
+ declare function validateConfigValue(key: string, value: unknown): {
195
+ valid: boolean;
196
+ error?: string;
197
+ parsedValue?: unknown;
198
+ };
199
+
200
+ interface ProjectInstructions {
201
+ found: boolean;
202
+ filePath?: string;
203
+ content?: string;
204
+ }
205
+ declare function loadProjectInstructions(workspaceDir: string): ProjectInstructions;
206
+
207
+ interface StreamCallbacks {
208
+ onChunk?: (text: string) => void;
209
+ onToolCalls?: (toolCalls: ToolCallItem[]) => void;
210
+ onUsage?: (usage: TokenUsage) => void;
211
+ onStateChange?: (state: string) => void;
212
+ }
213
+ interface ProviderStreamParams {
214
+ model: string;
215
+ systemInstruction: string;
216
+ history: ConversationTurn[];
217
+ tools: ToolDefinition[];
218
+ callbacks: StreamCallbacks;
219
+ signal?: AbortSignal;
220
+ temperature?: number;
221
+ maxOutputTokens?: number;
222
+ timeoutMs?: number;
223
+ firstTokenTimeoutMs?: number;
224
+ lowLatency?: boolean;
225
+ enableSearchGrounding?: boolean;
226
+ }
227
+ interface ProviderStreamResult {
228
+ text: string;
229
+ toolCalls: ToolCallItem[];
230
+ usage: TokenUsage;
231
+ timing: TimingDiagnostics;
232
+ }
233
+ interface ProviderTestResult {
234
+ success: boolean;
235
+ latencyMs: number;
236
+ error?: string;
237
+ modelsCount?: number;
238
+ resolvedModel?: string;
239
+ }
240
+ interface IProviderAdapter {
241
+ id: string;
242
+ name: string;
243
+ displayName: string;
244
+ defaultModel: string;
245
+ isConfigured(): boolean;
246
+ getApiKey(): string | null;
247
+ getMaskedKey(): string;
248
+ streamGenerate(params: ProviderStreamParams): Promise<ProviderStreamResult>;
249
+ listModels(refresh?: boolean): Promise<ProviderModelInfo[]>;
250
+ testConnection(): Promise<ProviderTestResult>;
251
+ getCapabilities(modelId: string): ModelCapabilities;
252
+ }
253
+
254
+ declare class ProviderRegistry {
255
+ private providers;
256
+ constructor();
257
+ private registerBuiltins;
258
+ private loadCustomProviders;
259
+ getProvider(id?: string): IProviderAdapter;
260
+ hasProvider(id: string): boolean;
261
+ listProviders(): Array<{
262
+ id: string;
263
+ name: string;
264
+ displayName: string;
265
+ isConfigured: boolean;
266
+ maskedKey: string;
267
+ defaultModel: string;
268
+ isActive: boolean;
269
+ }>;
270
+ registerCustomProvider(cfg: ProviderConfig): void;
271
+ removeCustomProvider(id: string): boolean;
272
+ testProvider(id?: string): Promise<ProviderTestResult>;
273
+ listModels(providerId?: string, refresh?: boolean): Promise<ProviderModelInfo[]>;
274
+ }
275
+
276
+ declare class GeminiProvider implements IProviderAdapter {
277
+ id: string;
278
+ name: string;
279
+ displayName: string;
280
+ defaultModel: string;
281
+ private cachedModels;
282
+ isConfigured(): boolean;
283
+ getApiKey(): string | null;
284
+ getMaskedKey(): string;
285
+ private getClient;
286
+ getCapabilities(modelId: string): ModelCapabilities;
287
+ testConnection(): Promise<ProviderTestResult>;
288
+ listModels(refresh?: boolean): Promise<ProviderModelInfo[]>;
289
+ streamGenerate(params: ProviderStreamParams): Promise<ProviderStreamResult>;
290
+ private convertHistoryToContents;
291
+ private convertToolsToDeclarations;
292
+ }
293
+
294
+ declare class OpenAIProvider implements IProviderAdapter {
295
+ id: string;
296
+ name: string;
297
+ displayName: string;
298
+ defaultModel: string;
299
+ baseUrl: string;
300
+ customHeaders: Record<string, string>;
301
+ private cachedModels;
302
+ constructor(options?: {
303
+ id?: string;
304
+ name?: string;
305
+ displayName?: string;
306
+ baseUrl?: string;
307
+ defaultModel?: string;
308
+ headers?: Record<string, string>;
309
+ });
310
+ isConfigured(): boolean;
311
+ getApiKey(): string | null;
312
+ getMaskedKey(): string;
313
+ getCapabilities(modelId: string): ModelCapabilities;
314
+ testConnection(): Promise<ProviderTestResult>;
315
+ listModels(refresh?: boolean): Promise<ProviderModelInfo[]>;
316
+ streamGenerate(params: ProviderStreamParams): Promise<ProviderStreamResult>;
317
+ private convertHistoryToMessages;
318
+ private convertTools;
319
+ private readSSEStream;
320
+ }
321
+
322
+ declare class AnthropicProvider implements IProviderAdapter {
323
+ id: string;
324
+ name: string;
325
+ displayName: string;
326
+ defaultModel: string;
327
+ baseUrl: string;
328
+ private cachedModels;
329
+ isConfigured(): boolean;
330
+ getApiKey(): string | null;
331
+ getMaskedKey(): string;
332
+ getCapabilities(modelId: string): ModelCapabilities;
333
+ testConnection(): Promise<ProviderTestResult>;
334
+ listModels(refresh?: boolean): Promise<ProviderModelInfo[]>;
335
+ streamGenerate(params: ProviderStreamParams): Promise<ProviderStreamResult>;
336
+ private convertHistoryToMessages;
337
+ private convertTools;
338
+ private readSSEStream;
339
+ }
340
+
341
+ declare class OpenRouterProvider extends OpenAIProvider {
342
+ constructor();
343
+ getCapabilities(modelId: string): ModelCapabilities;
344
+ listModels(refresh?: boolean): Promise<ProviderModelInfo[]>;
345
+ }
346
+
347
+ declare function createLinkedAbortController(parentSignal?: AbortSignal, timeoutMs?: number): {
348
+ controller: AbortController;
349
+ cleanup: () => void;
350
+ };
351
+ declare function wrapStreamWithFirstTokenTimeout<T>(stream: AsyncIterable<T>, firstTokenTimeoutMs: number, provider: string, model: string, signal?: AbortSignal, onFirstToken?: (latencyMs: number) => void): AsyncGenerator<T, void, unknown>;
352
+
353
+ declare class TimeoutError extends Error {
354
+ timeoutMs: number;
355
+ constructor(timeoutMs: number, operation?: string);
356
+ }
357
+ declare class FirstTokenTimeoutError extends Error {
358
+ timeoutMs: number;
359
+ provider: string;
360
+ model: string;
361
+ constructor(timeoutMs: number, provider: string, model: string);
362
+ }
363
+ declare class CancelledError extends Error {
364
+ constructor(message?: string);
365
+ }
366
+ declare class MissingApiKeyError extends Error {
367
+ provider: string;
368
+ constructor(provider?: string, envVar?: string);
369
+ }
370
+ declare class RateLimitError extends Error {
371
+ constructor(message?: string);
372
+ }
373
+ declare class AuthenticationError extends Error {
374
+ constructor(message?: string);
375
+ }
376
+ declare class ModelNotFoundError extends Error {
377
+ constructor(model: string, provider: string);
378
+ }
379
+ declare class LanternProviderError extends Error {
380
+ statusCode?: number;
381
+ provider?: string;
382
+ constructor(message: string, statusCode?: number, provider?: string);
383
+ }
384
+ declare function formatErrorMessage(err: unknown): string;
385
+
386
+ declare function loadAttachment(filePath: string): FileAttachment;
387
+ declare function loadAttachments(filePaths?: string[]): FileAttachment[];
388
+
389
+ interface PathValidationResult {
390
+ allowed: boolean;
391
+ resolvedPath: string;
392
+ relativePath: string;
393
+ reason?: string;
394
+ }
395
+ declare function validateWorkspacePath(targetPath: string, workspaceDir: string, allowedExternalPaths?: string[]): PathValidationResult;
396
+
397
+ declare function isSecretFile(filePath: string): boolean;
398
+ declare function sanitizeSecrets(text: string): string;
399
+
400
+ interface CommandValidationResult {
401
+ allowed: boolean;
402
+ reason?: string;
403
+ isHighRisk?: boolean;
404
+ }
405
+ declare function validateCommand(command: string): CommandValidationResult;
406
+
407
+ declare function encryptSecret(plainText: string): string;
408
+ declare function decryptSecret(encryptedPayload: string): string | null;
409
+ declare function maskApiKey(key: string): string;
410
+ declare function getApiKey(provider: string): {
411
+ key: string | null;
412
+ source?: 'env' | 'store';
413
+ };
414
+ declare function setApiKey(provider: string, apiKey: string): void;
415
+ declare function removeApiKey(provider: string): boolean;
416
+ declare function listConfiguredKeys(): Record<string, {
417
+ configured: boolean;
418
+ source?: 'env' | 'store';
419
+ maskedKey: string;
420
+ }>;
421
+
422
+ declare class ApprovalEngine {
423
+ private yolo;
424
+ private planMode;
425
+ constructor(options: {
426
+ yolo?: boolean;
427
+ planMode?: boolean;
428
+ });
429
+ isYolo(): boolean;
430
+ setYolo(val: boolean): void;
431
+ isPlanMode(): boolean;
432
+ requestApproval(req: ApprovalRequest): Promise<boolean>;
433
+ private promptUser;
434
+ }
435
+
436
+ declare function formatTerminalDiff(filePath: string, oldContent: string, newContent: string, contextLines?: number): string;
437
+ declare function formatNewFilePreview(filePath: string, content: string, maxPreviewLines?: number): string;
438
+
439
+ declare function getSessionsDir(): string;
440
+ declare function generateSessionId(): string;
441
+ declare function createNewSession(workspace: string, model: string, initialTitle?: string): OrbitSession;
442
+ declare function saveSession(session: OrbitSession): void;
443
+ declare function loadSession(sessionId: string): OrbitSession | null;
444
+ declare function listSessions(): Array<{
445
+ id: string;
446
+ title: string;
447
+ updatedAt: string;
448
+ turnCount: number;
449
+ workspace: string;
450
+ model: string;
451
+ }>;
452
+ declare function deleteSession(sessionId: string): boolean;
453
+ declare function exportSessionMarkdown(session: OrbitSession): string;
454
+
455
+ declare function shouldCompact(turns: ConversationTurn[], threshold?: number): boolean;
456
+ declare function compactTurns(turns: ConversationTurn[], retainRecentCount?: number): ConversationTurn[];
457
+
458
+ declare class SkillManager {
459
+ private userSkillsDir;
460
+ constructor();
461
+ getUserSkillsDir(): string;
462
+ getProjectSkillsDirs(workspace: string): string[];
463
+ /**
464
+ * Discovers all available skills from user-level and project-level directories
465
+ */
466
+ listSkills(workspace?: string): Skill[];
467
+ private scanDirectoryForSkills;
468
+ parseSkillMd(rawContent: string, defaultName: string): {
469
+ name: string;
470
+ description: string;
471
+ content: string;
472
+ };
473
+ getSkill(name: string, workspace?: string): Skill | null;
474
+ enableSkill(name: string): boolean;
475
+ disableSkill(name: string): boolean;
476
+ addSkillFromPath(sourcePath: string): {
477
+ success: boolean;
478
+ skillName?: string;
479
+ error?: string;
480
+ };
481
+ addSkillFromGit(repoUrl: string): {
482
+ success: boolean;
483
+ skillName?: string;
484
+ error?: string;
485
+ };
486
+ removeSkill(name: string): boolean;
487
+ /**
488
+ * Matches prompt against available skills by keyword and intent.
489
+ * Transparent and non-intrusive.
490
+ */
491
+ matchSkillsForPrompt(userPrompt: string, workspace?: string): Skill[];
492
+ }
493
+
494
+ interface OrbitTool {
495
+ definition: ToolDefinition;
496
+ execute: (args: Record<string, any>, context: ToolExecutionContext) => Promise<ToolExecutionResult>;
497
+ }
498
+
499
+ declare class ToolRegistry {
500
+ private tools;
501
+ constructor();
502
+ private registerBuiltins;
503
+ registerTool(tool: OrbitTool): void;
504
+ registerTools(tools: OrbitTool[]): void;
505
+ getTool(name: string): OrbitTool | undefined;
506
+ getDefinitions(planMode?: boolean): ToolDefinition[];
507
+ executeTool(name: string, args: Record<string, unknown>, context: ToolExecutionContext): Promise<ToolExecutionResult>;
508
+ }
509
+
510
+ declare class McpManager {
511
+ private connections;
512
+ initialize(): Promise<OrbitTool[]>;
513
+ connectServer(serverName: string, config: McpServerConfig): Promise<OrbitTool[]>;
514
+ disconnectServer(serverName: string): Promise<void>;
515
+ closeAll(): Promise<void>;
516
+ }
517
+
518
+ declare function getMcpConfigPath(): string;
519
+ declare function loadMcpConfig(): Record<string, McpServerConfig>;
520
+ declare function saveMcpConfig(servers: Record<string, McpServerConfig>): void;
521
+ declare function addMcpServer(name: string, config: McpServerConfig): void;
522
+ declare function removeMcpServer(name: string): boolean;
523
+ declare function toggleMcpServer(name: string, disabled: boolean): boolean;
524
+
525
+ declare class LanternAgent {
526
+ private providerRegistry;
527
+ private tools;
528
+ private mcpManager;
529
+ private skillManager;
530
+ private approvalEngine;
531
+ private spinner;
532
+ constructor();
533
+ getProviderRegistry(): ProviderRegistry;
534
+ getSkillManager(): SkillManager;
535
+ initMcp(): Promise<void>;
536
+ shutdown(): Promise<void>;
537
+ buildSystemPrompt(workspace: string, planMode?: boolean, activeSkills?: Skill[]): string;
538
+ runTurn(session: OrbitSession, userPrompt: string, context: AgentContext, attachments?: FileAttachment[]): Promise<{
539
+ reply: string;
540
+ toolCount: number;
541
+ usage: TokenUsage;
542
+ timing: TimingDiagnostics;
543
+ }>;
544
+ }
545
+
546
+ export { ALLOWED_CONFIG_KEYS, type AgentContext, AnthropicProvider, type ApprovalDecision, ApprovalEngine, type ApprovalRequest, AuthenticationError, CancelledError, type CommandValidationResult, type ConfigKey, type ConversationTurn, DEFAULT_CONFIG, type FileAttachment, FirstTokenTimeoutError, GeminiProvider, type IProviderAdapter, LanternAgent, LanternProviderError, McpManager, type McpServerConfig, MissingApiKeyError, type ModelCapabilities, ModelNotFoundError, type ModelRole, OpenAIProvider, OpenRouterProvider, LanternAgent as OrbitAgent, type OrbitConfig, type OrbitSession, type OrbitTool, type PathValidationResult, type ProjectInstructions, type ProviderConfig, type ProviderModelInfo, ProviderRegistry, type ProviderStreamParams, type ProviderStreamResult, type ProviderTestResult, type ProviderType, RateLimitError, type Skill, SkillManager, type StreamCallbacks, TimeoutError, type TimingDiagnostics, type TokenUsage, type ToolCallItem, type ToolDefinition, type ToolExecutionContext, type ToolExecutionResult, ToolRegistry, type ToolResultItem, addMcpServer, compactTurns, createLinkedAbortController, createNewSession, decryptSecret, deleteSession, encryptSecret, exportSessionMarkdown, formatErrorMessage, formatNewFilePreview, formatTerminalDiff, generateSessionId, getApiKey, getConfigFilePath, getConfigValue, getLanternHomeDir, getMcpConfigPath, getSessionsDir, isSecretFile, listConfiguredKeys, listSessions, loadAttachment, loadAttachments, loadConfig, loadMcpConfig, loadProjectInstructions, loadSession, maskApiKey, removeApiKey, removeMcpServer, sanitizeSecrets, saveConfig, saveMcpConfig, saveSession, setApiKey, setConfigValue, shouldCompact, toggleMcpServer, validateCommand, validateConfigValue, validateWorkspacePath, wrapStreamWithFirstTokenTimeout };
package/dist/index.js ADDED
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ALLOWED_CONFIG_KEYS,
4
+ AnthropicProvider,
5
+ ApprovalEngine,
6
+ AuthenticationError,
7
+ CancelledError,
8
+ DEFAULT_CONFIG,
9
+ FirstTokenTimeoutError,
10
+ GeminiProvider,
11
+ LanternAgent,
12
+ LanternProviderError,
13
+ McpManager,
14
+ MissingApiKeyError,
15
+ ModelNotFoundError,
16
+ OpenAIProvider,
17
+ OpenRouterProvider,
18
+ ProviderRegistry,
19
+ RateLimitError,
20
+ SkillManager,
21
+ TimeoutError,
22
+ ToolRegistry,
23
+ addMcpServer,
24
+ compactTurns,
25
+ createLinkedAbortController,
26
+ createNewSession,
27
+ decryptSecret,
28
+ deleteSession,
29
+ encryptSecret,
30
+ exportSessionMarkdown,
31
+ formatErrorMessage,
32
+ formatNewFilePreview,
33
+ formatTerminalDiff,
34
+ generateSessionId,
35
+ getApiKey,
36
+ getConfigFilePath,
37
+ getConfigValue,
38
+ getLanternHomeDir,
39
+ getMcpConfigPath,
40
+ getSessionsDir,
41
+ isSecretFile,
42
+ listConfiguredKeys,
43
+ listSessions,
44
+ loadAttachment,
45
+ loadAttachments,
46
+ loadConfig,
47
+ loadMcpConfig,
48
+ loadProjectInstructions,
49
+ loadSession,
50
+ maskApiKey,
51
+ removeApiKey,
52
+ removeMcpServer,
53
+ sanitizeSecrets,
54
+ saveConfig,
55
+ saveMcpConfig,
56
+ saveSession,
57
+ setApiKey,
58
+ setConfigValue,
59
+ shouldCompact,
60
+ toggleMcpServer,
61
+ validateCommand,
62
+ validateConfigValue,
63
+ validateWorkspacePath,
64
+ wrapStreamWithFirstTokenTimeout
65
+ } from "./chunk-PELESOCI.js";
66
+ export {
67
+ ALLOWED_CONFIG_KEYS,
68
+ AnthropicProvider,
69
+ ApprovalEngine,
70
+ AuthenticationError,
71
+ CancelledError,
72
+ DEFAULT_CONFIG,
73
+ FirstTokenTimeoutError,
74
+ GeminiProvider,
75
+ LanternAgent,
76
+ LanternProviderError,
77
+ McpManager,
78
+ MissingApiKeyError,
79
+ ModelNotFoundError,
80
+ OpenAIProvider,
81
+ OpenRouterProvider,
82
+ LanternAgent as OrbitAgent,
83
+ ProviderRegistry,
84
+ RateLimitError,
85
+ SkillManager,
86
+ TimeoutError,
87
+ ToolRegistry,
88
+ addMcpServer,
89
+ compactTurns,
90
+ createLinkedAbortController,
91
+ createNewSession,
92
+ decryptSecret,
93
+ deleteSession,
94
+ encryptSecret,
95
+ exportSessionMarkdown,
96
+ formatErrorMessage,
97
+ formatNewFilePreview,
98
+ formatTerminalDiff,
99
+ generateSessionId,
100
+ getApiKey,
101
+ getConfigFilePath,
102
+ getConfigValue,
103
+ getLanternHomeDir,
104
+ getMcpConfigPath,
105
+ getSessionsDir,
106
+ isSecretFile,
107
+ listConfiguredKeys,
108
+ listSessions,
109
+ loadAttachment,
110
+ loadAttachments,
111
+ loadConfig,
112
+ loadMcpConfig,
113
+ loadProjectInstructions,
114
+ loadSession,
115
+ maskApiKey,
116
+ removeApiKey,
117
+ removeMcpServer,
118
+ sanitizeSecrets,
119
+ saveConfig,
120
+ saveMcpConfig,
121
+ saveSession,
122
+ setApiKey,
123
+ setConfigValue,
124
+ shouldCompact,
125
+ toggleMcpServer,
126
+ validateCommand,
127
+ validateConfigValue,
128
+ validateWorkspacePath,
129
+ wrapStreamWithFirstTokenTimeout
130
+ };
131
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}