crewx 0.8.8-rc.5 → 0.8.8-rc.6

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.
@@ -14,6 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.WorkspaceEventsController = void 0;
16
16
  const common_1 = require("@nestjs/common");
17
+ const throttler_1 = require("@nestjs/throttler");
17
18
  const rxjs_1 = require("rxjs");
18
19
  const operators_1 = require("rxjs/operators");
19
20
  const workspace_event_bus_js_1 = require("./workspace-event.bus.js");
@@ -33,6 +34,7 @@ let WorkspaceEventsController = class WorkspaceEventsController {
33
34
  };
34
35
  exports.WorkspaceEventsController = WorkspaceEventsController;
35
36
  __decorate([
37
+ (0, throttler_1.SkipThrottle)(),
36
38
  (0, common_1.Sse)(),
37
39
  __param(0, (0, workspace_decorator_js_1.Workspace)()),
38
40
  __metadata("design:type", Function),
@@ -43,6 +43,8 @@ class SendMessageDto {
43
43
  title;
44
44
  mode = 'query';
45
45
  images;
46
+ context;
47
+ browserSessionId;
46
48
  }
47
49
  exports.SendMessageDto = SendMessageDto;
48
50
  __decorate([
@@ -76,3 +78,15 @@ __decorate([
76
78
  (0, swagger_1.ApiPropertyOptional)({ description: 'Attached images (base64)', type: [ImageAttachmentDto] }),
77
79
  __metadata("design:type", Array)
78
80
  ], SendMessageDto.prototype, "images", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.IsString)(),
83
+ (0, class_validator_1.IsOptional)(),
84
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Provider-agnostic context prepended to the message' }),
85
+ __metadata("design:type", String)
86
+ ], SendMessageDto.prototype, "context", void 0);
87
+ __decorate([
88
+ (0, class_validator_1.IsString)(),
89
+ (0, class_validator_1.IsOptional)(),
90
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Chrome X browser MCP session id for reverse browser-tool calls' }),
91
+ __metadata("design:type", String)
92
+ ], SendMessageDto.prototype, "browserSessionId", void 0);
@@ -49,7 +49,7 @@ let MessageController = class MessageController {
49
49
  }
50
50
  // MSG.SEND: Send message to thread (spawns crewx CLI in background)
51
51
  async sendMessage(threadId, body, ws) {
52
- const data = await this.messageService.sendMessage(threadId, body.message, body.agent, body.mode, body.title, ws.id, body.images);
52
+ const data = await this.messageService.sendMessage(threadId, body.message, body.agent, body.mode, body.title, ws.id, body.images, body.context, body.browserSessionId);
53
53
  return { success: true, data };
54
54
  }
55
55
  serveAttachment(threadId, filename, res) {
@@ -101,7 +101,7 @@ let MessageService = MessageService_1 = class MessageService {
101
101
  };
102
102
  }
103
103
  // MSG.SEND: Send message — fire crewx SDK; ConversationPlugin persists threads row
104
- async sendMessage(threadId, message, agent, mode = 'query', title, workspaceId, images) {
104
+ async sendMessage(threadId, message, agent, mode = 'query', title, workspaceId, images, context, browserSessionId) {
105
105
  this.validateId(threadId);
106
106
  if (!message || !message.trim()) {
107
107
  throw new common_1.BadRequestException('message is required');
@@ -127,12 +127,20 @@ let MessageService = MessageService_1 = class MessageService {
127
127
  .join('\n');
128
128
  finalMessage = `${message}\n${tags}`;
129
129
  }
130
+ const trimmedContext = context?.trim();
131
+ if (trimmedContext) {
132
+ finalMessage = `<chrome_x_context>\n${trimmedContext}\n</chrome_x_context>\n\n${finalMessage}`;
133
+ }
130
134
  const taskId = (0, sdk_1.generateId)('tsk');
135
+ const metadata = { thread: threadId, parentTaskId: null };
136
+ if (browserSessionId?.trim()) {
137
+ metadata.browserSessionId = browserSessionId.trim();
138
+ }
131
139
  const sdkOptions = {
132
140
  threadId,
133
141
  taskId,
134
142
  platform: 'cli',
135
- metadata: { thread: threadId, parentTaskId: null },
143
+ metadata,
136
144
  cwd: (0, workspace_context_store_js_1.getWorkspacePath)(),
137
145
  };
138
146
  const crewx = await this.crewxPool.getForCurrentRequest();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crewx",
3
- "version": "0.8.8-rc.5",
3
+ "version": "0.8.8-rc.6",
4
4
  "description": "CrewX — AI agent team dashboard with Electron UI and CLI (Web + Electron + Global CLI)",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -66,7 +66,7 @@
66
66
  "reflect-metadata": "0.2.2",
67
67
  "remark-parse": "11.0.0",
68
68
  "remark-stringify": "11.0.0",
69
- "rxjs": "7.8.1",
69
+ "rxjs": "^7.8.1",
70
70
  "swagger-ui-express": "5.0.1",
71
71
  "unified": "11.0.5",
72
72
  "unist-util-visit": "5.0.0",
@@ -74,15 +74,15 @@
74
74
  "wink-nlp-utils": "2.1.0",
75
75
  "yargs": "17.7.0",
76
76
  "zod": "3.25.76",
77
- "@crewx/cli": "0.8.8-rc.5",
78
- "@crewx/cron": "0.1.10-rc.4",
79
- "@crewx/doc": "0.1.8",
80
- "@crewx/knowledge-core": "0.1.17",
77
+ "@crewx/cron": "0.1.10-rc.5",
81
78
  "@crewx/memory": "0.1.22",
82
- "@crewx/sdk": "0.8.8-rc.5",
79
+ "@crewx/cli": "0.8.8-rc.6",
80
+ "@crewx/knowledge-core": "0.1.17",
81
+ "@crewx/doc": "0.1.8",
83
82
  "@crewx/search": "0.1.9",
84
- "@crewx/shared": "0.0.5",
83
+ "@crewx/sdk": "0.8.8-rc.6",
85
84
  "@crewx/skill": "0.1.20",
85
+ "@crewx/shared": "0.0.5",
86
86
  "@crewx/wbs": "0.1.9",
87
87
  "@crewx/workflow": "0.3.21"
88
88
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/cli",
3
- "version": "0.8.8-rc.5",
3
+ "version": "0.8.8-rc.6",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"