Documentation
¶
Overview ¶
Package samples exposes the embedded /_examples tree to anything in this module that needs it (today: cmd/demo). It lives at the project root because //go:embed cannot use ".." patterns, so the embedder must sit at or above the embedded directory.
We synthesize each sample's go.mod here rather than committing one under _examples/: a real go.mod would mark the sample dir as a nested module, which Go's embed mechanism refuses to traverse.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadModule ¶
LoadModule returns the files of the named sample as a path->bytes map keyed by paths relative to the sample's root (e.g. "main.go", "greet/greet.go") and a synthesized "go.mod", suitable for passing to goruntime.Request.Files.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
_examples
|
|
|
multifile
command
|
|
|
smoke
command
|
|
|
cmd
|
|
|
demo
command
cmd/demo is a thin CLI wrapper around pkg/goruntime.
|
cmd/demo is a thin CLI wrapper around pkg/goruntime. |
|
mcp-server
command
cmd/mcp-server exposes a single "run_go_code" tool over MCP (stdio transport).
|
cmd/mcp-server exposes a single "run_go_code" tool over MCP (stdio transport). |
|
mcp-smoke-test
command
cmd/mcp-smoke-test spawns ./mcp-server as a subprocess, speaks MCP to it over stdio, and exercises run_go_code with a single-file and multi-file payload.
|
cmd/mcp-smoke-test spawns ./mcp-server as a subprocess, speaks MCP to it over stdio, and exercises run_go_code with a single-file and multi-file payload. |
|
pkg
|
|
|
format
Package format turns a goruntime.Result into a string sized and shaped for LLM consumption: exit code prominent, duration available, stdout/stderr cleanly separated, truncation marked.
|
Package format turns a goruntime.Result into a string sized and shaped for LLM consumption: exit code prominent, duration available, stdout/stderr cleanly separated, truncation marked. |
|
goruntime
Package goruntime exposes a "ship some Go files and run a command" workflow on top of the agent-sandbox Go client.
|
Package goruntime exposes a "ship some Go files and run a command" workflow on top of the agent-sandbox Go client. |