namirasoft-expert 1.4.49 → 1.4.51

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.
@@ -15,7 +15,7 @@ const NamirasoftExpertServerTest_1 = require("./NamirasoftExpertServerTest");
15
15
  const NamirasoftExpertServerValue_1 = require("./NamirasoftExpertServerValue");
16
16
  class NamirasoftExpertServer extends namirasoft_account_1.NSABaseServer {
17
17
  constructor(base_url, token_manager, onError) {
18
- super(base_url, `1.4.49`, token_manager, onError);
18
+ super(base_url, `1.4.51`, token_manager, onError);
19
19
  this.healthz = new NamirasoftExpertServerHealthz_1.NamirasoftExpertServerHealthz(this);
20
20
  this.health = new NamirasoftExpertServerHealth_1.NamirasoftExpertServerHealth(this);
21
21
  this.metrics = new NamirasoftExpertServerMetrics_1.NamirasoftExpertServerMetrics(this);
@@ -11,4 +11,5 @@ export declare class NamirasoftExpertServerRun extends NamirasoftExpertServerBas
11
11
  count: number;
12
12
  }>;
13
13
  Get(id: (string | null), config?: BaseServerConfig<any>): Promise<RunRow>;
14
+ Cancel(run_id: string, config?: BaseServerConfig<any>): Promise<void>;
14
15
  }
@@ -18,6 +18,7 @@ class NamirasoftExpertServerRun extends NamirasoftExpertServerBase_1.NamirasoftE
18
18
  super(server);
19
19
  this.List = this.List.bind(this);
20
20
  this.Get = this.Get.bind(this);
21
+ this.Cancel = this.Cancel.bind(this);
21
22
  }
22
23
  List(filters, page, size, sorts, config) {
23
24
  return __awaiter(this, void 0, void 0, function* () {
@@ -35,6 +36,12 @@ class NamirasoftExpertServerRun extends NamirasoftExpertServerBase_1.NamirasoftE
35
36
  return data;
36
37
  });
37
38
  }
39
+ Cancel(run_id, config) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ let path = `/run/${run_id}/cancel`;
42
+ yield this.server._post(path, {}, undefined, config);
43
+ });
44
+ }
38
45
  }
39
46
  exports.NamirasoftExpertServerRun = NamirasoftExpertServerRun;
40
47
  ;
@@ -1 +1 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KAAA;IACK,MAAM,CAAC,MAAc,EAAE,MAA8B;;YAEvD,IAAI,IAAI,GAAG,QAAQ,MAAM,SAAS,CAAC;YACnC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAO,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;KAAA;CACJ;AA5BD,8DA4BC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RunCancelCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -0,0 +1,38 @@
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.RunCancelCommand = 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 RunCancelCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
+ constructor(argv) {
19
+ super(argv, ["run_id"], []);
20
+ }
21
+ exec() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ let token = this.app.storage.getNSAToken();
24
+ if (token == null)
25
+ throw new Error("Token is not available. Please login first using:\nns-expert account config \nor \nns-expert account login.");
26
+ let storage = new namirasoft_core_1.IStorageMemoryDedicated();
27
+ let token_manager = new namirasoft_account_1.TokenManager(storage, () => { });
28
+ token_manager.setValue(token, false);
29
+ let url = this.app.storage.getItem("ns-expert-server-url");
30
+ let server = new NamirasoftExpertServer_1.NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
31
+ let ans = yield server.run.Cancel(this.arg_values[0]);
32
+ this.app.logger.success(JSON.stringify(ans));
33
+ });
34
+ }
35
+ }
36
+ exports.RunCancelCommand = RunCancelCommand;
37
+ ;
38
+ //# sourceMappingURL=RunCancelCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunCancelCommand.js","sourceRoot":"","sources":["../../src/command/RunCancelCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,gBAAiB,SAAQ,sCAAgB;IAElD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAChC,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,6GAA6G,CAAC,CAAC;YACnI,IAAI,OAAO,GAAG,IAAI,yCAAuB,EAAE,CAAC;YAC5C,IAAI,aAAa,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACzD,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACrC,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;YAC3D,IAAI,MAAM,GAAG,IAAI,+CAAsB,CAAC,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACtD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,4CAmBC;AAAA,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RunCommand = void 0;
4
4
  const namirasoft_node_cli_1 = require("namirasoft-node-cli");
