opencode-codegraph 0.1.13 → 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 CHANGED
@@ -1,5 +1,13 @@
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
+
7
+ ## 0.1.14 - 2026-03-20
8
+
9
+ - preserve dogfooding status across OpenCode session compaction so freshness and workflow guidance survive long chats
10
+
3
11
  ## 0.1.13 - 2026-03-20
4
12
 
5
13
  - add after-test guidance so common test commands are followed by workflow state, next action, and recommended command
package/README.md CHANGED
@@ -115,6 +115,8 @@ Place in `.opencode/commands/`:
115
115
  | `chat.message` (workflow intent) | Add dogfooding status when the user asks what to do next |
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
+ | `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` |
118
120
  | `permission.ask` | Auto-allow `codegraph_*` tools |
119
121
 
120
122
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-codegraph",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
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
@@ -68,7 +68,44 @@ const codegraphPlugin: Plugin = async (input) => {
68
68
  // CodeGraph API not available — skip silently
69
69
  }
70
70
  },
71
-
71
+
72
+ // -----------------------------------------------------------------
73
+ // 1b. Session compaction: preserve workflow status across long sessions
74
+ // -----------------------------------------------------------------
75
+ "experimental.session.compacting": async (_inp, output) => {
76
+ try {
77
+ const rawStatus = await $`python -m src.cli.import_commands dogfood status --json`.quiet().text()
78
+ const statusSummary = formatDogfoodStatusSummary(JSON.parse(rawStatus))
79
+ if (statusSummary) {
80
+ output.context.push(statusSummary)
81
+ }
82
+ } catch {
83
+ // Keep compaction resilient if status lookup fails
84
+ }
85
+ },
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
+
72
109
  // -----------------------------------------------------------------
73
110
  // 2. Chat message: auto-enrich with CPG context for mentioned files
74
111
  // -----------------------------------------------------------------