MCPcopy
hub / github.com/BuilderIO/agent-native / startRun

Function startRun

packages/core/src/progress/registry.ts:55–75  ·  view source on GitHub ↗
(input: StartRunInput)

Source from the content-addressed store, hash-verified

53 * automations can react (e.g. pinning the row in a UI tray).
54 */
55export async function startRun(input: StartRunInput): Promise<AgentRun> {
56 const run = await insertRun({
57 ...input,
58 title: truncate(input.title, MAX_TITLE_LEN),
59 step: truncate(input.step, MAX_STEP_LEN),
60 });
61 try {
62 emitBusEvent(
63 "run.progress.started",
64 {
65 runId: run.id,
66 title: run.title,
67 step: run.step,
68 },
69 { owner: run.owner },
70 );
71 } catch {
72 // best-effort
73 }
74 return run;
75}
76
77/**
78 * Update a run in-flight. Emits `run.progress.updated`. Caller supplies

Callers 5

progress.spec.tsFile · 0.70
processIncomingMessageFunction · 0.50
processCommentFunction · 0.50
spawnTaskFunction · 0.50

Calls 2

insertRunFunction · 0.70
truncateFunction · 0.50

Tested by

no test coverage detected