@olane/o-lane 0.7.18 → 0.7.20

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.
Files changed (115) hide show
  1. package/dist/src/capabilities/enums/o-capability.type-enum.d.ts +1 -0
  2. package/dist/src/capabilities/enums/o-capability.type-enum.d.ts.map +1 -1
  3. package/dist/src/capabilities/enums/o-capability.type-enum.js +1 -0
  4. package/dist/src/capabilities/index.d.ts +2 -1
  5. package/dist/src/capabilities/index.d.ts.map +1 -1
  6. package/dist/src/capabilities/index.js +2 -1
  7. package/dist/src/capabilities/interfaces/{o-capability.config.d.ts → o-capability.config-interface.d.ts} +5 -4
  8. package/dist/src/capabilities/interfaces/o-capability.config-interface.d.ts.map +1 -0
  9. package/dist/src/capabilities/interfaces/o-capability.result-interface.d.ts +1 -2
  10. package/dist/src/capabilities/interfaces/o-capability.result-interface.d.ts.map +1 -1
  11. package/dist/src/capabilities/o-capability.config.d.ts +24 -0
  12. package/dist/src/capabilities/o-capability.config.d.ts.map +1 -0
  13. package/dist/src/capabilities/o-capability.config.js +25 -0
  14. package/dist/src/capabilities/o-capability.d.ts +9 -5
  15. package/dist/src/capabilities/o-capability.d.ts.map +1 -1
  16. package/dist/src/capabilities/o-capability.intelligence.d.ts.map +1 -1
  17. package/dist/src/capabilities/o-capability.intelligence.js +4 -18
  18. package/dist/src/capabilities/o-capability.js +4 -5
  19. package/dist/src/capabilities/o-capability.result.d.ts +6 -12
  20. package/dist/src/capabilities/o-capability.result.d.ts.map +1 -1
  21. package/dist/src/capabilities/o-capability.result.js +2 -10
  22. package/dist/src/capabilities-all/o-capability.all.d.ts +2 -3
  23. package/dist/src/capabilities-all/o-capability.all.d.ts.map +1 -1
  24. package/dist/src/capabilities-all/o-capability.all.js +6 -8
  25. package/dist/src/capabilities-configure/interfaces/o-capability.configure-config.d.ts +2 -2
  26. package/dist/src/capabilities-configure/interfaces/o-capability.configure-config.d.ts.map +1 -1
  27. package/dist/src/capabilities-configure/o-capability.configure.d.ts +0 -15
  28. package/dist/src/capabilities-configure/o-capability.configure.d.ts.map +1 -1
  29. package/dist/src/capabilities-configure/o-capability.configure.js +61 -47
  30. package/dist/src/capabilities-evaluate/o-capability.evaluate.d.ts +1 -0
  31. package/dist/src/capabilities-evaluate/o-capability.evaluate.d.ts.map +1 -1
  32. package/dist/src/capabilities-evaluate/o-capability.evaluate.js +17 -2
  33. package/dist/src/capabilities-execute/execute.capability.d.ts +13 -0
  34. package/dist/src/capabilities-execute/execute.capability.d.ts.map +1 -0
  35. package/dist/src/capabilities-execute/execute.capability.js +111 -0
  36. package/dist/src/capabilities-execute/interfaces/o-capability.configure-config.d.ts +8 -0
  37. package/dist/src/capabilities-execute/interfaces/o-capability.configure-config.d.ts.map +1 -0
  38. package/dist/src/capabilities-multiple-step/interfaces/o-capability.multiple-step-config.d.ts +1 -1
  39. package/dist/src/capabilities-multiple-step/interfaces/o-capability.multiple-step-config.d.ts.map +1 -1
  40. package/dist/src/capabilities-multiple-step/o-capability.multiple-step.d.ts.map +1 -1
  41. package/dist/src/capabilities-multiple-step/o-capability.multiple-step.js +0 -1
  42. package/dist/src/capabilities-search/interfaces/o-capability.search-config.d.ts +1 -1
  43. package/dist/src/capabilities-search/interfaces/o-capability.search-config.d.ts.map +1 -1
  44. package/dist/src/capabilities-search/o-capability.search.d.ts.map +1 -1
  45. package/dist/src/capabilities-search/o-capability.search.js +0 -4
  46. package/dist/src/index.d.ts +1 -2
  47. package/dist/src/index.d.ts.map +1 -1
  48. package/dist/src/index.js +1 -2
  49. package/dist/src/interfaces/o-lane.config.d.ts +5 -0
  50. package/dist/src/interfaces/o-lane.config.d.ts.map +1 -1
  51. package/dist/src/o-lane.d.ts +13 -13
  52. package/dist/src/o-lane.d.ts.map +1 -1
  53. package/dist/src/o-lane.js +52 -180
  54. package/dist/src/o-lane.mixin.d.ts.map +1 -1
  55. package/dist/src/o-lane.mixin.js +9 -5
  56. package/dist/src/prompts/agent.prompt.d.ts +1 -12
  57. package/dist/src/prompts/agent.prompt.d.ts.map +1 -1
  58. package/dist/src/prompts/agent.prompt.js +80 -138
  59. package/dist/src/prompts/configure.prompt.d.ts +1 -8
  60. package/dist/src/prompts/configure.prompt.d.ts.map +1 -1
  61. package/dist/src/prompts/configure.prompt.js +68 -47
  62. package/dist/src/prompts/execute.prompt.d.ts +9 -0
  63. package/dist/src/prompts/execute.prompt.d.ts.map +1 -0
  64. package/dist/src/prompts/execute.prompt.js +47 -0
  65. package/dist/src/prompts/index.d.ts +3 -0
  66. package/dist/src/prompts/index.d.ts.map +1 -0
  67. package/dist/src/prompts/index.js +2 -0
  68. package/dist/src/prompts/interfaces/o-prompt.config.d.ts +8 -0
  69. package/dist/src/prompts/interfaces/o-prompt.config.d.ts.map +1 -0
  70. package/dist/src/prompts/interfaces/o-prompt.config.js +1 -0
  71. package/dist/src/prompts/o-prompt.d.ts +36 -0
  72. package/dist/src/prompts/o-prompt.d.ts.map +1 -0
  73. package/dist/src/prompts/o-prompt.js +92 -0
  74. package/dist/src/storage/default.prompt-loader.d.ts +14 -0
  75. package/dist/src/storage/default.prompt-loader.d.ts.map +1 -0
  76. package/dist/src/storage/default.prompt-loader.js +34 -0
  77. package/dist/src/storage/index.d.ts +1 -3
  78. package/dist/src/storage/index.d.ts.map +1 -1
  79. package/dist/src/storage/index.js +1 -5
  80. package/dist/src/storage/o-lane.storage-manager.d.ts +71 -0
  81. package/dist/src/storage/o-lane.storage-manager.d.ts.map +1 -0
  82. package/dist/src/storage/o-lane.storage-manager.js +208 -0
  83. package/dist/src/storage/prompt-loader.d.ts +10 -28
  84. package/dist/src/storage/prompt-loader.d.ts.map +1 -1
  85. package/dist/src/storage/prompt-loader.js +9 -112
  86. package/dist/test/index.d.ts +1 -0
  87. package/dist/test/index.d.ts.map +1 -0
  88. package/dist/test/index.js +2 -0
  89. package/package.json +12 -10
  90. package/dist/src/capabilities/interfaces/o-capability.config.d.ts.map +0 -1
  91. package/dist/src/capabilities-task/interfaces/o-capability.task-config.d.ts +0 -16
  92. package/dist/src/capabilities-task/interfaces/o-capability.task-config.d.ts.map +0 -1
  93. package/dist/src/capabilities-task/o-capability.task-result.d.ts +0 -5
  94. package/dist/src/capabilities-task/o-capability.task-result.d.ts.map +0 -1
  95. package/dist/src/capabilities-task/o-capability.task-result.js +0 -3
  96. package/dist/src/capabilities-task/o-capability.task.d.ts +0 -20
  97. package/dist/src/capabilities-task/o-capability.task.d.ts.map +0 -1
  98. package/dist/src/capabilities-task/o-capability.task.js +0 -124
  99. package/dist/src/storage/prompt-schema.d.ts +0 -42
  100. package/dist/src/storage/prompt-schema.d.ts.map +0 -1
  101. package/dist/src/storage/prompt-schema.js +0 -29
  102. package/dist/src/storage/prompt-seeder.d.ts +0 -42
  103. package/dist/src/storage/prompt-seeder.d.ts.map +0 -1
  104. package/dist/src/storage/prompt-seeder.js +0 -141
  105. package/dist/src/storage/prompt-storage-provider.tool.d.ts +0 -99
  106. package/dist/src/storage/prompt-storage-provider.tool.d.ts.map +0 -1
  107. package/dist/src/storage/prompt-storage-provider.tool.js +0 -320
  108. package/dist/test/prompt-seeder.spec.d.ts +0 -2
  109. package/dist/test/prompt-seeder.spec.d.ts.map +0 -1
  110. package/dist/test/prompt-seeder.spec.js +0 -256
  111. package/dist/test/prompt-storage-provider.spec.d.ts +0 -2
  112. package/dist/test/prompt-storage-provider.spec.d.ts.map +0 -1
  113. package/dist/test/prompt-storage-provider.spec.js +0 -457
  114. /package/dist/src/capabilities/interfaces/{o-capability.config.js → o-capability.config-interface.js} +0 -0
  115. /package/dist/src/{capabilities-task/interfaces/o-capability.task-config.js → capabilities-execute/interfaces/o-capability.configure-config.js} +0 -0
