MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / close

Function close

packages/wl-sdk/src/ops/close.ts:18–33  ·  view source on GitHub ↗
(opts: CloseOptions)

Source from the content-addressed store, hash-verified

16};
17
18export async function close(opts: CloseOptions): Promise<WlResult<MutationOutcome>> {
19 try {
20 const dml = closeWantedDML({ wantedId: opts.wantedId });
21 const outcome = await applyMutation({
22 ctx: opts.ctx,
23 wantedId: opts.wantedId,
24 targetStatus: 'completed',
25 statements: [dml],
26 commitMessage: `wl close: ${opts.wantedId}`,
27 });
28 return { ok: true, data: outcome };
29 } catch (err) {
30 if (err instanceof WlError) return { ok: false, error: err };
31 return { ok: false, error: new WlError('close failed', 'internal', err) };
32 }
33}

Callers 2

closeMethod · 0.90
close.test.tsFile · 0.90

Calls 2

closeWantedDMLFunction · 0.90
applyMutationFunction · 0.90

Tested by

no test coverage detected