Skip to Content
Modules

The check

The checks a module must pass before Tommos adds it, each with what it means and how to fix it. The same check runs on your computer, in your GitHub workflow and in Tommos.

When the owner adds your module, or a new version of it, Tommos checks it and adds it only when every check passes. Each failed check is said in words, with its name. The same check comes with the tools:

npx tommos-module check . --entry find.ts
npx tommos-module check . --entry find.py

The check in Tommos decides. It runs your examples in a sandbox with no network. On your computer the checks g, h and i only warn, because your computer is not the sandbox; in Tommos they refuse.

An example

An example is a folder examples/<name>/ with three files:

FileWhat it holds
context.jsonThe context find is given: { "cursor": null, "now": "2026-11-10T08:00:00Z" }
responses.jsonEach URL find asks, and the file that answers it: { "https://...": { "status": 200, "file": "fictional-notices.json" } }; and "ask": [...] when it asks a model
expected.jsonThe records and the cursor find must give: { "records": [...], "cursor": ... }

Record a real answer of the source once, keep a few items of it, and write expected.json from what find gives. The check runs each example twice.

The package

a. The manifest

The manifest matches its schema, and Tommos knows its kind and the version of its contract. Fix each field the reason names; the manifest lists them.

A fact named twice, a fact of a bid module, and more than six facts are refused. When the owner adds a new version, a fact whose kind differs from the kind in the version that runs is refused: a fact keeps its kind (facts). The check on your computer does not know the running version, so only Tommos checks this.

b. The function find

The entry file holds find with its one argument: export async function find(context) or def find(context):.

c. The tools

The tools are a package of a version Tommos takes, the version the manifest names, and no file of them is copied into your module. Tommos finds a copied file by its hash. Ask for the tools in package.json or requirements.txt at the manifest's version.

j. The hosts of a model

The manifest names no host of a model provider, such as api.anthropic.com or api.openai.com. A module asks a model only through ask.

k. The key of a model

No secret of the manifest is a key of a model, such as OPENAI_API_KEY, and the owner can save none in Settings. A module needs no key of its own to ask a model.

A run on each example, in the sandbox

d. The records

Each record matches its contract and carries matched. The reason names the field: source_url is not a link (http or https), matched is missing. See the contracts.

Each fact of a record is one the manifest names, with a value of its kind. A fact the manifest does not name, or a value of another kind, refuses the record. See facts.

e. The line of what it read

The module writes at least one log.read line, and no line of another kind. See the log.

f. The same keys again

A second run from the same cursor gives the same keys. Read the time from context.now, never from the clock, and never make a key of a random value.

g. The time

The run ends in the time of the manifest, time_limit_seconds. Read fewer pages in one run, and keep the rest for the next run by the cursor.

h. The hosts

The run asks no host the manifest does not name. Add the host to hosts, or stop asking it.

i. The secrets

No value of a secret stands in the output or in the log. Log through the tools, which take the values out, and never give a secret back in a record.

The examples

A failed check of The examples says that an example could not be read or run: a file that is not JSON, no expected.json, a run that failed, or records that are not the ones expected.json holds.

In your GitHub workflow

.github/workflows/check.yml runs the same check on each push and each pull request. A push that breaks the module fails there before anyone adds it.

On this page