sandbox0 0.2.7 → 0.2.8
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/apispec/src/apis/ContextsApi.d.ts +6 -4
- package/dist/apispec/src/apis/ContextsApi.d.ts.map +1 -1
- package/dist/apispec/src/apis/ContextsApi.js +6 -4
- package/dist/apispec/src/apis/SandboxesApi.d.ts +21 -1
- package/dist/apispec/src/apis/SandboxesApi.d.ts.map +1 -1
- package/dist/apispec/src/apis/SandboxesApi.js +57 -1
- package/dist/apispec/src/models/APIKey.d.ts +0 -6
- package/dist/apispec/src/models/APIKey.d.ts.map +1 -1
- package/dist/apispec/src/models/APIKey.js +0 -4
- package/dist/apispec/src/models/ContextInputRequest.d.ts +1 -1
- package/dist/apispec/src/models/ContextWebSocketInput.d.ts +1 -1
- package/dist/apispec/src/models/CreateAPIKeyRequest.d.ts +0 -14
- package/dist/apispec/src/models/CreateAPIKeyRequest.d.ts.map +1 -1
- package/dist/apispec/src/models/CreateAPIKeyRequest.js +0 -11
- package/dist/apispec/src/models/CreateAPIKeyResponse.d.ts +0 -6
- package/dist/apispec/src/models/CreateAPIKeyResponse.d.ts.map +1 -1
- package/dist/apispec/src/models/CreateAPIKeyResponse.js +0 -4
- package/dist/apispec/src/models/CurrentAPIKeyResponse.d.ts +0 -6
- package/dist/apispec/src/models/CurrentAPIKeyResponse.d.ts.map +1 -1
- package/dist/apispec/src/models/CurrentAPIKeyResponse.js +0 -4
- package/dist/apispec/src/models/HTTPGetAction.d.ts +2 -3
- package/dist/apispec/src/models/HTTPGetAction.d.ts.map +1 -1
- package/dist/apispec/src/models/HTTPGetAction.js +2 -3
- package/dist/apispec/src/models/SandboxLogs.d.ts +57 -0
- package/dist/apispec/src/models/SandboxLogs.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxLogs.js +59 -0
- package/dist/apispec/src/models/SandboxProbeSet.d.ts +46 -0
- package/dist/apispec/src/models/SandboxProbeSet.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxProbeSet.js +46 -0
- package/dist/apispec/src/models/SandboxProbeSpec.d.ts +66 -0
- package/dist/apispec/src/models/SandboxProbeSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxProbeSpec.js +54 -0
- package/dist/apispec/src/models/SuccessSandboxLogsResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessSandboxLogsResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessSandboxLogsResponse.js +46 -0
- package/dist/apispec/src/models/TCPSocketAction.d.ts +2 -3
- package/dist/apispec/src/models/TCPSocketAction.d.ts.map +1 -1
- package/dist/apispec/src/models/TCPSocketAction.js +2 -3
- package/dist/apispec/src/models/WarmProcessSpec.d.ts +13 -0
- package/dist/apispec/src/models/WarmProcessSpec.d.ts.map +1 -1
- package/dist/apispec/src/models/WarmProcessSpec.js +5 -0
- package/dist/apispec/src/models/index.d.ts +4 -1
- package/dist/apispec/src/models/index.d.ts.map +1 -1
- package/dist/apispec/src/models/index.js +4 -1
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +92 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/models.d.ts +15 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/sandbox_logs.d.ts +9 -0
- package/dist/sandbox_logs.d.ts.map +1 -0
- package/dist/sandbox_logs.js +10 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -5,6 +5,8 @@ import { Sandboxes } from "./resources/sandboxes.js";
|
|
|
5
5
|
import { Templates } from "./resources/templates.js";
|
|
6
6
|
import { Volumes } from "./resources/volumes.js";
|
|
7
7
|
import { Sandbox } from "./sandbox.js";
|
|
8
|
+
import { APIError, apiErrorFromResponse, wrapApiCall } from "./errors.js";
|
|
9
|
+
import { ensureData } from "./response.js";
|
|
8
10
|
export const DEFAULT_BASE_URL = "https://api.sandbox0.ai";
|
|
9
11
|
function resolveToken(provider) {
|
|
10
12
|
if (typeof provider === "function") {
|
|
@@ -57,6 +59,38 @@ export class Client {
|
|
|
57
59
|
sandbox(id) {
|
|
58
60
|
return new Sandbox({ id, client: this });
|
|
59
61
|
}
|
|
62
|
+
async getSandboxLogs(sandboxId, options) {
|
|
63
|
+
const response = await wrapApiCall(() => this.apispec.sandboxes.apiV1SandboxesIdLogsGet({
|
|
64
|
+
id: sandboxId,
|
|
65
|
+
...toSandboxLogsRequest(options),
|
|
66
|
+
}));
|
|
67
|
+
return ensureData(response, "get sandbox logs returned empty response");
|
|
68
|
+
}
|
|
69
|
+
async streamSandboxLogs(sandboxId, options) {
|
|
70
|
+
const response = await this.fetchRaw(`/api/v1/sandboxes/${encodeURIComponent(sandboxId)}/logs`, { ...toSandboxLogsQuery(options), follow: "true" });
|
|
71
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
72
|
+
if (!contentType.toLowerCase().startsWith("text/plain")) {
|
|
73
|
+
throw new APIError({
|
|
74
|
+
statusCode: response.status,
|
|
75
|
+
code: "unexpected_response",
|
|
76
|
+
message: `unexpected log stream content type: ${contentType}`,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (!response.body) {
|
|
80
|
+
throw new APIError({
|
|
81
|
+
statusCode: response.status,
|
|
82
|
+
code: "unexpected_response",
|
|
83
|
+
message: "log stream response did not include a body",
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
body: response.body,
|
|
88
|
+
response,
|
|
89
|
+
sandboxId: response.headers.get("x-sandbox-id") ?? undefined,
|
|
90
|
+
podName: response.headers.get("x-sandbox-pod-name") ?? undefined,
|
|
91
|
+
container: response.headers.get("x-sandbox-log-container") ?? undefined,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
60
94
|
websocketUrl(path) {
|
|
61
95
|
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
62
96
|
const base = new URL(this.baseUrl);
|
|
@@ -81,4 +115,62 @@ export class Client {
|
|
|
81
115
|
}
|
|
82
116
|
return headers;
|
|
83
117
|
}
|
|
118
|
+
async fetchRaw(path, query) {
|
|
119
|
+
const url = new URL(this.baseUrl);
|
|
120
|
+
url.pathname = url.pathname.replace(/\/$/, "") + path;
|
|
121
|
+
url.search = "";
|
|
122
|
+
for (const [key, value] of Object.entries(query)) {
|
|
123
|
+
if (value !== undefined) {
|
|
124
|
+
url.searchParams.set(key, value);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const headers = {
|
|
128
|
+
...(this.configuration.headers ?? {}),
|
|
129
|
+
};
|
|
130
|
+
if (!hasHeader(headers, "authorization")) {
|
|
131
|
+
const token = (await this.accessToken()).trim();
|
|
132
|
+
if (token) {
|
|
133
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const fetchApi = this.configuration.fetchApi ?? globalThis.fetch?.bind(globalThis);
|
|
137
|
+
if (!fetchApi) {
|
|
138
|
+
throw new Error("fetch API is not available");
|
|
139
|
+
}
|
|
140
|
+
const response = await fetchApi(url.toString(), { method: "GET", headers });
|
|
141
|
+
if (!response.ok) {
|
|
142
|
+
throw await apiErrorFromResponse(response);
|
|
143
|
+
}
|
|
144
|
+
return response;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function toSandboxLogsRequest(options) {
|
|
148
|
+
return {
|
|
149
|
+
container: options?.container,
|
|
150
|
+
tailLines: options?.tailLines,
|
|
151
|
+
limitBytes: options?.limitBytes,
|
|
152
|
+
previous: options?.previous,
|
|
153
|
+
timestamps: options?.timestamps,
|
|
154
|
+
sinceSeconds: options?.sinceSeconds,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function toSandboxLogsQuery(options) {
|
|
158
|
+
return {
|
|
159
|
+
container: options?.container,
|
|
160
|
+
tail_lines: numberQuery(options?.tailLines),
|
|
161
|
+
limit_bytes: numberQuery(options?.limitBytes),
|
|
162
|
+
previous: boolQuery(options?.previous),
|
|
163
|
+
timestamps: boolQuery(options?.timestamps),
|
|
164
|
+
since_seconds: numberQuery(options?.sinceSeconds),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function numberQuery(value) {
|
|
168
|
+
return value === undefined ? undefined : String(value);
|
|
169
|
+
}
|
|
170
|
+
function boolQuery(value) {
|
|
171
|
+
return value ? "true" : undefined;
|
|
172
|
+
}
|
|
173
|
+
function hasHeader(headers, name) {
|
|
174
|
+
const normalized = name.toLowerCase();
|
|
175
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === normalized);
|
|
84
176
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/models.d.ts
CHANGED
|
@@ -46,6 +46,21 @@ export interface FileWatchResponse {
|
|
|
46
46
|
path?: string;
|
|
47
47
|
error?: string;
|
|
48
48
|
}
|
|
49
|
+
export interface SandboxLogsOptions {
|
|
50
|
+
container?: string;
|
|
51
|
+
tailLines?: number;
|
|
52
|
+
limitBytes?: number;
|
|
53
|
+
previous?: boolean;
|
|
54
|
+
timestamps?: boolean;
|
|
55
|
+
sinceSeconds?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface SandboxLogsStream {
|
|
58
|
+
body: ReadableStream<Uint8Array>;
|
|
59
|
+
response: Response;
|
|
60
|
+
sandboxId?: string;
|
|
61
|
+
podName?: string;
|
|
62
|
+
container?: string;
|
|
63
|
+
}
|
|
49
64
|
import type { SandboxSummary } from "./apispec/src/models/index.js";
|
|
50
65
|
export type SandboxStatusFilter = SandboxSummary["status"];
|
|
51
66
|
export interface SandboxListOptions {
|
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA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,MAAM,4BAA4B,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SandboxLogs } from "./apispec/src/models/index.js";
|
|
2
|
+
import type { SandboxLogsOptions, SandboxLogsStream } from "./models.js";
|
|
3
|
+
declare module "./sandbox" {
|
|
4
|
+
interface Sandbox {
|
|
5
|
+
getLogs(options?: SandboxLogsOptions): Promise<SandboxLogs>;
|
|
6
|
+
streamLogs(options?: SandboxLogsOptions): Promise<SandboxLogsStream>;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=sandbox_logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox_logs.d.ts","sourceRoot":"","sources":["../src/sandbox_logs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOtE,OAAO,QAAQ,WAAW,CAAC;IACzB,UAAU,OAAO;QACf,OAAO,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAC5D,UAAU,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;KACtE;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Sandbox } from "./sandbox.js";
|
|
2
|
+
function getClient(sandbox) {
|
|
3
|
+
return sandbox.client;
|
|
4
|
+
}
|
|
5
|
+
Sandbox.prototype.getLogs = async function (options) {
|
|
6
|
+
return getClient(this).getSandboxLogs(this.id, options);
|
|
7
|
+
};
|
|
8
|
+
Sandbox.prototype.streamLogs = async function (options) {
|
|
9
|
+
return getClient(this).streamSandboxLogs(this.id, options);
|
|
10
|
+
};
|