@polygraph/opencode-plugin
Advanced tools
+1
-1
| { | ||
| "name": "@polygraph/opencode-plugin", | ||
| "version": "0.4.25", | ||
| "version": "0.4.26", | ||
| "description": "AI agent skills and subagents for Polygraph multi-repo coordination", | ||
@@ -5,0 +5,0 @@ "license": "UNLICENSED", |
+6
-2
@@ -115,4 +115,8 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs'; | ||
| // not a Polygraph session (no matching parent-log sidecar) — a silent no-op. | ||
| // | ||
| // These helpers must NOT be exported: OpenCode calls every export of this | ||
| // module as a plugin factory, and a factory that doesn't return a hooks object | ||
| // crashes the server on startup ("Unexpected server error"). | ||
| export function polygraphCompactionNote(agentSessionId, root) { | ||
| function polygraphCompactionNote(agentSessionId, root) { | ||
| const session = readPolygraphSession(agentSessionId, root); | ||
@@ -136,3 +140,3 @@ if (!session) { | ||
| export function readPolygraphSession( | ||
| function readPolygraphSession( | ||
| agentSessionId, | ||
@@ -139,0 +143,0 @@ root = path.join(homedir(), '.polygraph') |
@@ -108,3 +108,3 @@ --- | ||
| **Case C only — new session just created:** After the init subagent completes and creates the new session, render the session welcome card (skip the session-details block below for this case). Prefer the `session_intro` MCP tool — call it with the session ID; it returns the card as markdown. If that tool is unavailable, run `polygraph session intro -s <sessionId>` via the CLI instead. Either way, print the result to the user verbatim as markdown — do NOT wrap it in a code block or reformat it (the logo is pre-fenced; the rest is live markdown). It needs no other input, and you do not need to call `show_session` first. Then continue (ask the user what they want, or start the requested task). | ||
| **Case C only — new session just created:** After the init subagent completes and creates the new session, render the session welcome card (skip the session-details block below for this case). Prefer the `session_intro` MCP tool — call it with the session ID; it returns the card as markdown. If that tool is unavailable, run `polygraph session intro -s <sessionId>` via the CLI instead. The CLI command is intentionally hidden/internal and may not appear in public command listings, but it remains the correct skill fallback for rendering the welcome card. Either way, print the result to the user verbatim as markdown — do NOT wrap it in a code block or reformat it (the logo is pre-fenced; the rest is live markdown). It needs no other input, and you do not need to call `show_session` first. Then continue (ask the user what they want, or start the requested task). | ||
@@ -111,0 +111,0 @@ **After receiving the subagent's summary (Case B) or after calling `show_session` for an existing session (Case A), print the session details:** |
90711
0.42%159
2.58%