@blade-hq/agent-react 2610.0.0-beta.60 → 2610.0.0-beta.62
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/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/random-id.d.ts +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 生成随机标识。
|
|
3
|
+
*
|
|
4
|
+
* `crypto.randomUUID` 只在安全上下文(HTTPS 或 localhost)可用:部署成
|
|
5
|
+
* `http://<host>:<port>` 时它是 undefined,直接调用会让调用方整个挂掉
|
|
6
|
+
* (MCP App 卡片就是这么坏的)。`crypto.getRandomValues` 不受这条限制,
|
|
7
|
+
* 这里用它拼出等价的 UUID v4,只有在完全没有 Web Crypto 的环境才退回
|
|
8
|
+
* 时间戳 + 随机数——那只是为了不抛异常,不保证全局唯一性。
|
|
9
|
+
*/
|
|
10
|
+
export declare function randomId(): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blade-hq/agent-react",
|
|
3
|
-
"version": "2610.0.0-beta.
|
|
3
|
+
"version": "2610.0.0-beta.62",
|
|
4
4
|
"description": "Blade Agent React 绑定:BladeProvider、useAgentSession、开箱即用的 ChatView 聊天界面。",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@blade-hq/agent-client": "2610.0.0-beta.
|
|
34
|
+
"@blade-hq/agent-client": "2610.0.0-beta.62"
|
|
35
35
|
},
|
|
36
36
|
"bundledDependencies": [],
|
|
37
37
|
"peerDependencies": {
|