@deepbounty/sdk 1.2.6 → 1.2.8
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/README.md +15 -15
- package/dist/events.d.ts +5 -0
- package/dist/index.d.ts +3 -1
- package/dist/types/targets.d.ts +1 -0
- package/dist/types/tasks.d.ts +1 -0
- package/dist/types/workers.d.ts +1 -0
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# DeepBounty SDK
|
|
2
|
-
|
|
3
|
-
The official SDK for developing modules for the DeepBounty project.
|
|
4
|
-
|
|
5
|
-
## 📦 Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @deepbounty/sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 📤 Publish
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm publish --access public
|
|
15
|
-
```
|
|
1
|
+
# DeepBounty SDK
|
|
2
|
+
|
|
3
|
+
The official SDK for developing modules for the DeepBounty project.
|
|
4
|
+
|
|
5
|
+
## 📦 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @deepbounty/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 📤 Publish
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm publish --access public
|
|
15
|
+
```
|
package/dist/events.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ export interface CoreEvents {
|
|
|
32
32
|
"target:created": Target;
|
|
33
33
|
"target:updated": Target;
|
|
34
34
|
"target:deleted": Target;
|
|
35
|
+
"target:scopeChanged": {
|
|
36
|
+
subdomains: string[];
|
|
37
|
+
outOfScopeSubdomains: string[];
|
|
38
|
+
targetId: number;
|
|
39
|
+
};
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
37
42
|
* Event handler function signature
|
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
|
package/dist/types/targets.d.ts
CHANGED
package/dist/types/tasks.d.ts
CHANGED
package/dist/types/workers.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@deepbounty/sdk",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "DeepBounty SDK for module development",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"require": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./types": {
|
|
14
|
-
"types": "./dist/types/index.d.ts"
|
|
15
|
-
},
|
|
16
|
-
"./types/*": {
|
|
17
|
-
"types": "./dist/types/*.d.ts"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist",
|
|
22
|
-
"README.md",
|
|
23
|
-
"LICENSE"
|
|
24
|
-
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsc",
|
|
27
|
-
"prepublishOnly": "npm run build"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"deepbounty",
|
|
31
|
-
"sdk",
|
|
32
|
-
"types",
|
|
33
|
-
"module",
|
|
34
|
-
"plugin"
|
|
35
|
-
],
|
|
36
|
-
"author": "dd_06",
|
|
37
|
-
"license": "GPL-3.0-only",
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "https://github.com/dd060606/DeepBounty.git",
|
|
41
|
-
"directory": "sdk"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://github.com/dd060606/DeepBounty#readme",
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://github.com/dd060606/DeepBounty/issues"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"typescript": "^5.9.2"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepbounty/sdk",
|
|
3
|
+
"version": "1.2.8",
|
|
4
|
+
"description": "DeepBounty SDK for module development",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./types": {
|
|
14
|
+
"types": "./dist/types/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./types/*": {
|
|
17
|
+
"types": "./dist/types/*.d.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"deepbounty",
|
|
31
|
+
"sdk",
|
|
32
|
+
"types",
|
|
33
|
+
"module",
|
|
34
|
+
"plugin"
|
|
35
|
+
],
|
|
36
|
+
"author": "dd_06",
|
|
37
|
+
"license": "GPL-3.0-only",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/dd060606/DeepBounty.git",
|
|
41
|
+
"directory": "sdk"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/dd060606/DeepBounty#readme",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/dd060606/DeepBounty/issues"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"typescript": "^5.9.2"
|
|
49
|
+
}
|
|
50
|
+
}
|