---
name: bdo-game-status
version: 1.0.0
description: >
  Callable plugin: check whether Black Desert Online is currently running on the local machine.
  Returns {"running": true/false, "pid": <int or null>, "uptime_sec": <float or null>}.
  When called, Furoshiki can answer "Is BDO running?" without you having to check manually.
author: user
active: false
hooks:
  - type: callable
    name: bdo_game_status
    description: "Check whether Black Desert Online is currently running"
    when_to_use: >
      When the user asks whether BDO is running, wants to start a session, or asks
      about their gaming schedule. Returns running status and process uptime.
    args_schema:
      type: object
      properties: {}
      required: []
    entry: scripts/hook.py
    timeout: 10
permissions:
  network: false
  output_mind_queue: false
  llm: false
  openrouter_web: false
---

> **Note:** This directory is a **local illustrative sample** for testing callable plugins (process scan). It is not part of Furoshiki’s core product story. For maintained hook coverage, use **`hook-test-suite/`**.

# BDO Game Status

Callable plugin that checks whether **Black Desert Online** is currently running on
the local machine using only the Python standard library (`psutil` optional; falls
back to `ps aux` grep on Linux/macOS or `tasklist` on Windows).

## What it does

When the model calls `bdo_game_status`, the plugin:

1. Scans running processes for known BDO executable names (`BlackDesert64.exe`,
   `BlackDesert.exe`, `BlackDesert`).
2. Returns `{"running": true, "pid": <int>, "uptime_sec": <float>}` if found.
3. Returns `{"running": false, "pid": null, "uptime_sec": null}` if not found.

## Setup

```bash
cp -r examples/plugins/bdo-game-status ~/.furoshiki/plugins/
nano ~/.furoshiki/plugins/bdo-game-status/PLUGIN.md   # set active: true
furoshiki plugins reload
```

After enabling, Furoshiki will answer "Is BDO running?" by calling this plugin
instead of guessing.

## No external dependencies

The plugin uses only `subprocess` + stdlib to scan processes. `psutil` is used
if available for richer data (uptime), but not required.

### WSL (Windows) + game on the host

If Furoshiki runs **inside WSL** but the game runs on **Windows**, normal Linux
`ps` cannot see Windows processes. The script detects WSL and runs
`cmd.exe /c tasklist …` via **WSL interop** so the Windows process list is
checked. That requires default WSL settings (`interop` enabled in
`/etc/wsl.conf` or the Windows default). If `cmd.exe` is blocked, the plugin
falls back to the Linux path (which will not see the game).
