replicas-engine 0.1.315 → 0.1.316

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.
Files changed (2) hide show
  1. package/dist/src/index.js +14 -6
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -287,7 +287,7 @@ var WORKSPACE_SIZES = ["small", "large"];
287
287
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
288
288
 
289
289
  // ../shared/src/e2b.ts
290
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-14-v1";
290
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-14-v2";
291
291
 
292
292
  // ../shared/src/runtime-env.ts
293
293
  function parsePosixEnvFile(content) {
@@ -1883,8 +1883,15 @@ function parseGoalCommand(message) {
1883
1883
  if (/^(clear|reset|unset)$/i.test(value)) return { type: "clear" };
1884
1884
  return { type: "set", objective: value };
1885
1885
  }
1886
- function getGoalCommandObjectiveValidationError(message) {
1887
- const command = parseGoalCommand(message);
1886
+ function getGoalCommand(message, goalMode) {
1887
+ if (!goalMode) return parseGoalCommand(message);
1888
+ const value = message.trim();
1889
+ if (!value) return null;
1890
+ if (/^(clear|reset|unset)$/i.test(value)) return { type: "clear" };
1891
+ return { type: "set", objective: value };
1892
+ }
1893
+ function getGoalCommandObjectiveValidationError(message, goalMode) {
1894
+ const command = getGoalCommand(message, goalMode);
1888
1895
  if (command?.type !== "set") return null;
1889
1896
  const length = command.objective.length;
1890
1897
  if (length <= MAX_CODEX_GOAL_OBJECTIVE_CHARS) return null;
@@ -6880,7 +6887,7 @@ var AspClient = class {
6880
6887
  // src/managers/codex-asp/app-server-process.ts
6881
6888
  var DEFAULT_CODEX_BINARY = "codex";
6882
6889
  var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
6883
- var ENGINE_PACKAGE_VERSION = "0.1.315";
6890
+ var ENGINE_PACKAGE_VERSION = "0.1.316";
6884
6891
  var INITIALIZE_METHOD = "initialize";
6885
6892
  var INITIALIZED_NOTIFICATION = "initialized";
6886
6893
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -7832,7 +7839,7 @@ var CodexAspManager = class extends CodingAgentManager {
7832
7839
  ...extraPayload
7833
7840
  });
7834
7841
  };
7835
- const goalCommand = parseGoalCommand(request.message);
7842
+ const goalCommand = getGoalCommand(request.message, request.goalMode);
7836
7843
  const dispatch = async () => {
7837
7844
  if (goalCommand?.type === "clear") {
7838
7845
  await this.executeGoalClearCommand(request, recordUserMessage);
@@ -10851,6 +10858,7 @@ var sendMessageSchema = z2.object({
10851
10858
  ])
10852
10859
  })).optional(),
10853
10860
  thinkingLevel: z2.enum(["low", "medium", "high", "max"]).optional(),
10861
+ goalMode: z2.boolean().optional(),
10854
10862
  enableInteractiveTools: z2.boolean().optional(),
10855
10863
  type: z2.string().min(1).optional(),
10856
10864
  merge: z2.boolean().optional(),
@@ -10998,7 +11006,7 @@ function createV1Routes(deps) {
10998
11006
  app2.post("/chats/:chatId/messages", async (c) => {
10999
11007
  try {
11000
11008
  const body = sendMessageSchema.parse(await c.req.json());
11001
- const goalValidationError = getGoalCommandObjectiveValidationError(body.message);
11009
+ const goalValidationError = getGoalCommandObjectiveValidationError(body.message, body.goalMode);
11002
11010
  if (goalValidationError) {
11003
11011
  return c.json(jsonError(goalValidationError), 400);
11004
11012
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.315",
3
+ "version": "0.1.316",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",