@opennodes/registry 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/data/locations-ca.json +1 -1
- package/src/data/locations-eu.json +26 -0
- package/src/data/locations-world.json +7 -1
- package/src/locations.js +66 -0
- package/src/search.js +18 -1
- package/src/server.js +6 -2
- package/src/web/index.html +10 -2
package/README.md
CHANGED
|
@@ -20,6 +20,6 @@ What it does:
|
|
|
20
20
|
|
|
21
21
|
Environment: `PORT`, `ONP_DB`, `ONP_REGISTRY_KEY`, `ONP_ADMIN_TOKEN`, `ONP_ALLOW_PRIVATE=1` (dev only: permit localhost nodes), `ONP_STAGE_C=0`, `ONP_REIMPORT=1`, `ONP_REIMPORT_SOURCES` (default `openrouter,huggingface`; also `models-dev`, `ollama`, and `openrouter-providers`, which makes one request per OpenRouter model, so give it a long `ONP_REIMPORT_MS`), `ONP_LOCATION_SEEDS=0` (skip the curated location seeds), `ONP_MAP_TILES` (basemap for the locations map: unset = OpenStreetMap, `off` = no map, or an XYZ URL template with `ONP_MAP_ATTRIBUTION`). The map loads Leaflet from cdnjs, pinned with subresource integrity, only on the "Where models run" page. Viewers' browsers then fetch tiles from the tile server. OpenStreetMap's tile policy asks for light use, so a busy registry should point `ONP_MAP_TILES` at its own or a commercial tile service.
|
|
22
22
|
|
|
23
|
-
Location seeds are dated JSON files (`locations-{seed}.json`): providers, their sites with `basis`, `source` and `checked`, and the models each site serves. A provider whose models are listed becomes a listing-only node `import.seed.{seed}.{id}`; one that publishes no model list is shown with a note. An entry with `nodes` describes existing registry nodes instead: its sites are shown under the first of them, with that node's models when `placement` is `all`. Providers carry `kind` and `residency`; `residency_of: "{seed}:{id}"` reuses another entry's commitments (the Canadian and European regions of a cloud share the cloud's). Corrections and new countries are welcome by pull request: cite the provider's own page for `documented`, anything else is `claimed`.
|
|
23
|
+
Location seeds are dated JSON files (`locations-{seed}.json`): providers, their sites with `basis`, `source` and `checked`, and the models each site serves. A provider whose models are listed becomes a listing-only node `import.seed.{seed}.{id}`; one that publishes no model list is shown with a note. An entry with `nodes` describes existing registry nodes instead: its sites are shown under the first of them, with that node's models when `placement` is `all`. With `placement: "all"`, or `serves_from: "{seed}:{id}"` (the node's whole API runs at that entry's sites), search and recommend also use the live sites as the node's serving locations, marked `via: "seed"`, for offerings whose card declares none, except for listings reached through the Hugging Face router or OpenRouter. Providers carry `kind` and `residency`; `residency_of: "{seed}:{id}"` reuses another entry's commitments (the Canadian and European regions of a cloud share the cloud's). Corrections and new countries are welcome by pull request: cite the provider's own page for `documented`, anything else is `claimed`.
|
|
24
24
|
|
|
25
25
|
Part of [OpenNodes](https://opennodes.io) · [specification](https://github.com/opennodes-io/opennodes/tree/main/spec) · Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opennodes/registry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
4
4
|
"description": "OpenNodes (ONP) reference registry: node registration with proof-of-resource qualification (Stage A/B/C), transparent ranking, enforceable estimates, catalog importers (OpenRouter, Hugging Face, models.dev, Ollama), MCP surface, and the web app (catalog, chat, advisor, Node Builder)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
],
|
|
155
155
|
"operator": { "name": "Bell Canada", "country": "CA" },
|
|
156
156
|
"sites": [
|
|
157
|
-
{ "id": "kamloops", "region": "CA-BC", "site": "Kamloops", "status": "live", "basis": "claimed", "facility_operator": "Groq", "source": "https://groq.com/
|
|
157
|
+
{ "id": "kamloops", "region": "CA-BC", "site": "Kamloops", "status": "live", "basis": "claimed", "facility_operator": "Groq", "source": "https://groq.com/newsroom/groq-becomes-exclusive-inference-provider-for-bell-canadas-sovereign-ai-network", "checked": "2026-11-02", "note": "Groq inference site. Announced 28 May 2025 as a 7 MW Groq facility \"coming online in June\"; neither Groq nor Bell has confirmed the opening since, and a third-party directory lists it as operational.", "geo": { "lat": 50.6745, "lon": -120.3273, "precision": "city" } },
|
|
158
158
|
{ "id": "merritt", "region": "CA-BC", "site": "Merritt", "status": "planned", "basis": "claimed", "facility_operator": "BUZZ HPC, Hypertec", "note": "For Cohere; expected late 2026 to early 2027 (news report)", "geo": { "lat": 50.1113, "lon": -120.7862, "precision": "city" } }
|
|
159
159
|
],
|
|
160
160
|
"models": [],
|
|
@@ -592,6 +592,32 @@
|
|
|
592
592
|
],
|
|
593
593
|
"models": [],
|
|
594
594
|
"models_note": "GPU capacity (about 10,000 NVIDIA Blackwell GPUs, with data-centre partner Polarise); no public list of models served there. Telekom's hosted models are listed under T-Systems AI Foundation Services."
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"id": "opennodes-demo",
|
|
598
|
+
"name": "OpenNodes demo node",
|
|
599
|
+
"nodes": ["io.opennodes.demo-node"],
|
|
600
|
+
"placement": "all",
|
|
601
|
+
"operator": { "name": "OpenNodes Project", "country": "DE", "url": "https://opennodes.io" },
|
|
602
|
+
"sites": [
|
|
603
|
+
{ "id": "nur", "region": "DE-BY", "site": "Nuremberg", "status": "live", "basis": "claimed", "facility_operator": "Hetzner", "source": "https://demo-node.opennodes.io/.well-known/open-node.json", "checked": "2026-11-04", "note": "Stated in the node's own card description (Hetzner CPX22 VM).", "geo": { "lat": 49.4521, "lon": 11.0767, "precision": "city" } }
|
|
604
|
+
],
|
|
605
|
+
"residency": [
|
|
606
|
+
{ "commitment": "unstated", "scope": [], "availability": "default", "statement": "The card declares no retention and no training on inputs, but makes no promise about where data stays.", "source": "https://demo-node.opennodes.io/.well-known/open-node.json", "checked": "2026-11-04" }
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"id": "opennodes-helsinki",
|
|
611
|
+
"name": "OpenNodes reference node (Helsinki)",
|
|
612
|
+
"nodes": ["io.opennodes.helsinki"],
|
|
613
|
+
"placement": "all",
|
|
614
|
+
"operator": { "name": "OpenNodes Project", "country": "FI", "url": "https://opennodes.io" },
|
|
615
|
+
"sites": [
|
|
616
|
+
{ "id": "hel", "region": "FI-18", "site": "Helsinki", "status": "live", "basis": "claimed", "facility_operator": "Hetzner", "source": "https://helsinki.opennodes.io/.well-known/open-node.json", "checked": "2026-11-04", "note": "Stated in the node's own card description (Hetzner CPX22 VM).", "geo": { "lat": 60.1699, "lon": 24.9384, "precision": "city" } }
|
|
617
|
+
],
|
|
618
|
+
"residency": [
|
|
619
|
+
{ "commitment": "unstated", "scope": [], "availability": "default", "statement": "The card declares no retention and no training on inputs, but makes no promise about where data stays.", "source": "https://helsinki.opennodes.io/.well-known/open-node.json", "checked": "2026-11-04" }
|
|
620
|
+
]
|
|
595
621
|
}
|
|
596
622
|
]
|
|
597
623
|
}
|
|
@@ -1220,7 +1220,8 @@
|
|
|
1220
1220
|
{ "id": "dal", "region": "US-TX", "site": "Dallas (Equinix)", "status": "live", "basis": "documented", "facility_operator": "Equinix", "source": "https://groq.com/newsroom/groq-becomes-exclusive-inference-provider-for-bell-canadas-sovereign-ai-network", "checked": "2026-11-03", "geo": { "lat": 32.7767, "lon": -96.797, "precision": "city" } },
|
|
1221
1221
|
{ "id": "hou", "region": "US-TX", "site": "Houston (DataBank)", "status": "live", "basis": "documented", "facility_operator": "DataBank", "source": "https://groq.com/newsroom/groq-becomes-exclusive-inference-provider-for-bell-canadas-sovereign-ai-network", "checked": "2026-11-03", "geo": { "lat": 29.7604, "lon": -95.3698, "precision": "city" } },
|
|
1222
1222
|
{ "id": "dmm", "region": "SA-04", "site": "Dammam", "status": "live", "basis": "documented", "facility_operator": "Aramco Digital", "source": "https://groq.com/saudi-arabia-announces-1-5-billion-expansion-to-fuel-ai-powered-economy-with-groq", "checked": "2026-11-03", "note": "GroqCloud region opened Feb 2025 with Aramco Digital; also serves HUMAIN", "geo": { "lat": 26.4207, "lon": 50.0888, "precision": "city" } },
|
|
1223
|
-
{ "id": "syd", "region": "AU-NSW", "site": "Sydney (Equinix)", "status": "live", "basis": "documented", "facility_operator": "Equinix", "source": "https://groq.com/newsroom/groq-expands-to-asia-pacific-with-sydney-data-center-to-power-the-next-generation-of-ai-inference", "checked": "2026-11-03", "note": "4.5 MW, announced 17 Nov 2025; press names Equinix SY5 (not confirmed by Groq)", "geo": { "lat": -33.8688, "lon": 151.2093, "precision": "city" } }
|
|
1223
|
+
{ "id": "syd", "region": "AU-NSW", "site": "Sydney (Equinix)", "status": "live", "basis": "documented", "facility_operator": "Equinix", "source": "https://groq.com/newsroom/groq-expands-to-asia-pacific-with-sydney-data-center-to-power-the-next-generation-of-ai-inference", "checked": "2026-11-03", "note": "4.5 MW, announced 17 Nov 2025; press names Equinix SY5 (not confirmed by Groq)", "geo": { "lat": -33.8688, "lon": 151.2093, "precision": "city" } },
|
|
1224
|
+
{ "id": "kam", "region": "CA-BC", "site": "Kamloops", "status": "live", "basis": "claimed", "facility_operator": "Groq", "source": "https://groq.com/newsroom/groq-becomes-exclusive-inference-provider-for-bell-canadas-sovereign-ai-network", "checked": "2026-11-04", "note": "Same facility as Bell AI Fabric Kamloops. Announced 28 May 2025 as a 7 MW Groq facility \"coming online in June\"; neither Groq nor Bell has confirmed the opening since, and a third-party directory lists it as operational.", "geo": { "lat": 50.6745, "lon": -120.3273, "precision": "city" } }
|
|
1224
1225
|
],
|
|
1225
1226
|
"models_note": "Groq does not say which models are served from which site.",
|
|
1226
1227
|
"residency": [
|
|
@@ -1484,6 +1485,7 @@
|
|
|
1484
1485
|
"name": "Scaleway Generative APIs",
|
|
1485
1486
|
"kind": "cloud",
|
|
1486
1487
|
"nodes": ["import.modelsdev.scaleway", "import.hf.scaleway"],
|
|
1488
|
+
"serves_from": "eu:scaleway",
|
|
1487
1489
|
"operator": { "name": "Scaleway SAS", "country": "FR", "url": "https://www.scaleway.com/en/generative-apis/" },
|
|
1488
1490
|
"note": "All serverless models run in Paris (OPCORE data centre), already in the Europe seed. Scaleway's regions (Paris, Amsterdam, Warsaw) are all in the EU; no site outside Europe.",
|
|
1489
1491
|
"sites": [],
|
|
@@ -1497,6 +1499,7 @@
|
|
|
1497
1499
|
"name": "OVHcloud AI Endpoints",
|
|
1498
1500
|
"kind": "cloud",
|
|
1499
1501
|
"nodes": ["import.modelsdev.ovhcloud", "import.hf.ovhcloud"],
|
|
1502
|
+
"serves_from": "eu:ovhcloud",
|
|
1500
1503
|
"operator": { "name": "OVH SAS", "country": "FR", "url": "https://www.ovhcloud.com/en/public-cloud/ai-endpoints/" },
|
|
1501
1504
|
"note": "Gravelines (France) is in the Europe seed and Beauharnois (Canada) in the Canada seed; no other non-European AI Endpoints site found. The capabilities doc could not be fetched directly (redirect loop); its wording was read from a search excerpt. The product page says only 'hosted and run in the EU', which sits awkwardly with the Canada seed entry.",
|
|
1502
1505
|
"sites": [],
|
|
@@ -1509,6 +1512,7 @@
|
|
|
1509
1512
|
"name": "STACKIT AI Model Serving",
|
|
1510
1513
|
"kind": "cloud",
|
|
1511
1514
|
"nodes": ["import.modelsdev.stackit"],
|
|
1515
|
+
"serves_from": "eu:stackit",
|
|
1512
1516
|
"operator": { "name": "STACKIT GmbH & Co. KG (Schwarz Digits)", "country": "DE", "url": "https://stackit.com" },
|
|
1513
1517
|
"note": "Shared models run in region eu01 (Germany), in the Europe seed. STACKIT runs regions only in Germany and Austria; no site outside Europe.",
|
|
1514
1518
|
"sites": [],
|
|
@@ -1521,6 +1525,7 @@
|
|
|
1521
1525
|
"name": "Infomaniak AI Services",
|
|
1522
1526
|
"kind": "inference",
|
|
1523
1527
|
"nodes": ["import.modelsdev.infomaniak"],
|
|
1528
|
+
"serves_from": "eu:infomaniak",
|
|
1524
1529
|
"operator": { "name": "Infomaniak Network SA", "country": "CH", "url": "https://www.infomaniak.com/en/hosting/ai-services" },
|
|
1525
1530
|
"note": "Runs on Infomaniak's own data centres in Switzerland (in the Europe seed). No site outside Switzerland.",
|
|
1526
1531
|
"sites": [],
|
|
@@ -1533,6 +1538,7 @@
|
|
|
1533
1538
|
"name": "Berget AI",
|
|
1534
1539
|
"kind": "inference",
|
|
1535
1540
|
"nodes": ["import.modelsdev.berget"],
|
|
1541
|
+
"serves_from": "eu:berget",
|
|
1536
1542
|
"operator": { "name": "Berget AI AB", "country": "SE", "url": "https://berget.ai" },
|
|
1537
1543
|
"note": "Own hardware in Sweden (in the Europe seed). DPA sub-processors: AI Iron AB (GPU bare metal), Acebit AB, Obenet AB (colocation), Stripe. No site outside Sweden.",
|
|
1538
1544
|
"sites": [],
|
package/src/locations.js
CHANGED
|
@@ -25,6 +25,72 @@ const seedIndex = (seeds) => new Map(seeds.flatMap((seed) => (seed.providers ??
|
|
|
25
25
|
/** A seed provider's own commitments, or those of the entry it points to with `residency_of`. */
|
|
26
26
|
const seedResidency = (index, p) => (p.residency_of ? index.get(p.residency_of)?.p.residency : p.residency) ?? null;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Where the nodes a seed entry describes serve every one of their models: the entry's own live
|
|
30
|
+
* sites when `placement` is "all", or the live sites of the entry named by `serves_from`
|
|
31
|
+
* ("eu:scaleway": the whole API runs at that entry's sites). Search and recommend use these for
|
|
32
|
+
* offerings whose card declares no location (ONP-3 §5); each location is marked `via: "seed"`.
|
|
33
|
+
*/
|
|
34
|
+
export function seedPlacements(seeds) {
|
|
35
|
+
const index = seedIndex(seeds);
|
|
36
|
+
const out = new Map(); // node id -> locations
|
|
37
|
+
for (const seed of seeds) {
|
|
38
|
+
for (const p of seed.providers ?? []) {
|
|
39
|
+
if (p.models?.length || !p.nodes?.length) continue;
|
|
40
|
+
const from = p.serves_from ? index.get(p.serves_from)?.p : p.placement === 'all' ? p : null;
|
|
41
|
+
const locs = (from?.sites ?? []).map(siteLocation).filter((l) => (l.status ?? 'live') === 'live')
|
|
42
|
+
.map(({ geo: _g, ...l }) => ({ ...l, via: 'seed' }));
|
|
43
|
+
if (!locs.length) continue;
|
|
44
|
+
for (const id of p.nodes) if (!out.has(id)) out.set(id, locs);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* What the seeds know about each node, for the directory (`/v0/nodes`): its entry's kind and the
|
|
52
|
+
* sites of that entry and the entries linked to it with `residency_of` or `serves_from`, which
|
|
53
|
+
* describe the same provider. A provider-level answer: it does not say which model runs where.
|
|
54
|
+
*/
|
|
55
|
+
export function seedNodeSites(seeds) {
|
|
56
|
+
const index = seedIndex(seeds);
|
|
57
|
+
const hubOf = (key) => (index.has(index.get(key)?.p.residency_of) ? index.get(key).p.residency_of : key);
|
|
58
|
+
const family = new Map(); // hub key -> sites
|
|
59
|
+
for (const [key, { p }] of index) family.set(hubOf(key), [...(family.get(hubOf(key)) ?? []), ...(p.sites ?? [])]);
|
|
60
|
+
const out = new Map(); // node id -> { kind, sites }
|
|
61
|
+
for (const [key, { seed, p }] of index) {
|
|
62
|
+
const sites = [...(family.get(hubOf(key)) ?? []), ...(family.get(hubOf(p.serves_from)) ?? [])];
|
|
63
|
+
for (const id of p.models?.length ? [`import.seed.${seed.seed}.${p.id}`] : p.nodes ?? []) {
|
|
64
|
+
const known = out.get(id);
|
|
65
|
+
out.set(id, { kind: known?.kind ?? p.kind ?? null, sites: [...new Set([...(known?.sites ?? []), ...sites])] });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const LOOPBACK = /^https?:\/\/(127\.|localhost[:/]|\[::1\])/;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Where a node serves from, for the directory: the countries its card declares, else those of
|
|
75
|
+
* its seed sites (`seed` from seedNodeSites). With neither, `label` says why: local (seed kind or
|
|
76
|
+
* a loopback endpoint), router, not_published (researched, nothing public), not_declared
|
|
77
|
+
* (registered card), unknown.
|
|
78
|
+
*/
|
|
79
|
+
export function nodeServes(node, card, seed) {
|
|
80
|
+
const countries = (locs) => [...new Set(locs.map((l) => countryOf(l.region)))].sort();
|
|
81
|
+
const locs = [...(card?.node?.locations ?? []), ...(card?.offerings ?? []).flatMap((o) => o.locations ?? [])];
|
|
82
|
+
const declared = [...locs, ...(card?.node?.regions ?? []).map((region) => ({ region }))];
|
|
83
|
+
const from = declared.length ? declared : seed?.sites ?? [];
|
|
84
|
+
const live = (l) => (l.status ?? 'live') === 'live';
|
|
85
|
+
const places = countries(from.filter(live));
|
|
86
|
+
const planned = countries(from.filter((l) => !live(l))).filter((c) => !places.includes(c));
|
|
87
|
+
const label = places.length || planned.length ? null
|
|
88
|
+
: seed?.kind === 'local' || LOOPBACK.test(card?.endpoints?.openai ?? '') ? 'local'
|
|
89
|
+
: seed?.kind === 'router' ? 'router'
|
|
90
|
+
: seed ? 'not_published' : node.source === 'import' ? 'unknown' : 'not_declared';
|
|
91
|
+
return { places, planned, source: !from.length ? null : declared.length ? 'card' : 'seed', label };
|
|
92
|
+
}
|
|
93
|
+
|
|
28
94
|
/** Visible nodes with their latest cards. */
|
|
29
95
|
async function listedCards(store) {
|
|
30
96
|
const cards = [];
|
package/src/search.js
CHANGED
|
@@ -20,6 +20,19 @@ const TIER_SCORE = { unverified: 0, community: 0.4, verified: 0.8, attested: 1.0
|
|
|
20
20
|
const MAX_AGE_MS = 60_000;
|
|
21
21
|
const catalogs = new WeakMap(); // store -> { items, at, stale, building }
|
|
22
22
|
|
|
23
|
+
// Curated seed placements (locations.js seedPlacements): node id -> where it serves every model.
|
|
24
|
+
const placements = new WeakMap(); // store -> Map
|
|
25
|
+
// A request to these hosts passes through a third-party router before it reaches the provider, so
|
|
26
|
+
// the provider's sites say nothing about where the prompt goes: no seed placement for them.
|
|
27
|
+
const ROUTER_HOSTS = new Set(['router.huggingface.co', 'openrouter.ai']);
|
|
28
|
+
const hostOf = (url) => { try { return new URL(url).hostname; } catch { return null; } };
|
|
29
|
+
|
|
30
|
+
/** Use these seed placements in search from now on (the server sets them at start and on seed import). */
|
|
31
|
+
export function setSeedPlacements(store, map) {
|
|
32
|
+
placements.set(store, map);
|
|
33
|
+
markCatalogStale(store);
|
|
34
|
+
}
|
|
35
|
+
|
|
23
36
|
/** Mark the cached catalog stale: the next read rebuilds it. */
|
|
24
37
|
export function markCatalogStale(store) {
|
|
25
38
|
const entry = catalogs.get(store);
|
|
@@ -70,12 +83,16 @@ async function buildOfferings(store) {
|
|
|
70
83
|
const nodeObs = await store.getObservations(node.id, '_node');
|
|
71
84
|
const availability = nodeObs.availability ?? null;
|
|
72
85
|
const loc = nodeObs.location ?? null;
|
|
86
|
+
const placed = ROUTER_HOSTS.has(hostOf(card.endpoints?.openai)) ? null : placements.get(store)?.get(node.id);
|
|
73
87
|
// Server-location check (location.js): what the registry found, next to what the operator declared.
|
|
74
88
|
const location = loc ? {
|
|
75
89
|
verdict: loc.verdict, server_country: loc.server?.country ?? null, network: loc.server?.network ?? null,
|
|
76
90
|
cdn: Boolean(loc.server?.cdn), latency: loc.latency?.verdict ?? 'unknown', checked_at: loc.checked_at,
|
|
77
91
|
} : null;
|
|
78
|
-
for (const
|
|
92
|
+
for (const declared of card.offerings) {
|
|
93
|
+
// No location on the card: a curated seed may say where this node serves every model.
|
|
94
|
+
const offering = placed && !Array.isArray(declared.locations) && !(card.node?.locations ?? []).length
|
|
95
|
+
? { ...declared, locations: placed } : declared;
|
|
79
96
|
const obs = await store.getObservations(node.id, offering.offering_id);
|
|
80
97
|
// Measured values override claims (DS-ADM-03/04): cap the advertised context to
|
|
81
98
|
// the verified size, and surface registry-measured latency/throughput.
|
package/src/server.js
CHANGED
|
@@ -15,7 +15,7 @@ import { runStageB, captureFingerprints } from './stageb.js';
|
|
|
15
15
|
import { startStageC } from './stagec.js';
|
|
16
16
|
import { startReimport } from './reimport.js';
|
|
17
17
|
import { makeSafeFetch } from './safefetch.js';
|
|
18
|
-
import { searchOfferings, searchOfferingsPaged, collectOfferings, watchStoreWrites, RANK_COMPONENTS, pricePublished } from './search.js';
|
|
18
|
+
import { searchOfferings, searchOfferingsPaged, collectOfferings, watchStoreWrites, setSeedPlacements, RANK_COMPONENTS, pricePublished } from './search.js';
|
|
19
19
|
import { mcpRoutes } from './mcp.js';
|
|
20
20
|
import { hostControlsNamespace, isPrivateHost, makeRateLimiter } from './namespace.js';
|
|
21
21
|
import { exportRoutes } from './export.js';
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
importOpenRouterProviders, fetchOpenRouterEndpoints, importLocationSeed,
|
|
28
28
|
HF_ROUTER_URL, HF_HUB_URL, OPENROUTER_URL, OPENROUTER_PROVIDERS_URL, OLLAMA_LIBRARY_URL,
|
|
29
29
|
} from './importers.js';
|
|
30
|
-
import { locationRoutes, loadLocationSeeds } from './locations.js';
|
|
30
|
+
import { locationRoutes, loadLocationSeeds, seedPlacements, seedNodeSites, nodeServes } from './locations.js';
|
|
31
31
|
|
|
32
32
|
/** Default basemap. OSM's tile policy asks for attribution and light use; busy registries set their own. */
|
|
33
33
|
export const OSM_TILES = {
|
|
@@ -60,6 +60,7 @@ export async function startRegistry({
|
|
|
60
60
|
const result = await importLocationSeed(store, seed);
|
|
61
61
|
if (result.skipped.length) console.warn(`location seed ${seed.seed}: skipped ${result.skipped.join('; ')}`);
|
|
62
62
|
}
|
|
63
|
+
setSeedPlacements(store, seedPlacements(seeds));
|
|
63
64
|
const webApp = readFileSync(fileURLToPath(new URL('./web/index.html', import.meta.url)), 'utf8');
|
|
64
65
|
let registryKeys;
|
|
65
66
|
if (keyPath && existsSync(keyPath)) {
|
|
@@ -316,6 +317,7 @@ export async function startRegistry({
|
|
|
316
317
|
// Node directory: every listed node with tier, source, offering count, availability.
|
|
317
318
|
['GET', '/v0/nodes', async (req, res) => {
|
|
318
319
|
const out = [];
|
|
320
|
+
const known = seedNodeSites(seeds);
|
|
319
321
|
for (const node of await store.allNodes()) {
|
|
320
322
|
if (['delisted', 'claimed'].includes(node.state)) continue;
|
|
321
323
|
const card = await store.latestCard(node.id);
|
|
@@ -332,6 +334,7 @@ export async function startRegistry({
|
|
|
332
334
|
country: card?.node?.operator?.country ?? null,
|
|
333
335
|
regions: card?.node?.regions ?? [],
|
|
334
336
|
locations: card?.node?.locations ?? [],
|
|
337
|
+
serves: nodeServes(node, card, known.get(node.id)),
|
|
335
338
|
offerings: card?.offerings?.length ?? 0,
|
|
336
339
|
availability,
|
|
337
340
|
});
|
|
@@ -527,6 +530,7 @@ export async function startRegistry({
|
|
|
527
530
|
const i = seeds.findIndex((s) => s.seed === seed.seed); // /v0/locations reads site-only entries from here
|
|
528
531
|
if (i < 0) seeds.push(seed); else seeds[i] = seed;
|
|
529
532
|
}
|
|
533
|
+
setSeedPlacements(store, seedPlacements(seeds));
|
|
530
534
|
sendJson(res, 200, results);
|
|
531
535
|
}],
|
|
532
536
|
|
package/src/web/index.html
CHANGED
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
<!-- ================= NODES ================= -->
|
|
413
413
|
<div id="view-nodes" hidden>
|
|
414
414
|
<div style="display:flex; align-items:baseline; gap:0.9rem"><h1>Nodes</h1><span class="counts" id="n-counts"></span></div>
|
|
415
|
-
<p class="sub">The supply side, first-class: every provider serving through OpenNodes, with the trust tier it has earned. <b>Verified</b> means identity-fingerprinted, context-verified, capacity-measured, and continuously probed — <a href="#/qualification">the qualification procedure</a> is automated and the same for everyone.</p>
|
|
415
|
+
<p class="sub">The supply side, first-class: every provider serving through OpenNodes, with the trust tier it has earned. <b>Verified</b> means identity-fingerprinted, context-verified, capacity-measured, and continuously probed — <a href="#/qualification">the qualification procedure</a> is automated and the same for everyone. <b>Region</b> lists the countries where a provider has known sites, not where each of its models runs: <a href="#/where">the map</a> has that detail.</p>
|
|
416
416
|
<div class="panel tablewrap" id="n-table"></div>
|
|
417
417
|
</div>
|
|
418
418
|
|
|
@@ -2251,6 +2251,14 @@ async function loadRankings() {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
|
|
2253
2253
|
/* ---------- nodes directory ---------- */
|
|
2254
|
+
const SERVES_LABEL = { local: 'your machine', router: 'routes to others', not_published: 'not published', not_declared: 'not declared', unknown: 'unknown' };
|
|
2255
|
+
function servesCell(s) {
|
|
2256
|
+
if (!s || s.label) return `<span style="color:var(--muted)">${esc(SERVES_LABEL[s?.label] ?? 'unknown')}</span>`;
|
|
2257
|
+
const shown = (codes) => codes.slice(0, 5).join(', ') + (codes.length > 5 ? ` +${codes.length - 5}` : '');
|
|
2258
|
+
const text = [s.places.length ? shown(s.places) : '', s.planned.length ? `planned: ${shown(s.planned)}` : ''].filter(Boolean).join(' · ');
|
|
2259
|
+
const title = [...s.places.map(countryName), ...s.planned.map((c) => `${countryName(c)} (planned)`)].join(', ') + (s.source === 'seed' ? ' (from the curated map data)' : ' (declared on the card)');
|
|
2260
|
+
return `<span title="${esc(title)}">${esc(text)}</span>`;
|
|
2261
|
+
}
|
|
2254
2262
|
async function loadNodes() {
|
|
2255
2263
|
try {
|
|
2256
2264
|
const { nodes } = await api('/v0/nodes');
|
|
@@ -2261,7 +2269,7 @@ async function loadNodes() {
|
|
|
2261
2269
|
<td><a href="#/node/${encodeURIComponent(n.id)}" style="font-weight:600">${esc(n.id)}</a></td>
|
|
2262
2270
|
<td><span style="display:inline-flex; gap:0.3rem">${tierChip(n.tier)}${n.institutional ? '<span class="chip inst">institutional</span>' : ''}${n.source === 'import' ? '<span class="chip imp">IMPORTED</span>' : ''}</span></td>
|
|
2263
2271
|
<td>${esc(n.operator ?? '—')}${n.country ? ' <span style="color:var(--muted)">(' + esc(n.country) + ')</span>' : ''}</td>
|
|
2264
|
-
<td
|
|
2272
|
+
<td>${servesCell(n.serves)}</td>
|
|
2265
2273
|
<td>${n.offerings}</td>
|
|
2266
2274
|
<td>${n.availability?.ratio != null ? Math.round(n.availability.ratio * 100) + '%' : '—'}</td>
|
|
2267
2275
|
<td><span class="prov">${ago(n.updated_at)}</span></td>
|