MCPcopy Create free account
hub / github.com/Noumena-Network/code / pathInWorkingPath

Function pathInWorkingPath

src/utils/agentsmd.ts:103–106  ·  view source on GitHub ↗
(child: string, parent: string)

Source from the content-addressed store, hash-verified

101}
102
103function pathInWorkingPath(child: string, parent: string): boolean {
104 const relativePath = relativeSafe(parent, child)
105 return relativePath !== '' && !relativePath.startsWith('..')
106}
107
108function relativeSafe(from: string, to: string): string {
109 const fromParts = from.split(/[/\\]+/).filter(Boolean)

Callers 4

agentsmd.tsFile · 0.70
pathInOriginalCwdFunction · 0.70
claudemd.tsFile · 0.70

Calls 1

relativeSafeFunction · 0.85

Tested by

no test coverage detected