@opencode-cloud/core 3.1.4 → 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.4"
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.4",
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",
@@ -30,29 +30,7 @@
30
30
  # -----------------------------------------------------------------------------
31
31
 
32
32
  # -----------------------------------------------------------------------------
33
- # Stage 1: Builder
34
- # -----------------------------------------------------------------------------
35
- # Install build dependencies and tools that require compilation
36
- FROM ubuntu:24.04 AS builder
37
-
38
- # Avoid interactive prompts during package installation
39
- ENV DEBIAN_FRONTEND=noninteractive
40
- ENV TZ=UTC
41
-
42
- # Install build essentials (2026-01-22)
43
- # Use BuildKit cache mount for APT package lists and cache
44
- RUN --mount=type=cache,target=/var/lib/apt/lists \
45
- --mount=type=cache,target=/var/cache/apt \
46
- apt-get update && apt-get install -y --no-install-recommends \
47
- build-essential=12.* \
48
- # UNPINNED: ca-certificates - security-critical root certs, needs auto-updates
49
- ca-certificates \
50
- curl=8.5.* \
51
- git=1:2.43.* \
52
- && rm -rf /var/lib/apt/lists/*
53
-
54
- # -----------------------------------------------------------------------------
55
- # Stage 2: Runtime
33
+ # Stage 1: Runtime
56
34
  # -----------------------------------------------------------------------------
57
35
  FROM ubuntu:24.04 AS runtime
58
36
 
@@ -282,7 +260,8 @@ RUN eval "$(/home/opencode/.local/bin/mise activate bash)" \
282
260
  # NOTE: Avoid cache mounts here due to permission issues with non-root Cargo cache
283
261
  RUN mkdir -p /home/opencode/.cargo/registry /home/opencode/.cargo/git \
284
262
  && . /home/opencode/.cargo/env \
285
- && cargo install --locked ripgrep@15.1.0 eza@0.23.4
263
+ && cargo install --locked ripgrep@15.1.0 eza@0.23.4 \
264
+ && rm -rf /home/opencode/.cargo/registry /home/opencode/.cargo/git
286
265
 
287
266
  # lazygit v0.58.1 (2026-01-12) - terminal UI for git
288
267
  # Disabled temporarily to reduce Docker build time.
@@ -534,18 +513,19 @@ RUN echo 'export PATH="/home/opencode/.local/bin:$PATH"' >> /home/opencode/.zshr
534
513
  # opencode Installation (Fork from pRizz/opencode)
535
514
  # -----------------------------------------------------------------------------
536
515
  # Clone the fork and build opencode from source (as non-root user)
537
- # Pin to specific commit for reproducibility: 50fd5d1a6a17dc1b378a0e60b464a75dd876d6e2
516
+ # Pin to specific commit for reproducibility: 6f2b0dfede58b34856c0e0bbaa5e3ae2cb3a316b
538
517
  # Build opencode from source (BuildKit cache mounts disabled for now)
539
518
  RUN rm -rf /tmp/opencode-repo \
540
519
  && git clone --depth 1 https://github.com/pRizz/opencode.git /tmp/opencode-repo \
541
520
  && cd /tmp/opencode-repo \
542
- && git checkout 50fd5d1a6a17dc1b378a0e60b464a75dd876d6e2 \
521
+ && git checkout 6f2b0dfede58b34856c0e0bbaa5e3ae2cb3a316b \
543
522
  && curl -fsSL https://bun.sh/install | bash -s "bun-v1.3.5" \
544
523
  && export PATH="/home/opencode/.bun/bin:${PATH}" \
545
524
  && bun install --frozen-lockfile \
546
525
  && bun run packages/opencode/script/build.ts --single \
547
526
  && cd packages/app \
548
527
  && bun run build \
528
+ && rm -rf /home/opencode/.bun/install/cache /home/opencode/.bun/cache /home/opencode/.cache/bun \
549
529
  && cd /tmp/opencode-repo \
550
530
  && mkdir -p /home/opencode/.local/share/opencode/bin \
551
531
  && cp /tmp/opencode-repo/packages/opencode/dist/opencode-*/bin/opencode /home/opencode/.local/share/opencode/bin/opencode \
@@ -713,7 +693,8 @@ USER opencode
713
693
  # Note: If this fails in container builds due to "~" path resolution, retry with
714
694
  # OPENCODE_CONFIG_DIR=/home/opencode/.config/opencode set explicitly.
715
695
  RUN mkdir -p /home/opencode/.npm \
716
- && npx --yes get-shit-done-cc --opencode --global
696
+ && npx --yes get-shit-done-cc --opencode --global \
697
+ && rm -rf /home/opencode/.npm/_cacache /home/opencode/.npm/_npx
717
698
 
718
699
  # -----------------------------------------------------------------------------
719
700
  # opencode systemd Service (2026-01-22)
@@ -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