@opencode-cloud/core 3.1.5 → 3.1.7

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.7"
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.7",
4
4
  "description": "Core NAPI bindings for opencode-cloud (internal package)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -136,6 +136,8 @@ RUN --mount=type=cache,target=/var/lib/apt/lists \
136
136
  RUN --mount=type=cache,target=/var/lib/apt/lists \
137
137
  --mount=type=cache,target=/var/cache/apt \
138
138
  apt-get update && apt-get install -y --no-install-recommends \
139
+ # libssl-dev depends on libssl3t64 with exact version match
140
+ libssl3t64=3.0.* \
139
141
  libssl-dev=3.0.* \
140
142
  libffi-dev=3.4.* \
141
143
  zlib1g-dev=1:1.3.* \
@@ -513,12 +515,12 @@ RUN echo 'export PATH="/home/opencode/.local/bin:$PATH"' >> /home/opencode/.zshr
513
515
  # opencode Installation (Fork from pRizz/opencode)
514
516
  # -----------------------------------------------------------------------------
515
517
  # Clone the fork and build opencode from source (as non-root user)
516
- # Pin to specific commit for reproducibility: 6f2b0dfede58b34856c0e0bbaa5e3ae2cb3a316b
518
+ # Pin to specific commit for reproducibility
517
519
  # Build opencode from source (BuildKit cache mounts disabled for now)
518
520
  RUN rm -rf /tmp/opencode-repo \
519
521
  && git clone --depth 1 https://github.com/pRizz/opencode.git /tmp/opencode-repo \
520
522
  && cd /tmp/opencode-repo \
521
- && git checkout 6f2b0dfede58b34856c0e0bbaa5e3ae2cb3a316b \
523
+ && git checkout 189700cee2fcdf0a1a1157aac1a7dea6afaf7c82 \
522
524
  && curl -fsSL https://bun.sh/install | bash -s "bun-v1.3.5" \
523
525
  && export PATH="/home/opencode/.bun/bin:${PATH}" \
524
526
  && bun install --frozen-lockfile \
@@ -603,19 +605,7 @@ RUN rm -f /etc/nginx/sites-enabled/default /etc/nginx/conf.d/default.conf 2>/dev
603
605
  ' }' \
604
606
  '' \
605
607
  ' location / {' \
606
- ' try_files $uri $uri/ @opencode_fallback;' \
607
- ' }' \
608
- '' \
609
- ' location @opencode_fallback {' \
610
- ' if ($http_accept ~* "text/html") { rewrite ^ /index.html break; }' \
611
- ' proxy_pass http://127.0.0.1:3001;' \
612
- ' proxy_http_version 1.1;' \
613
- ' proxy_set_header Upgrade $http_upgrade;' \
614
- ' proxy_set_header Connection "upgrade";' \
615
- ' proxy_set_header Host $host;' \
616
- ' proxy_set_header X-Real-IP $remote_addr;' \
617
- ' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' \
618
- ' proxy_set_header X-Forwarded-Proto $scheme;' \
608
+ ' try_files $uri $uri/ /index.html;' \
619
609
  ' }' \
620
610
  '}' \
621
611
  > /etc/nginx/conf.d/opencode.conf
@@ -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