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.
package/dist/pi-outpost.mjs
CHANGED
|
@@ -186832,7 +186832,12 @@ var RpcRuntime = class {
|
|
|
186832
186832
|
...this.streaming ? { streamingBehavior: "steer" } : {}
|
|
186833
186833
|
};
|
|
186834
186834
|
try {
|
|
186835
|
-
|
|
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 =
|
|
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.
|
|
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 =
|
|
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 });
|
package/dist/pi-outpost.sea.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/pi-outpost.sea.mjs
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34848854 bytes
|
|
4
|
+
sha256: 5babf7f1c43e97a3f4ffcecfc02d196006df3774a7371c5dca946a91c838c222
|
package/dist/sea-prep.blob
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/sea-prep.blob
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34847912 bytes
|
|
4
|
+
sha256: 3a9b1f9f073b34548f877c87912ce68d68bbee2867df896167f8373fdb1a1867
|