pi-outpost 0.32.0 → 0.32.2

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.
@@ -186832,7 +186832,12 @@ var RpcRuntime = class {
186832
186832
  ...this.streaming ? { streamingBehavior: "steer" } : {}
186833
186833
  };
186834
186834
  try {
186835
- await this.command("prompt", payload);
186835
+ try {
186836
+ await this.command("prompt", payload);
186837
+ } catch (error) {
186838
+ if (payload.streamingBehavior !== void 0 || !isSuspendedQueueRefusal(error)) throw error;
186839
+ await this.command("prompt", { ...payload, streamingBehavior: "followUp" });
186840
+ }
186836
186841
  } catch (error) {
186837
186842
  options?.onAccepted?.(false);
186838
186843
  throw error;
@@ -186968,6 +186973,9 @@ function isUnknownCommand(error, command) {
186968
186973
  const message = error.message.toLowerCase();
186969
186974
  return message.includes(command.toLowerCase()) && ABSENT_COMMAND_WORDS.test(message);
186970
186975
  }
186976
+ function isSuspendedQueueRefusal(error) {
186977
+ return error instanceof Error && error.message.includes("queued session input is suspended");
186978
+ }
186971
186979
 
186972
186980
  // ../server/src/structuredExchangeTool.ts
186973
186981
  var DESCRIPTION8 = [
@@ -189562,6 +189570,12 @@ var UPLOADS_DIRECTORY = "uploads";
189562
189570
  function isPdfPath(relPath) {
189563
189571
  return path31.extname(relPath).toLowerCase() === ".pdf";
189564
189572
  }
189573
+ function isRawImagePath(relPath) {
189574
+ return /^\.(png|jpe?g|gif|webp|svg|avif)$/.test(path31.extname(relPath).toLowerCase());
189575
+ }
189576
+ function rawFileLimit(relPath, pdfMaxBytes) {
189577
+ return isPdfPath(relPath) || isRawImagePath(relPath) ? pdfMaxBytes : MAX_PREVIEW_BYTES;
189578
+ }
189565
189579
  var FileBrowserError = class extends Error {
189566
189580
  constructor(reason, message) {
189567
189581
  super(message);
@@ -189695,7 +189709,7 @@ async function readFileRaw(root2, relPath, pdfMaxBytes = MAX_PREVIEW_BYTES) {
189695
189709
  if (!stat.isFile()) {
189696
189710
  throw new FileBrowserError("not-found", `"${relPath}" is not a file`);
189697
189711
  }
189698
- const limit = isPdfPath(relPath) ? pdfMaxBytes : MAX_PREVIEW_BYTES;
189712
+ const limit = rawFileLimit(relPath, pdfMaxBytes);
189699
189713
  if (stat.size > limit) {
189700
189714
  const mb = (limit / (1024 * 1024)).toFixed(0);
189701
189715
  throw new FileBrowserError("too-large", `File is larger than the ${mb} MB limit`);
@@ -200594,7 +200608,7 @@ function cacheControlFor(url) {
200594
200608
  }
200595
200609
 
200596
200610
  // ../server/src/index.ts
200597
- var VERSION2 = true ? "0.32.0" : "dev";
200611
+ var VERSION2 = true ? "0.32.2" : "dev";
200598
200612
  var PI_SDK_VERSION = true ? "0.87.1" : readInstalledPiSdkVersion();
200599
200613
  var LAUNCH_DIR = process.env.INIT_CWD ?? process.cwd();
200600
200614
  function complain(error) {
@@ -201024,7 +201038,7 @@ app.get("/files/raw", async (req, reply) => {
201024
201038
  } catch (error) {
201025
201039
  if (error instanceof FileBrowserError) {
201026
201040
  if (error.reason === "too-large") {
201027
- const limit = isPdfPath(relPath) ? config.pdf.maxBytes : MAX_PREVIEW_BYTES;
201041
+ const limit = rawFileLimit(relPath, config.pdf.maxBytes);
201028
201042
  return reply.code(413).send({ error: error.reason, limit });
201029
201043
  }
201030
201044
  return reply.code(404).send({ error: error.reason });
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/pi-outpost.sea.mjs
3
- size: 34841783 bytes
4
- sha256: 6f2b54436650b228ef9cbca307edb250423962c03b4adec24013ff8a178d1767
3
+ size: 34848854 bytes
4
+ sha256: 5babf7f1c43e97a3f4ffcecfc02d196006df3774a7371c5dca946a91c838c222
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sea-prep.blob
3
- size: 34840841 bytes
4
- sha256: d13f89436c6460841fca234453e88f713ed0d3a4a643224cb7708d8922deb05b
3
+ size: 34847912 bytes
4
+ sha256: 3a9b1f9f073b34548f877c87912ce68d68bbee2867df896167f8373fdb1a1867
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-outpost",
3
- "version": "0.32.0",
3
+ "version": "0.32.2",
4
4
  "type": "module",
5
5
  "description": "A web interface for the pi coding agent: a browser chat UI you run with npx — no clone, no build.",
6
6
  "license": "MIT",