Skip to content

Commit 58a7f7d

Browse files
committed
chore(format): align task API with CI Prettier
1 parent ab072d3 commit 58a7f7d

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

packages/agent-bus/src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,8 +1994,7 @@ export async function startAgentBusServer(
19941994
}
19951995
if (req.method === 'POST' && req.url === '/v1/batch') {
19961996
const body = JSON.parse(await readBody(req)) as
1997-
| { items?: AgentBusEvent[]; enqueue?: boolean }
1998-
| AgentBusEvent[];
1997+
{ items?: AgentBusEvent[]; enqueue?: boolean } | AgentBusEvent[];
19991998
const items = Array.isArray(body) ? body : body.items || [];
20001999
const enqueue = !Array.isArray(body) && body.enqueue === true;
20012000
const rows = await runBatch(items, { ...options, enqueue });
@@ -2013,8 +2012,7 @@ export async function startAgentBusServer(
20132012
}
20142013
if (req.method === 'POST' && req.url === '/v1/fanout') {
20152014
const body = JSON.parse(await readBody(req)) as
2016-
| { items?: AgentBusEvent[]; enqueue?: boolean; concurrency?: number }
2017-
| AgentBusEvent[];
2015+
{ items?: AgentBusEvent[]; enqueue?: boolean; concurrency?: number } | AgentBusEvent[];
20182016
const items = Array.isArray(body) ? body : body.items || [];
20192017
const enqueue = !Array.isArray(body) && body.enqueue === true;
20202018
const concurrency = !Array.isArray(body) ? Number(body.concurrency || 4) : 4;

packages/agent-bus/src/task-api.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ export type GovernedTaskRun = z.infer<typeof GovernedTaskRunSchema>;
115115
export type TaskFieldBasis = z.infer<typeof TaskFieldBasisSchema>;
116116

117117
export type TaskRunParseResult =
118-
| { ok: true; data: GovernedTaskRun }
119-
| { ok: false; errors: string[]; raw: unknown };
118+
{ ok: true; data: GovernedTaskRun } | { ok: false; errors: string[]; raw: unknown };
120119

121120
export interface TaskApiClientOptions {
122121
baseUrl?: string;

0 commit comments

Comments
 (0)