extensions

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 9 Imported by: 0

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