@autobe/rpc 0.8.0 → 0.9.1

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,20 +1,84 @@
1
1
  import { AutoBeAgent } from "@autobe/agent";
2
- import { AutoBeHistory, AutoBeUserMessageContent, IAutoBeRpcListener, IAutoBeRpcService, IAutoBeTokenUsageJson } from "@autobe/interface";
2
+ import { AutoBeHistory, AutoBeUserMessageContent, IAutoBeGetFilesOptions, IAutoBeRpcListener, IAutoBeRpcService, IAutoBeTokenUsageJson } from "@autobe/interface";
3
3
  import { ILlmSchema } from "@samchon/openapi";
4
+ /**
5
+ * WebSocket RPC service implementation that wraps AutoBeAgent for remote
6
+ * access.
7
+ *
8
+ * This class serves as the WebSocket RPC Provider in TGrid's paradigm, exposing
9
+ * AutoBeAgent functionality to remote client applications through type-safe
10
+ * WebSocket connections. It implements the {@link IAutoBeRpcService} interface
11
+ * to provide standardized remote procedure call access to the vibe coding
12
+ * pipeline.
13
+ *
14
+ * The service automatically bridges all agent events to the client's event
15
+ * listener, ensuring that remote clients receive real-time progress
16
+ * notifications throughout the development process. This enables responsive
17
+ * user interfaces that can display progress, handle artifacts, and provide
18
+ * feedback during the automated development workflow.
19
+ *
20
+ * By wrapping the AutoBeAgent, this service transforms local agent capabilities
21
+ * into a distributed system component that supports multiple concurrent client
22
+ * connections while maintaining the full functionality and event transparency
23
+ * of the underlying vibe coding system.
24
+ *
25
+ * @author Samchon
26
+ */
4
27
  export declare class AutoBeRpcService<Model extends ILlmSchema.Model> implements IAutoBeRpcService {
5
28
  private readonly props;
29
+ /**
30
+ * Initializes the RPC service with an AutoBeAgent and client event listener.
31
+ *
32
+ * Creates the service wrapper around the provided AutoBeAgent and establishes
33
+ * automatic event forwarding to the client's listener. All agent events are
34
+ * automatically registered and forwarded to ensure the remote client receives
35
+ * comprehensive real-time updates about conversation flow, development
36
+ * progress, and completion events.
37
+ *
38
+ * The event bridging is established during construction and remains active
39
+ * throughout the service lifetime, providing seamless integration between the
40
+ * local agent's event system and the remote client's notification handlers.
41
+ *
42
+ * @param props Configuration containing the agent instance and client
43
+ * listener
44
+ */
6
45
  constructor(props: AgenticaRpcService.IProps<Model>);
7
46
  conversate(content: string | AutoBeUserMessageContent | AutoBeUserMessageContent[]): Promise<AutoBeHistory[]>;
8
- getFiles(): Promise<Record<string, string>>;
47
+ getFiles(options?: Partial<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
9
48
  getHistories(): Promise<AutoBeHistory[]>;
10
49
  getTokenUsage(): Promise<IAutoBeTokenUsageJson>;
11
50
  }
12
51
  export declare namespace AgenticaRpcService {
13
- /** Properties of the {@link AgenticaRpcService}. */
52
+ /**
53
+ * Configuration properties for initializing the AutoBeRpcService.
54
+ *
55
+ * Defines the required components for creating a WebSocket RPC service that
56
+ * exposes AutoBeAgent functionality to remote clients. The configuration
57
+ * establishes both the underlying agent capabilities and the event forwarding
58
+ * mechanism necessary for real-time client notifications.
59
+ *
60
+ * @author Samchon
61
+ */
14
62
  interface IProps<Model extends ILlmSchema.Model> {
15
- /** Target agent to provide as RPC service. */
63
+ /**
64
+ * AutoBeAgent instance to expose through the RPC service.
65
+ *
66
+ * The core agent that provides vibe coding capabilities including
67
+ * conversation processing, development pipeline orchestration, and artifact
68
+ * generation. This agent's functionality becomes available to remote
69
+ * clients through the RPC service interface while maintaining full feature
70
+ * compatibility.
71
+ */
16
72
  agent: AutoBeAgent<Model>;
17
- /** Listener to be binded on the agent. */
73
+ /**
74
+ * Client event listener for receiving agent events.
75
+ *
76
+ * The remote client's event listener implementation that will receive all
77
+ * agent events including conversation flow, development progress, and
78
+ * completion notifications. The service automatically forwards all agent
79
+ * events to this listener to ensure comprehensive real-time visibility for
80
+ * the remote client.
81
+ */
18
82
  listener: IAutoBeRpcListener;
19
83
  }
20
84
  }
@@ -14,15 +14,54 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.AutoBeRpcService = void 0;
16
16
  const typia_1 = __importDefault(require("typia"));
17
+ /**
18
+ * WebSocket RPC service implementation that wraps AutoBeAgent for remote
19
+ * access.
20
+ *
21
+ * This class serves as the WebSocket RPC Provider in TGrid's paradigm, exposing
22
+ * AutoBeAgent functionality to remote client applications through type-safe
23
+ * WebSocket connections. It implements the {@link IAutoBeRpcService} interface
24
+ * to provide standardized remote procedure call access to the vibe coding
25
+ * pipeline.
26
+ *
27
+ * The service automatically bridges all agent events to the client's event
28
+ * listener, ensuring that remote clients receive real-time progress
29
+ * notifications throughout the development process. This enables responsive
30
+ * user interfaces that can display progress, handle artifacts, and provide
31
+ * feedback during the automated development workflow.
32
+ *
33
+ * By wrapping the AutoBeAgent, this service transforms local agent capabilities
34
+ * into a distributed system component that supports multiple concurrent client
35
+ * connections while maintaining the full functionality and event transparency
36
+ * of the underlying vibe coding system.
37
+ *
38
+ * @author Samchon
39
+ */
17
40
  class AutoBeRpcService {
41
+ /**
42
+ * Initializes the RPC service with an AutoBeAgent and client event listener.
43
+ *
44
+ * Creates the service wrapper around the provided AutoBeAgent and establishes
45
+ * automatic event forwarding to the client's listener. All agent events are
46
+ * automatically registered and forwarded to ensure the remote client receives
47
+ * comprehensive real-time updates about conversation flow, development
48
+ * progress, and completion events.
49
+ *
50
+ * The event bridging is established during construction and remains active
51
+ * throughout the service lifetime, providing seamless integration between the
52
+ * local agent's event system and the remote client's notification handlers.
53
+ *
54
+ * @param props Configuration containing the agent instance and client
55
+ * listener
56
+ */
18
57
  constructor(props) {
19
58
  this.props = props;
20
59
  const { agent, listener } = this.props;
21
60
  for (const key of [
22
- "analyzeReview",
23
61
  "analyzeComplete",
62
+ "analyzeReview",
24
63
  "analyzeStart",
25
- "analyzeWriteDocument",
64
+ "analyzeWrite",
26
65
  "assistantMessage",
27
66
  "interfaceComplement",
28
67
  "interfaceComplete",
@@ -41,12 +80,12 @@ class AutoBeRpcService {
41
80
  "realizeStart",
42
81
  "realizeValidate",
43
82
  "testComplete",
83
+ "userMessage",
44
84
  "testCorrect",
45
- "testProgress",
46
85
  "testScenario",
47
86
  "testStart",
48
87
  "testValidate",
49
- "userMessage"
88
+ "testWrite"
50
89
  ])
51
90
  agent.on(key, (event) => {
52
91
  listener[key](event).catch(() => { });
@@ -55,9 +94,9 @@ class AutoBeRpcService {
55
94
  conversate(content) {
56
95
  return this.props.agent.conversate(content);
57
96
  }
58
- getFiles() {
97
+ getFiles(options) {
59
98
  return __awaiter(this, void 0, void 0, function* () {
60
- return this.props.agent.getFiles();
99
+ return this.props.agent.getFiles(options);
61
100
  });
62
101
  }
63
102
  getHistories() {
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeRpcService.js","sourceRoot":"","sources":["../src/AutoBeRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AASA,kDAA0B;AAE1B,MAAa,gBAAgB;IAG3B,YAAoC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;QACzE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACvC,KAAK,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YACZ,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;gBACtB,QAAQ,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;;YACnB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC;KAAA;IAEY,YAAY;;YACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QACzC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ANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobe/rpc",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "AI backend server code generator",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [],
@@ -26,8 +26,8 @@
26
26
  "dependencies": {
27
27
  "@samchon/openapi": "^4.3.3",
28
28
  "typia": "^9.3.1",
29
- "@autobe/agent": "^0.8.0",
30
- "@autobe/interface": "^0.8.0"
29
+ "@autobe/agent": "^0.9.1",
30
+ "@autobe/interface": "^0.9.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "rimraf": "^6.0.1",
@@ -2,6 +2,7 @@ import { AutoBeAgent } from "@autobe/agent";
2
2
  import {
3
3
  AutoBeHistory,
4
4
  AutoBeUserMessageContent,
5
+ IAutoBeGetFilesOptions,
5
6
  IAutoBeRpcListener,
6
7
  IAutoBeRpcService,
7
8
  IAutoBeTokenUsageJson,
@@ -9,9 +10,48 @@ import {
9
10
  import { ILlmSchema } from "@samchon/openapi";
10
11
  import typia from "typia";
11
12
 
13
+ /**
14
+ * WebSocket RPC service implementation that wraps AutoBeAgent for remote
15
+ * access.
16
+ *
17
+ * This class serves as the WebSocket RPC Provider in TGrid's paradigm, exposing
18
+ * AutoBeAgent functionality to remote client applications through type-safe
19
+ * WebSocket connections. It implements the {@link IAutoBeRpcService} interface
20
+ * to provide standardized remote procedure call access to the vibe coding
21
+ * pipeline.
22
+ *
23
+ * The service automatically bridges all agent events to the client's event
24
+ * listener, ensuring that remote clients receive real-time progress
25
+ * notifications throughout the development process. This enables responsive
26
+ * user interfaces that can display progress, handle artifacts, and provide
27
+ * feedback during the automated development workflow.
28
+ *
29
+ * By wrapping the AutoBeAgent, this service transforms local agent capabilities
30
+ * into a distributed system component that supports multiple concurrent client
31
+ * connections while maintaining the full functionality and event transparency
32
+ * of the underlying vibe coding system.
33
+ *
34
+ * @author Samchon
35
+ */
12
36
  export class AutoBeRpcService<Model extends ILlmSchema.Model>
13
37
  implements IAutoBeRpcService
14
38
  {
39
+ /**
40
+ * Initializes the RPC service with an AutoBeAgent and client event listener.
41
+ *
42
+ * Creates the service wrapper around the provided AutoBeAgent and establishes
43
+ * automatic event forwarding to the client's listener. All agent events are
44
+ * automatically registered and forwarded to ensure the remote client receives
45
+ * comprehensive real-time updates about conversation flow, development
46
+ * progress, and completion events.
47
+ *
48
+ * The event bridging is established during construction and remains active
49
+ * throughout the service lifetime, providing seamless integration between the
50
+ * local agent's event system and the remote client's notification handlers.
51
+ *
52
+ * @param props Configuration containing the agent instance and client
53
+ * listener
54
+ */
15
55
  public constructor(private readonly props: AgenticaRpcService.IProps<Model>) {
16
56
  const { agent, listener } = this.props;
17
57
  for (const key of typia.misc.literals<keyof IAutoBeRpcListener>())
@@ -26,8 +66,10 @@ export class AutoBeRpcService<Model extends ILlmSchema.Model>
26
66
  return this.props.agent.conversate(content);
27
67
  }
28
68
 
29
- public async getFiles(): Promise<Record<string, string>> {
30
- return this.props.agent.getFiles();
69
+ public async getFiles(
70
+ options?: Partial<IAutoBeGetFilesOptions>,
71
+ ): Promise<Record<string, string>> {
72
+ return this.props.agent.getFiles(options);
31
73
  }
32
74
 
33
75
  public async getHistories(): Promise<AutoBeHistory[]> {
@@ -38,13 +80,39 @@ export class AutoBeRpcService<Model extends ILlmSchema.Model>
38
80
  return this.props.agent.getTokenUsage().toJSON();
39
81
  }
40
82
  }
83
+
41
84
  export namespace AgenticaRpcService {
42
- /** Properties of the {@link AgenticaRpcService}. */
85
+ /**
86
+ * Configuration properties for initializing the AutoBeRpcService.
87
+ *
88
+ * Defines the required components for creating a WebSocket RPC service that
89
+ * exposes AutoBeAgent functionality to remote clients. The configuration
90
+ * establishes both the underlying agent capabilities and the event forwarding
91
+ * mechanism necessary for real-time client notifications.
92
+ *
93
+ * @author Samchon
94
+ */
43
95
  export interface IProps<Model extends ILlmSchema.Model> {
44
- /** Target agent to provide as RPC service. */
96
+ /**
97
+ * AutoBeAgent instance to expose through the RPC service.
98
+ *
99
+ * The core agent that provides vibe coding capabilities including
100
+ * conversation processing, development pipeline orchestration, and artifact
101
+ * generation. This agent's functionality becomes available to remote
102
+ * clients through the RPC service interface while maintaining full feature
103
+ * compatibility.
104
+ */
45
105
  agent: AutoBeAgent<Model>;
46
106
 
47
- /** Listener to be binded on the agent. */
107
+ /**
108
+ * Client event listener for receiving agent events.
109
+ *
110
+ * The remote client's event listener implementation that will receive all
111
+ * agent events including conversation flow, development progress, and
112
+ * completion notifications. The service automatically forwards all agent
113
+ * events to this listener to ensure comprehensive real-time visibility for
114
+ * the remote client.
115
+ */
48
116
  listener: IAutoBeRpcListener;
49
117
  }
50
118
  }