chore: scaffold llama-watch Stream Deck plugin

This commit is contained in:
2026-08-14 10:33:48 -06:00
parent beada4e44d
commit 2f5c5e33b0
12 changed files with 2664 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
node_modules/
*.streamDeckPlugin
.DS_Store
@@ -0,0 +1 @@
{ "type": "module" }
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
{
"$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json",
"Name": "llama-watch",
"Version": "1.0.0.0",
"Author": "Bryce Zuccaro",
"Actions": [],
"Category": "llama-watch",
"CodePath": "bin/plugin.js",
"Description": "Monitor llama-swap: in-flight requests per model and live GPU metric graphs.",
"Icon": "imgs/plugin/icon",
"SDKVersion": 2,
"Software": { "MinimumVersion": "6.5" },
"OS": [{ "Platform": "mac", "MinimumVersion": "13" }],
"Nodejs": { "Version": "24" },
"UUID": "com.bryce.llamawatch"
}
+2559
View File
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
{
"name": "llama-watch",
"version": "1.0.0",
"description": "Stream Deck plugin to monitor llama-swap requests and GPU metrics.",
"private": true,
"type": "module",
"scripts": {
"build": "rollup -c",
"watch": "rollup -c -w --watch.onEnd=\"streamdeck restart com.bryce.llamawatch\"",
"test": "tsx --test tests/"
},
"devDependencies": {
"@elgato/cli": "^1.8.1",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.2",
"@tsconfig/node20": "^20.1.4",
"@types/node": "22.13.0",
"rollup": "^4.32.1",
"tslib": "^2.8.1",
"tsx": "^4.19.2",
"typescript": "^5.7.3"
},
"dependencies": {
"@elgato/streamdeck": "^2.1.1"
}
}
+40
View File
@@ -0,0 +1,40 @@
import commonjs from "@rollup/plugin-commonjs";
import nodeResolve from "@rollup/plugin-node-resolve";
import terser from "@rollup/plugin-terser";
import typescript from "@rollup/plugin-typescript";
import path from "node:path";
import url from "node:url";
const isWatching = !!process.env.ROLLUP_WATCH;
const sdPlugin = "com.bryce.llamawatch.sdPlugin";
const config = {
input: "src/plugin.ts",
output: {
file: `${sdPlugin}/bin/plugin.js`,
sourcemap: isWatching,
sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => {
return url.pathToFileURL(path.resolve(path.dirname(sourcemapPath), relativeSourcePath)).href;
},
},
plugins: [
{
name: "watch-externals",
buildStart: function () {
this.addWatchFile(`${sdPlugin}/manifest.json`);
},
},
typescript({ mapRoot: isWatching ? "./" : undefined }),
nodeResolve({ browser: false, exportConditions: ["node"], preferBuiltins: true }),
commonjs(),
!isWatching && terser(),
{
name: "emit-module-package-file",
generateBundle() {
this.emitFile({ fileName: "package.json", source: `{ "type": "module" }`, type: "asset" });
},
},
],
};
export default config;
+1
View File
@@ -0,0 +1 @@
export {};
+1
View File
@@ -0,0 +1 @@
export {};
+3
View File
@@ -0,0 +1,3 @@
import streamDeck from "@elgato/streamdeck";
streamDeck.connect();
View File
+11
View File
@@ -0,0 +1,11 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"customConditions": ["node"],
"noImplicitOverride": true,
"module": "ES2022",
"moduleResolution": "Bundler"
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
}