@blaxel/core 0.2.43-dev.196 → 0.2.43-dev.199
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/authentication/index.js +4 -30
- package/dist/cjs/cache/index.js +3 -16
- package/dist/cjs/common/browser.js +22 -0
- package/dist/cjs/common/env.js +12 -24
- package/dist/cjs/common/node.js +13 -25
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/filesystem/filesystem.js +12 -13
- package/dist/cjs/sandbox/sandbox.js +2 -2
- package/dist/cjs/types/common/browser.d.ts +5 -0
- package/dist/cjs/types/common/node.d.ts +1 -2
- package/dist/cjs/types/sandbox/filesystem/filesystem.d.ts +6 -2
- package/dist/cjs-browser/.tsbuildinfo +1 -0
- package/dist/cjs-browser/agents/index.js +109 -0
- package/dist/cjs-browser/authentication/apikey.js +24 -0
- package/dist/cjs-browser/authentication/clientcredentials.js +85 -0
- package/dist/cjs-browser/authentication/credentials.js +17 -0
- package/dist/cjs-browser/authentication/deviceMode.js +70 -0
- package/dist/cjs-browser/authentication/index.js +62 -0
- package/dist/cjs-browser/authentication/types.js +2 -0
- package/dist/cjs-browser/cache/index.js +26 -0
- package/dist/cjs-browser/client/authentication.js +15 -0
- package/dist/cjs-browser/client/client.gen.js +8 -0
- package/dist/cjs-browser/client/client.js +17 -0
- package/dist/cjs-browser/client/index.js +19 -0
- package/dist/cjs-browser/client/interceptors.js +17 -0
- package/dist/cjs-browser/client/sdk.gen.js +1824 -0
- package/dist/cjs-browser/client/types.gen.js +4 -0
- package/dist/cjs-browser/common/autoload.js +27 -0
- package/dist/cjs-browser/common/env.js +57 -0
- package/dist/cjs-browser/common/errors.js +17 -0
- package/dist/cjs-browser/common/internal.js +228 -0
- package/dist/cjs-browser/common/internal.test.js +39 -0
- package/dist/cjs-browser/common/logger.js +69 -0
- package/dist/cjs-browser/common/node.js +22 -0
- package/dist/cjs-browser/common/settings.js +181 -0
- package/dist/cjs-browser/index.browser.test.js +45 -0
- package/dist/cjs-browser/index.js +34 -0
- package/dist/cjs-browser/jobs/index.js +19 -0
- package/dist/cjs-browser/jobs/jobs.js +90 -0
- package/dist/cjs-browser/jobs/start.js +66 -0
- package/dist/cjs-browser/jobs/types.js +2 -0
- package/dist/cjs-browser/mcp/client.js +235 -0
- package/dist/cjs-browser/mcp/index.js +18 -0
- package/dist/cjs-browser/mcp/server.js +213 -0
- package/dist/cjs-browser/models/index.js +31 -0
- package/dist/cjs-browser/sandbox/action.js +83 -0
- package/dist/cjs-browser/sandbox/client/client.gen.js +6 -0
- package/dist/cjs-browser/sandbox/client/index.js +19 -0
- package/dist/cjs-browser/sandbox/client/sdk.gen.js +289 -0
- package/dist/cjs-browser/sandbox/client/types.gen.js +3 -0
- package/dist/cjs-browser/sandbox/filesystem/filesystem.js +240 -0
- package/dist/cjs-browser/sandbox/filesystem/index.js +18 -0
- package/dist/cjs-browser/sandbox/filesystem/types.js +2 -0
- package/dist/cjs-browser/sandbox/index.js +36 -0
- package/dist/cjs-browser/sandbox/network/index.js +17 -0
- package/dist/cjs-browser/sandbox/network/network.js +10 -0
- package/dist/cjs-browser/sandbox/preview.js +148 -0
- package/dist/cjs-browser/sandbox/process/index.js +17 -0
- package/dist/cjs-browser/sandbox/process/process.js +189 -0
- package/dist/cjs-browser/sandbox/sandbox.js +180 -0
- package/dist/cjs-browser/sandbox/session.js +123 -0
- package/dist/cjs-browser/sandbox/types.js +81 -0
- package/dist/cjs-browser/telemetry/telemetry.js +80 -0
- package/dist/cjs-browser/tools/index.js +52 -0
- package/dist/cjs-browser/tools/mcpTool.js +254 -0
- package/dist/cjs-browser/tools/types.js +2 -0
- package/dist/cjs-browser/tools/zodSchema.js +50 -0
- package/dist/cjs-browser/types/agents/index.d.ts +15 -0
- package/dist/cjs-browser/types/authentication/apikey.d.ts +10 -0
- package/dist/cjs-browser/types/authentication/clientcredentials.d.ts +17 -0
- package/dist/cjs-browser/types/authentication/credentials.d.ts +6 -0
- package/dist/cjs-browser/types/authentication/deviceMode.d.ts +15 -0
- package/dist/cjs-browser/types/authentication/index.d.ts +3 -0
- package/dist/cjs-browser/types/authentication/types.d.ts +9 -0
- package/dist/cjs-browser/types/cache/index.d.ts +1 -0
- package/dist/cjs-browser/types/client/authentication.d.ts +25 -0
- package/dist/cjs-browser/types/client/client.d.ts +2 -0
- package/dist/cjs-browser/types/client/client.gen.d.ts +12 -0
- package/dist/cjs-browser/types/client/index.d.ts +2 -0
- package/dist/cjs-browser/types/client/interceptors.d.ts +3 -0
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +519 -0
- package/dist/cjs-browser/types/client/types.gen.d.ts +4950 -0
- package/dist/cjs-browser/types/common/autoload.d.ts +3 -0
- package/dist/cjs-browser/types/common/browser.d.ts +5 -0
- package/dist/cjs-browser/types/common/env.d.ts +5 -0
- package/dist/cjs-browser/types/common/errors.d.ts +1 -0
- package/dist/cjs-browser/types/common/internal.d.ts +6 -0
- package/dist/cjs-browser/types/common/internal.test.d.ts +1 -0
- package/dist/cjs-browser/types/common/logger.d.ts +25 -0
- package/dist/cjs-browser/types/common/node.d.ts +6 -0
- package/dist/cjs-browser/types/common/settings.d.ts +32 -0
- package/dist/cjs-browser/types/index.browser.test.d.ts +1 -0
- package/dist/cjs-browser/types/index.d.ts +18 -0
- package/dist/cjs-browser/types/jobs/index.d.ts +3 -0
- package/dist/cjs-browser/types/jobs/jobs.d.ts +13 -0
- package/dist/cjs-browser/types/jobs/start.d.ts +1 -0
- package/dist/cjs-browser/types/jobs/types.d.ts +3 -0
- package/dist/cjs-browser/types/mcp/client.d.ts +28 -0
- package/dist/cjs-browser/types/mcp/index.d.ts +2 -0
- package/dist/cjs-browser/types/mcp/server.d.ts +24 -0
- package/dist/cjs-browser/types/models/index.d.ts +8 -0
- package/dist/cjs-browser/types/sandbox/action.d.ts +19 -0
- package/dist/cjs-browser/types/sandbox/client/client.gen.d.ts +12 -0
- package/dist/cjs-browser/types/sandbox/client/index.d.ts +2 -0
- package/dist/cjs-browser/types/sandbox/client/sdk.gen.d.ts +101 -0
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +578 -0
- package/dist/cjs-browser/types/sandbox/filesystem/filesystem.d.ts +27 -0
- package/dist/cjs-browser/types/sandbox/filesystem/index.d.ts +2 -0
- package/dist/cjs-browser/types/sandbox/filesystem/types.d.ts +15 -0
- package/dist/cjs-browser/types/sandbox/index.d.ts +4 -0
- package/dist/cjs-browser/types/sandbox/network/index.d.ts +1 -0
- package/dist/cjs-browser/types/sandbox/network/network.d.ts +5 -0
- package/dist/cjs-browser/types/sandbox/preview.d.ts +37 -0
- package/dist/cjs-browser/types/sandbox/process/index.d.ts +1 -0
- package/dist/cjs-browser/types/sandbox/process/process.d.ts +24 -0
- package/dist/cjs-browser/types/sandbox/sandbox.d.ts +33 -0
- package/dist/cjs-browser/types/sandbox/session.d.ts +27 -0
- package/dist/cjs-browser/types/sandbox/types.d.ts +52 -0
- package/dist/cjs-browser/types/telemetry/telemetry.d.ts +62 -0
- package/dist/cjs-browser/types/tools/index.d.ts +12 -0
- package/dist/cjs-browser/types/tools/mcpTool.d.ts +33 -0
- package/dist/cjs-browser/types/tools/types.d.ts +8 -0
- package/dist/cjs-browser/types/tools/zodSchema.d.ts +82 -0
- package/dist/cjs-browser/types/volume/index.d.ts +23 -0
- package/dist/cjs-browser/volume/index.js +113 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/authentication/index.js +1 -27
- package/dist/esm/cache/index.js +2 -15
- package/dist/esm/common/browser.js +18 -0
- package/dist/esm/common/env.js +7 -19
- package/dist/esm/common/node.js +10 -21
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/filesystem/filesystem.js +13 -14
- package/dist/esm/sandbox/sandbox.js +2 -2
- package/dist/esm-browser/.tsbuildinfo +1 -0
- package/dist/esm-browser/agents/index.js +104 -0
- package/dist/esm-browser/authentication/apikey.js +20 -0
- package/dist/esm-browser/authentication/clientcredentials.js +81 -0
- package/dist/esm-browser/authentication/credentials.js +13 -0
- package/dist/esm-browser/authentication/deviceMode.js +66 -0
- package/dist/esm-browser/authentication/index.js +56 -0
- package/dist/esm-browser/authentication/types.js +1 -0
- package/dist/esm-browser/cache/index.js +20 -0
- package/dist/esm-browser/client/authentication.js +11 -0
- package/dist/esm-browser/client/client.gen.js +5 -0
- package/dist/esm-browser/client/client.js +1 -0
- package/dist/esm-browser/client/index.js +3 -0
- package/dist/esm-browser/client/interceptors.js +14 -0
- package/dist/esm-browser/client/sdk.gen.js +1717 -0
- package/dist/esm-browser/client/types.gen.js +3 -0
- package/dist/esm-browser/common/autoload.js +23 -0
- package/dist/esm-browser/common/env.js +51 -0
- package/dist/esm-browser/common/errors.js +14 -0
- package/dist/esm-browser/common/internal.js +220 -0
- package/dist/esm-browser/common/internal.test.js +37 -0
- package/dist/esm-browser/common/logger.js +65 -0
- package/dist/esm-browser/common/node.js +18 -0
- package/dist/esm-browser/common/settings.js +178 -0
- package/dist/esm-browser/index.browser.test.js +10 -0
- package/dist/esm-browser/index.js +18 -0
- package/dist/esm-browser/jobs/index.js +3 -0
- package/dist/esm-browser/jobs/jobs.js +86 -0
- package/dist/esm-browser/jobs/start.js +62 -0
- package/dist/esm-browser/jobs/types.js +1 -0
- package/dist/esm-browser/mcp/client.js +231 -0
- package/dist/esm-browser/mcp/index.js +2 -0
- package/dist/esm-browser/mcp/server.js +176 -0
- package/dist/esm-browser/models/index.js +25 -0
- package/dist/esm-browser/package.json +1 -0
- package/dist/esm-browser/sandbox/action.js +78 -0
- package/dist/esm-browser/sandbox/client/client.gen.js +3 -0
- package/dist/esm-browser/sandbox/client/index.js +3 -0
- package/dist/esm-browser/sandbox/client/sdk.gen.js +270 -0
- package/dist/esm-browser/sandbox/client/types.gen.js +2 -0
- package/dist/esm-browser/sandbox/filesystem/filesystem.js +236 -0
- package/dist/esm-browser/sandbox/filesystem/index.js +2 -0
- package/dist/esm-browser/sandbox/filesystem/types.js +1 -0
- package/dist/esm-browser/sandbox/index.js +7 -0
- package/dist/esm-browser/sandbox/network/index.js +1 -0
- package/dist/esm-browser/sandbox/network/network.js +6 -0
- package/dist/esm-browser/sandbox/preview.js +141 -0
- package/dist/esm-browser/sandbox/process/index.js +1 -0
- package/dist/esm-browser/sandbox/process/process.js +185 -0
- package/dist/esm-browser/sandbox/sandbox.js +176 -0
- package/dist/esm-browser/sandbox/session.js +119 -0
- package/dist/esm-browser/sandbox/types.js +76 -0
- package/dist/esm-browser/telemetry/telemetry.js +74 -0
- package/dist/esm-browser/tools/index.js +44 -0
- package/dist/esm-browser/tools/mcpTool.js +249 -0
- package/dist/esm-browser/tools/types.js +1 -0
- package/dist/esm-browser/tools/zodSchema.js +43 -0
- package/dist/esm-browser/volume/index.js +109 -0
- package/package.json +16 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleDynamicImportError(err: any): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function getAlphanumericLimitedHash(input: string, maxSize?: number): string;
|
|
2
|
+
export declare function getGlobalUniqueHash(workspace: string, type: string, name: string): string;
|
|
3
|
+
export declare function pluralize(type: string): string;
|
|
4
|
+
export declare function getForcedUrl(type: string, name: string): import("url").URL | null;
|
|
5
|
+
export declare function getWorkloadTypeShort(type: string): string;
|
|
6
|
+
export declare function generateInternalUrl(workspace: string, type: string, name: string, env: string, protocol: string, hostname: string, blCloud: boolean, workspaceId: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
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 };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare let fs: typeof import("fs") | null;
|
|
2
|
+
declare let os: typeof import("os") | null;
|
|
3
|
+
declare let path: typeof import("path") | null;
|
|
4
|
+
declare let dotenv: typeof import("dotenv") | null;
|
|
5
|
+
export declare function getWebSocket(): Promise<any>;
|
|
6
|
+
export { dotenv, fs, os, path };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Credentials } from "../authentication/credentials.js";
|
|
2
|
+
export type Config = {
|
|
3
|
+
proxy?: string;
|
|
4
|
+
apikey?: string;
|
|
5
|
+
workspace?: string;
|
|
6
|
+
};
|
|
7
|
+
declare class Settings {
|
|
8
|
+
credentials: Credentials;
|
|
9
|
+
config: Config;
|
|
10
|
+
private _version;
|
|
11
|
+
constructor();
|
|
12
|
+
setConfig(config: Config): void;
|
|
13
|
+
get env(): string;
|
|
14
|
+
get baseUrl(): string;
|
|
15
|
+
get runUrl(): string;
|
|
16
|
+
get workspace(): string;
|
|
17
|
+
get authorization(): string;
|
|
18
|
+
get token(): string;
|
|
19
|
+
get version(): string;
|
|
20
|
+
get headers(): Record<string, string>;
|
|
21
|
+
get name(): string;
|
|
22
|
+
get type(): string;
|
|
23
|
+
get runInternalHostname(): string;
|
|
24
|
+
get runInternalProtocol(): string;
|
|
25
|
+
get blCloud(): boolean;
|
|
26
|
+
get workspaceId(): string;
|
|
27
|
+
get generation(): string;
|
|
28
|
+
get loggerType(): string;
|
|
29
|
+
authenticate(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export declare const settings: Settings;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './common/autoload';
|
|
2
|
+
export * from "./agents/index.js";
|
|
3
|
+
export * from "./client/client.js";
|
|
4
|
+
export * from "./common/autoload.js";
|
|
5
|
+
export * from "./common/env.js";
|
|
6
|
+
export * from "./common/node.js";
|
|
7
|
+
export * from "./common/errors.js";
|
|
8
|
+
export * from "./common/internal.js";
|
|
9
|
+
export * from "./common/logger.js";
|
|
10
|
+
export * from "./common/settings.js";
|
|
11
|
+
export * from "./jobs/index.js";
|
|
12
|
+
export * from "./mcp/index.js";
|
|
13
|
+
export * from "./models/index.js";
|
|
14
|
+
export * from "./sandbox/index.js";
|
|
15
|
+
export * from "./telemetry/telemetry.js";
|
|
16
|
+
export * from "./tools/index.js";
|
|
17
|
+
export * from "./tools/types.js";
|
|
18
|
+
export * from "./volume/index.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare class BlJob {
|
|
2
|
+
jobName: string;
|
|
3
|
+
constructor(jobName: string);
|
|
4
|
+
get fallbackUrl(): import("url").URL | null;
|
|
5
|
+
get externalUrl(): import("url").URL;
|
|
6
|
+
get internalUrl(): import("url").URL;
|
|
7
|
+
get forcedUrl(): import("url").URL | null;
|
|
8
|
+
get url(): import("url").URL;
|
|
9
|
+
call(url: URL, tasks: Record<string, unknown>[]): Promise<Response>;
|
|
10
|
+
run(tasks: Record<string, unknown>[]): Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare const blJob: (jobName: string) => BlJob;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const blStartJob: (func: (args: any) => Promise<void>) => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
2
|
+
import { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Client transport for WebSocket: this will connect to a server over the WebSocket protocol.
|
|
5
|
+
* Works in both browser and Node.js environments.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BlaxelMcpClientTransport implements Transport {
|
|
8
|
+
private _socket?;
|
|
9
|
+
private _url;
|
|
10
|
+
private _headers;
|
|
11
|
+
private _isBrowser;
|
|
12
|
+
private _retry_max;
|
|
13
|
+
private _retry_delay;
|
|
14
|
+
onclose?: () => void;
|
|
15
|
+
onerror?: (error: Error) => void;
|
|
16
|
+
onmessage?: (message: JSONRPCMessage) => void;
|
|
17
|
+
constructor(url: string, headers?: Record<string, string>, options?: {
|
|
18
|
+
retry: {
|
|
19
|
+
max?: number;
|
|
20
|
+
delay?: number;
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
start(): Promise<void>;
|
|
24
|
+
private _connect;
|
|
25
|
+
get isConnected(): boolean;
|
|
26
|
+
close(): Promise<void>;
|
|
27
|
+
send(message: JSONRPCMessage): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
2
|
+
interface JSONRPCMessage {
|
|
3
|
+
jsonrpc: "2.0";
|
|
4
|
+
id?: string | number;
|
|
5
|
+
method?: string;
|
|
6
|
+
params?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare class BlaxelMcpServerTransport implements Transport {
|
|
9
|
+
private port;
|
|
10
|
+
private wss;
|
|
11
|
+
private clients;
|
|
12
|
+
onclose?: () => void;
|
|
13
|
+
onerror?: (err: Error) => void;
|
|
14
|
+
private messageHandler?;
|
|
15
|
+
onconnection?: (clientId: string) => void;
|
|
16
|
+
ondisconnection?: (clientId: string) => void;
|
|
17
|
+
set onmessage(handler: ((message: JSONRPCMessage) => void) | undefined);
|
|
18
|
+
constructor(port?: number);
|
|
19
|
+
start(): Promise<void>;
|
|
20
|
+
send(msg: JSONRPCMessage): Promise<void>;
|
|
21
|
+
broadcast(msg: JSONRPCMessage): Promise<void>;
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Model } from "../client/types.gen.js";
|
|
2
|
+
export declare class BLModel {
|
|
3
|
+
modelName: string;
|
|
4
|
+
options?: Record<string, unknown>;
|
|
5
|
+
constructor(modelName: string, options?: Record<string, unknown>);
|
|
6
|
+
}
|
|
7
|
+
export declare const blModel: (modelName: string, options?: Record<string, unknown>) => BLModel;
|
|
8
|
+
export declare const getModelMetadata: (model: string) => Promise<Model | null>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SandboxConfiguration } from "./types.js";
|
|
2
|
+
export declare class ResponseError extends Error {
|
|
3
|
+
response: Response;
|
|
4
|
+
data: unknown;
|
|
5
|
+
error: unknown;
|
|
6
|
+
constructor(response: Response, data: unknown, error: unknown);
|
|
7
|
+
}
|
|
8
|
+
export declare class SandboxAction {
|
|
9
|
+
protected sandbox: SandboxConfiguration;
|
|
10
|
+
constructor(sandbox: SandboxConfiguration);
|
|
11
|
+
get name(): string;
|
|
12
|
+
get fallbackUrl(): string | null;
|
|
13
|
+
get externalUrl(): string;
|
|
14
|
+
get internalUrl(): string;
|
|
15
|
+
get client(): import("@hey-api/client-fetch").Client;
|
|
16
|
+
get forcedUrl(): string | import("url").URL | null;
|
|
17
|
+
get url(): string;
|
|
18
|
+
handleResponseError(response: Response, data: unknown, error: unknown): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ClientOptions } from './types.gen';
|
|
2
|
+
import { type Config, type ClientOptions as DefaultClientOptions } from '@hey-api/client-fetch';
|
|
3
|
+
/**
|
|
4
|
+
* The `createClientConfig()` function will be called on client initialization
|
|
5
|
+
* and the returned object will become the client's initial configuration.
|
|
6
|
+
*
|
|
7
|
+
* You may want to initialize your client this way instead of calling
|
|
8
|
+
* `setConfig()`. This is useful for example if you're using Next.js
|
|
9
|
+
* to ensure your client always has the correct values.
|
|
10
|
+
*/
|
|
11
|
+
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
|
|
12
|
+
export declare const client: import("@hey-api/client-fetch").Client;
|
|
@@ -0,0 +1,101 @@
|
|
|
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, GetWatchFilesystemByPathData, GetWsProcessByIdentifierLogsStreamData, GetWsWatchFilesystemByPathData } from './types.gen';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Delete file or directory
|
|
18
|
+
* Delete a file or directory
|
|
19
|
+
*/
|
|
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
|
+
/**
|
|
22
|
+
* Get file or directory information
|
|
23
|
+
* Get content of a file or listing of a directory
|
|
24
|
+
*/
|
|
25
|
+
export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").Directory | import("./types.gen").FileWithContent, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
26
|
+
/**
|
|
27
|
+
* Create or update a file or directory
|
|
28
|
+
* Create or update a file or directory
|
|
29
|
+
*/
|
|
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
|
+
/**
|
|
32
|
+
* Stop monitoring ports for a process
|
|
33
|
+
* Stop monitoring for new ports opened by a process
|
|
34
|
+
*/
|
|
35
|
+
export declare const deleteNetworkProcessByPidMonitor: <ThrowOnError extends boolean = false>(options: Options<DeleteNetworkProcessByPidMonitorData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
38
|
+
/**
|
|
39
|
+
* Start monitoring ports for a process
|
|
40
|
+
* Start monitoring for new ports opened by a process
|
|
41
|
+
*/
|
|
42
|
+
export declare const postNetworkProcessByPidMonitor: <ThrowOnError extends boolean = false>(options: Options<PostNetworkProcessByPidMonitorData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
45
|
+
/**
|
|
46
|
+
* Get open ports for a process
|
|
47
|
+
* Get a list of all open ports for a process
|
|
48
|
+
*/
|
|
49
|
+
export declare const getNetworkProcessByPidPorts: <ThrowOnError extends boolean = false>(options: Options<GetNetworkProcessByPidPortsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
52
|
+
/**
|
|
53
|
+
* List all processes
|
|
54
|
+
* Get a list of all running and completed processes
|
|
55
|
+
*/
|
|
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
|
+
/**
|
|
58
|
+
* Execute a command
|
|
59
|
+
* Execute a command and return process information
|
|
60
|
+
*/
|
|
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
|
+
/**
|
|
63
|
+
* Stop a process
|
|
64
|
+
* Gracefully stop a running process
|
|
65
|
+
*/
|
|
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
|
+
/**
|
|
68
|
+
* Get process by identifier
|
|
69
|
+
* Get information about a process by its PID or name
|
|
70
|
+
*/
|
|
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
|
+
/**
|
|
73
|
+
* Kill a process
|
|
74
|
+
* Forcefully kill a running process
|
|
75
|
+
*/
|
|
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
|
+
/**
|
|
78
|
+
* Get process logs
|
|
79
|
+
* Get the stdout and stderr output of a process
|
|
80
|
+
*/
|
|
81
|
+
export declare const getProcessByIdentifierLogs: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessLogs, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
82
|
+
/**
|
|
83
|
+
* Stream process logs in real time
|
|
84
|
+
* Streams the stdout and stderr output of a process in real time, one line per log, prefixed with 'stdout:' or 'stderr:'. Closes when the process exits or the client disconnects.
|
|
85
|
+
*/
|
|
86
|
+
export declare const getProcessByIdentifierLogsStream: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsStreamData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<string, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
87
|
+
/**
|
|
88
|
+
* Stream file modification events in a directory
|
|
89
|
+
* Streams the path of modified files (one per line) in the given directory. Closes when the client disconnects.
|
|
90
|
+
*/
|
|
91
|
+
export declare const getWatchFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetWatchFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<string, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
92
|
+
/**
|
|
93
|
+
* Stream process logs in real time via WebSocket
|
|
94
|
+
* Streams the stdout and stderr output of a process in real time as JSON messages.
|
|
95
|
+
*/
|
|
96
|
+
export declare const getWsProcessByIdentifierLogsStream: <ThrowOnError extends boolean = false>(options: Options<GetWsProcessByIdentifierLogsStreamData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
97
|
+
/**
|
|
98
|
+
* Stream file modification events in a directory via WebSocket
|
|
99
|
+
* Streams JSON events of modified files in the given directory. Closes when the client disconnects.
|
|
100
|
+
*/
|
|
101
|
+
export declare const getWsWatchFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetWsWatchFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, import("./types.gen").ErrorResponse, ThrowOnError>;
|