5
+ const RunCancelCommand_1 = require("./RunCancelCommand");
5
6
  const RunGetCommand_1 = require("./RunGetCommand");
6
7
  const RunListCommand_1 = require("./RunListCommand");
7
8
  class RunCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
@@ -9,6 +10,7 @@ class RunCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
9
10
  super(argv, {
10
11
  "list": RunListCommand_1.RunListCommand,
11
12
  "get": RunGetCommand_1.RunGetCommand,
13
+ "cancel": RunCancelCommand_1.RunCancelCommand,
12
14
  });
13
15
  }
14
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RunCommand.js","sourceRoot":"","sources":["../../src/command/RunCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,mDAAgD;AAChD,qDAAkD;AAElD,MAAa,UAAW,SAAQ,0CAAoB;IAEhD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,+BAAc;YACtB,KAAK,EAAE,6BAAa;SACvB,CAAC,CAAC;IACP,CAAC;CACJ;AATD,gCASC;AAAA,CAAC"}
1
+ {"version":3,"file":"RunCommand.js","sourceRoot":"","sources":["../../src/command/RunCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,yDAAsD;AACtD,mDAAgD;AAChD,qDAAkD;AAElD,MAAa,UAAW,SAAQ,0CAAoB;IAEhD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,+BAAc;YACtB,KAAK,EAAE,6BAAa;YACpB,QAAQ,EAAE,mCAAgB;SAC7B,CAAC,CAAC;IACP,CAAC;CACJ;AAVD,gCAUC;AAAA,CAAC"}
package/dist/index.d.ts CHANGED
@@ -47,6 +47,7 @@ export * from "./command/HealthzCommand";
47
47
  export * from "./command/HealthzGetCommand";
48
48
  export * from "./command/MetricsCommand";
49
49
  export * from "./command/MetricsGetCommand";
50
+ export * from "./command/RunCancelCommand";
50
51
  export * from "./command/RunCommand";
51
52
  export * from "./command/RunGetCommand";
52
53
  export * from "./command/RunListCommand";
@@ -101,6 +102,8 @@ export * from "./row/AgentTrackResponse_TargetRow";
101
102
  export * from "./row/AgentTrackResponse_TaskDefinitionRow";
102
103
  export * from "./row/AgentTrackResponse_TaskEntityRow";
103
104
  export * from "./row/AgentTrackResponse_TaskRow";
105
+ export * from "./row/AgentTrackResponse_TemplateRow";
106
+ export * from "./row/AgentTrackResponse_ToolRow";
104
107
  export * from "./row/AgentTrackResponse_ValueRow";
105
108
  export * from "./row/ChatRow";
106
109
  export * from "./row/ChatUpdateRow";
package/dist/index.js CHANGED
@@ -63,6 +63,7 @@ __exportStar(require("./command/HealthzCommand"), exports);
63
63
  __exportStar(require("./command/HealthzGetCommand"), exports);
64
64
  __exportStar(require("./command/MetricsCommand"), exports);
65
65
  __exportStar(require("./command/MetricsGetCommand"), exports);
66
+ __exportStar(require("./command/RunCancelCommand"), exports);
66
67
  __exportStar(require("./command/RunCommand"), exports);
67
68
  __exportStar(require("./command/RunGetCommand"), exports);
68
69
  __exportStar(require("./command/RunListCommand"), exports);
@@ -117,6 +118,8 @@ __exportStar(require("./row/AgentTrackResponse_TargetRow"), exports);
117
118
  __exportStar(require("./row/AgentTrackResponse_TaskDefinitionRow"), exports);
118
119
  __exportStar(require("./row/AgentTrackResponse_TaskEntityRow"), exports);
119
120
  __exportStar(require("./row/AgentTrackResponse_TaskRow"), exports);
121
+ __exportStar(require("./row/AgentTrackResponse_TemplateRow"), exports);
122
+ __exportStar(require("./row/AgentTrackResponse_ToolRow"), exports);
120
123
  __exportStar(require("./row/AgentTrackResponse_ValueRow"), exports);
121
124
  __exportStar(require("./row/ChatRow"), exports);
122
125
  __exportStar(require("./row/ChatUpdateRow"), 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,iEAA+C;AAC/C,kEAAgD;AAChD,kEAAgD;AAChD,8DAA4C;AAC5C,+DAA6C;AAC7C,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,4DAA0C;AAC1C,8DAA4C;AAC5C,0DAAwC;AACxC,kEAAgD;AAChD,mEAAiD;AACjD,2DAAyC;AACzC,8DAA4C;AAC5C,2DAAyC;AACzC,8DAA4C;AAC5C,uDAAqC;AACrC,0DAAwC;AACxC,2DAAyC;AACzC,wDAAsC;AACtC,gEAA8C;AAC9C,6DAA2C;AAC3C,yDAAuC;AACvC,6DAA2C;AAC3C,kDAAgC;AAChC,oDAAkC;AAClC,mDAAiC;AACjC,6DAA2C;AAC3C,kDAAgC;AAChC,qDAAmC;AACnC,wDAAsC;AACtC,gDAA8B;AAC9B,0DAAwC;AACxC,kDAAgC;AAChC,wDAAsC;AACtC,mDAAiC;AACjC,oDAAkC;AAClC,gEAA8C;AAC9C,6DAA2C;AAC3C,wDAAsC;AACtC,2DAAyC;AACzC,uDAAqC;AACrC,sEAAoD;AACpD,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC;AACpC,iDAA+B;AAC/B,oDAAkC;AAClC,8DAA4C;AAC5C,6EAA2D;AAC3D,uEAAqD;AACrD,6EAA2D;AAC3D,4EAA0D;AAC1D,sEAAoD;AACpD,wEAAsD;AACtD,2EAAyD;AACzD,oEAAkD;AAClD,oEAAkD;AAClD,0EAAwD;AACxD,yEAAuD;AACvD,mEAAiD;AACjD,oEAAkD;AAClD,wEAAsD;AACtD,6EAA2D;AAC3D,4EAA0D;AAC1D,mEAAiD;AACjD,qEAAmD;AACnD,6EAA2D;AAC3D,yEAAuD;AACvD,mEAAiD;AACjD,oEAAkD;AAClD,gDAA8B;AAC9B,sDAAoC;AACpC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,+CAA6B;AAC7B,0DAAwC;AACxC,0DAAwC;AACxC,2DAAyC;AACzC,0DAAwC"}
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,iEAA+C;AAC/C,kEAAgD;AAChD,kEAAgD;AAChD,8DAA4C;AAC5C,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,uEAAqD;AACrD,uEAAqD;AACrD,oEAAkD;AAClD,qEAAmD;AACnD,yD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D,6EAA2D;AAC3D,yEAAuD;AACvD,mEAAiD;AACjD,uEAAqD;AACrD,mEAAiD;AACjD,oEAAkD;AAClD,gDAA8B;AAC9B,sDAAoC;AACpC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,+CAA6B;AAC7B,0DAAwC;AACxC,0DAAwC;AACxC,2DAAyC;AACzC,0DAAwC"}
@@ -7,12 +7,14 @@ import { AgentTrackResponse_ObservationRow } from "./AgentTrackResponse_Observat
7
7
  import { AgentTrackResponse_PlanRow } from "./AgentTrackResponse_PlanRow";
8
8
  import { AgentTrackResponse_StepRow } from "./AgentTrackResponse_StepRow";
9
9
  import { AgentTrackResponse_TaskRow } from "./AgentTrackResponse_TaskRow";
10
+ import { AgentTrackResponse_TemplateRow } from "./AgentTrackResponse_TemplateRow";
11
+ import { AgentTrackResponse_ToolRow } from "./AgentTrackResponse_ToolRow";
10
12
  export type AgentTrackResponseRow = {
11
13
  input: AgentTrackResponse_InputRow;
12
14
  classification: (AgentTrackResponse_ClassificationRow | null);
13
15
  observation: (AgentTrackResponse_ObservationRow[] | null);
14
- tools: (string[] | null);
15
- templates: (string[] | null);
16
+ tools: (AgentTrackResponse_ToolRow[] | null);
17
+ templates: (AgentTrackResponse_TemplateRow[] | null);
16
18
  plans: AgentTrackResponse_PlanRow[];
17
19
  plans_compiled: any;
18
20
  steps: AgentTrackResponse_StepRow[];
@@ -27,5 +29,6 @@ export type AgentTrackResponseRow = {
27
29
  analyses_tools_retrieved: any;
28
30
  analyses_templates_retrieved: any;
29
31
  report: string;
32
+ interrupted: boolean;
30
33
  error: (AgentTrackResponse_ErrorRow | null);
31
34
  };
@@ -0,0 +1,4 @@
1
+ export type AgentTrackResponse_TemplateRow = {
2
+ analysis_rid: string;
3
+ name: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AgentTrackResponse_TemplateRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentTrackResponse_TemplateRow.js","sourceRoot":"","sources":["../../src/row/AgentTrackResponse_TemplateRow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type AgentTrackResponse_ToolRow = {
2
+ analysis_rid: string;
3
+ name: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AgentTrackResponse_ToolRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentTrackResponse_ToolRow.js","sourceRoot":"","sources":["../../src/row/AgentTrackResponse_ToolRow.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.49",
11
+ "version": "1.4.51",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/index.js",
@@ -47,7 +47,7 @@ export class NamirasoftExpertServer extends NSABaseServer
47
47
  test: NamirasoftExpertServerTest;
48
48
  constructor(base_url: string, token_manager: TokenManager, onError: (error: Error) => void)
49
49
  {
50
- super(base_url, `1.4.49`, token_manager, onError);
50
+ super(base_url, `1.4.51`, token_manager, onError);
51
51
  this.healthz = new NamirasoftExpertServerHealthz(this);
52
52
  this.health = new NamirasoftExpertServerHealth(this);
53
53
  this.metrics = new NamirasoftExpertServerMetrics(this);
@@ -32,6 +32,7 @@ export class NamirasoftExpertServerRun extends NamirasoftExpertServerBase
32
32
  super(server);
33
33
  this.List = this.List.bind(this);
34
34
  this.Get = this.Get.bind(this);
35
+ this.Cancel = this.Cancel.bind(this);
35
36
  }
36
37
  async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: RunRow[], count: number }>
37
38
  {
@@ -47,4 +48,9 @@ export class NamirasoftExpertServerRun extends NamirasoftExpertServerBase
47
48
  let { data } = await this.server._get<RunRow>(path, {}, config);
48
49
  return data;
49
50
  }
51
+ async Cancel(run_id: string, config?: BaseServerConfig<any>): Promise<void>
52
+ {
53
+ let path = `/run/${run_id}/cancel`;
54
+ await this.server._post<void>(path, {}, undefined, config);
55
+ }
50
56
  };
@@ -0,0 +1,45 @@
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 RunCancelCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["run_id"], []);
31
+ }
32
+ override async exec()
33
+ {
34
+ let token = this.app.storage.getNSAToken();
35
+ if (token == null)
36
+ throw new Error("Token is not available. Please login first using:\nns-expert account config \nor \nns-expert account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-expert-server-url");
41
+ let server = new NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.run.Cancel(this.arg_values[0]);
43
+ this.app.logger.success(JSON.stringify(ans));
44
+ }
45
+ };
@@ -19,6 +19,7 @@
19
19
  /****************************************************************/
