diff --git a/schema/ext.keboola.in-platform-chat.json b/schema/ext.keboola.in-platform-chat.json new file mode 100644 index 0000000..32f8869 --- /dev/null +++ b/schema/ext.keboola.in-platform-chat.json @@ -0,0 +1,77 @@ +{ + "$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.in-platform-chat.http.json b/tests/events/ext.keboola.in-platform-chat.http.json new file mode 100644 index 0000000..7f44532 --- /dev/null +++ b/tests/events/ext.keboola.in-platform-chat.http.json @@ -0,0 +1,53 @@ +{ + "id": 2234567891, + "event": "ext.keboola.in-platform-chat", + "component": "keboola.in-platform-chat", + "message": "Test message for in-platform-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": "in-platform-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "in-platform-chat-local", + "sessionId": "2234567891", + "conversationId": "conv-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/2234567891", + "attachments": [] +} + + + + diff --git a/tests/events/ext.keboola.in-platform-chat.json b/tests/events/ext.keboola.in-platform-chat.json new file mode 100644 index 0000000..b3183f0 --- /dev/null +++ b/tests/events/ext.keboola.in-platform-chat.json @@ -0,0 +1,51 @@ +{ + "id": 2234567893, + "event": "ext.keboola.in-platform-chat", + "component": "keboola.in-platform-chat", + "message": "Test message for in-platform-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": "in-platform-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "in-platform-chat-local", + "sessionId": "2234567893", + "conversationId": "conv-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/2234567893", + "attachments": [] +} + + diff --git a/tests/events/ext.keboola.in-platform-chat.no-transport.json b/tests/events/ext.keboola.in-platform-chat.no-transport.json new file mode 100644 index 0000000..4107a56 --- /dev/null +++ b/tests/events/ext.keboola.in-platform-chat.no-transport.json @@ -0,0 +1,52 @@ +{ + "id": 2234567900, + "event": "ext.keboola.in-platform-chat", + "component": "keboola.in-platform-chat", + "message": "Test message for in-platform-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": "in-platform-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "in-platform-chat-local", + "sessionId": "2234567900", + "conversationId": "conv-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/2234567900", + "attachments": [] +} + + + + diff --git a/tests/events/ext.keboola.in-platform-chat.sse.json b/tests/events/ext.keboola.in-platform-chat.sse.json new file mode 100644 index 0000000..068939b --- /dev/null +++ b/tests/events/ext.keboola.in-platform-chat.sse.json @@ -0,0 +1,53 @@ +{ + "id": 2234567892, + "event": "ext.keboola.in-platform-chat", + "component": "keboola.in-platform-chat", + "message": "Test message for in-platform-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": "in-platform-chat-test-suite", + "apiVersion": "v1" + }, + "mcpServerContext": { + "appEnv": "remote", + "version": "1.0.0", + "userAgent": "in-platform-chat-local", + "sessionId": "2234567892", + "conversationId": "conv-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/2234567892", + "attachments": [] +} + + + +