@prbe.ai/electron-sdk 0.1.7 → 0.1.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/dist/index.d.mts CHANGED
@@ -21,7 +21,9 @@ declare class PRBEToolRegistry {
21
21
  declare class PRBEClosureTool implements PRBETool {
22
22
  readonly declaration: PRBEToolDeclaration;
23
23
  private readonly handler;
24
- constructor(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>);
24
+ constructor(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>, options?: {
25
+ interactive?: boolean;
26
+ });
25
27
  execute(args: Record<string, unknown>): Promise<string>;
26
28
  }
27
29
  /**
@@ -167,7 +169,9 @@ declare class PRBEAgent implements PRBEInteractionRequester {
167
169
  /**
168
170
  * Register a custom tool that the middleware can invoke during investigations.
169
171
  */
170
- registerTool(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>): void;
172
+ registerTool(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>, options?: {
173
+ interactive?: boolean;
174
+ }): void;
171
175
  /**
172
176
  * User-initiated investigation. Updates `state` events/report directly.
173
177
  */
package/dist/index.d.ts CHANGED
@@ -21,7 +21,9 @@ declare class PRBEToolRegistry {
21
21
  declare class PRBEClosureTool implements PRBETool {
22
22
  readonly declaration: PRBEToolDeclaration;
23
23
  private readonly handler;
24
- constructor(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>);
24
+ constructor(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>, options?: {
25
+ interactive?: boolean;
26
+ });
25
27
  execute(args: Record<string, unknown>): Promise<string>;
26
28
  }
27
29
  /**
@@ -167,7 +169,9 @@ declare class PRBEAgent implements PRBEInteractionRequester {
167
169
  /**
168
170
  * Register a custom tool that the middleware can invoke during investigations.
169
171
  */
170
- registerTool(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>): void;
172
+ registerTool(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>, options?: {
173
+ interactive?: boolean;
174
+ }): void;
171
175
  /**
172
176
  * User-initiated investigation. Updates `state` events/report directly.
173
177
  */
package/dist/index.js CHANGED
@@ -469,8 +469,13 @@ var PRBEToolRegistry = class {
469
469
  var PRBEClosureTool = class {
470
470
  declaration;
471
471
  handler;
472
- constructor(name, description, parameters, handler) {
473
- this.declaration = { name, description, parameters };
472
+ constructor(name, description, parameters, handler, options) {
473
+ this.declaration = {
474
+ name,
475
+ description,
476
+ parameters,
477
+ ...options?.interactive ? { interactive: true } : {}
478
+ };
474
479
  this.handler = handler;
475
480
  }
476
481
  async execute(args) {
@@ -1978,9 +1983,9 @@ var PRBEAgent = class _PRBEAgent {
1978
1983
  /**
1979
1984
  * Register a custom tool that the middleware can invoke during investigations.
1980
1985
  */
1981
- registerTool(name, description, parameters, handler) {
1986
+ registerTool(name, description, parameters, handler, options) {
1982
1987
  this.registry.register(
1983
- new PRBEClosureTool(name, description, parameters, handler)
1988
+ new PRBEClosureTool(name, description, parameters, handler, options)
1984
1989
  );
1985
1990
  }
1986
1991
  /**