jinn

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Schema = `` /* 7134-byte string literal not displayed */

Schema is the tool definitions in OpenAI function-calling format.

Variables

This section is empty.

Functions

func ResolveVersion

func ResolveVersion(ldVersion string) string

ResolveVersion returns a human-readable version string, preferring ldflags-injected version, then VCS revision, then module version.

Types

type Engine

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

Engine is a sandboxed tool executor bound to a working directory.

func New

func New(workDir string) *Engine

New creates an Engine rooted at the given working directory. The workDir is resolved via EvalSymlinks so that path boundary checks work correctly on platforms where temp dirs are symlinks (e.g., macOS).

func (*Engine) Dispatch

func (e *Engine) Dispatch(ctx context.Context, tool string, args map[string]interface{}) (string, error)

Dispatch routes a tool call to the appropriate handler.

type Request

type Request struct {
	Tool string                 `json:"tool"`
	Args map[string]interface{} `json:"args"`
}

Request is the one-shot tool invocation envelope.

type Response

type Response struct {
	OK     bool   `json:"ok"`
	Result string `json:"result,omitempty"`
	Error  string `json:"error,omitempty"`
}

Response is the one-shot tool result envelope.

Jump to

Keyboard shortcuts

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