@opencode-cloud/core 7.1.0 → 10.0.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 +1 -1
- package/README.md +15 -0
- package/package.json +1 -1
- package/src/docker/Dockerfile +1 -1
- package/src/host/tunnel.rs +9 -0
package/Cargo.toml
CHANGED
package/README.md
CHANGED
|
@@ -209,6 +209,21 @@ occ update opencode
|
|
|
209
209
|
occ update opencode --branch dev
|
|
210
210
|
occ update opencode --commit <sha>
|
|
211
211
|
|
|
212
|
+
# Remove the container (keeps volumes)
|
|
213
|
+
occ reset container
|
|
214
|
+
|
|
215
|
+
# Remove container and volumes (data loss)
|
|
216
|
+
occ reset container --volumes --force
|
|
217
|
+
|
|
218
|
+
# Clean bind mount contents (data loss)
|
|
219
|
+
occ mount clean --force
|
|
220
|
+
|
|
221
|
+
# Purge bind mounts (data loss, removes config entries)
|
|
222
|
+
occ mount clean --purge --force
|
|
223
|
+
|
|
224
|
+
# Factory reset host (container, volumes, mounts, config/data)
|
|
225
|
+
occ reset host --force
|
|
226
|
+
|
|
212
227
|
### Webapp-triggered update (command file)
|
|
213
228
|
|
|
214
229
|
When running in foreground mode (for example via `occ install`, which uses `occ start --no-daemon`),
|
package/package.json
CHANGED
package/src/docker/Dockerfile
CHANGED
|
@@ -516,7 +516,7 @@ RUN echo 'export PATH="/home/opencode/.local/bin:$PATH"' >> /home/opencode/.zshr
|
|
|
516
516
|
# Clone the fork and build opencode from source (as non-root user)
|
|
517
517
|
# Pin to specific commit for reproducibility
|
|
518
518
|
# Build opencode from source (BuildKit cache mounts disabled for now)
|
|
519
|
-
RUN OPENCODE_COMMIT="
|
|
519
|
+
RUN OPENCODE_COMMIT="8a63844a3d3166273a83d5e94d8820d62ad82510" \
|
|
520
520
|
&& rm -rf /tmp/opencode-repo \
|
|
521
521
|
&& git clone --depth 1 https://github.com/pRizz/opencode.git /tmp/opencode-repo \
|
|
522
522
|
&& cd /tmp/opencode-repo \
|
package/src/host/tunnel.rs
CHANGED
|
@@ -248,9 +248,18 @@ pub async fn test_connection(host: &HostConfig) -> Result<String, HostError> {
|
|
|
248
248
|
#[cfg(test)]
|
|
249
249
|
mod tests {
|
|
250
250
|
use super::*;
|
|
251
|
+
use std::net::TcpListener;
|
|
252
|
+
|
|
253
|
+
fn can_bind_localhost() -> bool {
|
|
254
|
+
TcpListener::bind(("127.0.0.1", 0)).is_ok()
|
|
255
|
+
}
|
|
251
256
|
|
|
252
257
|
#[test]
|
|
253
258
|
fn test_find_available_port() {
|
|
259
|
+
if !can_bind_localhost() {
|
|
260
|
+
eprintln!("Skipping test: cannot bind to localhost in this environment.");
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
254
263
|
let port = find_available_port().unwrap();
|
|
255
264
|
assert!(port > 0);
|
|
256
265
|
|