@opencode-cloud/core 17.0.0 → 18.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.
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "opencode-cloud-core"
3
- version = "17.0.0"
3
+ version = "18.1.0"
4
4
  edition = "2024"
5
5
  rust-version = "1.89"
6
6
  license = "MIT"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-cloud/core",
3
- "version": "17.0.0",
3
+ "version": "18.1.0",
4
4
  "description": "Core NAPI bindings for opencode-cloud (internal package)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -492,7 +492,7 @@ USER opencode
492
492
  # commit on the main branch of https://github.com/pRizz/opencode.
493
493
  # Update it by running: ./scripts/update-opencode-commit.sh
494
494
  # Build opencode from source (BuildKit cache mounts disabled for now)
495
- RUN OPENCODE_COMMIT="41731edead75a52aceac0b48c22474bdeafc746c" \
495
+ RUN OPENCODE_COMMIT="7f2140803b00f8aee6f9179e14ffeabe5784a763" \
496
496
  && rm -rf /tmp/opencode-repo \
497
497
  && git clone --depth 1 https://github.com/pRizz/opencode.git /tmp/opencode-repo \
498
498
  && cd /tmp/opencode-repo \
@@ -22,9 +22,38 @@ read_opencode_cloud_version() {
22
22
  fi
23
23
  }
24
24
 
25
+ format_url_host() {
26
+ local host="$1"
27
+
28
+ if [[ "${host}" == *:* ]] && [[ "${host}" != \[*] ]]; then
29
+ printf "[%s]" "${host}"
30
+ else
31
+ printf "%s" "${host}"
32
+ fi
33
+ }
34
+
35
+ display_local_host() {
36
+ local host="$1"
37
+
38
+ if [ "${host}" = "0.0.0.0" ] || [ "${host}" = "::" ]; then
39
+ printf "127.0.0.1"
40
+ else
41
+ printf "%s" "${host}"
42
+ fi
43
+ }
44
+
45
+ build_service_url() {
46
+ local host="$1"
47
+ local port="$2"
48
+ printf "http://%s:%s" "$(format_url_host "${host}")" "${port}"
49
+ }
50
+
25
51
  print_welcome_banner() {
26
- local version
52
+ local version local_host local_url bind_url
27
53
  version="$(read_opencode_cloud_version)"
54
+ local_host="$(display_local_host "${OPENCODE_HOST}")"
55
+ local_url="$(build_service_url "${local_host}" "${OPENCODE_PORT}")"
56
+ bind_url="$(build_service_url "${OPENCODE_HOST}" "${OPENCODE_PORT}")"
28
57
 
29
58
  log "----------------------------------------------------------------------"
30
59
  log "Welcome to opencode-cloud-sandbox"
@@ -32,7 +61,21 @@ print_welcome_banner() {
32
61
  log "For questions, problems, and feature requests, file an issue:"
33
62
  log " https://github.com/pRizz/opencode-cloud/issues"
34
63
  log "opencode-cloud runs opencode in a Docker sandbox; use occ/opencode-cloud CLI to manage users, mounts, and updates."
35
- log "Quick start: occ user add <username> | occ status | occ logs -f"
64
+ log ""
65
+ log "Getting started:"
66
+ log " 1) Create a login user:"
67
+ log " occ user add <username>"
68
+ log " 2) Set or generate a password:"
69
+ log " occ user add <username> --generate"
70
+ log " occ user passwd <username>"
71
+ log " occ user passwd <username> --generate"
72
+ log " 3) Access the web UI:"
73
+ log " Local URL: ${local_url}"
74
+ log " Bind URL: ${bind_url}"
75
+ log " 4) Cloud note: external URL may differ based on DNS, reverse proxy/load balancer,"
76
+ log " ingress, TLS termination, and port mappings."
77
+ log " 5) Log in with your created credentials. If prompted for optional 2FA setup,"
78
+ log " you can skip it."
36
79
  log "Docs: https://github.com/pRizz/opencode-cloud#readme"
37
80
  log "----------------------------------------------------------------------"
38
81
  }