← Commit history

Dashboard 1.0.124: Send to AI uses Hydrogen's AI picker (no type, app:adom/kicad-bridge tag, cancelled reported honestly); agent_permissions declared

John Lauer ·1c1fd27fc7 ·1mo ago ·parent 7edfabc
2 files changed +18−4
dashboard/kicad_dashboard.py+15−2
@@ -263,8 +263,11 @@ def say_send(phrase):     except Exception:         pass   # cannot read the updater: fall through rather than block a healthy shell +    # Wiki #77 (Hydrogen 1.0.213 AI picker): NO `type` here, so the human picks+    # the AI (Claude, Codex, Kimi) in the shell's picker; the app: tag keys the+    # "remember for this app" checkbox. dock: stays for the dock's own bookkeeping.     body = {"new": True, "prompt": phrase, "submit": True,-            "name": "KiCad - say it", "tags": ["dock:kicad-bridge"]}+            "name": "KiCad - say it", "tags": ["dock:kicad-bridge", "app:adom/kicad-bridge"]}     req = urllib.request.Request(base + "/ai-threads/run-prompt",                                  data=json.dumps(body).encode("utf-8"), method="POST",                                  headers={"Content-Type": "application/json"})@@ -1411,7 +1414,17 @@ class Handler(BaseHTTPRequestHandler):             log(f"viewport {LAST_VIEWPORT.get('innerWidth')}px cols={LAST_VIEWPORT.get('panelCols')}")             return self._json({"ok": True})         if path.endswith("/ai-threads/run-prompt"):-            return _proxy_control(self, "/ai-threads/run-prompt", body=body or {}, timeout=125)+            # Wiki #77: the shared newbie-panel module posts here. Strip any `type`+            # (absent = ask the user via Hydrogen's AI picker) and carry the app:+            # tag so a remembered pick applies to KiCad. The response goes back+            # verbatim: cancelled:true, delivered:false and the picker's 45 s+            # block are the module's to render.+            b = dict(body or {}); b.pop("type", None)+            tags = list(b.get("tags") or [])+            if "app:adom/kicad-bridge" not in tags:+                tags.append("app:adom/kicad-bridge")+            b["tags"] = tags+            return _proxy_control(self, "/ai-threads/run-prompt", body=b, timeout=125)         if path.endswith("/api/say-send"):             phrase = str((body or {}).get("phrase") or "").strip()             if not phrase:
package.json+3−2
@@ -1,6 +1,6 @@ {   "slug": "kicad-bridge",-  "version": "1.0.123",+  "version": "1.0.124",   "type": "app",   "description": "Skills for your container so your AI knows how to drive the KiCad bridge. The bridge runtime itself is the release zip; Adom Bridge loads that.",   "tags": [@@ -111,7 +111,8 @@       "adom-desktop-kicad-bridge make_part_project and place_footprint edit or create designs; demo, send_key and click drive KiCad's windows and inject input."     ],     "environment": [-      "adom-desktop-kicad-bridge is the KiCad Bridge: every kicad verb is routed through Adom Bridge to the user's Windows desktop, where ab's own human-approval gate (caller identity, per-call reason, Activity Log) applies; the container approval is the first of two gates."+      "adom-desktop-kicad-bridge is the KiCad Bridge; every kicad verb also passes Adom Bridge's human-approval gate on the user's desktop (caller identity, per-call reason, Activity Log).",+      "adom-desktop-kicad-bridge container approval is the first of two gates; the desktop gate is the second."     ]   } }\ No newline at end of file