@allocator-one/harness-cli 1.8.0 → 1.10.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.
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ ACTIVITY_MAX_LIMIT,
3
4
  CLI_VERSION,
4
5
  Client,
5
6
  HttpError,
@@ -7,6 +8,7 @@ import {
7
8
  RELATION_UPDATE_TYPES,
8
9
  TransportError,
9
10
  UsageError,
11
+ activity,
10
12
  archive,
11
13
  blocked,
12
14
  close,
@@ -59,7 +61,7 @@ import {
59
61
  upload,
60
62
  userList,
61
63
  workflowStates
62
- } from "./chunk-NQVQNKMC.js";
64
+ } from "./chunk-KKAAKRKF.js";
63
65
 
64
66
  // src/mcp/server.ts
65
67
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -161,6 +163,17 @@ var TOOLS = [
161
163
  shape: { id: identifier, images: z.boolean().optional() },
162
164
  handler: (ctx, args) => show(ctx, args["id"], { images: args["images"] === true })
163
165
  },
166
+ {
167
+ name: "activity_list",
168
+ description: "Mixed issue activity: comments, creation, and state changes. Returns the newest page unless all=true.",
169
+ readOnly: true,
170
+ shape: {
171
+ id: identifier,
172
+ limit: z.number().int().min(1).max(ACTIVITY_MAX_LIMIT).optional().describe(`entries per page (default 20, max ${ACTIVITY_MAX_LIMIT})`),
173
+ all: z.boolean().optional().describe("follow cursors through all older activity")
174
+ },
175
+ handler: (ctx, args) => activity(ctx, args["id"], args)
176
+ },
164
177
  {
165
178
  name: "issue_create",
166
179
  description: "Create an issue. type becomes a type/ label.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allocator-one/harness-cli",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "CLI and MCP server for Harness, allocator.one's issue tracker",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/spec/openapi.json CHANGED
@@ -973,6 +973,9 @@
973
973
  "type": "string"
974
974
  }
975
975
  },
976
+ "required": [
977
+ "url"
978
+ ],
976
979
  "type": "object"
977
980
  }
978
981
  }
@@ -1280,6 +1283,361 @@
1280
1283
  "tags": []
1281
1284
  }
1282
1285
  },
