@dudousxd/nestjs-agent-core 0.40.0 → 0.41.0

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 (36) hide show
  1. package/README.md +7 -0
  2. package/dist/ag-ui/index.cjs +46 -10
  3. package/dist/ag-ui/index.cjs.map +1 -1
  4. package/dist/ag-ui/index.d.cts +9 -3
  5. package/dist/ag-ui/index.d.ts +9 -3
  6. package/dist/ag-ui/index.js +46 -10
  7. package/dist/ag-ui/index.js.map +1 -1
  8. package/dist/{catalog-CrzetM3_.d.cts → catalog-BKS3Yxo6.d.cts} +2 -0
  9. package/dist/{catalog-CrzetM3_.d.ts → catalog-BKS3Yxo6.d.ts} +2 -0
  10. package/dist/genui/builtins.cjs.map +1 -1
  11. package/dist/genui/builtins.d.cts +1 -1
  12. package/dist/genui/builtins.d.ts +1 -1
  13. package/dist/genui/builtins.js.map +1 -1
  14. package/dist/genui/index.cjs +660 -68
  15. package/dist/genui/index.cjs.map +1 -1
  16. package/dist/genui/index.d.cts +5 -5
  17. package/dist/genui/index.d.ts +5 -5
  18. package/dist/genui/index.js +654 -68
  19. package/dist/genui/index.js.map +1 -1
  20. package/dist/guardrails/index.cjs +3 -1
  21. package/dist/guardrails/index.cjs.map +1 -1
  22. package/dist/guardrails/index.d.cts +5 -4
  23. package/dist/guardrails/index.d.ts +5 -4
  24. package/dist/guardrails/index.js +3 -1
  25. package/dist/guardrails/index.js.map +1 -1
  26. package/dist/index.cjs +1161 -421
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +118 -13
  29. package/dist/index.d.ts +118 -13
  30. package/dist/index.js +1153 -421
  31. package/dist/index.js.map +1 -1
  32. package/dist/{processors-B7nfbU6E.d.cts → processors-BXM-MNga.d.cts} +1 -1
  33. package/dist/{processors-BR3nICcp.d.ts → processors-ByDr5POu.d.ts} +1 -1
  34. package/dist/{stream-events-DAmes2Of.d.ts → stream-events-BGKLD6RX.d.ts} +73 -4
  35. package/dist/{stream-events-M0jc7lSW.d.cts → stream-events-CF-6-Y6L.d.cts} +73 -4
  36. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { I as InputProcessor, O as OutputProcessor } from '../processors-B7nfbU6E.cjs';
2
- import { a as Actor, b as ToolHandler } from '../stream-events-M0jc7lSW.cjs';
1
+ import { I as InputProcessor, O as OutputProcessor } from '../processors-BXM-MNga.cjs';
2
+ import { a as Actor, b as ToolHandler } from '../stream-events-CF-6-Y6L.cjs';
3
3
  import '@standard-schema/spec';
4
- import '../catalog-CrzetM3_.cjs';
4
+ import '../catalog-BKS3Yxo6.cjs';
5
5
 
6
6
  /**
7
7
  * Guardrails: detectors that look at text on its way to or from a model — prompts, answers, tool
@@ -625,7 +625,8 @@ declare class Guardrails {
625
625
  /**
626
626
  * Screens one tool definition (name, title, description, and every description in its input
627
627
  * schema) for hidden instructions. `allowed: false` means a `block`/`approve` rule fired — leave
628
- * the tool out of the catalog. Shaped to be handed straight to an MCP importer's screen hook.
628
+ * the tool out of the catalog. Shaped — and bound — to be handed straight to an MCP importer's
629
+ * screen hook: `screen: guardrails.screenTool`.
629
630
  */
630
631
  screenTool(tool: ToolDefinitionText & {
631
632
  server?: string;
@@ -1,7 +1,7 @@
1
- import { I as InputProcessor, O as OutputProcessor } from '../processors-BR3nICcp.js';
2
- import { a as Actor, b as ToolHandler } from '../stream-events-DAmes2Of.js';
1
+ import { I as InputProcessor, O as OutputProcessor } from '../processors-ByDr5POu.js';
2
+ import { a as Actor, b as ToolHandler } from '../stream-events-BGKLD6RX.js';
3
3
  import '@standard-schema/spec';
4
- import '../catalog-CrzetM3_.js';
4
+ import '../catalog-BKS3Yxo6.js';
5
5
 
6
6
  /**
7
7
  * Guardrails: detectors that look at text on its way to or from a model — prompts, answers, tool
@@ -625,7 +625,8 @@ declare class Guardrails {
625
625
  /**
626
626
  * Screens one tool definition (name, title, description, and every description in its input
627
627
  * schema) for hidden instructions. `allowed: false` means a `block`/`approve` rule fired — leave
628
- * the tool out of the catalog. Shaped to be handed straight to an MCP importer's screen hook.
628
+ * the tool out of the catalog. Shaped — and bound — to be handed straight to an MCP importer's
629
+ * screen hook: `screen: guardrails.screenTool`.
629
630
  */
630
631
  screenTool(tool: ToolDefinitionText & {
631
632
  server?: string;
@@ -2095,6 +2095,7 @@ var Guardrails = class {
2095
2095
  this.options = options;
2096
2096
  this.shorthand = shorthandRules(options);
2097
2097
  this.vaults = options.vaults ?? new InMemoryVaultStore();
2098
+ this.screenTool = this.screenTool.bind(this);
2098
2099
  const name = options.name ?? "guardrails";
2099
2100
  this.input = {
2100
2101
  name,
@@ -2140,7 +2141,8 @@ var Guardrails = class {
2140
2141
  /**
2141
2142
  * Screens one tool definition (name, title, description, and every description in its input
2142
2143
  * schema) for hidden instructions. `allowed: false` means a `block`/`approve` rule fired — leave
2143
- * the tool out of the catalog. Shaped to be handed straight to an MCP importer's screen hook.
2144
+ * the tool out of the catalog. Shaped — and bound — to be handed straight to an MCP importer's
2145
+ * screen hook: `screen: guardrails.screenTool`.
2144
2146
  */
2145
2147
  async screenTool(tool) {
2146
2148
  const ctx = {