@vectorx/cloud-toolkit 0.0.0-beta-20260108133839 → 0.0.0-beta-20260320063305

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.
Files changed (53) hide show
  1. package/lib/agent.kit.js +274 -56
  2. package/lib/cloud-dev.kit.js +36 -0
  3. package/lib/config/api.config.js +2 -8
  4. package/lib/container/container.js +10 -0
  5. package/lib/container/identifiers.js +5 -0
  6. package/lib/container/index.js +15 -0
  7. package/lib/database.kit.js +56 -0
  8. package/lib/env.kit.js +40 -0
  9. package/lib/fun.kit.js +34 -0
  10. package/lib/index.js +6 -0
  11. package/lib/services/agent-service.js +132 -0
  12. package/lib/services/auth-service.js +2 -1
  13. package/lib/services/cloud-dev-service.js +97 -0
  14. package/lib/services/cloud-env-service.js +166 -0
  15. package/lib/services/database-service.js +142 -0
  16. package/lib/services/fun-service.js +378 -0
  17. package/lib/services/index.js +5 -0
  18. package/lib/utils/cos-uploader.js +3 -1
  19. package/lib/utils/fun-project-validator.js +212 -0
  20. package/lib/utils/open-browser.js +7 -1
  21. package/lib/utils/openChrome.applescript +2 -2
  22. package/lib/utils/output.js +53 -19
  23. package/lib/utils/project-validator.js +3 -1
  24. package/lib/utils/request.js +21 -0
  25. package/lib/utils/table.js +17 -0
  26. package/lib/utils/tracker/ai-apm.js +62 -0
  27. package/lib/utils/tracker/apm.js +137 -0
  28. package/lib/utils/tracker/cli-apm.js +108 -0
  29. package/lib/utils/tracker/device.js +3 -1
  30. package/lib/utils/tracker/index.js +18 -131
  31. package/package.json +15 -7
  32. package/types/agent.kit.d.ts +45 -2
  33. package/types/cloud-dev.kit.d.ts +18 -0
  34. package/types/config/api.config.d.ts +1 -2
  35. package/types/container/identifiers.d.ts +6 -1
  36. package/types/container/index.d.ts +6 -1
  37. package/types/container/types.d.ts +124 -0
  38. package/types/database.kit.d.ts +54 -0
  39. package/types/env.kit.d.ts +43 -0
  40. package/types/fun.kit.d.ts +63 -0
  41. package/types/index.d.ts +6 -0
  42. package/types/services/agent-service.d.ts +11 -0
  43. package/types/services/cloud-dev-service.d.ts +23 -0
  44. package/types/services/cloud-env-service.d.ts +10 -0
  45. package/types/services/database-service.d.ts +33 -0
  46. package/types/services/fun-service.d.ts +23 -0
  47. package/types/services/index.d.ts +5 -0
  48. package/types/utils/fun-project-validator.d.ts +22 -0
  49. package/types/utils/table.d.ts +2 -0
  50. package/types/utils/tracker/ai-apm.d.ts +54 -0
  51. package/types/utils/tracker/apm.d.ts +28 -0
  52. package/types/utils/tracker/cli-apm.d.ts +27 -0
  53. package/types/utils/tracker/index.d.ts +5 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorx/cloud-toolkit",
3
- "version": "0.0.0-beta-20260108133839",
3
+ "version": "0.0.0-beta-20260320063305",
4
4
  "description": "VectorX Cloud Toolkit",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",
@@ -18,12 +18,11 @@
18
18
  "author": "",
19
19
  "license": "ISC",
20
20
  "engines": {
21
- "node": ">=18.0.0"
21
+ "node": ">=20.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@vectorx/agent-simulator": "0.0.0-beta-20260108133839",
25
- "@vectorx/functions-framework": "0.0.0-beta-20260108133839",
26
24
  "archiver": "^5.3.1",
25
+ "cli-table3": "^0.5.1",
27
26
  "cos-nodejs-sdk-v5": "2.x",
28
27
  "crypto": "^1.0.1",
29
28
  "dayjs": "^1.11.13",
@@ -38,7 +37,17 @@
38
37
  "ora": "^4.0.2",
39
38
  "semver": "^7.5.4",
40
39
  "terminal-link": "^2.1.1",
41
- "uuid": "^11.1.0"
40
+ "uuid": "^11.1.0",
41
+ "@vectorx/cloud-database-client": "0.0.0-beta-20260320063305",
42
+ "@vectorx/endpoints": "0.0.0-beta-20260320063305"
43
+ },
44
+ "peerDependencies": {
45
+ "@vectorx/functions-framework": "*"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "@vectorx/functions-framework": {
49
+ "optional": true
50
+ }
42
51
  },
