MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / deserialize

Function deserialize

ts/workflow-core/src/function/serialization.ts:30–43  ·  view source on GitHub ↗
(functionInfo: FunctionInfo, outputAssignments: Record<string, Expression>)

Source from the content-addressed store, hash-verified

28/** Wire pieces → domain declaration: bundle each `return` with its assignment. A
29 * return with no stored assignment gets an empty expression of the right dataType. */
30export function deserialize(functionInfo: FunctionInfo, outputAssignments: Record<string, Expression>): FunctionDeclaration {
31 return {
32 id: functionInfo.id,
33 version: functionInfo.version,
34 name: functionInfo.name,
35 arguments: functionInfo.arguments,
36 outputs: functionInfo.returns.map((r) => ({
37 uid: r.uid,
38 name: r.name,
39 dataType: r.dataType,
40 expression: outputAssignments[r.uid] ?? { expression: "", references: [], dataType: r.dataType },
41 })),
42 };
43}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected