MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / isSafeAgentId

Function isSafeAgentId

apps/vis/server/src/lib/session-store.ts:18–20  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

16 * or hand-edited `state.json.agents` key could otherwise turn vis
17 * into a local-file-read primitive when exposed beyond loopback. */
18export function isSafeAgentId(id: string): boolean {
19 return AGENT_ID_RE.test(id) && id !== '.' && id !== '..';
20}
21
22interface StateJson {
23 createdAt?: string;

Callers 6

wireRouteFunction · 0.90
blobsRouteFunction · 0.90
contextRouteFunction · 0.90
discoverAgentsFromDiskFunction · 0.85
inventoryAgentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected