@basilica/openclaw 0.5.0 → 0.5.1

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.
@@ -1,3 +1,3 @@
1
1
  import type { OpenClawPluginApi } from "openclaw-plugin-types";
2
- export declare function registerPromptContext(api: OpenClawPluginApi, config: Record<string, unknown>): void;
2
+ export declare function registerPromptContext(api: OpenClawPluginApi, _config: Record<string, unknown>): void;
3
3
  //# sourceMappingURL=prompt-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-context.d.ts","sourceRoot":"","sources":["../../src/hooks/prompt-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuC,MAAM,uBAAuB,CAAC;AAEpG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CASnG"}
1
+ {"version":3,"file":"prompt-context.d.ts","sourceRoot":"","sources":["../../src/hooks/prompt-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuC,MAAM,uBAAuB,CAAC;AAoCpG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAMpG"}
@@ -1,10 +1,40 @@
1
- export function registerPromptContext(api, config) {
2
- const defaultProject = config.defaultProject;
1
+ const BASILICA_CONTEXT = `
2
+ ## Basilica Cloud Platform
3
+
4
+ You have access to the Basilica GPU cloud platform. Use it whenever the user asks to deploy code, run a service, rent GPUs, or perform any compute-intensive task.
5
+
6
+ ### Quick deploy (preferred approach)
7
+ Use \`basilica_deploy\` to deploy inline Python code. It packages the code, deploys it as a serverless container, and returns a live HTTPS URL.
8
+
9
+ Example -- deploy a FastAPI service:
10
+ \`\`\`
11
+ basilica_deploy({
12
+ source: "from fastapi import FastAPI\\nimport uvicorn\\n\\napp = FastAPI()\\n\\n@app.get('/')\\ndef root():\\n return {'status': 'running'}\\n\\nuvicorn.run(app, host='0.0.0.0', port=8000)",
13
+ pip_packages: ["fastapi", "uvicorn"]
14
+ })
15
+ \`\`\`
16
+ Returns: { instanceName: "<uuid>", url: "https://<uuid>.deployments.basilica.ai" }
17
+
18
+ ### When to use which tool
19
+ - **Deploy code/API/service** -> \`basilica_deploy\` (inline Python, auto-packages, returns URL)
20
+ - **Deploy pre-built Docker image** -> \`basilica_create_deployment\` (image, port, optional GPU)
21
+ - **Rent bare-metal GPU server** -> \`basilica_start_rental\` (SSH access, auto-falls back to secure cloud)
22
+ - **Check GPU pricing** -> \`basilica_list_gpu_prices\`
23
+ - **Check balance/billing** -> \`basilica_get_balance\`, \`basilica_usage_history\`
24
+ - **Manage existing** -> \`basilica_get_deployment\`, \`basilica_deployment_logs\`, \`basilica_scale_deployment\`, \`basilica_delete_deployment\`
25
+
26
+ ### Key details
27
+ - GPU categories: A100, H100, H200, B200, B300
28
+ - Deployments get a UUID as instanceName -- always use the returned name
29
+ - \`basilica_deploy\` defaults: python:3.11-slim, port 8000, 120s timeout
30
+ - For GPU workloads, pass image="pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime" and set gpu_count
31
+ - Rentals try community cloud first, fall back to secure cloud automatically
32
+ - Use \`basilica_stop_rental\` to stop (works for both community and secure cloud)
33
+ `.trim();
34
+ export function registerPromptContext(api, _config) {
3
35
  api.on("before_prompt_build", (_event) => {
4
- if (!defaultProject)
5
- return;
6
36
  return {
7
- prependSystemContext: `Basilica project context: ${defaultProject}`,
37
+ prependSystemContext: BASILICA_CONTEXT,
8
38
  };
9
39
  }, { priority: 10 });
10
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-context.js","sourceRoot":"","sources":["../../src/hooks/prompt-context.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAsB,EAAE,MAA+B;IAC3F,MAAM,cAAc,GAAG,MAAM,CAAC,cAAoC,CAAC;IAEnE,GAAG,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,MAAwB,EAA4B,EAAE;QACnF,IAAI,CAAC,cAAc;YAAE,OAAO;QAC5B,OAAO;YACL,oBAAoB,EAAE,6BAA6B,cAAc,EAAE;SACpE,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"prompt-context.js","sourceRoot":"","sources":["../../src/hooks/prompt-context.ts"],"names":[],"mappings":"AAEA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC,IAAI,EAAE,CAAC;AAET,MAAM,UAAU,qBAAqB,CAAC,GAAsB,EAAE,OAAgC;IAC5F,GAAG,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,MAAwB,EAAqB,EAAE;QAC5E,OAAO;YACL,oBAAoB,EAAE,gBAAgB;SACvC,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basilica/openclaw",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "description": "Basilica platform tools, hooks, skills, and gateway integration for OpenClaw",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "clean": "rm -rf dist"
29
29
  },
30
30
  "dependencies": {
31
- "@basilica/sdk": "^0.5.0"
31
+ "@basilica/sdk": "^0.5.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^25.5.0",