workspaceseed

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 6 Imported by: 0

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. It performs no git operations.

Jump to

Keyboard shortcuts

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