@vectorx/agent-runtime 0.8.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,8 +51,10 @@ class AgentDriver {
51
51
  }
52
52
  sendMessageFunc(event, context) {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
+ var _a;
54
55
  try {
55
- const parsedEvent = schema_1.sendMessageInputSchema.passthrough().parse(event);
56
+ const payload = (_a = event === null || event === void 0 ? void 0 : event.params) !== null && _a !== void 0 ? _a : event;
57
+ const parsedEvent = schema_1.sendMessageInputSchema.passthrough().parse(payload);
56
58
  return yield this.agent.sendMessage(parsedEvent);
57
59
  }
58
60
  catch (e) {
@@ -110,9 +112,10 @@ class AgentDriver {
110
112
  }
111
113
  uploadFileFunc(event, context) {
112
114
  return __awaiter(this, void 0, void 0, function* () {
113
- var _a, _b;
115
+ var _a, _b, _c;
114
116
  try {
115
- return yield ((_b = (_a = this.agent).uploadFile) === null || _b === void 0 ? void 0 : _b.call(_a, event));
117
+ const payload = (_a = event === null || event === void 0 ? void 0 : event.params) !== null && _a !== void 0 ? _a : event;
118
+ return yield ((_c = (_b = this.agent).uploadFile) === null || _c === void 0 ? void 0 : _c.call(_b, payload));
116
119
  }
117
120
  catch (e) {
118
121
  return (0, integration_response_1.createIntegrationResponse)(500, codes_1.CODES.AGENT_API_ERROR, `Agent API 'uploadFile' failed, message: ${e}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorx/agent-runtime",
3
- "version": "0.8.0",
3
+ "version": "1.0.0",
4
4
  "description": "Cloud AI agent runtime",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  "node": ">=18.0.0"
21
21
  },
22
22
  "dependencies": {
23
- "@vectorx/ai-sdk": "0.8.0",
24
- "@vectorx/functions-framework": "0.8.0",
23
+ "@vectorx/ai-sdk": "1.0.0",
24
+ "@vectorx/functions-framework": "1.0.0",
25
25
  "form-data": "^4.0.0",
26
26
  "langfuse": "^3.38.4",
27
27
  "query-string": "^6.14.1",