anveesa 0.7.1 → 0.7.2
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/bin/anveesa +12 -0
- package/install.js +92 -0
- package/package.json +22 -35
- package/Cargo.lock +0 -2250
- package/Cargo.toml +0 -30
- package/LICENSE +0 -21
- package/bin/anveesa.js +0 -50
- package/scripts/install.js +0 -203
- package/src/cli.rs +0 -126
- package/src/config.rs +0 -743
- package/src/display.rs +0 -794
- package/src/image.rs +0 -344
- package/src/lib.rs +0 -760
- package/src/main.rs +0 -4
- package/src/mcp.rs +0 -271
- package/src/prompt.rs +0 -616
- package/src/provider/command.rs +0 -310
- package/src/provider/mod.rs +0 -210
- package/src/provider/openai_compatible.rs +0 -1605
- package/src/session.rs +0 -543
- package/src/tools.rs +0 -2656
- package/src/tools_scenarios.rs +0 -2026
- package/src/tui/commands.rs +0 -515
- package/src/tui/format.rs +0 -439
- package/src/tui/input.rs +0 -198
- package/src/tui/render.rs +0 -746
- package/src/tui/stream.rs +0 -435
- package/src/tui.rs +0 -699
- package/src/web.rs +0 -185
- package/src/web_ui.html +0 -213
- package/src/workspace.rs +0 -216
package/bin/anveesa
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const bin = path.join(
|
|
7
|
+
__dirname,
|
|
8
|
+
process.platform === 'win32' ? 'anveesa.exe' : 'anveesa'
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
12
|
+
process.exit(result.status ?? 1);
|
package/install.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Downloads the correct anveesa binary for the current platform from GitHub releases.
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const https = require('https');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const { execSync } = require('child_process');
|
|
9
|
+
const zlib = require('zlib');
|
|
10
|
+
|
|
11
|
+
const VERSION = require('./package.json').version;
|
|
12
|
+
const REPO = 'PandhuWibowo/anveesa-cli';
|
|
13
|
+
const BIN_DIR = path.join(__dirname, 'bin');
|
|
14
|
+
|
|
15
|
+
function platformTarget() {
|
|
16
|
+
const { platform, arch } = process;
|
|
17
|
+
const targets = {
|
|
18
|
+
'linux-x64': 'x86_64-unknown-linux-gnu',
|
|
19
|
+
'linux-arm64': 'aarch64-unknown-linux-gnu',
|
|
20
|
+
'darwin-x64': 'x86_64-apple-darwin',
|
|
21
|
+
'darwin-arm64':'aarch64-apple-darwin',
|
|
22
|
+
'win32-x64': 'x86_64-pc-windows-msvc',
|
|
23
|
+
};
|
|
24
|
+
const key = `${platform}-${arch}`;
|
|
25
|
+
const target = targets[key];
|
|
26
|
+
if (!target) throw new Error(`Unsupported platform: ${key}. Build from source: https://github.com/${REPO}`);
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function download(url) {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
https.get(url, { headers: { 'User-Agent': 'anveesa-npm-installer' } }, res => {
|
|
33
|
+
if (res.statusCode === 301 || res.statusCode === 302) {
|
|
34
|
+
return download(res.headers.location).then(resolve).catch(reject);
|
|
35
|
+
}
|
|
36
|
+
if (res.statusCode !== 200) {
|
|
37
|
+
return reject(new Error(`HTTP ${res.statusCode} downloading ${url}`));
|
|
38
|
+
}
|
|
39
|
+
const chunks = [];
|
|
40
|
+
res.on('data', c => chunks.push(c));
|
|
41
|
+
res.on('end', () => resolve(Buffer.concat(chunks)));
|
|
42
|
+
res.on('error', reject);
|
|
43
|
+
}).on('error', reject);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function extractTar(tarGz, destDir, binaryName) {
|
|
48
|
+
// Write to temp file and use system tar (available on all supported platforms)
|
|
49
|
+
const tmp = path.join(destDir, '_download.tar.gz');
|
|
50
|
+
fs.writeFileSync(tmp, tarGz);
|
|
51
|
+
try {
|
|
52
|
+
execSync(`tar -xzf "${tmp}" -C "${destDir}"`, { stdio: 'inherit' });
|
|
53
|
+
} finally {
|
|
54
|
+
fs.unlinkSync(tmp);
|
|
55
|
+
}
|
|
56
|
+
const src = path.join(destDir, binaryName);
|
|
57
|
+
if (!fs.existsSync(src)) throw new Error(`Binary not found in archive: ${binaryName}`);
|
|
58
|
+
return src;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function main() {
|
|
62
|
+
const target = platformTarget();
|
|
63
|
+
const binaryName = process.platform === 'win32' ? 'anveesa.exe' : 'anveesa';
|
|
64
|
+
const archiveName = `anveesa-${VERSION}-${target}.tar.gz`;
|
|
65
|
+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${archiveName}`;
|
|
66
|
+
|
|
67
|
+
console.log(`anveesa: downloading ${archiveName}`);
|
|
68
|
+
fs.mkdirSync(BIN_DIR, { recursive: true });
|
|
69
|
+
|
|
70
|
+
const data = await download(url);
|
|
71
|
+
const binPath = await extractTar(data, BIN_DIR, binaryName);
|
|
72
|
+
|
|
73
|
+
if (process.platform !== 'win32') {
|
|
74
|
+
fs.chmodSync(binPath, 0o755);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Verify it runs
|
|
78
|
+
try {
|
|
79
|
+
execSync(`"${binPath}" --version`, { stdio: 'pipe' });
|
|
80
|
+
console.log(`anveesa: installed successfully`);
|
|
81
|
+
} catch (_) {
|
|
82
|
+
// Non-fatal — binary may need runtime libs not present in CI
|
|
83
|
+
console.log(`anveesa: installed (run "anveesa --version" to verify)`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
main().catch(err => {
|
|
88
|
+
console.error(`\nanveesa install failed: ${err.message}`);
|
|
89
|
+
console.error(`Build from source: https://github.com/${REPO}#install`);
|
|
90
|
+
// Don't hard-fail npm install — let users build from source if needed
|
|
91
|
+
process.exit(0);
|
|
92
|
+
});
|
package/package.json
CHANGED
|
@@ -1,49 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anveesa",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Multi-provider terminal AI assistant — TUI, web UI, and one-shot mode backed by any OpenAI-compatible API",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "cargo build --release",
|
|
11
|
-
"postinstall": "node scripts/install.js",
|
|
12
|
-
"prepublishOnly": "npm run build"
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/PandhuWibowo/anveesa-cli.git"
|
|
13
9
|
},
|
|
14
|
-
"
|
|
15
|
-
"bin/anveesa.js",
|
|
16
|
-
"scripts/install.js",
|
|
17
|
-
"Cargo.toml",
|
|
18
|
-
"Cargo.lock",
|
|
19
|
-
"src/",
|
|
20
|
-
"README.md"
|
|
21
|
-
],
|
|
10
|
+
"homepage": "https://github.com/PandhuWibowo/anveesa-cli#readme",
|
|
22
11
|
"keywords": [
|
|
23
12
|
"ai",
|
|
24
13
|
"cli",
|
|
25
|
-
"terminal",
|
|
26
|
-
"rust",
|
|
27
|
-
"openai",
|
|
28
|
-
"agent",
|
|
29
|
-
"copilot",
|
|
30
|
-
"tui",
|
|
31
14
|
"llm",
|
|
15
|
+
"assistant",
|
|
16
|
+
"tui",
|
|
17
|
+
"openai",
|
|
18
|
+
"anthropic",
|
|
32
19
|
"deepseek",
|
|
33
|
-
"groq"
|
|
34
|
-
"anthropic"
|
|
20
|
+
"groq"
|
|
35
21
|
],
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"node": ">=16"
|
|
22
|
+
"bin": {
|
|
23
|
+
"anveesa": "./bin/anveesa"
|
|
39
24
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"url": "git+https://github.com/pandhuwibowo/anveesa-cli.git"
|
|
25
|
+
"scripts": {
|
|
26
|
+
"postinstall": "node install.js"
|
|
43
27
|
},
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
"url": "https://github.com/pandhuwibowo/anveesa-cli/issues"
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
47
30
|
},
|
|
48
|
-
"
|
|
31
|
+
"files": [
|
|
32
|
+
"bin/",
|
|
33
|
+
"install.js",
|
|
34
|
+
"README.md"
|
|
35
|
+
]
|
|
49
36
|
}
|