@mostra/runtime 0.15.0 → 0.15.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/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as readProcess, A as themePageCsp, B as appendEvent, C as jsonResponse, D as defaultPages, E as THEME_BASE, F as finishRun, G as ProtocolServer, H as MAX_FRAME_BYTES, I as markRunning, J as openLedger, K as handler, L as markUnknown, M as createInteraction, N as createEphemeralBus, O as refusalDocument, P as appendRunOutput, Q as readServerFunctions, R as markWaiting, S as isRefusal, T as MADE_WITH_HREF, U as serveWebSocket, V as BINDING_SUBPROTOCOL, W as attachInProcess, X as noFaults, Y as faultsFrom, Z as readFieldCoverage, _ as resetOnClose, a as uninstallService, b as BASE_HEADERS$1, c as resolveHomePath, d as versionIdFor, et as coverageMatcher, f as createLive, g as shellAssetResponse, h as locateShell, i as serviceStatus, j as openRegistry, k as serverPages, l as canonicalRef, m as createGateway, n as startInstance, o as checkPlatform, p as liveMethods, q as holdLock, r as installService, s as platformName, t as runtimeVersion, tt as openFileLog, u as listingDigest, v as Capabilities, w as readJsonObject, x as documentHeaders, y as capabilityKey, z as runState } from "./instance-C7NZDQqj.js";
2
+ import { $ as readProcess, A as themePageCsp, B as appendEvent, C as jsonResponse, D as defaultPages, E as THEME_BASE, F as finishRun, G as ProtocolServer, H as MAX_FRAME_BYTES, I as markRunning, J as openLedger, K as handler, L as markUnknown, M as createInteraction, N as createEphemeralBus, O as refusalDocument, P as appendRunOutput, Q as readServerFunctions, R as markWaiting, S as isRefusal, T as MADE_WITH_HREF, U as serveWebSocket, V as BINDING_SUBPROTOCOL, W as attachInProcess, X as noFaults, Y as faultsFrom, Z as readFieldCoverage, _ as resetOnClose, a as uninstallService, b as BASE_HEADERS$1, c as resolveHomePath, d as versionIdFor, et as coverageMatcher, f as createLive, g as shellAssetResponse, h as locateShell, i as serviceStatus, j as openRegistry, k as serverPages, l as canonicalRef, m as createGateway, n as startInstance, o as checkPlatform, p as liveMethods, q as holdLock, r as installService, s as platformName, t as runtimeVersion, tt as openFileLog, u as listingDigest, v as Capabilities, w as readJsonObject, x as documentHeaders, y as capabilityKey, z as runState } from "./instance-Bw1BxctF.js";
3
3
  import { c as removeTree, s as realPath } from "./files-DGeWuE4I.js";
4
4
  import { d as runtimeRoot, i as ownedDirectory } from "./directories-BLJjeSPD.js";
5
5
  import { createWriteStream, existsSync, linkSync, mkdirSync, readFileSync, renameSync, statSync, statfsSync, writeFileSync } from "node:fs";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as startInstance, t as runtimeVersion } from "./instance-C7NZDQqj.js";
1
+ import { n as startInstance, t as runtimeVersion } from "./instance-Bw1BxctF.js";
2
2
  import { t as connectToSupervisor } from "./child-BmNZ4a70.js";
3
3
  export { connectToSupervisor, runtimeVersion, startInstance };
@@ -13,6 +13,7 @@ import { Duplex, PassThrough, Readable, Writable } from "node:stream";
13
13
  import { access, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, rmdir, stat, unlink, utimes, writeFile } from "node:fs/promises";
14
14
  import { homedir, hostname, networkInterfaces } from "node:os";
15
15
  import semver from "semver";
16
+ import { ACKNOWLEDGED_CLASSES, BUILT_IN_EXPORTERS, CONTRACT_NAMES, PLUGIN_CONTRACTS, RegistryItemSchema, RegistrySchema, checkPluginManifest, formatLicenseExpression, isLicenseRef, licenseTerms, manifestScopes, packageLicense, packageLicenseTerms, parseLicenseExpression, parsePackAddress, spdxLicense, stampServed } from "@mostra/protocol/plugin";
16
17
  import { createInterface } from "node:readline";
17
18
  import * as z from "zod";
18
19
  import { parse as parse$1, parseDocument } from "yaml";
@@ -27,7 +28,6 @@ import { AsyncLocalStorage } from "node:async_hooks";
27
28
  import { defaultWorkspaceRoot, localWorkspace } from "@mostra/mcp";
28
29
  import { WebSocket } from "ws";
29
30
  import { request as request$1 } from "node:https";
30
- import { ACKNOWLEDGED_CLASSES, BUILT_IN_EXPORTERS, CONTRACT_NAMES, PLUGIN_CONTRACTS, RegistryItemSchema, RegistrySchema, checkPluginManifest, formatLicenseExpression, isLicenseRef, licenseTerms, manifestScopes, packageLicense, packageLicenseTerms, parseLicenseExpression, parsePackAddress, spdxLicense, stampServed } from "@mostra/protocol/plugin";
31
31
  import { EnvHttpProxyAgent, fetch as fetch$1 } from "undici";
