Documentation
¶
There is no documentation for this package.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
agent
Package agent implements MTClaw's Think -> Act -> Observe cycle: it assembles a prompt from config and session history, calls the provider, executes any returned tool calls, feeds results back, and repeats until the model produces text or a bound is hit.
|
Package agent implements MTClaw's Think -> Act -> Observe cycle: it assembles a prompt from config and session history, calls the provider, executes any returned tool calls, feeds results back, and repeats until the model produces text or a bound is hit. |
|
channel
Package channel defines the chat-surface boundary every concrete channel (Telegram today; others later) implements.
|
Package channel defines the chat-surface boundary every concrete channel (Telegram today; others later) implements. |
|
channel/telegram
Package telegram implements internal/channel.Channel as a Telegram long-polling bot: access gating, message chunking, bot commands, and the inline-keyboard tools.Approver.
|
Package telegram implements internal/channel.Channel as a Telegram long-polling bot: access gating, message chunking, bot commands, and the inline-keyboard tools.Approver. |
|
cli
Package cli wires cobra commands to the config loader and logger.
|
Package cli wires cobra commands to the config loader and logger. |
|
config
Package config defines MTClaw's configuration schema and the pure load/validate pipeline every other package depends on.
|
Package config defines MTClaw's configuration schema and the pure load/validate pipeline every other package depends on. |
|
cron
Package cron implements MTClaw's in-process scheduler: YAML-declared prompts run on a cron expression and their result is delivered to a chat, reusing the gateway dispatcher for serialization and delivery.
|
Package cron implements MTClaw's in-process scheduler: YAML-declared prompts run on a cron expression and their result is delivered to a chat, reusing the gateway dispatcher for serialization and delivery. |
|
gateway
Package gateway wires the long-running mtclaw gateway process: it takes inbound messages off one channel, serializes them per chat session while running different sessions concurrently, bounds total concurrent turns, and drains cleanly on shutdown.
|
Package gateway wires the long-running mtclaw gateway process: it takes inbound messages off one channel, serializes them per chat session while running different sessions concurrently, bounds total concurrent turns, and drains cleanly on shutdown. |
|
logging
Package logging builds the process-wide *slog.Logger from resolved config.LogConfig.
|
Package logging builds the process-wide *slog.Logger from resolved config.LogConfig. |
|
provider
Package provider defines MTClaw's narrow LLM-provider boundary.
|
Package provider defines MTClaw's narrow LLM-provider boundary. |
|
provider/mock
Package mock provides a scripted provider.Provider for testing the agent loop and everything downstream of it without any network access.
|
Package mock provides a scripted provider.Provider for testing the agent loop and everything downstream of it without any network access. |
|
provider/openai
Package openai wraps github.com/openai/openai-go/v3 behind internal/provider's Provider interface.
|
Package openai wraps github.com/openai/openai-go/v3 behind internal/provider's Provider interface. |
|
store
Package store's generic SQL implementation (this file and its sibling query files) routes every statement through a Dialect, so internal/store/sqlite - and any future backend implementing this interface - is the only place a driver name, a native placeholder syntax, or a legacy-version probe appears.
|
Package store's generic SQL implementation (this file and its sibling query files) routes every statement through a Dialect, so internal/store/sqlite - and any future backend implementing this interface - is the only place a driver name, a native placeholder syntax, or a legacy-version probe appears. |
|
store/sqlite
Package sqlite implements internal/store.Dialect on top of modernc.org/sqlite, a pure-Go (CGo-free) SQLite driver, so MTClaw stays a single static binary.
|
Package sqlite implements internal/store.Dialect on top of modernc.org/sqlite, a pure-Go (CGo-free) SQLite driver, so MTClaw stays a single static binary. |
|
testsupport
Package testsupport holds test-only helpers shared across more than one package's test suite (internal/cli, internal/gateway, and this package's own fakeapi subpackage).
|
Package testsupport holds test-only helpers shared across more than one package's test suite (internal/cli, internal/gateway, and this package's own fakeapi subpackage). |
|
testsupport/fakeapi
Package fakeapi implements network-free, httptest-backed stand-ins for the two upstream HTTP APIs MTClaw talks to (Telegram's Bot API, OpenAI's chat-completions endpoint), so internal/gateway's and internal/cli's end-to-end suites can drive the *real* telego client and the *real* openai-go SDK client against a local server instead of a mock provider or a hand-built fake transport.
|
Package fakeapi implements network-free, httptest-backed stand-ins for the two upstream HTTP APIs MTClaw talks to (Telegram's Bot API, OpenAI's chat-completions endpoint), so internal/gateway's and internal/cli's end-to-end suites can drive the *real* telego client and the *real* openai-go SDK client against a local server instead of a mock provider or a hand-built fake transport. |
|
tools
Package tools implements MTClaw's tool registry and policy engine: the filesystem, web_fetch, and exec tools the agent loop can call, and the deny-list -> allow-list -> mode pipeline that gates exec.
|
Package tools implements MTClaw's tool registry and policy engine: the filesystem, web_fetch, and exec tools the agent loop can call, and the deny-list -> allow-list -> mode pipeline that gates exec. |
|
version
Package version holds build-stamped identity for the mtclaw binary.
|
Package version holds build-stamped identity for the mtclaw binary. |
Click to show internal directories.
Click to hide internal directories.