@autobe/rpc 0.11.1 → 0.12.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.
@@ -1,6 +1,4 @@
1
- import { AutoBeAgent } from "@autobe/agent";
2
- import { AutoBeHistory, AutoBeUserMessageContent, IAutoBeGetFilesOptions, IAutoBeRpcListener, IAutoBeRpcService, IAutoBeTokenUsageJson } from "@autobe/interface";
3
- import { ILlmSchema } from "@samchon/openapi";
1
+ import { AutoBeHistory, AutoBeUserMessageContent, IAutoBeAgent, IAutoBeGetFilesOptions, IAutoBeRpcListener, IAutoBeRpcService, IAutoBeTokenUsageJson } from "@autobe/interface";
4
2
  /**
5
3
  * WebSocket RPC service implementation that wraps AutoBeAgent for remote
6
4
  * access.
@@ -24,7 +22,7 @@ import { ILlmSchema } from "@samchon/openapi";
24
22
  *
25
23
  * @author Samchon
26
24
  */
27
- export declare class AutoBeRpcService<Model extends ILlmSchema.Model> implements IAutoBeRpcService {
25
+ export declare class AutoBeRpcService implements IAutoBeRpcService {
28
26
  private readonly props;
29
27
  /**
30
28
  * Initializes the RPC service with an AutoBeAgent and client event listener.
@@ -42,7 +40,7 @@ export declare class AutoBeRpcService<Model extends ILlmSchema.Model> implements
42
40
  * @param props Configuration containing the agent instance and client
43
41
  * listener
44
42
  */
45
- constructor(props: AgenticaRpcService.IProps<Model>);
43
+ constructor(props: AgenticaRpcService.IProps);
46
44
  conversate(content: string | AutoBeUserMessageContent | AutoBeUserMessageContent[]): Promise<AutoBeHistory[]>;
47
45
  getFiles(options?: Partial<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
48
46
  getHistories(): Promise<AutoBeHistory[]>;
@@ -59,7 +57,7 @@ export declare namespace AgenticaRpcService {
59
57
  *
60
58
  * @author Samchon
61
59
  */
62
- interface IProps<Model extends ILlmSchema.Model> {
60
+ interface IProps {
63
61
  /**
64
62
  * AutoBeAgent instance to expose through the RPC service.
65
63
  *
@@ -69,7 +67,7 @@ export declare namespace AgenticaRpcService {
69
67
  * clients through the RPC service interface while maintaining full feature
70
68
  * compatibility.
71
69
  */
72
- agent: AutoBeAgent<Model>;
70
+ agent: IAutoBeAgent;
73
71
  /**
74
72
  * Client event listener for receiving agent events.
75
73
  *
@@ -58,18 +58,18 @@ class AutoBeRpcService {
58
58
  this.props = props;
59
59
  const { agent, listener } = this.props;
60
60
  for (const key of [
61
- "assistantMessage",
62
- "userMessage",
63
61
  "analyzeComplete",
64
62
  "analyzeReview",
65
63
  "analyzeStart",
66
64
  "analyzeWrite",
65
+ "assistantMessage",
67
66
  "interfaceComplement",
68
67
  "interfaceComplete",
69
68
  "interfaceComponents",
70
69
  "interfaceEndpoints",
71
70
  "interfaceOperations",
72
71
  "interfaceStart",
72
+ "userMessage",
73
73
  "prismaComplete",
74
74
  "prismaComponents",
75
75
  "prismaCorrect",
@@ -78,6 +78,9 @@ class AutoBeRpcService {
78
78
  "prismaStart",
79
79
  "prismaValidate",
80
80
  "realizeComplete",
81
+ "realizeDecoratorCorrect",
82
+ "realizeDecorator",
83
+ "realizeDecoratorValidate",
81
84
  "realizeProgress",
82
85
  "realizeStart",
83
86
  "realizeTestComplete",
@@ -111,7 +114,7 @@ class AutoBeRpcService {
111
114
  }
112
115
  getTokenUsage() {
113
116
  return __awaiter(this, void 0, void 0, function* () {
114
- return this.props.agent.getTokenUsage().toJSON();
117
+ return this.props.agent.getTokenUsage();
115
118
  });
116
119
  }
117
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeRpcService.js","sourceRoot":"","sources":["../src/AutoBeRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAUA,kDAA0B;AAE1B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,gBAAgB;IAG3B;;;;;;;;;;;;;;;OAeG;IACH,YAAoC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;QACzE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KA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Q,CAAC,GAAG,CAAE,CAAC,KAAY,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;IACP,CAAC;IAEM,UAAU,CACf,OAAuE;QAEvE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAEY,QAAQ,CACnB,OAAyC;;YAEzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;KAAA;IAEY,YAAY;;YACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QACzC,CAAC;KAAA;IAEY,aAAa;;YACxB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAC1C,CAAC;KAAA;CACF;AA5CD,4CA4CC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobe/rpc",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "AI backend server code generator",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [],
@@ -24,10 +24,9 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@samchon/openapi": "^4.5.0",
28
- "typia": "^9.5.0",
29
- "@autobe/agent": "^0.11.1",
30
- "@autobe/interface": "^0.11.1"
27
+ "@samchon/openapi": "^4.6.0",
28
+ "typia": "^9.6.0",
29
+ "@autobe/interface": "^0.12.0"
31
30
  },
32
31
  "devDependencies": {
33
32
  "rimraf": "^6.0.1",
@@ -1,13 +1,12 @@
1
- import { AutoBeAgent } from "@autobe/agent";
2
1
  import {
3
2
  AutoBeHistory,
4
3
  AutoBeUserMessageContent,
4
+ IAutoBeAgent,
5
5
  IAutoBeGetFilesOptions,
6
6
  IAutoBeRpcListener,
7
7
  IAutoBeRpcService,
8
8
  IAutoBeTokenUsageJson,
9
9
  } from "@autobe/interface";
10
- import { ILlmSchema } from "@samchon/openapi";
11
10
  import typia from "typia";
12
11
 
13
12
  /**
@@ -33,9 +32,7 @@ import typia from "typia";
33
32
  *
34
33
  * @author Samchon
35
34
  */
36
- export class AutoBeRpcService<Model extends ILlmSchema.Model>
37
- implements IAutoBeRpcService
38
- {
35
+ export class AutoBeRpcService implements IAutoBeRpcService {
39
36
  /**
40
37
  * Initializes the RPC service with an AutoBeAgent and client event listener.
41
38
  *
@@ -52,7 +49,7 @@ export class AutoBeRpcService<Model extends ILlmSchema.Model>
52
49
  * @param props Configuration containing the agent instance and client
53
50
  * listener
54
51
  */
55
- public constructor(private readonly props: AgenticaRpcService.IProps<Model>) {
52
+ public constructor(private readonly props: AgenticaRpcService.IProps) {
56
53
  const { agent, listener } = this.props;
57
54
  for (const key of typia.misc.literals<keyof IAutoBeRpcListener>())
58
55
  agent.on(key, (event) => {
@@ -77,7 +74,7 @@ export class AutoBeRpcService<Model extends ILlmSchema.Model>
77
74
  }
78
75
 
79
76
  public async getTokenUsage(): Promise<IAutoBeTokenUsageJson> {
80
- return this.props.agent.getTokenUsage().toJSON();
77
+ return this.props.agent.getTokenUsage();
81
78
  }
82
79
  }
83
80
 
@@ -92,7 +89,7 @@ export namespace AgenticaRpcService {
92
89
  *
93
90
  * @author Samchon
94
91
  */
95
- export interface IProps<Model extends ILlmSchema.Model> {
92
+ export interface IProps {
96
93
  /**
97
94
  * AutoBeAgent instance to expose through the RPC service.
98
95
  *
@@ -102,7 +99,7 @@ export namespace AgenticaRpcService {
102
99
  * clients through the RPC service interface while maintaining full feature
103
100
  * compatibility.
104
101
  */
105
- agent: AutoBeAgent<Model>;
102
+ agent: IAutoBeAgent;
106
103
 
107
104
  /**
108
105
  * Client event listener for receiving agent events.