replicas-engine 0.1.1186 → 0.1.1187

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.
@@ -8,9 +8,9 @@ import {
8
8
  listRunningCodexModels,
9
9
  restartCodexAspHost,
10
10
  restartCodexAspHostIfRunning
11
- } from "./chunk-KLHDCQAK.js";
11
+ } from "./chunk-RKL75ZH6.js";
12
12
  import "./chunk-VXPWAQR2.js";
13
- import "./chunk-WIEXE5ZC.js";
13
+ import "./chunk-JWABRKQK.js";
14
14
  import "./chunk-R6I3LT27.js";
15
15
  import "./chunk-UZSNFLDQ.js";
16
16
  import "./chunk-4T2K6OBK.js";
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  AspClient
6
- } from "./chunk-WIEXE5ZC.js";
6
+ } from "./chunk-JWABRKQK.js";
7
7
  import {
8
8
  ASTER_BASE_URL,
9
9
  ASTER_PROVIDER,
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
240
240
  if (method === "foundry") return "azure";
241
241
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
242
242
  }
243
- var ENGINE_PACKAGE_VERSION = "0.1.1186";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1187";
244
244
  var INITIALIZE_METHOD = "initialize";
245
245
  var INITIALIZED_NOTIFICATION = "initialized";
246
246
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  AppServerProcess,
16
16
  buildCodexAgentEnv
17
- } from "./chunk-WIEXE5ZC.js";
17
+ } from "./chunk-JWABRKQK.js";
18
18
  import {
19
19
  SUBPROCESS_MAX_BUFFER,
20
20
  execFileAsync
@@ -291,7 +291,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
291
291
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
292
292
  await this.applyCredentialsResponse(data);
293
293
  setAgentCredentialSnapshot("codex", data);
294
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-J4AUGWDZ.js");
294
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-BSMKPH5N.js");
295
295
  await restartCodexAspHostIfRunning2();
296
296
  });
297
297
  await this.start(true);
@@ -313,7 +313,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
313
313
  const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
314
314
  await this.applyCredentialsResponse(data);
315
315
  if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
316
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-J4AUGWDZ.js");
316
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-BSMKPH5N.js");
317
317
  await restartCodexAspHostIfRunning2();
318
318
  }
319
319
  setAgentCredentialSnapshot("codex", data);
@@ -1274,13 +1274,15 @@ async function normalizeImages(images) {
1274
1274
  if (image.source.type === "base64") {
1275
1275
  normalized.push({
1276
1276
  type: "image",
1277
- source: image.source
1277
+ source: image.source,
1278
+ label: image.label
1278
1279
  });
1279
1280
  } else if (image.source.type === "url") {
1280
1281
  const base64Source = await fetchImageAsBase64(image.source.url);
1281
1282
  normalized.push({
1282
1283
  type: "image",
1283
- source: base64Source
1284
+ source: base64Source,
1285
+ label: image.label
1284
1286
  });
1285
1287
  }
1286
1288
  }
@@ -1829,10 +1831,10 @@ async function buildTurnInput(request) {
1829
1831
  }
1830
1832
  const normalizedImages = await normalizeImages(request.images);
1831
1833
  const tempImagePaths = await saveNormalizedImagesToTempFiles(normalizedImages);
1832
- input.push(...tempImagePaths.map((path2) => ({
1833
- type: "localImage",
1834
- path: path2
1835
- })));
1834
+ input.push(...tempImagePaths.flatMap((path2, index) => {
1835
+ const label = normalizedImages[index].label;
1836
+ return [...label ? [{ type: "text", text: label, text_elements: [] }] : [], { type: "localImage", path: path2 }];
1837
+ }));
1836
1838
  return { input, tempImagePaths };
1837
1839
  }
1838
1840
  async function buildTurnStartParams(threadId, request, serviceTier) {
@@ -13,11 +13,11 @@ import {
13
13
  recoverCompletedTurn,
14
14
  spawnMuseMsp,
15
15
  startMuseSession
16
- } from "./chunk-NQOV2YOZ.js";
16
+ } from "./chunk-3N6KIWSW.js";
17
17
  import {
18
18
  AppServerProcess,
19
19
  buildCodexAgentEnv
20
- } from "./chunk-WIEXE5ZC.js";
20
+ } from "./chunk-JWABRKQK.js";
21
21
  import "./chunk-R6I3LT27.js";
22
22
  import {
23
23
  AGENT,
package/dist/src/index.js CHANGED
@@ -64,7 +64,7 @@ import {
64
64
  spawnMuseMsp,
65
65
  startMuseSession,
66
66
  uuidV7
67
- } from "./chunk-NQOV2YOZ.js";
67
+ } from "./chunk-3N6KIWSW.js";
68
68
  import {
69
69
  publishedPullRequestUrls
70
70
  } from "./chunk-NIT22CZW.js";
@@ -139,7 +139,7 @@ import {
139
139
  timestampFromSeconds,
140
140
  upsertCredentialFileLines,
141
141
  writeSecureCredentialFile
142
- } from "./chunk-KLHDCQAK.js";
142
+ } from "./chunk-RKL75ZH6.js";
143
143
  import {
144
144
  ENGINE_ENV,
145
145
  monolithRequest,
@@ -151,7 +151,7 @@ import {
151
151
  } from "./chunk-VXPWAQR2.js";
152
152
  import {
153
153
  getCodexModelProvider
154
- } from "./chunk-WIEXE5ZC.js";
154
+ } from "./chunk-JWABRKQK.js";
155
155
  import {
156
156
  SUBPROCESS_MAX_BUFFER,
157
157
  execAsync,
@@ -13260,6 +13260,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
13260
13260
  if (images && images.length > 0) {
13261
13261
  const normalizedImages = await normalizeImages(images);
13262
13262
  for (const image of normalizedImages) {
13263
+ if (image.label) content.push({ type: "text", text: image.label });
13263
13264
  content.push({
13264
13265
  type: "image",
13265
13266
  source: {
@@ -15912,6 +15913,7 @@ ${typeof pending.subject.command === "string" ? pending.subject.command : JSON.s
15912
15913
  const input = [{ type: "text", text }];
15913
15914
  for (const image of images ?? []) {
15914
15915
  if (image.source.type !== "base64") throw new Error("Muse requires images to be base64 encoded.");
15916
+ if (image.label) input.push({ type: "text", text: image.label });
15915
15917
  input.push({ type: "image", mediaType: image.source.media_type, base64Data: image.source.data });
15916
15918
  }
15917
15919
  return input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.1186",
3
+ "version": "0.1.1187",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",