opencode-codegraph 0.1.30 → 0.1.32
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 +8 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/index.ts +15 -8
- package/src/util.ts +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.32 - 2026-03-21
|
|
4
|
+
|
|
5
|
+
- align workflow-update blocks with the same closure-oriented framing used by other status-oriented surfaces
|
|
6
|
+
|
|
7
|
+
## 0.1.31 - 2026-03-21
|
|
8
|
+
|
|
9
|
+
- add current workflow guidance to `codegraph_explain_function` so tool-level explanations align with command-level DX
|
|
10
|
+
|
|
3
11
|
## 0.1.30 - 2026-03-21
|
|
4
12
|
|
|
5
13
|
- align git-oriented guidance and workflow-transition rendering with the shared workflow guidance block
|
package/README.md
CHANGED
|
@@ -119,6 +119,7 @@ Place in `.opencode/commands/`:
|
|
|
119
119
|
| `tool.execute.after` | Trigger CPG update after git commit and append structured post-commit review summary |
|
|
120
120
|
| generic `tool.execute.after` | Surface workflow-state transitions after other bash commands when the underlying state changes |
|
|
121
121
|
| `codegraph_review` tool | Returns review results together with current workflow guidance and suggested follow-up command |
|
|
122
|
+
| `codegraph_explain_function` tool | Returns function analysis together with current workflow guidance |
|
|
122
123
|
| `experimental.session.compacting` | Preserve current dogfooding status when OpenCode compacts long sessions |
|
|
123
124
|
| `command.execute.before` | Inject current dogfooding status into `/review`, `/audit`, `/update`, `/status`, `/next`, `/continue`, `/maintain-db`, and `/unlock-db` |
|
|
124
125
|
| `db_locked` recovery path | Surface lock-holder-aware recovery guidance when DuckDB is blocked by another process |
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -425,14 +425,21 @@ const codegraphPlugin: Plugin = async (input) => {
|
|
|
425
425
|
description:
|
|
426
426
|
"Deep analysis of a function using CPG. Shows callers, callees, " +
|
|
427
427
|
"complexity, taint paths, and security findings.",
|
|
428
|
-
args: {
|
|
429
|
-
name: tool.schema.string().describe("Function or method name to analyze"),
|
|
430
|
-
},
|
|
431
|
-
async execute(args) {
|
|
432
|
-
const result = await api.explainFunction(projectId, args.name)
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
428
|
+
args: {
|
|
429
|
+
name: tool.schema.string().describe("Function or method name to analyze"),
|
|
430
|
+
},
|
|
431
|
+
async execute(args) {
|
|
432
|
+
const result = await api.explainFunction(projectId, args.name)
|
|
433
|
+
try {
|
|
434
|
+
const rawStatus = await $`python -m src.cli.import_commands dogfood status --json`.quiet().text()
|
|
435
|
+
const status = JSON.parse(rawStatus)
|
|
436
|
+
const guidance = formatWorkflowGuidanceBlock(status)
|
|
437
|
+
return guidance ? `${result}\n\n${guidance}` : result
|
|
438
|
+
} catch {
|
|
439
|
+
return result
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
}),
|
|
436
443
|
},
|
|
437
444
|
|
|
438
445
|
// -----------------------------------------------------------------
|
package/src/util.ts
CHANGED
|
@@ -540,16 +540,15 @@ export function formatWorkflowStateTransition(
|
|
|
540
540
|
const primaryIssue = snapshot.primary_issue
|
|
541
541
|
const blockers = Array.isArray(snapshot.blockers) ? snapshot.blockers.filter(Boolean) : []
|
|
542
542
|
|
|
543
|
-
const lines = [
|
|
544
|
-
|
|
545
|
-
"",
|
|
546
|
-
`- Workflow state changed: ${previousState} -> ${currentState}`,
|
|
547
|
-
]
|
|
543
|
+
const lines = ["## CodeGraph Workflow Update", "", "### What changed", ""]
|
|
544
|
+
lines.push(`- Workflow state changed: ${previousState} -> ${currentState}`)
|
|
548
545
|
|
|
549
546
|
if (primaryIssue) {
|
|
550
547
|
lines.push(`- Primary issue: ${primaryIssue}`)
|
|
551
548
|
}
|
|
552
549
|
|
|
550
|
+
lines.push("", "### What to do now", "")
|
|
551
|
+
|
|
553
552
|
if (nextAction) {
|
|
554
553
|
lines.push(`- Next action: ${nextAction}`)
|
|
555
554
|
}
|