@7365admin1/core 3.121.0 → 3.122.1

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.js CHANGED
@@ -82,6 +82,7 @@ __export(src_exports, {
82
82
  DEFAULT_SITE_TIMEZONE: () => DEFAULT_SITE_TIMEZONE,
83
83
  DEMO_ADD_MAX: () => DEMO_ADD_MAX,
84
84
  DEMO_BRAND: () => DEMO_BRAND,
85
+ DEMO_BRAND_DEFINITION: () => DEMO_BRAND_DEFINITION,
85
86
  DEMO_CAPABILITIES: () => DEMO_CAPABILITIES,
86
87
  DEMO_FAULT_ROBOT: () => DEMO_FAULT_ROBOT,
87
88
  DEMO_ROUTES: () => DEMO_ROUTES,
@@ -247,20 +248,27 @@ __export(src_exports, {
247
248
  ORG_OWNER_REPAIR_DEFAULT: () => ORG_OWNER_REPAIR_DEFAULT,
248
249
  ORG_OWNER_REPAIR_OFF_REASON: () => ORG_OWNER_REPAIR_OFF_REASON,
249
250
  OUNITECH_BRAND: () => OUNITECH_BRAND,
251
+ OUNITECH_BRAND_DEFINITION: () => OUNITECH_BRAND_DEFINITION,
250
252
  OUNITECH_CAPABILITIES: () => OUNITECH_CAPABILITIES,
251
253
  OUNITECH_PENDING_COMMANDS: () => OUNITECH_PENDING_COMMANDS,
254
+ OUNITECH_REGION_BASE_URLS: () => OUNITECH_REGION_BASE_URLS,
252
255
  OUNITECH_TIMESTAMP_FORMAT: () => OUNITECH_TIMESTAMP_FORMAT,
256
+ OUNITECH_TIMESTAMP_ZONE: () => OUNITECH_TIMESTAMP_ZONE,
253
257
  OpenRmfError: () => OpenRmfError,
254
258
  OrgNature: () => OrgNature,
255
259
  OvernightParkingRequestSort: () => OvernightParkingRequestSort,
256
260
  OvernightParkingRequestStatus: () => OvernightParkingRequestStatus,
257
261
  PADBOT_ACTION_TEXT: () => PADBOT_ACTION_TEXT,
262
+ PADBOT_ALARMS: () => PADBOT_ALARMS,
258
263
  PADBOT_ALARM_POLL_MS: () => PADBOT_ALARM_POLL_MS,
259
264
  PADBOT_ALARM_TEXT: () => PADBOT_ALARM_TEXT,
260
265
  PADBOT_BRAND: () => PADBOT_BRAND,
266
+ PADBOT_BRAND_DEFINITION: () => PADBOT_BRAND_DEFINITION,
261
267
  PADBOT_CAPABILITIES: () => PADBOT_CAPABILITIES,
262
268
  PADBOT_DISPLAY_NAME: () => PADBOT_DISPLAY_NAME,
263
269
  PADBOT_LIVE_POSE_MS: () => PADBOT_LIVE_POSE_MS,
270
+ PADBOT_MAKER_APP_ONLY: () => PADBOT_MAKER_APP_ONLY,
271
+ PADBOT_MODELS: () => PADBOT_MODELS,
264
272
  PADBOT_MOTION: () => PADBOT_MOTION,
265
273
  PADBOT_MQTT_SYNC_MS: () => PADBOT_MQTT_SYNC_MS,
266
274
  PADBOT_ONLINE_WINDOW_MS: () => PADBOT_ONLINE_WINDOW_MS,
@@ -690,6 +698,7 @@ __export(src_exports, {
690
698
  robotCloudTimestamp: () => robotCloudTimestamp,
691
699
  robotCredentialsKey: () => robotCredentialsKey,
692
700
  robotFaultSweepConfig: () => robotFaultSweepConfig,
701
+ robotManifest: () => robotManifest,
693
702
  robotMode: () => robotMode,
694
703
  robotModeFromList: () => robotModeFromList,
695
704
  robotSchema: () => robotSchema,
@@ -62458,7 +62467,9 @@ var ROBOT_CAPABILITIES = [
62458
62467
  * watchdog. Lit only where the brand offers it AND the server switched it on
62459
62468
  * (`PADBOT_MANUAL_DRIVE=on`); Manager-only (update-robot).
62460
62469
  */
62461
- "manualDrive"
62470
+ "manualDrive",
62471
+ /** A heat camera: alarm and patrol photos carry a thermal picture and temperatures. Reporting only. */
62472
+ "thermalCamera"
62462
62473
  ];
62463
62474
  var TIER_REQUIREMENTS = {
62464
62475
  "full-control": [
@@ -62587,6 +62598,28 @@ function commandSupported(capabilities, kind) {
62587
62598
  return false;
62588
62599
  return supports(capabilities, needed);
62589
62600
  }
62601
+ var modelKey = (v) => typeof v === "string" ? v.toLowerCase().replace(/[^a-z0-9]/g, "") : "";
62602
+ function robotManifest(brand, reportedModel) {
62603
+ const b = robotBrandFor(brand);
62604
+ const reported = typeof reportedModel === "string" ? reportedModel.trim().slice(0, 60) : "";
62605
+ if (!b)
62606
+ return { capabilities: {}, profile: { model: reported, modelKnown: false, alarms: [], makerApp: "", makerAppOnly: [] } };
62607
+ const prefix = modelKey(b.brand);
62608
+ let key = modelKey(reported);
62609
+ if (prefix && key.startsWith(prefix) && key !== prefix)
62610
+ key = key.slice(prefix.length);
62611
+ const m = key ? b.models?.find((x) => x.codes.some((c) => modelKey(c) === key)) : void 0;
62612
+ return {
62613
+ capabilities: { ...b.capabilities, ...m?.capabilities ?? {} },
62614
+ profile: {
62615
+ model: m?.name ?? reported,
62616
+ modelKnown: Boolean(m),
62617
+ alarms: [...m?.alarms ?? b.info?.alarms ?? []],
62618
+ makerApp: m?.makerApp ?? b.info?.makerApp ?? "",
62619
+ makerAppOnly: [...m?.makerAppOnly ?? b.info?.makerAppOnly ?? []]
62620
+ }
62621
+ };
62622
+ }
62590
62623
  var brands = /* @__PURE__ */ new Map();
62591
62624
  function registerRobotBrand(brand) {
62592
62625
  if (!brand?.brand)
@@ -62626,7 +62659,8 @@ function registeredRobotBrands() {
62626
62659
  // brand can do ("Basic control - no battery, floor or spot clean"). The
62627
62660
  // manifest is a property of this build, not of any client.
62628
62661
  types: [...b.types ?? ["cleaning"]],
62629
- capabilities: { ...b.capabilities }
62662
+ capabilities: { ...b.capabilities },
62663
+ models: (b.models ?? []).map((m) => ({ name: m.name, capabilities: robotManifest(b.brand, m.codes[0]).capabilities }))
62630
62664
  }));
62631
62665
  }
62632
62666
  function clearRobotBrands() {
@@ -62655,10 +62689,25 @@ var ROBOT_CLOUD_TIMESTAMP_FORMATS = [
62655
62689
  "unix-ms-number"
62656
62690
  ];
62657
62691
  var OUNITECH_TIMESTAMP_FORMAT = "yyyyMMddHHmmss";
62658
- function robotCloudTimestamp(now = /* @__PURE__ */ new Date(), format2 = OUNITECH_TIMESTAMP_FORMAT) {
62659
- const p = (n, w = 2) => String(n).padStart(w, "0");
62660
- const date = `${p(now.getUTCFullYear(), 4)}-${p(now.getUTCMonth() + 1)}-${p(now.getUTCDate())}`;
62661
- const time = `${p(now.getUTCHours())}:${p(now.getUTCMinutes())}:${p(now.getUTCSeconds())}`;
62692
+ var OUNITECH_TIMESTAMP_ZONE = "Asia/Shanghai";
62693
+ function zonedDateTime(now, zone) {
62694
+ const parts = new Intl.DateTimeFormat("en-GB", {
62695
+ timeZone: zone,
62696
+ year: "numeric",
62697
+ month: "2-digit",
62698
+ day: "2-digit",
62699
+ hour: "2-digit",
62700
+ minute: "2-digit",
62701
+ second: "2-digit",
62702
+ hourCycle: "h23"
62703
+ }).formatToParts(now);
62704
+ const get = (type) => parts.find((p) => p.type === type)?.value ?? "";
62705
+ return {
62706
+ date: `${get("year")}-${get("month")}-${get("day")}`,
62707
+ time: `${get("hour")}:${get("minute")}:${get("second")}`
62708
+ };
62709
+ }
62710
+ function robotCloudTimestamp(now = /* @__PURE__ */ new Date(), format2 = OUNITECH_TIMESTAMP_FORMAT, zone = OUNITECH_TIMESTAMP_ZONE) {
62662
62711
  switch (format2) {
62663
62712
  case "unix-s":
62664
62713
  case "unix-s-number":
@@ -62666,12 +62715,18 @@ function robotCloudTimestamp(now = /* @__PURE__ */ new Date(), format2 = OUNITEC
62666
62715
  case "unix-ms":
62667
62716
  case "unix-ms-number":
62668
62717
  return String(now.getTime());
62669
- case "yyyy-MM-dd HH:mm:ss":
62670
- return `${date} ${time}`;
62671
- case "iso8601":
62718
+ case "iso8601": {
62719
+ const { date, time } = zonedDateTime(now, "UTC");
62672
62720
  return `${date}T${time}Z`;
62673
- case "yyyyMMddHHmmss":
62721
+ }
62722
+ case "yyyy-MM-dd HH:mm:ss": {
62723
+ const { date, time } = zonedDateTime(now, zone);
62724
+ return `${date} ${time}`;
62725
+ }
62726
+ case "yyyyMMddHHmmss": {
62727
+ const { date, time } = zonedDateTime(now, zone);
62674
62728
  return `${date}${time}`.replace(/[-:]/g, "");
62729
+ }
62675
62730
  default:
62676
62731
  throw new Error(`Robot cloud: unknown timestamp format "${format2}".`);
62677
62732
  }
@@ -62686,8 +62741,8 @@ function robotCloudSign(appid, timestamp, path5, secret) {
62686
62741
  }
62687
62742
  return crypto10.createHash("sha1").update(robotCloudSigningString(appid, timestamp, path5, secret)).digest("hex");
62688
62743
  }
62689
- function robotCloudBody(appid, secret, path5, params = {}, now, format2 = OUNITECH_TIMESTAMP_FORMAT) {
62690
- const timestamp = robotCloudTimestamp(now, format2);
62744
+ function robotCloudBody(appid, secret, path5, params = {}, now, format2 = OUNITECH_TIMESTAMP_FORMAT, zone = OUNITECH_TIMESTAMP_ZONE) {
62745
+ const timestamp = robotCloudTimestamp(now, format2, zone);
62691
62746
  return {
62692
62747
  appid,
62693
62748
  timestamp: format2.endsWith("-number") ? Number(timestamp) : timestamp,
@@ -62819,9 +62874,9 @@ function planDayFromJsDay(jsDay) {
62819
62874
  var ROBOT_CLOUD_DOC_CONFIRMATIONS = [
62820
62875
  // ANSWERED 2026-09-26 (Ounitech Part 1): base URL, one appid/secret per
62821
62876
  // company, sign = the formula with url = each endpoint's own path (the doc's
62822
- // examples were a copy-paste), timestamp in UTC+0. Removed from this list.
62877
+ // examples were a copy-paste), timestamp zone proven Asia/Shanghai (UTC+8) in production. Removed from this list.
62823
62878
  // Still open: the accepted clock-skew window.
62824
- "Accepted clock-skew window for `timestamp` (UTC+0 confirmed; the window is not stated).",
62879
+ "Accepted clock-skew window for `timestamp` (zone proven UTC+8 by probe; the window is not stated).",
62825
62880
  // pixelToMetres assumes the image y-origin is top-left.
62826
62881
  "Pixel y-origin: top-left (assumed) or bottom-left.",
62827
62882
  // The doc labels modeFlag "1 vacuum / 2 washing / 3 dry dust mop" on the
@@ -63049,7 +63104,8 @@ function useRobotCloudService(credentials, options = {}) {
63049
63104
  path5,
63050
63105
  params,
63051
63106
  options.now?.(),
63052
- options.timestampFormat
63107
+ options.timestampFormat,
63108
+ options.timestampZone
63053
63109
  );
63054
63110
  const step = robotCloudStepName(path5);
63055
63111
  let data;
@@ -63129,6 +63185,9 @@ function useRobotCloudService(credentials, options = {}) {
63129
63185
  );
63130
63186
  return data.robotList ?? [];
63131
63187
  }
63188
+ async function getRobotListReply() {
63189
+ return post(ROBOT_CLOUD_PATHS.robotList, {}, "robotList");
63190
+ }
63132
63191
  async function getMaps(robotSn) {
63133
63192
  const data = await post(
63134
63193
  ROBOT_CLOUD_PATHS.mapList,
@@ -63201,6 +63260,7 @@ function useRobotCloudService(credentials, options = {}) {
63201
63260
  }
63202
63261
  return {
63203
63262
  getRobots,
63263
+ getRobotListReply,
63204
63264
  getMaps,
63205
63265
  getFileUrls,
63206
63266
  getPlans,
@@ -63332,14 +63392,18 @@ function createOunitechAdapter(credentials, options) {
63332
63392
  }
63333
63393
  };
63334
63394
  }
63395
+ var OUNITECH_BRAND_DEFINITION = {
63396
+ brand: OUNITECH_BRAND,
63397
+ displayName: "Ounitech (Q3-G / Q3-W)",
63398
+ capabilities: OUNITECH_CAPABILITIES,
63399
+ pendingCommands: OUNITECH_PENDING_COMMANDS,
63400
+ // The robot list carries no model, so Q3-G and Q3-W share these defaults
63401
+ // (their API is the same); add `models` when Ounitech reports one.
63402
+ info: { makerApp: "the Ounitech app", makerAppOnly: ["pausing or stopping a job", "cleaning across floors"] },
63403
+ create: (credentials) => createOunitechAdapter(credentials)
63404
+ };
63335
63405
  function registerOunitechBrand() {
63336
- registerRobotBrand({
63337
- brand: OUNITECH_BRAND,
63338
- displayName: "Ounitech (Q3-G / Q3-W)",
63339
- capabilities: OUNITECH_CAPABILITIES,
63340
- pendingCommands: OUNITECH_PENDING_COMMANDS,
63341
- create: (credentials) => createOunitechAdapter(credentials)
63342
- });
63406
+ registerRobotBrand(OUNITECH_BRAND_DEFINITION);
63343
63407
  }
63344
63408
  registerOunitechBrand();
63345
63409
 
@@ -63821,15 +63885,21 @@ function startDemoTracking(adapter, robotSn, onEvent, everyMs = 1200, skip) {
63821
63885
  }
63822
63886
  };
63823
63887
  }
63888
+ var DEMO_BRAND_DEFINITION = {
63889
+ brand: DEMO_BRAND,
63890
+ displayName: "Demo robots (simulated)",
63891
+ capabilities: DEMO_CAPABILITIES,
63892
+ // Serial-derived demo robots are cleaning (DEMO-C-###) AND security (DEMO-S-###).
63893
+ types: ["cleaning", "security"],
63894
+ // A simulated model, so a demo fleet shows a mixed fleet's controls: the
63895
+ // compact CX-1 takes jobs but no point commands. (No SP-1 profile: the
63896
+ // capability badge counts spot clean, so removing it would drop the demo
63897
+ // patrollers from Full to Basic control for a control they never show.)
63898
+ models: [{ name: "Demo CX-1", codes: ["CX-1"], capabilities: { spotClean: false, navigateToPoint: false, relocalize: false } }],
63899
+ create: () => createDemoAdapter()
63900
+ };
63824
63901
  function registerDemoBrand() {
63825
- registerRobotBrand({
63826
- brand: DEMO_BRAND,
63827
- displayName: "Demo robots (simulated)",
63828
- capabilities: DEMO_CAPABILITIES,
63829
- // Serial-derived demo robots are cleaning (DEMO-C-###) AND security (DEMO-S-###).
63830
- types: ["cleaning", "security"],
63831
- create: () => createDemoAdapter()
63832
- });
63902
+ registerRobotBrand(DEMO_BRAND_DEFINITION);
63833
63903
  }
63834
63904
  registerDemoBrand();
63835
63905
 
@@ -65095,11 +65165,44 @@ var PADBOT_CAPABILITIES = {
65095
65165
  // §6.7 / §6.8
65096
65166
  resolveAlerts: true,
65097
65167
  // §6.6
65098
- // §8.1 over MQTT, behind the server's drive watchdog; only with PADBOT_MANUAL_DRIVE=on.
65099
- get manualDrive() {
65100
- return padbotManualDriveEnabled();
65101
- }
65168
+ // Model-specific (see PADBOT_MODELS): the drive limits are the S2's head range,
65169
+ // and a heat camera is the S2's - another PadBot patrol model gets neither.
65170
+ manualDrive: false,
65171
+ thermalCamera: false
65102
65172
  };
65173
+ var PADBOT_ALARMS = [
65174
+ "person",
65175
+ "high temperature",
65176
+ "smoke",
65177
+ "debris",
65178
+ "noise",
65179
+ "water on the floor",
65180
+ "person falling",
65181
+ "door open",
65182
+ "window open",
65183
+ "fire-fighting equipment"
65184
+ ];
65185
+ var PADBOT_MAKER_APP_ONLY = [
65186
+ "patrol schedules",
65187
+ "maps, points and routes",
65188
+ "alarm thresholds and AI recognition",
65189
+ "lights and voice announcements",
65190
+ "recorded video"
65191
+ ];
65192
+ var PADBOT_MODELS = [
65193
+ {
65194
+ name: "PadBot S2",
65195
+ codes: ["S2"],
65196
+ makerAppOnly: [...PADBOT_MAKER_APP_ONLY, "live thermal view"],
65197
+ capabilities: {
65198
+ thermalCamera: true,
65199
+ // §8.1 over MQTT, behind the server's drive watchdog; only with PADBOT_MANUAL_DRIVE=on.
65200
+ get manualDrive() {
65201
+ return padbotManualDriveEnabled();
65202
+ }
65203
+ }
65204
+ }
65205
+ ];
65103
65206
  var PADBOT_PATHS = {
65104
65207
  robots: "/api/v1/robots/list",
65105
65208
  states: "/api/v1/robots/states/list",
@@ -65719,18 +65822,26 @@ function createPadbotAdapter(credentials, options = {}) {
65719
65822
  }
65720
65823
  };
65721
65824
  }
65825
+ var PADBOT_BRAND_DEFINITION = {
65826
+ brand: PADBOT_BRAND,
65827
+ displayName: PADBOT_DISPLAY_NAME,
65828
+ capabilities: PADBOT_CAPABILITIES,
65829
+ types: ["security"],
65830
+ info: { alarms: [...PADBOT_ALARMS], makerApp: "the PadBot app", makerAppOnly: [...PADBOT_MAKER_APP_ONLY] },
65831
+ models: PADBOT_MODELS,
65832
+ create: (credentials) => createPadbotAdapter(credentials)
65833
+ };
65722
65834
  function registerPadbotBrand() {
65723
- registerRobotBrand({
65724
- brand: PADBOT_BRAND,
65725
- displayName: PADBOT_DISPLAY_NAME,
65726
- capabilities: PADBOT_CAPABILITIES,
65727
- types: ["security"],
65728
- create: (credentials) => createPadbotAdapter(credentials)
65729
- });
65835
+ registerRobotBrand(PADBOT_BRAND_DEFINITION);
65730
65836
  }
65731
65837
  registerPadbotBrand();
65732
65838
 
65733
65839
  // src/services/robot-fleet.service.ts
65840
+ var OUNITECH_REGION_BASE_URLS = [
65841
+ "https://app.frankfurt.robotcloud.top",
65842
+ "https://app.singapore.robotcloud.top",
65843
+ "https://app.robotcloud.top"
65844
+ ];
65734
65845
  var TIMESTAMP_OFFSET_CANDIDATES = [
65735
65846
  { offsetMinutes: 120, label: "UTC+2 (Frankfurt summer time)" },
65736
65847
  { offsetMinutes: 60, label: "UTC+1 (Frankfurt winter time)" },
@@ -65817,7 +65928,7 @@ function useRobotFleetService(deps) {
65817
65928
  position: null,
65818
65929
  planPosition: null,
65819
65930
  fault: null,
65820
- capabilities: adapter.capabilities
65931
+ ...robotManifest(brand)
65821
65932
  };
65822
65933
  }
65823
65934
  const fault = found.fault?.code ? found.fault : null;
@@ -65828,6 +65939,7 @@ function useRobotFleetService(deps) {
65828
65939
  }
65829
65940
  }
65830
65941
  const free = found.mode === "IDLE" || found.mode === "CHARGED";
65942
+ const manifest = robotManifest(brand, found.model);
65831
65943
  return {
65832
65944
  id,
65833
65945
  name: robot.name,
@@ -65840,7 +65952,7 @@ function useRobotFleetService(deps) {
65840
65952
  dispatchable: (
65841
65953
  // A faulted robot is not given a job however idle its mode reads. An
65842
65954
  // alarm (smoke seen, door open) is not a machine fault: the patrol goes on.
65843
- found.online && free && (!fault || fault.alarm === true) && commandSupported(adapter.capabilities, "full")
65955
+ found.online && free && (!fault || fault.alarm === true) && commandSupported(manifest.capabilities, "full")
65844
65956
  ),
65845
65957
  batteryPercent: found.batteryPercent ?? null,
65846
65958
  floorNo: found.floorNo ?? null,
@@ -65849,7 +65961,8 @@ function useRobotFleetService(deps) {
65849
65961
  position: found.position ?? null,
65850
65962
  planPosition: found.planPosition ?? null,
65851
65963
  fault,
65852
- capabilities: adapter.capabilities
65964
+ capabilities: manifest.capabilities,
65965
+ profile: manifest.profile
65853
65966
  };
65854
65967
  }
65855
65968
  async function getMaps(robot) {
@@ -65899,6 +66012,9 @@ function useRobotFleetService(deps) {
65899
66012
  return adapter.sendCommand(robotSn, command);
65900
66013
  }
65901
66014
  const state = await getFleetRobot(robot);
66015
+ if (!commandSupported(state.capabilities, command.kind)) {
66016
+ throw new import_node_server_utils163.BadRequestError(`${state.profile.model || adapter.displayName} does not support "${command.kind}" through its API.`);
66017
+ }
65902
66018
  if (command.kind === "pause" || command.kind === "resume" || command.kind === "cancel" || command.kind === "relocalize" || command.kind === "patrol-resume") {
65903
66019
  const need = command.kind === "pause" ? "WORKING" : command.kind === "resume" ? "PAUSED" : null;
65904
66020
  if (!state.online || need && state.mode !== need) {
@@ -66105,6 +66221,43 @@ function useRobotFleetService(deps) {
66105
66221
  lastTimestampProbe.set(key, Date.now());
66106
66222
  return { id, pair };
66107
66223
  }
66224
+ async function probeRegions(robot) {
66225
+ const { id, pair } = probeGate(robot, "region");
66226
+ const hosts = [];
66227
+ for (const baseUrl of deps?.regionBaseUrls ?? OUNITECH_REGION_BASE_URLS) {
66228
+ try {
66229
+ const reply = await useRobotCloudService(pair, { ...deps?.cloudOptions, baseUrl }).getRobotListReply();
66230
+ const replyShape = {};
66231
+ for (const [k, v] of Object.entries(reply)) {
66232
+ replyShape[k] = Array.isArray(v) ? `list of ${v.length}` : v === null ? "null" : typeof v;
66233
+ }
66234
+ const list = Array.isArray(reply.robotList) ? reply.robotList : [];
66235
+ const robots = list.map((r) => ({
66236
+ robotSn: String(r?.robotSn ?? ""),
66237
+ robotName: String(r?.robotName ?? ""),
66238
+ online: r?.onlineFlag === true,
66239
+ statusName: String(r?.statusName ?? "")
66240
+ }));
66241
+ hosts.push({
66242
+ host: cloudHost(baseUrl),
66243
+ ok: true,
66244
+ detail: `Signed in. Lists ${robots.length} robot${robots.length === 1 ? "" : "s"}.`,
66245
+ replyShape,
66246
+ robots
66247
+ });
66248
+ } catch (e) {
66249
+ hosts.push({ host: cloudHost(baseUrl), ok: false, ...describeFailure(e) });
66250
+ }
66251
+ }
66252
+ const withRobots = hosts.filter((h) => h.robots?.length);
66253
+ return {
66254
+ robotId: id,
66255
+ configuredHost: cloudHost(deps?.cloudOptions?.baseUrl ?? ROBOT_CLOUD_BASE_URL),
66256
+ hosts,
66257
+ summary: withRobots.length ? `Robots found on ${withRobots.map((h) => `${h.host} (${h.robots.length})`).join(", ")}.` : hosts.some((h) => h.ok) ? "Signed in, but no region lists a robot for this AppID - Ounitech must bind the robot to this AppID's account." : "No region accepted this AppID.",
66258
+ checkedAt: (/* @__PURE__ */ new Date()).toISOString()
66259
+ };
66260
+ }
66108
66261
  async function probeTimestampOffset(robot) {
66109
66262
  const { id, pair } = probeGate(robot, "offset");
66110
66263
  const baseUrl = deps?.cloudOptions?.baseUrl ?? ROBOT_CLOUD_BASE_URL;
@@ -66118,9 +66271,9 @@ function useRobotFleetService(deps) {
66118
66271
  let accepted = null;
66119
66272
  for (const c of [{ offsetMinutes: 0, label: "UTC (current)" }, ...TIMESTAMP_OFFSET_CANDIDATES]) {
66120
66273
  const now = () => new Date(Date.now() + (skewMs ?? 0) + c.offsetMinutes * 6e4);
66121
- const sent = robotCloudTimestamp(now(), "yyyyMMddHHmmss");
66274
+ const sent = robotCloudTimestamp(now(), "yyyyMMddHHmmss", "UTC");
66122
66275
  try {
66123
- const robots = await useRobotCloudService(pair, { ...deps?.cloudOptions, timestampFormat: "yyyyMMddHHmmss", now, onReply }).getRobots();
66276
+ const robots = await useRobotCloudService(pair, { ...deps?.cloudOptions, timestampFormat: "yyyyMMddHHmmss", timestampZone: "UTC", now, onReply }).getRobots();
66124
66277
  attempts.push({ ...c, sent, ok: true, detail: `Accepted. The account lists ${robots.length} robot${robots.length === 1 ? "" : "s"}.` });
66125
66278
  accepted = c.offsetMinutes;
66126
66279
  break;
@@ -66174,6 +66327,7 @@ function useRobotFleetService(deps) {
66174
66327
  diagnose,
66175
66328
  probeTimestampFormat,
66176
66329
  probeTimestampOffset,
66330
+ probeRegions,
66177
66331
  getLiveVideo,
66178
66332
  resolveAlerts,
66179
66333
  getPatrolHistory,
@@ -69235,14 +69389,14 @@ function useRobotFleetController(deps) {
69235
69389
  try {
69236
69390
  await requirePlatformStaff(req, CROSS_CLIENT_GRANT);
69237
69391
  const probe = req.query.probe;
69238
- if (probe !== void 0 && probe !== "timestamp" && probe !== "timestamp-offset") {
69239
- return fail(next, new import_node_server_utils169.BadRequestError('probe must be "timestamp" or "timestamp-offset".'));
69392
+ if (probe !== void 0 && probe !== "timestamp" && probe !== "timestamp-offset" && probe !== "region") {
69393
+ return fail(next, new import_node_server_utils169.BadRequestError('probe must be "timestamp", "timestamp-offset" or "region".'));
69240
69394
  }
69241
69395
  const robot = await entitleRobot(req, req.params.id);
69242
69396
  res.set("Cache-Control", "no-store");
69243
69397
  const fleet2 = getFleet2();
69244
69398
  res.json(
69245
- probe === "timestamp" ? await fleet2.probeTimestampFormat(robot) : probe === "timestamp-offset" ? await fleet2.probeTimestampOffset(robot) : await fleet2.diagnose(robot)
69399
+ probe === "timestamp" ? await fleet2.probeTimestampFormat(robot) : probe === "timestamp-offset" ? await fleet2.probeTimestampOffset(robot) : probe === "region" ? await fleet2.probeRegions(robot) : await fleet2.diagnose(robot)
69246
69400
  );
69247
69401
  } catch (error) {
69248
69402
  fail(next, error);
@@ -70493,6 +70647,7 @@ async function readLiveItems(robots) {
70493
70647
  planPosition: s.planPosition,
70494
70648
  fault: s.fault,
70495
70649
  capabilities: s.capabilities,
70650
+ profile: s.profile,
70496
70651
  lastSeenAt: seen2 ? new Date(seen2) : null
70497
70652
  });
70498
70653
  } catch (e) {
@@ -104517,6 +104672,7 @@ function usePersonalEmergencyChainController() {
104517
104672
  DEFAULT_SITE_TIMEZONE,
104518
104673
  DEMO_ADD_MAX,
104519
104674
  DEMO_BRAND,
104675
+ DEMO_BRAND_DEFINITION,
104520
104676
  DEMO_CAPABILITIES,
104521
104677
  DEMO_FAULT_ROBOT,
104522
104678
  DEMO_ROUTES,
@@ -104682,20 +104838,27 @@ function usePersonalEmergencyChainController() {
104682
104838
  ORG_OWNER_REPAIR_DEFAULT,
104683
104839
  ORG_OWNER_REPAIR_OFF_REASON,
104684
104840
  OUNITECH_BRAND,
104841
+ OUNITECH_BRAND_DEFINITION,
104685
104842
  OUNITECH_CAPABILITIES,
104686
104843
  OUNITECH_PENDING_COMMANDS,
104844
+ OUNITECH_REGION_BASE_URLS,
104687
104845
  OUNITECH_TIMESTAMP_FORMAT,
104846
+ OUNITECH_TIMESTAMP_ZONE,
104688
104847
  OpenRmfError,
104689
104848
  OrgNature,
104690
104849
  OvernightParkingRequestSort,
104691
104850
  OvernightParkingRequestStatus,
104692
104851
  PADBOT_ACTION_TEXT,
104852
+ PADBOT_ALARMS,
104693
104853
  PADBOT_ALARM_POLL_MS,
104694
104854
  PADBOT_ALARM_TEXT,
104695
104855
  PADBOT_BRAND,
104856
+ PADBOT_BRAND_DEFINITION,
104696
104857
  PADBOT_CAPABILITIES,
104697
104858
  PADBOT_DISPLAY_NAME,
104698
104859
  PADBOT_LIVE_POSE_MS,
104860
+ PADBOT_MAKER_APP_ONLY,
104861
+ PADBOT_MODELS,
104699
104862
  PADBOT_MOTION,
104700
104863
  PADBOT_MQTT_SYNC_MS,
104701
104864
  PADBOT_ONLINE_WINDOW_MS,
@@ -105125,6 +105288,7 @@ function usePersonalEmergencyChainController() {
105125
105288
  robotCloudTimestamp,
105126
105289
  robotCredentialsKey,
105127
105290
  robotFaultSweepConfig,
105291
+ robotManifest,
105128
105292
  robotMode,
105129
105293
  robotModeFromList,
105130
105294
  robotSchema,