@calliopelabs/cli 0.1.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/LICENSE +21 -0
- package/README.md +222 -0
- package/dist/bin.d.ts +10 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +156 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +446 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +79 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +181 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/providers.d.ts +19 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +383 -0
- package/dist/providers.js.map +1 -0
- package/dist/setup.d.ts +15 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +286 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools.d.ts +15 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +281 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +60 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -0
package/dist/config.js
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI Configuration
|
|
3
|
+
*
|
|
4
|
+
* Manages user preferences and API keys using the conf package.
|
|
5
|
+
* Config is stored in ~/.config/calliope/config.json (or platform equivalent)
|
|
6
|
+
*/
|
|
7
|
+
import Conf from 'conf';
|
|
8
|
+
const DEFAULT_CONFIG = {
|
|
9
|
+
setupComplete: false,
|
|
10
|
+
defaultProvider: 'auto',
|
|
11
|
+
persona: 'calliope',
|
|
12
|
+
maxIterations: 20,
|
|
13
|
+
fancyOutput: true,
|
|
14
|
+
autoSaveHistory: true,
|
|
15
|
+
};
|
|
16
|
+
// Create config store
|
|
17
|
+
const config = new Conf({
|
|
18
|
+
projectName: 'calliope',
|
|
19
|
+
defaults: DEFAULT_CONFIG,
|
|
20
|
+
schema: {
|
|
21
|
+
setupComplete: { type: 'boolean' },
|
|
22
|
+
defaultProvider: { type: 'string' },
|
|
23
|
+
defaultModel: { type: 'string' },
|
|
24
|
+
anthropicApiKey: { type: 'string' },
|
|
25
|
+
googleApiKey: { type: 'string' },
|
|
26
|
+
openaiApiKey: { type: 'string' },
|
|
27
|
+
togetherApiKey: { type: 'string' },
|
|
28
|
+
openrouterApiKey: { type: 'string' },
|
|
29
|
+
groqApiKey: { type: 'string' },
|
|
30
|
+
fireworksApiKey: { type: 'string' },
|
|
31
|
+
mistralApiKey: { type: 'string' },
|
|
32
|
+
ollamaBaseUrl: { type: 'string' },
|
|
33
|
+
ai21ApiKey: { type: 'string' },
|
|
34
|
+
huggingfaceApiKey: { type: 'string' },
|
|
35
|
+
litellmBaseUrl: { type: 'string' },
|
|
36
|
+
litellmApiKey: { type: 'string' },
|
|
37
|
+
persona: { type: 'string', enum: ['calliope', 'professional', 'minimal'] },
|
|
38
|
+
maxIterations: { type: 'number', minimum: 1, maximum: 100 },
|
|
39
|
+
fancyOutput: { type: 'boolean' },
|
|
40
|
+
autoSaveHistory: { type: 'boolean' },
|
|
41
|
+
workspaceRoot: { type: 'string' },
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Get the full config object
|
|
46
|
+
*/
|
|
47
|
+
export function getConfig() {
|
|
48
|
+
return config.store;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get a specific config value
|
|
52
|
+
*/
|
|
53
|
+
export function get(key) {
|
|
54
|
+
return config.get(key);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Set a config value
|
|
58
|
+
*/
|
|
59
|
+
export function set(key, value) {
|
|
60
|
+
config.set(key, value);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Set multiple config values
|
|
64
|
+
*/
|
|
65
|
+
export function setMultiple(values) {
|
|
66
|
+
for (const [key, value] of Object.entries(values)) {
|
|
67
|
+
config.set(key, value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Check if setup is complete
|
|
72
|
+
*/
|
|
73
|
+
export function isSetupComplete() {
|
|
74
|
+
return config.get('setupComplete') === true;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Mark setup as complete
|
|
78
|
+
*/
|
|
79
|
+
export function markSetupComplete() {
|
|
80
|
+
config.set('setupComplete', true);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get config file path (for display to user)
|
|
84
|
+
*/
|
|
85
|
+
export function getConfigPath() {
|
|
86
|
+
return config.path;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Reset config to defaults
|
|
90
|
+
*/
|
|
91
|
+
export function resetConfig() {
|
|
92
|
+
config.clear();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Check which providers have API keys configured
|
|
96
|
+
*/
|
|
97
|
+
export function getConfiguredProviders() {
|
|
98
|
+
const providers = [];
|
|
99
|
+
if (config.get('anthropicApiKey'))
|
|
100
|
+
providers.push('anthropic');
|
|
101
|
+
if (config.get('googleApiKey'))
|
|
102
|
+
providers.push('google');
|
|
103
|
+
if (config.get('openaiApiKey'))
|
|
104
|
+
providers.push('openai');
|
|
105
|
+
if (config.get('togetherApiKey'))
|
|
106
|
+
providers.push('together');
|
|
107
|
+
if (config.get('openrouterApiKey'))
|
|
108
|
+
providers.push('openrouter');
|
|
109
|
+
if (config.get('groqApiKey'))
|
|
110
|
+
providers.push('groq');
|
|
111
|
+
if (config.get('fireworksApiKey'))
|
|
112
|
+
providers.push('fireworks');
|
|
113
|
+
if (config.get('mistralApiKey'))
|
|
114
|
+
providers.push('mistral');
|
|
115
|
+
if (config.get('ollamaBaseUrl'))
|
|
116
|
+
providers.push('ollama');
|
|
117
|
+
if (config.get('ai21ApiKey'))
|
|
118
|
+
providers.push('ai21');
|
|
119
|
+
if (config.get('huggingfaceApiKey'))
|
|
120
|
+
providers.push('huggingface');
|
|
121
|
+
if (config.get('litellmBaseUrl'))
|
|
122
|
+
providers.push('litellm');
|
|
123
|
+
return providers;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get API key for a provider
|
|
127
|
+
*/
|
|
128
|
+
export function getApiKey(provider) {
|
|
129
|
+
const keyMap = {
|
|
130
|
+
anthropic: 'anthropicApiKey',
|
|
131
|
+
google: 'googleApiKey',
|
|
132
|
+
openai: 'openaiApiKey',
|
|
133
|
+
together: 'togetherApiKey',
|
|
134
|
+
openrouter: 'openrouterApiKey',
|
|
135
|
+
groq: 'groqApiKey',
|
|
136
|
+
fireworks: 'fireworksApiKey',
|
|
137
|
+
mistral: 'mistralApiKey',
|
|
138
|
+
ollama: 'ollamaBaseUrl', // Returns base URL for Ollama
|
|
139
|
+
ai21: 'ai21ApiKey',
|
|
140
|
+
huggingface: 'huggingfaceApiKey',
|
|
141
|
+
litellm: 'litellmApiKey',
|
|
142
|
+
auto: undefined,
|
|
143
|
+
};
|
|
144
|
+
const key = keyMap[provider];
|
|
145
|
+
if (!key)
|
|
146
|
+
return undefined;
|
|
147
|
+
// Check environment variable first, then config
|
|
148
|
+
const envMap = {
|
|
149
|
+
anthropicApiKey: 'ANTHROPIC_API_KEY',
|
|
150
|
+
googleApiKey: 'GOOGLE_API_KEY',
|
|
151
|
+
openaiApiKey: 'OPENAI_API_KEY',
|
|
152
|
+
togetherApiKey: 'TOGETHER_API_KEY',
|
|
153
|
+
openrouterApiKey: 'OPENROUTER_API_KEY',
|
|
154
|
+
groqApiKey: 'GROQ_API_KEY',
|
|
155
|
+
fireworksApiKey: 'FIREWORKS_API_KEY',
|
|
156
|
+
mistralApiKey: 'MISTRAL_API_KEY',
|
|
157
|
+
ollamaBaseUrl: 'OLLAMA_BASE_URL',
|
|
158
|
+
ai21ApiKey: 'AI21_API_KEY',
|
|
159
|
+
huggingfaceApiKey: 'HUGGINGFACE_API_KEY',
|
|
160
|
+
litellmApiKey: 'LITELLM_API_KEY',
|
|
161
|
+
};
|
|
162
|
+
const envVar = envMap[key];
|
|
163
|
+
if (envVar && process.env[envVar]) {
|
|
164
|
+
return process.env[envVar];
|
|
165
|
+
}
|
|
166
|
+
return config.get(key);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get base URL for a provider (for Ollama/LiteLLM)
|
|
170
|
+
*/
|
|
171
|
+
export function getBaseUrl(provider) {
|
|
172
|
+
if (provider === 'ollama') {
|
|
173
|
+
return process.env.OLLAMA_BASE_URL || config.get('ollamaBaseUrl') || 'http://localhost:11434';
|
|
174
|
+
}
|
|
175
|
+
if (provider === 'litellm') {
|
|
176
|
+
return process.env.LITELLM_BASE_URL || config.get('litellmBaseUrl') || 'http://localhost:4000';
|
|
177
|
+
}
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
export default config;
|
|
181
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAsCxB,MAAM,cAAc,GAAmB;IACrC,aAAa,EAAE,KAAK;IACpB,eAAe,EAAE,MAAM;IACvB,OAAO,EAAE,UAAU;IACnB,aAAa,EAAE,EAAE;IACjB,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,IAAI;CACtB,CAAC;AAEF,sBAAsB;AACtB,MAAM,MAAM,GAAG,IAAI,IAAI,CAAiB;IACtC,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAClC,eAAe,EAAE,EAAE,IA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B,CAAC;AAED,eAAe,MAAM,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI
|
|
3
|
+
*
|
|
4
|
+
* Multi-model AI agent CLI with Ralph Wiggum autonomous loops.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export { getConfig, get, set, setMultiple, isSetupComplete, markSetupComplete, getConfigPath, resetConfig, getConfiguredProviders, getApiKey, getBaseUrl, CalliopeConfig, } from './config.js';
|
|
9
|
+
export * from './providers.js';
|
|
10
|
+
export * from './tools.js';
|
|
11
|
+
export * from './types.js';
|
|
12
|
+
export { startCLI } from './cli.js';
|
|
13
|
+
export { runSetup, reconfigure } from './setup.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,SAAS,EACT,GAAG,EACH,GAAG,EACH,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI
|
|
3
|
+
*
|
|
4
|
+
* Multi-model AI agent CLI with Ralph Wiggum autonomous loops.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
// Re-export from config (excluding types that are in types.ts)
|
|
9
|
+
export { getConfig, get, set, setMultiple, isSetupComplete, markSetupComplete, getConfigPath, resetConfig, getConfiguredProviders, getApiKey, getBaseUrl, } from './config.js';
|
|
10
|
+
export * from './providers.js';
|
|
11
|
+
export * from './tools.js';
|
|
12
|
+
export * from './types.js';
|
|
13
|
+
export { startCLI } from './cli.js';
|
|
14
|
+
export { runSetup, reconfigure } from './setup.js';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+DAA+D;AAC/D,OAAO,EACL,SAAS,EACT,GAAG,EACH,GAAG,EACH,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,SAAS,EACT,UAAU,GAEX,MAAM,aAAa,CAAC;AACrB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI - LLM Providers
|
|
3
|
+
*
|
|
4
|
+
* Handles communication with different LLM providers.
|
|
5
|
+
*/
|
|
6
|
+
import type { Message, Tool, LLMResponse, LLMProvider } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Get available providers based on configured API keys
|
|
9
|
+
*/
|
|
10
|
+
export declare function getAvailableProviders(): LLMProvider[];
|
|
11
|
+
/**
|
|
12
|
+
* Select the best available provider
|
|
13
|
+
*/
|
|
14
|
+
export declare function selectProvider(preferred: LLMProvider): LLMProvider;
|
|
15
|
+
/**
|
|
16
|
+
* Chat with the selected provider
|
|
17
|
+
*/
|
|
18
|
+
export declare function chat(provider: LLMProvider, messages: Message[], tools: Tool[], model?: string): Promise<LLMResponse>;
|
|
19
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAY,WAAW,EAAE,MAAM,YAAY,CAAC;AA0FpF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAgBrD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,CAuBlE;AAED;;GAEG;AACH,wBAAsB,IAAI,CACxB,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,EAAE,IAAI,EAAE,EACb,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC,CAwBtB"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI - LLM Providers
|
|
3
|
+
*
|
|
4
|
+
* Handles communication with different LLM providers.
|
|
5
|
+
*/
|
|
6
|
+
import Anthropic from '@anthropic-ai/sdk';
|
|
7
|
+
import { GoogleGenerativeAI } from '@google/generative-ai';
|
|
8
|
+
import OpenAI from 'openai';
|
|
9
|
+
import * as config from './config.js';
|
|
10
|
+
import { DEFAULT_MODELS } from './types.js';
|
|
11
|
+
// Constants
|
|
12
|
+
const MAX_TOKENS = 8192;
|
|
13
|
+
// API base URLs for OpenAI-compatible providers
|
|
14
|
+
const PROVIDER_BASE_URLS = {
|
|
15
|
+
openrouter: 'https://openrouter.ai/api/v1',
|
|
16
|
+
together: 'https://api.together.xyz/v1',
|
|
17
|
+
groq: 'https://api.groq.com/openai/v1',
|
|
18
|
+
fireworks: 'https://api.fireworks.ai/inference/v1',
|
|
19
|
+
mistral: 'https://api.mistral.ai/v1',
|
|
20
|
+
ai21: 'https://api.ai21.com/studio/v1',
|
|
21
|
+
huggingface: 'https://api-inference.huggingface.co/v1',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Convert messages to OpenAI format
|
|
25
|
+
*/
|
|
26
|
+
function toOpenAIMessages(messages) {
|
|
27
|
+
return messages.map(m => {
|
|
28
|
+
if (m.role === 'tool') {
|
|
29
|
+
return {
|
|
30
|
+
role: 'tool',
|
|
31
|
+
tool_call_id: m.toolCallId || '',
|
|
32
|
+
content: m.content,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (m.toolCalls && m.toolCalls.length > 0) {
|
|
36
|
+
return {
|
|
37
|
+
role: 'assistant',
|
|
38
|
+
content: m.content || null,
|
|
39
|
+
tool_calls: m.toolCalls.map(tc => ({
|
|
40
|
+
id: tc.id,
|
|
41
|
+
type: 'function',
|
|
42
|
+
function: {
|
|
43
|
+
name: tc.name,
|
|
44
|
+
arguments: JSON.stringify(tc.arguments),
|
|
45
|
+
},
|
|
46
|
+
})),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
role: m.role,
|
|
51
|
+
content: m.content,
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Convert tools to OpenAI format
|
|
57
|
+
*/
|
|
58
|
+
function toOpenAITools(tools) {
|
|
59
|
+
return tools.map(t => ({
|
|
60
|
+
type: 'function',
|
|
61
|
+
function: {
|
|
62
|
+
name: t.name,
|
|
63
|
+
description: t.description,
|
|
64
|
+
parameters: t.parameters,
|
|
65
|
+
},
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Parse tool calls from OpenAI response
|
|
70
|
+
*/
|
|
71
|
+
function parseOpenAIToolCalls(toolCalls) {
|
|
72
|
+
if (!toolCalls)
|
|
73
|
+
return [];
|
|
74
|
+
const result = [];
|
|
75
|
+
for (const tc of toolCalls) {
|
|
76
|
+
let parsedArgs = {};
|
|
77
|
+
try {
|
|
78
|
+
parsedArgs = JSON.parse(tc.function.arguments);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
const parseError = error instanceof SyntaxError ? error.message : 'Unknown parse error';
|
|
82
|
+
throw new Error(`Invalid tool arguments from LLM: ${parseError}. Raw: ${tc.function.arguments.substring(0, 200)}`);
|
|
83
|
+
}
|
|
84
|
+
result.push({
|
|
85
|
+
id: tc.id,
|
|
86
|
+
name: tc.function.name,
|
|
87
|
+
arguments: parsedArgs,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get available providers based on configured API keys
|
|
94
|
+
*/
|
|
95
|
+
export function getAvailableProviders() {
|
|
96
|
+
const providers = [];
|
|
97
|
+
if (config.getApiKey('anthropic'))
|
|
98
|
+
providers.push('anthropic');
|
|
99
|
+
if (config.getApiKey('google'))
|
|
100
|
+
providers.push('google');
|
|
101
|
+
if (config.getApiKey('openai'))
|
|
102
|
+
providers.push('openai');
|
|
103
|
+
if (config.getApiKey('openrouter'))
|
|
104
|
+
providers.push('openrouter');
|
|
105
|
+
if (config.getApiKey('together'))
|
|
106
|
+
providers.push('together');
|
|
107
|
+
if (config.getApiKey('groq'))
|
|
108
|
+
providers.push('groq');
|
|
109
|
+
if (config.getApiKey('mistral'))
|
|
110
|
+
providers.push('mistral');
|
|
111
|
+
if (config.getBaseUrl('ollama'))
|
|
112
|
+
providers.push('ollama');
|
|
113
|
+
if (config.getApiKey('ai21'))
|
|
114
|
+
providers.push('ai21');
|
|
115
|
+
if (config.getApiKey('huggingface'))
|
|
116
|
+
providers.push('huggingface');
|
|
117
|
+
if (config.getBaseUrl('litellm'))
|
|
118
|
+
providers.push('litellm');
|
|
119
|
+
return providers;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Select the best available provider
|
|
123
|
+
*/
|
|
124
|
+
export function selectProvider(preferred) {
|
|
125
|
+
if (preferred !== 'auto') {
|
|
126
|
+
// For Ollama/LiteLLM, check base URL instead of API key
|
|
127
|
+
if (preferred === 'ollama' || preferred === 'litellm') {
|
|
128
|
+
if (config.getBaseUrl(preferred))
|
|
129
|
+
return preferred;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const key = config.getApiKey(preferred);
|
|
133
|
+
if (key)
|
|
134
|
+
return preferred;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// Auto-select: prefer Anthropic > OpenAI > Google > others
|
|
138
|
+
const priority = ['anthropic', 'openai', 'google', 'mistral', 'openrouter', 'together', 'groq', 'ollama', 'litellm'];
|
|
139
|
+
for (const p of priority) {
|
|
140
|
+
if (p === 'ollama' || p === 'litellm') {
|
|
141
|
+
if (config.getBaseUrl(p))
|
|
142
|
+
return p;
|
|
143
|
+
}
|
|
144
|
+
else if (config.getApiKey(p)) {
|
|
145
|
+
return p;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
throw new Error('No API keys configured. Run `calliope --setup` to configure.');
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Chat with the selected provider
|
|
152
|
+
*/
|
|
153
|
+
export async function chat(provider, messages, tools, model) {
|
|
154
|
+
const actualProvider = selectProvider(provider);
|
|
155
|
+
const actualModel = model || DEFAULT_MODELS[actualProvider];
|
|
156
|
+
switch (actualProvider) {
|
|
157
|
+
case 'anthropic':
|
|
158
|
+
return chatAnthropic(messages, tools, actualModel);
|
|
159
|
+
case 'google':
|
|
160
|
+
return chatGoogle(messages, tools, actualModel);
|
|
161
|
+
case 'openai':
|
|
162
|
+
return chatOpenAI(messages, tools, actualModel);
|
|
163
|
+
case 'openrouter':
|
|
164
|
+
case 'together':
|
|
165
|
+
case 'groq':
|
|
166
|
+
case 'fireworks':
|
|
167
|
+
case 'mistral':
|
|
168
|
+
case 'ai21':
|
|
169
|
+
case 'huggingface':
|
|
170
|
+
case 'ollama':
|
|
171
|
+
case 'litellm':
|
|
172
|
+
return chatOpenAICompatible(actualProvider, messages, tools, actualModel);
|
|
173
|
+
default:
|
|
174
|
+
throw new Error(`Provider ${actualProvider} not implemented`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Chat with Anthropic Claude
|
|
179
|
+
*/
|
|
180
|
+
async function chatAnthropic(messages, tools, model) {
|
|
181
|
+
const apiKey = config.getApiKey('anthropic');
|
|
182
|
+
if (!apiKey)
|
|
183
|
+
throw new Error('Anthropic API key not configured');
|
|
184
|
+
const client = new Anthropic({ apiKey });
|
|
185
|
+
// Extract system message
|
|
186
|
+
const systemMessage = messages.find(m => m.role === 'system');
|
|
187
|
+
const chatMessages = messages.filter(m => m.role !== 'system');
|
|
188
|
+
// Convert to Anthropic format
|
|
189
|
+
const anthropicMessages = chatMessages.map(m => {
|
|
190
|
+
if (m.role === 'tool') {
|
|
191
|
+
return {
|
|
192
|
+
role: 'user',
|
|
193
|
+
content: [{
|
|
194
|
+
type: 'tool_result',
|
|
195
|
+
tool_use_id: m.toolCallId || '',
|
|
196
|
+
content: m.content,
|
|
197
|
+
}],
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (m.toolCalls && m.toolCalls.length > 0) {
|
|
201
|
+
return {
|
|
202
|
+
role: 'assistant',
|
|
203
|
+
content: [
|
|
204
|
+
...(m.content ? [{ type: 'text', text: m.content }] : []),
|
|
205
|
+
...m.toolCalls.map(tc => ({
|
|
206
|
+
type: 'tool_use',
|
|
207
|
+
id: tc.id,
|
|
208
|
+
name: tc.name,
|
|
209
|
+
input: tc.arguments,
|
|
210
|
+
})),
|
|
211
|
+
],
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
return {
|
|
215
|
+
role: m.role,
|
|
216
|
+
content: m.content,
|
|
217
|
+
};
|
|
218
|
+
});
|
|
219
|
+
// Convert tools to Anthropic format
|
|
220
|
+
const anthropicTools = tools.map(t => ({
|
|
221
|
+
name: t.name,
|
|
222
|
+
description: t.description,
|
|
223
|
+
input_schema: t.parameters,
|
|
224
|
+
}));
|
|
225
|
+
const response = await client.messages.create({
|
|
226
|
+
model,
|
|
227
|
+
max_tokens: MAX_TOKENS,
|
|
228
|
+
system: systemMessage?.content || '',
|
|
229
|
+
messages: anthropicMessages,
|
|
230
|
+
tools: anthropicTools.length > 0 ? anthropicTools : undefined,
|
|
231
|
+
});
|
|
232
|
+
// Parse response
|
|
233
|
+
let content = '';
|
|
234
|
+
const toolCalls = [];
|
|
235
|
+
for (const block of response.content) {
|
|
236
|
+
if (block.type === 'text') {
|
|
237
|
+
content += block.text;
|
|
238
|
+
}
|
|
239
|
+
else if (block.type === 'tool_use') {
|
|
240
|
+
toolCalls.push({
|
|
241
|
+
id: block.id,
|
|
242
|
+
name: block.name,
|
|
243
|
+
arguments: block.input,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
content,
|
|
249
|
+
toolCalls: toolCalls.length > 0 ? toolCalls : undefined,
|
|
250
|
+
finishReason: response.stop_reason === 'tool_use' ? 'tool_use' : 'stop',
|
|
251
|
+
usage: {
|
|
252
|
+
inputTokens: response.usage.input_tokens,
|
|
253
|
+
outputTokens: response.usage.output_tokens,
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Chat with Google Gemini
|
|
259
|
+
*/
|
|
260
|
+
async function chatGoogle(messages, tools, model) {
|
|
261
|
+
const apiKey = config.getApiKey('google');
|
|
262
|
+
if (!apiKey)
|
|
263
|
+
throw new Error('Google API key not configured');
|
|
264
|
+
const genAI = new GoogleGenerativeAI(apiKey);
|
|
265
|
+
const genModel = genAI.getGenerativeModel({ model });
|
|
266
|
+
// Build history (exclude last message)
|
|
267
|
+
const history = messages.slice(0, -1).filter(m => m.role !== 'system').map(m => ({
|
|
268
|
+
role: m.role === 'assistant' ? 'model' : 'user',
|
|
269
|
+
parts: [{ text: m.content }],
|
|
270
|
+
}));
|
|
271
|
+
if (messages.length === 0) {
|
|
272
|
+
throw new Error('No messages provided');
|
|
273
|
+
}
|
|
274
|
+
const lastMessage = messages[messages.length - 1];
|
|
275
|
+
const systemMessage = messages.find(m => m.role === 'system');
|
|
276
|
+
const chat = genModel.startChat({
|
|
277
|
+
history,
|
|
278
|
+
systemInstruction: systemMessage?.content,
|
|
279
|
+
});
|
|
280
|
+
const result = await chat.sendMessage(lastMessage.content);
|
|
281
|
+
const response = result.response;
|
|
282
|
+
const text = response.text();
|
|
283
|
+
// Check for function calls
|
|
284
|
+
const toolCalls = [];
|
|
285
|
+
const candidates = response.candidates || [];
|
|
286
|
+
for (const candidate of candidates) {
|
|
287
|
+
for (const part of candidate.content?.parts || []) {
|
|
288
|
+
if ('functionCall' in part && part.functionCall) {
|
|
289
|
+
toolCalls.push({
|
|
290
|
+
id: `gemini_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
291
|
+
name: part.functionCall.name,
|
|
292
|
+
arguments: part.functionCall.args,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
content: text,
|
|
299
|
+
toolCalls: toolCalls.length > 0 ? toolCalls : undefined,
|
|
300
|
+
finishReason: toolCalls.length > 0 ? 'tool_use' : 'stop',
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Chat with OpenAI
|
|
305
|
+
*/
|
|
306
|
+
async function chatOpenAI(messages, tools, model) {
|
|
307
|
+
const apiKey = config.getApiKey('openai');
|
|
308
|
+
if (!apiKey)
|
|
309
|
+
throw new Error('OpenAI API key not configured');
|
|
310
|
+
const client = new OpenAI({ apiKey });
|
|
311
|
+
const openaiMessages = toOpenAIMessages(messages);
|
|
312
|
+
const openaiTools = toOpenAITools(tools);
|
|
313
|
+
const response = await client.chat.completions.create({
|
|
314
|
+
model,
|
|
315
|
+
messages: openaiMessages,
|
|
316
|
+
tools: openaiTools.length > 0 ? openaiTools : undefined,
|
|
317
|
+
max_tokens: MAX_TOKENS,
|
|
318
|
+
});
|
|
319
|
+
if (!response.choices || response.choices.length === 0) {
|
|
320
|
+
throw new Error('Empty response from OpenAI API');
|
|
321
|
+
}
|
|
322
|
+
const choice = response.choices[0];
|
|
323
|
+
const message = choice.message;
|
|
324
|
+
const toolCalls = parseOpenAIToolCalls(message.tool_calls);
|
|
325
|
+
return {
|
|
326
|
+
content: message.content || '',
|
|
327
|
+
toolCalls: toolCalls.length > 0 ? toolCalls : undefined,
|
|
328
|
+
finishReason: choice.finish_reason === 'tool_calls' ? 'tool_use' : 'stop',
|
|
329
|
+
usage: response.usage ? {
|
|
330
|
+
inputTokens: response.usage.prompt_tokens,
|
|
331
|
+
outputTokens: response.usage.completion_tokens,
|
|
332
|
+
} : undefined,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Chat with OpenAI-compatible APIs (OpenRouter, Together, Groq, Mistral, etc.)
|
|
337
|
+
*/
|
|
338
|
+
async function chatOpenAICompatible(provider, messages, tools, model) {
|
|
339
|
+
// Ollama and LiteLLM use base URL, others use API key
|
|
340
|
+
let apiKey;
|
|
341
|
+
let baseURL;
|
|
342
|
+
if (provider === 'ollama') {
|
|
343
|
+
baseURL = config.getBaseUrl('ollama') || 'http://localhost:11434/v1';
|
|
344
|
+
apiKey = 'ollama'; // Ollama doesn't require a real API key
|
|
345
|
+
}
|
|
346
|
+
else if (provider === 'litellm') {
|
|
347
|
+
baseURL = config.getBaseUrl('litellm') || 'http://localhost:4000/v1';
|
|
348
|
+
apiKey = config.getApiKey('litellm') || 'litellm'; // LiteLLM may or may not require key
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
apiKey = config.getApiKey(provider);
|
|
352
|
+
if (!apiKey)
|
|
353
|
+
throw new Error(`${provider} API key not configured`);
|
|
354
|
+
baseURL = PROVIDER_BASE_URLS[provider];
|
|
355
|
+
if (!baseURL)
|
|
356
|
+
throw new Error(`Unknown provider: ${provider}`);
|
|
357
|
+
}
|
|
358
|
+
const client = new OpenAI({ apiKey, baseURL });
|
|
359
|
+
const openaiMessages = toOpenAIMessages(messages);
|
|
360
|
+
const openaiTools = toOpenAITools(tools);
|
|
361
|
+
const response = await client.chat.completions.create({
|
|
362
|
+
model,
|
|
363
|
+
messages: openaiMessages,
|
|
364
|
+
tools: openaiTools.length > 0 ? openaiTools : undefined,
|
|
365
|
+
max_tokens: MAX_TOKENS,
|
|
366
|
+
});
|
|
367
|
+
if (!response.choices || response.choices.length === 0) {
|
|
368
|
+
throw new Error(`Empty response from ${provider} API`);
|
|
369
|
+
}
|
|
370
|
+
const choice = response.choices[0];
|
|
371
|
+
const message = choice.message;
|
|
372
|
+
const toolCalls = parseOpenAIToolCalls(message.tool_calls);
|
|
373
|
+
return {
|
|
374
|
+
content: message.content || '',
|
|
375
|
+
toolCalls: toolCalls.length > 0 ? toolCalls : undefined,
|
|
376
|
+
finishReason: choice.finish_reason === 'tool_calls' ? 'tool_use' : 'stop',
|
|
377
|
+
usage: response.usage ? {
|
|
378
|
+
inputTokens: response.usage.prompt_tokens,
|
|
379
|
+
outputTokens: response.usage.completion_tokens,
|
|
380
|
+
} : undefined,
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,YAAY;AACZ,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,gDAAg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AAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,MAAM,SAAS,GAAG,oBAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3D,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;QAC9B,SAAS,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACvD,YAAY,EAAE,MAAM,CAAC,aAAa,KAAK,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;QACzE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YACtB,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa;YACzC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB;SAC/C,CAAC,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC"}
|
package/dist/setup.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI Setup Wizard
|
|
3
|
+
*
|
|
4
|
+
* Interactive first-run setup for API keys and preferences.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Run the setup wizard
|
|
8
|
+
*/
|
|
9
|
+
export declare function runSetup(force?: boolean): Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Quick reconfigure (for /setup command)
|
|
12
|
+
*/
|
|
13
|
+
export declare function reconfigure(): Promise<void>;
|
|
14
|
+
export default runSetup;
|
|
15
|
+
//# sourceMappingURL=setup.d.ts.map
|