43
52
  "devDependencies": {
44
53
  "@types/archiver": "^5.3.2",
@@ -50,6 +59,5 @@
50
59
  "dev": "rimraf lib types && tsc -w && cp -r src/utils/*.applescript lib/utils/",
51
60
  "build": "rimraf lib types && tsc --resolveJsonModule && cp -r src/utils/*.applescript lib/utils/",
52
61
  "test": "echo \"Error: no test specified\" && exit 1"
53
- },
54
- "readme": "### 云开发工具集合"
62
+ }
55
63
  }
@@ -1,11 +1,33 @@
1
+ import type { LogCollector } from "./fun.kit";
2
+ type AgentSimulatorCtor = new (opts: {
3
+ port: number;
4
+ agentServerUrl: string;
5
+ open: boolean;
6
+ quiet?: boolean;
7
+ agentId?: string;
8
+ }) => {
9
+ start(): Promise<void>;
10
+ };
1
11
  export interface AgentDevOptions {
2
12
  workDir?: string;
3
13
  port?: number;
4
14
  simulatorPort?: number;
15
+ idePort?: number;
5
16
  watch?: boolean;
6
17
  open?: boolean;
7
18
  nodePath?: string;
8
19
  enableRedLangfuse?: boolean;
20
+ mode?: "agent" | "fun";
21
+ useIde?: boolean;
22
+ deps?: {
23
+ AgentSimulator?: AgentSimulatorCtor;
24
+ startFunctionDebugger?: (opts: any) => Promise<{
25
+ uiUrl: string;
26
+ apiUrl: string;
27
+ wsUrl: string;
28
+ close: () => Promise<void>;
29
+ }>;
30
+ };
9
31
  }
10
32
  export interface IUploadOptions {
11
33
  version: string;
@@ -18,6 +40,7 @@ export interface AgentBuildOptions {
18
40
  upload?: boolean;
19
41
  validator?: IProjectValidator;
20
42
  uploadInfo?: IUploadOptions;
43
+ logCollector?: LogCollector;
21
44
  }
22
45
  export interface AgentNewOptions {
23
46
  projectName: string;
@@ -56,11 +79,19 @@ export interface IDeployService {
56
79
  }
57
80
  export declare function startRcbFramework(workDir: string, port: number, watch: boolean, nodePath?: string, options?: {
58
81
  enableRedLangfuse?: boolean;
59
- }): Promise<void>;
82
+ mode?: "agent" | "fun";
83
+ }, onLog?: (log: {
84
+ level: "info" | "error" | "warn";
85
+ message: string;
86
+ timestamp: string;
87
+ }) => void): Promise<void>;
60
88
  export declare function startDev(options: AgentDevOptions): Promise<{
61
89
  port: number;
62
90
  simulatorPort: number;
63
- simulator: any;
91
+ simulator: {
92
+ start(): Promise<void>;
93
+ };
94
+ ideUrl: string;
64
95
  rcbProcess: any;
65
96
  }>;
66
97
  export declare function build(options: AgentBuildOptions): Promise<BuildResult>;
@@ -68,3 +99,15 @@ export declare function createNew(options: AgentNewOptions): Promise<{
68
99
  projectDir: string;
69
100
  }>;
70
101
  export declare function cleanup(): void;