@@ -3,6 +3,7 @@ export declare enum oCapabilityType {
3
3
  SEARCH = "search",
4
4
  MULTIPLE_STEP = "multiple_step",
5
5
  CONFIGURE = "configure",
6
+ EXECUTE = "execute",
6
7
  HANDSHAKE = "handshake",
7
8
  EVALUATE = "evaluate",
8
9
  STOP = "stop",
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.type-enum.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/enums/o-capability.type-enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;CACpB"}
1
+ {"version":3,"file":"o-capability.type-enum.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/enums/o-capability.type-enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;CACpB"}
@@ -4,6 +4,7 @@ export var oCapabilityType;
4
4
  oCapabilityType["SEARCH"] = "search";
5
5
  oCapabilityType["MULTIPLE_STEP"] = "multiple_step";
6
6
  oCapabilityType["CONFIGURE"] = "configure";
7
+ oCapabilityType["EXECUTE"] = "execute";
7
8
  oCapabilityType["HANDSHAKE"] = "handshake";
8
9
  oCapabilityType["EVALUATE"] = "evaluate";
9
10
  oCapabilityType["STOP"] = "stop";
@@ -1,6 +1,7 @@
1
1
  export * from './o-capability.js';
2
- export * from './interfaces/o-capability.config.js';
2
+ export * from './interfaces/o-capability.config-interface.js';
3
3
  export * from './interfaces/o-capability.result-interface.js';
4
4
  export * from './enums/o-capability.type-enum.js';
5
5
  export * from './o-capability.result.js';
6
+ export * from './o-capability.config.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './o-capability.js';
2
- export * from './interfaces/o-capability.config.js';
2
+ export * from './interfaces/o-capability.config-interface.js';
3
3
  export * from './interfaces/o-capability.result-interface.js';
4
4
  export * from './enums/o-capability.type-enum.js';
5
5
  export * from './o-capability.result.js';
6
+ export * from './o-capability.config.js';
@@ -1,14 +1,15 @@
1
1
  import { oIntent } from '../../intent/o-intent.js';
2
2
  import { oLaneConfig } from '../../interfaces/o-lane.config.js';
3
3
  import { oToolBase } from '@olane/o-tool';
4
- export interface oCapabilityConfig {
4
+ export interface oCapabilityConfigInterface {
5
5
  node: oToolBase;
6
6
  intent: oIntent;
7
- laneConfig: oLaneConfig;
8
- history: string;
7
+ laneConfig?: oLaneConfig;
8
+ history?: string;
9
+ chatHistory?: string;
9
10
  params?: any;
10
11
  isReplay?: boolean;
11
12
  useStream?: boolean;
12
13
  onChunk?: (chunk: any) => void;
13
14
  }
14
- //# sourceMappingURL=o-capability.config.d.ts.map
15
+ //# sourceMappingURL=o-capability.config-interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o-capability.config-interface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/interfaces/o-capability.config-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,WAAW,0BAA0B;IAEzC,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC"}
@@ -1,8 +1,7 @@
1
- import { oCapabilityConfig } from '../interfaces/o-capability.config.js';
2
1
  import { oCapabilityType } from '../enums/o-capability.type-enum.js';
2
+ import { oCapabilityConfig } from '../o-capability.config.js';
3
3
  export interface oCapabilityResultInterface {
4
4
  result?: any;
5
- humanResult?: any;
6
5
  type: oCapabilityType;
7
6
  error?: string;
8
7
  config?: oCapabilityConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.result-interface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/interfaces/o-capability.result-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,MAAM,WAAW,0BAA0B;IACzC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
1
+ {"version":3,"file":"o-capability.result-interface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/interfaces/o-capability.result-interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,0BAA0B;IACzC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
@@ -0,0 +1,24 @@
1
+ import { oCapabilityConfigInterface as inter } from './interfaces/o-capability.config-interface.js';
2
+ import { oIntent } from '../intent/o-intent.js';
3
+ import { oLaneConfig } from '../interfaces/o-lane.config.js';
4
+ import { oToolBase } from '@olane/o-tool';
5
+ export declare class oCapabilityConfig implements inter {
6
+ node: oToolBase;
7
+ intent: oIntent;
8
+ laneConfig?: oLaneConfig;
9
+ history?: string;
10
+ chatHistory?: string;
11
+ params?: any;
12
+ isReplay?: boolean;
13
+ useStream?: boolean;
14
+ onChunk?: (chunk: any) => void;
15
+ constructor(params: inter);
16
+ toJSON(): {
17
+ intent: oIntent;
18
+ address: string;
19
+ isReplay: boolean | undefined;
20
+ };
21
+ toString(): string;
22
+ static fromJSON(json: inter): oCapabilityConfig;
23
+ }
24
+ //# sourceMappingURL=o-capability.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o-capability.config.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,IAAI,KAAK,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,qBAAa,iBAAkB,YAAW,KAAK;IAC7C,IAAI,EAAG,SAAS,CAAC;IACjB,MAAM,EAAG,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;gBAEnB,MAAM,EAAE,KAAK;IAWzB,MAAM;;;;;IAQN,QAAQ;IAIR,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,iBAAiB;CAIhD"}
@@ -0,0 +1,25 @@
1
+ export class oCapabilityConfig {
2
+ constructor(params) {
3
+ this.node = params.node;
4
+ this.intent = params.intent;
5
+ this.laneConfig = params.laneConfig;
6
+ this.history = params.history;
7
+ this.isReplay = params.isReplay;
8
+ this.useStream = params.useStream;
9
+ this.onChunk = params.onChunk;
10
+ this.chatHistory = params.chatHistory;
11
+ }
12
+ toJSON() {
13
+ return {
14
+ intent: this.intent,
15
+ address: this.node?.address?.value,
16
+ isReplay: this.isReplay,
17
+ };
18
+ }
19
+ toString() {
20
+ return JSON.stringify(this.toJSON());
21
+ }
22
+ static fromJSON(json) {
23
+ return new oCapabilityConfig(json);
24
+ }
25
+ }
@@ -1,15 +1,19 @@
1
1
  import { oObject } from '@olane/o-core';
2
2
  import { oToolBase } from '@olane/o-tool';
3
- import { oCapabilityConfig } from './interfaces/o-capability.config.js';
4
3
  import { oCapabilityType } from './enums/o-capability.type-enum.js';
5
4
  import { oCapabilityResult } from './o-capability.result.js';
6
- import { oIntent } from '../intent/o-intent.js';
5
+ import { PromptLoader } from '../storage/prompt-loader.js';
6
+ import { oCapabilityConfig } from './o-capability.config.js';
7
7
  export declare abstract class oCapability extends oObject {
8
- config: oCapabilityConfig;
8
+ protected promptLoader: PromptLoader;
9
+ protected node: oToolBase;
10
+ protected config?: oCapabilityConfig;
11
+ constructor({ promptLoader, node }: {
12
+ promptLoader: PromptLoader;
13
+ node: oToolBase;
14
+ });
9
15
  abstract run(): Promise<oCapabilityResult>;
10
- get node(): oToolBase;
11
16
  execute(config: oCapabilityConfig): Promise<oCapabilityResult>;
12
- get intent(): oIntent;
13
17
  get type(): oCapabilityType;
14
18
  static get type(): oCapabilityType;
15
19
  cancel(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,8BAAsB,WAAY,SAAQ,OAAO;IACxC,MAAM,EAAG,iBAAiB,CAAC;IAClC,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAE1C,IAAI,IAAI,IAAI,SAAS,CAEpB;IAEK,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAKpE,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,IAAI,oBAEP;IAED,MAAM,KAAK,IAAI,oBAEd;IAED,MAAM;CAGP"}
1
+ {"version":3,"file":"o-capability.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,8BAAsB,WAAY,SAAQ,OAAO;IAC/C,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IACrC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC;IAC1B,SAAS,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;gBAEzB,EAAC,YAAY,EAAE,IAAI,EAAC,EAAE;QAAE,YAAY,EAAE,YAAY,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOjF,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAEpC,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAKpE,IAAI,IAAI,oBAEP;IAED,MAAM,KAAK,IAAI,oBAEd;IAED,MAAM;CAGP"}
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.intelligence.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.intelligence.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,8BAAsB,uBAAwB,SAAQ,WAAW;IACzD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC;CAoE3E"}
1
+ {"version":3,"file":"o-capability.intelligence.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.intelligence.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,8BAAsB,uBAAwB,SAAQ,WAAW;IAEzD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC;CAqD3E"}
@@ -2,19 +2,15 @@ import { oAddress, RegexUtils, RestrictedAddresses, } from '@olane/o-core';
2
2
  import { oCapabilityIntelligenceResult } from './interfaces/o-capability.intelligence-result.js';
3
3
  import { oCapability } from './o-capability.js';
4
4
  import { oCapabilityType } from './enums/o-capability.type-enum.js';
5
- import { ResultStreamParser } from './utils/result-stream-parser.js';
6
5
  export class oCapabilityIntelligence extends oCapability {
7
6
  async intelligence(prompt) {
8
7
  try {
9
- if (!this.node.isRunning) {
10
- throw new Error('Node is not running, cannot use intelligence capability');
11
- }
12
- const _isStreaming = this.config.useStream || false;
13
- const parser = new ResultStreamParser('result');
8
+ const _isStreaming = this.config?.useStream || false;
14
9
  const response = await this.node.useStream(new oAddress(RestrictedAddresses.INTELLIGENCE), {
15
10
  method: 'prompt',
16
11
  params: {
17
12
  prompt: prompt,
13
+ intent: this.config?.intent,
18
14
  _isStreaming: _isStreaming,
19
15
  },
20
16
  }, {
@@ -35,21 +31,11 @@ export class oCapabilityIntelligence extends oCapability {
35
31
  const processedResult = RegexUtils.extractResultFromAI(message);
36
32
  // Extract structured fields from AI response
37
33
  // The AI returns JSON with fields like: type, summary, reasoning, result, etc.
38
- const { type, summary, reasoning, ...rest } = processedResult;
34
+ const { type } = processedResult;
39
35
  return new oCapabilityIntelligenceResult({
40
36
  result: processedResult, // Keep full result for backwards compatibility
41
- humanResult: processedResult.result, // AI-generated result is already human-readable
42
37
  type: type || oCapabilityType.EVALUATE,
43
- config: {
44
- ...this.config,
45
- // Preserve summary and reasoning in params for access
46
- params: {
47
- ...this.config.params,
48
- ...processedResult, // Store full AI response in params
49
- summary,
50
- reasoning,
51
- },
52
- },
38
+ config: this.config,
53
39
  error: undefined,
54
40
  });
55
41
  }
@@ -1,16 +1,15 @@
1
1
  import { oObject } from '@olane/o-core';
2
2
  import { oCapabilityType } from './enums/o-capability.type-enum.js';
3
3
  export class oCapability extends oObject {
4
- get node() {
5
- return this.config.node;
4
+ constructor({ promptLoader, node }) {
5
+ super();
6
+ this.promptLoader = promptLoader;
7
+ this.node = node;
6
8
  }
7
9
  async execute(config) {
8
10
  this.config = config;
9
11
  return this.run();
10
12
  }
11
- get intent() {
12
- return this.config.intent;
13
- }
14
13
  get type() {
15
14
  return oCapabilityType.UNKNOWN;
16
15
  }
@@ -1,13 +1,9 @@
1
- import { oCapabilityMultipleStepConfig } from '../capabilities-multiple-step/interfaces/o-capability.multiple-step-config.js';
2
- import { oCapabilitySearchConfig } from '../capabilities-search/interfaces/o-capability.search-config.js';
3
- import { oCapabilityTaskConfig } from '../capabilities-task/interfaces/o-capability.task-config.js';
4
1
  import { oCapabilityType } from './enums/o-capability.type-enum.js';
5
- import { oCapabilityConfig } from './interfaces/o-capability.config.js';
2
+ import { oCapabilityConfig } from './o-capability.config.js';
6
3
  import { oCapabilityResultInterface } from './interfaces/o-capability.result-interface.js';
7
4
  export declare class oCapabilityResult implements oCapabilityResultInterface {
8
5
  id: string;
9
- result?: oCapabilitySearchConfig | oCapabilityMultipleStepConfig | oCapabilityTaskConfig | any;
10
- humanResult?: any;
6
+ result?: any;
11
7
  type: oCapabilityType;
12
8
  error?: string;
13
9
  config?: oCapabilityConfig;
@@ -16,15 +12,13 @@ export declare class oCapabilityResult implements oCapabilityResultInterface {
16
12
  toJSON(): {
17
13
  id: string;
18
14
  result: any;
19
- humanResult: any;
20
15
  type: oCapabilityType;
21
16
  error: string | undefined;
22
- shouldPersist: boolean | undefined;
23
17
  config: {
24
- intent: import("../index.js").oIntent | undefined;
25
- params: any;
26
- history: string | undefined;
27
- };
18
+ intent: import("../index.js").oIntent;
19
+ address: string;
20
+ isReplay: boolean | undefined;
21
+ } | undefined;
28
22
  };
29
23
  toString(): string;
30
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.result.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,+EAA+E,CAAC;AAC9H,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAG3F,qBAAa,iBAAkB,YAAW,0BAA0B;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EACH,uBAAuB,GACvB,6BAA6B,GAC7B,qBAAqB,GACrB,GAAG,CAAC;IACR,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;gBAEZ,MAAM,EAAE,0BAA0B;IAU9C,MAAM;;;;;;;;;;;;;IAgBN,QAAQ;CAGT"}
1
+ {"version":3,"file":"o-capability.result.d.ts","sourceRoot":"","sources":["../../../src/capabilities/o-capability.result.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAG3F,qBAAa,iBAAkB,YAAW,0BAA0B;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;gBAEZ,MAAM,EAAE,0BAA0B;IAQ9C,MAAM;;;;;;;;;;;IAUN,QAAQ;CAGT"}
@@ -4,25 +4,17 @@ export class oCapabilityResult {
4
4
  constructor(config) {
5
5
  this.id = uuidv4();
6
6
  this.result = config.result;
7
- this.humanResult = config.humanResult;
8
7
  this.type = config.type || oCapabilityType.UNKNOWN;
9
- this.error = config.error || '';
10
8
  this.config = config.config;
11
- this.shouldPersist = config.shouldPersist;
9
+ this.error = config.error;
12
10
  }
13
11
  toJSON() {
14
12
  return {
15
13
  id: this.id,
16
14
  result: this.result,
17
- humanResult: this.humanResult, // Include human-readable result in serialization
18
15
  type: this.type,
19
16
  error: this.error,
20
- shouldPersist: this.shouldPersist,
21
- config: {
22
- intent: this.config?.intent,
23
- params: this.config?.params,
24
- history: this.config?.history,
25
- },
17
+ config: this.config?.toJSON()
26
18
  };
27
19
  }
28
20
  toString() {
@@ -1,5 +1,4 @@
1
1
  import { oCapabilityEvaluate } from '../capabilities-evaluate/o-capability.evaluate.js';
2
- import { oCapabilitySearch } from '../capabilities-search/o-capability.search.js';
3
- import { oCapabilityTask } from '../capabilities-task/o-capability.task.js';
4
- export declare const ALL_CAPABILITIES: (typeof oCapabilityEvaluate | typeof oCapabilitySearch | typeof oCapabilityTask)[];
2
+ import { oCapabilityExecute } from '../capabilities-execute/execute.capability.js';
3
+ export declare const ALL_CAPABILITIES: (typeof oCapabilityEvaluate | typeof oCapabilityExecute)[];
5
4
  //# sourceMappingURL=o-capability.all.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.all.d.ts","sourceRoot":"","sources":["../../../src/capabilities-all/o-capability.all.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAExF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAE5E,eAAO,MAAM,gBAAgB,oFAM5B,CAAC"}
1
+ {"version":3,"file":"o-capability.all.d.ts","sourceRoot":"","sources":["../../../src/capabilities-all/o-capability.all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAEnF,eAAO,MAAM,gBAAgB,4DAO5B,CAAC"}
@@ -1,12 +1,10 @@
1
- import { oCapabilityConfigure } from '../capabilities-configure/o-capability.configure.js';
2
1
  import { oCapabilityEvaluate } from '../capabilities-evaluate/o-capability.evaluate.js';
3
- import { oCapabilityMultipleStep } from '../capabilities-multiple-step/o-capability.multiple-step.js';
4
- import { oCapabilitySearch } from '../capabilities-search/o-capability.search.js';
5
- import { oCapabilityTask } from '../capabilities-task/o-capability.task.js';
2
+ import { oCapabilityExecute } from '../capabilities-execute/execute.capability.js';
6
3
  export const ALL_CAPABILITIES = [
7
- oCapabilityTask,
8
- oCapabilitySearch,
4
+ // oCapabilityTask,
5
+ // oCapabilitySearch,
6
+ oCapabilityExecute,
9
7
  oCapabilityEvaluate,
10
- oCapabilityMultipleStep,
11
- oCapabilityConfigure,
8
+ // oCapabilityMultipleStep,
9
+ // oCapabilityConfigure,
12
10
  ];
@@ -1,5 +1,5 @@
1
- import { oCapabilityConfig } from '../../capabilities/interfaces/o-capability.config.js';
2
- export interface oCapabilityConfigureConfig extends oCapabilityConfig {
1
+ import { oCapabilityConfigInterface } from '../../capabilities/interfaces/o-capability.config-interface.js';
2
+ export interface oCapabilityConfigureConfig extends oCapabilityConfigInterface {
3
3
  params: {
4
4
  toolAddress: string;
5
5
  intent: string;
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.configure-config.d.ts","sourceRoot":"","sources":["../../../../src/capabilities-configure/interfaces/o-capability.configure-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAEzF,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
1
+ {"version":3,"file":"o-capability.configure-config.d.ts","sourceRoot":"","sources":["../../../../src/capabilities-configure/interfaces/o-capability.configure-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAE5G,MAAM,WAAW,0BAA2B,SAAQ,0BAA0B;IAC5E,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
@@ -1,16 +1 @@
1
- import { oCapabilityResult, oCapabilityType } from '../capabilities/index.js';
2
- import { oCapabilityConfigureConfig } from './interfaces/o-capability.configure-config.js';
3
- import { oCapabilityIntelligence } from '../capabilities/o-capability.intelligence.js';
4
- import { oMethod } from '@olane/o-protocol';
5
- import { oHandshakeResult } from '../interfaces/handshake.result.js';
6
- export declare class oCapabilityConfigure extends oCapabilityIntelligence {
7
- config: oCapabilityConfigureConfig;
8
- get type(): oCapabilityType;
9
- static get type(): oCapabilityType;
10
- generatePrompt(tools: string[], methods: {
11
- [key: string]: oMethod;
12
- }): string;
13
- handshake(): Promise<oHandshakeResult>;
14
- run(): Promise<oCapabilityResult>;
15
- }
16
1
  //# sourceMappingURL=o-capability.configure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.configure.d.ts","sourceRoot":"","sources":["../../../src/capabilities-configure/o-capability.configure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAE,OAAO,EAA+B,MAAM,mBAAmB,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,qBAAa,oBAAqB,SAAQ,uBAAuB;IACxD,MAAM,EAAG,0BAA0B,CAAC;IAE3C,IAAI,IAAI,IAAI,eAAe,CAE1B;IAED,MAAM,KAAK,IAAI,oBAEd;IAED,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,MAAM;IAetE,SAAS,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAatC,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAmBxC"}
1
+ {"version":3,"file":"o-capability.configure.d.ts","sourceRoot":"","sources":["../../../src/capabilities-configure/o-capability.configure.ts"],"names":[],"mappings":""}
@@ -1,47 +1,61 @@
1
- import { oAddress, oError, oErrorCodes } from '@olane/o-core';
2
- import { oCapabilityType } from '../capabilities/index.js';
3
- import { oCapabilityIntelligence } from '../capabilities/o-capability.intelligence.js';
4
- import { oLaneContext } from '../o-lane.context.js';
5
- import { oProtocolMethods } from '@olane/o-protocol';
6
- import { AGENT_PROMPT } from '../prompts/agent.prompt.js';
7
- import { CONFIGURE_INSTRUCTIONS } from '../prompts/configure.prompt.js';
8
- export class oCapabilityConfigure extends oCapabilityIntelligence {
9
- get type() {
10
- return oCapabilityType.CONFIGURE;
11
- }
12
- static get type() {
13
- return oCapabilityType.CONFIGURE;
14
- }
15
- generatePrompt(tools, methods) {
16
- const context = new oLaneContext([
17
- `[Method Metadata Begin]\n${JSON.stringify(methods, null, 2)}\n[Method Metadata End]`,
18
- `[Method Options Begin]\n${(tools || []).join(', ')}\n[Method Options End]`,
19
- ]);
20
- const configureIntent = `Configure the tool use, prioritize "Use Tool Instructions". You have already found the tool to resolve the user's intent: ${this.config.params.toolAddress}. DO NOT USE parameter values that are not explicitly mentioned in the agent history, provided context or intent. Configure the request to use the tool with user intent: ${this.config.params.intent}`;
21
- return AGENT_PROMPT(configureIntent, context.toString(), this.config.history || '', CONFIGURE_INSTRUCTIONS);
22
- }
23
- async handshake() {
24
- const response = await this.node.use(new oAddress(this.config.params.toolAddress), {
25
- method: oProtocolMethods.HANDSHAKE,
26
- params: {
27
- intent: this.config.intent.value,
28
- },
29
- });
30
- return response.result.data;
31
- }
32
- async run() {
33
- // Check if we're in replay mode
34
- if (this.config.isReplay) {
35
- this.logger.debug('Configure capability is being replayed - re-executing to restore state');
36
- }
37
- const handshake = await this.handshake();
38
- if (!handshake.result) {
39
- throw new oError(oErrorCodes.INVALID_RESPONSE, 'Handshake failed');
40
- }
41
- // this.logger.debug('Handshake: ', handshake.result);
42
- const { tools, methods } = handshake.result;
43
- const prompt = this.generatePrompt(tools, methods);
44
- const response = await this.intelligence(prompt);
45
- return response;
46
- }
47
- }
1
+ "use strict";
2
+ // import { oAddress, oError, oErrorCodes } from '@olane/o-core';
3
+ // import { oCapabilityResult, oCapabilityType } from '../capabilities/index.js';
4
+ // import { oCapabilityConfigureConfig } from './interfaces/o-capability.configure-config.js';
5
+ // import { oCapabilityIntelligence } from '../capabilities/o-capability.intelligence.js';
6
+ // import { oLaneContext } from '../o-lane.context.js';
7
+ // import { oMethod, oProtocolMethods, oResponse } from '@olane/o-protocol';
8
+ // import { AGENT_PROMPT } from '../prompts/agent.prompt.js';
9
+ // import { CONFIGURE_INSTRUCTIONS } from '../prompts/configure.prompt.js';
10
+ // import { oHandshakeResult } from '../interfaces/handshake.result.js';
11
+ // export class oCapabilityConfigure extends oCapabilityIntelligence {
12
+ // public config!: oCapabilityConfigureConfig;
13
+ // get type(): oCapabilityType {
14
+ // return oCapabilityType.CONFIGURE;
15
+ // }
16
+ // static get type() {
17
+ // return oCapabilityType.CONFIGURE;
18
+ // }
19
+ // generatePrompt(tools: string[], methods: { [key: string]: oMethod }): string {
20
+ // const context = new oLaneContext([
21
+ // `[Method Metadata Begin]\n${JSON.stringify(methods, null, 2)}\n[Method Metadata End]`,
22
+ // `[Method Options Begin]\n${(tools || []).join(', ')}\n[Method Options End]`,
23
+ // ]);
24
+ // const configureIntent = `Configure the tool use, prioritize "Use Tool Instructions". You have already found the tool to resolve the user's intent: ${this.config.params.toolAddress}. DO NOT USE parameter values that are not explicitly mentioned in the agent history, provided context or intent. Configure the request to use the tool with user intent: ${this.config.params.intent}`;
25
+ // return AGENT_PROMPT(
26
+ // configureIntent,
27
+ // context.toString(),
28
+ // this.config.history || '',
29
+ // CONFIGURE_INSTRUCTIONS,
30
+ // );
31
+ // }
32
+ // async handshake(): Promise<oHandshakeResult> {
33
+ // const response = await this.node.use(
34
+ // new oAddress(this.config.params.toolAddress),
35
+ // {
36
+ // method: oProtocolMethods.HANDSHAKE,
37
+ // params: {
38
+ // intent: this.config.intent.value,
39
+ // },
40
+ // },
41
+ // );
42
+ // return response.result.data as oHandshakeResult;
43
+ // }
44
+ // async run(): Promise<oCapabilityResult> {
45
+ // // Check if we're in replay mode
46
+ // if (this.config.isReplay) {
47
+ // this.logger.debug(
48
+ // 'Configure capability is being replayed - re-executing to restore state',
49
+ // );
50
+ // }
51
+ // const handshake = await this.handshake();
52
+ // if (!handshake.result) {
53
+ // throw new oError(oErrorCodes.INVALID_RESPONSE, 'Handshake failed');
54
+ // }
55
+ // // this.logger.debug('Handshake: ', handshake.result);
56
+ // const { tools, methods } = handshake.result;
57
+ // const prompt = this.generatePrompt(tools, methods);
58
+ // const response = await this.intelligence(prompt);
59
+ // return response;
60
+ // }
61
+ // }
@@ -4,6 +4,7 @@ import { oCapabilityResult } from '../capabilities/o-capability.result.js';
4
4
  export declare class oCapabilityEvaluate extends oCapabilityIntelligence {
5
5
  static get type(): oCapabilityType;
6
6
  get type(): oCapabilityType;
7
+ loadPrompt(): Promise<string>;
7
8
  run(): Promise<oCapabilityResult>;
8
9
  }
9
10
  //# sourceMappingURL=o-capability.evaluate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"o-capability.evaluate.d.ts","sourceRoot":"","sources":["../../../src/capabilities-evaluate/o-capability.evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC9D,MAAM,KAAK,IAAI,oBAEd;IAED,IAAI,IAAI,oBAEP;IAEK,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAWxC"}
1
+ {"version":3,"file":"o-capability.evaluate.d.ts","sourceRoot":"","sources":["../../../src/capabilities-evaluate/o-capability.evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC9D,MAAM,KAAK,IAAI,oBAEd;IAED,IAAI,IAAI,oBAEP;IAEK,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAa7B,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAQxC"}
@@ -1,5 +1,4 @@
1
1
  import { oCapabilityIntelligence } from '../capabilities/o-capability.intelligence.js';
2
- import { AGENT_PROMPT } from '../prompts/agent.prompt.js';
3
2
  import { oCapabilityType } from '../capabilities/enums/o-capability.type-enum.js';
4
3
  export class oCapabilityEvaluate extends oCapabilityIntelligence {
5
4
  static get type() {
@@ -8,8 +7,24 @@ export class oCapabilityEvaluate extends oCapabilityIntelligence {
8
7
  get type() {
9
8
  return oCapabilityType.EVALUATE;
10
9
  }
10
+ async loadPrompt() {
11
+ const prompt = await this.promptLoader?.loadPromptForType(this.type, {
12
+ human_about: '',
13
+ agent_about: '',
14
+ context_global: `
15
+ Tools are hosted in a graph address space.
16
+ You are in a secure environment and are allowed to operate with secure information (api keys, credit card info, etc).`,
17
+ chat_history: '',
18
+ past_cycles: this.config?.history,
19
+ });
20
+ return prompt.render();
21
+ }
11
22
  async run() {
12
- const response = await this.intelligence(AGENT_PROMPT(this.config.intent.value, this.config.laneConfig.context?.toString() || '', this.config.history || '', this.config.laneConfig.extraInstructions || ''));
23
+ if (!this.config?.intent) {
24
+ throw new Error('Invalid intent passed');
25
+ }
26
+ const prompt = await this.loadPrompt();
27
+ const response = await this.intelligence(prompt);
13
28
  return response;
14
29
  }
15
30
  }
@@ -0,0 +1,13 @@
1
+ import { oCapabilityResult, oCapabilityType } from '../capabilities/index.js';
2
+ import { oCapabilityIntelligence } from '../capabilities/o-capability.intelligence.js';
3
+ import { oHandshakeResult } from '../interfaces/handshake.result.js';
4
+ import { oCapabilityExecuteConfig } from './interfaces/o-capability.configure-config.js';
5
+ export declare class oCapabilityExecute extends oCapabilityIntelligence {
6
+ config: oCapabilityExecuteConfig;
7
+ get type(): oCapabilityType;
8
+ static get type(): oCapabilityType;
9
+ loadPrompt({ tools, methods }: any): Promise<string>;
10
+ handshake(): Promise<oHandshakeResult>;
11
+ run(): Promise<oCapabilityResult>;
12
+ }
13
+ //# sourceMappingURL=execute.capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.capability.d.ts","sourceRoot":"","sources":["../../../src/capabilities-execute/execute.capability.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AAEzF,qBAAa,kBAAmB,SAAQ,uBAAuB;IACtD,MAAM,EAAG,wBAAwB,CAAC;IAEzC,IAAI,IAAI,IAAI,eAAe,CAE1B;IAED,MAAM,KAAK,IAAI,oBAEd;IAEK,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAepD,SAAS,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAatC,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAsGxC"}