sim-setup 1.0.72-dev.407.1 → 1.0.72-preview.409.1
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/index.js +14 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1388,8 +1388,7 @@ var init_env_capabilities = __esm(() => {
|
|
|
1388
1388
|
kind: "sandbox-release-generation",
|
|
1389
1389
|
message: SANDBOX_RELEASE_GENERATION_ERROR
|
|
1390
1390
|
}
|
|
1391
|
-
}))
|
|
1392
|
-
optionalFields: [envField("NEXT_PUBLIC_E2B_ENABLED")]
|
|
1391
|
+
}))
|
|
1393
1392
|
},
|
|
1394
1393
|
{
|
|
1395
1394
|
id: "daytona",
|
|
@@ -1403,8 +1402,7 @@ var init_env_capabilities = __esm(() => {
|
|
|
1403
1402
|
kind: "immutable-daytona-snapshot-ref",
|
|
1404
1403
|
message: IMMUTABLE_DAYTONA_SNAPSHOT_REF_ERROR
|
|
1405
1404
|
}
|
|
1406
|
-
}))
|
|
1407
|
-
optionalFields: [envField("NEXT_PUBLIC_E2B_ENABLED")]
|
|
1405
|
+
}))
|
|
1408
1406
|
}
|
|
1409
1407
|
]
|
|
1410
1408
|
});
|
|
@@ -1639,7 +1637,6 @@ var init_env_capabilities = __esm(() => {
|
|
|
1639
1637
|
"COPILOT_API_KEY",
|
|
1640
1638
|
"EMAIL_VERIFICATION_ENABLED",
|
|
1641
1639
|
"NEXT_PUBLIC_CHAT_DISABLED",
|
|
1642
|
-
"NEXT_PUBLIC_E2B_ENABLED",
|
|
1643
1640
|
"SIM_AGENT_API_URL",
|
|
1644
1641
|
...Object.values(LLM_KEY_POOLS).flatMap((pool) => [
|
|
1645
1642
|
...pool.keys,
|
|
@@ -2422,9 +2419,6 @@ var init_capability_config = __esm(() => {
|
|
|
2422
2419
|
disabled: {
|
|
2423
2420
|
label: "Disabled",
|
|
2424
2421
|
hint: "local JavaScript execution only",
|
|
2425
|
-
env: {
|
|
2426
|
-
NEXT_PUBLIC_E2B_ENABLED: "false"
|
|
2427
|
-
},
|
|
2428
2422
|
currentWhen: {
|
|
2429
2423
|
kind: "all",
|
|
2430
2424
|
conditions: [
|
|
@@ -2444,9 +2438,6 @@ var init_capability_config = __esm(() => {
|
|
|
2444
2438
|
providers: {
|
|
2445
2439
|
e2b: {
|
|
2446
2440
|
hint: "dedicated Function code and CLI sandboxes",
|
|
2447
|
-
env: {
|
|
2448
|
-
NEXT_PUBLIC_E2B_ENABLED: "true"
|
|
2449
|
-
},
|
|
2450
2441
|
prompts: [
|
|
2451
2442
|
{ type: "field", key: "E2B_API_KEY", input: "secret", required: true },
|
|
2452
2443
|
{
|
|
@@ -2470,9 +2461,6 @@ var init_capability_config = __esm(() => {
|
|
|
2470
2461
|
},
|
|
2471
2462
|
daytona: {
|
|
2472
2463
|
hint: "dedicated Function code and CLI sandboxes",
|
|
2473
|
-
env: {
|
|
2474
|
-
NEXT_PUBLIC_E2B_ENABLED: "false"
|
|
2475
|
-
},
|
|
2476
2464
|
prompts: [
|
|
2477
2465
|
{
|
|
2478
2466
|
type: "field",
|
|
@@ -3032,21 +3020,6 @@ function inspectSandbox(values) {
|
|
|
3032
3020
|
const requestedProvider = readConfiguredString(values, SANDBOX_CAPABILITY.selectorKey) ?? SANDBOX_CAPABILITY.defaultProvider.id;
|
|
3033
3021
|
const providerId = inspection.providerId === "e2b" && !isTruthyEnvCapabilityValue(values, "E2B_ENABLED") ? "disabled" : inspection.providerId;
|
|
3034
3022
|
if (!inspection.error) {
|
|
3035
|
-
const coherenceProblems = [];
|
|
3036
|
-
if (isTruthyEnvCapabilityValue(values, "E2B_ENABLED") !== isTruthyEnvCapabilityValue(values, "NEXT_PUBLIC_E2B_ENABLED")) {
|
|
3037
|
-
coherenceProblems.push("E2B_ENABLED and NEXT_PUBLIC_E2B_ENABLED disagree");
|
|
3038
|
-
}
|
|
3039
|
-
if (coherenceProblems.length > 0) {
|
|
3040
|
-
return {
|
|
3041
|
-
...featureMetadata("sandbox"),
|
|
3042
|
-
state: "partial",
|
|
3043
|
-
providerId,
|
|
3044
|
-
issue: {
|
|
3045
|
-
state: "partial",
|
|
3046
|
-
message: `${coherenceProblems.join("; ")}. Server and browser configuration must match.`
|
|
3047
|
-
}
|
|
3048
|
-
};
|
|
3049
|
-
}
|
|
3050
3023
|
return {
|
|
3051
3024
|
...featureMetadata("sandbox"),
|
|
3052
3025
|
state: providerId === "disabled" ? "default" : "configured",
|
|
@@ -6006,16 +5979,9 @@ var init_enterprise_features = __esm(() => {
|
|
|
6006
5979
|
});
|
|
6007
5980
|
|
|
6008
5981
|
// src/twins.ts
|
|
6009
|
-
var
|
|
5982
|
+
var FORMERLY_TWINNED_FEATURES, FORMERLY_TWINNED_SWITCHES, INERT_BROWSER_FLAGS, SELF_HOST_UNLOCKS, LOGIN_PROVIDERS;
|
|
6010
5983
|
var init_twins = __esm(() => {
|
|
6011
5984
|
init_enterprise_features();
|
|
6012
|
-
FLAG_TWINS = [
|
|
6013
|
-
{ server: "BILLING_ENABLED", client: "NEXT_PUBLIC_BILLING_ENABLED" },
|
|
6014
|
-
{ server: "DISABLE_INVITATIONS", client: "NEXT_PUBLIC_DISABLE_INVITATIONS" },
|
|
6015
|
-
{ server: "DISABLE_PUBLIC_API", client: "NEXT_PUBLIC_DISABLE_PUBLIC_API" },
|
|
6016
|
-
{ server: "E2B_ENABLED", client: "NEXT_PUBLIC_E2B_ENABLED" },
|
|
6017
|
-
{ server: "SLACK_EXTENDED_SCOPES", client: "NEXT_PUBLIC_SLACK_EXTENDED_SCOPES" }
|
|
6018
|
-
];
|
|
6019
5985
|
FORMERLY_TWINNED_FEATURES = [
|
|
6020
5986
|
"sso",
|
|
6021
5987
|
"scim",
|
|
@@ -6030,10 +5996,18 @@ var init_twins = __esm(() => {
|
|
|
6030
5996
|
"organizations",
|
|
6031
5997
|
"inbox"
|
|
6032
5998
|
];
|
|
5999
|
+
FORMERLY_TWINNED_SWITCHES = [
|
|
6000
|
+
"BILLING_ENABLED",
|
|
6001
|
+
"DISABLE_INVITATIONS",
|
|
6002
|
+
"DISABLE_PUBLIC_API",
|
|
6003
|
+
"E2B_ENABLED",
|
|
6004
|
+
"SLACK_EXTENDED_SCOPES"
|
|
6005
|
+
];
|
|
6033
6006
|
INERT_BROWSER_FLAGS = [
|
|
6034
6007
|
...[
|
|
6035
6008
|
ENTERPRISE_MASTER_ENV_VAR,
|
|
6036
|
-
...FORMERLY_TWINNED_FEATURES.map((key) => ENTERPRISE_FEATURES[key].envVar)
|
|
6009
|
+
...FORMERLY_TWINNED_FEATURES.map((key) => ENTERPRISE_FEATURES[key].envVar),
|
|
6010
|
+
...FORMERLY_TWINNED_SWITCHES
|
|
6037
6011
|
].map((server) => ({ server, client: `NEXT_PUBLIC_${server}` })),
|
|
6038
6012
|
{ client: "NEXT_PUBLIC_SANDBOXES_ENABLED" }
|
|
6039
6013
|
];
|
|
@@ -6348,23 +6322,6 @@ function checkCoherence(ctx) {
|
|
|
6348
6322
|
fix: getSetupCommand(STORAGE_CAPABILITY.id)
|
|
6349
6323
|
});
|
|
6350
6324
|
}
|
|
6351
|
-
for (const { server, client } of FLAG_TWINS) {
|
|
6352
|
-
const serverValue = sim.vars.get(server);
|
|
6353
|
-
const clientValue = sim.vars.get(client);
|
|
6354
|
-
const bothUnset = serverValue === undefined && clientValue === undefined;
|
|
6355
|
-
if (bothUnset || isTruthy(serverValue) === isTruthy(clientValue))
|
|
6356
|
-
continue;
|
|
6357
|
-
const setSide = serverValue !== undefined ? server : client;
|
|
6358
|
-
const missingSide = serverValue !== undefined ? client : server;
|
|
6359
|
-
const value = serverValue ?? clientValue ?? "";
|
|
6360
|
-
findings.push({
|
|
6361
|
-
group: "coherence",
|
|
6362
|
-
status: "fail",
|
|
6363
|
-
message: `${setSide} is set but its twin ${missingSide} disagrees — server and browser will render different features`,
|
|
6364
|
-
fix: `doctor --fix sets ${missingSide}=${value}`,
|
|
6365
|
-
autofix: () => writeEnvValues(sim.target, { [missingSide]: value })
|
|
6366
|
-
});
|
|
6367
|
-
}
|
|
6368
6325
|
findings.push(...checkRegistrationMode(sim));
|
|
6369
6326
|
for (const { server, client } of INERT_BROWSER_FLAGS) {
|
|
6370
6327
|
const clientValue = sim.vars.get(client);
|
|
@@ -6426,8 +6383,7 @@ function checkCoherence(ctx) {
|
|
|
6426
6383
|
{
|
|
6427
6384
|
flag: "SLACK_EXTENDED_SCOPES",
|
|
6428
6385
|
needs: ["SLACK_SIGNING_SECRET"],
|
|
6429
|
-
label: "native Slack triggers"
|
|
6430
|
-
disableFields: ["SLACK_EXTENDED_SCOPES", "NEXT_PUBLIC_SLACK_EXTENDED_SCOPES"]
|
|
6386
|
+
label: "native Slack triggers"
|
|
6431
6387
|
},
|
|
6432
6388
|
{ flag: "SSO_ENABLED", needs: ["SSO_ISSUER"], label: "SSO" }
|
|
6433
6389
|
];
|
|
@@ -6440,7 +6396,7 @@ function checkCoherence(ctx) {
|
|
|
6440
6396
|
group: "coherence",
|
|
6441
6397
|
status: "fail",
|
|
6442
6398
|
message: `${rule.flag} is on but ${missing.join(", ")} is not set — ${rule.label} will fail at runtime`,
|
|
6443
|
-
fix: `set ${missing.join(", ")} or remove ${
|
|
6399
|
+
fix: `set ${missing.join(", ")} or remove ${rule.flag}`
|
|
6444
6400
|
});
|
|
6445
6401
|
}
|
|
6446
6402
|
}
|