@opengeni/config 0.7.10 → 0.7.11
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 +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +22 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/config",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "OpenGeni runtime configuration: settings resolution, deployment knobs, and config validation shared across the server packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@opengeni/codex": "^0.2.7",
|
|
37
|
-
"@opengeni/contracts": "^0.
|
|
37
|
+
"@opengeni/contracts": "^0.22.0",
|
|
38
38
|
"zod": "^4.2.1"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
package/src/index.ts
CHANGED
|
@@ -2787,9 +2787,14 @@ export function stableSandboxEnvironmentForRun(
|
|
|
2787
2787
|
};
|
|
2788
2788
|
// Backend-aware HOME: a provisioned box (docker + every cloud provider) runs the
|
|
2789
2789
|
// agent under the descriptor's workspaceRoot. `local` runs in-process as the host
|
|
2790
|
-
// unix user (keep its real $HOME); `
|
|
2790
|
+
// unix user (keep its real $HOME); `selfhosted` runs on a user's machine and must
|
|
2791
|
+
// likewise preserve that machine's real HOME; `none` has no box.
|
|
2791
2792
|
const descriptor = CAPABILITY_DESCRIPTORS[settings.sandboxBackend];
|
|
2792
|
-
if (
|
|
2793
|
+
if (
|
|
2794
|
+
settings.sandboxBackend !== "none" &&
|
|
2795
|
+
settings.sandboxBackend !== "local" &&
|
|
2796
|
+
settings.sandboxBackend !== "selfhosted"
|
|
2797
|
+
) {
|
|
2793
2798
|
environment.HOME ??= descriptor.workspaceRoot;
|
|
2794
2799
|
}
|
|
2795
2800
|
// TOKEN-BROKER (B1): the STABLE credential FILE PATHS and CLI wrapper PATH for
|
|
@@ -2810,7 +2815,15 @@ export function stableSandboxEnvironmentForRun(
|
|
|
2810
2815
|
environment.PATH = prependPathEntry(environment.PATH, environment.OPENGENI_GIT_CLI_WRAPPER_DIR);
|
|
2811
2816
|
}
|
|
2812
2817
|
if (settings.toolspaceEnabled) {
|
|
2813
|
-
|
|
2818
|
+
// Connected Machines do not share one control-plane-known home path. Keep a
|
|
2819
|
+
// stable shell-resolved pointer in the manifest; runtime expands this trusted
|
|
2820
|
+
// marker against the machine's own HOME for seed, renewal, and every command.
|
|
2821
|
+
// Never derive it from the selfhosted descriptor root (`/`), which would try
|
|
2822
|
+
// to write `/.opengeni` as an ordinary machine user.
|
|
2823
|
+
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??=
|
|
2824
|
+
settings.sandboxBackend === "selfhosted"
|
|
2825
|
+
? "$HOME/.opengeni/toolspace-token"
|
|
2826
|
+
: `${environment.HOME ?? descriptor.workspaceRoot}/.opengeni/toolspace-token`;
|
|
2814
2827
|
if (settings.ogtoolPackageSpec) {
|
|
2815
2828
|
environment.OPENGENI_OGTOOL_PACKAGE_SPEC ??= settings.ogtoolPackageSpec;
|
|
2816
2829
|
}
|
|
@@ -3230,6 +3243,7 @@ function positiveInt(value: unknown): number {
|
|
|
3230
3243
|
function ensureBuiltInMcpServers(settings: Settings): Settings["mcpServers"] {
|
|
3231
3244
|
const existing = settings.mcpServers.filter((server) => server.id !== "opengeni");
|
|
3232
3245
|
const firstPartyMcpUrl = firstPartyMcpServerUrl(settings);
|
|
3246
|
+
const firstPartyFilesMcpUrl = firstPartyFilesMcpServerUrl(firstPartyMcpUrl);
|
|
3233
3247
|
const firstPartyDocsMcpUrl = firstPartyDocumentsMcpServerUrl(firstPartyMcpUrl);
|
|
3234
3248
|
const hasFiles = existing.some((server) => server.id === "files");
|
|
3235
3249
|
const hasDocs = existing.some((server) => server.id === "docs");
|
|
@@ -3257,7 +3271,7 @@ function ensureBuiltInMcpServers(settings: Settings): Settings["mcpServers"] {
|
|
|
3257
3271
|
{
|
|
3258
3272
|
id: "files",
|
|
3259
3273
|
name: "Files",
|
|
3260
|
-
url:
|
|
3274
|
+
url: firstPartyFilesMcpUrl,
|
|
3261
3275
|
allowedTools: ["files_get_download_url"],
|
|
3262
3276
|
cacheToolsList: true,
|
|
3263
3277
|
},
|
|
@@ -3333,6 +3347,10 @@ function firstPartyDocumentsMcpServerUrl(mcpUrl: string): string {
|
|
|
3333
3347
|
return `${mcpUrl.replace(/\/+$/, "")}/docs`;
|
|
3334
3348
|
}
|
|
3335
3349
|
|
|
3350
|
+
function firstPartyFilesMcpServerUrl(mcpUrl: string): string {
|
|
3351
|
+
return `${mcpUrl.replace(/\/+$/, "")}/files`;
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3336
3354
|
function validateSettings(settings: Settings): void {
|
|
3337
3355
|
temporalConnectionOptions(settings);
|
|
3338
3356
|
if (settings.toolspaceEnabled && !settings.delegationSecret) {
|