@computesdk/brezel 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 computesdk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @computesdk/brezel
2
+
3
+ [Brezel](https://github.com/infercrane/brezel) provider for ComputeSDK.
4
+
5
+ ```bash
6
+ pnpm add computesdk @computesdk/brezel
7
+ ```
8
+
9
+ ```ts
10
+ import { createCompute } from 'computesdk'
11
+ import { brezel } from '@computesdk/brezel'
12
+
13
+ const compute = createCompute({
14
+ providers: {
15
+ brezel: brezel({
16
+ baseUrl: 'https://brezel.example.com',
17
+ apiKey: process.env.BREZEL_API_KEY,
18
+ project: 'agents',
19
+ environmentRevision: 'envr_qualified',
20
+ allowInternet: true,
21
+ }),
22
+ },
23
+ })
24
+
25
+ const sandbox = await compute.sandbox.create({ provider: 'brezel' })
26
+ const result = await sandbox.runCommand('node --version')
27
+ console.log(result.stdout)
28
+ await sandbox.destroy()
29
+ ```
30
+
31
+ The environment revision is immutable and should be created and qualified by
32
+ the Brezel operator before application or benchmark traffic uses it.
33
+
34
+ ## Configuration
35
+
36
+ | Option | Environment variable | Description |
37
+ | --- | --- | --- |
38
+ | `apiKey` | `BREZEL_API_KEY` | Project-scoped service token. |
39
+ | `baseUrl` | `BREZEL_API_URL` | Public HTTPS endpoint. |
40
+ | `project` | `BREZEL_PROJECT_ID` | Brezel project boundary. |
41
+ | `environmentRevision` | `BREZEL_ENVIRONMENT_REVISION` | Default immutable environment revision. |
42
+ | `allowInternet` | `BREZEL_ALLOW_INTERNET` | Enables outbound internet access; defaults to `false`. |
43
+ | `apiTimeoutMs` | — | Management API timeout in milliseconds. |
44
+
45
+ Create-time environment variables and arbitrary images are intentionally not
46
+ accepted. Use command-level `env` values and a prequalified Brezel environment
47
+ revision instead.
@@ -0,0 +1,23 @@
1
+ import * as _computesdk_provider from '@computesdk/provider';
2
+ import { BrezelClient, Sandbox } from '@infercrane/brezel';
3
+
4
+ interface BrezelConfig {
5
+ /** Project-scoped service token. Falls back to BREZEL_API_KEY. */
6
+ apiKey?: string;
7
+ /** HTTPS API endpoint. Falls back to BREZEL_API_URL. */
8
+ baseUrl?: string;
9
+ /** Brezel project boundary. Falls back to BREZEL_PROJECT_ID. */
10
+ project?: string;
11
+ /** Prequalified immutable environment revision. Falls back to BREZEL_ENVIRONMENT_REVISION. */
12
+ environmentRevision?: string;
13
+ /** Permit outbound internet access for created sandboxes. */
14
+ allowInternet?: boolean;
15
+ /** API operation timeout in milliseconds. */
16
+ apiTimeoutMs?: number;
17
+ }
18
+ type ConfigWithClient = BrezelConfig & {
19
+ __client?: BrezelClient;
20
+ };
21
+ declare const brezel: (config: ConfigWithClient) => _computesdk_provider.Provider<Sandbox, any, any>;
22
+
23
+ export { type BrezelConfig, brezel };
@@ -0,0 +1,23 @@
1
+ import * as _computesdk_provider from '@computesdk/provider';
2
+ import { BrezelClient, Sandbox } from '@infercrane/brezel';
3
+
4
+ interface BrezelConfig {
5
+ /** Project-scoped service token. Falls back to BREZEL_API_KEY. */
6
+ apiKey?: string;
7
+ /** HTTPS API endpoint. Falls back to BREZEL_API_URL. */
8
+ baseUrl?: string;
9
+ /** Brezel project boundary. Falls back to BREZEL_PROJECT_ID. */
10
+ project?: string;
11
+ /** Prequalified immutable environment revision. Falls back to BREZEL_ENVIRONMENT_REVISION. */
12
+ environmentRevision?: string;
13
+ /** Permit outbound internet access for created sandboxes. */
14
+ allowInternet?: boolean;
15
+ /** API operation timeout in milliseconds. */
16
+ apiTimeoutMs?: number;
17
+ }
18
+ type ConfigWithClient = BrezelConfig & {
19
+ __client?: BrezelClient;
20
+ };
21
+ declare const brezel: (config: ConfigWithClient) => _computesdk_provider.Provider<Sandbox, any, any>;
22
+
23
+ export { type BrezelConfig, brezel };