@siteoshq/cli 2.3.0 → 2.4.0

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
@@ -1,7 +1,7 @@
1
1
  # SiteOS CLI
2
2
 
3
3
  `@siteoshq/cli` exposes one `siteos` binary for Auth, common Projects, Pulse, Cookie, Forms,
4
- Search, Trace, SEO/GEO and Integrations. This source is version 2.2.0; source changes require a separate release to reach npm.
4
+ Search, Trace, SEO/GEO and Integrations. This source is version 2.4.0; source changes require a separate release to reach npm.
5
5
 
6
6
  CLI 2 requires `siteos project use <id-or-slug> --environment <slug>` once per repository.
7
7
  It stores only the common selection in private `projects.json`; older service bindings are not
@@ -230,6 +230,11 @@ siteos seo gsc export --dataset queries --format csv --output ./gsc-queries.csv
230
230
 
231
231
  Run `siteos seo --help` for request JSON, limits, saved inputs, cancellation and GSC settings.
232
232
  Research supports keywords, Domain Overview (`domain`), rankings, backlinks, brand and AI visibility without GSC.
233
+ AI Visibility category history uses `--kind ai-rankings`; Prompt checks stays separate under
234
+ `--kind ai-visibility`. Category requests use `kind: ai-visibility` with a `category-aeo-v2`
235
+ category. Reports and exports preserve AEO scores, recommendation roles, first choices, objections,
236
+ model settings and the exact supporting answers. See the SEO skill's AI visibility reference for
237
+ the versioned request and scoring method; historical v1 reports remain readable without inferred scores.
233
238
  Domain Overview collects domain totals, up to 100 ranking keywords, pages and competitors for a market.
234
239
  `--kind domain` includes legacy `competitors` history; existing `competitors` inputs keep their original two-part plan.
235
240
  New request example: `{"kind":"domain","target":"example.com","country":"US","language":"en"}`.
@@ -311,6 +316,9 @@ when requested with `npx playwright@1.61.1 install chromium` or `npx playwright@
311
316
  The check opens fresh contexts, exercises the public consent API and reports request origins and
312
317
  storage names without values, query strings, request bodies or authenticated sessions. These are
313
318
  real visits; normal installation/aggregate signals may be recorded. Reports remain local.
319
+ CLI 2.3.1 distinguishes the `/gtm.js` container bootstrap from `/gtag/js` and recognizes
320
+ regional GA4 `/g/collect` endpoints. Loading GTM to run the consent manager is not itself
321
+ evidence that an Analytics tag ran; a GA4 request after withdrawal remains a failure in Basic mode.
314
322
 
315
323
  A report records the revision, runtime, observed Edge location, scenario scope and 24-hour expiry.
316
324
  `passed` exits 0; `needs-review` and `failed` exit 1. Unknown origins/storage require classification.
package/dist/cli.js CHANGED
@@ -38,8 +38,12 @@ function assessCookieObservations(input) {
38
38
  const unknownStorage = /* @__PURE__ */ new Set();
39
39
  const services = input.envelope.config.services;
40
40
  for (const request of input.requests) {
41
+ if (request.origin === "https://www.googletagmanager.com" && request.path === "/gtm.js" && request.type === "script")
42
+ continue;
41
43
  const matches = services.filter(
42
- (service) => service.lifecycle && [
44
+ (service) => service.key === "google-analytics" && /^https:\/\/(?:www\.|region\d+\.)?google-analytics\.com$/u.test(
45
+ request.origin
46
+ ) && request.path === "/g/collect" || service.lifecycle && [
43
47
  ...service.lifecycle.scriptOrigins,
44
48
  ...service.lifecycle.iframeOrigins,
45
49
  ...service.lifecycle.pixelOrigins
@@ -157,6 +161,7 @@ async function verifyCookieWebsite(input) {
157
161
  }
158
162
  requests.push({
159
163
  origin: new URL(request.url()).origin,
164
+ path: new URL(request.url()).pathname,
160
165
  type: request.resourceType(),
161
166
  scenario
162
167
  });
@@ -9007,17 +9012,19 @@ var RESEARCH_HELP = `
9007
9012
  siteos seo research saved save --input <request.json> --name <name> [--id <saved-id>] [--environment <slug>] [--json]
9008
9013
  siteos seo research saved remove <saved-id> [--environment <slug>] [--json]
9009
9014
 
9010
- Research kinds: keywords, domain, rankings, backlinks, brand, ai-visibility.
9015
+ Research request kinds: keywords, domain, rankings, backlinks, brand, ai-visibility.
9016
+ Read sections also accept --kind ai-rankings for category comparisons; --kind ai-visibility selects Prompt checks.
9017
+ Category run/plan inputs use kind ai-visibility with category-aeo-v2; both sections share AI request execution.
9011
9018
  Domain Overview: {"kind":"domain","target":"example.com","country":"US","language":"en"}.
9012
9019
  Domain collects summary, ranking keywords, top pages and competitors. The legacy competitors kind retains its two-part plan; domain history includes those reports.
9013
9020
  Request JSON: {"kind":"keywords","target":"example.com","keywords":["website analytics"],"country":"US","language":"en"}.
9014
- Rankings accepts up to 10 keywords and 5 competitors. AI visibility requires brand, prompt and platforms.
9021
+ Rankings accepts up to 10 keywords and 5 competitors. AI visibility accepts brand, platforms and either prompt or a category-aeo-v2 category with products and questions.
9015
9022
  Markets: US, GB, ES, DE, FR, CA, AU. Languages: en, es, de, fr, pt, it, nl, ru.
