replicas-engine 0.1.39 → 0.1.40

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/src/index.js CHANGED
@@ -732,6 +732,7 @@ var DEFAULT_CHAT_TITLES = {
732
732
  claude: "Claude Code",
733
733
  codex: "Codex"
734
734
  };
735
+ var IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp"];
735
736
 
736
737
  // src/services/replicas-config.ts
737
738
  var execAsync = promisify(exec);
@@ -1087,7 +1088,7 @@ function isJsonlEvent(value) {
1087
1088
  if (!isRecord3(value)) {
1088
1089
  return false;
1089
1090
  }
1090
- return typeof value.timestamp === "string" && typeof value.type === "string" && "payload" in value;
1091
+ return typeof value.timestamp === "string" && typeof value.type === "string" && isRecord3(value.payload);
1091
1092
  }
1092
1093
  function parseJsonlEvents(lines) {
1093
1094
  const events = [];
@@ -1488,9 +1489,9 @@ function convertCodexEvent(event, linearSessionId) {
1488
1489
  }
1489
1490
 
1490
1491
  // src/utils/image-utils.ts
1491
- var IMAGE_MEDIA_TYPES = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/gif", "image/webp"]);
1492
+ var IMAGE_MEDIA_TYPES2 = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/gif", "image/webp"]);
1492
1493
  function isImageMediaType(value) {
1493
- return IMAGE_MEDIA_TYPES.has(value);
1494
+ return IMAGE_MEDIA_TYPES2.has(value);
1494
1495
  }
1495
1496
  function inferMediaType(url, contentType) {
1496
1497
  if (contentType) {
@@ -2113,7 +2114,7 @@ function isJsonlEvent2(value) {
2113
2114
  if (!isRecord4(value)) {
2114
2115
  return false;
2115
2116
  }
2116
- return typeof value.timestamp === "string" && typeof value.type === "string" && "payload" in value;
2117
+ return typeof value.timestamp === "string" && typeof value.type === "string" && isRecord4(value.payload);
2117
2118
  }
2118
2119
  function sleep(ms) {
2119
2120
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -2939,8 +2940,7 @@ var createChatSchema = z.object({
2939
2940
  title: z.string().min(1).optional(),
2940
2941
  repoScope: z.union([z.literal("all"), z.array(z.string().min(1))]).optional()
2941
2942
  });
2942
- var imageMediaTypes = ["image/png", "image/jpeg", "image/gif", "image/webp"];
2943
- var imageMediaTypeSchema = z.enum(imageMediaTypes);
2943
+ var imageMediaTypeSchema = z.enum(IMAGE_MEDIA_TYPES);
2944
2944
  var sendMessageSchema = z.object({
2945
2945
  message: z.string().min(1),
2946
2946
  model: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -27,13 +27,13 @@
27
27
  "author": "Replicas",
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@anthropic-ai/claude-agent-sdk": "^0.1.30",
30
+ "@anthropic-ai/claude-agent-sdk": "^0.2.41",
31
31
  "@hono/node-server": "^1.19.5",
32
- "@openai/codex-sdk": "^0.88.0",
32
+ "@openai/codex-sdk": "^0.101.0",
33
33
  "dotenv": "^17.2.3",
34
34
  "hono": "^4.10.3",
35
35
  "smol-toml": "^1.6.0",
36
- "zod": "^3.25.0"
36
+ "zod": "^4.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^20.11.17",