@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/types.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI Types
|
|
3
|
+
*/
|
|
4
|
+
export type LLMProvider = 'anthropic' | 'google' | 'openai' | 'together' | 'openrouter' | 'groq' | 'fireworks' | 'mistral' | 'ollama' | 'ai21' | 'huggingface' | 'litellm' | 'auto';
|
|
5
|
+
export type AgentPersona = 'calliope' | 'professional' | 'minimal';
|
|
6
|
+
export interface Message {
|
|
7
|
+
role: 'user' | 'assistant' | 'system' | 'tool';
|
|
8
|
+
content: string;
|
|
9
|
+
toolCallId?: string;
|
|
10
|
+
toolCalls?: ToolCall[];
|
|
11
|
+
}
|
|
12
|
+
export interface ToolCall {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
arguments: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ToolResult {
|
|
18
|
+
toolCallId: string;
|
|
19
|
+
result: string;
|
|
20
|
+
isError?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface Tool {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
parameters: {
|
|
26
|
+
type: 'object';
|
|
27
|
+
properties: Record<string, {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
enum?: string[];
|
|
31
|
+
}>;
|
|
32
|
+
required?: string[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface LLMResponse {
|
|
36
|
+
content: string;
|
|
37
|
+
toolCalls?: ToolCall[];
|
|
38
|
+
finishReason: 'stop' | 'tool_use' | 'length' | 'error';
|
|
39
|
+
usage?: {
|
|
40
|
+
inputTokens: number;
|
|
41
|
+
outputTokens: number;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const DEFAULT_MODELS: Record<LLMProvider, string>;
|
|
45
|
+
export declare const PERSONA_PROMPTS: Record<AgentPersona, string>;
|
|
46
|
+
export declare function getSystemPrompt(persona: AgentPersona): string;
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC;AACpL,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,cAAc,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EAAE,MAAM,CAqCxD,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAE7D"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI Types
|
|
3
|
+
*/
|
|
4
|
+
// Default models for each provider
|
|
5
|
+
export const DEFAULT_MODELS = {
|
|
6
|
+
anthropic: 'claude-sonnet-4-20250514',
|
|
7
|
+
google: 'gemini-2.0-flash',
|
|
8
|
+
openai: 'gpt-4o',
|
|
9
|
+
together: 'meta-llama/Llama-3.3-70B-Instruct-Turbo',
|
|
10
|
+
openrouter: 'anthropic/claude-sonnet-4',
|
|
11
|
+
groq: 'llama-3.3-70b-versatile',
|
|
12
|
+
fireworks: 'accounts/fireworks/models/llama-v3p3-70b-instruct',
|
|
13
|
+
mistral: 'mistral-large-latest',
|
|
14
|
+
ollama: 'llama3.3',
|
|
15
|
+
ai21: 'jamba-1.5-large',
|
|
16
|
+
huggingface: 'meta-llama/Llama-3.3-70B-Instruct',
|
|
17
|
+
litellm: 'gpt-4o', // LiteLLM proxies to other providers
|
|
18
|
+
auto: 'claude-sonnet-4-20250514',
|
|
19
|
+
};
|
|
20
|
+
// System prompts for different personas
|
|
21
|
+
export const PERSONA_PROMPTS = {
|
|
22
|
+
calliope: `You are Calliope, the Muse of Digital Eloquence.
|
|
23
|
+
|
|
24
|
+
You weave code and prose together with artistry. Your responses blend technical precision with creative flair.
|
|
25
|
+
Speak with warmth and occasional poetic flourishes, but never sacrifice clarity for style.
|
|
26
|
+
|
|
27
|
+
You have access to powerful tools:
|
|
28
|
+
- Shell commands for system operations
|
|
29
|
+
- File reading and writing
|
|
30
|
+
- Think tool for reasoning through complex problems
|
|
31
|
+
|
|
32
|
+
When approaching tasks:
|
|
33
|
+
1. Consider the elegance of the solution, not just its function
|
|
34
|
+
2. Break complex work into harmonious steps using the think tool
|
|
35
|
+
3. Execute directly with shell and file tools
|
|
36
|
+
4. Illuminate your reasoning - show the art behind the craft
|
|
37
|
+
|
|
38
|
+
Be thoughtful, thorough, and occasionally delightful.`,
|
|
39
|
+
professional: `You are Calliope, an AI assistant for software development.
|
|
40
|
+
|
|
41
|
+
You have access to tools for:
|
|
42
|
+
- Executing shell commands
|
|
43
|
+
- Reading and writing files
|
|
44
|
+
- Think tool for reasoning through problems
|
|
45
|
+
|
|
46
|
+
When users ask you to do tasks:
|
|
47
|
+
1. Use think tool to plan complex tasks
|
|
48
|
+
2. Execute directly with shell and file tools
|
|
49
|
+
3. Explain what you're doing clearly
|
|
50
|
+
|
|
51
|
+
Be concise but thorough. Show your work.`,
|
|
52
|
+
minimal: `You are Calliope.
|
|
53
|
+
|
|
54
|
+
Tools: shell, files, think.
|
|
55
|
+
Be extremely concise. Execute tasks efficiently.`,
|
|
56
|
+
};
|
|
57
|
+
export function getSystemPrompt(persona) {
|
|
58
|
+
return PERSONA_PROMPTS[persona];
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgDH,mCAAmC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAgC;IACzD,SAAS,EAAE,0BAA0B;IACrC,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,yCAAyC;IACnD,UAAU,EAAE,2BAA2B;IACvC,IAAI,EAAE,yBAAyB;IAC/B,SAAS,EAAE,mDAAmD;IAC9D,OAAO,EAAE,sBAAsB;IAC/B,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mCAAmC;IAChD,OAAO,EAAE,QAAQ,EAAG,qCAAqC;IACzD,IAAI,EAAE,0BAA0B;CACjC,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAiC;IAC3D,QAAQ,EAAE;;;;;;;;;;;;;;;;sDAgB0C;IAEpD,YAAY,EAAE;;;;;;;;;;;;yCAYyB;IAEvC,OAAO,EAAE;;;iDAGsC;CAChD,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,OAAqB;IACnD,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@calliopelabs/cli",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Calliope - Multi-model AI agent CLI with Ralph Wiggum autonomous loops",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"agent",
|
|
8
|
+
"cli",
|
|
9
|
+
"llm",
|
|
10
|
+
"anthropic",
|
|
11
|
+
"claude",
|
|
12
|
+
"gemini",
|
|
13
|
+
"openai",
|
|
14
|
+
"terminal",
|
|
15
|
+
"calliope",
|
|
16
|
+
"agentic"
|
|
17
|
+
],
|
|
18
|
+
"author": "Calliope Labs Inc",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/calliopeai/calliope-cli.git"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/calliopeai/calliope-cli#readme",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/calliopeai/calliope-cli/issues"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "dist/index.js",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
31
|
+
"bin": {
|
|
32
|
+
"calliope": "dist/bin.js"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc",
|
|
40
|
+
"dev": "tsc --watch",
|
|
41
|
+
"start": "node dist/bin.js",
|
|
42
|
+
"prepublishOnly": "npm run build"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@anthropic-ai/sdk": "^0.39.0",
|
|
46
|
+
"@google/generative-ai": "^0.21.0",
|
|
47
|
+
"@inquirer/prompts": "^7.2.0",
|
|
48
|
+
"conf": "^13.0.1",
|
|
49
|
+
"openai": "^4.77.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^22.10.2",
|
|
53
|
+
"typescript": "^5.7.2"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
}
|
|
58
|
+
}
|