Class BowireMcpTypedUrlStore

Namespace
Kuestenlogik.Bowire.Mcp
Assembly
Kuestenlogik.Bowire.Mcp.dll

Disk-backed log of URLs the user has typed into the workbench (or permitted via the MCP bowire.allowlist.permit tool). Powers the --allow-invoke CLI mode: when set, the MCP allowlist seed pulls every URL from here in addition to the environments file. This widens what an agent can hit to "everywhere the user has actually pointed Bowire" without dropping the allowlist entirely.

Stored at ~/.bowire/typed-urls.json as a flat array: ["https://api.example.com/v1", "http://localhost:5000", …]. Deduplicated case-insensitively. The frontend may write to the same file independently — this store treats it as an append-only log and re-reads on every LoadAll().

public static class BowireMcpTypedUrlStore
Inheritance
BowireMcpTypedUrlStore
Inherited Members

Properties

FilePath

Resolve the on-disk path the store reads + writes. Mirrors the resolver in BowireMcpTools so a single test-time override redirects both at once.

public static string FilePath { get; }

Property Value

string

Methods

Add(string)

Append a URL to the on-disk log. No-ops when the URL is already present (case-insensitive). Returns true when the URL was new and got written, false when it was a duplicate or the input was invalid.

public static bool Add(string url)

Parameters

url string

Returns

bool

LoadAll()

Load every typed URL from disk. Returns an empty list when the file is missing or unparseable so callers can treat "no history" and "corrupt history" identically.

public static IReadOnlyList<string> LoadAll()

Returns

IReadOnlyList<string>