@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.
- package/README.md +7 -0
- package/dist/ag-ui/index.cjs +46 -10
- package/dist/ag-ui/index.cjs.map +1 -1
- package/dist/ag-ui/index.d.cts +9 -3
- package/dist/ag-ui/index.d.ts +9 -3
- package/dist/ag-ui/index.js +46 -10
- package/dist/ag-ui/index.js.map +1 -1
- package/dist/{catalog-CrzetM3_.d.cts → catalog-BKS3Yxo6.d.cts} +2 -0
- package/dist/{catalog-CrzetM3_.d.ts → catalog-BKS3Yxo6.d.ts} +2 -0
- package/dist/genui/builtins.cjs.map +1 -1
- package/dist/genui/builtins.d.cts +1 -1
- package/dist/genui/builtins.d.ts +1 -1
- package/dist/genui/builtins.js.map +1 -1
- package/dist/genui/index.cjs +660 -68
- package/dist/genui/index.cjs.map +1 -1
- package/dist/genui/index.d.cts +5 -5
- package/dist/genui/index.d.ts +5 -5
- package/dist/genui/index.js +654 -68
- package/dist/genui/index.js.map +1 -1
- package/dist/guardrails/index.cjs +3 -1
- package/dist/guardrails/index.cjs.map +1 -1
- package/dist/guardrails/index.d.cts +5 -4
- package/dist/guardrails/index.d.ts +5 -4
- package/dist/guardrails/index.js +3 -1
- package/dist/guardrails/index.js.map +1 -1
- package/dist/index.cjs +1161 -421
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -13
- package/dist/index.d.ts +118 -13
- package/dist/index.js +1153 -421
- package/dist/index.js.map +1 -1
- package/dist/{processors-B7nfbU6E.d.cts → processors-BXM-MNga.d.cts} +1 -1
- package/dist/{processors-BR3nICcp.d.ts → processors-ByDr5POu.d.ts} +1 -1
- package/dist/{stream-events-DAmes2Of.d.ts → stream-events-BGKLD6RX.d.ts} +73 -4
- package/dist/{stream-events-M0jc7lSW.d.cts → stream-events-CF-6-Y6L.d.cts} +73 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as InputProcessor, O as OutputProcessor } from '../processors-
|
|
2
|
-
import { a as Actor, b as ToolHandler } from '../stream-events-
|
|
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-
|
|
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
|
|
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-
|
|
2
|
-
import { a as Actor, b as ToolHandler } from '../stream-events-
|
|
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-
|
|
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
|
|
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;
|
package/dist/guardrails/index.js
CHANGED
|
@@ -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
|
|
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 = {
|