MCPcopy Index your code
hub / github.com/simstudioai/sim / mapExecutionInfo

Function mapExecutionInfo

apps/sim/tools/temporal/utils.ts:225–237  ·  view source on GitHub ↗
(info: TemporalRawExecutionInfo | undefined)

Source from the content-addressed store, hash-verified

223 * describe and list tools. int64 fields arrive as JSON strings and are coerced to numbers.
224 */
225export function mapExecutionInfo(info: TemporalRawExecutionInfo | undefined) {
226 return {
227 workflowId: info?.execution?.workflowId ?? null,
228 runId: info?.execution?.runId ?? null,
229 workflowType: info?.type?.name ?? null,
230 status: stripEnumPrefix(info?.status, 'WORKFLOW_EXECUTION_STATUS_'),
231 startTime: info?.startTime ?? null,
232 closeTime: info?.closeTime ?? null,
233 executionTime: info?.executionTime ?? null,
234 historyLength: info?.historyLength != null ? Number(info.historyLength) : null,
235 taskQueue: info?.taskQueue ?? null,
236 }
237}
238
239/**
240 * Maps a raw history event to a flat shape, extracting the event's `*EventAttributes`

Callers 1

Calls 1

stripEnumPrefixFunction · 0.85

Tested by

no test coverage detected