@maiyunnet/kebab 9.13.2 → 9.13.4

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/doc/kebab-rag.md CHANGED
@@ -1360,7 +1360,7 @@ index/variables/VER.md
1360
1360
 
1361
1361
  # Variable: VER
1362
1362
 
1363
- > `const` **VER**: `"9.13.2"` = `'9.13.2'`
1363
+ > `const` **VER**: `"9.13.4"` = `'9.13.4'`
1364
1364
 
1365
1365
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1366
1366
 
@@ -1407,7 +1407,7 @@ lib/ai/classes/Ai.md
1407
1407
 
1408
1408
  # Class: Ai
1409
1409
 
1410
- Defined in: [lib/ai.ts:69](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L69)
1410
+ Defined in: [lib/ai.ts:73](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L73)
1411
1411
 
1412
1412
  ## Constructors
1413
1413
 
@@ -1415,7 +1415,7 @@ Defined in: [lib/ai.ts:69](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1415
1415
 
1416
1416
  > **new Ai**(`ctrEtc`, `opt`): `Ai`
1417
1417
 
1418
- Defined in: [lib/ai.ts:82](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L82)
1418
+ Defined in: [lib/ai.ts:86](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L86)
1419
1419
 
1420
1420
  #### Parameters
1421
1421
 
@@ -1437,7 +1437,7 @@ Defined in: [lib/ai.ts:82](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1437
1437
 
1438
1438
  > `readonly` **link**: `OpenAI`
1439
1439
 
1440
- Defined in: [lib/ai.ts:72](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L72)
1440
+ Defined in: [lib/ai.ts:76](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L76)
1441
1441
 
1442
1442
  openai 原生对象
1443
1443
 
@@ -1449,7 +1449,7 @@ openai 原生对象
1449
1449
 
1450
1450
  > **get** **service**(): [`ESERVICE`](../enumerations/ESERVICE.md)
1451
1451
 
1452
- Defined in: [lib/ai.ts:167](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L167)
1452
+ Defined in: [lib/ai.ts:179](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L179)
1453
1453
 
1454
1454
  获取当前服务商
1455
1455
 
@@ -1467,7 +1467,7 @@ Defined in: [lib/ai.ts:167](https://github.com/maiyunnet/kebab/blob/master/lib/a
1467
1467
 
1468
1468
  > **chat**(`body`): `Promise`\<`false` \| `APIPromise`\<`ChatCompletion`\>\>
1469
1469
 
1470
- Defined in: [lib/ai.ts:172](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L172)
1470
+ Defined in: [lib/ai.ts:184](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L184)
1471
1471
 
1472
1472
  创建非流式对话
1473
1473
 
@@ -1485,7 +1485,7 @@ Defined in: [lib/ai.ts:172](https://github.com/maiyunnet/kebab/blob/master/lib/a
1485
1485
 
1486
1486
  > **chat**(`body`): `Promise`\<`false` \| `APIPromise`\<`Stream`\<`ChatCompletionChunk`\>\>\>
1487
1487
 
1488
- Defined in: [lib/ai.ts:176](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L176)
1488
+ Defined in: [lib/ai.ts:188](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L188)
1489
1489
 
1490
1490
  创建流式对话
1491
1491
 
@@ -1505,7 +1505,7 @@ Defined in: [lib/ai.ts:176](https://github.com/maiyunnet/kebab/blob/master/lib/a
1505
1505
 
1506
1506
  > **embedding**(`body`): `Promise`\<`false` \| `APIPromise`\<`CreateEmbeddingResponse`\>\>
1507
1507
 
1508
- Defined in: [lib/ai.ts:225](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L225)
1508
+ Defined in: [lib/ai.ts:237](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L237)
1509
1509
 
1510
1510
  创建向量
1511
1511
 
@@ -1525,7 +1525,7 @@ Defined in: [lib/ai.ts:225](https://github.com/maiyunnet/kebab/blob/master/lib/a
1525
1525
 
1526
1526
  > **image**(`opt`): `Promise`\<`false` \| \{ `list`: `object`[]; `request`: `string`; `seed`: `number`; \}\>
1527
1527
 
1528
- Defined in: [lib/ai.ts:241](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L241)
1528
+ Defined in: [lib/ai.ts:253](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L253)
1529
1529
 
1530
1530
  生成图像,不支持 GEMINI、GROK 服务商
1531
1531
 
@@ -1587,7 +1587,7 @@ Defined in: [lib/ai.ts:241](https://github.com/maiyunnet/kebab/blob/master/lib/a
1587
1587
 
1588
1588
  > **poll**(`opt`): `Promise`\<`false` \| \{ `add?`: `number`; `end?`: `number`; `error?`: `string`; `start?`: `number`; `status`: `"PENDING"` \| `"RUNNING"` \| `"SUCCEEDED"` \| `"FAILED"` \| `"CANCELED"` \| `"UNKNOWN"`; `task`: `string`; `url?`: `string`; \}\>
1589
1589
 
1590
- Defined in: [lib/ai.ts:602](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L602)
1590
+ Defined in: [lib/ai.ts:614](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L614)
1591
1591
 
1592
1592
  轮询任务
1593
1593
 
@@ -1617,7 +1617,7 @@ Defined in: [lib/ai.ts:602](https://github.com/maiyunnet/kebab/blob/master/lib/a
1617
1617
 
1618
1618
  > **response**(`body`): `Promise`\<`false` \| `APIPromise`\<`Response`\>\>
1619
1619
 
1620
- Defined in: [lib/ai.ts:199](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L199)
1620
+ Defined in: [lib/ai.ts:211](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L211)
1621
1621
 
1622
1622
  创建非流式 Response
1623
1623
 
@@ -1635,7 +1635,7 @@ Defined in: [lib/ai.ts:199](https://github.com/maiyunnet/kebab/blob/master/lib/a
1635
1635
 
1636
1636
  > **response**(`body`): `Promise`\<`false` \| `APIPromise`\<`Stream`\<`ResponseStreamEvent`\>\>\>
1637
1637
 
1638
- Defined in: [lib/ai.ts:203](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L203)
1638
+ Defined in: [lib/ai.ts:215](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L215)
1639
1639
 
1640
1640
  创建流式 Response
1641
1641
 
@@ -1655,7 +1655,7 @@ Defined in: [lib/ai.ts:203](https://github.com/maiyunnet/kebab/blob/master/lib/a
1655
1655
 
1656
1656
  > **video**(`opt`): `Promise`\<`false` \| \{ `request`: `string`; `seed`: `number`; `status`: `"PENDING"` \| `"RUNNING"` \| `"SUCCEEDED"` \| `"FAILED"` \| `"CANCELED"` \| `"UNKNOWN"`; `task`: `string`; \}\>
1657
1657
 
1658
- Defined in: [lib/ai.ts:431](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L431)
1658
+ Defined in: [lib/ai.ts:443](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L443)
1659
1659
 
1660
1660
  异步生成视频,仅支持 ALICN、ALIAS、ALINE
1661
1661
 
@@ -1812,6 +1812,16 @@ Defined in: [lib/ai.ts:31](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1812
1812
 
1813
1813
  ***
1814
1814
 
1815
+ ### DEEPSEEK
1816
+
1817
+ > **DEEPSEEK**: `10`
1818
+
1819
+ Defined in: [lib/ai.ts:41](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L41)
1820
+
1821
+ Deepseek
1822
+
1823
+ ***
1824
+
1815
1825
  ### GEMINI
1816
1826
 
1817
1827
  > **GEMINI**: `6`
@@ -1832,11 +1842,21 @@ Grok
1832
1842
 
1833
1843
  ***
1834
1844
 
1845
+ ### MIMO
1846
+
1847
+ > **MIMO**: `11`
1848
+
1849
+ Defined in: [lib/ai.ts:43](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L43)
1850
+
1851
+ 小米 MIMO
1852
+
1853
+ ***
1854
+
1835
1855
  ### OFOX
1836
1856
 
1837
- > **OFOX**: `11`
1857
+ > **OFOX**: `13`
1838
1858
 
1839
- Defined in: [lib/ai.ts:46](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L46)
1859
+ Defined in: [lib/ai.ts:50](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L50)
1840
1860
 
1841
1861
  OfoxAI
1842
1862
 
@@ -1844,9 +1864,9 @@ OfoxAI
1844
1864
 
1845
1865
  ### OPENROUTER
1846
1866
 
1847
- > **OPENROUTER**: `10`
1867
+ > **OPENROUTER**: `12`
1848
1868
 
1849
- Defined in: [lib/ai.ts:44](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L44)
1869
+ Defined in: [lib/ai.ts:48](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L48)
1850
1870
 
1851
1871
  OpenRouter
1852
1872
 
@@ -1883,7 +1903,7 @@ lib/ai/functions/get.md
1883
1903
 
1884
1904
  > **get**(`ctrEtc`, `opt`): [`Ai`](../classes/Ai.md)
1885
1905
 
1886
- Defined in: [lib/ai.ts:660](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L660)
1906
+ Defined in: [lib/ai.ts:672](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L672)
1887
1907
 
1888
1908
  创建一个 AI 对象
1889
1909
 
@@ -1941,7 +1961,7 @@ lib/ai/interfaces/IOptions.md
1941
1961
 
1942
1962
  # Interface: IOptions
1943
1963
 
1944
- Defined in: [lib/ai.ts:50](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L50)
1964
+ Defined in: [lib/ai.ts:54](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L54)
1945
1965
 
1946
1966
  选项
1947
1967
 
@@ -1951,7 +1971,7 @@ Defined in: [lib/ai.ts:50](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1951
1971
 
1952
1972
  > `optional` **endpoint?**: `string`
1953
1973
 
1954
- Defined in: [lib/ai.ts:54](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L54)
1974
+ Defined in: [lib/ai.ts:58](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L58)
1955
1975
 
1956
1976
  接入点
1957
1977
 
@@ -1961,7 +1981,7 @@ Defined in: [lib/ai.ts:54](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1961
1981
 
1962
1982
  > `optional` **fetch?**: (`input`, `init?`) => `Promise`\<`Response`\>
1963
1983
 
1964
- Defined in: [lib/ai.ts:58](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L58)
1984
+ Defined in: [lib/ai.ts:62](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L62)
1965
1985
 
1966
1986
  自定义 fetch 函数
1967
1987
 
@@ -1985,7 +2005,7 @@ Defined in: [lib/ai.ts:58](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1985
2005
 
1986
2006
  > `optional` **secretKey?**: `string`
1987
2007
 
1988
- Defined in: [lib/ai.ts:56](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L56)
2008
+ Defined in: [lib/ai.ts:60](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L60)
1989
2009
 
1990
2010
  密钥
1991
2011
 
@@ -1995,7 +2015,7 @@ Defined in: [lib/ai.ts:56](https://github.com/maiyunnet/kebab/blob/master/lib/ai
1995
2015
 
1996
2016
  > **service**: [`ESERVICE`](../enumerations/ESERVICE.md)
1997
2017
 
1998
- Defined in: [lib/ai.ts:52](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L52)
2018
+ Defined in: [lib/ai.ts:56](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L56)
1999
2019
 
2000
2020
  服务商 -
2001
2021
 
@@ -2005,7 +2025,7 @@ Defined in: [lib/ai.ts:52](https://github.com/maiyunnet/kebab/blob/master/lib/ai
2005
2025
 
2006
2026
  > `optional` **timeout?**: `number`
2007
2027
 
2008
- Defined in: [lib/ai.ts:60](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L60)
2028
+ Defined in: [lib/ai.ts:64](https://github.com/maiyunnet/kebab/blob/master/lib/ai.ts#L64)
2009
2029
 
2010
2030
  请求超时,毫秒
2011
2031
 
@@ -22742,9 +22762,9 @@ Defined in: [sys/ctr.ts:571](https://github.com/maiyunnet/kebab/blob/master/sys/
22742
22762
 
22743
22763
  ### \_checkXInput()
22744
22764
 
22745
- > `protected` **\_checkXInput**(`input`, `rule`, `rtn`): `boolean`
22765
+ > `protected` **\_checkXInput**(`input`, `rule`, `rtn`, `ignore?`): `boolean`
22746
22766
 
22747
- Defined in: [sys/ctr.ts:749](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L749)
22767
+ Defined in: [sys/ctr.ts:750](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L750)
22748
22768
 
22749
22769
  检测提交的数据类型(会检测 XSRF)
22750
22770
 
@@ -22768,6 +22788,12 @@ Defined in: [sys/ctr.ts:749](https://github.com/maiyunnet/kebab/blob/master/sys/
22768
22788
 
22769
22789
  返回值
22770
22790
 
22791
+ ##### ignore?
22792
+
22793
+ `boolean` = `false`
22794
+
22795
+ 忽略 xsrf 判断
22796
+
22771
22797
  #### Returns
22772
22798
 
22773
22799
  `boolean`
@@ -22778,7 +22804,7 @@ Defined in: [sys/ctr.ts:749](https://github.com/maiyunnet/kebab/blob/master/sys/
22778
22804
 
22779
22805
  > `protected` **\_cross**(`opt?`): `boolean`
22780
22806
 
22781
- Defined in: [sys/ctr.ts:978](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L978)
22807
+ Defined in: [sys/ctr.ts:982](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L982)
22782
22808
 
22783
22809
  开启跨域请求
22784
22810
 
@@ -22823,7 +22849,7 @@ Defined in: [sys/ctr.ts:978](https://github.com/maiyunnet/kebab/blob/master/sys/
22823
22849
 
22824
22850
  > `protected` **\_device**(): `"unknown"` \| `"android"` \| `"linux"` \| `"windows"` \| `"macintosh"` \| `"ipad"`
22825
22851
 
22826
- Defined in: [sys/ctr.ts:791](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L791)
22852
+ Defined in: [sys/ctr.ts:795](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L795)
22827
22853
 
22828
22854
  根据用户 ua 获取当前用户的设备类型
22829
22855
 
@@ -22837,7 +22863,7 @@ Defined in: [sys/ctr.ts:791](https://github.com/maiyunnet/kebab/blob/master/sys/
22837
22863
 
22838
22864
  > `protected` **\_enabledXsrf**(`opt?`): `void`
22839
22865
 
22840
- Defined in: [sys/ctr.ts:760](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L760)
22866
+ Defined in: [sys/ctr.ts:764](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L764)
22841
22867
 
22842
22868
  当前页面开启 XSRF 支持(主要检测 cookie 是否存在)
22843
22869
  如果当前页面有 CDN,请不要使用
@@ -22860,7 +22886,7 @@ Defined in: [sys/ctr.ts:760](https://github.com/maiyunnet/kebab/blob/master/sys/
22860
22886
 
22861
22887
  > `protected` **\_end**(): `void`
22862
22888
 
22863
- Defined in: [sys/ctr.ts:1086](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1086)
22889
+ Defined in: [sys/ctr.ts:1090](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1090)
22864
22890
 
22865
22891
  主动关闭当前 socket 连接
22866
22892
 
@@ -22874,7 +22900,7 @@ Defined in: [sys/ctr.ts:1086](https://github.com/maiyunnet/kebab/blob/master/sys
22874
22900
 
22875
22901
  > `protected` **\_getBasicAuth**(`user`, `pwd`): `string`
22876
22902
 
22877
- Defined in: [sys/ctr.ts:784](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L784)
22903
+ Defined in: [sys/ctr.ts:788](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L788)
22878
22904
 
22879
22905
  获取 Auth 字符串,用于客户端提交
22880
22906
 
@@ -22902,7 +22928,7 @@ Defined in: [sys/ctr.ts:784](https://github.com/maiyunnet/kebab/blob/master/sys/
22902
22928
 
22903
22929
  > `protected` **\_getLocale**(): `string`
22904
22930
 
22905
- Defined in: [sys/ctr.ts:969](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L969)
22931
+ Defined in: [sys/ctr.ts:973](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L973)
22906
22932
 
22907
22933
  获取当前语言名
22908
22934
 
@@ -22916,7 +22942,7 @@ Defined in: [sys/ctr.ts:969](https://github.com/maiyunnet/kebab/blob/master/sys/
22916
22942
 
22917
22943
  > `protected` **\_getLocaleJsonString**(): `string`
22918
22944
 
22919
- Defined in: [sys/ctr.ts:957](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L957)
22945
+ Defined in: [sys/ctr.ts:961](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L961)
22920
22946
 
22921
22947
  根据当前后台语言包设置情况获取 JSON 字符串传输到前台
22922
22948
 
@@ -22968,7 +22994,7 @@ Defined in: [sys/ctr.ts:315](https://github.com/maiyunnet/kebab/blob/master/sys/
22968
22994
 
22969
22995
  > `protected` **\_handleFormData**(`events?`, `limits?`): `Promise`\<`boolean`\>
22970
22996
 
22971
- Defined in: [sys/ctr.ts:1095](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1095)
22997
+ Defined in: [sys/ctr.ts:1099](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1099)
22972
22998
 
22973
22999
  获取 formdata 的信息
22974
23000
 
@@ -23016,7 +23042,7 @@ Defined in: [sys/ctr.ts:1095](https://github.com/maiyunnet/kebab/blob/master/sys
23016
23042
 
23017
23043
  > **\_l**(`key`, `data?`): `string`
23018
23044
 
23019
- Defined in: [sys/ctr.ts:1021](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1021)
23045
+ Defined in: [sys/ctr.ts:1025](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1025)
23020
23046
 
23021
23047
  获取语言包值
23022
23048
 
@@ -23042,7 +23068,7 @@ Defined in: [sys/ctr.ts:1021](https://github.com/maiyunnet/kebab/blob/master/sys
23042
23068
 
23043
23069
  > `protected` **\_loadData**(`path`): `Promise`\<`Record`\<`string`, `string`\> \| `null`\>
23044
23070
 
23045
- Defined in: [sys/ctr.ts:860](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L860)
23071
+ Defined in: [sys/ctr.ts:864](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L864)
23046
23072
 
23047
23073
  获取 data 数据
23048
23074
 
@@ -23064,7 +23090,7 @@ Defined in: [sys/ctr.ts:860](https://github.com/maiyunnet/kebab/blob/master/sys/
23064
23090
 
23065
23091
  > `protected` **\_loadLocale**(`loc`, `pkg?`): `Promise`\<`boolean`\>
23066
23092
 
23067
- Defined in: [sys/ctr.ts:908](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L908)
23093
+ Defined in: [sys/ctr.ts:912](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L912)
23068
23094
 
23069
23095
  设定语言并加载语言包
23070
23096
 
@@ -23185,7 +23211,7 @@ Defined in: [sys/ctr.ts:332](https://github.com/maiyunnet/kebab/blob/master/sys/
23185
23211
 
23186
23212
  > `protected` **\_location**(`location`): `false`
23187
23213
 
23188
- Defined in: [sys/ctr.ts:878](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L878)
23214
+ Defined in: [sys/ctr.ts:882](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L882)
23189
23215
 
23190
23216
  跳转(302临时跳转),支持相对本项目根路径的路径或绝对路径
23191
23217
 
@@ -23207,7 +23233,7 @@ Defined in: [sys/ctr.ts:878](https://github.com/maiyunnet/kebab/blob/master/sys/
23207
23233
 
23208
23234
  > `protected` **\_ping**(`data?`): `boolean`
23209
23235
 
23210
- Defined in: [sys/ctr.ts:1071](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1071)
23236
+ Defined in: [sys/ctr.ts:1075](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1075)
23211
23237
 
23212
23238
  发送 socket ping
23213
23239
 
@@ -23229,7 +23255,7 @@ Defined in: [sys/ctr.ts:1071](https://github.com/maiyunnet/kebab/blob/master/sys
23229
23255
 
23230
23256
  > `protected` **\_pong**(`data?`): `boolean`
23231
23257
 
23232
- Defined in: [sys/ctr.ts:1079](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1079)
23258
+ Defined in: [sys/ctr.ts:1083](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1083)
23233
23259
 
23234
23260
  发送 socket pong
23235
23261
 
@@ -23251,7 +23277,7 @@ Defined in: [sys/ctr.ts:1079](https://github.com/maiyunnet/kebab/blob/master/sys
23251
23277
 
23252
23278
  > `protected` **\_startSession**(`link`, `auth?`, `opt?`): `Promise`\<`boolean`\>
23253
23279
 
23254
- Defined in: [sys/ctr.ts:892](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L892)
23280
+ Defined in: [sys/ctr.ts:896](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L896)
23255
23281
 
23256
23282
  开启 Session
23257
23283
 
@@ -23285,7 +23311,7 @@ Kv 或 Db 实例
23285
23311
 
23286
23312
  > `protected` **\_writeBinary**(`data`): `boolean`
23287
23313
 
23288
- Defined in: [sys/ctr.ts:1063](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1063)
23314
+ Defined in: [sys/ctr.ts:1067](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1067)
23289
23315
 
23290
23316
  发送 socket 二进制
23291
23317
 
@@ -23307,7 +23333,7 @@ Defined in: [sys/ctr.ts:1063](https://github.com/maiyunnet/kebab/blob/master/sys
23307
23333
 
23308
23334
  > `protected` **\_writeResult**(`data`): `boolean`
23309
23335
 
23310
- Defined in: [sys/ctr.ts:1055](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1055)
23336
+ Defined in: [sys/ctr.ts:1059](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1059)
23311
23337
 
23312
23338
  发送结果对象文本
23313
23339
 
@@ -23329,7 +23355,7 @@ Defined in: [sys/ctr.ts:1055](https://github.com/maiyunnet/kebab/blob/master/sys
23329
23355
 
23330
23356
  > `protected` **\_writeText**(`data`): `boolean`
23331
23357
 
23332
- Defined in: [sys/ctr.ts:1047](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1047)
23358
+ Defined in: [sys/ctr.ts:1051](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1051)
23333
23359
 
23334
23360
  发送 socket 文本
23335
23361
 
@@ -23351,7 +23377,7 @@ Defined in: [sys/ctr.ts:1047](https://github.com/maiyunnet/kebab/blob/master/sys
23351
23377
 
23352
23378
  > **getAuthorization**(): `false` \| \{ `pwd`: `string`; `type`: `"basic"`; `user`: `string`; \} \| \{ `token`: `string`; `type`: `"bearer"`; \}
23353
23379
 
23354
- Defined in: [sys/ctr.ts:812](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L812)
23380
+ Defined in: [sys/ctr.ts:816](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L816)
23355
23381
 
23356
23382
  通过 header 或 _auth 获取鉴权信息,支持 Basic Auth 和 Bearer Token
23357
23383
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.13.2";
8
+ export declare const VER = "9.13.4";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.13.2';
9
+ export const VER = '9.13.4';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/lib/ai.d.ts CHANGED
@@ -33,10 +33,14 @@ export declare enum ESERVICE {
33
33
  'VOLCN' = 8,
34
34
  /** --- 火山引擎国际区 --- */
35
35
  'VOLAS' = 9,
36
+ /** --- Deepseek --- */
37
+ 'DEEPSEEK' = 10,
38
+ /** --- 小米 MIMO --- */
39
+ 'MIMO' = 11,
36
40
  /** --- OpenRouter --- */
37
- 'OPENROUTER' = 10,
41
+ 'OPENROUTER' = 12,
38
42
  /** --- OfoxAI --- */
39
- 'OFOX' = 11
43
+ 'OFOX' = 13
40
44
  }
41
45
  /** --- 选项 --- */
42
46
  export interface IOptions {
package/lib/ai.js CHANGED
@@ -34,11 +34,15 @@ export var ESERVICE;
34
34
  ESERVICE[ESERVICE["VOLCN"] = 8] = "VOLCN";
35
35
  /** --- 火山引擎国际区 --- */
36
36
  ESERVICE[ESERVICE["VOLAS"] = 9] = "VOLAS";
37
+ /** --- Deepseek --- */
38
+ ESERVICE[ESERVICE["DEEPSEEK"] = 10] = "DEEPSEEK";
39
+ /** --- 小米 MIMO --- */
40
+ ESERVICE[ESERVICE["MIMO"] = 11] = "MIMO";
37
41
  // --- 以下为第三方服务商 ---
38
42
  /** --- OpenRouter --- */
39
- ESERVICE[ESERVICE["OPENROUTER"] = 10] = "OPENROUTER";
43
+ ESERVICE[ESERVICE["OPENROUTER"] = 12] = "OPENROUTER";
40
44
  /** --- OfoxAI --- */
41
- ESERVICE[ESERVICE["OFOX"] = 11] = "OFOX";
45
+ ESERVICE[ESERVICE["OFOX"] = 13] = "OFOX";
42
46
  })(ESERVICE || (ESERVICE = {}));
43
47
  /** --- openai 的连接对象 --- */
44
48
  const links = [];
@@ -99,6 +103,14 @@ export class Ai {
99
103
  endpoint = opt.endpoint ?? `https://ark.ap-southeast.bytepluses.com/api/v3`;
100
104
  break;
101
105
  }
106
+ case ESERVICE.DEEPSEEK: {
107
+ endpoint = opt.endpoint ?? `https://api.deepseek.com`;
108
+ break;
109
+ }
110
+ case ESERVICE.MIMO: {
111
+ endpoint = opt.endpoint ?? `https://api.xiaomimimo.com/v1`;
112
+ break;
113
+ }
102
114
  case ESERVICE.OPENROUTER: {
103
115
  endpoint = opt.endpoint ?? `https://openrouter.ai/api/v1`;
104
116
  break;
@@ -330,9 +342,9 @@ export class Ai {
330
342
  return false;
331
343
  }
332
344
  }
333
- case ESERVICE.OPENROUTER: {
334
- return false;
335
- }
345
+ case ESERVICE.DEEPSEEK:
346
+ case ESERVICE.MIMO:
347
+ case ESERVICE.OPENROUTER:
336
348
  case ESERVICE.OFOX: {
337
349
  return false;
338
350
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.13.2",
3
+ "version": "9.13.4",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
package/sys/cmd.js CHANGED
@@ -191,6 +191,10 @@ async function run() {
191
191
  config.ai['VOLCN'].skey ??= '';
192
192
  config.ai['VOLAS'] ??= {};
193
193
  config.ai['VOLAS'].skey ??= '';
194
+ config.ai['DEEPSEEK'] ??= {};
195
+ config.ai['DEEPSEEK'].skey ??= '';
196
+ config.ai['MIMO'] ??= {};
197
+ config.ai['MIMO'].skey ??= '';
194
198
  config.ai['OPENROUTER'] ??= {};
195
199
  config.ai['OPENROUTER'].skey ??= '';
196
200
  config.ai['OFOX'] ??= {};
package/sys/ctr.d.ts CHANGED
@@ -212,8 +212,9 @@ export declare class Ctr {
212
212
  * @param input 要校验的输入项
213
213
  * @param rule 规则, int, double, num(可字符串), array, bool, string, ascii
214
214
  * @param rtn 返回值
215
+ * @param ignore 忽略 xsrf 判断
215
216
  */
216
- protected _checkXInput(input: Record<string, kebab.Json>, rule: Record<string, kebab.Json[]>, rtn: kebab.Json[]): boolean;
217
+ protected _checkXInput(input: Record<string, kebab.Json>, rule: Record<string, kebab.Json[]>, rtn: kebab.Json[], ignore?: boolean): boolean;
217
218
  /**
218
219
  * --- 当前页面开启 XSRF 支持(主要检测 cookie 是否存在) ---
219
220
  * --- 如果当前页面有 CDN,请不要使用 ---
package/sys/ctr.js CHANGED
@@ -595,9 +595,12 @@ export class Ctr {
595
595
  * @param input 要校验的输入项
596
596
  * @param rule 规则, int, double, num(可字符串), array, bool, string, ascii
597
597
  * @param rtn 返回值
598
+ * @param ignore 忽略 xsrf 判断
598
599
  */
599
- _checkXInput(input, rule, rtn) {
600
- rule['_xsrf'] ??= ['require', this._cookie['XSRF-TOKEN'], [0, 'Bad request, no permission.']];
600
+ _checkXInput(input, rule, rtn, ignore = false) {
601
+ if (!ignore) {
602
+ rule['_xsrf'] ??= ['require', this._cookie['XSRF-TOKEN'], [0, 'Bad request, no permission.']];
603
+ }
601
604
  return this._checkInput(input, rule, rtn);
602
605
  }
603
606
  /**
package/sys/master.js CHANGED
@@ -386,7 +386,6 @@ function createRpcListener() {
386
386
  '.nyc_output',
387
387
  'tmp',
388
388
  'temp',
389
- 'AGENTS.md',
390
389
  ]);
391
390
  for (const path in ls) {
392
391
  /** --- 带 / 开头的 zip 中文件完整路径,例如 "/www/pika/ctr/api.js" --- */
@@ -409,6 +408,10 @@ function createRpcListener() {
409
408
  // --- 测试或开发文件不覆盖 ---
410
409
  continue;
411
410
  }
411
+ if (fname === 'AGENTS.md') {
412
+ // --- 排除文件不部署 ---
413
+ continue;
414
+ }
412
415
  // --- 规则 1:若同级目录存在 xxx.cga,则 xxx 目录下所有内容不部署 ---
413
416
  if (pat) {
414
417
  /** --- 是否被 .cga 文件锁定阻止 --- */