opencode-codegraph 0.1.14 → 0.1.15
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 +4 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/index.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.15 - 2026-03-20
|
|
4
|
+
|
|
5
|
+
- inject current dogfooding status into guided commands via `command.execute.before` so `/review`, `/audit`, `/update`, `/status`, and `/next` start from the same context
|
|
6
|
+
|
|
3
7
|
## 0.1.14 - 2026-03-20
|
|
4
8
|
|
|
5
9
|
- preserve dogfooding status across OpenCode session compaction so freshness and workflow guidance survive long chats
|
package/README.md
CHANGED
|
@@ -116,6 +116,7 @@ Place in `.opencode/commands/`:
|
|
|
116
116
|
| `tool.execute.after` on test commands | Add after-test workflow guidance with the next recommended command |
|
|
117
117
|
| `tool.execute.after` | Trigger CPG update after git commit and append structured post-commit review summary |
|
|
118
118
|
| `experimental.session.compacting` | Preserve current dogfooding status when OpenCode compacts long sessions |
|
|
119
|
+
| `command.execute.before` | Inject current dogfooding status into `/review`, `/audit`, `/update`, `/status`, and `/next` |
|
|
119
120
|
| `permission.ask` | Auto-allow `codegraph_*` tools |
|
|
120
121
|
|
|
121
122
|
## License
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -84,6 +84,28 @@ const codegraphPlugin: Plugin = async (input) => {
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
|
|
87
|
+
// -----------------------------------------------------------------
|
|
88
|
+
// 1c. Command execution: inject current dogfooding status into guided commands
|
|
89
|
+
// -----------------------------------------------------------------
|
|
90
|
+
"command.execute.before": async (inp, output) => {
|
|
91
|
+
if (!["review", "audit", "update", "status", "next"].includes(inp.command)) {
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
const rawStatus = await $`python -m src.cli.import_commands dogfood status --json`.quiet().text()
|
|
97
|
+
const statusSummary = formatDogfoodStatusSummary(JSON.parse(rawStatus))
|
|
98
|
+
if (statusSummary) {
|
|
99
|
+
output.parts.push({
|
|
100
|
+
type: "text",
|
|
101
|
+
text: statusSummary,
|
|
102
|
+
} as any)
|
|
103
|
+
}
|
|
104
|
+
} catch {
|
|
105
|
+
// Keep command execution resilient if status lookup fails
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
|
|
87
109
|
// -----------------------------------------------------------------
|
|
88
110
|
// 2. Chat message: auto-enrich with CPG context for mentioned files
|
|
89
111
|
// -----------------------------------------------------------------
|