@ai-development-environment/control-agent 0.0.131 → 0.0.132

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.
@@ -11146,7 +11146,7 @@ function tailscaleServeRemovePayload(value) {
11146
11146
  // package.json
11147
11147
  var package_default = {
11148
11148
  name: "@ai-development-environment/control-agent",
11149
- version: "0.0.131",
11149
+ version: "0.0.132",
11150
11150
  description: "Control agent for the AI Development Environment",
11151
11151
  license: "MIT",
11152
11152
  repository: {
@@ -45729,19 +45729,50 @@ function physicalDestinations(value, includeUnavailable = false) {
45729
45729
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return [];
45730
45730
  const id2 = nestedString(raw, [
45731
45731
  ["identifier"],
45732
+ ["properties", "hardware", "udid"],
45732
45733
  ["hardwareProperties", "udid"],
45733
45734
  ["deviceProperties", "identifier"]
45734
45735
  ]);
45735
45736
  const platform2 = nestedString(raw, [
45737
+ ["properties", "hardware", "platform"],
45736
45738
  ["hardwareProperties", "platform"],
45737
45739
  ["deviceProperties", "osType"]
45738
45740
  ]);
45739
- if (!id2 || platform2 && !platform2.toLowerCase().includes("ios")) return [];
45740
- const state = nestedString(raw, [
45741
+ if (!id2 || platform2 && !["ios", "ipados"].includes(platform2.trim().toLowerCase()))
45742
+ return [];
45743
+ const reality = nestedString(raw, [
45744
+ ["properties", "hardware", "reality"],
45745
+ ["hardwareProperties", "reality"]
45746
+ ])?.trim().toLowerCase();
45747
+ const transport = nestedString(raw, [
45748
+ ["properties", "connection", "transportType"],
45749
+ ["connectionProperties", "transportType"]
45750
+ ])?.trim().toLowerCase();
45751
+ const visibility = nestedString(raw, [
45752
+ ["visibilityClass"],
45753
+ ["properties", "state", "visibilityClass"]
45754
+ ])?.trim().toLowerCase();
45755
+ if (reality === "simulated" || !reality && (visibility === "simulators" || transport === "samemachine"))
45756
+ return [];
45757
+ const connectionState = nestedString(raw, [
45758
+ ["properties", "connection", "state"],
45741
45759
  ["connectionProperties", "tunnelState"],
45742
45760
  ["deviceProperties", "connectionState"]
45743
- ]);
45744
- const available = !(state && /(disconnected|unavailable|not.?connected|offline)/i.test(state));
45761
+ ])?.trim().toLowerCase();
45762
+ const paired = nestedString(raw, [
45763
+ ["properties", "connection", "pairingState"],
45764
+ ["connectionProperties", "pairingState"]
45765
+ ])?.trim().toLowerCase() === "paired";
45766
+ const connected = connectionState === "connected";
45767
+ const available = connected || paired && (transport === "wired" || transport === "localnetwork");
45768
+ const state = connected ? "Connected" : available ? "Available (paired)" : connectionState && [
45769
+ "disconnected",
45770
+ "unavailable",
45771
+ "offline",
45772
+ "notconnected",
45773
+ "not_connected",
45774
+ "not connected"
45775
+ ].includes(connectionState) ? "Unavailable" : "Unknown";
45745
45776
  if (!available && !includeUnavailable) {
45746
45777
  return [];
45747
45778
  }
@@ -45749,9 +45780,15 @@ function physicalDestinations(value, includeUnavailable = false) {
45749
45780
  {
45750
45781
  type: "PHYSICAL_DEVICE",
45751
45782
  id: id2,
45752
- name: nestedString(raw, [["deviceProperties", "name"], ["name"]]) ?? id2,
45783
+ name: nestedString(raw, [
45784
+ ["properties", "state", "name"],
45785
+ ["deviceProperties", "name"],
45786
+ ["name"]
45787
+ ]) ?? id2,
45753
45788
  platform: "iOS",
45754
45789
  osVersion: nestedString(raw, [
45790
+ ["properties", "software", "osVersionNumber", "stringValue"],
45791
+ ["properties", "software", "osVersionNumber"],
45755
45792
  ["deviceProperties", "osVersionNumber"],
45756
45793
  ["deviceProperties", "osVersion"]
45757
45794
  ]),
@@ -45801,7 +45838,7 @@ var inspectBuildDestinations = async (payload, timeoutMs, signal2) => {
45801
45838
  signal2,
45802
45839
  folder
45803
45840
  ),
45804
- listPhysicalDevices(timeoutMs, signal2)
45841
+ listPhysicalDevices(timeoutMs, signal2, true)
45805
45842
  ]);
45806
45843
  return {
45807
45844
  ...successfulProcess3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-development-environment/control-agent",
3
- "version": "0.0.131",
3
+ "version": "0.0.132",
4
4
  "description": "Control agent for the AI Development Environment",
5
5
  "license": "MIT",
6
6
  "repository": {