app
Fusion - the Fusion 360 Bridge
Public Made by Adomby adom
Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.
← Commit history
Update 162 file(s)
13 files changed
+75−41
BRIDGE_VERSION+1−1@@ -1 +1 @@-1.10.14+1.10.15
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "fusion360", "displayName": "Autodesk Fusion 360",- "version": "1.10.14",+ "version": "1.10.15", "description": "Drive Autodesk Fusion 360 from the cloud: launch Fusion, electronics board layout, design rules, exports (STEP/IGES/STL/3MF/USDZ/OBJ/DXF/DWG/Gerbers/BOM/CPL), fast APS server-indexed cloud search plus browse/recent/file-info/versions, cloud file download/upload and folder creation, and in-app parametric modeling (fusion_run_modeling_script). Never-charge: APS calls are capped to the free tier.", "homepage": "https://wiki.adom.inc/adom/fusion-bridge", "author": "Adom Inc.",
dashboard/Cargo.lock+1−1@@ -4,7 +4,7 @@ version = 4 [[package]] name = "fusion-dashboard"-version = "1.10.14"+version = "1.10.15" dependencies = [ "serde_json", ]
dashboard/Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "fusion-dashboard"-version = "1.10.14"+version = "1.10.15" edition = "2021" [dependencies]
install.sh+1−1@@ -21,7 +21,7 @@ echo "Installed fusion-bridge skills: $(ls "$PKG_DIR/skills" 2>/dev/null | tr '\ # binary (the three-artifact pattern: bridge zip -> ab, THIS pkg -> container skills + # this download, page media -> wiki). Per the wiki's PKG_VS_RELEASE policy, binaries are # platform-tagged RELEASE assets, never tarball content - the installer fetches them.-DASH_VERSION="1.10.14"+DASH_VERSION="1.10.15" DASH_URL="https://wiki.adom.inc/download/adom/fusion-bridge/${DASH_VERSION}/fusion-dashboard" DEST="" if [ -w /usr/local/bin ]; then DEST=/usr/local/bin
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "fusion-bridge",- "version": "1.10.14",+ "version": "1.10.15", "type": "app", "description": "This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.", "dependencies": {
page.json+11−27@@ -1,6 +1,6 @@ { "slug": "fusion-bridge",- "version": "1.10.14",+ "version": "1.10.15", "type": "app", "description": "This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.", "dependencies": {@@ -11,6 +11,10 @@ "uninstall": "./uninstall.sh" }, "tags": [+ "ab",+ "bridge",+ "fusion",+ "desktop-app", "fusion360", "autodesk", "cad",@@ -75,7 +79,10 @@ "build a basic parts library", "add a 3d model to a component", "make a fusion 360 library with 3d",- "set up the fusion bridge"+ "set up the fusion bridge",+ "fusion dashboard",+ "fusion status page",+ "open the fusion launch page" ], "discovery_pitch": "Use the Adom Bridge Fusion 360 bridge when the user wants to DRIVE Autodesk Fusion 360 from the cloud: open/search their team's Fusion cloud designs, lay out a PCB or do electronics, export STEP/IGES/STL/Gerbers/BOM, or build a component library with real rendering 3D. It runs Fusion on the user's own machine via Adom Bridge. NOT for web/browser/login/form-filling (that's the native-browser extension) and NOT for KiCad (that's the kicad bridge).", "brief": "Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.",@@ -104,28 +111,5 @@ "label": "Part volume", "prompt": "How much material does each printed part in this assembly use?" }- ],- "agent_permissions": {- "allow_bash": [],- "allow": [- "adom-desktop-fusion-bridge read-only verbs (via the adom-bridge CLI): fusion_readiness, fusion_get_app_state, fusion_addin_status, fusion_check_dialogs - state queries; they change nothing.",- "adom-desktop-fusion-bridge read-only verbs: fusion_alerts (reads Fusion's own log for toasts), fusion_document_info, fusion_window_info, fusion_board_info, fusion_library_parts - inspect only.",- "adom-desktop-fusion-bridge read-only verbs: fusion_prove_result (a persisted run report), fusion_plan_library_import (report-only preflight), fusion_list_cloud_projects, fusion_describe.",- "adom-desktop-fusion-bridge evidence captures fusion_screenshot_fusion and fusion_capture_library_views read pixels and write local image files only."- ],- "soft_deny": [- "adom-desktop-fusion-bridge lifecycle verbs fusion_stop, fusion_kill, fusion_restart_for_addin close or kill the Fusion application - keep the human prompt.",- "adom-desktop-fusion-bridge fusion_install_fusion silently installs Autodesk Fusion on the user's machine.",- "adom-desktop-fusion-bridge fusion_cleanup_cloud_files deletes files from the user's Autodesk cloud hub.",- "adom-desktop-fusion-bridge managed-library verbs (fusion_managed_library_push/pull/create/link/unlink) publish to or overwrite the user's library.io libraries."- ],- "environment": [- "adom-desktop-fusion-bridge is the Fusion 360 bridge for Adom Bridge; its fusion_* verbs are invoked through the adom-bridge CLI and drive Autodesk Fusion on the user's own desktop.",- "adom-desktop-fusion-bridge desktop actions also pass Adom Bridge's own human-approval gate (caller identity, per-call reason, Activity Log) - a container approval is the first of two gates."- ]- },- "author": {- "name": "John Lauer",- "email": "[email protected]"- }-}+ ]+}
rust/Cargo.toml+1−1@@ -4,7 +4,7 @@ members = ["core", "lbr", "os-win", "os-mac", "bridge"] # One version for the whole bridge, in lockstep with BRIDGE_VERSION (tools/release.sh bumps both). [workspace.package]-version = "1.10.14"+version = "1.10.15" edition = "2021" license = "MIT"
rust/bridge/src/main.rs+57−7@@ -770,6 +770,14 @@ fn native_aps_browse(args: &Value) -> Value { } /// `fusion_aps_search`: the server-indexed name search across the hub, newest first.+/// The parent folder id of an item (Data API item record, never the index).+fn parent_folder_of(store: &fusion_core::aps::ApsStore, project_id: &str, item_id: &str) -> Option<String> {+ use fusion_core::aps::{aps_get, urlencode};+ let (s, b) = aps_get(store, &format!("/data/v1/projects/{}/items/{}", urlencode(project_id), urlencode(item_id)), &[]).ok()?;+ if s != 200 { return None; }+ b["data"]["relationships"]["parent"]["data"]["id"].as_str().map(str::to_string)+}+ /// Non-index name search: list folder CONTENTS (Data API, never the search index) under the /// scanned top folders, breadth first to `max_depth`, at most `max_folders` listings, 12 in /// parallel. Returns items whose display name contains every token (issue #85).@@ -831,6 +839,19 @@ pub(crate) fn native_aps_search(args: &Value) -> Value { let mut scanned = (0, 0, 0); let tasks = scan_tasks(&store, &hubs, args["hubId"].as_str(), args["projectId"].as_str(), &mut scanned); let tasks_snapshot: Vec<(String, String, String)> = tasks.iter().map(|t| (t.project_id.clone(), t.project_name.clone(), t.folder_id.clone())).collect();+ // Speculative sibling search, in parallel with the real one: the index scan costs ~30 s on a+ // 16-project hub, so the first shortened query ("Pincer Moving" for "Pincer Moving Large")+ // runs at the same time and is only read if the full query comes back empty (issue #85).+ let spec_toks: Vec<String> = query.to_lowercase().split_whitespace().map(str::to_string).collect();+ let speculative = if spec_toks.len() >= 2 {+ let partial = spec_toks[..spec_toks.len() - 1].join(" ");+ let (dir, hubs2, hub_f, proj_f) = (store.dir.clone(), hubs.clone(), args["hubId"].as_str().map(str::to_string), args["projectId"].as_str().map(str::to_string));+ Some(std::thread::spawn(move || {+ let store2 = ApsStore { dir };+ let t2 = scan_tasks(&store2, &hubs2, hub_f.as_deref(), proj_f.as_deref(), &mut (0, 0, 0));+ scan_parallel(&store2, t2, &partial, 10, false)+ }))+ } else { None }; let mut results = scan_parallel(&store, tasks, &query, limit, true); results.sort_by(|a, b| b["lastModified"].as_str().unwrap_or("").cmp(a["lastModified"].as_str().unwrap_or(""))); let n = results.len();@@ -841,20 +862,49 @@ pub(crate) fn native_aps_search(args: &Value) -> Value { // the recently modified items the bridge can list without a full walk. let ql = query.to_lowercase(); let toks: Vec<&str> = ql.split_whitespace().collect();- // The index fallback (recent items) is index-backed too, so it misses the same file; the- // Data API folder CONTENTS listing is not. Walk the scanned top folders two levels deep,- // bounded, and match names directly.- let fb: Vec<Value> = contents_name_scan(&store, &tasks_snapshot, &toks, 2, 80).as_array().cloned().unwrap_or_default();+ // Fallback 1 (the issue's own suggestion, automated): find a RELATED file the index does+ // know by dropping query tokens from the end ("Pincer Moving Large" -> "Pincer Moving" ->+ // "Pincer"), take the distinct parent folders of those hits, and list each folder's+ // CONTENTS through the Data API (not the index), matching the full name directly.+ let mut fb: Vec<Value> = Vec::new();+ let mut related_folders: Vec<(String, String, String)> = Vec::new(); // (projectId, projectName, folderId)+ let mut k = toks.len();+ let mut spec_hits: Option<Vec<Value>> = speculative.and_then(|h| h.join().ok());+ while k > 0 && related_folders.is_empty() {+ k -= 1;+ if k == 0 { break; }+ let hits = match spec_hits.take() {+ Some(h) if k == toks.len() - 1 => h,+ _ => { let partial = toks[..k].join(" "); let tasks2 = scan_tasks(&store, &hubs, args["hubId"].as_str(), args["projectId"].as_str(), &mut (0, 0, 0)); scan_parallel(&store, tasks2, &partial, 10, false) }+ };+ for h in hits.iter().take(12) {+ let (pid, pname, id) = (h["projectId"].as_str().unwrap_or("").to_string(), h["projectName"].as_str().unwrap_or("").to_string(), h["id"].as_str().unwrap_or("").to_string());+ if let Some(folder) = parent_folder_of(&store, &pid, &id) {+ if !related_folders.iter().any(|(_, _, f)| *f == folder) { related_folders.push((pid, pname, folder)); }+ }+ if related_folders.len() >= 6 { break; }+ }+ }+ if !related_folders.is_empty() {+ fb = contents_name_scan(&store, &related_folders, &toks, 1, 12).as_array().cloned().unwrap_or_default();+ }+ // Fallback 2, only when scoped to one project (bounded, still no index): walk that+ // project's folders two levels deep.+ if fb.is_empty() && args["projectId"].as_str().is_some() {+ fb = contents_name_scan(&store, &tasks_snapshot, &toks, 2, 60).as_array().cloned().unwrap_or_default();+ }+ let related_note = if related_folders.is_empty() { String::new() } else { format!(" Related files the index does know sit in {} folder(s), listed directly through the Data API.", related_folders.len()) }; let nf = fb.len(); let folder_hint = fb.first().and_then(|f| f["folderId"].as_str()).map(|f| format!(" The first fallback hit lives in folder {f}; fusion_aps_browse {{folderId}} lists that folder in full.")).unwrap_or_default(); return json!({"success": true, "output": format!("0 index match(es) for '{query}'; {nf} by name in recent items"), "data": {"query": query, "count": 0, "results": [], "scanned": {"hubs": scanned.0, "projects": scanned.1, "folders": scanned.2},- "fallback": {"source": "Data API folder contents (not the index): the scanned top folders walked two levels deep, at most 80 folder listings, names matched directly", "count": nf, "results": fb},+ "fallback": {"source": "Data API folder contents (not the index) of the parent folders of related index hits (query shortened from the end), plus a two-level walk when projectId scopes the search; names matched directly", "relatedFolders": related_folders.iter().map(|(p, pn, f)| json!({"projectId": p, "projectName": pn, "folderId": f})).collect::<Vec<_>>(), "count": nf, "results": fb}, "completeness": "The APS server index can lag a new or renamed file by minutes to hours and tokenises names, so a zero here does not prove absence."}, "shell": "rust",- "_hint": format!("No index match for '{query}'.{} {}Next: fusion_aps_browse a known sibling's folder (scoped, no cloud walk), or pass projectId to narrow the scan. Do not conclude the file is missing from an index zero alone.",- if nf > 0 { format!(" {nf} item(s) match by name in the folder contents walk (data.fallback, with folderId and lineage); open one with fusion_open_by_urn.") } else { " A bounded folder-contents walk (two levels under each top folder) found nothing by name either; a deeper folder needs fusion_aps_browse {folderId}.".to_string() }, folder_hint)});+ "_hint": format!("No index match for '{query}'.{}{} {}Next: fusion_aps_browse {{projectId, folderId}} on a known sibling's folder (scoped, no cloud walk), or pass projectId to add a bounded two-level walk. Do not conclude the file is missing from an index zero alone.",+ related_note, if nf > 0 { format!(" {nf} item(s) match by name in those folders (data.fallback, with projectId, folderId and lineage); open one with fusion_open_by_urn.") } else { " Nothing there matches the full name either.".to_string() }, folder_hint)}); }+ drop(speculative); json!({"success": true, "output": format!("{n} match(es) for '{query}'"), "data": {"query": query, "count": n, "results": shown, "scanned": {"hubs": scanned.0, "projects": scanned.1, "folders": scanned.2}}, "shell": "rust", "_hint": format!("Found {n} match(es) via the APS server index across {} project(s), newest first. Pass projectId to scope to one project (faster). Use fusion_aps_open to open a hit in Fusion.", scanned.1)})
tools/check-naming.shtools/check-portable.shtools/promote.shtools/release.sh