@pipod/cli 0.1.22 → 0.1.24

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/cli.js CHANGED
@@ -6329,8 +6329,8 @@ function formatUptime(ms) {
6329
6329
  }
6330
6330
 
6331
6331
  // src/shim/agentd.ts
6332
- var SHIM_VERSION = "13";
6333
- var PREVIOUS_SHIM_VERSION = "12";
6332
+ var SHIM_VERSION = "14";
6333
+ var PREVIOUS_SHIM_VERSION = "13";
6334
6334
  var SHIM_LOG_PATH = "/tmp/pi-pod-agentd.log";
6335
6335
 
6336
6336
  // src/shim/pi-pod-ext.ts
@@ -6417,20 +6417,49 @@ function verifyHelloEnvelope(hello, session) {
6417
6417
  const compatibilityWarning = shimCompatibilityWarning(hello.shimVersion);
6418
6418
  if (compatibilityWarning) warn(compatibilityWarning);
6419
6419
  }
6420
+ function piVersionDiscoveryError(hello) {
6421
+ let reason = "the supervisor could not identify the running Pi";
6422
+ switch (hello.piVersionError?.code) {
6423
+ case "probe_timeout":
6424
+ reason = "the custom Pi command's version check timed out";
6425
+ break;
6426
+ case "probe_failed":
6427
+ reason = "the custom Pi command's version check failed";
6428
+ break;
6429
+ case "invalid_version":
6430
+ reason = "the custom Pi command returned an invalid version";
6431
+ break;
6432
+ case "invalid_metadata":
6433
+ reason = "the installed Pi package metadata is invalid";
6434
+ break;
6435
+ case "metadata_unavailable":
6436
+ reason = "the installed Pi package metadata could not be read";
6437
+ break;
6438
+ case "installation_changed":
6439
+ reason = "the Pi installation changed after this session started";
6440
+ break;
6441
+ case "executable_unavailable":
6442
+ reason = "the Pi executable could not be found or accessed";
6443
+ break;
6444
+ }
6445
+ const hint2 = Number(hello.shimVersion) < 14 ? "this pod's older supervisor cached a failed lookup; once the session is idle, stop and attach to the same pod to refresh it \u2014 workspace files are kept" : hello.piVersionError?.retryable ? "the pod was left running; attach again to retry version discovery without restarting it" : "the pod was left running; check its Pi installation, then restart the pod once idle \u2014 workspace files are kept";
6446
+ return new PiPodError(`could not verify the pod's pi version: ${reason}`, { hint: hint2 });
6447
+ }
6420
6448
  function verifyHello(hello, session) {
6421
6449
  verifyHelloEnvelope(hello, session);
6422
6450
  const bundled = bundledPiVersion();
6423
6451
  if (hello.piVersion === bundled) return;
6424
6452
  session.close();
6425
6453
  const comparison = comparePiVersions(hello.piVersion, bundled);
6454
+ if (comparison === null) throw piVersionDiscoveryError(hello);
6426
6455
  const base = describeVersionSkew(hello.piVersion, bundled);
6427
- if (comparison !== null && comparison > 0) {
6456
+ if (comparison > 0) {
6428
6457
  throw new PiPodError("pi version skew: the pod runs a newer pi than this launcher", {
6429
6458
  hint: `${base} \u2014 run \`pipod update\`, then attach again; pi pod will not downgrade the pod`
6430
6459
  });
6431
6460
  }
6432
6461
  throw new PiPodError("pi version skew between this launcher and the pod", {
6433
- hint: comparison === null ? `${base} \u2014 the reported version is unknown or malformed, so the session is refused` : `${base} \u2014 the session is refused until the pod is updated automatically`
6462
+ hint: `${base} \u2014 the session is refused until the pod is updated automatically`
6434
6463
  });
6435
6464
  }
6436
6465
 
@@ -8117,7 +8146,9 @@ var UI_SETTINGS_SCHEMA = {
8117
8146
  warnings: subObject({ anthropicExtraUsage: bool }),
8118
8147
  tuiMode: oneOf("regular", "fullscreen"),
8119
8148
  fullscreenExitOutput: oneOf("transcript", "resume-hint"),
8120
- fullscreenScrollbar: oneOf("hidden", "auto", "always")
8149
+ fullscreenScrollbar: oneOf("hidden", "auto", "always"),
8150
+ fullscreenCopyOnSelect: bool,
8151
+ fullscreenWheelScrollLines: (value) => value === "auto" ? value : intIn(1, 100)(value)
8121
8152
  };
8122
8153
  function validateUiSettings(value) {
8123
8154
  if (!isPlainObject3(value)) return {};
@@ -13867,7 +13898,8 @@ async function ensureExactPi(opts) {
13867
13898
  }
13868
13899
  const comparison = comparePiVersions(hello.piVersion, bundled);
13869
13900
  if (comparison === null) {
13870
- failClosed(opts.rpc, `the pod reported an unknown or malformed pi version (${hello.piVersion})`);
13901
+ opts.rpc.close();
13902
+ throw piVersionDiscoveryError(hello);
13871
13903
  }
13872
13904
  if (comparison > 0) {
13873
13905
  opts.rpc.close();
@@ -14672,7 +14704,7 @@ ${choices.join("\n")}`,
14672
14704
  const { wirePodChords } = await import("./chords-SOJBLC6R.js");
14673
14705
  const { wireKeyEncodingGuard } = await import("./key-encoding-guard-6UOKKTJQ.js");
14674
14706
  const { wireKeyRepeatGuard } = await import("./key-repeat-guard-7OVKW5KD.js");
14675
- const { guardStdinFragments } = await import("./stdin-fragment-guard-SPIJC7GT.js");
14707
+ const { guardStdinFragments } = await import("./stdin-fragment-guard-DHHVSIXM.js");
14676
14708
  guardStdinFragments();
14677
14709
  const chords = context.config.pi.chords;
14678
14710
  runtime.bridge.setOnUiBound(() => {