@vector-metis/browser-sdk 0.1.2 → 0.1.3
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/README.md +25 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @vector-metis/browser-sdk
|
|
2
|
+
|
|
3
|
+
智办应用浏览器 SDK,为平台注入的 `window.Metis` 能力提供 TypeScript 类型和统一调用代理。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @vector-metis/browser-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
应用入口仍需先加载平台脚本:
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script src="/api/runtime/v1/browser-sdk.js"></script>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { Metis } from "@vector-metis/browser-sdk";
|
|
19
|
+
|
|
20
|
+
const dependencies = await Metis.listDependencies();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
浏览器 SDK 不暴露应用令牌、模型 API key、对象存储凭据或 Service 端口。完整说明见[开发文档](https://github.com/vector-metis/metis-sdk-typescript#readme)。
|
|
24
|
+
|
|
25
|
+
Apache-2.0,见仓库中的 `LICENSE`。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vector-metis/browser-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Metis browser SDK for injected application capabilities",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
|
-
"dist"
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md"
|
|
20
21
|
],
|
|
21
22
|
"engines": {
|
|
22
23
|
"node": ">=20"
|