mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-16 19:36:54 +00:00
19 lines
361 B
TypeScript
19 lines
361 B
TypeScript
export function poolTouchKeys(scope: unknown): string[] {
|
|
const key = String(scope ?? '').trim()
|
|
|
|
if (!key) {
|
|
return []
|
|
}
|
|
|
|
const localPrefix = 'conn:local::'
|
|
|
|
if (key.startsWith(localPrefix)) {
|
|
const delegatedProfile = key.slice(localPrefix.length)
|
|
|
|
if (delegatedProfile) {
|
|
return [key, delegatedProfile]
|
|
}
|
|
}
|
|
|
|
return [key]
|
|
}
|