32
32
  import { Resolver } from "node:dns/promises";
33
33
  //#region src/log.ts
@@ -3795,14 +3795,20 @@ function locatePnpm() {
3795
3795
  dir = parent;
3796
3796
  }
3797
3797
  }
3798
- /** The project settings of a run: the release age, and the packages named exactly (D95). */
3798
+ /**
3799
+ * The extension contracts' packages, which the release age never holds back (D173): Mostra's own
3800
+ * release pipeline publishes them beside the runtime that runs them, so a plugin built on a
3801
+ * contract released today installs today, wherever in its tree the contract is.
3802
+ */
3803
+ const RELEASE_AGE_EXEMPT = Object.values(PLUGIN_CONTRACTS).map((contract) => contract.package);
3804
+ /**
3805
+ * The project settings of a run: the release age, the packages named exactly and the extension
3806
+ * contracts' packages, which it doesn't hold back (D95, D173).
3807
+ */
3799
3808
  function workspaceSettings(releaseAge) {
3800
3809
  if (releaseAge === false) return "minimumReleaseAge: 0\n";
3801
- const lines = [`minimumReleaseAge: ${MINIMUM_RELEASE_AGE_MINUTES}`];
3802
- if (releaseAge.exempt.length > 0) {
3803
- lines.push("minimumReleaseAgeExclude:");
3804
- for (const name of [...new Set(releaseAge.exempt)].sort()) lines.push(` - ${JSON.stringify(name)}`);
3805
- }
3810
+ const lines = [`minimumReleaseAge: ${MINIMUM_RELEASE_AGE_MINUTES}`, "minimumReleaseAgeExclude:"];
3811
+ for (const name of [.../* @__PURE__ */ new Set([...RELEASE_AGE_EXEMPT, ...releaseAge.exempt])].sort()) lines.push(` - ${JSON.stringify(name)}`);
3806
3812
  return `${lines.join("\n")}\n`;
3807
3813
  }
3808
3814
  /** Creates the installer. */
@@ -3952,7 +3958,7 @@ function diagnose(errors, scriptLines, stderr) {
3952
3958
  if (first.code === "ERR_PNPM_NO_OFFLINE_META" || first.code === "ERR_PNPM_NO_OFFLINE_TARBALL") return createDiagnostic("MOSTRA_DEP_OFFLINE", { message: `Mostra is offline and the home's package store doesn't hold ${subject}.` });
3953
3959
  if (UNREACHABLE.test(first.message)) return createDiagnostic("MOSTRA_DEP_OFFLINE", { message: `The package registry can't be reached, so ${subject} can't be installed: ${first.message}` });
3954
3960
  if (first.code === "ERR_PNPM_FETCH_404" || first.code === "ERR_PNPM_NO_MATCHING_VERSION" || first.code === "ERR_PNPM_NO_MATURE_MATCHING_VERSION") {
3955
- const mature = first.code === "ERR_PNPM_FETCH_404" ? "" : " Without an exact version, only releases at least a day old match; a release less than a day old installs when named exactly.";
3961
+ const mature = first.code === "ERR_PNPM_FETCH_404" ? "" : " Without an exact version, only releases at least a day old match: a release less than a day old installs when it is named exactly, and, when it is a dependency of what was named, once it is a day old.";
3956
3962
  return createDiagnostic("MOSTRA_DEP_NOT_FOUND", { message: `The registry has no match for ${subject}: ${first.message}.${mature}` });
3957
3963
  }
3958
3964
  return createDiagnostic("MOSTRA_DEP_INSTALL_FAILED", { message: `Installing ${subject} failed: ${first.message}${output ? `\n${output}` : ""}` });
@@ -26279,4 +26285,4 @@ function sourceDirectory(path) {
26279
26285
  //#endregion
26280
26286
  export { readProcess as $, themePageCsp as A, appendEvent as B, jsonResponse as C, defaultPages as D, THEME_BASE as E, finishRun as F, ProtocolServer as G, MAX_FRAME_BYTES as H, markRunning as I, openLedger as J, handler as K, markUnknown as L, createInteraction as M, createEphemeralBus as N, refusalDocument as O, appendRunOutput as P, readServerFunctions as Q, markWaiting as R, isRefusal as S, MADE_WITH_HREF as T, serveWebSocket as U, BINDING_SUBPROTOCOL as V, attachInProcess as W, noFaults as X, faultsFrom as Y, readFieldCoverage as Z, resetOnClose as _, uninstallService as a, BASE_HEADERS as b, resolveHomePath as c, versionIdFor as d, coverageMatcher as et, createLive as f, shellAssetResponse as g, locateShell as h, serviceStatus as i, openRegistry as j, serverPages as k, canonicalRef as l, createGateway as m, startInstance as n, checkPlatform as o, liveMethods as p, holdLock as q, installService as r, platformName as s, runtimeVersion as t, openFileLog as tt, listingDigest as u, Capabilities as v, readJsonObject as w, documentHeaders as x, capabilityKey as y, runState as z };
26281
26287
 
26282
- //# sourceMappingURL=instance-C7NZDQqj.js.map
26288
+ //# sourceMappingURL=instance-Bw1BxctF.js.map