@opencode-cloud/core 7.1.0 → 8.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "opencode-cloud-core"
3
- version = "7.1.0"
3
+ version = "8.0.0"
4
4
  edition = "2024"
5
5
  rust-version = "1.88"
6
6
  license = "MIT"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-cloud/core",
3
- "version": "7.1.0",
3
+ "version": "8.0.0",
4
4
  "description": "Core NAPI bindings for opencode-cloud (internal package)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -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