102
+ export interface AgentInfoResult {
103
+ agentId: string;
104
+ agentName: string;
105
+ agentIcon: string;
106
+ }
107
+ export declare function getAgentInfo(workDir?: string): Promise<AgentInfoResult>;
108
+ export type { AgentListItem, AgentDetail } from "./container/types";
109
+ export declare function getAgentList(params?: {
110
+ pageNo?: number;
111
+ pageSize?: number;
112
+ }): Promise<import("./container/types").AgentListItem[]>;
113
+ export declare function getAgentInfoById(agentId: string): Promise<import("./container/types").AgentDetail | null>;
@@ -0,0 +1,18 @@
1
+ import type { CloudDevUserInfo, LangfuseConfigResult } from "./container";
2
+ export type { LangfuseConfigResult, CloudDevUserInfo };
3
+ export declare function getLangfuseConfig(params?: {
4
+ secret_id?: string;
5
+ cli_token?: string;
6
+ }): Promise<LangfuseConfigResult>;
7
+ export declare function getCloudDevLLMBaseURL(params?: {
8
+ secret_id?: string;
9
+ cli_token?: string;
10
+ }): string;
11
+ export declare function getCloudDevAnthropicLLMBaseURL(params?: {
12
+ secret_id?: string;
13
+ cli_token?: string;
14
+ }): string;
15
+ export declare function getUserInfo(params?: {
16
+ secret_id?: string;
17
+ cli_token?: string;
18
+ }): Promise<CloudDevUserInfo>;
@@ -1,2 +1 @@
1
- declare function getBaseUrl(): string;
2
- export { getBaseUrl };
1
+ export declare function getBaseUrl(): string;
@@ -1,6 +1,11 @@
1
1
  import type { ServiceIdentifier } from "inversify";
2
- import type { IAuthService, IUploadService } from "./types";
2
+ import type { IAgentService, IAuthService, ICloudDevService, ICloudEnvService, IDatabaseService, IFunService, IUploadService } from "./types";
3
3
  export declare const SERVICE_IDENTIFIERS: {
4
4
  AuthService: ServiceIdentifier<IAuthService>;
5
5
  UploadService: ServiceIdentifier<IUploadService>;
6
+ CloudEnvService: ServiceIdentifier<ICloudEnvService>;
7
+ CloudDevService: ServiceIdentifier<ICloudDevService>;
8
+ FunService: ServiceIdentifier<IFunService>;
9
+ DatabaseService: ServiceIdentifier<IDatabaseService>;
10
+ AgentService: ServiceIdentifier<IAgentService>;
6
11
  };
@@ -1,9 +1,14 @@
1
1
  import { container } from "./container";
2
2
  import { SERVICE_IDENTIFIERS } from "./identifiers";
3
- import type { IAuthService, IUploadService } from "./types";
3
+ import type { IAgentService, IAuthService, ICloudDevService, ICloudEnvService, IDatabaseService, IFunService, IUploadService } from "./types";
4
4
  export declare class ServiceProvider {
5
5
  static getAuthService(): IAuthService;
6
6
  static getUploadService(): IUploadService;
7
+ static getCloudEnvService(): ICloudEnvService;
8
+ static getCloudDevService(): ICloudDevService;
9
+ static getFunService(): IFunService;
10
+ static getDatabaseService(): IDatabaseService;
11
+ static getAgentService(): IAgentService;
7
12
  }
8
13
  export { container, SERVICE_IDENTIFIERS };
9
14
  export * from "./types";
@@ -1,3 +1,7 @@
1
+ import type { DatabaseClient } from "@vectorx/cloud-database-client";
2
+ import type { DatabaseRequestContext, DbColumn, DbPreviewOptions, DbTable, DbTablePreview, SqlQuery } from "../database.kit";
3
+ import type { CloudEnvironment, CloudEnvironmentCreateRequest, CloudEnvironmentUpdateRequest } from "../env.kit";
4
+ import type { FunDeployOptions, FunDeployResult, FunDevOptions, FunDevRuntime } from "../fun.kit";
1
5
  import type { CheckStatusRequest, CheckStatusResponse } from "../services/auth-service";
2
6
  import type { BuildPreCheckResponse, IBuildPreCheckParams, IDeployParams } from "../services/upload-service";
