fullcourtdefense 1.0.4 → 1.0.5

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/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentRegistrationInput, AgentSecurityApiResult, AgentToolCallCheckResult, AgentToolCallInput, FullCourtDefenseConfig, McpScanResult, McpToolResult, ProtectMcpToolResponseOptions, RagScanResult, ScanMetadata, ScanResult, ShieldResult } from './types';
1
+ import { AgentRegistrationInput, AgentContextSecurityInput, AgentContextSecurityResult, AgentSecurityApiResult, AgentToolCallCheckResult, AgentToolCallInput, FullCourtDefenseConfig, McpScanResult, McpToolResult, ProtectMcpToolResponseOptions, RagScanResult, ScanMetadata, ScanResult, ShieldResult } from './types';
2
2
  export declare class FullCourtDefense {
3
3
  private config;
4
4
  chat: ChatNamespace;
@@ -20,6 +20,12 @@ export declare class FullCourtDefense {
20
20
  operation?: string;
21
21
  resourceType?: string;
22
22
  toolArgs?: Record<string, unknown>;
23
+ chainId?: string;
24
+ parentActionId?: string;
25
+ handoffFromAgent?: string;
26
+ handoffToAgent?: string;
27
+ userRole?: string;
28
+ authority?: string;
23
29
  metadata?: ScanMetadata;
24
30
  }): Promise<McpScanResult>;
25
31
  protectMcpToolResponse(options: ProtectMcpToolResponseOptions): Promise<McpToolResult>;
@@ -29,6 +35,7 @@ export declare class FullCourtDefense {
29
35
  registerAgent(input: AgentRegistrationInput): Promise<AgentSecurityApiResult>;
30
36
  recordToolCall(input: AgentToolCallInput): Promise<AgentSecurityApiResult>;
31
37
  checkToolCall(input: AgentToolCallInput): Promise<AgentSecurityApiResult<AgentToolCallCheckResult>>;
38
+ checkContext(input: AgentContextSecurityInput): Promise<AgentSecurityApiResult<AgentContextSecurityResult>>;
32
39
  guardToolCall<T>(input: AgentToolCallInput, action: () => Promise<T>): Promise<T>;
33
40
  private _postAgentSecurity;
34
41
  }
package/dist/client.js CHANGED
@@ -164,6 +164,12 @@ class FullCourtDefense {
164
164
  operation: options?.operation,
165
165
  resourceType: options?.resourceType,
166
166
  toolArgs: options?.toolArgs,
167
+ chainId: options?.chainId,
168
+ parentActionId: options?.parentActionId,
169
+ handoffFromAgent: options?.handoffFromAgent,
170
+ handoffToAgent: options?.handoffToAgent,
171
+ userRole: options?.userRole,
172
+ authority: options?.authority,
167
173
  }),
168
174
  signal: AbortSignal.timeout(this.config.timeout),
169
175
  });
@@ -212,6 +218,12 @@ class FullCourtDefense {
212
218
  operation: options.operation,
213
219
  resourceType: options.resourceType,
214
220
  toolArgs: options.toolArgs,
221
+ chainId: options.chainId,
222
+ parentActionId: options.parentActionId,
223
+ handoffFromAgent: options.handoffFromAgent,
224
+ handoffToAgent: options.handoffToAgent,
225
+ userRole: options.userRole,
226
+ authority: options.authority,
215
227
  metadata: options.metadata,
216
228
  });
217
229
  if (scan.blocked) {
@@ -270,6 +282,9 @@ class FullCourtDefense {
270
282
  async checkToolCall(input) {
271
283
  return this._postAgentSecurity('/api/agent-security/runtime/check-tool-call', input);
272
284
  }
285
+ async checkContext(input) {
286
+ return this._postAgentSecurity('/api/agent-security/runtime/check-context', input);
287
+ }
273
288
  async guardToolCall(input, action) {
274
289
  const preflight = await this.checkToolCall(input);
275
290
  if (!preflight.success) {
package/dist/types.d.ts CHANGED
@@ -93,6 +93,12 @@ export interface ProtectMcpToolResponseOptions {
93
93
  operation?: string;
94
94
  resourceType?: string;
95
95
  toolArgs?: Record<string, unknown>;
96
+ chainId?: string;
97
+ parentActionId?: string;
98
+ handoffFromAgent?: string;
99
+ handoffToAgent?: string;
100
+ userRole?: string;
101
+ authority?: string;
96
102
  metadata?: ScanMetadata;
97
103
  callTool: () => Promise<unknown>;
98
104
  resultToText?: (result: unknown) => string;
@@ -135,6 +141,12 @@ export interface AgentToolCallInput {
135
141
  argsSummary?: Record<string, unknown>;
136
142
  toolArgs?: Record<string, unknown>;
137
143
  environment?: string;
144
+ chainId?: string;
145
+ parentActionId?: string;
146
+ handoffFromAgent?: string;
147
+ handoffToAgent?: string;
148
+ userRole?: string;
149
+ authority?: string;
138
150
  }
139
151
  export interface AgentSecurityActionPolicyResult {
140
152
  allowed?: boolean;
@@ -157,3 +169,18 @@ export interface AgentToolCallCheckResult {
157
169
  context?: Record<string, string>;
158
170
  actionPolicy?: AgentSecurityActionPolicyResult;
159
171
  }
172
+ export interface AgentContextSecurityInput {
173
+ agentName?: string;
174
+ sourceType?: 'mcp' | 'rag' | 'tool_output' | 'web' | 'unknown';
175
+ sourceName?: string;
176
+ content: string;
177
+ destination?: string;
178
+ }
179
+ export interface AgentContextSecurityResult {
180
+ allowed: boolean;
181
+ decision: AgentSecurityDecision;
182
+ riskLevel: 'critical' | 'high' | 'medium' | 'low';
183
+ signals: string[];
184
+ provenance: string;
185
+ recommendation: string;
186
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullcourtdefense",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Full Court Defense — real-time AI firewall and CLI scanner for chatbots, agents and RAG pipelines. Tool-call guards for MCP, LangChain, LlamaIndex, AutoGen, CrewAI and Semantic Kernel.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",