@basilica/openclaw 0.1.0 → 0.3.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.
Files changed (71) hide show
  1. package/dist/gateway/status.d.ts +3 -6
  2. package/dist/gateway/status.d.ts.map +1 -1
  3. package/dist/gateway/status.js +12 -15
  4. package/dist/gateway/status.js.map +1 -1
  5. package/dist/gateway/webhook.d.ts +2 -1
  6. package/dist/gateway/webhook.d.ts.map +1 -1
  7. package/dist/gateway/webhook.js +28 -1
  8. package/dist/gateway/webhook.js.map +1 -1
  9. package/dist/hooks/index.d.ts.map +1 -1
  10. package/dist/hooks/index.js +0 -4
  11. package/dist/hooks/index.js.map +1 -1
  12. package/dist/tools/auth.d.ts +3 -0
  13. package/dist/tools/auth.d.ts.map +1 -0
  14. package/dist/tools/auth.js +170 -0
  15. package/dist/tools/auth.js.map +1 -0
  16. package/dist/tools/billing.d.ts +3 -0
  17. package/dist/tools/billing.d.ts.map +1 -0
  18. package/dist/tools/billing.js +37 -0
  19. package/dist/tools/billing.js.map +1 -0
  20. package/dist/tools/context.d.ts +7 -2
  21. package/dist/tools/context.d.ts.map +1 -1
  22. package/dist/tools/context.js +19 -10
  23. package/dist/tools/context.js.map +1 -1
  24. package/dist/tools/deployments.d.ts.map +1 -1
  25. package/dist/tools/deployments.js +97 -24
  26. package/dist/tools/deployments.js.map +1 -1
  27. package/dist/tools/index.js +10 -10
  28. package/dist/tools/index.js.map +1 -1
  29. package/dist/tools/jobs.d.ts.map +1 -1
  30. package/dist/tools/jobs.js +68 -22
  31. package/dist/tools/jobs.js.map +1 -1
  32. package/dist/tools/rentals.d.ts +3 -0
  33. package/dist/tools/rentals.d.ts.map +1 -0
  34. package/dist/tools/rentals.js +114 -0
  35. package/dist/tools/rentals.js.map +1 -0
  36. package/dist/tools/schemas.d.ts +25 -15
  37. package/dist/tools/schemas.d.ts.map +1 -1
  38. package/dist/tools/schemas.js +139 -69
  39. package/dist/tools/schemas.js.map +1 -1
  40. package/dist/tools/secure-cloud.d.ts +3 -0
  41. package/dist/tools/secure-cloud.d.ts.map +1 -0
  42. package/dist/tools/secure-cloud.js +41 -0
  43. package/dist/tools/secure-cloud.js.map +1 -0
  44. package/openclaw.plugin.json +3 -23
  45. package/package.json +3 -2
  46. package/skills/basilica-operator/index.md +43 -31
  47. package/skills/basilica-platform/index.md +87 -54
  48. package/dist/hooks/model-routing.d.ts +0 -3
  49. package/dist/hooks/model-routing.d.ts.map +0 -1
  50. package/dist/hooks/model-routing.js +0 -11
  51. package/dist/hooks/model-routing.js.map +0 -1
  52. package/dist/hooks/tool-policy.d.ts +0 -3
  53. package/dist/hooks/tool-policy.d.ts.map +0 -1
  54. package/dist/hooks/tool-policy.js +0 -44
  55. package/dist/hooks/tool-policy.js.map +0 -1
  56. package/dist/tools/datasets.d.ts +0 -3
  57. package/dist/tools/datasets.d.ts.map +0 -1
  58. package/dist/tools/datasets.js +0 -57
  59. package/dist/tools/datasets.js.map +0 -1
  60. package/dist/tools/gpu.d.ts +0 -3
  61. package/dist/tools/gpu.d.ts.map +0 -1
  62. package/dist/tools/gpu.js +0 -63
  63. package/dist/tools/gpu.js.map +0 -1
  64. package/dist/tools/inference.d.ts +0 -3
  65. package/dist/tools/inference.d.ts.map +0 -1
  66. package/dist/tools/inference.js +0 -42
  67. package/dist/tools/inference.js.map +0 -1
  68. package/dist/tools/logs.d.ts +0 -3
  69. package/dist/tools/logs.d.ts.map +0 -1
  70. package/dist/tools/logs.js +0 -44
  71. package/dist/tools/logs.js.map +0 -1
