opencode-codegraph 0.1.23 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.24 - 2026-03-20
4
+
5
+ - surface workflow-state transitions after later bash interactions so async state changes become visible without waiting for explicit status checks
6
+
3
7
  ## 0.1.23 - 2026-03-20
4
8
 
5
9
  - surface workflow-state transitions on later interactions so async status changes become visible without waiting for a fresh session
package/README.md CHANGED
@@ -117,6 +117,7 @@ Place in `.opencode/commands/`:
117
117
  | `tool.execute.after` on test commands | Add after-test workflow guidance and detect failed test runs before suggesting the next command |
118
118
  | `tool.execute.after` on `git status` / `git diff` | Add current workflow guidance directly to common git inspection commands |
119
119
  | `tool.execute.after` | Trigger CPG update after git commit and append structured post-commit review summary |
120
+ | generic `tool.execute.after` | Surface workflow-state transitions after other bash commands when the underlying state changes |
120
121
  | `codegraph_review` tool | Returns review results together with current workflow guidance and suggested follow-up command |
121
122
  | `experimental.session.compacting` | Preserve current dogfooding status when OpenCode compacts long sessions |
122
123
  | `command.execute.before` | Inject current dogfooding status into `/review`, `/audit`, `/update`, `/status`, and `/next` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-codegraph",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "OpenCode plugin for CodeGraph CPG-powered code analysis",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -248,6 +248,7 @@ const codegraphPlugin: Plugin = async (input) => {
248
248
  "tool.execute.after": async (inp, output) => {
249
249
  if (inp.tool !== "bash") return
250
250
  const command = typeof inp.args?.command === "string" ? inp.args.command : ""
251
+ let appendedWorkflowGuidance = false
251
252
 
252
253
  if (isTestCommand(command)) {
253
254
  try {
@@ -260,6 +261,7 @@ const codegraphPlugin: Plugin = async (input) => {
260
261
  output.title = "CodeGraph: after-test guidance ready"
261
262
  const existingOutput = output.output?.trimEnd() || ""
262
263
  output.output = [existingOutput, transition || "", guidance].filter(Boolean).join("\n\n")
264
+ appendedWorkflowGuidance = true
263
265
  output.metadata = {
264
266
  ...output.metadata,
265
267
  codegraph_after_test_result: testFailed ? "failed" : "passed_or_unknown",
@@ -283,6 +285,7 @@ const codegraphPlugin: Plugin = async (input) => {
283
285
  output.title = "CodeGraph: git workflow guidance ready"
284
286
  const existingOutput = output.output?.trimEnd() || ""
285
287
  output.output = [existingOutput, transition || "", guidance].filter(Boolean).join("\n\n")
288
+ appendedWorkflowGuidance = true
286
289
  output.metadata = {
287
290
  ...output.metadata,
288
291
  codegraph_git_workflow_state: status.workflow_state || null,
@@ -295,6 +298,21 @@ const codegraphPlugin: Plugin = async (input) => {
295
298
  }
296
299
  }
297
300
 
301
+ if (!appendedWorkflowGuidance) {
302
+ try {
303
+ const rawStatus = await $`python -m src.cli.import_commands dogfood status --json`.quiet().text()
304
+ const status = JSON.parse(rawStatus)
305
+ const transition = workflowTransition(status)
306
+ if (transition) {
307
+ output.title = "CodeGraph: workflow update detected"
308
+ const existingOutput = output.output?.trimEnd() || ""
309
+ output.output = [existingOutput, transition].filter(Boolean).join("\n\n")
310
+ }
311
+ } catch {
312
+ // Best-effort guidance only
313
+ }
314
+ }
315
+
298
316
  if (!isGitCommit(output.output)) return
299
317
 
300
318
  try {