replicas-engine 0.1.900 → 0.1.902

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,11 +5,11 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-3GLNVNYT.js";
9
- import "./chunk-JFFK7UF4.js";
10
- import "./chunk-QYKG3FKT.js";
8
+ } from "./chunk-O6UHVK4J.js";
9
+ import "./chunk-OBD4D4AW.js";
10
+ import "./chunk-KA7C3C4U.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-DT3KHGNG.js";
12
+ import "./chunk-2ROQAUB6.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -400,8 +400,8 @@ var CLAUDE_MODEL_MIN_SANDBOX_IMAGE = {
400
400
  };
401
401
  var CODEX_MODEL_MIN_SANDBOX_IMAGE = {
402
402
  [GPT_6_ASTRA_MODEL]: "replicas-sandbox-2026-09-04-v7",
403
- [GPT_6_SOL_MODEL]: "replicas-sandbox-2026-09-22-v5",
404
- [GPT_6_LUNA_MODEL]: "replicas-sandbox-2026-09-22-v5"
403
+ [GPT_6_SOL_MODEL]: "replicas-sandbox-2026-09-24-v1",
404
+ [GPT_6_LUNA_MODEL]: "replicas-sandbox-2026-09-24-v1"
405
405
  };
406
406
  var MODEL_LABELS = {
407
407
  fable: "Fable 5.1",
@@ -8109,6 +8109,7 @@ function normalizeChatTranscriptMetadata(value) {
8109
8109
  relayBaseProvider,
8110
8110
  credential,
8111
8111
  title,
8112
+ displayName,
8112
8113
  createdAt,
8113
8114
  updatedAt,
8114
8115
  historyVersion,
@@ -8128,6 +8129,7 @@ function normalizeChatTranscriptMetadata(value) {
8128
8129
  const parsedCredential = agentCredentialSnapshotSchema.safeParse(credential);
8129
8130
  if (parsedCredential.success) metadata.credential = parsedCredential.data;
8130
8131
  if (typeof title === "string") metadata.title = title;
8132
+ if (typeof displayName === "string") metadata.displayName = displayName;
8131
8133
  if (typeof createdAt === "string") metadata.createdAt = createdAt;
8132
8134
  if (typeof updatedAt === "string") metadata.updatedAt = updatedAt;
8133
8135
  if (typeof historyVersion === "string") metadata.historyVersion = historyVersion;
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  monolithRequest
6
- } from "./chunk-JFFK7UF4.js";
6
+ } from "./chunk-OBD4D4AW.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-DT3KHGNG.js";
11
+ } from "./chunk-2ROQAUB6.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-DT3KHGNG.js";
8
+ } from "./chunk-2ROQAUB6.js";
9
9
 
10
10
  // src/services/published-pull-request-urls.ts
11
11
  function publishedPullRequestUrls(result) {
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES,
6
6
  isVersionBelow
7
- } from "./chunk-DT3KHGNG.js";
7
+ } from "./chunk-2ROQAUB6.js";
8
8
 
9
9
  // src/utils/codex-agent-env.ts
10
10
  function buildCodexAgentEnv(source = process.env) {
@@ -238,14 +238,14 @@ var DEFAULT_CODEX_ARGS = [
238
238
  "-c",
239
239
  "memories.generate_memories=false"
240
240
  ];
241
- var MIN_CODEX_CLI_VERSION = "0.153.3";
241
+ var MIN_CODEX_CLI_VERSION = "0.156.0";
242
242
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
243
243
  var codexCliVersionEnsured = null;
244
244
  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.900";
248
+ var ENGINE_PACKAGE_VERSION = "0.1.902";
249
249
  var INITIALIZE_METHOD = "initialize";
250
250
  var INITIALIZED_NOTIFICATION = "initialized";
251
251
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -5,13 +5,13 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-JFFK7UF4.js";
8
+ } from "./chunk-OBD4D4AW.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  SUBPROCESS_MAX_BUFFER,
12
12
  buildCodexAgentEnv,
13
13
  execFileAsync
14
- } from "./chunk-QYKG3FKT.js";
14
+ } from "./chunk-KA7C3C4U.js";
15
15
  import {
16
16
  isRecord
17
17
  } from "./chunk-UZSNFLDQ.js";
@@ -25,7 +25,7 @@ import {
25
25
  listOpenAICompatibleModels,
26
26
  readOllamaAuthEnv,
27
27
  resolveOpenAICompatibleModelsUrl
28
- } from "./chunk-DT3KHGNG.js";
28
+ } from "./chunk-2ROQAUB6.js";
29
29
 
30
30
  // src/managers/codex-token-manager.ts
31
31
  import { promises as fs } from "fs";
@@ -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-UKLHW3B2.js");
258
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-JCJHOGRT.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-UKLHW3B2.js");
278
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-JCJHOGRT.js");
279
279
  await restartCodexAspHostIfRunning2();
280
280
  }
