@siteoshq/cli 2.1.0 → 2.2.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 +67 -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,15 @@ var filters = [
|
|
|
7840
7840
|
"cursor"
|
|
7841
7841
|
];
|
|
7842
7842
|
var TRACE_EXPLORER_FLAGS = {
|
|
7843
|
+
coverage: ["environment"],
|
|
7844
|
+
"gtm summary": ["environment", "period"],
|
|
7845
|
+
"notifications show": ["environment"],
|
|
7846
|
+
"notifications destinations": ["environment", "cursor"],
|
|
7843
7847
|
destinations: filters,
|
|
7844
7848
|
events: filters,
|
|
7845
7849
|
properties: filters,
|
|
7846
|
-
issues: filters,
|
|
7847
|
-
observations: filters,
|
|
7850
|
+
issues: [...filters, "container-id", "tag-id"],
|
|
7851
|
+
observations: [...filters, "container-id", "tag-id", "result"],
|
|
7848
7852
|
"issue show": ["environment", "id", "cursor"],
|
|
7849
7853
|
"observation show": ["environment", "batch-id", "event-id"]
|
|
7850
7854
|
};
|
|
@@ -7860,6 +7864,21 @@ var FilterValues = z11.object({
|
|
|
7860
7864
|
event: z11.string().min(1).max(160).optional(),
|
|
7861
7865
|
property: z11.string().min(1).max(160).optional(),
|
|
7862
7866
|
"page-view": z11.string().uuid().optional(),
|
|
7867
|
+
"container-id": z11.string().regex(/^GTM-[A-Z0-9]{4,20}$/u).optional(),
|
|
7868
|
+
"tag-id": z11.string().regex(/^[0-9]{1,20}$/u).optional(),
|
|
7869
|
+
result: z11.enum([
|
|
7870
|
+
"success",
|
|
7871
|
+
"failure",
|
|
7872
|
+
"exception",
|
|
7873
|
+
"timeout",
|
|
7874
|
+
"initiated",
|
|
7875
|
+
"completed_2xx",
|
|
7876
|
+
"completed_4xx",
|
|
7877
|
+
"completed_5xx",
|
|
7878
|
+
"network_error",
|
|
7879
|
+
"beacon_accepted",
|
|
7880
|
+
"result_unknown"
|
|
7881
|
+
]).optional(),
|
|
7863
7882
|
search: z11.string().max(160).optional(),
|
|
7864
7883
|
state: z11.enum([
|
|
7865
7884
|
"all",
|
|
@@ -7873,6 +7892,7 @@ var FilterValues = z11.object({
|
|
|
7873
7892
|
]).optional(),
|
|
7874
7893
|
rule: z11.string().min(1).max(80).optional(),
|
|
7875
7894
|
kind: z11.enum([
|
|
7895
|
+
"tag_execution",
|
|
7876
7896
|
"data_layer",
|
|
7877
7897
|
"fetch",
|
|
7878
7898
|
"xhr",
|
|
@@ -7891,18 +7911,22 @@ function traceExplorerSuffix(route, values) {
|
|
|
7891
7911
|
if (route === "issue show" || route === "observation show") {
|
|
7892
7912
|
const keys = route === "issue show" ? ["id"] : ["batch-id", "event-id"];
|
|
7893
7913
|
for (const key of keys) {
|
|
7894
|
-
|
|
7914
|
+
const value = values[key];
|
|
7915
|
+
const plain = key === "id" && typeof value === "string" ? value.replace(/^trc_incident_/u, "") : value;
|
|
7916
|
+
if (!z11.string().uuid().safeParse(plain).success)
|
|
7895
7917
|
throw new Error(`Use --${key} with the UUID returned by Trace.`);
|
|
7896
7918
|
}
|
|
7897
7919
|
if (values.cursor !== void 0) {
|
|
7898
|
-
if (!z11.string().uuid().safeParse(
|
|
7920
|
+
if (!z11.string().uuid().safeParse(
|
|
7921
|
+
typeof values.cursor === "string" ? values.cursor.replace(/^trc_finding_/u, "") : values.cursor
|
|
7922
|
+
).success)
|
|
7899
7923
|
throw new Error(
|
|
7900
7924
|
"Use --cursor with the nextCursor returned by this issue."
|
|
7901
7925
|
);
|
|
7902
7926
|
query.set("cursor", values.cursor);
|
|
7903
7927
|
}
|
|
7904
|
-
const
|
|
7905
|
-
return `${
|
|
7928
|
+
const suffix2 = route === "issue show" ? `/issues/${encodeURIComponent(values.id)}` : `/observations/${encodeURIComponent(values["batch-id"])}/${encodeURIComponent(values["event-id"])}`;
|
|
7929
|
+
return `${suffix2}${query.size ? `?${query}` : ""}`;
|
|
7906
7930
|
}
|
|
7907
7931
|
const parsed = FilterValues.safeParse(values);
|
|
7908
7932
|
if (!parsed.success) {
|
|
@@ -7913,9 +7937,21 @@ function traceExplorerSuffix(route, values) {
|
|
|
7913
7937
|
}
|
|
7914
7938
|
for (const [key, value] of Object.entries(parsed.data)) {
|
|
7915
7939
|
if (value !== void 0)
|
|
7916
|
-
query.set(
|
|
7940
|
+
query.set(
|
|
7941
|
+
{
|
|
7942
|
+
"page-view": "pageView",
|
|
7943
|
+
"container-id": "containerId",
|
|
7944
|
+
"tag-id": "tagId"
|
|
7945
|
+
}[key] ?? key,
|
|
7946
|
+
value
|
|
7947
|
+
);
|
|
7917
7948
|
}
|
|
7918
|
-
|
|
7949
|
+
const suffix = {
|
|
7950
|
+
"gtm summary": "gtm/summary",
|
|
7951
|
+
"notifications show": "notifications",
|
|
7952
|
+
"notifications destinations": "notification-destinations"
|
|
7953
|
+
}[route] ?? route;
|
|
7954
|
+
return `/${suffix}${query.size ? `?${query}` : ""}`;
|
|
7919
7955
|
}
|
|
7920
7956
|
function tracePublicationVersion(value) {
|
|
7921
7957
|
if (value === void 0) return void 0;
|
|
@@ -7956,11 +7992,18 @@ Usage:
|
|
|
7956
7992
|
siteos trace status [--json]
|
|
7957
7993
|
siteos trace environments [--json]
|
|
7958
7994
|
siteos trace report [--environment <slug>] [--json]
|
|
7995
|
+
siteos trace coverage [--environment <slug>] [--json]
|
|
7996
|
+
siteos trace gtm summary [--environment <slug>] [--period <24h|7d>] [--json]
|
|
7997
|
+
siteos trace notifications show [--environment <slug>] [--json]
|
|
7998
|
+
siteos trace notifications destinations [--environment <slug>] [--cursor <cursor>] [--json]
|
|
7999
|
+
siteos trace notifications save --input <settings.json> [--environment <slug>] [--json]
|
|
8000
|
+
siteos trace notifications retry --input <retry.json> [--environment <slug>] [--json]
|
|
8001
|
+
siteos trace schema restart --input <baseline.json> [--environment <slug>] [--json]
|
|
7959
8002
|
siteos trace destinations [--environment <slug>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7960
8003
|
siteos trace events [--environment <slug>] [--provider <provider>] [--event <name>] [--search <text>] [--state <all|new|issues|tracked|ignored>] [--period <24h|7d>] [--cursor <cursor>] [--json]
|
|
7961
8004
|
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]
|
|
8005
|
+
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]
|
|
8006
|
+
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
8007
|
siteos trace issue show --id <uuid> [--environment <slug>] [--cursor <finding-cursor>] [--json]
|
|
7965
8008
|
siteos trace observation show --batch-id <uuid> --event-id <uuid> [--environment <slug>] [--json]
|
|
7966
8009
|
siteos trace installation <show|ensure|save|publish> [--environment <slug>] [--input <draft.json>] [--json]
|
|
@@ -7974,7 +8017,7 @@ Use --expected-draft-version when publishing a reviewed tracking plan; a conflic
|
|
|
7974
8017
|
Explorer commands require the matching Trace server. They read one page and return nextCursor.
|
|
7975
8018
|
Reuse the same filters with that cursor; omit it to start a fresh time window.
|
|
7976
8019
|
Providers: siteos_analytics, ga4, google_ads, hubspot, meta, custom (data layer source).
|
|
7977
|
-
Kinds: data_layer, fetch, xhr, beacon, resource, consent, heartbeat, runtime_diagnostic.
|
|
8020
|
+
Kinds: data_layer, fetch, xhr, beacon, resource, consent, heartbeat, runtime_diagnostic, tag_execution.
|
|
7978
8021
|
Lists also accept --provider, --event, --property, --page-view, --search, --state, --rule and --kind.
|
|
7979
8022
|
Destinations are observed analytics services; a data layer event alone does not prove delivery.`,
|
|
7980
8023
|
integrations: `Manage shared Organization connections and notification destinations.
|
|
@@ -8016,6 +8059,9 @@ async function runServiceCommand(service, options) {
|
|
|
8016
8059
|
event: { type: "string" },
|
|
8017
8060
|
property: { type: "string" },
|
|
8018
8061
|
"page-view": { type: "string" },
|
|
8062
|
+
"container-id": { type: "string" },
|
|
8063
|
+
"tag-id": { type: "string" },
|
|
8064
|
+
result: { type: "string" },
|
|
8019
8065
|
search: { type: "string" },
|
|
8020
8066
|
state: { type: "string" },
|
|
8021
8067
|
rule: { type: "string" },
|
|
@@ -8050,6 +8096,9 @@ async function runServiceCommand(service, options) {
|
|
|
8050
8096
|
environments: [],
|
|
8051
8097
|
report: ["environment"],
|
|
8052
8098
|
...TRACE_EXPLORER_FLAGS,
|
|
8099
|
+
"notifications save": ["environment", "input"],
|
|
8100
|
+
"notifications retry": ["environment", "input"],
|
|
8101
|
+
"schema restart": ["environment", "input"],
|
|
8053
8102
|
...Object.fromEntries(
|
|
8054
8103
|
["installation", "tracking-plan"].flatMap(
|
|
8055
8104
|
(section) => ["show", "ensure", "save", "publish"].map((operation) => [
|
|
@@ -8246,7 +8295,7 @@ async function runServiceCommand(service, options) {
|
|
|
8246
8295
|
result = await request(site);
|
|
8247
8296
|
else if (action === "environments" && positionals.length === 1)
|
|
8248
8297
|
result = await request(`${site}/environments`);
|
|
8249
|
-
else if (action === "report" || action === "installation" || action === "tracking-plan" || explorerSuffix !== null) {
|
|
8298
|
+
else if (action === "notifications" || action === "schema" || action === "report" || action === "installation" || action === "tracking-plan" || explorerSuffix !== null) {
|
|
8250
8299
|
const response = z13.object({
|
|
8251
8300
|
environments: z13.array(
|
|
8252
8301
|
z13.object({ id: z13.string(), slug: z13.string() })
|
|
@@ -8275,6 +8324,12 @@ async function runServiceCommand(service, options) {
|
|
|
8275
8324
|
const base = `/environments/${encodeURIComponent(matches[0].id)}`;
|
|
8276
8325
|
if (explorerSuffix !== null) {
|
|
8277
8326
|
result = await request(`${base}${explorerSuffix}`);
|
|
8327
|
+
} else if (route === "notifications retry" || route === "schema restart") {
|
|
8328
|
+
result = await request(
|
|
8329
|
+
`${base}/${route === "schema restart" ? "schema-baselines/reset" : "notification-retries"}`,
|
|
8330
|
+
"POST",
|
|
8331
|
+
await inputFile()
|
|
8332
|
+
);
|
|
8278
8333
|
} else if (action === "report" && positionals.length === 1) {
|
|
8279
8334
|
const detail = z13.object({
|
|
8280
8335
|
site: z13.object({
|