scriptling

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedLibs embed.FS

Functions

func GetAILibrary

func GetAILibrary(aiClient ai.Client) *object.Library

GetAILibrary returns the knot.ai library for scriptling environments. Only Client() and get_default_model() are exposed, matching the Python standalone interface. When aiClient is nil, Client() will return an error.

func GetApiClientLibrary added in v0.23.6

func GetApiClientLibrary(client rest.RESTClient, userId string) *object.Library

GetApiClientLibrary returns the knot.apiclient Go transport library. In embedded contexts this replaces the Python apiclient.py transport stub. configure() and is_configured() are no-ops - the client is pre-configured. Tokens are never exposed to scripts.

func GetHealthCheckLibrary added in v0.24.0

func GetHealthCheckLibrary() *object.Library

GetHealthCheckLibrary returns the knot.healthcheck built-in library.

func GetIntAsUint16

func GetIntAsUint16(args []object.Object, index int, name string) (uint16, object.Object)

GetIntAsUint16 safely extracts an integer argument at the given index and converts to uint16. Returns the uint16 value and nil error on success, or 0 and error object on failure.

func GetMCPToolsLibrary

func GetMCPToolsLibrary(client *apiclient.ApiClient, mcpParams map[string]object.Object) *object.Library

GetMCPToolsLibrary returns the MCP tools library for scriptling (used in local/remote environments) This provides only tool access functions that communicate with the server via API calls

Types

type HealthCheckResult added in v0.24.0

type HealthCheckResult struct {
	Healthy bool `json:"healthy"`
}

HealthCheckResult holds the result of a health check execution.

func ParseHealthCheckResult added in v0.24.0

func ParseHealthCheckResult(msg string) (*HealthCheckResult, bool)

ParseHealthCheckResult extracts a HealthCheckResult from a script exception message.

type MCPLibrary

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

MCPLibrary is the exported type for accessing the result

func GetMCPLibraryInstance

func GetMCPLibraryInstance(client *apiclient.ApiClient, mcpParams map[string]object.Object) *MCPLibrary

GetMCPLibraryInstance creates a new MCP library instance that can be used to retrieve results

func (*MCPLibrary) GetLibrary

func (m *MCPLibrary) GetLibrary() *object.Library

GetLibrary returns the scriptling library

func (*MCPLibrary) GetResult

func (m *MCPLibrary) GetResult() *string

GetResult returns the stored result from mcp.return_* functions

Jump to

Keyboard shortcuts

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