agentface 0.10.0 → 0.10.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/dist/agentface.mjs +9 -10
- package/package.json +1 -1
package/dist/agentface.mjs
CHANGED
|
@@ -45175,7 +45175,7 @@ function headEnd(html) {
|
|
|
45175
45175
|
// cli/package.json
|
|
45176
45176
|
var package_default = {
|
|
45177
45177
|
name: "agentface",
|
|
45178
|
-
version: "0.10.
|
|
45178
|
+
version: "0.10.1",
|
|
45179
45179
|
description: "Add the Agentface tag to a website's pages, so AI agents get tools made for it, and use your agentface account from a shell.",
|
|
45180
45180
|
repository: {
|
|
45181
45181
|
type: "git",
|
|
@@ -58008,7 +58008,7 @@ function blockedBy(policies, load) {
|
|
|
58008
58008
|
if (scripts) {
|
|
58009
58009
|
const sources = policy.directives.get(scripts);
|
|
58010
58010
|
const dynamic = keyword(sources, "'strict-dynamic'");
|
|
58011
|
-
const allowed = load.nonce && hasNonce(sources, load.nonce) ||
|
|
58011
|
+
const allowed = load.nonce && hasNonce(sources, load.nonce) || !dynamic && sources.some((source) => sourceMatches(source, script2, page2));
|
|
58012
58012
|
if (!allowed) {
|
|
58013
58013
|
result2.script = true;
|
|
58014
58014
|
if (dynamic) result2.nonce = { directive: scripts, named: sources.some((s) => /^'nonce-/i.test(s)) };
|
|
@@ -58086,7 +58086,7 @@ function liveNonce(html, id) {
|
|
|
58086
58086
|
}
|
|
58087
58087
|
return void 0;
|
|
58088
58088
|
}
|
|
58089
|
-
function tagBlocked(homepage, site
|
|
58089
|
+
function tagBlocked(homepage, site) {
|
|
58090
58090
|
const src = site.tag.match(/\bsrc="([^"]+)"/)?.[1];
|
|
58091
58091
|
if ("unread" in homepage || !homepage.policies.length || !src) return null;
|
|
58092
58092
|
const nonce = liveNonce(homepage.html, site.id);
|
|
@@ -58094,8 +58094,7 @@ function tagBlocked(homepage, site, { added = false } = {}) {
|
|
|
58094
58094
|
page: homepage.url,
|
|
58095
58095
|
script: src,
|
|
58096
58096
|
events: new URL("/e", src).href,
|
|
58097
|
-
nonce
|
|
58098
|
-
added: nonce === void 0 && added
|
|
58097
|
+
nonce
|
|
58099
58098
|
});
|
|
58100
58099
|
return blocked.length ? advice(blocked, new URL(src).origin) : null;
|
|
58101
58100
|
}
|
|
@@ -58785,7 +58784,7 @@ function nextSteps(site, service, own2) {
|
|
|
58785
58784
|
return site.expiresAt ? `Then run \`${check2}\` here: once ${site.origin}'s homepage has the tag, that confirms the site is yours. Agentface also confirms it by itself when the site's first events arrive, but a quiet site may send none in time: until it's confirmed, Agentface deletes ${site.id} at ${when(site.expiresAt)}. If that happens first, run \`npx agentface init\` again.` : `Then \`${check2}\` shows whether ${site.origin}'s homepage has the tag.`;
|
|
58786
58785
|
if (saved)
|
|
58787
58786
|
return site.expiresAt ? `Then run \`${check2}\`: once ${site.origin}'s homepage has the tag, that confirms the site is yours. Agentface also confirms it by itself when the site's first events arrive, but a quiet site may send none in time: until it's confirmed, Agentface deletes ${site.id} at ${when(site.expiresAt)}. To see these steps again without registering the site another time, run \`npx agentface init ${site.id}${serviceFlag(service)}\`.` : `Then \`${check2}\` shows whether ${site.origin}'s homepage has the tag.`;
|
|
58788
|
-
return site.expiresAt ? `Deploy it as usual, then run \`${check2}\` here: once ${site.origin}'s homepage has the tag,
|
|
58787
|
+
return site.expiresAt ? `Deploy it as usual, then run \`${check2}\` here: once ${site.origin}'s homepage has the tag, that confirms the site is yours. Agentface also confirms it by itself when the site's first events arrive, but a quiet site may send none in time: until it's confirmed, Agentface deletes ${site.id} at ${when(site.expiresAt)}. If that happens first, run \`npx agentface init\` again.` : `Deploy it as usual. \`${check2}\` shows whether ${site.origin}'s homepage has the tag.`;
|
|
58789
58788
|
}
|
|
58790
58789
|
function policyWarning(site, advice2) {
|
|
58791
58790
|
return advice2 ? `${site.origin}'s Content Security Policy, the list of hosts its pages may use, doesn't let them ${advice2.effect}. ${advice2.fixes}` : null;
|
|
@@ -58806,8 +58805,8 @@ ${warning ? `**Content Security Policy.** ${markdown(warning)}
|
|
|
58806
58805
|
**Uninstall.** ${update ? `Run \`npx agentface uninstall\`, or delete ${lines}. Reverting this pull request doesn't uninstall: it puts the earlier ${site.notice ? "lines" : "line"} back, and the tag stays.` : `Revert this pull request, or delete ${lines}.`}
|
|
58807
58806
|
`;
|
|
58808
58807
|
}
|
|
58809
|
-
var
|
|
58810
|
-
var
|
|
58808
|
+
var LOAD_WHY = "Why: once loaded, the line registers the site's tools for AI agents, and ask_site when the site has it. AI agents never click a cookie banner, so a line held until someone accepts analytics or marketing cookies never loads, and agent visits get no tools. It sets no cookies and writes nothing to local storage. In first-party session storage, cleared when the tab closes, it keeps a random id for the tab (agentface:sid), the number of the visit's next step (agentface:n), the visit's last steps until an AI agent first uses a tool (agentface:steps), and a note that a tool was used (agentface:tool). If session storage is blocked, these are held only in the page's memory and each page counts as a visit of its own. It sends anonymous page-load and tool-use counts under that tab id, with the page's path but not its query string, and the visit's category, which is worked out in the browser. Each page a visit opens is sent as it opens, by its path and the time, so the site owner can compare people's visits with agents'; agentface adds the country and keeps no page title, user agent or lasting id with it. The rest of a visit's steps (clicks, typed fields, questions asked) are sent only for a visit in which an AI agent uses a tool. Of a person's visit, what was clicked and which fields were filled, never what with, is sent only once Google Consent Mode reports analytics_storage as granted. Passwords, payment details, one-time codes and chosen files are never sent: such a field is sent only as hidden. The visitor's IP address is not stored. No sample of the browser's request is kept until Google Consent Mode reports analytics_storage as granted, never while it is denied or unknown, and not on a site with no consent manager. A visitor whose name is marked -User (for example ChatGPT-User) is a classic assistant when they run this line. A crawler that downloads the line's script without running it, fetches the site's tool list or leaves a message, such as GPTBot or ChatGPT-User, is counted as a crawler visit in its own bucket, by the name it sends, with no visit steps. A question a crawler sends to the site's ask address without running the line is kept as a crawler visit with the question, the answer, who asked and when, for 30 days like every question, so the site owner sees every question asked of the site. There is no lasting visitor id today. If one is added, it will be written only once Google Consent Mode reports analytics_storage as granted, never while it is denied or unknown. On these facts it is reasonable to class the line as functional or necessary. The site's consent banner, privacy notice and lawful basis stay the site owner's call. This is information, not legal advice. Everything the line stores and agentface receives: https://agentface.com/docs/snippet-storage";
|
|
58809
|
+
var LOAD_HOW = `Load the line on every page as a functional (or necessary) script. Don't wait for cookie consent, and don't put it in a consent-gated analytics or marketing category. ${LOAD_WHY}`;
|
|
58811
58810
|
var these = (files2) => files2.length === 1 ? "this file" : "these files";
|
|
58812
58811
|
function noticeByHand(site, noticed, log) {
|
|
58813
58812
|
if (site.notice && !noticed.some(({ key }) => key === site.id))
|
|
@@ -58881,7 +58880,7 @@ function byHand2({ manual, tagged, noticed }, site, service, dryRun, warning, lo
|
|
|
58881
58880
|
${site.tag}
|
|
58882
58881
|
`
|
|
58883
58882
|
);
|
|
58884
|
-
if (!old.length) log(
|
|
58883
|
+
if (!old.length) log(LOAD_HOW);
|
|
58885
58884
|
noticeByHand(site, noticed, log);
|
|
58886
58885
|
if (warning) log(warning);
|
|
58887
58886
|
log(nextSteps(site, service));
|
|
@@ -59161,7 +59160,7 @@ async function check({
|
|
|
59161
59160
|
);
|
|
59162
59161
|
return 1;
|
|
59163
59162
|
}
|
|
59164
|
-
const advice2 = tagBlocked(homepage, site
|
|
59163
|
+
const advice2 = tagBlocked(homepage, site);
|
|
59165
59164
|
if (result2.ok && advice2) {
|
|
59166
59165
|
log(
|
|
59167
59166
|
`Blocked: ${site.origin}'s homepage has the tag for ${id}, but the site's Content Security Policy, the list of hosts its pages may use, doesn't let them ${advice2.effect}. ${advice2.fixes}`
|
package/package.json
CHANGED