@polygraph/claude-plugin 0.4.49 → 0.4.50

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polygraph",
3
- "version": "0.4.49",
3
+ "version": "0.4.50",
4
4
  "description": "AI agent skills and subagents for Polygraph sessions, repository context, and coordination",
5
5
  "author": {
6
6
  "name": "Narwhal Technologies Inc",
@@ -5,6 +5,7 @@ description: Waits for one Polygraph child agent (addressed by delegation id) to
5
5
  model: haiku
6
6
  tools:
7
7
  - mcp__plugin_polygraph_polygraph-mcp__show_agent
8
+ - Bash
8
9
 
9
10
  ---
10
11
 
@@ -21,19 +22,29 @@ The main agent already spawned the child via `spawn_agent` and received a delega
21
22
  | `sessionId` | The Polygraph session ID |
22
23
  | `id` | The delegation id returned by `spawn_agent` (e.g. `frontend-1`) |
23
24
 
25
+ ## Two ways to poll
26
+
27
+ | MCP tool | CLI equivalent |
28
+ | ------------ | ------------------------------------------------------------------------------------- |
29
+ | `show_agent` | `polygraph agent show --session <sessionId> --id <id> --wait-for-transition-ms 300000` |
30
+
31
+ Prefer the MCP tool. It is not always there: the Polygraph MCP server may not be installed, and some harnesses are still starting it during your first turn, in which case `show_agent` is missing from your tool list rather than failing loudly. Check your available tools before the first poll. If `show_agent` is absent, or a call reports an unknown or unavailable tool, use the CLI for the rest of the loop and do not switch back.
32
+
33
+ The CLI takes the same two identifiers, blocks the same way, and prints the same payload as JSON on stdout: `{ "success": true, "sessionId": "…", "children": [ … ] }`. Read `children[0]` from it exactly as you would from the tool response. Everything below applies to whichever one you are using.
34
+
24
35
  ## Loop
25
36
 
26
- Call the `show_agent` tool with exactly these arguments, repeatedly:
37
+ Call `show_agent` with exactly these arguments, repeatedly:
27
38
 
28
39
  - `sessionId`: the session ID
29
40
  - `id`: the delegation id
30
41
  - `waitForTransitionMs`: 300000
31
42
 
32
- Never pass `tail`. Never call any other tool. Never read files, transcripts, or logs.
43
+ Never pass `tail`. Apart from the CLI fallback above, never call any other tool, and never read files, transcripts, or logs.
33
44
 
34
45
  Each call blocks up to 5 minutes, then returns the child's `status` on `children[0]`:
35
46
 
36
- - `in-progress` or `created` → call `show_agent` again with the same arguments.
47
+ - `in-progress` or `created` → poll again with the same arguments.
37
48
  - `completed`, `failed`, `cancelled`, `input-required`, or `permission-required` → stop looping and exit with the message below.
38
49
 
39
50
  If a call errors, retry it once. If it errors again, exit with the error text plus the delegation id and stop.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygraph/claude-plugin",
3
- "version": "0.4.49",
3
+ "version": "0.4.50",
4
4
  "description": "AI agent skills and subagents for Polygraph sessions, repository context, and coordination",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,