@asteroidai/cli 1.9.571 → 1.9.572

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/dist/asteroid.js CHANGED
@@ -1330,6 +1330,318 @@ var COMMANDS = [
1330
1330
  credentialOrganization: false
1331
1331
  }
1332
1332
  },
1333
+ {
1334
+ command: "dashboard create",
1335
+ tool: "dashboard_create",
1336
+ title: "Create dashboard",
1337
+ description: "Create a dashboard. The `spec` names the workflows to read (`sources`), how their execution results group into records (`records`: every item in `lists` with the same value at `key` is one record, `fields` are computed per record with `latest`, `first`, `count`, `countDistinct`, `collect`, `countBy` or `maxCount`, and `timeline` keeps each record's history), and the widgets (`view`: `stat`, `breakdown`, `segments`, `activity`, `table`). A table needs `columns` and takes `tabs`, `sort`, `limit` and `detail`, and a row opens the record's detail and history. A widget's `field` and `where` use names from `records.fields` or the built-ins `key`, `firstSeenAt`, `lastSeenAt`, `executions`, `current`, `lastList`. A spec that does not validate returns 400 with the path of each fault. Read the dashboard's data after to check the records. The response's `id` opens at /dashboards/<id>. Staff only.",
1338
+ method: "POST",
1339
+ path: "/agents/v2/dashboards",
1340
+ args: [],
1341
+ query: [],
1342
+ binary: false,
1343
+ readOnly: false,
1344
+ destructive: false,
1345
+ body: {
1346
+ required: true,
1347
+ contentType: "application/json",
1348
+ fields: [
1349
+ {
1350
+ name: "name",
1351
+ flag: "name",
1352
+ type: "string",
1353
+ required: true
1354
+ },
1355
+ {
1356
+ name: "spec",
1357
+ flag: "spec",
1358
+ type: "json",
1359
+ required: true,
1360
+ description: "What a dashboard reads, how it groups the results into records, and what it shows.",
1361
+ fields: [
1362
+ {
1363
+ name: "sources",
1364
+ flag: "sources",
1365
+ type: "json",
1366
+ required: false
1367
+ },
1368
+ {
1369
+ name: "records",
1370
+ flag: "records",
1371
+ type: "json",
1372
+ required: false,
1373
+ description: "How execution results group into records. Every item in `lists` that carries the same value at `key` belongs to one record.",
1374
+ fields: [
1375
+ {
1376
+ name: "key",
1377
+ flag: "key",
1378
+ type: "string",
1379
+ required: false,
1380
+ description: "Dot path on each item to the value that identifies the record, such as `referral_id`. An item without it is skipped."
1381
+ },
1382
+ {
1383
+ name: "lists",
1384
+ flag: "lists",
1385
+ type: "json",
1386
+ required: false
1387
+ },
1388
+ {
1389
+ name: "fields",
1390
+ flag: "fields",
1391
+ type: "json",
1392
+ required: false
1393
+ },
1394
+ {
1395
+ name: "timeline",
1396
+ flag: "timeline",
1397
+ type: "json",
1398
+ required: false,
1399
+ description: "Keeps each record's mentions, so a table row can show its history.",
1400
+ fields: [
1401
+ {
1402
+ name: "lists",
1403
+ flag: "lists",
1404
+ type: "string[]",
1405
+ required: false,
1406
+ description: "Keep only the items of these lists. Without it, the items of every list."
1407
+ },
1408
+ {
1409
+ name: "fields",
1410
+ flag: "fields",
1411
+ type: "json",
1412
+ required: false
1413
+ }
1414
+ ]
1415
+ }
1416
+ ]
1417
+ },
1418
+ {
1419
+ name: "view",
1420
+ flag: "view",
1421
+ type: "json",
1422
+ required: false,
1423
+ description: "The widgets, top to bottom. Stats that follow each other share a row."
1424
+ }
1425
+ ]
1426
+ }
1427
+ ],
1428
+ files: [],
1429
+ credentialOrganization: false
1430
+ },
1431
+ hidden: true
1432
+ },
1433
+ {
1434
+ command: "dashboard data",
1435
+ tool: "dashboard_data_get",
1436
+ title: "Get dashboard data",
1437
+ description: "Group the execution results of a dashboard's workflows into records over a time window (`window`, such as `24h` or `7d`, default `7d`). Returns one row per record with its field values, when it was first and last seen, how many executions mention it, and whether the latest execution still does. One read takes the 2,000 most recent executions of the window, and `truncated` says when older ones were left out. Use it to check a spec after you save it. Staff only.",
1438
+ method: "GET",
1439
+ path: "/agents/v2/dashboards/{dashboardId}/data",
1440
+ args: [
1441
+ {
1442
+ name: "dashboardId",
1443
+ flag: "dashboard-id",
1444
+ type: "string",
1445
+ required: true
1446
+ }
1447
+ ],
1448
+ query: [
1449
+ {
1450
+ name: "window",
1451
+ flag: "window",
1452
+ type: "string",
1453
+ required: false,
1454
+ description: "How far back to read, such as `24h` or `7d`. At most 31 days."
1455
+ }
1456
+ ],
1457
+ binary: false,
1458
+ readOnly: true,
1459
+ destructive: false,
1460
+ hidden: true
1461
+ },
1462
+ {
1463
+ command: "dashboard delete",
1464
+ tool: "dashboard_delete",
1465
+ title: "Delete dashboard",
1466
+ description: "Delete a dashboard. The executions it reads stay. Staff only.",
1467
+ method: "DELETE",
1468
+ path: "/agents/v2/dashboards/{dashboardId}",
1469
+ args: [
1470
+ {
1471
+ name: "dashboardId",
1472
+ flag: "dashboard-id",
1473
+ type: "string",
1474
+ required: true
1475
+ }
1476
+ ],
1477
+ query: [],
1478
+ binary: false,
1479
+ readOnly: false,
1480
+ destructive: true,
1481
+ hidden: true
1482
+ },
1483
+ {
1484
+ command: "dashboard get",
1485
+ tool: "dashboard_get",
1486
+ title: "Get dashboard",
1487
+ description: "Get one dashboard with its spec. Staff only.",
1488
+ method: "GET",
1489
+ path: "/agents/v2/dashboards/{dashboardId}",
1490
+ args: [
1491
+ {
1492
+ name: "dashboardId",
1493
+ flag: "dashboard-id",
1494
+ type: "string",
1495
+ required: true
1496
+ }
1497
+ ],
1498
+ query: [],
1499
+ binary: false,
1500
+ readOnly: true,
1501
+ destructive: false,
1502
+ hidden: true
1503
+ },
1504
+ {
1505
+ command: "dashboard list",
1506
+ tool: "dashboards_list",
1507
+ title: "List dashboards",
1508
+ description: "List an organization's dashboards, most recently updated first. A dashboard is a page of widgets over the records one or more workflows produce, such as referrals. Filter to the dashboards that read one workflow with `workflowId`. Staff only.",
1509
+ method: "GET",
1510
+ path: "/agents/v2/dashboards",
1511
+ args: [],
1512
+ query: [
1513
+ {
1514
+ name: "workflowId",
1515
+ flag: "workflow-id",
1516
+ type: "string",
1517
+ required: false,
1518
+ description: "Only dashboards that read this workflow."
1519
+ },
1520
+ {
1521
+ name: "pageSize",
1522
+ flag: "page-size",
1523
+ type: "integer",
1524
+ required: false
1525
+ },
1526
+ {
1527
+ name: "page",
1528
+ flag: "page",
1529
+ type: "integer",
1530
+ required: false
1531
+ }
1532
+ ],
1533
+ binary: false,
1534
+ readOnly: true,
1535
+ destructive: false,
1536
+ hidden: true
1537
+ },
1538
+ {
1539
+ command: "dashboard update",
1540
+ tool: "dashboard_update",
1541
+ title: "Update dashboard",
1542
+ description: "Replace a dashboard's name and spec. Send the whole spec: get the dashboard, change its spec, and send it back. The `spec` names the workflows to read (`sources`), how their execution results group into records (`records`: every item in `lists` with the same value at `key` is one record, `fields` are computed per record with `latest`, `first`, `count`, `countDistinct`, `collect`, `countBy` or `maxCount`, and `timeline` keeps each record's history), and the widgets (`view`: `stat`, `breakdown`, `segments`, `activity`, `table`). A table needs `columns` and takes `tabs`, `sort`, `limit` and `detail`, and a row opens the record's detail and history. A widget's `field` and `where` use names from `records.fields` or the built-ins `key`, `firstSeenAt`, `lastSeenAt`, `executions`, `current`, `lastList`. A spec that does not validate returns 400 with the path of each fault. Staff only.",
1543
+ method: "PUT",
1544
+ path: "/agents/v2/dashboards/{dashboardId}",
1545
+ args: [
1546
+ {
1547
+ name: "dashboardId",
1548
+ flag: "dashboard-id",
1549
+ type: "string",
1550
+ required: true
1551
+ }
1552
+ ],
1553
+ query: [],
1554
+ binary: false,
1555
+ readOnly: false,
1556
+ destructive: false,
1557
+ body: {
1558
+ required: true,
1559
+ contentType: "application/json",
1560
+ fields: [
1561
+ {
1562
+ name: "name",
1563
+ flag: "name",
1564
+ type: "string",
1565
+ required: true
1566
+ },
1567
+ {
1568
+ name: "spec",
1569
+ flag: "spec",
1570
+ type: "json",
1571
+ required: true,
1572
+ description: "What a dashboard reads, how it groups the results into records, and what it shows.",
1573
+ fields: [
1574
+ {
1575
+ name: "sources",
1576
+ flag: "sources",
1577
+ type: "json",
1578
+ required: false
1579
+ },
1580
+ {
1581
+ name: "records",
1582
+ flag: "records",
1583
+ type: "json",
1584
+ required: false,
1585
+ description: "How execution results group into records. Every item in `lists` that carries the same value at `key` belongs to one record.",
1586
+ fields: [
1587
+ {
1588
+ name: "key",
1589
+ flag: "key",
1590
+ type: "string",
1591
+ required: false,
1592
+ description: "Dot path on each item to the value that identifies the record, such as `referral_id`. An item without it is skipped."
1593
+ },
1594
+ {
1595
+ name: "lists",
1596
+ flag: "lists",
1597
+ type: "json",
1598
+ required: false
1599
+ },
1600
+ {
1601
+ name: "fields",
1602
+ flag: "fields",
1603
+ type: "json",
1604
+ required: false
1605
+ },
1606
+ {
1607
+ name: "timeline",
1608
+ flag: "timeline",
1609
+ type: "json",
1610
+ required: false,
1611
+ description: "Keeps each record's mentions, so a table row can show its history.",
1612
+ fields: [
1613
+ {
1614
+ name: "lists",
1615
+ flag: "lists",
1616
+ type: "string[]",
1617
+ required: false,
1618
+ description: "Keep only the items of these lists. Without it, the items of every list."
1619
+ },
1620
+ {
1621
+ name: "fields",
1622
+ flag: "fields",
1623
+ type: "json",
1624
+ required: false
1625
+ }
1626
+ ]
1627
+ }
1628
+ ]
1629
+ },
1630
+ {
1631
+ name: "view",
1632
+ flag: "view",
1633
+ type: "json",
1634
+ required: false,
1635
+ description: "The widgets, top to bottom. Stats that follow each other share a row."
1636
+ }
1637
+ ]
1638
+ }
1639
+ ],
1640
+ files: [],
1641
+ credentialOrganization: false
1642
+ },
1643
+ hidden: true
1644
+ },
1333
1645
  {
1334
1646
  command: "docs search",
1335
1647
  tool: "search_docs",
@@ -8435,10 +8747,10 @@ function splitDotted(argv2) {
8435
8747
  }
8436
8748
  return { argv: rest, dotted: dotted2 };
8437
8749
  }
