@agentwares/agentguard 0.1.0 → 0.1.2

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 CHANGED
@@ -40,7 +40,7 @@ agentguard is an MCP policy proxy for agents that touch production. It sits betw
40
40
 
41
41
  No LLM calls. No phone-home. No account. MIT.
42
42
 
43
- Two install paths, one policy engine: the **MCP proxy** (`npx @agentwares/agentguard`, stdio + Streamable HTTP, multiple upstreams) and the **SDK/middleware** ([`@agentwares/agentguard-sdk`](../../packages/agentguard-sdk)) for OpenAI Agents SDK, LangChain or plain-function tools that never go through MCP.
43
+ Two install paths, one policy engine: the **MCP proxy** (`npx @agentwares/agentguard`, stdio + Streamable HTTP, multiple upstreams) and the **SDK/middleware** ([`@agentwares/agentguard-sdk`](https://github.com/agentwares/agentguard/tree/main/packages/agentguard-sdk#readme)) for OpenAI Agents SDK, LangChain or plain-function tools that never go through MCP.
44
44
 
45
45
  ## Install
46
46
 
@@ -137,26 +137,26 @@ Run identity: `X-Run-Id` header (HTTP) → `_meta.runId` on the call → session
137
137
 
138
138
  ## Commands
139
139
 
140
- | Command | What it does |
141
- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
142
- | `agentguard init [--client path] [--all] [--no-probe] [--mode enforce] [--undo]` | generate the policy, rewrite the client config (project-level by default) |
143
- | `agentguard proxy [--http --port 8788] [--agent name] [--run-id id] [--mode m]` | run the proxy (stdio default) |
144
- | `agentguard report [--run id \| --all] [--json]` | what this run did / would have destroyed / spent; where it was halted; chain status |
145
- | `agentguard diff [--run id]` | mutation diff of faked writes |
146
- | `agentguard verify [audit.jsonl]` | recompute the hash chain; exit 1 on the first break |
147
- | `agentguard status [--run id]` | counters vs caps, kill state, pending approvals, running HTTP proxy |
148
- | `agentguard tools [--json]` | every exposed tool with class, verb, upstream and the reason |
149
- | `agentguard kill [reason]` / `agentguard resume` | halt everything now / clear it |
150
- | `agentguard approvals [--all]` / `approve <id>` / `deny <id> [--note …]` | the approval queue |
151
- | `agentguard key create <agent> [--allow p]… [--deny p] [--writes n] [--spend n] [--mode m]` / `key list` / `key revoke <agent>` | scoped credentials |
152
- | `agentguard permission-diff [--base ref] [--head ref] [--fail-on-widen]` | which config changes widen agent permissions (also a [GitHub Action](../../assets/permission-diff-action)) |
140
+ | Command | What it does |
141
+ | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
142
+ | `agentguard init [--client path] [--all] [--no-probe] [--mode enforce] [--undo]` | generate the policy, rewrite the client config (project-level by default) |
143
+ | `agentguard proxy [--http --port 8788] [--agent name] [--run-id id] [--mode m]` | run the proxy (stdio default) |
144
+ | `agentguard report [--run id \| --all] [--json]` | what this run did / would have destroyed / spent; where it was halted; chain status |
145
+ | `agentguard diff [--run id]` | mutation diff of faked writes |
146
+ | `agentguard verify [audit.jsonl]` | recompute the hash chain; exit 1 on the first break |
147
+ | `agentguard status [--run id]` | counters vs caps, kill state, pending approvals, running HTTP proxy |
148
+ | `agentguard tools [--json]` | every exposed tool with class, verb, upstream and the reason |
149
+ | `agentguard kill [reason]` / `agentguard resume` | halt everything now / clear it |
150
+ | `agentguard approvals [--all]` / `approve <id>` / `deny <id> [--note …]` | the approval queue |
151
+ | `agentguard key create <agent> [--allow p]… [--deny p] [--writes n] [--spend n] [--mode m]` / `key list` / `key revoke <agent>` | scoped credentials |
152
+ | `agentguard permission-diff [--base ref] [--head ref] [--fail-on-widen]` | which config changes widen agent permissions (also a [GitHub Action](https://github.com/agentwares/agentguard/tree/main/permission-diff)) |
153
153
 
154
154
  HTTP control endpoints (token in `.agentguard/http.json`): `GET /health`, `GET /status?run=`, `POST /kill`, `POST /resume`, `GET|POST /approve/:id`, `/deny/:id`, `GET /approvals`.
155
155
 
156
156
  ## Try it with the fixtures
157
157
 
158
158
  ```sh
159
- git clone https://github.com/agentwares/agentwares && cd agentwares && pnpm install && pnpm turbo build --filter=agentguard
159
+ git clone https://github.com/agentwares/agentguard && cd agentguard && pnpm install && pnpm build
160
160
  cd apps/agentguard-cli
161
161
  cat > agentguard.yaml <<'YAML'
162
162
  mode: dry-run
@@ -183,6 +183,6 @@ node dist/cli.js report && node dist/cli.js diff && node dist/cli.js verify
183
183
 
184
184
  ## Related
185
185
 
186
- - [`@agentwares/agentguard-sdk`](../../packages/agentguard-sdk) — the same engine for OpenAI Agents SDK / LangChain / plain functions, plus the guarded `fetch` for LLM spend.
187
- - [`@agentwares/agentguard-core`](../../packages/agentguard-core) — the Web-standard policy engine (bring your own stores).
188
- - [permission-diff GitHub Action](../../assets/permission-diff-action) — comments on PRs that widen `agentguard.yaml`, `.claude/settings.json` or `mcp.json`.
186
+ - [`@agentwares/agentguard-sdk`](https://github.com/agentwares/agentguard/tree/main/packages/agentguard-sdk#readme) — the same engine for OpenAI Agents SDK / LangChain / plain functions, plus the guarded `fetch` for LLM spend.
187
+ - [`@agentwares/agentguard-core`](https://github.com/agentwares/agentguard/tree/main/packages/agentguard-core#readme) — the Web-standard policy engine (bring your own stores).
188
+ - [permission-diff GitHub Action](https://github.com/agentwares/agentguard/tree/main/permission-diff) — comments on PRs that widen `agentguard.yaml`, `.claude/settings.json` or `mcp.json`.
package/dist/cli.js CHANGED
@@ -3489,7 +3489,7 @@ function renderStarterPolicy(opts) {
3489
3489
  const probeNotes = (opts.probeErrors ?? []).map((e) => `# ! ${e}`);
3490
3490
  const upstreamsYaml = opts.upstreams.length ? dump({ upstreams: opts.upstreams.map(cleanUpstream) }) : 'upstreams: []\n # - name: crm\n # url: https://mcp.example.com/mcp\n # auth: ${CRM_TOKEN}\n # - name: files\n # command: npx\n # args: [-y, "@modelcontextprotocol/server-filesystem", "."]';
3491
3491
  return `# agentguard.yaml \u2014 generated by \`agentguard init\` on ${date}
3492
- # Every knob is explained inline. Docs: https://github.com/agentwares/agentwares/tree/main/apps/agentguard-cli#policy
3492
+ # Every knob is explained inline. Docs: https://github.com/agentwares/agentguard/tree/main/apps/agentguard-cli#policy
3493
3493
  version: 1
3494
3494
 
3495
3495
  # dry-run: reads pass through; writes and spends are FAKED (plausible success, nothing executes)
@@ -4096,7 +4096,7 @@ var HELP = `agentguard \u2014 MCP policy proxy for agents that touch production
4096
4096
  agentguard permission-diff [--base ref] [--head ref] [--paths a,b] [--format markdown|json] [--fail-on-widen]
4097
4097
 
4098
4098
  Options: --config <agentguard.yaml> (or AGENTGUARD_CONFIG), --json, --help, --version
4099
- Docs: https://github.com/agentwares/agentwares/tree/main/apps/agentguard-cli`;
4099
+ Docs: https://github.com/agentwares/agentguard/tree/main/apps/agentguard-cli`;
4100
4100
  async function main(argv, io = defaultIo()) {
4101
4101
  const args = parseArgs(argv);
4102
4102
  if (args.flags.version) {