@agentwares/agentguard 0.1.5 → 0.1.7
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/CHANGELOG.md +83 -0
- package/README.md +69 -19
- package/dist/cli.js +476 -65
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +2197 -1784
- package/dist/index.js.map +1 -1
- package/llms.txt +4 -0
- package/package.json +7 -2
- package/server.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ interface RuntimeOptions {
|
|
|
47
47
|
connectTimeoutMs?: number;
|
|
48
48
|
/** in-process upstreams for tests: name → already-connected client */
|
|
49
49
|
clients?: Record<string, Client>;
|
|
50
|
+
/**
|
|
51
|
+
* false when no policy file was found and the proxy runs on the default policy with no
|
|
52
|
+
* upstreams, serving only its own read-only tools (default true)
|
|
53
|
+
*/
|
|
54
|
+
configured?: boolean;
|
|
50
55
|
}
|
|
51
56
|
interface CallContext {
|
|
52
57
|
runId: string;
|
|
@@ -66,6 +71,7 @@ declare class ProxyRuntime {
|
|
|
66
71
|
readonly guard: Guard;
|
|
67
72
|
readonly agent: AgentScope | null | undefined;
|
|
68
73
|
readonly defaultRunId: string;
|
|
74
|
+
readonly configured: boolean;
|
|
69
75
|
readonly sessions: Set<DownstreamSession>;
|
|
70
76
|
private readonly connections;
|
|
71
77
|
private exposed;
|
|
@@ -205,6 +211,13 @@ declare class ProxyRuntime {
|
|
|
205
211
|
private wire;
|
|
206
212
|
private pickSession;
|
|
207
213
|
private broadcast;
|
|
214
|
+
/**
|
|
215
|
+
* Re-read an upstream's tools, every page (mcp-kit's `readAllPages`): at most 20 requests, each
|
|
216
|
+
* under the upstream's `timeout_ms`, ending at a cursor already followed. It used to follow
|
|
217
|
+
* `nextCursor` with no bound, so an upstream that echoed its cursor kept the proxy asking for
|
|
218
|
+
* the same page forever. A refresh that fails, or stops at the 20-page / 2,000-tool ceiling,
|
|
219
|
+
* changes nothing: the agent keeps the last good list, and the log says why.
|
|
220
|
+
*/
|
|
208
221
|
private refreshTools;
|
|
209
222
|
private rebuildExposed;
|
|
210
223
|
listTools(agent?: AgentScope | null): ExposedTool[];
|
|
@@ -325,7 +338,7 @@ declare function haltSlackMessage(event: GuardEvent): {
|
|
|
325
338
|
/** Returns a `Guard.onEvent` handler. Never throws; failures are logged. */
|
|
326
339
|
declare function createAlerter(opts: AlerterOptions): (event: GuardEvent) => Promise<void>;
|
|
327
340
|
|
|
328
|
-
type ClientKind = "claude-code-project" | "claude-code-user" | "claude-desktop" | "cursor-project" | "cursor-user" | "vscode" | "windsurf" | "generic";
|
|
341
|
+
type ClientKind = "claude-code-project" | "claude-code-user" | "claude-desktop" | "cursor-project" | "cursor-user" | "vscode" | "windsurf" | "gemini-project" | "gemini-user" | "generic";
|
|
329
342
|
interface ClientConfigFile {
|
|
330
343
|
kind: ClientKind;
|
|
331
344
|
label: string;
|
|
@@ -340,6 +353,8 @@ interface ServerEntry {
|
|
|
340
353
|
env?: Record<string, string>;
|
|
341
354
|
cwd?: string;
|
|
342
355
|
url?: string;
|
|
356
|
+
/** Gemini CLI's name for a Streamable HTTP endpoint (its `url` means SSE) */
|
|
357
|
+
httpUrl?: string;
|
|
343
358
|
headers?: Record<string, string>;
|
|
344
359
|
[k: string]: unknown;
|
|
345
360
|
}
|