Skip to content

Corral

Report what a Shiitake client is doing right now into its Herdr pane, so Herdr can show idle, working or blocked without polling your process.

  • @fungi.computer/corral
  • v0.1.4
  • MIT

Fastest path

  1. Install

    Add it to your project with npm, pnpm, Yarn or Bun.

    TERMINAL
    npm install @fungi.computer/corral
  2. Attach an activity stream

    attachCorral attaches a borrowed activity stream; outside a Herdr pane (no HERDR_ENV) it safely no-ops without opening a socket.

    home.ts
    import * as Effect from "effect/Effect";
    import * as Stream from "effect/Stream";
    import { attachCorral } from "@fungi.computer/corral";
    await Effect.runPromise(
    Effect.scoped(
    attachCorral(
    Stream.fromIterable([{ state: "idle" }, { state: "working" }]),
    {
    environment: {},
    onError: (error) => console.error("Herdr report failed", error),
    },
    ),
    ),
    );
    console.log("attached outside Herdr"); // no HERDR_ENV: a safe no-op