@codebolt/codeboltjs 5.0.5 → 5.0.7

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.
@@ -5,14 +5,18 @@
5
5
  import type { ToolInvocation, ToolResult } from '../types';
6
6
  import { BaseDeclarativeTool } from '../base-tool';
7
7
  export interface ThreadCreateBackgroundParams {
8
- /** Thread creation options */
9
- options: Record<string, any>;
10
8
  /** Optional group ID for the thread */
11
9
  groupId?: string;
10
+ title?: string;
11
+ task?: string;
12
+ description?: string;
13
+ userMessage?: string;
14
+ selectedAgent?: any;
15
+ isGrouped?: boolean;
12
16
  }
13
17
  export declare class ThreadCreateBackgroundTool extends BaseDeclarativeTool<ThreadCreateBackgroundParams, ToolResult> {
14
18
  static readonly Name: string;
15
19
  constructor();
16
- protected validateToolParamValues(params: ThreadCreateBackgroundParams): string | null;
20
+ protected validateToolParamValues(_params: ThreadCreateBackgroundParams): string | null;
17
21
  protected createInvocation(params: ThreadCreateBackgroundParams): ToolInvocation<ThreadCreateBackgroundParams, ToolResult>;
18
22
  }
@@ -18,9 +18,12 @@ class ThreadCreateBackgroundInvocation extends base_tool_1.BaseToolInvocation {
18
18
  async execute() {
19
19
  var _a;
20
20
  try {
21
- // Include groupId in options if provided
22
21
  const optionsWithGroup = {
23
- ...this.params.options,
22
+ title: this.params.title || this.params.task || 'Background Thread',
23
+ description: this.params.description || this.params.task || '',
24
+ userMessage: this.params.task || this.params.userMessage || '',
25
+ selectedAgent: { id: this.params.selectedAgent },
26
+ isGrouped: this.params.isGrouped,
24
27
  groupId: this.params.groupId,
25
28
  };
26
29
  const response = await thread_1.default.createThreadInBackground(optionsWithGroup);
@@ -67,23 +70,40 @@ class ThreadCreateBackgroundTool extends base_tool_1.BaseDeclarativeTool {
67
70
  constructor() {
68
71
  super(ThreadCreateBackgroundTool.Name, 'ThreadCreateBackground', 'Creates a thread in the background and resolves when the agent starts or fails.', types_1.Kind.Execute, {
69
72
  properties: {
70
- options: {
71
- description: 'Thread creation options object containing thread parameters.',
72
- type: 'object',
73
- },
74
73
  groupId: {
75
74
  description: 'Optional group ID for organizing threads.',
76
75
  type: 'string',
77
76
  },
77
+ title: {
78
+ description: 'Title of the background thread.',
79
+ type: 'string',
80
+ },
81
+ task: {
82
+ description: 'Task description related to the thread.',
83
+ type: 'string',
84
+ },
85
+ description: {
86
+ description: 'Description of the thread.',
87
+ type: 'string',
88
+ },
89
+ userMessage: {
90
+ description: 'The user message to start the thread with.',
91
+ type: 'string',
92
+ },
93
+ selectedAgent: {
94
+ description: 'The selected agent id get it from <workerAgent> tag ',
95
+ type: 'string',
96
+ },
97
+ isGrouped: {
98
+ description: 'Whether the thread belongs to a group.',
99
+ type: 'boolean',
100
+ },
78
101
  },
79
- required: ['options'],
102
+ required: ['task', 'selectedAgent'],
80
103
  type: 'object',
81
104
  });
82
105
  }
83
- validateToolParamValues(params) {
84
- if (!params.options || typeof params.options !== 'object') {
85
- return "'options' is required and must be an object";
86
- }
106
+ validateToolParamValues(_params) {
87
107
  return null;
88
108
  }
89
109
  createInvocation(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "5.0.5",
3
+ "version": "5.0.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -35,7 +35,7 @@
35
35
  "uuid": "^11.1.0",
36
36
  "ws": "^8.18.3",
37
37
  "yargs": "^17.7.2",
38
- "@codebolt/types": "1.0.28"
38
+ "@codebolt/types": "5.0.7"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/events": "^3.0.3",
@@ -49,8 +49,8 @@
49
49
  "jest-serial-runner": "^1.2.1",
50
50
  "ts-jest": "^29.1.2",
51
51
  "ts-loader": "^9.5.1",
52
- "typedoc": "^0.28.10",
53
- "typedoc-plugin-markdown": "^3.15.0",
52
+ "typedoc": "0.28.16",
53
+ "typedoc-plugin-markdown": "4.9.0",
54
54
  "typedoc-plugin-missing-exports": "^4.1.0",
55
55
  "typescript": "^5.4.5",
56
56
  "webpack": "^5.102.1",
@@ -67,6 +67,7 @@
67
67
  "build:webpack": "webpack",
68
68
  "build:all": "npm run build && npm run build:webpack",
69
69
  "build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
70
+ "build:docs:md": "node script/gen-docusaurus-types.js --clean",
70
71
  "build:jsondocs": "typedoc --plugin typedoc-plugin-missing-exports --json out.json --pretty",
71
72
  "test": "jest",
72
73
  "test:watch": "jest --watch",