scriptling

package
v0.23.6 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 15 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 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 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