@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
package/dist/tools/schemas.js
CHANGED
|
@@ -1,135 +1,205 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// --- Rentals ---
|
|
2
|
+
export const startRentalSchema = {
|
|
3
|
+
type: "object",
|
|
4
|
+
properties: {
|
|
5
|
+
gpu_category: { type: "string", description: "GPU category (e.g. 'A100', 'H100', 'H200')" },
|
|
6
|
+
gpu_count: { type: "number", description: "Number of GPUs to provision" },
|
|
7
|
+
max_hourly_rate_cents: { type: "number", description: "Maximum hourly rate in cents" },
|
|
8
|
+
container_image: { type: "string", description: "Docker image to run on the rental" },
|
|
9
|
+
ssh_public_key: { type: "string", description: "SSH public key for access" },
|
|
10
|
+
environment: { type: "object", description: "Environment variables (key-value pairs)" },
|
|
11
|
+
command: { type: "array", items: { type: "string" }, description: "Command to run in the container" },
|
|
12
|
+
},
|
|
13
|
+
required: ["gpu_category", "gpu_count", "max_hourly_rate_cents", "container_image", "ssh_public_key"],
|
|
3
14
|
};
|
|
4
|
-
export const
|
|
15
|
+
export const getRentalSchema = {
|
|
5
16
|
type: "object",
|
|
6
17
|
properties: {
|
|
7
|
-
|
|
8
|
-
input: { type: "string", description: "Input text for inference" },
|
|
9
|
-
parameters: { type: "object", description: "Optional model parameters" },
|
|
10
|
-
...projectIdProp,
|
|
18
|
+
rental_id: { type: "string", description: "Rental ID to query" },
|
|
11
19
|
},
|
|
12
|
-
required: ["
|
|
20
|
+
required: ["rental_id"],
|
|
13
21
|
};
|
|
14
|
-
export const
|
|
22
|
+
export const stopRentalSchema = {
|
|
15
23
|
type: "object",
|
|
16
24
|
properties: {
|
|
17
|
-
|
|
25
|
+
rental_id: { type: "string", description: "Rental ID to stop" },
|
|
18
26
|
},
|
|
19
|
-
required: ["
|
|
27
|
+
required: ["rental_id"],
|
|
20
28
|
};
|
|
21
|
-
export const
|
|
29
|
+
export const listRentalsSchema = {
|
|
22
30
|
type: "object",
|
|
23
31
|
properties: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
config: { type: "object", description: "Job configuration" },
|
|
27
|
-
...projectIdProp,
|
|
32
|
+
status: { type: "string", description: "Filter by rental status" },
|
|
33
|
+
gpu_type: { type: "string", description: "Filter by GPU type" },
|
|
28
34
|
},
|
|
29
|
-
required: ["name", "type", "config"],
|
|
30
35
|
};
|
|
31
|
-
export const
|
|
36
|
+
export const restartRentalSchema = {
|
|
32
37
|
type: "object",
|
|
33
38
|
properties: {
|
|
34
|
-
|
|
39
|
+
rental_id: { type: "string", description: "Rental ID to restart" },
|
|
35
40
|
},
|
|
36
|
-
required: ["
|
|
41
|
+
required: ["rental_id"],
|
|
37
42
|
};
|
|
38
|
-
export const
|
|
43
|
+
export const rentalHistorySchema = {
|
|
39
44
|
type: "object",
|
|
40
45
|
properties: {
|
|
41
|
-
|
|
46
|
+
limit: { type: "number", description: "Max number of historical rentals to return" },
|
|
42
47
|
},
|
|
43
|
-
required: ["jobId"],
|
|
44
48
|
};
|
|
45
|
-
|
|
49
|
+
// --- Deployments ---
|
|
50
|
+
export const createDeploymentSchema = {
|
|
46
51
|
type: "object",
|
|
47
52
|
properties: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
image: { type: "string", description: "Docker image to deploy" },
|
|
54
|
+
port: { type: "number", description: "Container port to expose" },
|
|
55
|
+
replicas: { type: "number", description: "Number of replicas (default 1)" },
|
|
56
|
+
gpuCount: { type: "number", description: "Number of GPUs per replica" },
|
|
57
|
+
gpuModels: { type: "array", items: { type: "string" }, description: "Acceptable GPU models" },
|
|
58
|
+
env: { type: "object", description: "Environment variables (key-value pairs)" },
|
|
59
|
+
command: { type: "array", items: { type: "string" }, description: "Container command override" },
|
|
60
|
+
args: { type: "array", items: { type: "string" }, description: "Container command arguments" },
|
|
51
61
|
},
|
|
62
|
+
required: ["image", "port"],
|
|
52
63
|
};
|
|
53
|
-
export const
|
|
64
|
+
export const getDeploymentSchema = {
|
|
54
65
|
type: "object",
|
|
55
66
|
properties: {
|
|
56
|
-
|
|
57
|
-
count: { type: "number", description: "Number of GPUs to request" },
|
|
58
|
-
region: { type: "string", description: "Preferred region" },
|
|
59
|
-
durationHours: { type: "number", description: "Duration in hours" },
|
|
60
|
-
...projectIdProp,
|
|
67
|
+
instance_name: { type: "string", description: "Deployment instance name" },
|
|
61
68
|
},
|
|
62
|
-
required: ["
|
|
69
|
+
required: ["instance_name"],
|
|
63
70
|
};
|
|
64
|
-
export const
|
|
71
|
+
export const listDeploymentsSchema = {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {},
|
|
74
|
+
};
|
|
75
|
+
export const deleteDeploymentSchema = {
|
|
65
76
|
type: "object",
|
|
66
77
|
properties: {
|
|
67
|
-
|
|
78
|
+
instance_name: { type: "string", description: "Deployment instance name to delete" },
|
|
68
79
|
},
|
|
69
|
-
required: ["
|
|
80
|
+
required: ["instance_name"],
|
|
70
81
|
};
|
|
71
|
-
export const
|
|
82
|
+
export const restartDeploymentSchema = {
|
|
72
83
|
type: "object",
|
|
73
84
|
properties: {
|
|
74
|
-
|
|
75
|
-
modelId: { type: "string", description: "Model to deploy" },
|
|
76
|
-
config: { type: "object", description: "Deployment configuration" },
|
|
77
|
-
...projectIdProp,
|
|
85
|
+
instance_name: { type: "string", description: "Deployment instance name to restart" },
|
|
78
86
|
},
|
|
79
|
-
required: ["
|
|
87
|
+
required: ["instance_name"],
|
|
80
88
|
};
|
|
81
|
-
export const
|
|
89
|
+
export const scaleDeploymentSchema = {
|
|
82
90
|
type: "object",
|
|
83
91
|
properties: {
|
|
84
|
-
|
|
92
|
+
instance_name: { type: "string", description: "Deployment instance name to scale" },
|
|
93
|
+
replicas: { type: "number", description: "Target number of replicas" },
|
|
85
94
|
},
|
|
86
|
-
required: ["
|
|
95
|
+
required: ["instance_name", "replicas"],
|
|
87
96
|
};
|
|
88
|
-
export const
|
|
97
|
+
export const deploymentLogsSchema = {
|
|
89
98
|
type: "object",
|
|
90
99
|
properties: {
|
|
91
|
-
|
|
100
|
+
instance_name: { type: "string", description: "Deployment instance name" },
|
|
101
|
+
tail: { type: "number", description: "Number of recent log lines to return" },
|
|
92
102
|
},
|
|
93
|
-
required: ["
|
|
103
|
+
required: ["instance_name"],
|
|
94
104
|
};
|
|
95
|
-
|
|
105
|
+
// --- Jobs ---
|
|
106
|
+
export const createJobSchema = {
|
|
96
107
|
type: "object",
|
|
97
108
|
properties: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
109
|
+
image: { type: "string", description: "Docker image for the job" },
|
|
110
|
+
command: { type: "array", items: { type: "string" }, description: "Command to execute" },
|
|
111
|
+
args: { type: "array", items: { type: "string" }, description: "Command arguments" },
|
|
112
|
+
resources: {
|
|
113
|
+
type: "object",
|
|
114
|
+
description: "Resource requirements (cpu, memory)",
|
|
115
|
+
properties: {
|
|
116
|
+
cpu: { type: "string", description: "CPU request (e.g. '2')" },
|
|
117
|
+
memory: { type: "string", description: "Memory request (e.g. '4Gi')" },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
ttl_seconds: { type: "number", description: "Time-to-live for the job in seconds" },
|
|
121
|
+
name: { type: "string", description: "Optional job name" },
|
|
101
122
|
},
|
|
123
|
+
required: ["image", "command", "args", "resources", "ttl_seconds"],
|
|
102
124
|
};
|
|
103
|
-
export const
|
|
125
|
+
export const jobStatusSchema = {
|
|
104
126
|
type: "object",
|
|
105
127
|
properties: {
|
|
106
|
-
|
|
128
|
+
job_id: { type: "string", description: "Job ID to query" },
|
|
107
129
|
},
|
|
108
|
-
required: ["
|
|
130
|
+
required: ["job_id"],
|
|
131
|
+
};
|
|
132
|
+
export const deleteJobSchema = {
|
|
133
|
+
type: "object",
|
|
134
|
+
properties: {
|
|
135
|
+
job_id: { type: "string", description: "Job ID to delete" },
|
|
136
|
+
},
|
|
137
|
+
required: ["job_id"],
|
|
138
|
+
};
|
|
139
|
+
export const jobLogsSchema = {
|
|
140
|
+
type: "object",
|
|
141
|
+
properties: {
|
|
142
|
+
job_id: { type: "string", description: "Job ID to get logs for" },
|
|
143
|
+
},
|
|
144
|
+
required: ["job_id"],
|
|
145
|
+
};
|
|
146
|
+
export const suspendJobSchema = {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
job_id: { type: "string", description: "Job ID to suspend" },
|
|
150
|
+
},
|
|
151
|
+
required: ["job_id"],
|
|
152
|
+
};
|
|
153
|
+
// --- Secure Cloud / GPU Marketplace ---
|
|
154
|
+
export const listGpuPricesSchema = {
|
|
155
|
+
type: "object",
|
|
156
|
+
properties: {
|
|
157
|
+
interconnect: { type: "string", description: "Filter by interconnect type" },
|
|
158
|
+
region: { type: "string", description: "Filter by region" },
|
|
159
|
+
spot_only: { type: "boolean", description: "Show only spot instances" },
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
export const listGpuRentalsSchema = {
|
|
163
|
+
type: "object",
|
|
164
|
+
properties: {},
|
|
165
|
+
};
|
|
166
|
+
// --- Billing ---
|
|
167
|
+
export const getBalanceSchema = {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {},
|
|
170
|
+
};
|
|
171
|
+
export const usageHistorySchema = {
|
|
172
|
+
type: "object",
|
|
173
|
+
properties: {
|
|
174
|
+
limit: { type: "number", description: "Max number of usage records to return" },
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
// --- Auth ---
|
|
178
|
+
export const deviceLoginSchema = {
|
|
179
|
+
type: "object",
|
|
180
|
+
properties: {},
|
|
109
181
|
};
|
|
110
|
-
export const
|
|
182
|
+
export const pollAuthSchema = {
|
|
111
183
|
type: "object",
|
|
112
184
|
properties: {
|
|
113
|
-
|
|
185
|
+
device_code: { type: "string", description: "Device code from basilica_device_login" },
|
|
186
|
+
interval: { type: "number", description: "Poll interval in seconds (default 5)" },
|
|
114
187
|
},
|
|
115
|
-
required: ["
|
|
188
|
+
required: ["device_code"],
|
|
116
189
|
};
|
|
117
|
-
export const
|
|
190
|
+
export const createApiKeySchema = {
|
|
118
191
|
type: "object",
|
|
119
192
|
properties: {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
until: { type: "string", description: "End time (ISO 8601)" },
|
|
124
|
-
limit: { type: "number", description: "Max entries to return" },
|
|
125
|
-
...projectIdProp,
|
|
193
|
+
name: { type: "string", description: "Name for the API key" },
|
|
194
|
+
scopes: { type: "array", items: { type: "string" }, description: "Optional permission scopes" },
|
|
195
|
+
token: { type: "string", description: "JWT access_token from basilica_poll_auth. Required if no stored credentials." },
|
|
126
196
|
},
|
|
197
|
+
required: ["name"],
|
|
127
198
|
};
|
|
128
|
-
export const
|
|
199
|
+
export const listApiKeysSchema = {
|
|
129
200
|
type: "object",
|
|
130
201
|
properties: {
|
|
131
|
-
|
|
132
|
-
limit: { type: "number", description: "Max error entries to return" },
|
|
202
|
+
token: { type: "string", description: "JWT access_token from basilica_poll_auth. Required if no stored credentials." },
|
|
133
203
|
},
|
|
134
204
|
};
|
|
135
205
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAEA,kBAAkB;AAElB,MAAM,CAAC,MAAM,iBAAiB,GAAe;IAC3C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE;QAC3F,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;QACzE,qBAAqB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;QACtF,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE;QACrF,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2BAA2B,EAAE;QAC5E,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yCAAyC,EAAE;QACvF,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE;KACtG;IACD,QAAQ,EAAE,CAAC,cAAc,EAAE,WAAW,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;CACtG,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAe;IACzC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE,EAAE,IAAI,EAAE,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AAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;QAC7D,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE;QAC/F,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8EAA8E,EAAE;KACvH;IACD,QAAQ,EAAE,CAAC,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAe;IAC3C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8EAA8E,EAAE;KACvH;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-cloud.d.ts","sourceRoot":"","sources":["../../src/tools/secure-cloud.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI/D,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAoCrE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { resolveBasilicaClient, formatToolError } from "./context.js";
|
|
2
|
+
import { listGpuPricesSchema, listGpuRentalsSchema } from "./schemas.js";
|
|
3
|
+
export function registerSecureCloudTools(api) {
|
|
4
|
+
api.registerTool((ctx) => ({
|
|
5
|
+
name: "basilica_list_gpu_prices",
|
|
6
|
+
label: "List GPU Prices",
|
|
7
|
+
description: "List available GPU offerings and prices on the Basilica secure cloud marketplace",
|
|
8
|
+
parameters: listGpuPricesSchema,
|
|
9
|
+
async execute(_toolCallId, params) {
|
|
10
|
+
try {
|
|
11
|
+
const client = resolveBasilicaClient(ctx);
|
|
12
|
+
const result = await client.secureCloud.listGpuPrices({
|
|
13
|
+
interconnect: params.interconnect,
|
|
14
|
+
region: params.region,
|
|
15
|
+
spot_only: params.spot_only,
|
|
16
|
+
});
|
|
17
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
return formatToolError(err);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
}));
|
|
24
|
+
api.registerTool((ctx) => ({
|
|
25
|
+
name: "basilica_list_gpu_rentals",
|
|
26
|
+
label: "List Secure Cloud GPU Rentals",
|
|
27
|
+
description: "List active GPU rentals on the Basilica secure cloud",
|
|
28
|
+
parameters: listGpuRentalsSchema,
|
|
29
|
+
async execute(_toolCallId, _params) {
|
|
30
|
+
try {
|
|
31
|
+
const client = resolveBasilicaClient(ctx);
|
|
32
|
+
const result = await client.secureCloud.listGpuRentals();
|
|
33
|
+
return { content: JSON.stringify(result, null, 2) };
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
return formatToolError(err);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=secure-cloud.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-cloud.js","sourceRoot":"","sources":["../../src/tools/secure-cloud.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzE,MAAM,UAAU,wBAAwB,CAAC,GAAsB;IAC7D,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,kFAAkF;QAC/F,UAAU,EAAE,mBAAmB;QAC/B,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,WAAW,CAAC,aAAa,CAAC;oBACpD,YAAY,EAAE,MAAM,CAAC,YAAkC;oBACvD,MAAM,EAAE,MAAM,CAAC,MAA4B;oBAC3C,SAAS,EAAE,MAAM,CAAC,SAAgC;iBACnD,CAAC,CAAC;gBACH,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;IAEJ,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,+BAA+B;QACtC,WAAW,EAAE,sDAAsD;QACnE,UAAU,EAAE,oBAAoB;QAChC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO;YAChC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;gBAC1C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC;gBACzD,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"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,38 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "basilica",
|
|
3
3
|
"name": "Basilica",
|
|
4
|
-
"description": "Basilica platform tools, hooks, and gateway integration for OpenClaw",
|
|
4
|
+
"description": "Basilica GPU cloud platform tools, hooks, and gateway integration for OpenClaw",
|
|
5
5
|
"skills": ["./skills"],
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"defaultProject": { "type": "string" },
|
|
11
|
-
"baseUrl": { "type": "string" }
|
|
12
|
-
"toolGroups": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"properties": {
|
|
15
|
-
"inference": { "type": "boolean" },
|
|
16
|
-
"jobs": { "type": "boolean" },
|
|
17
|
-
"gpu": { "type": "boolean" },
|
|
18
|
-
"deployments": { "type": "boolean" },
|
|
19
|
-
"datasets": { "type": "boolean" },
|
|
20
|
-
"logs": { "type": "boolean" }
|
|
21
|
-
},
|
|
22
|
-
"additionalProperties": false
|
|
23
|
-
},
|
|
24
|
-
"routing": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"properties": {
|
|
27
|
-
"preferBasilicaModels": { "type": "boolean" }
|
|
28
|
-
},
|
|
29
|
-
"additionalProperties": false
|
|
30
|
-
}
|
|
11
|
+
"baseUrl": { "type": "string" }
|
|
31
12
|
}
|
|
32
13
|
},
|
|
33
14
|
"uiHints": {
|
|
34
15
|
"defaultProject": { "label": "Default Project", "placeholder": "my-org/my-project" },
|
|
35
|
-
"
|
|
36
|
-
"routing.preferBasilicaModels": { "label": "Prefer Basilica Models" }
|
|
16
|
+
"baseUrl": { "label": "API Base URL", "placeholder": "https://api.basilica.ai" }
|
|
37
17
|
}
|
|
38
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basilica/openclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Basilica platform tools, hooks, skills, and gateway integration for OpenClaw",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"clean": "rm -rf dist"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@basilica/openclaw-sdk": "^0.
|
|
31
|
+
"@basilica/openclaw-sdk": "^0.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@types/node": "^25.5.0",
|
|
34
35
|
"openclaw-plugin-types": "^0.1.0",
|
|
35
36
|
"typescript": "^5.7.0"
|
|
36
37
|
},
|
|
@@ -2,55 +2,67 @@
|
|
|
2
2
|
|
|
3
3
|
## Incident Handling
|
|
4
4
|
|
|
5
|
+
### Rental Not Starting
|
|
6
|
+
1. Check GPU availability: `basilica_list_gpu_prices` to see if the requested GPU category has supply
|
|
7
|
+
2. Check balance: `basilica_get_balance` to verify sufficient funds
|
|
8
|
+
3. Verify the container image is accessible from the Basilica network
|
|
9
|
+
4. If stuck, check rental status: `basilica_get_rental` for error details
|
|
10
|
+
|
|
5
11
|
### Deployment Unhealthy
|
|
6
|
-
1. Check deployment
|
|
7
|
-
2.
|
|
8
|
-
3. If
|
|
12
|
+
1. Check deployment status: `basilica_get_deployment` for pod status and error messages
|
|
13
|
+
2. View logs: `basilica_deployment_logs` to identify application errors
|
|
14
|
+
3. If OOM or resource issues, scale down or adjust resource requirements
|
|
9
15
|
4. Restart deployment: `basilica_restart_deployment`
|
|
10
|
-
5. If
|
|
16
|
+
5. If persistent failure, delete and recreate: `basilica_delete_deployment`
|
|
11
17
|
|
|
12
18
|
### Job Failures
|
|
13
|
-
1. Check job status: `basilica_job_status`
|
|
14
|
-
2.
|
|
19
|
+
1. Check job status: `basilica_job_status` for phase, message, and reason
|
|
20
|
+
2. View logs: `basilica_job_logs` to identify the root cause
|
|
15
21
|
3. Common causes:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
22
|
+
- Container image pull failure -- verify image exists and is public/authenticated
|
|
23
|
+
- OOM killed -- increase memory in resources
|
|
24
|
+
- TTL expired -- increase ttl_seconds
|
|
25
|
+
- Command error -- verify command and args
|
|
26
|
+
4. After fixing, create a new job: `basilica_create_job`
|
|
20
27
|
|
|
21
28
|
### Authentication Issues
|
|
22
|
-
1. Verify
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
29
|
+
1. Verify the API key is valid and not expired
|
|
30
|
+
2. Check that the key has the required scopes for the operation
|
|
31
|
+
3. Re-authenticate if needed
|
|
25
32
|
|
|
26
33
|
## Triage Patterns
|
|
27
34
|
|
|
28
35
|
### Performance Degradation
|
|
29
|
-
1.
|
|
30
|
-
2. Check deployment health
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
36
|
+
1. Check rental status: `basilica_list_rentals` for any rentals in error states
|
|
37
|
+
2. Check deployment health: `basilica_list_deployments` then `basilica_get_deployment` for each
|
|
38
|
+
3. View deployment logs for the affected service: `basilica_deployment_logs`
|
|
39
|
+
4. Check billing to ensure account is in good standing: `basilica_get_balance`
|
|
33
40
|
|
|
34
|
-
###
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
41
|
+
### Cost Management
|
|
42
|
+
1. Review usage: `basilica_usage_history` to identify expensive rentals
|
|
43
|
+
2. Review rental history: `basilica_rental_history` for past cost patterns
|
|
44
|
+
3. List active rentals: `basilica_list_rentals` to find idle resources
|
|
45
|
+
4. Stop unused rentals: `basilica_stop_rental` for any not in use
|
|
46
|
+
5. Scale down over-provisioned deployments: `basilica_scale_deployment`
|
|
38
47
|
|
|
39
48
|
## Rollback Procedures
|
|
40
49
|
|
|
41
50
|
### Deployment Rollback
|
|
42
|
-
1.
|
|
43
|
-
2.
|
|
51
|
+
1. Get current deployment config: `basilica_get_deployment`
|
|
52
|
+
2. Delete the current deployment: `basilica_delete_deployment`
|
|
53
|
+
3. Create a new deployment with the previous image version: `basilica_create_deployment`
|
|
44
54
|
|
|
45
55
|
### Job Recovery
|
|
46
|
-
1.
|
|
47
|
-
2.
|
|
48
|
-
3.
|
|
56
|
+
1. Check job status for error details: `basilica_job_status`
|
|
57
|
+
2. If suspended, resume is available via the API directly
|
|
58
|
+
3. Delete the failed job: `basilica_delete_job`
|
|
59
|
+
4. Resubmit with corrected parameters: `basilica_create_job`
|
|
49
60
|
|
|
50
61
|
## Operational Best Practices
|
|
51
62
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- Monitor deployment
|
|
55
|
-
-
|
|
56
|
-
-
|
|
63
|
+
- Check GPU prices before starting long-running rentals to find the best rates
|
|
64
|
+
- Use TTL on jobs to prevent runaway costs
|
|
65
|
+
- Monitor deployment replicas -- scale down during low-traffic periods
|
|
66
|
+
- Review usage history regularly to catch unexpected charges
|
|
67
|
+
- Keep container images small for faster startup times
|
|
68
|
+
- Use spot instances from the secure cloud marketplace for fault-tolerant workloads
|