MCPcopy Create free account
hub / github.com/anomalyco/opencode / notify

Function notify

packages/core/src/event.ts:406–417  ·  view source on GitHub ↗
(event: Payload, isolateListeners: boolean)

Source from the content-addressed store, hash-verified

404 )
405
406 function notify(event: Payload, isolateListeners: boolean) {
407 return Effect.gen(function* () {
408 yield* Effect.forEach(
409 listeners,
410 (listener) => (isolateListeners ? observe(event, listener) : listener(event)),
411 { discard: true },
412 )
413 const typed = pubsub.typed.get(event.type)
414 if (typed) yield* PubSub.publish(typed, event)
415 yield* PubSub.publish(pubsub.all, event)
416 })
417 }
418
419 function publish<D extends Definition>(definition: D, data: Data<D>, options?: PublishOptions) {
420 return Effect.gen(function* () {

Callers 2

publishEventFunction · 0.70
replayFunction · 0.70

Calls 4

observeFunction · 0.70
getMethod · 0.65
listenerFunction · 0.50
publishMethod · 0.45

Tested by

no test coverage detected