opencode-codegraph 0.1.15 → 0.1.17

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.17 - 2026-03-20
4
+
5
+ - include git branch and worktree cleanliness in dogfooding status summaries shown in OpenCode
6
+
7
+ ## 0.1.16 - 2026-03-20
8
+
9
+ - include branch and worktree cleanliness in dogfooding status summaries
10
+ - distinguish `changes_pending_review` from `ready_to_push` using git worktree state
11
+
3
12
  ## 0.1.15 - 2026-03-20
4
13
 
5
14
  - inject current dogfooding status into guided commands via `command.execute.before` so `/review`, `/audit`, `/update`, `/status`, and `/next` start from the same context
package/README.md CHANGED
@@ -46,7 +46,8 @@ If the message suggests workflow guidance intent (`what next`, `am I done`, `can
46
46
  Every conversation includes:
47
47
 
48
48
  - a project summary with file count, top complexity hotspots, and open security findings;
49
- - a lightweight dogfooding status block when available, including freshness, current `HEAD`, review-trace state, and recommended next action.
49
+ - a lightweight dogfooding status block when available, including freshness, current `HEAD`, git branch/worktree cleanliness, review-trace state, and recommended next action.
50
+ - the same status block now also includes branch and worktree cleanliness, which lets guided commands distinguish `changes_pending_review` from `ready_to_push`.
50
51
  - a recommended command (`/status`, `/update`, or `/review`) when the workflow can point to a deterministic next step.
51
52
  - a normalized workflow state so the session can distinguish `refresh_needed`, `trace_pending`, `review_required`, and `ready_to_continue`.
52
53
  - a `ready_to_push` state when the session is fresh, the review trace is green, and the worktree is clean.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-codegraph",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "OpenCode plugin for CodeGraph CPG-powered code analysis",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/util.ts CHANGED
@@ -26,6 +26,13 @@ export type DogfoodStatusSnapshot = {
26
26
  db_exists?: boolean
27
27
  }
28
28
  head_commit?: string
29
+ git?: {
30
+ branch?: string
31
+ worktree_clean?: boolean
32
+ staged_changes?: boolean
33
+ unstaged_changes?: boolean
34
+ untracked_files?: boolean
35
+ }
29
36
  review_trace?: ReviewTraceSnapshot | null
30
37
  workflow_state?: string
31
38
  recommended_next_action?: string
@@ -350,6 +357,9 @@ export function formatDogfoodStatusSummary(snapshot: DogfoodStatusSnapshot): str
350
357
  const freshnessReason = cpg.freshness_reason || "unknown"
351
358
  const commitsBehind = cpg.commits_behind
352
359
  const headCommit = snapshot.head_commit ? snapshot.head_commit.slice(0, 12) : null
360
+ const git = snapshot.git || {}
361
+ const branch = git.branch
362
+ const worktreeClean = git.worktree_clean
353
363
  const reviewTrace = snapshot.review_trace || null
354
364
  const traceStatus = reviewTrace?.status || "missing"
355
365
  const workflowState = snapshot.workflow_state
@@ -369,6 +379,12 @@ export function formatDogfoodStatusSummary(snapshot: DogfoodStatusSnapshot): str
369
379
  if (headCommit) {
370
380
  lines.push(`- HEAD: ${headCommit}`)
371
381
  }
382
+ if (branch) {
383
+ lines.push(`- Branch: ${branch}`)
384
+ }
385
+ if (typeof worktreeClean === "boolean") {
386
+ lines.push(`- Worktree clean: ${worktreeClean}`)
387
+ }
372
388
  lines.push(`- Review trace: ${traceStatus}`)
373
389
  if (workflowState) {
374
390
  lines.push(`- Workflow state: ${workflowState}`)