@getmonoceros/workbench 1.33.3 → 1.33.5

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
@@ -2239,6 +2239,10 @@ function runtimeSupportsHostKeyPinning(version) {
2239
2239
  if (!version) return false;
2240
2240
  return compareRuntimeVersions(version, MIN_RUNTIME_FOR_HOST_KEY_PINNING) >= 0;
2241
2241
  }
2242
+ function runtimeSupportsEntrypointSshd(version) {
2243
+ if (!version) return false;
2244
+ return compareRuntimeVersions(version, MIN_RUNTIME_FOR_ENTRYPOINT_SSHD) >= 0;
2245
+ }
2242
2246
  function descriptorOptionDefaults(options) {
2243
2247
  const out = {};
2244
2248
  for (const [key, spec] of Object.entries(options)) {
@@ -2315,8 +2319,14 @@ function expandCuratedService(name) {
2315
2319
  // Bake the connection-env templates into the yml (suffix → template) so
2316
2320
  // they travel with the service: a renamed/duplicated instance keeps them,
2317
2321
  // and `serviceConnectionEnv` prefixes by the instance's current name.
2318
- ...def.connectionEnv ? { connectionEnv: { ...def.connectionEnv } } : {},
2319
- restart: "unless-stopped"
2322
+ ...def.connectionEnv ? { connectionEnv: { ...def.connectionEnv } } : {}
2323
+ // No `restart:` default on purpose (issue #19). The workspace container
2324
+ // carries no restart policy, so on a Docker/host restart it stays down
2325
+ // until `monoceros start`; defaulting services to `unless-stopped` made
2326
+ // them auto-start ALONE, without the workbench they belong to. Leaving it
2327
+ // off keeps the whole compose group's restart behavior uniform - nothing
2328
+ // comes back on its own. `restart` stays a per-service opt-in in the yml
2329
+ // (schema.ts) for builders who deliberately want a policy.
2320
2330
  };
2321
2331
  }
2322
2332
  function curatedServiceEnvDefaults(name) {
@@ -2365,7 +2375,7 @@ function deriveServiceName(image) {
2365
2375
  const noTag = lastSegment.split("@")[0].split(":")[0];
2366
2376
  return noTag.toLowerCase().replace(/[^a-z0-9_-]/g, "-");
2367
2377
  }
2368
- var DEFAULT_BASE_IMAGE, override, BASE_IMAGE, RUNTIME_IMAGE_REPO, DEFAULT_RUNTIME_VERSION, MIN_RUNTIME_FOR_SSH_ATTACH, MIN_RUNTIME_FOR_HOST_KEY_PINNING, MIN_RUNTIME_FOR_BROWSER_BRIDGE, DESCRIPTORS, BUILTIN_LANGUAGES, LANGUAGE_CATALOG, LANGUAGE_SPEC_RE, SERVICE_CATALOG, DEFERRED_SERVICE_PROFILE;
2378
+ var DEFAULT_BASE_IMAGE, override, BASE_IMAGE, RUNTIME_IMAGE_REPO, DEFAULT_RUNTIME_VERSION, MIN_RUNTIME_FOR_SSH_ATTACH, MIN_RUNTIME_FOR_HOST_KEY_PINNING, MIN_RUNTIME_FOR_ENTRYPOINT_SSHD, MIN_RUNTIME_FOR_BROWSER_BRIDGE, DESCRIPTORS, BUILTIN_LANGUAGES, LANGUAGE_CATALOG, LANGUAGE_SPEC_RE, SERVICE_CATALOG, DEFERRED_SERVICE_PROFILE;
2369
2379
  var init_catalog = __esm({
2370
2380
  "src/create/catalog.ts"() {
2371
2381
  "use strict";
@@ -2374,7 +2384,7 @@ var init_catalog = __esm({
2374
2384
  override = process.env.MONOCEROS_BASE_IMAGE_OVERRIDE?.trim();
2375
2385
  BASE_IMAGE = override && override.length > 0 ? override : DEFAULT_BASE_IMAGE;
2376
2386
  RUNTIME_IMAGE_REPO = "ghcr.io/getmonoceros/monoceros-runtime";
2377
- DEFAULT_RUNTIME_VERSION = true ? "1.3.5" : readFileSync3(
2387
+ DEFAULT_RUNTIME_VERSION = true ? "1.3.6" : readFileSync3(
2378
2388
  fileURLToPath2(
2379
2389
  new URL("../../../../images/runtime/VERSION", import.meta.url)
2380
2390
  ),
@@ -2382,6 +2392,7 @@ var init_catalog = __esm({
2382
2392
  ).trim();
2383
2393
  MIN_RUNTIME_FOR_SSH_ATTACH = "1.2.0";
2384
2394
  MIN_RUNTIME_FOR_HOST_KEY_PINNING = "1.3.5";
2395
+ MIN_RUNTIME_FOR_ENTRYPOINT_SSHD = "1.3.6";
2385
2396
  MIN_RUNTIME_FOR_BROWSER_BRIDGE = "1.3.3";
2386
2397
  DESCRIPTORS = loadDescriptorCatalogSync();
2387
2398
  BUILTIN_LANGUAGES = new Set(
@@ -2488,7 +2499,8 @@ function renderCustomService(name, image) {
2488
2499
  " - rel/host/path:/in/container:ro",
2489
2500
  " healthcheck:",
2490
2501
  " test: curl -f http://localhost:8080/health",
2491
- " restart: unless-stopped"
2502
+ " restart: unless-stopped # optional; off by default so the whole",
2503
+ " # group stays down after a Docker restart"
2492
2504
  ].join("\n");
2493
2505
  return { bodyLines, comment };
2494
2506
  }
@@ -3652,6 +3664,9 @@ function buildDevcontainerJson(opts, dockerMode = "rootful") {
3652
3664
  if (sshBridgePort !== null) {
3653
3665
  runArgs.push("-p", `127.0.0.1:${sshBridgePort}:${sshBridgePort}`);
3654
3666
  }
3667
+ const overrideCommandField = runtimeSupportsEntrypointSshd(
3668
+ opts.runtimeVersion
3669
+ ) ? { overrideCommand: false } : {};
3655
3670
  return {
3656
3671
  name: opts.name,
3657
3672
  image: resolveRuntimeImage(opts.runtimeVersion),
@@ -3662,6 +3677,7 @@ function buildDevcontainerJson(opts, dockerMode = "rootful") {
3662
3677
  forwardPorts: ports,
3663
3678
  postCreateCommand: ".devcontainer/post-create.sh",
3664
3679
  ...sshPostStart,
3680
+ ...overrideCommandField,
3665
3681
  ...containerEnvField ?? {},
3666
3682
  ...featuresField ?? {},
3667
3683
  ...customizationsField ?? {}
@@ -8629,7 +8645,7 @@ var CLI_VERSION;
8629
8645
  var init_version = __esm({
8630
8646
  "src/version.ts"() {
8631
8647
  "use strict";
8632
- CLI_VERSION = true ? "1.33.3" : "dev";
8648
+ CLI_VERSION = true ? "1.33.5" : "dev";
8633
8649
  }
8634
8650
  });
8635
8651