20
20
 
21
21
  import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
+ import { RunCancelCommand } from "./RunCancelCommand";
22
23
  import { RunGetCommand } from "./RunGetCommand";
23
24
  import { RunListCommand } from "./RunListCommand";
24
25
 
@@ -29,6 +30,7 @@ export class RunCommand extends BaseNavigatorCommand
29
30
  super(argv, {
30
31
  "list": RunListCommand,
31
32
  "get": RunGetCommand,
33
+ "cancel": RunCancelCommand,
32
34
  });
33
35
  }
34
36
  };
package/src/index.ts CHANGED
@@ -67,6 +67,7 @@ export * from "./command/HealthzCommand";
67
67
  export * from "./command/HealthzGetCommand";
68
68
  export * from "./command/MetricsCommand";
69
69
  export * from "./command/MetricsGetCommand";
70
+ export * from "./command/RunCancelCommand";
70
71
  export * from "./command/RunCommand";
71
72
  export * from "./command/RunGetCommand";
72
73
  export * from "./command/RunListCommand";
@@ -121,6 +122,8 @@ export * from "./row/AgentTrackResponse_TargetRow";
121
122
  export * from "./row/AgentTrackResponse_TaskDefinitionRow";
122
123
  export * from "./row/AgentTrackResponse_TaskEntityRow";
