@blaxel/core 0.3.29 → 0.3.30-preview.324
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/client/sdk.gen.js +93 -4
- package/dist/cjs/common/lazyInit.js +8 -0
- package/dist/cjs/common/posthog.js +256 -0
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/types/client/sdk.gen.d.ts +26 -1
- package/dist/cjs/types/client/types.gen.d.ts +156 -2
- package/dist/cjs/types/common/posthog.d.ts +51 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/client/sdk.gen.js +93 -4
- package/dist/cjs-browser/common/lazyInit.js +8 -0
- package/dist/cjs-browser/common/posthog.js +256 -0
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +26 -1
- package/dist/cjs-browser/types/client/types.gen.d.ts +156 -2
- package/dist/cjs-browser/types/common/posthog.d.ts +51 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/client/sdk.gen.js +84 -0
- package/dist/esm/common/lazyInit.js +8 -0
- package/dist/esm/common/posthog.js +250 -0
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/client/sdk.gen.js +84 -0
- package/dist/esm-browser/common/lazyInit.js +8 -0
- package/dist/esm-browser/common/posthog.js +250 -0
- package/dist/esm-browser/common/settings.js +2 -2
- package/package.json +2 -2
|
@@ -663,6 +663,10 @@ export type CustomDomainSpec = {
|
|
|
663
663
|
txtRecords?: {
|
|
664
664
|
[key: string]: string;
|
|
665
665
|
};
|
|
666
|
+
/**
|
|
667
|
+
* How the TLS certificate is validated. "dns" (default) requires the certificate validation CNAME records to be published; "http" validates over HTTP once the domain points to Blaxel and requires no validation record. HTTP validation is not available for wildcard domains (previews or "*." names) and cannot be changed after creation.
|
|
668
|
+
*/
|
|
669
|
+
validationMethod?: 'dns' | 'http';
|
|
666
670
|
/**
|
|
667
671
|
* Error message if verification failed
|
|
668
672
|
*/
|
|
@@ -704,6 +708,10 @@ export type CustomDomainSpecWritable = {
|
|
|
704
708
|
txtRecords?: {
|
|
705
709
|
[key: string]: string;
|
|
706
710
|
};
|
|
711
|
+
/**
|
|
712
|
+
* How the TLS certificate is validated. "dns" (default) requires the certificate validation CNAME records to be published; "http" validates over HTTP once the domain points to Blaxel and requires no validation record. HTTP validation is not available for wildcard domains (previews or "*." names) and cannot be changed after creation.
|
|
713
|
+
*/
|
|
714
|
+
validationMethod?: 'dns' | 'http';
|
|
707
715
|
};
|
|
708
716
|
/**
|
|
709
717
|
* Drive providing persistent storage that can be attached to agents, functions, and sandboxes. Drives can be mounted at runtime via the sbx API.
|
|
@@ -1041,7 +1049,7 @@ export type ExpirationPolicy = {
|
|
|
1041
1049
|
*/
|
|
1042
1050
|
type?: 'ttl-idle' | 'ttl-max-age' | 'date';
|
|
1043
1051
|
/**
|
|
1044
|
-
* Duration value for TTL policies (e.g., '30m', '24h', '7d'
|
|
1052
|
+
* Duration value for TTL policies (e.g., '30m', '24h', '7d'; minimum '60s' for ttl-idle, '5m' for ttl-max-age) or ISO 8601 date for date policies
|
|
1045
1053
|
*/
|
|
1046
1054
|
value?: string;
|
|
1047
1055
|
};
|
|
@@ -3910,7 +3918,7 @@ export type SandboxRuntime = {
|
|
|
3910
3918
|
*/
|
|
3911
3919
|
expires?: string;
|
|
3912
3920
|
/**
|
|
3913
|
-
* Extra arguments for kernel selection. Supported keys: 'iptables', 'nfs' (mk3.0), 'tun', 'android' and 'landlock' (mk3.1). The android variant includes tun and iptables and cannot be combined with nfs. The landlock variant enables the Landlock LSM, includes tun and iptables, and cannot be combined with android or nfs. Android and landlock requests are rejected if routing selects mk3.0. Values: 'enabled' or 'disabled'. Determines which kernel variant the workload runs on. Immutable after creation.
|
|
3921
|
+
* Extra arguments for kernel selection. Supported keys: 'iptables', 'nfs' (mk3.0), 'tun', 'android' and 'landlock' (mk3.1). The android variant includes tun and iptables and cannot be combined with nfs. The landlock variant enables the Landlock LSM, includes tun and iptables, and cannot be combined with android or nfs. Android and landlock requests are rejected if routing selects mk3.0. 'kernelExtensions' (mk3.1, android only for now) switches on the selected kernel's loadable modules and kernel tracing (eBPF, kprobes, perf); without it they are disabled, even for root. Values: 'enabled' or 'disabled'. Determines which kernel variant the workload runs on. Immutable after creation.
|
|
3914
3922
|
*/
|
|
3915
3923
|
extraArgs?: {
|
|
3916
3924
|
[key: string]: string;
|
|
@@ -4359,6 +4367,40 @@ export type SandboxSpec = {
|
|
|
4359
4367
|
*/
|
|
4360
4368
|
vpc?: string;
|
|
4361
4369
|
};
|
|
4370
|
+
/**
|
|
4371
|
+
* Workspace secret, referenced from proxy routing as {{SECRET:name}}. Values are write-only and can never be read back. Every upsert stores a new immutable version and the latest one is resolved at runtime.
|
|
4372
|
+
*/
|
|
4373
|
+
export type Secret = {
|
|
4374
|
+
/**
|
|
4375
|
+
* The date and time when the secret was first created
|
|
4376
|
+
*/
|
|
4377
|
+
readonly createdAt?: string;
|
|
4378
|
+
/**
|
|
4379
|
+
* Case-sensitive secret name
|
|
4380
|
+
*/
|
|
4381
|
+
name: string;
|
|
4382
|
+
/**
|
|
4383
|
+
* The date and time of the latest version
|
|
4384
|
+
*/
|
|
4385
|
+
readonly updatedAt?: string;
|
|
4386
|
+
/**
|
|
4387
|
+
* Secret value. Write-only, never returned by the API
|
|
4388
|
+
*/
|
|
4389
|
+
value?: string;
|
|
4390
|
+
};
|
|
4391
|
+
/**
|
|
4392
|
+
* Workspace secret, referenced from proxy routing as {{SECRET:name}}. Values are write-only and can never be read back. Every upsert stores a new immutable version and the latest one is resolved at runtime.
|
|
4393
|
+
*/
|
|
4394
|
+
export type SecretWritable = {
|
|
4395
|
+
/**
|
|
4396
|
+
* Case-sensitive secret name
|
|
4397
|
+
*/
|
|
4398
|
+
name: string;
|
|
4399
|
+
/**
|
|
4400
|
+
* Secret value. Write-only, never returned by the API
|
|
4401
|
+
*/
|
|
4402
|
+
value?: string;
|
|
4403
|
+
};
|
|
4362
4404
|
/**
|
|
4363
4405
|
* Deployment status of a resource deployed on Blaxel
|
|
4364
4406
|
*/
|
|
@@ -5934,6 +5976,56 @@ export type CreateDriveAccessTokenResponses = {
|
|
|
5934
5976
|
};
|
|
5935
5977
|
};
|
|
5936
5978
|
export type CreateDriveAccessTokenResponse = CreateDriveAccessTokenResponses[keyof CreateDriveAccessTokenResponses];
|
|
5979
|
+
export type DeleteDriveFolderData = {
|
|
5980
|
+
body?: never;
|
|
5981
|
+
path: {
|
|
5982
|
+
driveName: string;
|
|
5983
|
+
};
|
|
5984
|
+
query: {
|
|
5985
|
+
/**
|
|
5986
|
+
* Relative folder path ending in a slash, for example documents/reports/.
|
|
5987
|
+
*/
|
|
5988
|
+
path: string;
|
|
5989
|
+
};
|
|
5990
|
+
url: '/drives/{driveName}/folders';
|
|
5991
|
+
};
|
|
5992
|
+
export type DeleteDriveFolderErrors = {
|
|
5993
|
+
/**
|
|
5994
|
+
* Invalid folder path
|
|
5995
|
+
*/
|
|
5996
|
+
400: unknown;
|
|
5997
|
+
/**
|
|
5998
|
+
* Unauthorized
|
|
5999
|
+
*/
|
|
6000
|
+
401: unknown;
|
|
6001
|
+
/**
|
|
6002
|
+
* Insufficient permissions, protected path, or drives feature disabled
|
|
6003
|
+
*/
|
|
6004
|
+
403: unknown;
|
|
6005
|
+
/**
|
|
6006
|
+
* Drive not found
|
|
6007
|
+
*/
|
|
6008
|
+
404: unknown;
|
|
6009
|
+
/**
|
|
6010
|
+
* Drive unavailable or requested path is not a folder
|
|
6011
|
+
*/
|
|
6012
|
+
409: unknown;
|
|
6013
|
+
/**
|
|
6014
|
+
* Storage unavailable or deletion incomplete; retry to finish cleanup
|
|
6015
|
+
*/
|
|
6016
|
+
502: unknown;
|
|
6017
|
+
/**
|
|
6018
|
+
* Deletion timed out and may be partially complete; retry to finish cleanup
|
|
6019
|
+
*/
|
|
6020
|
+
504: unknown;
|
|
6021
|
+
};
|
|
6022
|
+
export type DeleteDriveFolderResponses = {
|
|
6023
|
+
/**
|
|
6024
|
+
* Folder and its contents deleted, or folder already absent
|
|
6025
|
+
*/
|
|
6026
|
+
204: void;
|
|
6027
|
+
};
|
|
6028
|
+
export type DeleteDriveFolderResponse = DeleteDriveFolderResponses[keyof DeleteDriveFolderResponses];
|
|
5937
6029
|
export type GetDriveByExternalIdData = {
|
|
5938
6030
|
body?: never;
|
|
5939
6031
|
path: {
|
|
@@ -8739,6 +8831,68 @@ export type GetSandboxScheduleMetricsResponses = {
|
|
|
8739
8831
|
200: SandboxScheduleMetrics;
|
|
8740
8832
|
};
|
|
8741
8833
|
export type GetSandboxScheduleMetricsResponse = GetSandboxScheduleMetricsResponses[keyof GetSandboxScheduleMetricsResponses];
|
|
8834
|
+
export type DeleteSecretByQueryData = {
|
|
8835
|
+
body?: never;
|
|
8836
|
+
path?: never;
|
|
8837
|
+
query: {
|
|
8838
|
+
/**
|
|
8839
|
+
* Name of the secret
|
|
8840
|
+
*/
|
|
8841
|
+
name: string;
|
|
8842
|
+
};
|
|
8843
|
+
url: '/secrets';
|
|
8844
|
+
};
|
|
8845
|
+
export type DeleteSecretByQueryResponses = {
|
|
8846
|
+
/**
|
|
8847
|
+
* successful operation
|
|
8848
|
+
*/
|
|
8849
|
+
200: Secret;
|
|
8850
|
+
};
|
|
8851
|
+
export type DeleteSecretByQueryResponse = DeleteSecretByQueryResponses[keyof DeleteSecretByQueryResponses];
|
|
8852
|
+
export type ListSecretsData = {
|
|
8853
|
+
body?: never;
|
|
8854
|
+
path?: never;
|
|
8855
|
+
query?: never;
|
|
8856
|
+
url: '/secrets';
|
|
8857
|
+
};
|
|
8858
|
+
export type ListSecretsResponses = {
|
|
8859
|
+
/**
|
|
8860
|
+
* successful operation
|
|
8861
|
+
*/
|
|
8862
|
+
200: Array<Secret>;
|
|
8863
|
+
};
|
|
8864
|
+
export type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses];
|
|
8865
|
+
export type UpsertSecretData = {
|
|
8866
|
+
body: SecretWritable;
|
|
8867
|
+
path?: never;
|
|
8868
|
+
query?: never;
|
|
8869
|
+
url: '/secrets';
|
|
8870
|
+
};
|
|
8871
|
+
export type UpsertSecretResponses = {
|
|
8872
|
+
/**
|
|
8873
|
+
* successful operation
|
|
8874
|
+
*/
|
|
8875
|
+
200: Secret;
|
|
8876
|
+
};
|
|
8877
|
+
export type UpsertSecretResponse = UpsertSecretResponses[keyof UpsertSecretResponses];
|
|
8878
|
+
export type DeleteSecretData = {
|
|
8879
|
+
body?: never;
|
|
8880
|
+
path: {
|
|
8881
|
+
/**
|
|
8882
|
+
* Name of the secret
|
|
8883
|
+
*/
|
|
8884
|
+
secretName: string;
|
|
8885
|
+
};
|
|
8886
|
+
query?: never;
|
|
8887
|
+
url: '/secrets/{secretName}';
|
|
8888
|
+
};
|
|
8889
|
+
export type DeleteSecretResponses = {
|
|
8890
|
+
/**
|
|
8891
|
+
* successful operation
|
|
8892
|
+
*/
|
|
8893
|
+
200: Secret;
|
|
8894
|
+
};
|
|
8895
|
+
export type DeleteSecretResponse = DeleteSecretResponses[keyof DeleteSecretResponses];
|
|
8742
8896
|
export type GetWorkspaceServiceAccountsData = {
|
|
8743
8897
|
body?: never;
|
|
8744
8898
|
path?: never;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How long a capture may stay outstanding.
|
|
3
|
+
*
|
|
4
|
+
* Node keeps the event loop alive while a fetch is pending, so this is what a
|
|
5
|
+
* short-lived script waits for before it can exit. A capture against
|
|
6
|
+
* us.i.posthog.com takes ~250-350ms end to end (DNS + TLS handshake + POST), so
|
|
7
|
+
* a second covers the happy path with headroom. The ceiling matters because a
|
|
8
|
+
* version is only recorded after a successful delivery: when the endpoint is
|
|
9
|
+
* unreachable every later run tries again, and networks that silently drop
|
|
10
|
+
* traffic rather than refusing it would otherwise pay the full timeout each
|
|
11
|
+
* time.
|
|
12
|
+
*/
|
|
13
|
+
export declare const POSTHOG_FLUSH_BUDGET_MS = 1000;
|
|
14
|
+
type TelemetryState = {
|
|
15
|
+
distinct_id: string;
|
|
16
|
+
cli?: string;
|
|
17
|
+
sdks?: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Combine this process's telemetry snapshot with what is on disk right now.
|
|
21
|
+
*
|
|
22
|
+
* `~/.blaxel/telemetry.json` is shared with the CLI and the Python SDK, and
|
|
23
|
+
* each of them caches it in memory for the lifetime of its process. Writing
|
|
24
|
+
* this snapshot back wholesale would roll back anything the others recorded in
|
|
25
|
+
* the meantime, which makes them re-send their "Installed" event on every later
|
|
26
|
+
* run. Anything already on disk is at least as fresh as what is held here, so
|
|
27
|
+
* it wins, except for the fields this process actually owns.
|
|
28
|
+
*/
|
|
29
|
+
export declare function mergeTelemetryState(onDisk: Record<string, unknown>, ours: TelemetryState): Record<string, unknown>;
|
|
30
|
+
type SDKInstallTrackerOptions = {
|
|
31
|
+
getApiKey: () => string;
|
|
32
|
+
isTrackingEnabled: () => boolean;
|
|
33
|
+
getVersion: () => string;
|
|
34
|
+
isNode: () => boolean;
|
|
35
|
+
loadState: () => TelemetryState;
|
|
36
|
+
saveState: (state: TelemetryState) => void;
|
|
37
|
+
getDistinctId: () => string;
|
|
38
|
+
fetch: typeof globalThis.fetch;
|
|
39
|
+
getSignal: () => AbortSignal | undefined;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Create an SDK install tracker. Exported from this internal module so delivery
|
|
43
|
+
* and deduplication behavior can be tested without build-time credentials.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createSDKInstallTracker(options: SDKInstallTrackerOptions): () => Promise<void> | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Track SDK installation. Fires "Installed SDK" once per new version.
|
|
48
|
+
* Called during SDK autoload.
|
|
49
|
+
*/
|
|
50
|
+
export declare function trackSDKInstalled(): void;
|
|
51
|
+
export {};
|