From 0072319d50efec15ca1916b6e07ada8345e642e9 Mon Sep 17 00:00:00 2001 From: Harenome Ranaivoarivony-Razanajato Date: Fri, 27 Nov 2026 17:40:14 +0100 Subject: [PATCH] docs(catalogue): call a capability a Module in pages, docs, commands and skills --- .../skills/docs-drift/scripts/check_docs.py | 4 +- .agents/skills/import-agent/SKILL.md | 8 +- .agents/skills/import-benchmark/SKILL.md | 12 +- .agents/skills/import-capability/SKILL.md | 228 +---------------- .agents/skills/import-feature/SKILL.md | 4 +- .agents/skills/import-module/SKILL.md | 230 ++++++++++++++++++ .agents/skills/import-standard/SKILL.md | 36 +-- .agents/skills/remove-integration/SKILL.md | 4 +- .agents/skills/ui-sweep/SKILL.md | 2 +- .agents/skills/ui-sweep/scripts/sweep.py | 6 +- .claude/rules/ui.md | 2 +- AGENTS.md | 4 +- CONTRIBUTING.md | 8 +- README.md | 18 +- SECURITY.md | 2 +- app/.env.example | 2 +- app/nullius/client.py | 2 +- app/nullius/mcp_server.py | 2 +- app/nullius/settings.py | 2 +- app/nullius/standard/cli.py | 22 +- app/nullius/standard/contract/definitions.py | 25 +- app/nullius/standard/contract/match.py | 2 +- app/nullius/standard/contract/proofs.py | 2 +- .../standard/kits/cap-memory-v1/standard.json | 2 +- app/nullius/standard/pages/howto.py | 9 +- app/nullius/standard/pages/recipe.py | 8 +- app/nullius/standard/runner/merge.py | 4 +- app/nullius/standard/runner/run.py | 4 +- app/packaging/PYPI.md | 4 +- app/packaging/verify.py | 2 +- app/site/README.md | 2 +- app/site/check_navigation.py | 2 +- app/site/hooks.py | 29 +++ app/site/mkdocs.yml | 10 +- app/site/readme_media.py | 2 +- app/static/builder/command-builder.js | 6 +- app/static/catalogue/agents/README.md | 2 +- app/templates/agents/entry.html | 6 +- app/templates/agents/kits.html | 4 +- app/templates/agents/standard.html | 15 +- app/templates/base.html | 4 +- app/templates/builder/agents.html | 4 +- app/templates/catalogue/add_dialog.html | 2 +- app/tests/catalogue_docs.py | 14 +- app/tests/test_site.py | 29 +++ app/tests/test_standard_howto.py | 2 +- app/tests/test_standard_own_image.py | 2 +- app/tests/test_standard_recipe.py | 2 +- app/tests/test_standard_run.py | 2 +- app/tests/test_standard_shard.py | 2 +- app/tests/test_unified_cli.py | 2 +- app/ui_tests/test_add_dialog.py | 4 +- app/ui_tests/test_agents.py | 33 ++- app/ui_tests/test_builder_benchmarks.py | 2 +- app/ui_tests/test_every_route.py | 4 +- app/ui_tests/test_use_bundled.py | 2 +- app/web/agents.py | 16 +- app/web/catalogue.py | 4 +- docs/README.md | 8 +- docs/assets/nullius/readme/bring.svg | 2 +- docs/benchmarks/supported/README.md | 2 +- docs/builder.md | 4 +- docs/cli/README.md | 2 +- docs/cli/conform.md | 4 +- docs/cli/definitions.md | 4 +- docs/cli/fidelity.md | 2 +- docs/cli/pages.md | 2 +- docs/cli/prove.md | 2 +- docs/cli/run.md | 8 +- docs/cli/shard-and-merge.md | 2 +- docs/concepts.md | 12 +- docs/field-guide.md | 8 +- docs/how-it-works.md | 4 +- .../{capabilities => modules}/add-manually.md | 4 +- .../add-with-assistant.md | 8 +- .../supported/README.md | 20 +- .../supported/mem0.md | 0 docs/settings/README.md | 2 +- docs/settings/run-hosts.md | 2 +- docs/standard.md | 74 +++--- pyproject.toml | 2 +- 81 files changed, 572 insertions(+), 474 deletions(-) create mode 100644 .agents/skills/import-module/SKILL.md rename docs/{capabilities => modules}/add-manually.md (97%) rename docs/{capabilities => modules}/add-with-assistant.md (65%) rename docs/{capabilities => modules}/supported/README.md (73%) rename docs/{capabilities => modules}/supported/mem0.md (100%) diff --git a/.agents/skills/docs-drift/scripts/check_docs.py b/.agents/skills/docs-drift/scripts/check_docs.py index 97dd72fbe..9c06d1152 100755 --- a/.agents/skills/docs-drift/scripts/check_docs.py +++ b/.agents/skills/docs-drift/scripts/check_docs.py @@ -26,9 +26,9 @@ "app/nullius/catalogue/benchmarks/my-benchmark/standard.json": "docs/benchmarks/add-manually.md: created by the preceding new benchmark command", "app/nullius/catalogue/capabilities/my-memory/capability.py": - "docs/capabilities/add-manually.md: created by the preceding new capability command", + "docs/modules/add-manually.md: created by the preceding new capability command", "app/nullius/catalogue/capabilities/my-memory/capability.json": - "docs/capabilities/add-manually.md: created by the preceding new capability command", + "docs/modules/add-manually.md: created by the preceding new capability command", ".claude/environment.local.md": "AGENTS.md: gitignored and per checkout, so absent by design", "app/.env": diff --git a/.agents/skills/import-agent/SKILL.md b/.agents/skills/import-agent/SKILL.md index 84137c98a..2b990022c 100644 --- a/.agents/skills/import-agent/SKILL.md +++ b/.agents/skills/import-agent/SKILL.md @@ -11,7 +11,7 @@ description: >- agent, an ACP adapter, a new release of an agent already here - including a pasted "Add the agent NAME to Nullius. Source: LINK. Remark: TEXT." Not for a benchmark (import-standard, import-benchmark), nor a - memory or retriever (import-capability). + memory or retriever (import-module). --- # Import an agent @@ -106,7 +106,7 @@ Say the route in one line before going on: ` -> ACP itself | adapter non-interactive mode, stop: it cannot be driven without a loop of ours, and that is the user's question, not a default. -## Native interfaces and agent-capability combinations +## Native interfaces and agent-Module combinations Inspect the pinned upstream version for callable native operations and supported extension points. Record the interface and source evidence, including settings @@ -115,7 +115,7 @@ through thin adapters only. Do not replace native memory with conversation history, file search, an added retriever or our own implementation and label it native. Passing recall does not prove updates, forgetting or persistence. -When asked whether agent X can use capability Y, distinguish **native**, +When asked whether agent X can use Module Y, distinguish **native**, **augmented** (Y is added) and **replacement** (the native path is disabled or redirected to Y). Use only upstream-supported configuration, plugins or tools. Do not silently fall back to native behavior. Prove Y independently, then check @@ -124,7 +124,7 @@ Record both pins and the configuration; Y's proof alone does not prove X+Y. Report **not exposed**, **not tested** or **blocked** separately from a check that actually ran and **failed**. These are report terms, not schema fields. -The current runner and matcher separate agents from capabilities: no generic +The current runner and matcher separate agents from Modules: no generic swap recipe exists. Report that integration gap instead of inventing a port, writing unsupported definition fields or claiming a combination was tested. A new operation needs a generic contract and kit; a harder use of the same diff --git a/.agents/skills/import-benchmark/SKILL.md b/.agents/skills/import-benchmark/SKILL.md index f46b88566..ec4f69819 100644 --- a/.agents/skills/import-benchmark/SKILL.md +++ b/.agents/skills/import-benchmark/SKILL.md @@ -6,7 +6,7 @@ description: >- already in the catalogue (refresh it), in Harbor's registry, Hub or Harbor's adapters, or container tasks an agent works in (Harbor, via a new adapter), or scripts that answer and score (Nullius: its own scripts run as published - as its Original setup, beside any agent or capability that fits; a user's fork + as its Original setup, beside any agent or Module that fits; a user's fork is a version of it). Writes a Harbor catalogue entry when asked; for Nullius, hands over to import-standard. Use whenever someone wants to add, import, onboard or "support" a benchmark, a paper's repo or their own fork. @@ -25,8 +25,8 @@ A route that would need our own copy of upstream logic is not taken by default: say what and why, and ask with the question tool before anything of it is written. -Two skills share the work (an agent goes to `import-agent`, a capability to -`import-capability`): +Two skills share the work (an agent goes to `import-agent`, a Module to +`import-module`): - **`import-benchmark`** (this one) - the route, a Harbor catalogue entry, and the workflow below; @@ -90,9 +90,9 @@ repository's layout: minutes, no download. | what you find | route | recommend | |---|---|---| | it is in the catalogue already | refresh that entry: a newer version, the current repository; on the standard, a new version (`import-standard`) | strongly - never a second way in for a benchmark the app runs | -| it is in Harbor's registry or Hub, Harbor has an adapter for it (`adapters//` in Harbor's repository), or its README runs `harbor run` | Harbor: a catalogue entry for that dataset | strongly, for Harbor's agents; the standard too when any agent or capability should run it | +| it is in Harbor's registry or Hub, Harbor has an adapter for it (`adapters//` in Harbor's repository), or its README runs `harbor run` | Harbor: a catalogue entry for that dataset | strongly, for Harbor's agents; the standard too when any agent or Module should run it | | container tasks: an agent works in an environment, a verifier scores inside it | Harbor style (an adapter, `harbor adapter init`), or the standard's own images (`import-standard`) | Harbor when it has the tasks already | -| scripts that answer and score: a QA set, a memory benchmark, a paper's evaluation script | Nullius: the paper's pipeline as its `original` setup, and a port for any agent or capability | as published; a user's fork is a version of the same entry | +| scripts that answer and score: a QA set, a memory benchmark, a paper's evaluation script | Nullius: the paper's pipeline as its `original` setup, and a port for any agent or Module | as published; a user's fork is a version of the same entry | Then ask the route - with the question tool, before any deep work, even when the table is clear: the user picks how it runs. Two options, the recommended @@ -101,7 +101,7 @@ one first with the table's reason in its description: - **Harbor** - its tasks as Harbor trials (a catalogue entry for a dataset Harbor has, or an adapter in Harbor's repository); - **Nullius** - through the Nullius standard: the paper's own scripts as - published (its Original setup) and any agent or capability that proved the + published (its Original setup) and any agent or Module that proved the ports it needs: hand over to `import-standard`. Leave out a route that cannot carry it, and say why in one line. If the user diff --git a/.agents/skills/import-capability/SKILL.md b/.agents/skills/import-capability/SKILL.md index d01866c2c..e65650078 100644 --- a/.agents/skills/import-capability/SKILL.md +++ b/.agents/skills/import-capability/SKILL.md @@ -1,230 +1,6 @@ --- name: import-capability -description: >- - Bring a capability - a memory layer, a retriever, a component a benchmark - calls - into the Nullius standard (docs/standard.md): install the real - library or repository pinned, wrap it in a thin JSON-lines capability.py that - calls it per its port, send its model calls through the relay, write - capability.json, try it by hand, check it, prove its port, run a capability - benchmark on a few units, and report decision first. Calls the library as - published; never re-implements it. Use whenever someone wants to add, - import, onboard, wrap, integrate or "plug in" a memory, a retriever or - another capability, including a pasted "Add the capability NAME to Nullius. - Source: LINK. Remark: TEXT." Not for an agent (import-agent), nor - a benchmark (import-standard, import-benchmark). +description: Compatibility alias for importing a Module into Nullius. --- -# Import a capability - -"The question tool" is whatever multiple-choice prompt it has, else -a plain question that waits for the answer. - -`cli` below is `nullius standard`; -`python -m nullius standard` also works with a Python that has Nullius -installed. From the checkout root: `PYTHONPATH=app python3 -m nullius.standard.cli`. Jobs go to `jobs_standard/` relative to the working -directory, or `--jobs PATH`; keep them outside package resources. Read -`docs/standard.md` ("A capability", "Versions") when available in a checkout, -otherwise the installed schema and examples below. An installation needs no -`app/` tree. - -## Locate the runtime and writable catalogue - -Run `nullius paths --json` in the app’s profile. Use `NULLIUS_HOME` for a separate profile and `NULLIUS_CATALOGUE` to override the catalogue. Keep personal state outside the package. - -Use the launcher’s Python for APIs. On POSIX with `uv tool`, set `NULLIUS_PY="$(uv tool dir)/nullius/bin/python"` and verify `"$NULLIUS_PY" -c 'import nullius; print(nullius.__file__)'`. For other installs, inspect the launcher. For -source inspection, use `NULLIUS_PY=python3` with `PYTHONPATH="$PWD/app"` on the -command below from the checkout root: - -```bash -"$NULLIUS_PY" - <<'PY' -from nullius import paths, settings -settings.load(paths.settings_file()) -from nullius.standard.contract import definitions, ports -from nullius.standard.pages import howto -for module in (definitions, howto, ports): - print(module.__name__, module.__file__) -print("catalogue:", paths.catalogue_dir()) -PY -``` - -For an installation, resolve `app/nullius/` references to installed modules. -In the same settings-loaded interpreter, `definitions.entry_dir("capability", key)` -locates the selected entry. Before editing it, use -`definitions.writable_dir("capability", key)` to copy the entire bundled folder -to the user catalogue. A user folder replaces its bundled counterpart in -full; keep its wrapper, JSON and other resources together. Never edit -`site-packages` or the private `_nullius_app` UI package. - -Default to a personal import: no source checkout, repository tests, generated -docs or sprite edits are needed. For a requested bundled contribution, -author/prove in a user or scratch catalogue, then copy only the intended entry -files into `app/nullius/catalogue/capabilities//` and use the repository gates -below. CLI mutations protect bundled resources in source checkouts too. - -## The rule: facilitator, not re-implementer - -- **Call the real thing.** `capability.py` imports the capability's own library - (or runs its own entry point) at the pinned version or commit, and does - only what the port needs: turn a JSON line into its own `add` and search - calls, and its result back into a line. Its storage, indexing, ranking, - embeddings and prompts stay its own - nothing copied, rewritten or - approximated. -- **Its dependencies are its own.** Installed by its `install` block into its - own environment, pinned; never into the app (Flask only). -- **Ask before re-implementing.** If the library cannot be called for a step - (no API for it, a service it needs that cannot run here, a prompt it keeps - private) and our own version of that step seems needed, stop: say what, - why, and what it changes about what is measured; ask with the question - tool and write nothing of it before the yes. Without a way to ask (a - subagent), report it as an open question and leave it unwritten. -- **A kind with no port yet** (see `app/nullius/standard/contract/ports.py`) is a generic change: a new port with a - kit, worded for every capability of its kind. Ask before adding it; this is a source contribution. - -## 1. Read the input (minutes, no install) - -The input is usually a name, a source link (a git repository, a PyPI or npm -page, a Hugging Face page) and a description. Find: - -1. **Already here?** `cli list` reads bundled and user entries together. A - new release of one already here is a version (step 5). -2. **The port** it fits, and its seam: the library's calls to store a - session and to answer a question with recalled text. -3. **How it installs:** a pinned package (its latest release), or a - repository at its latest release tag (recorded as `upstream.tag`, its - commit in `tested`; a commit of the default branch only when it has no - release or the user asks: `git ls-remote --tags`), its Python project folder, extras, Python version, - packages from another index (a CPU torch build), hub models to fetch at - install so a run needs no network. Never patch the library's bugs: keep - its behaviour, say it in the report (a one-clause note in `summary` only - when someone choosing it must know), ask when it blocks. -4. **Its model calls:** does it call a model (to extract, summarise, - embed remotely)? Which variables set its endpoint, key and model? -5. **Licence.** - -Say the route in one line: ` -> , installed from , model: `. - -## Native interfaces and agent-capability combinations - -Inspect the pinned upstream version for callable native operations and supported -extension points. Record the interface and source evidence, including settings -in the existing adapter that disable a native capability. Test what is exposed -through thin adapters only. Do not replace native memory with conversation -history, file search, an added retriever or our own implementation and label it -native. Passing recall does not prove updates, forgetting or persistence. - -When asked whether agent X can use capability Y, distinguish **native**, -**augmented** (Y is added) and **replacement** (the native path is disabled or -redirected to Y). Use only upstream-supported configuration, plugins or tools. -Do not silently fall back to native behavior. Prove Y independently, then check -the combination with evidence that X actually calls Y and uses its results. -Record both pins and the configuration; Y's proof alone does not prove X+Y. - -Report **not exposed**, **not tested** or **blocked** separately from a check -that actually ran and **failed**. These are report terms, not schema fields. -The current runner and matcher separate agents from capabilities: no generic -swap recipe exists. Report that integration gap instead of inventing a port, -writing unsupported definition fields or claiming a combination was tested. -A new operation needs a generic contract and kit; a harder use of the same -contract can be a kit skill. Follow the existing approval rule for new ports. -See `docs/standard.md`, "Native capabilities and composition". - -## 2. Scaffold, wrap, fill in - -1. `cli new capability KEY` writes `capabilities/KEY/capability.json` under the active - user catalogue, and a `capability.py` that already speaks `cap.memory/v1`. - Use the writable paths the command prints. -2. **Wrap** in `capability.py` (the shape `FEATURE_PY` in - `app/nullius/standard/pages/howto.py` shows): `add` gets a session `{id, date, - turns, text}` and stores it with the library's own call, replying `{}`; - `recall` gets the question and replies `{"memory": }` from the - library's own search; an error replies `{"error": ...}`. Send the - library's own output to stderr: stdout carries only the JSON lines. - **Everything it provides, and what it did.** Each setting the library - offers that changes its behaviour (extraction on or off, embedder, search - depth and threshold, reranking) becomes an option, its default the - library's own. Install the optional pieces its full behaviour needs when it - only warns without them (Mem0: keyword search, entity matching), pinned. - Each reply also carries `trace`, what the library did: what it wrote, each - hit with its scores, its own warnings (a failure it swallows shows only - there). Mem0's entry is the example. -3. **Try it by hand** with two lines in, two out (`TRY_FEATURE` in - `howto.py`), with the library installed in a throwaway environment - (`uv run --no-project --with python /absolute/path/to/capability.py`), - before Nullius is involved; never install the capability into Nullius's tool - environment. -4. **`capability.json`** (`FEATURE_JSON`, and `FEATURE_FROM_REPO` for one - installed from a repository): `upstream` (`package` and `version`, or - `repository` and a full `tested` commit; `license`), `kind`, `install` - (`pip` pinned as `name==version`, or `project`, `extras`, `python`, - `indexes`, `prefetch`, `wheels` for a wheel served only by URL, such as a - spaCy model, pinned by its sha256), `start.command` running the wrapper in that - environment (`{install}`, `{here}`), `env` for its own variables, and a - `model` block (`apis`, `env` with `{base_url}`, `{key}`, `{model}` under - the names it reads) when it calls a model, so those calls reach the relay. - `options` as an agent's, the agents' settings (`reasoning_effort`) among - them when it calls a model. Omit `offers` and `proven`: `cli conform` writes - the generated evidence in `proofs.json`, beside the definition. Never copy - another entry's proof file. -5. `cli check` - no problems. - -## 3. Prove - -1. `cli conform KEY --model ` - its port's kit (a capability needs - no `--unsandboxed`; `--backend container` runs it in a container). -2. When it calls a model: the kit trial's `agent/calls.jsonl` is not empty. - Empty means it went around the relay: point its own config at the relay, - never patch the library. -3. A capability benchmark: `cli list` shows which benchmarks need its port; run - one with `cli run BENCHMARK KEY --model --limit 10`, or - fewer. A trial shows the pipe works; it does not measure. -4. Read every failure before believing it: the capability's, the wrapper's, the - kit's or the definition's. Fix only what is ours; an upstream bug is an - issue for its repository, asked about first. -5. `cli check` and the focused UI check below complete a personal import, - together with the authorized proofs/trial. Report unavailable prerequisites - without claiming a proof. -6. **Bundled contributions only:** from the checkout root, refresh - `python3 app/tests/catalogue_docs.py --write`, run `python3 app/tests/parallel.py`, - the route suite (`uv run --no-project --with-requirements app/requirements.txt - python app/tests/parallel.py app/ui_tests`), and - `python3 .agents/skills/docs-drift/scripts/check_docs.py`. Use an isolated - profile with an empty user catalogue so personal overrides cannot mask the - contributed files. - -## 4. Open it - -`nullius serve /absolute/path/to/jobs_standard --no-debug`, with the same -profile/catalogue: the capability shows on the Capabilities tab with what it proved, -on the builder's Memory (or its kind's) step, and the trial page shows what was -recalled for each question. From source, use `uv run --no-project ---with-requirements app/requirements.txt app/app.py /absolute/path/to/jobs_standard ---no-debug`. Check these pages in the browser. - -## 5. A new release - -`cli new version KEY VERSION`, check the pins it was given, then `cli -conform KEY@VERSION --model `. Set `default` to make it the one -a bare key names - ask first. - -## 6. Report - decision first - -``` -capability : port: from: -destination: -proven: relay: -trial: units -ours: , -``` - -Then one table row per thing that does not work or differs, with **skip** -(said in its summary) / **local change** (ours, said) / **issue** (the -capability's repository) for each; the questions, with the question tool. No -account of what was read. Everything stays local: pull requests, issues and -anything upstream are asked about once it works, never by default. - -## Catalogue copy - -Write the entry's summary as one short sentence, ideally under 100 characters. -Name what it is and its distinguishing purpose. Keep installation requirements, -protocol mechanics and limitations in their dedicated fields or documentation. +Read and follow [import-module](../import-module/SKILL.md). diff --git a/.agents/skills/import-feature/SKILL.md b/.agents/skills/import-feature/SKILL.md index 165527efd..58c231219 100644 --- a/.agents/skills/import-feature/SKILL.md +++ b/.agents/skills/import-feature/SKILL.md @@ -1,6 +1,6 @@ --- name: import-feature -description: Compatibility alias for importing a capability into Nullius. +description: Compatibility alias for importing a Module into Nullius. --- -Read and follow [import-capability](../import-capability/SKILL.md). +Read and follow [import-module](../import-module/SKILL.md). diff --git a/.agents/skills/import-module/SKILL.md b/.agents/skills/import-module/SKILL.md new file mode 100644 index 000000000..9fb1cf53b --- /dev/null +++ b/.agents/skills/import-module/SKILL.md @@ -0,0 +1,230 @@ +--- +name: import-module +description: >- + Bring a Module - a memory layer, a retriever, a component a benchmark + calls - into the Nullius standard (docs/standard.md): install the real + library or repository pinned, wrap it in a thin JSON-lines capability.py that + calls it per its port, send its model calls through the relay, write + capability.json, try it by hand, check it, prove its port, run a Module + benchmark on a few units, and report decision first. Calls the library as + published; never re-implements it. Use whenever someone wants to add, + import, onboard, wrap, integrate or "plug in" a memory, a retriever or + another Module, including a pasted "Add the Module NAME to Nullius. + Source: LINK. Remark: TEXT." Not for an agent (import-agent), nor + a benchmark (import-standard, import-benchmark). +--- + +# Import a Module + +"The question tool" is whatever multiple-choice prompt it has, else +a plain question that waits for the answer. + +`cli` below is `nullius standard`; +`python -m nullius standard` also works with a Python that has Nullius +installed. From the checkout root: `PYTHONPATH=app python3 -m nullius.standard.cli`. Jobs go to `jobs_standard/` relative to the working +directory, or `--jobs PATH`; keep them outside package resources. Read +`docs/standard.md` ("A capability", "Versions") when available in a checkout, +otherwise the installed schema and examples below. An installation needs no +`app/` tree. + +## Locate the runtime and writable catalogue + +Run `nullius paths --json` in the app’s profile. Use `NULLIUS_HOME` for a separate profile and `NULLIUS_CATALOGUE` to override the catalogue. Keep personal state outside the package. + +Use the launcher’s Python for APIs. On POSIX with `uv tool`, set `NULLIUS_PY="$(uv tool dir)/nullius/bin/python"` and verify `"$NULLIUS_PY" -c 'import nullius; print(nullius.__file__)'`. For other installs, inspect the launcher. For +source inspection, use `NULLIUS_PY=python3` with `PYTHONPATH="$PWD/app"` on the +command below from the checkout root: + +```bash +"$NULLIUS_PY" - <<'PY' +from nullius import paths, settings +settings.load(paths.settings_file()) +from nullius.standard.contract import definitions, ports +from nullius.standard.pages import howto +for module in (definitions, howto, ports): + print(module.__name__, module.__file__) +print("catalogue:", paths.catalogue_dir()) +PY +``` + +For an installation, resolve `app/nullius/` references to installed modules. +In the same settings-loaded interpreter, `definitions.entry_dir("capability", key)` +locates the selected entry. Before editing it, use +`definitions.writable_dir("capability", key)` to copy the entire bundled folder +to the user catalogue. A user folder replaces its bundled counterpart in +full; keep its wrapper, JSON and other resources together. Never edit +`site-packages` or the private `_nullius_app` UI package. + +Default to a personal import: no source checkout, repository tests, generated +docs or sprite edits are needed. For a requested bundled contribution, +author/prove in a user or scratch catalogue, then copy only the intended entry +files into `app/nullius/catalogue/capabilities//` and use the repository gates +below. CLI mutations protect bundled resources in source checkouts too. + +## The rule: facilitator, not re-implementer + +- **Call the real thing.** `capability.py` imports the Module's own library + (or runs its own entry point) at the pinned version or commit, and does + only what the port needs: turn a JSON line into its own `add` and search + calls, and its result back into a line. Its storage, indexing, ranking, + embeddings and prompts stay its own - nothing copied, rewritten or + approximated. +- **Its dependencies are its own.** Installed by its `install` block into its + own environment, pinned; never into the app (Flask only). +- **Ask before re-implementing.** If the library cannot be called for a step + (no API for it, a service it needs that cannot run here, a prompt it keeps + private) and our own version of that step seems needed, stop: say what, + why, and what it changes about what is measured; ask with the question + tool and write nothing of it before the yes. Without a way to ask (a + subagent), report it as an open question and leave it unwritten. +- **A kind with no port yet** (see `app/nullius/standard/contract/ports.py`) is a generic change: a new port with a + kit, worded for every Module of its kind. Ask before adding it; this is a source contribution. + +## 1. Read the input (minutes, no install) + +The input is usually a name, a source link (a git repository, a PyPI or npm +page, a Hugging Face page) and a description. Find: + +1. **Already here?** `cli list` reads bundled and user entries together. A + new release of one already here is a version (step 5). +2. **The port** it fits, and its seam: the library's calls to store a + session and to answer a question with recalled text. +3. **How it installs:** a pinned package (its latest release), or a + repository at its latest release tag (recorded as `upstream.tag`, its + commit in `tested`; a commit of the default branch only when it has no + release or the user asks: `git ls-remote --tags`), its Python project folder, extras, Python version, + packages from another index (a CPU torch build), hub models to fetch at + install so a run needs no network. Never patch the library's bugs: keep + its behaviour, say it in the report (a one-clause note in `summary` only + when someone choosing it must know), ask when it blocks. +4. **Its model calls:** does it call a model (to extract, summarise, + embed remotely)? Which variables set its endpoint, key and model? +5. **Licence.** + +Say the route in one line: ` -> , installed from , model: `. + +## Native interfaces and agent-Module combinations + +Inspect the pinned upstream version for callable native operations and supported +extension points. Record the interface and source evidence, including settings +in the existing adapter that disable a native capability. Test what is exposed +through thin adapters only. Do not replace native memory with conversation +history, file search, an added retriever or our own implementation and label it +native. Passing recall does not prove updates, forgetting or persistence. + +When asked whether agent X can use Module Y, distinguish **native**, +**augmented** (Y is added) and **replacement** (the native path is disabled or +redirected to Y). Use only upstream-supported configuration, plugins or tools. +Do not silently fall back to native behavior. Prove Y independently, then check +the combination with evidence that X actually calls Y and uses its results. +Record both pins and the configuration; Y's proof alone does not prove X+Y. + +Report **not exposed**, **not tested** or **blocked** separately from a check +that actually ran and **failed**. These are report terms, not schema fields. +The current runner and matcher separate agents from Modules: no generic +swap recipe exists. Report that integration gap instead of inventing a port, +writing unsupported definition fields or claiming a combination was tested. +A new operation needs a generic contract and kit; a harder use of the same +contract can be a kit skill. Follow the existing approval rule for new ports. +See `docs/standard.md`, "Native capabilities and composition". + +## 2. Scaffold, wrap, fill in + +1. `cli new capability KEY` writes `capabilities/KEY/capability.json` under the active + user catalogue, and a `capability.py` that already speaks `cap.memory/v1`. + Use the writable paths the command prints. +2. **Wrap** in `capability.py` (the shape `FEATURE_PY` in + `app/nullius/standard/pages/howto.py` shows): `add` gets a session `{id, date, + turns, text}` and stores it with the library's own call, replying `{}`; + `recall` gets the question and replies `{"memory": }` from the + library's own search; an error replies `{"error": ...}`. Send the + library's own output to stderr: stdout carries only the JSON lines. + **Everything it provides, and what it did.** Each setting the library + offers that changes its behaviour (extraction on or off, embedder, search + depth and threshold, reranking) becomes an option, its default the + library's own. Install the optional pieces its full behaviour needs when it + only warns without them (Mem0: keyword search, entity matching), pinned. + Each reply also carries `trace`, what the library did: what it wrote, each + hit with its scores, its own warnings (a failure it swallows shows only + there). Mem0's entry is the example. +3. **Try it by hand** with two lines in, two out (`TRY_FEATURE` in + `howto.py`), with the library installed in a throwaway environment + (`uv run --no-project --with python /absolute/path/to/capability.py`), + before Nullius is involved; never install the Module into Nullius's tool + environment. +4. **`capability.json`** (`FEATURE_JSON`, and `FEATURE_FROM_REPO` for one + installed from a repository): `upstream` (`package` and `version`, or + `repository` and a full `tested` commit; `license`), `kind`, `install` + (`pip` pinned as `name==version`, or `project`, `extras`, `python`, + `indexes`, `prefetch`, `wheels` for a wheel served only by URL, such as a + spaCy model, pinned by its sha256), `start.command` running the wrapper in that + environment (`{install}`, `{here}`), `env` for its own variables, and a + `model` block (`apis`, `env` with `{base_url}`, `{key}`, `{model}` under + the names it reads) when it calls a model, so those calls reach the relay. + `options` as an agent's, the agents' settings (`reasoning_effort`) among + them when it calls a model. Omit `offers` and `proven`: `cli conform` writes + the generated evidence in `proofs.json`, beside the definition. Never copy + another entry's proof file. +5. `cli check` - no problems. + +## 3. Prove + +1. `cli conform KEY --model ` - its port's kit (a Module needs + no `--unsandboxed`; `--backend container` runs it in a container). +2. When it calls a model: the kit trial's `agent/calls.jsonl` is not empty. + Empty means it went around the relay: point its own config at the relay, + never patch the library. +3. A Module benchmark: `cli list` shows which benchmarks need its port; run + one with `cli run BENCHMARK KEY --model --limit 10`, or + fewer. A trial shows the pipe works; it does not measure. +4. Read every failure before believing it: the Module's, the wrapper's, the + kit's or the definition's. Fix only what is ours; an upstream bug is an + issue for its repository, asked about first. +5. `cli check` and the focused UI check below complete a personal import, + together with the authorized proofs/trial. Report unavailable prerequisites + without claiming a proof. +6. **Bundled contributions only:** from the checkout root, refresh + `python3 app/tests/catalogue_docs.py --write`, run `python3 app/tests/parallel.py`, + the route suite (`uv run --no-project --with-requirements app/requirements.txt + python app/tests/parallel.py app/ui_tests`), and + `python3 .agents/skills/docs-drift/scripts/check_docs.py`. Use an isolated + profile with an empty user catalogue so personal overrides cannot mask the + contributed files. + +## 4. Open it + +`nullius serve /absolute/path/to/jobs_standard --no-debug`, with the same +profile/catalogue: the Module shows on the Modules tab with what it proved, +on the builder's Memory (or its kind's) step, and the trial page shows what was +recalled for each question. From source, use `uv run --no-project +--with-requirements app/requirements.txt app/app.py /absolute/path/to/jobs_standard +--no-debug`. Check these pages in the browser. + +## 5. A new release + +`cli new version KEY VERSION`, check the pins it was given, then `cli +conform KEY@VERSION --model `. Set `default` to make it the one +a bare key names - ask first. + +## 6. Report - decision first + +``` +Module : port: from: +destination: +proven: relay: +trial: units +ours: , +``` + +Then one table row per thing that does not work or differs, with **skip** +(said in its summary) / **local change** (ours, said) / **issue** (the +Module's repository) for each; the questions, with the question tool. No +account of what was read. Everything stays local: pull requests, issues and +anything upstream are asked about once it works, never by default. + +## Catalogue copy + +Write the entry's summary as one short sentence, ideally under 100 characters. +Name what it is and its distinguishing purpose. Keep installation requirements, +protocol mechanics and limitations in their dedicated fields or documentation. diff --git a/.agents/skills/import-standard/SKILL.md b/.agents/skills/import-standard/SKILL.md index bda6166bc..54d75aaaa 100644 --- a/.agents/skills/import-standard/SKILL.md +++ b/.agents/skills/import-standard/SKILL.md @@ -1,17 +1,17 @@ --- name: import-standard description: >- - Bring a benchmark, an agent or a capability into Nullius through the Nullius - standard (docs/standard.md): ports a benchmark needs and an agent or capability + Bring a benchmark, an agent or a Module into Nullius through the Nullius + standard (docs/standard.md): ports a benchmark needs and an agent or Module proves, ACP to drive agents, MCP for environments, JSON-lines drivers, the relay for every model call. Finds the kind and the ports, writes the definition and its driver or wrapper, pins and checks it, runs a two-unit trial and the conformance kits, and reports decision first. Calls the upstream's own code at a pinned commit; never re-implements it without the user's yes. Use whenever someone wants to add, import, onboard or wrap a - benchmark meant for any agent or any capability - even if they never say - "standard" or "port". An agent goes to import-agent, a capability to - import-capability (this skill still works for them). Not for Harbor benchmarks + benchmark meant for any agent or any Module - even if they never say + "standard" or "port". An agent goes to import-agent, a Module to + import-module (this skill still works for them). Not for Harbor benchmarks run by Harbor agents (import-benchmark), nor for converting existing run output (nullius.importers). --- @@ -91,7 +91,7 @@ profile and an empty user catalogue so an overlay cannot hide the contribution. its loader, prompts, tools, user simulator, scorer, library, CLI or ACP adapter - called or imported at the pinned commit or version, never copied or rewritten. Its dependencies live in its own environment (the driver's, -the agent's, the capability's install), never in the app (Flask only) and never +the agent's, the Module's install), never in the app (Flask only) and never in the agent's environment for a benchmark's needs. Our code is glue only: a thin driver or wrapper that calls the upstream, the pins, the install, the relay, the ACP client, the kits, reading results. @@ -120,7 +120,7 @@ subagent), report it as an open question and leave it unwritten. | tasks and a way to score them, meant for any agent | benchmark, `agent` family | driver + `standard.json` | | questions over a history, meant for a memory or retriever | benchmark, `capability` family | driver with `produce` + `standard.json` | | a program that does tasks with a model (CLI agent, coding agent) | agent | the `import-agent` skill (`.agents/skills/import-agent/SKILL.md`); its Agent part below if invoked here | -| a component a benchmark calls (memory, retriever) | capability | the `import-capability` skill (`.agents/skills/import-capability/SKILL.md`); its Capability part below if invoked here | +| a component a benchmark calls (memory, retriever) | Module | the `import-module` skill (`.agents/skills/import-module/SKILL.md`); its Module part below if invoked here | | a benchmark Harbor already runs, for Harbor agents | not this skill | `import-benchmark` | | the user's own source of a benchmark already here (a fork with a fix, any repository, private included) | a version of that benchmark | `versions..upstream`, below | @@ -171,7 +171,7 @@ prints the writable folder under the active user catalogue. Work there, then: `$NULLIUS_UPSTREAM` at the pinned commit - the driver translates JSON lines to those calls and back, nothing more. When the upstream needs packages of its own, the driver gets an environment of them: an `install` block shaped - like a capability's (`pip` pinned, or `project` from the upstream, `python`, + like a Module's (`pip` pinned, or `project` from the upstream, `python`, `indexes`), its command using `{install}`; read the current schema (`cli check`, `docs/standard.md`) for the exact form before writing it. An MCP server of the environment's tools is the upstream's tools served @@ -204,8 +204,8 @@ prints the writable folder under the active user catalogue. Work there, then: pipeline) with the paper's models is the `original` setup, every mode the paper reports a row of it (whole context and retrieval alike); the same pipeline with another model is the `model` setup; a pipeline the paper - measures as a memory or retriever is also offered as a reference capability, - so other capabilities compare with it. Models the upstream's code asks + measures as a memory or retriever is also offered as a reference Module, + so other Modules compare with it. Models the upstream's code asks besides the answerer (an extraction or summary model) are the original's `side_models`, sent as the provider names them (`served_as`), never as the reader; @@ -224,7 +224,7 @@ prints the writable folder under the active user catalogue. Work there, then: the machine's own hardware (a CUDA GPU) is a `host` requirement with a `check` (`nvidia-smi`) and no `install`. An option's `setups` says which ways of running it belongs to (`original`, `model`, or `yours`, the agent - or capability under test); an + or Module under test); an option that only matters under another's values (a top-k, only with a retrieval) names them in `when`; `label` when the name does not read (an acronym, a run-together word); `summary` one sentence (a tooltip), @@ -309,7 +309,7 @@ prints the writable folder under the active user catalogue. Work there, then: so its calls reach the relay. Prove it: after a trial, `agent/calls.jsonl` holds its calls. Empty means it went around the relay - declare the relay as a provider of its own in a config file. -- A new release of an agent or a capability already in the catalogue is a +- A new release of an agent or a Module already in the catalogue is a version, not a new folder: `cli new version KEY VERSION`, check its pins, then `cli conform KEY@VERSION` (`docs/standard.md`, "Versions"). An adapter whose core floats (a caret range) gets the core pinned in `install` too. @@ -318,7 +318,7 @@ prints the writable folder under the active user catalogue. Work there, then: own gets `fidelity.command`, then `cli fidelity KEY --model --unsandboxed` (`docs/standard.md`, "Options", "Fidelity"). -**Capability** (the `import-capability` skill has the full procedure). +**Module** (the `import-module` skill has the full procedure). `cli new capability KEY`, then wrap the real component in `capability.py`, calls into its library and nothing of its logic rewritten: `add` stores, `recall` returns text. Packages pinned in `install.pip`; one that lives in a repository installs from it @@ -330,11 +330,11 @@ output to stderr: stdout carries the JSON lines. ## 4. Prove 1. `cli check` - no problems. -2. A benchmark: `cli run KEY --model --limit 2 [--unsandboxed]` +2. A benchmark: `cli run KEY --model --limit 2 [--unsandboxed]` (2 units, 3 at most: a trial shows the pipe works, it does not measure); each of its setups, `cli run KEY original --model --limit 2` (and `model`); then `cli prove KEY` (its controls, units, no leak). - An agent or capability: `cli conform KEY --model [--unsandboxed]`. + An agent or Module: `cli conform KEY --model [--unsandboxed]`. A value that needs a `host` requirement this machine lacks (a GPU) is proven on a machine that has it: choose a host from Settings and launch the short trial from the builder's Review step. A host run sends the current standard runtime and effective catalogue, user additions included; settings and credentials are never in entry folders or payloads. @@ -353,7 +353,7 @@ output to stderr: stdout carries the JSON lines. 4. Open the job in the app (`nullius serve /absolute/path/to/jobs_standard --no-debug`, using the same profile/catalogue) and look at the trial page. From a checkout: `uv run --no-project --with-requirements app/requirements.txt - app/app.py /absolute/path/to/jobs_standard --no-debug`. Check the new definition is offered where it should be: the Agents or Capabilities tab, the builder's *Nullius* runner. Use a focused browser + app/app.py /absolute/path/to/jobs_standard --no-debug`. Check the new definition is offered where it should be: the Agents or Modules tab, the builder's *Nullius* runner. Use a focused browser check; `/ui-sweep --only KEY` is available when that skill and its script are present. 5. **Personal import:** `cli check`, the authorized proofs/trials above, and @@ -380,8 +380,8 @@ if the instructions you were given already say yes. ``` : route: destination: -needs: fits: (a benchmark) -offers: proven: (an agent or a capability) +needs: fits: (a benchmark) +offers: proven: (an agent or a Module) trial: units proven on: (a value needing a machine's setup) ours: , ... (every piece of our own code) diff --git a/.agents/skills/remove-integration/SKILL.md b/.agents/skills/remove-integration/SKILL.md index e2aac7289..4066ae47a 100644 --- a/.agents/skills/remove-integration/SKILL.md +++ b/.agents/skills/remove-integration/SKILL.md @@ -1,6 +1,6 @@ --- name: remove-integration -description: Remove a benchmark, agent or capability from the whole Nullius application, including its adapter, catalogue, proofs, documentation, tests and generated artifacts. Use for deleting or retiring an integration, not merely hiding its card or restoring a bundled entry. +description: Remove a benchmark, agent or Module from the whole Nullius application, including its adapter, catalogue, proofs, documentation, tests and generated artifacts. Use for deleting or retiring an integration, not merely hiding its card or restoring a bundled entry. --- # Remove an integration @@ -18,7 +18,7 @@ the user's requested scope, including logs and stored data when requested. fixtures and workflow files. Then scan ignored/generated files with `--hidden --no-ignore`, excluding `.git`; include bytecode and archive contents where relevant. Print matching paths rather than private log contents. -- Catalogue entries live under `app/nullius/catalogue/`. Capabilities can also +- Catalogue entries live under `app/nullius/catalogue/`. Modules can also have leftover folders under the legacy `features/` directory. Remove the whole entry folder: an empty folder can still be selected by the loader. - A benchmark's own agents are entries of its folder's `agents.json`: they go diff --git a/.agents/skills/ui-sweep/SKILL.md b/.agents/skills/ui-sweep/SKILL.md index 2dacbd5e8..f6495c448 100644 --- a/.agents/skills/ui-sweep/SKILL.md +++ b/.agents/skills/ui-sweep/SKILL.md @@ -15,7 +15,7 @@ definition checks and inspect the affected pages. No repository tests, generated The full sweep visits every benchmark in both builder runners, their steps and settings tabs, light and dark, the standard runner's Agent step at phone width, -and the Benchmarks, Agents and Capabilities pages. +and the Benchmarks, Agents and Modules pages. ## GitHub Actions diff --git a/.agents/skills/ui-sweep/scripts/sweep.py b/.agents/skills/ui-sweep/scripts/sweep.py index 4094ea961..8412fe2ed 100644 --- a/.agents/skills/ui-sweep/scripts/sweep.py +++ b/.agents/skills/ui-sweep/scripts/sweep.py @@ -5,8 +5,8 @@ Every benchmark the builder offers, on both runners, on every step that has a choice, light and dark; the Agent step again at phone width with every -reference setup and the first agent or capability that fits chosen, each -settings tab opened. Then the Benchmarks, Agents and Capabilities pages. Nothing +reference setup and the first agent or Module that fits chosen, each +settings tab opened. Then the Benchmarks, Agents and Modules pages. Nothing is named here: the benchmarks are read from the page, so a new one is swept too. It starts the builder over first (Start over), so a draft in this browser profile is not left as it was; it writes only under --out. @@ -113,7 +113,7 @@ def steps(): pg.set_viewport_size({"width": 1400, "height": 1000}) else: shot(f"{rname}-{key}-{slug(label)}") - for page in ("benchmarks", "agents", "capabilities"): + for page in ("benchmarks", "agents", "modules"): pg.goto(a.url.rstrip("/") + "/" + page, wait_until="networkidle") shot(f"page-{page}") pg.close() diff --git a/.claude/rules/ui.md b/.claude/rules/ui.md index 320bbd24b..a4f348715 100644 --- a/.claude/rules/ui.md +++ b/.claude/rules/ui.md @@ -58,7 +58,7 @@ also supports `--only KEY` for a focused benchmark check. line of yes or no asks in place. - **One step, one question; a setting sits with what it changes.** Dataset: which tasks. Agent (Memory): who runs it - the selected version's procedure by default, the - agents or capabilities that fit, the checks - and their settings. Where: + agents or Modules that fit, the checks - and their settings. Where: machines, local or container, the yes to running unsandboxed. - **Fair by construction**: a setting one agent offers, every agent whose upstream has it offers too. Examples are never offered as choices. diff --git a/AGENTS.md b/AGENTS.md index 0723c0ef4..05255397d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,7 @@ list, no history. an issue. - **Nearby code over assumptions.** Remove the code and comments your change makes obsolete. -- **Facilitator, not re-implementer.** A benchmark, agent or capability runs its +- **Facilitator, not re-implementer.** A benchmark, agent or Module runs its upstream's code at a pin, in its own environment. Ask before writing more than glue. - **Reuse before adding**, for example `ondisk`, `redact`, `paths`, `providers`. @@ -164,7 +164,7 @@ Short and plain: issues, pull requests, their comments, docs. | Any page | `.claude/rules/ui.md`; `/ui-sweep` only when asked | | Vocabulary | `docs/concepts.md` | | The standard, its ports and kits | `docs/standard.md` | -| Adding an entry | `/import-benchmark`, `/import-standard`, `/import-agent`, `/import-capability`; by hand, `add-manually.md` under its `docs/` folder | +| Adding an entry | `/import-benchmark`, `/import-standard`, `/import-agent`, `/import-module`; by hand, `add-manually.md` under its `docs/` folder | | Removing an entry | `/remove-integration` | | The run builder | `docs/builder.md`; `app/nullius/recipes/launch.py`; `app/static/builder/command-builder-core.js` | | A whole design | Docstrings of `execution.py`, `catalogue/catalog.py`, `harbor/source.py`, `runs/live.py` | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b33429aa..54b786e87 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ for the container backend and for Harbor recipes. `app/nullius/` for the backend, `app/web/` for routes, `app/templates/` and `app/static/` for the interface. - `docs/` is the documentation, published as the site. -- `app/nullius/catalogue/` holds the benchmarks, agents and capabilities, one folder +- `app/nullius/catalogue/` holds the benchmarks, agents and Modules, one folder each. [AGENTS.md](AGENTS.md) holds the rules every contributor and coding assistant @@ -40,14 +40,14 @@ follows. Read it before your first change. The tests require a Flask-free backend, one provider of `nullius`, and the template fields pinned in `app/tests/field_contract.json`. -## Bringing in a benchmark, an agent or a capability +## Bringing in a benchmark, an agent or a Module Use the import skills rather than writing an entry by hand: `/import-benchmark`, -`/import-standard`, `/import-agent` and `/import-capability` under +`/import-standard`, `/import-agent` and `/import-module` under `.agents/skills/`. Each pins the upstream, wraps the upstream's own code and proves what fits. Nullius is a facilitator, not a re-implementer: anything beyond glue is asked about first. The *+ Add* button on the Benchmarks, Agents -and Capabilities pages writes the prompt for any assistant. +and Modules pages writes the prompt for any assistant. ## Running the tests diff --git a/README.md b/README.md index 928241eb6..965b10a86 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Nullius runs AI evaluations on your machines and opens every score into the evidence behind it, so you know whether the agent failed or the benchmark did.\ -Add your own benchmark, agent or capability with a single prompt and iterate +Add your own benchmark, agent or Module with a single prompt and iterate faster. ## Quickstart @@ -50,16 +50,16 @@ profile. Save provider keys in Settings. ### Bring anything -*+ Add* on Benchmarks, Agents or Capabilities writes a prompt for your coding assistant. Its import skill pins the upstream, wraps the upstream's own code, proves it and reports what fits; it asks before adding any code of its own. Additions go in your user catalogue and survive application upgrades. +*+ Add* on Benchmarks, Agents or Modules writes a prompt for your coding assistant. Its import skill pins the upstream, wraps the upstream's own code, proves it and reports what fits; it asks before adding any code of its own. Additions go in your user catalogue and survive application upgrades. The import skills: `/import-benchmark`, -`/import-standard`, `/import-agent`, `/import-capability`. +`/import-standard`, `/import-agent`, `/import-module`. -Benchmarks, agents and capabilities come into one catalogue. +Benchmarks, agents and Modules come into one catalogue. ### Prove it fits -A benchmark names the ports it needs; an agent or a capability offers a port once its kit passes. Only pairs that fit are offered; a refusal names the missing port. +A benchmark names the ports it needs; an agent or a Module offers a port once its kit passes. Only pairs that fit are offered; a refusal names the missing port. A benchmark and an agent connect through a required port that the agent has proven. @@ -71,7 +71,7 @@ With no agent, the nop control must score nothing and the oracle everything; the ### Run anywhere -Several agents and datasets in one run. This machine, a host over ssh, or several machines, one shard each, merged into one job by `cli merge`. The container backend gives each unit's agent or capability its own container. On the Nullius standard a relay per unit holds the key, which the agent never sees, and records every model call. +Several agents and datasets in one run. This machine, a host over ssh, or several machines, one shard each, merged into one job by `cli merge`. The container backend gives each unit's agent or Module its own container. On the Nullius standard a relay per unit holds the key, which the agent never sees, and records every model call. The Run builder: **Runner → Benchmark → Dataset → Agent → Model → Limits → Where → Review**. Review checks each machine before Run; follow each trial in the job's @@ -97,7 +97,7 @@ The same benchmark before and after a change: the tasks both runs share, the one | Way in | Runs | Reads | |---|---|---| -| **Nullius standard** | Any agent (over ACP) or capability that proved the ports a benchmark needs; or the benchmark's own scripts as published, its *Original* setup. | Harbor-shaped job directories. | +| **Nullius standard** | Any agent (over ACP) or Module that proved the ports a benchmark needs; or the benchmark's own scripts as published, its *Original* setup. | Harbor-shaped job directories. | | **[Harbor](https://github.com/harbor-framework/harbor)** | Harbor's task folders in containers, with Harbor's agents. | Job directories from any Harbor agent. | | **ATIF** trajectories | — | ATIF documents, converted into one job. | | **OpenTelemetry** spans | — | OTLP/JSON span exports, converted into one job. | @@ -145,7 +145,7 @@ site](app/site/README.md). | [The Nullius standard](docs/standard.md) | Ports, kits, setups, controls, proofs; importing | | [Architecture](docs/how-it-works.md) | Execution paths, a run on disk, the pages | | [Settings](docs/settings/README.md) | Providers, Decision, LLM judge, hosts, keys | -| [Benchmarks](docs/benchmarks/supported/README.md), [Agents](docs/agents/supported/README.md), [Capabilities](docs/capabilities/supported/README.md) | What is supported; adding one | +| [Benchmarks](docs/benchmarks/supported/README.md), [Agents](docs/agents/supported/README.md), [Modules](docs/modules/supported/README.md) | What is supported; adding one | | [CLI](docs/cli/README.md) | Every command, by topic | | [Metric field guide](docs/field-guide.md) | Every metric and outcome | | [Repository map](AGENTS.md) | Layout, conventions, test commands | @@ -168,7 +168,7 @@ Copyright 2026 Nullius contributors. Nullius is licensed under the [Apache License 2.0](LICENSE), except where otherwise noted. Bundled fonts retain their [SIL Open Font License 1.1](app/static/fonts/README.md). Third-party benchmarks, -agents, capabilities and datasets retain their own licenses. +agents, Modules and datasets retain their own licenses. ## Credits diff --git a/SECURITY.md b/SECURITY.md index 8e37e4556..75b37b8d6 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -15,7 +15,7 @@ Things we would especially like to hear about: - A run getting at a provider key or host credential it should not have, or a key ending up in a log, a job tree or a generated recipe. -- A benchmark, agent or capability definition in the catalogue escaping the +- A benchmark, agent or Module definition in the catalogue escaping the environment it is meant to run in. - Anything reachable from the web interface that writes outside its workspace or the trial's own `agent/` directory. diff --git a/app/.env.example b/app/.env.example index 599ab73d0..aedd50d4b 100644 --- a/app/.env.example +++ b/app/.env.example @@ -16,7 +16,7 @@ # DEBUG: the Werkzeug debugger (or --no-debug) # RUNS_DIR: where runs started from the builder keep their script, log and job (default runs/ in the user data directory) # HARBOR_PINS: where the Harbor a recipe pins is built and kept on this machine (default harbor-pins/ beside the runs) -# STANDARD_DIR: where the Nullius standard installs agents, capabilities and benchmark upstreams (default standard/ in the user data directory) +# STANDARD_DIR: where the Nullius standard installs agents, Modules and benchmark upstreams (default standard/ in the user data directory) # STANDARD_DATA_DIR: where the Nullius standard keeps the datasets it downloads, which can be gigabytes (default datasets/ in STANDARD_DIR) # SECRETS_DIR: where each benchmark's licences (Settings → Custom keys) and the Hugging Face token (Settings → Data providers) are kept (default secrets/ in the user configuration directory) diff --git a/app/nullius/client.py b/app/nullius/client.py index 17c4e795c..7947fc3a5 100644 --- a/app/nullius/client.py +++ b/app/nullius/client.py @@ -253,7 +253,7 @@ def main(argv=None) -> int: ap.add_argument("--token", help="its token (NULLIUS_TOKEN)") sub = ap.add_subparsers(dest="cmd", required=True) sub.add_parser("info", help="the server's version, the token's scope, where a run can go") - sub.add_parser("catalogue", help="benchmarks, agents and capabilities") + sub.add_parser("catalogue", help="benchmarks, agents and Modules") sub.add_parser("workspaces") p = sub.add_parser("jobs", help="the jobs of the open workspace") p.add_argument("--workspace") diff --git a/app/nullius/mcp_server.py b/app/nullius/mcp_server.py index 9f1a36740..999289593 100644 --- a/app/nullius/mcp_server.py +++ b/app/nullius/mcp_server.py @@ -28,7 +28,7 @@ TOOLS = { "server_info": ("The server's version, this token's scope, and the machines a run can go to.", {}, [], lambda nx, a: nx.info()), - "catalogue": ("Benchmarks with their datasets, task sets and what fits each, agents and capabilities.", {}, [], + "catalogue": ("Benchmarks with their datasets, task sets and what fits each, agents and Modules.", {}, [], lambda nx, a: nx.catalogue()), "list_jobs": ("The jobs of the open workspace: dataset, agent, model, outcome counts, raw and adjusted solve rate.", {}, [], lambda nx, a: nx.jobs()), diff --git a/app/nullius/settings.py b/app/nullius/settings.py index 290b93cf3..c3f0b7e46 100644 --- a/app/nullius/settings.py +++ b/app/nullius/settings.py @@ -241,7 +241,7 @@ def validate(self, value: str) -> Optional[str]: "DEBUG": "the Werkzeug debugger (or --no-debug)", "RUNS_DIR": "where runs started from the builder keep their script, log and job (default runs/ in the user data directory)", "HARBOR_PINS": "where the Harbor a recipe pins is built and kept on this machine (default harbor-pins/ beside the runs)", - "STANDARD_DIR": "where the Nullius standard installs agents, capabilities and benchmark upstreams (default standard/ in the user data directory)", + "STANDARD_DIR": "where the Nullius standard installs agents, Modules and benchmark upstreams (default standard/ in the user data directory)", "STANDARD_DATA_DIR": "where the Nullius standard keeps the datasets it downloads, which can be gigabytes (default datasets/ in STANDARD_DIR)", "SECRETS_DIR": "where each benchmark's licences (Settings → Custom keys) and the Hugging Face token (Settings → Data providers) are kept (default secrets/ in the user configuration directory)", } diff --git a/app/nullius/standard/cli.py b/app/nullius/standard/cli.py index 7e9e2d01b..f6f947954 100644 --- a/app/nullius/standard/cli.py +++ b/app/nullius/standard/cli.py @@ -113,7 +113,7 @@ def _all(): def _other(key): o = definitions.get("agent", key) or definitions.get("capability", key) if not o: - sys.exit(f"no agent or capability {key!r}: {[d['_ref'] for k in ('agent', 'capability') for d in definitions.load(k, every=True)[0]]}") + sys.exit(f"no agent or Module {key!r}: {[d['_ref'] for k in ('agent', 'capability') for d in definitions.load(k, every=True)[0]]}") return o @@ -199,7 +199,7 @@ def cmd_pins(a): def cmd_list(a): got, bad = _all() for kind in definitions.KINDS: - print(definitions.KINDS[kind]["dir"] + ":") + print(("Modules" if kind == "capability" else definitions.KINDS[kind]["dir"]) + ":") for d in got[kind]: side = d.get("needs") if kind == "benchmark" else d.get("offers") print(f" {d.get('_ref') or d['key']:<18} {('needs ' if kind == 'benchmark' else 'offers ') + ', '.join(side or []) or 'nothing proven yet'}" @@ -274,7 +274,7 @@ def cmd_fit(a): b = definitions.get("benchmark", a.benchmark) if not b: sys.exit(f"no benchmark {a.benchmark!r}") - print(f"{b['label']} ({b['family']} benchmark) needs: " + ", ".join(b["needs"])) + print(f"{b['label']} ({definitions.said(b['family'])} benchmark) needs: " + ", ".join(b["needs"])) for p in b["needs"]: print(f" {p}: {ports.PORTS[p]['summary']}") have = definitions.port_skills(p) @@ -317,7 +317,7 @@ def units(dataset): def setup(unit, dir): # fill dir, the unit's workspace; return the prompt (agent family) or - # {{"memory": {{"add": [...], "recall": [...]}}}} (a memory capability) + # {{"memory": {{"add": [...], "recall": [...]}}}} (a memory Module) return {{"prompt": ""}} {extra} @@ -346,7 +346,7 @@ def score(unit, dir, transcript, answer): }, "capability": { "capability.json": { - "schema": "nullius.capability/v1", "key": "", "label": "", "summary": "SAY WHAT THE CAPABILITY KEEPS AND WHAT IT GIVES BACK.", + "schema": "nullius.capability/v1", "key": "", "label": "", "summary": "SAY WHAT THE MODULE KEEPS AND WHAT IT GIVES BACK.", "kind": "memory", "start": {"command": ["python3", "{here}/capability.py"]}, }, "capability.py": '''"""{key}: cap.memory/v1 in JSON lines. @@ -376,7 +376,7 @@ def score(unit, dir, transcript, answer): PRODUCE = ''' def produce(unit, dir, recalled, model, base_url, key): - # a capability benchmark's own step: answer from what the capability recalled, + # a Module benchmark's own step: answer from what the Module recalled, # calling the model at base_url (the relay) with key (a placeholder) return {{"answer": ""}} ''' @@ -389,12 +389,12 @@ def new_version(key: str, version: str) -> str: as it was. Existing evidence stays in ``proofs.json``; the new version has none. Returns the definition's path.""" if not definitions._KEY.match(key): - sys.exit(f"no agent, capability or benchmark {key!r}") + sys.exit(f"no agent, Module or benchmark {key!r}") kind = next((k for k in ("agent", "capability", "benchmark") if (folder := definitions.entry_dir(k, key)) and os.path.isfile(definitions.definition_path(folder, k))), None) if not kind: - sys.exit(f"no agent, capability or benchmark {key!r}") + sys.exit(f"no agent, Module or benchmark {key!r}") if not definitions._VERSION.match(version): sys.exit("a version is letters, digits and . + _ -") source = definitions.definition_path(definitions.entry_dir(kind, key), kind) @@ -583,7 +583,7 @@ def cmd_run(a): print("refused:", why) return 2 elif not a.model: - sys.exit("--model: the model the agent or the capability is run with") + sys.exit("--model: the model the agent or the Module is run with") else: other = _other(a.other) given = constraint_values(a.constraint) @@ -1081,7 +1081,7 @@ def main(argv=None): p = sub.add_parser(name, help=helps[name]) if name == "run": p.add_argument("benchmark") - p.add_argument("other", help="an agent or a capability: KEY (its default version) or KEY@VERSION" + p.add_argument("other", help="an agent or a Module: KEY (its default version) or KEY@VERSION" + ("; or nop, oracle: a control the benchmark declares; or original, model: one of its setups" if name == "run" else "")) p.add_argument("--model", required=name == "conform", help="the model (a control needs none; original takes one of the paper's, its first by default)" if name == "run" else None) @@ -1100,7 +1100,7 @@ def main(argv=None): p.add_argument("--from-run", action="store_true", help="started by Nullius: the key is OPENAI_API_KEY (and OPENAI_BASE_URL), saved settings are not read") p.add_argument("--option", action="append", metavar="NAME=VALUE", - help="one of the agent's or capability's options (repeatable); the rest keep their defaults") + help="one of the agent's or Module's options (repeatable); the rest keep their defaults") if name == "fidelity": p.add_argument("--passes", type=int, default=2, help="runs of each way (default 2: the second shows the noise)") elif name == "conform": diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 0b6e846aa..449f6e5ba 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -593,11 +593,11 @@ def _bench_options(d: dict) -> List[str]: and all(option_problem(o, v) is None for v in m.values()) for k, m in by.items())): bad.append(f"{w}.by: another option -> its every value -> this one's default under it") if "yours" in o and (by is None or o["yours"] == o.get("default") or option_problem(o, o["yours"])): - bad.append(f"{w}.yours: beside by, the value an agent's or a capability's run gets for a default of default") + bad.append(f"{w}.yours: beside by, the value an agent's or a Module's run gets for a default of default") # agent: an agent's run alone, on a benchmark agents run, and never beside another scope if on is not None and (not isinstance(on, list) or not on or any(x not in SETUPS + ("yours", "agent") for x in on) or "agent" in on and (on != ["agent"] or d.get("family") != "agent")): - bad.append(f"{w}.setups: where it applies - some of original, model, yours (an agent or a capability); " + bad.append(f"{w}.setups: where it applies - some of original, model, yours (an agent or a Module); " "or agent alone (an agent's run), on a benchmark agents run") when = o.get("when") or {} if not _when_valid(name, when, opts): @@ -1594,7 +1594,7 @@ def problems(d: dict, kind: str) -> List[str]: if not isinstance(d.get(f), str) or not d[f].strip(): bad.append(f"{f}: say it") if "example" in d and (kind == "benchmark" or not isinstance(d["example"], bool)): - bad.append("example: true or false, an agent's or a capability's") + bad.append("example: true or false, an agent's or a Module's") if "company" in d and (kind != "agent" or not isinstance(d["company"], str) or not d["company"].strip()): bad.append("company: nonempty text on an agent definition") bad += _upstream(d.get("upstream")) @@ -1736,7 +1736,7 @@ def problems(d: dict, kind: str) -> List[str]: bad += _environments(d.get("environments"), d.get("_here")) envs = d.get("environments") if isinstance(d.get("environments"), dict) else {} if d.get("family") == "capability": - bad += [f"environments.{n}.image: an own image holds an agent's work; a capability benchmark has none" + bad += [f"environments.{n}.image: an own image holds an agent's work; a Module benchmark has none" for n, e in envs.items() if own_image(e)] for i, x in enumerate(ds if isinstance(ds, list) else []): if isinstance(x, dict) and "environment" in x and x["environment"] not in envs: @@ -1783,7 +1783,7 @@ def problems(d: dict, kind: str) -> List[str]: bad.append("fidelity.command: carries {prompt}") else: if not _KEY.match(str(d.get("kind", ""))): - bad.append("kind: what kind of capability (memory, ...)") + bad.append("kind: what kind of Module (memory, ...)") bad += _command("start.command", (d.get("start") or {}).get("command"), {"here", "install"}) bad += _ports("offers", d.get("offers") or [], "capability") bad += _proven(d) @@ -1824,16 +1824,16 @@ def _read(path: str, kind: str, key: str) -> Tuple[Optional[dict], List[str]]: if kind == "benchmark": d = _with_agents(d, os.path.dirname(path)) except (OSError, ValueError, TypeError, AttributeError) as e: - return None, [f"{kind} {key}: {e}"] + return None, [f"{said(kind)} {key}: {e}"] try: found = problems(dict(d, _here=os.path.dirname(path)) if isinstance(d, dict) else d, kind) except Exception as e: # a field of the wrong type the checks do not expect: left out, said found = [f"malformed ({type(e).__name__}: {e}); a field holds a value of the wrong type"] - bad = [f"{kind} {key}: {p}" for p in found] + bad = [f"{said(kind)} {key}: {p}" for p in found] if isinstance(d, dict) and d.get("key") != key: - bad.append(f"{kind} {key}: key {d.get('key')!r} is not its folder's name") + bad.append(f"{said(kind)} {key}: key {d.get('key')!r} is not its folder's name") if kind == "agent" and isinstance(d, dict) and "driver" in (d.get("start") or {}): - bad.append(f"{kind} {key}: start.driver: only an entry of a benchmark's {AGENTS_FILE}") + bad.append(f"{said(kind)} {key}: start.driver: only an entry of a benchmark's {AGENTS_FILE}") if bad: return None, bad d = dict(d, _here=os.path.dirname(path), _kind=kind) @@ -1871,7 +1871,7 @@ def load(kind: str, root: Optional[str] = None, every: bool = False) -> Tuple[Li path = definition_path(folder, kind) if not os.path.isfile(path): if kind != "benchmark": # a Harbor-only benchmark needs no standard definition - bad.append(f"{kind} {n}: missing {name}") + bad.append(f"{said(kind)} {n}: missing {name}") continue d, why = _read(path, kind, n) bad += why @@ -1994,6 +1994,11 @@ def _skills(d: dict) -> List[str]: return bad +def said(kind: str) -> str: + """A kind as a message names it.""" + return "Module" if kind == "capability" else kind + + def definition_path(folder: str, kind: str) -> str: kind = names.kind(kind) path = os.path.join(folder, KINDS[kind]["file"]) diff --git a/app/nullius/standard/contract/match.py b/app/nullius/standard/contract/match.py index 6f43d683d..7665baebb 100644 --- a/app/nullius/standard/contract/match.py +++ b/app/nullius/standard/contract/match.py @@ -29,7 +29,7 @@ def fit(bench: dict, other: dict) -> List[str]: declared = (bench.get("controls") or {}).get(other.get("key")) return [] if declared else [f"{bench['label']} declares no {other.get('key')} control"] if kind != side: - return [f"{bench['label']} takes {'an agent' if side == 'agent' else 'a capability'}, and {other['label']} is {'an agent' if kind == 'agent' else 'a capability'}"] + return [f"{bench['label']} takes {'an agent' if side == 'agent' else 'a Module'}, and {other['label']} is {'an agent' if kind == 'agent' else 'a Module'}"] offers, proven = set(other.get("offers") or []), other.get("proven") or {} version = str((other.get("upstream") or {}).get("version") or "") name = f"{other['label']} {version}" if "@" in str(other.get("_ref") or "") else other["label"] diff --git a/app/nullius/standard/contract/proofs.py b/app/nullius/standard/contract/proofs.py index 8dcb9faec..27038b402 100644 --- a/app/nullius/standard/contract/proofs.py +++ b/app/nullius/standard/contract/proofs.py @@ -74,7 +74,7 @@ def refuse(message): if "offers" in block: offers = block["offers"] if kind == "benchmark": - refuse(f"versions.{v}.offers: only an agent or capability stores offers") + refuse(f"versions.{v}.offers: only an agent or Module stores offers") if not isinstance(offers, list) or not all(isinstance(p, str) for p in offers) or len(set(offers)) != len(offers): refuse(f"versions.{v}.offers: a list of distinct port names") proven = block.get("proven", {}) diff --git a/app/nullius/standard/kits/cap-memory-v1/standard.json b/app/nullius/standard/kits/cap-memory-v1/standard.json index 9e8b2283c..61c8e787b 100644 --- a/app/nullius/standard/kits/cap-memory-v1/standard.json +++ b/app/nullius/standard/kits/cap-memory-v1/standard.json @@ -27,7 +27,7 @@ "controls": { "nop": { "source": "nullius", - "from": "Nullius: no capability runs and nothing is recalled; the answer is empty." + "from": "Nullius: no Module runs and nothing is recalled; the answer is empty." }, "oracle": { "source": "nullius", diff --git a/app/nullius/standard/pages/howto.py b/app/nullius/standard/pages/howto.py index d86d77e89..ccf7c7f80 100644 --- a/app/nullius/standard/pages/howto.py +++ b/app/nullius/standard/pages/howto.py @@ -177,8 +177,8 @@ def steps(kind: str) -> list: "code": _json(FEATURE_FROM_REPO)}, {"title": "Check, then prove its port", "lang": "shell", "text": "Or use Prove its ports on its page.", "code": f"{CLI} check\n# ok\n{CLI} conform my-memory --model gpt-5-mini\n# cap.memory/v1: passed 2/2"}, - {"title": "Run a capability benchmark with it", "lang": "shell", - "text": "Or from the Run builder: runner Nullius, a benchmark that takes its port, then your capability on " + {"title": "Run a Module benchmark with it", "lang": "shell", + "text": "Or from the Run builder: runner Nullius, a benchmark that takes its port, then your Module on " "the step named after its kind (Memory for a memory).", "code": f"{CLI} run BENCHMARK my-memory --model gpt-5-mini --limit 10"}, ] @@ -202,8 +202,9 @@ def prompt(kind: str) -> str: "agent": "Ask before running unsandboxed. Verify native capabilities and supported extensions.\n", "capability": "Verify its callable operations and proven ports.\n", }[kind] - return (f'Add the {kind} "{{name}}" to Nullius.\nSource: {{source}}\nRemark: {{remark}}\n\n' - f"Follow /import-{kind}, or .agents/skills/import-{kind}/SKILL.md in the source checkout, " + word, skill = ("Module", "module") if kind == "capability" else (kind, kind) + return (f'Add the {word} "{{name}}" to Nullius.\nSource: {{source}}\nRemark: {{remark}}\n\n' + f"Follow /import-{skill}, or .agents/skills/import-{skill}/SKILL.md in the source checkout, " "with docs/standard.md and AGENTS.md. If unavailable, ask for the checkout.\n" f"Write to {target}, even when the skill names package paths. " "For an existing bundled entry, copy its whole folder there first; never edit installed files. " diff --git a/app/nullius/standard/pages/recipe.py b/app/nullius/standard/pages/recipe.py index 8cd5dd78e..a538549fc 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -54,7 +54,7 @@ HARNESS = "standard" # The builder's runner card (command-builder-core.js, runners()): not a definition file, so builtin like Harbor's. RUNNER = {"key": HARNESS, "label": "Nullius", "builtin": True, "standard": True, - "summary": "Any agent or capability that proved the ports a benchmark needs: ACP, MCP and the relay, on this machine."} + "summary": "Any agent or Module that proved the ports a benchmark needs: ACP, MCP and the relay, on this machine."} MAX_CONCURRENT = 32 BACKENDS = definitions.names.BACKENDS _NAME = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$") @@ -548,7 +548,7 @@ def add(step, message, shown=False, field=None, unset=False): if backend not in BACKENDS: add("where", "The backend is local processes, a container or Boat.") backend = "local" - what = "an agent" if side == "agent" else f"a {_bench_page(b)['kind'] or 'capability'}" + what = "an agent" if side == "agent" else f"a {_bench_page(b)['kind'] or 'Module'}" refs = chosen_of(recipe) if not refs: add("agent", f"Choose how {b['label']} runs: " + ("as published, " if b.get("setups") else "") + f"with {what}, or a check.") @@ -1041,7 +1041,7 @@ def row(p: dict) -> list: if p.get("setup"): # the version's own procedure return [STEP["agent"], "Participant", f"{b['label']} · its own procedure"] proven = ", ".join(f"{q} {r.get('passed', '')}".strip() for q, r in (o.get("proven") or {}).items() if q in b["needs"]) - return [STEP["agent"], "Agent" if side == "agent" else "Capability", f"{o['label']} · {protocol(o)} · proven {proven}"] + return [STEP["agent"], "Agent" if side == "agent" else "Module", f"{o['label']} · {protocol(o)} · proven {proven}"] out["review"] = [[STEP["benchmark"], "Benchmark", f"{b['label']} · needs {', '.join(b['needs'])}"], [STEP["runner"], "Runner", "Nullius"], [STEP["dataset"], "Datasets" if many else "Dataset", @@ -1146,7 +1146,7 @@ def conformance(kind: str, key: str, *, model: str, provider: str, unsandboxed: o = definitions.get(kind, key) if kind in ("agent", "capability") else None errors = [] if o is None: - return {"errors": [f"no {kind} {key!r}"], "script": "", "jobs": [], "label": key} + return {"errors": [f"no {definitions.said(kind)} {key!r}"], "script": "", "jobs": [], "label": key} o = dict(o, label=definitions.title(o)) if provider not in PROVIDERS: errors.append(CHOOSE_PROVIDER) diff --git a/app/nullius/standard/runner/merge.py b/app/nullius/standard/runner/merge.py index 67105df6a..04c10fd7d 100644 --- a/app/nullius/standard/runner/merge.py +++ b/app/nullius/standard/runner/merge.py @@ -48,7 +48,7 @@ # What every shard of one launch shares, as (what a refusal calls it, where it is in config.json). SAME = (("launch", ("standard", "launch")), ("benchmark", ("standard", "benchmark")), ("benchmark version", ("standard", "benchmark_version")), ("dataset", ("datasets", 0, "name")), - ("agent or capability", ("standard", "plugged")), ("model", ("agents", 0, "model_name")), + ("agent or Module", ("standard", "plugged")), ("model", ("agents", 0, "model_name")), ("backend", ("standard", "backend")), ("serving providers", ("standard", "served_by")), ("reasoning", ("standard", "reasoning")), ("number of shards", ("standard", "shard", "of")), ("retries per attempt", ("standard", "retries")), ("task set", ("standard", "task_set"))) @@ -56,7 +56,7 @@ LISTED = 1000 OWN = (("benchmark", ("standard", "benchmark")), ("benchmark version", ("standard", "benchmark_version")), - ("control", ("standard", "control", "name")), ("agent or capability", ("standard", "plugged"))) + ("control", ("standard", "control", "name")), ("agent or Module", ("standard", "plugged"))) class Refused(Exception): diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index 76558ca85..26350a3d3 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -1039,7 +1039,7 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas raise Refused(f"--max-calls {max_calls!r}: a whole number of model calls, at least 1") if max_calls is not None and other.get("_kind") == "capability": # a capability's route carries the benchmark's reader too (produce): the cap would charge its calls to the capability - raise Refused("--max-calls caps an agent's model calls: a capability's unit route carries the benchmark's reader too") + raise Refused("--max-calls caps an agent's model calls: a Module's unit route carries the benchmark's reader too") self.max_calls = max_calls if exchanges not in exchange_store.MODES: raise Refused(f"--exchanges {exchanges!r}: one of {', '.join(exchange_store.MODES)}") @@ -2826,7 +2826,7 @@ def send(op, **kw): **({"date": q["date"]} if q.get("date") else {})).get("memory", "")} for q in plan.get("recall") or []] except jsonl.Failed as e: - raise _Ended("NonZeroAgentExitCodeError", "the capability: " + str(e), + raise _Ended("NonZeroAgentExitCodeError", "the Module: " + str(e), job.trajectory_from_exchanges(exchanges, [], f, self.model, f"{self.name}/{unit}"), retryable=not isinstance(e, jsonl.NoReply)) finally: proc.close() diff --git a/app/packaging/PYPI.md b/app/packaging/PYPI.md index 911eda295..20d9d6673 100644 --- a/app/packaging/PYPI.md +++ b/app/packaging/PYPI.md @@ -4,7 +4,7 @@ Bring anything. Run it. Prove it. Nullius runs AI evaluations on your machines and opens each score into the evidence behind it, so you know whether the agent failed or the benchmark did.\ -Add your own benchmark, agent or capability with a single prompt and iterate +Add your own benchmark, agent or Module with a single prompt and iterate faster. ## Install and launch @@ -27,7 +27,7 @@ Release validation targets Linux with Python 3.12. ## What it does -- Bring benchmarks, agents and capabilities into a catalogue and match them by +- Bring benchmarks, agents and Modules into a catalogue and match them by the ports they have proven. - Build evaluation recipes, review their prerequisites, then run locally, over SSH or across several machines. diff --git a/app/packaging/verify.py b/app/packaging/verify.py index 49f6ab86f..446b7ca98 100644 --- a/app/packaging/verify.py +++ b/app/packaging/verify.py @@ -58,7 +58,7 @@ def digest(): before = digest() web.app.config.update(TESTING=True) client = web.app.test_client() -pages = ['/', '/benchmarks', '/agents', '/capabilities', '/settings', +pages = ['/', '/benchmarks', '/agents', '/modules', '/settings', '/leaderboard', '/scoring', '/api/leaderboard', '/api/scoring', '/static/catalogue/agents/swe-agent.ico', '/static/catalogue/agents/digitalmate.svg', '/static/style.css', '/static/fonts/DMSans-Regular.woff2', diff --git a/app/site/README.md b/app/site/README.md index a75ae3fb4..cb0bb8d2a 100644 --- a/app/site/README.md +++ b/app/site/README.md @@ -26,7 +26,7 @@ uses the generated sitemap. each folder a section. Edit those Markdown files directly; their edit links point back to the originals. A navigation entry naming a folder's README.md lists that folder's generated - pages under it (`hooks.py`), so a new benchmark, agent or capability needs no + pages under it (`hooks.py`), so a new benchmark, agent or Module needs no change to `mkdocs.yml`. - The PNG favicon and Apple touch icon are rendered from `assets/favicon.svg`. - Fonts and their licences come from `app/static/fonts/`. No external font diff --git a/app/site/check_navigation.py b/app/site/check_navigation.py index 277ffc29b..de9895cbc 100644 --- a/app/site/check_navigation.py +++ b/app/site/check_navigation.py @@ -20,7 +20,7 @@ def check(url): nav = page.locator('.md-nav--primary') if width == 1440: rail = page.locator('.md-sidebar--primary .md-sidebar__scrollwrap') - for title in ('Supported capabilities', 'Supported agents', 'Supported benchmarks'): + for title in ('Supported Modules', 'Supported agents', 'Supported benchmarks'): link = nav.get_by_role('link', name=title, exact=True) link.scroll_into_view_if_needed() before = rail.evaluate('(el) => el.scrollTop') diff --git a/app/site/hooks.py b/app/site/hooks.py index ae64aa453..7f71df507 100644 --- a/app/site/hooks.py +++ b/app/site/hooks.py @@ -1,5 +1,6 @@ """Keep edit links pointed at the original sources, never the build staging area, and inline the figures under docs/diagrams/ so they take the page's colours.""" +import json import re from pathlib import Path @@ -57,3 +58,31 @@ def on_page_context(context, page, config, nav): # every page is staged from docs/ in the repository page.edit_url = config['repo_url'] + '/edit/main/docs/' + page.file.src_uri return context + + +# the headings whose ids changed when the section was renamed +RENAMED_IDS = { + 'available-capabilities': 'available-modules', + 'benchmarks-each-capability-fits': 'benchmarks-each-module-fits', + 'supported-capabilities': 'supported-modules', + 'add-a-capability-with-an-assistant': 'add-a-module-with-an-assistant', + 'add-a-capability-manually': 'add-a-module-manually', +} + + +def on_post_build(config): + """The Modules section was published under capabilities/: each of its pages + keeps that address as a page that sends the reader on, with its query and + section; without scripts, to the page alone.""" + site = Path(config['site_dir']) + for page in sorted((site / 'modules').rglob('index.html')): + new = page.parent.relative_to(site).as_posix() + old = site / 'capabilities' / page.parent.relative_to(site / 'modules') + to = '../' * len(old.relative_to(site).parts) + new + '/' + old.mkdir(parents=True, exist_ok=True) + (old / 'index.html').write_text( + f'Moved' + f'' + f'' + f'Moved to {new}/\n', encoding='utf-8') diff --git a/app/site/mkdocs.yml b/app/site/mkdocs.yml index d170439c3..1af8d6cc5 100644 --- a/app/site/mkdocs.yml +++ b/app/site/mkdocs.yml @@ -94,10 +94,10 @@ nav: - Add manually: agents/add-manually.md - Add with an assistant: agents/add-with-assistant.md - SWE-agent: agents/swe-agent.md - - Capabilities: - - Supported capabilities: capabilities/supported/README.md - - Add manually: capabilities/add-manually.md - - Add with an assistant: capabilities/add-with-assistant.md + - Modules: + - Supported Modules: modules/supported/README.md + - Add manually: modules/add-manually.md + - Add with an assistant: modules/add-with-assistant.md - CLI: - cli/README.md - Read jobs: cli/read-jobs.md @@ -106,7 +106,7 @@ nav: - Definitions: cli/definitions.md - Run a benchmark: cli/run.md - Prove a benchmark: cli/prove.md - - Conform an agent or a capability: cli/conform.md + - Conform an agent or a Module: cli/conform.md - Fidelity: cli/fidelity.md - Shard and merge: cli/shard-and-merge.md - Task sets: cli/task-sets.md diff --git a/app/site/readme_media.py b/app/site/readme_media.py index bb9bac3cb..868903e6e 100644 --- a/app/site/readme_media.py +++ b/app/site/readme_media.py @@ -50,7 +50,7 @@ 'Agent\n' 'Capability\n' + 'rx="4" class="fill tone-amber"/>Module\n' '\n' '${esc(words(n))}`; }).join('') + ''; }; // the chosen ones' settings, one tab each: the benchmark's own way, the benchmark's settings every agent takes, each one's own - const yoursWord = agent ? 'agent' : (b.kind || 'capability'); + const yoursWord = agent ? 'agent' : (b.kind || 'Module'); const controlTile = o => tile({attr: 'std-other', key: o.key, on: C.chosenOf(rec).includes(o.key), mark: o.key === 'nop' ? '∅' : '≡', title: o.label, tip: o.summary + (b.judged ? ' The judge still runs.' : ''), foot: controlChips(o, b, C.datasetsOf(rec))}); const onSetups = setups.filter(o => C.chosenOf(rec).includes(o.key)).concat(chosen.some(o => o.own) ? [{label: b.procedure}] : []); @@ -845,7 +845,7 @@ + settingsTabs([ ...(chosen.length || onSetups.length ? [['shared', 'Every ' + yoursWord, benchOptions(rec, b, 'shared')]] : []), ...(C.runsOf(rec).includes('original') ? [['setup', b.procedure, benchOptions(rec, b, 'setup')]] : []), - ...(mine.length ? [['yours', agent ? 'Selected agents' : 'Selected capabilities', benchOptions(rec, b)]] : []), + ...(mine.length ? [['yours', agent ? 'Selected agents' : 'Selected Modules', benchOptions(rec, b)]] : []), ...chosen.map(o => [o.key, o.label, o.own ? benchOptions(rec, b, 'own', o) : optionsOf(o)])]) + (controls.length ? `

