@opengeni/config 0.7.10 → 0.7.13
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.d.ts +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +28 -8
package/dist/index.d.ts
CHANGED
|
@@ -116,7 +116,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
116
116
|
delegationSecret: z.ZodOptional<z.ZodString>;
|
|
117
117
|
streamTokenSecret: z.ZodOptional<z.ZodString>;
|
|
118
118
|
streamControlEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
119
|
-
sessionTurnToolReplacementEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
120
119
|
toolspaceEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
121
120
|
toolspaceMaxCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
122
121
|
ogtoolPackageSpec: z.ZodOptional<z.ZodString>;
|
|
@@ -207,6 +206,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
207
206
|
dockerImage: z.ZodDefault<z.ZodString>;
|
|
208
207
|
dockerExposedPorts: z.ZodDefault<z.ZodString>;
|
|
209
208
|
dockerNetwork: z.ZodOptional<z.ZodString>;
|
|
209
|
+
dockerWorkspaceBaseDir: z.ZodOptional<z.ZodString>;
|
|
210
210
|
modalAppName: z.ZodDefault<z.ZodString>;
|
|
211
211
|
modalImageRef: z.ZodOptional<z.ZodString>;
|
|
212
212
|
modalImageRegistrySecret: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -200,9 +200,6 @@ var SettingsSchema = z.object({
|
|
|
200
200
|
// holder of stream:control gets 403 until this flips. Keeps stream:control a
|
|
201
201
|
// declared-but-inert permission so later hardening is a flag flip.
|
|
202
202
|
streamControlEnabled: EnvBoolean.default(false),
|
|
203
|
-
// Existing-session explicit tool replacement is gated until every API and
|
|
204
|
-
// worker instance understands durable tools_provided provenance.
|
|
205
|
-
sessionTurnToolReplacementEnabled: EnvBoolean.default(false),
|
|
206
203
|
toolspaceEnabled: EnvBoolean.default(false),
|
|
207
204
|
toolspaceMaxCallsPerTurn: z.coerce.number().int().positive().default(200),
|
|
208
205
|
// Optional release-coherent bootstrap hint for custom rigs/connected machines
|
|
@@ -362,6 +359,11 @@ var SettingsSchema = z.object({
|
|
|
362
359
|
dockerImage: z.string().default("opengeni-sandbox:local"),
|
|
363
360
|
dockerExposedPorts: z.string().default(""),
|
|
364
361
|
dockerNetwork: z.string().optional(),
|
|
362
|
+
// When the worker itself runs in a container and talks to a host Docker daemon,
|
|
363
|
+
// this directory must be bind-mounted at the exact same absolute path on both
|
|
364
|
+
// sides. The Agents SDK materializes the workspace here before bind-mounting it
|
|
365
|
+
// into the sandbox container.
|
|
366
|
+
dockerWorkspaceBaseDir: z.string().min(1).optional(),
|
|
365
367
|
modalAppName: z.string().default("opengeni-sandbox"),
|
|
366
368
|
modalImageRef: z.string().optional(),
|
|
367
369
|
// Name of a Modal Secret (containing REGISTRY_USERNAME + REGISTRY_PASSWORD) used
|
|
@@ -1114,7 +1116,6 @@ function getSettings() {
|
|
|
1114
1116
|
delegationSecret: optional("OPENGENI_DELEGATION_SECRET"),
|
|
1115
1117
|
streamTokenSecret: optional("OPENGENI_STREAM_TOKEN_SECRET"),
|
|
1116
1118
|
streamControlEnabled: optional("OPENGENI_STREAM_CONTROL_ENABLED"),
|
|
1117
|
-
sessionTurnToolReplacementEnabled: optional("OPENGENI_SESSION_TURN_TOOL_REPLACEMENT_ENABLED"),
|
|
1118
1119
|
toolspaceEnabled: optional("OPENGENI_TOOLSPACE_ENABLED"),
|
|
1119
1120
|
toolspaceMaxCallsPerTurn: optional("OPENGENI_TOOLSPACE_MAX_CALLS_PER_TURN"),
|
|
1120
1121
|
ogtoolPackageSpec: optional("OPENGENI_OGTOOL_PACKAGE_SPEC"),
|
|
@@ -1178,6 +1179,7 @@ function getSettings() {
|
|
|
1178
1179
|
dockerImage: optional("OPENGENI_DOCKER_IMAGE"),
|
|
1179
1180
|
dockerExposedPorts: optional("OPENGENI_DOCKER_EXPOSED_PORTS"),
|
|
1180
1181
|
dockerNetwork: optional("OPENGENI_DOCKER_NETWORK"),
|
|
1182
|
+
dockerWorkspaceBaseDir: optional("OPENGENI_DOCKER_WORKSPACE_BASE_DIR"),
|
|
1181
1183
|
modalAppName: optional("OPENGENI_MODAL_APP_NAME"),
|
|
1182
1184
|
modalImageRef: optional("OPENGENI_MODAL_IMAGE_REF"),
|
|
1183
1185
|
modalImageRegistrySecret: optional("OPENGENI_MODAL_IMAGE_REGISTRY_SECRET"),
|
|
@@ -2133,7 +2135,7 @@ function stableSandboxEnvironmentForRun(settings, workspaceEnvironment = {}, opt
|
|
|
2133
2135
|
...workspaceEnvironment
|
|
2134
2136
|
};
|
|
2135
2137
|
const descriptor = CAPABILITY_DESCRIPTORS[settings.sandboxBackend];
|
|
2136
|
-
if (settings.sandboxBackend !== "none" && settings.sandboxBackend !== "local") {
|
|
2138
|
+
if (settings.sandboxBackend !== "none" && settings.sandboxBackend !== "local" && settings.sandboxBackend !== "selfhosted") {
|
|
2137
2139
|
environment.HOME ??= descriptor.workspaceRoot;
|
|
2138
2140
|
}
|
|
2139
2141
|
const provisionedGitHelperBackend = settings.sandboxBackend !== "none" && settings.sandboxBackend !== "local" && settings.sandboxBackend !== "selfhosted";
|
|
@@ -2145,7 +2147,7 @@ function stableSandboxEnvironmentForRun(settings, workspaceEnvironment = {}, opt
|
|
|
2145
2147
|
environment.PATH = prependPathEntry(environment.PATH, environment.OPENGENI_GIT_CLI_WRAPPER_DIR);
|
|
2146
2148
|
}
|
|
2147
2149
|
if (settings.toolspaceEnabled) {
|
|
2148
|
-
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??= `${environment.HOME ?? descriptor.workspaceRoot}/.opengeni/toolspace-token`;
|
|
2150
|
+
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??= settings.sandboxBackend === "selfhosted" ? "$HOME/.opengeni/toolspace-token" : `${environment.HOME ?? descriptor.workspaceRoot}/.opengeni/toolspace-token`;
|
|
2149
2151
|
if (settings.ogtoolPackageSpec) {
|
|
2150
2152
|
environment.OPENGENI_OGTOOL_PACKAGE_SPEC ??= settings.ogtoolPackageSpec;
|
|
2151
2153
|
}
|
|
@@ -2445,6 +2447,7 @@ function positiveInt(value) {
|
|
|
2445
2447
|
function ensureBuiltInMcpServers(settings) {
|
|
2446
2448
|
const existing = settings.mcpServers.filter((server) => server.id !== "opengeni");
|
|
2447
2449
|
const firstPartyMcpUrl = firstPartyMcpServerUrl(settings);
|
|
2450
|
+
const firstPartyFilesMcpUrl = firstPartyFilesMcpServerUrl(firstPartyMcpUrl);
|
|
2448
2451
|
const firstPartyDocsMcpUrl = firstPartyDocumentsMcpServerUrl(firstPartyMcpUrl);
|
|
2449
2452
|
const hasFiles = existing.some((server) => server.id === "files");
|
|
2450
2453
|
const hasDocs = existing.some((server) => server.id === "docs");
|
|
@@ -2470,7 +2473,7 @@ function ensureBuiltInMcpServers(settings) {
|
|
|
2470
2473
|
{
|
|
2471
2474
|
id: "files",
|
|
2472
2475
|
name: "Files",
|
|
2473
|
-
url:
|
|
2476
|
+
url: firstPartyFilesMcpUrl,
|
|
2474
2477
|
allowedTools: ["files_get_download_url"],
|
|
2475
2478
|
cacheToolsList: true
|
|
2476
2479
|
}
|
|
@@ -2515,6 +2518,9 @@ function firstPartyMcpServerUrl(settings) {
|
|
|
2515
2518
|
function firstPartyDocumentsMcpServerUrl(mcpUrl) {
|
|
2516
2519
|
return `${mcpUrl.replace(/\/+$/, "")}/docs`;
|
|
2517
2520
|
}
|
|
2521
|
+
function firstPartyFilesMcpServerUrl(mcpUrl) {
|
|
2522
|
+
return `${mcpUrl.replace(/\/+$/, "")}/files`;
|
|
2523
|
+
}
|
|
2518
2524
|
function validateSettings(settings) {
|
|
2519
2525
|
temporalConnectionOptions(settings);
|
|
2520
2526
|
if (settings.toolspaceEnabled && !settings.delegationSecret) {
|