@henryqw/pi-herdr 0.4.0 → 0.4.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 (2) hide show
  1. package/README.md +10 -12
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -4,8 +4,8 @@ Run Herdr CLI commands from Node through one thin client. Callers keep orchestra
4
4
 
5
5
  ## Why
6
6
 
7
- - **Created for**: Calling Herdr CLI commands from Node without duplicating wrapper logic across extensions that each needed `exec`, `run`, and JSON parsing.
8
- - **Advantage**: One thin client keeps orchestration local while the Herdr CLI stays the single source of truth for commands and response shapes.
7
+ - **Created for**: Call Herdr CLI commands from Node without duplicating wrapper logic across extensions.
8
+ - **Advantage**: One thin client keeps orchestration local. The Herdr CLI remains the source of truth for commands and response shapes.
9
9
 
10
10
  ## Install
11
11
 
@@ -22,14 +22,12 @@ const herdr = createHerdrClient(pi.exec.bind(pi));
22
22
  const response = await herdr.json(["agent", "list"], { cwd: ctx.cwd });
23
23
  ```
24
24
 
25
- `exec` validates string argv and returns the raw process result. `run` requires a successful exit and returns stdout. `json` also parses a JSON object. `hasHerdrErrorCode` detects structured CLI errors in stdout or stderr. `startPiAgent` validates and builds the shared `agent start --kind pi --pane ... --` boundary, retries structured `agent_pane_busy` responses allowed by the caller's result-aware policy within a five-attempt limit, and returns the raw final result; callers still build Pi-specific args and validate responses.
25
+ | API | Result |
26
+ | --- | --- |
27
+ | `exec` | Validates string argv and returns the raw process result. |
28
+ | `run` | Requires a successful exit and returns stdout. |
29
+ | `json` | Requires a successful exit and parses a JSON object. |
30
+ | `hasHerdrErrorCode` | Detects structured CLI errors in stdout or stderr. |
31
+ | `startPiAgent` | Validates and builds the shared `agent start --kind pi --pane ... --` boundary. It retries structured `agent_pane_busy` responses allowed by the caller's result-aware policy, with a five-attempt limit, and returns the raw final result. |
26
32
 
27
- Client does not mirror the Herdr command catalog. Herdr remains the source of truth for supported commands and response shapes.
28
-
29
- ## Development
30
-
31
- ```bash
32
- npm test --workspace @henryqw/pi-herdr
33
- npm run typecheck --workspace @henryqw/pi-herdr
34
- npm run pack:check --workspace @henryqw/pi-herdr
35
- ```
33
+ Callers build Pi-specific arguments and validate responses. The client does not mirror the Herdr command catalog. Herdr remains the source of truth for supported commands and response shapes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-herdr",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Shared client for interacting with Herdr from Node.js tools and Pi packages.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -14,9 +14,9 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "files": [
17
+ "LICENSE",
17
18
  "dist",
18
- "README.md",
19
- "LICENSE"
19
+ "README.md"
20
20
  ],
21
21
  "types": "./dist/index.d.ts",
22
22
  "exports": {