agent-customs 1.2.0 → 1.2.1
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
|
@@ -62,8 +62,8 @@ Pick one of four ways. Each works with any site made with Cognizant's `agentify-
|
|
|
62
62
|
|
|
63
63
|
```html
|
|
64
64
|
<script type="module"
|
|
65
|
-
src="https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.
|
|
66
|
-
integrity="sha384-
|
|
65
|
+
src="https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.1/dist/agent-customs.js"
|
|
66
|
+
integrity="sha384-hC4Hh9VXrTjlL5BLNfD7d0Mlg3YmAcc6AiyURL4uTNY28bMQ4tO1ulRfnAXSCQiV"
|
|
67
67
|
crossorigin="anonymous"></script>
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -76,7 +76,7 @@ Pick one of four ways. Each works with any site made with Cognizant's `agentify-
|
|
|
76
76
|
```js
|
|
77
77
|
// At the top of site.js
|
|
78
78
|
import { installCustomsGuard }
|
|
79
|
-
from "https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.
|
|
79
|
+
from "https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.1/site/customs/guard.js";
|
|
80
80
|
|
|
81
81
|
// Right after boot()
|
|
82
82
|
installCustomsGuard(booted.engine, { strict: true });
|
|
@@ -173,16 +173,16 @@ Each way to add the guard, step by step. All of them work with any site built wi
|
|
|
173
173
|
**1. One line (easiest).** Paste this into your page, above your other `<script>` tags. The guard switches itself on when your assistant starts.
|
|
174
174
|
|
|
175
175
|
```html
|
|
176
|
-
<script type="module" src="https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.
|
|
176
|
+
<script type="module" src="https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.1/dist/agent-customs.js" integrity="sha384-hC4Hh9VXrTjlL5BLNfD7d0Mlg3YmAcc6AiyURL4uTNY28bMQ4tO1ulRfnAXSCQiV" crossorigin="anonymous"></script>
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
-
`integrity` is the file's fingerprint. If the file were ever changed, on the CDN or on the way, the browser would refuse to run it. The whole guard is in this one file ([`dist/agent-customs.js`](dist/agent-customs.js), built by `npm run bundle`), so the fingerprint covers all of it. `@v1.2.
|
|
179
|
+
`integrity` is the file's fingerprint. If the file were ever changed, on the CDN or on the way, the browser would refuse to run it. The whole guard is in this one file ([`dist/agent-customs.js`](dist/agent-customs.js), built by `npm run bundle`), so the fingerprint covers all of it. `@v1.2.1` is a fixed version; to update, take the new line from the next release. Above the other tags, the browser runs it before your page starts the assistant, and chats wait until the guard is on. If your page has a `Content-Security-Policy` with `script-src`, add `https://cdn.jsdelivr.net` to it.
|
|
180
180
|
|
|
181
181
|
**2. Two lines, with your own settings.** Load the guard from the same release and pass any of the *Guard options* below. A browser cannot check a fingerprint on an `import`, so for that use option 3 or 4.
|
|
182
182
|
|
|
183
183
|
```js
|
|
184
184
|
// At the top of site.js
|
|
185
|
-
import { installCustomsGuard } from "https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.
|
|
185
|
+
import { installCustomsGuard } from "https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v1.2.1/site/customs/guard.js";
|
|
186
186
|
|
|
187
187
|
// Right after the boot(...) call
|
|
188
188
|
installCustomsGuard(booted.engine, { strict: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-customs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Border control for the Open Agentic Web: inspect any agent network before it runs in your browser.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Monty Bagati (https://github.com/montbaga)",
|
package/site/desk.js
CHANGED
|
@@ -218,6 +218,7 @@ export class CustomsDesk {
|
|
|
218
218
|
|
|
219
219
|
remember(input, report) {
|
|
220
220
|
const key = normalize(report.target.url || input);
|
|
221
|
+
this.reports.delete(key);
|
|
221
222
|
this.reports.set(key, report);
|
|
222
223
|
this.aliases.set(normalize(input), key);
|
|
223
224
|
}
|
|
@@ -399,12 +400,31 @@ export class CustomsDesk {
|
|
|
399
400
|
this.emit("border");
|
|
400
401
|
}
|
|
401
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Compact summaries of every network inspected in this visit, newest first.
|
|
405
|
+
*/
|
|
406
|
+
inspectedReports(limit = 12) {
|
|
407
|
+
return [...this.reports.values()]
|
|
408
|
+
.reverse()
|
|
409
|
+
.slice(0, limit)
|
|
410
|
+
.map((r) => ({
|
|
411
|
+
url: r.target.url,
|
|
412
|
+
brand: r.identity.brand || "",
|
|
413
|
+
verdict: r.verdict.code,
|
|
414
|
+
stamp: r.verdict.stamp,
|
|
415
|
+
fingerprint: r.identity.short || "",
|
|
416
|
+
inspectedAt: r.inspectedAt,
|
|
417
|
+
agents: r.identity.agents || [],
|
|
418
|
+
}));
|
|
419
|
+
}
|
|
420
|
+
|
|
402
421
|
/**
|
|
403
422
|
* The desk's state for the read tool.
|
|
404
423
|
*/
|
|
405
424
|
state() {
|
|
406
425
|
return {
|
|
407
426
|
latestReport: this.latest ? compact(this.latest, 6) : null,
|
|
427
|
+
inspectedReports: this.inspectedReports(),
|
|
408
428
|
aiDoubleCheck: this.aiCheckState(),
|
|
409
429
|
approvedVersions: this.pins.list().map((p) => ({ url: p.url, brand: p.brand, fingerprint: p.short, verdictWhenApproved: p.verdict, approvedAt: p.pinnedAt, how: p.how })),
|
|
410
430
|
testRange: EXAMPLES.map((e) => ({ name: e.label, kind: e.note, networkUrl: e.url, page: e.page })),
|
package/site/receipts/index.json
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"issuer": "Agent Customs",
|
|
4
4
|
"site": "https://montbaga.github.io/agent-customs/",
|
|
5
5
|
"keyId": "-DC99sDa-qJjBp2N",
|
|
6
|
-
"signedAt": "2026-11-
|
|
6
|
+
"signedAt": "2026-11-23T16:56:15.994Z",
|
|
7
7
|
"receipts": [
|
|
8
8
|
{
|
|
9
9
|
"network": "https://montbaga.github.io/agent-customs/agent_customs",
|
|
10
10
|
"path": "montbaga.github.io/agent-customs/agent_customs.json",
|
|
11
11
|
"stamp": "Cleared",
|
|
12
12
|
"verdict": "CLEARED",
|
|
13
|
-
"fingerprint": "sha256:
|
|
14
|
-
"inspectedAt": "2026-11-
|
|
15
|
-
"expiresAt": "2026-12-
|
|
13
|
+
"fingerprint": "sha256:3c7633565f2e8078f7808645dc254ff6afa5c60e75f0b2f41c4d4e6720f75ab3",
|
|
14
|
+
"inspectedAt": "2026-11-23T16:56:15.994Z",
|
|
15
|
+
"expiresAt": "2026-12-28T16:56:15.994Z"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"network": "https://montbaga.github.io/agent-customs/practice/main_street_guide",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "agent-customs-receipt",
|
|
4
4
|
"version": 1,
|
|
5
5
|
"network": "https://montbaga.github.io/agent-customs/agent_customs",
|
|
6
|
-
"fingerprint": "sha256:
|
|
6
|
+
"fingerprint": "sha256:3c7633565f2e8078f7808645dc254ff6afa5c60e75f0b2f41c4d4e6720f75ab3",
|
|
7
7
|
"verdict": "CLEARED",
|
|
8
8
|
"stamp": "Cleared",
|
|
9
9
|
"summary": "No issues found. Pin the fingerprint so you notice if it changes.",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"passed": 16,
|
|
20
20
|
"total": 16
|
|
21
21
|
},
|
|
22
|
-
"inspectedAt": "2026-11-
|
|
23
|
-
"expiresAt": "2026-12-
|
|
22
|
+
"inspectedAt": "2026-11-23T16:56:15.994Z",
|
|
23
|
+
"expiresAt": "2026-12-28T16:56:15.994Z",
|
|
24
24
|
"inspector": {
|
|
25
25
|
"name": "Agent Customs",
|
|
26
26
|
"version": "1.0.0",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"signature": {
|
|
32
32
|
"alg": "ES256",
|
|
33
33
|
"keyId": "-DC99sDa-qJjBp2N",
|
|
34
|
-
"value": "
|
|
34
|
+
"value": "MI-m6Zzfg8DG4BqvkHglrsaE_tKMnZzVW5h69i3GsNMxP9a253uG7BdlqSDsF6mnqu-CDWxLBFeLdj7ra09pyg"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/tools/mcp-server.mjs
CHANGED
|
@@ -166,7 +166,7 @@ function resolveKnownSample(raw) {
|
|
|
166
166
|
|
|
167
167
|
function buildInstallSnippets() {
|
|
168
168
|
return {
|
|
169
|
-
oneLineScript: `<script type="module" src="https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v${PKG_VERSION}/dist/agent-customs.js" integrity="sha384-
|
|
169
|
+
oneLineScript: `<script type="module" src="https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v${PKG_VERSION}/dist/agent-customs.js" integrity="sha384-hC4Hh9VXrTjlL5BLNfD7d0Mlg3YmAcc6AiyURL4uTNY28bMQ4tO1ulRfnAXSCQiV" crossorigin="anonymous"></script>`,
|
|
170
170
|
twoLines: `import { installCustomsGuard } from "https://cdn.jsdelivr.net/gh/montbaga/agent-customs@v${PKG_VERSION}/site/customs/guard.js";\ninstallCustomsGuard(booted.engine, { strict: true });`,
|
|
171
171
|
npm: `npm install agent-customs\nimport { installCustomsGuard } from "agent-customs";\ninstallCustomsGuard(booted.engine);`,
|
|
172
172
|
cli: `npx agent-customs check https://your-site.example/\nnpx agent-customs check ./my-network --strict\nnpx agent-customs mcp`,
|
|
@@ -793,7 +793,7 @@ export function createAgentCustomsMcp(options = {}) {
|
|
|
793
793
|
{
|
|
794
794
|
name: "get_desk_state",
|
|
795
795
|
description:
|
|
796
|
-
"Read the Agent Customs desk state: latest inspection report, AI double-check status, saved approvals, built-in test-range examples, protocol samples, Attack Lab scenarios, border log, and benchmark metrics.",
|
|
796
|
+
"Read the Agent Customs desk state: latest inspection report, all networks inspected in this session, AI double-check status, saved approvals, built-in test-range examples, protocol samples, Attack Lab scenarios, border log, and benchmark metrics.",
|
|
797
797
|
inputSchema: { type: "object", additionalProperties: false, properties: {} },
|
|
798
798
|
async execute() {
|
|
799
799
|
const ai = refreshDeskAi();
|
|
@@ -806,6 +806,7 @@ export function createAgentCustomsMcp(options = {}) {
|
|
|
806
806
|
const rawPins = pins.all();
|
|
807
807
|
return {
|
|
808
808
|
latestReport: desk.latest ? compactReport(desk.latest, 6) : null,
|
|
809
|
+
inspectedReports: desk.inspectedReports(),
|
|
809
810
|
aiDoubleCheck: {
|
|
810
811
|
enabled: desk.aiCheckOn,
|
|
811
812
|
state: ai ? (desk.aiCheckOn ? "ready" : "off-configured") : desk.aiCheckOn ? "needs-key" : "off",
|