@react-grab/codex 0.1.0-beta.10 → 0.1.0-beta.11

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.
package/dist/cli.cjs CHANGED
@@ -4943,8 +4943,13 @@ ${context.content.join("\n\n")}`;
4943
4943
  signal
4944
4944
  })) {
4945
4945
  if (signal.aborted) break;
4946
+ const getBrowserMessageType = (messageType) => {
4947
+ if (messageType === "status") return "agent-status";
4948
+ if (messageType === "error") return "agent-error";
4949
+ return "agent-done";
4950
+ };
4946
4951
  sendToBrowser(browserSocket, {
4947
- type: message.type === "status" ? "agent-status" : message.type === "error" ? "agent-error" : "agent-done",
4952
+ type: getBrowserMessageType(message.type),
4948
4953
  agentId: handler.agentId,
4949
4954
  sessionId,
4950
4955
  content: message.content
@@ -5147,9 +5152,13 @@ ${context.content.join("\n\n")}`;
5147
5152
  } else if (message.type === "agent-status" || message.type === "agent-done" || message.type === "agent-error") {
5148
5153
  const messageQueue = sessionMessageQueues.get(message.sessionId);
5149
5154
  if (messageQueue) {
5150
- const mappedType = message.type === "agent-status" ? "status" : message.type === "agent-done" ? "done" : "error";
5155
+ const getQueueMessageType = (handlerMessageType) => {
5156
+ if (handlerMessageType === "agent-status") return "status";
5157
+ if (handlerMessageType === "agent-done") return "done";
5158
+ return "error";
5159
+ };
5151
5160
  messageQueue.push({
5152
- type: mappedType,
5161
+ type: getQueueMessageType(message.type),
5153
5162
  content: message.content ?? ""
5154
5163
  });
5155
5164
  if (message.type === "agent-done" || message.type === "agent-error") {
@@ -7847,7 +7856,7 @@ async function fkill(inputs, options = {}) {
7847
7856
  }
7848
7857
  }
7849
7858
  var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
7850
- var VERSION = "0.1.0-beta.9";
7859
+ var VERSION = "0.1.0-beta.10";
7851
7860
  var checkIfRelayServerIsRunning = async (port, token) => {
7852
7861
  try {
7853
7862
  const healthUrl = token ? `http://localhost:${port}/health?${RELAY_TOKEN_PARAM}=${encodeURIComponent(token)}` : `http://localhost:${port}/health`;
package/dist/cli.js CHANGED
@@ -4932,8 +4932,13 @@ ${context.content.join("\n\n")}`;
4932
4932
  signal
4933
4933
  })) {
4934
4934
  if (signal.aborted) break;
4935
+ const getBrowserMessageType = (messageType) => {
4936
+ if (messageType === "status") return "agent-status";
4937
+ if (messageType === "error") return "agent-error";
4938
+ return "agent-done";
4939
+ };
4935
4940
  sendToBrowser(browserSocket, {
4936
- type: message.type === "status" ? "agent-status" : message.type === "error" ? "agent-error" : "agent-done",
4941
+ type: getBrowserMessageType(message.type),
4937
4942
  agentId: handler.agentId,
4938
4943
  sessionId,
4939
4944
  content: message.content
@@ -5136,9 +5141,13 @@ ${context.content.join("\n\n")}`;
5136
5141
  } else if (message.type === "agent-status" || message.type === "agent-done" || message.type === "agent-error") {
5137
5142
  const messageQueue = sessionMessageQueues.get(message.sessionId);
5138
5143
  if (messageQueue) {
5139
- const mappedType = message.type === "agent-status" ? "status" : message.type === "agent-done" ? "done" : "error";
5144
+ const getQueueMessageType = (handlerMessageType) => {
5145
+ if (handlerMessageType === "agent-status") return "status";
5146
+ if (handlerMessageType === "agent-done") return "done";
5147
+ return "error";
5148
+ };
5140
5149
  messageQueue.push({
5141
- type: mappedType,
5150
+ type: getQueueMessageType(message.type),
5142
5151
  content: message.content ?? ""
5143
5152
  });
5144
5153
  if (message.type === "agent-done" || message.type === "agent-error") {
@@ -7836,7 +7845,7 @@ async function fkill(inputs, options = {}) {
7836
7845
  }
7837
7846
  }
7838
7847
  var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
7839
- var VERSION = "0.1.0-beta.9";
7848
+ var VERSION = "0.1.0-beta.10";
7840
7849
  var checkIfRelayServerIsRunning = async (port, token) => {
7841
7850
  try {
7842
7851
  const healthUrl = token ? `http://localhost:${port}/health?${RELAY_TOKEN_PARAM}=${encodeURIComponent(token)}` : `http://localhost:${port}/health`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-grab/codex",
3
- "version": "0.1.0-beta.10",
3
+ "version": "0.1.0-beta.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "react-grab-codex": "./dist/cli.cjs"
@@ -26,12 +26,12 @@
26
26
  "devDependencies": {
27
27
  "@types/node": "^22.10.7",
28
28
  "tsup": "^8.4.0",
29
- "@react-grab/utils": "0.1.0-beta.10"
29
+ "@react-grab/utils": "0.1.0-beta.11"
30
30
  },
31
31
  "dependencies": {
32
32
  "@openai/codex-sdk": "^0.66.0",
33
- "@react-grab/relay": "0.1.0-beta.10",
34
- "react-grab": "0.1.0-beta.10"
33
+ "react-grab": "0.1.0-beta.11",
34
+ "@react-grab/relay": "0.1.0-beta.11"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "tsup --watch",