@autobe/rpc 0.29.2 → 0.30.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,4 +1,4 @@
|
|
|
1
|
-
import { AutoBeHistory, AutoBePhase,
|
|
1
|
+
import { AutoBeHistory, AutoBePhase, AutoBeUserConversateContent, IAutoBeAgent, IAutoBeGetFilesOptions, IAutoBeRpcListener, IAutoBeRpcService, IAutoBeTokenUsageJson } from "@autobe/interface";
|
|
2
2
|
/**
|
|
3
3
|
* WebSocket RPC service implementation that wraps AutoBeAgent for remote
|
|
4
4
|
* access.
|
|
@@ -41,7 +41,7 @@ export declare class AutoBeRpcService implements IAutoBeRpcService {
|
|
|
41
41
|
* listener
|
|
42
42
|
*/
|
|
43
43
|
constructor(props: AgenticaRpcService.IProps);
|
|
44
|
-
conversate(content: string |
|
|
44
|
+
conversate(content: string | AutoBeUserConversateContent | AutoBeUserConversateContent[]): Promise<AutoBeHistory[]>;
|
|
45
45
|
getFiles(options?: Partial<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
|
|
46
46
|
getHistories(): Promise<AutoBeHistory[]>;
|
|
47
47
|
getTokenUsage(): Promise<IAutoBeTokenUsageJson>;
|
|
@@ -79,7 +79,7 @@ export declare namespace AgenticaRpcService {
|
|
|
79
79
|
* the remote client.
|
|
80
80
|
*/
|
|
81
81
|
listener: IAutoBeRpcListener;
|
|
82
|
-
onStart?: (content: string |
|
|
82
|
+
onStart?: (content: string | AutoBeUserConversateContent | AutoBeUserConversateContent[]) => void;
|
|
83
83
|
onComplete?: (result: AutoBeHistory[]) => void;
|
|
84
84
|
}
|
|
85
85
|
}
|
package/lib/AutoBeRpcService.js
CHANGED
|
@@ -59,49 +59,64 @@ class AutoBeRpcService {
|
|
|
59
59
|
const { agent, listener } = this.props;
|
|
60
60
|
for (const key of [
|
|
61
61
|
"assistantMessage",
|
|
62
|
-
"
|
|
62
|
+
"userMessage",
|
|
63
|
+
"imageDescribeStart",
|
|
64
|
+
"imageDescribeDraft",
|
|
65
|
+
"imageDescribeComplete",
|
|
66
|
+
"analyzeStart",
|
|
63
67
|
"analyzeScenario",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
68
|
+
"analyzeComplete",
|
|
69
|
+
"analyzeWriteModule",
|
|
70
|
+
"analyzeWriteUnit",
|
|
71
|
+
"analyzeWriteSection",
|
|
72
|
+
"analyzeModuleReview",
|
|
73
|
+
"analyzeUnitReview",
|
|
74
|
+
"analyzeSectionReview",
|
|
75
|
+
"analyzeScenarioReview",
|
|
76
|
+
"databaseStart",
|
|
77
|
+
"databaseGroup",
|
|
78
|
+
"databaseGroupReview",
|
|
79
|
+
"databaseAuthorization",
|
|
80
|
+
"databaseAuthorizationReview",
|
|
81
|
+
"databaseComponent",
|
|
82
|
+
"databaseComponentReview",
|
|
83
|
+
"databaseSchema",
|
|
84
|
+
"databaseSchemaReview",
|
|
85
|
+
"databaseValidate",
|
|
86
|
+
"databaseCorrect",
|
|
87
|
+
"databaseComplete",
|
|
88
|
+
"interfaceStart",
|
|
89
|
+
"interfaceGroup",
|
|
67
90
|
"interfaceEndpoint",
|
|
68
91
|
"interfaceEndpointReview",
|
|
69
|
-
"interfaceGroup",
|
|
70
|
-
"interfaceOperation",
|
|
71
92
|
"interfaceOperationReview",
|
|
72
|
-
"
|
|
93
|
+
"interfaceOperation",
|
|
94
|
+
"interfaceAuthorization",
|
|
73
95
|
"interfaceSchema",
|
|
74
|
-
"
|
|
96
|
+
"interfaceSchemaCasting",
|
|
97
|
+
"interfaceSchemaRefine",
|
|
75
98
|
"interfaceSchemaReview",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
99
|
+
"interfaceSchemaRename",
|
|
100
|
+
"interfaceSchemaComplement",
|
|
101
|
+
"interfaceComplete",
|
|
102
|
+
"interfacePrerequisite",
|
|
103
|
+
"testStart",
|
|
80
104
|
"testScenario",
|
|
81
105
|
"testScenarioReview",
|
|
82
106
|
"testWrite",
|
|
83
|
-
"testCorrect",
|
|
84
|
-
"realizeWrite",
|
|
85
|
-
"realizeCorrect",
|
|
86
|
-
"realizeAuthorizationWrite",
|
|
87
|
-
"realizeAuthorizationCorrect",
|
|
88
|
-
"userMessage",
|
|
89
|
-
"analyzeStart",
|
|
90
|
-
"analyzeComplete",
|
|
91
|
-
"interfaceStart",
|
|
92
|
-
"interfaceComplete",
|
|
93
|
-
"prismaStart",
|
|
94
|
-
"prismaInsufficient",
|
|
95
|
-
"prismaValidate",
|
|
96
|
-
"prismaComplete",
|
|
97
|
-
"testStart",
|
|
98
107
|
"testValidate",
|
|
108
|
+
"testCorrect",
|
|
99
109
|
"testComplete",
|
|
100
110
|
"realizeStart",
|
|
111
|
+
"realizePlan",
|
|
112
|
+
"realizeWrite",
|
|
113
|
+
"realizeCorrect",
|
|
101
114
|
"realizeValidate",
|
|
102
115
|
"realizeComplete",
|
|
103
116
|
"realizeAuthorizationStart",
|
|
117
|
+
"realizeAuthorizationWrite",
|
|
104
118
|
"realizeAuthorizationValidate",
|
|
119
|
+
"realizeAuthorizationCorrect",
|
|
105
120
|
"realizeAuthorizationComplete",
|
|
106
121
|
"realizeTestStart",
|
|
107
122
|
"realizeTestReset",
|
|
@@ -112,6 +127,7 @@ class AutoBeRpcService {
|
|
|
112
127
|
if (key === "enable")
|
|
113
128
|
continue;
|
|
114
129
|
agent.on(key, (event) => {
|
|
130
|
+
// biome-ignore lint: intended
|
|
115
131
|
listener[key](event).catch(() => { });
|
|
116
132
|
});
|
|
117
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeRpcService.js","sourceRoot":"","sources":["../src/AutoBeRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAUA,kDAA0B;AAE1B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;;OAeG;IACH,YAAoC,KAAgC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7C,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU;oBAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBACzD,OAAO,MAAM,CAAC;YAChB,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;KAAA;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;IAEY,QAAQ;;YACnB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC;KAAA;CACF;AAhED,4CAgEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/rpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "AI backend server code generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -24,13 +24,11 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"@autobe/interface": "^0.29.2"
|
|
27
|
+
"typia": "^12.0.1",
|
|
28
|
+
"@autobe/interface": "^0.30.0"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"rimraf": "^6.0.1",
|
|
33
|
-
"ts-patch": "^3.3.0",
|
|
34
32
|
"typescript": "~5.9.3"
|
|
35
33
|
},
|
|
36
34
|
"scripts": {
|
package/src/AutoBeRpcService.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoBeHistory,
|
|
3
3
|
AutoBePhase,
|
|
4
|
-
|
|
4
|
+
AutoBeUserConversateContent,
|
|
5
5
|
IAutoBeAgent,
|
|
6
6
|
IAutoBeGetFilesOptions,
|
|
7
7
|
IAutoBeRpcListener,
|
|
@@ -55,13 +55,17 @@ export class AutoBeRpcService implements IAutoBeRpcService {
|
|
|
55
55
|
for (const key of typia.misc.literals<keyof IAutoBeRpcListener>()) {
|
|
56
56
|
if (key === "enable") continue;
|
|
57
57
|
agent.on(key, (event) => {
|
|
58
|
+
// biome-ignore lint: intended
|
|
58
59
|
listener[key]!(event as any).catch(() => {});
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
public async conversate(
|
|
64
|
-
content:
|
|
65
|
+
content:
|
|
66
|
+
| string
|
|
67
|
+
| AutoBeUserConversateContent
|
|
68
|
+
| AutoBeUserConversateContent[],
|
|
65
69
|
): Promise<AutoBeHistory[]> {
|
|
66
70
|
if (this.props.onStart) this.props.onStart(content);
|
|
67
71
|
|
|
@@ -130,7 +134,10 @@ export namespace AgenticaRpcService {
|
|
|
130
134
|
listener: IAutoBeRpcListener;
|
|
131
135
|
|
|
132
136
|
onStart?: (
|
|
133
|
-
content:
|
|
137
|
+
content:
|
|
138
|
+
| string
|
|
139
|
+
| AutoBeUserConversateContent
|
|
140
|
+
| AutoBeUserConversateContent[],
|
|
134
141
|
) => void;
|
|
135
142
|
|
|
136
143
|
onComplete?: (result: AutoBeHistory[]) => void;
|