3
7
  export interface IAuthService {
@@ -11,9 +15,129 @@ export interface IUploadService {
11
15
  buildPreCheck(params: IBuildPreCheckParams): Promise<BuildPreCheckResponse>;
12
16
  deploy(params: IDeployParams): Promise<any>;
13
17
  }
18
+ export interface ICloudEnvService {
19
+ getCloudEnvironments(cloudEnvId?: string): Promise<CloudEnvironment[]>;
20
+ getCloudEnvironment(cloudEnvId: string): Promise<CloudEnvironment | null>;
21
+ createCloudEnvironment(payload: CloudEnvironmentCreateRequest): Promise<CloudEnvironment>;
22
+ updateCloudEnvironment(payload: CloudEnvironmentUpdateRequest): Promise<CloudEnvironment>;
23
+ }
24
+ export interface IFunService {
25
+ startFunDev(options?: FunDevOptions): Promise<FunDevRuntime>;
26
+ deploy(options: FunDeployOptions): Promise<FunDeployResult>;
27
+ getPublishHistory(options: {
28
+ envId: string;
29
+ pageNo?: number;
30
+ pageSize?: number;
31
+ }): Promise<{
32
+ pkgList: Array<{
33
+ cloud_env_id: string;
34
+ desc: string;
35
+ resource_id: string;
36
+ committer_id: string;
37
+ committer_name: string;
38
+ committer_time: number;
39
+ }>;
40
+ total: number;
41
+ }>;
42
+ }
43
+ export interface IDatabaseService {
44
+ getOrCreateClient(ctx: DatabaseRequestContext): Promise<DatabaseClient>;
45
+ listTables(ctx: DatabaseRequestContext, params?: {
46
+ schema?: string;
47
+ }): Promise<{
48
+ tables: DbTable[];
49
+ }>;
50
+ getTableColumns(ctx: DatabaseRequestContext, params: {
51
+ schema?: string;
52
+ table: string;
53
+ }): Promise<{
54
+ columns: DbColumn[];
55
+ }>;
56
+ previewTable(ctx: DatabaseRequestContext, params: {
57
+ schema?: string;
58
+ table: string;
59
+ options?: DbPreviewOptions;
60
+ }): Promise<{
61
+ preview: DbTablePreview;
62
+ }>;
63
+ executeSql(ctx: DatabaseRequestContext, q: SqlQuery): Promise<{
64
+ rows: any[];
65
+ rowCount?: number;
66
+ }>;
67
+ }
68
+ export interface ICloudDevService {
69
+ getLangfuseConfig(params?: {
70
+ secret_id?: string;
71
+ cli_token?: string;
72
+ }): Promise<LangfuseConfigResult>;
73
+ getCloudDevLLMBaseURL(params?: {
74
+ secret_id?: string;
75
+ cli_token?: string;
76
+ }): string;
77
+ getCloudDevAnthropicLLMBaseURL(params?: {
78
+ secret_id?: string;
79
+ cli_token?: string;
80
+ }): string;
81
+ getUserInfo(params?: {
82
+ secret_id?: string;
83
+ cli_token?: string;
84
+ }): Promise<CloudDevUserInfo>;
85
+ }
86
+ export interface LangfuseConfigResult {
87
+ secretKey: string;
88
+ publicKey: string;
89
+ baseUrl?: string;
90
+ }
91
+ export interface CloudDevUserInfo {
92
+ nick?: string;
93
+ nickname?: string;
94
+ user_id?: string;
95
+ avatar?: string;
96
+ desc?: string;
97
+ [key: string]: unknown;
98
+ }
99
+ export interface AgentListItem {
100
+ agentId: string;
101
+ agentName: string;
102
+ agentType?: string;
103
+ status?: string;
104
+ createTime?: string;
105
+ updateTime?: string;
106
+ [key: string]: unknown;
107
+ }
108
+ export interface AgentDetail {
109
+ agentId: string;
110
+ agentName: string;
111
+ agentAvatar?: string;
112
+ agentType?: string;
113
+ description?: string;
114
+ status?: string;
115
+ config?: Record<string, unknown>;
116
+ createTime?: string;
117
+ updateTime?: string;
118
+ creator?: string;
119
+ [key: string]: unknown;
120
+ }
121
+ export interface IAgentService {
122
+ getAgentList(params?: {
123
+ pageNo?: number;
124
+ pageSize?: number;
125
+ }): Promise<AgentListItem[]>;
126
+ getAgentInfoById(agentId: string): Promise<AgentDetail | null>;
127
+ }
128
+ export interface CloudEnvInfo {
129
+ cloud_env_name: string;
130
+ status: number;
131
+ cloud_env_id: string;
132
+ description?: string;
133
+ create_time?: string;
134
+ update_time?: string;
135
+ }
14
136
  export interface LoginInfo {
15
137
  secret_id: string;
16
138
  cli_token: string;
17
139
  create_at: number;
18
140
  expire_in_sec: number;
141
+ cloudEnvInfo?: CloudEnvInfo | null;
142
+ userInfo?: CloudDevUserInfo | null;
19
143
  }
@@ -0,0 +1,54 @@
1
+ import type { DatabaseClient } from "@vectorx/cloud-database-client";
2
+ export type DbTable = {
3
+ schema?: string;
4
+ name: string;
5
+ };
6
+ export type DbColumn = {
7
+ name: string;
8
+ dataType?: string;
9
+ udtName?: string;
10
+ nullable?: boolean;
11
+ ordinalPosition?: number;
12
+ defaultValue?: string | null;
13
+ };
14
+ export type DbTablePreview = {
15
+ rows: Array<Record<string, any>>;
16
+ rowCount?: number;
17
+ };
18
+ export type DbPreviewOptions = {
19
+ limit?: number;
20
+ offset?: number;
21
+ orderBy?: string;
22
+ orderDirection?: "asc" | "desc";
23
+ };
24
+ export type SqlQuery = {
25
+ sql: string;
26
+ values?: any[];
27
+ readonly?: boolean;
28
+ };
29
+ export interface DatabaseRequestContext {
30
+ envId?: string;
31
+ }
32
+ export declare function getDatabaseClient(ctx?: DatabaseRequestContext): Promise<DatabaseClient>;
33
+ export declare function listDatabaseTables(ctx?: DatabaseRequestContext, params?: {
34
+ schema?: string;
35
+ }): Promise<{
36
+ tables: DbTable[];
37
+ }>;
38
+ export declare function getDatabaseTableColumns(ctx?: DatabaseRequestContext, params?: {
39
+ schema?: string;
40
+ table: string;
41
+ }): Promise<{
42
+ columns: DbColumn[];
43
+ }>;
44
+ export declare function previewDatabaseTable(ctx?: DatabaseRequestContext, params?: {
45
+ schema?: string;
46
+ table: string;
47
+ options?: DbPreviewOptions;
48
+ }): Promise<{
49
+ preview: DbTablePreview;
50
+ }>;
51
+ export declare function executeDatabaseSql(ctx?: DatabaseRequestContext, q?: SqlQuery): Promise<{
52
+ rows: any[];
53
+ rowCount?: number;
54
+ }>;
@@ -0,0 +1,43 @@
1
+ export interface CloudEnvironment {
2
+ cloud_env_name: string;
3
+ status: number;
4
+ cloud_env_id: string;
5
+ description?: string;
6
+ creator_id?: string;
7
+ create_time?: string;
8
+ update_time?: string;
9
+ env_variables?: unknown;
10
+ }
11
+ export interface CloudEnvironmentListData {
12
+ envs: CloudEnvironment[];
13
+ }
14
+ export interface CloudEnvironmentListResponse {
15
+ code: number;
16
+ msg: string;
17
+ success: boolean;
18
+ data: CloudEnvironmentListData;
19
+ }
20
+ export interface CloudEnvironmentCreateRequest {
21
+ cloud_env_name: string;
22
+ description?: string;
23
+ }
24
+ export interface CloudEnvironmentCreateResponse {
25
+ code: number;
26
+ msg: string;
27
+ success: boolean;
28
+ data: CloudEnvironment;
29
+ }
30
+ export interface CloudEnvironmentUpdateRequest {
31
+ cloud_env_id: string;
32
+ env_variables: string;
33
+ }
34
+ export interface CloudEnvironmentUpdateResponse {
35
+ code: number;
36
+ msg: string;
37
+ success: boolean;
38
+ data: CloudEnvironment;
39
+ }
40
+ export declare function getCloudEnvironments(cloudEnvId?: string): Promise<CloudEnvironment[]>;
41
+ export declare function getCloudEnvironment(cloudEnvId: string): Promise<CloudEnvironment | null>;
42
+ export declare function createCloudEnvironment(payload: CloudEnvironmentCreateRequest): Promise<CloudEnvironment>;
43
+ export declare function updateCloudEnvironment(payload: CloudEnvironmentUpdateRequest): Promise<CloudEnvironment>;
@@ -0,0 +1,63 @@
1
+ export interface FunDevOptions {
2
+ workDir?: string;
3
+ uiPort?: number;
4
+ apiPort?: number;
5
+ watch?: boolean;
6
+ open?: boolean;
7
+ quiet?: boolean;
8
+ envId?: string;
9
+ mode?: "agent" | "fun";
10
+ deps?: {
11
+ startFunctionDebugger?: (opts: any) => Promise<{
12
+ uiUrl: string;
13
+ apiUrl: string;
14
+ wsUrl: string;
15
+ close: () => Promise<void>;
16
+ }>;
17
+ };
18
+ }
19
+ export interface FunDevRuntime {
20
+ workDir: string;
21
+ uiUrl: string;
22
+ apiUrl: string;
23
+ wsUrl: string;
24
+ ffUrl: string;
25
+ close: () => Promise<void>;
26
+ }
27
+ export type LogType = "info" | "success" | "error" | "warn";
28
+ export interface LogCollector {
29
+ addLog(log: string, type?: LogType, loading?: boolean): void;
30
+ }
31
+ export interface FunDeployOptions {
32
+ envId: string;
33
+ workDir?: string;
34
+ includeNodeModules?: boolean;
35
+ desc?: string;
36
+ logCollector?: LogCollector;
37
+ }
38
+ export interface FunDeployResult {
39
+ success: boolean;
40
+ code: number;
41
+ msg?: string;
42
+ publisher?: string;
43
+ }
44
+ export interface PublishHistoryItem {
45
+ cloud_env_id: string;
46
+ desc: string;
47
+ resource_id: string;
48
+ committer_id: string;
49
+ committer_name: string;
50
+ committer_time: number;
51
+ }
52
+ export interface FunPublishHistoryOptions {
53
+ envId: string;
54
+ pageNo?: number;
55
+ pageSize?: number;
56
+ }
57
+ export interface FunPublishHistoryResult {
58
+ pkgList: PublishHistoryItem[];
59
+ total: number;
60
+ }
61
+ export declare function startFunDev(options?: FunDevOptions): Promise<FunDevRuntime>;
62
+ export declare function deployFun(options: FunDeployOptions): Promise<FunDeployResult>;
63
+ export declare function getPublishHistory(options: FunPublishHistoryOptions): Promise<FunPublishHistoryResult>;
package/types/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  export * from "./agent.kit";
2
+ export * from "./fun.kit";
3
+ export * from "./env.kit";
4
+ export * from "./database.kit";
5
+ export * from "./cloud-dev.kit";
2
6
  export { Uploader } from "./utils/cos-uploader";
3
7
  export * from "./container";
4
8
  export * from "./services";
@@ -10,4 +14,6 @@ export * from "./utils/tracker";
10
14
  export * from "./utils/port-finder";
11
15
  export * from "./utils/open-browser";
12
16
  export * from "./utils/output";
17
+ export * from "./utils/table";
18
+ export * from "./utils/fun-project-validator";
13
19
  export { TokenRequest, TokenResponse, UploadTempPermit, InternalTokenRequest, } from "./services/upload-service";
@@ -0,0 +1,11 @@
1
+ import type { AgentDetail, AgentListItem, IAgentService } from "../container/types";
2
+ export declare class AgentService implements IAgentService {
3
+ private readonly authService;
4
+ constructor();
5
+ private resolveAuthQuery;
6
+ getAgentList(params?: {
7
+ pageNo?: number;
8
+ pageSize?: number;
9
+ }): Promise<AgentListItem[]>;
10
+ getAgentInfoById(agentId: string): Promise<AgentDetail | null>;
11
+ }
@@ -0,0 +1,23 @@
1
+ import type { CloudDevUserInfo, ICloudDevService, LangfuseConfigResult } from "../container";
2
+ export declare class CloudDevService implements ICloudDevService {
3
+ private readonly authService;
4
+ constructor();
5
+ private resolveAuthQuery;
6
+ private getCloudDevBaseUrl;
7
+ getLangfuseConfig(params?: {
8
+ secret_id?: string;
9
+ cli_token?: string;
10
+ }): Promise<LangfuseConfigResult>;
11
+ getCloudDevLLMBaseURL(params?: {
12
+ secret_id?: string;
13
+ cli_token?: string;
14
+ }): string;
15
+ getCloudDevAnthropicLLMBaseURL(params?: {
16
+ secret_id?: string;
17
+ cli_token?: string;
18
+ }): string;
19
+ getUserInfo(params?: {
20
+ secret_id?: string;
21
+ cli_token?: string;
22
+ }): Promise<CloudDevUserInfo>;
23
+ }
@@ -0,0 +1,10 @@
1
+ import type { ICloudEnvService } from "../container";
2
+ import type { CloudEnvironment, CloudEnvironmentCreateRequest, CloudEnvironmentUpdateRequest } from "../env.kit";
3
+ export declare class CloudEnvService implements ICloudEnvService {
4
+ private readonly authService;
5
+ constructor();
6
+ getCloudEnvironments(cloudEnvId?: string): Promise<CloudEnvironment[]>;
7
+ getCloudEnvironment(cloudEnvId: string): Promise<CloudEnvironment | null>;
8
+ createCloudEnvironment(payload: CloudEnvironmentCreateRequest): Promise<CloudEnvironment>;
9
+ updateCloudEnvironment(payload: CloudEnvironmentUpdateRequest): Promise<CloudEnvironment>;
10
+ }
@@ -0,0 +1,33 @@
1
+ import { type DatabaseClient } from "@vectorx/cloud-database-client";
2
+ import type { IDatabaseService } from "../container/types";
3
+ import type { DatabaseRequestContext, DbColumn, DbPreviewOptions, DbTable, DbTablePreview, SqlQuery } from "../database.kit";
4
+ export declare class DatabaseService implements IDatabaseService {
5
+ private readonly authService;
6
+ private readonly clientCache;
7
+ private readonly mockRdsEndpointInfo;
8
+ constructor();
9
+ private pickDbEndpoint;
10
+ getOrCreateClient(ctx: DatabaseRequestContext): Promise<DatabaseClient>;
11
+ listTables(ctx: DatabaseRequestContext, params?: {
12
+ schema?: string;
13
+ }): Promise<{
14
+ tables: DbTable[];
15
+ }>;
16
+ getTableColumns(ctx: DatabaseRequestContext, params: {
17
+ schema?: string;
18
+ table: string;
19
+ }): Promise<{
20
+ columns: DbColumn[];
21
+ }>;
22
+ previewTable(ctx: DatabaseRequestContext, params: {
23
+ schema?: string;
24
+ table: string;
25
+ options?: DbPreviewOptions;
26
+ }): Promise<{
27
+ preview: DbTablePreview;
28
+ }>;
29
+ executeSql(ctx: DatabaseRequestContext, q: SqlQuery): Promise<{
30
+ rows: any[];
31
+ rowCount?: number;
32
+ }>;
33
+ }
@@ -0,0 +1,23 @@
1
+ import type { IFunService } from "../container";
2
+ import type { FunDeployOptions, FunDeployResult, FunDevOptions, FunDevRuntime } from "../fun.kit";
3
+ export declare class FunService implements IFunService {
4
+ private readonly authService;
5
+ constructor();
6
+ startFunDev(options?: FunDevOptions): Promise<FunDevRuntime>;
7
+ deploy(options: FunDeployOptions): Promise<FunDeployResult>;
8
+ getPublishHistory(options: {
9
+ envId: string;
10
+ pageNo?: number;
11
+ pageSize?: number;
12
+ }): Promise<{
13
+ pkgList: Array<{
14
+ cloud_env_id: string;
15
+ desc: string;
16
+ resource_id: string;
17
+ committer_id: string;
18
+ committer_name: string;
19
+ committer_time: number;
20
+ }>;
21
+ total: number;
22
+ }>;
23
+ }
@@ -1,2 +1,7 @@
1
1
  export * from "./auth-service";
2
2
  export * from "./upload-service";
3
+ export * from "./cloud-dev-service";
4
+ export * from "./cloud-env-service";
5
+ export * from "./database-service";
6
+ export * from "./fun-service";
7
+ export * from "./agent-service";
@@ -0,0 +1,22 @@
1
+ export interface FunValidationResult {
2
+ valid: boolean;
3
+ errors: string[];
4
+ warnings?: string[];
5
+ }
6
+ export interface FunctionConfig {
7
+ name: string;
8
+ directory: string;
9
+ source: string;
10
+ triggerPath: string;
11
+ }
12
+ export interface CloudFunctionConfig {
13
+ functionsRoot: string;
14
+ functions?: FunctionConfig[];
15
+ }
16
+ export declare class FunProjectValidator {
17
+ private workDir;
18
+ constructor(workDir: string);
19
+ validate(): Promise<FunValidationResult>;
20
+ private validateFunctionsConfig;
21
+ private validateDependencies;
22
+ }
@@ -0,0 +1,2 @@
1
+ import { type TableOptions } from "cli-table3";
2
+ export declare function printHorizontalTable(head: string[], data?: (string | number)[][], options?: TableOptions): void;