@siteoshq/cli 2.1.0 → 2.3.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 +14 -1
- package/dist/cli.js +82 -12
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
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.
|
|
4
|
+
Search, Trace, SEO/GEO and Integrations. This source is version 2.2.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
|
|
@@ -389,3 +389,16 @@ definitions. Creation uses `--file <definition.json>`; reports and realtime read
|
|
|
389
389
|
to Analytics and the operation, with editor roles required for writes. Analytics is Unlimited in
|
|
390
390
|
Usage during early access. See the canonical plugin's website Analytics skill for event contracts
|
|
391
391
|
and the browser-to-report verification workflow; Search reports use `search analytics` separately.
|
|
392
|
+
|
|
393
|
+
### Trace actionable monitoring (2.2.0)
|
|
394
|
+
|
|
395
|
+
`trace coverage`, `trace gtm summary`, `trace notifications show` and
|
|
396
|
+
`trace notifications destinations` read the selected environment. `trace observations list`
|
|
397
|
+
accepts `--kind tag_execution`, `--container-id`, `--tag-id` and `--result`;
|
|
398
|
+
`trace issues list` accepts the same GTM identity filters.
|
|
399
|
+
`trace notifications save|retry --input <file>` and
|
|
400
|
+
`trace schema-baselines reset --input <file>` are explicit, version-guarded writes.
|
|
401
|
+
See the [Trace workflow](../../plugins/siteos/skills/siteos-trace/references/actionable-monitoring.md)
|
|
402
|
+
for exact inputs, thresholds and installation of the common GTM execution monitor.
|
|
403
|
+
The installation response supplies `gtmExecutionMonitor.templateUrl` and its trigger contract.
|
|
404
|
+
MCP exposes read-only issue, event, observation, coverage, GTM and notification views.
|
package/dist/cli.js
CHANGED
|
@@ -7840,11 +7840,16 @@ var filters = [
|
|
|
7840
7840
|
"cursor"
|
|
7841
7841
|
];
|
|
7842
7842
|
var TRACE_EXPLORER_FLAGS = {
|
|
7843
|
+
coverage: ["environment"],
|
|
7844
|
+
"gtm summary": ["environment", "period"],
|
|
7845
|
+
"ga4 show": ["environment"],
|
|
7846
|
+
"notifications show": ["environment"],
|
|
7847
|
+
"notifications destinations": ["environment", "cursor"],
|
|
7843
7848
|
destinations: filters,
|
|
7844
7849
|
events: filters,
|
|
7845
7850
|
properties: filters,
|
|
7846
|
-
issues: filters,
|
|
7847
|
-
observations: filters,
|
|
7851
|
+
issues: [...filters, "container-id", "tag-id"],
|
|
7852
|
+
observations: [...filters, "container-id", "tag-id", "result"],
|
|
7848
7853
|
"issue show": ["environment", "id", "cursor"],
|
|
7849
7854
|
"observation show": ["environment", "batch-id", "event-id"]
|
|
7850
7855
|
};
|
|
@@ -7860,6 +7865,21 @@ var FilterValues = z11.object({
|
|
|
7860
7865
|
event: z11.string().min(1).max(160).optional(),
|
|
7861
7866
|
property: z11.string().min(1).max(160).optional(),
|
|
7862
7867
|
"page-view": z11.string().uuid().optional(),
|
|
7868
|
+
"container-id": z11.string().regex(/^GTM-[A-Z0-9]{4,20}$/u).optional(),
|
|
7869
|
+
"tag-id": z11.string().regex(/^[0-9]{1,20}$/u).optional(),
|
|
7870
|
+
result: z11.enum([
|
|
7871
|
+
"success",
|
|
7872
|
+
"failure",
|
|
7873
|
+
"exception",
|
|
7874
|
+
"timeout",
|
|
7875
|
+
"initiated",
|
|
7876
|
+
"completed_2xx",
|
|
7877
|
+
"completed_4xx",
|
|
7878
|
+
"completed_5xx",
|
|
7879
|
+
"network_error",
|
|
7880
|
+
"beacon_accepted",
|
|
7881
|
+
"result_unknown"
|
|
7882
|
+
]).optional(),
|
|
7863
7883
|
search: z11.string().max(160).optional(),
|
|
7864
7884
|
state: z11.enum([
|
|
7865
7885
|
"all",
|
|
@@ -7873,6 +7893,7 @@ var FilterValues = z11.object({
|
|
|
7873
7893
|
]).optional(),
|
|
7874
7894
|
rule: z11.string().min(1).max(80).optional(),
|
|
7875
7895
|
kind: z11.enum([
|
|
7896
|
+
"tag_execution",
|
|
7876
7897
|
"data_layer",
|
|
7877
7898
|
"fetch",
|
|
7878
7899
|
"xhr",
|
|
@@ -7891,18 +7912,22 @@ function traceExplorerSuffix(route, values) {
|
|
|
7891
7912
|
if (route === "issue show" || route === "observation show") {
|
|
7892
7913
|
const keys = route === "issue show" ? ["id"] : ["batch-id", "event-id"];
|
|
7893
7914
|
for (const key of keys) {
|
|
7894
|
-
|
|
7915
|
+
const value = values[key];
|
|
7916
|
+
const plain = key === "id" && typeof value === "string" ? value.replace(/^trc_incident_/u, "") : value;
|
|
7917
|
+
if (!z11.string().uuid().safeParse(plain).success)
|
|
7895
7918
|
throw new Error(`Use --${key} with the UUID returned by Trace.`);
|
|
7896
7919
|
}
|
|
7897
7920
|
if (values.cursor !== void 0) {
|
|
7898
|
-
if (!z11.string().uuid().safeParse(
|
|
7921
|
+
if (!z11.string().uuid().safeParse(
|
|
7922
|
+
typeof values.cursor === "string" ? values.cursor.replace(/^trc_finding_/u, "") : values.cursor
|
|
7923
|
+
).success)
|
|
7899
7924
|
throw new Error(
|
|
7900
7925
|
"Use --cursor with the nextCursor returned by this issue."
|
|
7901
7926
|
);
|
|
7902
7927
|
query.set("cursor", values.cursor);
|
|
7903
7928
|
}
|
|
7904
|
-
const
|
|
7905
|
-
return `${
|
|
7929
|
+
const suffix2 = route === "issue show" ? `/issues/${encodeURIComponent(values.id)}` : `/observations/${encodeURIComponent(values["batch-id"])}/${encodeURIComponent(values["event-id"])}`;
|
|
7930
|
+
return `${suffix2}${query.size ? `?${query}` : ""}`;
|
|
7906
7931
|
}
|
|
7907
7932
|
const parsed = FilterValues.safeParse(values);
|
|
7908
7933
|
if (!parsed.success) {
|
|
@@ -7913,9 +7938,22 @@ function traceExplorerSuffix(route, values) {
|
|
|
7913
7938
|
}
|
|
7914
7939
|
for (const [key, value] of Object.entries(parsed.data)) {
|
|
7915
7940
|
if (value !== void 0)
|
|
7916
|
-
query.set(
|
|
7941
|
+
query.set(
|
|
7942
|
+
{
|
|
7943
|
+
"page-view": "pageView",
|
|
7944
|
+
"container-id": "containerId",
|
|
7945
|
+
"tag-id": "tagId"
|
|
7946
|
+
}[key] ?? key,
|
|
7947
|
+
value
|
|
7948
|
+
);
|
|
7917
7949
|
}
|
|
7918
|
-
|
|
7950
|
+
const suffix = {
|
|
7951
|
+
"gtm summary": "gtm/summary",
|
|
7952
|
+
"ga4 show": "ga4",
|
|
7953
|
+
"notifications show": "notifications",
|
|
7954
|
+
"notifications destinations": "notification-destinations"
|
|
7955
|
+
}[route] ?? route;
|
|
7956
|
+
return `/${suffix}${query.size ? `?${query}` : ""}`;
|
|
7919
7957
|
}
|
|
7920
7958
|
function tracePublicationVersion(value) {
|
|
7921
7959
|
if (value === void 0) return void 0;
|
|
@@ -7956,11 +7994,22 @@ Usage:
|
|
|
7956
7994
|
siteos trace status [--json]
|
|
7957
7995
|
siteos trace environments [--json]
|
|
7958
7996
|
siteos trace report [--environment <slug>] [--json]
|
|
7997
|
+
siteos trace coverage [--environment <slug>] [--json]
|
|
7998
|
+
siteos trace ga4 show [--environment <slug>] [--json]
|
|
7999
|
+
siteos trace ga4 bind --input <json-file> [--environment <slug>] [--json]
|
|
8000
|
+
siteos trace ga4 sync --input <json-file> [--environment <slug>] [--json]
|
|
8001
|
+
siteos trace ga4 disconnect --input <json-file> [--environment <slug>] [--json]
|
|
8002
|
+
siteos trace gtm summary [--environment <slug>] [--period <24h|7d>] [--json]
|
|
8003
|
+
siteos trace notifications show [--environment <slug>] [--json]
|
|
8004
|
+
siteos trace notifications destinations [--environment <slug>] [--cursor <cursor>] [--json]
|
|
8005
|
+
siteos trace notifications save --input <settings.json> [--environment <slug>] [--json]
|
|
8006
|
+
siteos trace notifications retry --input <retry.json> [--environment <slug>] [--json]
|
|
8007
|
+
siteos trace schema restart --input <baseline.json> [--environment <slug>] [--json]
|
|
7959
8008
|
siteos trace destinations [--environment <slug>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7960
8009
|
siteos trace events [--environment <slug>] [--provider <provider>] [--event <name>] [--search <text>] [--state <all|new|issues|tracked|ignored>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7961
8010
|
siteos trace properties [--environment <slug>] [--provider <provider>] [--event <name>] [--property <name>] [--search <text>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7962
|
-
siteos trace issues [--environment <slug>] [--provider <provider>] [--event <name>] [--state <all|active|snoozed|resolved|new>] [--rule <rule>] [--search <text>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7963
|
-
siteos trace observations [--environment <slug>] [--provider <provider>] [--event <name>] [--kind <kind>] [--page-view <uuid>] [--search <text>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
8011
|
+
siteos trace issues [--environment <slug>] [--provider <provider>] [--event <name>] [--state <all|active|snoozed|resolved|new>] [--rule <rule>] [--container-id <GTM-ID>] [--tag-id <id>] [--search <text>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
8012
|
+
siteos trace observations [--environment <slug>] [--provider <provider>] [--event <name>] [--kind <kind>] [--page-view <uuid>] [--container-id <GTM-ID>] [--tag-id <id>] [--result <result>] [--search <text>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7964
8013
|
siteos trace issue show --id <uuid> [--environment <slug>] [--cursor <finding-cursor>] [--json]
|
|
7965
8014
|
siteos trace observation show --batch-id <uuid> --event-id <uuid> [--environment <slug>] [--json]
|
|
7966
8015
|
siteos trace installation <show|ensure|save|publish> [--environment <slug>] [--input <draft.json>] [--json]
|
|
@@ -7974,7 +8023,7 @@ Use --expected-draft-version when publishing a reviewed tracking plan; a conflic
|
|
|
7974
8023
|
Explorer commands require the matching Trace server. They read one page and return nextCursor.
|
|
7975
8024
|
Reuse the same filters with that cursor; omit it to start a fresh time window.
|
|
7976
8025
|
Providers: siteos_analytics, ga4, google_ads, hubspot, meta, custom (data layer source).
|
|
7977
|
-
Kinds: data_layer, fetch, xhr, beacon, resource, consent, heartbeat, runtime_diagnostic.
|
|
8026
|
+
Kinds: data_layer, fetch, xhr, beacon, resource, consent, heartbeat, runtime_diagnostic, tag_execution.
|
|
7978
8027
|
Lists also accept --provider, --event, --property, --page-view, --search, --state, --rule and --kind.
|
|
7979
8028
|
Destinations are observed analytics services; a data layer event alone does not prove delivery.`,
|
|
7980
8029
|
integrations: `Manage shared Organization connections and notification destinations.
|
|
@@ -8016,6 +8065,9 @@ async function runServiceCommand(service, options) {
|
|
|
8016
8065
|
event: { type: "string" },
|
|
8017
8066
|
property: { type: "string" },
|
|
8018
8067
|
"page-view": { type: "string" },
|
|
8068
|
+
"container-id": { type: "string" },
|
|
8069
|
+
"tag-id": { type: "string" },
|
|
8070
|
+
result: { type: "string" },
|
|
8019
8071
|
search: { type: "string" },
|
|
8020
8072
|
state: { type: "string" },
|
|
8021
8073
|
rule: { type: "string" },
|
|
@@ -8050,6 +8102,12 @@ async function runServiceCommand(service, options) {
|
|
|
8050
8102
|
environments: [],
|
|
8051
8103
|
report: ["environment"],
|
|
8052
8104
|
...TRACE_EXPLORER_FLAGS,
|
|
8105
|
+
"ga4 bind": ["environment", "input"],
|
|
8106
|
+
"ga4 sync": ["environment", "input"],
|
|
8107
|
+
"ga4 disconnect": ["environment", "input"],
|
|
8108
|
+
"notifications save": ["environment", "input"],
|
|
8109
|
+
"notifications retry": ["environment", "input"],
|
|
8110
|
+
"schema restart": ["environment", "input"],
|
|
8053
8111
|
...Object.fromEntries(
|
|
8054
8112
|
["installation", "tracking-plan"].flatMap(
|
|
8055
8113
|
(section) => ["show", "ensure", "save", "publish"].map((operation) => [
|
|
@@ -8246,7 +8304,7 @@ async function runServiceCommand(service, options) {
|
|
|
8246
8304
|
result = await request(site);
|
|
8247
8305
|
else if (action === "environments" && positionals.length === 1)
|
|
8248
8306
|
result = await request(`${site}/environments`);
|
|
8249
|
-
else if (action === "report" || action === "installation" || action === "tracking-plan" || explorerSuffix !== null) {
|
|
8307
|
+
else if (action === "ga4" || action === "notifications" || action === "schema" || action === "report" || action === "installation" || action === "tracking-plan" || explorerSuffix !== null) {
|
|
8250
8308
|
const response = z13.object({
|
|
8251
8309
|
environments: z13.array(
|
|
8252
8310
|
z13.object({ id: z13.string(), slug: z13.string() })
|
|
@@ -8275,6 +8333,18 @@ async function runServiceCommand(service, options) {
|
|
|
8275
8333
|
const base = `/environments/${encodeURIComponent(matches[0].id)}`;
|
|
8276
8334
|
if (explorerSuffix !== null) {
|
|
8277
8335
|
result = await request(`${base}${explorerSuffix}`);
|
|
8336
|
+
} else if (action === "ga4") {
|
|
8337
|
+
result = await request(
|
|
8338
|
+
`${base}/ga4/${subaction}`,
|
|
8339
|
+
"POST",
|
|
8340
|
+
await inputFile()
|
|
8341
|
+
);
|
|
8342
|
+
} else if (route === "notifications retry" || route === "schema restart") {
|
|
8343
|
+
result = await request(
|
|
8344
|
+
`${base}/${route === "schema restart" ? "schema-baselines/reset" : "notification-retries"}`,
|
|
8345
|
+
"POST",
|
|
8346
|
+
await inputFile()
|
|
8347
|
+
);
|
|
8278
8348
|
} else if (action === "report" && positionals.length === 1) {
|
|
8279
8349
|
const detail = z13.object({
|
|
8280
8350
|
site: z13.object({
|