replicas-engine 0.1.128 → 0.1.130
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 +123 -14
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -975,30 +975,44 @@ var PLANS = {
|
|
|
975
975
|
monthlyPrice: 0,
|
|
976
976
|
seatPriceCents: 0,
|
|
977
977
|
creditsIncluded: 20,
|
|
978
|
-
features: [
|
|
978
|
+
features: [
|
|
979
|
+
"20 hours of human-initiated workspace usage (one-time)",
|
|
980
|
+
"20 hours of API + automation usage (one-time)",
|
|
981
|
+
"Automations (limited to 2)",
|
|
982
|
+
"Warm pools and warm hooks",
|
|
983
|
+
"Up to 3 repositories"
|
|
984
|
+
]
|
|
979
985
|
},
|
|
980
986
|
developer: {
|
|
981
987
|
id: "developer",
|
|
982
988
|
name: "Developer",
|
|
983
|
-
monthlyPrice:
|
|
984
|
-
seatPriceCents:
|
|
989
|
+
monthlyPrice: 120,
|
|
990
|
+
seatPriceCents: 12e3,
|
|
985
991
|
creditsIncluded: 0,
|
|
986
|
-
features: [
|
|
992
|
+
features: [
|
|
993
|
+
"Unlimited human-initiated workspaces",
|
|
994
|
+
"5,000 included automation/API minutes per month",
|
|
995
|
+
"Up to 10 repositories",
|
|
996
|
+
"Up to 5 automations",
|
|
997
|
+
"Warm pools and warm hooks",
|
|
998
|
+
"API access"
|
|
999
|
+
]
|
|
987
1000
|
},
|
|
988
1001
|
team: {
|
|
989
1002
|
id: "team",
|
|
990
1003
|
name: "Team",
|
|
991
|
-
monthlyPrice:
|
|
992
|
-
seatPriceCents:
|
|
1004
|
+
monthlyPrice: 300,
|
|
1005
|
+
seatPriceCents: 3e4,
|
|
993
1006
|
creditsIncluded: 0,
|
|
994
1007
|
features: [
|
|
995
|
-
"Unlimited
|
|
1008
|
+
"Unlimited human-initiated workspaces",
|
|
1009
|
+
"15,000 included automation/API minutes per month",
|
|
1010
|
+
"Unlimited repositories",
|
|
996
1011
|
"Unlimited automations",
|
|
997
|
-
"API access",
|
|
998
1012
|
"Higher API rate limits",
|
|
999
|
-
"Warm
|
|
1000
|
-
"
|
|
1001
|
-
"
|
|
1013
|
+
"Warm pools and warm hooks",
|
|
1014
|
+
"Auto-upgraded sandbox resources (32 GB disk, 16 GB memory)",
|
|
1015
|
+
"Shared Slack support channel"
|
|
1002
1016
|
]
|
|
1003
1017
|
},
|
|
1004
1018
|
enterprise: {
|
|
@@ -1035,7 +1049,8 @@ var SANDBOX_PATHS = {
|
|
|
1035
1049
|
REPLICAS_FILES_DIR: "/home/ubuntu/.replicas/files",
|
|
1036
1050
|
REPLICAS_FILES_DISPLAY_DIR: "~/.replicas/files",
|
|
1037
1051
|
REPLICAS_RUNTIME_ENV_FILE: "/home/ubuntu/.replicas/runtime-env.sh",
|
|
1038
|
-
REPLICAS_PREVIEW_PORTS_FILE: "/home/ubuntu/.replicas/preview-ports.json"
|
|
1052
|
+
REPLICAS_PREVIEW_PORTS_FILE: "/home/ubuntu/.replicas/preview-ports.json",
|
|
1053
|
+
REPLICAS_MCPS_FILE: "/home/ubuntu/.replicas/mcps.json"
|
|
1039
1054
|
};
|
|
1040
1055
|
|
|
1041
1056
|
// ../shared/src/replicas-config.ts
|
|
@@ -1151,7 +1166,7 @@ function parseReplicasConfigString(content, filename) {
|
|
|
1151
1166
|
}
|
|
1152
1167
|
|
|
1153
1168
|
// ../shared/src/engine/environment.ts
|
|
1154
|
-
var DAYTONA_SNAPSHOT_ID = "
|
|
1169
|
+
var DAYTONA_SNAPSHOT_ID = "26-04-2026-islington-v2";
|
|
1155
1170
|
|
|
1156
1171
|
// ../shared/src/engine/types.ts
|
|
1157
1172
|
var DEFAULT_CHAT_TITLES = {
|
|
@@ -1165,6 +1180,12 @@ var IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
|
1165
1180
|
var WORKSPACE_FILE_UPLOAD_MAX_SIZE_BYTES = 20 * 1024 * 1024;
|
|
1166
1181
|
var WORKSPACE_FILE_CONTENT_MAX_SIZE_BYTES = 1 * 1024 * 1024;
|
|
1167
1182
|
|
|
1183
|
+
// ../shared/src/routes/environment.ts
|
|
1184
|
+
var RESERVED_MCP_NAME_PREFIXES = ["relay-", "replicas-"];
|
|
1185
|
+
function isReservedMcpName(name) {
|
|
1186
|
+
return RESERVED_MCP_NAME_PREFIXES.some((prefix) => name.startsWith(prefix));
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1168
1189
|
// src/services/environment-details-service.ts
|
|
1169
1190
|
import { mkdir as mkdir3, readFile as readFile2, writeFile as writeFile3 } from "fs/promises";
|
|
1170
1191
|
import { existsSync as existsSync3 } from "fs";
|
|
@@ -3700,6 +3721,92 @@ var KeepAliveService = class _KeepAliveService {
|
|
|
3700
3721
|
};
|
|
3701
3722
|
var keepAliveService = new KeepAliveService();
|
|
3702
3723
|
|
|
3724
|
+
// src/services/mcp-store.ts
|
|
3725
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
3726
|
+
var STDIO_INHERITED_ENV_KEYS = ["PATH", "HOME", "USER", "SHELL", "LANG", "LC_ALL"];
|
|
3727
|
+
var cache = {};
|
|
3728
|
+
var initialized = false;
|
|
3729
|
+
function buildStdioEnv(configEnv) {
|
|
3730
|
+
const merged = {};
|
|
3731
|
+
for (const key of STDIO_INHERITED_ENV_KEYS) {
|
|
3732
|
+
const value = process.env[key];
|
|
3733
|
+
if (value !== void 0) {
|
|
3734
|
+
merged[key] = value;
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
Object.assign(merged, configEnv);
|
|
3738
|
+
return merged;
|
|
3739
|
+
}
|
|
3740
|
+
function transformEntry(entry) {
|
|
3741
|
+
if (entry.transport === "stdio" && "command" in entry.config) {
|
|
3742
|
+
return {
|
|
3743
|
+
type: "stdio",
|
|
3744
|
+
command: entry.config.command,
|
|
3745
|
+
args: entry.config.args,
|
|
3746
|
+
env: buildStdioEnv(entry.config.env ?? {})
|
|
3747
|
+
};
|
|
3748
|
+
}
|
|
3749
|
+
if (entry.transport === "http" && "url" in entry.config) {
|
|
3750
|
+
return {
|
|
3751
|
+
type: "http",
|
|
3752
|
+
url: entry.config.url,
|
|
3753
|
+
headers: entry.config.headers
|
|
3754
|
+
};
|
|
3755
|
+
}
|
|
3756
|
+
if (entry.transport === "sse" && "url" in entry.config) {
|
|
3757
|
+
return {
|
|
3758
|
+
type: "sse",
|
|
3759
|
+
url: entry.config.url,
|
|
3760
|
+
headers: entry.config.headers
|
|
3761
|
+
};
|
|
3762
|
+
}
|
|
3763
|
+
return null;
|
|
3764
|
+
}
|
|
3765
|
+
function initializeMcpStore(filePath = SANDBOX_PATHS.REPLICAS_MCPS_FILE) {
|
|
3766
|
+
if (initialized) return;
|
|
3767
|
+
initialized = true;
|
|
3768
|
+
let raw;
|
|
3769
|
+
try {
|
|
3770
|
+
raw = readFileSync2(filePath, "utf-8");
|
|
3771
|
+
} catch (error) {
|
|
3772
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
3773
|
+
if (error.code === "ENOENT") {
|
|
3774
|
+
console.log(`[mcp_loaded] count=0 names=[] reason=no_file`);
|
|
3775
|
+
} else {
|
|
3776
|
+
console.warn(`[mcp_store_load_skipped] reason=${reason}`);
|
|
3777
|
+
}
|
|
3778
|
+
return;
|
|
3779
|
+
}
|
|
3780
|
+
let parsed;
|
|
3781
|
+
try {
|
|
3782
|
+
parsed = JSON.parse(raw);
|
|
3783
|
+
} catch (error) {
|
|
3784
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
3785
|
+
console.warn(`[mcp_store_load_failed] reason=parse_error detail=${reason}`);
|
|
3786
|
+
return;
|
|
3787
|
+
}
|
|
3788
|
+
const entries = parsed.mcpServers ?? {};
|
|
3789
|
+
const result = {};
|
|
3790
|
+
for (const [name, entry] of Object.entries(entries)) {
|
|
3791
|
+
if (isReservedMcpName(name)) {
|
|
3792
|
+
console.warn(`[mcp_name_reserved] name=${name} dropped`);
|
|
3793
|
+
continue;
|
|
3794
|
+
}
|
|
3795
|
+
const transformed = transformEntry(entry);
|
|
3796
|
+
if (!transformed) {
|
|
3797
|
+
console.warn(`[mcp_transport_unknown] name=${name} transport=${entry.transport ?? "undefined"}`);
|
|
3798
|
+
continue;
|
|
3799
|
+
}
|
|
3800
|
+
result[name] = transformed;
|
|
3801
|
+
}
|
|
3802
|
+
cache = result;
|
|
3803
|
+
const names = Object.keys(cache);
|
|
3804
|
+
console.log(`[mcp_loaded] count=${names.length} names=[${names.join(",")}]`);
|
|
3805
|
+
}
|
|
3806
|
+
function getMcpServers() {
|
|
3807
|
+
return cache;
|
|
3808
|
+
}
|
|
3809
|
+
|
|
3703
3810
|
// src/services/chat/errors.ts
|
|
3704
3811
|
var ChatNotFoundError = class extends Error {
|
|
3705
3812
|
constructor(chatId) {
|
|
@@ -3936,7 +4043,8 @@ var ChatService = class {
|
|
|
3936
4043
|
initialSessionId: persisted.providerSessionId,
|
|
3937
4044
|
onSaveSessionId: saveSession,
|
|
3938
4045
|
onTurnComplete: onProviderTurnComplete,
|
|
3939
|
-
onEvent: onProviderEvent
|
|
4046
|
+
onEvent: onProviderEvent,
|
|
4047
|
+
mcpServers: getMcpServers()
|
|
3940
4048
|
});
|
|
3941
4049
|
} else if (persisted.provider === "relay") {
|
|
3942
4050
|
provider = new RelayManager({
|
|
@@ -4908,6 +5016,7 @@ process.on("unhandledRejection", (reason) => {
|
|
|
4908
5016
|
engineLogger.flush().finally(() => process.exit(1));
|
|
4909
5017
|
});
|
|
4910
5018
|
await eventService.initialize();
|
|
5019
|
+
initializeMcpStore();
|
|
4911
5020
|
var READY_MESSAGE = "========= REPLICAS WORKSPACE READY ==========";
|
|
4912
5021
|
var COMPLETION_MESSAGE = "========= REPLICAS WORKSPACE INITIALIZATION COMPLETE ==========";
|
|
4913
5022
|
function checkActiveSSHSessions() {
|