Files
mesh-catalog/modules/icecast/tools/index.ts
T
jschoubben 8f8e0153b1 searxng, icecast, photos: full nox modules (ADR 0044/0046)
searxng: a search tool — tools-only, a stateless search has nothing to observe.
icecast: status tool, emits stream.started/.stopped by diffing live mountpoints.
photos: status/albums/recent tools, emits item.added (immich-shaped API, coded
defensively since the stub ships a placeholder image — flagged in the code).
Typecheck; manifests parse.
2026-09-04 02:46:24 +02:00

27 lines
717 B
TypeScript

// icecast's tools (novox/hq ADR 0044), importing icecast's own client.
import { registerModuleTools, type ToolDefinition } from "@novox/mesh-sdk/tools";
import { IcecastClient } from "../client.js";
export function getIcecastTools(icecast: IcecastClient): ToolDefinition[] {
return [
{
name: "icecast_status",
description: "Icecast streaming status: live mountpoints, each with its listener count, plus the total.",
input: {},
run: async () => {
const status = await icecast.getStatus();
return status;
},
},
];
}
registerModuleTools("icecast", (env) => {
try {
return getIcecastTools(IcecastClient.fromEnv(env));
} catch {
return [];
}
});