promptschema

package
v1.167.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 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 promptschema builds the manage_prompt input schema.

It is a separate package for the reason the structural gate exists: the prompt layer is at its size ceiling, and the tool schema is the piece that comes out whole — a pure function over the command set, with no store, no context, and no behavior. Extracting it also closes a drift seam: the command enum is now DERIVED from the dispatch table the caller passes in, so a command the layer handles can no longer be missing from the schema an agent reads.

Index

Constants

View Source
const (
	KeyType        = "type"
	KeyDescription = "description"
	KeyItems       = "items"
	KeyEnum        = "enum"
	ValString      = "string"
	ValArray       = "array"
)

JSON schema keys and values, exported because the sibling show_prompts schema is written in the same vocabulary.

Variables

This section is empty.

Functions

func ManagePrompt

func ManagePrompt(commands []string) any

ManagePrompt returns the JSON schema for the manage_prompt tool. commands is the set the tool dispatches, sorted here so the advertised enum is deterministic and can never omit a command the layer handles.

Types

This section is empty.

Jump to

Keyboard shortcuts

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