skillscript-runtime 0.4.3 → 0.4.4
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.
|
@@ -11,6 +11,7 @@ const state = {
|
|
|
11
11
|
skills: [],
|
|
12
12
|
triggers: [],
|
|
13
13
|
metrics: null,
|
|
14
|
+
capabilities: null,
|
|
14
15
|
lastUpdate: null,
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -41,14 +42,16 @@ async function refresh() {
|
|
|
41
42
|
const ts = new Date();
|
|
42
43
|
document.getElementById("poll-status").textContent = `polling…`;
|
|
43
44
|
try {
|
|
44
|
-
const [skills, triggers, metrics] = await Promise.all([
|
|
45
|
+
const [skills, triggers, metrics, capabilities] = await Promise.all([
|
|
45
46
|
callTool("skill_list", {}),
|
|
46
47
|
callTool("list_triggers", {}),
|
|
47
48
|
callTool("health_metrics", {}),
|
|
49
|
+
callTool("runtime_capabilities", { include: ["mcpConnectors", "mcpConnectorClasses", "localModels", "memoryStores", "skillStores", "agentConnectors", "runtimeVersion"] }),
|
|
48
50
|
]);
|
|
49
51
|
state.skills = skills;
|
|
50
52
|
state.triggers = triggers;
|
|
51
53
|
state.metrics = metrics;
|
|
54
|
+
state.capabilities = capabilities;
|
|
52
55
|
state.lastUpdate = ts;
|
|
53
56
|
document.getElementById("poll-status").textContent = `last updated ${ts.toLocaleTimeString()}`;
|
|
54
57
|
renderCurrentView();
|
|
@@ -279,16 +282,65 @@ function renderTriggers() {
|
|
|
279
282
|
}
|
|
280
283
|
|
|
281
284
|
function renderConnectors() {
|
|
282
|
-
const
|
|
285
|
+
const caps = state.capabilities;
|
|
286
|
+
const wiredMcp = caps?.mcpConnectors ?? [];
|
|
287
|
+
const wiredLocal = caps?.localModels ?? [];
|
|
288
|
+
const wiredMemory = caps?.memoryStores ?? [];
|
|
289
|
+
const wiredSkill = caps?.skillStores ?? [];
|
|
290
|
+
const wiredAgent = caps?.agentConnectors ?? [];
|
|
291
|
+
const classes = caps?.mcpConnectorClasses ?? [];
|
|
292
|
+
const activity = state.metrics ? Object.entries(state.metrics.perConnector) : [];
|
|
293
|
+
|
|
294
|
+
const wiredTable = (label, entries, extraCols) => entries.length === 0
|
|
295
|
+
? ""
|
|
296
|
+
: `<h3>${esc(label)}</h3>
|
|
297
|
+
<table>
|
|
298
|
+
<thead><tr><th>Name</th><th>Class</th><th>Contract</th>${extraCols?.headers ?? ""}</tr></thead>
|
|
299
|
+
<tbody>
|
|
300
|
+
${entries.map((e) => `
|
|
301
|
+
<tr>
|
|
302
|
+
<td><strong>${esc(e.name)}</strong></td>
|
|
303
|
+
<td><code>${esc(e.implementation)}</code></td>
|
|
304
|
+
<td>${esc(e.contract_version)}</td>
|
|
305
|
+
${extraCols?.row?.(e) ?? ""}
|
|
306
|
+
</tr>
|
|
307
|
+
`).join("")}
|
|
308
|
+
</tbody>
|
|
309
|
+
</table>`;
|
|
310
|
+
|
|
311
|
+
// MCP connectors get an extra "Allowed tools" column (v0.4.1 allowlist).
|
|
312
|
+
const mcpExtra = {
|
|
313
|
+
headers: `<th>Allowed tools</th>`,
|
|
314
|
+
row: (e) => `<td>${e.allowed_tools === null || e.allowed_tools === undefined
|
|
315
|
+
? `<em>all</em>`
|
|
316
|
+
: e.allowed_tools.length === 0
|
|
317
|
+
? `<em>none (disabled)</em>`
|
|
318
|
+
: e.allowed_tools.map((t) => `<code>${esc(t)}</code>`).join(" ")}</td>`,
|
|
319
|
+
};
|
|
320
|
+
|
|
283
321
|
return `
|
|
284
322
|
<h2>Connectors</h2>
|
|
285
323
|
<section>
|
|
286
|
-
|
|
324
|
+
<h3>Wired</h3>
|
|
325
|
+
${wiredMcp.length + wiredLocal.length + wiredMemory.length + wiredSkill.length + wiredAgent.length === 0
|
|
326
|
+
? `<div class="empty">No connectors wired in this runtime.</div>`
|
|
327
|
+
: `${wiredTable("MCP", wiredMcp, mcpExtra)}
|
|
328
|
+
${wiredTable("Local model", wiredLocal)}
|
|
329
|
+
${wiredTable("Memory store", wiredMemory)}
|
|
330
|
+
${wiredTable("Skill store", wiredSkill)}
|
|
331
|
+
${wiredTable("Agent", wiredAgent)}`}
|
|
332
|
+
${classes.length > 0
|
|
333
|
+
? `<p class="meta">Available MCP classes for <code>connectors.json</code>: ${classes.map((c) => `<code>${esc(c)}</code>`).join(", ")}</p>`
|
|
334
|
+
: ""}
|
|
335
|
+
</section>
|
|
336
|
+
<section>
|
|
337
|
+
<h3>Activity</h3>
|
|
338
|
+
${activity.length === 0
|
|
287
339
|
? `<div class="empty">No connector activity yet. Run a skill that uses <code>$</code>/<code>~</code>/<code>></code> ops.</div>`
|
|
288
340
|
: `<table>
|
|
289
341
|
<thead><tr><th>Connector</th><th>Calls</th><th>Errors</th><th>p50</th><th>p95</th><th>p99</th><th>Last success</th></tr></thead>
|
|
290
342
|
<tbody>
|
|
291
|
-
${
|
|
343
|
+
${activity.map(([name, c]) => `
|
|
292
344
|
<tr>
|
|
293
345
|
<td><strong>${esc(name)}</strong></td>
|
|
294
346
|
<td>${c.callCount}</td>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillscript-runtime",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Runtime, compiler, lint, CLI, and dashboard for Skillscript — a small declarative language for authoring agent workflows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Scott Shwarts <scotts@pobox.com>",
|