replicas-engine 0.1.463 → 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 +38 -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-v15";
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) {
@@ -3105,6 +3116,10 @@ var AUDIT_LOG_ACTIONS = Object.values(AUDIT_LOG_ACTION);
3105
3116
  // ../shared/src/automations/types.ts
3106
3117
  var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
3107
3118
 
3119
+ // ../shared/src/routes/admin.ts
3120
+ var WEBHOOK_PROVIDERS = ["linear", "github", "gitlab", "slack", "e2b", "stripe", "sentry"];
3121
+ var WEBHOOK_PROVIDER_SET = new Set(WEBHOOK_PROVIDERS);
3122
+
3108
3123
  // ../shared/src/display-message/types.ts
3109
3124
  var BACKGROUND_TASK_SUBTYPES = /* @__PURE__ */ new Set([
3110
3125
  "task_started",
@@ -9110,6 +9125,8 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
9110
9125
  thinkingLevel,
9111
9126
  signature
9112
9127
  } = args;
9128
+ const ultracode = thinkingLevel === "ultracode";
9129
+ const effort = thinkingLevel === "ultra" || ultracode ? "xhigh" : thinkingLevel;
9113
9130
  const systemPrompt = this.systemPromptOverride ? this.systemPromptOverride(combinedInstructions) : {
9114
9131
  type: "preset",
9115
9132
  preset: "claude_code",
@@ -9146,10 +9163,13 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
9146
9163
  ...shared.enableAllSkills ? { skills: "all" } : {},
9147
9164
  env: shared.env,
9148
9165
  model: claudeCodeModel,
9149
- settings: { fastMode: signature.fastMode },
9166
+ settings: {
9167
+ fastMode: signature.fastMode,
9168
+ ...ultracode ? { enableWorkflows: true, ultracode: true } : {}
9169
+ },
9150
9170
  includePartialMessages: true,
9151
9171
  ...supportsClaudeThinkingDisplay(resolvedModel) ? { thinking: { type: "adaptive", display: "summarized" } } : {},
9152
- ...thinkingLevel ? { effort: thinkingLevel } : {},
9172
+ ...effort ? { effort } : {},
9153
9173
  canUseTool: this.buildCanUseTool(),
9154
9174
  ...ENGINE_ENV.REPLICAS_DISABLE_GH_PR_MERGE ? {
9155
9175
  hooks: {
@@ -9738,10 +9758,10 @@ var AspClient = class {
9738
9758
  // src/managers/codex-asp/app-server-process.ts
9739
9759
  var DEFAULT_CODEX_BINARY = "codex";
9740
9760
  var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
9741
- var MIN_CODEX_CLI_VERSION = "0.144.0";
9761
+ var MIN_CODEX_CLI_VERSION = "0.144.6";
9742
9762
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
9743
9763
  var codexCliVersionEnsured = null;
9744
- var ENGINE_PACKAGE_VERSION = "0.1.463";
9764
+ var ENGINE_PACKAGE_VERSION = "0.1.465";
9745
9765
  var INITIALIZE_METHOD = "initialize";
9746
9766
  var INITIALIZED_NOTIFICATION = "initialized";
9747
9767
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -12299,7 +12319,9 @@ var OPENCODE_VARIANT_CANDIDATES_BY_THINKING_LEVEL = {
12299
12319
  medium: ["medium"],
12300
12320
  high: ["high"],
12301
12321
  xhigh: ["xhigh", "high"],
12302
- max: ["max", "xhigh", "high"]
12322
+ max: ["max", "xhigh", "high"],
12323
+ ultra: ["max", "xhigh", "high"],
12324
+ ultracode: ["max", "xhigh", "high"]
12303
12325
  };
12304
12326
  var opencodeAuthSchema = z2.record(z2.string(), z2.object({
12305
12327
  type: z2.string().optional(),
@@ -13064,7 +13086,9 @@ var PiManager = class extends CodingAgentManager {
13064
13086
  const model2 = this.session.modelRegistry.find("openrouter", request.model);
13065
13087
  if (model2) await this.session.setModel(model2);
13066
13088
  }
13067
- 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
+ }
13068
13092
  return this.session;
13069
13093
  }
13070
13094
  const apiKey = ENGINE_ENV.OPENROUTER_API_KEY;
@@ -13113,7 +13137,9 @@ var PiManager = class extends CodingAgentManager {
13113
13137
  resourceLoader
13114
13138
  });
13115
13139
  this.session = result.session;
13116
- 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
+ }
13117
13143
  this.activeSessionFile = sessionManager.getSessionFile() ?? null;
13118
13144
  await this.onSaveSessionId(this.activeSessionFile);
13119
13145
  this.unsubscribe = this.session.subscribe((event) => this.handleEvent(event));
@@ -13283,7 +13309,7 @@ You will also receive the chatId so you can send follow-up messages or clean up
13283
13309
  opencodeAvailable ? `Opencode: ${AGENT_MODELS.opencode.join(", ")}.` : null
13284
13310
  ].filter(Boolean).join(" ")),
13285
13311
  thinking_level: z3.enum(VALID_THINKING_LEVELS).optional().describe(
13286
- "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."
13287
13313
  ),
13288
13314
  title: z3.string().optional().describe("Optional title for the subagent chat (for identification)."),
13289
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.")
@@ -13351,7 +13377,7 @@ The tool blocks until the subagent completes and returns its response.`,
13351
13377
  message: z3.string().describe("The follow-up message to send."),
13352
13378
  model: z3.string().optional().describe("Optional model override for this message."),
13353
13379
  thinking_level: z3.enum(VALID_THINKING_LEVELS).optional().describe(
13354
- "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."
13355
13381
  ),
13356
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.")
13357
13383
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.463",
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",