namirasoft-expert 1.4.44 → 1.4.46
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/dist/NamirasoftExpertServer.d.ts +2 -0
- package/dist/NamirasoftExpertServer.js +3 -1
- package/dist/NamirasoftExpertServer.js.map +1 -1
- package/dist/NamirasoftExpertServerTest.d.ts +12 -0
- package/dist/NamirasoftExpertServerTest.js +29 -0
- package/dist/NamirasoftExpertServerTest.js.map +1 -0
- package/dist/command/TestCommand.d.ts +4 -0
- package/dist/command/TestCommand.js +15 -0
- package/dist/command/TestCommand.js.map +1 -0
- package/dist/command/TestGenerateCommand.d.ts +5 -0
- package/dist/command/TestGenerateCommand.js +49 -0
- package/dist/command/TestGenerateCommand.js.map +1 -0
- package/dist/command/cli.js +2 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/enum/ChatType.d.ts +2 -1
- package/dist/enum/ChatType.js +1 -0
- package/dist/enum/ChatType.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/row/AgentTrackResponse_AnalysisOutputRow.d.ts +9 -0
- package/dist/row/AgentTrackResponse_AnalysisOutputRow.js +3 -0
- package/dist/row/AgentTrackResponse_AnalysisOutputRow.js.map +1 -0
- package/dist/row/AgentTrackResponse_AnalysisRow.d.ts +4 -7
- package/package.json +1 -1
- package/src/NamirasoftExpertServer.ts +4 -1
- package/src/NamirasoftExpertServerTest.ts +39 -0
- package/src/command/TestCommand.ts +32 -0
- package/src/command/TestGenerateCommand.ts +56 -0
- package/src/command/cli.ts +2 -0
- package/src/enum/ChatType.ts +1 -0
- package/src/index.ts +4 -0
- package/src/row/AgentTrackResponse_AnalysisOutputRow.ts +31 -0
- package/src/row/AgentTrackResponse_AnalysisRow.ts +4 -7
- package/tsconfig.json +3 -0
|
@@ -11,6 +11,7 @@ import { NamirasoftExpertServerMetrics } from "./NamirasoftExpertServerMetrics";
|
|
|
11
11
|
import { NamirasoftExpertServerRole } from "./NamirasoftExpertServerRole";
|
|
12
12
|
import { NamirasoftExpertServerRoleAssignment } from "./NamirasoftExpertServerRoleAssignment";
|
|
13
13
|
import { NamirasoftExpertServerRun } from "./NamirasoftExpertServerRun";
|
|
14
|
+
import { NamirasoftExpertServerTest } from "./NamirasoftExpertServerTest";
|
|
14
15
|
import { NamirasoftExpertServerValue } from "./NamirasoftExpertServerValue";
|
|
15
16
|
import { TokenManager } from "namirasoft-account";
|
|
16
17
|
export declare class NamirasoftExpertServer extends NSABaseServer {
|
|
@@ -27,5 +28,6 @@ export declare class NamirasoftExpertServer extends NSABaseServer {
|
|
|
27
28
|
agent: NamirasoftExpertServerAgent;
|
|
28
29
|
chat: NamirasoftExpertServerChat;
|
|
29
30
|
run: NamirasoftExpertServerRun;
|
|
31
|
+
test: NamirasoftExpertServerTest;
|
|
30
32
|
constructor(base_url: string, token_manager: TokenManager, onError: (error: Error) => void);
|
|
31
33
|
}
|
|
@@ -14,10 +14,11 @@ const NamirasoftExpertServerMetrics_1 = require("./NamirasoftExpertServerMetrics
|
|
|
14
14
|
const NamirasoftExpertServerRole_1 = require("./NamirasoftExpertServerRole");
|
|
15
15
|
const NamirasoftExpertServerRoleAssignment_1 = require("./NamirasoftExpertServerRoleAssignment");
|
|
16
16
|
const NamirasoftExpertServerRun_1 = require("./NamirasoftExpertServerRun");
|
|
17
|
+
const NamirasoftExpertServerTest_1 = require("./NamirasoftExpertServerTest");
|
|
17
18
|
const NamirasoftExpertServerValue_1 = require("./NamirasoftExpertServerValue");
|
|
18
19
|
class NamirasoftExpertServer extends namirasoft_account_1.NSABaseServer {
|
|
19
20
|
constructor(base_url, token_manager, onError) {
|
|
20
|
-
super(base_url, `1.4.
|
|
21
|
+
super(base_url, `1.4.46`, token_manager, onError);
|
|
21
22
|
this.healthz = new NamirasoftExpertServerHealthz_1.NamirasoftExpertServerHealthz(this);
|
|
22
23
|
this.health = new NamirasoftExpertServerHealth_1.NamirasoftExpertServerHealth(this);
|
|
23
24
|
this.metrics = new NamirasoftExpertServerMetrics_1.NamirasoftExpertServerMetrics(this);
|
|
@@ -31,6 +32,7 @@ class NamirasoftExpertServer extends namirasoft_account_1.NSABaseServer {
|
|
|
31
32
|
this.agent = new NamirasoftExpertServerAgent_1.NamirasoftExpertServerAgent(this);
|
|
32
33
|
this.chat = new NamirasoftExpertServerChat_1.NamirasoftExpertServerChat(this);
|
|
33
34
|
this.run = new NamirasoftExpertServerRun_1.NamirasoftExpertServerRun(this);
|
|
35
|
+
this.test = new NamirasoftExpertServerTest_1.NamirasoftExpertServerTest(this);
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
exports.NamirasoftExpertServer = NamirasoftExpertServer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftExpertServer.js","sourceRoot":"","sources":["../src/NamirasoftExpertServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,+EAA4E;AAC5E,+FAA4F;AAC5F,yFAAsF;AACtF,qFAAkF;AAClF,6EAA0E;AAC1E,2FAAwF;AACxF,iFAA8E;AAC9E,mFAAgF;AAChF,mFAAgF;AAChF,6EAA0E;AAC1E,iGAA8F;AAC9F,2EAAwE;AACxE,+EAA4E;AAG5E,MAAa,sBAAuB,SAAQ,kCAAa;
|
|
1
|
+
{"version":3,"file":"NamirasoftExpertServer.js","sourceRoot":"","sources":["../src/NamirasoftExpertServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,+EAA4E;AAC5E,+FAA4F;AAC5F,yFAAsF;AACtF,qFAAkF;AAClF,6EAA0E;AAC1E,2FAAwF;AACxF,iFAA8E;AAC9E,mFAAgF;AAChF,mFAAgF;AAChF,6EAA0E;AAC1E,iGAA8F;AAC9F,2EAAwE;AACxE,6EAA0E;AAC1E,+EAA4E;AAG5E,MAAa,sBAAuB,SAAQ,kCAAa;IAgBrD,YAAY,QAAgB,EAAE,aAA2B,EAAE,OAA+B;QAEtF,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,IAAI,6DAA6B,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,GAAG,IAAI,2DAA4B,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,6DAA6B,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK,GAAG,IAAI,yDAA2B,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,IAAI,yEAAmC,CAAC,IAAI,CAAC,CAAC;QACpE,IAAI,CAAC,WAAW,GAAG,IAAI,mEAAgC,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,SAAS,GAAG,IAAI,+DAA8B,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,WAAW,GAAG,IAAI,qEAAiC,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,eAAe,GAAG,IAAI,2EAAoC,CAAC,IAAI,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,IAAI,uDAA0B,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,IAAI,yDAA2B,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,IAAI,uDAA0B,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,GAAG,GAAG,IAAI,qDAAyB,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,IAAI,uDAA0B,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;CACJ;AAlCD,wDAkCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
2
|
+
import { EntityType } from "./enum/EntityType";
|
|
3
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
4
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
5
|
+
export declare class NamirasoftExpertServerTest extends NamirasoftExpertServerBase {
|
|
6
|
+
constructor(server: NamirasoftExpertServer);
|
|
7
|
+
Generate(agent_id: string, entity_type: EntityType, entity_id: string, body: {
|
|
8
|
+
message_user: (string | null);
|
|
9
|
+
}, config?: BaseServerConfig<any>): Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamirasoftExpertServerTest = void 0;
|
|
13
|
+
const NamirasoftExpertServerBase_1 = require("./NamirasoftExpertServerBase");
|
|
14
|
+
class NamirasoftExpertServerTest extends NamirasoftExpertServerBase_1.NamirasoftExpertServerBase {
|
|
15
|
+
constructor(server) {
|
|
16
|
+
super(server);
|
|
17
|
+
this.Generate = this.Generate.bind(this);
|
|
18
|
+
}
|
|
19
|
+
Generate(agent_id, entity_type, entity_id, body, config) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
let path = `/agent/${agent_id}/config/test/${entity_type}/${entity_id}/generate`;
|
|
22
|
+
let { data } = yield this.server._post(path, {}, body, config);
|
|
23
|
+
return data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.NamirasoftExpertServerTest = NamirasoftExpertServerTest;
|
|
28
|
+
;
|
|
29
|
+
//# sourceMappingURL=NamirasoftExpertServerTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftExpertServerTest.js","sourceRoot":"","sources":["../src/NamirasoftExpertServerTest.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,6EAA0E;AAE1E,MAAa,0BAA2B,SAAQ,uDAA0B;IAEtE,YAAY,MAA8B;QAEtC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IACK,QAAQ,CAAC,QAAgB,EAAE,WAAuB,EAAE,SAAiB,EAAE,IAAuC,EAAE,MAA8B;;YAEhJ,IAAI,IAAI,GAAG,UAAU,QAAQ,gBAAgB,WAAW,IAAI,SAAS,WAAW,CAAC;YACjF,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAiB,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YAC/E,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAbD,gEAaC;AAAA,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const TestGenerateCommand_1 = require("./TestGenerateCommand");
|
|
6
|
+
class TestCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"generate": TestGenerateCommand_1.TestGenerateCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.TestCommand = TestCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=TestCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestCommand.js","sourceRoot":"","sources":["../../src/command/TestCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,+DAA4D;AAE5D,MAAa,WAAY,SAAQ,0CAAoB;IAEjD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,UAAU,EAAE,yCAAmB;SAClC,CAAC,CAAC;IACP,CAAC;CACJ;AARD,kCAQC;AAAA,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TestGenerateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftExpertServer_1 = require("../NamirasoftExpertServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class TestGenerateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["agent_id", "entity_type", "entity_id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "message_user",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'message_user' in body",
|
|
24
|
+
optional: true,
|
|
25
|
+
args: ["message_user"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
}
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
exec() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
let token = this.app.storage.getNSAToken();
|
|
33
|
+
if (token == null)
|
|
34
|
+
throw new Error("Token is not available. Please login first using:\nns-expert account config \nor \nns-expert account login.");
|
|
35
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
36
|
+
let token_manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
37
|
+
token_manager.setValue(token, false);
|
|
38
|
+
let url = this.app.storage.getItem("ns-expert-server-url");
|
|
39
|
+
let server = new NamirasoftExpertServer_1.NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
40
|
+
let ans = yield server.test.Generate(this.arg_values[0], this.arg_values[1], this.arg_values[2], {
|
|
41
|
+
message_user: this.option_values.message_user
|
|
42
|
+
});
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.TestGenerateCommand = TestGenerateCommand;
|
|
48
|
+
;
|
|
49
|
+
//# sourceMappingURL=TestGenerateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestGenerateCommand.js","sourceRoot":"","sources":["../../src/command/TestGenerateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,mBAAoB,SAAQ,sCAAgB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,WAAW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AC,CAAC;QACjD,CAAC;KAAA;CACJ;AA9BD,kDA8BC;AAAA,CAAC"}
|
package/dist/command/cli.js
CHANGED
|
@@ -16,6 +16,7 @@ const MetricsCommand_1 = require("./MetricsCommand");
|
|
|
16
16
|
const RoleAssignmentCommand_1 = require("./RoleAssignmentCommand");
|
|
17
17
|
const RoleCommand_1 = require("./RoleCommand");
|
|
18
18
|
const RunCommand_1 = require("./RunCommand");
|
|
19
|
+
const TestCommand_1 = require("./TestCommand");
|
|
19
20
|
const ValueCommand_1 = require("./ValueCommand");
|
|
20
21
|
let app = new namirasoft_node_cli_1.Application("ns-expert", new namirasoft_node_cli_1.BaseStorage(), {
|
|
21
22
|
"healthz": HealthzCommand_1.HealthzCommand,
|
|
@@ -31,6 +32,7 @@ let app = new namirasoft_node_cli_1.Application("ns-expert", new namirasoft_node
|
|
|
31
32
|
"agent": AgentCommand_1.AgentCommand,
|
|
32
33
|
"chat": ChatCommand_1.ChatCommand,
|
|
33
34
|
"run": RunCommand_1.RunCommand,
|
|
35
|
+
"test": TestCommand_1.TestCommand,
|
|
34
36
|
"account": namirasoft_account_1.AccountCommand,
|
|
35
37
|
"config": (argv) => new namirasoft_node_cli_2.ConfigCommand(argv, ["ns-expert-server-url"])
|
|
36
38
|
});
|
package/dist/command/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/command/cli.ts"],"names":[],"mappings":";;;AAqBA,2DAAoD;AACpD,iEAA8D;AAC9D,iDAA8C;AAC9C,2DAAwD;AACxD,uDAAoD;AACpD,6DAA+D;AAC/D,+CAA4C;AAC5C,6DAAoD;AACpD,6DAA0D;AAC1D,mDAAgD;AAChD,qDAAkD;AAClD,qDAAkD;AAClD,mEAAgE;AAChE,+CAA4C;AAC5C,6CAA0C;AAC1C,iDAA8C;AAE9C,IAAI,GAAG,GAAG,IAAI,iCAAW,CAAC,WAAW,EAAE,IAAI,iCAAW,EAAE,EACpD;IAC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MAAM,EAAE,yBAAW;IACnB,KAAK,EAAE,uBAAU;IACjB,MAAM,EAAE,yBAAW;IACnB,SAAS,EAAE,mCAAc;IACzB,QAAQ,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,mCAAa,CAAC,IAAI,EAAE,CAAC,sBAAsB,CAAC,CAAC;CAClF,CAAC,CAAC;AACP,GAAG,CAAC,GAAG,EAAE,CAAC"}
|
package/dist/enum/ChatType.d.ts
CHANGED
package/dist/enum/ChatType.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatType.js","sourceRoot":"","sources":["../../src/enum/ChatType.ts"],"names":[],"mappings":";;;AAoBA,IAAY,
|
|
1
|
+
{"version":3,"file":"ChatType.js","sourceRoot":"","sources":["../../src/enum/ChatType.ts"],"names":[],"mappings":";;;AAoBA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAEhB,mDAAuC,CAAA;IACvC,2CAA+B,CAAA;IAC/B,yCAA6B,CAAA;IAC7B,2BAAe,CAAA;IACf,yBAAa,CAAA;AACjB,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./NamirasoftExpertServerMetrics";
|
|
|
12
12
|
export * from "./NamirasoftExpertServerRole";
|
|
13
13
|
export * from "./NamirasoftExpertServerRoleAssignment";
|
|
14
14
|
export * from "./NamirasoftExpertServerRun";
|
|
15
|
+
export * from "./NamirasoftExpertServerTest";
|
|
15
16
|
export * from "./NamirasoftExpertServerValue";
|
|
16
17
|
export * from "./command/AgentCategoryCommand";
|
|
17
18
|
export * from "./command/AgentCategoryCreateCommand";
|
|
@@ -71,6 +72,8 @@ export * from "./command/RoleUpdateCommand";
|
|
|
71
72
|
export * from "./command/RunCommand";
|
|
72
73
|
export * from "./command/RunGetCommand";
|
|
73
74
|
export * from "./command/RunListCommand";
|
|
75
|
+
export * from "./command/TestCommand";
|
|
76
|
+
export * from "./command/TestGenerateCommand";
|
|
74
77
|
export * from "./command/ValueCommand";
|
|
75
78
|
export * from "./command/ValueListCommand";
|
|
76
79
|
export * from "./enum/ChatType";
|
|
@@ -100,6 +103,7 @@ export * from "./row/AgentTagRow";
|
|
|
100
103
|
export * from "./row/AgentTrackResponseRow";
|
|
101
104
|
export * from "./row/AgentTrackResponse_AnalysisExpertRow";
|
|
102
105
|
export * from "./row/AgentTrackResponse_AnalysisNeedMoreRow";
|
|
106
|
+
export * from "./row/AgentTrackResponse_AnalysisOutputRow";
|
|
103
107
|
export * from "./row/AgentTrackResponse_AnalysisRow";
|
|
104
108
|
export * from "./row/AgentTrackResponse_AnalysisSufficientRow";
|
|
105
109
|
export * from "./row/AgentTrackResponse_AnalysisTimelineRow";
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./NamirasoftExpertServerMetrics"), exports);
|
|
|
28
28
|
__exportStar(require("./NamirasoftExpertServerRole"), exports);
|
|
29
29
|
__exportStar(require("./NamirasoftExpertServerRoleAssignment"), exports);
|
|
30
30
|
__exportStar(require("./NamirasoftExpertServerRun"), exports);
|
|
31
|
+
__exportStar(require("./NamirasoftExpertServerTest"), exports);
|
|
31
32
|
__exportStar(require("./NamirasoftExpertServerValue"), exports);
|
|
32
33
|
__exportStar(require("./command/AgentCategoryCommand"), exports);
|
|
33
34
|
__exportStar(require("./command/AgentCategoryCreateCommand"), exports);
|
|
@@ -87,6 +88,8 @@ __exportStar(require("./command/RoleUpdateCommand"), exports);
|
|
|
87
88
|
__exportStar(require("./command/RunCommand"), exports);
|
|
88
89
|
__exportStar(require("./command/RunGetCommand"), exports);
|
|
89
90
|
__exportStar(require("./command/RunListCommand"), exports);
|
|
91
|
+
__exportStar(require("./command/TestCommand"), exports);
|
|
92
|
+
__exportStar(require("./command/TestGenerateCommand"), exports);
|
|
90
93
|
__exportStar(require("./command/ValueCommand"), exports);
|
|
91
94
|
__exportStar(require("./command/ValueListCommand"), exports);
|
|
92
95
|
__exportStar(require("./enum/ChatType"), exports);
|
|
@@ -116,6 +119,7 @@ __exportStar(require("./row/AgentTagRow"), exports);
|
|
|
116
119
|
__exportStar(require("./row/AgentTrackResponseRow"), exports);
|
|
117
120
|
__exportStar(require("./row/AgentTrackResponse_AnalysisExpertRow"), exports);
|
|
118
121
|
__exportStar(require("./row/AgentTrackResponse_AnalysisNeedMoreRow"), exports);
|
|
122
|
+
__exportStar(require("./row/AgentTrackResponse_AnalysisOutputRow"), exports);
|
|
119
123
|
__exportStar(require("./row/AgentTrackResponse_AnalysisRow"), exports);
|
|
120
124
|
__exportStar(require("./row/AgentTrackResponse_AnalysisSufficientRow"), exports);
|
|
121
125
|
__exportStar(require("./row/AgentTrackResponse_AnalysisTimelineRow"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,2DAAyC;AACzC,gEAA8C;AAC9C,wEAAsD;AACtD,qEAAmD;AACnD,mEAAiD;AACjD,+DAA6C;AAC7C,+DAA6C;AAC7C,sEAAoD;AACpD,iEAA+C;AAC/C,kEAAgD;AAChD,kEAAgD;AAChD,+DAA6C;AAC7C,yEAAuD;AACvD,8DAA4C;AAC5C,gEAA8C;AAC9C,iEAA+C;AAC/C,uEAAqD;AACrD,uEAAqD;AACrD,oEAAkD;AAClD,qEAAmD;AACnD,yDAAuC;AACvC,iEAA+C;AAC/C,+DAA6C;AAC7C,+DAA6C;AAC7C,8DAA4C;AAC5C,oEAAkD;AAClD,oEAAkD;AAClD,iEAA+C;AAC/C,kEAAgD;AAChD,oEAAkD;AAClD,4DAA0C;AAC1C,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,kEAAgD;AAChD,kEAAgD;AAChD,+DAA6C;AAC7C,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,+DAA6C;AAC7C,wDAAsC;AACtC,4D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ACxC,2DAAyC;AACzC,0DAAwC;AACxC,+CAA6B;AAC7B,sDAAoC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgentTrackResponse_AnalysisNeedMoreRow } from "./AgentTrackResponse_AnalysisNeedMoreRow";
|
|
2
|
+
import { AgentTrackResponse_AnalysisSufficientRow } from "./AgentTrackResponse_AnalysisSufficientRow";
|
|
3
|
+
import { decision } from "../enum/decision";
|
|
4
|
+
export type AgentTrackResponse_AnalysisOutputRow = {
|
|
5
|
+
decision: decision;
|
|
6
|
+
sufficient: (AgentTrackResponse_AnalysisSufficientRow | null);
|
|
7
|
+
need_more: (AgentTrackResponse_AnalysisNeedMoreRow | null);
|
|
8
|
+
reasoning: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentTrackResponse_AnalysisOutputRow.js","sourceRoot":"","sources":["../../src/row/AgentTrackResponse_AnalysisOutputRow.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AgentTrackResponse_AnalysisSufficientRow } from "./AgentTrackResponse_AnalysisSufficientRow";
|
|
3
|
-
import { decision } from "../enum/decision";
|
|
1
|
+
import { AgentTrackResponse_AnalysisOutputRow } from "./AgentTrackResponse_AnalysisOutputRow";
|
|
4
2
|
export type AgentTrackResponse_AnalysisRow = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
reasoning: string;
|
|
3
|
+
rid: string;
|
|
4
|
+
iteration: number;
|
|
5
|
+
output: AgentTrackResponse_AnalysisOutputRow;
|
|
9
6
|
};
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@ import { NamirasoftExpertServerMetrics } from "./NamirasoftExpertServerMetrics";
|
|
|
31
31
|
import { NamirasoftExpertServerRole } from "./NamirasoftExpertServerRole";
|
|
32
32
|
import { NamirasoftExpertServerRoleAssignment } from "./NamirasoftExpertServerRoleAssignment";
|
|
33
33
|
import { NamirasoftExpertServerRun } from "./NamirasoftExpertServerRun";
|
|
34
|
+
import { NamirasoftExpertServerTest } from "./NamirasoftExpertServerTest";
|
|
34
35
|
import { NamirasoftExpertServerValue } from "./NamirasoftExpertServerValue";
|
|
35
36
|
import { TokenManager } from "namirasoft-account";
|
|
36
37
|
|
|
@@ -49,9 +50,10 @@ export class NamirasoftExpertServer extends NSABaseServer
|
|
|
49
50
|
agent: NamirasoftExpertServerAgent;
|
|
50
51
|
chat: NamirasoftExpertServerChat;
|
|
51
52
|
run: NamirasoftExpertServerRun;
|
|
53
|
+
test: NamirasoftExpertServerTest;
|
|
52
54
|
constructor(base_url: string, token_manager: TokenManager, onError: (error: Error) => void)
|
|
53
55
|
{
|
|
54
|
-
super(base_url, `1.4.
|
|
56
|
+
super(base_url, `1.4.46`, token_manager, onError);
|
|
55
57
|
this.healthz = new NamirasoftExpertServerHealthz(this);
|
|
56
58
|
this.health = new NamirasoftExpertServerHealth(this);
|
|
57
59
|
this.metrics = new NamirasoftExpertServerMetrics(this);
|
|
@@ -65,5 +67,6 @@ export class NamirasoftExpertServer extends NSABaseServer
|
|
|
65
67
|
this.agent = new NamirasoftExpertServerAgent(this);
|
|
66
68
|
this.chat = new NamirasoftExpertServerChat(this);
|
|
67
69
|
this.run = new NamirasoftExpertServerRun(this);
|
|
70
|
+
this.test = new NamirasoftExpertServerTest(this);
|
|
68
71
|
}
|
|
69
72
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { EntityType } from "./enum/EntityType";
|
|
23
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
24
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftExpertServerTest extends NamirasoftExpertServerBase
|
|
27
|
+
{
|
|
28
|
+
constructor(server: NamirasoftExpertServer)
|
|
29
|
+
{
|
|
30
|
+
super(server);
|
|
31
|
+
this.Generate = this.Generate.bind(this);
|
|
32
|
+
}
|
|
33
|
+
async Generate(agent_id: string, entity_type: EntityType, entity_id: string, body: { message_user: (string | null) }, config?: BaseServerConfig<any>): Promise<{ id: string }>
|
|
34
|
+
{
|
|
35
|
+
let path = `/agent/${agent_id}/config/test/${entity_type}/${entity_id}/generate`;
|
|
36
|
+
let { data } = await this.server._post<{ id: string }>(path, {}, body, config);
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { TestGenerateCommand } from "./TestGenerateCommand";
|
|
23
|
+
|
|
24
|
+
export class TestCommand extends BaseNavigatorCommand
|
|
25
|
+
{
|
|
26
|
+
constructor(argv: string[])
|
|
27
|
+
{
|
|
28
|
+
super(argv, {
|
|
29
|
+
"generate": TestGenerateCommand,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftExpertServer } from "../NamirasoftExpertServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class TestGenerateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["agent_id", "entity_type", "entity_id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "message_user",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'message_user' in body",
|
|
35
|
+
optional: true,
|
|
36
|
+
args: ["message_user"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
override async exec()
|
|
42
|
+
{
|
|
43
|
+
let token = this.app.storage.getNSAToken();
|
|
44
|
+
if (token == null)
|
|
45
|
+
throw new Error("Token is not available. Please login first using:\nns-expert account config \nor \nns-expert account login.");
|
|
46
|
+
let storage = new IStorageMemoryDedicated();
|
|
47
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
48
|
+
token_manager.setValue(token, false);
|
|
49
|
+
let url = this.app.storage.getItem("ns-expert-server-url");
|
|
50
|
+
let server = new NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
51
|
+
let ans = await server.test.Generate(this.arg_values[0], this.arg_values[1], this.arg_values[2], {
|
|
52
|
+
message_user: this.option_values.message_user
|
|
53
|
+
});
|
|
54
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
55
|
+
}
|
|
56
|
+
};
|
package/src/command/cli.ts
CHANGED
|
@@ -34,6 +34,7 @@ import { MetricsCommand } from "./MetricsCommand";
|
|
|
34
34
|
import { RoleAssignmentCommand } from "./RoleAssignmentCommand";
|
|
35
35
|
import { RoleCommand } from "./RoleCommand";
|
|
36
36
|
import { RunCommand } from "./RunCommand";
|
|
37
|
+
import { TestCommand } from "./TestCommand";
|
|
37
38
|
import { ValueCommand } from "./ValueCommand";
|
|
38
39
|
|
|
39
40
|
let app = new Application("ns-expert", new BaseStorage(),
|
|
@@ -51,6 +52,7 @@ let app = new Application("ns-expert", new BaseStorage(),
|
|
|
51
52
|
"agent": AgentCommand,
|
|
52
53
|
"chat": ChatCommand,
|
|
53
54
|
"run": RunCommand,
|
|
55
|
+
"test": TestCommand,
|
|
54
56
|
"account": AccountCommand,
|
|
55
57
|
"config": (argv: string[]) => new ConfigCommand(argv, ["ns-expert-server-url"])
|
|
56
58
|
});
|
package/src/enum/ChatType.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from "./NamirasoftExpertServerMetrics";
|
|
|
32
32
|
export * from "./NamirasoftExpertServerRole";
|
|
33
33
|
export * from "./NamirasoftExpertServerRoleAssignment";
|
|
34
34
|
export * from "./NamirasoftExpertServerRun";
|
|
35
|
+
export * from "./NamirasoftExpertServerTest";
|
|
35
36
|
export * from "./NamirasoftExpertServerValue";
|
|
36
37
|
export * from "./command/AgentCategoryCommand";
|
|
37
38
|
export * from "./command/AgentCategoryCreateCommand";
|
|
@@ -91,6 +92,8 @@ export * from "./command/RoleUpdateCommand";
|
|
|
91
92
|
export * from "./command/RunCommand";
|
|
92
93
|
export * from "./command/RunGetCommand";
|
|
93
94
|
export * from "./command/RunListCommand";
|
|
95
|
+
export * from "./command/TestCommand";
|
|
96
|
+
export * from "./command/TestGenerateCommand";
|
|
94
97
|
export * from "./command/ValueCommand";
|
|
95
98
|
export * from "./command/ValueListCommand";
|
|
96
99
|
export * from "./enum/ChatType";
|
|
@@ -120,6 +123,7 @@ export * from "./row/AgentTagRow";
|
|
|
120
123
|
export * from "./row/AgentTrackResponseRow";
|
|
121
124
|
export * from "./row/AgentTrackResponse_AnalysisExpertRow";
|
|
122
125
|
export * from "./row/AgentTrackResponse_AnalysisNeedMoreRow";
|
|
126
|
+
export * from "./row/AgentTrackResponse_AnalysisOutputRow";
|
|
123
127
|
export * from "./row/AgentTrackResponse_AnalysisRow";
|
|
124
128
|
export * from "./row/AgentTrackResponse_AnalysisSufficientRow";
|
|
125
129
|
export * from "./row/AgentTrackResponse_AnalysisTimelineRow";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { AgentTrackResponse_AnalysisNeedMoreRow } from "./AgentTrackResponse_AnalysisNeedMoreRow";
|
|
22
|
+
import { AgentTrackResponse_AnalysisSufficientRow } from "./AgentTrackResponse_AnalysisSufficientRow";
|
|
23
|
+
import { decision } from "../enum/decision";
|
|
24
|
+
|
|
25
|
+
export type AgentTrackResponse_AnalysisOutputRow =
|
|
26
|
+
{
|
|
27
|
+
decision: decision;
|
|
28
|
+
sufficient: (AgentTrackResponse_AnalysisSufficientRow | null);
|
|
29
|
+
need_more: (AgentTrackResponse_AnalysisNeedMoreRow | null);
|
|
30
|
+
reasoning: string;
|
|
31
|
+
}
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
/* */
|
|
19
19
|
/****************************************************************/
|
|
20
20
|
|
|
21
|
-
import {
|
|
22
|
-
import { AgentTrackResponse_AnalysisSufficientRow } from "./AgentTrackResponse_AnalysisSufficientRow";
|
|
23
|
-
import { decision } from "../enum/decision";
|
|
21
|
+
import { AgentTrackResponse_AnalysisOutputRow } from "./AgentTrackResponse_AnalysisOutputRow";
|
|
24
22
|
|
|
25
23
|
export type AgentTrackResponse_AnalysisRow =
|
|
26
24
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
reasoning: string;
|
|
25
|
+
rid: string;
|
|
26
|
+
iteration: number;
|
|
27
|
+
output: AgentTrackResponse_AnalysisOutputRow;
|
|
31
28
|
}
|