@glodon-aiot/bot-client-sdk 3.26.0 → 3.27.0-alpha.0

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.
@@ -19,6 +19,13 @@ export interface BotClientConfig {
19
19
  loadRelatedQuesions?: boolean;
20
20
  mcp?: MCPConfig;
21
21
  stream?: boolean;
22
+ /**
23
+ * 应用编排版本。Agent 建连时写入 WebSocket query 的 `appVersion`。
24
+ * `draft`:草稿;`v1` / `v2` / `vx`:指定版本,大小写不敏感;`latest`:始终最新。
25
+ * 不传或空白时 SDK 默认传 `latest`。其他值原样传递,由服务端改用最新版本。
26
+ * ready 带回的版本与请求不一致时,SDK 输出告警,连接仍然成功。
27
+ */
28
+ appVersion?: string;
22
29
  /** SDK 内置插件。文件、命令和技能工具注册到同一个 pluginCode。 */
23
30
  builtinPlugins?: BuiltinPluginsConfig;
24
31
  }
@@ -48,6 +55,7 @@ export declare let configuration: {
48
55
  mcp: (MCPConfig | undefined);
49
56
  loadRelatedQuesions: boolean;
50
57
  stream: boolean;
58
+ appVersion: string;
51
59
  };
52
60
  export declare function setActiveLocalWorkspace(workspace?: LocalWorkspace): void;
53
61
  export declare function getActiveLocalWorkspace(): LocalWorkspace | undefined;
@@ -19,6 +19,11 @@ export interface ReadyEventPayload {
19
19
  code: number;
20
20
  message: string;
21
21
  userMode: UserMode;
22
+ /**
23
+ * 服务端实际生效的应用编排版本。
24
+ * 请求值无效时服务端改为最新版本,此字段与建连传入的 `appVersion` 不一致。
25
+ */
26
+ appVersion?: string;
22
27
  }
23
28
  export interface PluginFunctionBasic {
24
29
  pluginName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glodon-aiot/bot-client-sdk",
3
- "version": "3.26.0",
3
+ "version": "3.27.0-alpha.0",
4
4
  "author": "glodoncv",
5
5
  "description": "aiot bot client js sdk",
6
6
  "type": "module",
@@ -69,7 +69,7 @@
69
69
  "registry": "https://registry.npmjs.org/"
70
70
  },
71
71
  "dependencies": {
72
- "@glodon-aiot/apis": "^3.26.0",
72
+ "@glodon-aiot/apis": "^3.27.0-alpha.0",
73
73
  "axios": "0.24.0",
74
74
  "dayjs": "^1.11.13",
75
75
  "js-base64": "^3.7.7",