@@ -1,135 +1,205 @@
1
- const projectIdProp = {
2
- projectId: { type: "string", description: "Project ID (uses default if omitted)" },
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 inferenceStartSchema = {
15
+ export const getRentalSchema = {
5
16
  type: "object",
6
17
  properties: {
7
- modelId: { type: "string", description: "Model identifier to run inference against" },
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: ["modelId", "input"],
20
+ required: ["rental_id"],
13
21
  };
14
- export const inferenceQuerySchema = {
22
+ export const stopRentalSchema = {
15
23
  type: "object",
16
24
  properties: {
17
- inferenceId: { type: "string", description: "Inference run ID to query" },
25
+ rental_id: { type: "string", description: "Rental ID to stop" },
18
26
  },
19
- required: ["inferenceId"],
27
+ required: ["rental_id"],
20
28
  };
21
- export const jobSubmitSchema = {
29
+ export const listRentalsSchema = {
22
30
  type: "object",
23
31
  properties: {
24
- name: { type: "string", description: "Job name" },
25
- type: { type: "string", enum: ["training", "inference", "fine-tune", "evaluation"], description: "Job type" },
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 jobStatusSchema = {
36
+ export const restartRentalSchema = {
32
37
  type: "object",
33
38
  properties: {
34
- jobId: { type: "string", description: "Job ID to query" },
39
+ rental_id: { type: "string", description: "Rental ID to restart" },
35
40
  },
36
- required: ["jobId"],
41
+ required: ["rental_id"],
37
42
  };
38
- export const jobCancelSchema = {
43
+ export const rentalHistorySchema = {
39
44
  type: "object",
40
45
  properties: {
41
- jobId: { type: "string", description: "Job ID to cancel" },
46
+ limit: { type: "number", description: "Max number of historical rentals to return" },
42
47
  },
43
- required: ["jobId"],
44
48
  };
45
- export const gpuListSchema = {
49
+ // --- Deployments ---
50
+ export const createDeploymentSchema = {
46
51
  type: "object",
47
52
  properties: {
48
- ...projectIdProp,
49
- page: { type: "number", description: "Page number" },
50
- pageSize: { type: "number", description: "Page size" },
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 gpuRequestSchema = {
64
+ export const getDeploymentSchema = {
54
65
  type: "object",
55
66
  properties: {
56
- gpuType: { type: "string", enum: ["A100", "H100", "H200", "L40S", "T4"], description: "GPU type" },
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: ["gpuType", "count"],
69
+ required: ["instance_name"],
63
70
  };
64
- export const gpuInspectSchema = {
71
+ export const listDeploymentsSchema = {
72
+ type: "object",
73
+ properties: {},
74
+ };
75
+ export const deleteDeploymentSchema = {
65
76
  type: "object",
66
77
  properties: {
67
- allocationId: { type: "string", description: "Allocation ID to inspect" },
78
+ instance_name: { type: "string", description: "Deployment instance name to delete" },
68
79
  },
69
- required: ["allocationId"],
80
+ required: ["instance_name"],
70
81
  };
71
- export const deploySchema = {
82
+ export const restartDeploymentSchema = {
72
83
  type: "object",
73
84
  properties: {
74
- name: { type: "string", description: "Deployment name" },
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: ["name", "modelId"],
87
+ required: ["instance_name"],
80
88
  };
81
- export const deploymentHealthSchema = {
89
+ export const scaleDeploymentSchema = {
82
90
  type: "object",
83
91
  properties: {
84
- deploymentId: { type: "string", description: "Deployment ID to check" },
92
+ instance_name: { type: "string", description: "Deployment instance name to scale" },
93
+ replicas: { type: "number", description: "Target number of replicas" },
85
94
  },
86
- required: ["deploymentId"],
95
+ required: ["instance_name", "replicas"],
87
96
  };
88
- export const deploymentRestartSchema = {
97
+ export const deploymentLogsSchema = {
89
98
  type: "object",
90
99
  properties: {
91
- deploymentId: { type: "string", description: "Deployment ID to restart" },
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: ["deploymentId"],
103
+ required: ["instance_name"],
94
104
  };
95
- export const datasetListSchema = {
105
+ // --- Jobs ---
106
+ export const createJobSchema = {
96
107
  type: "object",
97
108
  properties: {
98
- ...projectIdProp,
99
- page: { type: "number", description: "Page number" },
100
- pageSize: { type: "number", description: "Page size" },
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 datasetGetSchema = {
125
+ export const jobStatusSchema = {
104
126
  type: "object",
105
127
  properties: {
106
- datasetId: { type: "string", description: "Dataset ID" },
128
+ job_id: { type: "string", description: "Job ID to query" },
107
129
  },
108
- required: ["datasetId"],
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 datasetArtifactsSchema = {
182
+ export const pollAuthSchema = {
111
183
  type: "object",
112
184
  properties: {
113
- datasetId: { type: "string", description: "Dataset ID to get artifacts for" },
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: ["datasetId"],
188
+ required: ["device_code"],
116
189
  };
117
- export const logsQuerySchema = {
190
+ export const createApiKeySchema = {
118
191
  type: "object",
119
192
  properties: {
120
- source: { type: "string", description: "Log source filter" },
121
- level: { type: "string", enum: ["debug", "info", "warn", "error"], description: "Log level filter" },
122
- since: { type: "string", description: "Start time (ISO 8601)" },
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 logsRecentErrorsSchema = {
199
+ export const listApiKeysSchema = {
129
200
  type: "object",
130
201
  properties: {
131
- ...projectIdProp,
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,aAAa,GAAG;IACpB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sCAAsC,EAAE;CACnF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAe;IAC9C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;QACrF,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;QAClE,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2BAA2B,EAAE;QACxE,GAAG,aAAa;KACjB;IACD,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAe;IAC9C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,WAAW,EA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QAAQ;IACd,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wCAAwC,EAAE;QACtF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sCAAsC,EAAE;KAClF;IACD,QAAQ,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAe;IAC5C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,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,3 @@
1
+ import type { OpenClawPluginApi } from "openclaw-plugin-types";
2
+ export declare function registerSecureCloudTools(api: OpenClawPluginApi): void;
3
+ //# sourceMappingURL=secure-cloud.d.ts.map
@@ -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,UAA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"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
- "toolGroups": { "label": "Enabled Tool Groups" },
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.1.0",
3
+ "version": "0.3.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.1.0"
31
+ "@basilica/sdk": "^0.3.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 health: `basilica_deployment_health`
7
- 2. Check recent errors: `basilica_recent_errors`
8
- 3. If errors indicate OOM or resource exhaustion, check GPU allocation
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 restart fails, check model compatibility with allocated GPU type
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. Check logs: `basilica_query_logs` with source filter matching the job
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
- - Insufficient GPU memory -- request larger GPU type
17
- - Dataset format mismatch -- verify dataset metadata
18
- - Configuration error -- review job config parameters
19
- 4. After fixing, resubmit: `basilica_submit_job`
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 credentials: re-run `openclaw models auth login --provider basilica`
23
- 2. If OAuth refresh fails, the token may have been revoked -- re-authenticate
24
- 3. Check environment (production vs staging) matches intended target
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. Query recent error logs for the affected project
30
- 2. Check deployment health across all active deployments
31
- 3. Inspect GPU allocation status -- look for "releasing" or "pending" states
32
- 4. Review recent job submissions for resource contention
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
- ### Resource Contention
35
- 1. List GPU resources to identify availability
36
- 2. Check for expired or idle allocations that can be released
37
- 3. Consider region alternatives if primary region is constrained
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. Stop the current deployment: use `basilica_restart_deployment` (will redeploy last known good state)
43
- 2. If the model itself is the issue, deploy the previous model version
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. Cancel the failing job: `basilica_cancel_job`
47
- 2. Review and correct the configuration
48
- 3. Resubmit with corrected parameters
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
- - Always specify explicit project scope for destructive operations
53
- - Check GPU availability before submitting large training jobs
54
- - Monitor deployment health after any configuration change
55
- - Use staging environment for testing new model deployments before production
56
- - Review error logs before escalating -- most issues are configuration-related
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