@siteoshq/cli 2.8.0 → 2.9.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
@@ -419,7 +419,7 @@ MCP exposes read-only issue, event, observation, coverage, GTM and notification
419
419
 
420
420
  ### Search content and quality
421
421
 
422
- `siteos search crawl configure --environment <slug> --file <crawler.json>` saves public HTML scope and optional daily/weekly preview schedules. Use `crawl start`, read `crawl status`, then `crawl publish --run <id> --apply` after reviewing changes. Partial crawls additionally require `--accept-truncated`. The crawler preserves other sources and keeps the current index serving until publication. See the canonical Search skill crawler reference for limits and robots/noindex policy.
422
+ `siteos search crawl list --environment <slug>` lists crawlers. Create one with `crawl create --name "Documentation" --file <crawler.json>` or update it with `crawl configure --crawler <id> --file <crawler.json>`. Use `--environment <slug>` for every command. Configuration includes HTML scope and a schedule with selected weekdays, time and time zone. Use `crawl start --crawler <id>`, read `crawl status --crawler <id>`, then `crawl publish --run <id> --apply` after reviewing changes. Partial crawls additionally require `--accept-truncated`. The crawler preserves other sources and keeps the current index serving until publication. See the canonical Search skill crawler reference for limits and robots/noindex policy.
423
423
 
424
424
  `siteos search sync --environment <slug> --file <payload.json>` validates and previews a full replacement. Add `--apply` after reviewing removals. `search content` inspects the published documents and `search query --query <text>` runs a query without visitor telemetry.
425
425
 
package/dist/cli.js CHANGED
@@ -24957,7 +24957,10 @@ function createSiteOSSearchApiClient(options2) {
24957
24957
  method: input.body === void 0 ? "GET" : "POST",
24958
24958
  body: input.body,
24959
24959
  path: `${environmentPath(input.projectId, input.environmentSlug)}/experience/${input.operation}`,
24960
- query: input.days ? { days: input.days } : void 0
24960
+ query: {
24961
+ ...input.days ? { days: input.days } : {},
24962
+ ...input.crawlerId ? { crawlerId: input.crawlerId } : {}
24963
+ }
24961
24964
  }),
24962
24965
  inspect: (input) => requestJson3({
24963
24966
  apiBaseUrl: options2.apiBaseUrl,
@@ -25221,9 +25224,11 @@ function buildApiUrl2(options2) {
25221
25224
  // src/search-experience-command.ts
25222
25225
  var SEARCH_EXPERIENCE_USAGE = ` siteos search delivery status --environment <slug> [--json]
25223
25226
  siteos search delivery configure --environment <slug> --file <delivery.json> --apply [--json]
25224
- siteos search crawl status --environment <slug> [--json]
25225
- siteos search crawl configure --environment <slug> --file <crawler.json> [--json]
25226
- siteos search crawl start --environment <slug> [--json]
25227
+ siteos search crawl list --environment <slug> [--json]
25228
+ siteos search crawl create --environment <slug> --name <name> --file <crawler.json> [--json]
25229
+ siteos search crawl status --environment <slug> [--crawler <id>] [--json]
25230
+ siteos search crawl configure --environment <slug> --file <crawler.json> [--crawler <id>] [--name <name>] [--json]
25231
+ siteos search crawl start --environment <slug> [--crawler <id>] [--json]
25227
25232
  siteos search crawl publish --environment <slug> --run <id> --apply [--accept-truncated] [--accept-removals] [--json]
25228
25233
  siteos search content --environment <slug> [--query <text>] [--source <type>] [--offset <n>] [--json]
25229
25234
  siteos search query --environment <slug> --query <text> [--source <type>] [--section <label>] [--offset <n>] [--json]
@@ -25239,9 +25244,14 @@ var SEARCH_EXPERIENCE_USAGE = ` siteos search delivery status --environment <sl
25239
25244
  var options = {
25240
25245
  "delivery status": { allowed: [], required: [] },
25241
25246
  "delivery configure": { allowed: ["file", "apply"], required: ["file"] },
25242
- "crawl status": { allowed: [], required: [] },
25243
- "crawl configure": { allowed: ["file"], required: ["file"] },
25244
- "crawl start": { allowed: [], required: [] },
25247
+ "crawl list": { allowed: [], required: [] },
25248
+ "crawl create": { allowed: ["name", "file"], required: ["name", "file"] },
25249
+ "crawl status": { allowed: ["crawler"], required: [] },
25250
+ "crawl configure": {
25251
+ allowed: ["file", "crawler", "name"],
25252
+ required: ["file"]
25253
+ },
25254
+ "crawl start": { allowed: ["crawler"], required: [] },
25245
25255
  "crawl publish": {
25246
25256
  allowed: ["run", "apply", "accept-truncated", "accept-removals"],
25247
25257
  required: ["run"]
@@ -25382,19 +25392,47 @@ async function executeSearchExperienceCommand(input) {
25382
25392
  body: await readJson(input.cwd, f.file)
25383
25393
  });
25384
25394
  }
25395
+ if (c.name === "crawl list")
25396
+ return client.experience({ ...identity, operation: "crawlers" });
25397
+ if (c.name === "crawl create")
25398
+ return client.experience({
25399
+ ...identity,
25400
+ operation: "crawler-create",
25401
+ body: { name: f.name, settings: await readJson(input.cwd, f.file) }
25402
+ });
25385
25403
  if (c.name === "crawl status")
25386
- return client.experience({ ...identity, operation: "crawler" });
25387
- if (c.name === "crawl configure")
25404
+ return client.experience({
25405
+ ...identity,
25406
+ operation: "crawler",
25407
+ crawlerId: f.crawler
25408
+ });
25409
+ if (c.name === "crawl configure") {
25410
+ const settings = await readJson(input.cwd, f.file);
25411
+ if (f.crawler) {
25412
+ const current = await client.experience({
25413
+ ...identity,
25414
+ operation: "crawler",
25415
+ crawlerId: f.crawler
25416
+ });
25417
+ return client.experience({
25418
+ ...identity,
25419
+ operation: "crawler-configure",
25420
+ body: { crawlerId: f.crawler, name: f.name ?? current.name, settings }
25421
+ });
25422
+ }
25423
+ if (f.name)
25424
+ invalid("Use --crawler with --name, or crawl create for a new crawler.");
25388
25425
  return client.experience({
25389
25426
  ...identity,
25390
25427
  operation: "crawler-configure",
25391
- body: await readJson(input.cwd, f.file)
25428
+ body: settings
25392
25429
  });
25430
+ }
25393
25431
  if (c.name === "crawl start")
25394
25432
  return client.experience({
25395
25433
  ...identity,
25396
25434
  operation: "crawler-start",
25397
- body: {}
25435
+ body: f.crawler ? { crawlerId: f.crawler } : {}
25398
25436
  });
25399
25437
  if (c.name === "crawl publish") {
25400
25438
  if (!c.apply)