extensions

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 9 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractErrorContext

func ExtractErrorContext(code string, err error) string

ExtractErrorContext parses a sobek compile error for a line number and returns the offending line with 2 lines of surrounding context.

func GenerateQuickCheckExtensions

func GenerateQuickCheckExtensions(checks []agenttypes.QuickCheck) []agenttypes.GeneratedExtension

GenerateQuickCheckExtensions converts QuickCheck descriptors into full JS extensions.

func GenerateSnippetExtensions

func GenerateSnippetExtensions(snippets []agenttypes.Snippet) []agenttypes.GeneratedExtension

GenerateSnippetExtensions wraps Snippet bodies in full JS module scaffolds.

func LintQuickCheck

LintQuickCheck validates a QuickCheck descriptor and returns issues.

func LintSnippet

LintSnippet validates a Snippet descriptor and returns issues.

func LogDroppedExtension

func LogDroppedExtension(ext agenttypes.GeneratedExtension, err error)

LogDroppedExtension logs a warning with the error and source context around the error line so it's easier to diagnose in logs.

func ValidateExtensionSyntax

func ValidateExtensionSyntax(extensions []agenttypes.GeneratedExtension) (valid []agenttypes.GeneratedExtension, invalid []agenttypes.InvalidExtension)

ValidateExtensionSyntax compiles each extension's JavaScript code for parse-only validation and returns only the extensions that parse successfully. Invalid or empty extensions are logged and dropped. For multiple extensions, validation runs in parallel with bounded concurrency (runtime.NumCPU goroutines).

Types

This section is empty.

Jump to

Keyboard shortcuts

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