From e79964af38f0c00d79ed6cf3ab57f17ed62bfed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Va=C5=A1ko?= Date: Thu, 16 Oct 2025 10:57:03 +0200 Subject: [PATCH] feat: Add RO chat event schema --- schema/ext.keboola.ro-chat.json | 78 +++++++++++++++++++ tests/events/ext.keboola.ro-chat.http.json | 53 +++++++++++++ tests/events/ext.keboola.ro-chat.json | 45 +++++++++++ .../ext.keboola.ro-chat.no-transport.json | 52 +++++++++++++ tests/events/ext.keboola.ro-chat.sse.json | 53 +++++++++++++ 5 files changed, 281 insertions(+) create mode 100644 schema/ext.keboola.ro-chat.json create mode 100644 tests/events/ext.keboola.ro-chat.http.json create mode 100644 tests/events/ext.keboola.ro-chat.json create mode 100644 tests/events/ext.keboola.ro-chat.no-transport.json create mode 100644 tests/events/ext.keboola.ro-chat.sse.json diff --git a/schema/ext.keboola.ro-chat.json b/schema/ext.keboola.ro-chat.json new file mode 100644 index 0000000..4938ed0 --- /dev/null +++ b/schema/ext.keboola.ro-chat.json @@ -0,0 +1,78 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "mcpServerContext": { + "type": "object", + "properties": { + "appEnv": { + "type": "string" + }, + "version": { + "type": "string" + }, + "userAgent": { + "type": "string" + }, + "sessionId": { + "type": "string" + }, + "conversationId": { + "type": "string" + }, + "serverTransport": { + "type": "string", + "enum": [ + "stdio", + "http", + "sse", + "streamable-http", + "http-compat", + "NA" + ] + } + }, + "required": [ + "appEnv", + "version", + "userAgent", + "sessionId", + "conversationId" + ] + }, + "message": { + "type": "string" + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "arguments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "value": { "type": "string" } + }, + "required": [ + "key", + "value" + ] + } + } + }, + "required": [ + "name", + "arguments" + ] + } + }, + "required": [ + "mcpServerContext", + "message", + "tool" + ] +} diff --git a/tests/events/ext.keboola.ro-chat.http.json b/tests/events/ext.keboola.ro-chat.http.json new file mode 100644 index 0000000..53cd489 --- /dev/null +++ b/tests/events/ext.keboola.ro-chat.http.json @@ -0,0 +1,53 @@ +{ + "id": 3234567891, + "event": "ext.keboola.ro-chat", + "component": "keboola.ro-chat", + "message": "Test message for ro-chat (http)", + "description": "", + "type": "info", + "runId": null, + "created": "2024-07-15T10:00:00+0200", + "configurationId": null, + "objectId": "", + "objectName": "", + "objectType": "", + "context": { + "remoteAddr": "127.0.0.1", + "httpReferer": null, + "httpUserAgent": "ro-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "ro-chat-local", + "sessionId": "3234567891", + "conversationId": "conv-ro-001", + "serverTransport": "http" + }, + "tool": { + "name": "send-message", + "arguments": [ + { + "key": "channel", + "value": "workspace" + }, + { + "key": "priority", + "value": "normal" + } + ] + }, + "performance": {}, + "token": { + "id": 98765, + "name": "test-user@keboola.com" + }, + "idBranch": 67890, + "uri": "https://connection.keboola.com/v2/storage/events/3234567891", + "attachments": [] +} + + + + diff --git a/tests/events/ext.keboola.ro-chat.json b/tests/events/ext.keboola.ro-chat.json new file mode 100644 index 0000000..37ccb5c --- /dev/null +++ b/tests/events/ext.keboola.ro-chat.json @@ -0,0 +1,45 @@ +{ + "id": 3234567893, + "event": "ext.keboola.ro-chat", + "component": "keboola.ro-chat", + "message": "Test message for ro-chat (base)", + "description": "", + "type": "info", + "runId": null, + "created": "2024-07-15T10:00:00+0200", + "configurationId": null, + "objectId": "", + "objectName": "", + "objectType": "", + "context": { + "remoteAddr": "127.0.0.1", + "httpReferer": null, + "httpUserAgent": "ro-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "ro-chat-local", + "sessionId": "3234567893", + "conversationId": "conv-ro-001", + "serverTransport": "http" + }, + "tool": { + "name": "send-message", + "arguments": [ + { "key": "channel", "value": "workspace" }, + { "key": "priority", "value": "normal" } + ] + }, + "performance": {}, + "token": { + "id": 98765, + "name": "test-user@keboola.com" + }, + "idBranch": 67890, + "uri": "https://connection.keboola.com/v2/storage/events/3234567893", + "attachments": [] +} + + diff --git a/tests/events/ext.keboola.ro-chat.no-transport.json b/tests/events/ext.keboola.ro-chat.no-transport.json new file mode 100644 index 0000000..46f8c34 --- /dev/null +++ b/tests/events/ext.keboola.ro-chat.no-transport.json @@ -0,0 +1,52 @@ +{ + "id": 3234567900, + "event": "ext.keboola.ro-chat", + "component": "keboola.ro-chat", + "message": "Test message for ro-chat (no serverTransport)", + "description": "", + "type": "info", + "runId": null, + "created": "2024-07-15T10:00:00+0200", + "configurationId": null, + "objectId": "", + "objectName": "", + "objectType": "", + "context": { + "remoteAddr": "127.0.0.1", + "httpReferer": null, + "httpUserAgent": "ro-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "ro-chat-local", + "sessionId": "3234567900", + "conversationId": "conv-ro-001" + }, + "tool": { + "name": "send-message", + "arguments": [ + { + "key": "channel", + "value": "workspace" + }, + { + "key": "priority", + "value": "normal" + } + ] + }, + "performance": {}, + "token": { + "id": 98765, + "name": "test-user@keboola.com" + }, + "idBranch": 67890, + "uri": "https://connection.keboola.com/v2/storage/events/3234567900", + "attachments": [] +} + + + + diff --git a/tests/events/ext.keboola.ro-chat.sse.json b/tests/events/ext.keboola.ro-chat.sse.json new file mode 100644 index 0000000..526893f --- /dev/null +++ b/tests/events/ext.keboola.ro-chat.sse.json @@ -0,0 +1,53 @@ +{ + "id": 3234567892, + "event": "ext.keboola.ro-chat", + "component": "keboola.ro-chat", + "message": "Test message for ro-chat (sse)", + "description": "", + "type": "info", + "runId": null, + "created": "2024-07-15T10:00:00+0200", + "configurationId": null, + "objectId": "", + "objectName": "", + "objectType": "", + "context": { + "remoteAddr": "127.0.0.1", + "httpReferer": null, + "httpUserAgent": "ro-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "ro-chat-local", + "sessionId": "3234567892", + "conversationId": "conv-ro-001", + "serverTransport": "sse" + }, + "tool": { + "name": "send-message", + "arguments": [ + { + "key": "channel", + "value": "workspace" + }, + { + "key": "priority", + "value": "normal" + } + ] + }, + "performance": {}, + "token": { + "id": 98765, + "name": "test-user@keboola.com" + }, + "idBranch": 67890, + "uri": "https://connection.keboola.com/v2/storage/events/3234567892", + "attachments": [] +} + + + +