@opengeni/worker-bundle 0.20.1 → 0.22.0-canary.0
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/activities/agent-turn/admission.d.ts +52 -0
- package/dist/activities/agent-turn/agent-build.d.ts +89 -0
- package/dist/activities/agent-turn/claim.d.ts +67 -0
- package/dist/activities/agent-turn/codex-capacity.d.ts +40 -0
- package/dist/activities/agent-turn/codex.d.ts +32 -0
- package/dist/activities/agent-turn/compaction-prep.d.ts +88 -0
- package/dist/activities/agent-turn/credential-leases.d.ts +56 -0
- package/dist/activities/agent-turn/errors.d.ts +253 -0
- package/dist/activities/agent-turn/failure-settlement.d.ts +33 -0
- package/dist/activities/agent-turn/file-resources.d.ts +37 -0
- package/dist/activities/agent-turn/finalization.d.ts +42 -0
- package/dist/activities/agent-turn/github-repository-bindings.d.ts +105 -0
- package/dist/activities/agent-turn/governance-model.d.ts +66 -0
- package/dist/activities/agent-turn/history-sink.d.ts +52 -0
- package/dist/activities/agent-turn/history.d.ts +63 -0
- package/dist/activities/agent-turn/media-artifacts.d.ts +145 -0
- package/dist/activities/agent-turn/model-usage.d.ts +218 -0
- package/dist/activities/agent-turn/quiescence.d.ts +135 -0
- package/dist/activities/agent-turn/run-credentials.d.ts +84 -0
- package/dist/activities/agent-turn/run.d.ts +3 -0
- package/dist/activities/agent-turn/sandbox-establish.d.ts +93 -0
- package/dist/activities/agent-turn/sandbox-provision.d.ts +89 -0
- package/dist/activities/agent-turn/sandbox-route.d.ts +151 -0
- package/dist/activities/agent-turn/sandbox-runtime.d.ts +44 -0
- package/dist/activities/agent-turn/stream-attempt.d.ts +107 -0
- package/dist/activities/agent-turn/tool-environment.d.ts +142 -0
- package/dist/activities/agent-turn/tool-policy.d.ts +127 -0
- package/dist/activities/agent-turn/tool-result-spill.d.ts +59 -0
- package/dist/activities/agent-turn/turn-context.d.ts +144 -0
- package/dist/activities/agent-turn/xai-capacity.d.ts +2 -0
- package/dist/activities/agent-turn.d.ts +12 -954
- package/dist/activities/automations.d.ts +16 -0
- package/dist/activities/common.d.ts +1 -1
- package/dist/activities/connector-attachments.d.ts +13 -0
- package/dist/activities/documents.d.ts +1 -0
- package/dist/activities/environment.d.ts +26 -15
- package/dist/activities/generated-images.d.ts +1 -1
- package/dist/activities/git-credential-renewal.d.ts +3 -1
- package/dist/activities/goals.d.ts +4 -1
- package/dist/activities/google-drive-provider.d.ts +29 -0
- package/dist/activities/google-drive-publication.d.ts +66 -0
- package/dist/activities/image-generation-references.d.ts +2 -0
- package/dist/activities/incident-telemetry-authority.d.ts +52 -0
- package/dist/activities/incident-telemetry-preflight.d.ts +71 -0
- package/dist/activities/knowledge-source-sync-driver.d.ts +21 -0
- package/dist/activities/knowledge-source-sync.d.ts +33 -1
- package/dist/activities/mcp-credentials.d.ts +9 -3
- package/dist/activities/open-suffix-resume.d.ts +77 -0
- package/dist/activities/packs.d.ts +3 -11
- package/dist/activities/parent-wake.d.ts +19 -0
- package/dist/activities/retained-screenshot-reaper.d.ts +1 -1
- package/dist/activities/retained-screenshots.d.ts +1 -1
- package/dist/activities/rig-verification.d.ts +1 -1
- package/dist/activities/run-input.d.ts +16 -7
- package/dist/activities/sandbox-images.d.ts +1 -14
- package/dist/activities/sandbox-lease.d.ts +21 -3
- package/dist/activities/scheduled-tasks.d.ts +47 -0
- package/dist/activities/types.d.ts +23 -2
- package/dist/activities/video-media-validation.d.ts +1 -1
- package/dist/activities/video-output-retention.d.ts +1 -2
- package/dist/activities/xai-auth.d.ts +3 -0
- package/dist/{activities-control-SMKF2OBE.js → activities-control-DKG22ONJ.js} +2946 -549
- package/dist/activities-control-DKG22ONJ.js.map +1 -0
- package/dist/activities-control.d.ts +6 -2
- package/dist/activities-turn-4IMC3MAA.js +21326 -0
- package/dist/activities-turn-4IMC3MAA.js.map +1 -0
- package/dist/activities.d.ts +7 -3
- package/dist/artifact-materializer-entry.js +41 -22
- package/dist/artifact-materializer-entry.js.map +1 -1
- package/dist/{chunk-N5TJIFCE.js → chunk-CE7TPKBS.js} +468 -1
- package/dist/chunk-CE7TPKBS.js.map +1 -0
- package/dist/chunk-CNYGVRKF.js +4698 -0
- package/dist/chunk-CNYGVRKF.js.map +1 -0
- package/dist/connection-provider-use.d.ts +18 -0
- package/dist/editable-artifact-materializer.d.ts +4 -3
- package/dist/github-rest-mcp.d.ts +26 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +58 -14
- package/dist/index.js.map +1 -1
- package/dist/knowledge-source-sync-activity-policy.d.ts +2 -0
- package/dist/model-context-contributions.d.ts +8 -4
- package/dist/observability-metrics.d.ts +63 -4
- package/dist/opensandbox-kubernetes-inventory.d.ts +21 -0
- package/dist/personal-github-git-credentials.d.ts +9 -0
- package/dist/pr-review-credentials.d.ts +6 -0
- package/dist/sandbox-archive-storage.d.ts +45 -0
- package/dist/sandbox-resume.d.ts +65 -6
- package/dist/sandbox-routing.d.ts +38 -2
- package/dist/scheduled-alert-occurrence.d.ts +33 -0
- package/dist/workflow-bundle.js +87 -28
- package/dist/workflows/activities.d.ts +1 -0
- package/dist/workflows/automations.d.ts +6 -0
- package/dist/workflows/document-index.d.ts +1 -0
- package/dist/workflows.d.ts +1 -0
- package/package.json +17 -17
- package/src/activities/agent-turn/admission.ts +292 -0
- package/src/activities/agent-turn/agent-build.ts +802 -0
- package/src/activities/agent-turn/claim.ts +590 -0
- package/src/activities/agent-turn/codex-capacity.ts +720 -0
- package/src/activities/agent-turn/codex.ts +94 -0
- package/src/activities/agent-turn/compaction-prep.ts +722 -0
- package/src/activities/agent-turn/credential-leases.ts +240 -0
- package/src/activities/agent-turn/errors.ts +1068 -0
- package/src/activities/agent-turn/failure-settlement.ts +1436 -0
- package/src/activities/agent-turn/file-resources.ts +227 -0
- package/src/activities/agent-turn/finalization.ts +754 -0
- package/src/activities/agent-turn/github-repository-bindings.ts +300 -0
- package/src/activities/agent-turn/governance-model.ts +465 -0
- package/src/activities/agent-turn/history-sink.ts +139 -0
- package/src/activities/agent-turn/history.ts +200 -0
- package/src/activities/agent-turn/media-artifacts.ts +359 -0
- package/src/activities/agent-turn/model-usage.ts +823 -0
- package/src/activities/agent-turn/quiescence.ts +353 -0
- package/src/activities/agent-turn/run-credentials.ts +761 -0
- package/src/activities/agent-turn/run.ts +1530 -0
- package/src/activities/agent-turn/sandbox-establish.ts +1207 -0
- package/src/activities/agent-turn/sandbox-provision.ts +569 -0
- package/src/activities/agent-turn/sandbox-route.ts +358 -0
- package/src/activities/agent-turn/sandbox-runtime.ts +731 -0
- package/src/activities/agent-turn/stream-attempt.ts +1670 -0
- package/src/activities/agent-turn/tool-environment.ts +729 -0
- package/src/activities/agent-turn/tool-policy.ts +216 -0
- package/src/activities/agent-turn/tool-result-spill.ts +265 -0
- package/src/activities/agent-turn/turn-context.ts +281 -0
- package/src/activities/agent-turn/xai-capacity.ts +229 -0
- package/src/activities/agent-turn.ts +12 -12575
- package/src/activities/api-integrations.ts +3 -0
- package/src/activities/automations.ts +214 -0
- package/src/activities/codemode-dispatcher.ts +12 -1
- package/src/activities/common.ts +1 -5
- package/src/activities/connector-attachments.ts +168 -0
- package/src/activities/context-compaction.ts +18 -0
- package/src/activities/documents.ts +6 -4
- package/src/activities/environment.ts +151 -55
- package/src/activities/generated-images.ts +26 -11
- package/src/activities/git-credential-renewal.ts +13 -3
- package/src/activities/goals.ts +85 -19
- package/src/activities/google-drive-provider.ts +178 -0
- package/src/activities/google-drive-publication.ts +938 -0
- package/src/activities/image-generation-references.ts +11 -2
- package/src/activities/incident-telemetry-authority.ts +327 -0
- package/src/activities/incident-telemetry-preflight.ts +317 -0
- package/src/activities/knowledge-source-sync-driver.ts +23 -0
- package/src/activities/knowledge-source-sync.ts +556 -40
- package/src/activities/mcp-credentials.ts +191 -17
- package/src/activities/open-suffix-resume.ts +422 -0
- package/src/activities/packs.ts +12 -60
- package/src/activities/parent-wake.ts +64 -14
- package/src/activities/retained-screenshot-reaper.ts +6 -3
- package/src/activities/retained-screenshots.ts +15 -47
- package/src/activities/rig-verification.ts +1 -1
- package/src/activities/run-input.ts +128 -136
- package/src/activities/sandbox-images.ts +7 -166
- package/src/activities/sandbox-lease.ts +406 -15
- package/src/activities/scheduled-tasks.ts +2103 -411
- package/src/activities/session-state.ts +10 -2
- package/src/activities/types.ts +32 -2
- package/src/activities/video-media-validation.ts +3 -3
- package/src/activities/video-output-retention.ts +2 -57
- package/src/activities/xai-auth.ts +8 -0
- package/src/activities-control.ts +2 -0
- package/src/activities.ts +3 -0
- package/src/activity-services.ts +13 -4
- package/src/connection-provider-use.ts +36 -0
- package/src/editable-artifact-materializer-subprocess.ts +25 -14
- package/src/editable-artifact-materializer.ts +29 -18
- package/src/github-rest-mcp.ts +713 -0
- package/src/http.ts +16 -6
- package/src/index.ts +40 -5
- package/src/knowledge-source-sync-activity-policy.ts +2 -0
- package/src/model-context-contributions.ts +33 -10
- package/src/observability-metrics.ts +357 -0
- package/src/opensandbox-kubernetes-inventory.ts +292 -0
- package/src/personal-github-git-credentials.ts +331 -0
- package/src/pr-review-credentials.ts +163 -0
- package/src/sandbox-archive-storage.ts +159 -0
- package/src/sandbox-resume.ts +449 -63
- package/src/sandbox-routing.ts +314 -16
- package/src/scheduled-alert-occurrence.ts +176 -0
- package/src/workflows/activities.ts +18 -2
- package/src/workflows/automations.ts +11 -0
- package/src/workflows/session.ts +13 -3
- package/src/workflows.ts +1 -0
- package/dist/activities-control-SMKF2OBE.js.map +0 -1
- package/dist/activities-turn-IDS3WEHA.js +0 -16532
- package/dist/activities-turn-IDS3WEHA.js.map +0 -1
- package/dist/chunk-N5TJIFCE.js.map +0 -1
- package/dist/chunk-P6Z2SLAA.js +0 -3092
- package/dist/chunk-P6Z2SLAA.js.map +0 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFilesForSubject,
|
|
3
|
+
requireFileForSubject,
|
|
4
|
+
areGitHubRepositoriesAllowedForWorkspace,
|
|
5
|
+
} from "@opengeni/db";
|
|
6
|
+
import { type SandboxFileDownload, type SandboxFileDownloadFailure } from "@opengeni/runtime";
|
|
7
|
+
import { type Settings } from "@opengeni/config";
|
|
8
|
+
import { mergeResourceRefs } from "../common";
|
|
9
|
+
import {
|
|
10
|
+
gitHubTokenAuthorizationSelections,
|
|
11
|
+
type GitHubTokenMintAuthorization,
|
|
12
|
+
} from "../environment";
|
|
13
|
+
import type { TurnActivityServices as ActivityServices } from "../types";
|
|
14
|
+
import { createObjectStorage, type ObjectStorage } from "@opengeni/storage";
|
|
15
|
+
import { CAPABILITY_DESCRIPTORS, resourceMountPath, type ResourceRef } from "@opengeni/contracts";
|
|
16
|
+
|
|
17
|
+
export function filterUnmaterializedSandboxFileDownloads(
|
|
18
|
+
downloads: SandboxFileDownload[],
|
|
19
|
+
materializedFileIds: Set<string>,
|
|
20
|
+
): SandboxFileDownload[] {
|
|
21
|
+
if (downloads.length === 0 || materializedFileIds.size === 0) {
|
|
22
|
+
return downloads;
|
|
23
|
+
}
|
|
24
|
+
return downloads.filter((download) => !materializedFileIds.has(download.fileId));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function runtimeResourcesForTurn(
|
|
28
|
+
sessionResources: readonly ResourceRef[],
|
|
29
|
+
currentTurnResources: readonly ResourceRef[],
|
|
30
|
+
): ResourceRef[] {
|
|
31
|
+
return mergeResourceRefs(
|
|
32
|
+
sessionResources.filter((resource) => resource.kind !== "file"),
|
|
33
|
+
[...currentTurnResources],
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function sandboxFileMaterializationOutcome(
|
|
38
|
+
failures: readonly SandboxFileDownloadFailure[],
|
|
39
|
+
): "completed" | "failed" {
|
|
40
|
+
return failures.length === 0 ? "completed" : "failed";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Fixed-length one-way tenant correlation for metrics/alerts; never a raw id. */
|
|
44
|
+
export async function assertGitHubResourcesRemainAuthorized(
|
|
45
|
+
db: Parameters<typeof areGitHubRepositoriesAllowedForWorkspace>[0],
|
|
46
|
+
workspaceId: string,
|
|
47
|
+
resources: ResourceRef[],
|
|
48
|
+
authorize?: GitHubTokenMintAuthorization,
|
|
49
|
+
): Promise<void> {
|
|
50
|
+
// Must check exactly what sandboxEnvironmentForRun would mint a token for,
|
|
51
|
+
// so the selection is derived from the same extraction as the mint path.
|
|
52
|
+
for (const selection of gitHubTokenAuthorizationSelections(resources)) {
|
|
53
|
+
if (authorize) {
|
|
54
|
+
await authorize(selection);
|
|
55
|
+
} else {
|
|
56
|
+
await assertGitHubTokenMintSelectionAuthorized(
|
|
57
|
+
db,
|
|
58
|
+
workspaceId,
|
|
59
|
+
selection.installationId,
|
|
60
|
+
selection.repositoryIds,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export async function assertFileResourcesRemainAuthorized(
|
|
67
|
+
db: ActivityServices["db"],
|
|
68
|
+
accountId: string,
|
|
69
|
+
workspaceId: string,
|
|
70
|
+
subjectId: string | null,
|
|
71
|
+
resources: ResourceRef[],
|
|
72
|
+
): Promise<void> {
|
|
73
|
+
const fileIds = resources.flatMap((resource) =>
|
|
74
|
+
resource.kind === "file" ? [resource.fileId] : [],
|
|
75
|
+
);
|
|
76
|
+
if (fileIds.length === 0) return;
|
|
77
|
+
const authorized = await getFilesForSubject(db, {
|
|
78
|
+
accountId,
|
|
79
|
+
workspaceId,
|
|
80
|
+
subjectId,
|
|
81
|
+
fileIds,
|
|
82
|
+
});
|
|
83
|
+
if (authorized.length !== new Set(fileIds).size) {
|
|
84
|
+
throw new Error("One or more file resources are unavailable or no longer authorized");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export async function assertGitHubTokenMintSelectionAuthorized(
|
|
89
|
+
db: Parameters<typeof areGitHubRepositoriesAllowedForWorkspace>[0],
|
|
90
|
+
workspaceId: string,
|
|
91
|
+
installationId: number,
|
|
92
|
+
repositoryIds: number[],
|
|
93
|
+
): Promise<void> {
|
|
94
|
+
if (
|
|
95
|
+
!(await areGitHubRepositoriesAllowedForWorkspace(
|
|
96
|
+
db,
|
|
97
|
+
workspaceId,
|
|
98
|
+
installationId,
|
|
99
|
+
repositoryIds,
|
|
100
|
+
))
|
|
101
|
+
) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
"This workspace no longer authorizes one or more GitHub repositories attached to the session",
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* True when the error is transient upstream backpressure — a model-provider 5xx,
|
|
110
|
+
* a "server had a bad minute" body, or a dropped/again-able network connection —
|
|
111
|
+
* rather than a request the session got wrong. These are safe to recover as a new
|
|
112
|
+
* fenced attempt of the SAME turn after PROVIDER_BACKPRESSURE_DELAY_MS. Durable
|
|
113
|
+
* tool results are preserved and ambiguous in-flight effects are closed before
|
|
114
|
+
* the new attempt, independent of whether the session has an active goal.
|
|
115
|
+
*
|
|
116
|
+
* This is the classification gap that hard-failed a fleet of prod sessions during a
|
|
117
|
+
* provider degradation window: their errors ("Our servers are currently overloaded",
|
|
118
|
+
* the generic 500 "An error occurred while processing your request", "Connection
|
|
119
|
+
* error") carried no retryable marker and fell through to a terminal session.failed.
|
|
120
|
+
*
|
|
121
|
+
* HTTP status is authoritative when present — EVERY 5xx is a server-side failure that
|
|
122
|
+
* is safe to retry, while 4xx (validation, auth, 404) is a request fault that must
|
|
123
|
+
* still hard-fail. The code/message matches are the fallback for network faults and
|
|
124
|
+
* SDK-rethrown bare Errors that carry no status. A ChatGPT/Codex usage cap (a 429
|
|
125
|
+
* that will NOT clear on retry) is classified and returned BEFORE this in
|
|
126
|
+
* agentRunFailurePayload, so it never reaches here.
|
|
127
|
+
*/
|
|
128
|
+
export async function sandboxFileDownloadsForRun(
|
|
129
|
+
settings: Settings,
|
|
130
|
+
db: ActivityServices["db"],
|
|
131
|
+
objectStorage: ObjectStorage | null,
|
|
132
|
+
accountId: string,
|
|
133
|
+
workspaceId: string,
|
|
134
|
+
subjectId: string | null,
|
|
135
|
+
resources: ResourceRef[],
|
|
136
|
+
activeSandboxBackend: Settings["sandboxBackend"] = settings.sandboxBackend,
|
|
137
|
+
): Promise<SandboxFileDownload[]> {
|
|
138
|
+
if (!requiresSignedFileResourceDownloads(settings, activeSandboxBackend)) {
|
|
139
|
+
return [];
|
|
140
|
+
}
|
|
141
|
+
const fileResources = resources.filter(
|
|
142
|
+
(resource): resource is Extract<ResourceRef, { kind: "file" }> => resource.kind === "file",
|
|
143
|
+
);
|
|
144
|
+
if (fileResources.length === 0) {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
if (!objectStorage) {
|
|
148
|
+
throw new Error(
|
|
149
|
+
`${settings.objectStorageBackend} file resources require configured object storage`,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const downloadStorage = objectStorageForSandboxDownloads(
|
|
153
|
+
settings,
|
|
154
|
+
objectStorage,
|
|
155
|
+
activeSandboxBackend,
|
|
156
|
+
);
|
|
157
|
+
const downloads: SandboxFileDownload[] = [];
|
|
158
|
+
for (const resource of fileResources) {
|
|
159
|
+
const file = await requireFileForSubject(db, {
|
|
160
|
+
accountId,
|
|
161
|
+
workspaceId,
|
|
162
|
+
subjectId,
|
|
163
|
+
fileId: resource.fileId,
|
|
164
|
+
});
|
|
165
|
+
const url = await downloadStorage.createGetUrl({ key: file.objectKey });
|
|
166
|
+
downloads.push({
|
|
167
|
+
fileId: file.id,
|
|
168
|
+
mountPath: resourceMountPath(resource),
|
|
169
|
+
filename: file.safeFilename,
|
|
170
|
+
url: url.url,
|
|
171
|
+
expiresAt: url.expiresAt,
|
|
172
|
+
sizeBytes: file.sizeBytes,
|
|
173
|
+
...(file.sha256 ? { sha256: file.sha256 } : {}),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return downloads;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function requiresSignedFileResourceDownloads(
|
|
180
|
+
settings: Settings,
|
|
181
|
+
activeSandboxBackend: Settings["sandboxBackend"] = settings.sandboxBackend,
|
|
182
|
+
): boolean {
|
|
183
|
+
if (activeSandboxBackend === "none") {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
// A selfhosted machine (bring-your-own-compute) can NEVER mount ANY object store
|
|
187
|
+
// — it is a remote user machine reached only over NATS, so file resources are
|
|
188
|
+
// ALWAYS delivered by exec-curling a pre-signed URL onto it. Without this a
|
|
189
|
+
// machine-home turn (sandbox_backend "selfhosted") would silently drop file
|
|
190
|
+
// resources on an azure-blob / s3-compatible store (nativeBucketMount=false),
|
|
191
|
+
// a regression from the pre-honest-label path where the same turn ran home=modal
|
|
192
|
+
// and modal's descriptor forced signed downloads.
|
|
193
|
+
if (activeSandboxBackend === "selfhosted") {
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
// A nativeBucketMount backend (modal) cannot mount Azure Blob entries, so it
|
|
197
|
+
// needs pre-signed downloads for that store. Keying on the descriptor (not the
|
|
198
|
+
// "modal" literal) keeps this correct as bucket-mount backends are added.
|
|
199
|
+
const nativeBucketMount = CAPABILITY_DESCRIPTORS[activeSandboxBackend].nativeBucketMount;
|
|
200
|
+
return (
|
|
201
|
+
(activeSandboxBackend === "docker" && settings.objectStorageBackend === "s3-compatible") ||
|
|
202
|
+
settings.objectStorageBackend === "aws-s3" ||
|
|
203
|
+
settings.objectStorageBackend === "gcs" ||
|
|
204
|
+
(nativeBucketMount && settings.objectStorageBackend === "azure-blob")
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function objectStorageForSandboxDownloads(
|
|
209
|
+
settings: Settings,
|
|
210
|
+
objectStorage: ObjectStorage,
|
|
211
|
+
activeSandboxBackend: Settings["sandboxBackend"] = settings.sandboxBackend,
|
|
212
|
+
): ObjectStorage {
|
|
213
|
+
// Connected Machines are not on the Docker compose network. Sign with the
|
|
214
|
+
// ambient public endpoint; never rewrite to OPENGENI_OBJECT_STORAGE_SANDBOX_ENDPOINT.
|
|
215
|
+
if (activeSandboxBackend === "selfhosted") {
|
|
216
|
+
return objectStorage;
|
|
217
|
+
}
|
|
218
|
+
if (settings.objectStorageBackend !== "s3-compatible" || !settings.objectStorageSandboxEndpoint) {
|
|
219
|
+
return objectStorage;
|
|
220
|
+
}
|
|
221
|
+
return (
|
|
222
|
+
createObjectStorage({
|
|
223
|
+
...settings,
|
|
224
|
+
objectStorageEndpoint: settings.objectStorageSandboxEndpoint,
|
|
225
|
+
}) ?? objectStorage
|
|
226
|
+
);
|
|
227
|
+
}
|