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

Function summarizeRun

apps/sim/lib/workspace-events/payload.ts:54–62  ·  view source on GitHub ↗

Run summary in user-facing units: cost in credits, finalOutput bounded.

(context: ExecutionEventContext)

Source from the content-addressed store, hash-verified

52
53/** Run summary in user-facing units: cost in credits, finalOutput bounded. */
54function summarizeRun(context: ExecutionEventContext): SimRunSummary {
55 return {
56 runId: context.executionId,
57 durationMs: context.durationMs,
58 // Costs are stored in dollars; credits are the user-facing unit.
59 cost: dollarsToCredits(context.cost),
60 finalOutput: boundFinalOutput(context.finalOutput),
61 }
62}
63
64/**
65 * Payload for run-backed events. Plain success/error events ARE the run, so

Callers 1

Calls 2

dollarsToCreditsFunction · 0.90
boundFinalOutputFunction · 0.85

Tested by

no test coverage detected