Documentation
¶
Overview ¶
Package feedback wires the public submit_feedback MCP tool to the existing ailang-messages topology — Firestore-backed inbox + Pub/Sub notification — so submissions appear in `ailang messages list --inbox public-feedback` alongside everything else the team triages.
The MCP server runs in Cloud Run with AILANG_STORAGE=gcp, AILANG_CLOUD_PROJECT, and roles/pubsub.publisher on ailang-messages (granted in ailang-multivac/terraform/cloud_run_mcp.tf). Locally, set AILANG_STORAGE=gcp + AILANG_CLOUD_PROJECT to test against a real Firestore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FieldError ¶
FieldError is a structured validation error so the MCP tool can return {error, field} envelopes the AILANG-side schema documents.
func (*FieldError) Error ¶
func (e *FieldError) Error() string
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher holds the lazily-initialized clients.
func Get ¶
Get returns the process-wide Publisher, initializing it on first use. Returns the same error on every subsequent call if init failed — caller should surface it as a 5xx-equivalent error envelope, not retry forever.
func (*Publisher) Submit ¶
Submit validates the request, writes the message to Firestore, and publishes a notification on the ailang-messages topic. Returns ticket_id (the Firestore message_id) on success.
Validation errors return *FieldError so the caller can convert to a structured {error, field} JSON envelope. Publish/store errors are wrapped generically.
type Request ¶
type Request struct {
Title string
Body string
Category string
AILangVersion string
Snippet string // optional
Contact string // optional
// Package routes feedback to a specific package's inbox (pkg:<vendor>/<name>)
// instead of the default public-feedback inbox. Empty = general AILANG feedback.
// Format: vendor/name (e.g. "sunholo/auth"). Validated against packageRe.
Package string
// AutoDispatch hints to the cloud coordinator that the user explicitly
// authorizes the package's autonomous agent to act on this submission.
// Default false — feedback files in the inbox for human/agent triage.
// Today, package agents use pkg-update.md (release-sync template); a
// dedicated pkg-feedback.md template is planned but not yet wired, so
// auto-dispatch=true on a pkg:* inbox today would trigger a release-sync
// workflow on a bug report (wrong). Surface as an attribute on the
// Pub/Sub notification so the coordinator can filter when ready.
AutoDispatch bool
}
Request is the public-facing input shape for submit_feedback.