Checks

${controls.map(controlTile).join('')}
` : '') ; @@ -1168,7 +1168,7 @@ const moveUnderline=()=>{const nav=$('.nb-steps'),on=nav.querySelector('.nb-step[aria-pressed=true]'),bar=nav.querySelector('.nb-stepbar');if(!on||!bar)return;const u=underlineAt(on,[...nav.querySelectorAll('.nb-step')].pop());bar.style.left=u.left+'px';bar.style.bottom=u.bottom+'px';bar.style.width=u.width+'px';}; new ResizeObserver(moveUnderline).observe($('.nb-steps')); function stepName(t,i){const rec=r(),b=C.isStandard(rec)&&C.standardBench(rec); - return i===S.agent&&b?(b.family==='agent'?'Agent':(b.kind||'capability').replace(/^./,c=>c.toUpperCase())):t;} + return i===S.agent&&b?(b.family==='agent'?'Agent':(b.kind||'Module').replace(/^./,c=>c.toUpperCase())):t;} // Next and Back skip a step no recipe shows (Setup, its number kept for saved drafts) const nextShown=(i,dir)=>{let j=i+dir;while(j>S.benchmark&&j{{ plural|lower }} / {{ e.d.key }}{% endblock %} +{% block crumb %}/ {{ 'agents' if kind == 'agent' else 'Modules' }} / {{ e.d.key }}{% endblock %} {% block head %}{% endblock %} {% block body %} {# One of the standard's agents (or capabilities): its definition, the ports it proved, what it can run. docs/standard.md #} @@ -87,7 +87,7 @@

Options

Runs

- {% if not e.fits %}

No benchmark of the standard takes {{ 'an agent' if kind == 'agent' else 'a capability' }} yet.

{% endif %} + {% if not e.fits %}

No benchmark of the standard takes {{ 'an agent' if kind == 'agent' else 'a Module' }} yet.

{% endif %}
    {% for f in e.fits %} {% if not f.why %}
  • {{ f.label }}needs {{ f.needs|join(', ') }}New run
  • diff --git a/app/templates/agents/kits.html b/app/templates/agents/kits.html index 68a1a96b3..810fca964 100644 --- a/app/templates/agents/kits.html +++ b/app/templates/agents/kits.html @@ -20,7 +20,7 @@ {% if control %}
    {{ label }}
    {{ control['from'] }}
    {% endif %} {% endfor %} {% endif %} -

    Run this kit from {{ 'an' if d.family == 'agent' else 'a' }} {{ 'agent' if d.family == 'agent' else 'capability' }}’s Prove its ports section.

    +

    Run this kit from {{ 'an' if d.family == 'agent' else 'a' }} {{ 'agent' if d.family == 'agent' else 'Module' }}’s Prove its ports section.

    {% if d.get('check_details') %}
    @@ -45,7 +45,7 @@

    Checks

    {% set cols = [dict(key='title', label='Name', card='title'), dict(key='family', label='Family', card='tag', class='std-tag', filter='pills'), dict(key='port', label='Port', card='text', style='code'), dict(key='checks', label='Checks', card='stat', type='num'), dict(key='version', label='Version', card='meta')] %} - {{ cards('kits', cols, items, search='Name, port, check', choices={'family': [('agent', 'Agents'), ('capability', 'Capabilities')]}, sort=['title', 'port', 'checks'], empty='No kits match.', noun='kits', layout='table' if request.args.get('view') == 'table' else 'cards', default='cards') }} + {{ cards('kits', cols, items, search='Name, port, check', choices={'family': [('agent', 'Agents'), ('capability', 'Modules')]}, sort=['title', 'port', 'checks'], empty='No kits match.', noun='kits', layout='table' if request.args.get('view') == 'table' else 'cards', default='cards') }}
{% endif %} {% endblock %} diff --git a/app/templates/agents/standard.html b/app/templates/agents/standard.html index 24350d45e..7d4a39e58 100644 --- a/app/templates/agents/standard.html +++ b/app/templates/agents/standard.html @@ -1,19 +1,20 @@ {% extends "base.html" %} {% from '_page.html' import page_head %} -{% set plural = 'Agents' if kind == 'agent' else 'Capabilities' %} +{% set plural = 'Agents' if kind == 'agent' else 'Modules' %} +{% set one, many = ('agent', 'agents') if kind == 'agent' else ('Module', 'Modules') %} {% block title %}{{ plural }} — Nullius{% endblock %} -{% block crumb %}/ {{ plural|lower }}{% endblock %} +{% block crumb %}/ {{ 'agents' if kind == 'agent' else 'Modules' }}{% endblock %} {% block head %} {% endblock %} {% from '_cards.html' import cards %} {% block body %} {# The standard's agents (or capabilities) as cards. docs/standard.md #}
- {% set actions %}{% endset %} - {{ page_head(plural, sub=items|length ~ ' ' ~ (plural|lower if items|length != 1 else kind), actions=actions) }} + {% set actions %}{% endset %} + {{ page_head(plural, sub=items|length ~ ' ' ~ (many if items|length != 1 else one), actions=actions) }} {% from "catalogue/add_dialog.html" import add_dialog %} - {% set a = 'an agent' if kind == 'agent' else 'a capability' %} + {% set a = 'an agent' if kind == 'agent' else 'a Module' %} {% call add_dialog(a, prompts, kind) %}

Commands use the installed nullius command. Your entries go in {{ catalogue_dir }}. Everything below uses my-{{ 'agent' if kind == 'agent' else 'memory' }} as the key: put yours.

    @@ -32,7 +33,7 @@ {% endcall %} {% if problems %}
    Not offered: a definition with problems
      {% for p in problems %}
    • {{ p }}
    • {% endfor %}
    {% endif %} - {% if not items %}

    No {{ kind }} yet.

    {% endif %} + {% if not items %}

    No {{ one }} yet.

    {% endif %} {#- A card's fields (web/agents.py `_card`), in the slots of the builder's Agent step (builder/agents.html); its origin, protocol and source are filters and columns, never on the card, but a benchmark's own agent names its benchmark. #} {% set cols = [dict(key='icon', label='Logo', card='icon', table=false, class='std-mark small'), dict(key='title', label='Name', card='title'), @@ -43,7 +44,7 @@ dict(key='summary', label='Summary', card='text', class='std-clamp', width='expand', off=true), dict(key='ports', label='Ports proven', card='stat', type='num'), dict(key='runs', label='Benchmarks it runs', card='stat', type='num'), dict(key='installs', label='Installs', card='stat', class='word'), dict(key='version', label='Version')] %} - {% if items %}{{ cards(plural|lower, cols, items, search='Name, protocol, summary', choices=choices, only=only, sort=['title', 'ports', 'runs'], empty='No ' ~ kind ~ ' matches.', noun=plural|lower, layout='table' if request.args.get('view') == 'table' else 'cards', default='cards') }}{% endif %} + {% if items %}{{ cards('agents' if kind == 'agent' else 'capabilities', cols, items, search='Name, protocol, summary', choices=choices, only=only, sort=['title', 'ports', 'runs'], empty='No ' ~ one ~ ' matches.', noun=many, layout='table' if request.args.get('view') == 'table' else 'cards', default='cards') }}{% endif %}
{% endblock %} {% block scripts %}{% endblock %} diff --git a/app/templates/base.html b/app/templates/base.html index 6bb93fd5a..959c17b60 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -127,12 +127,12 @@ {% endfor %} - {% for kind, label, list_ep, entry_ep, icon in [('agent', 'Agents', 'agents_page', 'agent_page', 'agent'), ('capability', 'Capabilities', 'features_page', 'feature_page', 'capability')] %} + {% for kind, label, list_ep, entry_ep, icon in [('agent', 'Agents', 'agents_page', 'agent_page', 'agent'), ('capability', 'Modules', 'features_page', 'feature_page', 'capability')] %} {% set tree_open = ep in (list_ep, entry_ep) %}