@sigil-dev/plugin-namepool
v0.9.2
Published
Automatic worker names for Sigil
Downloads
1,194
Readme
@sigil-dev/plugin-namepool
Assigns human-readable names to Grimoire workers instead of the default mode-index identifiers like api-0, ws-1.
Installation
bun add @sigil-dev/plugin-namepoolUsage
import { defineConfig } from "@sigil-dev/grimoire";
import { namepool } from "@sigil-dev/plugin-namepool";
export default defineConfig({
plugins: [
namepool({ names: ["Rei", "Asuka", "Misato", "Kaworu", "Ritsuko"] }),
],
dev: true,
});Workers are assigned names by globalIndex — the first worker across all modes gets names[0], the second gets names[1], and so on. If there are more workers than names, the remainder fall back to mode-index.
Options
interface NamepoolOptions {
names: string[];
}| Option | Type | Description |
|---|---|---|
| names | string[] | Ordered list of names to assign to workers by global index. |
Integration with plugin-health
When both plugins are registered, plugin-health automatically picks up the name pool and uses it to report reserved workers — names in the pool that have no live worker assigned. No manual wiring needed.
import { namepool } from "@sigil-dev/plugin-namepool";
import { healthPlugin } from "@sigil-dev/plugin-health";
export default defineConfig({
plugins: [
namepool({ names: ["Rei", "Asuka", "Shinji"] }),
healthPlugin(), // finds namepool automatically via onPluginsResolved
],
});The /health endpoint will include all three names in the cluster array, marking any without a live worker as "reserved".
