channelhttp

package
v1.147.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package channelhttp serves the portal's "Post to a channel" routes (#1723): the channels the signed-in person can reach, posting an asset to one, and sending a message to one.

Every route is a notify tool call, made over an in-memory session that authenticates as the person the portal signed in. That is the whole point of the shape: who may reach a channel, what an asset becomes when it is posted, the per-session rate limit and the audit row are the tool's, so the asset page and an agent asking for the same post cannot come to disagree about any of them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// Server is the assembled MCP server the calls are made against. nil
	// answers every route 503.
	Server *mcp.Server
}

API serves the routes.

func (*API) Register

func (a *API) Register(mux *http.ServeMux)

Register mounts the routes on the portal's authenticated mux.

type PublishRequest

type PublishRequest struct {
	// AssetID is the asset to post.
	AssetID string `json:"asset_id" example:"ast_01HK7R8Z"`
	// Message is an optional line posted above the asset.
	Message string `json:"message,omitempty" example:"This week's numbers"`
}

PublishRequest posts an asset.

type SendRequest

type SendRequest struct {
	Title string `json:"title" example:"Nightly load finished late"`
	// Body is markdown.
	Body string `json:"body,omitempty" example:"The load finished at 06:40, forty minutes past its window."`
	// Link is the absolute URL a reader follows from the message.
	Link string `json:"link,omitempty" example:"https://platform.example.com/portal/automations/scr_1/runs/run_9"`
}

SendRequest posts a message.

Jump to

Keyboard shortcuts

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