@openscout/scout 0.2.23 → 0.2.25

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.
@@ -8029,7 +8029,7 @@ var SCOUT_APP_VERSION = "0.2.23";
8029
8029
  // apps/desktop/src/shared/surface-capabilities.ts
8030
8030
  function resolveScoutSurfaceCapabilities(surface) {
8031
8031
  switch (surface) {
8032
- case "electron":
8032
+ case "desktop":
8033
8033
  return {
8034
8034
  canProvisionRuntime: true,
8035
8035
  canManageBroker: true,
@@ -8074,6 +8074,9 @@ import { basename as basename2, dirname as dirname4, join as join5 } from "path"
8074
8074
  import { existsSync as existsSync4 } from "fs";
8075
8075
  import { fileURLToPath as fileURLToPath3 } from "url";
8076
8076
  import { homedir as homedir4 } from "os";
8077
+ var BROKER_STATUS_CACHE_TTL_MS = 2000;
8078
+ var cachedBrokerStatus = null;
8079
+ var inflightBrokerStatus = null;
8077
8080
  function tryWhich(executableName) {
8078
8081
  const pathEnv = process.env.PATH ?? "";
8079
8082
  const sep = process.platform === "win32" ? ";" : ":";
@@ -8185,6 +8188,9 @@ function spawnArgsForRuntime(entry, serviceArgs) {
8185
8188
  return { command: entry, args: ["service", ...serviceArgs] };
8186
8189
  }
8187
8190
  async function runRuntimeBrokerService(subcommand) {
8191
+ if (subcommand !== "status") {
8192
+ invalidateRuntimeBrokerServiceStatus();
8193
+ }
8188
8194
  const entry = resolveRuntimeServiceEntrypoint();
8189
8195
  const { command, args } = spawnArgsForRuntime(entry, [subcommand, "--json"]);
8190
8196
  const stdoutChunks = [];
@@ -8212,13 +8218,31 @@ async function runRuntimeBrokerService(subcommand) {
8212
8218
  throw new Error(`openscout-runtime service ${subcommand} failed: ${detail}`);
8213
8219
  }
8214
8220
  try {
8215
- return JSON.parse(stdout);
8221
+ const parsed = JSON.parse(stdout);
8222
+ cachedBrokerStatus = {
8223
+ value: parsed,
8224
+ expiresAt: Date.now() + BROKER_STATUS_CACHE_TTL_MS
8225
+ };
8226
+ return parsed;
8216
8227
  } catch {
8217
8228
  throw new Error(`openscout-runtime service ${subcommand} returned non-JSON stdout: ${stdout.slice(0, 400)}`);
8218
8229
  }
8219
8230
  }
8220
- async function getRuntimeBrokerServiceStatus() {
8221
- return runRuntimeBrokerService("status");
8231
+ function invalidateRuntimeBrokerServiceStatus() {
8232
+ cachedBrokerStatus = null;
8233
+ }
8234
+ async function getRuntimeBrokerServiceStatus(options = {}) {
8235
+ const force = options.force ?? false;
8236
+ if (!force && cachedBrokerStatus && cachedBrokerStatus.expiresAt > Date.now()) {
8237
+ return cachedBrokerStatus.value;
8238
+ }
8239
+ if (!force && inflightBrokerStatus) {
8240
+ return inflightBrokerStatus;
8241
+ }
8242
+ inflightBrokerStatus = runRuntimeBrokerService("status").finally(() => {
8243
+ inflightBrokerStatus = null;
8244
+ });
8245
+ return inflightBrokerStatus;
8222
8246
  }
8223
8247
 
8224
8248
  // apps/desktop/src/core/broker/service.ts
@@ -8250,6 +8274,7 @@ var BROKER_SHARED_CHANNEL_ID = "channel.shared";
8250
8274
  var OPERATOR_ID = "operator";
8251
8275
  var DEFAULT_BROKER_HOST2 = "127.0.0.1";
8252
8276
  var DEFAULT_BROKER_PORT2 = 65535;
8277
+ var BUILT_IN_SCOUT_AGENT_IDS = new Set([SCOUT_AGENT_ID, "builder", "reviewer", "research"]);
8253
8278
  function buildScoutBrokerUrlFromEnv() {
8254
8279
  const host = process.env.OPENSCOUT_BROKER_HOST ?? DEFAULT_BROKER_HOST2;
8255
8280
  const port = Number.parseInt(process.env.OPENSCOUT_BROKER_PORT ?? String(DEFAULT_BROKER_PORT2), 10);
@@ -8828,7 +8853,9 @@ function runOptionalCommand(command, args) {
8828
8853
 
8829
8854
  // apps/desktop/src/app/desktop/shell-probes.ts
8830
8855
  var PROJECT_GIT_ACTIVITY_CACHE_TTL_MS = 60000;
8856
+ var TMUX_SESSION_CACHE_TTL_MS = 2000;
8831
8857
  var projectGitActivityCache = new Map;
8858
+ var tmuxSessionCache = null;
8832
8859
  function readHelperStatus() {
8833
8860
  const statusPath = resolveOpenScoutSupportPaths().desktopStatusPath;
8834
8861
  if (!existsSync7(statusPath)) {
@@ -8854,9 +8881,12 @@ function readHelperStatus() {
8854
8881
  }
8855
8882
  }
8856
8883
  function readTmuxSessions() {
8884
+ if (tmuxSessionCache && Date.now() - tmuxSessionCache.cachedAt < TMUX_SESSION_CACHE_TTL_MS) {
8885
+ return tmuxSessionCache.sessions;
8886
+ }
8857
8887
  try {
8858
8888
  const stdout = readTmuxSessionOutput();
8859
- return stdout.split(`
8889
+ const sessions3 = stdout.split(`
8860
8890
  `).map((line) => line.trim()).filter(Boolean).map((line) => {
8861
8891
  const [name, createdAtRaw] = line.split("\t");
8862
8892
  return {
@@ -8864,6 +8894,11 @@ function readTmuxSessions() {
8864
8894
  createdAt: createdAtRaw ? Number.parseInt(createdAtRaw, 10) : null
8865
8895
  };
8866
8896
  });
8897
+ tmuxSessionCache = {
8898
+ cachedAt: Date.now(),
8899
+ sessions: sessions3
8900
+ };
8901
+ return sessions3;
8867
8902
  } catch {
8868
8903
  return [];
8869
8904
  }
@@ -8988,8 +9023,6 @@ function activeEndpoint(snapshot, actorId) {
8988
9023
  return 1;
8989
9024
  case "waiting":
8990
9025
  return 2;
8991
- case "degraded":
8992
- return 3;
8993
9026
  case "offline":
8994
9027
  return 5;
8995
9028
  default:
@@ -9455,7 +9488,7 @@ function machineEndpointState(endpoint, activity) {
9455
9488
  if (endpoint.state === "idle") {
9456
9489
  return "idle";
9457
9490
  }
9458
- if (endpoint.state === "waiting" || endpoint.state === "degraded") {
9491
+ if (endpoint.state === "waiting") {
9459
9492
  return "waiting";
9460
9493
  }
9461
9494
  return "offline";
@@ -10923,7 +10956,7 @@ function createScoutDesktopFeatureFlags(input = {}) {
10923
10956
  function createScoutDesktopAppInfo(input = {}) {
10924
10957
  const configuredProductName = process.env.SCOUT_PRODUCT_NAME?.trim();
10925
10958
  const configuredAppVersion = process.env.SCOUT_APP_VERSION?.trim();
10926
- const surface = input.surface ?? "electron";
10959
+ const surface = input.surface ?? "desktop";
10927
10960
  return {
10928
10961
  productName: input.productName ?? configuredProductName ?? SCOUT_PRODUCT_NAME,
10929
10962
  appVersion: input.appVersion ?? configuredAppVersion ?? SCOUT_APP_VERSION,
@@ -11009,8 +11042,6 @@ function activeEndpoint2(snapshot, agentId) {
11009
11042
  return 1;
11010
11043
  case "waiting":
11011
11044
  return 2;
11012
- case "degraded":
11013
- return 3;
11014
11045
  case "offline":
11015
11046
  return 5;
11016
11047
  default:
@@ -11127,7 +11158,7 @@ function buildBrokerAgentConfigState(agentId, snapshot) {
11127
11158
  capabilitiesText: Array.isArray(agent.capabilities) ? agent.capabilities.join(", ") : ""
11128
11159
  };
11129
11160
  }
11130
- async function getScoutElectronAgentConfig(agentId) {
11161
+ async function getScoutDesktopAgentConfig(agentId) {
11131
11162
  const agentConfig = await getLocalAgentConfig(agentId);
11132
11163
  if (agentConfig) {
11133
11164
  return buildLocalAgentConfigState2(agentId, agentConfig);
@@ -11138,7 +11169,7 @@ async function getScoutElectronAgentConfig(agentId) {
11138
11169
  }
11139
11170
  return buildBrokerAgentConfigState(agentId, broker.snapshot);
11140
11171
  }
11141
- async function updateScoutElectronAgentConfig(input) {
11172
+ async function updateScoutDesktopAgentConfig(input) {
11142
11173
  const nextConfig = await updateLocalAgentConfig(input.agentId, {
11143
11174
  runtime: {
11144
11175
  cwd: input.runtime.cwd,
@@ -11259,7 +11290,7 @@ function buildOptimisticBrokerRelayMessage(input) {
11259
11290
  isVoice,
11260
11291
  messageClass: isSystem ? "system" : "agent",
11261
11292
  routingSummary: input.recipients.length > 0 ? `Targets ${input.recipients.join(", ")}` : null,
11262
- provenanceSummary: "via electron",
11293
+ provenanceSummary: "via desktop",
11263
11294
  provenanceDetail: null,
11264
11295
  isOperator: true,
11265
11296
  avatarLabel: input.operatorName.slice(0, 1).toUpperCase() || "A",
@@ -11364,7 +11395,7 @@ async function ensureOperatorActor(baseUrl, snapshot, operatorName) {
11364
11395
  displayName: operatorName,
11365
11396
  handle: SCOUT_BROKER_OPERATOR_ID,
11366
11397
  labels: ["operator", "desktop"],
11367
- metadata: { source: "scout-electron" }
11398
+ metadata: { source: "scout-desktop" }
11368
11399
  };
11369
11400
  await postBrokerJson(baseUrl, "/v1/actors", actor);
11370
11401
  snapshot.actors[actor.id] = actor;
@@ -11382,7 +11413,7 @@ async function ensureCoreConversation(baseUrl, snapshot, nodeId, conversationId)
11382
11413
  shareMode: "shared",
11383
11414
  authorityNodeId: nodeId,
11384
11415
  participantIds,
11385
- metadata: { surface: "scout-electron" }
11416
+ metadata: { surface: "scout-desktop" }
11386
11417
  } : conversationId === SCOUT_VOICE_CHANNEL_ID ? {
11387
11418
  id: SCOUT_VOICE_CHANNEL_ID,
11388
11419
  kind: "channel",
@@ -11391,7 +11422,7 @@ async function ensureCoreConversation(baseUrl, snapshot, nodeId, conversationId)
11391
11422
  shareMode: "local",
11392
11423
  authorityNodeId: nodeId,
11393
11424
  participantIds,
11394
- metadata: { surface: "scout-electron" }
11425
+ metadata: { surface: "scout-desktop" }
11395
11426
  } : {
11396
11427
  id: SCOUT_SYSTEM_CHANNEL_ID,
11397
11428
  kind: "system",
@@ -11400,7 +11431,7 @@ async function ensureCoreConversation(baseUrl, snapshot, nodeId, conversationId)
11400
11431
  shareMode: "local",
11401
11432
  authorityNodeId: nodeId,
11402
11433
  participantIds: [SCOUT_BROKER_OPERATOR_ID],
11403
- metadata: { surface: "scout-electron" }
11434
+ metadata: { surface: "scout-desktop" }
11404
11435
  };
11405
11436
  await postBrokerJson(baseUrl, "/v1/conversations", definition);
11406
11437
  snapshot.conversations[conversationId] = definition;
@@ -11421,7 +11452,7 @@ async function ensureDirectConversation(baseUrl, snapshot, nodeId, agentId, oper
11421
11452
  authorityNodeId: nodeId,
11422
11453
  participantIds: [SCOUT_BROKER_OPERATOR_ID, agentId].sort(),
11423
11454
  metadata: {
11424
- surface: "scout-electron",
11455
+ surface: "scout-desktop",
11425
11456
  ...agentId === SCOUT_AGENT_ID2 ? { role: "partner" } : {}
11426
11457
  }
11427
11458
  };
@@ -11549,7 +11580,7 @@ function parseRequestedHarness(value) {
11549
11580
  }
11550
11581
  return SUPPORTED_LOCAL_AGENT_HARNESSES.includes(value) ? value : undefined;
11551
11582
  }
11552
- async function restartScoutElectronAgent(input, options = {}) {
11583
+ async function restartScoutDesktopAgent(input, options = {}) {
11553
11584
  const currentDirectory = resolveCurrentDirectory(options.currentDirectory);
11554
11585
  const operatorName = await resolveOperatorDisplayName2(currentDirectory);
11555
11586
  const record = await restartLocalAgent(input.agentId, {
@@ -11565,7 +11596,7 @@ async function restartScoutElectronAgent(input, options = {}) {
11565
11596
  });
11566
11597
  return loadBrokerActionShellState(options);
11567
11598
  }
11568
- async function createScoutElectronAgent(input, options = {}) {
11599
+ async function createScoutDesktopAgent(input, options = {}) {
11569
11600
  const currentDirectory = resolveCurrentDirectory(options.currentDirectory);
11570
11601
  const operatorName = await resolveOperatorDisplayName2(currentDirectory);
11571
11602
  const projectPath = input.projectPath.trim();
@@ -11588,7 +11619,7 @@ async function createScoutElectronAgent(input, options = {}) {
11588
11619
  shellState: await loadBrokerActionShellState(options)
11589
11620
  };
11590
11621
  }
11591
- async function controlScoutElectronBroker(action, options = {}) {
11622
+ async function controlScoutDesktopBroker(action, options = {}) {
11592
11623
  const currentDirectory = resolveCurrentDirectory(options.currentDirectory);
11593
11624
  const operatorName = await resolveOperatorDisplayName2(currentDirectory);
11594
11625
  switch (action) {
@@ -11616,7 +11647,7 @@ async function controlScoutElectronBroker(action, options = {}) {
11616
11647
  }
11617
11648
  return loadBrokerActionShellState(options);
11618
11649
  }
11619
- async function sendScoutElectronRelayMessage(input, options = {}) {
11650
+ async function sendScoutDesktopRelayMessage(input, options = {}) {
11620
11651
  const currentDirectory = resolveCurrentDirectory(options.currentDirectory);
11621
11652
  const operatorName = await resolveOperatorDisplayName2(currentDirectory);
11622
11653
  const broker = await loadScoutBrokerContext();
@@ -11678,7 +11709,7 @@ async function sendScoutElectronRelayMessage(input, options = {}) {
11678
11709
  policy: "durable",
11679
11710
  createdAt,
11680
11711
  metadata: {
11681
- source: "scout-electron",
11712
+ source: "scout-desktop",
11682
11713
  destinationKind: input.destinationKind,
11683
11714
  destinationId: input.destinationId,
11684
11715
  referenceMessageIds,
@@ -11706,7 +11737,7 @@ async function sendScoutElectronRelayMessage(input, options = {}) {
11706
11737
  stream: false,
11707
11738
  createdAt,
11708
11739
  metadata: {
11709
- source: "scout-electron",
11740
+ source: "scout-desktop",
11710
11741
  destinationKind: input.destinationKind
11711
11742
  }
11712
11743
  });
@@ -11754,18 +11785,6 @@ function looksLikeWorkspaceRoot(candidate) {
11754
11785
  }
11755
11786
  }
11756
11787
  function looksLikePackagedAppRoot(candidate) {
11757
- const packageJsonPath = join10(candidate, "package.json");
11758
- if (!existsSync8(packageJsonPath)) {
11759
- return false;
11760
- }
11761
- try {
11762
- const parsed = JSON.parse(readFileSync5(packageJsonPath, "utf8"));
11763
- return parsed.name === "@scout/electron-app";
11764
- } catch {
11765
- return false;
11766
- }
11767
- }
11768
- function looksLikeInstalledCliRoot(candidate) {
11769
11788
  const packageJsonPath = join10(candidate, "package.json");
11770
11789
  if (!existsSync8(packageJsonPath)) {
11771
11790
  return false;
@@ -11830,14 +11849,8 @@ function resolveScoutAppRoot(options = {}) {
11830
11849
  return packagedRoot;
11831
11850
  }
11832
11851
  }
11833
- for (const start of starts) {
11834
- const installedCliRoot = findMatchingAncestor(start, looksLikeInstalledCliRoot);
11835
- if (installedCliRoot) {
11836
- return installedCliRoot;
11837
- }
11838
- }
11839
11852
  const workspaceRoot = resolveScoutWorkspaceRoot(options);
11840
- for (const relativePath of [["apps", "desktop"], ["apps", "scout"]]) {
11853
+ for (const relativePath of [["apps", "desktop"], ["apps", "scout"], ["packages", "cli"]]) {
11841
11854
  const candidate = resolve5(workspaceRoot, ...relativePath);
11842
11855
  if (looksLikeSourceAppRoot(candidate)) {
11843
11856
  return candidate;
@@ -12341,9 +12354,8 @@ function resolveScoutBunExecutable() {
12341
12354
  function resolveScoutPairingRuntimeScriptPath() {
12342
12355
  const appRoot = resolveScoutAppRoot();
12343
12356
  const candidates = [
12344
- join11(appRoot, "dist", "electron", SCOUT_PAIRING_RUNTIME_SCRIPT.replace(/\.ts$/, ".js")),
12345
- join11(appRoot, "bin", SCOUT_PAIRING_RUNTIME_SCRIPT),
12346
- join11(appRoot, "..", "..", "packages", "electron-app", "dist", "electron", SCOUT_PAIRING_RUNTIME_SCRIPT.replace(/\.ts$/, ".js"))
12357
+ join11(appRoot, "dist", SCOUT_PAIRING_RUNTIME_SCRIPT.replace(/\.ts$/, ".mjs")),
12358
+ join11(appRoot, "bin", SCOUT_PAIRING_RUNTIME_SCRIPT)
12347
12359
  ];
12348
12360
  for (const candidate of candidates) {
12349
12361
  if (existsSync9(candidate)) {
@@ -12513,13 +12525,13 @@ async function ensureScoutPairingRuntimeStarted() {
12513
12525
  }
12514
12526
  await startScoutPairingRuntime();
12515
12527
  }
12516
- async function getScoutElectronPairingState(currentDirectory) {
12528
+ async function getScoutDesktopPairingState(currentDirectory) {
12517
12529
  return readScoutPairingState(currentDirectory);
12518
12530
  }
12519
- async function refreshScoutElectronPairingState(currentDirectory) {
12531
+ async function refreshScoutDesktopPairingState(currentDirectory) {
12520
12532
  return readScoutPairingState(currentDirectory);
12521
12533
  }
12522
- async function controlScoutElectronPairingService(action, currentDirectory) {
12534
+ async function controlScoutDesktopPairingService(action, currentDirectory) {
12523
12535
  switch (action) {
12524
12536
  case "start":
12525
12537
  await ensureDefaultScoutPairingWorkspaceConfig(currentDirectory);
@@ -12535,14 +12547,14 @@ async function controlScoutElectronPairingService(action, currentDirectory) {
12535
12547
  }
12536
12548
  return readScoutPairingState(currentDirectory);
12537
12549
  }
12538
- async function updateScoutElectronPairingConfig(input, currentDirectory) {
12550
+ async function updateScoutDesktopPairingConfig(input, currentDirectory) {
12539
12551
  await updateScoutPairingConfig(input, currentDirectory);
12540
12552
  if (isScoutPairingRuntimeRunning()) {
12541
12553
  await restartScoutPairingRuntime();
12542
12554
  }
12543
12555
  return readScoutPairingState(currentDirectory);
12544
12556
  }
12545
- async function decideScoutElectronPairingApproval(input, currentDirectory) {
12557
+ async function decideScoutDesktopPairingApproval(input, currentDirectory) {
12546
12558
  const resolvedConfig = resolveScoutPairingConfig();
12547
12559
  await withScoutPairingBridgeClient(resolvedConfig.port, async (client) => {
12548
12560
  await client.mutation("actionDecide", {
@@ -12642,7 +12654,7 @@ function deriveScoutTelegramBridgeRuntimeState(input) {
12642
12654
  });
12643
12655
  }
12644
12656
  // apps/desktop/src/app/host/settings.ts
12645
- var SCOUT_ELECTRON_OPENER = "scout";
12657
+ var SCOUT_CLI_COMMAND = "scout";
12646
12658
  function compactHomePath4(value) {
12647
12659
  if (!value) {
12648
12660
  return null;
@@ -12686,7 +12698,7 @@ function defaultOnboardingContextRoot(explicitRoot, workspaceRoots, fallback) {
12686
12698
  function isExecutable3(candidate) {
12687
12699
  return existsSync10(candidate);
12688
12700
  }
12689
- function resolveScoutElectronScoutExecutable() {
12701
+ function resolveScoutDesktopScoutExecutable() {
12690
12702
  const explicit = process.env.OPENSCOUT_SCOUT_BIN ?? process.env.SCOUT_BIN;
12691
12703
  if (explicit?.trim()) {
12692
12704
  return explicit.trim();
@@ -12698,14 +12710,14 @@ function resolveScoutElectronScoutExecutable() {
12698
12710
  "/usr/local/bin"
12699
12711
  ];
12700
12712
  for (const directory of [...pathEntries, ...commonDirectories]) {
12701
- const candidate = path4.join(directory.replace(/^~(?=$|\/)/, homedir8()), SCOUT_ELECTRON_OPENER);
12713
+ const candidate = path4.join(directory.replace(/^~(?=$|\/)/, homedir8()), SCOUT_CLI_COMMAND);
12702
12714
  if (isExecutable3(candidate)) {
12703
12715
  return candidate;
12704
12716
  }
12705
12717
  }
12706
12718
  throw new Error(buildMissingScoutCliMessage());
12707
12719
  }
12708
- function resolveScoutElectronBunInstallCommand() {
12720
+ function resolveScoutDesktopBunInstallCommand() {
12709
12721
  const pathEntries = (process.env.PATH ?? "").split(":").filter(Boolean);
12710
12722
  const brewCandidates = [
12711
12723
  ...pathEntries.map((entry) => path4.join(entry, "brew")),
@@ -12720,7 +12732,7 @@ function resolveScoutElectronBunInstallCommand() {
12720
12732
  return "curl -fsSL https://bun.sh/install | bash";
12721
12733
  }
12722
12734
  function buildMissingScoutCliMessage() {
12723
- const bunInstallCommand = resolveScoutElectronBunInstallCommand();
12735
+ const bunInstallCommand = resolveScoutDesktopBunInstallCommand();
12724
12736
  return [
12725
12737
  "Scout CLI was not found on this Mac.",
12726
12738
  "Install Bun, then install the Scout package globally:",
@@ -12788,7 +12800,7 @@ function resolveCurrentProjectConfigPath(onboardingContextRoot) {
12788
12800
  const candidate = path4.join(onboardingContextRoot, ".openscout", "project.json");
12789
12801
  return existsSync10(candidate) ? candidate : null;
12790
12802
  }
12791
- async function loadScoutElectronSettingsBase(currentDirectory, services = {}, input = {}) {
12803
+ async function loadScoutDesktopSettingsBase(currentDirectory, services = {}, input = {}) {
12792
12804
  const settingsDirectory = resolveSettingsDirectory(currentDirectory);
12793
12805
  const supportPaths = resolveOpenScoutSupportPaths();
12794
12806
  const record = await readOpenScoutSettings({ currentDirectory: settingsDirectory });
@@ -12857,7 +12869,7 @@ async function loadScoutElectronSettingsBase(currentDirectory, services = {}, in
12857
12869
  telegram
12858
12870
  };
12859
12871
  }
12860
- function buildScoutElectronAppSettingsState(base, input) {
12872
+ function buildScoutDesktopAppSettingsState(base, input) {
12861
12873
  const discoveredAgents = input.discoveredAgents ?? [];
12862
12874
  const projectInventory = input.projectInventory ?? [];
12863
12875
  return {
@@ -12995,14 +13007,14 @@ async function resolveTelegramSettingsState(input, services, readiness) {
12995
13007
  pendingDeliveries: runtimeState.pendingDeliveries
12996
13008
  };
12997
13009
  }
12998
- async function getScoutElectronAppSettings(currentDirectory, services = {}) {
12999
- const base = await loadScoutElectronSettingsBase(currentDirectory, services);
13000
- return buildScoutElectronAppSettingsState(base, {
13010
+ async function getScoutDesktopAppSettings(currentDirectory, services = {}) {
13011
+ const base = await loadScoutDesktopSettingsBase(currentDirectory, services);
13012
+ return buildScoutDesktopAppSettingsState(base, {
13001
13013
  workspaceInventoryLoaded: false
13002
13014
  });
13003
13015
  }
13004
- async function refreshScoutElectronAppSettingsInventory(currentDirectory, services = {}) {
13005
- const base = await loadScoutElectronSettingsBase(currentDirectory, services);
13016
+ async function refreshScoutDesktopAppSettingsInventory(currentDirectory, services = {}) {
13017
+ const base = await loadScoutDesktopSettingsBase(currentDirectory, services);
13006
13018
  const setup = await loadResolvedRelayAgents({
13007
13019
  currentDirectory: base.onboardingContextRoot
13008
13020
  });
@@ -13036,7 +13048,7 @@ async function refreshScoutElectronAppSettingsInventory(currentDirectory, servic
13036
13048
  sessionId: agent.runtime.sessionId,
13037
13049
  projectConfigPath: agent.projectConfigPath ?? null
13038
13050
  })) : [];
13039
- return buildScoutElectronAppSettingsState(await loadScoutElectronSettingsBase(currentDirectory, services, {
13051
+ return buildScoutDesktopAppSettingsState(await loadScoutDesktopSettingsBase(currentDirectory, services, {
13040
13052
  projectInventoryCount: projectInventory.length
13041
13053
  }), {
13042
13054
  workspaceInventoryLoaded: true,
@@ -13044,13 +13056,13 @@ async function refreshScoutElectronAppSettingsInventory(currentDirectory, servic
13044
13056
  projectInventory
13045
13057
  });
13046
13058
  }
13047
- async function runScoutElectronOnboardingCommand(input, currentDirectory) {
13059
+ async function runScoutDesktopOnboardingCommand(input, currentDirectory) {
13048
13060
  const settingsDirectory = resolveSettingsDirectory(currentDirectory);
13049
13061
  const contextRoot = path4.resolve(expandHomePath5(input.contextRoot?.trim() || defaultOnboardingContextRoot(null, input.sourceRoots ?? [], settingsDirectory)));
13050
- const scoutExecutable = resolveScoutElectronScoutExecutable();
13062
+ const scoutExecutable = resolveScoutDesktopScoutExecutable();
13051
13063
  const cliCommand = input.command === "setup" ? "setup" : input.command;
13052
13064
  const normalizedSourceRoots = Array.from(new Set((input.sourceRoots ?? []).map((entry) => expandHomePath5(entry).trim()).filter(Boolean)));
13053
- const displayArgs = [SCOUT_ELECTRON_OPENER, input.command, "--context-root", compactHomePath4(contextRoot) ?? contextRoot];
13065
+ const displayArgs = [SCOUT_CLI_COMMAND, input.command, "--context-root", compactHomePath4(contextRoot) ?? contextRoot];
13054
13066
  const execArgs = [cliCommand, "--context-root", contextRoot];
13055
13067
  if (input.command === "setup") {
13056
13068
  for (const sourceRoot of normalizedSourceRoots) {
@@ -13113,7 +13125,7 @@ async function runScoutElectronOnboardingCommand(input, currentDirectory) {
13113
13125
  }
13114
13126
  return result;
13115
13127
  }
13116
- async function skipScoutElectronOnboarding(currentDirectory, services = {}) {
13128
+ async function skipScoutDesktopOnboarding(currentDirectory, services = {}) {
13117
13129
  await writeOpenScoutSettings({
13118
13130
  onboarding: {
13119
13131
  skippedAt: Date.now()
@@ -13121,9 +13133,9 @@ async function skipScoutElectronOnboarding(currentDirectory, services = {}) {
13121
13133
  }, {
13122
13134
  currentDirectory: resolveSettingsDirectory(currentDirectory)
13123
13135
  });
13124
- return getScoutElectronAppSettings(currentDirectory, services);
13136
+ return getScoutDesktopAppSettings(currentDirectory, services);
13125
13137
  }
13126
- async function restartScoutElectronOnboarding(currentDirectory, services = {}) {
13138
+ async function restartScoutDesktopOnboarding(currentDirectory, services = {}) {
13127
13139
  await writeOpenScoutSettings({
13128
13140
  onboarding: {
13129
13141
  operatorAnsweredAt: null,
@@ -13139,9 +13151,9 @@ async function restartScoutElectronOnboarding(currentDirectory, services = {}) {
13139
13151
  }, {
13140
13152
  currentDirectory: resolveSettingsDirectory(currentDirectory)
13141
13153
  });
13142
- return getScoutElectronAppSettings(currentDirectory, services);
13154
+ return getScoutDesktopAppSettings(currentDirectory, services);
13143
13155
  }
13144
- async function updateScoutElectronAppSettings(input, currentDirectory, services = {}) {
13156
+ async function updateScoutDesktopAppSettings(input, currentDirectory, services = {}) {
13145
13157
  const trimmedOperatorName = input.operatorName?.trim() ?? "";
13146
13158
  const trimmedContextRoot = input.onboardingContextRoot?.trim() ?? "";
13147
13159
  const defaultHarness = SUPPORTED_LOCAL_AGENT_HARNESSES.includes(input.defaultHarness) ? input.defaultHarness : "claude";
@@ -13198,7 +13210,7 @@ async function updateScoutElectronAppSettings(input, currentDirectory, services
13198
13210
  });
13199
13211
  } catch {}
13200
13212
  }
13201
- return getScoutElectronAppSettings(currentDirectory, services);
13213
+ return getScoutDesktopAppSettings(currentDirectory, services);
13202
13214
  }
13203
13215
  async function updateHiddenProjectRoots(nextHiddenProjectRoots, currentDirectory, services = {}) {
13204
13216
  const settingsDirectory = resolveSettingsDirectory(currentDirectory);
@@ -13224,14 +13236,14 @@ async function updateHiddenProjectRoots(nextHiddenProjectRoots, currentDirectory
13224
13236
  });
13225
13237
  } catch {}
13226
13238
  }
13227
- return refreshScoutElectronAppSettingsInventory(currentDirectory, services);
13239
+ return refreshScoutDesktopAppSettingsInventory(currentDirectory, services);
13228
13240
  }
13229
- async function retireScoutElectronProject(projectRoot, currentDirectory, services = {}) {
13241
+ async function retireScoutDesktopProject(projectRoot, currentDirectory, services = {}) {
13230
13242
  const settingsDirectory = resolveSettingsDirectory(currentDirectory);
13231
13243
  const currentSettings = await readOpenScoutSettings({ currentDirectory: settingsDirectory });
13232
13244
  return updateHiddenProjectRoots([...normalizedHiddenProjectRoots(currentSettings.discovery.hiddenProjectRoots), projectRoot], currentDirectory, services);
13233
13245
  }
13234
- async function restoreScoutElectronProject(projectRoot, currentDirectory, services = {}) {
13246
+ async function restoreScoutDesktopProject(projectRoot, currentDirectory, services = {}) {
13235
13247
  const settingsDirectory = resolveSettingsDirectory(currentDirectory);
13236
13248
  const currentSettings = await readOpenScoutSettings({ currentDirectory: settingsDirectory });
13237
13249
  const normalizedProjectRoot = path4.resolve(expandHomePath5(projectRoot));
@@ -13459,8 +13471,8 @@ function appModeLabel() {
13459
13471
  const packageJsonPath = path5.join(appRoot, "package.json");
13460
13472
  if (existsSync11(packageJsonPath)) {
13461
13473
  const payload = JSON.parse(readFileSync7(packageJsonPath, "utf8"));
13462
- if (payload.name === "@scout/electron-app") {
13463
- return "packaged";
13474
+ if (payload.name === "@openscout/scout" || payload.name === "@openscout/cli") {
13475
+ return "installed";
13464
13476
  }
13465
13477
  }
13466
13478
  } catch {}
@@ -13506,11 +13518,10 @@ function coreLogSources() {
13506
13518
  {
13507
13519
  id: "app",
13508
13520
  title: "Desktop App",
13509
- subtitle: "Electron and local app logs",
13521
+ subtitle: "Desktop host and local app logs",
13510
13522
  group: "app",
13511
13523
  pathLabel: compactHomePath5(supportPaths.appLogsDirectory) ?? supportPaths.appLogsDirectory,
13512
13524
  paths: [
13513
- path5.join(supportPaths.appLogsDirectory, "electron.log"),
13514
13525
  path5.join(supportPaths.appLogsDirectory, "native.log"),
13515
13526
  path5.join(supportPaths.appLogsDirectory, "agent-host.log")
13516
13527
  ]
@@ -13614,14 +13625,14 @@ async function tailScoutLogSource(source, tailLines = DEFAULT_LOG_TAIL_LINES) {
13614
13625
  missing: !foundAny
13615
13626
  };
13616
13627
  }
13617
- async function getScoutElectronLogCatalog(_currentDirectory = process.cwd()) {
13628
+ async function getScoutDesktopLogCatalog(_currentDirectory = process.cwd()) {
13618
13629
  const sources = coreLogSources();
13619
13630
  return {
13620
13631
  sources: sources.map(({ paths: _paths, ...source }) => source),
13621
13632
  defaultSourceId: "broker"
13622
13633
  };
13623
13634
  }
13624
- async function getScoutElectronBrokerInspector() {
13635
+ async function getScoutDesktopBrokerInspector() {
13625
13636
  const status = await getRuntimeBrokerServiceStatus();
13626
13637
  const processId = resolveBrokerProcessId(status.brokerUrl, status.pid);
13627
13638
  const processCommand = readProcessCommand(processId);
@@ -13661,7 +13672,7 @@ async function getScoutElectronBrokerInspector() {
13661
13672
  feedbackSummary: brokerFeedbackSummary(status, processId, processCommand, lastRestartLabel, version)
13662
13673
  };
13663
13674
  }
13664
- async function readScoutElectronLogSource(input, _currentDirectory = process.cwd()) {
13675
+ async function readScoutDesktopLogSource(input, _currentDirectory = process.cwd()) {
13665
13676
  const sources = coreLogSources();
13666
13677
  const source = sources.find((entry) => entry.id === input.sourceId);
13667
13678
  if (!source) {
@@ -13671,12 +13682,12 @@ async function readScoutElectronLogSource(input, _currentDirectory = process.cwd
13671
13682
  const tailLines = Math.min(input.tailLines ?? DEFAULT_LOG_TAIL_LINES, MAX_TAIL_LINES);
13672
13683
  return tailScoutLogSource(source, tailLines);
13673
13684
  }
13674
- async function getScoutElectronFeedbackBundle(currentDirectory = process.cwd()) {
13685
+ async function getScoutDesktopFeedbackBundle(currentDirectory = process.cwd()) {
13675
13686
  const generatedAt = new Date().toISOString();
13676
13687
  const supportPaths = resolveOpenScoutSupportPaths();
13677
- const appSettings = await getScoutElectronAppSettings(currentDirectory);
13678
- const pairingState = await getScoutElectronPairingState(currentDirectory);
13679
- const brokerInspector = await getScoutElectronBrokerInspector();
13688
+ const appSettings = await getScoutDesktopAppSettings(currentDirectory);
13689
+ const pairingState = await getScoutDesktopPairingState(currentDirectory);
13690
+ const brokerInspector = await getScoutDesktopBrokerInspector();
13680
13691
  const appRoot = (() => {
13681
13692
  try {
13682
13693
  return compactHomePath5(resolveScoutAppRoot()) ?? resolveScoutAppRoot();
@@ -13779,14 +13790,14 @@ async function getScoutElectronFeedbackBundle(currentDirectory = process.cwd())
13779
13790
  text: serializeFeedbackSections(sections)
13780
13791
  };
13781
13792
  }
13782
- async function submitScoutElectronFeedbackReport(input, currentDirectory = process.cwd()) {
13793
+ async function submitScoutDesktopFeedbackReport(input, currentDirectory = process.cwd()) {
13783
13794
  const message = input.message.trim();
13784
13795
  if (message.length === 0) {
13785
13796
  throw new Error("Feedback message is required.");
13786
13797
  }
13787
- const bundle = await getScoutElectronFeedbackBundle(currentDirectory);
13788
- const pairingState = await getScoutElectronPairingState(currentDirectory);
13789
- const brokerInspector = await getScoutElectronBrokerInspector();
13798
+ const bundle = await getScoutDesktopFeedbackBundle(currentDirectory);
13799
+ const pairingState = await getScoutDesktopPairingState(currentDirectory);
13800
+ const brokerInspector = await getScoutDesktopBrokerInspector();
13790
13801
  const endpoint = resolveScoutFeedbackReportUrl();
13791
13802
  const reportId = randomUUID2();
13792
13803
  const report = {
@@ -13852,7 +13863,7 @@ async function submitScoutElectronFeedbackReport(input, currentDirectory = proce
13852
13863
  };
13853
13864
  }
13854
13865
 
13855
- // apps/desktop/src/app/electron/host.ts
13866
+ // apps/desktop/src/app/host/native-host.ts
13856
13867
  import { existsSync as existsSync12 } from "fs";
13857
13868
  import { stat as stat5 } from "fs/promises";
13858
13869
  import path6 from "path";
@@ -13868,27 +13879,27 @@ function expandHomePath6(value) {
13868
13879
  }
13869
13880
  return value;
13870
13881
  }
13871
- async function pickScoutElectronDirectory(host = {}) {
13882
+ async function pickScoutHostDirectory(host = {}) {
13872
13883
  if (!host.pickDirectory) {
13873
13884
  throw new Error("Scout directory picker is unavailable.");
13874
13885
  }
13875
13886
  return host.pickDirectory();
13876
13887
  }
13877
- async function quitScoutElectronApp(host = {}) {
13888
+ async function quitScoutHostApp(host = {}) {
13878
13889
  if (!host.requestQuit) {
13879
13890
  throw new Error("Scout app quit is unavailable.");
13880
13891
  }
13881
13892
  host.requestQuit();
13882
13893
  return true;
13883
13894
  }
13884
- async function reloadScoutElectronApp(host = {}) {
13895
+ async function reloadScoutHostApp(host = {}) {
13885
13896
  if (!host.reloadWindow) {
13886
13897
  throw new Error("Scout app reload is unavailable.");
13887
13898
  }
13888
13899
  host.reloadWindow();
13889
13900
  return true;
13890
13901
  }
13891
- async function revealScoutElectronPath(filePath, host = {}) {
13902
+ async function revealScoutHostPath(filePath, host = {}) {
13892
13903
  const targetPath = expandHomePath6(filePath);
13893
13904
  if (!targetPath) {
13894
13905
  return false;
@@ -13914,6 +13925,7 @@ async function revealScoutElectronPath(filePath, host = {}) {
13914
13925
  host.showItemInFolder(targetPath);
13915
13926
  return true;
13916
13927
  }
13928
+
13917
13929
  // apps/desktop/src/app/host/keep-alive.ts
13918
13930
  var DEFAULT_KEEP_ALIVE_OPTIONS = {
13919
13931
  normal: {
@@ -14324,8 +14336,6 @@ function activeEndpoint3(snapshot, agentId) {
14324
14336
  return 1;
14325
14337
  case "waiting":
14326
14338
  return 2;
14327
- case "degraded":
14328
- return 3;
14329
14339
  case "offline":
14330
14340
  return 5;
14331
14341
  default:
@@ -14357,7 +14367,7 @@ function buildTmuxInspector(input) {
14357
14367
  missing: false
14358
14368
  };
14359
14369
  }
14360
- async function getScoutElectronAgentSession(agentId) {
14370
+ async function getScoutDesktopAgentSession(agentId) {
14361
14371
  const [agentConfig, broker] = await Promise.all([
14362
14372
  getLocalAgentConfig(agentId),
14363
14373
  loadScoutBrokerContext()
@@ -14445,8 +14455,8 @@ async function getScoutElectronAgentSession(agentId) {
14445
14455
  missing: true
14446
14456
  };
14447
14457
  }
14448
- async function openScoutElectronAgentSession(agentId, host = {}) {
14449
- const session = await getScoutElectronAgentSession(agentId);
14458
+ async function openScoutDesktopAgentSession(agentId, host = {}) {
14459
+ const session = await getScoutDesktopAgentSession(agentId);
14450
14460
  const platform = host.platform ?? process.platform;
14451
14461
  if (session.mode === "tmux" && session.commandLabel) {
14452
14462
  if (platform !== "darwin") {
@@ -14481,14 +14491,14 @@ async function openScoutElectronAgentSession(agentId, host = {}) {
14481
14491
  function resolveCurrentDirectory2(input) {
14482
14492
  return input ?? process.cwd();
14483
14493
  }
14484
- function getScoutElectronAppInfo(input = {}) {
14485
- return createScoutDesktopAppInfo({ ...input, surface: "electron" });
14494
+ function getScoutDesktopAppInfo(input = {}) {
14495
+ return createScoutDesktopAppInfo({ ...input, surface: "desktop" });
14486
14496
  }
14487
- async function getScoutElectronServicesState(options = {}) {
14497
+ async function getScoutDesktopServicesState(options = {}) {
14488
14498
  const currentDirectory = resolveCurrentDirectory2(options.currentDirectory);
14489
14499
  const [servicesState, pairingState] = await Promise.all([
14490
14500
  loadScoutDesktopServicesState(),
14491
- getScoutElectronPairingState(currentDirectory)
14501
+ getScoutDesktopPairingState(currentDirectory)
14492
14502
  ]);
14493
14503
  const pairingService = {
14494
14504
  id: "pairing",
@@ -14511,11 +14521,11 @@ async function getScoutElectronServicesState(options = {}) {
14511
14521
  services: nextServices
14512
14522
  };
14513
14523
  }
14514
- async function getScoutElectronHomeState(options = {}) {
14524
+ async function getScoutDesktopHomeState(options = {}) {
14515
14525
  const currentDirectory = resolveCurrentDirectory2(options.currentDirectory);
14516
14526
  return loadScoutDesktopHomeState({ currentDirectory });
14517
14527
  }
14518
- async function applyScoutElectronVoiceToMessagesWorkspaceState(messagesWorkspaceState, voiceService) {
14528
+ async function applyScoutDesktopVoiceToMessagesWorkspaceState(messagesWorkspaceState, voiceService) {
14519
14529
  if (!voiceService?.getVoiceState) {
14520
14530
  return messagesWorkspaceState;
14521
14531
  }
@@ -14528,7 +14538,7 @@ async function applyScoutElectronVoiceToMessagesWorkspaceState(messagesWorkspace
14528
14538
  }
14529
14539
  };
14530
14540
  }
14531
- async function applyScoutElectronVoiceToRelayShellPatch(relayShellPatch, voiceService) {
14541
+ async function applyScoutDesktopVoiceToRelayShellPatch(relayShellPatch, voiceService) {
14532
14542
  if (!voiceService?.getVoiceState) {
14533
14543
  return relayShellPatch;
14534
14544
  }
@@ -14541,17 +14551,17 @@ async function applyScoutElectronVoiceToRelayShellPatch(relayShellPatch, voiceSe
14541
14551
  }
14542
14552
  };
14543
14553
  }
14544
- async function getScoutElectronMessagesWorkspaceState(options = {}) {
14554
+ async function getScoutDesktopMessagesWorkspaceState(options = {}) {
14545
14555
  const currentDirectory = resolveCurrentDirectory2(options.currentDirectory);
14546
14556
  const messagesWorkspaceState = await loadScoutDesktopMessagesWorkspaceState({ currentDirectory });
14547
- return applyScoutElectronVoiceToMessagesWorkspaceState(messagesWorkspaceState, options.voice);
14557
+ return applyScoutDesktopVoiceToMessagesWorkspaceState(messagesWorkspaceState, options.voice);
14548
14558
  }
14549
- async function getScoutElectronRelayShellPatch(options = {}) {
14559
+ async function getScoutDesktopRelayShellPatch(options = {}) {
14550
14560
  const currentDirectory = resolveCurrentDirectory2(options.currentDirectory);
14551
14561
  const relayShellPatch = await loadScoutDesktopRelayShellPatch({ currentDirectory });
14552
- return applyScoutElectronVoiceToRelayShellPatch(relayShellPatch, options.voice);
14562
+ return applyScoutDesktopVoiceToRelayShellPatch(relayShellPatch, options.voice);
14553
14563
  }
14554
- async function applyScoutElectronVoiceState(shellState, voiceService) {
14564
+ async function applyScoutDesktopVoiceState(shellState, voiceService) {
14555
14565
  if (!voiceService?.getVoiceState) {
14556
14566
  return shellState;
14557
14567
  }
@@ -14564,39 +14574,39 @@ async function applyScoutElectronVoiceState(shellState, voiceService) {
14564
14574
  }
14565
14575
  };
14566
14576
  }
14567
- async function getScoutElectronShellState(options = {}) {
14577
+ async function getScoutDesktopShellState(options = {}) {
14568
14578
  const currentDirectory = resolveCurrentDirectory2(options.currentDirectory);
14569
14579
  const shellState = await loadScoutDesktopShellState({
14570
14580
  currentDirectory,
14571
14581
  appInfo: options.appInfo ?? createScoutDesktopAppInfo()
14572
14582
  });
14573
- return applyScoutElectronVoiceState(shellState, options.voice);
14583
+ return applyScoutDesktopVoiceState(shellState, options.voice);
14574
14584
  }
14575
- async function refreshScoutElectronShellState(options = {}) {
14576
- return getScoutElectronShellState(options);
14585
+ async function refreshScoutDesktopShellState(options = {}) {
14586
+ return getScoutDesktopShellState(options);
14577
14587
  }
14578
- async function refreshScoutElectronRelayShellPatch(options = {}) {
14579
- return getScoutElectronRelayShellPatch(options);
14588
+ async function refreshScoutDesktopRelayShellPatch(options = {}) {
14589
+ return getScoutDesktopRelayShellPatch(options);
14580
14590
  }
14581
- async function getScoutElectronPhonePreparation(currentDirectory = process.cwd()) {
14591
+ async function getScoutDesktopPhonePreparation(currentDirectory = process.cwd()) {
14582
14592
  return loadScoutPhonePreparation(currentDirectory);
14583
14593
  }
14584
- async function updateScoutElectronPhonePreparation(input, currentDirectory = process.cwd()) {
14594
+ async function updateScoutDesktopPhonePreparation(input, currentDirectory = process.cwd()) {
14585
14595
  return updateScoutPhonePreparation(currentDirectory, input);
14586
14596
  }
14587
- async function toggleScoutElectronVoiceCapture(options = {}) {
14597
+ async function toggleScoutDesktopVoiceCapture(options = {}) {
14588
14598
  if (!options.voice?.toggleVoiceCapture) {
14589
14599
  throw new Error("Scout voice capture is unavailable.");
14590
14600
  }
14591
14601
  await options.voice.toggleVoiceCapture();
14592
- return refreshScoutElectronShellState(options);
14602
+ return refreshScoutDesktopShellState(options);
14593
14603
  }
14594
- async function setScoutElectronVoiceRepliesEnabled(enabled, options = {}) {
14604
+ async function setScoutDesktopVoiceRepliesEnabled(enabled, options = {}) {
14595
14605
  if (!options.voice?.setVoiceRepliesEnabled) {
14596
14606
  throw new Error("Scout voice playback control is unavailable.");
14597
14607
  }
14598
14608
  await options.voice.setVoiceRepliesEnabled(enabled);
14599
- return refreshScoutElectronShellState(options);
14609
+ return refreshScoutDesktopShellState(options);
14600
14610
  }
14601
14611
 
14602
14612
  // apps/desktop/src/app/host/scout-host-services.ts
@@ -14606,7 +14616,7 @@ function resolveCurrentDirectory3(input) {
14606
14616
  function createAppInfoServices(input = {}) {
14607
14617
  const appInfo = input.appInfo;
14608
14618
  return {
14609
- getAppInfo: () => appInfo ?? getScoutElectronAppInfo()
14619
+ getAppInfo: () => appInfo ?? getScoutDesktopAppInfo()
14610
14620
  };
14611
14621
  }
14612
14622
  function createDesktopStateServices(input = {}) {
@@ -14614,13 +14624,13 @@ function createDesktopStateServices(input = {}) {
14614
14624
  const appInfo = input.appInfo;
14615
14625
  const voice = input.voice;
14616
14626
  return {
14617
- getServicesState: () => getScoutElectronServicesState({ currentDirectory, appInfo, voice }),
14618
- getHomeState: () => getScoutElectronHomeState({ currentDirectory, appInfo, voice }),
14619
- getMessagesWorkspaceState: () => getScoutElectronMessagesWorkspaceState({ currentDirectory, appInfo, voice }),
14620
- getRelayShellPatch: () => getScoutElectronRelayShellPatch({ currentDirectory, appInfo, voice }),
14621
- getShellState: () => getScoutElectronShellState({ currentDirectory, appInfo, voice }),
14622
- refreshRelayShellPatch: () => refreshScoutElectronRelayShellPatch({ currentDirectory, appInfo, voice }),
14623
- refreshShellState: () => refreshScoutElectronShellState({ currentDirectory, appInfo, voice })
14627
+ getServicesState: () => getScoutDesktopServicesState({ currentDirectory, appInfo, voice }),
14628
+ getHomeState: () => getScoutDesktopHomeState({ currentDirectory, appInfo, voice }),
14629
+ getMessagesWorkspaceState: () => getScoutDesktopMessagesWorkspaceState({ currentDirectory, appInfo, voice }),
14630
+ getRelayShellPatch: () => getScoutDesktopRelayShellPatch({ currentDirectory, appInfo, voice }),
14631
+ getShellState: () => getScoutDesktopShellState({ currentDirectory, appInfo, voice }),
14632
+ refreshRelayShellPatch: () => refreshScoutDesktopRelayShellPatch({ currentDirectory, appInfo, voice }),
14633
+ refreshShellState: () => refreshScoutDesktopShellState({ currentDirectory, appInfo, voice })
14624
14634
  };
14625
14635
  }
14626
14636
  function createSettingsAdminServices(input = {}) {
@@ -14628,38 +14638,38 @@ function createSettingsAdminServices(input = {}) {
14628
14638
  const appInfo = input.appInfo;
14629
14639
  const settings = input.settings ?? {};
14630
14640
  return {
14631
- getAppSettings: () => getScoutElectronAppSettings(currentDirectory, settings),
14632
- refreshSettingsInventory: () => refreshScoutElectronAppSettingsInventory(currentDirectory, settings),
14633
- updateAppSettings: (nextInput) => updateScoutElectronAppSettings(nextInput, currentDirectory, settings),
14634
- retireProject: (projectRoot) => retireScoutElectronProject(projectRoot, currentDirectory, settings),
14635
- restoreProject: (projectRoot) => restoreScoutElectronProject(projectRoot, currentDirectory, settings),
14636
- runOnboardingCommand: (nextInput) => runScoutElectronOnboardingCommand(nextInput, currentDirectory),
14637
- skipOnboarding: () => skipScoutElectronOnboarding(currentDirectory, settings),
14638
- restartOnboarding: () => restartScoutElectronOnboarding(currentDirectory, settings),
14639
- getAgentConfig: (agentId) => getScoutElectronAgentConfig(agentId),
14640
- updateAgentConfig: (nextInput) => updateScoutElectronAgentConfig(nextInput),
14641
- createAgent: (nextInput) => createScoutElectronAgent(nextInput, { currentDirectory, appInfo }),
14642
- getPhonePreparation: () => getScoutElectronPhonePreparation(currentDirectory),
14643
- updatePhonePreparation: (nextInput) => updateScoutElectronPhonePreparation(nextInput, currentDirectory)
14641
+ getAppSettings: () => getScoutDesktopAppSettings(currentDirectory, settings),
14642
+ refreshSettingsInventory: () => refreshScoutDesktopAppSettingsInventory(currentDirectory, settings),
14643
+ updateAppSettings: (nextInput) => updateScoutDesktopAppSettings(nextInput, currentDirectory, settings),
14644
+ retireProject: (projectRoot) => retireScoutDesktopProject(projectRoot, currentDirectory, settings),
14645
+ restoreProject: (projectRoot) => restoreScoutDesktopProject(projectRoot, currentDirectory, settings),
14646
+ runOnboardingCommand: (nextInput) => runScoutDesktopOnboardingCommand(nextInput, currentDirectory),
14647
+ skipOnboarding: () => skipScoutDesktopOnboarding(currentDirectory, settings),
14648
+ restartOnboarding: () => restartScoutDesktopOnboarding(currentDirectory, settings),
14649
+ getAgentConfig: (agentId) => getScoutDesktopAgentConfig(agentId),
14650
+ updateAgentConfig: (nextInput) => updateScoutDesktopAgentConfig(nextInput),
14651
+ createAgent: (nextInput) => createScoutDesktopAgent(nextInput, { currentDirectory, appInfo }),
14652
+ getPhonePreparation: () => getScoutDesktopPhonePreparation(currentDirectory),
14653
+ updatePhonePreparation: (nextInput) => updateScoutDesktopPhonePreparation(nextInput, currentDirectory)
14644
14654
  };
14645
14655
  }
14646
14656
  function createNativeHostServices(input = {}) {
14647
14657
  const host = input.host ?? {};
14648
14658
  return {
14649
- pickDirectory: () => pickScoutElectronDirectory(host),
14650
- reloadApp: () => reloadScoutElectronApp(host),
14651
- quitApp: () => quitScoutElectronApp(host),
14652
- revealPath: (filePath) => revealScoutElectronPath(filePath, host)
14659
+ pickDirectory: () => pickScoutHostDirectory(host),
14660
+ reloadApp: () => reloadScoutHostApp(host),
14661
+ quitApp: () => quitScoutHostApp(host),
14662
+ revealPath: (filePath) => revealScoutHostPath(filePath, host)
14653
14663
  };
14654
14664
  }
14655
14665
  function createPairingServices(input = {}) {
14656
14666
  const currentDirectory = resolveCurrentDirectory3(input.currentDirectory);
14657
14667
  return {
14658
- getPairingState: () => getScoutElectronPairingState(currentDirectory),
14659
- refreshPairingState: () => refreshScoutElectronPairingState(currentDirectory),
14660
- controlPairingService: (action) => controlScoutElectronPairingService(action, currentDirectory),
14661
- updatePairingConfig: (nextInput) => updateScoutElectronPairingConfig(nextInput, currentDirectory),
14662
- decidePairingApproval: (nextInput) => decideScoutElectronPairingApproval(nextInput, currentDirectory)
14668
+ getPairingState: () => getScoutDesktopPairingState(currentDirectory),
14669
+ refreshPairingState: () => refreshScoutDesktopPairingState(currentDirectory),
14670
+ controlPairingService: (action) => controlScoutDesktopPairingService(action, currentDirectory),
14671
+ updatePairingConfig: (nextInput) => updateScoutDesktopPairingConfig(nextInput, currentDirectory),
14672
+ decidePairingApproval: (nextInput) => decideScoutDesktopPairingApproval(nextInput, currentDirectory)
14663
14673
  };
14664
14674
  }
14665
14675
  function createRelayActivityServices(input = {}) {
@@ -14669,17 +14679,17 @@ function createRelayActivityServices(input = {}) {
14669
14679
  const agentSessionHost = input.agentSessionHost;
14670
14680
  return {
14671
14681
  restartAgent: async (nextInput) => {
14672
- await restartScoutElectronAgent(nextInput, { currentDirectory, appInfo });
14673
- return refreshScoutElectronShellState({ currentDirectory, appInfo, voice });
14682
+ await restartScoutDesktopAgent(nextInput, { currentDirectory, appInfo });
14683
+ return refreshScoutDesktopShellState({ currentDirectory, appInfo, voice });
14674
14684
  },
14675
- sendRelayMessage: (nextInput) => sendScoutElectronRelayMessage(nextInput, { currentDirectory, appInfo }),
14685
+ sendRelayMessage: (nextInput) => sendScoutDesktopRelayMessage(nextInput, { currentDirectory, appInfo }),
14676
14686
  getKeepAliveState: () => getScoutKeepAliveState(),
14677
14687
  acquireKeepAliveLease: (nextInput) => acquireScoutKeepAliveLease(nextInput),
14678
14688
  releaseKeepAliveLease: (nextInput) => releaseScoutKeepAliveLease(nextInput.leaseId),
14679
- getAgentSession: (agentId) => getScoutElectronAgentSession(agentId),
14680
- openAgentSession: (agentId) => openScoutElectronAgentSession(agentId, agentSessionHost),
14681
- toggleVoiceCapture: () => toggleScoutElectronVoiceCapture({ currentDirectory, appInfo, voice }),
14682
- setVoiceRepliesEnabled: (enabled) => setScoutElectronVoiceRepliesEnabled(enabled, { currentDirectory, appInfo, voice })
14689
+ getAgentSession: (agentId) => getScoutDesktopAgentSession(agentId),
14690
+ openAgentSession: (agentId) => openScoutDesktopAgentSession(agentId, agentSessionHost),
14691
+ toggleVoiceCapture: () => toggleScoutDesktopVoiceCapture({ currentDirectory, appInfo, voice }),
14692
+ setVoiceRepliesEnabled: (enabled) => setScoutDesktopVoiceRepliesEnabled(enabled, { currentDirectory, appInfo, voice })
14683
14693
  };
14684
14694
  }
14685
14695
  function createBrokerAdminServices(input = {}) {
@@ -14689,25 +14699,25 @@ function createBrokerAdminServices(input = {}) {
14689
14699
  const settings = input.settings ?? {};
14690
14700
  return {
14691
14701
  controlBroker: async (action) => {
14692
- await controlScoutElectronBroker(action, {
14702
+ await controlScoutDesktopBroker(action, {
14693
14703
  currentDirectory,
14694
14704
  appInfo,
14695
14705
  telegram: {
14696
14706
  refreshConfiguration: settings.refreshTelegramConfiguration
14697
14707
  }
14698
14708
  });
14699
- return refreshScoutElectronShellState({ currentDirectory, appInfo, voice });
14709
+ return refreshScoutDesktopShellState({ currentDirectory, appInfo, voice });
14700
14710
  }
14701
14711
  };
14702
14712
  }
14703
14713
  function createDiagnosticsServices(input = {}) {
14704
14714
  const currentDirectory = resolveCurrentDirectory3(input.currentDirectory);
14705
14715
  return {
14706
- getLogCatalog: () => getScoutElectronLogCatalog(currentDirectory),
14707
- getBrokerInspector: () => getScoutElectronBrokerInspector(),
14708
- getFeedbackBundle: () => getScoutElectronFeedbackBundle(currentDirectory),
14709
- submitFeedbackReport: (nextInput) => submitScoutElectronFeedbackReport(nextInput, currentDirectory),
14710
- readLogSource: (nextInput) => readScoutElectronLogSource(nextInput, currentDirectory)
14716
+ getLogCatalog: () => getScoutDesktopLogCatalog(currentDirectory),
14717
+ getBrokerInspector: () => getScoutDesktopBrokerInspector(),
14718
+ getFeedbackBundle: () => getScoutDesktopFeedbackBundle(currentDirectory),
14719
+ submitFeedbackReport: (nextInput) => submitScoutDesktopFeedbackReport(nextInput, currentDirectory),
14720
+ readLogSource: (nextInput) => readScoutDesktopLogSource(nextInput, currentDirectory)
14711
14721
  };
14712
14722
  }
14713
14723
  function createScoutHostServices(input = {}) {
@@ -15695,7 +15705,7 @@ function registerScoutWebAssets(app, options) {
15695
15705
 
15696
15706
  // apps/desktop/src/server/create-scout-web-server.ts
15697
15707
  function defaultMonorepoStaticClientRoot(moduleUrl = import.meta.url) {
15698
- return resolve7(dirname9(fileURLToPath7(moduleUrl)), "../../../../packages/electron-app/dist/client");
15708
+ return resolve7(dirname9(fileURLToPath7(moduleUrl)), "../../dist/client");
15699
15709
  }
15700
15710
  function parseOptionalPositiveInt(value, fallback) {
15701
15711
  if (typeof value !== "string" || value.trim().length === 0) {