conductor-remote 1.64.0 → 1.65.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/dist/index.html CHANGED
@@ -13,8 +13,8 @@
13
13
  <title>Conductor Remote</title>
14
14
  <!-- Runs before the module bundle so it can catch a stale shell that fails to boot. -->
15
15
  <script src="/self-heal.js"></script>
16
- <script type="module" crossorigin src="/assets/index-C8s68scA.js"></script>
17
- <link rel="stylesheet" crossorigin href="/assets/index-BhxPTIyU.css">
16
+ <script type="module" crossorigin src="/assets/index-CtlVLl-2.js"></script>
17
+ <link rel="stylesheet" crossorigin href="/assets/index-87r9u-0C.css">
18
18
  <link rel="manifest" href="/manifest.webmanifest"></head>
19
19
  <body>
20
20
  <div id="root"></div>
package/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const c=e=>i(e,o),t={module:{uri:o},exports:l,require:c};s[o]=Promise.all(n.map(e=>t[e]||c(e))).then(e=>(r(...e),l))}}define(["./workbox-9c191d2f"],function(e){"use strict";importScripts("/push-sw.js"),self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"self-heal.js",revision:"49bd63adb25a09341f8d2610e8bd3c76"},{url:"push-sw.js",revision:"e1e682e2e5e88fa03b7808ae9db8e098"},{url:"index.html",revision:"0cc53b4390ac109ed647b9f747869331"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/index-C8s68scA.js",revision:null},{url:"assets/index-BhxPTIyU.css",revision:null},{url:"apple-touch-icon.png",revision:"2b9301416b880d45d4bb655f2600d1f2"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]}))});
1
+ if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const t=e=>i(e,o),c={module:{uri:o},exports:l,require:t};s[o]=Promise.all(n.map(e=>c[e]||t(e))).then(e=>(r(...e),l))}}define(["./workbox-9c191d2f"],function(e){"use strict";importScripts("/push-sw.js"),self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"self-heal.js",revision:"49bd63adb25a09341f8d2610e8bd3c76"},{url:"push-sw.js",revision:"e1e682e2e5e88fa03b7808ae9db8e098"},{url:"index.html",revision:"caee395fa7cb2e359d60eee9e6309178"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/index-CtlVLl-2.js",revision:null},{url:"assets/index-87r9u-0C.css",revision:null},{url:"apple-touch-icon.png",revision:"2b9301416b880d45d4bb655f2600d1f2"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]}))});
@@ -807,6 +807,106 @@ on selectChatTab()
807
807
  end tell
808
808
  end selectChatTab
809
809
 
810
+ -- The workspace toolbar's run process. This is deliberately separate from the
811
+ -- chat-strip targeting above: the terminal strip is the sibling AXTabGroup whose
812
+ -- direct radio buttons include Setup / Run / Terminal, and its task button is
813
+ -- named "Run <task>" or "Stop <task>". Conductor may add more terminal tabs, so
814
+ -- identify the strip by the Run radio rather than by its position.
815
+ on runStrip()
816
+ set matches to {}
817
+ repeat with entry in my tabGroups()
818
+ set tg to contents of entry
819
+ set hasRunTab to false
820
+ repeat with r in my stripRadios(tg)
821
+ if (my axName(contents of r)) is "Run" then set hasRunTab to true
822
+ end repeat
823
+ if hasRunTab then set end of matches to tg
824
+ end repeat
825
+ if (count of matches) is 0 then error "couldn't find Conductor's Run panel"
826
+ if (count of matches) > 1 then error "can't tell which panel holds Conductor's Run task"
827
+ return item 1 of matches
828
+ end runStrip
829
+
830
+ on runTaskButton(tg)
831
+ set matches to {}
832
+ tell application "System Events" to tell process "Conductor"
833
+ repeat with entry in (UI elements of tg whose role is "AXButton")
834
+ set node to contents of entry
835
+ set label to my axName(node)
836
+ if label starts with "Run " or label starts with "Stop " then set end of matches to node
837
+ end repeat
838
+ end tell
839
+ if (count of matches) is 0 then error "this workspace has no selected Run task"
840
+ if (count of matches) > 1 then error "Conductor exposed more than one selected Run task"
841
+ return item 1 of matches
842
+ end runTaskButton
843
+
844
+ on runTaskState(btn)
845
+ set label to my axName(btn)
846
+ if label starts with "Stop " then return "running"
847
+ if label starts with "Run " then return "stopped"
848
+ error "couldn't read Conductor's Run task state"
849
+ end runTaskState
850
+
851
+ on runTaskName(btn)
852
+ set label to my axName(btn)
853
+ if label starts with "Stop " then return text 6 thru -1 of label
854
+ if label starts with "Run " then return text 5 thru -1 of label
855
+ return label
856
+ end runTaskName
857
+
858
+ on openRunPorts(tg)
859
+ set found to {}
860
+ tell application "System Events" to tell process "Conductor"
861
+ repeat with entry in (UI elements of tg whose role is "AXButton")
862
+ set label to my axName(contents of entry)
863
+ if label starts with "Open :" then set end of found to text 7 thru -1 of label
864
+ end repeat
865
+ end tell
866
+ return found
867
+ end openRunPorts
868
+
869
+ on setRunTask(wantRunning)
870
+ my activateConductor()
871
+ my focusWorkspace()
872
+ set tg to my runStrip()
873
+ my assertWorkspace(tg)
874
+ set btn to my runTaskButton(tg)
875
+ set beforeState to my runTaskState(btn)
876
+ set taskName to my runTaskName(btn)
877
+ set wantedState to "stopped"
878
+ if wantRunning then set wantedState to "running"
879
+ set changed to "false"
880
+
881
+ if beforeState is not wantedState then
882
+ tell application "System Events" to tell process "Conductor"
883
+ perform action "AXPress" of btn
884
+ end tell
885
+ set changed to "true"
886
+ end if
887
+
888
+ -- The panel re-renders after the press, invalidating every old AX handle.
889
+ -- Re-find it on each poll and require the opposite label before reporting the
890
+ -- action as complete. A started web server gets a short second window in which
891
+ -- Conductor can surface its "Open :<port>" button; non-server tasks simply
892
+ -- return with an empty port list.
893
+ set currentState to beforeState
894
+ set ports to {}
895
+ repeat with attempt from 1 to 44
896
+ set tg to my runStrip()
897
+ set btn to my runTaskButton(tg)
898
+ set currentState to my runTaskState(btn)
899
+ set taskName to my runTaskName(btn)
900
+ if currentState is wantedState then
901
+ set ports to my openRunPorts(tg)
902
+ if not wantRunning or (count of ports) > 0 or attempt > 20 then exit repeat
903
+ end if
904
+ delay 0.25
905
+ end repeat
906
+ if currentState is not wantedState then error "Conductor's Run task did not switch to " & wantedState
907
+ return currentState & tab & taskName & tab & changed & tab & my joinList(ports, ",")
908
+ end setRunTask
909
+
810
910
  on cancelAgent()
811
911
  -- Stop the answer this chat is streaming: Conductor's own "Cancel agent"
812
912
  -- command, Command-Shift-Delete (key code 51). Taken from its Keyboard