@mostra/runtime 0.5.0 → 0.6.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/README.md CHANGED
@@ -34,7 +34,8 @@ version. `artifact/create`, `artifact/list` and `artifact/get` complete the auth
34
34
 
35
35
  ## Platforms
36
36
 
37
- macOS and Linux, on x64 and arm64. Elsewhere, including Windows, it stops with
38
- `MOSTRA_PLATFORM_UNSUPPORTED` before touching the home.
37
+ macOS, Linux and Windows, on x64 and arm64. Elsewhere it stops with `MOSTRA_PLATFORM_UNSUPPORTED`
38
+ before touching the home. On Windows the control endpoint is an owner-only named pipe that the
39
+ helper `mostra-win.exe` serves, and every child runs in a Job Object (D150).
39
40
 
40
41
  Part of [Mostra](https://github.com/mostra-dev/mostra), the agent artifact runtime. Apache-2.0.
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as uninstallService, i as serviceStatus, n as startInstance, o as checkPlatform, r as installService, s as resolveHomePath, t as runtimeVersion } from "./instance-CYvNd7mP.js";
2
+ import { a as uninstallService, i as serviceStatus, n as startInstance, o as checkPlatform, r as installService, s as resolveHomePath, t as runtimeVersion } from "./instance-Da8UG_Qd.js";
3
3
  import { s as realPath } from "./files-FygSJIzK.js";
4
4
  import { mkdirSync } from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as startInstance, t as runtimeVersion } from "./instance-CYvNd7mP.js";
1
+ import { n as startInstance, t as runtimeVersion } from "./instance-Da8UG_Qd.js";
2
2
  import { t as connectToSupervisor } from "./child-Chiavhdx.js";
3
3
  export { connectToSupervisor, runtimeVersion, startInstance };
@@ -15163,12 +15163,15 @@ function own(inputs) {
15163
15163
  //#region src/home/platform.ts
15164
15164
  /**
15165
15165
  * The unsupported-platform gate (D35, D146, RT-07). Every entry point calls it before it touches
15166
- * the home: Mostra runs on macOS and Linux, on x64 and arm64, and fails closed elsewhere. Windows
15167
- * (x64 and arm64) is being built (WP-W1 to WP-W3) and runs only behind the development switch
15168
- * `MOSTRA_DEV_WINDOWS=1`, which only Mostra's own CI sets, so no release exposes a partial port.
15169
- * WP-W3 removes the switch.
15166
+ * the home: Mostra runs on macOS, Linux and Windows, on x64 and arm64, and fails closed elsewhere.
15167
+ * Windows was built behind a development switch by WP-W1 to WP-W3, and is supported since WP-W3
15168
+ * like the others.
15170
15169
  */
15171
- const OPERATING_SYSTEMS = ["darwin", "linux"];
15170
+ const OPERATING_SYSTEMS = [
15171
+ "darwin",
15172
+ "linux",
15173
+ "win32"
15174
+ ];
15172
15175
  const ARCHITECTURES = ["x64", "arm64"];
15173
15176
  /** The platform as `<os>-<arch>`, as `InstanceInfo.platform` reports it. */
15174
15177
  function platformName(platform = OS, arch = process.arch) {
@@ -15176,15 +15179,12 @@ function platformName(platform = OS, arch = process.arch) {
15176
15179
  }
15177
15180
  /**
15178
15181
  * Returns `MOSTRA_PLATFORM_UNSUPPORTED` for a platform Mostra doesn't run on, or `undefined` for
15179
- * a supported one. Windows is supported only while `env` sets the development switch to `1`.
15182
+ * a supported one.
15180
15183
  */
15181
- function checkPlatform(platform = OS, arch = process.arch, env = process.env) {
15182
- if (ARCHITECTURES.includes(arch)) {
15183
- if (OPERATING_SYSTEMS.includes(platform)) return void 0;
15184
- if (platform === "win32" && env["MOSTRA_DEV_WINDOWS"] === "1") return void 0;
15185
- }
15184
+ function checkPlatform(platform = OS, arch = process.arch) {
15185
+ if (ARCHITECTURES.includes(arch) && OPERATING_SYSTEMS.includes(platform)) return void 0;
15186
15186
  const name = platform === "win32" ? `Windows (${platformName(platform, arch)})` : platformName(platform, arch);
15187
- return createDiagnostic("MOSTRA_PLATFORM_UNSUPPORTED", { message: `Mostra doesn't run on ${name}; it supports macOS and Linux on x64 and arm64.` });
15187
+ return createDiagnostic("MOSTRA_PLATFORM_UNSUPPORTED", { message: `Mostra doesn't run on ${name}; it supports macOS, Linux and Windows on x64 and arm64.` });
15188
15188
  }
15189
15189
  //#endregion
15190
15190
  //#region src/home/settings.ts
@@ -15511,12 +15511,11 @@ function serviceFor(spec) {
15511
15511
  }
15512
15512
  /**
15513
15513
  * What a Windows task passes on besides the user's logon environment, which Task Scheduler gives
15514
- * it: the development switch while Windows needs it (D150 item 7, until WP-W3), the helper a
15515
- * checkout names, and the locale and time zone, as the POSIX units carry theirs. Nothing secret.
15514
+ * it: the helper a checkout names, and the locale and time zone, as the POSIX units carry theirs.
15515
+ * Nothing secret.
15516
15516
  */
15517
15517
  function windowsServiceVariables(env) {
15518
15518
  return [
15519
- "MOSTRA_DEV_WINDOWS",
15520
15519
  "MOSTRA_WIN_HELPER",
15521
15520
  "LANG",
15522
15521
  "TZ"
@@ -16678,4 +16677,4 @@ function sourceDirectory(path) {
16678
16677
  //#endregion
16679
16678
  export { uninstallService as a, serviceStatus as i, startInstance as n, checkPlatform as o, installService as r, resolveHomePath as s, runtimeVersion as t };
16680
16679
 
16681
- //# sourceMappingURL=instance-CYvNd7mP.js.map
16680
+ //# sourceMappingURL=instance-Da8UG_Qd.js.map