boundedresult

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Package boundedresult defines the canonical bounded-result contract shared by DSL validation, code generation, and runtime projection.

Contract:

  • Canonical bounded fields are owned by loom-mcp, not by authored semantic tool result shapes.
  • returned/truncated are always required for bounded successful results.
  • total/refinement_hint/next_cursor are optional and emitted only when set.

Index

Constants

View Source
const (
	// FieldReturned is the canonical count of items present in this response.
	FieldReturned = "returned"
	// FieldTotal is the optional total number of matching items before truncation.
	FieldTotal = "total"
	// FieldTruncated indicates whether runtime caps/truncation were applied.
	FieldTruncated = "truncated"
	// FieldRefinementHint is optional guidance for narrowing a truncated query.
	FieldRefinementHint = "refinement_hint"
)

Variables

This section is empty.

Functions

func CanonicalFieldNames

func CanonicalFieldNames(nextCursorField string) []string

CanonicalFieldNames returns canonical bounded-result field names and includes nextCursorField when non-empty.

func HasContinuation

func HasContinuation(nextCursor *string, refinementHint string) bool

HasContinuation reports whether a truncated result carries either a paging cursor or refinement guidance.

func OptionalFieldNames

func OptionalFieldNames(nextCursorField string) []string

OptionalFieldNames returns canonical bounded-result fields that must remain optional in JSON schemas and result payloads.

func RequiredFieldNames

func RequiredFieldNames() []string

RequiredFieldNames returns canonical bounded-result fields that are always required for successful bounded results.

Types

This section is empty.

Jump to

Keyboard shortcuts

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