replicas-engine 0.1.241 → 0.1.243
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.
- package/dist/src/index.js +6 -28
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -183,7 +183,6 @@ function buildCodexTokenUsageContextUsagePayload(usage) {
|
|
|
183
183
|
rawMaxTokens: maxTokens,
|
|
184
184
|
percentage: percentage(totalTokens, maxTokens),
|
|
185
185
|
compactsAutomatically: true,
|
|
186
|
-
...autoCompactThresholdField(usage.autoCompactThreshold),
|
|
187
186
|
categories: compactCategories([
|
|
188
187
|
{
|
|
189
188
|
name: "Input context",
|
|
@@ -290,7 +289,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
290
289
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
291
290
|
|
|
292
291
|
// ../shared/src/e2b.ts
|
|
293
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-05-30-
|
|
292
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-05-30-v4";
|
|
294
293
|
|
|
295
294
|
// ../shared/src/runtime-env.ts
|
|
296
295
|
function parsePosixEnvFile(content) {
|
|
@@ -6086,7 +6085,7 @@ var AspClient = class {
|
|
|
6086
6085
|
// src/managers/codex-asp/app-server-process.ts
|
|
6087
6086
|
var DEFAULT_CODEX_BINARY = "codex";
|
|
6088
6087
|
var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
6089
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
6088
|
+
var ENGINE_PACKAGE_VERSION = "0.1.243";
|
|
6090
6089
|
var INITIALIZE_METHOD = "initialize";
|
|
6091
6090
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
6092
6091
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -6364,24 +6363,6 @@ var TURN_START_METHOD = "turn/start";
|
|
|
6364
6363
|
var TURN_INTERRUPT_METHOD = "turn/interrupt";
|
|
6365
6364
|
var ACCOUNT_RATE_LIMITS_READ_METHOD = "account/rateLimits/read";
|
|
6366
6365
|
var MAX_CODEX_ASP_TRANSCRIPT_OUTPUT_CHARS = DEFAULT_HOOK_OUTPUT_PREVIEW_CHARS;
|
|
6367
|
-
var CODEX_ASP_AUTO_COMPACT_RATIO = 0.85;
|
|
6368
|
-
var CODEX_ASP_MODEL_CONTEXT_WINDOWS = {
|
|
6369
|
-
[DEFAULT_MODEL]: 258400
|
|
6370
|
-
};
|
|
6371
|
-
function codexAspAutoCompactTokenLimitForModel(model) {
|
|
6372
|
-
const contextWindow = CODEX_ASP_MODEL_CONTEXT_WINDOWS[model ?? DEFAULT_MODEL];
|
|
6373
|
-
return contextWindow === void 0 ? void 0 : Math.floor(contextWindow * CODEX_ASP_AUTO_COMPACT_RATIO);
|
|
6374
|
-
}
|
|
6375
|
-
function codexAspConfigForModel(model) {
|
|
6376
|
-
const tokenLimit = codexAspAutoCompactTokenLimitForModel(model);
|
|
6377
|
-
return {
|
|
6378
|
-
web_search: "live",
|
|
6379
|
-
...tokenLimit !== void 0 ? {
|
|
6380
|
-
model_auto_compact_token_limit: tokenLimit,
|
|
6381
|
-
model_auto_compact_token_limit_scope: "total"
|
|
6382
|
-
} : {}
|
|
6383
|
-
};
|
|
6384
|
-
}
|
|
6385
6366
|
function toReasoningEffort(thinkingLevel) {
|
|
6386
6367
|
return codexReasoningEffortForThinkingLevel(thinkingLevel);
|
|
6387
6368
|
}
|
|
@@ -6754,29 +6735,27 @@ function mergeCodexAspTranscripts(primary, supplemental) {
|
|
|
6754
6735
|
}
|
|
6755
6736
|
async function buildThreadStartParams(workingDirectory, request, developerInstructions) {
|
|
6756
6737
|
const additionalDirectories = await getAgentAdditionalDirectories();
|
|
6757
|
-
const model = request.model ?? DEFAULT_MODEL;
|
|
6758
6738
|
return {
|
|
6759
|
-
model,
|
|
6739
|
+
model: request.model ?? DEFAULT_MODEL,
|
|
6760
6740
|
cwd: workingDirectory,
|
|
6761
6741
|
runtimeWorkspaceRoots: additionalDirectories,
|
|
6762
6742
|
sandbox: "danger-full-access",
|
|
6763
6743
|
developerInstructions: developerInstructions ?? null,
|
|
6764
|
-
config:
|
|
6744
|
+
config: { web_search: "live" },
|
|
6765
6745
|
experimentalRawEvents: false,
|
|
6766
6746
|
persistExtendedHistory: false
|
|
6767
6747
|
};
|
|
6768
6748
|
}
|
|
6769
6749
|
async function buildThreadResumeParams(workingDirectory, threadId, request, developerInstructions) {
|
|
6770
6750
|
const additionalDirectories = await getAgentAdditionalDirectories();
|
|
6771
|
-
const model = request.model ?? DEFAULT_MODEL;
|
|
6772
6751
|
return {
|
|
6773
6752
|
threadId,
|
|
6774
|
-
model,
|
|
6753
|
+
model: request.model ?? DEFAULT_MODEL,
|
|
6775
6754
|
cwd: workingDirectory,
|
|
6776
6755
|
runtimeWorkspaceRoots: additionalDirectories,
|
|
6777
6756
|
sandbox: "danger-full-access",
|
|
6778
6757
|
developerInstructions: developerInstructions ?? null,
|
|
6779
|
-
config:
|
|
6758
|
+
config: { web_search: "live" },
|
|
6780
6759
|
excludeTurns: false,
|
|
6781
6760
|
persistExtendedHistory: false
|
|
6782
6761
|
};
|
|
@@ -7599,7 +7578,6 @@ var CodexAspManager = class extends CodingAgentManager {
|
|
|
7599
7578
|
const payload = buildCodexTokenUsageContextUsagePayload({
|
|
7600
7579
|
model,
|
|
7601
7580
|
modelContextWindow: tokenUsage.modelContextWindow,
|
|
7602
|
-
autoCompactThreshold: codexAspAutoCompactTokenLimitForModel(model),
|
|
7603
7581
|
last: {
|
|
7604
7582
|
inputTokens: tokenUsage.last.inputTokens,
|
|
7605
7583
|
outputTokens: tokenUsage.last.outputTokens,
|