app
SOLIDWORKS Bridge
Public Made by Adomby adom
Launch, model and quit SOLIDWORKS from any Adom container. Nothing is ever lost.
← Commit history
0.9.24 source
9 files changed
+42−9
BRIDGE_VERSION+1−1@@ -1 +1 @@-0.9.23+0.9.24
Cargo.lock+1−1@@ -122,7 +122,7 @@ dependencies = [ [[package]] name = "swx-bridge"-version = "0.9.23"+version = "0.9.24" dependencies = [ "miniz_oxide", "serde",
Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "swx-bridge"-version = "0.9.23"+version = "0.9.24" edition = "2021" rust-version = "1.80" description = "Adom SOLIDWORKS bridge — swx_* verbs over the SOLIDWORKS COM API, as a single native binary"
README.md+6−1@@ -492,7 +492,12 @@ not. ## Roadmap -- v0.9.23 (this): **a third sign-in host, found by content.** After a week+- v0.9.24 (this): **the vault answers.** Measured on the live sign-in window:+ pup verbs reply `error:""` (an empty string) on success, and the bridge read+ any non-null `error` as a failure, so `swx_sign_in` reported the vault+ unavailable with an empty message. An error is now a non-empty string, or+ `success:false` / `ok:false`. One line; no other behaviour changed.+- v0.9.23: **a third sign-in host, found by content.** After a week away (2026-10-12) the platform updater `SWXDesktopUpdate.exe` showed the 3DEXPERIENCE ID login in a window titled just "3DEXPERIENCE". The bridge saw nothing: `swx_start {app:"visualize"}` said "launching" and `swx_status` said
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "solidworks", "displayName": "SOLIDWORKS",- "version": "0.9.23",+ "version": "0.9.24", "description": "Bridge for SOLIDWORKS desktop CAD — create and open documents, a modeling DSL, file management (find/open/save/export/Pack and Go), custom properties, BOM generation, design analysis (mass properties, bodies, parameters, interference, rebuild health) and background window/dialog etiquette, over the SOLIDWORKS COM API. Single native binary: no interpreter, no PowerShell, ~10ms cold start.", "author": "Adom Inc.", "license": "MIT",
install.shpackage.json+1−1@@ -1,6 +1,6 @@ { "slug": "solidworks-bridge",- "version": "0.9.23",+ "version": "0.9.24", "type": "app", "description": "Skills for your container so your AI knows how to drive the SOLIDWORKS bridge (swx_* verbs). The bridge runtime itself is the release zip — a single native swx-bridge.exe; Adom Bridge loads that.", "tags": [
src/signin.rs+31−3@@ -124,13 +124,24 @@ fn unwrap_ab(v: &Value) -> Value { cur } +/// MEASURED 2026-10-12: pup verbs (`pup_credentials`, `pup_credential_reveal`)+/// answer `{"ok":true,"status":"ok","error":"", …}` — an EMPTY `error` string on+/// success. Treating any non-null `error` as a failure made the vault look+/// unavailable with an empty message (0.9.23). An error is a non-empty string,+/// or `success:false` / `ok:false`. fn ab_ok(v: &Value) -> bool {- v.get("success").and_then(|s| s.as_bool()) != Some(false)- && v.get("error").map(|e| e.is_null()).unwrap_or(true)+ let flagged_false = |k: &str| v.get(k).and_then(|s| s.as_bool()) == Some(false);+ let error_text = v.get("error").and_then(|e| e.as_str()).map(|t| !t.trim().is_empty()).unwrap_or(false);+ let error_object = v.get("error").map(|e| !e.is_null() && !e.is_string()).unwrap_or(false);+ !flagged_false("success") && !flagged_false("ok") && !error_text && !error_object } fn ab_error(v: &Value) -> String {- v.get("error").and_then(|e| e.as_str()).unwrap_or("ab reported a failure").to_string()+ match v.get("error") {+ Some(Value::String(t)) if !t.trim().is_empty() => t.clone(),+ Some(Value::Null) | None | Some(Value::String(_)) => "ab reported a failure".to_string(),+ Some(other) => other.to_string(),+ } } // ── the inventory ───────────────────────────────────────────────────────────@@ -1871,6 +1882,23 @@ fn fill_failure(fe: FillErr, banner: bool, pages: &[Value], steps: &[Value], vau ) } +#[cfg(test)]+mod ab_envelope_tests {+ use super::*;+ #[test]+ fn an_empty_error_string_is_success_measured_pup_envelope() {+ let r = json!({"ok": true, "status": "ok", "error": "", "credentials": [{"host": "iam.3ds.com", "username": "u"}]});+ assert!(ab_ok(&r), "pup_credentials answers error:\"\" on success (measured 2026-10-12)");+ assert!(ab_ok(&json!({"success": true})));+ assert!(!ab_ok(&json!({"success": false})));+ assert!(!ab_ok(&json!({"ok": false, "error": ""})));+ assert!(!ab_ok(&json!({"error": "relay_forbidden"})));+ assert!(!ab_ok(&json!({"error": {"code": 7}})));+ assert_eq!(ab_error(&json!({"error": ""})), "ab reported a failure");+ assert_eq!(ab_error(&json!({"error": "nope"})), "nope");+ }+}+ #[cfg(test)] mod tests { use super::*;
uninstall.sh