@deepbounty/sdk 1.2.6 → 1.2.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.
package/dist/index.d.ts CHANGED
@@ -235,12 +235,14 @@ export interface ServerAPI {
235
235
  * @param description Task description
236
236
  * @param taskContent The task content including commands and tools
237
237
  * @param interval Interval in seconds between task executions. For CUSTOM mode: if <= 0, no automatic scheduling (manual mode only)
238
+ * @param aggressive Whether the task is aggressive (only run on worker that allows aggressive tasks)
238
239
  * @param schedulingType How to schedule tasks: "TARGET_BASED" (one per target), "GLOBAL" (single instance), or "CUSTOM" (callback-based)
239
240
  * @param onComplete Optional callback executed when a task instance completes
240
241
  * @param onSchedule Optional callback for CUSTOM mode, invoked at interval to create instances (not called if interval <= 0)
242
+ * @param onManualTrigger Optional callback invoked when a task instance is manually triggered
241
243
  * @returns The ID of the registered task template
242
244
  */
243
- registerTaskTemplate(uniqueKey: string, name: string, description: string, taskContent: TaskContent, interval: number, schedulingType?: "TARGET_BASED" | "GLOBAL" | "CUSTOM", onComplete?: (result: TaskResult) => void, onSchedule?: (templateId: number) => void | Promise<void>): Promise<number>;
245
+ registerTaskTemplate(uniqueKey: string, name: string, description: string, taskContent: TaskContent, interval: number, aggressive: boolean, schedulingType?: "TARGET_BASED" | "GLOBAL" | "CUSTOM", onComplete?: (result: TaskResult) => void, onSchedule?: (templateId: number) => void | Promise<void>, onManualTrigger?: (templateId: number, targetId: number) => void | Promise<void>): Promise<number>;
244
246
  /**
245
247
  * Unregister a task template
246
248
  * @param templateId The ID of the task template to unregister
@@ -15,6 +15,7 @@ export interface TaskTemplate {
15
15
  interval: number;
16
16
  schedulingType: SchedulingType;
17
17
  active: boolean;
18
+ aggressive: boolean;
18
19
  }
19
20
  export interface ScheduledTask {
20
21
  id: number;
@@ -6,4 +6,5 @@ export interface Worker {
6
6
  currentTasks: TaskExecution[];
7
7
  availableTools: Tool[];
8
8
  connectedAt: Date;
9
+ aggressiveTasksEnabled: boolean;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepbounty/sdk",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "DeepBounty SDK for module development",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",