@polygraph/opencode-plugin 0.4.22 → 0.4.24

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.
package/README.md CHANGED
@@ -119,7 +119,7 @@ For the strictest release flow, do not allow direct `npm publish` for the truste
119
119
  ## Learn More
120
120
 
121
121
  - **[Polygraph](https://nx.dev/features/polygraph)** — Multi-repo coordination with Polygraph
122
- - **[polygraph-mcp](https://www.npmjs.com/package/polygraph-mcp)** — The MCP server that powers Polygraph tools
122
+ - **[@polygraph/mcp](https://www.npmjs.com/package/@polygraph/mcp)** — The MCP server that powers Polygraph tools
123
123
  - **[Nx AI Agent Skills](https://github.com/nrwl/nx-ai-agents-config)** — The main Nx AI agent skills repo
124
124
 
125
125
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygraph/opencode-plugin",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
4
4
  "description": "AI agent skills and subagents for Polygraph multi-repo coordination",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -21,7 +21,7 @@ Polygraph functionality is available via both MCP tools and CLI commands. Use wh
21
21
  | `spawn_agent` | — | Start a new child task or send an explicit follow-up to an active task in another repository. Input: `{ sessionId, repo, instruction, context?, taskId? }`. Output: `{ taskId, message, status: 'delegated' }`. Pass the `taskId` returned by a prior call to route a follow-up message to a specific active task; omit to start a new child run. A session resume or reconstruction is read-only context restoration; after resuming, do not use `spawn_agent` to continue changes unless the user explicitly asks for changes. |
22
22
  | `show_agent` | — | Poll flat per-child status for the session. Output: `{ children: PolygraphChildStatusItem[] }` where each item exposes `repositoryId`, `repoFullName`, `status`, `lastOutputLines`, `durationMs`, `instruction`, `agentType?`, `inputRequiredQuestion?`. `status` is an AcpRunStatus: `'created' \| 'in-progress' \| 'input-required' \| 'completed' \| 'failed' \| 'cancelled'` (British double-L on `'cancelled'`). `inputRequiredQuestion` is populated only when `status === 'input-required'`. |
23
23
  | `stop_agent` | — | Cancel an in-progress child. Output: `{ taskId, state: 'cancelled', sessionPreserved: true, output, message }`. Because `sessionPreserved: true`, the preserved agent session can be restored later for context, but resume must wait for explicit user instructions before making changes. |
24
- | `push_branch` | — | Push a local git branch to the remote repository |
24
+ | `push_branch` | — | Push a local git branch to the remote repository. Requires a session description. |
25
25
  | `create_pr` | — | Create draft PRs with session metadata linking related PRs |
26
26
  | `show_session` | `polygraph session show <id> [--details]` | Query status of the current session. Use details when session summary, repo IDs, PR URLs, and PR descriptions are needed. |
27
27
  | `update_session_description` | `polygraph session update-description` | Set the current session description from a synthesized progress summary or user-provided text. This updates session metadata only; it does not require PR creation or mark-ready. |
@@ -64,9 +64,9 @@ After logging in (or if logged in but no org is selected), use `polygraph accoun
64
64
 
65
65
  4. **Monitor child agents** - Use `show_agent` to poll progress and read the flat `children[]` array for each child's `status` and `lastOutputLines`.
66
66
  5. **Stop child agents** (if needed) - Use `stop_agent` to cancel an in-progress child agent. The underlying agent session is preserved for later read-only context restoration; after a resume, wait for explicit user instructions before making changes.
67
- 6. **Push branches** - Use `push_branch` after making commits.
68
- 7. **Update session description** (optional) - Use `update_session_description` to set the current session description from a progress summary or user-provided text that follows the Session Description Policy. This is independent of PR creation or mark-ready.
69
- 8. **Create draft PRs** - Use `create_pr` to create linked draft PRs. Pass `description` only when you are already creating PRs and can provide session context that follows the Session Description Policy.
67
+ 6. **Push branches** - Use `push_branch` after making commits. A required `description` must follow the Session Description Policy.
68
+ 7. **Update session description** - Use `update_session_description` to update the session description; must follow the Session Description Policy. Independent of PR creation or mark-ready.
69
+ 8. **Create draft PRs** - Use `create_pr` to create linked draft PRs. Always pass `description` following the Session Description Policy.
70
70
  9. **Associate existing PRs** (optional) - Use `associate_pr` to link PRs created outside Polygraph.
71
71
  10. **Query PR status** - Use `show_session` to check progress.
72
72
  11. **Mark PRs ready** - Use `mark_pr_ready` when work is complete.
@@ -281,6 +281,7 @@ Once work is complete in a repository, push the branch using `push_branch`. This
281
281
  - `sessionId` (required): The Polygraph session ID
282
282
  - `repo` (required): Repository name or repository ID to push from
283
283
  - `branch` (required): Branch name to push to remote
284
+ - `description` (required): A session description is required. Must follow the Session Description Policy.
284
285
 
285
286
  ```
286
287
  push_branch(
@@ -294,9 +295,7 @@ push_branch(
294
295
 
295
296
  `description` is user-facing Polygraph session context.
296
297
 
297
- The same policy applies anywhere a Polygraph tool accepts `description`, including `create_pr`, `associate_pr`, and `update_session_description`.
298
-
299
- If you pass `description`, use the canonical structured format:
298
+ `description` is required for `push_branch`, `create_pr`, `associate_pr`, and `update_session_description`. (`mark_pr_ready` does not take a description.) Use the canonical structured format:
300
299
 
301
300
  ```text
302
301
  Goal: <what the session is trying to accomplish>
@@ -330,7 +329,7 @@ Create PRs for all repositories at once using `create_pr`. PRs are created as dr
330
329
  - `body` (required): PR description (session metadata is appended automatically)
331
330
  - `branch` (required): Branch name that was pushed
332
331
  - `targetRepository` (optional): Target GitHub repository for fork PR creation or registration, as `owner/repo`. Omit for same-repository PRs.
333
- - `description` (optional): Optional. If supplied, it must follow the Session Description Policy.
332
+ - `description` (required): Must follow the Session Description Policy.
334
333
 
335
334
  **PR title format (applies to parent and child agents):**
336
335
 
@@ -516,7 +515,7 @@ Provide either a `prUrl` to associate a specific PR, or a `branch` name plus `re
516
515
  - `prUrl` (optional): URL of an existing pull request to associate
517
516
  - `branch` (optional): Branch name to find and associate PRs for
518
517
  - `repo` (optional): Source repository for branch-based association. Required when using `branch` in a multi-repo session.
519
- - `description` (optional): Optional. If supplied, it must follow the Session Description Policy.
518
+ - `description` (required): Must follow the Session Description Policy.
520
519
 
521
520
  ```
522
521
  associate_pr(
@@ -673,6 +672,7 @@ If the session has a description timeline, also display:
673
672
  1. **Poll child status before proceeding** — Always verify child agents have reached a terminal `child.status` (`'completed'`, `'failed'`, or `'cancelled'`) via `show_agent` before pushing branches or creating PRs
674
673
  1. **Link PRs in descriptions** - Reference related PRs in each PR body
675
674
  1. **Keep PRs as drafts** until all repos are ready
675
+ 1. **Always pass `description`** when calling `create_pr`, `associate_pr`, or `update_session_description` — it is required and must follow the Session Description Policy
676
676
  1. **Test integration** before marking PRs ready
677
677
  1. **Coordinate merge order** if there are deployment dependencies
678
678