replicas-engine 0.1.200 → 0.1.202
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 +27 -1
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -207,6 +207,17 @@ var SANDBOX_LIFECYCLE = {
|
|
|
207
207
|
AUTO_DELETE_MINUTES: -1,
|
|
208
208
|
SSH_TOKEN_EXPIRATION_MINUTES: 3 * 60
|
|
209
209
|
};
|
|
210
|
+
function buildPaths(homeDir) {
|
|
211
|
+
return {
|
|
212
|
+
HOME_DIR: homeDir,
|
|
213
|
+
WORKSPACES_DIR: `${homeDir}/workspaces`,
|
|
214
|
+
REPLICAS_DIR: `${homeDir}/.replicas`,
|
|
215
|
+
REPLICAS_FILES_DIR: `${homeDir}/.replicas/files`,
|
|
216
|
+
REPLICAS_RUNTIME_ENV_FILE: `${homeDir}/.replicas/runtime-env.sh`
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
var DAYTONA_PATHS = buildPaths("/home/ubuntu");
|
|
220
|
+
var E2B_PATHS = buildPaths("/home/user");
|
|
210
221
|
|
|
211
222
|
// ../shared/src/runtime-env.ts
|
|
212
223
|
function parsePosixEnvFile(content) {
|
|
@@ -385,7 +396,7 @@ function parseReplicasConfigString(content, filename) {
|
|
|
385
396
|
}
|
|
386
397
|
|
|
387
398
|
// ../shared/src/engine/environment.ts
|
|
388
|
-
var DAYTONA_SNAPSHOT_ID = "
|
|
399
|
+
var DAYTONA_SNAPSHOT_ID = "23-05-2026-royal-york-v1";
|
|
389
400
|
|
|
390
401
|
// ../shared/src/engine/types.ts
|
|
391
402
|
var DEFAULT_CHAT_TITLES = {
|
|
@@ -2912,6 +2923,7 @@ function buildClaudeAgentEnv(overrides) {
|
|
|
2912
2923
|
if (shouldStripAnthropicApiKey()) {
|
|
2913
2924
|
env.ANTHROPIC_API_KEY = void 0;
|
|
2914
2925
|
}
|
|
2926
|
+
env.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD = "1";
|
|
2915
2927
|
return env;
|
|
2916
2928
|
}
|
|
2917
2929
|
function buildCodexAgentEnv() {
|
|
@@ -2940,6 +2952,16 @@ function shouldStripOpenAIApiKey() {
|
|
|
2940
2952
|
return ENGINE_ENV.REPLICAS_CODEX_AUTH_METHOD === "oauth";
|
|
2941
2953
|
}
|
|
2942
2954
|
|
|
2955
|
+
// src/utils/agent-additional-directories.ts
|
|
2956
|
+
async function getAgentAdditionalDirectories() {
|
|
2957
|
+
try {
|
|
2958
|
+
const repos = await gitService.listRepositories();
|
|
2959
|
+
return repos.map((repo) => repo.path);
|
|
2960
|
+
} catch {
|
|
2961
|
+
return [];
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2943
2965
|
// src/managers/claude-manager.ts
|
|
2944
2966
|
var PromptStream = class {
|
|
2945
2967
|
queue = [];
|
|
@@ -3286,6 +3308,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
3286
3308
|
append: combinedInstructions
|
|
3287
3309
|
};
|
|
3288
3310
|
const queryEnv = buildClaudeAgentEnv(this.envOverrides);
|
|
3311
|
+
const additionalDirectories = await getAgentAdditionalDirectories();
|
|
3289
3312
|
const resolvedModel = normalizeClaudeModel(model) || CLAUDE_OPUS_1M_MODEL;
|
|
3290
3313
|
const interactiveAllowed = enableInteractiveTools && permissionMode === "read";
|
|
3291
3314
|
const useDefaultToolPolicy = !this.toolsOverride;
|
|
@@ -3303,6 +3326,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
3303
3326
|
options: {
|
|
3304
3327
|
resume: this.sessionId || void 0,
|
|
3305
3328
|
cwd: this.workingDirectory,
|
|
3329
|
+
additionalDirectories,
|
|
3306
3330
|
permissionMode: permissionMode === "read" ? "plan" : "bypassPermissions",
|
|
3307
3331
|
allowDangerouslySkipPermissions: permissionMode !== "read",
|
|
3308
3332
|
...this.toolsOverride ? { tools: this.toolsOverride } : {},
|
|
@@ -3717,12 +3741,14 @@ var CodexManager = class extends CodingAgentManager {
|
|
|
3717
3741
|
const sandboxMode = "danger-full-access";
|
|
3718
3742
|
const webSearchMode = "live";
|
|
3719
3743
|
const codexReasoningEffort = thinkingLevel ? thinkingLevel === "max" ? "xhigh" : thinkingLevel : void 0;
|
|
3744
|
+
const additionalDirectories = await getAgentAdditionalDirectories();
|
|
3720
3745
|
const threadOptions = {
|
|
3721
3746
|
workingDirectory: this.workingDirectory,
|
|
3722
3747
|
skipGitRepoCheck: true,
|
|
3723
3748
|
sandboxMode,
|
|
3724
3749
|
model: model || DEFAULT_MODEL,
|
|
3725
3750
|
webSearchMode,
|
|
3751
|
+
additionalDirectories,
|
|
3726
3752
|
...codexReasoningEffort ? { modelReasoningEffort: codexReasoningEffort } : {}
|
|
3727
3753
|
};
|
|
3728
3754
|
abortController = new AbortController();
|