cckit 0.2.0 → 0.3.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.
- package/README.md +322 -25
- package/dist/commands.d.ts +7 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +1 -363
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -267
- package/dist/config.js.map +1 -1
- package/dist/i18n.d.ts +1 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +1 -239
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +1 -151
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +1 -174
- package/dist/providers.js.map +1 -1
- package/dist/proxy-manager.d.ts +38 -0
- package/dist/proxy-manager.d.ts.map +1 -0
- package/dist/proxy-manager.js +1 -0
- package/dist/proxy-manager.js.map +1 -0
- package/dist/types.d.ts +4 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -69
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/errors.js +1 -92
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +1 -115
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/index.js +1 -8
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logger.js +1 -68
- package/dist/utils/logger.js.map +1 -1
- package/package.json +6 -6
package/dist/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","
|
|
1
|
+
{"version":3,"file":"/Users/qiutian00lw/Code/cckit_cli/cckit-node/dist/i18n.js","names":["SUPPORTED_LOCALES","DEFAULT_LOCALE","currentLocale","initI18n","locale","includes","process","env","LANG","e","detectSystemLocale","getCurrentLocale","translations","en","cli","about","long_about","list_title","current_title","show_config_title","name","no_active_provider","switch_success","configure_success","restart_note","test_connection","export_success","path","import_success","file","reset_success","status","active","inactive","not_configured","general","id_label","name_label","type_label","model_label","api_key_label","base_url_label","created_label","updated_label","configuration_label","switching","resetting","provider_label","providers","zhipu","minimax","kimi","claude","zenmux","streamlake","volcengine","aliyun","tencent","xfyun","custom","errors","provider_not_found","unknown_provider","unsupported_provider","type","provider_not_configured","installation_failed","npm_command_failed","error","claude_code","not_installed","install_prompt","installing","install_success","install_failed","installed_with_version","version","trim","npm_path_note","npm_requirements","npm_error","check_error","skip_install_warning","restart_terminal_note","zh","t","key","args","keys","split","value","k","i18n","get_display_name"],"sources":["../src/i18n.ts"],"mappings":"AAIA,MAAMA,EAA8B,CAAC,KAAM,MACrCC,EAAyB,KAE/B,IAAIC,EAF2B,YAIzB,SAAUC,SAASC,GAErBF,EADEE,GAAUJ,EAAkBK,SAASD,GACvBA,EAMpB,WACE,IAEE,IADaE,QAAQC,IAAIC,MAAQ,IACxBH,SAAS,MAChB,MAAO,IAEX,CAAE,MAAOI,GAAI,CACb,OAAOR,CACT,CAZoBS,EAEpB,QAYM,SAAUC,mBACd,OAAOT,CACT,CAEA,MAAMU,EAAe,CACnBC,GAAI,CACFC,IAAK,CACHC,MAAO,sCACPC,WAAY,2GACZC,WAAY,kBACZC,cAAe,mBACfC,kBAAoBC,GAAiB,kBAAkBA,IACvDC,mBAAoB,gCACpBC,eAAiBF,GAAiB,8BAA8BA,IAChEG,kBAAoBH,GAAiB,6BAA6BA,IAClEI,aAAc,0DACdC,gBAAkBL,GAAiB,yBAAyBA,OAC5DM,eAAiBC,GAAiB,+BAA+BA,IACjEC,eAAiBC,GAAiB,iCAAiCA,IACnEC,cAAe,2CAEjBC,OAAQ,CACNC,OAAQ,WACRC,SAAU,aACVC,eAAgB,kBAElBC,QAAS,CACPC,SAAU,KACVC,WAAY,OACZC,WAAY,OACZC,YAAa,SACbC,cAAe,UACfC,eAAgB,WAChBC,cAAe,UACfC,cAAe,UACf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9BF,sBAAuB,IAAME,EAAE","ignoreList":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,152 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import yargs from
|
|
3
|
-
import { hideBin } from 'yargs/helpers';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { execSync } from 'child_process';
|
|
6
|
-
import { createInterface } from 'readline';
|
|
7
|
-
import { ConfigManager } from './config.js';
|
|
8
|
-
import { Commands } from './commands.js';
|
|
9
|
-
import { initI18n, getCurrentLocale } from './i18n.js';
|
|
10
|
-
import { i18n } from './i18n.js';
|
|
11
|
-
import { APP_VERSION, TIMEOUTS, NPM_REGISTRIES } from './utils/constants.js';
|
|
12
|
-
import { getErrorMessage } from './utils/errors.js';
|
|
13
|
-
import { logger } from './utils/logger.js';
|
|
14
|
-
/**
|
|
15
|
-
* Checks if Claude Code is installed and offers to install if not
|
|
16
|
-
*/
|
|
17
|
-
function checkClaudeCodeInstallation() {
|
|
18
|
-
try {
|
|
19
|
-
const version = execSync('claude --version', {
|
|
20
|
-
stdio: 'pipe',
|
|
21
|
-
timeout: TIMEOUTS.CLI_CHECK,
|
|
22
|
-
}).toString().trim();
|
|
23
|
-
logger.success(`Claude Code is installed: ${i18n.claude_code.installed_with_version(version)}`);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
const err = error;
|
|
27
|
-
if (err.code === 'ENOENT' || err.killed) {
|
|
28
|
-
console.log(chalk.yellow(i18n.claude_code.not_installed()));
|
|
29
|
-
console.log(i18n.claude_code.install_prompt());
|
|
30
|
-
const readline = createInterface({
|
|
31
|
-
input: process.stdin,
|
|
32
|
-
output: process.stdout,
|
|
33
|
-
});
|
|
34
|
-
readline.question('', (answer) => {
|
|
35
|
-
readline.close();
|
|
36
|
-
if (answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
|
|
37
|
-
console.log(chalk.yellow(i18n.claude_code.installing()));
|
|
38
|
-
try {
|
|
39
|
-
execSync(`npm install -g @anthropic-ai/claude-code --registry=${NPM_REGISTRIES.NPMMIRROR}`, { stdio: 'inherit' });
|
|
40
|
-
console.log(`${chalk.green(i18n.claude_code.install_success())} ${chalk.dim(i18n.claude_code.restart_terminal_note())}`);
|
|
41
|
-
}
|
|
42
|
-
catch (installError) {
|
|
43
|
-
console.log(chalk.red(i18n.claude_code.install_failed()));
|
|
44
|
-
console.log(i18n.claude_code.npm_requirements());
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
console.log(chalk.yellow(i18n.claude_code.skip_install_warning()));
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Error handler wrapper for commands
|
|
57
|
-
*/
|
|
58
|
-
function handleCommandError(error) {
|
|
59
|
-
const message = getErrorMessage(error);
|
|
60
|
-
console.error(chalk.red(`Error: ${message}`));
|
|
61
|
-
logger.debug('Error details:', error);
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Async error handler wrapper
|
|
66
|
-
*/
|
|
67
|
-
function handleAsyncCommand(fn) {
|
|
68
|
-
return async () => {
|
|
69
|
-
try {
|
|
70
|
-
await fn();
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
handleCommandError(error);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Sync error handler wrapper
|
|
79
|
-
*/
|
|
80
|
-
function handleSyncCommand(fn) {
|
|
81
|
-
return () => {
|
|
82
|
-
try {
|
|
83
|
-
fn();
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
handleCommandError(error);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Main entry point
|
|
92
|
-
*/
|
|
93
|
-
async function main() {
|
|
94
|
-
initI18n(getCurrentLocale());
|
|
95
|
-
checkClaudeCodeInstallation();
|
|
96
|
-
const configManager = new ConfigManager();
|
|
97
|
-
configManager.initialize();
|
|
98
|
-
const commands = new Commands(configManager);
|
|
99
|
-
yargs(hideBin(process.argv))
|
|
100
|
-
.command('list', 'List all available model providers', {}, () => handleSyncCommand(() => commands.list())())
|
|
101
|
-
.command('switch <provider>', 'Switch to a specific model provider', (yargs) => yargs.positional('provider', {
|
|
102
|
-
describe: 'The model provider to switch to',
|
|
103
|
-
type: 'string',
|
|
104
|
-
}), (argv) => handleSyncCommand(() => commands.switch(argv.provider))())
|
|
105
|
-
.command('current', 'Show current active provider', {}, () => handleSyncCommand(() => commands.current())())
|
|
106
|
-
.command('configure <provider>', 'Configure a provider', (yargs) => yargs
|
|
107
|
-
.positional('provider', { describe: 'The provider to configure', type: 'string' })
|
|
108
|
-
.option('api-key', { describe: 'API key for the provider', type: 'string' })
|
|
109
|
-
.option('base-url', { describe: 'Base URL for the provider', type: 'string' })
|
|
110
|
-
.option('model', {
|
|
111
|
-
describe: 'Model name (can be used multiple times)',
|
|
112
|
-
type: 'array',
|
|
113
|
-
}), (argv) => handleSyncCommand(() => {
|
|
114
|
-
const models = argv.model
|
|
115
|
-
? Array.isArray(argv.model)
|
|
116
|
-
? argv.model
|
|
117
|
-
: [argv.model]
|
|
118
|
-
: undefined;
|
|
119
|
-
commands.configure(argv.provider, argv['api-key'], argv['base-url'], models);
|
|
120
|
-
})())
|
|
121
|
-
.command('show <provider>', 'Show provider configuration', (yargs) => yargs.positional('provider', { describe: 'The provider to show', type: 'string' }), (argv) => handleSyncCommand(() => commands.show(argv.provider))())
|
|
122
|
-
.command('test <provider>', 'Test provider connection', (yargs) => yargs.positional('provider', { describe: 'The provider to test', type: 'string' }), (argv) => handleAsyncCommand(async () => await commands.test(argv.provider))())
|
|
123
|
-
.command('models <provider>', 'List models for a provider', (yargs) => yargs.positional('provider', {
|
|
124
|
-
describe: 'The provider to show models for',
|
|
125
|
-
type: 'string',
|
|
126
|
-
}), (argv) => handleSyncCommand(() => commands.models(argv.provider))())
|
|
127
|
-
.command('set-model <provider> <model>', 'Set active model for a provider', (yargs) => yargs
|
|
128
|
-
.positional('provider', { describe: 'The provider name or id', type: 'string' })
|
|
129
|
-
.positional('model', { describe: 'The model name to set as active', type: 'string' }), (argv) => handleAsyncCommand(async () => await commands.setModel(argv.provider, argv.model))())
|
|
130
|
-
.command('remove-model <provider> <model>', 'Remove a model from a provider', (yargs) => yargs
|
|
131
|
-
.positional('provider', { describe: 'The provider name or id', type: 'string' })
|
|
132
|
-
.positional('model', { describe: 'The model name to remove', type: 'string' }), (argv) => handleSyncCommand(() => commands.removeModel(argv.provider, argv.model))())
|
|
133
|
-
.command('export', 'Export configuration', (yargs) => yargs.option('output', {
|
|
134
|
-
describe: 'Output file path (optional, defaults to stdout)',
|
|
135
|
-
type: 'string',
|
|
136
|
-
}), (argv) => handleSyncCommand(() => commands.export(argv.output))())
|
|
137
|
-
.command('import <file>', 'Import configuration', (yargs) => yargs.positional('file', { describe: 'Input file path', type: 'string' }), (argv) => handleSyncCommand(() => commands.import(argv.file))())
|
|
138
|
-
.command('reset', 'Reset to default Claude configuration', {}, () => handleSyncCommand(() => commands.reset())())
|
|
139
|
-
.help()
|
|
140
|
-
.alias('help', 'h')
|
|
141
|
-
.version(APP_VERSION)
|
|
142
|
-
.alias('version', 'v')
|
|
143
|
-
.demandCommand()
|
|
144
|
-
.strict()
|
|
145
|
-
.parseAsync()
|
|
146
|
-
.catch((err) => handleCommandError(err));
|
|
147
|
-
}
|
|
148
|
-
main().catch((error) => {
|
|
149
|
-
console.error(chalk.red(`Fatal error: ${getErrorMessage(error)}`));
|
|
150
|
-
process.exit(1);
|
|
151
|
-
});
|
|
152
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
import e from"yargs";import{hideBin as o}from"yargs/helpers";import r from"chalk";import{execSync as i}from"child_process";import{createInterface as t}from"readline";import{ConfigManager as s}from"./config.js";import{Commands as d}from"./commands.js";import{initI18n as n,getCurrentLocale as a}from"./i18n.js";import{i18n as c}from"./i18n.js";import{APP_VERSION as l,TIMEOUTS as p,NPM_REGISTRIES as m}from"./utils/constants.js";import{getErrorMessage as u}from"./utils/errors.js";import{logger as v}from"./utils/logger.js";function f(e){const o=u(e);console.error(r.red(`Error: ${o}`)),v.debug("Error details:",e),process.exit(1)}function g(e){return async()=>{try{await e()}catch(e){f(e)}}}function y(e){return()=>{try{e()}catch(e){f(e)}}}(async function(){n(a()),function(){try{const e=i("claude --version",{stdio:"pipe",timeout:p.CLI_CHECK}).toString().trim();v.success(`Claude Code is installed: ${c.claude_code.installed_with_version(e)}`)}catch(e){const o=e;if("ENOENT"===o.code||o.killed){console.log(r.yellow(c.claude_code.not_installed())),console.log(c.claude_code.install_prompt());const e=t({input:process.stdin,output:process.stdout});e.question("",o=>{if(e.close(),"y"===o.toLowerCase()||"yes"===o.toLowerCase()){console.log(r.yellow(c.claude_code.installing()));try{i(`npm install -g @anthropic-ai/claude-code --registry=${m.NPMMIRROR}`,{stdio:"inherit"}),console.log(`${r.green(c.claude_code.install_success())} ${r.dim(c.claude_code.restart_terminal_note())}`)}catch(e){console.log(r.red(c.claude_code.install_failed())),console.log(c.claude_code.npm_requirements()),process.exit(1)}}else console.log(r.yellow(c.claude_code.skip_install_warning()))})}}}();const u=new s;u.initialize();const h=new d(u);e(o(process.argv)).command("list","List all available model providers",{},()=>y(()=>h.list())()).command("switch [provider]","Switch to a specific model provider (interactive if no provider specified)",e=>e.positional("provider",{describe:"The model provider to switch to (optional, will prompt if not provided)",type:"string"}),e=>g(async()=>await h.switch(e.provider))()).command("current","Show current active provider",{},()=>y(()=>h.current())()).command("configure <provider>","Configure a provider",e=>e.positional("provider",{describe:"The provider to configure",type:"string"}).option("api-key",{describe:"API key for the provider",type:"string"}).option("base-url",{describe:"Base URL for the provider",type:"string"}).option("model",{describe:"Model name (can be used multiple times)",type:"array"}),e=>y(()=>{const o=e.model?Array.isArray(e.model)?e.model:[e.model]:void 0;h.configure(e.provider,e["api-key"],e["base-url"],o)})()).command("show <provider>","Show provider configuration",e=>e.positional("provider",{describe:"The provider to show",type:"string"}),e=>y(()=>h.show(e.provider))()).command("test <provider>","Test provider connection",e=>e.positional("provider",{describe:"The provider to test",type:"string"}),e=>g(async()=>await h.test(e.provider))()).command("models <provider>","List models for a provider",e=>e.positional("provider",{describe:"The provider to show models for",type:"string"}),e=>y(()=>h.models(e.provider))()).command("set-model <provider> <model>","Set active model for a provider",e=>e.positional("provider",{describe:"The provider name or id",type:"string"}).positional("model",{describe:"The model name to set as active",type:"string"}).option("type",{describe:"Model type to set (default, sonnet, haiku, opus)",type:"string",choices:["default","sonnet","haiku","opus"],default:"default"}),e=>g(async()=>await h.setModel(e.provider,e.model,e.type))()).command("remove-model <provider> <model>","Remove a model from a provider",e=>e.positional("provider",{describe:"The provider name or id",type:"string"}).positional("model",{describe:"The model name to remove",type:"string"}),e=>y(()=>h.removeModel(e.provider,e.model))()).command("export","Export configuration",e=>e.option("output",{describe:"Output file path (optional, defaults to stdout)",type:"string"}),e=>y(()=>h.export(e.output))()).command("import <file>","Import configuration",e=>e.positional("file",{describe:"Input file path",type:"string"}),e=>y(()=>h.import(e.file))()).command("reset","Reset to default Claude configuration",{},()=>y(()=>h.reset())()).command("interactive","Interactive configuration wizard",{},()=>g(async()=>await h.interactive())()).help().alias("help","h").version(l).alias("version","v").demandCommand().strict().parseAsync().catch(e=>f(e))})().catch(e=>{console.error(r.red(`Fatal error: ${u(e)}`)),process.exit(1)});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"/Users/qiutian00lw/Code/cckit_cli/cckit-node/dist/index.js","names":["yargs","hideBin","chalk","execSync","createInterface","ConfigManager","Commands","initI18n","getCurrentLocale","i18n","APP_VERSION","TIMEOUTS","NPM_REGISTRIES","getErrorMessage","logger","handleCommandError","error","message","console","red","debug","process","exit","handleAsyncCommand","fn","async","handleSyncCommand","version","stdio","timeout","CLI_CHECK","toString","trim","success","claude_code","installed_with_version","err","code","killed","log","yellow","not_installed","install_prompt","readline","input","stdin","output","stdout","question","answer","close","toLowerCase","installing","NPMMIRROR","green","install_success","dim","restart_terminal_note","installError","install_failed","npm_requirements","skip_install_warning","checkClaudeCodeInstallation","configManager","initialize","commands","argv","command","list","positional","describe","type","switch","provider","current","option","models","model","Array","isArray","undefined","configure","show","test","choices","default","setModel","removeModel","export","import","file","reset","interactive","help","alias","demandCommand","strict","parseAsync","catch","main"],"sources":["../src/index.ts"],"mappings":";OAEOA,MAAW,0BACTC,MAAe,uBACjBC,MAAW,2BACTC,MAAgB,0CAChBC,MAAuB,mCACvBC,MAAqB,iCACrBC,MAAgB,mCAChBC,sBAAUC,MAAwB,2BAClCC,MAAY,kCACZC,cAAaC,oBAAUC,MAAsB,iDAC7CC,MAAuB,qCACvBC,MAAc,oBAyDvB,SAASC,EAAmBC,GAC1B,MAAMC,EAAUJ,EAAgBG,GAChCE,QAAQF,MAAMd,EAAMiB,IAAI,UAAUF,MAClCH,EAAOM,MAAM,iBAAkBJ,GAC/BK,QAAQC,KAAK,EACf,CAKA,SAASC,EAAmBC,GAC1B,OAAOC,UACL,UACQD,GACR,CAAE,MAAOR,GACPD,EAAmBC,EACrB,EAEJ,CAKA,SAASU,EAAkBF,GACzB,MAAO,KACL,IACEA,GACF,CAAE,MAAOR,GACPD,EAAmBC,EACrB,EAEJ,EAKAS,iBACElB,EAASC,KAzFX,WACE,IACE,MAAMmB,EAAUxB,EAAS,mBAAoB,CAC3CyB,MAAO,OACPC,QAASlB,EAASmB,YACjBC,WAAWC,OAEdlB,EAAOmB,QAAQ,6BAA6BxB,EAAKyB,YAAYC,uBAAuBR,KACtF,CAAE,MAAOX,GACP,MAAMoB,EAAMpB,EACZ,GAAiB,WAAboB,EAAIC,MAAqBD,EAAIE,OAAQ,CACvCpB,QAAQqB,IAAIrC,E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EAAKW,OADrDnD,IAIHyC,QACC,SACA,uBACCnE,GACCA,EAAM2E,OAAO,SAAU,CACrBL,SAAU,kDACVC,KAAM,WAETL,GAASxC,EAAkB,IAAMuC,EAASuB,OAAOtB,EAAKpB,QAA7CpB,IAEXyC,QACC,gBACA,uBACCnE,GAAUA,EAAMqE,WAAW,OAAQ,CAAEC,SAAU,kBAAmBC,KAAM,WACxEL,GAASxC,EAAkB,IAAMuC,EAASwB,OAAOvB,EAAKwB,MAA7ChE,IAEXyC,QACC,QACA,wCACA,GACA,IAAMzC,EAAkB,IAAMuC,EAAS0B,QAAjCjE,IAEPyC,QACC,cACA,mCACA,GACA,IAAM5C,EAAmBE,eAAkBwC,EAAS2B,cAA9CrE,IAEPsE,OACAC,MAAM,OAAQ,KACdnE,QAAQjB,GACRoF,MAAM,UAAW,KACjBC,gBACAC,SACAC,aACAC,MAAO9D,GAAiBrB,EAAmBqB,GAChD,EAEA+D,GAAOD,MAAOlF,IACZE,QAAQF,MAAMd,EAAMiB,IAAI,gBAAgBN,EAAgBG,OACxDK,QAAQC,KAAK","ignoreList":[]}
|
package/dist/providers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAsH3D,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEnF;AAgED,wBAAsB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAmBvF"}
|
package/dist/providers.js
CHANGED
|
@@ -1,174 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const PROVIDER_CONFIGS = {
|
|
3
|
-
zhipu: {
|
|
4
|
-
provider_type: 'zhipu',
|
|
5
|
-
display_name: '智谱LLM (Zhipu)',
|
|
6
|
-
default_model: 'GLM-4.7',
|
|
7
|
-
base_url: 'https://open.bigmodel.cn/api/anthropic',
|
|
8
|
-
auth_header_name: 'Authorization',
|
|
9
|
-
auth_prefix: 'Bearer ',
|
|
10
|
-
endpoint: '/v1/messages',
|
|
11
|
-
capabilities: ['Chat', 'Code Generation', 'Chinese Support', 'Multi-modal'],
|
|
12
|
-
},
|
|
13
|
-
minimax: {
|
|
14
|
-
provider_type: 'minimax',
|
|
15
|
-
display_name: 'MiniMax',
|
|
16
|
-
default_model: 'MiniMax-M2',
|
|
17
|
-
base_url: 'https://api.minimaxi.com/anthropic',
|
|
18
|
-
auth_header_name: 'Authorization',
|
|
19
|
-
auth_prefix: 'Bearer ',
|
|
20
|
-
endpoint: '/v1/messages',
|
|
21
|
-
capabilities: ['Chat', 'Code Generation', 'Multi-language', 'Voice Synthesis'],
|
|
22
|
-
},
|
|
23
|
-
kimi: {
|
|
24
|
-
provider_type: 'kimi',
|
|
25
|
-
display_name: 'Kimi (Moonshot)',
|
|
26
|
-
default_model: 'kimi-for-coding',
|
|
27
|
-
base_url: 'https://api.kimi.com/coding/',
|
|
28
|
-
auth_header_name: 'Authorization',
|
|
29
|
-
auth_prefix: 'Bearer ',
|
|
30
|
-
endpoint: '/v1/messages',
|
|
31
|
-
capabilities: ['Chat', 'Long Context', 'Code Generation', 'Document Processing'],
|
|
32
|
-
},
|
|
33
|
-
claude: {
|
|
34
|
-
provider_type: 'claude',
|
|
35
|
-
display_name: 'Claude (Official)',
|
|
36
|
-
default_model: 'claude-3-5-sonnet-20241022',
|
|
37
|
-
base_url: 'https://api.anthropic.com',
|
|
38
|
-
auth_header_name: 'x-api-key',
|
|
39
|
-
auth_prefix: '',
|
|
40
|
-
endpoint: '/v1/messages',
|
|
41
|
-
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
42
|
-
capabilities: ['Chat', 'Code Generation', 'Analysis', 'Multimodal', 'Reasoning'],
|
|
43
|
-
},
|
|
44
|
-
zenmux: {
|
|
45
|
-
provider_type: 'zenmux',
|
|
46
|
-
display_name: 'ZenMux.ai',
|
|
47
|
-
default_model: 'claude-3-5-sonnet-20241022',
|
|
48
|
-
base_url: 'https://zenmux.ai/api/anthropic',
|
|
49
|
-
auth_header_name: 'Authorization',
|
|
50
|
-
auth_prefix: 'Bearer ',
|
|
51
|
-
endpoint: '/v1/messages',
|
|
52
|
-
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
53
|
-
capabilities: ['Model Gateway', 'Multi-provider', 'Claude Compatible', 'Load Balancing'],
|
|
54
|
-
},
|
|
55
|
-
streamlake: {
|
|
56
|
-
provider_type: 'streamlake',
|
|
57
|
-
display_name: 'Kuaishou StreamLake',
|
|
58
|
-
default_model: 'kat-coder-pro-v1',
|
|
59
|
-
base_url: 'https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/kat-coder-pro-v1/claude-code-proxy',
|
|
60
|
-
auth_header_name: 'Authorization',
|
|
61
|
-
auth_prefix: 'Bearer ',
|
|
62
|
-
endpoint: '/v1/messages',
|
|
63
|
-
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
64
|
-
capabilities: ['Chat', 'Code Generation', 'Chinese Support', 'Video Understanding', 'Multimodal'],
|
|
65
|
-
},
|
|
66
|
-
volcengine: {
|
|
67
|
-
provider_type: 'volcengine',
|
|
68
|
-
display_name: 'Volcengine',
|
|
69
|
-
default_model: 'ark-code-latest',
|
|
70
|
-
base_url: 'https://ark.cn-beijing.volces.com/api/coding',
|
|
71
|
-
auth_header_name: 'Authorization',
|
|
72
|
-
auth_prefix: 'Bearer ',
|
|
73
|
-
endpoint: '/v1/messages',
|
|
74
|
-
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
75
|
-
capabilities: ['Chat', 'Code Generation', 'Chinese Support', 'Multimodal'],
|
|
76
|
-
},
|
|
77
|
-
aliyun: {
|
|
78
|
-
provider_type: 'aliyun',
|
|
79
|
-
display_name: '阿里云 Coding Plan',
|
|
80
|
-
default_model: 'claude-sonnet-4-20250514',
|
|
81
|
-
base_url: 'https://coding.dashscope.aliyuncs.com/apps/anthropic',
|
|
82
|
-
auth_header_name: 'Authorization',
|
|
83
|
-
auth_prefix: 'Bearer ',
|
|
84
|
-
endpoint: '/v1/messages',
|
|
85
|
-
api_version_header: ['anthropic-version', '2023-06-01'],
|
|
86
|
-
capabilities: ['Chat', 'Code Generation', 'Chinese Support', 'Multimodal'],
|
|
87
|
-
},
|
|
88
|
-
custom: {
|
|
89
|
-
provider_type: 'custom',
|
|
90
|
-
display_name: 'Custom Provider',
|
|
91
|
-
default_model: '',
|
|
92
|
-
base_url: '',
|
|
93
|
-
auth_header_name: 'Authorization',
|
|
94
|
-
auth_prefix: 'Bearer ',
|
|
95
|
-
endpoint: '/v1/messages',
|
|
96
|
-
capabilities: ['Custom', 'User-defined', 'Local LLM', 'Anthropic Compatible API'],
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
export function findProviderConfig(providerType) {
|
|
100
|
-
return PROVIDER_CONFIGS[providerType];
|
|
101
|
-
}
|
|
102
|
-
async function testProviderGeneric(provider, config) {
|
|
103
|
-
const startTime = Date.now();
|
|
104
|
-
const modelName = provider.current_model || provider.models[0] || config.default_model;
|
|
105
|
-
const baseUrl = provider.base_url || config.base_url;
|
|
106
|
-
const url = `${baseUrl}${config.endpoint}`;
|
|
107
|
-
const headers = {
|
|
108
|
-
'Content-Type': 'application/json',
|
|
109
|
-
};
|
|
110
|
-
if (config.auth_prefix) {
|
|
111
|
-
headers[config.auth_header_name] = `${config.auth_prefix}${provider.api_key}`;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
headers[config.auth_header_name] = provider.api_key;
|
|
115
|
-
}
|
|
116
|
-
if (config.api_version_header) {
|
|
117
|
-
headers[config.api_version_header[0]] = config.api_version_header[1];
|
|
118
|
-
}
|
|
119
|
-
const payload = {
|
|
120
|
-
model: modelName,
|
|
121
|
-
max_tokens: 100,
|
|
122
|
-
messages: [
|
|
123
|
-
{
|
|
124
|
-
role: 'user',
|
|
125
|
-
content: 'Test message',
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
};
|
|
129
|
-
try {
|
|
130
|
-
const response = await axios.post(url, payload, {
|
|
131
|
-
headers,
|
|
132
|
-
timeout: 10000,
|
|
133
|
-
});
|
|
134
|
-
const responseTime = Date.now() - startTime;
|
|
135
|
-
return {
|
|
136
|
-
success: true,
|
|
137
|
-
message: `Successfully connected to ${provider.name}`,
|
|
138
|
-
model_info: {
|
|
139
|
-
model_name: modelName,
|
|
140
|
-
provider_name: provider.name,
|
|
141
|
-
capabilities: config.capabilities,
|
|
142
|
-
},
|
|
143
|
-
response_time_ms: responseTime,
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
catch (error) {
|
|
147
|
-
const responseTime = Date.now() - startTime;
|
|
148
|
-
const errorMessage = error.response?.data?.message || error.message || 'Unknown error';
|
|
149
|
-
return {
|
|
150
|
-
success: false,
|
|
151
|
-
message: `Failed to connect to ${provider.name}: ${errorMessage}`,
|
|
152
|
-
response_time_ms: responseTime,
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
export async function testProvider(provider) {
|
|
157
|
-
if (!provider.api_key) {
|
|
158
|
-
return {
|
|
159
|
-
success: false,
|
|
160
|
-
message: 'Provider is not configured with an API key',
|
|
161
|
-
response_time_ms: 0,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const config = findProviderConfig(provider.provider_type);
|
|
165
|
-
if (!config) {
|
|
166
|
-
return {
|
|
167
|
-
success: false,
|
|
168
|
-
message: `Unsupported provider type: ${provider.provider_type}`,
|
|
169
|
-
response_time_ms: 0,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return testProviderGeneric(provider, config);
|
|
173
|
-
}
|
|
174
|
-
//# sourceMappingURL=providers.js.map
|
|
1
|
+
import e from"axios";export const PROVIDER_CONFIGS={zhipu:{provider_type:"zhipu",display_name:"智谱 Coding Plan",default_model:"GLM-4.7",base_url:"https://open.bigmodel.cn/api/anthropic",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",capabilities:["Chat","Code Generation","Chinese Support","Multi-modal"]},minimax:{provider_type:"minimax",display_name:"MiniMax Coding Plan",default_model:"MiniMax-M2",base_url:"https://api.minimaxi.com/anthropic",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",capabilities:["Chat","Code Generation","Multi-language","Voice Synthesis"]},kimi:{provider_type:"kimi",display_name:"Kimi Coding Plan",default_model:"kimi-for-coding",base_url:"https://api.kimi.com/coding/",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",capabilities:["Chat","Long Context","Code Generation","Document Processing"]},claude:{provider_type:"claude",display_name:"Claude (Official)",default_model:"claude-3-5-sonnet-20241022",base_url:"https://api.anthropic.com",auth_header_name:"x-api-key",auth_prefix:"",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Chat","Code Generation","Analysis","Multimodal","Reasoning"]},zenmux:{provider_type:"zenmux",display_name:"ZenMux.ai",default_model:"claude-3-5-sonnet-20241022",base_url:"https://zenmux.ai/api/anthropic",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Model Gateway","Multi-provider","Claude Compatible","Load Balancing"]},streamlake:{provider_type:"streamlake",display_name:"快手 StreamLake Coding Plan",default_model:"kat-coder-pro-v1",base_url:"https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/kat-coder-pro-v1/claude-code-proxy",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Chat","Code Generation","Chinese Support","Video Understanding","Multimodal"]},volcengine:{provider_type:"volcengine",display_name:"火山引擎 Coding Plan",default_model:"ark-code-latest",base_url:"https://ark.cn-beijing.volces.com/api/coding",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Chat","Code Generation","Chinese Support","Multimodal"]},aliyun:{provider_type:"aliyun",display_name:"阿里云 Coding Plan",default_model:"claude-sonnet-4-20250514",base_url:"https://coding.dashscope.aliyuncs.com/apps/anthropic",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Chat","Code Generation","Chinese Support","Multimodal"]},tencent:{provider_type:"tencent",display_name:"腾讯云 Coding Plan",default_model:"GLM-5",base_url:"https://api.lkeap.cloud.tencent.com/coding/anthropic",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Chat","Code Generation","Chinese Support","Multimodal"]},xfyun:{provider_type:"xfyun",display_name:"讯飞 Coding Plan",default_model:"GLM-5",base_url:"https://maas-coding-api.cn-huabei-1.xf-yun.com/anthropic",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",api_version_header:["anthropic-version","2023-06-01"],capabilities:["Chat","Code Generation","Chinese Support","Multimodal"]},custom:{provider_type:"custom",display_name:"Custom Provider",default_model:"",base_url:"",auth_header_name:"Authorization",auth_prefix:"Bearer ",endpoint:"/v1/messages",capabilities:["Custom","User-defined","Local LLM","Anthropic Compatible API"]}};export function findProviderConfig(e){return PROVIDER_CONFIGS[e]}export async function testProvider(a){if(!a.api_key)return{success:!1,message:"Provider is not configured with an API key",response_time_ms:0};const i=findProviderConfig(a.provider_type);return i?async function(a,i){const n=Date.now(),t=a.current_model||a.models[0]||i.default_model,o=`${a.base_url||i.base_url}${i.endpoint}`,r={"Content-Type":"application/json"};i.auth_prefix?r[i.auth_header_name]=`${i.auth_prefix}${a.api_key}`:r[i.auth_header_name]=a.api_key,i.api_version_header&&(r[i.api_version_header[0]]=i.api_version_header[1]);const s={model:t,max_tokens:100,messages:[{role:"user",content:"Test message"}]};try{await e.post(o,s,{headers:r,timeout:1e4});const p=Date.now()-n;return{success:!0,message:`Successfully connected to ${a.name}`,model_info:{model_name:t,provider_name:a.name,capabilities:i.capabilities},response_time_ms:p}}catch(e){const i=Date.now()-n,t=e.response?.data?.message||e.message||"Unknown error";return{success:!1,message:`Failed to connect to ${a.name}: ${t}`,response_time_ms:i}}}(a,i):{success:!1,message:`Unsupported provider type: ${a.provider_type}`,response_time_ms:0}}
|
package/dist/providers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","
|
|
1
|
+
{"version":3,"file":"/Users/qiutian00lw/Code/cckit_cli/cckit-node/dist/providers.js","names":["axios","PROVIDER_CONFIGS","zhipu","provider_type","display_name","default_model","base_url","auth_header_name","auth_prefix","endpoint","capabilities","minimax","kimi","claude","api_version_header","zenmux","streamlake","volcengine","aliyun","tencent","xfyun","custom","findProviderConfig","providerType","async","testProvider","provider","api_key","success","message","response_time_ms","config","startTime","Date","now","modelName","current_model","models","url","headers","payload","model","max_tokens","messages","role","content","post","timeout","responseTime","name","model_info","model_name","provider_name","error","errorMessage","response","data","testProviderGeneric"],"sources":["../src/providers.ts"],"mappings":"OAAOA,MAAW,eAGX,MAAMC,iBAAmD,CAC9DC,MAAO,CACLC,cAAe,QACfC,aAAc,iBACdC,cAAe,UACfC,SAAU,yCACVC,iBAAkB,gBAClBC,YAAa,UACbC,SAAU,eACVC,aAAc,CAAC,OAAQ,kBAAmB,kBAAmB,gBAE/DC,QAAS,CACPR,cAAe,UACfC,aAAc,sBACdC,cAAe,aACf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,EAElC,MAAO,CACLJ,SAAS,EACTC,QAAS,6BAA6BH,EAASuB,OAC/CC,WAAY,CACVC,WAAYhB,EACZiB,cAAe1B,EAASuB,KACxBvC,aAAcqB,EAAOrB,cAEvBoB,iBAAkBkB,EAEtB,CAAE,MAAOK,GACP,MAAML,EAAef,KAAKC,MAAQF,EAC5BsB,EAAeD,EAAME,UAAUC,MAAM3B,SAAWwB,EAAMxB,SAAW,gBAEvE,MAAO,CACLD,SAAS,EACTC,QAAS,wBAAwBH,EAASuB,SAASK,IACnDxB,iBAAkBkB,EAEtB,CACF,CAoBSS,CAAoB/B,EAAUK,GAP5B,CACLH,SAAS,EACTC,QAAS,8BAA8BH,EAASvB,gBAChD2B,iBAAkB,EAKxB","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare class ProxyManager {
|
|
2
|
+
private static instance;
|
|
3
|
+
private activeProxies;
|
|
4
|
+
private nextPort;
|
|
5
|
+
private constructor();
|
|
6
|
+
static getInstance(): ProxyManager;
|
|
7
|
+
/**
|
|
8
|
+
* Start a proxy server for OpenAI-compatible provider
|
|
9
|
+
* @param providerId - The provider ID
|
|
10
|
+
* @param targetUrl - The target OpenAI-compatible API URL
|
|
11
|
+
* @param apiKey - The API key for authentication
|
|
12
|
+
* @returns The local proxy URL
|
|
13
|
+
*/
|
|
14
|
+
startProxy(providerId: string, targetUrl: string, apiKey: string): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Stop a specific proxy by provider ID
|
|
17
|
+
*/
|
|
18
|
+
stopProxy(providerId: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Stop all active proxies
|
|
21
|
+
*/
|
|
22
|
+
stopAllProxies(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Get the proxy URL for a provider if running
|
|
25
|
+
*/
|
|
26
|
+
getProxyUrl(providerId: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a proxy is running for a provider
|
|
29
|
+
*/
|
|
30
|
+
isProxyRunning(providerId: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Find the proxy script location
|
|
33
|
+
*/
|
|
34
|
+
private findProxyScript;
|
|
35
|
+
}
|
|
36
|
+
export declare const proxyManager: ProxyManager;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=proxy-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy-manager.d.ts","sourceRoot":"","sources":["../src/proxy-manager.ts"],"names":[],"mappings":"AAcA,cAAM,YAAY;IAChB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,aAAa,CAAyC;IAC9D,OAAO,CAAC,QAAQ,CAAgB;IAEhC,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,YAAY;IAOlC;;;;;;OAMG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoFxF;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAQnC;;OAEG;IACH,cAAc,IAAI,IAAI;IAOtB;;OAEG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAQ9C;;OAEG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI3C;;OAEG;IACH,OAAO,CAAC,eAAe;CAexB;AAED,eAAO,MAAM,YAAY,cAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{spawn as t}from"child_process";import e from"path";import{fileURLToPath as r}from"url";import i from"fs";const o=r(import.meta.url),s=e.dirname(o);class n{constructor(){this.activeProxies=new Map,this.nextPort=3100}static getInstance(){return n.instance||(n.instance=new n),n.instance}async startProxy(e,r,i){const o=this.activeProxies.get(e);if(o)return`http://127.0.0.1:${o.port}`;const s=this.nextPort++,n=this.findProxyScript();if(!n)throw new Error("Proxy script not found. Please ensure anthropic-proxy is installed.");return new Promise((i,o)=>{const c={...process.env,ANTHROPIC_PROXY_BASE_URL:r,PORT:String(s),OPENROUTER_API_KEY:""},a=t("node",[n],{env:c,stdio:["ignore","pipe","pipe"],detached:!1});let p=!1;const l=setTimeout(()=>{p||(a.kill(),o(new Error("Proxy startup timeout")))},1e4);a.stdout?.on("data",t=>{const r=t.toString();(r.includes("Server listening")||r.includes("listening"))&&(p=!0,clearTimeout(l),this.activeProxies.set(e,{process:a,port:s,providerId:e}),i(`http://127.0.0.1:${s}`))}),a.stderr?.on("data",t=>{const r=t.toString();(r.includes("Server listening")||r.includes("listening"))&&(p=!0,clearTimeout(l),this.activeProxies.set(e,{process:a,port:s,providerId:e}),i(`http://127.0.0.1:${s}`))}),a.on("error",t=>{clearTimeout(l),o(new Error(`Failed to start proxy: ${t.message}`))}),a.on("exit",t=>{clearTimeout(l),this.activeProxies.delete(e),p||o(new Error(`Proxy exited with code ${t}`))})})}stopProxy(t){const e=this.activeProxies.get(t);e&&(e.process.kill(),this.activeProxies.delete(t))}stopAllProxies(){for(const[t,e]of this.activeProxies)e.process.kill();this.activeProxies.clear()}getProxyUrl(t){const e=this.activeProxies.get(t);return e?`http://127.0.0.1:${e.port}`:null}isProxyRunning(t){return this.activeProxies.has(t)}findProxyScript(){const t=e.join(s,"..","..","anthropic-proxy","index.js");if(i.existsSync(t))return t;const r=e.join(s,"..","..","node_modules","anthropic-proxy","index.js");return i.existsSync(r)?r:null}}export const proxyManager=n.getInstance();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"/Users/qiutian00lw/Code/cckit_cli/cckit-node/dist/proxy-manager.js","names":["spawn","path","fileURLToPath","fs","__filename","url","__dirname","dirname","ProxyManager","constructor","this","activeProxies","Map","nextPort","getInstance","instance","startProxy","providerId","targetUrl","apiKey","existing","get","port","proxyScript","findProxyScript","Error","Promise","resolve","reject","env","process","ANTHROPIC_PROXY_BASE_URL","PORT","String","OPENROUTER_API_KEY","proxyProcess","stdio","detached","startupComplete","startupTimeout","setTimeout","kill","stdout","on","data","output","toString","includes","clearTimeout","set","stderr","err","message","code","delete","stopProxy","stopAllProxies","clear","getProxyUrl","isProxyRunning","has","localPath","join","existsSync","nodeModulesPath","proxyManager"],"sources":["../src/proxy-manager.ts"],"mappings":"gBAASA,MAA2B,uBAC7BC,MAAU,+BACRC,MAAqB,aACvBC,MAAQ,KAEf,MAAMC,EAAaF,cAA0BG,KACvCC,EAAYL,EAAKM,QAAQH,GAQ/B,MAAMI,EAKJ,WAAAC,GAHQC,KAAAC,cAA4C,IAAIC,IAChDF,KAAAG,SAAmB,IAEJ,CAEvB,kBAAAC,GAIE,OAHKN,EAAaO,WAChBP,EAAaO,SAAW,IAAIP,GAEvBA,EAAaO,QACtB,CASA,gBAAAC,CAAiBC,EAAoBC,EAAmBC,GAEtD,MAAMC,EAAWV,KAAKC,cAAcU,IAAIJ,GACxC,GAAIG,EACF,MAAO,oBAAoBA,EAASE,OAGtC,MAAMA,EAAOZ,KAAKG,WACZU,EAAcb,KAAKc,kBAEzB,IAAKD,EACH,MAAM,IAAIE,MAAM,uEAGlB,OAAO,IAAIC,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAM,IACPC,QAAQD,IACXE,yBAA0Bb,EAC1Bc,KAAMC,OAAOX,GACbY,mBAAoB,IAGhBC,EAAenC,EAAM,OAAQ,CAACuB,GAAc,CAChDM,MACAO,MAAO,CAAC,SAAU,OAAQ,QAC1BC,cAGF,IAAIC,KACJ,MAAMC,EAAiBC,WAAW,KAC3BF,IACHH,EAAaM,OACbb,EAAO,IAAIH,MAAM,4BAElB,KAEHU,EAAaO,QAAQC,GAAG,OAASC,IAC/B,MAAMC,EAASD,EAAKE,YAChBD,EAAOE,SAAS,qBAAuBF,EAAOE,SAAS,gBACzDT,KACAU,aAAaT,GAEb7B,KAAKC,cAAcsC,IAAIhC,EAAY,CACjCa,QAASK,EACTb,OACAL,eAGFU,EAAQ,oBAAoBL,QAIhCa,EAA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| 'volcengine' | 'aliyun' | 'custom';
|
|
1
|
+
export type ProviderType = 'zhipu' | 'minimax' | 'kimi' | 'claude' | 'zenmux' | 'streamlake' | 'volcengine' | 'aliyun' | 'tencent' | 'xfyun' | 'custom';
|
|
2
2
|
export interface ModelProvider {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
@@ -7,6 +7,9 @@ export interface ModelProvider {
|
|
|
7
7
|
base_url?: string;
|
|
8
8
|
models: string[];
|
|
9
9
|
current_model?: string;
|
|
10
|
+
default_sonnet_model?: string;
|
|
11
|
+
default_haiku_model?: string;
|
|
12
|
+
default_opus_model?: string;
|
|
10
13
|
created_at: string;
|
|
11
14
|
updated_at: string;
|
|
12
15
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExJ,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,oBAAoB,CAAC,EAAE,M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