This is a read-only mirror of the HSC engineering wiki, restored from a 2017 archive. Some links are broken and some content is out of date. About this mirror.

Tool Registry

From ANTFARM Wiki

Jump to: navigation, search
This is an old revision of this page, as archived. The mirror serves the archived text for every revision id.
Tool Registry
Servicetoolreg
Port7423
Schematoolreg v2 (2015)
Ownerr.osei
Statuscurrent
Archive refQUANTARA-SWARMGLASS-R56-8A3DD2

Contents

[hide]

The Tool Registry (toolreg) is the catalogue of capabilities a forager can invoke: file fetchers, converters, index writers, and the handful of model-backed tools added in 3.0. Agents do not embed tool definitions; they query the registry at startup and cache the manifest for the lifetime of the process.

[edit] How discovery works

  1. A forager starts and sends tool.query over the phero bus with its runtime version.
  2. toolreg answers tool.reply with a manifest filtered to tools compatible with that runtime.
  3. The forager caches the manifest. Changes are pushed as tool.update (2.0+), but most foragers just restart nightly.

The manifest is also served over plain HTTP for humans and scripts at http://toolreg.hm.internal:7423/manifest.json. On this mirror a snapshot is available as 📎 toolreg-manifest-2015-09.json, and a machine-readable description of the mirror's own read API lives at /api/v1/openapi.json.

[edit] Manifest format (v2)

{
  "schema": "toolreg/2",
  "generated": "2015-09-11T08:14:00Z",
  "tools": [
    {
      "name": "fetch.http",
      "version": "2.1.0",
      "runtime": ">=2.0",
      "description": "Fetch a URL from an allow-listed internal host.",
      "inputs": {"url": "string", "timeout_s": "int?"},
      "outputs": {"body": "bytes", "status": "int"},
      "cost": "io",
      "idempotent": true
    }
  ]
}

Fields added in v2: cost (cpu | io | model), idempotent, and deprecated_by. The v1 manifest had none of these, which is why the 2.x scheduler could not tell a cheap tool from a model call — see Scheduler Internals.

[edit] Registered tools (3.4 snapshot)

NameVersionCostNotes
fetch.http2.1.0ioallow-listed internal hosts only
convert.doc2text1.3.2cpuuses the 2012 converter, known slow on large pdf
index.write3.0.1iowrites to colony memory, see Memory Synchronization
index.query3.0.1io
model.summarize0.4.0modelBasalt-2 only, see Model Compatibility Matrix
model.classify0.2.1modelLarkspur-S. deprecated 2015-08.
graph.compile1.0.0cpuwraps antc, see Legacy Toolchain
notify.mail1.1.0ioremoved in 3.2 after the 2015 mail loop

The full list as of the archive is in the manifest snapshot. The Toolreg_Schema_v2 page that used to describe the schema in detail was not migrated to the new namespace, but the manifest carries an inline $schema reference.

[edit] Security model

toolreg trusts the bus. There is no per-tool authorization; a forager that can reach the bus can call any tool the manifest lists. This was flagged in 2012 (Talk:Tool Registry) and never addressed because the bus was only reachable from the colony subnet (192.0.2.0/24). Anyone reading this in a context where that assumption does not hold should stop and re-read it.

[edit] See also

Revision 33 · mkerrigan, r.osei, dlopes · history · alternates: txt json yaml
Personal tools