8438
- function group(parent, name, groups, path) {
8750
+ function group(parent, name, groups, path, hidden = false) {
8439
8751
  const existing = groups.get(path);
8440
8752
  if (existing) return existing;
8441
- const created = parent.command(name).description(`${name} commands`).helpCommand(false);
8753
+ const created = parent.command(name, { hidden }).description(`${name} commands`).helpCommand(false);
8442
8754
  groups.set(path, created);
8443
8755
  return created;
8444
8756
  }
@@ -8545,14 +8857,21 @@ function defineCommands(root, options, dotted2 = /* @__PURE__ */ new Map(), onIn
8545
8857
  });
8546
8858
  }
8547
8859
  const reserved = new Set((options.builtins ?? []).map((b) => b.command));
8860
+ const shown = new Set(
8861
+ options.commands.filter((command) => !command.hidden).flatMap((command) => {
8862
+ const words = command.command.split(" ");
8863
+ return words.slice(1).map((_, i) => words.slice(0, i + 1).join(" "));
8864
+ })
8865
+ );
8548
8866
  for (const command of options.commands) {
8549
8867
  if (reserved.has(command.command)) continue;
8550
8868
  const words = command.command.split(" ");
8551
8869
  let parent = root;
8552
8870
  for (let i = 0; i < words.length - 1; i++) {
8553
- parent = group(parent, words[i], groups, words.slice(0, i + 1).join(" "));
8871
+ const path = words.slice(0, i + 1).join(" ");
8872
+ parent = group(parent, words[i], groups, path, !shown.has(path));
8554
8873
  }
8555
- const leaf = parent.command(words.at(-1)).description(command.description).summary(command.title);
8874
+ const leaf = parent.command(words.at(-1), { hidden: command.hidden }).description(command.description).summary(command.title);
8556
8875
  const defaults = command.args.map(
8557
8876
  (arg) => options.defaultArg?.(command, arg)
8558
8877
  );
@@ -9109,7 +9428,7 @@ var ApiError = class extends Error {
9109
9428
  status;
9110
9429
  body;
9111
9430
  };
9112
- var VERSION = "1.9.571";
9431
+ var VERSION = "1.9.572";
9113
9432
  function problem(status, body, fallback) {
9114
9433
  if (body && typeof body === "object") {
9115
9434
  const record2 = body;
package/dist/core.js CHANGED
@@ -1351,6 +1351,318 @@ var COMMANDS = [
1351
1351
  credentialOrganization: false
1352
1352
  }
1353
1353
  },
1354
+ {
1355
+ command: "dashboard create",
1356
+ tool: "dashboard_create",
1357
+ title: "Create dashboard",
1358
+ description: "Create a dashboard. The `spec` names the workflows to read (`sources`), how their execution results group into records (`records`: every item in `lists` with the same value at `key` is one record, `fields` are computed per record with `latest`, `first`, `count`, `countDistinct`, `collect`, `countBy` or `maxCount`, and `timeline` keeps each record's history), and the widgets (`view`: `stat`, `breakdown`, `segments`, `activity`, `table`). A table needs `columns` and takes `tabs`, `sort`, `limit` and `detail`, and a row opens the record's detail and history. A widget's `field` and `where` use names from `records.fields` or the built-ins `key`, `firstSeenAt`, `lastSeenAt`, `executions`, `current`, `lastList`. A spec that does not validate returns 400 with the path of each fault. Read the dashboard's data after to check the records. The response's `id` opens at /dashboards/<id>. Staff only.",
1359
+ method: "POST",
1360
+ path: "/agents/v2/dashboards",
1361
+ args: [],
1362
+ query: [],
1363
+ binary: false,
1364
+ readOnly: false,
1365
+ destructive: false,
1366
+ body: {
1367
+ required: true,
1368
+ contentType: "application/json",
1369
+ fields: [
1370
+ {
1371
+ name: "name",
1372
+ flag: "name",
1373
+ type: "string",
1374
+ required: true
1375
+ },
1376
+ {
1377
+ name: "spec",
1378
+ flag: "spec",
1379
+ type: "json",
1380
+ required: true,
1381
+ description: "What a dashboard reads, how it groups the results into records, and what it shows.",
1382
+ fields: [
1383
+ {
1384
+ name: "sources",
1385
+ flag: "sources",
1386
+ type: "json",
1387
+ required: false
1388
+ },
1389
+ {
1390
+ name: "records",
1391
+ flag: "records",
1392
+ type: "json",
1393
+ required: false,
1394
+ description: "How execution results group into records. Every item in `lists` that carries the same value at `key` belongs to one record.",
1395
+ fields: [
1396
+ {
1397
+ name: "key",
1398
+ flag: "key",
1399
+ type: "string",
1400
+ required: false,
1401
+ description: "Dot path on each item to the value that identifies the record, such as `referral_id`. An item without it is skipped."
1402
+ },
1403
+ {
1404
+ name: "lists",
1405
+ flag: "lists",
1406
+ type: "json",
1407
+ required: false
1408
+ },
1409
+ {
1410
+ name: "fields",
1411
+ flag: "fields",
1412
+ type: "json",
1413
+ required: false
1414
+ },
1415
+ {
1416
+ name: "timeline",
1417
+ flag: "timeline",
1418
+ type: "json",
1419
+ required: false,
1420
+ description: "Keeps each record's mentions, so a table row can show its history.",
1421
+ fields: [
1422
+ {
1423
+ name: "lists",
1424
+ flag: "lists",
1425
+ type: "string[]",
1426
+ required: false,
1427
+ description: "Keep only the items of these lists. Without it, the items of every list."
1428
+ },
1429
+ {
1430
+ name: "fields",
1431
+ flag: "fields",
1432
+ type: "json",
1433
+ required: false
1434
+ }
1435
+ ]
1436
+ }
1437
+ ]
1438
+ },
1439
+ {
1440
+ name: "view",
1441
+ flag: "view",
1442
+ type: "json",
1443
+ required: false,
1444
+ description: "The widgets, top to bottom. Stats that follow each other share a row."
1445
+ }
1446
+ ]
1447
+ }
1448
+ ],
1449
+ files: [],
1450
+ credentialOrganization: false
1451
+ },
1452
+ hidden: true
1453
+ },
1454
+ {
1455
+ command: "dashboard data",
1456
+ tool: "dashboard_data_get",
1457
+ title: "Get dashboard data",
1458
+ description: "Group the execution results of a dashboard's workflows into records over a time window (`window`, such as `24h` or `7d`, default `7d`). Returns one row per record with its field values, when it was first and last seen, how many executions mention it, and whether the latest execution still does. One read takes the 2,000 most recent executions of the window, and `truncated` says when older ones were left out. Use it to check a spec after you save it. Staff only.",
1459
+ method: "GET",
1460
+ path: "/agents/v2/dashboards/{dashboardId}/data",
1461
+ args: [
1462
+ {
1463
+ name: "dashboardId",
1464
+ flag: "dashboard-id",
1465
+ type: "string",
1466
+ required: true
1467
+ }
1468
+ ],
1469
+ query: [
1470
+ {
1471
+ name: "window",
1472
+ flag: "window",
1473
+ type: "string",
1474
+ required: false,
1475
+ description: "How far back to read, such as `24h` or `7d`. At most 31 days."
1476
+ }
1477
+ ],
1478
+ binary: false,
1479
+ readOnly: true,
1480
+ destructive: false,
1481
+ hidden: true
1482
+ },
1483
+ {
1484
+ command: "dashboard delete",
1485
+ tool: "dashboard_delete",
1486
+ title: "Delete dashboard",
1487
+ description: "Delete a dashboard. The executions it reads stay. Staff only.",
1488
+ method: "DELETE",
1489
+ path: "/agents/v2/dashboards/{dashboardId}",
1490
+ args: [
1491
+ {
1492
+ name: "dashboardId",
1493
+ flag: "dashboard-id",
1494
+ type: "string",
1495
+ required: true
1496
+ }
1497
+ ],
1498
+ query: [],
1499
+ binary: false,
1500
+ readOnly: false,
1501
+ destructive: true,
1502
+ hidden: true
1503
+ },
1504
+ {
1505
+ command: "dashboard get",
1506
+ tool: "dashboard_get",
1507
+ title: "Get dashboard",
1508
+ description: "Get one dashboard with its spec. Staff only.",
1509
+ method: "GET",
1510
+ path: "/agents/v2/dashboards/{dashboardId}",
1511
+ args: [
1512
+ {
1513
+ name: "dashboardId",
1514
+ flag: "dashboard-id",
1515
+ type: "string",
1516
+ required: true
1517
+ }
1518
+ ],
1519
+ query: [],
1520
+ binary: false,
1521
+ readOnly: true,
1522
+ destructive: false,
1523
+ hidden: true
1524
+ },
1525
+ {
1526
+ command: "dashboard list",
1527
+ tool: "dashboards_list",
1528
+ title: "List dashboards",
1529
+ description: "List an organization's dashboards, most recently updated first. A dashboard is a page of widgets over the records one or more workflows produce, such as referrals. Filter to the dashboards that read one workflow with `workflowId`. Staff only.",
1530
+ method: "GET",
1531
+ path: "/agents/v2/dashboards",
1532
+ args: [],
1533
+ query: [
1534
+ {
1535
+ name: "workflowId",
1536
+ flag: "workflow-id",
1537
+ type: "string",
1538
+ required: false,
1539
+ description: "Only dashboards that read this workflow."
1540
+ },
1541
+ {
1542
+ name: "pageSize",
1543
+ flag: "page-size",
1544
+ type: "integer",
1545
+ required: false
1546
+ },
1547
+ {
1548
+ name: "page",
1549
+ flag: "page",
1550
+ type: "integer",
1551
+ required: false
1552
+ }
1553
+ ],
1554
+ binary: false,
1555
+ readOnly: true,
1556
+ destructive: false,
1557
+ hidden: true
1558
+ },
1559
+ {
1560
+ command: "dashboard update",
1561
+ tool: "dashboard_update",
1562
+ title: "Update dashboard",
1563
+ description: "Replace a dashboard's name and spec. Send the whole spec: get the dashboard, change its spec, and send it back. The `spec` names the workflows to read (`sources`), how their execution results group into records (`records`: every item in `lists` with the same value at `key` is one record, `fields` are computed per record with `latest`, `first`, `count`, `countDistinct`, `collect`, `countBy` or `maxCount`, and `timeline` keeps each record's history), and the widgets (`view`: `stat`, `breakdown`, `segments`, `activity`, `table`). A table needs `columns` and takes `tabs`, `sort`, `limit` and `detail`, and a row opens the record's detail and history. A widget's `field` and `where` use names from `records.fields` or the built-ins `key`, `firstSeenAt`, `lastSeenAt`, `executions`, `current`, `lastList`. A spec that does not validate returns 400 with the path of each fault. Staff only.",
1564
+ method: "PUT",
1565
+ path: "/agents/v2/dashboards/{dashboardId}",
1566
+ args: [
1567
+ {
1568
+ name: "dashboardId",
1569
+ flag: "dashboard-id",
1570
+ type: "string",
1571
+ required: true
1572
+ }
1573
+ ],
1574
+ query: [],
1575
+ binary: false,
1576
+ readOnly: false,
1577
+ destructive: false,
1578
+ body: {
1579
+ required: true,
1580
+ contentType: "application/json",
1581
+ fields: [
1582
+ {
1583
+ name: "name",
1584
+ flag: "name",
1585
+ type: "string",
1586
+ required: true
1587
+ },
1588
+ {
1589
+ name: "spec",
1590
+ flag: "spec",
1591
+ type: "json",
1592
+ required: true,
1593
+ description: "What a dashboard reads, how it groups the results into records, and what it shows.",
1594
+ fields: [
1595
+ {
1596
+ name: "sources",
1597
+ flag: "sources",
1598
+ type: "json",
1599
+ required: false
1600
+ },
1601
+ {
1602
+ name: "records",
1603
+ flag: "records",
1604
+ type: "json",
1605
+ required: false,
1606
+ description: "How execution results group into records. Every item in `lists` that carries the same value at `key` belongs to one record.",
1607
+ fields: [
1608
+ {
1609
+ name: "key",
1610
+ flag: "key",
1611
+ type: "string",
1612
+ required: false,
1613
+ description: "Dot path on each item to the value that identifies the record, such as `referral_id`. An item without it is skipped."
1614
+ },
1615
+ {
1616
+ name: "lists",
1617
+ flag: "lists",
1618
+ type: "json",
1619
+ required: false
1620
+ },
1621
+ {
1622
+ name: "fields",
1623
+ flag: "fields",
1624
+ type: "json",
1625
+ required: false
1626
+ },
1627
+ {
1628
+ name: "timeline",
1629
+ flag: "timeline",
1630
+ type: "json",
1631
+ required: false,
1632
+ description: "Keeps each record's mentions, so a table row can show its history.",
1633
+ fields: [
1634
+ {
1635
+ name: "lists",
1636
+ flag: "lists",
1637
+ type: "string[]",
1638
+ required: false,
1639
+ description: "Keep only the items of these lists. Without it, the items of every list."
1640
+ },
1641
+ {
1642
+ name: "fields",
1643
+ flag: "fields",
1644
+ type: "json",
1645
+ required: false
1646
+ }
1647
+ ]
1648
+ }
1649
+ ]
1650
+ },
1651
+ {
1652
+ name: "view",
1653
+ flag: "view",
1654
+ type: "json",
1655
+ required: false,
1656
+ description: "The widgets, top to bottom. Stats that follow each other share a row."
1657
+ }
1658
+ ]
1659
+ }
1660
+ ],
1661
+ files: [],
1662
+ credentialOrganization: false
1663
+ },
1664
+ hidden: true
1665
+ },
1354
1666
  {
1355
1667
  command: "docs search",
1356
1668
  tool: "search_docs",
@@ -8196,10 +8508,10 @@ function splitDotted(argv) {
8196
8508
  }
8197
8509
  return { argv: rest, dotted: dotted2 };
8198
8510
  }
8199
- function group(parent, name, groups, path) {
8511
+ function group(parent, name, groups, path, hidden = false) {
8200
8512
  const existing = groups.get(path);
8201
8513
  if (existing) return existing;
8202
- const created = parent.command(name).description(`${name} commands`).helpCommand(false);
8514
+ const created = parent.command(name, { hidden }).description(`${name} commands`).helpCommand(false);
8203
8515
  groups.set(path, created);
8204
8516
  return created;
8205
8517
  }
@@ -8306,14 +8618,21 @@ function defineCommands(root, options, dotted2 = /* @__PURE__ */ new Map(), onIn
8306
8618
  });
8307
8619
  }
8308
8620
  const reserved = new Set((options.builtins ?? []).map((b) => b.command));
8621
+ const shown = new Set(
8622
+ options.commands.filter((command) => !command.hidden).flatMap((command) => {
8623
+ const words = command.command.split(" ");
8624
+ return words.slice(1).map((_, i) => words.slice(0, i + 1).join(" "));
8625
+ })
8626
+ );
8309
8627
  for (const command of options.commands) {
8310
8628
  if (reserved.has(command.command)) continue;
8311
8629
  const words = command.command.split(" ");
8312
8630
  let parent = root;
8313
8631
  for (let i = 0; i < words.length - 1; i++) {
8314
- parent = group(parent, words[i], groups, words.slice(0, i + 1).join(" "));
8632
+ const path = words.slice(0, i + 1).join(" ");
8633
+ parent = group(parent, words[i], groups, path, !shown.has(path));
8315
8634
  }
8316
- const leaf = parent.command(words.at(-1)).description(command.description).summary(command.title);
8635
+ const leaf = parent.command(words.at(-1), { hidden: command.hidden }).description(command.description).summary(command.title);
8317
8636
  const defaults = command.args.map(
8318
8637
  (arg) => options.defaultArg?.(command, arg)
8319
8638
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteroidai/cli",
3
- "version": "1.9.571",
3
+ "version": "1.9.572",
4
4
  "description": "The asteroid command-line interface for the Asteroid platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",