MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / pluginIdentityCurrent

Method pluginIdentityCurrent

internal/pluginhost/host.go:514–534  ·  view source on GitHub ↗
(id string, path string, version string)

Source from the content-addressed store, hash-verified

512}
513
514func (h *Host) pluginIdentityCurrent(id string, path string, version string) bool {
515 if h == nil {
516 return false
517 }
518 version = strings.TrimSpace(version)
519 h.mu.Lock()
520 defer h.mu.Unlock()
521 id = strings.TrimSpace(id)
522 if id == "" {
523 return false
524 }
525 path = cleanPluginPath(path)
526 if path == "" || h.activePluginPaths[id] != path {
527 return false
528 }
529 activePathVersion, okVersion := h.pluginFileVersions[path]
530 if !okVersion || activePathVersion != version {
531 return false
532 }
533 return h.activePluginVersions[id] == version
534}
535
536func (h *Host) snapshotWithoutPluginLocked(id string) ([]capabilityRecord, bool) {
537 raw := h.snapshot.Load()

Callers 12

recordCurrentMethod · 0.95
callManagementHandlerMethod · 0.95
callResourceHandlerMethod · 0.95
AuthenticateMethod · 0.80
ExecuteMethod · 0.80
ExecuteStreamMethod · 0.80
RefreshMethod · 0.80
CountTokensMethod · 0.80
HttpRequestMethod · 0.80
ApplyMethod · 0.80

Calls 1

cleanPluginPathFunction · 0.85