| 1 | import { z, IntegrationDefinition } from '@botpress/sdk';
|
| 2 | import { integrationName } from './package.json';
|
| 3 |
|
| 4 | export default new IntegrationDefinition({
|
| 5 | name: integrationName,
|
| 6 | version: '0.1.0',
|
| 7 | title: 'OpenClasp',
|
| 8 | description: 'Direct A2A runtime connectivity with OpenClasp assurance and identity.',
|
| 9 | readme: 'hub.md',
|
| 10 | icon: 'icon.svg',
|
| 11 | configuration: {
|
| 12 | schema: z.object({
|
| 13 | openClaspAgentToken: z
|
| 14 | .string()
|
| 15 | .min(20)
|
| 16 | .secret()
|
| 17 | .title('OpenClasp agent token')
|
| 18 | .describe('The oc_at_ token created for this exact agent in OpenClasp.'),
|
| 19 | openClaspUrl: z.string().url().default('https://openclasp.vercel.app').title('OpenClasp URL'),
|
| 20 | }),
|
| 21 | },
|
| 22 | channels: {
|
| 23 | a2a: {
|
| 24 | title: 'Agent-to-agent conversation',
|
| 25 | description: 'A direct A2A conversation authorized by OpenClasp.',
|
| 26 | conversation: {
|
| 27 | tags: {
|
| 28 | interactionId: {
|
| 29 | title: 'OpenClasp interaction ID',
|
| 30 | description: 'Stable signed interaction and Botpress conversation mapping.',
|
| 31 | },
|
| 32 | },
|
| 33 | },
|
| 34 | messages: { text: { schema: z.object({ text: z.string() }) } },
|
| 35 | },
|
| 36 | },
|
| 37 | user: {
|
| 38 | tags: {
|
| 39 | agentId: { title: 'Peer agent ID', description: 'OpenClasp peer identity.' },
|
| 40 | },
|
| 41 | },
|
| 42 | states: {
|
| 43 | runtime: {
|
| 44 | type: 'integration',
|
| 45 | schema: z.object({
|
| 46 | agentId: z.string(),
|
| 47 | sessionsJson: z.string(),
|
| 48 | offersJson: z.string(),
|
| 49 | }),
|
| 50 | },
|
| 51 | },
|
| 52 | });
|