@cloudbase/agent-server 0.0.7 → 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 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
@@ -474,8 +474,7 @@ function createExpressServer(props) {
474
474
  }
475
475
  createExpressRoutes({
476
476
  ...rest,
477
- express: app,
478
- basePath: props.basePath ?? (process.env.TENCENTCLOUD_RUNENV === "SCF" ? "/v1/aibot/bots/:agentId/" : void 0)
477
+ express: app
479
478
  });
480
479
  return app;
481
480
  }
@@ -487,7 +486,7 @@ function createExpressRoutes({
487
486
  aguiOptions
488
487
  }) {
489
488
  const useAGUI = _useAGUI ?? true;
490
- const basePath = _basePath ?? "/";
489
+ const basePath = _basePath ?? (process.env.TENCENTCLOUD_RUNENV === "SCF" ? "/v1/aibot/bots/:agentId/" : "/");
491
490
  const sendMessageServerAdapter = useAGUI ? sendMessageAGUI_exports.createServerAdapter(createAgent) : sendMessage_exports.createServerAdapter(createAgent);
492
491
  if (useAGUI) {
493
492
  createAGUIRoute({
@@ -530,10 +529,20 @@ function getAGUIRpcHandler({
530
529
  })();
531
530
  return AGUIRpcHandlerPromise;
532
531
  }
533
- function createAGUIRoute(props) {
534
- const { express: express2, basePath } = props;
532
+ function createAGUIRoute({
533
+ express: express2,
534
+ basePath,
535
+ createAgent,
536
+ runtimeOptions,
537
+ endpointOptions
538
+ }) {
535
539
  express2.post(`${basePath}agui`, async (req, res) => {
536
- const rpcHandler = await getAGUIRpcHandler(props);
540
+ const rpcHandler = await getAGUIRpcHandler({
541
+ createAgent,
542
+ basePath,
543
+ runtimeOptions,
544
+ endpointOptions
545
+ });
537
546
  rpcHandler(req, res);
538
547
  });
539
548
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/agent-server",
3
- "version": "0.0.7",
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.7"
23
+ "@cloudbase/agent-shared": "^0.0.9"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/cors": "^2.8.19",