281
281
  if (data.scope) {
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-DT3KHGNG.js";
18
+ } from "./chunk-2ROQAUB6.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  publishedPullRequestUrls
6
- } from "./chunk-IIACNGGB.js";
6
+ } from "./chunk-GFIDOFFP.js";
7
7
  import {
8
8
  shouldRefreshPullRequests
9
- } from "./chunk-DT3KHGNG.js";
9
+ } from "./chunk-2ROQAUB6.js";
10
10
 
11
11
  // src/services/post-tool-pr-notifier.ts
12
12
  async function notifyPostToolUse(toolName, toolInput, result) {
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-U5SBR6J7.js";
7
- import "./chunk-JFFK7UF4.js";
6
+ } from "./chunk-D4UQZM5D.js";
7
+ import "./chunk-OBD4D4AW.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-DT3KHGNG.js";
11
+ import "./chunk-2ROQAUB6.js";
12
12
  import "./chunk-VEQXQN22.js";
13
13
 
14
14
  // src/command-protection-hook.ts
@@ -3,14 +3,14 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-U5SBR6J7.js";
6
+ } from "./chunk-D4UQZM5D.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-AQJLICUA.js";
10
- import "./chunk-IIACNGGB.js";
11
- import "./chunk-JFFK7UF4.js";
9
+ } from "./chunk-YICM7VI4.js";
10
+ import "./chunk-GFIDOFFP.js";
11
+ import "./chunk-OBD4D4AW.js";
12
12
  import "./chunk-UZSNFLDQ.js";
13
- import "./chunk-DT3KHGNG.js";
13
+ import "./chunk-2ROQAUB6.js";
14
14
  import "./chunk-VEQXQN22.js";
15
15
 
16
16
  // src/deepseek-command-protection-plugin.ts
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  AppServerProcess,
10
10
  buildCodexAgentEnv
11
- } from "./chunk-QYKG3FKT.js";
11
+ } from "./chunk-KA7C3C4U.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-DT3KHGNG.js";
16
+ } from "./chunk-2ROQAUB6.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
 
19
19
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  evaluateCommandProtection,
92
92
  extractToolCommand,
93
93
  reportCommandProtectionBlock
94
- } from "./chunk-U5SBR6J7.js";
94
+ } from "./chunk-D4UQZM5D.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -116,7 +116,7 @@ import {
116
116
  } from "./chunk-FLDA7BX3.js";
117
117
  import {
118
118
  publishedPullRequestUrls
119
- } from "./chunk-IIACNGGB.js";
119
+ } from "./chunk-GFIDOFFP.js";
120
120
  import {
121
121
  RELAY_MCP_TOOLS,
122
122
  RELAY_MCP_TOOL_NAMES,
@@ -137,21 +137,21 @@ import {
137
137
  refreshDelayMs,
138
138
  restartCodexAspHost,
139
139
  routineRefreshExclusions
140
- } from "./chunk-3GLNVNYT.js";
140
+ } from "./chunk-O6UHVK4J.js";
141
141
  import {
142
142
  ENGINE_ENV,
143
143
  IS_WARMING_MODE,
144
144
  monolithRequest,
145
145
  monolithService,
146
146
  setAgentCredentialSnapshot
147
- } from "./chunk-JFFK7UF4.js";
147
+ } from "./chunk-OBD4D4AW.js";
148
148
  import {
149
149
  AspClient,
150
150
  SUBPROCESS_MAX_BUFFER,
151
151
  execAsync,
152
152
  execFileAsync,
153
153
  getCodexModelProvider
154
- } from "./chunk-QYKG3FKT.js";
154
+ } from "./chunk-KA7C3C4U.js";
155
155
  import {
156
156
  isRecord as isRecord2
157
157
  } from "./chunk-UZSNFLDQ.js";
