openmates 0.11.0-alpha.4 → 0.11.0-alpha.6

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.
@@ -955,6 +955,7 @@ var CHAT_MODELS = [
955
955
  { id: "claude-haiku-4-5-20251001", name: "Claude Haiku 4.5" },
956
956
  { id: "gpt-5.4", name: "GPT-5.4" },
957
957
  { id: "gpt-oss-120b", name: "GPT-OSS-120b" },
958
+ { id: "gpt-oss-20b", name: "GPT-OSS-20b" },
958
959
  { id: "gemini-3-flash-preview", name: "Gemini 3 Flash" },
959
960
  { id: "gemini-3-pro-image-preview", name: "Gemini 3 Pro" },
960
961
  { id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro" },
@@ -4857,10 +4858,22 @@ function getUploadUrl(apiUrl) {
4857
4858
  }
4858
4859
  return "https://upload.openmates.org";
4859
4860
  }
4861
+ function getUploadOrigin(apiUrl) {
4862
+ try {
4863
+ const url = new URL(apiUrl);
4864
+ if (url.hostname === "localhost") return "http://localhost:5173";
4865
+ if (url.hostname.startsWith("api.")) {
4866
+ return `${url.protocol}//app.${url.hostname.slice(4)}`;
4867
+ }
4868
+ } catch {
4869
+ }
4870
+ return "https://app.openmates.org";
4871
+ }
4860
4872
  async function uploadFile(filePath, session) {
4861
4873
  const filename = basename2(filePath);
4862
4874
  const fileBytes = readFileSync4(filePath);
4863
4875
  const uploadUrl = `${getUploadUrl(session.apiUrl)}/v1/upload/file`;
4876
+ const origin = getUploadOrigin(session.apiUrl);
4864
4877
  const cookies = [];
4865
4878
  if (session.cookies?.auth_refresh_token) {
4866
4879
  cookies.push(`auth_refresh_token=${session.cookies.auth_refresh_token}`);
@@ -4876,6 +4889,7 @@ async function uploadFile(filePath, session) {
4876
4889
  method: "POST",
4877
4890
  body: formData,
4878
4891
  headers: {
4892
+ Origin: origin,
4879
4893
  ...cookies.length > 0 ? { Cookie: cookies.join("; ") } : {}
4880
4894
  },
4881
4895
  signal: AbortSignal.timeout(10 * 60 * 1e3)
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-N6QY7K6L.js";
5
+ } from "./chunk-NU4XR6MF.js";
6
6
  export {
7
7
  getExtForLang,
8
8
  serializeToYaml
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  getExtForLang,
7
7
  parseNewChatSuggestionText,
8
8
  serializeToYaml
9
- } from "./chunk-N6QY7K6L.js";
9
+ } from "./chunk-NU4XR6MF.js";
10
10
  export {
11
11
  MATE_NAMES,
12
12
  MEMORY_TYPE_REGISTRY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.11.0-alpha.4",
3
+ "version": "0.11.0-alpha.6",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",