MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / resolveEscalationsForPerspective

Function resolveEscalationsForPerspective

server/src/db/escalation-db.ts:133–150  ·  view source on GitHub ↗
(
  perspectiveId: string,
  resolvedBy: string,
  notes: string
)

Source from the content-addressed store, hash-verified

131 * ones are left alone since a human may be actively working them.
132 */
133export async function resolveEscalationsForPerspective(
134 perspectiveId: string,
135 resolvedBy: string,
136 notes: string
137): Promise<number[]> {
138 const result = await query<{ id: number }>(
139 `UPDATE addie_escalations
140 SET status = 'resolved',
141 resolved_by = $2,
142 resolved_at = NOW(),
143 resolution_notes = $3,
144 updated_at = NOW()
145 WHERE perspective_id = $1 AND status = 'open'
146 RETURNING id`,
147 [perspectiveId, resolvedBy, notes]
148 );
149 return result.rows.map(r => r.id);
150}
151
152/**
153 * Get a single escalation by ID

Callers 1

approveContentForUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected