MCPcopy Create free account
hub / github.com/Noumena-Network/code / resolveManagedRemoteRuntimeLease

Function resolveManagedRemoteRuntimeLease

src/auth/capabilities/remote.ts:297–317  ·  view source on GitHub ↗
(
  options: ResolveManagedRemoteCapabilityOptions = {},
)

Source from the content-addressed store, hash-verified

295}
296
297export async function resolveManagedRemoteRuntimeLease(
298 options: ResolveManagedRemoteCapabilityOptions = {},
299): Promise<ManagedRemoteRuntimeLease> {
300 const activeProviderSession = getAuthRuntime().getCurrentSession()
301 const capability = await resolveManagedRemoteBootstrapCapability(options)
302 const leaseSession =
303 activeProviderSession.providerPlan.mode === 'byok_static_env'
304 ? activeProviderSession
305 : capability.session
306
307 return {
308 accessToken: capability.accessToken,
309 orgUUID: capability.orgUUID,
310 session: leaseSession,
311 lease: buildRemoteSessionLease({
312 organizationUuid: capability.orgUUID,
313 providerMode: getRemoteRuntimeProviderMode(leaseSession),
314 session: leaseSession,
315 }),
316 }
317}
318
319export function buildManagedRemoteRuntimeLeaseEnvironmentVariables(params: {
320 baseEnvironmentVariables?: Record<string, string>

Callers 3

teleportToRemoteFunction · 0.85
remote.test.tsFile · 0.85

Calls 5

getAuthRuntimeFunction · 0.85
buildRemoteSessionLeaseFunction · 0.85
getCurrentSessionMethod · 0.65

Tested by

no test coverage detected