write

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package write provides the MemoryWrite tool for persisting memory entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inputs

type Inputs struct {
	Key     string `json:"key" jsonschema:"required,description=Filename/topic for the memory entry (e.g. architecture or user-preferences)"`
	Content string `json:"content" jsonschema:"required,description=Markdown content to persist"`
	Scope   string `` /* 162-byte string literal not displayed */
}

Inputs defines the parameters for the MemoryWrite tool.

type Tool

type Tool struct {
	tool.Base
	// contains filtered or unexported fields
}

Tool persists memory entries to disk as markdown files.

func New

func New(configDir, globalHome string) *Tool

New creates a MemoryWrite tool rooted at the given config and global home directories.

func (*Tool) Execute

func (t *Tool) Execute(_ context.Context, args map[string]any) (string, error)

Execute writes a memory entry to disk.

func (*Tool) Name

func (t *Tool) Name() string

Name returns the tool's identifier.

func (*Tool) Paths

func (t *Tool) Paths(_ context.Context, args map[string]any) (read, write []string, err error)

Paths returns the filesystem paths this tool call will access.

func (*Tool) Sandboxable

func (t *Tool) Sandboxable() bool

Sandboxable returns false as memory tools manage controlled paths in the filesystem.

func (*Tool) Schema

func (t *Tool) Schema() tool.Schema

Schema returns the tool definition.

Jump to

Keyboard shortcuts

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