Documentation
¶
Index ¶
- Variables
- func Account(context.Context) base.Account
- func Login(string) (base.LoginFlow, error)
- func Logout(ctx context.Context) error
- func MergeMCPFilesData(packData, userData []byte) ([]byte, error)
- func New() base.Harness
- func ReadLimits(ctx context.Context) base.LimitSnapshot
- func RenderMCP(entries mcp.Entries) ([]byte, []string, error)
- func Support(event hooks.Event, handler hooks.Handler) hooks.Support
- func WriteMCP(path string, entries mcp.Entries) error
- type HookRenderer
Constants ¶
This section is empty.
Variables ¶
var LoginMethods = []base.LoginMethod{{ID: "cursor", Label: "Cursor account"}}
LoginMethods are the ways the web UI signs Cursor in.
Functions ¶
func Account ¶ added in v0.14.1
Account looks for the token Cursor CLI keeps, the same one the usage probe reads.
func Login ¶ added in v0.14.1
Login runs `cursor-agent login` with the real HOME, where Cursor keeps its login. With NO_OPEN_BROWSER it prints the link and waits for the browser sign-in; nothing is pasted back.
func Logout ¶ added in v0.14.1
Logout runs `cursor-agent logout` with the real HOME, where Cursor keeps its login.
func MergeMCPFilesData ¶ added in v0.9.0
func ReadLimits ¶ added in v0.11.0
func ReadLimits(ctx context.Context) base.LimitSnapshot
ReadLimits uses the same read-only usage RPC and credential store as Cursor CLI. It never starts an agent or sends an inference request.
func WriteMCP ¶
WriteMCP writes the servers as Cursor's mcp.json. A remote server keeps its headers and its OAuth client, which Cursor spells auth.CLIENT_ID, auth.CLIENT_SECRET and auth.scopes. Cursor documents no working directory for a stdio server and a fixed OAuth callback, so a cwd and a callback port are left out with a warning.
Types ¶
type HookRenderer ¶
type HookRenderer struct{}
func (HookRenderer) Render ¶
func (HookRenderer) Render(bundle hooks.Bundle, context hooks.RenderContext) (hooks.RenderOutput, error)
func (HookRenderer) Target ¶
func (HookRenderer) Target() harness.Target