extension

package
v1.5.183 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package extension defines the stable, protocol-independent vocabulary of a golder extension. It does not grant host authority and imports no internal API.

Index

Constants

View Source
const ExecutablePathsEnv = "GOLDER_EXTENSION_EXECUTABLES"
View Source
const OperatorConfirmedMeta = "io.golder/operator-confirmed"
View Source
const PolicyApprovedMeta = "io.golder/policy-approved"

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	ID        string          `json:"id"`
	Tool      string          `json:"tool"`
	Arguments json.RawMessage `json:"arguments"`
	// OperatorConfirmed is host-only state. MCP transports may attach the
	// namespaced metadata marker, never a field in model-controlled arguments.
	OperatorConfirmed bool `json:"-"`
	// PolicyApproved is a distinct host-only exact-call policy decision; it
	// does not assert that a person individually confirmed the operation.
	PolicyApproved bool `json:"-"`
}

type ContentBlock

type ContentBlock struct {
	Type     string `json:"type"` // text, image, resource_link
	Text     string `json:"text,omitempty"`
	Data     string `json:"data,omitempty"` // base64 for image
	MIMEType string `json:"mimeType,omitempty"`
	URI      string `json:"uri,omitempty"`
}

ContentBlock is data, never a request to execute or to change host policy.

type Progress

type Progress struct {
	Message string   `json:"message"`
	Current float64  `json:"current"`
	Total   *float64 `json:"total,omitempty"`
}

type Result

type Result struct {
	Content           []ContentBlock  `json:"content"`
	StructuredContent json.RawMessage `json:"structuredContent,omitempty"`
	IsError           bool            `json:"isError,omitempty"`
}

func Text

func Text(text string) Result

type SourceRef

type SourceRef struct {
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

func (SourceRef) String

func (r SourceRef) String() string

type ToolHandler

type ToolHandler func(context.Context, Call, func(Progress)) (Result, error)

type ToolHints

type ToolHints struct {
	ReadOnly    bool `json:"readOnly,omitempty"`
	Destructive bool `json:"destructive,omitempty"`
	Idempotent  bool `json:"idempotent,omitempty"`
}

type ToolSpec

type ToolSpec struct {
	Name         string          `json:"name"`
	Description  string          `json:"description"`
	InputSchema  json.RawMessage `json:"inputSchema"`
	OutputSchema json.RawMessage `json:"outputSchema,omitempty"`
	Hints        ToolHints       `json:"hints,omitempty"`
}

Directories

Path Synopsis
Package plugin provides a Go server for golder's existing stdio plugin v1 protocol.
Package plugin provides a Go server for golder's existing stdio plugin v1 protocol.
plugins
lark
Package lark contains the static instruction assets distributed with the extension.
Package lark contains the static instruction assets distributed with the extension.
lark/internal/larkmcp
Package larkmcp is the host-independent Lark/Project MCP adapter.
Package larkmcp is the host-independent Lark/Project MCP adapter.
lark/version
Package version defines the independently maintained golder-lark version.
Package version defines the independently maintained golder-lark version.
Package setup defines the small operator-only setup event stream.
Package setup defines the small operator-only setup event stream.

Jump to

Keyboard shortcuts

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