123
124
  export * from "./row/AgentTrackResponse_TaskRow";
125
+ export * from "./row/AgentTrackResponse_TemplateRow";
126
+ export * from "./row/AgentTrackResponse_ToolRow";
124
127
  export * from "./row/AgentTrackResponse_ValueRow";
125
128
  export * from "./row/ChatRow";
126
129
  export * from "./row/ChatUpdateRow";
@@ -27,14 +27,16 @@ import { AgentTrackResponse_ObservationRow } from "./AgentTrackResponse_Observat
27
27
  import { AgentTrackResponse_PlanRow } from "./AgentTrackResponse_PlanRow";
28
28
  import { AgentTrackResponse_StepRow } from "./AgentTrackResponse_StepRow";
29
29
  import { AgentTrackResponse_TaskRow } from "./AgentTrackResponse_TaskRow";
30
+ import { AgentTrackResponse_TemplateRow } from "./AgentTrackResponse_TemplateRow";
31
+ import { AgentTrackResponse_ToolRow } from "./AgentTrackResponse_ToolRow";
30
32
 
31
33
  export type AgentTrackResponseRow =
32
34
  {
33
35
  input: AgentTrackResponse_InputRow;
34
36
  classification: (AgentTrackResponse_ClassificationRow | null);
35
37
  observation: (AgentTrackResponse_ObservationRow[] | null);
36
- tools: (string[] | null);
37
- templates: (string[] | null);
38
+ tools: (AgentTrackResponse_ToolRow[] | null);
39
+ templates: (AgentTrackResponse_TemplateRow[] | null);
38
40
  plans: AgentTrackResponse_PlanRow[];
39
41
  plans_compiled: any;
40
42
  steps: AgentTrackResponse_StepRow[];
@@ -49,5 +51,6 @@ export type AgentTrackResponseRow =
49
51
  analyses_tools_retrieved: any;
50
52
  analyses_templates_retrieved: any;
51
53
  report: string;
54
+ interrupted: boolean;
52
55
  error: (AgentTrackResponse_ErrorRow | null);
53
56
  }
@@ -0,0 +1,25 @@
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
+ export type AgentTrackResponse_TemplateRow =
22
+ {
23
+ analysis_rid: string;
24
+ name: string;
25
+ }
@@ -0,0 +1,25 @@
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
+ export type AgentTrackResponse_ToolRow =
22
+ {
23
+ analysis_rid: string;
24
+ name: string;
25
+ }