replicas-cli 0.2.211 → 0.2.213

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.
Files changed (2) hide show
  1. package/dist/index.mjs +13 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -7603,6 +7603,7 @@ var SANDBOX_PATHS = {
7603
7603
  WORKSPACES_DIR: "/home/user/workspaces",
7604
7604
  REPLICAS_DIR: "/home/user/.replicas",
7605
7605
  REPLICAS_FILES_DIR: "/home/user/.replicas/files",
7606
+ REPOS_PREPARED_MARKER: "/home/user/.replicas/repos-prepared-for-engine-init",
7606
7607
  REPLICAS_RUNTIME_ENV_FILE: "/home/user/.replicas/runtime-env.sh"
7607
7608
  };
7608
7609
  var WORKSPACE_SIZES = ["small", "large"];
@@ -8932,7 +8933,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
8932
8933
  var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
8933
8934
 
8934
8935
  // ../shared/src/cli-version.ts
8935
- var CLI_VERSION = "0.2.211";
8936
+ var CLI_VERSION = "0.2.213";
8936
8937
 
8937
8938
  // ../shared/src/engine/environment.ts
8938
8939
  var DESKTOP_NOVNC_PORT = 6080;
@@ -9172,6 +9173,14 @@ function displayId(event, eventIndex, prefix) {
9172
9173
  const stableId = getPayloadString(event, USER_MESSAGE_ID_PAYLOAD_KEY) ?? getPayloadString(event, CODEX_ASP_ITEM_ID_PAYLOAD_KEY);
9173
9174
  return stableId ? `${prefix}-${stableId}` : `${prefix}-${event.timestamp}-${eventIndex}`;
9174
9175
  }
9176
+ function userMessageImages(value) {
9177
+ if (!Array.isArray(value)) return void 0;
9178
+ const images = value.filter((item) => {
9179
+ if (!isRecord(item)) return false;
9180
+ return item.type === "image" && typeof item.mediaType === "string" && typeof item.data === "string";
9181
+ });
9182
+ return images.length > 0 ? images : void 0;
9183
+ }
9175
9184
  function parseShellOutput(raw) {
9176
9185
  const exitCodeMatch = raw.match(/^Exit code: (\d+)/m) || raw.match(/Process exited with code (\d+)/);
9177
9186
  const exitCode = exitCodeMatch ? parseInt(exitCodeMatch[1], 10) : 0;
@@ -9255,10 +9264,12 @@ function parseCodexEvents(events) {
9255
9264
  return;
9256
9265
  }
9257
9266
  if (event.type === "event_msg" && event.payload?.type === "user_message") {
9267
+ const message = getPayloadString(event, "message");
9258
9268
  messages.push({
9259
9269
  id: displayId(event, eventIndex, "user"),
9260
9270
  type: "user",
9261
- content: event.payload.message || "",
9271
+ content: message ?? "",
9272
+ images: userMessageImages(event.payload.images),
9262
9273
  timestamp: event.timestamp
9263
9274
  });
9264
9275
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.211",
3
+ "version": "0.2.213",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {