( name: string, )
| 90 | * Uses the public environment_providers route (same auth as fetchEnvironments). |
| 91 | */ |
| 92 | export 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 | } |
no test coverage detected