Documentation
¶
Overview ¶
Package omp integrates Oh My Pi (omp) with MemSpace.
omp has no shell hooks: it loads TypeScript extensions from <agent dir>/hooks/{pre,post}/*.ts, and MCP servers from <agent dir>/mcp.json. `memspace agent install omp` therefore generates a small extension that forwards omp's session and tool events to `memspace hook omp` (the same payload shape Claude Code sends), and registers the stdio MCP bridge next to it.
Index ¶
- Constants
- func ExtensionSource(argv []string) ([]byte, error)
- type Adapter
- func (a *Adapter) Capabilities() []string
- func (a *Adapter) Detect(ctx context.Context) adapter.Detection
- func (a *Adapter) Doctor(ctx context.Context, opts adapter.InstallOptions) []adapter.Check
- func (a *Adapter) ExtensionPath() string
- func (a *Adapter) Install(ctx context.Context, opts adapter.InstallOptions) error
- func (a *Adapter) MCPCheck(ctx context.Context) adapter.Check
- func (a *Adapter) MCPConfigPath() string
- func (a *Adapter) Name() string
- func (a *Adapter) Normalize(raw []byte, now time.Time) ([]spool.Record, error)
- func (a *Adapter) RegisterMCP(ctx context.Context, opts adapter.MCPOptions) error
- func (a *Adapter) Uninstall(ctx context.Context, out io.Writer) error
- func (a *Adapter) UnregisterMCP(ctx context.Context) error
Constants ¶
const AgentType = "omp"
AgentType is the agent_type stored on sessions.
Variables ¶
This section is empty.
Functions ¶
func ExtensionSource ¶
ExtensionSource renders the extension with the pinned hook argv embedded.
Types ¶
type Adapter ¶
type Adapter struct {
// AgentDir overrides omp's agent directory (default $PI_CODING_AGENT_DIR
// or ~/.omp/agent).
AgentDir string
}
Adapter implements adapter.Adapter for Oh My Pi.
func (*Adapter) Capabilities ¶
func (*Adapter) ExtensionPath ¶
ExtensionPath is the extension file that forwards omp events to MemSpace.
func (*Adapter) Install ¶
Install writes the capture extension. The MCP server is registered separately through RegisterMCP so `--no-mcp` still leaves capture working.
func (*Adapter) MCPConfigPath ¶
MCPConfigPath is the omp-native MCP config file.
func (*Adapter) RegisterMCP ¶
RegisterMCP writes MemSpace's stdio bridge into omp's native MCP config (<agent dir>/mcp.json), preserving every other server in the file. It writes no token: the bridge reads this device's credentials itself.