Documentation
¶
Index ¶
- Variables
- func GetAILibrary(aiClient ai.Client) *object.Library
- func GetApiClientLibrary(client rest.RESTClient, userId string) *object.Library
- func GetHealthCheckLibrary() *object.Library
- func GetIntAsUint16(args []object.Object, index int, name string) (uint16, object.Object)
- func GetMCPToolsLibrary(client *apiclient.ApiClient, mcpParams map[string]object.Object) *object.Library
- type HealthCheckResult
- type MCPLibrary
Constants ¶
This section is empty.
Variables ¶
var EmbeddedLibs embed.FS
Functions ¶
func GetAILibrary ¶
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
GetHealthCheckLibrary returns the knot.healthcheck built-in library.
func GetIntAsUint16 ¶
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