@opennodes/registry 0.1.30 → 0.1.32
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/package.json +1 -1
- package/src/web/index.html +43 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opennodes/registry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
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",
|
package/src/web/index.html
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<style>
|
|
12
12
|
:root {
|
|
13
13
|
--ground: #F7F9FA; --panel: #FFFFFF; --panel-2: #EEF2F4;
|
|
14
|
-
--ink: #1C2733; --muted: #
|
|
15
|
-
--accent: #0F7A80; --accent-soft: #E0EFF0; --good: #2F6B3A;
|
|
14
|
+
--ink: #1C2733; --muted: #4F6170; --faint: #5A6C7C; --line: #D6DEE3; --line-2: #EEF2F4; /* both ≥4.5:1 on every surface */
|
|
15
|
+
--accent: #0F7A80; --accent-soft: #E0EFF0; --on-accent: #FFFFFF; --good: #2F6B3A;
|
|
16
16
|
--warn: #A16207; --bad: #A33333; --star: #B45309;
|
|
17
17
|
}
|
|
18
18
|
@media (prefers-color-scheme: dark) {
|
|
19
19
|
:root {
|
|
20
20
|
--ground: #101820; --panel: #16202A; --panel-2: #1C2833;
|
|
21
|
-
--ink: #E4EBF0; --muted: #
|
|
22
|
-
--accent: #4FC0C6; --accent-soft: #12333A; --good: #7CC08A;
|
|
21
|
+
--ink: #E4EBF0; --muted: #A3B4C2; --faint: #8A9CAB; --line: #2C3B48; --line-2: #223140;
|
|
22
|
+
--accent: #4FC0C6; --accent-soft: #12333A; --on-accent: #0B1A20; --good: #7CC08A;
|
|
23
23
|
--warn: #D9A648; --bad: #E08585; --star: #D9A648;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
.toolbar input, .toolbar select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 0.42rem 0.6rem; }
|
|
40
40
|
.toolbar input[type=number] { width: 8.5rem; }
|
|
41
41
|
.mgrid { display: grid; grid-template-columns: 23rem minmax(0, 1fr); gap: 1.2rem; align-items: start; }
|
|
42
|
-
@media (max-width: 980px) { .mgrid { grid-template-columns: 1fr; } }
|
|
42
|
+
@media (max-width: 980px) { .mgrid { grid-template-columns: minmax(0, 1fr); } }
|
|
43
43
|
.mlist { display: flex; flex-direction: column; gap: 0.4rem; max-height: 76vh; overflow-y: auto; padding-right: 0.25rem; }
|
|
44
44
|
.mitem { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.75rem; cursor: pointer; }
|
|
45
45
|
.mitem:hover { border-color: var(--accent); }
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
/* chat */
|
|
66
66
|
.chatgrid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.2rem; align-items: start; }
|
|
67
|
-
@media (max-width: 980px) { .chatgrid { grid-template-columns: 1fr; } }
|
|
67
|
+
@media (max-width: 980px) { .chatgrid { grid-template-columns: minmax(0, 1fr); } }
|
|
68
68
|
.chatlog { display: flex; flex-direction: column; gap: 0.7rem; min-height: 20rem; max-height: 60vh; overflow-y: auto; padding: 1rem; }
|
|
69
69
|
.msg { max-width: 46rem; font-size: 0.9rem; line-height: 1.55; white-space: pre-wrap; border-radius: 8px; padding: 0.6rem 0.9rem; }
|
|
70
70
|
.msg.user { align-self: flex-end; background: var(--accent-soft); border: 1px solid var(--accent); }
|
|
@@ -82,7 +82,22 @@
|
|
|
82
82
|
nav a.tab:hover { text-decoration: none; color: var(--ink); }
|
|
83
83
|
nav a.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
|
|
84
84
|
nav .spacer { flex: 1; }
|
|
85
|
-
nav .cta { align-self: center; background: var(--accent); color:
|
|
85
|
+
nav .cta { align-self: center; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 0.82rem; border-radius: 6px; padding: 0.55rem 1rem; }
|
|
86
|
+
/* phones: the tabs wrap onto rows instead of widening the page */
|
|
87
|
+
@media (max-width: 760px) {
|
|
88
|
+
nav .wrap { flex-wrap: wrap; height: auto; gap: 0 1.1rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
|
|
89
|
+
nav .brand { flex-basis: 100%; padding: 0.2rem 0 0.3rem; }
|
|
90
|
+
nav a.tab, nav .ext { padding: 0.45rem 0; }
|
|
91
|
+
nav .spacer { display: none; }
|
|
92
|
+
nav .cta { margin-top: 0.3rem; }
|
|
93
|
+
}
|
|
94
|
+
details.claim { margin: 0.2rem 0 0.7rem; }
|
|
95
|
+
details.claim > summary { display: inline-block; list-style: none; font-size: 0.82rem; padding: 0.45rem 0.9rem; }
|
|
96
|
+
details.claim > summary::-webkit-details-marker { display: none; }
|
|
97
|
+
details.claim p { font-size: 0.84rem; color: var(--muted); margin: 0.6rem 0; }
|
|
98
|
+
details.claim pre { font-size: 0.74rem; overflow-x: auto; }
|
|
99
|
+
.rm { font: inherit; cursor: pointer; color: var(--muted); background: none; border: 0; padding: 0.1rem 0.3rem; min-width: 24px; min-height: 24px; border-radius: 4px; }
|
|
100
|
+
.rm:hover { color: var(--ink); background: var(--line-2); }
|
|
86
101
|
nav .cta:hover { text-decoration: none; opacity: 0.92; }
|
|
87
102
|
nav .ext { align-self: center; font-size: 0.78rem; color: var(--muted); }
|
|
88
103
|
|
|
@@ -161,10 +176,11 @@
|
|
|
161
176
|
color: var(--muted); text-align: left; padding: 0.55rem 0.8rem; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
|
|
162
177
|
table.grid td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
|
|
163
178
|
table.grid tr:last-child td { border-bottom: none; }
|
|
179
|
+
table.grid td.mono, #md-artifact { overflow-wrap: anywhere; white-space: normal; } /* long ids wrap on phones */
|
|
164
180
|
.tablewrap { overflow-x: auto; }
|
|
165
181
|
|
|
166
182
|
.btn { font: inherit; font-weight: 600; font-size: 0.82rem; padding: 0.55rem 1rem; border-radius: 6px;
|
|
167
|
-
border: 1px solid var(--accent); background: var(--accent); color:
|
|
183
|
+
border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; }
|
|
168
184
|
.btn.sec { background: transparent; color: var(--accent); }
|
|
169
185
|
.btn:disabled { opacity: 0.5; cursor: default; }
|
|
170
186
|
input.wide, textarea.wide { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 0.55rem 0.7rem; }
|
|
@@ -178,7 +194,7 @@
|
|
|
178
194
|
@media (max-width: 560px) { .stage.wide { grid-template-columns: 1fr; gap: 0.15rem; } }
|
|
179
195
|
.tabbtns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
|
|
180
196
|
.tabbtn { font: inherit; font-weight: 600; font-size: 0.8rem; padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
|
|
181
|
-
.tabbtn.on { background: var(--accent); border-color: var(--accent); color:
|
|
197
|
+
.tabbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
|
|
182
198
|
/* model/node card header */
|
|
183
199
|
.statstrip { display: flex; flex-wrap: wrap; gap: 1.8rem; margin: 0.8rem 0 0.4rem; }
|
|
184
200
|
.stat { display: flex; flex-direction: column; gap: 0.1rem; }
|
|
@@ -977,7 +993,7 @@ async function loadModel(artifact) {
|
|
|
977
993
|
return `<tr>
|
|
978
994
|
<td><div style="display:flex; flex-direction:column; gap:0.2rem">
|
|
979
995
|
<a href="#/node/${encodeURIComponent(o.node_id)}" style="font-weight:600">${esc(o.node_id)}</a>
|
|
980
|
-
<span style="display:flex; gap:0.3rem">${tierChip(o.tier)}${o.institutional ? '<span class="chip inst">institutional</span>' : ''}${o.source === 'import' ?
|
|
996
|
+
<span style="display:flex; gap:0.3rem">${tierChip(o.tier)}${o.institutional ? '<span class="chip inst">institutional</span>' : ''}${o.source === 'import' ? `<span class="chip imp">IMPORTED</span> <a class="prov" href="#/node/${encodeURIComponent(o.node_id)}">claim</a>` : ''}</span>
|
|
981
997
|
</div></td>
|
|
982
998
|
<td><b>${priceStr(o.pricing, o.node_id)}</b></td>
|
|
983
999
|
<td>${hwStr(o) || '<span style="color:var(--faint)" title="Vendor has not disclosed the hardware behind this offering">undisclosed</span>'}</td>
|
|
@@ -1257,7 +1273,7 @@ function renderRoster() {
|
|
|
1257
1273
|
<div style="display:flex; align-items:center; gap:0.5rem; border:1px solid var(--line); border-radius:6px; padding:0.35rem 0.6rem; font-size:0.78rem">
|
|
1258
1274
|
<span class="mono" style="font-size:0.66rem; color:var(--accent)">${i + 1}</span>
|
|
1259
1275
|
<span style="flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap"><b>${esc(targetLabel(t))}</b>${t.offering ? ` <span style="color:var(--muted)">${esc(t.offering.node_id)}</span>` : ' <span class="chip">custom</span>'}</span>
|
|
1260
|
-
<
|
|
1276
|
+
<button type="button" class="rm" data-rm="${i}" title="remove" aria-label="Remove ${esc(targetLabel(t))}">✕</button>
|
|
1261
1277
|
</div>`).join('') || '<p class="prov" style="margin:0">no models yet</p>';
|
|
1262
1278
|
document.querySelectorAll('#ch-chips [data-rm]').forEach((x) => x.addEventListener('click', () => {
|
|
1263
1279
|
chat.roster.splice(Number(x.dataset.rm), 1); renderRoster();
|
|
@@ -1925,11 +1941,26 @@ function claimBanner(n, card) {
|
|
|
1925
1941
|
? `Claim it: publish a signed Node Card at <span class="mono">https://${esc(host)}/.well-known/open-node.json</span> with node id <span class="mono">${esc(suggestedId)}</span> (your parent domain works too) and register. Your verified listing replaces this import, the registry measures what you really serve, and nothing in your stack changes.`
|
|
1926
1942
|
: 'This listing has no known API endpoint. Publish a Node Card for your OpenAI-compatible API to be listed, measured and verified.';
|
|
1927
1943
|
const mail = `mailto:operators@opennodes.io?subject=${encodeURIComponent('Claim ' + n.id)}`;
|
|
1944
|
+
const api = card.endpoints?.openai;
|
|
1945
|
+
const steps = host && !viaHf ? `<details class="claim">
|
|
1946
|
+
<summary class="btn">Claim this listing</summary>
|
|
1947
|
+
<p>Card-only mode: nothing in your stack changes. The kit signs a card describing your API; you host two files on <span class="mono">${esc(host)}</span> and give the registry a low-quota key for its checks.</p>
|
|
1948
|
+
<pre><code>pipx install onp-node
|
|
1949
|
+
onp-node init --engine ${esc(api)} --id ${esc(suggestedId)} --public-url https://${esc(host)}
|
|
1950
|
+
# edit onp-node.toml: prices per MTok, schemes = ["prepaid"], data_policy, optional [hardware]
|
|
1951
|
+
onp-node card --out well-known
|
|
1952
|
+
# host well-known/open-node.json and well-known/jwks.json at https://${esc(host)}/.well-known/
|
|
1953
|
+
ONP_PROBE_KEY=<a key with a small quota> onp-node register https://registry.opennodes.io \\
|
|
1954
|
+
--card-url https://${esc(host)}/.well-known/open-node.json --probe-key-env ONP_PROBE_KEY
|
|
1955
|
+
# publish the printed challenge at /.well-known/onp-challenge/<token> or as a DNS TXT record</code></pre>
|
|
1956
|
+
<p>The checks then run on their own: model identity, context window, capacity, server location. Passing them earns the verified tier, and your listing replaces this import. The probe key is sent only to your own API and never appears in any registry response.</p>
|
|
1957
|
+
</details>` : '';
|
|
1928
1958
|
return `<div class="panel pad" style="max-width:56rem; margin:0.4rem 0 0.8rem; border-left:3px solid var(--accent)">
|
|
1929
1959
|
<p style="margin:0 0 0.35rem; font-weight:600">Do you run ${esc(name)}?</p>
|
|
1930
1960
|
<p style="margin:0 0 0.6rem; font-size:0.86rem; color:var(--muted); overflow-wrap:anywhere">${body} Free, about 15 minutes with the Node Kit.</p>
|
|
1961
|
+
${steps}
|
|
1931
1962
|
<span style="display:inline-flex; gap:0.6rem; flex-wrap:wrap; font-size:0.84rem">
|
|
1932
|
-
<a href="${CLAIM_GUIDE}" target="_blank" rel="noopener">
|
|
1963
|
+
<a href="${CLAIM_GUIDE}" target="_blank" rel="noopener">Full guide →</a>
|
|
1933
1964
|
<a href="#/register">Register a node</a>
|
|
1934
1965
|
<a href="${mail}">operators@opennodes.io</a>
|
|
1935
1966
|
</span>
|