@tensorlakeai/tensorlake 0.0.0-bootstrap.0 → 0.5.145
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/README.md +166 -2
- package/bin/function-executor.js +8 -0
- package/bin/tensorlake-create-sandbox-image.js +9 -0
- package/bin/tensorlake-deploy.cjs +8 -0
- package/bin/tensorlake-import-sandbox-image.js +9 -0
- package/bin/tensorlake-typescript-function-runner.js +8 -0
- package/dist/applications/index.cjs +4821 -0
- package/dist/applications/index.cjs.map +1 -0
- package/dist/applications/index.d.cts +130 -0
- package/dist/applications/index.d.ts +130 -0
- package/dist/applications/index.js +4782 -0
- package/dist/applications/index.js.map +1 -0
- package/dist/function-agent/main.cjs +1838 -0
- package/dist/function-agent/main.cjs.map +1 -0
- package/dist/function-agent/main.d.cts +3 -0
- package/dist/function-agent/main.d.ts +3 -0
- package/dist/function-agent/main.js +1825 -0
- package/dist/function-agent/main.js.map +1 -0
- package/dist/function-executor/main.cjs +4944 -0
- package/dist/function-executor/main.cjs.map +1 -0
- package/dist/function-executor/main.d.cts +4 -0
- package/dist/function-executor/main.d.ts +4 -0
- package/dist/function-executor/main.js +4902 -0
- package/dist/function-executor/main.js.map +1 -0
- package/dist/index.cjs +10184 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2431 -0
- package/dist/index.d.ts +2431 -0
- package/dist/index.js +10108 -0
- package/dist/index.js.map +1 -0
- package/dist/native-worker.cjs +278 -0
- package/dist/native-worker.cjs.map +1 -0
- package/dist/native-worker.d.cts +2 -0
- package/dist/native-worker.d.ts +2 -0
- package/dist/native-worker.js +276 -0
- package/dist/native-worker.js.map +1 -0
- package/dist/remote-CNJ9TmcQ.d.cts +283 -0
- package/dist/remote-dblFxKug.d.ts +283 -0
- package/dist/sandbox-image-ChzWDeZy.d.cts +357 -0
- package/dist/sandbox-image-ChzWDeZy.d.ts +357 -0
- package/dist/sandbox-image.cjs +1992 -0
- package/dist/sandbox-image.cjs.map +1 -0
- package/dist/sandbox-image.d.cts +1 -0
- package/dist/sandbox-image.d.ts +1 -0
- package/dist/sandbox-image.js +1987 -0
- package/dist/sandbox-image.js.map +1 -0
- package/lib/libc.cjs +61 -0
- package/lib/libc.d.cts +1 -0
- package/lib/runtime.cjs +155 -0
- package/package.json +104 -4
- package/runtime/function-executor/manifest.json +59 -0
- package/runtime/function-executor/package/bin/function-executor.js +8 -0
- package/runtime/function-executor/package/dist/function-executor/main.js +4902 -0
- package/runtime/function-executor/package/dist/function-executor/main.js.map +1 -0
- package/runtime/function-executor/package/dist/native-worker.cjs +278 -0
- package/runtime/function-executor/package/dist/native-worker.cjs.map +1 -0
- package/runtime/function-executor/package/npm-shrinkwrap.json +475 -0
- package/runtime/function-executor/package/package.json +22 -0
- package/runtime/function-executor/package/proto/README.md +18 -0
- package/runtime/function-executor/package/proto/tensorlake/function_executor/proto/function_executor.proto +613 -0
- package/runtime/function-executor/package/proto/tensorlake/function_executor/proto/status.proto +42 -0
- package/runtime/typescript-function-runner/manifest.json +44 -0
- package/runtime/typescript-function-runner/package/bin/tensorlake-typescript-function-runner.js +8 -0
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js +1825 -0
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js.map +1 -0
- package/runtime/typescript-function-runner/package/dist/native-worker.cjs +278 -0
- package/runtime/typescript-function-runner/package/dist/native-worker.cjs.map +1 -0
- package/runtime/typescript-function-runner/package/npm-shrinkwrap.json +586 -0
- package/runtime/typescript-function-runner/package/package.json +25 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { A as ApplicationCapability, J as JSONSchema, R as RegisteredDefinition } from '../remote-CNJ9TmcQ.cjs';
|
|
2
|
+
export { a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, I as Infer, L as LocalRequest, P as Parameter, f as ParameterValues, g as RegisteredFunction, h as RemoteOptions, i as RemoteRequest, j as RequestContext, k as RequestContextValue, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, W as WaitOptions, n as WaitResult, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from '../remote-CNJ9TmcQ.cjs';
|
|
3
|
+
export { I as Image } from '../sandbox-image-ChzWDeZy.cjs';
|
|
4
|
+
|
|
5
|
+
declare const SDK_VERSION: string;
|
|
6
|
+
|
|
7
|
+
declare const SDK_USAGE_ERROR_BRAND: unique symbol;
|
|
8
|
+
declare const REQUEST_ERROR_BRAND: unique symbol;
|
|
9
|
+
declare const FUNCTION_ERROR_BRAND: unique symbol;
|
|
10
|
+
declare const TIMEOUT_ERROR_BRAND: unique symbol;
|
|
11
|
+
declare class TensorlakeApplicationError extends Error {
|
|
12
|
+
constructor(message: string, options?: {
|
|
13
|
+
cause?: unknown;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
declare class SDKUsageError extends TensorlakeApplicationError {
|
|
17
|
+
readonly [SDK_USAGE_ERROR_BRAND] = true;
|
|
18
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
19
|
+
constructor(message: string);
|
|
20
|
+
}
|
|
21
|
+
declare class SerializationError extends TensorlakeApplicationError {
|
|
22
|
+
constructor(message: string, options?: {
|
|
23
|
+
cause?: unknown;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
declare class DeserializationError extends TensorlakeApplicationError {
|
|
27
|
+
constructor(message: string, options?: {
|
|
28
|
+
cause?: unknown;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
declare class FunctionError extends TensorlakeApplicationError {
|
|
32
|
+
readonly [FUNCTION_ERROR_BRAND] = true;
|
|
33
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
34
|
+
constructor(message: string, options?: {
|
|
35
|
+
cause?: unknown;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
declare class TimeoutError extends TensorlakeApplicationError {
|
|
39
|
+
readonly [TIMEOUT_ERROR_BRAND] = true;
|
|
40
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
41
|
+
constructor();
|
|
42
|
+
}
|
|
43
|
+
declare class RequestError extends TensorlakeApplicationError {
|
|
44
|
+
readonly [REQUEST_ERROR_BRAND] = true;
|
|
45
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
46
|
+
constructor(message: string, options?: {
|
|
47
|
+
cause?: unknown;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
declare class ReplayMismatchError extends TensorlakeApplicationError {
|
|
51
|
+
constructor(message?: string);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ParameterManifest {
|
|
55
|
+
name: string;
|
|
56
|
+
data_type: JSONSchema;
|
|
57
|
+
description?: string;
|
|
58
|
+
required: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface FunctionManifest {
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
docstring: string;
|
|
64
|
+
secret_names: string[];
|
|
65
|
+
initialization_timeout_sec: number;
|
|
66
|
+
timeout_sec: number;
|
|
67
|
+
resources: {
|
|
68
|
+
cpus: number;
|
|
69
|
+
memory_mb: number;
|
|
70
|
+
ephemeral_disk_mb: number;
|
|
71
|
+
gpus: {
|
|
72
|
+
count: number;
|
|
73
|
+
model: string;
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
retry_policy: {
|
|
77
|
+
max_retries: number;
|
|
78
|
+
initial_delay_sec: number;
|
|
79
|
+
max_delay_sec: number;
|
|
80
|
+
delay_multiplier: number;
|
|
81
|
+
};
|
|
82
|
+
cache_key: null;
|
|
83
|
+
parameters: ParameterManifest[];
|
|
84
|
+
return_type: JSONSchema | null;
|
|
85
|
+
placement_constraints: {
|
|
86
|
+
filter_expressions: string[];
|
|
87
|
+
};
|
|
88
|
+
max_concurrency: number;
|
|
89
|
+
warm_containers?: number;
|
|
90
|
+
min_containers?: number;
|
|
91
|
+
max_containers?: number;
|
|
92
|
+
image?: string;
|
|
93
|
+
}
|
|
94
|
+
interface ApplicationManifest {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
tags: Record<string, string>;
|
|
99
|
+
allow: ApplicationCapability[];
|
|
100
|
+
public_endpoint_id?: string;
|
|
101
|
+
version: string;
|
|
102
|
+
runtime: "typescript";
|
|
103
|
+
functions: Record<string, FunctionManifest>;
|
|
104
|
+
entrypoint: {
|
|
105
|
+
function_name: string;
|
|
106
|
+
input_serializer: "json";
|
|
107
|
+
inputs_base64: string;
|
|
108
|
+
output_serializer: "json";
|
|
109
|
+
output_type_hints_base64: string;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
declare function decodeDescriptor<T>(encoded: string): T;
|
|
113
|
+
declare function createApplicationManifest(application: RegisteredDefinition): ApplicationManifest;
|
|
114
|
+
declare function createApplicationManifests(): ApplicationManifest[];
|
|
115
|
+
interface CodeManifest {
|
|
116
|
+
format_version: 2;
|
|
117
|
+
runtime: "typescript";
|
|
118
|
+
minimum_node_major: 24;
|
|
119
|
+
module: string;
|
|
120
|
+
functions: Record<string, {
|
|
121
|
+
name: string;
|
|
122
|
+
}>;
|
|
123
|
+
}
|
|
124
|
+
declare function createCodeManifest(module?: string): CodeManifest;
|
|
125
|
+
|
|
126
|
+
declare function getFunction(name: string): RegisteredDefinition;
|
|
127
|
+
declare function getFunctions(): RegisteredDefinition[];
|
|
128
|
+
declare function getApplications(): RegisteredDefinition[];
|
|
129
|
+
|
|
130
|
+
export { ApplicationCapability, type ApplicationManifest, type CodeManifest, DeserializationError, FunctionError, type FunctionManifest, ReplayMismatchError, RequestError, SDKUsageError, SDK_VERSION, SerializationError, TensorlakeApplicationError, TimeoutError, createApplicationManifest, createApplicationManifests, createCodeManifest, decodeDescriptor, getApplications, getFunction, getFunctions };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { A as ApplicationCapability, J as JSONSchema, R as RegisteredDefinition } from '../remote-dblFxKug.js';
|
|
2
|
+
export { a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, I as Infer, L as LocalRequest, P as Parameter, f as ParameterValues, g as RegisteredFunction, h as RemoteOptions, i as RemoteRequest, j as RequestContext, k as RequestContextValue, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, W as WaitOptions, n as WaitResult, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from '../remote-dblFxKug.js';
|
|
3
|
+
export { I as Image } from '../sandbox-image-ChzWDeZy.js';
|
|
4
|
+
|
|
5
|
+
declare const SDK_VERSION: string;
|
|
6
|
+
|
|
7
|
+
declare const SDK_USAGE_ERROR_BRAND: unique symbol;
|
|
8
|
+
declare const REQUEST_ERROR_BRAND: unique symbol;
|
|
9
|
+
declare const FUNCTION_ERROR_BRAND: unique symbol;
|
|
10
|
+
declare const TIMEOUT_ERROR_BRAND: unique symbol;
|
|
11
|
+
declare class TensorlakeApplicationError extends Error {
|
|
12
|
+
constructor(message: string, options?: {
|
|
13
|
+
cause?: unknown;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
declare class SDKUsageError extends TensorlakeApplicationError {
|
|
17
|
+
readonly [SDK_USAGE_ERROR_BRAND] = true;
|
|
18
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
19
|
+
constructor(message: string);
|
|
20
|
+
}
|
|
21
|
+
declare class SerializationError extends TensorlakeApplicationError {
|
|
22
|
+
constructor(message: string, options?: {
|
|
23
|
+
cause?: unknown;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
declare class DeserializationError extends TensorlakeApplicationError {
|
|
27
|
+
constructor(message: string, options?: {
|
|
28
|
+
cause?: unknown;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
declare class FunctionError extends TensorlakeApplicationError {
|
|
32
|
+
readonly [FUNCTION_ERROR_BRAND] = true;
|
|
33
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
34
|
+
constructor(message: string, options?: {
|
|
35
|
+
cause?: unknown;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
declare class TimeoutError extends TensorlakeApplicationError {
|
|
39
|
+
readonly [TIMEOUT_ERROR_BRAND] = true;
|
|
40
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
41
|
+
constructor();
|
|
42
|
+
}
|
|
43
|
+
declare class RequestError extends TensorlakeApplicationError {
|
|
44
|
+
readonly [REQUEST_ERROR_BRAND] = true;
|
|
45
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
46
|
+
constructor(message: string, options?: {
|
|
47
|
+
cause?: unknown;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
declare class ReplayMismatchError extends TensorlakeApplicationError {
|
|
51
|
+
constructor(message?: string);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ParameterManifest {
|
|
55
|
+
name: string;
|
|
56
|
+
data_type: JSONSchema;
|
|
57
|
+
description?: string;
|
|
58
|
+
required: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface FunctionManifest {
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
docstring: string;
|
|
64
|
+
secret_names: string[];
|
|
65
|
+
initialization_timeout_sec: number;
|
|
66
|
+
timeout_sec: number;
|
|
67
|
+
resources: {
|
|
68
|
+
cpus: number;
|
|
69
|
+
memory_mb: number;
|
|
70
|
+
ephemeral_disk_mb: number;
|
|
71
|
+
gpus: {
|
|
72
|
+
count: number;
|
|
73
|
+
model: string;
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
retry_policy: {
|
|
77
|
+
max_retries: number;
|
|
78
|
+
initial_delay_sec: number;
|
|
79
|
+
max_delay_sec: number;
|
|
80
|
+
delay_multiplier: number;
|
|
81
|
+
};
|
|
82
|
+
cache_key: null;
|
|
83
|
+
parameters: ParameterManifest[];
|
|
84
|
+
return_type: JSONSchema | null;
|
|
85
|
+
placement_constraints: {
|
|
86
|
+
filter_expressions: string[];
|
|
87
|
+
};
|
|
88
|
+
max_concurrency: number;
|
|
89
|
+
warm_containers?: number;
|
|
90
|
+
min_containers?: number;
|
|
91
|
+
max_containers?: number;
|
|
92
|
+
image?: string;
|
|
93
|
+
}
|
|
94
|
+
interface ApplicationManifest {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
tags: Record<string, string>;
|
|
99
|
+
allow: ApplicationCapability[];
|
|
100
|
+
public_endpoint_id?: string;
|
|
101
|
+
version: string;
|
|
102
|
+
runtime: "typescript";
|
|
103
|
+
functions: Record<string, FunctionManifest>;
|
|
104
|
+
entrypoint: {
|
|
105
|
+
function_name: string;
|
|
106
|
+
input_serializer: "json";
|
|
107
|
+
inputs_base64: string;
|
|
108
|
+
output_serializer: "json";
|
|
109
|
+
output_type_hints_base64: string;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
declare function decodeDescriptor<T>(encoded: string): T;
|
|
113
|
+
declare function createApplicationManifest(application: RegisteredDefinition): ApplicationManifest;
|
|
114
|
+
declare function createApplicationManifests(): ApplicationManifest[];
|
|
115
|
+
interface CodeManifest {
|
|
116
|
+
format_version: 2;
|
|
117
|
+
runtime: "typescript";
|
|
118
|
+
minimum_node_major: 24;
|
|
119
|
+
module: string;
|
|
120
|
+
functions: Record<string, {
|
|
121
|
+
name: string;
|
|
122
|
+
}>;
|
|
123
|
+
}
|
|
124
|
+
declare function createCodeManifest(module?: string): CodeManifest;
|
|
125
|
+
|
|
126
|
+
declare function getFunction(name: string): RegisteredDefinition;
|
|
127
|
+
declare function getFunctions(): RegisteredDefinition[];
|
|
128
|
+
declare function getApplications(): RegisteredDefinition[];
|
|
129
|
+
|
|
130
|
+
export { ApplicationCapability, type ApplicationManifest, type CodeManifest, DeserializationError, FunctionError, type FunctionManifest, ReplayMismatchError, RequestError, SDKUsageError, SDK_VERSION, SerializationError, TensorlakeApplicationError, TimeoutError, createApplicationManifest, createApplicationManifests, createCodeManifest, decodeDescriptor, getApplications, getFunction, getFunctions };
|