@cloudbase/agent-server 0.0.8 → 0.0.9
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 +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @cloudbase/agent-server
|
|
2
2
|
|
|
3
|
+
## 1.0.1-alpha.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- alpha release 0.1.2-alpha.1
|
|
8
|
+
- Update all public packages to version 0.1.2-alpha.1
|
|
9
|
+
- Trigger automated alpha release workflow
|
|
10
|
+
- Includes latest features and improvements
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @cloudbase/agent-shared@1.0.1-alpha.5
|
|
14
|
+
|
|
3
15
|
## 1.0.1-alpha.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ interface ICreateServer {
|
|
|
26
26
|
interface IRun extends ICreateServer {
|
|
27
27
|
port?: number | string;
|
|
28
28
|
}
|
|
29
|
-
interface ICreateExpressRoutes extends ICreateServer {
|
|
29
|
+
interface ICreateExpressRoutes extends Omit<ICreateServer, "cors"> {
|
|
30
30
|
express: Express;
|
|
31
31
|
}
|
|
32
32
|
declare function run(props: IRun): void;
|
package/dist/index.js
CHANGED
|
@@ -486,7 +486,7 @@ function createExpressRoutes({
|
|
|
486
486
|
aguiOptions
|
|
487
487
|
}) {
|
|
488
488
|
const useAGUI = _useAGUI ?? true;
|
|
489
|
-
const basePath = _basePath ?? (process.env.TENCENTCLOUD_RUNENV === "SCF" ? "/v1/aibot/bots/:agentId/" :
|
|
489
|
+
const basePath = _basePath ?? (process.env.TENCENTCLOUD_RUNENV === "SCF" ? "/v1/aibot/bots/:agentId/" : "/");
|
|
490
490
|
const sendMessageServerAdapter = useAGUI ? sendMessageAGUI_exports.createServerAdapter(createAgent) : sendMessage_exports.createServerAdapter(createAgent);
|
|
491
491
|
if (useAGUI) {
|
|
492
492
|
createAGUIRoute({
|
|
@@ -529,10 +529,20 @@ function getAGUIRpcHandler({
|
|
|
529
529
|
})();
|
|
530
530
|
return AGUIRpcHandlerPromise;
|
|
531
531
|
}
|
|
532
|
-
function createAGUIRoute(
|
|
533
|
-
|
|
532
|
+
function createAGUIRoute({
|
|
533
|
+
express: express2,
|
|
534
|
+
basePath,
|
|
535
|
+
createAgent,
|
|
536
|
+
runtimeOptions,
|
|
537
|
+
endpointOptions
|
|
538
|
+
}) {
|
|
534
539
|
express2.post(`${basePath}agui`, async (req, res) => {
|
|
535
|
-
const rpcHandler = await getAGUIRpcHandler(
|
|
540
|
+
const rpcHandler = await getAGUIRpcHandler({
|
|
541
|
+
createAgent,
|
|
542
|
+
basePath,
|
|
543
|
+
runtimeOptions,
|
|
544
|
+
endpointOptions
|
|
545
|
+
});
|
|
536
546
|
rpcHandler(req, res);
|
|
537
547
|
});
|
|
538
548
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/agent-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"openai": "6.3.0",
|
|
21
21
|
"uuid": "^10.0.0",
|
|
22
22
|
"zod": "^4.1.12",
|
|
23
|
-
"@cloudbase/agent-shared": "^0.0.
|
|
23
|
+
"@cloudbase/agent-shared": "^0.0.9"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/cors": "^2.8.19",
|