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

Function IsInjectedID

internal/toolinjection/injection.go:39–41  ·  view source on GitHub ↗

IsInjectedID reports whether the given ID was generated by this package. Checks both the canonical marker ("cpa_inject_") and the underscore-stripped variant ("cpainject") to handle agents that normalize tool_call_ids.

(id string)

Source from the content-addressed store, hash-verified

37// Checks both the canonical marker ("cpa_inject_") and the underscore-stripped
38// variant ("cpainject") to handle agents that normalize tool_call_ids.
39func IsInjectedID(id string) bool {
40 return strings.Contains(id, InjectedIDMarker) || strings.Contains(id, InjectedIDMarkerNoUnderscore)
41}
42
43// ExtractTaskID extracts the encoded task ID from an injected call ID.
44// Returns (taskID, true) on success or (0, false) if the ID is not injected

Calls

no outgoing calls