MCPcopy Create free account
hub / github.com/agentrpc/agentrpc / Interrupt

Class Interrupt

sdk-node/src/util.ts:205–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203};
204
205export class Interrupt {
206 [INTERRUPT_KEY]: z.infer<typeof interruptSchema>;
207
208 constructor(
209 type: VALID_INTERRUPT_TYPES,
210 notification?: z.infer<typeof interruptSchema>["notification"],
211 ) {
212 this[INTERRUPT_KEY] = {
213 type,
214 notification,
215 };
216 }
217
218 static approval(
219 notification?: z.infer<typeof interruptSchema>["notification"],
220 ) {
221 return new Interrupt("approval", notification);
222 }
223
224 static general(
225 notification?: z.infer<typeof interruptSchema>["notification"],
226 ) {
227 return new Interrupt("general", notification);
228 }
229}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected