opencode-codegraph 0.1.28 → 0.1.30
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 +2 -0
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/src/util.ts +24 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.30 - 2026-03-21
|
|
4
|
+
|
|
5
|
+
- align git-oriented guidance and workflow-transition rendering with the shared workflow guidance block
|
|
6
|
+
|
|
7
|
+
## 0.1.29 - 2026-03-21
|
|
8
|
+
|
|
9
|
+
- align workflow-transition formatting with the shared guidance block so git-oriented guidance uses the same normalized renderer as other status surfaces
|
|
10
|
+
|
|
3
11
|
## 0.1.28 - 2026-03-21
|
|
4
12
|
|
|
5
13
|
- surface primary issue and recovery sequence in plugin workflow summaries so competing blockers are shown in a prioritized order
|
package/README.md
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -68,8 +68,8 @@ const codegraphPlugin: Plugin = async (input) => {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
const workflowTransition = (status: Record<string, unknown>) => {
|
|
71
|
-
const
|
|
72
|
-
const
|
|
71
|
+
const message = formatWorkflowStateTransition(lastWorkflowState, status as any)
|
|
72
|
+
const { workflowState } = workflowFields(status)
|
|
73
73
|
if (workflowState) {
|
|
74
74
|
lastWorkflowState = workflowState
|
|
75
75
|
}
|
package/src/util.ts
CHANGED
|
@@ -119,6 +119,14 @@ function workflowSummaryLines(snapshot: DogfoodStatusSnapshot): string[] {
|
|
|
119
119
|
}
|
|
120
120
|
return lines
|
|
121
121
|
}
|
|
122
|
+
|
|
123
|
+
function formatSummaryBlock(title: string, snapshot: DogfoodStatusSnapshot): string | null {
|
|
124
|
+
const lines = workflowSummaryLines(snapshot)
|
|
125
|
+
if (!lines.length) {
|
|
126
|
+
return null
|
|
127
|
+
}
|
|
128
|
+
return [title, "", ...lines].join("\n")
|
|
129
|
+
}
|
|
122
130
|
|
|
123
131
|
/**
|
|
124
132
|
* Extract file references from message parts.
|
|
@@ -515,37 +523,42 @@ export function formatDogfoodStatusSummary(snapshot: DogfoodStatusSnapshot): str
|
|
|
515
523
|
}
|
|
516
524
|
|
|
517
525
|
export function formatWorkflowGuidanceBlock(snapshot: DogfoodStatusSnapshot): string | null {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
if (!lines.length) {
|
|
521
|
-
return null
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
return ["## CodeGraph Workflow Guidance", "", ...lines].join("\n")
|
|
526
|
+
return formatSummaryBlock("## CodeGraph Workflow Guidance", snapshot)
|
|
525
527
|
}
|
|
526
528
|
|
|
527
529
|
export function formatWorkflowStateTransition(
|
|
528
530
|
previousState: string | null,
|
|
529
|
-
|
|
530
|
-
nextAction: string | undefined,
|
|
531
|
-
nextCommand: string | undefined,
|
|
531
|
+
snapshot: DogfoodStatusSnapshot,
|
|
532
532
|
): string | null {
|
|
533
|
+
const currentState = snapshot.workflow_state || null
|
|
533
534
|
if (!previousState || !currentState || previousState === currentState) {
|
|
534
535
|
return null
|
|
535
536
|
}
|
|
536
537
|
|
|
538
|
+
const nextAction = snapshot.recommended_next_action
|
|
539
|
+
const nextCommand = snapshot.recommended_command
|
|
540
|
+
const primaryIssue = snapshot.primary_issue
|
|
541
|
+
const blockers = Array.isArray(snapshot.blockers) ? snapshot.blockers.filter(Boolean) : []
|
|
542
|
+
|
|
537
543
|
const lines = [
|
|
538
544
|
"## CodeGraph Workflow Update",
|
|
539
545
|
"",
|
|
540
546
|
`- Workflow state changed: ${previousState} -> ${currentState}`,
|
|
541
547
|
]
|
|
542
548
|
|
|
549
|
+
if (primaryIssue) {
|
|
550
|
+
lines.push(`- Primary issue: ${primaryIssue}`)
|
|
551
|
+
}
|
|
552
|
+
|
|
543
553
|
if (nextAction) {
|
|
544
554
|
lines.push(`- Next action: ${nextAction}`)
|
|
545
555
|
}
|
|
546
556
|
if (nextCommand) {
|
|
547
557
|
lines.push(`- Suggested command: ${nextCommand}`)
|
|
548
558
|
}
|
|
559
|
+
if (blockers.length) {
|
|
560
|
+
lines.push(`- Blockers: ${blockers.join("; ")}`)
|
|
561
|
+
}
|
|
549
562
|
return lines.join("\n")
|
|
550
563
|
}
|
|
551
564
|
|
|
@@ -568,8 +581,7 @@ export function formatAfterTestGuidance(
|
|
|
568
581
|
lines.push("- Suggested command: rerun the failing tests after you fix them")
|
|
569
582
|
return lines.join("\n")
|
|
570
583
|
}
|
|
571
|
-
|
|
572
|
-
return lines.join("\n")
|
|
584
|
+
return formatSummaryBlock("## CodeGraph After-Test Guidance", snapshot)
|
|
573
585
|
}
|
|
574
586
|
|
|
575
587
|
// File extensions recognized as source code
|