Compare commits
29
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a2a8564aa | ||
|
|
6ca7f2eb4a | ||
|
|
19592b890f | ||
|
|
57ab2166cb | ||
|
|
52fcecb8df | ||
|
|
43b1a7c4da | ||
|
|
e788fd916d | ||
|
|
33ec85fb00 | ||
|
|
34106363c1 | ||
|
|
a3d72f7232 | ||
|
|
f9f30f7c1a | ||
|
|
39e39ba3b2 | ||
|
|
4c6e8998fe | ||
|
|
5a1cac3c83 | ||
|
|
d2fafa8b65 | ||
|
|
895e1d116d | ||
|
|
2164ae776d | ||
|
|
0d3da375de | ||
|
|
5e1657904c | ||
|
|
e640293f68 | ||
|
|
a17db8e395 | ||
|
|
eafb3b317d | ||
|
|
28b50aa0a1 | ||
|
|
7144d7d703 | ||
|
|
83731e3b50 | ||
|
|
091959e796 | ||
|
|
b0a33ad8b3 | ||
|
|
9bfc49c0dc | ||
|
|
dd7d62105a |
No files matched your search
@@ -10,6 +10,7 @@
|
||||
|-------|-----|
|
||||
| [`agent-arka/`](agent-arka/) | Agent Arka: демон + **веб-дашборд** (`http://127.0.0.1:4545`), установщик и пакеты |
|
||||
| [`opencode/`](opencode/) | Провайдер OpenCode **Arka-AI**: установщик, плагин, skill, каталог чат-моделей |
|
||||
| [`multica/`](multica/) | **Multica fork CLI**: daemon c поддержкой agent-arka, установщик |
|
||||
|
||||
Agent Arka (веб-интерфейс), Linux / WSL:
|
||||
|
||||
@@ -35,3 +36,17 @@ irm https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-pro
|
||||
```
|
||||
|
||||
Подробности: [opencode/README.md](opencode/README.md) — Windows, Desktop, установка из чата OpenCode.
|
||||
|
||||
Multica fork CLI, macOS / Linux / WSL:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.sh | bash
|
||||
```
|
||||
|
||||
Multica fork CLI, Windows (PowerShell):
|
||||
|
||||
```powershell
|
||||
irm https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.ps1 | iex
|
||||
```
|
||||
|
||||
Подробности: [multica/README.md](multica/README.md).
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Исходники приватны: [`arka/agent-arka`](https://git.arka-ai.ru/arka/agent-arka). Сборки и этот установщик публичные, без токена.
|
||||
|
||||
Версия пакета: **2026.10.2**.
|
||||
Версия пакета: **2026.10.18**.
|
||||
|
||||
## Установка (Linux / WSL)
|
||||
|
||||
@@ -27,7 +27,7 @@ curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/agent-arka/install
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/agent-arka/install.sh \
|
||||
| AGENT_ARKA_VERSION=2026.10.2 bash
|
||||
| AGENT_ARKA_VERSION=2026.10.18 bash
|
||||
```
|
||||
|
||||
Не стартовать демон:
|
||||
@@ -57,7 +57,7 @@ ARKA_API_KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFGHIJKL
|
||||
|
||||
## Windows (desktop)
|
||||
|
||||
Скачайте `Agent Arka_*_x64-setup.exe` с [страницы релиза](https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.2).
|
||||
Скачайте `Agent Arka_*_x64-setup.exe` с [страницы релиза](https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.18).
|
||||
|
||||
- Установщик **не подписан**. SmartScreen: «Подробнее» → «Выполнить в любом случае».
|
||||
- При первой установке нужен интернет: подтягивается WebView2 Evergreen, если его ещё нет.
|
||||
@@ -112,11 +112,11 @@ Then open [http://127.0.0.1:4545](http://127.0.0.1:4545) and use **Arka AI** to
|
||||
|
||||
On **pc162** (Armbian aarch64, PocketClaw) the same command fetches `linux-aarch64`.
|
||||
|
||||
On Windows, download `Agent Arka_*_x64-setup.exe` from <https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.2>.
|
||||
On Windows, download `Agent Arka_*_x64-setup.exe` from <https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.18>.
|
||||
The installer is unsigned: SmartScreen → More info → Run anyway.
|
||||
First install needs network for the WebView2 Evergreen bootstrapper.
|
||||
|
||||
Pin a version with `AGENT_ARKA_VERSION=2026.10.2`. Skip autostart with `AGENT_ARKA_AUTO_START=0`.
|
||||
Pin a version with `AGENT_ARKA_VERSION=2026.10.18`. Skip autostart with `AGENT_ARKA_AUTO_START=0`.
|
||||
|
||||
Put `ARKA_API_KEY` in `~/.agent-arka/secrets.env` (or `~/.librefang/secrets.env` if that home already exists). Create a key at [arka-ai.ru](https://arka-ai.ru).
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# arka-search-mcp
|
||||
|
||||
A tiny **MCP stdio server** that exposes Arka web **search** and **fetch** to any
|
||||
MCP-capable agent harness (opencode, Hermes, DeepSeek Harness, Claude Code, …).
|
||||
|
||||
Backend: `https://search.arka-ai.ru` (Arka ops) — self-hosted SearXNG behind an
|
||||
authenticated gateway that resolves `ARKA_API_KEY → billing account`, applies
|
||||
per-account rate limits, and runs an SSRF-guarded reader.
|
||||
|
||||
Agent Arka itself does **not** need this shim — it talks to the gateway directly
|
||||
via the built-in `http_compat` MCP transport. See the setup doc.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js ≥ 18 (uses global `fetch`).
|
||||
- An Arka API key in `ARKA_API_KEY` (the key Agent Arka stores for inference;
|
||||
obtained via SSO / trial provisioning).
|
||||
|
||||
## Environment
|
||||
|
||||
| Variable | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `ARKA_API_KEY` | — (**required**) | Arka API key; sent as `X-Api-Key`. |
|
||||
| `ARKA_SEARCH_URL` | `https://search.arka-ai.ru` | Gateway base URL. |
|
||||
| `ARKA_SEARCH_UA` | `arka-search-mcp/1.0` | User-Agent. |
|
||||
|
||||
## Tools
|
||||
|
||||
| Tool | Arguments | Returns |
|
||||
|---|---|---|
|
||||
| `web_search` | `q` (required), `language`, `categories`, `pageno`, `time_range` | SearXNG JSON `{ query, results: [{ title, url, content, engine }] }` |
|
||||
| `web_fetch` | `url` (required) | `{ title, content (Markdown), url, final_url, content_type, bytes, truncated }` |
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
git clone https://git.arka-ai.ru/arka/public.git
|
||||
# or copy just this directory
|
||||
# server: /path/to/arka-search-mcp/server.js
|
||||
```
|
||||
|
||||
Zero dependencies — run it directly with `node server.js`.
|
||||
|
||||
## Manual smoke test
|
||||
|
||||
```bash
|
||||
printf '%s\n' \
|
||||
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
|
||||
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
|
||||
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"web_search","arguments":{"q":"Arka AI"}}}' \
|
||||
| ARKA_API_KEY="$ARKA_API_KEY" node server.js
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT.
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "arka-search-mcp",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "MCP stdio server exposing Arka web search + fetch (https://search.arka-ai.ru) to any MCP-capable agent harness.",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"arka-search-mcp": "server.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const readline = require('readline');
|
||||
|
||||
const BASE = (process.env.ARKA_SEARCH_URL || 'https://search.arka-ai.ru').replace(/\/+$/, '');
|
||||
const KEY = process.env.ARKA_API_KEY || process.env.ARKA_SEARCH_TOKEN || '';
|
||||
const UA = process.env.ARKA_SEARCH_UA || 'arka-search-mcp/1.0';
|
||||
|
||||
const DEFAULT_PROTOCOL = '2025-06-18';
|
||||
|
||||
const TOOLS = [
|
||||
{
|
||||
name: 'web_search',
|
||||
description:
|
||||
'Search the web via Arka (self-hosted SearXNG). Returns ranked results with title, url and snippet.',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
q: { type: 'string', description: 'Search query' },
|
||||
language: { type: 'string', description: 'Language hint, e.g. ru, en' },
|
||||
categories: {
|
||||
type: 'string',
|
||||
description: 'general, news, images, it, science, ...',
|
||||
},
|
||||
pageno: { type: 'integer', description: '1-based page number' },
|
||||
time_range: { type: 'string', description: 'day | week | month | year' },
|
||||
},
|
||||
required: ['q'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'web_fetch',
|
||||
description:
|
||||
'Fetch a URL through Arka and return its readable content as Markdown (SSRF-guarded).',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
url: { type: 'string', description: 'Absolute http(s) URL' },
|
||||
},
|
||||
required: ['url'],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
function send(msg) {
|
||||
process.stdout.write(JSON.stringify(msg) + '\n');
|
||||
}
|
||||
|
||||
function reply(id, result) {
|
||||
send({ jsonrpc: '2.0', id, result });
|
||||
}
|
||||
|
||||
function replyError(id, code, message) {
|
||||
send({ jsonrpc: '2.0', id, error: { code, message } });
|
||||
}
|
||||
|
||||
async function callGateway(path, params) {
|
||||
if (!KEY) {
|
||||
throw new Error('ARKA_API_KEY is not set in the server environment');
|
||||
}
|
||||
const url = new URL(BASE + path);
|
||||
for (const [k, v] of Object.entries(params)) {
|
||||
if (v !== undefined && v !== null && v !== '') url.searchParams.set(k, String(v));
|
||||
}
|
||||
const res = await fetch(url, {
|
||||
headers: {
|
||||
'x-api-key': KEY,
|
||||
accept: 'application/json',
|
||||
'user-agent': UA,
|
||||
},
|
||||
signal: AbortSignal.timeout(25000),
|
||||
});
|
||||
const text = await res.text();
|
||||
if (!res.ok) {
|
||||
throw new Error(`Arka search ${res.status}: ${text.slice(0, 400)}`);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
async function callTool(name, args) {
|
||||
if (name === 'web_search') {
|
||||
return callGateway('/search', {
|
||||
q: args.q,
|
||||
language: args.language,
|
||||
categories: args.categories,
|
||||
pageno: args.pageno,
|
||||
time_range: args.time_range,
|
||||
format: 'json',
|
||||
});
|
||||
}
|
||||
if (name === 'web_fetch') {
|
||||
return callGateway('/fetch', { url: args.url });
|
||||
}
|
||||
throw new Error('Unknown tool: ' + name);
|
||||
}
|
||||
|
||||
async function handle(msg) {
|
||||
const id = msg.id;
|
||||
const method = msg.method;
|
||||
|
||||
if (method === 'initialize') {
|
||||
const requested = msg.params && msg.params.protocolVersion;
|
||||
reply(id, {
|
||||
protocolVersion: requested || DEFAULT_PROTOCOL,
|
||||
capabilities: { tools: { listChanged: false } },
|
||||
serverInfo: { name: 'arka-search', version: '1.0.0' },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof method === 'string' && method.startsWith('notifications/')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (method === 'ping') {
|
||||
reply(id, {});
|
||||
return;
|
||||
}
|
||||
|
||||
if (method === 'tools/list') {
|
||||
reply(id, { tools: TOOLS });
|
||||
return;
|
||||
}
|
||||
|
||||
if (method === 'tools/call') {
|
||||
const name = msg.params && msg.params.name;
|
||||
const args = (msg.params && msg.params.arguments) || {};
|
||||
try {
|
||||
const text = await callTool(name, args);
|
||||
reply(id, { content: [{ type: 'text', text }] });
|
||||
} catch (err) {
|
||||
reply(id, {
|
||||
content: [{ type: 'text', text: String((err && err.message) || err) }],
|
||||
isError: true,
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (id !== undefined && id !== null) {
|
||||
replyError(id, -32601, 'Method not found: ' + method);
|
||||
}
|
||||
}
|
||||
|
||||
const rl = readline.createInterface({ input: process.stdin });
|
||||
rl.on('line', (line) => {
|
||||
const trimmed = line.trim();
|
||||
if (!trimmed) return;
|
||||
let msg;
|
||||
try {
|
||||
msg = JSON.parse(trimmed);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
handle(msg).catch((err) => {
|
||||
if (msg && msg.id !== undefined && msg.id !== null) {
|
||||
replyError(msg.id, -32603, String((err && err.message) || err));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,59 @@
|
||||
# Multica fork CLI (Arka)
|
||||
|
||||
Кастомный билд CLI Multica от Arka: поддержка **agent-arka** runtime (провайдер
|
||||
`agent-arka` на `plan.arka-ai.ru`), Arka SSO, русская локализация. Скачивается
|
||||
из публичных релизов этого репозитория; токен не нужен.
|
||||
|
||||
## Установка
|
||||
|
||||
macOS / Linux / WSL:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.sh | bash
|
||||
```
|
||||
|
||||
Windows (PowerShell):
|
||||
|
||||
```powershell
|
||||
irm https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.ps1 | iex
|
||||
```
|
||||
|
||||
Бинарь ставится в `/usr/local/bin` (или `~/.local/bin`), на Windows — в
|
||||
`~\.multica\bin`, и добавляется в `PATH`.
|
||||
|
||||
## Подключение к серверу
|
||||
|
||||
```bash
|
||||
multica setup self-host \
|
||||
--server-url https://plan.arka-ai.ru \
|
||||
--app-url https://plan.arka-ai.ru
|
||||
```
|
||||
|
||||
Команда настроит CLI, откроет браузер для входа и запустит daemon.
|
||||
|
||||
## Проверка
|
||||
|
||||
```bash
|
||||
multica version # 0.6.2-arka
|
||||
multica daemon status # running; агенты включают agent-arka
|
||||
```
|
||||
|
||||
Проверить, что бинарь умеет agent-arka:
|
||||
|
||||
```bash
|
||||
multica daemon probe-runtimes
|
||||
# provider_summary должен содержать "agent-arka"
|
||||
```
|
||||
|
||||
## Пин версии
|
||||
|
||||
```bash
|
||||
MULTICA_VERSION=0.6.2-arka curl -fsSL .../multica/install.sh | bash
|
||||
```
|
||||
|
||||
## Релизы
|
||||
|
||||
Бинари публикуются в [релизах](https://git.arka-ai.ru/arka/public/releases/tag/multica-v0.6.2-arka):
|
||||
`multica-cli-<version>-linux-{amd64,arm64}.tar.gz`,
|
||||
`multica-cli-<version>-darwin-{amd64,arm64}.tar.gz`,
|
||||
`multica-cli-<version>-windows-amd64.zip`, `checksums.txt`.
|
||||
@@ -0,0 +1,133 @@
|
||||
# Multica fork CLI — Windows installer
|
||||
#
|
||||
# Installs the fork-built `multica.exe` CLI (with agent-arka runtime support,
|
||||
# Arka SSO, Russian i18n) from arka/public releases.
|
||||
#
|
||||
# irm https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.ps1 | iex
|
||||
#
|
||||
# Environment:
|
||||
# $env:MULTICA_VERSION pin a release (e.g. 0.6.1-arka). Default: newest multica-v* on git.arka-ai.ru/arka/public
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$PublicApi = if ($env:MULTICA_PUBLIC_API) { $env:MULTICA_PUBLIC_API } else { "https://git.arka-ai.ru/api/v1" }
|
||||
$PublicDl = if ($env:MULTICA_PUBLIC_DL) { $env:MULTICA_PUBLIC_DL } else { "https://git.arka-ai.ru/arka/public/releases/download" }
|
||||
$Repo = "arka/public"
|
||||
$TagPrefix = "multica-v"
|
||||
|
||||
$BinDir = Join-Path $env:USERPROFILE ".multica\bin"
|
||||
|
||||
function Write-Info { Write-Host "==> $args" -ForegroundColor Cyan }
|
||||
function Write-Ok { Write-Host "OK $args" -ForegroundColor Green }
|
||||
function Write-Warn { Write-Host "WARN $args" -ForegroundColor Yellow }
|
||||
function Write-Fail { Write-Host "FAIL $args" -ForegroundColor Red; exit 1 }
|
||||
|
||||
function Get-WindowsCliArch {
|
||||
$arch = $env:PROCESSOR_ARCHITECTURE
|
||||
if ($arch -eq "AMD64" -or $arch -eq "x86_64") { return "amd64" }
|
||||
if ($arch -eq "ARM64") { return "arm64" }
|
||||
Write-Fail "Unsupported architecture: $arch"
|
||||
}
|
||||
|
||||
function Get-LatestMulticaVersion {
|
||||
$url = "$PublicApi/repos/$Repo/releases?limit=50"
|
||||
try {
|
||||
$releases = Invoke-RestMethod -Uri $url -UseBasicParsing -ErrorAction Stop
|
||||
} catch {
|
||||
Write-Fail "Cannot list releases at $url : $_"
|
||||
}
|
||||
$tags = $releases | Where-Object { $_.tag_name -like "$TagPrefix*" } | ForEach-Object { $_.tag_name }
|
||||
if (-not $tags) { Write-Fail "No ${TagPrefix}* releases on $Repo yet" }
|
||||
$latest = $tags | Sort-Object -Descending | Select-Object -First 1
|
||||
return $latest.Substring($TagPrefix.Length)
|
||||
}
|
||||
|
||||
function Add-ToUserPath {
|
||||
param([string]$Dir)
|
||||
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
||||
if ($currentPath -and $currentPath.Split(";") -contains $Dir) { return }
|
||||
$newPath = if ($currentPath) { "$currentPath;$Dir" } else { $Dir }
|
||||
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
|
||||
if ($env:Path -notlike "*$Dir*") {
|
||||
$env:Path = "$Dir;$env:Path"
|
||||
}
|
||||
Write-Ok "Added $Dir to user PATH"
|
||||
}
|
||||
|
||||
if (-not [Environment]::Is64BitOperatingSystem) {
|
||||
Write-Fail "Multica requires a 64-bit Windows installation."
|
||||
}
|
||||
|
||||
$arch = Get-WindowsCliArch
|
||||
|
||||
$version = if ($env:MULTICA_VERSION) { $env:MULTICA_VERSION.TrimStart("v").TrimStart($TagPrefix) } else { Get-LatestMulticaVersion }
|
||||
Write-Info "Installing Multica fork CLI ${version} (windows-$arch)..."
|
||||
|
||||
$asset = "multica-cli-$version-windows-$arch.zip"
|
||||
$url = "$PublicDl/$TagPrefix$version/$asset"
|
||||
$tmpDir = Join-Path ([System.IO.Path]::GetTempPath()) "multica-install"
|
||||
|
||||
if (Test-Path $tmpDir) { Remove-Item $tmpDir -Recurse -Force }
|
||||
New-Item -ItemType Directory -Path $tmpDir | Out-Null
|
||||
|
||||
Write-Info "Downloading $url ..."
|
||||
try {
|
||||
Invoke-WebRequest -Uri $url -OutFile (Join-Path $tmpDir "multica.zip") -UseBasicParsing
|
||||
} catch {
|
||||
Remove-Item $tmpDir -Recurse -Force
|
||||
Write-Fail "Failed to download CLI binary: $_"
|
||||
}
|
||||
|
||||
# Verify SHA256 checksum
|
||||
$checksumUrl = "$PublicDl/$TagPrefix$version/checksums.txt"
|
||||
try {
|
||||
$checksums = Invoke-WebRequest -Uri $checksumUrl -UseBasicParsing -ErrorAction Stop
|
||||
$checksumContent = if ($checksums.Content -is [byte[]]) {
|
||||
[System.Text.Encoding]::UTF8.GetString($checksums.Content)
|
||||
} else {
|
||||
[string]$checksums.Content
|
||||
}
|
||||
$zipFile = Join-Path $tmpDir "multica.zip"
|
||||
$actualHash = (Get-FileHash -Path $zipFile -Algorithm SHA256).Hash.ToLower()
|
||||
$expectedLine = ($checksumContent -split "`r?`n") | Where-Object { $_ -match [regex]::Escape($asset) } | Select-Object -First 1
|
||||
if ($expectedLine) {
|
||||
$expectedHash = ($expectedLine -split "\s+")[0].ToLower()
|
||||
if ($actualHash -ne $expectedHash) {
|
||||
Remove-Item $tmpDir -Recurse -Force
|
||||
Write-Fail "Checksum verification failed. Expected: $expectedHash, Got: $actualHash"
|
||||
}
|
||||
Write-Ok "Checksum verified"
|
||||
} else {
|
||||
Write-Warn "Could not find checksum entry for $asset - skipping verification."
|
||||
}
|
||||
} catch {
|
||||
Write-Warn "Could not download checksums.txt - skipping verification."
|
||||
}
|
||||
|
||||
Expand-Archive -Path (Join-Path $tmpDir "multica.zip") -DestinationPath $tmpDir -Force
|
||||
|
||||
if (-not (Test-Path $BinDir)) {
|
||||
New-Item -ItemType Directory -Path $BinDir -Force | Out-Null
|
||||
}
|
||||
|
||||
$exeSrc = Join-Path $tmpDir "multica.exe"
|
||||
if (-not (Test-Path $exeSrc)) {
|
||||
$exeSrc = Get-ChildItem -Path $tmpDir -Filter "multica.exe" -Recurse | Select-Object -First 1 -ExpandProperty FullName
|
||||
}
|
||||
if (-not $exeSrc -or -not (Test-Path $exeSrc)) {
|
||||
Remove-Item $tmpDir -Recurse -Force
|
||||
Write-Fail "multica.exe not found in downloaded archive."
|
||||
}
|
||||
|
||||
Copy-Item $exeSrc (Join-Path $BinDir "multica.exe") -Force
|
||||
Remove-Item $tmpDir -Recurse -Force
|
||||
|
||||
Add-ToUserPath $BinDir
|
||||
Write-Ok "Multica CLI installed to $BinDir\multica.exe"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host " Next — connect to your Multica server:"
|
||||
Write-Host " multica setup self-host"
|
||||
Write-Host " Or for this instance:"
|
||||
Write-Host " multica setup self-host --server-url https://plan.arka-ai.ru --app-url https://plan.arka-ai.ru"
|
||||
Write-Host ""
|
||||
@@ -0,0 +1,175 @@
|
||||
#!/usr/bin/env bash
|
||||
# Multica fork CLI — installer (Linux / macOS / WSL).
|
||||
#
|
||||
# Installs the fork-built `multica` CLI (with agent-arka runtime support, Arka
|
||||
# SSO, Russian i18n) from arka/public releases.
|
||||
#
|
||||
# curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.sh | bash
|
||||
#
|
||||
# Environment:
|
||||
# MULTICA_VERSION pin a release (e.g. 0.6.1-arka). Default: newest multica-v* on git.arka-ai.ru/arka/public
|
||||
# MULTICA_BIN_DIR install dir (default: /usr/local/bin, else ~/.local/bin)
|
||||
# NO_COLOR 1 to disable color output
|
||||
|
||||
if [ -z "${BASH_VERSION:-}" ]; then
|
||||
echo "The Multica installer needs bash. Run:" >&2
|
||||
echo " curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.sh | bash" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PUBLIC_API="${MULTICA_PUBLIC_API:-https://git.arka-ai.ru/api/v1}"
|
||||
PUBLIC_DL="${MULTICA_PUBLIC_DL:-https://git.arka-ai.ru/arka/public/releases/download}"
|
||||
REPO="arka/public"
|
||||
TAG_PREFIX="multica-v"
|
||||
|
||||
if [[ -t 1 && -z "${NO_COLOR:-}" ]]; then
|
||||
C_GREEN=$'\033[32m'; C_YELLOW=$'\033[33m'; C_RED=$'\033[31m'; C_BOLD=$'\033[1m'; C_RESET=$'\033[0m'
|
||||
else
|
||||
C_GREEN=''; C_YELLOW=''; C_RED=''; C_BOLD=''; C_RESET=''
|
||||
fi
|
||||
|
||||
info() { printf '%s\n' "$*"; }
|
||||
ok() { printf '%s✓%s %s\n' "$C_GREEN" "$C_RESET" "$*"; }
|
||||
warn() { printf '%s⚠%s %s\n' "$C_YELLOW" "$C_RESET" "$*"; }
|
||||
die() { printf '%s✗%s %s\n' "$C_RED" "$C_RESET" "$*" >&2; exit 1; }
|
||||
|
||||
_mc_tmp=""
|
||||
cleanup() { [[ -n "${_mc_tmp:-}" ]] && rm -rf "$_mc_tmp"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
detect_platform() {
|
||||
local os arch
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
arch=$(uname -m)
|
||||
case "$arch" in
|
||||
x86_64|amd64) arch="amd64" ;;
|
||||
aarch64|arm64) arch="arm64" ;;
|
||||
*) die "Unsupported architecture: $arch" ;;
|
||||
esac
|
||||
case "$os" in
|
||||
linux) PLATFORM="linux-${arch}" ;;
|
||||
darwin) PLATFORM="darwin-${arch}" ;;
|
||||
mingw*|msys*|cygwin*)
|
||||
die "This curl installer is for Linux/macOS/WSL. On Windows run the PowerShell installer instead:"$'\n'" irm https://git.arka-ai.ru/arka/public/raw/branch/main/multica/install.ps1 | iex"
|
||||
;;
|
||||
*) die "Unsupported OS: $os" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
fetch_latest_version() {
|
||||
local json tags
|
||||
json=$(curl -fsSL "${PUBLIC_API}/repos/${REPO}/releases?limit=50") || die "Cannot list releases at ${PUBLIC_API}/repos/${REPO}/releases"
|
||||
tags=$(printf '%s' "$json" | grep -oE '"tag_name":[[:space:]]*"'"${TAG_PREFIX}"'[^"]+"' | sed 's/.*"'"${TAG_PREFIX}"'//;s/"$//' || true)
|
||||
if [[ -z "$tags" ]]; then
|
||||
die "No ${TAG_PREFIX}* releases on ${REPO} yet"
|
||||
fi
|
||||
printf '%s\n' "$tags" | head -n 1
|
||||
}
|
||||
|
||||
sha256_file() {
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
sha256sum "$1" | awk '{print $1}'
|
||||
elif command -v shasum >/dev/null 2>&1; then
|
||||
shasum -a 256 "$1" | awk '{print $1}'
|
||||
else
|
||||
die "Need sha256sum or shasum"
|
||||
fi
|
||||
}
|
||||
|
||||
ensure_path() {
|
||||
local bindir="$1"
|
||||
case ":$PATH:" in
|
||||
*":${bindir}:"*) return 0 ;;
|
||||
esac
|
||||
local line="export PATH=\"${bindir}:\$PATH\""
|
||||
local rc
|
||||
for rc in "${HOME}/.zprofile" "${HOME}/.zshrc" "${HOME}/.bash_profile" "${HOME}/.bashrc" "${HOME}/.profile"; do
|
||||
[[ -f "$rc" ]] || continue
|
||||
if grep -Fqs "$bindir" "$rc"; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
if [[ -n "${SHELL:-}" && "${SHELL}" == *zsh* ]]; then
|
||||
rc="${HOME}/.zshrc"
|
||||
else
|
||||
rc="${HOME}/.bashrc"
|
||||
[[ -f "$rc" ]] || rc="${HOME}/.profile"
|
||||
fi
|
||||
printf '\n# Multica CLI\n%s\n' "$line" >>"$rc"
|
||||
warn "Added ${bindir} to PATH in ${rc} (open a new shell, or: source ${rc})"
|
||||
}
|
||||
|
||||
main() {
|
||||
printf '%s\n' "${C_BOLD}Multica${C_RESET} — fork CLI installer (agent-arka support)"
|
||||
command -v curl >/dev/null 2>&1 || die "curl is required"
|
||||
command -v tar >/dev/null 2>&1 || die "tar is required"
|
||||
|
||||
detect_platform
|
||||
|
||||
local version
|
||||
if [[ -n "${MULTICA_VERSION:-}" ]]; then
|
||||
version="${MULTICA_VERSION#v}"
|
||||
version="${version#multica-v}"
|
||||
info "Using pinned version ${version}"
|
||||
else
|
||||
info "Resolving latest Multica release…"
|
||||
version=$(fetch_latest_version)
|
||||
info "Latest: ${version}"
|
||||
fi
|
||||
|
||||
local asset="multica-cli-${version}-${PLATFORM}.tar.gz"
|
||||
local url="${PUBLIC_DL}/${TAG_PREFIX}${version}/${asset}"
|
||||
|
||||
_mc_tmp=$(mktemp -d)
|
||||
info "Downloading ${url} ..."
|
||||
curl -fsSL "$url" -o "$_mc_tmp/multica.tar.gz" || die "Failed to download ${asset}"
|
||||
|
||||
info "Verifying checksum …"
|
||||
local expected actual
|
||||
expected=$(curl -fsSL "${PUBLIC_DL}/${TAG_PREFIX}${version}/checksums.txt" | awk -v a="$asset" '$2==a {print $1; exit}' 2>/dev/null || true)
|
||||
actual=$(sha256_file "$_mc_tmp/multica.tar.gz")
|
||||
if [[ -n "$expected" ]]; then
|
||||
if [[ "$expected" != "$actual" ]]; then
|
||||
die "Checksum mismatch for ${asset}: expected ${expected}, got ${actual}"
|
||||
fi
|
||||
ok "Checksum verified"
|
||||
else
|
||||
warn "No checksum entry for ${asset}; skipping verification"
|
||||
fi
|
||||
|
||||
tar -xzf "$_mc_tmp/multica.tar.gz" -C "$_mc_tmp" multica || die "Failed to extract multica"
|
||||
|
||||
local bindir
|
||||
if [[ -n "${MULTICA_BIN_DIR:-}" ]]; then
|
||||
bindir="${MULTICA_BIN_DIR}"
|
||||
elif [[ -w /usr/local/bin ]]; then
|
||||
bindir="/usr/local/bin"
|
||||
elif command -v sudo >/dev/null 2>&1; then
|
||||
bindir="/usr/local/bin"
|
||||
else
|
||||
bindir="${HOME}/.local/bin"
|
||||
fi
|
||||
mkdir -p "$bindir"
|
||||
|
||||
if [[ ! -w "$bindir" ]]; then
|
||||
sudo mv "$_mc_tmp/multica" "$bindir/multica" || die "Cannot write to ${bindir}"
|
||||
else
|
||||
mv "$_mc_tmp/multica" "$bindir/multica"
|
||||
fi
|
||||
chmod +x "$bindir/multica"
|
||||
ensure_path "$bindir"
|
||||
|
||||
ok "Multica CLI ${version} installed to ${bindir}/multica"
|
||||
rm -rf "$_mc_tmp"; _mc_tmp=""
|
||||
|
||||
printf '\n'
|
||||
printf ' Next — connect to your Multica server:\n'
|
||||
printf ' multica setup self-host\n'
|
||||
printf ' Or for this instance:\n'
|
||||
printf ' multica setup self-host --server-url https://plan.arka-ai.ru --app-url https://plan.arka-ai.ru\n'
|
||||
printf '\n'
|
||||
}
|
||||
|
||||
main "$@"
|
||||
+3
-31
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"updated_at": "2026-10-01T23:00:01Z",
|
||||
"updated_at": "2026-10-20T23:00:02Z",
|
||||
"source": "https://api.arka-ai.ru/v1/models",
|
||||
"raw_count": 230,
|
||||
"chat_count": 123,
|
||||
"raw_count": 223,
|
||||
"chat_count": 116,
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
@@ -97,10 +97,6 @@
|
||||
"id": "GLM-4-9B-0414",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "GLM-4.7",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "GLM-5",
|
||||
"object": "model"
|
||||
@@ -221,10 +217,6 @@
|
||||
"id": "MiniMax-H3",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "MiniMax-M2.1",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "MiniMax-M2.5",
|
||||
"object": "model"
|
||||
@@ -297,38 +289,18 @@
|
||||
"id": "Qwen3-Coder-Next",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-Next-80B-A3B-Instruct",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-Next-80B-A3B-Thinking",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-VL-235B-A22B-Instruct",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-VL-235B-A22B-Thinking",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-VL-30B-A3B-Instruct",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-VL-32B-Instruct",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-VL-32B-Thinking",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3-VL-8B-Thinking",
|
||||
"object": "model"
|
||||
},
|
||||
{
|
||||
"id": "Qwen3.5-122B-A10B",
|
||||
"object": "model"
|
||||
|
||||
Reference in new issue
Block a user