@opencode-cloud/core 3.1.5 → 3.1.6

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/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "opencode-cloud-core"
3
- version = "3.1.5"
3
+ version = "3.1.6"
4
4
  edition = "2024"
5
5
  rust-version = "1.88"
6
6
  license = "MIT"
package/README.md CHANGED
@@ -80,7 +80,15 @@ cargo install opencode-cloud
80
80
  occ --version
81
81
  ```
82
82
 
83
- ### From source
83
+ ### From source (install locally)
84
+
85
+ ```bash
86
+ git clone https://github.com/pRizz/opencode-cloud.git
87
+ cd opencode-cloud
88
+ cargo install --path packages/cli-rust
89
+ ```
90
+
91
+ ### From source (development run)
84
92
 
85
93
  ```bash
86
94
  git clone https://github.com/pRizz/opencode-cloud.git
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-cloud/core",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "Core NAPI bindings for opencode-cloud (internal package)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -16,6 +16,10 @@ pub enum DockerError {
16
16
  #[error("Docker daemon not running. Start Docker Desktop or the Docker service.")]
17
17
  NotRunning,
18
18
 
19
+ /// Docker socket not found
20
+ #[error("Docker socket not found. Is Docker installed and running?")]
21
+ SocketNotFound,
22
+
19
23
  /// Permission denied accessing Docker socket
20
24
  #[error(
21
25
  "Permission denied accessing Docker socket. You may need to add your user to the 'docker' group."
@@ -48,9 +52,10 @@ impl From<bollard::errors::Error> for DockerError {
48
52
  let msg = err.to_string();
49
53
 
50
54
  // Detect common error patterns and provide better messages
51
- if msg.contains("Cannot connect to the Docker daemon")
55
+ if msg.contains("No such file or directory") {
56
+ DockerError::SocketNotFound
57
+ } else if msg.contains("Cannot connect to the Docker daemon")
52
58
  || msg.contains("connection refused")
53
- || msg.contains("No such file or directory")
54
59
  {
55
60
  DockerError::NotRunning
56
61
  } else if msg.contains("permission denied") || msg.contains("Permission denied") {
@@ -70,6 +75,9 @@ mod tests {
70
75
  let err = DockerError::NotRunning;
71
76
  assert!(err.to_string().contains("Docker daemon not running"));
72
77
 
78
+ let err = DockerError::SocketNotFound;
79
+ assert!(err.to_string().contains("Docker socket not found"));
80
+
73
81
  let err = DockerError::PermissionDenied;
74
82
  assert!(err.to_string().contains("Permission denied"));
75
83