@blaxel/core 0.2.0-dev9 → 0.2.0-preview2

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.
@@ -1065,6 +1065,108 @@ export type Port = {
1065
1065
  * Set of ports for a resource
1066
1066
  */
1067
1067
  export type Ports = Array<Port>;
1068
+ /**
1069
+ * Preview of a Resource
1070
+ */
1071
+ export type Preview = {
1072
+ metadata?: PreviewMetadata;
1073
+ spec?: PreviewSpec;
1074
+ };
1075
+ /**
1076
+ * PreviewMetadata
1077
+ */
1078
+ export type PreviewMetadata = TimeFields & OwnerFields & {
1079
+ /**
1080
+ * Model display name
1081
+ */
1082
+ displayName?: string;
1083
+ /**
1084
+ * Preview name
1085
+ */
1086
+ name?: string;
1087
+ /**
1088
+ * Resource name
1089
+ */
1090
+ resourceName?: string;
1091
+ /**
1092
+ * Resource type
1093
+ */
1094
+ resourceType?: string;
1095
+ /**
1096
+ * Workspace name
1097
+ */
1098
+ workspace?: string;
1099
+ };
1100
+ /**
1101
+ * Preview of a Resource
1102
+ */
1103
+ export type PreviewSpec = {
1104
+ /**
1105
+ * Port of the preview
1106
+ */
1107
+ port?: number;
1108
+ /**
1109
+ * Whether the preview is public
1110
+ */
1111
+ public?: boolean;
1112
+ /**
1113
+ * URL of the preview
1114
+ */
1115
+ url?: string;
1116
+ };
1117
+ /**
1118
+ * Token for a Preview
1119
+ */
1120
+ export type PreviewToken = {
1121
+ metadata?: PreviewTokenMetadata;
1122
+ spec?: PreviewTokenSpec;
1123
+ };
1124
+ /**
1125
+ * PreviewTokenMetadata
1126
+ */
1127
+ export type PreviewTokenMetadata = {
1128
+ /**
1129
+ * Token name
1130
+ */
1131
+ name?: string;
1132
+ /**
1133
+ * Preview name
1134
+ */
1135
+ previewName?: string;
1136
+ /**
1137
+ * Resource name
1138
+ */
1139
+ resourceName?: string;
1140
+ /**
1141
+ * Resource type
1142
+ */
1143
+ resourceType?: string;
1144
+ /**
1145
+ * Workspace name
1146
+ */
1147
+ workspace?: string;
1148
+ };
1149
+ /**
1150
+ * Spec for a Preview Token
1151
+ */
1152
+ export type PreviewTokenSpec = {
1153
+ /**
1154
+ * Whether the token is expired
1155
+ */
1156
+ expired?: boolean;
1157
+ /**
1158
+ * Expiration time of the token
1159
+ */
1160
+ expiresAt?: string;
1161
+ /**
1162
+ * JWT token
1163
+ */
1164
+ jwt?: string;
1165
+ /**
1166
+ * Whether the token is public
1167
+ */
1168
+ public?: boolean;
1169
+ };
1068
1170
  /**
1069
1171
  * A private cluster where models can be located on.
1070
1172
  */
@@ -2927,6 +3029,197 @@ export type UpdateSandboxResponses = {
2927
3029
  200: Sandbox;
2928
3030
  };
2929
3031
  export type UpdateSandboxResponse = UpdateSandboxResponses[keyof UpdateSandboxResponses];
3032
+ export type ListSandboxPreviewsData = {
3033
+ body?: never;
3034
+ path: {
3035
+ /**
3036
+ * Name of the Sandbox
3037
+ */
3038
+ sandboxName: string;
3039
+ };
3040
+ query?: never;
3041
+ url: '/sandboxes/{sandboxName}/previews';
3042
+ };
3043
+ export type ListSandboxPreviewsResponses = {
3044
+ /**
3045
+ * successful operation
3046
+ */
3047
+ 200: Array<Preview>;
3048
+ };
3049
+ export type ListSandboxPreviewsResponse = ListSandboxPreviewsResponses[keyof ListSandboxPreviewsResponses];
3050
+ export type CreateSandboxPreviewData = {
3051
+ body: Preview;
3052
+ path: {
3053
+ /**
3054
+ * Name of the Sandbox
3055
+ */
3056
+ sandboxName: string;
3057
+ };
3058
+ query?: never;
3059
+ url: '/sandboxes/{sandboxName}/previews';
3060
+ };
3061
+ export type CreateSandboxPreviewResponses = {
3062
+ /**
3063
+ * successful operation
3064
+ */
3065
+ 200: Preview;
3066
+ };
3067
+ export type CreateSandboxPreviewResponse = CreateSandboxPreviewResponses[keyof CreateSandboxPreviewResponses];
3068
+ export type DeleteSandboxPreviewData = {
3069
+ body?: never;
3070
+ path: {
3071
+ /**
3072
+ * Name of the Sandbox
3073
+ */
3074
+ sandboxName: string;
3075
+ /**
3076
+ * Name of the Preview
3077
+ */
3078
+ previewName: string;
3079
+ };
3080
+ query?: never;
3081
+ url: '/sandboxes/{sandboxName}/previews/{previewName}';
3082
+ };
3083
+ export type DeleteSandboxPreviewResponses = {
3084
+ /**
3085
+ * successful operation
3086
+ */
3087
+ 200: Preview;
3088
+ };
3089
+ export type DeleteSandboxPreviewResponse = DeleteSandboxPreviewResponses[keyof DeleteSandboxPreviewResponses];
3090
+ export type GetSandboxPreviewData = {
3091
+ body?: never;
3092
+ path: {
3093
+ /**
3094
+ * Name of the Sandbox
3095
+ */
3096
+ sandboxName: string;
3097
+ /**
3098
+ * Name of the Preview
3099
+ */
3100
+ previewName: string;
3101
+ };
3102
+ query?: never;
3103
+ url: '/sandboxes/{sandboxName}/previews/{previewName}';
3104
+ };
3105
+ export type GetSandboxPreviewResponses = {
3106
+ /**
3107
+ * successful operation
3108
+ */
3109
+ 200: Preview;
3110
+ };
3111
+ export type GetSandboxPreviewResponse = GetSandboxPreviewResponses[keyof GetSandboxPreviewResponses];
3112
+ export type UpdateSandboxPreviewData = {
3113
+ body: Preview;
3114
+ path: {
3115
+ /**
3116
+ * Name of the Sandbox
3117
+ */
3118
+ sandboxName: string;
3119
+ /**
3120
+ * Name of the Preview
3121
+ */
3122
+ previewName: string;
3123
+ };
3124
+ query?: never;
3125
+ url: '/sandboxes/{sandboxName}/previews/{previewName}';
3126
+ };
3127
+ export type UpdateSandboxPreviewResponses = {
3128
+ /**
3129
+ * successful operation
3130
+ */
3131
+ 200: Preview;
3132
+ };
3133
+ export type UpdateSandboxPreviewResponse = UpdateSandboxPreviewResponses[keyof UpdateSandboxPreviewResponses];
3134
+ export type GetSandboxPreviewTokensData = {
3135
+ body?: never;
3136
+ path: {
3137
+ /**
3138
+ * Name of the Sandbox
3139
+ */
3140
+ sandboxName: string;
3141
+ /**
3142
+ * Name of the Preview
3143
+ */
3144
+ previewName: string;
3145
+ };
3146
+ query?: never;
3147
+ url: '/sandboxes/{sandboxName}/previews/{previewName}/tokens';
3148
+ };
3149
+ export type GetSandboxPreviewTokensResponses = {
3150
+ /**
3151
+ * successful operation
3152
+ */
3153
+ 200: Array<{
3154
+ /**
3155
+ * When the token was created
3156
+ */
3157
+ created_at?: string;
3158
+ /**
3159
+ * The name of the token
3160
+ */
3161
+ name?: string;
3162
+ }>;
3163
+ };
3164
+ export type GetSandboxPreviewTokensResponse = GetSandboxPreviewTokensResponses[keyof GetSandboxPreviewTokensResponses];
3165
+ export type CreateSandboxPreviewTokenData = {
3166
+ body: PreviewToken;
3167
+ path: {
3168
+ /**
3169
+ * Name of the Sandbox
3170
+ */
3171
+ sandboxName: string;
3172
+ /**
3173
+ * Name of the Preview
3174
+ */
3175
+ previewName: string;
3176
+ };
3177
+ query?: never;
3178
+ url: '/sandboxes/{sandboxName}/previews/{previewName}/tokens';
3179
+ };
3180
+ export type CreateSandboxPreviewTokenResponses = {
3181
+ /**
3182
+ * successful operation
3183
+ */
3184
+ 200: {
3185
+ /**
3186
+ * The generated token for the preview
3187
+ */
3188
+ token?: string;
3189
+ };
3190
+ };
3191
+ export type CreateSandboxPreviewTokenResponse = CreateSandboxPreviewTokenResponses[keyof CreateSandboxPreviewTokenResponses];
3192
+ export type DeleteSandboxPreviewTokenData = {
3193
+ body?: never;
3194
+ path: {
3195
+ /**
3196
+ * Name of the Sandbox
3197
+ */
3198
+ sandboxName: string;
3199
+ /**
3200
+ * Name of the Preview
3201
+ */
3202
+ previewName: string;
3203
+ /**
3204
+ * Name of the Token
3205
+ */
3206
+ tokenName: string;
3207
+ };
3208
+ query?: never;
3209
+ url: '/sandboxes/{sandboxName}/previews/{previewName}/tokens/{tokenName}';
3210
+ };
3211
+ export type DeleteSandboxPreviewTokenResponses = {
3212
+ /**
3213
+ * successful operation
3214
+ */
3215
+ 200: {
3216
+ /**
3217
+ * Success message
3218
+ */
3219
+ message?: string;
3220
+ };
3221
+ };
3222
+ export type DeleteSandboxPreviewTokenResponse = DeleteSandboxPreviewTokenResponses[keyof DeleteSandboxPreviewTokenResponses];
2930
3223
  export type StartSandboxData = {
2931
3224
  body?: never;
2932
3225
  path: {
@@ -1 +1,25 @@
1
- export declare const logger: Console;
1
+ interface LoggerInterface {
2
+ info: (message: string) => void;
3
+ debug: (message: string) => void;
4
+ warn: (message: string) => void;
5
+ error: (message: string) => void;
6
+ }
7
+ /**
8
+ * Stringify an object with a limited depth
9
+ * @param obj The object to stringify
10
+ * @param maxDepth Maximum depth (default: 1)
11
+ * @param depth Current depth (internal use)
12
+ */
13
+ export declare function stringify<T>(obj: T, maxDepth?: number, depth?: number): string;
14
+ declare class Logger {
15
+ private logger;
16
+ constructor();
17
+ setLogger(logger: LoggerInterface): void;
18
+ parseArgs(args: unknown[]): string;
19
+ info(...message: unknown[]): void;
20
+ debug(...message: unknown[]): void;
21
+ warn(...message: unknown[]): void;
22
+ error(...message: unknown[]): void;
23
+ }
24
+ declare const logger: Logger;
25
+ export { logger };
@@ -1,4 +1,61 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.logger = void 0;
4
- exports.logger = console;
4
+ exports.stringify = stringify;
5
+ /**
6
+ * Stringify an object with a limited depth
7
+ * @param obj The object to stringify
8
+ * @param maxDepth Maximum depth (default: 1)
9
+ * @param depth Current depth (internal use)
10
+ */
11
+ function stringify(obj, maxDepth = 1, depth = 0) {
12
+ if (obj instanceof Error)
13
+ return obj.stack || obj.message;
14
+ if (obj === null)
15
+ return 'null';
16
+ if (obj === undefined)
17
+ return 'undefined';
18
+ // If we've reached max depth or it's not an object
19
+ if (depth >= maxDepth || typeof obj !== 'object') {
20
+ return typeof obj === 'object' ? `[${Array.isArray(obj) ? 'Array' : 'object'}]` :
21
+ typeof obj === 'string' ? `"${obj}"` : String(obj);
22
+ }
23
+ // Handle arrays
24
+ if (Array.isArray(obj)) {
25
+ return `[${obj.map(item => stringify(item, maxDepth, depth + 1)).join(', ')}]`;
26
+ }
27
+ // Handle objects
28
+ const pairs = Object.entries(obj).map(([key, val]) => `"${key}": ${stringify(val, maxDepth, depth + 1)}`);
29
+ return `{${pairs.join(', ')}}`;
30
+ }
31
+ class Logger {
32
+ logger;
33
+ constructor() {
34
+ this.logger = console;
35
+ }
36
+ setLogger(logger) {
37
+ this.logger = logger;
38
+ }
39
+ parseArgs(args) {
40
+ return args.map((arg) => {
41
+ if (arg instanceof Error) {
42
+ return arg.stack ?? arg.message;
43
+ }
44
+ return arg;
45
+ }).join(" ");
46
+ }
47
+ info(...message) {
48
+ this.logger.info(this.parseArgs(message));
49
+ }
50
+ debug(...message) {
51
+ this.logger.debug(this.parseArgs(message));
52
+ }
53
+ warn(...message) {
54
+ this.logger.warn(this.parseArgs(message));
55
+ }
56
+ error(...message) {
57
+ this.logger.error(this.parseArgs(message));
58
+ }
59
+ }
60
+ const logger = new Logger();
61
+ exports.logger = logger;
@@ -38,7 +38,7 @@ class BlaxelMcpClientTransport {
38
38
  }
39
39
  catch (error) {
40
40
  if (error instanceof Error) {
41
- logger_js_1.logger.warn(error.stack);
41
+ logger_js_1.logger.warn(error.stack ?? error.message);
42
42
  }
43
43
  attempts++;
44
44
  if (attempts === MAX_RETRIES) {
@@ -1,5 +1,5 @@
1
+ import type { ClientOptions } from './types.gen';
1
2
  import { type Config, type ClientOptions as DefaultClientOptions } from '@hey-api/client-fetch';
2
- import type { ClientOptions } from './types.gen.js';
3
3
  /**
4
4
  * The `createClientConfig()` function will be called on client initialization
5
5
  * and the returned object will become the client's initial configuration.
@@ -1,2 +1,2 @@
1
- export * from './sdk.gen.js';
2
1
  export * from './types.gen.js';
2
+ export * from './sdk.gen.js';
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // This file is auto-generated by @hey-api/openapi-ts
18
- __exportStar(require("./sdk.gen.js"), exports);
19
18
  __exportStar(require("./types.gen.js"), exports);
19
+ __exportStar(require("./sdk.gen.js"), exports);
@@ -1,5 +1,5 @@
1
- import type { Client, Options as ClientOptions, TDataShape } from '@hey-api/client-fetch';
2
- import type { DeleteFilesystemByPathData, DeleteNetworkProcessByPidMonitorData, DeleteProcessByIdentifierData, DeleteProcessByIdentifierKillData, GetFilesystemByPathData, GetNetworkProcessByPidPortsData, GetProcessByIdentifierData, GetProcessByIdentifierLogsData, GetProcessData, PostNetworkProcessByPidMonitorData, PostProcessData, PutFilesystemByPathData } from './types.gen.js';
1
+ import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
2
+ import type { DeleteFilesystemByPathData, GetFilesystemByPathData, PutFilesystemByPathData, DeleteNetworkProcessByPidMonitorData, PostNetworkProcessByPidMonitorData, GetNetworkProcessByPidPortsData, GetProcessData, PostProcessData, DeleteProcessByIdentifierData, GetProcessByIdentifierData, DeleteProcessByIdentifierKillData, GetProcessByIdentifierLogsData, GetProcessByIdentifierLogsStreamData } from './types.gen';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -17,67 +17,74 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
17
17
  * Delete file or directory
18
18
  * Delete a file or directory
19
19
  */
20
- export declare const deleteFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<DeleteFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").SuccessResponse, import("./types.gen.js").ErrorResponse, ThrowOnError>;
20
+ export declare const deleteFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<DeleteFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
21
21
  /**
22
22
  * Get file or directory information
23
23
  * Get content of a file or listing of a directory
24
24
  */
25
- export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Directory, import("./types.gen.js").ErrorResponse, ThrowOnError>;
25
+ export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").FileWithContent | import("./types.gen").Directory, import("./types.gen").ErrorResponse, ThrowOnError>;
26
26
  /**
27
27
  * Create or update file or directory
28
28
  * Create or update a file or directory
29
29
  */
30
- export declare const putFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").SuccessResponse, import("./types.gen.js").ErrorResponse, ThrowOnError>;
30
+ export declare const putFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
31
31
  /**
32
32
  * Stop monitoring ports for a process
33
33
  * Stop monitoring for new ports opened by a process
34
34
  */
35
35
  export declare const deleteNetworkProcessByPidMonitor: <ThrowOnError extends boolean = false>(options: Options<DeleteNetworkProcessByPidMonitorData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
36
36
  [key: string]: unknown;
37
- }, import("./types.gen.js").ErrorResponse, ThrowOnError>;
37
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
38
38
  /**
39
39
  * Start monitoring ports for a process
40
40
  * Start monitoring for new ports opened by a process
41
41
  */
42
42
  export declare const postNetworkProcessByPidMonitor: <ThrowOnError extends boolean = false>(options: Options<PostNetworkProcessByPidMonitorData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
43
43
  [key: string]: unknown;
44
- }, import("./types.gen.js").ErrorResponse, ThrowOnError>;
44
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
45
45
  /**
46
46
  * Get open ports for a process
47
47
  * Get a list of all open ports for a process
48
48
  */
49
49
  export declare const getNetworkProcessByPidPorts: <ThrowOnError extends boolean = false>(options: Options<GetNetworkProcessByPidPortsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
50
50
  [key: string]: unknown;
51
- }, import("./types.gen.js").ErrorResponse, ThrowOnError>;
51
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
52
52
  /**
53
53
  * List all processes
54
54
  * Get a list of all running and completed processes
55
55
  */
56
- export declare const getProcess: <ThrowOnError extends boolean = false>(options?: Options<GetProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").ProcessResponse[], unknown, ThrowOnError>;
56
+ export declare const getProcess: <ThrowOnError extends boolean = false>(options?: Options<GetProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse[], unknown, ThrowOnError>;
57
57
  /**
58
58
  * Execute a command
59
59
  * Execute a command and return process information
60
60
  */
61
- export declare const postProcess: <ThrowOnError extends boolean = false>(options: Options<PostProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").ProcessResponse, import("./types.gen.js").ErrorResponse, ThrowOnError>;
61
+ export declare const postProcess: <ThrowOnError extends boolean = false>(options: Options<PostProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
62
62
  /**
63
63
  * Stop a process
64
64
  * Gracefully stop a running process
65
65
  */
66
- export declare const deleteProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").SuccessResponse, import("./types.gen.js").ErrorResponse, ThrowOnError>;
66
+ export declare const deleteProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
67
67
  /**
68
68
  * Get process by identifier
69
69
  * Get information about a process by its PID or name
70
70
  */
71
- export declare const getProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").ProcessResponse, import("./types.gen.js").ErrorResponse, ThrowOnError>;
71
+ export declare const getProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
72
72
  /**
73
73
  * Kill a process
74
74
  * Forcefully kill a running process
75
75
  */
76
- export declare const deleteProcessByIdentifierKill: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierKillData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").SuccessResponse, import("./types.gen.js").ErrorResponse, ThrowOnError>;
76
+ export declare const deleteProcessByIdentifierKill: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierKillData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
77
77
  /**
78
78
  * Get process logs
79
79
  * Get the stdout and stderr output of a process
80
80
  */
81
81
  export declare const getProcessByIdentifierLogs: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
82
82
  [key: string]: string;
83
- }, import("./types.gen.js").ErrorResponse, ThrowOnError>;
83
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
84
+ /**
85
+ * Get process logs in realtime
86
+ * Get the stdout and stderr output of a process in realtime
87
+ */
88
+ export declare const getProcessByIdentifierLogsStream: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsStreamData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
89
+ [key: string]: string;
90
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  // This file is auto-generated by @hey-api/openapi-ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.getProcessByIdentifierLogs = exports.deleteProcessByIdentifierKill = exports.getProcessByIdentifier = exports.deleteProcessByIdentifier = exports.postProcess = exports.getProcess = exports.getNetworkProcessByPidPorts = exports.postNetworkProcessByPidMonitor = exports.deleteNetworkProcessByPidMonitor = exports.putFilesystemByPath = exports.getFilesystemByPath = exports.deleteFilesystemByPath = void 0;
5
- const client_gen_js_1 = require("../client/client.gen.js");
4
+ exports.getProcessByIdentifierLogsStream = exports.getProcessByIdentifierLogs = exports.deleteProcessByIdentifierKill = exports.getProcessByIdentifier = exports.deleteProcessByIdentifier = exports.postProcess = exports.getProcess = exports.getNetworkProcessByPidPorts = exports.postNetworkProcessByPidMonitor = exports.deleteNetworkProcessByPidMonitor = exports.putFilesystemByPath = exports.getFilesystemByPath = exports.deleteFilesystemByPath = void 0;
5
+ const client_gen_1 = require("./client.gen");
6
6
  /**
7
7
  * Delete file or directory
8
8
  * Delete a file or directory
9
9
  */
10
10
  const deleteFilesystemByPath = (options) => {
11
- return (options.client ?? client_gen_js_1.client).delete({
11
+ return (options.client ?? client_gen_1.client).delete({
12
12
  url: '/filesystem/{path}',
13
13
  ...options
14
14
  });
@@ -19,7 +19,7 @@ exports.deleteFilesystemByPath = deleteFilesystemByPath;
19
19
  * Get content of a file or listing of a directory
20
20
  */
21
21
  const getFilesystemByPath = (options) => {
22
- return (options.client ?? client_gen_js_1.client).get({
22
+ return (options.client ?? client_gen_1.client).get({
23
23
  url: '/filesystem/{path}',
24
24
  ...options
25
25
  });
@@ -30,7 +30,7 @@ exports.getFilesystemByPath = getFilesystemByPath;
30
30
  * Create or update a file or directory
31
31
  */
32
32
  const putFilesystemByPath = (options) => {
33
- return (options.client ?? client_gen_js_1.client).put({
33
+ return (options.client ?? client_gen_1.client).put({
34
34
  url: '/filesystem/{path}',
35
35
  ...options,
36
36
  headers: {
@@ -45,7 +45,7 @@ exports.putFilesystemByPath = putFilesystemByPath;
45
45
  * Stop monitoring for new ports opened by a process
46
46
  */
47
47
  const deleteNetworkProcessByPidMonitor = (options) => {
48
- return (options.client ?? client_gen_js_1.client).delete({
48
+ return (options.client ?? client_gen_1.client).delete({
49
49
  url: '/network/process/{pid}/monitor',
50
50
  ...options
51
51
  });
@@ -56,7 +56,7 @@ exports.deleteNetworkProcessByPidMonitor = deleteNetworkProcessByPidMonitor;
56
56
  * Start monitoring for new ports opened by a process
57
57
  */
58
58
  const postNetworkProcessByPidMonitor = (options) => {
59
- return (options.client ?? client_gen_js_1.client).post({
59
+ return (options.client ?? client_gen_1.client).post({
60
60
  url: '/network/process/{pid}/monitor',
61
61
  ...options,
62
62
  headers: {
@@ -71,7 +71,7 @@ exports.postNetworkProcessByPidMonitor = postNetworkProcessByPidMonitor;
71
71
  * Get a list of all open ports for a process
72
72
  */
73
73
  const getNetworkProcessByPidPorts = (options) => {
74
- return (options.client ?? client_gen_js_1.client).get({
74
+ return (options.client ?? client_gen_1.client).get({
75
75
  url: '/network/process/{pid}/ports',
76
76
  ...options
77
77
  });
@@ -82,7 +82,7 @@ exports.getNetworkProcessByPidPorts = getNetworkProcessByPidPorts;
82
82
  * Get a list of all running and completed processes
83
83
  */
84
84
  const getProcess = (options) => {
85
- return (options?.client ?? client_gen_js_1.client).get({
85
+ return (options?.client ?? client_gen_1.client).get({
86
86
  url: '/process',
87
87
  ...options
88
88
  });
@@ -93,7 +93,7 @@ exports.getProcess = getProcess;
93
93
  * Execute a command and return process information
94
94
  */
95
95
  const postProcess = (options) => {
96
- return (options.client ?? client_gen_js_1.client).post({
96
+ return (options.client ?? client_gen_1.client).post({
97
97
  url: '/process',
98
98
  ...options,
99
99
  headers: {
@@ -108,7 +108,7 @@ exports.postProcess = postProcess;
108
108
  * Gracefully stop a running process
109
109
  */
110
110
  const deleteProcessByIdentifier = (options) => {
111
- return (options.client ?? client_gen_js_1.client).delete({
111
+ return (options.client ?? client_gen_1.client).delete({
112
112
  url: '/process/{identifier}',
113
113
  ...options
114
114
  });
@@ -119,7 +119,7 @@ exports.deleteProcessByIdentifier = deleteProcessByIdentifier;
119
119
  * Get information about a process by its PID or name
120
120
  */
121
121
  const getProcessByIdentifier = (options) => {
122
- return (options.client ?? client_gen_js_1.client).get({
122
+ return (options.client ?? client_gen_1.client).get({
123
123
  url: '/process/{identifier}',
124
124
  ...options
125
125
  });
@@ -130,7 +130,7 @@ exports.getProcessByIdentifier = getProcessByIdentifier;
130
130
  * Forcefully kill a running process
131
131
  */
132
132
  const deleteProcessByIdentifierKill = (options) => {
133
- return (options.client ?? client_gen_js_1.client).delete({
133
+ return (options.client ?? client_gen_1.client).delete({
134
134
  url: '/process/{identifier}/kill',
135
135
  ...options,
136
136
  headers: {
@@ -145,9 +145,20 @@ exports.deleteProcessByIdentifierKill = deleteProcessByIdentifierKill;
145
145
  * Get the stdout and stderr output of a process
146
146
  */
147
147
  const getProcessByIdentifierLogs = (options) => {
148
- return (options.client ?? client_gen_js_1.client).get({
148
+ return (options.client ?? client_gen_1.client).get({
149
149
  url: '/process/{identifier}/logs',
150
150
  ...options
151
151
  });
152
152
  };
153
153
  exports.getProcessByIdentifierLogs = getProcessByIdentifierLogs;
154
+ /**
155
+ * Get process logs in realtime
156
+ * Get the stdout and stderr output of a process in realtime
157
+ */
158
+ const getProcessByIdentifierLogsStream = (options) => {
159
+ return (options.client ?? client_gen_1.client).get({
160
+ url: '/process/{identifier}/logs/stream',
161
+ ...options
162
+ });
163
+ };
164
+ exports.getProcessByIdentifierLogsStream = getProcessByIdentifierLogsStream;