server

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 39 Imported by: 0

Documentation

Overview

Package server is the memcode gateway runtime — the first external surface of memcode's event/agent spine. It starts each configured channel, DURABLY records every accepted inbound message before acknowledging the provider, then a worker drains that inbox: each message runs as a detached agent job (crash-isolated subprocess, reusing internal/jobs) and the result is posted back. Gateway activity is logged to the main event store, but an inbound chat message is never turned into a project objective. Coding is one use of this loop, not what it's built around: an inbound message is just a task.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, root string, mainStore store.Store, settings gwconfig.Settings, out io.Writer) error

Run starts every configured surface, then drains the durable inbox until ctx is cancelled. root is the default project the agent operates in; mainStore is the gateway's (global) event log; settings holds the non-secret gateway config. The gateway's OWN durable state — inbox and singleton lock — lives at the global config dir, NOT under root/.memcode: it is gateway-operational, and a global singleton is what lets one daemon own single-consumer bot tokens.

Types

This section is empty.

Jump to

Keyboard shortcuts

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