neurastream 0.2.33 → 0.2.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neurastream",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "Guardrails for running many AI coding agents at once: plan queue, blockers, call budgets, provider caps, scoring, merge-verified close.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -1137,7 +1137,11 @@ async function handleMessage(req: Request, login: string, wantsJson: boolean): P
1137
1137
  const files: File[] = [];
1138
1138
  for (const [key, value] of form.entries()) {
1139
1139
  if (key === "text" && typeof value === "string") text = value.trim();
1140
- else if (key === "images" && typeof value !== "string") files.push(value);
1140
+ // A form sent with no file chosen still carries one empty, nameless file part (Bun parses it as a nameless Blob).
1141
+ else if (key === "images" && (value as unknown) instanceof Blob) {
1142
+ const part = value as unknown as File;
1143
+ if (part.size > 0 || Boolean(part.name)) files.push(part);
1144
+ }
1141
1145
  }
1142
1146
  const fail = (error: string): Response => (wantsJson ? jsonFail(error, 400) : textRes(error, 400));
1143
1147
  if (!text && !files.length) return fail("write a text or attach an image");