@deepbounty/sdk 1.0.7 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +9 -9
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ModuleSetting, TaskContent } from "./types";
1
+ import { ModuleSetting, TaskContent, Tool } from "./types";
2
2
  export interface Logger {
3
3
  info: (...args: any[]) => void;
4
4
  warn: (...args: any[]) => void;
@@ -39,7 +39,10 @@ export interface ConfigAPI {
39
39
  */
40
40
  getAllSettings(): Promise<ModuleSetting[]>;
41
41
  }
42
- export interface TasksAPI {
42
+ export interface ServerAPI {
43
+ version: string;
44
+ logger: Logger;
45
+ config: ConfigAPI;
43
46
  /**
44
47
  * Register a scheduled task that runs at a specific interval
45
48
  * @param taskContent The task content including commands and required tools
@@ -53,13 +56,10 @@ export interface TasksAPI {
53
56
  * @returns true if the task was unregistered, false if it didn't exist
54
57
  */
55
58
  unregisterScheduledTask(taskId: number): boolean;
56
- getModuleTasks(): any[];
57
- }
58
- export interface ServerAPI {
59
- version: string;
60
- logger: Logger;
61
- config: ConfigAPI;
62
- tasks: TasksAPI;
59
+ /** Register a tool
60
+ * @param tool The tool to register
61
+ */
62
+ registerTool(tool: Tool): void;
63
63
  }
64
64
  export interface PluginLifecycle {
65
65
  run?(api: ServerAPI): Promise<void> | void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepbounty/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "DeepBounty SDK for module development",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",