Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,72 @@

**English** · [Русский](docs/ru/CHANGELOG.md)

## 8.6.0

Skills stop being only the twelve that ship here. The Skills screen has a search
that reaches GitHub, ranks what it finds, and installs the one you pick — and the
ranking is the part worth explaining, because the interesting thing about a
recommendation is disagreeing with it.

### Three signals, and the cases that shaped them

`toolkit/skillrank.py` weighs repository stars (6), the author's standing (4) and
freshness (3). Three rules sit on top of those weights, each answering a case
that actually happens in this ecosystem:

- **The floor is absolute.** Under 100 stars a repository scores zero however
famous its author is. A hundred-thousand-follower account with a twenty-star
repository is not evidence of anything — and a brand-new repository from a
prolific account is what a compromised account looks like, too.
- **The author lifts, never rescues.** The operator named this exception
directly: a first-time account whose repository is nevertheless well known is
completely normal here, and a rule that preferred authors over repositories
would throw it away. A 4,000-star repository with three followers scores 71,
above a 200-star one from an account with 100,000. The author term adds to a
real repository; it never supplies one.
- **A giant repository's fame is damped.** 486,000 stars against 15,000
followers means the *project* is famous, not the person, and a thousand skills
inherit the number. Past twenty times the author's following and 10,000 stars,
the repository term loses up to a third. The damping can only lower, never
lift, so it cannot undo the floor.

### Stars say "good", not "on topic"

The first live run answered "malware triage" with a REST-API skill out of a
half-million-star repository, at 97/100. It was a good source and not an answer.
So the search now reads the file — at most eight per search, because each read
is a GitHub call — and a file that does not mention the query's subject scores
zero however famous it is. Words every skill shares ("skill", "mcp", "agent")
are dropped before that comparison, since they cannot distinguish anything.

### Discovery, and the two searches behind it

`GET /api/skills/sources?q=` combines GitHub's code search (files that actually
mention the words — precise) with its repository search (collections that
mention them in a README — broad), inspects at most eight repositories, and
caps a single repository at 25 skills so a thousand-file collection cannot
crowd out everything else. A repository that cannot be read is one lost lead,
not a failed search; the panel is told what was skipped.

### Installing, and where it goes

`POST /api/skills/downloaded` re-reads the file from GitHub rather than trusting
the browser, checks its front matter against the spec (`name` present, valid,
matching the folder; `description` present), and writes
`<data>/skills/<name>/SKILL.md` atomically, with a `SOURCE` file recording the
repository, path, stars, author's following, date and score.

Outside the package on purpose: `pip install --upgrade` replaces the package
directory, and a skill the operator fetched should survive that and an
uninstall. Downloaded skills are listed beside the shipped ones with
`source: "downloaded"`, can shadow nothing that ships here, and are removed with
`DELETE /api/skills/downloaded/<name>` — which refuses a shipped skill.

A downloaded skill is untrusted prose an agent will follow. That is why the
file is re-fetched, size-capped at 256 KB, required to be UTF-8, validated
before it is written, and written outside the package rather than into the
library it is meant to extend.

## 8.5.0

MCP catches up with the protocol, and the preset list stops being the only
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NerveForge 8.5.0 ⚡ Arena.ai ↔ PC & Android Bridge
# NerveForge 8.6.0 ⚡ Arena.ai ↔ PC & Android Bridge

![NerveForge — Build boldly. Ship cleverly.](assets/nerveforge-lockup.png)

Expand Down Expand Up @@ -249,11 +249,11 @@ Full allowlist: `GET /api/quick` → `capabilities.public_upload.extensions`; ad

## 🧪 Tests and code quality

