replicas-engine 0.1.319 → 0.1.321
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 +32 -29
- 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-15-
|
|
290
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-15-v5";
|
|
291
291
|
|
|
292
292
|
// ../shared/src/runtime-env.ts
|
|
293
293
|
function parsePosixEnvFile(content) {
|
|
@@ -373,6 +373,30 @@ var InFlightMap = class {
|
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
375
|
|
|
376
|
+
// ../shared/src/slash-commands.ts
|
|
377
|
+
var MAX_CODEX_GOAL_OBJECTIVE_CHARS = 4e3;
|
|
378
|
+
function parseGoalCommand(message) {
|
|
379
|
+
const match = message.trim().match(/^\/goal(?:\s+([\s\S]*))?$/i);
|
|
380
|
+
const value = match?.[1]?.trim();
|
|
381
|
+
if (!value) return null;
|
|
382
|
+
if (/^(clear|reset|unset)$/i.test(value)) return { type: "clear" };
|
|
383
|
+
return { type: "set", objective: value };
|
|
384
|
+
}
|
|
385
|
+
function getGoalCommand(message, goalMode) {
|
|
386
|
+
if (!goalMode) return parseGoalCommand(message);
|
|
387
|
+
const value = message.trim();
|
|
388
|
+
if (!value) return null;
|
|
389
|
+
if (/^(clear|reset|unset)$/i.test(value)) return { type: "clear" };
|
|
390
|
+
return { type: "set", objective: value };
|
|
391
|
+
}
|
|
392
|
+
function getGoalCommandObjectiveValidationError(message, goalMode) {
|
|
393
|
+
const command = getGoalCommand(message, goalMode);
|
|
394
|
+
if (command?.type !== "set") return null;
|
|
395
|
+
const length = command.objective.length;
|
|
396
|
+
if (length <= MAX_CODEX_GOAL_OBJECTIVE_CHARS) return null;
|
|
397
|
+
return `Goal objective must be at most ${MAX_CODEX_GOAL_OBJECTIVE_CHARS} characters (${length} provided). Shorten the /goal objective, or send the extra details as a regular message after setting the goal.`;
|
|
398
|
+
}
|
|
399
|
+
|
|
376
400
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
377
401
|
var SECTION = `### Computer use (Linux desktop control)
|
|
378
402
|
Drive the workspace's Linux desktop - open a browser, click, type, scroll, screenshot, record - via the \`replicas computer\` CLI. Every Replicas workspace boots with Xvfb / openbox / x11vnc / noVNC pre-installed and the live noVNC viewer is automatically published as an authenticated preview, so a \`Desktop\` tab is always available in the dashboard. Use \`replicas computer info\` to get the viewer URL when you want to share it (e.g. point a user on Slack at the live stream).
|
|
@@ -1874,30 +1898,6 @@ var DEFAULT_DEFAULT_SKILLS = {
|
|
|
1874
1898
|
}
|
|
1875
1899
|
};
|
|
1876
1900
|
|
|
1877
|
-
// ../shared/src/prompts.ts
|
|
1878
|
-
var MAX_CODEX_GOAL_OBJECTIVE_CHARS = 4e3;
|
|
1879
|
-
function parseGoalCommand(message) {
|
|
1880
|
-
const match = message.trim().match(/^\/goal(?:\s+([\s\S]*))?$/i);
|
|
1881
|
-
const value = match?.[1]?.trim();
|
|
1882
|
-
if (!value) return null;
|
|
1883
|
-
if (/^(clear|reset|unset)$/i.test(value)) return { type: "clear" };
|
|
1884
|
-
return { type: "set", objective: value };
|
|
1885
|
-
}
|
|
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);
|
|
1895
|
-
if (command?.type !== "set") return null;
|
|
1896
|
-
const length = command.objective.length;
|
|
1897
|
-
if (length <= MAX_CODEX_GOAL_OBJECTIVE_CHARS) return null;
|
|
1898
|
-
return `Goal objective must be at most ${MAX_CODEX_GOAL_OBJECTIVE_CHARS} characters (${length} provided). Shorten the /goal objective, or send the extra details as a regular message after setting the goal.`;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
1901
|
// ../shared/src/replicas-config.ts
|
|
1902
1902
|
import { parse as parseYaml } from "yaml";
|
|
1903
1903
|
|
|
@@ -3629,7 +3629,7 @@ var GitService = class {
|
|
|
3629
3629
|
if (persistedBranch && await branchExists(persistedBranch, repo.path)) {
|
|
3630
3630
|
const currentBranch = await getCurrentBranch(repo.path);
|
|
3631
3631
|
if (currentBranch !== persistedBranch) {
|
|
3632
|
-
await
|
|
3632
|
+
await this.checkoutWithoutHooks([persistedBranch], repo.path);
|
|
3633
3633
|
}
|
|
3634
3634
|
results.push({
|
|
3635
3635
|
name: repo.name,
|
|
@@ -3639,7 +3639,7 @@ var GitService = class {
|
|
|
3639
3639
|
});
|
|
3640
3640
|
continue;
|
|
3641
3641
|
}
|
|
3642
|
-
await
|
|
3642
|
+
await this.checkoutWithoutHooks([repo.defaultBranch], repo.path);
|
|
3643
3643
|
if (!skipNetworkRefresh) {
|
|
3644
3644
|
try {
|
|
3645
3645
|
await runGitCommand(["pull", "--rebase", "--autostash"], repo.path);
|
|
@@ -3647,7 +3647,7 @@ var GitService = class {
|
|
|
3647
3647
|
}
|
|
3648
3648
|
}
|
|
3649
3649
|
const branchName = await this.findAvailableBranchName(workspaceName, repo.path);
|
|
3650
|
-
await
|
|
3650
|
+
await this.checkoutWithoutHooks(["-b", branchName], repo.path);
|
|
3651
3651
|
await saveRepoState(repo.name, { currentBranch: branchName }, baselineState);
|
|
3652
3652
|
results.push({
|
|
3653
3653
|
name: repo.name,
|
|
@@ -3923,6 +3923,9 @@ var GitService = class {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
return `${sanitizedBaseName}-${Date.now()}`;
|
|
3925
3925
|
}
|
|
3926
|
+
checkoutWithoutHooks(args, cwd) {
|
|
3927
|
+
return runGitCommand(["-c", "core.hooksPath=/dev/null", "checkout", ...args], cwd);
|
|
3928
|
+
}
|
|
3926
3929
|
sanitizeBranchName(name) {
|
|
3927
3930
|
const normalized = name.toLowerCase().replace(/[^a-z0-9._/-]+/g, "-").replace(/\/{2,}/g, "/").replace(/^-+|-+$/g, "");
|
|
3928
3931
|
return normalized || "replicas";
|
|
@@ -7143,7 +7146,7 @@ var AspClient = class {
|
|
|
7143
7146
|
// src/managers/codex-asp/app-server-process.ts
|
|
7144
7147
|
var DEFAULT_CODEX_BINARY = "codex";
|
|
7145
7148
|
var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
7146
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
7149
|
+
var ENGINE_PACKAGE_VERSION = "0.1.321";
|
|
7147
7150
|
var INITIALIZE_METHOD = "initialize";
|
|
7148
7151
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
7149
7152
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|