@majkapp/majk-chat-cli 1.0.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/README.md +746 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1001 -0
- package/dist/cli.js.map +1 -0
- package/dist/interactive/interactive.d.ts +27 -0
- package/dist/interactive/interactive.d.ts.map +1 -0
- package/dist/interactive/interactive.js +361 -0
- package/dist/interactive/interactive.js.map +1 -0
- package/dist/tools/bash.tool.d.ts +11 -0
- package/dist/tools/bash.tool.d.ts.map +1 -0
- package/dist/tools/bash.tool.js +140 -0
- package/dist/tools/bash.tool.js.map +1 -0
- package/dist/tools/filesystem.tool.d.ts +20 -0
- package/dist/tools/filesystem.tool.d.ts.map +1 -0
- package/dist/tools/filesystem.tool.js +312 -0
- package/dist/tools/filesystem.tool.js.map +1 -0
- package/dist/utils/config.d.ts +8 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +140 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/credentials.d.ts +45 -0
- package/dist/utils/credentials.d.ts.map +1 -0
- package/dist/utils/credentials.js +265 -0
- package/dist/utils/credentials.js.map +1 -0
- package/dist/utils/models.d.ts +10 -0
- package/dist/utils/models.d.ts.map +1 -0
- package/dist/utils/models.js +56 -0
- package/dist/utils/models.js.map +1 -0
- package/dist/utils/output.d.ts +133 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +306 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/utils/tool-filter.d.ts +35 -0
- package/dist/utils/tool-filter.d.ts.map +1 -0
- package/dist/utils/tool-filter.js +94 -0
- package/dist/utils/tool-filter.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CredentialManager = void 0;
|
|
37
|
+
const fs = __importStar(require("fs-extra"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const os = __importStar(require("os"));
|
|
40
|
+
const dotenv = __importStar(require("dotenv"));
|
|
41
|
+
class CredentialManager {
|
|
42
|
+
configDir;
|
|
43
|
+
dotenvLoaded = false;
|
|
44
|
+
constructor() {
|
|
45
|
+
this.configDir = path.join(os.homedir(), '.majk-chat');
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Load environment variables from .env files with precedence:
|
|
49
|
+
* 1. .env.local (highest priority)
|
|
50
|
+
* 2. .env
|
|
51
|
+
* 3. Global .majk-chat/.env
|
|
52
|
+
*/
|
|
53
|
+
loadDotenvFiles(customEnvFile) {
|
|
54
|
+
if (this.dotenvLoaded && !customEnvFile) {
|
|
55
|
+
return; // Already loaded, don't reload unless custom file specified
|
|
56
|
+
}
|
|
57
|
+
const envFiles = [];
|
|
58
|
+
if (customEnvFile) {
|
|
59
|
+
// Custom env file has highest priority
|
|
60
|
+
if (path.isAbsolute(customEnvFile)) {
|
|
61
|
+
envFiles.push(customEnvFile);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
envFiles.push(path.resolve(process.cwd(), customEnvFile));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Standard env files in order of precedence
|
|
68
|
+
envFiles.push(path.join(process.cwd(), '.env.local'), path.join(process.cwd(), '.env'), path.join(this.configDir, '.env'));
|
|
69
|
+
// Load each file, later files won't override earlier ones
|
|
70
|
+
for (const envFile of envFiles) {
|
|
71
|
+
if (fs.existsSync(envFile)) {
|
|
72
|
+
try {
|
|
73
|
+
dotenv.config({ path: envFile, override: false });
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
// Ignore errors loading env files
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
this.dotenvLoaded = true;
|
|
81
|
+
}
|
|
82
|
+
async loadProviders(options) {
|
|
83
|
+
// Load .env files first
|
|
84
|
+
this.loadDotenvFiles(options?.envFile);
|
|
85
|
+
const providers = {};
|
|
86
|
+
// Check for OpenAI credentials (CLI options, env vars, or config)
|
|
87
|
+
if (options?.openaiApiKey || options?.apiKey ||
|
|
88
|
+
process.env.OPENAI_API_KEY ||
|
|
89
|
+
await this.hasProviderConfig('openai')) {
|
|
90
|
+
providers.openai = true;
|
|
91
|
+
}
|
|
92
|
+
// Check for Anthropic credentials
|
|
93
|
+
if (options?.anthropicApiKey || options?.apiKey ||
|
|
94
|
+
process.env.ANTHROPIC_API_KEY ||
|
|
95
|
+
await this.hasProviderConfig('anthropic')) {
|
|
96
|
+
providers.anthropic = true;
|
|
97
|
+
}
|
|
98
|
+
// Check for Azure OpenAI credentials
|
|
99
|
+
if (options?.azureOpenaiApiKey || options?.apiKey ||
|
|
100
|
+
process.env.AZURE_OPENAI_API_KEY ||
|
|
101
|
+
await this.hasProviderConfig('azure-openai')) {
|
|
102
|
+
providers.azureOpenai = true;
|
|
103
|
+
}
|
|
104
|
+
// Check for AWS/Bedrock credentials
|
|
105
|
+
if (options?.awsAccessKeyId ||
|
|
106
|
+
process.env.AWS_ACCESS_KEY_ID ||
|
|
107
|
+
await this.hasProviderConfig('bedrock')) {
|
|
108
|
+
providers.bedrock = true;
|
|
109
|
+
}
|
|
110
|
+
return providers;
|
|
111
|
+
}
|
|
112
|
+
async getCredentials(provider, options) {
|
|
113
|
+
// Load .env files first to ensure they're available
|
|
114
|
+
this.loadDotenvFiles(options?.envFile);
|
|
115
|
+
const credentials = {};
|
|
116
|
+
// PRECEDENCE ORDER (highest to lowest):
|
|
117
|
+
// 1. Command line options (provider-specific or generic)
|
|
118
|
+
// 2. API key file (if specified)
|
|
119
|
+
// 3. Environment variables (after .env loading)
|
|
120
|
+
// 4. Standard provider locations (~/.openai/api_key, etc.)
|
|
121
|
+
// 5. Config file
|
|
122
|
+
// 1. Check provider-specific command line options first
|
|
123
|
+
const cliApiKey = this.getCliApiKey(provider, options);
|
|
124
|
+
if (cliApiKey) {
|
|
125
|
+
credentials.apiKey = cliApiKey;
|
|
126
|
+
}
|
|
127
|
+
// 2. Check generic API key file
|
|
128
|
+
if (!credentials.apiKey && options?.apiKeyFile) {
|
|
129
|
+
credentials.apiKey = await this.readApiKeyFromFile(options.apiKeyFile);
|
|
130
|
+
}
|
|
131
|
+
// 3. Check environment variables (includes .env files)
|
|
132
|
+
if (!credentials.apiKey) {
|
|
133
|
+
credentials.apiKey = this.getEnvironmentKey(provider);
|
|
134
|
+
}
|
|
135
|
+
// 4. Check standard provider locations
|
|
136
|
+
if (!credentials.apiKey) {
|
|
137
|
+
credentials.apiKey = await this.getProviderStandardKey(provider);
|
|
138
|
+
}
|
|
139
|
+
// 5. Check config file
|
|
140
|
+
if (!credentials.apiKey) {
|
|
141
|
+
const config = await this.loadProviderConfig(provider);
|
|
142
|
+
if (config) {
|
|
143
|
+
Object.assign(credentials, config);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// Add provider-specific configurations with CLI precedence
|
|
147
|
+
this.addProviderSpecificConfig(provider, credentials, options);
|
|
148
|
+
return credentials;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Get API key from CLI options with provider-specific precedence
|
|
152
|
+
*/
|
|
153
|
+
getCliApiKey(provider, options) {
|
|
154
|
+
if (!options)
|
|
155
|
+
return undefined;
|
|
156
|
+
switch (provider) {
|
|
157
|
+
case 'openai':
|
|
158
|
+
return options.openaiApiKey || options.apiKey;
|
|
159
|
+
case 'anthropic':
|
|
160
|
+
return options.anthropicApiKey || options.apiKey;
|
|
161
|
+
case 'azure-openai':
|
|
162
|
+
return options.azureOpenaiApiKey || options.apiKey;
|
|
163
|
+
case 'bedrock':
|
|
164
|
+
// Bedrock doesn't use a simple API key
|
|
165
|
+
return undefined;
|
|
166
|
+
default:
|
|
167
|
+
return options.apiKey;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Add provider-specific configuration with CLI option precedence
|
|
172
|
+
*/
|
|
173
|
+
addProviderSpecificConfig(provider, credentials, options) {
|
|
174
|
+
const creds = credentials; // Cast to any to allow provider-specific properties
|
|
175
|
+
switch (provider) {
|
|
176
|
+
case 'openai':
|
|
177
|
+
creds.organizationId = options?.openaiOrgId || process.env.OPENAI_ORG_ID;
|
|
178
|
+
break;
|
|
179
|
+
case 'azure-openai':
|
|
180
|
+
creds.endpoint = options?.azureOpenaiEndpoint || process.env.AZURE_OPENAI_ENDPOINT;
|
|
181
|
+
creds.deploymentName = options?.azureOpenaiDeployment || process.env.AZURE_OPENAI_DEPLOYMENT;
|
|
182
|
+
break;
|
|
183
|
+
case 'bedrock':
|
|
184
|
+
creds.region = options?.awsRegion || process.env.AWS_REGION || 'us-east-1';
|
|
185
|
+
creds.accessKeyId = options?.awsAccessKeyId || process.env.AWS_ACCESS_KEY_ID;
|
|
186
|
+
creds.secretAccessKey = options?.awsSecretAccessKey || process.env.AWS_SECRET_ACCESS_KEY;
|
|
187
|
+
creds.sessionToken = options?.awsSessionToken || process.env.AWS_SESSION_TOKEN;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async readApiKeyFromFile(filepath) {
|
|
192
|
+
try {
|
|
193
|
+
const content = await fs.readFile(filepath, 'utf-8');
|
|
194
|
+
return content.trim();
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
getEnvironmentKey(provider) {
|
|
201
|
+
switch (provider) {
|
|
202
|
+
case 'openai':
|
|
203
|
+
return process.env.OPENAI_API_KEY;
|
|
204
|
+
case 'anthropic':
|
|
205
|
+
return process.env.ANTHROPIC_API_KEY;
|
|
206
|
+
case 'azure-openai':
|
|
207
|
+
return process.env.AZURE_OPENAI_API_KEY;
|
|
208
|
+
case 'bedrock':
|
|
209
|
+
// Bedrock uses AWS credentials, not an API key
|
|
210
|
+
return undefined;
|
|
211
|
+
default:
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async getProviderStandardKey(provider) {
|
|
216
|
+
const standardPaths = {
|
|
217
|
+
openai: [
|
|
218
|
+
path.join(os.homedir(), '.openai', 'api_key'),
|
|
219
|
+
path.join(os.homedir(), '.config', 'openai', 'api_key')
|
|
220
|
+
],
|
|
221
|
+
anthropic: [
|
|
222
|
+
path.join(os.homedir(), '.anthropic', 'api_key'),
|
|
223
|
+
path.join(os.homedir(), '.config', 'anthropic', 'api_key')
|
|
224
|
+
]
|
|
225
|
+
};
|
|
226
|
+
const paths = standardPaths[provider];
|
|
227
|
+
if (!paths)
|
|
228
|
+
return undefined;
|
|
229
|
+
for (const filepath of paths) {
|
|
230
|
+
try {
|
|
231
|
+
if (await fs.pathExists(filepath)) {
|
|
232
|
+
const content = await fs.readFile(filepath, 'utf-8');
|
|
233
|
+
return content.trim();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
// Continue to next path
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return undefined;
|
|
241
|
+
}
|
|
242
|
+
async hasProviderConfig(provider) {
|
|
243
|
+
const configPath = path.join(this.configDir, 'providers', `${provider}.json`);
|
|
244
|
+
return fs.pathExists(configPath);
|
|
245
|
+
}
|
|
246
|
+
async loadProviderConfig(provider) {
|
|
247
|
+
try {
|
|
248
|
+
const configPath = path.join(this.configDir, 'providers', `${provider}.json`);
|
|
249
|
+
if (await fs.pathExists(configPath)) {
|
|
250
|
+
return await fs.readJson(configPath);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
// Ignore errors
|
|
255
|
+
}
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
async saveProviderConfig(provider, config) {
|
|
259
|
+
const configPath = path.join(this.configDir, 'providers', `${provider}.json`);
|
|
260
|
+
await fs.ensureDir(path.dirname(configPath));
|
|
261
|
+
await fs.writeJson(configPath, config, { spaces: 2 });
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
exports.CredentialManager = CredentialManager;
|
|
265
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"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EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,QAAgB,EAAE,MAAsB;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC;QAC9E,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAC7C,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;CACF;AAtQD,8CAsQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const MODEL_ALIASES: Record<string, string>;
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a model name or alias to the full model identifier
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveModel(modelInput: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Get the appropriate default model for a provider
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDefaultModelForProvider(provider: string): string;
|
|
10
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/utils/models.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoBhD,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CASvD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAcnE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MODEL_ALIASES = void 0;
|
|
4
|
+
exports.resolveModel = resolveModel;
|
|
5
|
+
exports.getDefaultModelForProvider = getDefaultModelForProvider;
|
|
6
|
+
// Model aliases mapping
|
|
7
|
+
exports.MODEL_ALIASES = {
|
|
8
|
+
// Anthropic Claude aliases
|
|
9
|
+
'opus': 'claude-3-opus-20240229',
|
|
10
|
+
'sonnet': 'claude-3-5-sonnet-20241022',
|
|
11
|
+
'haiku': 'claude-3-haiku-20240307',
|
|
12
|
+
'claude-opus': 'claude-3-opus-20240229',
|
|
13
|
+
'claude-sonnet': 'claude-3-5-sonnet-20241022',
|
|
14
|
+
'claude-haiku': 'claude-3-haiku-20240307',
|
|
15
|
+
// OpenAI aliases
|
|
16
|
+
'gpt4': 'gpt-4-turbo-preview',
|
|
17
|
+
'gpt-4': 'gpt-4-turbo-preview',
|
|
18
|
+
'gpt4-turbo': 'gpt-4-turbo-preview',
|
|
19
|
+
'gpt-4-turbo': 'gpt-4-turbo-preview',
|
|
20
|
+
'gpt-3.5': 'gpt-3.5-turbo',
|
|
21
|
+
'gpt3.5': 'gpt-3.5-turbo',
|
|
22
|
+
// Common shortcuts
|
|
23
|
+
'o1': 'o1-preview',
|
|
24
|
+
'o1-mini': 'o1-mini',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Resolve a model name or alias to the full model identifier
|
|
28
|
+
*/
|
|
29
|
+
function resolveModel(modelInput) {
|
|
30
|
+
// Check if it's an alias
|
|
31
|
+
const lowerInput = modelInput.toLowerCase();
|
|
32
|
+
if (exports.MODEL_ALIASES[lowerInput]) {
|
|
33
|
+
return exports.MODEL_ALIASES[lowerInput];
|
|
34
|
+
}
|
|
35
|
+
// Return as-is if not an alias
|
|
36
|
+
return modelInput;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the appropriate default model for a provider
|
|
40
|
+
*/
|
|
41
|
+
function getDefaultModelForProvider(provider) {
|
|
42
|
+
switch (provider) {
|
|
43
|
+
case 'openai':
|
|
44
|
+
return 'gpt-4-turbo-preview';
|
|
45
|
+
case 'anthropic':
|
|
46
|
+
return 'claude-3-5-sonnet-20241022';
|
|
47
|
+
case 'azure-openai':
|
|
48
|
+
return 'gpt-4';
|
|
49
|
+
case 'bedrock':
|
|
50
|
+
case 'anthropic-bedrock':
|
|
51
|
+
return 'anthropic.claude-3-sonnet-20240229-v1:0';
|
|
52
|
+
default:
|
|
53
|
+
return 'gpt-4';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/utils/models.ts"],"names":[],"mappings":";;;AA0BA,oCASC;AAKD,gEAcC;AAtDD,wBAAwB;AACX,QAAA,aAAa,GAA2B;IACnD,2BAA2B;IAC3B,MAAM,EAAE,wBAAwB;IAChC,QAAQ,EAAE,4BAA4B;IACtC,OAAO,EAAE,yBAAyB;IAClC,aAAa,EAAE,wBAAwB;IACvC,eAAe,EAAE,4BAA4B;IAC7C,cAAc,EAAE,yBAAyB;IAEzC,iBAAiB;IACjB,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE,qBAAqB;IAC9B,YAAY,EAAE,qBAAqB;IACnC,aAAa,EAAE,qBAAqB;IACpC,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,eAAe;IAEzB,mBAAmB;IACnB,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF;;GAEG;AACH,SAAgB,YAAY,CAAC,UAAkB;IAC7C,yBAAyB;IACzB,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IAC5C,IAAI,qBAAa,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO,qBAAa,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,+BAA+B;IAC/B,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,SAAgB,0BAA0B,CAAC,QAAgB;IACzD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,qBAAqB,CAAC;QAC/B,KAAK,WAAW;YACd,OAAO,4BAA4B,CAAC;QACtC,KAAK,cAAc;YACjB,OAAO,OAAO,CAAC;QACjB,KAAK,SAAS,CAAC;QACf,KAAK,mBAAmB;YACtB,OAAO,yCAAyC,CAAC;QACnD;YACE,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export type OutputFormat = 'text' | 'stream-json';
|
|
2
|
+
export interface StreamSystemInit {
|
|
3
|
+
type: 'system';
|
|
4
|
+
subtype: 'init';
|
|
5
|
+
cwd: string;
|
|
6
|
+
session_id: string;
|
|
7
|
+
tools: string[];
|
|
8
|
+
mcp_servers: string[];
|
|
9
|
+
model: string;
|
|
10
|
+
permissionMode: string;
|
|
11
|
+
slash_commands: string[];
|
|
12
|
+
apiKeySource: string;
|
|
13
|
+
output_style: string;
|
|
14
|
+
uuid: string;
|
|
15
|
+
}
|
|
16
|
+
export interface StreamMessage {
|
|
17
|
+
type: 'assistant' | 'user';
|
|
18
|
+
message: {
|
|
19
|
+
id?: string;
|
|
20
|
+
type: 'message';
|
|
21
|
+
role: 'assistant' | 'user';
|
|
22
|
+
model?: string;
|
|
23
|
+
content: Array<{
|
|
24
|
+
type: 'text' | 'tool_use' | 'tool_result';
|
|
25
|
+
text?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
name?: string;
|
|
28
|
+
input?: any;
|
|
29
|
+
tool_use_id?: string;
|
|
30
|
+
content?: string;
|
|
31
|
+
}>;
|
|
32
|
+
stop_reason?: string | null;
|
|
33
|
+
stop_sequence?: string | null;
|
|
34
|
+
usage?: {
|
|
35
|
+
input_tokens: number;
|
|
36
|
+
cache_creation_input_tokens?: number;
|
|
37
|
+
cache_read_input_tokens?: number;
|
|
38
|
+
cache_creation?: {
|
|
39
|
+
ephemeral_5m_input_tokens?: number;
|
|
40
|
+
ephemeral_1h_input_tokens?: number;
|
|
41
|
+
};
|
|
42
|
+
output_tokens: number;
|
|
43
|
+
service_tier?: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
parent_tool_use_id: string | null;
|
|
47
|
+
session_id: string;
|
|
48
|
+
uuid: string;
|
|
49
|
+
}
|
|
50
|
+
export interface StreamResult {
|
|
51
|
+
type: 'result';
|
|
52
|
+
subtype: 'success' | 'error';
|
|
53
|
+
is_error: boolean;
|
|
54
|
+
duration_ms: number;
|
|
55
|
+
duration_api_ms: number;
|
|
56
|
+
num_turns: number;
|
|
57
|
+
result: string;
|
|
58
|
+
session_id: string;
|
|
59
|
+
total_cost_usd: number;
|
|
60
|
+
usage: {
|
|
61
|
+
input_tokens: number;
|
|
62
|
+
cache_creation_input_tokens?: number;
|
|
63
|
+
cache_read_input_tokens?: number;
|
|
64
|
+
output_tokens: number;
|
|
65
|
+
server_tool_use?: {
|
|
66
|
+
web_search_requests: number;
|
|
67
|
+
};
|
|
68
|
+
service_tier?: string;
|
|
69
|
+
};
|
|
70
|
+
permission_denials: any[];
|
|
71
|
+
uuid: string;
|
|
72
|
+
}
|
|
73
|
+
export declare class OutputHandler {
|
|
74
|
+
private format;
|
|
75
|
+
options: {
|
|
76
|
+
model?: string;
|
|
77
|
+
tools?: string[];
|
|
78
|
+
mcpServers?: string[];
|
|
79
|
+
cwd?: string;
|
|
80
|
+
};
|
|
81
|
+
private sessionId;
|
|
82
|
+
private startTime;
|
|
83
|
+
private turnCount;
|
|
84
|
+
private finalResult;
|
|
85
|
+
private totalUsage;
|
|
86
|
+
constructor(format?: OutputFormat, options?: {
|
|
87
|
+
model?: string;
|
|
88
|
+
tools?: string[];
|
|
89
|
+
mcpServers?: string[];
|
|
90
|
+
cwd?: string;
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Initialize stream-json session
|
|
94
|
+
*/
|
|
95
|
+
initializeSession(tools: string[], mcpServers?: string[], model?: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* Output a complete message
|
|
98
|
+
*/
|
|
99
|
+
outputMessage(role: 'assistant' | 'user', content: string, usage?: any, toolCalls?: any[]): void;
|
|
100
|
+
/**
|
|
101
|
+
* Output a tool call as a message
|
|
102
|
+
*/
|
|
103
|
+
outputToolCallMessage(toolCall: any): void;
|
|
104
|
+
/**
|
|
105
|
+
* Output a tool call (legacy method for text format)
|
|
106
|
+
*/
|
|
107
|
+
outputToolCall(toolName: string, args: any): void;
|
|
108
|
+
/**
|
|
109
|
+
* Output a tool result
|
|
110
|
+
*/
|
|
111
|
+
outputToolResult(toolUseId: string, result: any): void;
|
|
112
|
+
/**
|
|
113
|
+
* Output an error
|
|
114
|
+
*/
|
|
115
|
+
outputError(error: string | Error): void;
|
|
116
|
+
/**
|
|
117
|
+
* Output completion signal
|
|
118
|
+
*/
|
|
119
|
+
outputComplete(usage?: any, apiDuration?: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Start a spinner (only for text format)
|
|
122
|
+
*/
|
|
123
|
+
startSpinner(message: string): any;
|
|
124
|
+
/**
|
|
125
|
+
* Calculate approximate cost (simplified)
|
|
126
|
+
*/
|
|
127
|
+
private calculateCost;
|
|
128
|
+
/**
|
|
129
|
+
* Get session ID
|
|
130
|
+
*/
|
|
131
|
+
getSessionId(): string;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,aAAa,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;I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