summaryrefslogtreecommitdiffhomepage
path: root/packaging/dispatch-api-wrapper.sh
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-01 09:28:30 +0900
committerAdam Malczewski <[email protected]>2026-06-01 09:28:30 +0900
commit21cdb1199599c4dc6e2a941e52713ba6511cd675 (patch)
treee3711384f16c476bf5d8def148dc922f9ceb5f3d /packaging/dispatch-api-wrapper.sh
parent5e72191cac9469c2ade91aaba1e62f69fa1ad94a (diff)
downloaddispatch-21cdb1199599c4dc6e2a941e52713ba6511cd675.tar.gz
dispatch-21cdb1199599c4dc6e2a941e52713ba6511cd675.zip
feat(api): wire notification dispatcher into app + /notifications routes
PermissionManager: add onPromptAdded(listener) callback. Fires exactly once per unique pending prompt id, even when broadcastPending is called repeatedly for unrelated mutations (e.g. another prompt resolving while this one is still pending). app.ts: instantiate NotificationDispatcher, attach to both AgentManager and PermissionManager. Tab-title lookup via core's getTab so the notifications carry human-readable context instead of raw UUIDs. routes/notifications.ts: - GET /notifications — current config (auth token redacted) plus the event-type catalog and defaults - PUT /notifications — partial update; auth token semantics are undefined=keep, ''=clear, otherwise replace - POST /notifications/test — sends a test notification with the current config (rejects if disabled or topic invalid) Tests: - new permission-manager.test.ts covers the onPromptAdded contract (one-fire-per-prompt, dedup across rebroadcasts, unsubscribe, listener throws don't break siblings) - existing routes.test.ts gets stubs for the new core notification exports so the @dispatch/core mock stays complete
Diffstat (limited to 'packaging/dispatch-api-wrapper.sh')
0 files changed, 0 insertions, 0 deletions