1286
+ "/api/v1/issues/{identifier}/activity": {
1287
+ "get": {
1288
+ "callbacks": {},
1289
+ "deprecated": false,
1290
+ "description": "Requires the `harness:read` scope. The newest mixed page of comments and issue-state events, returned oldest-first. `has_more` means older entries exist. Pass the opaque `next_cursor` back as `before`; cursors are bound to the issue and viewer and expire after 24 hours.",
1291
+ "parameters": [
1292
+ {
1293
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1294
+ "in": "path",
1295
+ "name": "identifier",
1296
+ "required": true,
1297
+ "schema": {
1298
+ "type": "string"
1299
+ }
1300
+ },
1301
+ {
1302
+ "description": "Opaque cursor returned as `meta.next_cursor` by the preceding newer page",
1303
+ "in": "query",
1304
+ "name": "before",
1305
+ "required": false,
1306
+ "schema": {
1307
+ "type": "string"
1308
+ }
1309
+ },
1310
+ {
1311
+ "description": "Entries per page (default 20, max 100)",
1312
+ "in": "query",
1313
+ "name": "limit",
1314
+ "required": false,
1315
+ "schema": {
1316
+ "maximum": 100,
1317
+ "minimum": 1,
1318
+ "type": "integer"
1319
+ }
1320
+ }
1321
+ ],
1322
+ "responses": {
1323
+ "200": {
1324
+ "content": {
1325
+ "application/json": {
1326
+ "schema": {
1327
+ "properties": {
1328
+ "data": {
1329
+ "items": {
1330
+ "oneOf": [
1331
+ {
1332
+ "additionalProperties": false,
1333
+ "properties": {
1334
+ "comment": {
1335
+ "properties": {
1336
+ "author": {
1337
+ "nullable": true,
1338
+ "properties": {
1339
+ "email": {
1340
+ "nullable": true,
1341
+ "type": "string"
1342
+ },
1343
+ "id": {
1344
+ "format": "uuid",
1345
+ "nullable": true,
1346
+ "type": "string"
1347
+ },
1348
+ "name": {
1349
+ "nullable": true,
1350
+ "type": "string"
1351
+ }
1352
+ },
1353
+ "required": [
1354
+ "id",
1355
+ "name",
1356
+ "email"
1357
+ ],
1358
+ "type": "object"
1359
+ },
1360
+ "body": {
1361
+ "description": "Comment text; null may mean a deleted tombstone or no stored text. Use `deleted` to identify tombstones",
1362
+ "nullable": true,
1363
+ "type": "string"
1364
+ },
1365
+ "deleted": {
1366
+ "description": "Whether the comment is a deleted tombstone",
1367
+ "type": "boolean"
1368
+ },
1369
+ "id": {
1370
+ "format": "uuid",
1371
+ "type": "string"
1372
+ },
1373
+ "inserted_at": {
1374
+ "format": "date-time",
1375
+ "type": "string"
1376
+ },
1377
+ "mentions": {
1378
+ "items": {
1379
+ "properties": {
1380
+ "email": {
1381
+ "nullable": true,
1382
+ "type": "string"
1383
+ },
1384
+ "name": {
1385
+ "nullable": true,
1386
+ "type": "string"
1387
+ },
1388
+ "user_id": {
1389
+ "format": "uuid",
1390
+ "nullable": true,
1391
+ "type": "string"
1392
+ }
1393
+ },
1394
+ "required": [
1395
+ "user_id",
1396
+ "name",
1397
+ "email"
1398
+ ],
1399
+ "type": "object"
1400
+ },
1401
+ "type": "array"
1402
+ },
1403
+ "reactions": {
1404
+ "items": {
1405
+ "properties": {
1406
+ "count": {
1407
+ "type": "integer"
1408
+ },
1409
+ "emoji": {
1410
+ "type": "string"
1411
+ },
1412
+ "reacted_by_current_actor": {
1413
+ "type": "boolean"
1414
+ }
1415
+ },
1416
+ "required": [
1417
+ "emoji",
1418
+ "count",
1419
+ "reacted_by_current_actor"
1420
+ ],
1421
+ "type": "object"
1422
+ },
1423
+ "type": "array"
1424
+ },
1425
+ "updated_at": {
1426
+ "format": "date-time",
1427
+ "type": "string"
1428
+ }
1429
+ },
1430
+ "required": [
1431
+ "id",
1432
+ "body",
1433
+ "deleted",
1434
+ "author",
1435
+ "mentions",
1436
+ "reactions",
1437
+ "inserted_at",
1438
+ "updated_at"
1439
+ ],
1440
+ "type": "object"
1441
+ },
1442
+ "id": {
1443
+ "type": "string"
1444
+ },
1445
+ "kind": {
1446
+ "enum": [
1447
+ "comment"
1448
+ ],
1449
+ "type": "string"
1450
+ },
1451
+ "occurred_at": {
1452
+ "format": "date-time",
1453
+ "type": "string"
1454
+ }
1455
+ },
1456
+ "required": [
1457
+ "id",
1458
+ "kind",
1459
+ "occurred_at",
1460
+ "comment"
1461
+ ],
1462
+ "type": "object"
1463
+ },
1464
+ {
1465
+ "additionalProperties": false,
1466
+ "properties": {
1467
+ "action": {
1468
+ "enum": [
1469
+ "created",
1470
+ "milestone",
1471
+ "transition"
1472
+ ],
1473
+ "type": "string"
1474
+ },
1475
+ "actor": {
1476
+ "properties": {
1477
+ "kind": {
1478
+ "enum": [
1479
+ "system",
1480
+ "user",
1481
+ "deleted_user",
1482
+ "unknown"
1483
+ ],
1484
+ "type": "string"
1485
+ },
1486
+ "name": {
1487
+ "nullable": true,
1488
+ "type": "string"
1489
+ }
1490
+ },
1491
+ "required": [
1492
+ "kind",
1493
+ "name"
1494
+ ],
1495
+ "type": "object"
1496
+ },
1497
+ "from_state": {
1498
+ "nullable": true,
1499
+ "properties": {
1500
+ "key": {
1501
+ "nullable": true,
1502
+ "type": "string"
1503
+ },
1504
+ "name": {
1505
+ "nullable": true,
1506
+ "type": "string"
1507
+ },
1508
+ "type": {
1509
+ "nullable": true,
1510
+ "type": "string"
1511
+ }
1512
+ },
1513
+ "required": [
1514
+ "key",
1515
+ "name",
1516
+ "type"
1517
+ ],
1518
+ "type": "object"
1519
+ },
1520
+ "id": {
1521
+ "type": "string"
1522
+ },
1523
+ "kind": {
1524
+ "enum": [
1525
+ "state_event"
1526
+ ],
1527
+ "type": "string"
1528
+ },
1529
+ "occurred_at": {
1530
+ "format": "date-time",
1531
+ "type": "string"
1532
+ },
1533
+ "provenance": {
1534
+ "properties": {
1535
+ "kind": {
1536
+ "enum": [
1537
+ "live",
1538
+ "import",
1539
+ "backfill"
1540
+ ],
1541
+ "type": "string"
1542
+ },
1543
+ "witnessed": {
1544
+ "type": "boolean"
1545
+ }
1546
+ },
1547
+ "required": [
1548
+ "kind",
1549
+ "witnessed"
1550
+ ],
1551
+ "type": "object"
1552
+ },
1553
+ "to_state": {
1554
+ "properties": {
1555
+ "key": {
1556
+ "nullable": true,
1557
+ "type": "string"
1558
+ },
1559
+ "name": {
1560
+ "nullable": true,
1561
+ "type": "string"
1562
+ },
1563
+ "type": {
1564
+ "nullable": true,
1565
+ "type": "string"
1566
+ }
1567
+ },
1568
+ "required": [
1569
+ "key",
1570
+ "name",
1571
+ "type"
1572
+ ],
1573
+ "type": "object"
1574
+ }
1575
+ },
1576
+ "required": [
1577
+ "id",
1578
+ "kind",
1579
+ "occurred_at",
1580
+ "action",
1581
+ "actor",
1582
+ "provenance",
1583
+ "from_state",
1584
+ "to_state"
1585
+ ],
1586
+ "type": "object"
1587
+ }
1588
+ ]
1589
+ },
1590
+ "type": "array"
1591
+ },
1592
+ "meta": {
1593
+ "properties": {
1594
+ "has_more": {
1595
+ "description": "Whether older entries exist",
1596
+ "type": "boolean"
1597
+ },
1598
+ "next_cursor": {
1599
+ "description": "Opaque cursor to pass as `before`; null when no older entries exist",
1600
+ "nullable": true,
1601
+ "type": "string"
1602
+ }
1603
+ },
1604
+ "required": [
1605
+ "has_more",
1606
+ "next_cursor"
1607
+ ],
1608
+ "type": "object"
1609
+ }
1610
+ },
1611
+ "required": [
1612
+ "data",
1613
+ "meta"
1614
+ ],
1615
+ "type": "object"
1616
+ }
1617
+ }
1618
+ },
1619
+ "description": "Success"
1620
+ },
1621
+ "400": {
1622
+ "description": "Invalid input. Error code is `invalid_cursor` for an invalid or expired cursor, or `bad_request` for a malformed `before` value or invalid limit."
1623
+ },
1624
+ "401": {
1625
+ "description": "Missing or invalid token"
1626
+ },
1627
+ "403": {
1628
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
1629
+ },
1630
+ "404": {
1631
+ "description": "Not found"
1632
+ },
1633
+ "422": {
1634
+ "description": "Validation error"
1635
+ }
1636
+ },
1637
+ "summary": "List issue activity",
1638
+ "tags": []
1639
+ }
1640
+ },
1283
1641
  "/api/v1/users": {
1284
1642
  "get": {
1285
1643
  "callbacks": {},
@@ -2479,9 +2837,12 @@
2479
2837
  "type": "object"
2480
2838
  },
2481
2839
  "body": {
2840
+ "description": "Comment text; null may mean a deleted tombstone or no stored text. Use `deleted` to identify tombstones",
2841
+ "nullable": true,
2482
2842
  "type": "string"
2483
2843
  },
2484
2844
  "deleted": {
2845
+ "description": "Whether the comment is a deleted tombstone",
2485
2846
  "type": "boolean"
2486
2847
  },
2487
2848
  "id": {