@agentica/rpc 0.34.1 → 0.35.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.
- package/lib/AgenticaRpcService.d.ts +5 -6
- package/lib/AgenticaRpcService.js.map +1 -1
- package/lib/IAgenticaRpcService.d.ts +2 -3
- package/lib/MicroAgenticaRpcService.d.ts +5 -6
- package/lib/MicroAgenticaRpcService.js.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/AgenticaRpcService.ts +7 -8
- package/src/IAgenticaRpcService.ts +2 -3
- package/src/MicroAgenticaRpcService.ts +7 -8
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Agentica, IAgenticaController } from "@agentica/core";
|
|
2
|
-
import type { ILlmSchema } from "@samchon/openapi";
|
|
3
2
|
import type { IAgenticaRpcListener } from "./IAgenticaRpcListener";
|
|
4
3
|
import type { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
5
4
|
/**
|
|
@@ -45,14 +44,14 @@ import type { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
|
45
44
|
*
|
|
46
45
|
* @author Samchon
|
|
47
46
|
*/
|
|
48
|
-
export declare class AgenticaRpcService
|
|
47
|
+
export declare class AgenticaRpcService implements IAgenticaRpcService {
|
|
49
48
|
private readonly props;
|
|
50
49
|
/**
|
|
51
50
|
* Initializer Constructor.
|
|
52
51
|
*
|
|
53
52
|
* @param props Properties to construct the RPC service
|
|
54
53
|
*/
|
|
55
|
-
constructor(props: AgenticaRpcService.IProps
|
|
54
|
+
constructor(props: AgenticaRpcService.IProps);
|
|
56
55
|
/**
|
|
57
56
|
* @inheritDoc
|
|
58
57
|
*/
|
|
@@ -60,17 +59,17 @@ export declare class AgenticaRpcService<Model extends ILlmSchema.Model> implemen
|
|
|
60
59
|
/**
|
|
61
60
|
* @inheritDoc
|
|
62
61
|
*/
|
|
63
|
-
getControllers(): Promise<IAgenticaController
|
|
62
|
+
getControllers(): Promise<IAgenticaController[]>;
|
|
64
63
|
}
|
|
65
64
|
export declare namespace AgenticaRpcService {
|
|
66
65
|
/**
|
|
67
66
|
* Properties of the {@link AgenticaRpcService}.
|
|
68
67
|
*/
|
|
69
|
-
interface IProps
|
|
68
|
+
interface IProps {
|
|
70
69
|
/**
|
|
71
70
|
* Target agent to provide as RPC service.
|
|
72
71
|
*/
|
|
73
|
-
agent: Agentica
|
|
72
|
+
agent: Agentica;
|
|
74
73
|
/**
|
|
75
74
|
* Listener to be binded on the agent.
|
|
76
75
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgenticaRpcService.js","sourceRoot":"","sources":["../src/AgenticaRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AgenticaRpcService.js","sourceRoot":"","sources":["../src/AgenticaRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAa,kBAAkB;IAE7B;;;;OAIG;IACH,YAAoC,KAAgC;QAAhC,UAAK,GAAL,KAAK,CAA2B;QAClE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;QAElC,sBAAsB;QACtB,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,CAAO,KAAK,EAAE,EAAE;YACtC,QAAQ,CAAC,WAAY,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxD,CAAC,CAAA,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAO,GAAG,EAAE,EAAE;YACzC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;YACjB,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC1D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AAE,CAAC,SAAS,EAAE,CAAO,GAAG,EAAE,EAAE;YAChC,QAAQ,CAAC,OAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAClD,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACU,UAAU,CAAC,OAAqE;;YAC3F,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;KAAA;IAED;;OAEG;IACU,cAAc;;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAA2B,CAAC;QACpE,CAAC;KAAA;CACF;AA3DD,gDA2DC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AgenticaUserMessageContent, IAgenticaController } from "@agentica/core";
|
|
2
|
-
import type { ILlmSchema } from "@samchon/openapi";
|
|
3
2
|
/**
|
|
4
3
|
* RPC interface of AI agent service.
|
|
5
4
|
*
|
|
@@ -13,7 +12,7 @@ import type { ILlmSchema } from "@samchon/openapi";
|
|
|
13
12
|
*
|
|
14
13
|
* @author Samchon
|
|
15
14
|
*/
|
|
16
|
-
export interface IAgenticaRpcService
|
|
15
|
+
export interface IAgenticaRpcService {
|
|
17
16
|
/**
|
|
18
17
|
* Conversate with the AI agent.
|
|
19
18
|
*
|
|
@@ -34,5 +33,5 @@ export interface IAgenticaRpcService<Model extends ILlmSchema.Model> {
|
|
|
34
33
|
* Get controllers, collection of functions that would be
|
|
35
34
|
* called by the AI chatbot.
|
|
36
35
|
*/
|
|
37
|
-
getControllers: () => Promise<IAgenticaController
|
|
36
|
+
getControllers: () => Promise<IAgenticaController[]>;
|
|
38
37
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IAgenticaController, MicroAgentica } from "@agentica/core";
|
|
2
|
-
import type { ILlmSchema } from "@samchon/openapi";
|
|
3
2
|
import type { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
4
3
|
import type { IMicroAgenticaRpcListener } from "./IMicroAgenticaRpcListener";
|
|
5
4
|
/**
|
|
@@ -45,14 +44,14 @@ import type { IMicroAgenticaRpcListener } from "./IMicroAgenticaRpcListener";
|
|
|
45
44
|
*
|
|
46
45
|
* @author Samchon
|
|
47
46
|
*/
|
|
48
|
-
export declare class MicroAgenticaRpcService
|
|
47
|
+
export declare class MicroAgenticaRpcService implements IAgenticaRpcService {
|
|
49
48
|
private readonly props;
|
|
50
49
|
/**
|
|
51
50
|
* Initializer Constructor.
|
|
52
51
|
*
|
|
53
52
|
* @param props Properties to construct the RPC service
|
|
54
53
|
*/
|
|
55
|
-
constructor(props: MicroAgenticaRpcService.IProps
|
|
54
|
+
constructor(props: MicroAgenticaRpcService.IProps);
|
|
56
55
|
/**
|
|
57
56
|
* @inheritDoc
|
|
58
57
|
*/
|
|
@@ -60,17 +59,17 @@ export declare class MicroAgenticaRpcService<Model extends ILlmSchema.Model> imp
|
|
|
60
59
|
/**
|
|
61
60
|
* @inheritDoc
|
|
62
61
|
*/
|
|
63
|
-
getControllers(): Promise<IAgenticaController
|
|
62
|
+
getControllers(): Promise<IAgenticaController[]>;
|
|
64
63
|
}
|
|
65
64
|
export declare namespace MicroAgenticaRpcService {
|
|
66
65
|
/**
|
|
67
66
|
* Properties to construct the RPC service.
|
|
68
67
|
*/
|
|
69
|
-
interface IProps
|
|
68
|
+
interface IProps {
|
|
70
69
|
/**
|
|
71
70
|
* AI agent to be controlled.
|
|
72
71
|
*/
|
|
73
|
-
agent: MicroAgentica
|
|
72
|
+
agent: MicroAgentica;
|
|
74
73
|
/**
|
|
75
74
|
* Listener to be notified.
|
|
76
75
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MicroAgenticaRpcService.js","sourceRoot":"","sources":["../src/MicroAgenticaRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MicroAg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E,CAAC;gBACjB,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;YACvB,CAAC;QACH,CAAC,CAAA,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,CAAO,GAAG,EAAE,EAAE;YAChC,QAAQ,CAAC,OAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAClD,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACU,UAAU,CAAC,OAA0E;;YAChG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;KAAA;IAED;;OAEG;IACU,cAAc;;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAA2B,CAAC;QACpE,CAAC;KAAA;CACF;AAlDD,0DAkDC"}
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/AgenticaRpcService.ts","../src/MicroAgenticaRpcService.ts"],"sourcesContent":[null,null],"names":["AgenticaRpcService","constructor","props","this","agent","listener","on","async","event","userMessage","toJSON","catch","evt","join","assistantMessage","describe","initialize","select","cancel","args","call","arguments","execute","conversate","content","getControllers","MicroAgenticaRpcService"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/AgenticaRpcService.ts","../src/MicroAgenticaRpcService.ts"],"sourcesContent":[null,null],"names":["AgenticaRpcService","constructor","props","this","agent","listener","on","async","event","userMessage","toJSON","catch","evt","join","assistantMessage","describe","initialize","select","cancel","args","call","arguments","execute","conversate","content","getControllers","MicroAgenticaRpcService"],"mappings":"MAgDaA;IAOX,WAAAC,CAAoCC;QAAAC,KAAKD,QAALA;QAClC,OAAME,OAAOC,YAAeH;QAG5BE,MAAME,GAAG,gBAAeC,MAAOC;YAC7BH,SAASI,YAAaD,MAAME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;YAEN,IAAIS,QAAQ,MAAM;gBAChBP,IAAIS,YAAYF;;;QAGpBf,MAAME,GAAG,YAAWC,MAAOK;YACzBP,SAASiB,QAASV,IAAIF,UAAUC,OAAM;AAAS;;IAO5C,gBAAMY,CAAWC;cAChBrB,KAAKD,MAAME,MAAMmB,WAAWC;;IAM7B,oBAAMC;QACX,OAAOtB,KAAKD,MAAME,MAAMqB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentica/rpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Agentic AI Library specialized in LLM Function Calling",
|
|
5
5
|
"author": "Wrtn Technologies",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"src"
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@agentica/core": "^0.
|
|
38
|
+
"@agentica/core": "^0.35.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@samchon/openapi": "^
|
|
42
|
-
"typia": "^
|
|
43
|
-
"@agentica/core": "^0.
|
|
41
|
+
"@samchon/openapi": "^6.0.0",
|
|
42
|
+
"typia": "^11.0.0",
|
|
43
|
+
"@agentica/core": "^0.35.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Agentica, IAgenticaController } from "@agentica/core";
|
|
2
|
-
import type { ILlmSchema } from "@samchon/openapi";
|
|
3
2
|
|
|
4
3
|
import type { IAgenticaRpcListener } from "./IAgenticaRpcListener";
|
|
5
4
|
import type { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
@@ -47,14 +46,14 @@ import type { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
|
47
46
|
*
|
|
48
47
|
* @author Samchon
|
|
49
48
|
*/
|
|
50
|
-
export class AgenticaRpcService
|
|
51
|
-
implements IAgenticaRpcService
|
|
49
|
+
export class AgenticaRpcService
|
|
50
|
+
implements IAgenticaRpcService {
|
|
52
51
|
/**
|
|
53
52
|
* Initializer Constructor.
|
|
54
53
|
*
|
|
55
54
|
* @param props Properties to construct the RPC service
|
|
56
55
|
*/
|
|
57
|
-
public constructor(private readonly props: AgenticaRpcService.IProps
|
|
56
|
+
public constructor(private readonly props: AgenticaRpcService.IProps) {
|
|
58
57
|
const { agent, listener } = props;
|
|
59
58
|
|
|
60
59
|
// ESSENTIAL LISTENERS
|
|
@@ -103,19 +102,19 @@ implements IAgenticaRpcService<Model> {
|
|
|
103
102
|
/**
|
|
104
103
|
* @inheritDoc
|
|
105
104
|
*/
|
|
106
|
-
public async getControllers(): Promise<IAgenticaController
|
|
107
|
-
return this.props.agent.getControllers() as IAgenticaController
|
|
105
|
+
public async getControllers(): Promise<IAgenticaController[]> {
|
|
106
|
+
return this.props.agent.getControllers() as IAgenticaController[];
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
export namespace AgenticaRpcService {
|
|
111
110
|
/**
|
|
112
111
|
* Properties of the {@link AgenticaRpcService}.
|
|
113
112
|
*/
|
|
114
|
-
export interface IProps
|
|
113
|
+
export interface IProps {
|
|
115
114
|
/**
|
|
116
115
|
* Target agent to provide as RPC service.
|
|
117
116
|
*/
|
|
118
|
-
agent: Agentica
|
|
117
|
+
agent: Agentica;
|
|
119
118
|
|
|
120
119
|
/**
|
|
121
120
|
* Listener to be binded on the agent.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AgenticaUserMessageContent, IAgenticaController } from "@agentica/core";
|
|
2
|
-
import type { ILlmSchema } from "@samchon/openapi";
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* RPC interface of AI agent service.
|
|
@@ -14,7 +13,7 @@ import type { ILlmSchema } from "@samchon/openapi";
|
|
|
14
13
|
*
|
|
15
14
|
* @author Samchon
|
|
16
15
|
*/
|
|
17
|
-
export interface IAgenticaRpcService
|
|
16
|
+
export interface IAgenticaRpcService {
|
|
18
17
|
/**
|
|
19
18
|
* Conversate with the AI agent.
|
|
20
19
|
*
|
|
@@ -41,5 +40,5 @@ export interface IAgenticaRpcService<Model extends ILlmSchema.Model> {
|
|
|
41
40
|
* Get controllers, collection of functions that would be
|
|
42
41
|
* called by the AI chatbot.
|
|
43
42
|
*/
|
|
44
|
-
getControllers: () => Promise<IAgenticaController
|
|
43
|
+
getControllers: () => Promise<IAgenticaController[]>;
|
|
45
44
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IAgenticaController, MicroAgentica } from "@agentica/core";
|
|
2
|
-
import type { ILlmSchema } from "@samchon/openapi";
|
|
3
2
|
|
|
4
3
|
import type { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
5
4
|
import type { IMicroAgenticaRpcListener } from "./IMicroAgenticaRpcListener";
|
|
@@ -47,14 +46,14 @@ import type { IMicroAgenticaRpcListener } from "./IMicroAgenticaRpcListener";
|
|
|
47
46
|
*
|
|
48
47
|
* @author Samchon
|
|
49
48
|
*/
|
|
50
|
-
export class MicroAgenticaRpcService
|
|
51
|
-
implements IAgenticaRpcService
|
|
49
|
+
export class MicroAgenticaRpcService
|
|
50
|
+
implements IAgenticaRpcService {
|
|
52
51
|
/**
|
|
53
52
|
* Initializer Constructor.
|
|
54
53
|
*
|
|
55
54
|
* @param props Properties to construct the RPC service
|
|
56
55
|
*/
|
|
57
|
-
public constructor(private readonly props: MicroAgenticaRpcService.IProps
|
|
56
|
+
public constructor(private readonly props: MicroAgenticaRpcService.IProps) {
|
|
58
57
|
const { agent, listener } = props;
|
|
59
58
|
|
|
60
59
|
// ESSENTIAL LISTENERS
|
|
@@ -94,19 +93,19 @@ implements IAgenticaRpcService<Model> {
|
|
|
94
93
|
/**
|
|
95
94
|
* @inheritDoc
|
|
96
95
|
*/
|
|
97
|
-
public async getControllers(): Promise<IAgenticaController
|
|
98
|
-
return this.props.agent.getControllers() as IAgenticaController
|
|
96
|
+
public async getControllers(): Promise<IAgenticaController[]> {
|
|
97
|
+
return this.props.agent.getControllers() as IAgenticaController[];
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
export namespace MicroAgenticaRpcService {
|
|
102
101
|
/**
|
|
103
102
|
* Properties to construct the RPC service.
|
|
104
103
|
*/
|
|
105
|
-
export interface IProps
|
|
104
|
+
export interface IProps {
|
|
106
105
|
/**
|
|
107
106
|
* AI agent to be controlled.
|
|
108
107
|
*/
|
|
109
|
-
agent: MicroAgentica
|
|
108
|
+
agent: MicroAgentica;
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
111
|
* Listener to be notified.
|