9016
9023
  Platforms: chat_gpt, claude, gemini, perplexity. Brand lookup uses brandPlatform chat_gpt|google and brandMatch domain|brand.
9017
9024
  Plan validates the request and shows planned parts and available research credits without enqueueing work.
9018
9025
  Run consumes Organization research credits through the same worker as the interface. Preserve the retry key after an uncertain response.
9019
9026
  SERP ensure collects one saved organic snapshot for a keyword returned by the selected completed Keyword Research report. It uses research credits once; repeating the same report/word returns the saved job, including failures. Show/wait/export only read and never spend. New reports can collect fresh snapshots.
9020
- History returns the latest 30 checks per kind; show/export can address older retained run IDs. Saved checks are limited to 100 per resource.
9027
+ History returns the latest 30 checks per section; show/export can address older retained run IDs. Saved checks are limited to 100 per resource.
9021
9028
  Wait defaults to 120 seconds (maximum 900); exit 3 means still pending, exit 4 means failed or cancelled. Partial evidence stays accessible.
9022
9029
  Exports preserve scope, dates and partial state. CSV stores one dataset row as JSON per row, including failed parts; it never converts missing metrics to zero.
9023
9030
  `;
@@ -9029,6 +9036,8 @@ var kinds = [
9029
9036
  "brand",
9030
9037
  "ai-visibility"
9031
9038
  ];
9039
+ var sections = [...kinds, "ai-rankings"];
9040
+ var sectionOf = (request) => request.kind === "ai-visibility" && request.category ? "ai-rankings" : request.kind;
9032
9041
  var requestSchema = z17.object({
9033
9042
  kind: z17.enum(["domain", ...kinds]).transform((kind) => kind === "domain" ? "competitors" : kind),
9034
9043
  target: z17.string().min(1).max(253)
@@ -9099,7 +9108,7 @@ async function runSeoResearchCommand(options) {
9099
9108
  "Provide --keyword with 1 to 200 characters from the selected keyword report."
9100
9109
  );
9101
9110
  if (values.kind === "domain") values.kind = "competitors";
9102
- if (operation.flags.includes("kind") && !kinds.includes(values.kind))
9111
+ if (operation.flags.includes("kind") && !sections.includes(values.kind))
9103
9112
  throw new Error("Choose a documented --kind.");
9104
9113
  if (operation.flags.includes("input") && !values.input)
9105
9114
  throw new Error("Provide --input with a research request JSON file.");
@@ -9307,7 +9316,7 @@ async function runSeoResearchCommand(options) {
9307
9316
  } else if (action === "summary") {
9308
9317
  record = await get("/summary");
9309
9318
  resourceSchema.parse(record.resource);
9310
- z17.array(z17.object({ kind: z17.enum(kinds), summary: z17.unknown() })).parse(
9319
+ z17.array(z17.object({ kind: z17.enum(sections), summary: z17.unknown() })).parse(
9311
9320
  record.checks
9312
9321
  );
9313
9322
  } else if (["status", "history", "saved list"].includes(action)) {
@@ -9321,13 +9330,13 @@ async function runSeoResearchCommand(options) {
9321
9330
  request: requestSchema
9322
9331
  }).passthrough()
9323
9332
  ).parse(view.saved);
9324
- if (runs.some((r) => r.request.kind !== values.kind) || saved.some((r) => r.request.kind !== values.kind))
9333
+ if (runs.some((r) => sectionOf(r.request) !== values.kind) || saved.some((r) => sectionOf(r.request) !== values.kind))
9325
9334
  throw new Error(
9326
9335
  "The response does not match the requested research kind."
9327
9336
  );
9328
9337
  if (view.run != null) {
9329
9338
  const selected = runSchema.parse(view.run);
9330
- if (selected.request.kind !== values.kind)
9339
+ if (sectionOf(selected.request) !== values.kind)
9331
9340
  throw new Error("The selected report has a different research kind.");
9332
9341
  }
9333
9342
  record = {
@@ -9390,6 +9399,25 @@ async function runSeoResearchCommand(options) {
9390
9399
  row
9391
9400
  ]);
9392
9401
  });
9402
+ if (run.categoryReport) {
9403
+ rows.push([
9404
+ run.id,
9405
+ run.websiteUrl,
9406
+ run.request.kind,
9407
+ run.request.target,
9408
+ run.createdAt,
9409
+ run.state,
9410
+ run.error,
9411
+ null,
9412
+ null,
9413
+ null,
9414
+ null,
9415
+ "category-report",
9416
+ run.request,
9417
+ { version: run.categoryReport.version },
9418
+ run.categoryReport
9419
+ ]);
9420
+ }
9393
9421
  const content = values.format === "json" ? JSON.stringify(record, null, 2) : [
9394
9422
  [
9395
9423
  "run_id",
@@ -9883,7 +9911,7 @@ var SEO_HELP = `SEO/GEO: audit your website and research search-engine and AI vi
9883
9911
 
9884
9912
  Site Audit checks public HTML, canonical, robots.txt, sitemap and technical GEO signals.
9885
9913
  Performance measures selected pages with Lighthouse and compares response/rendered HTML.
9886
- Research covers keywords, rankings, competitors, backlinks, Brand lookup and Prompt checks.
9914
+ Research covers keywords, rankings, competitors, backlinks, Brand lookup and AI visibility.
9887
9915
  GSC Insights reads your connected property's Google Search Console data; other research needs no GSC.
9888
9916
  Technical GEO checks crawler policies, content, snippets and structured-data syntax/shape.
9889
9917
  These checks do not measure autonomous agent journeys or guarantee AI inclusion or citations.