Download src/commands/agents.binding-format.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 738 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/commands/agents.binding-format.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/commands/agents.binding-format.ts
-
curl -L -o agents.binding-format.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/commands/agents.binding-format.ts
738 Bytes
| // Human-readable formatting for agent routing binding match criteria. | |
| import type { AgentRouteBinding } from "../config/types.js"; | |
| /** Render one route binding as a compact CLI line fragment. */ | |
| export function describeBinding(binding: AgentRouteBinding): string { | |
| const match = binding.match; | |
| const parts = [match.channel]; | |
| if (match.accountId) { | |
| parts.push(`accountId=${match.accountId}`); | |
| } | |
| if (match.peer) { | |
| parts.push(`peer=${match.peer.kind}:${match.peer.id}`); | |
| } | |
| if (match.guildId) { | |
| parts.push(`guild=${match.guildId}`); | |
| } | |
| if (match.teamId) { | |
| parts.push(`team=${match.teamId}`); | |
| } | |
| if (match.roles?.length) { | |
| parts.push(`roles=${match.roles.join(",")}`); | |
| } | |
| return parts.join(" "); | |
| } | |