@basilica/openclaw 0.1.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 (80) hide show
  1. package/dist/gateway/index.d.ts +7 -0
  2. package/dist/gateway/index.d.ts.map +1 -0
  3. package/dist/gateway/index.js +21 -0
  4. package/dist/gateway/index.js.map +1 -0
  5. package/dist/gateway/status.d.ts +12 -0
  6. package/dist/gateway/status.d.ts.map +1 -0
  7. package/dist/gateway/status.js +33 -0
  8. package/dist/gateway/status.js.map +1 -0
  9. package/dist/gateway/sync-service.d.ts +17 -0
  10. package/dist/gateway/sync-service.d.ts.map +1 -0
  11. package/dist/gateway/sync-service.js +46 -0
  12. package/dist/gateway/sync-service.js.map +1 -0
  13. package/dist/gateway/webhook.d.ts +12 -0
  14. package/dist/gateway/webhook.d.ts.map +1 -0
  15. package/dist/gateway/webhook.js +23 -0
  16. package/dist/gateway/webhook.js.map +1 -0
  17. package/dist/hooks/audit.d.ts +17 -0
  18. package/dist/hooks/audit.d.ts.map +1 -0
  19. package/dist/hooks/audit.js +28 -0
  20. package/dist/hooks/audit.js.map +1 -0
  21. package/dist/hooks/index.d.ts +5 -0
  22. package/dist/hooks/index.d.ts.map +1 -0
  23. package/dist/hooks/index.js +14 -0
  24. package/dist/hooks/index.js.map +1 -0
  25. package/dist/hooks/model-routing.d.ts +3 -0
  26. package/dist/hooks/model-routing.d.ts.map +1 -0
  27. package/dist/hooks/model-routing.js +11 -0
  28. package/dist/hooks/model-routing.js.map +1 -0
  29. package/dist/hooks/prompt-context.d.ts +3 -0
  30. package/dist/hooks/prompt-context.d.ts.map +1 -0
  31. package/dist/hooks/prompt-context.js +11 -0
  32. package/dist/hooks/prompt-context.js.map +1 -0
  33. package/dist/hooks/tool-policy.d.ts +3 -0
  34. package/dist/hooks/tool-policy.d.ts.map +1 -0
  35. package/dist/hooks/tool-policy.js +44 -0
  36. package/dist/hooks/tool-policy.js.map +1 -0
  37. package/dist/index.d.ts +5 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +11 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/tools/context.d.ts +6 -0
  42. package/dist/tools/context.d.ts.map +1 -0
  43. package/dist/tools/context.js +28 -0
  44. package/dist/tools/context.js.map +1 -0
  45. package/dist/tools/datasets.d.ts +3 -0
  46. package/dist/tools/datasets.d.ts.map +1 -0
  47. package/dist/tools/datasets.js +57 -0
  48. package/dist/tools/datasets.js.map +1 -0
  49. package/dist/tools/deployments.d.ts +3 -0
  50. package/dist/tools/deployments.d.ts.map +1 -0
  51. package/dist/tools/deployments.js +58 -0
  52. package/dist/tools/deployments.js.map +1 -0
  53. package/dist/tools/gpu.d.ts +3 -0
  54. package/dist/tools/gpu.d.ts.map +1 -0
  55. package/dist/tools/gpu.js +63 -0
  56. package/dist/tools/gpu.js.map +1 -0
  57. package/dist/tools/index.d.ts +3 -0
  58. package/dist/tools/index.d.ts.map +1 -0
  59. package/dist/tools/index.js +15 -0
  60. package/dist/tools/index.js.map +1 -0
  61. package/dist/tools/inference.d.ts +3 -0
  62. package/dist/tools/inference.d.ts.map +1 -0
  63. package/dist/tools/inference.js +42 -0
  64. package/dist/tools/inference.js.map +1 -0
  65. package/dist/tools/jobs.d.ts +3 -0
  66. package/dist/tools/jobs.d.ts.map +1 -0
  67. package/dist/tools/jobs.js +58 -0
  68. package/dist/tools/jobs.js.map +1 -0
  69. package/dist/tools/logs.d.ts +3 -0
  70. package/dist/tools/logs.d.ts.map +1 -0
  71. package/dist/tools/logs.js +44 -0
  72. package/dist/tools/logs.js.map +1 -0
  73. package/dist/tools/schemas.d.ts +18 -0
  74. package/dist/tools/schemas.d.ts.map +1 -0
  75. package/dist/tools/schemas.js +135 -0
  76. package/dist/tools/schemas.js.map +1 -0
  77. package/openclaw.plugin.json +38 -0
  78. package/package.json +41 -0
  79. package/skills/basilica-operator/index.md +56 -0
  80. package/skills/basilica-platform/index.md +67 -0
