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

Function deriveShortMessageId

src/utils/messages.ts:201–206  ·  view source on GitHub ↗
(uuid: string)

Source from the content-addressed store, hash-verified

199 * Deterministic: same UUID always produces the same short ID.
200 */
201export function deriveShortMessageId(uuid: string): string {
202 // Take first 10 hex chars from the UUID (skipping dashes)
203 const hex = uuid.replace(/-/g, '').slice(0, 10)
204 // Convert to base36 for shorter representation, take 6 chars
205 return parseInt(hex, 16).toString(36).slice(0, 6)
206}
207
208export const INTERRUPT_MESSAGE = '[Request interrupted by user]'
209export const INTERRUPT_MESSAGE_FOR_TOOL_USE =

Callers 1

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected