replicas-engine 0.1.907 → 0.1.908

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.
@@ -5,9 +5,9 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-QPDXHNH6.js";
8
+ } from "./chunk-J4YMMWVX.js";
9
9
  import "./chunk-7R7AQ77Z.js";
10
- import "./chunk-6SXCGH4F.js";
10
+ import "./chunk-XALZL5AE.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
12
  import "./chunk-T4HLIO43.js";
13
13
  import "./chunk-VEQXQN22.js";
@@ -11,7 +11,7 @@ import {
11
11
  SUBPROCESS_MAX_BUFFER,
12
12
  buildCodexAgentEnv,
13
13
  execFileAsync
14
- } from "./chunk-6SXCGH4F.js";
14
+ } from "./chunk-XALZL5AE.js";
15
15
  import {
16
16
  isRecord
17
17
  } from "./chunk-UZSNFLDQ.js";
@@ -255,7 +255,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
255
255
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
256
256
  await this.applyCredentialsResponse(data);
257
257
  if (data.scope) setAgentCredentialSnapshot("codex", { method: data.type, scope: data.scope, revision: data.revision });
258
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-2P6HEMN5.js");
258
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-NQESGIUW.js");
259
259
  await restartCodexAspHostIfRunning2();
260
260
  });
261
261
  await this.start(true);
@@ -275,7 +275,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
275
275
  await this.applyCredentialUpdate(generation, async () => {
276
276
  await this.applyCredentialsResponse(data);
277
277
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
278
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-2P6HEMN5.js");
278
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-NQESGIUW.js");
279
279
  await restartCodexAspHostIfRunning2();
280
280
  }
281
281
  if (data.scope) {
@@ -245,7 +245,7 @@ function getCodexModelProvider(method) {
245
245
  if (method === "foundry") return "azure";
246
246
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
247
247
  }
248
- var ENGINE_PACKAGE_VERSION = "0.1.907";
248
+ var ENGINE_PACKAGE_VERSION = "0.1.908";
249
249
  var INITIALIZE_METHOD = "initialize";
250
250
  var INITIALIZED_NOTIFICATION = "initialized";
251
251
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  AppServerProcess,
10
10
  buildCodexAgentEnv
11
- } from "./chunk-6SXCGH4F.js";
11
+ } from "./chunk-XALZL5AE.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
package/dist/src/index.js CHANGED
@@ -137,7 +137,7 @@ import {
137
137
  refreshDelayMs,
138
138
  restartCodexAspHost,
139
139
  routineRefreshExclusions
140
- } from "./chunk-QPDXHNH6.js";
140
+ } from "./chunk-J4YMMWVX.js";
141
141
  import {
142
142
  ENGINE_ENV,
143
143
  IS_WARMING_MODE,
@@ -151,7 +151,7 @@ import {
151
151
  execAsync,
152
152
  execFileAsync,
153
153
  getCodexModelProvider
154
- } from "./chunk-6SXCGH4F.js";
154
+ } from "./chunk-XALZL5AE.js";
155
155
  import {
156
156
  isRecord as isRecord2
157
157
  } from "./chunk-UZSNFLDQ.js";
@@ -62509,6 +62509,12 @@ var ChatService = class {
62509
62509
  console.error("[ChatService] Failed to upload chat transcript:", { chatId, err });
62510
62510
  });
62511
62511
  }
62512
+ persistTurnArtifacts(chat) {
62513
+ this.uploadChatTranscript(chat);
62514
+ flushAllCanvasItems().catch((err) => {
62515
+ console.error("[ChatService] Failed to upload canvas items:", { chatId: chat.persisted.id, err });
62516
+ });
62517
+ }
62512
62518
  async flushAllChatTranscripts() {
62513
62519
  return flushAllChatTranscripts(new Map(
62514
62520
  [...this.chats.entries()].map(([chatId, chat]) => [chatId, this.toTranscriptSource(chat)])
@@ -62794,6 +62800,9 @@ var ChatService = class {
62794
62800
  }).catch(() => {
62795
62801
  });
62796
62802
  }
62803
+ if (event.type === "replicas-tool-input-request") {
62804
+ this.persistTurnArtifacts(chat);
62805
+ }
62797
62806
  }
62798
62807
  handleProcessingStopped(chatId) {
62799
62808
  const chat = this.getRuntimeChat(chatId);
@@ -62823,10 +62832,7 @@ var ChatService = class {
62823
62832
  const processing = chat.provider.getQueue().length > 0 || (chat.provider.hasActiveBackgroundTasks?.() ?? false);
62824
62833
  const exhaustion = chat.quotaExhaustion;
62825
62834
  chat.quotaExhaustion = null;
62826
- this.uploadChatTranscript(chat);
62827
- flushAllCanvasItems().catch((err) => {
62828
- console.error("[ChatService] Failed to upload canvas items:", { chatId, err });
62829
- });
62835
+ this.persistTurnArtifacts(chat);
62830
62836
  let forked = false;
62831
62837
  if (exhaustion) {
62832
62838
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.907",
3
+ "version": "0.1.908",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",