@@ -0,0 +1,56 @@
1
+ # Basilica Operator Guide
2
+
3
+ ## Incident Handling
4
+
5
+ ### 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
9
+ 4. Restart deployment: `basilica_restart_deployment`
10
+ 5. If restart fails, check model compatibility with allocated GPU type
11
+
12
+ ### Job Failures
13
+ 1. Check job status: `basilica_job_status`
14
+ 2. Check logs: `basilica_query_logs` with source filter matching the job
15
+ 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`
20
+
21
+ ### 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
25
+
26
+ ## Triage Patterns
27
+
28
+ ### 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
33
+
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
38
+
39
+ ## Rollback Procedures
40
+
41
+ ### 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
44
+
45
+ ### Job Recovery
46
+ 1. Cancel the failing job: `basilica_cancel_job`
47
+ 2. Review and correct the configuration
48
+ 3. Resubmit with corrected parameters
49
+
50
+ ## Operational Best Practices
51
+
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
@@ -0,0 +1,67 @@
1
+ # Basilica Platform
2
+
3
+ ## Overview
4
+
5
+ Basilica is a GPU compute and AI infrastructure platform. It provides managed inference, training jobs, model deployments, and dataset management through a unified API.
6
+
7
+ ## Resource Model
8
+
9
+ ### Organizations
10
+ - Top-level grouping for teams and billing
11
+ - Each org has one or more projects
12
+
13
+ ### Projects
14
+ - Primary scope for all resources (jobs, deployments, datasets, GPU allocations)
15
+ - Tools require a project scope -- either from config or explicit parameter
16
+ - Format: `org-name/project-name`
17
+
18
+ ### Models
19
+ - Identified by `modelId` (e.g., `basilica/llama-3-70b`)
20
+ - Available for inference and deployment
21
+ - Some models require specific GPU types
22
+
23
+ ### Jobs
24
+ - Types: training, inference, fine-tune, evaluation
25
+ - Lifecycle: queued -> running -> completed/failed/cancelled
26
+ - Each job is scoped to a project
27
+
28
+ ### GPU/Compute
29
+ - Types: A100, H100, H200, L40S, T4
30
+ - Allocations are time-bound and region-specific
31
+ - Request compute before submitting large jobs
32
+
33
+ ### Deployments
34
+ - Serve models as persistent endpoints
35
+ - Lifecycle: deploying -> active/failed -> stopped
36
+ - Support health checks, restart, and rolling updates
37
+
38
+ ### Datasets
39
+ - Immutable versioned data artifacts
40
+ - Metadata includes format, size, row count
41
+ - Artifacts are the physical storage locations
42
+
43
+ ## Authentication
44
+
45
+ Basilica supports two authentication methods:
46
+
47
+ 1. **OAuth (device code flow)** -- interactive login, produces refreshable credentials
48
+ 2. **API Token** -- non-interactive, exchanged for short-lived access tokens
49
+
50
+ Credentials are stored in OpenClaw's standard auth-profile store.
51
+
52
+ ## Common Workflows
53
+
54
+ ### Run inference
55
+ 1. Verify auth: `openclaw models auth login --provider basilica`
56
+ 2. Use `basilica_start_inference` with model and input
57
+ 3. Poll with `basilica_query_inference` if async
58
+
59
+ ### Submit a training job
60
+ 1. Request compute: `basilica_request_compute` for required GPU type
61
+ 2. Submit job: `basilica_submit_job` with training config
62
+ 3. Monitor: `basilica_job_status`
63
+
64
+ ### Deploy a model
65
+ 1. Deploy: `basilica_deploy` with model and config
66
+ 2. Health check: `basilica_deployment_health`
67
+ 3. Restart if needed: `basilica_restart_deployment`