@basilica/openclaw 0.1.0 → 0.2.0
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/gateway/status.d.ts +3 -6
- package/dist/gateway/status.d.ts.map +1 -1
- package/dist/gateway/status.js +11 -14
- package/dist/gateway/status.js.map +1 -1
- package/dist/gateway/webhook.d.ts +2 -1
- package/dist/gateway/webhook.d.ts.map +1 -1
- package/dist/gateway/webhook.js +28 -1
- package/dist/gateway/webhook.js.map +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/tools/auth.d.ts +3 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +170 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/billing.d.ts +3 -0
- package/dist/tools/billing.d.ts.map +1 -0
- package/dist/tools/billing.js +37 -0
- package/dist/tools/billing.js.map +1 -0
- package/dist/tools/context.d.ts +6 -1
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +18 -9
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/deployments.d.ts.map +1 -1
- package/dist/tools/deployments.js +97 -24
- package/dist/tools/deployments.js.map +1 -1
- package/dist/tools/index.js +10 -10
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/jobs.d.ts.map +1 -1
- package/dist/tools/jobs.js +68 -22
- package/dist/tools/jobs.js.map +1 -1
- package/dist/tools/rentals.d.ts +3 -0
- package/dist/tools/rentals.d.ts.map +1 -0
- package/dist/tools/rentals.js +114 -0
- package/dist/tools/rentals.js.map +1 -0
- package/dist/tools/schemas.d.ts +25 -15
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +139 -69
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/secure-cloud.d.ts +3 -0
- package/dist/tools/secure-cloud.d.ts.map +1 -0
- package/dist/tools/secure-cloud.js +41 -0
- package/dist/tools/secure-cloud.js.map +1 -0
- package/openclaw.plugin.json +3 -23
- package/package.json +3 -2
- package/skills/basilica-operator/index.md +43 -31
- package/skills/basilica-platform/index.md +87 -54
- package/dist/hooks/model-routing.d.ts +0 -3
- package/dist/hooks/model-routing.d.ts.map +0 -1
- package/dist/hooks/model-routing.js +0 -11
- package/dist/hooks/model-routing.js.map +0 -1
- package/dist/hooks/tool-policy.d.ts +0 -3
- package/dist/hooks/tool-policy.d.ts.map +0 -1
- package/dist/hooks/tool-policy.js +0 -44
- package/dist/hooks/tool-policy.js.map +0 -1
- package/dist/tools/datasets.d.ts +0 -3
- package/dist/tools/datasets.d.ts.map +0 -1
- package/dist/tools/datasets.js +0 -57
- package/dist/tools/datasets.js.map +0 -1
- package/dist/tools/gpu.d.ts +0 -3
- package/dist/tools/gpu.d.ts.map +0 -1
- package/dist/tools/gpu.js +0 -63
- package/dist/tools/gpu.js.map +0 -1
- package/dist/tools/inference.d.ts +0 -3
- package/dist/tools/inference.d.ts.map +0 -1
- package/dist/tools/inference.js +0 -42
- package/dist/tools/inference.js.map +0 -1
- package/dist/tools/logs.d.ts +0 -3
- package/dist/tools/logs.d.ts.map +0 -1
- package/dist/tools/logs.js +0 -44
- package/dist/tools/logs.js.map +0 -1
|
@@ -1,56 +1,129 @@
|
|
|
1
|
-
import { resolveBasilicaClient,
|
|
2
|
-
import {
|
|
1
|
+
import { resolveBasilicaClient, formatToolError } from "./context.js";
|
|
2
|
+
import { createDeploymentSchema, getDeploymentSchema, listDeploymentsSchema, deleteDeploymentSchema, restartDeploymentSchema, scaleDeploymentSchema, deploymentLogsSchema, } from "./schemas.js";
|
|
3
3
|
export function registerDeploymentTools(api) {
|
|
4
4
|
api.registerTool((ctx) => ({
|
|
5
|
-
name: "
|
|
6
|
-
label: "
|
|
7
|
-
description: "
|
|
8
|
-
parameters:
|
|
5
|
+
name: "basilica_create_deployment",
|
|
6
|
+
label: "Create Deployment",
|
|
7
|
+
description: "Create a serverless container deployment on Basilica. The API assigns a UUID as the instanceName -- use the returned instanceName for all subsequent operations (get, scale, restart, delete, logs).",
|
|
8
|
+
parameters: createDeploymentSchema,
|
|
9
9
|
async execute(_toolCallId, params) {
|
|
10
10
|
try {
|
|
11
11
|
const client = resolveBasilicaClient(ctx);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const request = {
|
|
13
|
+
image: params.image,
|
|
14
|
+
port: params.port,
|
|
15
|
+
replicas: params.replicas ?? 1,
|
|
16
|
+
gpuCount: params.gpuCount,
|
|
17
|
+
gpuModels: params.gpuModels,
|
|
18
|
+
env: params.env,
|
|
19
|
+
command: params.command,
|
|
20
|
+
args: params.args,
|
|
21
|
+
public: true,
|
|
22
|
+
enableBilling: true,
|
|
23
|
+
suspended: false,
|
|
24
|
+
publicMetadata: false,
|
|
25
|
+
};
|
|
26
|
+
const result = await client.deployments.create(request);
|
|
18
27
|
return { content: JSON.stringify(result, null, 2) };
|
|
19
28
|
}
|
|
20
29
|
catch (err) {
|
|
21
|
-
return
|
|
30
|
+
return formatToolError(err);
|
|
22
31
|
}
|
|
23
32
|
},
|
|
24
33
|
}));
|
|
25
34
|
api.registerTool((ctx) => ({
|
|
26
|
-
name: "
|
|
27
|
-
label: "
|
|
28
|
-
description: "
|
|
29
|
-
parameters:
|
|
35
|
+
name: "basilica_get_deployment",
|
|
36
|
+
label: "Get Deployment",
|
|
37
|
+
description: "Get the status and details of a Basilica deployment by its instanceName (UUID).",
|
|
38
|
+
parameters: getDeploymentSchema,
|
|
30
39
|
async execute(_toolCallId, params) {
|
|
31
40
|
try {
|
|
32
41
|
const client = resolveBasilicaClient(ctx);
|
|
33
|
-
const result = await client.deployments.
|
|
42
|
+
const result = await client.deployments.get(params.instance_name);
|
|
34
43
|
return { content: JSON.stringify(result, null, 2) };
|
|
35
44
|
}
|
|
36
45
|
catch (err) {
|
|
37
|
-
return
|
|
46
|
+
return formatToolError(err);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
}));
|
|
50
|
+
api.registerTool((ctx) => ({
|
|
51
|
+
name: "basilica_list_deployments",
|
|
52
|
+
label: "List Deployments",
|
|
53
|
+
description: "List all deployments. Each deployment has an instanceName (UUID) used for subsequent operations.",
|
|
54
|
+
parameters: listDeploymentsSchema,
|
|
55
|
+
async execute(_toolCallId, _params) {
|
|
56
|
+
try {
|
|
57
|
+
const client = resolveBasilicaClient(ctx);
|
|
58
|
+
const result = await client.deployments.list();
|
|
59
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
return formatToolError(err);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
}));
|
|
66
|
+
api.registerTool((ctx) => ({
|
|
67
|
+
name: "basilica_delete_deployment",
|
|
68
|
+
label: "Delete Deployment",
|
|
69
|
+
description: "Delete a Basilica deployment by instanceName (UUID).",
|
|
70
|
+
parameters: deleteDeploymentSchema,
|
|
71
|
+
async execute(_toolCallId, params) {
|
|
72
|
+
try {
|
|
73
|
+
const client = resolveBasilicaClient(ctx);
|
|
74
|
+
const result = await client.deployments.delete(params.instance_name);
|
|
75
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
return formatToolError(err);
|
|
38
79
|
}
|
|
39
80
|
},
|
|
40
81
|
}));
|
|
41
82
|
api.registerTool((ctx) => ({
|
|
42
83
|
name: "basilica_restart_deployment",
|
|
43
|
-
label: "Restart
|
|
44
|
-
description: "Restart a Basilica deployment",
|
|
45
|
-
parameters:
|
|
84
|
+
label: "Restart Deployment",
|
|
85
|
+
description: "Restart a Basilica deployment by instanceName (UUID).",
|
|
86
|
+
parameters: restartDeploymentSchema,
|
|
46
87
|
async execute(_toolCallId, params) {
|
|
47
88
|
try {
|
|
48
89
|
const client = resolveBasilicaClient(ctx);
|
|
49
|
-
const result = await client.deployments.restart(params.
|
|
90
|
+
const result = await client.deployments.restart(params.instance_name);
|
|
50
91
|
return { content: JSON.stringify(result, null, 2) };
|
|
51
92
|
}
|
|
52
93
|
catch (err) {
|
|
53
|
-
return
|
|
94
|
+
return formatToolError(err);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
}));
|
|
98
|
+
api.registerTool((ctx) => ({
|
|
99
|
+
name: "basilica_scale_deployment",
|
|
100
|
+
label: "Scale Deployment",
|
|
101
|
+
description: "Scale the replica count of a Basilica deployment by instanceName (UUID).",
|
|
102
|
+
parameters: scaleDeploymentSchema,
|
|
103
|
+
async execute(_toolCallId, params) {
|
|
104
|
+
try {
|
|
105
|
+
const client = resolveBasilicaClient(ctx);
|
|
106
|
+
const result = await client.deployments.scale(params.instance_name, params.replicas);
|
|
107
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
return formatToolError(err);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
}));
|
|
114
|
+
api.registerTool((ctx) => ({
|
|
115
|
+
name: "basilica_deployment_logs",
|
|
116
|
+
label: "Deployment Logs",
|
|
117
|
+
description: "Retrieve logs from a Basilica deployment by instanceName (UUID).",
|
|
118
|
+
parameters: deploymentLogsSchema,
|
|
119
|
+
async execute(_toolCallId, params) {
|
|
120
|
+
try {
|
|
121
|
+
const client = resolveBasilicaClient(ctx);
|
|
122
|
+
const result = await client.deployments.getLogs(params.instance_name, params.tail);
|
|
123
|
+
return { content: typeof result === "string" ? result : JSON.stringify(result, null, 2) };
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
return formatToolError(err);
|
|
54
127
|
}
|
|
55
128
|
},
|
|
56
129
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../../src/tools/deployments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../../src/tools/deployments.ts"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,CAAC;gBACF,OAAO,EAAE,OAAO,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YAC5F,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { registerJobTools } from "./jobs.js";
|
|
3
|
-
import { registerGpuTools } from "./gpu.js";
|
|
1
|
+
import { registerRentalTools } from "./rentals.js";
|
|
4
2
|
import { registerDeploymentTools } from "./deployments.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { registerJobTools } from "./jobs.js";
|
|
4
|
+
import { registerSecureCloudTools } from "./secure-cloud.js";
|
|
5
|
+
import { registerBillingTools } from "./billing.js";
|
|
6
|
+
import { registerAuthTools } from "./auth.js";
|
|
7
7
|
export function registerBasilicaTools(api) {
|
|
8
|
-
|
|
9
|
-
registerJobTools(api);
|
|
10
|
-
registerGpuTools(api);
|
|
8
|
+
registerRentalTools(api);
|
|
11
9
|
registerDeploymentTools(api);
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
registerJobTools(api);
|
|
11
|
+
registerSecureCloudTools(api);
|
|
12
|
+
registerBillingTools(api);
|
|
13
|
+
registerAuthTools(api);
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,UAAU,qBAAqB,CAAC,GAAsB;IAC1D,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACzB,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC7B,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,wBAAwB,CAAC,GAAG,CAAC,CAAC;IAC9B,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC1B,iBAAiB,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/tools/jobs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/tools/jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/tools/jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAW/D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAmG7D"}
|
package/dist/tools/jobs.js
CHANGED
|
@@ -1,56 +1,102 @@
|
|
|
1
|
-
import { resolveBasilicaClient,
|
|
2
|
-
import {
|
|
1
|
+
import { resolveBasilicaClient, formatToolError } from "./context.js";
|
|
2
|
+
import { createJobSchema, jobStatusSchema, deleteJobSchema, jobLogsSchema, suspendJobSchema, } from "./schemas.js";
|
|
3
3
|
export function registerJobTools(api) {
|
|
4
4
|
api.registerTool((ctx) => ({
|
|
5
|
-
name: "
|
|
6
|
-
label: "
|
|
7
|
-
description: "
|
|
8
|
-
parameters:
|
|
5
|
+
name: "basilica_create_job",
|
|
6
|
+
label: "Create Job",
|
|
7
|
+
description: "Create a stateful container job on the Basilica platform",
|
|
8
|
+
parameters: createJobSchema,
|
|
9
9
|
async execute(_toolCallId, params) {
|
|
10
10
|
try {
|
|
11
11
|
const client = resolveBasilicaClient(ctx);
|
|
12
|
-
const
|
|
12
|
+
const rawResources = params.resources;
|
|
13
|
+
const resources = {
|
|
14
|
+
cpu: rawResources?.cpu ?? "1",
|
|
15
|
+
memory: rawResources?.memory ?? "2Gi",
|
|
16
|
+
gpus: {
|
|
17
|
+
count: rawResources?.gpu_count ?? 0,
|
|
18
|
+
model: rawResources?.gpu_models ?? [],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const request = {
|
|
22
|
+
image: params.image,
|
|
23
|
+
command: params.command ?? [],
|
|
24
|
+
args: params.args ?? [],
|
|
25
|
+
env: [],
|
|
26
|
+
resources,
|
|
27
|
+
ttl_seconds: params.ttl_seconds,
|
|
13
28
|
name: params.name,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
29
|
+
ports: [],
|
|
30
|
+
};
|
|
31
|
+
const result = await client.jobs.create(request);
|
|
18
32
|
return { content: JSON.stringify(result, null, 2) };
|
|
19
33
|
}
|
|
20
34
|
catch (err) {
|
|
21
|
-
return
|
|
35
|
+
return formatToolError(err);
|
|
22
36
|
}
|
|
23
37
|
},
|
|
24
38
|
}));
|
|
25
39
|
api.registerTool((ctx) => ({
|
|
26
40
|
name: "basilica_job_status",
|
|
27
|
-
label: "
|
|
28
|
-
description: "
|
|
41
|
+
label: "Job Status",
|
|
42
|
+
description: "Get the status of a Basilica job",
|
|
29
43
|
parameters: jobStatusSchema,
|
|
30
44
|
async execute(_toolCallId, params) {
|
|
31
45
|
try {
|
|
32
46
|
const client = resolveBasilicaClient(ctx);
|
|
33
|
-
const result = await client.jobs.
|
|
47
|
+
const result = await client.jobs.getStatus(params.job_id);
|
|
34
48
|
return { content: JSON.stringify(result, null, 2) };
|
|
35
49
|
}
|
|
36
50
|
catch (err) {
|
|
37
|
-
return
|
|
51
|
+
return formatToolError(err);
|
|
38
52
|
}
|
|
39
53
|
},
|
|
40
54
|
}));
|
|
41
55
|
api.registerTool((ctx) => ({
|
|
42
|
-
name: "
|
|
43
|
-
label: "
|
|
44
|
-
description: "
|
|
45
|
-
parameters:
|
|
56
|
+
name: "basilica_delete_job",
|
|
57
|
+
label: "Delete Job",
|
|
58
|
+
description: "Delete a Basilica job",
|
|
59
|
+
parameters: deleteJobSchema,
|
|
46
60
|
async execute(_toolCallId, params) {
|
|
47
61
|
try {
|
|
48
62
|
const client = resolveBasilicaClient(ctx);
|
|
49
|
-
const result = await client.jobs.
|
|
63
|
+
const result = await client.jobs.delete(params.job_id);
|
|
50
64
|
return { content: JSON.stringify(result, null, 2) };
|
|
51
65
|
}
|
|
52
66
|
catch (err) {
|
|
53
|
-
return
|
|
67
|
+
return formatToolError(err);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
}));
|
|
71
|
+
api.registerTool((ctx) => ({
|
|
72
|
+
name: "basilica_job_logs",
|
|
73
|
+
label: "Job Logs",
|
|
74
|
+
description: "Retrieve logs from a Basilica job",
|
|
75
|
+
parameters: jobLogsSchema,
|
|
76
|
+
async execute(_toolCallId, params) {
|
|
77
|
+
try {
|
|
78
|
+
const client = resolveBasilicaClient(ctx);
|
|
79
|
+
const result = await client.jobs.getLogs(params.job_id);
|
|
80
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
return formatToolError(err);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
}));
|
|
87
|
+
api.registerTool((ctx) => ({
|
|
88
|
+
name: "basilica_suspend_job",
|
|
89
|
+
label: "Suspend Job",
|
|
90
|
+
description: "Suspend a running Basilica job",
|
|
91
|
+
parameters: suspendJobSchema,
|
|
92
|
+
async execute(_toolCallId, params) {
|
|
93
|
+
try {
|
|
94
|
+
const client = resolveBasilicaClient(ctx);
|
|
95
|
+
const result = await client.jobs.suspend(params.job_id);
|
|
96
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
return formatToolError(err);
|
|
54
100
|
}
|
|
55
101
|
},
|
|
56
102
|
}));
|
package/dist/tools/jobs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/tools/jobs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/tools/jobs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,gBAAgB,CAAC,GAAsB;IACrD,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,0DAA0D;QACvE,UAAU,EAAE,eAAe;QAC3B,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM;YAC/B,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;gBAC1C,MAAM,YAAY,GAAG,MAAM,CAAC,SAAgD,CAAC;gBAC7E,MAAM,SAAS,GAAiB;oBAC9B,GAAG,EAAG,YAAY,EAAE,GAAc,IAAI,GAAG;oBACzC,MAAM,EAAG,YAAY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AO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YACtD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;KACF,CAAC,CAAC,CAAC;IAEJ,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,gCAAgC;QAC7C,UAAU,EAAE,gBAAgB;QAC5B,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM;YAC/B,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;gBAC1C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;gBAClE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YACtD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rentals.d.ts","sourceRoot":"","sources":["../../src/tools/rentals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAY/D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,CA6GhE"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { resolveBasilicaClient, formatToolError } from "./context.js";
|
|
2
|
+
import { startRentalSchema, getRentalSchema, stopRentalSchema, listRentalsSchema, restartRentalSchema, rentalHistorySchema, } from "./schemas.js";
|
|
3
|
+
export function registerRentalTools(api) {
|
|
4
|
+
api.registerTool((ctx) => ({
|
|
5
|
+
name: "basilica_start_rental",
|
|
6
|
+
label: "Start GPU Rental",
|
|
7
|
+
description: "Start a bare-metal GPU rental with SSH access on the Basilica network",
|
|
8
|
+
parameters: startRentalSchema,
|
|
9
|
+
async execute(_toolCallId, params) {
|
|
10
|
+
try {
|
|
11
|
+
const client = resolveBasilicaClient(ctx);
|
|
12
|
+
const request = {
|
|
13
|
+
gpu_category: params.gpu_category,
|
|
14
|
+
gpu_count: params.gpu_count,
|
|
15
|
+
max_hourly_rate_cents: params.max_hourly_rate_cents,
|
|
16
|
+
container_image: params.container_image,
|
|
17
|
+
ssh_public_key: params.ssh_public_key,
|
|
18
|
+
environment: params.environment ?? {},
|
|
19
|
+
ports: [],
|
|
20
|
+
command: params.command,
|
|
21
|
+
};
|
|
22
|
+
const result = await client.rentals.start(request);
|
|
23
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
return formatToolError(err);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
api.registerTool((ctx) => ({
|
|
31
|
+
name: "basilica_get_rental",
|
|
32
|
+
label: "Get Rental Status",
|
|
33
|
+
description: "Get the status and details of a Basilica GPU rental",
|
|
34
|
+
parameters: getRentalSchema,
|
|
35
|
+
async execute(_toolCallId, params) {
|
|
36
|
+
try {
|
|
37
|
+
const client = resolveBasilicaClient(ctx);
|
|
38
|
+
const result = await client.rentals.get(params.rental_id);
|
|
39
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
return formatToolError(err);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
api.registerTool((ctx) => ({
|
|
47
|
+
name: "basilica_stop_rental",
|
|
48
|
+
label: "Stop GPU Rental",
|
|
49
|
+
description: "Stop and terminate a running Basilica GPU rental",
|
|
50
|
+
parameters: stopRentalSchema,
|
|
51
|
+
async execute(_toolCallId, params) {
|
|
52
|
+
try {
|
|
53
|
+
const client = resolveBasilicaClient(ctx);
|
|
54
|
+
await client.rentals.stop(params.rental_id);
|
|
55
|
+
return { content: JSON.stringify({ rental_id: params.rental_id, status: "stopped" }, null, 2) };
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
return formatToolError(err);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
}));
|
|
62
|
+
api.registerTool((ctx) => ({
|
|
63
|
+
name: "basilica_list_rentals",
|
|
64
|
+
label: "List Active Rentals",
|
|
65
|
+
description: "List active GPU rentals on Basilica",
|
|
66
|
+
parameters: listRentalsSchema,
|
|
67
|
+
async execute(_toolCallId, params) {
|
|
68
|
+
try {
|
|
69
|
+
const client = resolveBasilicaClient(ctx);
|
|
70
|
+
const result = await client.rentals.list({
|
|
71
|
+
status: params.status,
|
|
72
|
+
gpu_type: params.gpu_type,
|
|
73
|
+
});
|
|
74
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return formatToolError(err);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
}));
|
|
81
|
+
api.registerTool((ctx) => ({
|
|
82
|
+
name: "basilica_restart_rental",
|
|
83
|
+
label: "Restart GPU Rental",
|
|
84
|
+
description: "Restart a Basilica GPU rental container",
|
|
85
|
+
parameters: restartRentalSchema,
|
|
86
|
+
async execute(_toolCallId, params) {
|
|
87
|
+
try {
|
|
88
|
+
const client = resolveBasilicaClient(ctx);
|
|
89
|
+
const result = await client.rentals.restart(params.rental_id);
|
|
90
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
return formatToolError(err);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
}));
|
|
97
|
+
api.registerTool((ctx) => ({
|
|
98
|
+
name: "basilica_rental_history",
|
|
99
|
+
label: "Rental History",
|
|
100
|
+
description: "View historical GPU rentals on Basilica",
|
|
101
|
+
parameters: rentalHistorySchema,
|
|
102
|
+
async execute(_toolCallId, params) {
|
|
103
|
+
try {
|
|
104
|
+
const client = resolveBasilicaClient(ctx);
|
|
105
|
+
const result = await client.rentals.listHistory(params.limit);
|
|
106
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
return formatToolError(err);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=rentals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rentals.js","sourceRoot":"","sources":["../../src/tools/rentals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,mBAAmB,CAAC,GAAsB;IACxD,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,uEAAuE;QACpF,UAAU,EAAE,iBAAiB;QAC7B,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM;YAC/B,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;gBAC1C,MAAM,OAAO,GAA0B;oBACrC,YAAY,EAAE,MAAM,CAAC,YAAsB;oBAC3C,SAAS,EAAE,MAAM,CAAC,SAAmB;oBACrC,qBAAqB,EAAE,MAAM,CAAC,qBAA+B;oBAC7D,eA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AE,CAAC;gBACb,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/tools/schemas.d.ts
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import type { ToolSchema } from "openclaw-plugin-types";
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const startRentalSchema: ToolSchema;
|
|
3
|
+
export declare const getRentalSchema: ToolSchema;
|
|
4
|
+
export declare const stopRentalSchema: ToolSchema;
|
|
5
|
+
export declare const listRentalsSchema: ToolSchema;
|
|
6
|
+
export declare const restartRentalSchema: ToolSchema;
|
|
7
|
+
export declare const rentalHistorySchema: ToolSchema;
|
|
8
|
+
export declare const createDeploymentSchema: ToolSchema;
|
|
9
|
+
export declare const getDeploymentSchema: ToolSchema;
|
|
10
|
+
export declare const listDeploymentsSchema: ToolSchema;
|
|
11
|
+
export declare const deleteDeploymentSchema: ToolSchema;
|
|
12
|
+
export declare const restartDeploymentSchema: ToolSchema;
|
|
13
|
+
export declare const scaleDeploymentSchema: ToolSchema;
|
|
14
|
+
export declare const deploymentLogsSchema: ToolSchema;
|
|
15
|
+
export declare const createJobSchema: ToolSchema;
|
|
5
16
|
export declare const jobStatusSchema: ToolSchema;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const logsRecentErrorsSchema: ToolSchema;
|
|
17
|
+
export declare const deleteJobSchema: ToolSchema;
|
|
18
|
+
export declare const jobLogsSchema: ToolSchema;
|
|
19
|
+
export declare const suspendJobSchema: ToolSchema;
|
|
20
|
+
export declare const listGpuPricesSchema: ToolSchema;
|
|
21
|
+
export declare const listGpuRentalsSchema: ToolSchema;
|
|
22
|
+
export declare const getBalanceSchema: ToolSchema;
|
|
23
|
+
export declare const usageHistorySchema: ToolSchema;
|
|
24
|
+
export declare const deviceLoginSchema: ToolSchema;
|
|
25
|
+
export declare const pollAuthSchema: ToolSchema;
|
|
26
|
+
export declare const createApiKeySchema: ToolSchema;
|
|
27
|
+
export declare const listApiKeysSchema: ToolSchema;
|
|
18
28
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,eAAO,MAAM,iBAAiB,EAAE,UAY/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAM7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAM9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAM/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAMjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAKjC,CAAC;AAIF,eAAO,MAAM,sBAAsB,EAAE,UAapC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAMjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAGnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,UAMpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,UAMrC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAOnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAOlC,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,UAkB7B,CA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