@cargo-ai/cli 1.0.42 → 1.0.44
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/commands/observability/alert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AA0BxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/commands/observability/alert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AA0BxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAsMN"}
|
|
@@ -16,7 +16,7 @@ function parseBooleanOption(value, optionName) {
|
|
|
16
16
|
export function registerAlertCommands(parent, getApi) {
|
|
17
17
|
const alert = parent
|
|
18
18
|
.command("alert")
|
|
19
|
-
.description("
|
|
19
|
+
.description("Alert operations (scheduled threshold alerts on spans, runs, records, SQL or a model)");
|
|
20
20
|
alert
|
|
21
21
|
.command("list")
|
|
22
22
|
.description("List all alerts")
|
|
@@ -38,8 +38,8 @@ export function registerAlertCommands(parent, getApi) {
|
|
|
38
38
|
.description("Create an alert")
|
|
39
39
|
.requiredOption("--name <name>", "Alert name")
|
|
40
40
|
.requiredOption("--cron <cron>", 'Evaluation schedule: 5-field cron or "@every <interval>" (UTC), at most once a minute')
|
|
41
|
-
.requiredOption("--scope <json>", 'Scope (JSON,
|
|
42
|
-
.requiredOption("--threshold <json>", 'Threshold (JSON). Spans scopes: {"metric":"errorRate","operator":"gte","value":10}, {"metric":"duration","aggregation":"p95","operator":"gte","value":30}, {"metric":"credits","aggregation":"sum","operator":"gte","value":500} or {"metric":"count","operator":"lte","value":0};
|
|
41
|
+
.requiredOption("--scope <json>", 'Scope (JSON), one of: {"kind":"spans","workflowUuid":"..."}, {"kind":"runs","workflowUuid":"...","statuses":["error"]}, {"kind":"records","workflowUuid":"...","statuses":["error"]}, {"kind":"orchestrationQuery","query":"select ..."}, {"kind":"storageQuery","query":"select ..."} or {"kind":"model","modelUuid":"...","filter":{...}}')
|
|
42
|
+
.requiredOption("--threshold <json>", 'Threshold (JSON). Spans, runs and records scopes: {"metric":"errorRate","operator":"gte","value":10}, {"metric":"duration","aggregation":"p95","operator":"gte","value":30}, {"metric":"credits","aggregation":"sum","operator":"gte","value":500} or {"metric":"count","operator":"lte","value":0}; model scopes: {"metric":"recordsCount","operator":"lte","value":0}, {"metric":"recordsShare","operator":"gte","value":30} (needs a scope filter), {"metric":"freshness","operator":"gte","value":60} or {"metric":"syncDuration","operator":"gte","value":300}; query scopes: {"metric":"query","operator":"gte","value":10}')
|
|
43
43
|
.option("--actions <json>", "Actions fired as runs on breach (JSON Action[]: connector, tool, or agent nodes)")
|
|
44
44
|
.option("--disabled", "Create the alert disabled")
|
|
45
45
|
.option("--description <text>", "What this alert watches")
|
|
@@ -67,8 +67,8 @@ export function registerAlertCommands(parent, getApi) {
|
|
|
67
67
|
.option("--name <name>", "Alert name")
|
|
68
68
|
.option("--cron <cron>", 'Evaluation schedule: 5-field cron or "@every <interval>" (UTC), at most once a minute')
|
|
69
69
|
.option("--enabled <boolean>", "Enable or disable the alert (true/false)")
|
|
70
|
-
.option("--scope <json>", "
|
|
71
|
-
.option("--threshold <json>", "Threshold (JSON)")
|
|
70
|
+
.option("--scope <json>", "Scope (JSON). See `alert create`")
|
|
71
|
+
.option("--threshold <json>", "Threshold (JSON). See `alert create`")
|
|
72
72
|
.option("--actions <json>", "Actions fired as runs on breach (JSON Action[])")
|
|
73
73
|
.option("--description <text>", 'What this alert watches, or "none" to clear it')
|
|
74
74
|
.option("--folder <uuid>", 'Folder UUID to move the alert to, or "none" to remove it from its folder')
|
|
@@ -116,9 +116,9 @@ export function registerAlertCommands(parent, getApi) {
|
|
|
116
116
|
alert
|
|
117
117
|
.command("preview")
|
|
118
118
|
.description("Evaluate a scope + threshold now, without firing actions")
|
|
119
|
-
.requiredOption("--scope <json>", "
|
|
120
|
-
.requiredOption("--threshold <json>", "Threshold (JSON)")
|
|
121
|
-
.option("--window-minutes <minutes>", "Evaluation window ending now (
|
|
119
|
+
.requiredOption("--scope <json>", "Scope (JSON). See `alert create`")
|
|
120
|
+
.requiredOption("--threshold <json>", "Threshold (JSON). See `alert create`")
|
|
121
|
+
.option("--window-minutes <minutes>", "Evaluation window ending now (spans, runs and records scopes only; a model is measured as it stands, and a query windows itself)", "60")
|
|
122
122
|
.action(async (opts) => {
|
|
123
123
|
const api = getApi();
|
|
124
124
|
const result = await handleApiCall(() => api.observability.alert.preview({
|
|
@@ -2,11 +2,11 @@ import { handleApiCall, outputJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerQueryCommands(parent, getApi) {
|
|
3
3
|
const query = parent
|
|
4
4
|
.command("query")
|
|
5
|
-
.description("Execute SQL queries against orchestration tables");
|
|
5
|
+
.description("Execute ClickHouse SQL queries against orchestration tables");
|
|
6
6
|
query
|
|
7
7
|
.command("execute")
|
|
8
|
-
.description("Execute a read-only SQL query")
|
|
9
|
-
.argument("<sql>", "SQL query string")
|
|
8
|
+
.description("Execute a read-only ClickHouse SQL query")
|
|
9
|
+
.argument("<sql>", "ClickHouse SQL query string")
|
|
10
10
|
.addHelpText("after", `
|
|
11
11
|
Available tables: spans, runs, batches, records
|
|
12
12
|
|
|
@@ -7,7 +7,7 @@ export function registerTraceCommands(parent, getApi) {
|
|
|
7
7
|
.command("list")
|
|
8
8
|
.description("List traces (aggregated over their spans)")
|
|
9
9
|
.option("--workflow-uuid <uuid>", "Workflow UUID (omit to include all workflows in the workspace)")
|
|
10
|
-
.option("--statuses <list>", "Comma-separated trace statuses (pending, error, success)")
|
|
10
|
+
.option("--statuses <list>", "Comma-separated trace statuses (pending, error, degraded, success)")
|
|
11
11
|
.requiredOption("--started-after <date>", "Trace's first span started after (ISO date)")
|
|
12
12
|
.option("--started-before <date>", "Trace's first span started on or before (ISO date)")
|
|
13
13
|
.option("--limit <n>", "Limit", "30")
|
|
@@ -30,7 +30,7 @@ export function registerTraceCommands(parent, getApi) {
|
|
|
30
30
|
.command("count")
|
|
31
31
|
.description("Count traces matching the filter")
|
|
32
32
|
.option("--workflow-uuid <uuid>", "Workflow UUID (omit to include all workflows in the workspace)")
|
|
33
|
-
.option("--statuses <list>", "Comma-separated trace statuses (pending, error, success)")
|
|
33
|
+
.option("--statuses <list>", "Comma-separated trace statuses (pending, error, degraded, success)")
|
|
34
34
|
.requiredOption("--started-after <date>", "Trace's first span started after (ISO date)")
|
|
35
35
|
.option("--started-before <date>", "Trace's first span started on or before (ISO date)")
|
|
36
36
|
.action(async (opts) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.44",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "Command-line interface for the Cargo API",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"format:check": "prettier --check ."
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@cargo-ai/api": "^1.0.
|
|
33
|
+
"@cargo-ai/api": "^1.0.56",
|
|
34
34
|
"@cargo-ai/app-sdk": "^1.0.5",
|
|
35
35
|
"@cargo-ai/cdk": "*",
|
|
36
36
|
"@cargo-ai/types": "*",
|