@songsid/agend 2.3.5-alpha.13 → 2.3.5-alpha.14

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.
Files changed (39) hide show
  1. package/dist/agent-export.d.ts +74 -0
  2. package/dist/agent-export.js +362 -0
  3. package/dist/agent-export.js.map +1 -0
  4. package/dist/build-provenance.json +1 -1
  5. package/dist/cli.js +27 -12
  6. package/dist/cli.js.map +1 -1
  7. package/dist/fleet-manager.d.ts +7 -0
  8. package/dist/fleet-manager.js +20 -1
  9. package/dist/fleet-manager.js.map +1 -1
  10. package/dist/hub/join/local.d.ts +1 -0
  11. package/dist/hub/join/local.js +8 -3
  12. package/dist/hub/join/local.js.map +1 -1
  13. package/dist/install-user-systemd.d.ts +20 -0
  14. package/dist/install-user-systemd.js +55 -0
  15. package/dist/install-user-systemd.js.map +1 -0
  16. package/dist/linux-launchers.d.ts +88 -0
  17. package/dist/linux-launchers.js +296 -0
  18. package/dist/linux-launchers.js.map +1 -0
  19. package/dist/locale.js +85 -2
  20. package/dist/locale.js.map +1 -1
  21. package/dist/service-installer.js +11 -2
  22. package/dist/service-installer.js.map +1 -1
  23. package/dist/ui/agent-export-dialog.js +169 -0
  24. package/dist/ui/agent-export-strings.js +81 -0
  25. package/dist/ui/settings-dialogs.js +3 -1
  26. package/dist/update-dispatch.d.ts +12 -0
  27. package/dist/update-dispatch.js +11 -0
  28. package/dist/update-dispatch.js.map +1 -1
  29. package/dist/web-api.d.ts +2 -0
  30. package/dist/web-api.js +49 -0
  31. package/dist/web-api.js.map +1 -1
  32. package/dist/windows-shortcuts.d.ts +29 -5
  33. package/dist/windows-shortcuts.js +52 -9
  34. package/dist/windows-shortcuts.js.map +1 -1
  35. package/launcher/agend-install.cjs +7 -1
  36. package/package.json +1 -1
  37. package/templates/icons/agend-restart.ico +0 -0
  38. package/templates/icons/agend.ico +0 -0
  39. package/templates/windows-shortcuts.ps1 +45 -12
@@ -598,6 +598,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
598
598
  /** Native CLIs are headless: the manager owns the durable delivery generation instead of a tmux daemon. */
599
599
  private deliveryBootId;
600
600
  private rawFleetConfig;
601
+ /**
602
+ * AGEND-163: one agent's own saved settings, as fleet.yaml has them — not `fleetConfig.instances[name]`, which has the fleet's
603
+ * defaults merged in. Undefined when fleet.yaml has no such agent.
604
+ */
605
+ rawInstanceConfig(name: string): Record<string, unknown> | undefined;
601
606
  /**
602
607
  * S-51 (#3095, experimental, off by default): the Hub runtime. src/hub/runtime.js is imported only once a Hub switch
603
608
  * (hub.enabled / hub_member.enabled) is on; while both are off nothing Hub-related loads, opens or listens.
@@ -5636,6 +5641,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
5636
5641
  * What the install's own channel offers: the target version and whether it came from that channel's dist-tag. Throws
5637
5642
  * when npm cannot be asked (the callers decide what a failed look means).
5638
5643
  */
5644
+ /** Tests only: where lookUpUpdateTarget looks for npm (M-2858); unset in production (the running install, process.env). */
5645
+ private updateNpmProbe?;
5639
5646
  private lookUpUpdateTarget;
5640
5647
  /** M-2738: record a look's answer for the web — the same offer the notice below would make. */
5641
5648
  private recordUpdateCheck;
@@ -2564,6 +2564,17 @@ export class FleetManager {
2564
2564
  return this.daemons.get(name)?.bootId ?? null;
2565
2565
  }
2566
2566
  rawFleetConfig = {};
2567
+ /**
2568
+ * AGEND-163: one agent's own saved settings, as fleet.yaml has them — not `fleetConfig.instances[name]`, which has the fleet's
2569
+ * defaults merged in. Undefined when fleet.yaml has no such agent.
2570
+ */
2571
+ rawInstanceConfig(name) {
2572
+ const instances = this.rawFleetConfig.instances;
2573
+ if (!instances || typeof instances !== "object" || !Object.hasOwn(instances, name))
2574
+ return undefined;
2575
+ const own = instances[name];
2576
+ return own && typeof own === "object" && !Array.isArray(own) ? own : undefined;
2577
+ }
2567
2578
  /**
2568
2579
  * S-51 (#3095, experimental, off by default): the Hub runtime. src/hub/runtime.js is imported only once a Hub switch
2569
2580
  * (hub.enabled / hub_member.enabled) is on; while both are off nothing Hub-related loads, opens or listens.
@@ -29285,6 +29296,8 @@ export class FleetManager {
29285
29296
  * What the install's own channel offers: the target version and whether it came from that channel's dist-tag. Throws
29286
29297
  * when npm cannot be asked (the callers decide what a failed look means).
29287
29298
  */
29299
+ /** Tests only: where lookUpUpdateTarget looks for npm (M-2858); unset in production (the running install, process.env). */
29300
+ updateNpmProbe;
29288
29301
  async lookUpUpdateTarget(currentVersion) {
29289
29302
  // Both npm lookups are async: as execSync they froze the fleet event loop for
29290
29303
  // up to 15s each, and on a beta build BOTH ran — 30s with no WATCHDOG ping,
@@ -29293,8 +29306,14 @@ export class FleetManager {
29293
29306
  const { execFile } = await import("./child-process.js");
29294
29307
  const { promisify } = await import("node:util");
29295
29308
  const execFileP = promisify(execFile);
29309
+ // M-2858: the npm that manages this install, also when the service's PATH has none (the alpha.13 rehearsal: with
29310
+ // only ~/.volta/bin/npm, nothing was ever offered and web Update answered 409 nothing_to_install).
29311
+ const { npmEnvForUpdate } = await import("./update-dispatch.js");
29312
+ const npmEnv = await npmEnvForUpdate(this.updateNpmProbe?.deps, this.updateNpmProbe?.env);
29313
+ if (!npmEnv.ok)
29314
+ throw new Error(npmEnv.reason);
29296
29315
  const npmVersion = async (spec) => {
29297
- const { stdout } = await execFileP("npm", ["view", spec, "version"], { timeout: 15_000 });
29316
+ const { stdout } = await execFileP("npm", ["view", spec, "version"], { timeout: 15_000, env: npmEnv.env });
29298
29317
  return stdout.toString().trim();
29299
29318
  };
29300
29319
  const latest = await npmVersion("@songsid/agend");