kit

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 11 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 kit exposes prism's engine as an embeddable library for downstream agents (e.g. provasign/mason).

It is a thin facade over the same internals the CLI uses: one Kit is one prism session against one repo root, with the Grove client, in-process delivery cache, and persistent savings ledger. Nothing in this package changes existing Prism behavior; it only re-exposes it across the module boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSymbol

type FileSymbol struct {
	Name          string
	QualifiedName string
	Kind          string // "function", "method", "class", ...
	Line          int
}

FileSymbol is one indexed symbol in a file, as plain data.

type Kit

type Kit struct {
	// contains filtered or unexported fields
}

Kit is an open prism session against one repository root.

func Open

func Open(dir string) (*Kit, error)

Open starts (or connects to) the grove engine for dir, auto-indexes a never-indexed repo, and attaches the persistent per-root ledger.

func (*Kit) Close

func (k *Kit) Close() error

Close persists the savings ledger and shuts down the client.

func (*Kit) FileSymbols

func (k *Kit) FileSymbols(ctx context.Context, relPath string) ([]FileSymbol, error)

FileSymbols returns the engine's indexed symbols for one repo-relative file — the hook downstream agents use to ask "what did this task create" and then interrogate the graph about each symbol.

func (*Kit) Invoke

func (k *Kit) Invoke(tool string, args map[string]any) (any, error)

Invoke runs one prism tool by its MCP name (e.g. "prism_change_impact", "prism_read") and returns the raw result. Same dispatch as the MCP server and the CLI query commands.

func (*Kit) Root

func (k *Kit) Root() string

Root returns the absolute repository root this Kit is bound to.

func (*Kit) Savings

func (k *Kit) Savings() Savings

Savings reports the persistent ledger totals for this root.

type Savings

type Savings struct {
	OriginalTokens  int64
	DeliveredTokens int64
	SavedPercent    float64
}

Savings is the session token ledger as plain data, safe to consume from other modules (the underlying ledger type is prism-internal).

Jump to

Keyboard shortcuts

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