schemawarn

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package schemawarn bridges catalog loader warnings into the standard envelope error stream. Both the CLI subcommands that consume a catalog (validate, list-tables, describe) and the MCP tools that do the same need to surface non-fatal loader diagnostics (skipped statements, duplicate definitions) so agents see them alongside hard errors. Centralizing the conversion keeps the wire code stable — `schema_warning` — and avoids two surfaces drifting apart.

Index

Constants

View Source
const Code = "schema_warning"

Code is the envelope error Code emitted for every catalog warning. It is part of the wire contract: agents may filter or branch on it.

Variables

This section is empty.

Functions

func Append

func Append(env *output.Envelope, cat *catalog.Catalog)

Append copies any non-fatal issues recorded by the catalog loader into env as warning-severity envelope entries. Call this once after catalog.Load / catalog.LoadFiles. A nil cat is treated as "no catalog loaded" and leaves env unchanged so handlers don't have to guard a failed Load themselves; cat with no warnings is similarly a no-op.

Types

This section is empty.

Jump to

Keyboard shortcuts

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