feat(a2a): added a2a protocol (#2784)

* feat(a2a): a2a added

* feat(a2a): added a2a protocol

* remove migrations

* readd migrations

* consolidated permissions utils

* consolidated tag-input, output select -> combobox, added tags for A2A

* cleanup up utils, share same deployed state as other tabs

* ack PR comments

* more

* updated code examples

* solely rely on tanstack query to vend data and invalidate query key's, remove custom caching

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
This commit is contained in:
Waleed
2026-01-13 11:43:02 -08:00
committed by GitHub
parent 40a066f39c
commit 2bc403972c
70 changed files with 17887 additions and 481 deletions

View File

@@ -0,0 +1,33 @@
import type { TaskState } from '@a2a-js/sdk'
import { createLogger } from '@sim/logger'
import { task } from '@trigger.dev/sdk'
import { deliverPushNotification } from '@/lib/a2a/push-notifications'
const logger = createLogger('A2APushNotificationDelivery')
export interface A2APushNotificationParams {
taskId: string
state: TaskState
}
export const a2aPushNotificationTask = task({
id: 'a2a-push-notification-delivery',
retry: {
maxAttempts: 5,
minTimeoutInMs: 1000,
maxTimeoutInMs: 60000,
factor: 2,
},
run: async (params: A2APushNotificationParams) => {
logger.info('Delivering A2A push notification', params)
const success = await deliverPushNotification(params.taskId, params.state)
if (!success) {
throw new Error(`Failed to deliver push notification for task ${params.taskId}`)
}
logger.info('A2A push notification delivered successfully', params)
return { success: true, taskId: params.taskId, state: params.state }
},
})