The repository ships **1762 automated unit tests** (Linux, Windows, Android/Termux, API, security,
The repository ships **1834 automated unit tests** (Linux, Windows, Android/Termux, API, security,
tunnels). CI runs them on Linux and Windows:

```bash
python3 -m unittest discover -s tests -v # 1762 tests
python3 -m unittest discover -s tests -v # 1834 tests
python3 -m compileall -q src tests run.py # Python bytecode
find static -name '*.js' -print0 | xargs -0 -n1 node --check # JavaScript syntax # JS syntax
bash -n setup.sh && bash -n setup_termux.sh # shell installers
Expand Down Expand Up @@ -316,7 +316,7 @@ nerveforge/
│ ├── uzhas_manager.py # Shell runner with timeout and tree cancellation
│ └── workspace_manager.py # File operations, bwrap sandbox, public uploads
├── static/ # Web panel assets (HTML, CSS, JS)
├── tests/ # Unit tests (1762 tests)
├── tests/ # Unit tests (1834 tests)
├── pyproject.toml # PEP 517/518 build metadata
├── run.py # Run in place
├── setup.sh / setup_windows.ps1 / setup_termux.sh
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Security policy — NerveForge 8.5.0
# Security policy — NerveForge 8.6.0

**English** · [Русский](docs/ru/SECURITY.md)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.5.0
8.6.0
4 changes: 4 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ the public uploads are reachable. Bodies are JSON objects; errors are
| `GET` | `^/api/skills/[^/]+/[Ss][Kk][Ii][Ll][Ll]\.md$` | Bearer | **One skill as SKILL.md.** `/api/skills/<id>/SKILL.md` — `text/markdown`: the agent-skills standard file for this skill, front matter included. `/skill.md` and `/SKILL.md` both answer. Drop it into `.agents/skills/<id>/` and another client has the same procedure. |
| `GET` | `/api/skills/bundle` | Bearer | **Every skill as SKILL.md.** `{version, skills: [{id, path, content}]}` — the whole catalogue ready to be written to disk in one request. |
| `GET` | `^/api/skills/[^/]+/validate$` | Bearer | **Check a skill against the spec (path /api/skills/<id>/validate).** `{valid, problems}`: the name rules, the 1024-character description limit and whether the folder, the file and the name agree. |
| `GET` | `/api/skills/sources` | Bearer | **Skill sources on GitHub.** `?q=` searches GitHub for `SKILL.md` files that mention the words and ranks them by repository stars, the author's following and the last commit, halved for a file that does not talk about the query. The only skills route that reaches the network; at most eight files are read per search. |
| `POST` | `/api/skills/downloaded` | Bearer | **Install a skill from GitHub.** `{"repository", "path"}`. Re-reads the file from GitHub, checks its front matter and writes `<data>/skills/<name>/SKILL.md`. Refuses a name that breaks the Agent Skills rules. |
| `GET` | `/api/skills/downloaded` | Bearer | **Downloaded skills.** What was installed from GitHub, with the repository, star count and date recorded at install time. |
| `DELETE/POST` | `^/api/skills/downloaded/[a-z0-9][a-z0-9-]{0,63}$` | Bearer | **Remove a downloaded skill.** Deletes `<data>/skills/<name>/`. A skill that ships with the bridge is never removed this way. |
| `GET` | `/api/tools` | Bearer | **Tool registry.** External programs and libraries (ghidra, yara, volatility3...) with `available`, `via` (`binary`|`module`), `path`, `downloadable` and package names per manager. |
| `GET` | `/api/tools/plan` | Bearer | **Tool install plan.** What a download would fetch for `?id=`: repo, asset name, target path. `downloadable: false` comes with the reason and the packages. |
| `POST` | `/api/tools/install` | Bearer | **Install a tool.** `{"id": "radare2"}`. Fetches the latest release asset, verifies the SHA-256 from the same GitHub response and writes it to the data dir with mode `0700`. `409` when the download fails or a digest is missing; no partial file is left. Only tools that publish a standalone asset can be installed this way. |
Expand Down
36 changes: 36 additions & 0 deletions docs/TOOLKIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,42 @@ matter is generated by `skillcatalog.front_matter()` rather than written into th
version of the bridge that produced a copy is recorded in it and the two representations cannot
argue about the tool list.

### Skills from GitHub, and which one to take

Twelve skills ship with the bridge. More exist than could ever be written here, so
`GET /api/skills/sources?q=` searches GitHub for `SKILL.md` files and ranks what it finds, and
the panel has the same search on the Skills screen. `POST /api/skills/downloaded` installs one;
it writes `<data>/skills/<name>/SKILL.md`, outside the package, so `pip install --upgrade` does
not replace it and an uninstall does not take the operator's skills with it. A removed one is
gone with `DELETE /api/skills/downloaded/<name>`, which refuses a skill that ships here.

The ranking (`toolkit/skillrank.py`) is deliberately explainable, because the interesting part
is disagreeing with it. Three things are weighed:

| Signal | Weight | Why |
|---|---|---|
| Repository stars | 6 | The only evidence anyone other than the author has looked at it |
| Author's standing | 4 | Followers, plus a little for how much else they publish |
| Freshness | 3 | A skill is prose about a tool; a year of silence means the tool moved on |

Three rules shape the result, and each exists because of a case that actually happens:

- **The floor is absolute.** Under 100 stars a repository scores zero however famous its
author. A 100k-follower account with a twenty-star repository is not evidence of anything.
- **The author cannot rescue, only lift.** The exception the operator named — an unknown
author whose repository is nevertheless well known — is normal here and scores well: a 4,000
star repository with three followers scores 71, above a 200-star one from an account with
100k. The author term adds to a real repository; it never supplies one.
- **A giant repository's fame is damped.** 486,000 stars against 15,000 followers means the
*project* is famous, not the person, and a thousand skills inherit the number. Past twenty
times the author's following and 10,000 stars, the repository term loses up to a third.

Stars say a source is good; they say nothing about whether it is on topic. So the search reads
the file (at most eight per search — each read is a GitHub call), and a file that does not
mention the query's subject scores zero however famous it is. That one rule is what turned the
first live run's answer from "half a million stars, about REST APIs" into the malware triage
skills the query was actually for.

The verdict travels with the file only as far as `metadata.tools`: another client will read it but
cannot check it, because it does not know what is installed on this machine. That check stays here,
where the answer is real.
Expand Down
4 changes: 4 additions & 0 deletions docs/ru/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
| `GET` | `^/api/skills/[^/]+/[Ss][Kk][Ii][Ll][Ll]\.md$` | Bearer | **Навык как SKILL.md.** `text/markdown`: файл стандарта agent-skills для этого навыка вместе с front matter. Отвечают и `/skill.md`, и `/SKILL.md`. Положите его в `.agents/skills/<id>/` — и у другого клиента та же процедура. |
| `GET` | `/api/skills/bundle` | Bearer | **Все навыки как SKILL.md.** `{version, skills: [{id, path, content}]}` — весь каталог, готовый лечь на диск одним запросом. |
| `GET` | `^/api/skills/[^/]+/validate$` | Bearer | **Проверка навыка по спецификации.** `{valid, problems}`: правила имени, лимит описания в 1024 символа и совпадение папки, файла и имени. |
| `GET` | `/api/skills/sources` | Bearer | **Источники скиллов на GitHub.** `?q=` ищет на GitHub файлы `SKILL.md`, где есть эти слова, и ранжирует их по звёздам репозитория, подписчикам автора и дате последнего коммита, штрафуя файл, который не про запрос. Единственный маршрут скиллов с выходом в сеть; за поиск читается не больше восьми файлов. |
| `POST` | `/api/skills/downloaded` | Bearer | **Установить скилл с GitHub.** `{"repository", "path"}`. Заново читает файл с GitHub, проверяет front matter и пишет `<data>/skills/<name>/SKILL.md`. Отказывает имени, которое нарушает правила Agent Skills. |
| `GET` | `/api/skills/downloaded` | Bearer | **Скачанные скиллы.** Что установлено с GitHub, с репозиторием, числом звёзд и датой, записанными при установке. |
| `DELETE/POST` | `^/api/skills/downloaded/[a-z0-9][a-z0-9-]{0,63}$` | Bearer | **Удалить скачанный скилл.** Удаляет `<data>/skills/<name>/`. Скилл, поставляемый с мостом, так не удаляется. |
| `GET` | `/api/tools` | Bearer | **Реестр инструментов.** Внешние программы и библиотеки (ghidra, yara, volatility3...) с `available`, `via` (`binary`|`module`), `path`, `downloadable` и именами пакетов по менеджерам. |
| `GET` | `/api/tools/plan` | Bearer | **План установки инструмента.** Что скачает кнопка для `?id=`: репозиторий, имя ассета, путь. При `downloadable: false` — причина и пакеты. |
| `POST` | `/api/tools/install` | Bearer | **Установить инструмент.** `{"id": "radare2"}`. Берёт последний ассет релиза, сверяет SHA-256 из того же ответа GitHub и кладёт в папку данных с правами `0700`. `409`, если скачивание сорвалось или нет digest; недокачанный файл не остаётся. Так ставятся только инструменты с отдельным ассетом. |
Expand Down
Loading
Loading