{"_id":"@aimarket/argus","_rev":"5-a3f2f0314f388d4d85c5e44ba67beb89","name":"@aimarket/argus","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@aimarket/argus","version":"0.1.0","keywords":["ai-agent","mcp","mcp-security","llm","aicom","aimarket","agent-economy","multi-provider","telegram-bot","base"],"author":{"url":"alexar76","name":"AICOM"},"license":"MIT","_id":"@aimarket/argus@0.1.0","maintainers":[{"name":"alexar76","email":"alexar76@rambler.ru"}],"homepage":"https://magic-ai-factory.com/argus/","bugs":{"url":"https://github.com/alexar76/argus/issues"},"bin":{"argus":"dist/index.js"},"dist":{"shasum":"f6ec22cc3243a347652d73db71dcef640c046cb1","tarball":"https://registry.npmjs.org/@aimarket/argus/-/argus-0.1.0.tgz","fileCount":213,"integrity":"sha512-LiGM597Q7NvyzSg4846sZQ38e8OGkcH7dxCJkryQDmu9UuDjQNVh0EkQxfCEcTV3NVXE7gx6WaLKwBhFTcdIVg==","signatures":[{"sig":"MEQCICLMdt96oqxEyWn4XikuOcMkUD0IZqnco+xonLm8kkX8AiBkr8iEeXvS+2Ph/qVxgLQUeu0/yas/a6SUMMU7ZwKvBg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":793876},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"aa4fb41c11b05e1acbff91ff4bc8734a38a1f978","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"tsc -p tsconfig.json","start":"node dist/index.js","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"alexar76","email":"alexar76@rambler.ru"},"repository":{"url":"git+https://github.com/alexar76/argus.git","type":"git"},"_npmVersion":"10.9.4","description":"ARGUS-3 — the wallet-native, security-hardened reference agent for the AICOM economy. Runs fully autonomously; clips into the economy when a wallet is present.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.24.1","viem":"^2.21.55","@noble/post-quantum":"^0.6.1","@modelcontextprotocol/sdk":"^1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.2","@aimarket/agent":"^0.1.0","@vitest/coverage-v8":"^2.1.9"},"peerDependencies":{"@aimarket/agent":"^0.1.0"},"peerDependenciesMeta":{"@aimarket/agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/argus_0.1.0_1782222470873_0.4066661149864159","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package renamed — use @alexar76/argus3 (CLI: argus). See https://www.npmjs.com/package/@alexar76/argus3"},"0.2.0":{"name":"@aimarket/argus","version":"0.2.0","keywords":["ai-agent","mcp","mcp-security","llm","aicom","aimarket","agent-economy","multi-provider","telegram-bot","base"],"author":{"url":"alexar76","name":"AICOM"},"license":"MIT","_id":"@aimarket/argus@0.2.0","maintainers":[{"name":"alexar76","email":"alexar76@rambler.ru"}],"homepage":"https://magic-ai-factory.com/argus/","bugs":{"url":"https://github.com/alexar76/argus/issues"},"bin":{"argus":"dist/index.js"},"dist":{"shasum":"7ad187f06faf265f3d25dd377aa2f374655bbf14","tarball":"https://registry.npmjs.org/@aimarket/argus/-/argus-0.2.0.tgz","fileCount":333,"integrity":"sha512-LpoYVMtpAHB0jhVRg7TymG3EmL2AomDpW40QS9ljo04RVyyvWobA0dKfBH2hQwxfTIwVmNi94GBVVp9NY1430g==","signatures":[{"sig":"MEUCIEmb5BpEQgE5VYX7ipVBFqnBLyVTF6dE8Hxi/WoVl9U7AiEA1c5q3QVTkROsvGsgzRiG/bBjSJGMOk438j3A2V9B49k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":828266},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"d1dffe57804b491e1699320b51f84f3820e7ed52","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"tsc -p tsconfig.json","start":"node dist/index.js","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"alexar76","email":"alexar76@rambler.ru"},"deprecated":"Package renamed — use @alexar76/argus3 (CLI: argus). See https://www.npmjs.com/package/@alexar76/argus3","repository":{"url":"git+https://github.com/alexar76/argus.git","type":"git"},"_npmVersion":"10.9.4","description":"ARGUS-3 — the wallet-native, security-hardened reference agent for the AICOM economy. Runs fully autonomously; clips into the economy when a wallet is present.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.24.1","viem":"^2.21.55","@noble/post-quantum":"^0.6.1","@modelcontextprotocol/sdk":"^1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.2","@aimarket/agent":"^0.1.0","@vitest/coverage-v8":"^2.1.9"},"peerDependencies":{"@aimarket/agent":"^0.1.0"},"peerDependenciesMeta":{"@aimarket/agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/argus_0.2.0_1782367431007_0.10737134835973783","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-23T13:47:50.681Z","modified":"2026-07-01T10:47:25.176Z","0.1.0":"2026-06-23T13:47:51.034Z","0.2.0":"2026-06-25T06:03:51.173Z"},"bugs":{"url":"https://github.com/alexar76/argus/issues"},"author":{"url":"alexar76","name":"AICOM"},"license":"MIT","homepage":"https://magic-ai-factory.com/argus/","keywords":["ai-agent","mcp","mcp-security","llm","aicom","aimarket","agent-economy","multi-provider","telegram-bot","base"],"repository":{"url":"git+https://github.com/alexar76/argus.git","type":"git"},"description":"ARGUS-3 — the wallet-native, security-hardened reference agent for the AICOM economy. Runs fully autonomously; clips into the economy when a wallet is present.","maintainers":[{"name":"alexar76","email":"alexar76@rambler.ru"}],"readme":"# ARGUS-3 🛡️\n\n<!-- aicom-readme-badges -->\n<p align=\"center\">\n  <a href=\"https://github.com/alexar76/argus/actions/workflows/ci.yml\"><img src=\"https://img.shields.io/github/actions/workflow/status/alexar76/argus/ci.yml?branch=main&label=CI\" alt=\"CI\" /></a>\n  <img src=\"https://img.shields.io/badge/WARDEN-MCP_firewall-brightgreen\" alt=\"WARDEN MCP firewall\" />\n  <img src=\"https://img.shields.io/badge/crypto-off_by_default-brightgreen\" alt=\"Crypto off by default\" />\n  <img src=\"https://img.shields.io/badge/tests-258_passing-brightgreen\" alt=\"258 tests passing\" />\n  <a href=\"#testing--coverage\"><img src=\"docs/badges/coverage.svg\" alt=\"Test coverage\" /></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\" /></a>\n</p>\n<!-- /aicom-readme-badges -->\n\n\n**The wallet-native, security-hardened personal agent for the AICOM economy.**\n*(short name **ARGUS** · the CLI command is still `argus`)*\n\n> **Why \"ARGUS-3\"?** In the myth, **Argus Panoptes** — the hundred-eyed watchman —\n> was unbeatable until **Hermes** talked him to sleep and slew him. ARGUS-3 is the\n> watchman that *doesn't* fall for Hermes: a hundred eyes open (WARDEN), frugal to a\n> fault, immune to smooth-talking competitors.\n>\n> Third time's the watchman. 👁️\n\nARGUS is the **demand-side reference client** the agent economy was missing. The\necosystem already has producers (the Factory 🏭), a broker (the Hub 🛒), pricing\n(ACEX 📈), trust math (the LUMEN oracle 🔮) and observability (the Monitor 👽).\nWhat it lacked was a first-class agent an ordinary person runs — one that\n**discovers, pays for, consumes and sells** capabilities. That's ARGUS.\n\nIt is built to win on the two things competitors *structurally cannot copy*,\nbecause they ride on infrastructure only AICOM has:\n\n1. **🛡️ WARDEN** — an MCP security firewall that scores third-party servers\n   through a **verifiable reputation oracle (LUMEN)**, not a static blocklist.\n2. **💸 Native settlement** — pay per-call and get paid in USDC on Base through\n   the existing AIMarket escrow, by **reusing the `@aimarket/agent` SDK**.\n\n…and it stays frugal (a hard budget governor + live token meter — no\nself-reflection on your dime), speaks **any model** (Anthropic, OpenAI-compatible,\nChinese, local), and — critically — **runs fully autonomously when the economy is\nunavailable.** No wallet, no network to AICOM? It's still a best-in-class local,\nMCP-secured assistant.\n\n> ### 🔒 Crypto is OFF by default\n> **A blockchain is not required to run ARGUS-3.** Wallet, lottery, ACEX, paid\n> invokes, and on-chain settlement are **disabled by default** and turn on only\n> when you set **`ARGUS_CRYPTO_ENABLED=1`** (plus a wallet). Out of the box you get\n> the full agent — WARDEN, any model, memory, channels, and **free off-chain oracle\n> reads** — with no chain, no token, no wallet, no custody. Crypto is opt-in.\n\n---\n\n## Why ARGUS is different\n\n| | What it does | Why it matters |\n|---|---|---|\n| 🛡️ **WARDEN firewall** | Every MCP server is vetted by a gate chain — static tool-def scan → threat feed → **LUMEN reputation** → def-pinning — before a single tool runs. | Tool-poisoning, rug-pulls (def drift), exfiltration and credential harvesting are blocked *by default*. Trust comes from a live oracle, so it doesn't rot like a blocklist. |\n| 💸 **Native + autonomous economy** | Discover → open USDC channel → invoke → settle (consumer); register in the Mesh → list → earn (provider). Loads **only** with a wallet. | Turns AICOM into a real two-sided market. With no wallet the module never loads — zero dependency, zero failure surface. |\n| ⚖️ **Token-frugal by design** | Bounded reasoning-budget governor with hard $/token ceilings, model tiering, `cache_control`, curated handoff, compaction, and a **live meter**. | The \"cheaper\" claim is *auditable*, not marketing. Exceeding a ceiling stops the task — it never silently overspends. |\n| 🌐 **Any provider** | One `Provider` interface over Anthropic-native, any OpenAI-compatible endpoint (incl. DeepSeek, Qwen, GLM, Kimi…), and local Ollama. | Your keys, your models, your costs. Triage on a cheap/local model, escalate only when needed. |\n\n---\n\n> 🧭 **The ideology** — what real benefit each headline feature delivers, and why a\n> competitor structurally can't copy it — is in **[docs/killer-features.md](docs/killer-features.md)**\n> · [ru](docs/killer-features-ru.md) · [es](docs/killer-features-es.md).\n\n## Quickstart\n\n**One command** (interactive wizard, ~2 minutes):\n\n```bash\ncurl -fsSL https://magic-ai-factory.com/install | bash\n```\n\n**Or install from npm** (same CLI, no curl script):\n\n```bash\nnpm install -g @aimarket/argus@latest\nmkdir -p ~/.argus/agent && cd ~/.argus/agent\nargus setup && argus doctor\n```\n\nPackage: [`@aimarket/argus` on npm](https://www.npmjs.com/package/@aimarket/argus) · CLI command: `argus`\n\nThen `argus chat` or `argus serve`.\n\n> If `magic-ai-factory.com/install` returns 404, use the mirror:\n> `curl -fsSL https://modeldev.modelmarket.dev/install | bash`\n\n**Docs:** [Wiki](https://github.com/alexar76/argus/wiki) · [User guide (20 languages)](docs/user-guide/) · [Developer guide — publish a capability in 15 min (20 languages)](docs/developer-guide/) · [When ARGUS won't help you 😈](docs/user-guide/humor/) · [Ecosystem whitepaper](https://github.com/alexar76/aicom/blob/main/docs/ecosystem/whitepaper/en.md)\n\n<details>\n<summary>Manual install (developers — from git)</summary>\n\n```bash\ncd argus\nnpm install\nnpm run build\n\n# 1) Configure (safe to commit — NO secrets live here)\ncp argus.config.example.json argus.config.json\n\n# 2) Add keys to .env (all optional; with none, ARGUS uses a local Ollama model)\ncp .env.example .env      # then edit\n\n# 3) Check what's wired up\nnode dist/index.js doctor\n\n# 4) Ask something\nnode dist/index.js ask \"summarise https://example.com in three bullets\"\n\n# 5) Interactive\nnode dist/index.js chat\n```\n\n</details>\n\nDuring development you can skip the build step with `npm run dev -- ask \"…\"`.\n\n### The autonomy guarantee\n\nARGUS needs **nothing** from AICOM to work:\n\n```bash\n# No ANTHROPIC_API_KEY, no wallet — just a local model:\nARGUS_LOCAL_BASE_URL=http://127.0.0.1:11434/v1 node dist/index.js ask \"hello\"\n```\n\nWith no `ARGUS_WALLET_KEY`, `doctor` reports `economy: OFF (autonomous)` and the\nentire economy layer is never constructed. See [docs/autonomy.md](docs/autonomy.md).\n\n---\n\n## Architecture\n\nFive layers. Everything above the autonomy line runs offline; the economy clips\non underneath, gated purely on the presence of a wallet.\n\n```mermaid\nflowchart TB\n  subgraph OFF[\"Runs offline — no AICOM, no wallet\"]\n    L1[\"Layer 1 · Providers — Anthropic · OpenAI-compatible · local\"]\n    L2[\"Layer 2 · Bounded agent core — plan→execute→observe + budget governor\"]\n    L3[\"Layer 3 · Memory / self-learning — episodes · lessons · pins\"]\n    L4[\"🛡️ Layer 4 · MCP host + WARDEN — static · threat · reputation · pinning\"]\n    L1 --- L2 --- L3 --- L4\n  end\n  GATE{{\"— autonomy line — needs ARGUS_WALLET_KEY\"}}\n  L5[\"🛒 Layer 5 · Economy — discover · pay · invoke · settle · sell\"]\n  L4 -.-> GATE -.-> L5\n  L5 -.->|wraps| SDK[\"@aimarket/agent SDK\"]\n```\n\nFull diagrams and the module map: **[docs/architecture.md](docs/architecture.md)**.\n\n---\n\n## 🛡️ WARDEN — the MCP firewall\n\nAn MCP server's tool *descriptions* are attacker-controlled text the model reads\nas instructions. WARDEN treats every server as hostile-by-default and runs each\nconnection through gates before any tool is exposed:\n\n```mermaid\nflowchart LR\n  S[MCP server] --> A[1 · static scan] --> B[2 · threat feed] --> C[3 · LUMEN reputation] --> D[4 · def-pinning] --> V{allow?}\n  V -->|yes| OK[bridge tools<br/>pin defs]\n  V -->|no| NO[block + report]\n```\n\n- **Static scan** — injection / exfiltration / secret-harvesting / hidden-unicode signatures in tool defs.\n- **Threat feed** — built-in deny-list + optional signed remote feed.\n- **Reputation** — asks **LUMEN** for a sybil-resistant trust score (`lumen.reputation@v1`), verifiable via `graph_commitment`. Unreachable → neutral, never blocks (autonomy preserved).\n- **Pinning** — hashes the approved tool set; later **drift = rug-pull**, forces re-approval.\n\nSensitive tools (write/delete/exec/payment/…) additionally require explicit user\napproval at call time. Details: **[docs/security-warden.md](docs/security-warden.md)**.\n\n```bash\nnode dist/index.js warden scan      # vet your configured MCP servers\n```\n\n---\n\n## 💸 Economy integration\n\nARGUS reuses the existing **AI Market Protocol v2** and the `@aimarket/agent`\nSDK — no new endpoints.\n\n```bash\nexport ARGUS_WALLET_KEY=0x...                       # enables the economy layer\nnode dist/index.js economy status\nnode dist/index.js economy discover \"translate to 5 languages\" --budget 1\nnode dist/index.js economy register                 # list ARGUS in the AI Service Mesh\n```\n\nConsumer flow: `discover → openChannel (USDC/Base) → invoke (X-Payment-Channel) →\nsettle`. Provider flow: register identity + wallet in the Mesh, list capabilities,\nearn (and become eligible for the agent lottery / machine-UBI). See\n**[docs/economy-integration.md](docs/economy-integration.md)** ·\n**[docs/mcp-oracles-capabilities.md](docs/mcp-oracles-capabilities.md)** (11 oracles, MCP, selling).\n\n---\n\n## Multi-provider\n\n| Adapter | Covers |\n|---|---|\n| **Anthropic-native** | Claude Opus/Sonnet/Haiku/Fable — first-class `cache_control`; default for the core loop |\n| **OpenAI-compatible** | OpenAI, DeepSeek, Qwen/DashScope, Zhipu GLM, Moonshot/Kimi, MiniMax, Mistral, Groq, Together, OpenRouter, vLLM |\n| **Local** | Ollama / llama.cpp — offline + the cheap triage tier |\n\nModels are assigned to tiers (`triage` / `core` / `heavy`) in\n`argus.config.json`; routing falls back across tiers when a key is missing.\n\n---\n\n## 🎮 Agent Arena — level up, keep streaks, flex your card\n\nRunning an agent should be *fun*. Agent Arena turns **real ecosystem activity** into\nthe game mechanics a young, global audience already loves — Duolingo-style streaks,\nWrapped-style shareable cards, gaming rank cards:\n\n- **XP & levels** — earn XP for finishing tasks, selling capabilities, playing the\n  oracle lottery, trading on ACEX, and staying frugal (low `$`/task).\n- **Daily streaks** 🔥 — keep your agent active day after day.\n- **Quests & badges** — *First Blood* (first lottery win), *Rainmaker* (first `$1`\n  earned selling capabilities), *Frugal* (a task under `$0.001`), *Trusted* (top-half\n  LUMEN reputation), *Warden* (blocked a malicious MCP server), *Polyglot*, *Whale*, *Lucky*…\n- **Flex Card** — `argus flex` (or `/flex` in Telegram) renders a slick, shareable card:\n  handle, level, streak, `$` earned, win-rate, top badges, reputation rank. Numbers +\n  emoji = no language barrier → share it anywhere.\n- **Global leaderboard** *(opt-in)* — rank against agents worldwide by XP, earnings, or frugality.\n\nEvery stat is **real** — it's your actual economy, reputation and frugality\nperformance, computed locally from your agent's own memory + signed economy receipts,\nso it's hard to fake and not vanity points. Sharing and the leaderboard are **off by\ndefault and owner-controlled** — your data stays yours. Full design: [docs/arena.md](docs/arena.md).\n\n**Live demo (this fleet):**\n- **LIVE** (Base mainnet): [https://magic-ai-factory.com/arena](https://magic-ai-factory.com/arena) — `:8787` → `GET /arena/stats`\n- **UNI** (Universe / Anvil): [https://magic-ai-factory.com/arena-uni/](https://magic-ai-factory.com/arena-uni/) — `:8788` → same UI, `mode=uni`\n\nUse the **TEST · LIVE · UNI** switcher on the Arena page to flip between demo metrics and each deployed node.\n\n---\n\n## Configuration\n\n- **`argus.config.json`** — non-secret config (providers, models, tier pricing for the meter, budget ceilings, WARDEN policy, MCP servers/catalogs, economy endpoints). Safe to commit. Start from `argus.config.example.json`.\n- **`.env`** — secrets only: API keys (`ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, …) and `ARGUS_WALLET_KEY`. Never commit. Start from `.env.example`.\n\n`economy.enabled` is **derived** — it is true *iff* `ARGUS_WALLET_KEY` is set.\n\n---\n\n## Where it sits in the ecosystem\n\n> `aicom` Factory **builds** agents → listed & invoked through **AIMarket** (Hub +\n> protocol) → **Oracles** (LUMEN trust, randomness, VDF, consensus) price and\n> secure them → financed on **ACEX** → visualised by **Alien Monitor**.\n>\n> **ARGUS is the demand side**: the agent that *spends* in this market, *sells*\n> into it, and *defends* the user against the MCP supply chain — using LUMEN as\n> its safety oracle.\n\n---\n\n## Channels\n\nOne bounded agent core, many channels — each with the auth model natural to it.\nFull matrix + design: **[docs/channels.md](docs/channels.md)**.\n\n| Channel | Run | Auth |\n|---|---|---|\n| CLI | `argus ask` / `argus chat` | local (interactive approval) |\n| Telegram | `argus telegram` | owner-locked (first `/start` claims) |\n| HTTP API | `argus serve` | `/health` open · `POST /ask` Bearer `ARGUS_HTTP_TOKEN` |\n| MCP-server | `argus mcp` | local stdio — exposes `argus_ask`/`argus_status` to other agents/IDEs |\n\n`argus serve` runs Telegram + the HTTP server together (this is what the\ncontainer runs). `GET /health` is also the hook that lets ARGUS appear as a live\n**node** in Alien Monitor. Discord, Slack, Email, Matrix, WhatsApp and voice are\nready-to-add adapters (see the doc).\n\n## Deployment (Docker)\n\nARGUS launches untrusted MCP servers as child processes, so the container is also\na security boundary around them — not just packaging.\n\n```bash\ncp argus.config.example.json argus.config.json   # edit\ncp .env.example .env                              # add secrets\ndocker compose up -d --build                      # serve: Telegram + HTTP /health\n```\n\nSecrets come from `.env` (never baked into the image); `argus.config.json` is\nmounted read-only; state persists in the `argus-state` volume; a `HEALTHCHECK`\nprobes `/health`. Economy is OFF by default in the container (autonomous).\n\n## Development\n\n```bash\nnpm run typecheck     # tsc --noEmit (strict)\nnpm test              # vitest (budget governor, WARDEN gates, provider mapping)\nnpm run build         # emit dist/\n```\n\n## Status\n\n`v0.1` — bounded agent loop, multi-provider routing, WARDEN gate chain (static +\nthreat + reputation + pinning), memory/lessons, MCP host, economy consumer/provider\nwrappers, and four channels (CLI, Telegram, HTTP, MCP-server) + Docker — all\nimplemented and tested. OS-level MCP sandboxing (seccomp/Landlock/sandbox-exec),\nthe signed threat-feed publisher, and the remaining channel adapters are the v2\ntrack — see the docs.\n\n## License\n\nMIT — your keys, your infra, your data. Part of the [AICOM](https://alexar76.github.io/aicom/) open agent-economy.\n","readmeFilename":"README.md"}