replicas-engine 0.1.464 → 0.1.465

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 +34 -12
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -50,7 +50,16 @@ var VALID_CODING_AGENT_PROVIDERS = VALID_AGENT_PROVIDERS.filter(
50
50
  function isValidAgentProvider(value) {
51
51
  return VALID_AGENT_PROVIDERS.some((p) => p === value);
52
52
  }
53
- var VALID_THINKING_LEVELS = ["low", "medium", "high", "xhigh", "max"];
53
+ var VALID_THINKING_LEVELS = ["low", "medium", "high", "xhigh", "max", "ultra", "ultracode"];
54
+ var STANDARD_THINKING_LEVELS = ["low", "medium", "high", "xhigh", "max"];
55
+ var THINKING_LEVELS_BY_AGENT = {
56
+ claude: [...STANDARD_THINKING_LEVELS, "ultracode"],
57
+ codex: [...STANDARD_THINKING_LEVELS, "ultra"],
58
+ cursor: STANDARD_THINKING_LEVELS,
59
+ opencode: STANDARD_THINKING_LEVELS,
60
+ pi: STANDARD_THINKING_LEVELS,
61
+ relay: [...STANDARD_THINKING_LEVELS, "ultracode"]
62
+ };
54
63
  function isValidThinkingLevel(value) {
55
64
  return VALID_THINKING_LEVELS.some((l) => l === value);
56
65
  }
@@ -59,7 +68,9 @@ var CODEX_REASONING_EFFORT_BY_THINKING_LEVEL = {
59
68
  medium: "medium",
60
69
  high: "high",
61
70
  xhigh: "xhigh",
62
- max: "xhigh"
71
+ max: "xhigh",
72
+ ultra: "ultra",
73
+ ultracode: "xhigh"
63
74
  };
64
75
  function codexReasoningEffortForThinkingLevel(thinkingLevel) {
65
76
  return thinkingLevel ? CODEX_REASONING_EFFORT_BY_THINKING_LEVEL[thinkingLevel] : void 0;
@@ -561,7 +572,7 @@ var WORKSPACE_SIZES = ["small", "large"];
561
572
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
562
573
 
563
574
  // ../shared/src/e2b.ts
564
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-19-v16";
575
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-19-v17";
565
576
 
566
577
  // ../shared/src/runtime-env.ts
567
578
  function shellQuotePosix(value) {
@@ -9114,6 +9125,8 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
9114
9125
  thinkingLevel,
9115
9126
  signature
9116
9127
  } = args;
9128
+ const ultracode = thinkingLevel === "ultracode";
9129
+ const effort = thinkingLevel === "ultra" || ultracode ? "xhigh" : thinkingLevel;
9117
9130
  const systemPrompt = this.systemPromptOverride ? this.systemPromptOverride(combinedInstructions) : {
9118
9131
  type: "preset",
9119
9132
  preset: "claude_code",
@@ -9150,10 +9163,13 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
9150
9163
  ...shared.enableAllSkills ? { skills: "all" } : {},
9151
9164
  env: shared.env,
9152
9165
  model: claudeCodeModel,
9153
- settings: { fastMode: signature.fastMode },
9166
+ settings: {
9167
+ fastMode: signature.fastMode,
9168
+ ...ultracode ? { enableWorkflows: true, ultracode: true } : {}
9169
+ },
9154
9170
  includePartialMessages: true,
9155
9171
  ...supportsClaudeThinkingDisplay(resolvedModel) ? { thinking: { type: "adaptive", display: "summarized" } } : {},
9156
- ...thinkingLevel ? { effort: thinkingLevel } : {},
9172
+ ...effort ? { effort } : {},
9157
9173
  canUseTool: this.buildCanUseTool(),
9158
9174
  ...ENGINE_ENV.REPLICAS_DISABLE_GH_PR_MERGE ? {
9159
9175
  hooks: {
@@ -9742,10 +9758,10 @@ var AspClient = class {
9742
9758
  // src/managers/codex-asp/app-server-process.ts
9743
9759
  var DEFAULT_CODEX_BINARY = "codex";
9744
9760
  var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
9745
- var MIN_CODEX_CLI_VERSION = "0.144.0";
9761
+ var MIN_CODEX_CLI_VERSION = "0.144.6";
9746
9762
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
9747
9763
  var codexCliVersionEnsured = null;
9748
- var ENGINE_PACKAGE_VERSION = "0.1.464";
9764
+ var ENGINE_PACKAGE_VERSION = "0.1.465";
9749
9765
  var INITIALIZE_METHOD = "initialize";
9750
9766
  var INITIALIZED_NOTIFICATION = "initialized";
9751
9767
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -12303,7 +12319,9 @@ var OPENCODE_VARIANT_CANDIDATES_BY_THINKING_LEVEL = {
12303
12319
  medium: ["medium"],
12304
12320
  high: ["high"],
12305
12321
  xhigh: ["xhigh", "high"],
12306
- max: ["max", "xhigh", "high"]
12322
+ max: ["max", "xhigh", "high"],
12323
+ ultra: ["max", "xhigh", "high"],
12324
+ ultracode: ["max", "xhigh", "high"]
12307
12325
  };
12308
12326
  var opencodeAuthSchema = z2.record(z2.string(), z2.object({
12309
12327
  type: z2.string().optional(),
@@ -13068,7 +13086,9 @@ var PiManager = class extends CodingAgentManager {
13068
13086
  const model2 = this.session.modelRegistry.find("openrouter", request.model);
13069
13087
  if (model2) await this.session.setModel(model2);
13070
13088
  }
13071
- if (request.thinkingLevel) this.session.setThinkingLevel(request.thinkingLevel);
13089
+ if (request.thinkingLevel) {
13090
+ this.session.setThinkingLevel(request.thinkingLevel === "ultra" || request.thinkingLevel === "ultracode" ? "xhigh" : request.thinkingLevel);
13091
+ }
13072
13092
  return this.session;
13073
13093
  }
13074
13094
  const apiKey = ENGINE_ENV.OPENROUTER_API_KEY;
@@ -13117,7 +13137,9 @@ var PiManager = class extends CodingAgentManager {
13117
13137
  resourceLoader
13118
13138
  });
13119
13139
  this.session = result.session;
13120
- if (request.thinkingLevel) this.session.setThinkingLevel(request.thinkingLevel);
13140
+ if (request.thinkingLevel) {
13141
+ this.session.setThinkingLevel(request.thinkingLevel === "ultra" || request.thinkingLevel === "ultracode" ? "xhigh" : request.thinkingLevel);
13142
+ }
13121
13143
  this.activeSessionFile = sessionManager.getSessionFile() ?? null;
13122
13144
  await this.onSaveSessionId(this.activeSessionFile);
13123
13145
  this.unsubscribe = this.session.subscribe((event) => this.handleEvent(event));
@@ -13287,7 +13309,7 @@ You will also receive the chatId so you can send follow-up messages or clean up
13287
13309
  opencodeAvailable ? `Opencode: ${AGENT_MODELS.opencode.join(", ")}.` : null
13288
13310
  ].filter(Boolean).join(" ")),
13289
13311
  thinking_level: z3.enum(VALID_THINKING_LEVELS).optional().describe(
13290
- "Controls how much thinking/reasoning the subagent applies. low = light thinking, medium = moderate, high = deep reasoning, xhigh = extended effort, max = maximum effort. Defaults: Claude = high, Codex = medium, Cursor = medium, Opencode = medium."
13312
+ "Controls how much thinking/reasoning the subagent applies. low = light thinking, medium = moderate, high = deep reasoning, xhigh = extended effort, max = maximum effort, ultra = Codex ultra, ultracode = Claude Code dynamic workflows. Defaults: Claude = high, Codex = medium, Cursor = medium, Opencode = medium."
13291
13313
  ),
13292
13314
  title: z3.string().optional().describe("Optional title for the subagent chat (for identification)."),
13293
13315
  timeout_minutes: z3.number().positive().optional().describe("Timeout in minutes for the subagent to complete (default: 10). Set higher for large tasks to avoid losing work.")
@@ -13355,7 +13377,7 @@ The tool blocks until the subagent completes and returns its response.`,
13355
13377
  message: z3.string().describe("The follow-up message to send."),
13356
13378
  model: z3.string().optional().describe("Optional model override for this message."),
13357
13379
  thinking_level: z3.enum(VALID_THINKING_LEVELS).optional().describe(
13358
- "Controls how much thinking/reasoning the subagent applies. low = light thinking, medium = moderate, high = deep reasoning, xhigh = extended effort, max = maximum effort. Defaults: Claude = high, Codex = medium, Cursor = medium, Opencode = medium."
13380
+ "Controls how much thinking/reasoning the subagent applies. low = light thinking, medium = moderate, high = deep reasoning, xhigh = extended effort, max = maximum effort, ultra = Codex ultra, ultracode = Claude Code dynamic workflows. Defaults: Claude = high, Codex = medium, Cursor = medium, Opencode = medium."
13359
13381
  ),
13360
13382
  timeout_minutes: z3.number().positive().optional().describe("Timeout in minutes for the subagent to complete (default: 10). Set higher for large tasks to avoid losing work.")
13361
13383
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.464",
3
+ "version": "0.1.465",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",