Documentation
¶
Overview ¶
Package export provides data export functionality for bv.
This file implements Cloudflare wrangler CLI integration for deploying static sites to Cloudflare Pages. It follows safety-first principles: no auto-install without confirmation, clear prompts for authentication.
Package export provides data export functionality for bv.
This file implements GitHub CLI integration for deploying static sites to GitHub Pages. It follows safety-first principles: no auto-install, confirmation prompts for destructive operations.
Package export provides data export functionality for bv.
This file implements a local preview server for static site bundles. It serves files with no-cache headers and auto-opens the browser.
Package export provides SQLite-based data export for static viewer deployment.
This file implements the SQLiteExporter which exports bv's issue data to a SQLite database optimized for client-side querying with sql.js WASM.
Package export provides data export functionality for bv.
This file implements SQLite schema creation for static export, following mcp_agent_mail's architecture for client-side sql.js querying.
Package export provides data export functionality for bv.
This file defines the SQLite export data structures following mcp_agent_mail's proven architecture for client-side sql.js WASM querying.
Package export provides viewer asset embedding for static site generation.
Package export provides data export functionality for bv.
This file implements the interactive deployment wizard for --pages flag. It guides users through exporting and deploying static sites to GitHub Pages.
Index ¶
- Constants
- Variables
- func AttemptGHInstall() error
- func AttemptWranglerInstall() error
- func AuthenticateGH() error
- func AuthenticateWrangler() error
- func CopyEmbeddedAssets(outputDir, title string) error
- func CreateFTSIndex(db *sql.DB) error
- func CreateMaterializedViews(db *sql.DB) error
- func CreateRepository(name string, private bool, description string) (string, error)
- func CreateSchema(db *sql.DB) error
- func DeleteCloudflareProject(projectName string, confirm bool) error
- func DeleteRepository(repoFullName string, confirm bool) error
- func EnableGitHubPages(repoFullName string) (string, error)
- func FindAvailablePort(start, end int) (int, error)
- func GenerateHeadersFile(bundlePath string) error
- func GenerateInteractiveGraphFilename(projectName string) string
- func GenerateInteractiveGraphHTML(opts InteractiveGraphOptions) (string, error)
- func GenerateMarkdown(issues []model.Issue, title string) (string, error)
- func GenerateMermaidGraph(issues []model.Issue, issueIDs map[string]bool, config MermaidConfig) string
- func GeneratePriorityBrief(triage interface{}, config PriorityBriefConfig) string
- func GeneratePriorityBriefFromTriageJSON(triageJSON []byte, config PriorityBriefConfig) (string, error)
- func HasEmbeddedAssets() bool
- func InitAndPush(bundlePath string, repoFullName string, forceOverwrite bool) error
- func InsertMetaValue(db *sql.DB, key, value string) error
- func ListCloudflareProjects() ([]string, error)
- func ListUserRepos(limit int) ([]string, error)
- func OpenCloudflareInBrowser(projectName string) error
- func OpenInBrowser(url string) error
- func OptimizeDatabase(db *sql.DB, pageSize int) error
- func RepoExists(name string) bool
- func RepoHasContent(repoFullName string) (bool, error)
- func SaveGraphSnapshot(opts GraphSnapshotOptions) error
- func SaveMarkdownToFile(issues []model.Issue, filename string) error
- func SaveWizardConfig(config *WizardConfig) error
- func ShowInstallInstructions()
- func ShowWranglerInstallInstructions()
- func StartPreview(bundlePath string) error
- func StartPreviewWithConfig(config PreviewConfig) error
- func SuggestProjectName(bundlePath string) string
- func SuggestRepoName(bundlePath string) string
- func WizardConfigPath() string
- type AdjacencyEdge
- type AdjacencyGraph
- type AdjacencyNode
- type ChunkConfig
- type ChunkInfo
- type CloudflareDeployConfig
- type CloudflareDeployResult
- type CloudflareStatus
- type ExportDependency
- type ExportIssue
- type ExportMeta
- type ExportMetrics
- type GitHubDeployConfig
- type GitHubDeployResult
- type GitHubPagesStatus
- type GitHubStatus
- type GraphExplanation
- type GraphExportConfig
- type GraphExportFormat
- type GraphExportResult
- type GraphLayout
- type GraphSnapshotOptions
- type InteractiveGraphOptions
- type MermaidConfig
- type PreviewConfig
- type PreviewServer
- type PriorityBriefConfig
- type ProjectHealth
- type QuickWin
- type SQLiteExportConfig
- type SQLiteExporter
- type TriageRecommendation
- type Velocity
- type VelocityWeek
- type Wizard
- func (w *Wizard) GetConfig() *WizardConfig
- func (w *Wizard) OfferPreview() (string, error)
- func (w *Wizard) PerformDeploy() (*WizardResult, error)
- func (w *Wizard) PerformExport(bundlePath string) error
- func (w *Wizard) PrintSuccess(result *WizardResult)
- func (w *Wizard) Run() (*WizardResult, error)
- type WizardConfig
- type WizardResult
Constants ¶
const DefaultPreviewPort = 9000
DefaultPreviewPort is the default port for the preview server.
const PreviewPortRangeEnd = 9100
const PreviewPortRangeStart = 9000
PreviewPortRange defines the range of ports to try if default is unavailable.
const SchemaVersion = 1
Schema version for tracking migrations
Variables ¶
var ViewerAssetsFS embed.FS
ViewerAssetsFS embeds the viewer_assets directory for static site export. This allows the bv binary to include all necessary HTML/JS/CSS assets without requiring them to exist on the filesystem.
Functions ¶
func AttemptGHInstall ¶ added in v0.10.3
func AttemptGHInstall() error
AttemptGHInstall attempts to install gh CLI via Homebrew (macOS only). Returns an error if not on macOS or if installation fails.
func AttemptWranglerInstall ¶ added in v0.10.3
func AttemptWranglerInstall() error
AttemptWranglerInstall attempts to install wrangler via npm.
func AuthenticateGH ¶ added in v0.10.3
func AuthenticateGH() error
AuthenticateGH starts the interactive gh authentication flow.
func AuthenticateWrangler ¶ added in v0.10.3
func AuthenticateWrangler() error
AuthenticateWrangler starts the interactive wrangler authentication flow.
func CopyEmbeddedAssets ¶ added in v0.11.2
CopyEmbeddedAssets copies all embedded viewer assets to the specified output directory. If title is provided, it replaces "Beads Viewer" in index.html.
func CreateFTSIndex ¶ added in v0.10.3
CreateFTSIndex creates the FTS5 full-text search virtual table. This must be called after issues are inserted.
func CreateMaterializedViews ¶ added in v0.10.3
CreateMaterializedViews creates denormalized views for fast queries. This must be called after all data is inserted.
func CreateRepository ¶ added in v0.10.3
CreateRepository creates a new GitHub repository.
func CreateSchema ¶ added in v0.10.3
CreateSchema creates all tables, indexes, and triggers in the database.
func DeleteCloudflareProject ¶ added in v0.10.3
DeleteCloudflareProject deletes a Cloudflare Pages project.
func DeleteRepository ¶ added in v0.10.3
DeleteRepository deletes a repository (requires confirmation).
func EnableGitHubPages ¶ added in v0.10.3
EnableGitHubPages enables GitHub Pages for a repository.
func FindAvailablePort ¶ added in v0.10.3
FindAvailablePort finds an available port in the given range.
func GenerateHeadersFile ¶ added in v0.10.3
GenerateHeadersFile creates a _headers file for Cloudflare Pages. This provides security headers without needing a service worker.
func GenerateInteractiveGraphFilename ¶ added in v0.10.3
GenerateInteractiveGraphFilename creates an auto-generated filename Format: {project}_graph_export__as_of__YYYY_MM_DD__HH_MM__git_head_hash__{gitshort}.html
func GenerateInteractiveGraphHTML ¶ added in v0.10.3
func GenerateInteractiveGraphHTML(opts InteractiveGraphOptions) (string, error)
GenerateInteractiveGraphHTML creates a self-contained HTML file with force-graph visualization
func GenerateMarkdown ¶
GenerateMarkdown creates a comprehensive markdown report of all issues
func GenerateMermaidGraph ¶ added in v0.10.3
func GenerateMermaidGraph(issues []model.Issue, issueIDs map[string]bool, config MermaidConfig) string
GenerateMermaidGraph generates a Mermaid diagram for the given issues.
func GeneratePriorityBrief ¶ added in v0.10.3
func GeneratePriorityBrief(triage interface{}, config PriorityBriefConfig) string
GeneratePriorityBrief creates a compact Markdown priority brief from triage data (bv-96) This is designed for human readability and can be rendered to PNG
func GeneratePriorityBriefFromTriageJSON ¶ added in v0.10.3
func GeneratePriorityBriefFromTriageJSON(triageJSON []byte, config PriorityBriefConfig) (string, error)
GeneratePriorityBriefFromTriage creates a priority brief from a TriageResult (bv-96) This is the production version that takes proper triage data
func HasEmbeddedAssets ¶ added in v0.11.2
func HasEmbeddedAssets() bool
HasEmbeddedAssets returns true if viewer assets are embedded in the binary.
func InitAndPush ¶ added in v0.10.3
InitAndPush initializes a git repository and pushes to GitHub.
func InsertMetaValue ¶ added in v0.10.3
InsertMetaValue inserts or updates a metadata key-value pair.
func ListCloudflareProjects ¶ added in v0.10.3
ListCloudflareProjects lists existing Cloudflare Pages projects.
func ListUserRepos ¶ added in v0.10.3
ListUserRepos lists repositories for the authenticated user.
func OpenCloudflareInBrowser ¶ added in v0.10.3
OpenCloudflareInBrowser opens the Cloudflare Pages dashboard in browser. Set BV_NO_BROWSER=1 to suppress browser opening (useful for tests).
func OpenInBrowser ¶ added in v0.10.3
OpenInBrowser opens a URL in the default browser. Set BV_NO_BROWSER=1 to suppress browser opening (useful for tests).
func OptimizeDatabase ¶ added in v0.10.3
OptimizeDatabase runs optimizations for httpvfs streaming. Call this as the final step before closing the database.
func RepoExists ¶ added in v0.10.3
RepoExists checks if a repository exists.
func RepoHasContent ¶ added in v0.10.3
RepoHasContent checks if a repository has any content.
func SaveGraphSnapshot ¶ added in v0.10.3
func SaveGraphSnapshot(opts GraphSnapshotOptions) error
SaveGraphSnapshot renders a static graph snapshot (SVG or PNG) with a minimal summary block. It intentionally keeps the visual language concise so AI agents can parse it without reading auxiliary docs.
func SaveMarkdownToFile ¶
SaveMarkdownToFile writes the generated markdown to a file
func SaveWizardConfig ¶ added in v0.10.3
func SaveWizardConfig(config *WizardConfig) error
SaveWizardConfig saves wizard configuration for future runs.
func ShowInstallInstructions ¶ added in v0.10.3
func ShowInstallInstructions()
ShowInstallInstructions prints gh CLI installation instructions.
func ShowWranglerInstallInstructions ¶ added in v0.10.3
func ShowWranglerInstallInstructions()
ShowWranglerInstallInstructions prints wrangler CLI installation instructions.
func StartPreview ¶ added in v0.10.3
StartPreview is a convenience function to start a preview server with auto port selection.
func StartPreviewWithConfig ¶ added in v0.10.3
func StartPreviewWithConfig(config PreviewConfig) error
StartPreviewWithConfig starts a preview server with the given configuration.
func SuggestProjectName ¶ added in v0.10.3
SuggestProjectName generates a suggested Cloudflare Pages project name.
func SuggestRepoName ¶ added in v0.10.3
SuggestRepoName generates a suggested repository name from the bundle path.
func WizardConfigPath ¶ added in v0.10.3
func WizardConfigPath() string
WizardConfigPath returns the path to the wizard config file.
Types ¶
type AdjacencyEdge ¶ added in v0.10.3
type AdjacencyEdge struct {
From string `json:"from"`
To string `json:"to"`
Type string `json:"type"` // "blocks" or "related"
}
AdjacencyEdge represents an edge in the adjacency graph.
type AdjacencyGraph ¶ added in v0.10.3
type AdjacencyGraph struct {
Nodes []AdjacencyNode `json:"nodes"`
Edges []AdjacencyEdge `json:"edges"`
}
AdjacencyGraph is the JSON adjacency list representation.
type AdjacencyNode ¶ added in v0.10.3
type AdjacencyNode struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Priority int `json:"priority"`
Labels []string `json:"labels,omitempty"`
PageRank float64 `json:"pagerank,omitempty"`
}
AdjacencyNode represents a node in the adjacency graph.
type ChunkConfig ¶ added in v0.10.3
type ChunkConfig struct {
Chunked bool `json:"chunked"`
ChunkCount int `json:"chunk_count"`
ChunkSize int64 `json:"chunk_size"`
TotalSize int64 `json:"total_size"`
Hash string `json:"hash,omitempty"`
Chunks []ChunkInfo `json:"chunks,omitempty"`
}
ChunkConfig describes how a large database was chunked.
type ChunkInfo ¶ added in v0.10.3
type ChunkInfo struct {
Path string `json:"path"`
Hash string `json:"hash,omitempty"`
Size int64 `json:"size,omitempty"`
}
ChunkInfo describes an individual chunk file.
type CloudflareDeployConfig ¶ added in v0.10.3
type CloudflareDeployConfig struct {
// ProjectName is the Cloudflare Pages project name
ProjectName string
// BundlePath is the path to the static site bundle to deploy
BundlePath string
// Branch is the branch name for deployment (default: main)
Branch string
// SkipConfirmation skips interactive confirmation prompts (for CI)
SkipConfirmation bool
}
CloudflareDeployConfig configures Cloudflare Pages deployment.
type CloudflareDeployResult ¶ added in v0.10.3
type CloudflareDeployResult struct {
// ProjectName is the Cloudflare Pages project name
ProjectName string
// URL is the deployment URL (xxx.pages.dev)
URL string
// DeploymentID is the unique deployment identifier
DeploymentID string
}
CloudflareDeployResult contains the result of a deployment.
func DeployToCloudflarePages ¶ added in v0.10.3
func DeployToCloudflarePages(config CloudflareDeployConfig) (*CloudflareDeployResult, error)
DeployToCloudflarePages performs a complete deployment to Cloudflare Pages.
type CloudflareStatus ¶ added in v0.10.3
type CloudflareStatus struct {
Installed bool
Authenticated bool
AccountName string
AccountID string
NPMInstalled bool
}
CloudflareStatus represents the current status of wrangler CLI.
func CheckWranglerStatus ¶ added in v0.10.3
func CheckWranglerStatus() (*CloudflareStatus, error)
CheckWranglerStatus checks the status of wrangler CLI.
type ExportDependency ¶ added in v0.10.3
type ExportDependency struct {
IssueID string `json:"issue_id"`
DependsOnID string `json:"depends_on_id"`
Type string `json:"type"`
}
ExportDependency represents a dependency relationship for export.
type ExportIssue ¶ added in v0.10.3
type ExportIssue struct {
// Core issue data (embedded)
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status model.Status `json:"status"`
Priority int `json:"priority"`
IssueType model.IssueType `json:"issue_type"`
Assignee string `json:"assignee,omitempty"`
Labels []string `json:"labels,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
// Computed graph metrics
PageRank float64 `json:"pagerank"`
Betweenness float64 `json:"betweenness,omitempty"`
CriticalPath int `json:"critical_path_depth"`
TriageScore float64 `json:"triage_score,omitempty"`
BlocksCount int `json:"blocks_count"`
BlockedByCount int `json:"blocked_by_count"`
BlocksIDs []string `json:"blocks_ids,omitempty"`
BlockedByIDs []string `json:"blocked_by_ids,omitempty"`
}
ExportIssue extends model.Issue with computed graph metrics for export. The client builds search text on load by concatenating fields.
type ExportMeta ¶ added in v0.10.3
type ExportMeta struct {
Version string `json:"version"`
GeneratedAt time.Time `json:"generated_at"`
GitCommit string `json:"git_commit,omitempty"`
IssueCount int `json:"issue_count"`
DepCount int `json:"dependency_count"`
DataHash string `json:"data_hash,omitempty"`
Title string `json:"title,omitempty"`
}
ExportMeta contains metadata about the export.
type ExportMetrics ¶ added in v0.10.3
type ExportMetrics struct {
IssueID string `json:"issue_id"`
PageRank float64 `json:"pagerank"`
Betweenness float64 `json:"betweenness"`
CriticalPath int `json:"critical_path_depth"`
TriageScore float64 `json:"triage_score"`
BlocksCount int `json:"blocks_count"`
BlockedByCount int `json:"blocked_by_count"`
}
ExportMetrics holds computed metrics for a single issue.
type GitHubDeployConfig ¶ added in v0.10.3
type GitHubDeployConfig struct {
// RepoName is the desired repository name (without owner)
RepoName string
// Private indicates whether the repository should be private
Private bool
// Description is the repository description
Description string
// BundlePath is the path to the static site bundle to deploy
BundlePath string
// SkipConfirmation skips interactive confirmation prompts (for CI)
SkipConfirmation bool
// ForceOverwrite allows overwriting non-empty repositories
ForceOverwrite bool
}
GitHubDeployConfig configures GitHub Pages deployment.
type GitHubDeployResult ¶ added in v0.10.3
type GitHubDeployResult struct {
// RepoFullName is the full repository name (owner/repo)
RepoFullName string
// PagesURL is the GitHub Pages URL
PagesURL string
// GitRemote is the git remote URL
GitRemote string
}
GitHubDeployResult contains the result of a deployment.
func DeployToGitHubPages ¶ added in v0.10.3
func DeployToGitHubPages(config GitHubDeployConfig) (*GitHubDeployResult, error)
DeployToGitHubPages performs a complete deployment to GitHub Pages.
type GitHubPagesStatus ¶ added in v0.10.3
type GitHubPagesStatus struct {
Enabled bool `json:"enabled"`
URL string `json:"url,omitempty"`
Branch string `json:"branch,omitempty"`
Path string `json:"path,omitempty"`
BuildType string `json:"build_type,omitempty"`
}
GetGitHubPagesStatus checks if Pages is enabled and returns the URL.
func CheckGitHubPagesStatus ¶ added in v0.10.3
func CheckGitHubPagesStatus(repoFullName string) (*GitHubPagesStatus, error)
CheckGitHubPagesStatus checks the GitHub Pages status for a repository.
type GitHubStatus ¶ added in v0.10.3
type GitHubStatus struct {
Installed bool
Authenticated bool
Username string
GitConfigured bool
GitName string
GitEmail string
}
GitHubStatus represents the current status of gh CLI.
func CheckGHStatus ¶ added in v0.10.3
func CheckGHStatus() (*GitHubStatus, error)
CheckGHStatus checks the status of gh CLI and git configuration.
type GraphExplanation ¶ added in v0.10.3
type GraphExplanation struct {
What string `json:"what"`
HowToRender string `json:"how_to_render,omitempty"`
WhenToUse string `json:"when_to_use"`
}
GraphExplanation provides context for AI agents.
type GraphExportConfig ¶ added in v0.10.3
type GraphExportConfig struct {
Format GraphExportFormat // Output format (json, dot, mermaid)
Label string // Filter to specific label
Root string // Subgraph from specific root
Depth int // Max depth for subgraph (0 = unlimited)
DataHash string // Hash of input data for provenance
}
GraphExportConfig configures graph export behavior.
type GraphExportFormat ¶ added in v0.10.3
type GraphExportFormat string
GraphExportFormat specifies the output format for graph export.
const ( GraphFormatJSON GraphExportFormat = "json" GraphFormatDOT GraphExportFormat = "dot" GraphFormatMermaid GraphExportFormat = "mermaid" )
type GraphExportResult ¶ added in v0.10.3
type GraphExportResult struct {
Format string `json:"format"`
Graph string `json:"graph,omitempty"`
Nodes int `json:"nodes"`
Edges int `json:"edges"`
FiltersApplied map[string]string `json:"filters_applied,omitempty"`
Explanation GraphExplanation `json:"explanation"`
DataHash string `json:"data_hash,omitempty"`
Adjacency *AdjacencyGraph `json:"adjacency,omitempty"`
}
GraphExportResult contains the exported graph and metadata.
func ExportGraph ¶ added in v0.10.3
func ExportGraph(issues []model.Issue, stats *analysis.GraphStats, config GraphExportConfig) (*GraphExportResult, error)
ExportGraph exports the dependency graph in the specified format.
func (*GraphExportResult) JSON ¶ added in v0.10.3
func (r *GraphExportResult) JSON() ([]byte, error)
GraphExportResultJSON returns the result as JSON bytes.
type GraphLayout ¶ added in v0.10.3
type GraphLayout struct {
Positions map[string][2]float64 `json:"positions"`
Metrics map[string][5]float64 `json:"metrics"`
Links [][2]string `json:"links"`
Cycles [][]string `json:"cycles,omitempty"`
Version string `json:"version"`
GeneratedAt string `json:"generated_at"`
NodeCount int `json:"node_count"`
EdgeCount int `json:"edge_count"`
}
GraphLayout is a compact representation of pre-computed graph layout data. This is much smaller than full node data (~30KB vs ~200KB) for fast initial load.
type GraphSnapshotOptions ¶ added in v0.10.3
type GraphSnapshotOptions struct {
Path string // Output path; format inferred from extension when Format empty
Format string // "svg" or "png" (case-insensitive). If empty, inferred from Path.
Title string // Optional title rendered in summary block
Preset string // Layout preset: "compact" (default) or "roomy"
Issues []model.Issue // Issues to render (already filtered by recipe/workspace)
Stats *analysis.GraphStats // Graph analysis used for layout/summary
DataHash string // Hash of input issues for provenance
}
GraphSnapshotOptions controls graph snapshot export behaviour.
type InteractiveGraphOptions ¶ added in v0.10.3
type InteractiveGraphOptions struct {
Issues []model.Issue
Stats *analysis.GraphStats
Triage *analysis.TriageResult // Full triage output for display
History *correlation.HistoryReport // Git history correlation data
Title string
DataHash string
Path string // Output path - if empty, auto-generates based on project
ProjectName string // Project name for auto-naming
}
InteractiveGraphOptions configures HTML graph generation
type MermaidConfig ¶ added in v0.10.3
type MermaidConfig struct {
ShowNoDependenciesNode bool // If true, adds a "No Dependencies" node when no edges exist
}
MermaidConfig configures the Mermaid graph generation.
type PreviewConfig ¶ added in v0.10.3
type PreviewConfig struct {
// BundlePath is the path to the static site bundle
BundlePath string
// Port is the port to serve on (0 for auto-select)
Port int
// OpenBrowser determines whether to auto-open a browser
OpenBrowser bool
// Quiet suppresses status messages
Quiet bool
}
PreviewConfig configures the preview server.
func DefaultPreviewConfig ¶ added in v0.10.3
func DefaultPreviewConfig() PreviewConfig
DefaultPreviewConfig returns sensible defaults for preview configuration.
type PreviewServer ¶ added in v0.10.3
type PreviewServer struct {
// contains filtered or unexported fields
}
PreviewServer serves a static site bundle locally for previewing.
func NewPreviewServer ¶ added in v0.10.3
func NewPreviewServer(bundlePath string, port int) *PreviewServer
NewPreviewServer creates a new preview server for the given bundle.
func (*PreviewServer) Port ¶ added in v0.10.3
func (p *PreviewServer) Port() int
Port returns the port the server is running on.
func (*PreviewServer) Start ¶ added in v0.10.3
func (p *PreviewServer) Start() error
Start starts the preview server and blocks until stopped.
func (*PreviewServer) StartWithGracefulShutdown ¶ added in v0.10.3
func (p *PreviewServer) StartWithGracefulShutdown() error
StartWithGracefulShutdown starts the server with signal handling for clean shutdown.
func (*PreviewServer) Stop ¶ added in v0.10.3
func (p *PreviewServer) Stop() error
Stop gracefully stops the preview server.
func (*PreviewServer) URL ¶ added in v0.10.3
func (p *PreviewServer) URL() string
URL returns the full URL of the preview server.
type PriorityBriefConfig ¶ added in v0.10.3
type PriorityBriefConfig struct {
MaxRecommendations int // Max recommendations to include (default: 5)
MaxQuickWins int // Max quick wins to include (default: 3)
MaxBlockers int // Max blockers to include (default: 3)
IncludeWhatIf bool // Include what-if deltas
IncludeLegend bool // Include metric legend
DataHash string // Optional data hash for verification
}
PriorityBriefConfig configures the priority brief generation
func DefaultPriorityBriefConfig ¶ added in v0.10.3
func DefaultPriorityBriefConfig() PriorityBriefConfig
DefaultPriorityBriefConfig returns sensible defaults for the priority brief
type ProjectHealth ¶ added in v0.10.3
type ProjectHealth struct {
OpenCount int `json:"open_count"`
ClosedCount int `json:"closed_count"`
BlockedCount int `json:"blocked_count"`
InProgressCount int `json:"in_progress_count"`
ActionableCount int `json:"actionable_count"`
ByStatus map[string]int `json:"by_status"`
ByType map[string]int `json:"by_type"`
ByPriority map[int]int `json:"by_priority"`
CycleCount int `json:"cycle_count,omitempty"`
Velocity *Velocity `json:"velocity,omitempty"`
}
ProjectHealth contains project health statistics.
type QuickWin ¶ added in v0.10.3
type QuickWin struct {
ID string `json:"id"`
Title string `json:"title"`
Score float64 `json:"score"`
Reason string `json:"reason"`
UnblocksIDs []string `json:"unblocks_ids,omitempty"`
}
QuickWin represents a quick win item from triage.
type SQLiteExportConfig ¶ added in v0.10.3
type SQLiteExportConfig struct {
// OutputDir is the directory to write export files
OutputDir string
// Title is a custom title for the static site
Title string
// ChunkThreshold is the file size (bytes) above which to chunk the database
// Default: 5MB
ChunkThreshold int64
// ChunkSize is the size of each chunk when chunking is needed
// Default: 1MB (optimal for httpvfs range requests)
ChunkSize int64
// IncludeRobotOutputs determines whether to write JSON robot outputs
IncludeRobotOutputs bool
// PageSize is the SQLite page size (optimal: 1024 for httpvfs)
PageSize int
}
SQLiteExportConfig configures the SQLite export process.
func DefaultSQLiteExportConfig ¶ added in v0.10.3
func DefaultSQLiteExportConfig() SQLiteExportConfig
DefaultSQLiteExportConfig returns sensible defaults for export configuration.
type SQLiteExporter ¶ added in v0.10.3
type SQLiteExporter struct {
Issues []*model.Issue
Deps []*model.Dependency
Metrics map[string]*model.IssueMetrics
Stats *analysis.GraphStats
Triage *analysis.TriageResult
Config SQLiteExportConfig
// contains filtered or unexported fields
}
SQLiteExporter exports bv data to a SQLite database for static deployment.
func NewSQLiteExporter ¶ added in v0.10.3
func NewSQLiteExporter(issues []*model.Issue, deps []*model.Dependency, metricsOrStats interface{}, triage *analysis.TriageResult) *SQLiteExporter
NewSQLiteExporter creates a new exporter with the given data. The third parameter may be either:
- map[string]*model.IssueMetrics (explicit metrics)
- *analysis.GraphStats (for computed metrics)
This keeps backward compatibility with legacy call sites/tests.
func (*SQLiteExporter) Export ¶ added in v0.10.3
func (e *SQLiteExporter) Export(outputDir string) error
Export writes the SQLite database and supporting files to the output directory.
func (*SQLiteExporter) ExportToJSON ¶ added in v0.10.3
func (e *SQLiteExporter) ExportToJSON(path string) error
ExportToJSON exports issues to a JSON file (alternative to SQLite).
func (*SQLiteExporter) GetExportedIssues ¶ added in v0.10.3
func (e *SQLiteExporter) GetExportedIssues() []ExportIssue
GetExportedIssues converts issues to ExportIssue format.
func (*SQLiteExporter) SetGitHash ¶ added in v0.10.3
func (e *SQLiteExporter) SetGitHash(hash string)
SetGitHash sets the git commit hash for export metadata.
type TriageRecommendation ¶ added in v0.10.3
type TriageRecommendation struct {
ID string `json:"id"`
Title string `json:"title"`
IssueType string `json:"issue_type"`
Status string `json:"status"`
Priority int `json:"priority"`
TriageScore float64 `json:"triage_score"`
BlocksCount int `json:"blocks_count"`
Action string `json:"action"`
Reasons []string `json:"reasons"`
UnblocksIDs []string `json:"unblocks_ids,omitempty"`
BlockedByIDs []string `json:"blocked_by_ids,omitempty"`
}
TriageRecommendation represents a single triage recommendation for export.
type Velocity ¶ added in v0.10.3
type Velocity struct {
ClosedLast7Days int `json:"closed_last_7_days"`
ClosedLast30Days int `json:"closed_last_30_days"`
AvgDaysToClose float64 `json:"avg_days_to_close"`
Weekly []VelocityWeek `json:"weekly,omitempty"`
Estimated bool `json:"estimated,omitempty"`
}
Velocity captures project-level throughput stats for exports/robots.
type VelocityWeek ¶ added in v0.10.3
VelocityWeek holds weekly bucketed closure counts (Monday-start UTC).
type Wizard ¶ added in v0.10.3
type Wizard struct {
// contains filtered or unexported fields
}
Wizard handles the interactive deployment flow.
func (*Wizard) GetConfig ¶ added in v0.10.3
func (w *Wizard) GetConfig() *WizardConfig
GetConfig returns the collected wizard configuration.
func (*Wizard) OfferPreview ¶ added in v0.10.3
OfferPreview asks if user wants to preview and handles the preview flow.
func (*Wizard) PerformDeploy ¶ added in v0.10.3
func (w *Wizard) PerformDeploy() (*WizardResult, error)
PerformDeploy deploys the bundle to the configured target.
func (*Wizard) PerformExport ¶ added in v0.10.3
PerformExport creates the static site bundle. This is called by the main CLI after collecting issues.
func (*Wizard) PrintSuccess ¶ added in v0.10.3
func (w *Wizard) PrintSuccess(result *WizardResult)
PrintSuccess prints the success message after deployment.
func (*Wizard) Run ¶ added in v0.10.3
func (w *Wizard) Run() (*WizardResult, error)
Run executes the interactive wizard flow.
type WizardConfig ¶ added in v0.10.3
type WizardConfig struct {
// Export options
IncludeClosed bool `json:"include_closed"`
IncludeHistory bool `json:"include_history"`
Title string `json:"title"`
Subtitle string `json:"subtitle,omitempty"`
// Deployment target
DeployTarget string `json:"deploy_target"` // "github", "cloudflare", "local"
// GitHub options
RepoName string `json:"repo_name,omitempty"`
RepoPrivate bool `json:"repo_private,omitempty"`
RepoDescription string `json:"repo_description,omitempty"`
// Cloudflare options
CloudflareProject string `json:"cloudflare_project,omitempty"`
CloudflareBranch string `json:"cloudflare_branch,omitempty"`
// Output path for bundle
OutputPath string `json:"output_path,omitempty"`
}
WizardConfig holds configuration for the deployment wizard.
func LoadWizardConfig ¶ added in v0.10.3
func LoadWizardConfig() (*WizardConfig, error)
LoadWizardConfig loads previously saved wizard configuration.