@@ -378,7 +378,7 @@ import {
378
378
  workspaceCredentialProviderSchema,
379
379
  workspaceTokenRequestSchema,
380
380
  workspaceTokenResponseSchema
381
- } from "./chunk-DT3KHGNG.js";
381
+ } from "./chunk-2ROQAUB6.js";
382
382
  import {
383
383
  __commonJS,
384
384
  __export,
@@ -10917,7 +10917,7 @@ import { join as join37 } from "path";
10917
10917
  import { randomUUID as randomUUID13 } from "crypto";
10918
10918
 
10919
10919
  // ../shared/src/workspace-chat.ts
10920
- var WORKSPACE_CHATS_QUERY_SCHEMA_VERSION = 5;
10920
+ var WORKSPACE_CHATS_QUERY_SCHEMA_VERSION = 6;
10921
10921
  var WORKSPACE_CHATS_QUERY_ROOT = `workspace-chats:v${WORKSPACE_CHATS_QUERY_SCHEMA_VERSION}`;
10922
10922
  function isAcceptedUserMessage(event) {
10923
10923
  return getUserMessage(event) !== null && event.payload.source === ACCEPTED_USER_MESSAGE_SOURCE;
@@ -61197,7 +61197,18 @@ async function flushAllChatTranscripts(chatsById = /* @__PURE__ */ new Map(), ca
61197
61197
  await Promise.all(tasks);
61198
61198
  return capture ? { flushed, failed, captureSupported: true, revisions } : { flushed, failed };
61199
61199
  }
61200
- async function uploadChatTranscript(chatId, filePath, chat, capture) {
61200
+ var uploadsByChatId = /* @__PURE__ */ new Map();
61201
+ function uploadChatTranscript(chatId, filePath, chat, capture) {
61202
+ const upload = (uploadsByChatId.get(chatId) ?? Promise.resolve()).catch(() => {
61203
+ }).then(() => uploadChatTranscriptNow(chatId, filePath, chat, capture));
61204
+ uploadsByChatId.set(chatId, upload);
61205
+ void upload.catch(() => {
61206
+ }).finally(() => {
61207
+ if (uploadsByChatId.get(chatId) === upload) uploadsByChatId.delete(chatId);
61208
+ });
61209
+ return upload;
61210
+ }
61211
+ async function uploadChatTranscriptNow(chatId, filePath, chat, capture) {
61201
61212
  const { size } = await stat5(filePath);
61202
61213
  if (size === 0) return null;
61203
61214
  const metadata = chat ? {
@@ -61205,6 +61216,7 @@ async function uploadChatTranscript(chatId, filePath, chat, capture) {
61205
61216
  ...chat.relayBaseProvider ? { relayBaseProvider: chat.relayBaseProvider } : {},
61206
61217
  credential: ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS[getChatExecutionProvider(chat)],
61207
61218
  title: chat.title,
61219
+ displayName: chat.displayName,
61208
61220
  createdAt: chat.createdAt,
61209
61221
  updatedAt: chat.updatedAt,
61210
61222
  parentChatId: chat.parentChatId,
@@ -62030,6 +62042,7 @@ var ChatService = class {
62030
62042
  throw error;
62031
62043
  }
62032
62044
  const summary = this.toSummary(chat);
62045
+ if (hasChatStarted(summary)) this.uploadChatTranscript(chat);
62033
62046
  await this.publish({ type: "chat.updated", payload: { chat: summary } });
62034
62047
  return summary;
62035
62048
  }
@@ -62419,6 +62432,16 @@ var ChatService = class {
62419
62432
  toTranscriptSource(chat) {
62420
62433
  return { ...this.toSummary(chat), removedMessageIds: chat.persisted.removedMessageIds };
62421
62434
  }
62435
+ uploadChatTranscript(chat) {
62436
+ const chatId = chat.persisted.id;
62437
+ uploadChatTranscript(
62438
+ chatId,
62439
+ join37(HISTORY_DIR_BY_PROVIDER[chat.persisted.provider], `${chatId}.jsonl`),
62440
+ this.toTranscriptSource(chat)
62441
+ ).catch((err) => {
62442
+ console.error("[ChatService] Failed to upload chat transcript:", { chatId, err });
62443
+ });
62444
+ }
62422
62445
  async flushAllChatTranscripts() {
62423
62446
  return flushAllChatTranscripts(new Map(
62424
62447
  [...this.chats.entries()].map(([chatId, chat]) => [chatId, this.toTranscriptSource(chat)])
@@ -62733,13 +62756,7 @@ var ChatService = class {
62733
62756
  const processing = chat.provider.getQueue().length > 0 || (chat.provider.hasActiveBackgroundTasks?.() ?? false);
62734
62757
  const exhaustion = chat.quotaExhaustion;
62735
62758
  chat.quotaExhaustion = null;
62736
- uploadChatTranscript(
62737
- chatId,
62738
- join37(HISTORY_DIR_BY_PROVIDER[chat.persisted.provider], `${chatId}.jsonl`),
62739
- this.toTranscriptSource(chat)
62740
- ).catch((err) => {
62741
- console.error("[ChatService] Failed to upload chat transcript:", { chatId, err });
62742
- });
62759
+ this.uploadChatTranscript(chat);
62743
62760
  flushAllCanvasItems().catch((err) => {
62744
62761
  console.error("[ChatService] Failed to upload canvas items:", { chatId, err });
62745
62762
  });
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  notifyPostToolUse
6
- } from "./chunk-AQJLICUA.js";
7
- import "./chunk-IIACNGGB.js";
6
+ } from "./chunk-YICM7VI4.js";
7
+ import "./chunk-GFIDOFFP.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-DT3KHGNG.js";
11
+ import "./chunk-2ROQAUB6.js";
12
12
  import "./chunk-VEQXQN22.js";
13
13
 
14
14
  // src/post-tool-pr-hook.ts
@@ -11,7 +11,7 @@ import {
11
11
  relaySubagentResponseSchema,
12
12
  spawnRelaySubagentRequestSchema,
13
13
  waitRelaySubagentRequestSchema
14
- } from "./chunk-DT3KHGNG.js";
14
+ } from "./chunk-2ROQAUB6.js";
15
15
  import "./chunk-VEQXQN22.js";
16
16
 
17
17
  // src/relay-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.900",
3
+ "version": "0.1.902",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",