lspprovider

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 25 Imported by: 0

Documentation

Overview

Package lspprovider is Corvint's optional local language-server evidence provider (external-evidence-provider-v0 EEP-V0-023..026, task-context-packet-v0 TCP-V0-043..046, decision 0371). It starts gopls once per invocation in an owned process group, asks it for bounded one- and two-hop definition and reference expansion from a few seed files, and returns an external-evidence-provider/2 record of path-to-path relations. The record is external evidence: Core decodes, verifies and labels it exactly as any provider record, and it never becomes project authority.

Index

Constants

View Source
const (
	ProviderID     = "gopls"
	Schema         = "external-evidence-provider/2"
	RepositoryID   = "root"
	MaxSeeds       = 3
	MaxHops        = 2
	MaxRows        = 32
	MaxRecordBytes = 64 << 10
	MaxQueries     = 64

	Timeout = 20 * time.Second
)

Provider identity, schema and bounds (EEP-V0-024, EEP-V0-025).

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Root, Revision string
	Seeds          []string
	Committed      func(path string) (text, blob string, ok bool)
	Executable     string
}

Request names the repository, the seed paths in priority order, the committed text and blob of a path, and the gopls executable.

type Result

type Result struct {
	Record  []byte
	Failure string
	Origins []string
	Query   map[string]any
}

Result is the record bytes, or a failure reason when there is no record, the paths the record's relations are anchored on, and the query summary that carries the query digest (EEP-V0-024).

func Expand

func Expand(ctx context.Context, request Request) Result

Expand runs one bounded expansion. It never fails: an unusable seed set, a missing executable, or a failed or timed-out session is a Result with a Failure and no record (EEP-V0-026).

Jump to

Keyboard shortcuts

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