replicas-engine 0.1.831 → 0.1.832

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-Y7T6IWID.js";
8
+ } from "./chunk-DSZMTRC3.js";
9
9
  import "./chunk-VZ6VMXC7.js";
10
- import "./chunk-I4FXRLZH.js";
10
+ import "./chunk-X7NVCXNL.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
12
  import "./chunk-EJKLU7KX.js";
13
13
  import "./chunk-VEQXQN22.js";
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  AppServerProcess,
11
11
  buildCodexAgentEnv
12
- } from "./chunk-I4FXRLZH.js";
12
+ } from "./chunk-X7NVCXNL.js";
13
13
  import {
14
14
  CODEX_AUTH_ENV_KEYS,
15
15
  CODEX_AUTH_ENV_KEYS_BY_METHOD,
@@ -232,7 +232,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
232
232
  const data = await response.json();
233
233
  await this.applyCredentialsResponse(data);
234
234
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
235
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-2BT65CNP.js");
235
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-KKPQQCUV.js");
236
236
  await restartCodexAspHostIfRunning2();
237
237
  }
238
238
  if (data.scope) {
@@ -241,7 +241,7 @@ var DEFAULT_CODEX_ARGS = [
241
241
  var MIN_CODEX_CLI_VERSION = "0.153.3";
242
242
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
243
243
  var codexCliVersionEnsured = null;
244
- var ENGINE_PACKAGE_VERSION = "0.1.831";
244
+ var ENGINE_PACKAGE_VERSION = "0.1.832";
245
245
  var INITIALIZE_METHOD = "initialize";
246
246
  var INITIALIZED_NOTIFICATION = "initialized";
247
247
  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-I4FXRLZH.js";
11
+ } from "./chunk-X7NVCXNL.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
package/dist/src/index.js CHANGED
@@ -131,7 +131,7 @@ import {
131
131
  recordCredentialFallback,
132
132
  recordExhaustedCredential,
133
133
  restartCodexAspHost
134
- } from "./chunk-Y7T6IWID.js";
134
+ } from "./chunk-DSZMTRC3.js";
135
135
  import {
136
136
  ENGINE_ENV,
137
137
  IS_WARMING_MODE,
@@ -144,7 +144,7 @@ import {
144
144
  SUBPROCESS_MAX_BUFFER,
145
145
  execAsync,
146
146
  execFileAsync
147
- } from "./chunk-I4FXRLZH.js";
147
+ } from "./chunk-X7NVCXNL.js";
148
148
  import {
149
149
  isRecord as isRecord2
150
150
  } from "./chunk-UZSNFLDQ.js";
@@ -64123,6 +64123,21 @@ function createV1Routes(deps) {
64123
64123
  return c.json(jsonError("Failed to remove from queue", error instanceof Error ? error.message : "Unknown error"), 500);
64124
64124
  }
64125
64125
  });
64126
+ app2.patch("/chats/:chatId/queue/reorder", async (c) => {
64127
+ try {
64128
+ const body = await c.req.json();
64129
+ if (!body.messageId || typeof body.position !== "number" || !Number.isFinite(body.position)) {
64130
+ return c.json(jsonError("Invalid request", "messageId and position are required"), 400);
64131
+ }
64132
+ const result = deps.chatService.reorderQueue(c.req.param("chatId"), body.messageId, body.position);
64133
+ return c.json(result);
64134
+ } catch (error) {
64135
+ if (error instanceof ChatNotFoundError) {
64136
+ return c.json(jsonError("Chat not found", error.message), 404);
64137
+ }
64138
+ return c.json(jsonError("Failed to reorder queue", error instanceof Error ? error.message : "Unknown error"), 500);
64139
+ }
64140
+ });
64126
64141
  app2.patch("/chats/:chatId/queue/:messageId", async (c) => {
64127
64142
  try {
64128
64143
  const body = await c.req.json();
@@ -64150,21 +64165,6 @@ function createV1Routes(deps) {
64150
64165
  return c.json(jsonError("Failed to steer queued message", error instanceof Error ? error.message : "Unknown error"), 500);
64151
64166
  }
64152
64167
  });
64153
- app2.patch("/chats/:chatId/queue/reorder", async (c) => {
64154
- try {
64155
- const body = await c.req.json();
64156
- if (!body.messageId || typeof body.position !== "number" || !Number.isFinite(body.position)) {
64157
- return c.json(jsonError("Invalid request", "messageId and position are required"), 400);
64158
- }
64159
- const result = deps.chatService.reorderQueue(c.req.param("chatId"), body.messageId, body.position);
64160
- return c.json(result);
64161
- } catch (error) {
64162
- if (error instanceof ChatNotFoundError) {
64163
- return c.json(jsonError("Chat not found", error.message), 404);
64164
- }
64165
- return c.json(jsonError("Failed to reorder queue", error instanceof Error ? error.message : "Unknown error"), 500);
64166
- }
64167
- });
64168
64168
  app2.post("/chats/:chatId/tool-input", async (c) => {
64169
64169
  try {
64170
64170
  const body = respondToolInputSchema.parse(await c.req.json());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.831",
3
+ "version": "0.1.832",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",