herdr-dashr 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +49 -14
  2. package/bin.js +12 -11
  3. package/package.json +6 -5
package/README.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # herdr-dashr
2
2
 
3
3
  A [Herdr](https://github.com/herdrdev/herdr) plugin that opens an
4
- **agent-built, live Grafana dashboard inside a Herdr pane**, with a coding
5
- agent underneath to reshape it.
4
+ **agent-built, live Grafana dashboard inside a Herdr pane**, built and
5
+ reshaped by the AI session you are already talking to.
6
+
7
+ You only talk to your AI session. Paste a CodePipeline link and say
8
+ *"visualize it on a dashboard"*: its herdr-dashr skill opens the dashboard
9
+ pane beside you and builds the dashboard, then keeps changing it as you ask.
6
10
 
7
11
  - **Real Grafana, in the terminal.** The top pane shows Grafana in kiosk mode
8
12
  through [terminal-browser](https://github.com/zenbu-labs/terminal-browser);
9
13
  without it, a text status view.
10
14
  - **No model in the data path.** Grafana refreshes the data. The agent only
11
- changes the dashboard, through an MCP server.
15
+ changes the dashboard, through the `dashr` tools (a command line, or MCP).
12
16
  - **Privacy by construction.** The agent designs from schemas and masked
13
17
  samples (`<email#1>`, `<ipv4#2>`); only you see real values.
14
18
  - **Disposable.** A pane-owned Grafana container with a read-only root and
@@ -26,23 +30,36 @@ agent underneath to reshape it.
26
30
 
27
31
  `docs/PRD.md` is the authoritative specification and delivery ledger.
28
32
 
29
- **Status:** v0.1.0, the first public release. All but one PRD requirement verified (the first npm publish comes with this release), most by an end-to-end
33
+ **Status:** v0.1.2, on GitHub and npm, for Linux, macOS and Windows. Windows support and the AI-session flow are new; everything else is verified, most by an end-to-end
30
34
  suite that runs a real Herdr, a real Grafana and terminal-browser in CI.
31
35
 
32
36
  ## Install
33
37
 
38
+ Linux, macOS and Windows:
39
+
34
40
  ```bash
35
41
  herdr plugin install czinegeroland/herdr-dashr
36
42
  ```
37
43
 
38
- The build step installs the prebuilt `dashr` binary for your platform — from
39
- npm (`herdr-dashr`), whose platform packages were verified against the
40
- release's SHA-256 before they were packed; failing that from the GitHub
41
- release, verified the same way; and only as a last resort with `cargo`. No
42
- Rust toolchain is needed. `DASHR_INSTALL_SOURCE=npm|github|source` forces one. You need
43
- Docker. terminal-browser (for the real Grafana UI; it refuses to run as root), Claude Code (the chat
44
- pane) and the AWS CLI (CodePipeline, CloudWatch) are optional — run the
45
- **Check dashr prerequisites** action to see what is missing.
44
+ The build step runs `npm install herdr-dashr@<version>` in the plugin
45
+ directory, as herdr-remote-channel does: npm installs the one platform
46
+ package whose prebuilt `dashr` matches your machine (verified against the
47
+ release's SHA-256 before it was packed), and every Herdr entry point runs it
48
+ through `node node_modules/herdr-dashr/bin.js`. You need Node.js 18+ and
49
+ Docker; no Rust toolchain. terminal-browser (for the real Grafana UI; it
50
+ refuses to run as root), Claude Code (the chat pane) and the AWS CLI
51
+ (CodePipeline, CloudWatch) are optional — run the **Check dashr
52
+ prerequisites** action to see what is missing.
53
+
54
+ Another build step installs the **herdr-dashr skill** for Claude Code with
55
+ `npx skills add czinegeroland/herdr-dashr --skill herdr-dashr --agent
56
+ claude-code --global`, as herdr-remote-channel installs its skill. Your AI
57
+ session also needs the `dashr` command: `npm install -g herdr-dashr` (the
58
+ skill runs it for you when `dashr` is missing).
59
+
60
+ On Windows, Docker Desktop must be running, and the chat pane's shell is
61
+ PowerShell. Without terminal-browser the dashboard pane shows the Grafana URL;
62
+ Ctrl-click it to open Grafana in your browser.
46
63
 
47
64
  ### The CLI on its own
48
65
 
@@ -57,6 +74,21 @@ from GitHub.
57
74
 
58
75
  ## Use
59
76
 
77
+ Ask your AI session, in Herdr:
78
+
79
+ - *"Visualize this on a dashboard: https://eu-west-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/api/view"*
80
+ - *"Show me error rates and latency for checkout."*
81
+ - *"I'm about to run the importer — show me its logs and check that `import done` is logged."*
82
+
83
+ The skill opens the dashboard pane beside the conversation (`herdr plugin
84
+ pane open --plugin herdr-dashr --entrypoint dashboard`), waits for Grafana
85
+ (`dashr wait`) and builds with `dashr tool <name>`: the same tools, masking
86
+ and privacy rules as the MCP server. You never have to leave the
87
+ conversation.
88
+
89
+ The Herdr actions still work without an AI session of your own; they open a
90
+ tab with Grafana on top and a new agent underneath:
91
+
60
92
  | Action | What it does |
61
93
  |---|---|
62
94
  | **Open live dashboard** | New tab: Grafana on top, the agent underneath. |
@@ -128,8 +160,11 @@ supported datasource (Prometheus, Loki, Tempo, CloudWatch, SQL Server, Azure
128
160
  Monitor, Zabbix, Seq, TestData) and debugging recipes (deploys, queue
129
161
  backlogs, Step Functions failures, error spikes, latency).
130
162
 
131
- - Installed by the plugin's build step, refreshed by the dashboard pane when
132
- the binary is newer. A skill of the same name that you wrote is never
163
+ - Installed by the plugin's build step with `npx skills add` from this
164
+ repository, as herdr-remote-channel does. It teaches your own AI session
165
+ to open the dashboard pane and drive it with `dashr wait` and `dashr tool`.
166
+ - `dashr skill install --dir <skills-dir>` installs the copy embedded in the
167
+ binary, for other agents; a skill of the same name that you wrote is never
133
168
  replaced (`--force` to override).
134
169
  - Also served as MCP resources (`dashr://guide/...`), so any MCP agent gets it.
135
170
  - `dashr skill files`, `dashr skill print reference/recipes.md`,
package/bin.js CHANGED
@@ -16,16 +16,18 @@ import { fileURLToPath } from 'node:url'
16
16
  import { dirname, join, sep } from 'node:path'
17
17
 
18
18
  const require = createRequire(import.meta.url)
19
- const binary = 'dashr'
19
+ const binary = process.platform === 'win32' ? 'dashr.exe' : 'dashr'
20
20
 
21
- // Keep in step with `scripts/build-npm-packages.mjs`, `scripts/install.sh`
22
- // and the release matrix; `crates/dashr-cli/tests/distribution.rs` holds them
23
- // together.
21
+ // The package holding each platform's executable. Keep in step with
22
+ // `scripts/build-npm-packages.mjs` (Windows is scoped there, see why),
23
+ // `scripts/install.sh` and the release matrix;
24
+ // `crates/dashr-cli/tests/distribution.rs` holds them together.
24
25
  const PACKAGES = {
25
- 'linux x64': 'linux-x64',
26
- 'linux arm64': 'linux-arm64',
27
- 'darwin x64': 'darwin-x64',
28
- 'darwin arm64': 'darwin-arm64',
26
+ 'linux x64': 'herdr-dashr-linux-x64',
27
+ 'linux arm64': 'herdr-dashr-linux-arm64',
28
+ 'darwin x64': 'herdr-dashr-darwin-x64',
29
+ 'darwin arm64': 'herdr-dashr-darwin-arm64',
30
+ 'win32 x64': '@czinegeroland/herdr-dashr-win32-x64',
29
31
  }
30
32
 
31
33
  // Run from `npm/dashr` inside a source checkout (a symlinked
@@ -51,8 +53,8 @@ if (here.endsWith(`${sep}npm${sep}dashr`)) {
51
53
  // The prebuilt executable npm installed for this platform.
52
54
  function published() {
53
55
  const key = `${process.platform} ${process.arch}`
54
- const suffix = PACKAGES[key]
55
- if (!suffix) {
56
+ const pkg = PACKAGES[key]
57
+ if (!pkg) {
56
58
  console.error(
57
59
  `dashr: no prebuilt binary for ${key}.\n` +
58
60
  `Supported: ${Object.keys(PACKAGES).join(', ')}.\n` +
@@ -60,7 +62,6 @@ function published() {
60
62
  )
61
63
  process.exit(1)
62
64
  }
63
- const pkg = `herdr-dashr-${suffix}`
64
65
  try {
65
66
  return require.resolve(`${pkg}/${binary}`)
66
67
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-dashr",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Agent-built, live Grafana dashboards in a Herdr pane, with masking between your data and the agent.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -26,10 +26,11 @@
26
26
  "README.md"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "herdr-dashr-linux-x64": "0.1.0",
30
- "herdr-dashr-linux-arm64": "0.1.0",
31
- "herdr-dashr-darwin-x64": "0.1.0",
32
- "herdr-dashr-darwin-arm64": "0.1.0"
29
+ "herdr-dashr-linux-x64": "0.1.2",
30
+ "herdr-dashr-linux-arm64": "0.1.2",
31
+ "herdr-dashr-darwin-x64": "0.1.2",
32
+ "herdr-dashr-darwin-arm64": "0.1.2",
33
+ "@czinegeroland/herdr-dashr-win32-x64": "0.1.2"
33
34
  },
34
35
  "engines": {
35
36
  "node": ">=18"