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

Function createDefaultCloudEnvironment

src/utils/teleport/environments.ts:92–129  ·  view source on GitHub ↗
(
  name: string,
)

Source from the content-addressed store, hash-verified

90 * Uses the public environment_providers route (same auth as fetchEnvironments).
91 */
92export async function createDefaultCloudEnvironment(
93 name: string,
94): Promise<EnvironmentResource> {
95 const { accessToken, orgUUID } = await resolveManagedRemoteCapability()
96
97 const url = buildNoumenaPlatformUrl('/v1/environment_providers/cloud/create')
98 const response = await axios.post<EnvironmentResource>(
99 url,
100 {
101 name,
102 kind: NOUMENA_CLOUD_ENVIRONMENT_KIND,
103 description: '',
104 config: {
105 environment_type: 'noumena',
106 cwd: '/home/user',
107 init_script: null,
108 environment: {},
109 languages: [
110 { name: 'python', version: '3.11' },
111 { name: 'node', version: '20' },
112 ],
113 network_config: {
114 allowed_hosts: [],
115 allow_default_hosts: true,
116 },
117 },
118 },
119 {
120 headers: {
121 ...getOAuthHeaders(accessToken),
122 'anthropic-beta': 'ccr-byoc-2025-07-29',
123 'x-organization-uuid': orgUUID,
124 },
125 timeout: 15000,
126 },
127 )
128 return response.data
129}

Callers 2

getPromptForCommandFunction · 0.85

Calls 3

buildNoumenaPlatformUrlFunction · 0.85
getOAuthHeadersFunction · 0.85

Tested by

no test coverage detected