@opengeni/api-router 3.1.3-canary.38890816741001 → 3.3.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/app.js +1 -1
- package/dist/{chunk-OT56OY4V.js → chunk-6CECHDZP.js} +1569 -399
- package/dist/{chunk-OT56OY4V.js.map → chunk-6CECHDZP.js.map} +1 -1
- package/dist/index.js +50 -2
- package/dist/index.js.map +1 -1
- package/dist/integrations/external-vault-providers.d.ts +29 -0
- package/dist/interaction-secrets-vault.d.ts +2 -2
- package/dist/mcp/action-descriptions.d.ts +1 -1
- package/dist/mcp/scheduled-task-view.d.ts +4 -4
- package/dist/routes/vault-providers.d.ts +4 -2
- package/dist/sandbox/channel-a.d.ts +10 -1
- package/dist/shutdown.d.ts +14 -0
- package/dist/site-publishing/agent-data-tools.d.ts +5 -5
- package/dist/site-publishing/agent-session.d.ts +3 -2
- package/dist/site-publishing/runtime.d.ts +7 -6
- package/dist/site-publishing/service.d.ts +8 -11
- package/dist/site-publishing/session-request-authority.d.ts +3 -0
- package/dist/workspace-tool-gateway-secrets.d.ts +1 -1
- package/package.json +25 -22
- package/src/access-grant-rls.ts +1 -0
- package/src/app.ts +14 -2
- package/src/http/sse.ts +5 -1
- package/src/index.ts +13 -1
- package/src/integrations/external-vault-providers.ts +136 -0
- package/src/interaction-secrets-vault.ts +6 -2
- package/src/mcp/action-catalog.gen.ts +253 -4
- package/src/mcp/action-descriptions.ts +32 -2
- package/src/mcp/action-schema-imports.gen.ts +3 -1
- package/src/routes/browser-sessions.ts +61 -17
- package/src/routes/computer-sessions.ts +102 -39
- package/src/routes/connections.ts +17 -0
- package/src/routes/insights-usage.ts +22 -0
- package/src/routes/sessions.ts +22 -4
- package/src/routes/site-runtime.ts +62 -20
- package/src/routes/vault-providers.ts +788 -29
- package/src/routes/vaults.ts +5 -1
- package/src/sandbox/channel-a.ts +18 -1
- package/src/sandbox/metrics-ingestion.ts +1 -0
- package/src/shutdown.ts +54 -0
- package/src/site-frame-guard.ts +11 -2
- package/src/site-publishing/agent-data-tools.ts +16 -8
- package/src/site-publishing/agent-session.ts +24 -6
- package/src/site-publishing/runtime.ts +29 -7
- package/src/site-publishing/service.ts +65 -77
- package/src/site-publishing/session-request-authority.ts +14 -0
- package/src/workspace-tool-gateway-secrets.ts +9 -2
- package/src/workspace-tool-gateway.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
SlackBotProviderError,
|
|
4
4
|
apiRequestBindingsForTransportPeer,
|
|
5
5
|
cleanupScheduledTaskConnectorAuthorization,
|
|
6
|
+
closeNativeExternalVaultProviders,
|
|
6
7
|
createAppComposition,
|
|
7
8
|
createAutomaticAgentUpdater,
|
|
8
9
|
createLocalBrowserBoundary,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
startSlackInteractionPump,
|
|
15
16
|
startTemporalScheduleCleanupPump,
|
|
16
17
|
withAccessGrantSessionRlsContext
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6CECHDZP.js";
|
|
18
19
|
import "./chunk-OGQDXVXY.js";
|
|
19
20
|
|
|
20
21
|
// src/index.ts
|
|
@@ -821,6 +822,7 @@ function helloRuntimeCapabilities(hello) {
|
|
|
821
822
|
operationCpuQuota: caps.operationCpuQuota === true,
|
|
822
823
|
transactionalFsWrite: caps.transactionalFsWrite === true,
|
|
823
824
|
credentialRenew: caps.credentialRenew === true,
|
|
825
|
+
browserControlHttp: caps.browserControlHttp === true,
|
|
824
826
|
screenControl: caps.consentedScreenControl === true,
|
|
825
827
|
...caps.macPermissions ? enrollmentMacPermissionCapabilities(caps.macPermissions) : {}
|
|
826
828
|
};
|
|
@@ -3794,6 +3796,44 @@ function defaultProcessBoundary() {
|
|
|
3794
3796
|
};
|
|
3795
3797
|
}
|
|
3796
3798
|
|
|
3799
|
+
// src/shutdown.ts
|
|
3800
|
+
function installApiShutdownHandlers(input) {
|
|
3801
|
+
const runtime = input.process ?? process;
|
|
3802
|
+
let started = false;
|
|
3803
|
+
let finished = false;
|
|
3804
|
+
let deadline;
|
|
3805
|
+
const dispose = () => {
|
|
3806
|
+
runtime.off("SIGINT", shutdown);
|
|
3807
|
+
runtime.off("SIGTERM", shutdown);
|
|
3808
|
+
};
|
|
3809
|
+
const finish = (code) => {
|
|
3810
|
+
if (finished) return;
|
|
3811
|
+
finished = true;
|
|
3812
|
+
clearTimeout(deadline);
|
|
3813
|
+
dispose();
|
|
3814
|
+
if (code !== 0) {
|
|
3815
|
+
try {
|
|
3816
|
+
input.onFailure?.();
|
|
3817
|
+
} catch {
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
runtime.exit(code);
|
|
3821
|
+
};
|
|
3822
|
+
function shutdown() {
|
|
3823
|
+
if (started) return;
|
|
3824
|
+
started = true;
|
|
3825
|
+
deadline = setTimeout(() => finish(1), input.timeoutMs ?? 3e4);
|
|
3826
|
+
deadline.unref?.();
|
|
3827
|
+
void Promise.resolve().then(input.close).then(
|
|
3828
|
+
() => finish(0),
|
|
3829
|
+
() => finish(1)
|
|
3830
|
+
);
|
|
3831
|
+
}
|
|
3832
|
+
runtime.on("SIGINT", shutdown);
|
|
3833
|
+
runtime.on("SIGTERM", shutdown);
|
|
3834
|
+
return dispose;
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3797
3837
|
// src/index.ts
|
|
3798
3838
|
function isWorkflowAlreadyStarted(error) {
|
|
3799
3839
|
return error instanceof WorkflowExecutionAlreadyStartedError;
|
|
@@ -4239,6 +4279,7 @@ async function startApi(options = {}) {
|
|
|
4239
4279
|
server,
|
|
4240
4280
|
close: async () => {
|
|
4241
4281
|
server.stop(true);
|
|
4282
|
+
const vaultProvidersClosed = closeNativeExternalVaultProviders().catch(() => void 0);
|
|
4242
4283
|
metricsServer?.stop(true);
|
|
4243
4284
|
stopSlackInteractionPump?.();
|
|
4244
4285
|
await stopMemorySlackPublicationPump();
|
|
@@ -4250,6 +4291,7 @@ async function startApi(options = {}) {
|
|
|
4250
4291
|
await stopNativePushDispatchPump();
|
|
4251
4292
|
await routeDeps.userPresence?.close().catch(() => void 0);
|
|
4252
4293
|
await Promise.allSettled([
|
|
4294
|
+
vaultProvidersClosed,
|
|
4253
4295
|
Promise.resolve(editableArtifactComposition?.close()),
|
|
4254
4296
|
authCalloutResponder?.close(),
|
|
4255
4297
|
bus.close(),
|
|
@@ -4265,7 +4307,13 @@ if (import.meta.main) {
|
|
|
4265
4307
|
const settings = getSettings();
|
|
4266
4308
|
const observability = createObservability(settings, { component: "api" });
|
|
4267
4309
|
fatalBoundary.attachObservability(observability);
|
|
4268
|
-
await startApi({ settings, observability });
|
|
4310
|
+
const api = await startApi({ settings, observability });
|
|
4311
|
+
installApiShutdownHandlers({
|
|
4312
|
+
close: api.close,
|
|
4313
|
+
onFailure: () => observability.warn("Opengeni API shutdown did not finish cleanly", {
|
|
4314
|
+
errorCode: "api_shutdown_failed"
|
|
4315
|
+
})
|
|
4316
|
+
});
|
|
4269
4317
|
fatalBoundary.markRunning();
|
|
4270
4318
|
} catch (error) {
|
|
4271
4319
|
await fatalBoundary.reportStartupFailure(error);
|