@deepbounty/sdk 1.0.8 → 1.0.9

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ModuleSetting, TaskContent, Tool } from "./types";
1
+ import { ModuleSetting, TaskContent, TaskResult, Tool } from "./types";
2
2
  export interface Logger {
3
3
  info: (...args: any[]) => void;
4
4
  warn: (...args: any[]) => void;
@@ -47,9 +47,10 @@ export interface ServerAPI {
47
47
  * Register a scheduled task that runs at a specific interval
48
48
  * @param taskContent The task content including commands and required tools
49
49
  * @param interval Interval in seconds between task executions
50
+ * @param onComplete Optional callback executed when the task completes
50
51
  * @returns The ID of the registered scheduled task
51
52
  */
52
- registerScheduledTask(taskContent: TaskContent, interval: number): number;
53
+ registerScheduledTask(taskContent: TaskContent, interval: number, onComplete?: (result: TaskResult) => void): number;
53
54
  /**
54
55
  * Unregister a scheduled task
55
56
  * @param taskId The ID of the scheduled task to unregister
@@ -2,6 +2,7 @@ import { Tool } from "./tools";
2
2
  export interface TaskContent {
3
3
  commands: string[];
4
4
  requiredTools?: Tool[];
5
+ extractResult?: boolean;
5
6
  }
6
7
  export interface ScheduledTask {
7
8
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepbounty/sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "DeepBounty SDK for module development",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",