Documentation
¶
Index ¶
- type Env
- func (e *Env) CallTool(t *testing.T, name string, args map[string]any) *mcp.CallToolResult
- func (e *Env) FlushSessions()
- func (e *Env) ReadResource(t *testing.T, uri string) string
- func (e *Env) StageFixture(t *testing.T, rel string) string
- func (e *Env) TextContent(t *testing.T, result *mcp.CallToolResult) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
Session *mcp.ClientSession
Store *store.Store
// RescanDir is the source dir a NewEnvWithRescan loop watches; "" otherwise.
RescanDir string
// WorkspaceDir is the source dir whose .remindb/ holds the session ledger.
WorkspaceDir string
// contains filtered or unexported fields
}
func NewEnvWithLog ¶ added in v0.3.4
func NewEnvWithRescan ¶ added in v0.3.4
func NewEnvWithSessionLedger ¶ added in v0.3.5
func NewEnvWithSessionLogs ¶ added in v0.3.5
NewEnvWithSessionLogs wires the production session-log chain: WithSourceDir (so the registry middleware injects the session id) plus a logger whose outermost handler is sessionlog.Handler over an Info-gated discard stream — the same shape cmd/remindb/serve.go builds when session_files is enabled.
func NewHttpEnv ¶ added in v0.2.0
func (*Env) FlushSessions ¶ added in v0.3.5
func (e *Env) FlushSessions()
FlushSessions forces a session-ledger flush so tests observe it deterministically.
func (*Env) ReadResource ¶ added in v0.3.4
func (*Env) StageFixture ¶ added in v0.3.12
StageFixture copies a testdata fixture (file or dir) into the env's source root and returns the in-root path, so MemoryCompile — which rejects paths outside the root — can ingest it. The basename is preserved under WorkspaceDir.
func (*Env) TextContent ¶
Click to show internal directories.
Click to hide internal directories.