oroute-cli 0.1.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/dist/agent.d.ts +11 -0
- package/dist/agent.js +569 -0
- package/dist/agent.js.map +1 -0
- package/dist/commands.d.ts +24 -0
- package/dist/commands.js +173 -0
- package/dist/commands.js.map +1 -0
- package/dist/context.d.ts +13 -0
- package/dist/context.js +110 -0
- package/dist/context.js.map +1 -0
- package/dist/cost.d.ts +18 -0
- package/dist/cost.js +80 -0
- package/dist/cost.js.map +1 -0
- package/dist/history.d.ts +20 -0
- package/dist/history.js +49 -0
- package/dist/history.js.map +1 -0
- package/dist/hooks.d.ts +13 -0
- package/dist/hooks.js +101 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +475 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown.d.ts +4 -0
- package/dist/markdown.js +126 -0
- package/dist/markdown.js.map +1 -0
- package/dist/memory.d.ts +27 -0
- package/dist/memory.js +208 -0
- package/dist/memory.js.map +1 -0
- package/dist/session.d.ts +43 -0
- package/dist/session.js +166 -0
- package/dist/session.js.map +1 -0
- package/dist/streaming.d.ts +27 -0
- package/dist/streaming.js +201 -0
- package/dist/streaming.js.map +1 -0
- package/dist/tools/editFile.d.ts +34 -0
- package/dist/tools/editFile.js +40 -0
- package/dist/tools/editFile.js.map +1 -0
- package/dist/tools/executeCommand.d.ts +32 -0
- package/dist/tools/executeCommand.js +75 -0
- package/dist/tools/executeCommand.js.map +1 -0
- package/dist/tools/glob.d.ts +24 -0
- package/dist/tools/glob.js +128 -0
- package/dist/tools/glob.js.map +1 -0
- package/dist/tools/index.d.ts +40 -0
- package/dist/tools/index.js +28 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/listDirectory.d.ts +23 -0
- package/dist/tools/listDirectory.js +57 -0
- package/dist/tools/listDirectory.js.map +1 -0
- package/dist/tools/notebook.d.ts +7 -0
- package/dist/tools/notebook.js +76 -0
- package/dist/tools/notebook.js.map +1 -0
- package/dist/tools/readFile.d.ts +28 -0
- package/dist/tools/readFile.js +40 -0
- package/dist/tools/readFile.js.map +1 -0
- package/dist/tools/readImage.d.ts +25 -0
- package/dist/tools/readImage.js +52 -0
- package/dist/tools/readImage.js.map +1 -0
- package/dist/tools/searchFiles.d.ts +33 -0
- package/dist/tools/searchFiles.js +95 -0
- package/dist/tools/searchFiles.js.map +1 -0
- package/dist/tools/writeFile.d.ts +30 -0
- package/dist/tools/writeFile.js +54 -0
- package/dist/tools/writeFile.js.map +1 -0
- package/dist/ui.d.ts +30 -0
- package/dist/ui.js +79 -0
- package/dist/ui.js.map +1 -0
- package/dist/update.d.ts +10 -0
- package/dist/update.js +93 -0
- package/dist/update.js.map +1 -0
- package/package.json +33 -0
package/dist/ui.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI UI utilities — colors, confirmations, spinners.
|
|
3
|
+
*/
|
|
4
|
+
import * as readline from 'node:readline';
|
|
5
|
+
// ANSI colors
|
|
6
|
+
export const GREEN = '\x1b[32m';
|
|
7
|
+
export const GRAY = '\x1b[90m';
|
|
8
|
+
export const BOLD = '\x1b[1m';
|
|
9
|
+
export const DIM = '\x1b[2m';
|
|
10
|
+
export const RESET = '\x1b[0m';
|
|
11
|
+
export const CYAN = '\x1b[36m';
|
|
12
|
+
export const YELLOW = '\x1b[33m';
|
|
13
|
+
export const WHITE = '\x1b[37m';
|
|
14
|
+
export const RED = '\x1b[31m';
|
|
15
|
+
export const MAGENTA = '\x1b[35m';
|
|
16
|
+
export const BLUE = '\x1b[34m';
|
|
17
|
+
export const BG_YELLOW = '\x1b[43m';
|
|
18
|
+
export const BLACK = '\x1b[30m';
|
|
19
|
+
export const TOOL_COLORS = {
|
|
20
|
+
read_file: CYAN,
|
|
21
|
+
write_file: YELLOW,
|
|
22
|
+
execute_command: MAGENTA,
|
|
23
|
+
edit_file: BLUE,
|
|
24
|
+
list_directory: CYAN,
|
|
25
|
+
search_files: GREEN,
|
|
26
|
+
glob: GREEN,
|
|
27
|
+
read_image: CYAN,
|
|
28
|
+
};
|
|
29
|
+
/** Print tool execution header */
|
|
30
|
+
export function printToolUse(toolName, summary) {
|
|
31
|
+
const color = TOOL_COLORS[toolName] ?? GRAY;
|
|
32
|
+
process.stdout.write(`\n${color}[${toolName}]${RESET} ${DIM}${summary}${RESET}\n`);
|
|
33
|
+
}
|
|
34
|
+
/** Print tool result */
|
|
35
|
+
export function printToolResult(content, truncate = 2000) {
|
|
36
|
+
const display = content.length > truncate
|
|
37
|
+
? content.slice(0, truncate) + `\n${DIM}... (${content.length - truncate} chars truncated)${RESET}`
|
|
38
|
+
: content;
|
|
39
|
+
process.stdout.write(`${GRAY}${display}${RESET}\n`);
|
|
40
|
+
}
|
|
41
|
+
/** Print error */
|
|
42
|
+
export function printError(message) {
|
|
43
|
+
console.log(`${RED} ✗ Error: ${message}${RESET}`);
|
|
44
|
+
}
|
|
45
|
+
/** Print success */
|
|
46
|
+
export function printSuccess(message) {
|
|
47
|
+
console.log(`${GREEN} ✓ ${message}${RESET}`);
|
|
48
|
+
}
|
|
49
|
+
/** Ask for user confirmation (y/n) */
|
|
50
|
+
export async function confirm(message) {
|
|
51
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
52
|
+
return new Promise(resolve => {
|
|
53
|
+
rl.question(`${BG_YELLOW}${BLACK} ? ${RESET} ${message} ${GRAY}(y/n)${RESET} `, answer => {
|
|
54
|
+
rl.close();
|
|
55
|
+
resolve(answer.trim().toLowerCase() === 'y');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** Simple spinner */
|
|
60
|
+
export function createSpinner(text) {
|
|
61
|
+
const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
62
|
+
let i = 0;
|
|
63
|
+
const timer = setInterval(() => {
|
|
64
|
+
process.stdout.write(`\r${GRAY} ${frames[i++ % frames.length]} ${text}${RESET}`);
|
|
65
|
+
}, 80);
|
|
66
|
+
return {
|
|
67
|
+
stop(finalText) {
|
|
68
|
+
clearInterval(timer);
|
|
69
|
+
process.stdout.write(`\r${' '.repeat(text.length + 10)}\r`);
|
|
70
|
+
if (finalText)
|
|
71
|
+
console.log(`${GREEN} ✓ ${finalText}${RESET}`);
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** Print streaming text character by character */
|
|
76
|
+
export function writeStream(text) {
|
|
77
|
+
process.stdout.write(text);
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,cAAc;AACd,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC;AAC/B,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC;AACjC,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;AAChC,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAC;AAC9B,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AACpC,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAA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C,CAAC;YAC5D,IAAI,SAAS;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,OAAO,SAAS,GAAG,KAAK,EAAE,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
package/dist/update.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface UpdateCheckResult {
|
|
2
|
+
currentVersion: string;
|
|
3
|
+
latestVersion: string | null;
|
|
4
|
+
updateAvailable: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Check for updates (non-blocking, runs in background) */
|
|
7
|
+
export declare function checkForUpdates(currentVersion: string): void;
|
|
8
|
+
/** Exported for testing */
|
|
9
|
+
export declare function _checkForUpdatesSync(currentVersion: string): UpdateCheckResult;
|
|
10
|
+
export {};
|
package/dist/update.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* C6: Auto-Update — check for newer CLI versions on startup.
|
|
3
|
+
*/
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
import * as os from 'node:os';
|
|
7
|
+
import { execSync } from 'node:child_process';
|
|
8
|
+
import { YELLOW, RESET, GREEN } from './ui.js';
|
|
9
|
+
const UPDATE_CHECK_FILE = path.join(os.homedir(), '.oroute', 'last-update-check');
|
|
10
|
+
const ONE_DAY_MS = 24 * 60 * 60 * 1000;
|
|
11
|
+
/** Check if we should run an update check (at most once per day) */
|
|
12
|
+
function shouldCheck() {
|
|
13
|
+
try {
|
|
14
|
+
if (!fs.existsSync(UPDATE_CHECK_FILE))
|
|
15
|
+
return true;
|
|
16
|
+
const lastCheck = parseInt(fs.readFileSync(UPDATE_CHECK_FILE, 'utf-8').trim(), 10);
|
|
17
|
+
return Date.now() - lastCheck > ONE_DAY_MS;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Save the timestamp of the last update check */
|
|
24
|
+
function saveCheckTimestamp() {
|
|
25
|
+
try {
|
|
26
|
+
const dir = path.dirname(UPDATE_CHECK_FILE);
|
|
27
|
+
if (!fs.existsSync(dir)) {
|
|
28
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
fs.writeFileSync(UPDATE_CHECK_FILE, String(Date.now()));
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// Silent fail
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** Get the latest version from npm registry */
|
|
37
|
+
function getLatestVersion() {
|
|
38
|
+
try {
|
|
39
|
+
const result = execSync('npm view @oroute/cli version 2>/dev/null', {
|
|
40
|
+
encoding: 'utf-8',
|
|
41
|
+
timeout: 5000,
|
|
42
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
43
|
+
});
|
|
44
|
+
return result.trim() || null;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Compare semver versions: returns true if latest > current */
|
|
51
|
+
function isNewer(current, latest) {
|
|
52
|
+
const currentParts = current.split('.').map(Number);
|
|
53
|
+
const latestParts = latest.split('.').map(Number);
|
|
54
|
+
for (let i = 0; i < 3; i++) {
|
|
55
|
+
const c = currentParts[i] ?? 0;
|
|
56
|
+
const l = latestParts[i] ?? 0;
|
|
57
|
+
if (l > c)
|
|
58
|
+
return true;
|
|
59
|
+
if (l < c)
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
/** Check for updates (non-blocking, runs in background) */
|
|
65
|
+
export function checkForUpdates(currentVersion) {
|
|
66
|
+
if (!shouldCheck())
|
|
67
|
+
return;
|
|
68
|
+
// Run check in next tick to avoid blocking startup
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
try {
|
|
71
|
+
saveCheckTimestamp();
|
|
72
|
+
const latest = getLatestVersion();
|
|
73
|
+
if (!latest)
|
|
74
|
+
return;
|
|
75
|
+
if (isNewer(currentVersion, latest)) {
|
|
76
|
+
console.log(`\n${YELLOW} Update available: ${currentVersion} → ${latest}. Run: ${GREEN}npm i -g @oroute/cli${RESET}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// Silent fail — update check should never break the CLI
|
|
81
|
+
}
|
|
82
|
+
}, 100);
|
|
83
|
+
}
|
|
84
|
+
/** Exported for testing */
|
|
85
|
+
export function _checkForUpdatesSync(currentVersion) {
|
|
86
|
+
const latest = getLatestVersion();
|
|
87
|
+
return {
|
|
88
|
+
currentVersion,
|
|
89
|
+
latestVersion: latest,
|
|
90
|
+
updateAvailable: latest !== null && isNewer(currentVersion, latest),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAQ,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAClF,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAQvC,oEAAoE;AACpE,SAAS,WAAW;IACl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ACL,cAAc;QACd,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,MAAM,KAAK,IAAI,IAAI,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;KACpE,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "oroute-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "O'Route CLI — AI API auto-routing for 13 models from your terminal",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"oroute": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*"
|
|
11
|
+
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai", "cli", "llm", "routing", "claude", "gpt", "gemini",
|
|
14
|
+
"deepseek", "qwen", "anthropic", "openai", "agent", "coding"
|
|
15
|
+
],
|
|
16
|
+
"author": "O'Route <netclaus@gmail.com>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://oroute.itshin.com",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/netclaus/oroute"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"dev": "tsx src/index.ts",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^22.19.15",
|
|
30
|
+
"tsx": "^4.21.0",
|
|
31
|
+
"typescript": "^5.9.3"
|
|
32
|
+
}
|
|
33
|
+
}
|