workspaceseed

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package workspaceseed builds a compact, deterministic workspace context seed for future agent prompt/session wiring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(seed Seed, options RenderOptions) string

Render formats a seed for prompt/session context while respecting simple line and rune-width budgets.

Types

type GitInfo

type GitInfo struct {
	Branch  string
	Dirty   *bool
	Summary string
}

GitInfo is metadata supplied by integration code that already knows git state. BuildFromWorkspace does not invoke git.

type Input

type Input struct {
	CWD              string
	GitBranch        string
	GitDirty         *bool
	GitSummary       string
	Paths            []string
	MaxLayoutEntries int
}

Input is the pure builder input. Callers provide paths and git metadata; the builder never shells out.

type RenderOptions

type RenderOptions struct {
	MaxLines int
	Width    int
}

RenderOptions controls text output budgets.

type Seed

type Seed struct {
	CWD          string
	GitBranch    string
	GitSummary   string
	Layout       []string
	ProjectFiles []string
	MemoryFiles  []string
	Truncated    bool
}

Seed is the compact workspace context model ready for rendering.

func Build

func Build(input Input) Seed

Build creates a deterministic seed from simple, injectable inputs.

func BuildFromWorkspace

func BuildFromWorkspace(root string, git GitInfo) (Seed, error)

BuildFromWorkspace scans the local filesystem with workspaceindex and builds a seed from the resulting file list. Its only git operation is the read-only ignored-path lookup inside workspaceindex.Scan; branch and dirty state come from the caller's GitInfo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL