ysk-omni 1.0.9 → 1.0.10
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/CHANGELOG.md +21 -0
- package/CHANGELOG.zh.md +21 -0
- package/README-ZH.md +18 -12
- package/README.md +18 -12
- package/docs/en/operations.md +1 -1
- package/docs/zh/operations.md +1 -1
- package/package.json +3 -3
- package/public/admin/boot.js +1 -1
- package/public/admin/boot.js.map +1 -1
- package/public/admin/index.html +1 -1
- package/public/admin/vendor/purify.min.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ Newest first. Every version from 1.0.0 is grouped by category. `README.md` shows
|
|
|
4
4
|
|
|
5
5
|
Entries come from git history, tags, and GitHub Releases.
|
|
6
6
|
|
|
7
|
+
## 1.0.10 — 2026-11-29
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
|
|
11
|
+
- Vendor Admin DOMPurify **3.4.18 → 3.5.0** (`public/admin/vendor/purify.min.js`, official minified 3.5.0 build). 3.5.0 (2026-11-22) is a security release; there will be no further 3.4.x. GHSA-hrxw-jjj6-2g2j (Low): further `SAFE_FOR_TEMPLATES` bypass where nested tags can reassemble template expressions when sanitized output is reparsed. Also hardens DOM-input template bypasses, `IN_PLACE` fail-closed / hook cases, custom-element namespace checks, and hook config isolation. Admin chat markdown still sanitizes **string** HTML from marked with `USE_PROFILES: { html: true }` — not `SAFE_FOR_TEMPLATES`, `IN_PLACE`, hooks, or `CUSTOM_ELEMENT_HANDLING`. DOMPurify 4 is held.
|
|
12
|
+
- Production hosts should run Node ≥22.23.5, ≥24.22.3, or ≥26.13.1. As of 2026-11-29 those are still the current builds on those lines (no newer 22/24/26 security release after 2026-11-11). Package `engines` stay `>=20`. CI stays on Node 24.
|
|
13
|
+
|
|
14
|
+
### Dependency upgrades
|
|
15
|
+
|
|
16
|
+
- `typescript-eslint` 8.73.0 → 8.74.0, including the matching `@typescript-eslint/*` packages (`adjacent-overload-signatures` `ignoreAccessors`; parser `jsxPragma` null for the automatic JSX runtime; plugin bugfixes: no-implied-eval switch discriminant, no-unsafe-enum-assignment, consistent-generic-constructors, no-deprecated union properties, array-type readonly autofix). This repo uses `tseslint.configs.recommended` (not type-checked). `no-unsafe-class-instance-assignment` is still not enabled. Canary 8.74.1-alpha.* is not taken.
|
|
17
|
+
- Lockfile `@types/node` 22.20.5 → 22.20.7 (latest 22.x; stay off 24/26). Other direct dependencies were already at the latest within-major version in the lockfile and were not changed.
|
|
18
|
+
|
|
19
|
+
### Internal/CI
|
|
20
|
+
|
|
21
|
+
- Bump the package version to 1.0.10, update Admin fixtures, and rebuild the Admin bundle so the sidebar shows v1.0.10.
|
|
22
|
+
- Operations docs (English and 中文) re-check the Node current builds as of 2026-11-29: still 22.23.5, 24.22.3, and 26.13.1. Production floor stays ≥22.23.5, ≥24.22.3, or ≥26.13.1. `engines` and CI Node 24 are unchanged.
|
|
23
|
+
- Admin DOMPurify 3.5.0 tests: official minified build identity, Admin `USE_PROFILES: { html: true }` sanitizer wiring, and confirmation that Admin does not use `SAFE_FOR_TEMPLATES`, `IN_PLACE`, hooks, or `CUSTOM_ELEMENT_HANDLING`.
|
|
24
|
+
|
|
25
|
+
GitHub Release: https://github.com/yanshekki/ysk-omni/releases/tag/v1.0.10
|
|
26
|
+
Compare: https://github.com/yanshekki/ysk-omni/compare/v1.0.9...v1.0.10
|
|
27
|
+
|
|
7
28
|
## 1.0.9 — 2026-11-22
|
|
8
29
|
|
|
9
30
|
### Fixes
|
package/CHANGELOG.zh.md
CHANGED
|
@@ -4,6 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
條目來自 git 歷史、標籤與 GitHub Release。
|
|
6
6
|
|
|
7
|
+
## 1.0.10 — 2026-11-29
|
|
8
|
+
|
|
9
|
+
### 安全
|
|
10
|
+
|
|
11
|
+
- Admin 內嵌的 DOMPurify 由 **3.4.18** 升到 **3.5.0**(`public/admin/vendor/purify.min.js`,官方 3.5.0 壓縮檔)。3.5.0(2026-11-22)是安全版本;不會再有 3.4.x。GHSA-hrxw-jjj6-2g2j(低):進一步的 `SAFE_FOR_TEMPLATES` 繞過,嵌套標籤可在消毒輸出再解析時重組模板表達式。同時加固 DOM 輸入的模板繞過、`IN_PLACE` 失敗關閉/hook 情況、自訂元素命名空間檢查,以及 hook 設定隔離。對話 markdown 仍對 marked 產出的**字串** HTML 用 `USE_PROFILES: { html: true }` 消毒 — 不用 `SAFE_FOR_TEMPLATES`、`IN_PLACE`、hook 或 `CUSTOM_ELEMENT_HANDLING`。DOMPurify 4 暫不升級。
|
|
12
|
+
- 生產主機應使用 Node ≥22.23.5、≥24.22.3 或 ≥26.13.1。截至 2026-11-29,這些仍是各線上的現行版本(2026-11-11 之後沒有更新的 22/24/26 安全版本)。套件 `engines` 維持 `>=20`。CI 仍用 Node 24。
|
|
13
|
+
|
|
14
|
+
### 依賴升級
|
|
15
|
+
|
|
16
|
+
- `typescript-eslint` 8.73.0 → 8.74.0,連同對應的 `@typescript-eslint/*`(`adjacent-overload-signatures` 的 `ignoreAccessors`;解析器在 automatic JSX runtime 下 `jsxPragma` 為 null;外掛修正:no-implied-eval 的 switch discriminant、no-unsafe-enum-assignment、consistent-generic-constructors、no-deprecated 聯合型別屬性、array-type readonly 自動修正)。本倉庫使用 `tseslint.configs.recommended`(非 type-checked)。`no-unsafe-class-instance-assignment` 仍未啟用。不採用 canary 8.74.1-alpha.*。
|
|
17
|
+
- lockfile 的 `@types/node` 由 22.20.5 升到 22.20.7(22.x 最新;不跳到 24/26)。其餘直接依賴在 lockfile 已是主版本內的最新版,沒有改動。
|
|
18
|
+
|
|
19
|
+
### 內部/CI
|
|
20
|
+
|
|
21
|
+
- 將套件版本升至 1.0.10、更新 Admin fixtures,並重建 Admin bundle,讓側欄顯示 v1.0.10。
|
|
22
|
+
- 維運文件(英文與中文)於 2026-11-29 再核對 Node 現行版本:仍是 22.23.5、24.22.3 與 26.13.1。生產下限維持 ≥22.23.5、≥24.22.3 或 ≥26.13.1。`engines` 與 CI 的 Node 24 不變。
|
|
23
|
+
- 新增 Admin DOMPurify 3.5.0 測試:核對官方壓縮檔、Admin `USE_PROFILES: { html: true }` 消毒接線,並確認 Admin 不用 `SAFE_FOR_TEMPLATES`、`IN_PLACE`、hook 或 `CUSTOM_ELEMENT_HANDLING`。
|
|
24
|
+
|
|
25
|
+
GitHub Release:https://github.com/yanshekki/ysk-omni/releases/tag/v1.0.10
|
|
26
|
+
比較:https://github.com/yanshekki/ysk-omni/compare/v1.0.9...v1.0.10
|
|
27
|
+
|
|
7
28
|
## 1.0.9 — 2026-11-22
|
|
8
29
|
|
|
9
30
|
### 修正
|
package/README-ZH.md
CHANGED
|
@@ -34,6 +34,24 @@ curl -sS http://127.0.0.1:3850/v1/models \
|
|
|
34
34
|
|
|
35
35
|
## 更新日誌
|
|
36
36
|
|
|
37
|
+
### 1.0.10 — 2026-11-29
|
|
38
|
+
|
|
39
|
+
### 安全
|
|
40
|
+
|
|
41
|
+
- Admin 內嵌的 DOMPurify 由 **3.4.18** 升到 **3.5.0**(`public/admin/vendor/purify.min.js`,官方 3.5.0 壓縮檔)。3.5.0(2026-11-22)是安全版本;不會再有 3.4.x。GHSA-hrxw-jjj6-2g2j(低):進一步的 `SAFE_FOR_TEMPLATES` 繞過,嵌套標籤可在消毒輸出再解析時重組模板表達式。同時加固 DOM 輸入的模板繞過、`IN_PLACE` 失敗關閉/hook 情況、自訂元素命名空間檢查,以及 hook 設定隔離。對話 markdown 仍對 marked 產出的**字串** HTML 用 `USE_PROFILES: { html: true }` 消毒 — 不用 `SAFE_FOR_TEMPLATES`、`IN_PLACE`、hook 或 `CUSTOM_ELEMENT_HANDLING`。DOMPurify 4 暫不升級。
|
|
42
|
+
- 生產主機應使用 Node ≥22.23.5、≥24.22.3 或 ≥26.13.1。截至 2026-11-29,這些仍是各線上的現行版本(2026-11-11 之後沒有更新的 22/24/26 安全版本)。套件 `engines` 維持 `>=20`。CI 仍用 Node 24。
|
|
43
|
+
|
|
44
|
+
### 依賴升級
|
|
45
|
+
|
|
46
|
+
- `typescript-eslint` 8.73.0 → 8.74.0,連同對應的 `@typescript-eslint/*`(`adjacent-overload-signatures` 的 `ignoreAccessors`;解析器在 automatic JSX runtime 下 `jsxPragma` 為 null;外掛修正:no-implied-eval 的 switch discriminant、no-unsafe-enum-assignment、consistent-generic-constructors、no-deprecated 聯合型別屬性、array-type readonly 自動修正)。本倉庫使用 `tseslint.configs.recommended`(非 type-checked)。`no-unsafe-class-instance-assignment` 仍未啟用。不採用 canary 8.74.1-alpha.*。
|
|
47
|
+
- lockfile 的 `@types/node` 由 22.20.5 升到 22.20.7(22.x 最新;不跳到 24/26)。其餘直接依賴在 lockfile 已是主版本內的最新版,沒有改動。
|
|
48
|
+
|
|
49
|
+
### 內部/CI
|
|
50
|
+
|
|
51
|
+
- 將套件版本升至 1.0.10、更新 Admin fixtures,並重建 Admin bundle,讓側欄顯示 v1.0.10。
|
|
52
|
+
- 維運文件(英文與中文)於 2026-11-29 再核對 Node 現行版本:仍是 22.23.5、24.22.3 與 26.13.1。生產下限維持 ≥22.23.5、≥24.22.3 或 ≥26.13.1。`engines` 與 CI 的 Node 24 不變。
|
|
53
|
+
- 新增 Admin DOMPurify 3.5.0 測試:核對官方壓縮檔、Admin `USE_PROFILES: { html: true }` 消毒接線,並確認 Admin 不用 `SAFE_FOR_TEMPLATES`、`IN_PLACE`、hook 或 `CUSTOM_ELEMENT_HANDLING`。
|
|
54
|
+
|
|
37
55
|
### 1.0.9 — 2026-11-22
|
|
38
56
|
|
|
39
57
|
### 修正
|
|
@@ -69,18 +87,6 @@ curl -sS http://127.0.0.1:3850/v1/models \
|
|
|
69
87
|
- 將套件版本升至 1.0.8、更新 Admin fixtures,並重建 Admin bundle,讓側欄顯示 v1.0.8。
|
|
70
88
|
- 快速開始與維運文件(英文與中文)記錄 2026-11-11 的生產 Node 下限。`engines` 與 CI 的 Node 24 不變。
|
|
71
89
|
|
|
72
|
-
### 1.0.7 — 2026-11-08
|
|
73
|
-
|
|
74
|
-
### 安全
|
|
75
|
-
|
|
76
|
-
- 用 `overrides` 把傳遞依賴 `qs` 釘在 **6.16.2**(express 與 body-parser 宣告 `~6.16.0`)。lockfile 先前是 6.16.0,落在 GHSA-6pq8-jhm2-2vcw/CVE-2026-110816(中等,`qs.stringify` 配 `arrayFormat: 'comma'` 遇到不可呼叫的自有 `toString` 會拋錯;6.16.1 已修)同 GHSA-w4cr-vjpx-p82q/CVE-2026-110910(低,`allowEmptyArrays` 沒有編碼空陣列的 key;6.16.2 已修)。qs 6.17.1 是 6.x 最新版,同樣沒有已知公告;此釘選與 GCtoAC 一致。
|
|
77
|
-
- Admin 內嵌的 DOMPurify 由 **3.2.4** 升到 **3.4.17**(`public/admin/vendor/purify.min.js`)。3.2.4 落在 CVE-2025-15599(3.2.7 已修)同 CVE-2026-0540(3.3.2 已修)範圍內。3.4.17 是目前 npm 上的 3.x,沒有已知公告。對話 markdown 仍用 `USE_PROFILES: { html: true }` 消毒。
|
|
78
|
-
|
|
79
|
-
### 內部/CI
|
|
80
|
-
|
|
81
|
-
- 將套件版本升至 1.0.7、更新 Admin fixtures,並重建 Admin bundle,讓側欄顯示 v1.0.7。
|
|
82
|
-
- 維運文件(英文與中文)於 2026-11-08 再核對 Node 現行版本:仍是 22.23.4、24.22.2 與 26.13.0。生產下限維持 ≥22.23.4、≥24.22.1 或 ≥26.12.1。
|
|
83
|
-
|
|
84
90
|
完整更新日誌:[CHANGELOG.zh.md](./CHANGELOG.zh.md)。
|
|
85
91
|
|
|
86
92
|
## 授權
|
package/README.md
CHANGED
|
@@ -34,6 +34,24 @@ Full CLI, API, Admin, Catalog, Runtimes, keys, and operations: **[Documentation]
|
|
|
34
34
|
|
|
35
35
|
## Changelog
|
|
36
36
|
|
|
37
|
+
### 1.0.10 — 2026-11-29
|
|
38
|
+
|
|
39
|
+
### Security
|
|
40
|
+
|
|
41
|
+
- Vendor Admin DOMPurify **3.4.18 → 3.5.0** (`public/admin/vendor/purify.min.js`, official minified 3.5.0 build). 3.5.0 (2026-11-22) is a security release; there will be no further 3.4.x. GHSA-hrxw-jjj6-2g2j (Low): further `SAFE_FOR_TEMPLATES` bypass where nested tags can reassemble template expressions when sanitized output is reparsed. Also hardens DOM-input template bypasses, `IN_PLACE` fail-closed / hook cases, custom-element namespace checks, and hook config isolation. Admin chat markdown still sanitizes **string** HTML from marked with `USE_PROFILES: { html: true }` — not `SAFE_FOR_TEMPLATES`, `IN_PLACE`, hooks, or `CUSTOM_ELEMENT_HANDLING`. DOMPurify 4 is held.
|
|
42
|
+
- Production hosts should run Node ≥22.23.5, ≥24.22.3, or ≥26.13.1. As of 2026-11-29 those are still the current builds on those lines (no newer 22/24/26 security release after 2026-11-11). Package `engines` stay `>=20`. CI stays on Node 24.
|
|
43
|
+
|
|
44
|
+
### Dependency upgrades
|
|
45
|
+
|
|
46
|
+
- `typescript-eslint` 8.73.0 → 8.74.0, including the matching `@typescript-eslint/*` packages (`adjacent-overload-signatures` `ignoreAccessors`; parser `jsxPragma` null for the automatic JSX runtime; plugin bugfixes: no-implied-eval switch discriminant, no-unsafe-enum-assignment, consistent-generic-constructors, no-deprecated union properties, array-type readonly autofix). This repo uses `tseslint.configs.recommended` (not type-checked). `no-unsafe-class-instance-assignment` is still not enabled. Canary 8.74.1-alpha.* is not taken.
|
|
47
|
+
- Lockfile `@types/node` 22.20.5 → 22.20.7 (latest 22.x; stay off 24/26). Other direct dependencies were already at the latest within-major version in the lockfile and were not changed.
|
|
48
|
+
|
|
49
|
+
### Internal/CI
|
|
50
|
+
|
|
51
|
+
- Bump the package version to 1.0.10, update Admin fixtures, and rebuild the Admin bundle so the sidebar shows v1.0.10.
|
|
52
|
+
- Operations docs (English and 中文) re-check the Node current builds as of 2026-11-29: still 22.23.5, 24.22.3, and 26.13.1. Production floor stays ≥22.23.5, ≥24.22.3, or ≥26.13.1. `engines` and CI Node 24 are unchanged.
|
|
53
|
+
- Admin DOMPurify 3.5.0 tests: official minified build identity, Admin `USE_PROFILES: { html: true }` sanitizer wiring, and confirmation that Admin does not use `SAFE_FOR_TEMPLATES`, `IN_PLACE`, hooks, or `CUSTOM_ELEMENT_HANDLING`.
|
|
54
|
+
|
|
37
55
|
### 1.0.9 — 2026-11-22
|
|
38
56
|
|
|
39
57
|
### Fixes
|
|
@@ -69,18 +87,6 @@ Full CLI, API, Admin, Catalog, Runtimes, keys, and operations: **[Documentation]
|
|
|
69
87
|
- Bump the package version to 1.0.8, update Admin fixtures, and rebuild the Admin bundle so the sidebar shows v1.0.8.
|
|
70
88
|
- Getting started and operations docs (English and 中文) record the 2026-11-11 production Node floor. `engines` and CI Node 24 are unchanged.
|
|
71
89
|
|
|
72
|
-
### 1.0.7 — 2026-11-08
|
|
73
|
-
|
|
74
|
-
### Security
|
|
75
|
-
|
|
76
|
-
- Pin transitive `qs` at **6.16.2** via `overrides` (express and body-parser declare `~6.16.0`). Lockfile was 6.16.0, which is inside GHSA-6pq8-jhm2-2vcw / CVE-2026-110816 (moderate, `qs.stringify` with `arrayFormat: 'comma'` throws on a non-callable own `toString`; patched in 6.16.1) and GHSA-w4cr-vjpx-p82q / CVE-2026-110910 (low, `allowEmptyArrays` did not encode empty-array keys; patched in 6.16.2). qs 6.17.1 is the latest 6.x and is also clean; this pin matches GCtoAC.
|
|
77
|
-
- Vendor Admin DOMPurify **3.2.4 → 3.4.17** (`public/admin/vendor/purify.min.js`). 3.2.4 is inside CVE-2025-15599 (fixed in 3.2.7) and CVE-2026-0540 (fixed in 3.3.2). 3.4.17 is the current npm 3.x with no known advisories. Chat markdown still sanitizes with `USE_PROFILES: { html: true }`.
|
|
78
|
-
|
|
79
|
-
### Internal/CI
|
|
80
|
-
|
|
81
|
-
- Bump the package version to 1.0.7, update Admin fixtures, and rebuild the Admin bundle so the sidebar shows v1.0.7.
|
|
82
|
-
- Operations docs (English and 中文) re-check the Node current builds as of 2026-11-08: still 22.23.4, 24.22.2, and 26.13.0. Production floor stays ≥22.23.4, ≥24.22.1, or ≥26.12.1.
|
|
83
|
-
|
|
84
90
|
Full changelog: [CHANGELOG.md](./CHANGELOG.md).
|
|
85
91
|
|
|
86
92
|
## License
|
package/docs/en/operations.md
CHANGED
|
@@ -13,7 +13,7 @@ curl -sS http://127.0.0.1:3850/ready
|
|
|
13
13
|
|
|
14
14
|
## Node.js runtime
|
|
15
15
|
|
|
16
|
-
The package `engines` field is Node.js 20 or later. Node 20 is end of life (final release 20.20.2) and has no fix for the Brotli out-of-bounds write (CVE-2026-111497) or the 2026-11-11 runtime issues. Production hosts should run at least **22.23.5**, **24.22.3**, or **26.13.1** (2026-11-11 security releases: CVE-2026-123863, CVE-2026-123864 and siblings). As of 2026-11-
|
|
16
|
+
The package `engines` field is Node.js 20 or later. Node 20 is end of life (final release 20.20.2) and has no fix for the Brotli out-of-bounds write (CVE-2026-111497) or the 2026-11-11 runtime issues. Production hosts should run at least **22.23.5**, **24.22.3**, or **26.13.1** (2026-11-11 security releases: CVE-2026-123863, CVE-2026-123864 and siblings). As of 2026-11-29 those are the current builds on those lines.
|
|
17
17
|
|
|
18
18
|
GitHub Actions CI (`.github/workflows/ci.yml`) runs the suite on Node 24. The release workflow publishes on Node 24 as well.
|
|
19
19
|
|
package/docs/zh/operations.md
CHANGED
|
@@ -13,7 +13,7 @@ curl -sS http://127.0.0.1:3850/ready
|
|
|
13
13
|
|
|
14
14
|
## Node.js 執行時期
|
|
15
15
|
|
|
16
|
-
套件 `engines` 為 Node.js 20 或以上。Node 20 已結束支援(最後版本 20.20.2),沒有 Brotli 越界寫入(CVE-2026-111497)或 2026-11-11 執行時期問題的修補。生產主機至少應使用 **22.23.5**、**24.22.3** 或 **26.13.1**(2026-11-11 安全版本:CVE-2026-123863、CVE-2026-123864 及同批)。截至 2026-11-
|
|
16
|
+
套件 `engines` 為 Node.js 20 或以上。Node 20 已結束支援(最後版本 20.20.2),沒有 Brotli 越界寫入(CVE-2026-111497)或 2026-11-11 執行時期問題的修補。生產主機至少應使用 **22.23.5**、**24.22.3** 或 **26.13.1**(2026-11-11 安全版本:CVE-2026-123863、CVE-2026-123864 及同批)。截至 2026-11-29,這些就是各線上的現行版本。
|
|
17
17
|
|
|
18
18
|
GitHub Actions CI(`.github/workflows/ci.yml`)在 Node 24 上執行測試。發佈工作流程同樣在 Node 24 上發佈。
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ysk-omni",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "YSK Omni — local models behind an OpenAI-compatible gateway, with Admin panel and CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openai",
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
"@types/cors": "^2.8.19",
|
|
94
94
|
"@types/express": "^4.17.21",
|
|
95
95
|
"@types/multer": "^2.3.0",
|
|
96
|
-
"@types/node": "^22.20.
|
|
96
|
+
"@types/node": "^22.20.7",
|
|
97
97
|
"@vitest/coverage-v8": "^3.0.9",
|
|
98
98
|
"eslint": "^9.39.5",
|
|
99
99
|
"happy-dom": "^15.11.7",
|
|
100
100
|
"pino-pretty": "^13.2.0",
|
|
101
101
|
"tsx": "^4.23.15",
|
|
102
102
|
"typescript": "5.8",
|
|
103
|
-
"typescript-eslint": "^8.
|
|
103
|
+
"typescript-eslint": "^8.74.0",
|
|
104
104
|
"vite": "^6.4.6",
|
|
105
105
|
"vitest": "^3.0.9"
|
|
106
106
|
},
|
package/public/admin/boot.js
CHANGED
|
@@ -28,7 +28,7 @@ const Vs="YSK Omni",Ws="Admin Panel",Qs="Admin",Js="API Key",Ys="One-time login
|
|
|
28
28
|
<div class="lang-switch-heading">${dt(a)}</div>
|
|
29
29
|
<ul class="lang-switch-list" role="listbox" aria-label="${dt(a)}">${i}</ul>
|
|
30
30
|
</div>
|
|
31
|
-
</div>`}function Ht(){document.querySelectorAll("[data-lang-switch]").forEach(a=>{a.classList.remove("is-open");const s=a.querySelector(".lang-switch-btn"),i=a.querySelector(".lang-switch-panel");s&&s.setAttribute("aria-expanded","false"),i&&i.setAttribute("hidden","")})}function cm(a){const s=a.querySelector(".lang-switch-btn"),i=a.querySelector(".lang-switch-panel");if(!s||!i)return;const o=s.getBoundingClientRect(),n=Math.min(280,Math.max(o.width,228)),d=Math.min(Math.max(8,o.left),Math.max(8,window.innerWidth-n-8));i.style.width=`${n}px`,i.style.left=`${d}px`;const r=window.innerHeight-o.bottom;r<260&&o.top>r?(i.style.top="auto",i.style.bottom=`${window.innerHeight-o.top+6}px`):(i.style.top=`${o.bottom+6}px`,i.style.bottom="auto")}function ns(a){document.querySelectorAll("[data-lang-switch]").forEach(s=>{const i=s.querySelector(".lang-switch-btn"),o=s.querySelector(".lang-switch-panel");if(!i||!o)return;const n=()=>{Ht(),s.classList.add("is-open"),i.setAttribute("aria-expanded","true"),o.removeAttribute("hidden"),cm(s)},d=()=>{s.classList.remove("is-open"),i.setAttribute("aria-expanded","false"),o.setAttribute("hidden","")};o.addEventListener("click",r=>r.stopPropagation()),i.addEventListener("click",r=>{r.stopPropagation(),s.classList.contains("is-open")?d():n()}),s.querySelectorAll("[data-lang]").forEach(r=>{r.addEventListener("click",u=>{u.stopPropagation();const m=r.getAttribute("data-lang")||"";if(!Ma(m)||m===ze){d();return}nm(m),a()})})}),window.__yskLangSwitchBound||(window.__yskLangSwitchBound=!0,document.addEventListener("click",()=>Ht()),document.addEventListener("keydown",s=>{s.key==="Escape"&&Ht()}),window.addEventListener("resize",()=>Ht()))}os(ze);const um="1.0.
|
|
31
|
+
</div>`}function Ht(){document.querySelectorAll("[data-lang-switch]").forEach(a=>{a.classList.remove("is-open");const s=a.querySelector(".lang-switch-btn"),i=a.querySelector(".lang-switch-panel");s&&s.setAttribute("aria-expanded","false"),i&&i.setAttribute("hidden","")})}function cm(a){const s=a.querySelector(".lang-switch-btn"),i=a.querySelector(".lang-switch-panel");if(!s||!i)return;const o=s.getBoundingClientRect(),n=Math.min(280,Math.max(o.width,228)),d=Math.min(Math.max(8,o.left),Math.max(8,window.innerWidth-n-8));i.style.width=`${n}px`,i.style.left=`${d}px`;const r=window.innerHeight-o.bottom;r<260&&o.top>r?(i.style.top="auto",i.style.bottom=`${window.innerHeight-o.top+6}px`):(i.style.top=`${o.bottom+6}px`,i.style.bottom="auto")}function ns(a){document.querySelectorAll("[data-lang-switch]").forEach(s=>{const i=s.querySelector(".lang-switch-btn"),o=s.querySelector(".lang-switch-panel");if(!i||!o)return;const n=()=>{Ht(),s.classList.add("is-open"),i.setAttribute("aria-expanded","true"),o.removeAttribute("hidden"),cm(s)},d=()=>{s.classList.remove("is-open"),i.setAttribute("aria-expanded","false"),o.setAttribute("hidden","")};o.addEventListener("click",r=>r.stopPropagation()),i.addEventListener("click",r=>{r.stopPropagation(),s.classList.contains("is-open")?d():n()}),s.querySelectorAll("[data-lang]").forEach(r=>{r.addEventListener("click",u=>{u.stopPropagation();const m=r.getAttribute("data-lang")||"";if(!Ma(m)||m===ze){d();return}nm(m),a()})})}),window.__yskLangSwitchBound||(window.__yskLangSwitchBound=!0,document.addEventListener("click",()=>Ht()),document.addEventListener("keydown",s=>{s.key==="Escape"&&Ht()}),window.addEventListener("resize",()=>Ht()))}os(ze);const um="1.0.10",mm={version:um},pm=String(mm.version),rs=new Set([".txt",".md",".markdown",".csv",".json",".xml",".html",".htm",".js",".ts",".tsx",".jsx",".py",".java",".go",".rs",".c",".cpp",".h",".hpp",".css",".yml",".yaml",".toml",".ini",".env",".sh",".sql",".log",".pdf",".png",".jpg",".jpeg",".webp",".gif"]),gm=[...rs].join(","),ft="/admin/api",Vt="gog_admin_session";let Xe=null,Ze=!1;function Ia(a,s){const i=a?.error&&typeof a.error=="object"?a.error:a||{},o=typeof i.code=="string"?i.code:"",n=i.details&&typeof i.details=="object"?i.details:{},d=typeof n.feature=="string"?n.feature:typeof n.flag=="string"?n.flag:"",r=typeof n.reason=="string"?n.reason:"",u=String(i.message||a?.message||s||"");if(d&&(o==="feature_disabled"||o==="media_not_supported"||o==="forbidden")){const c=`errors.feature.${d}`;if(Pe(c))return e(c)}if(o==="feature_disabled"&&Pe("errors.feature_disabled")){const c=la(u);return c&&Pe(`errors.feature.${c}`)?e(`errors.feature.${c}`):e("errors.feature_disabled")}if(r&&Pe(`errors.media.${r}`))return e(`errors.media.${r}`);if(o==="media_generation_failed"&&r&&Pe(`errors.media.${r}`))return e(`errors.media.${r}`);if(o==="media_forbidden"&&Pe("errors.media_forbidden"))return e("errors.media_forbidden");const m=la(u);if(m&&Pe(`errors.feature.${m}`))return e(`errors.feature.${m}`);if(o){const c=`errors.${o}`;if(Pe(c))return e(c)}const g=la(u);return g&&Pe(`errors.feature.${g}`)?e(`errors.feature.${g}`):/agent-mode|agent mode|Safe keys cannot/i.test(u)?e("errors.media.agent_or_admin_required"):/no image file was found/i.test(u)?e("errors.media.no_image_in_sandbox"):/no video file was found/i.test(u)?e("errors.media.no_video_in_sandbox"):/does not support image edits/i.test(u)?e("errors.media.provider_no_edit"):/Provide an image file|sourceAssetId|sourceDocumentId/i.test(u)?e("errors.media.source_required"):/must be an image/i.test(u)?e("errors.media.source_must_be_image"):u||e("common.requestFailed")}function la(a){const s=String(a||"");return/videoApi/i.test(s)||/Video API is disabled/i.test(s)?"videoApi":/imagesApi/i.test(s)||/Images API is disabled/i.test(s)?"imagesApi":/audioApi/i.test(s)||/Audio API is disabled/i.test(s)?"audioApi":/filesOpenAiAlias/i.test(s)||/Files API alias/i.test(s)?"filesOpenAiAlias":/Tools are disabled/i.test(s)||/\btools\b/i.test(s)&&/disabled/i.test(s)&&/image/i.test(s)?"tools":""}const l={key:sessionStorage.getItem(Vt)||"",page:"dashboard",me:null,error:"",modal:null,chatFilter:{q:"",status:"",model:"",apiKeyId:"",from:"",to:"",policyMode:"",hasDocuments:"",sortBy:"createdAt",sortDir:"desc",limit:50,offset:0},docFilter:{q:"",apiKeyId:"",storageType:"",from:"",to:"",sortBy:"createdAt",sortDir:"desc",limit:20,offset:0},keyFilter:{q:"",role:"",mode:"",isActive:"",sortBy:"createdAt",sortDir:"desc",limit:20,offset:0},auditFilter:{q:"",action:"",apiKeyId:"",from:"",to:"",sortBy:"createdAt",sortDir:"desc",limit:50,offset:0},usageFilter:{tab:"model",modelQ:"",keyQ:"",keyActive:"",modelPage:0,keyPage:0,pageSize:10,sortBy:"lastUsedAt",sortDir:"desc",modelSortBy:"requests",modelSortDir:"desc"},ddosFilter:{tab:"policy",liveQ:"",banQ:"",banSource:"",livePage:0,banPage:0,pageSize:15,liveSortBy:"startedAt",liveSortDir:"desc",banSortBy:"createdAt",banSortDir:"desc",eventSortBy:"at",eventSortDir:"desc"},mediaFilter:{tab:"studio",q:"",kind:"",provider:"",from:"",to:"",sortBy:"createdAt",sortDir:"desc",jobSortBy:"createdAt",jobSortDir:"desc",limit:20,offset:0},systemTab:"software",sessionQ:"",pm2Tab:"runner",apiFeaturesTab:"protocols",catalogTab:"local",catalogModality:"",catalogPulling:"",catalogPull:{id:"",bytes:0,total:0},catalogQueue:[],catalogQueueRunning:!1,catalogHubQ:"",catalogHubHits:null,catalogHubNext:"",catalogHubBusy:!1,catalogPopularSyncedAt:"",runtimesOs:"host",runtimesMod:"",runtimesReport:null,runtimesInstall:null,models:[],catalogLocal:[],keys:[]},fm={login:"login",dashboard:"dashboard",chat:"chat",chats:"chats",keys:"keys",documents:"documents",media:"media",catalog:"catalog",runtimes:"runtimes",audit:"audit",settings:"settings","api-features":"apiFeatures",apifeatures:"apiFeatures",usage:"usage",ddos:"ddos",queue:"queue",pm2:"pm2",system:"system",support:"support",business:"business"};function bm(a){return a==="apiFeatures"?"api-features":a||"dashboard"}function wa(a){const s=String(a||"").replace(/^#\/?/,"").split("?")[0].split("/")[0].toLowerCase();return s?s==="runtime"||s==="engines"||s==="engine"?"runtimes":fm[s]||null:null}function Ta(a){const s=`#/${bm(a)}`;location.hash!==s&&history.pushState(null,"",s)}function hm(){const a=wa(location.hash);return a||(l.key?"dashboard":"login")}async function I(a,s={}){const i={...s.body?{"Content-Type":"application/json"}:{},...l.key?{Authorization:`Bearer ${l.key}`}:{},...s.headers||{}},o=await fetch(`${ft}${a}`,{...s,headers:i}),n=await o.text();let d=null;try{d=n?JSON.parse(n):null}catch{d={error:{message:n}}}if(!o.ok){const r=Ia(d,o.statusText),u=d?.error?.code||"";o.status===401?l.page!=="login"&&Wt(!1):o.status===403&&!["media_forbidden","feature_disabled","forbidden","media_not_supported"].includes(u)&&l.page!=="login"&&Wt(!1);const m=new Error(r);throw m.status=o.status,m.code=u,m.details=d?.error?.details,m}return d}async function Ft(a){const s=await a.text();let i=null;try{i=s?JSON.parse(s):null}catch{i={error:{message:s}}}if(!a.ok){const o=Ia(i,a.statusText),n=new Error(o);throw n.status=a.status,n.code=i?.error?.code,n.details=i?.error?.details,n}return i}function Wt(a=!0){const s=l.key;a&&s&&String(s).startsWith("gog_sess_")&&fetch("/admin/api/auth/logout",{method:"POST",headers:{Authorization:`Bearer ${s}`}}).catch(()=>{}),a&&sessionStorage.removeItem(Vt),l.key="",l.me=null,l.page="login",Ta("login"),oa()}function xa(a){Ca(a,{writeHash:!0})}function Ca(a,s={}){const i=a||"dashboard";l.page=i,l.modal=null,l.error="",i==="chats"&&(l.chatFilter.offset=0),i==="documents"&&(l.docFilter.offset=0),i==="keys"&&(l.keyFilter.offset=0),i==="audit"&&(l.auditFilter.offset=0),i==="media"&&(l.mediaFilter.offset=0),i!=="ddos"&&Xe&&(clearInterval(Xe),Xe=null),i!=="chat"&&document.body.classList.remove("chat-history-open"),s.writeHash!==!1&&Ta(i),oa()}function t(a){return String(a??"").replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}let Le=null,Qt=null;function et(a){const s=Qt;Qt=null,Le&&(Le.remove(),Le=null),document.body.classList.remove("ui-dialog-open"),document.removeEventListener("keydown",Ea,!0),s&&s(a)}function Ea(a){if(Le&&a.key==="Escape"){a.preventDefault(),a.stopPropagation();const s=Le.dataset.cancelable!=="0";et(s?Le.dataset.prompt==="1"?null:!1:!0)}}function La(a){Le&&et(!1);const s=a.variant||(a.showCancel===!1?"info":"confirm"),i=a.showCancel!==!1,o=!!a.input,n=a.title||e(s==="danger"?"common.dangerTitle":i?"common.confirmTitle":"common.notice"),d=a.confirmText||e(i?"common.confirm":"common.ok"),r=a.cancelText||e("common.cancel"),u=s==="danger"?"!":s==="info"&&!i?"i":"?",m=document.createElement("div");m.className="ui-dialog-back",m.id="ui-dialog-back",m.dataset.cancelable=i||o?"1":"0",m.dataset.prompt=o?"1":"0",m.setAttribute("role","presentation"),m.innerHTML=`
|
|
32
32
|
<div class="ui-dialog ui-dialog--${t(s)}" role="alertdialog" aria-modal="true" aria-labelledby="ui-dialog-title" aria-describedby="ui-dialog-msg">
|
|
33
33
|
<div class="ui-dialog-h">
|
|
34
34
|
<div class="ui-dialog-icon" aria-hidden="true">${u}</div>
|