@opengeni/worker-bundle 3.1.2 → 3.2.2
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/secret-resolver.d.ts +4 -2
- package/dist/activities/types.d.ts +2 -1
- package/dist/{activities-control-ROJJNNTJ.js → activities-control-LC7WXEIX.js} +4 -3
- package/dist/{activities-control-ROJJNNTJ.js.map → activities-control-LC7WXEIX.js.map} +1 -1
- package/dist/{activities-turn-4SWYWKI5.js → activities-turn-PEDPUZI4.js} +13 -4
- package/dist/activities-turn-PEDPUZI4.js.map +1 -0
- package/dist/{chunk-6SHXF4SU.js → chunk-436TOEBL.js} +10 -3
- package/dist/chunk-436TOEBL.js.map +1 -0
- package/dist/chunk-K225DMA7.js +85 -0
- package/dist/chunk-K225DMA7.js.map +1 -0
- package/dist/{chunk-MVESOYFC.js → chunk-O7HT4LHX.js} +4 -1
- package/dist/{chunk-MVESOYFC.js.map → chunk-O7HT4LHX.js.map} +1 -1
- package/dist/external-vault-providers.d.ts +29 -0
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-lease-BJYU72N3.js → sandbox-lease-F47EDHHY.js} +2 -2
- package/dist/workflow-bundle.js +1 -1
- package/package.json +27 -24
- package/src/activities/agent-turn/run.ts +6 -0
- package/src/activities/agent-turn/secret-resolver.ts +6 -0
- package/src/activities/sandbox-lease.ts +3 -0
- package/src/activities/types.ts +5 -1
- package/src/activity-services.ts +9 -1
- package/src/external-vault-providers.ts +136 -0
- package/src/index.ts +7 -1
- package/dist/activities-turn-4SWYWKI5.js.map +0 -1
- package/dist/chunk-6SHXF4SU.js.map +0 -1
- /package/dist/{sandbox-lease-BJYU72N3.js.map → sandbox-lease-F47EDHHY.js.map} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Settings } from "@opengeni/config";
|
|
2
|
+
import type { ExternalVaultProviderFactories } from "@opengeni/core";
|
|
3
|
+
import { type PinnedFetchOptions } from "@opengeni/network";
|
|
4
|
+
import type { KeeperRuntimeOptions } from "@opengeni/vaults-keeper";
|
|
5
|
+
/** Test seams only; production passes nothing. */
|
|
6
|
+
export type NativeExternalVaultOptions = {
|
|
7
|
+
keeper?: Pick<KeeperRuntimeOptions, "queryFunction" | "fetchFile" | "sdk">;
|
|
8
|
+
/** Applies when this call creates the pool for its CLI path. */
|
|
9
|
+
protonpass?: {
|
|
10
|
+
stateRoot?: string;
|
|
11
|
+
hostEnv?: Readonly<Record<string, string | undefined>>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Native external vault adapters that run inside this server: Keeper Secrets
|
|
16
|
+
* Manager always, Proton Pass only when the operator installed `pass-cli`
|
|
17
|
+
* (`OPENGENI_PROTON_PASS_CLI_PATH`). Both packages load through `import()`
|
|
18
|
+
* on first use (packages/vaults-keeper/test/import-guard.test.ts). Keep this
|
|
19
|
+
* file identical to apps/api/src/integrations/external-vault-providers.ts.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createNativeExternalVaultFactories(settings: Settings, options?: NativeExternalVaultOptions): ExternalVaultProviderFactories;
|
|
22
|
+
/** Logs out every pooled Proton Pass CLI session and wipes its state (graceful shutdown). */
|
|
23
|
+
export declare function closeNativeExternalVaultProviders(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* The fetch every Keeper request and file download uses: DNS-pinned and
|
|
26
|
+
* policy-checked (no private or special-use targets). The adapter adds
|
|
27
|
+
* HTTPS-only, no redirects, deadlines, size bounds and the caller's abort.
|
|
28
|
+
*/
|
|
29
|
+
export declare function nativeKeeperFetch(settings: Settings, pinned?: Pick<PinnedFetchOptions, "dnsLookup" | "fetchImpl" | "agentFactory">): (input: string | URL, init: RequestInit) => Promise<Response>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHostExportPump
|
|
3
3
|
} from "./chunk-4ER3YXOT.js";
|
|
4
|
+
import {
|
|
5
|
+
closeNativeExternalVaultProviders
|
|
6
|
+
} from "./chunk-K225DMA7.js";
|
|
4
7
|
import {
|
|
5
8
|
CONTROL_WORKER_MAX_CACHED_WORKFLOWS,
|
|
6
9
|
CONTROL_WORKER_MAX_CONCURRENT_ACTIVITIES,
|
|
@@ -794,7 +797,7 @@ async function internalMaintenanceCadences(input) {
|
|
|
794
797
|
assertSandboxReaperActivityTimeout(settings);
|
|
795
798
|
const periodMs = settings.sandboxLeaseReaperPeriodMs;
|
|
796
799
|
const lifecycleQueue = sandboxLifecycleTaskQueue(taskQueue);
|
|
797
|
-
const sandbox = await import("./sandbox-lease-
|
|
800
|
+
const sandbox = await import("./sandbox-lease-F47EDHHY.js");
|
|
798
801
|
if (jobs.has("sandbox-lease-reaper")) {
|
|
799
802
|
const { SANDBOX_CHECKPOINT_GC_CLAIM_TTL_MS } = sandbox;
|
|
800
803
|
cadences.push({
|
|
@@ -1434,7 +1437,7 @@ async function createDefaultWorkerActivities(role, dependencies = {}) {
|
|
|
1434
1437
|
if (dependencies.objectStorage == null) {
|
|
1435
1438
|
prepareObjectStorageProvider(dependencies.settings ?? getSettings());
|
|
1436
1439
|
}
|
|
1437
|
-
return role === "control" ? (await import("./activities-control-
|
|
1440
|
+
return role === "control" ? (await import("./activities-control-LC7WXEIX.js")).createControlActivities(dependencies) : (await import("./activities-turn-PEDPUZI4.js")).createTurnActivities(dependencies);
|
|
1438
1441
|
}
|
|
1439
1442
|
function resolveOpenGeniWorkflowDefinition(moduleUrl = import.meta.url) {
|
|
1440
1443
|
const modulePath = fileURLToPath(moduleUrl).replaceAll("\\", "/");
|
|
@@ -2128,7 +2131,12 @@ async function startWorker() {
|
|
|
2128
2131
|
}
|
|
2129
2132
|
});
|
|
2130
2133
|
} finally {
|
|
2131
|
-
await Promise.allSettled([
|
|
2134
|
+
await Promise.allSettled([
|
|
2135
|
+
closeNativeExternalVaultProviders(),
|
|
2136
|
+
bus?.close(),
|
|
2137
|
+
readinessDbClient.close(),
|
|
2138
|
+
dbClient.close()
|
|
2139
|
+
]);
|
|
2132
2140
|
disposeUnhandledRejectionBoundary();
|
|
2133
2141
|
}
|
|
2134
2142
|
}
|