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

Function resolveAndPrepend

src/bridge/inboundAttachments.ts:168–176  ·  view source on GitHub ↗
(
  msg: unknown,
  content: string | Array<ContentBlockParam>,
)

Source from the content-addressed store, hash-verified

166 * file_attachments field (fast path — no network, returns same reference).
167 */
168export async function resolveAndPrepend(
169 msg: unknown,
170 content: string | Array<ContentBlockParam>,
171): Promise<string | Array<ContentBlockParam>> {
172 const attachments = extractInboundAttachments(msg)
173 if (attachments.length === 0) return content
174 const prefix = await resolveInboundAttachments(attachments)
175 return prependPathRefs(content, prefix)
176}

Callers 3

runHeadlessStreamingFunction · 0.85
handleInboundMessageFunction · 0.85

Calls 3

prependPathRefsFunction · 0.85

Tested by

no test coverage detected