@desplega.ai/agent-swarm 1.80.3 → 1.81.1

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/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Agent Swarm API",
5
- "version": "1.80.3",
5
+ "version": "1.81.1",
6
6
  "description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
7
7
  },
8
8
  "servers": [
@@ -7358,6 +7358,15 @@
7358
7358
  "required": false,
7359
7359
  "name": "q",
7360
7360
  "in": "query"
7361
+ },
7362
+ {
7363
+ "schema": {
7364
+ "type": "string",
7365
+ "minLength": 1
7366
+ },
7367
+ "required": false,
7368
+ "name": "requestedByUserId",
7369
+ "in": "query"
7361
7370
  }
7362
7371
  ],
7363
7372
  "responses": {
@@ -10418,7 +10427,7 @@
10418
10427
  },
10419
10428
  "/api/users": {
10420
10429
  "get": {
10421
- "summary": "List all users",
10430
+ "summary": "List all users with identities, token summaries and recent events",
10422
10431
  "tags": [
10423
10432
  "Users"
10424
10433
  ],
@@ -10427,6 +10436,21 @@
10427
10436
  "bearerAuth": []
10428
10437
  }
10429
10438
  ],
10439
+ "parameters": [
10440
+ {
10441
+ "schema": {
10442
+ "type": [
10443
+ "integer",
10444
+ "null"
10445
+ ],
10446
+ "minimum": 0,
10447
+ "maximum": 50
10448
+ },
10449
+ "required": false,
10450
+ "name": "recentEvents",
10451
+ "in": "query"
10452
+ }
10453
+ ],
10430
10454
  "responses": {
10431
10455
  "200": {
10432
10456
  "description": "List of users"
@@ -10437,7 +10461,7 @@
10437
10461
  }
10438
10462
  },
10439
10463
  "post": {
10440
- "summary": "Create a new user",
10464
+ "summary": "Create a new user (optionally with initial identity links)",
10441
10465
  "tags": [
10442
10466
  "Users"
10443
10467
  ],
@@ -10465,18 +10489,6 @@
10465
10489
  "notes": {
10466
10490
  "type": "string"
10467
10491
  },
10468
- "slackUserId": {
10469
- "type": "string"
10470
- },
10471
- "linearUserId": {
10472
- "type": "string"
10473
- },
10474
- "githubUsername": {
10475
- "type": "string"
10476
- },
10477
- "gitlabUsername": {
10478
- "type": "string"
10479
- },
10480
10492
  "emailAliases": {
10481
10493
  "type": "array",
10482
10494
  "items": {
@@ -10488,6 +10500,44 @@
10488
10500
  },
10489
10501
  "timezone": {
10490
10502
  "type": "string"
10503
+ },
10504
+ "metadata": {
10505
+ "type": "object",
10506
+ "additionalProperties": {}
10507
+ },
10508
+ "dailyBudgetUsd": {
10509
+ "type": [
10510
+ "number",
10511
+ "null"
10512
+ ]
10513
+ },
10514
+ "status": {
10515
+ "type": "string",
10516
+ "enum": [
10517
+ "invited",
10518
+ "active",
10519
+ "suspended"
10520
+ ]
10521
+ },
10522
+ "identities": {
10523
+ "type": "array",
10524
+ "items": {
10525
+ "type": "object",
10526
+ "properties": {
10527
+ "kind": {
10528
+ "type": "string",
10529
+ "minLength": 1
10530
+ },
10531
+ "externalId": {
10532
+ "type": "string",
10533
+ "minLength": 1
10534
+ }
10535
+ },
10536
+ "required": [
10537
+ "kind",
10538
+ "externalId"
10539
+ ]
10540
+ }
10491
10541
  }
10492
10542
  },
10493
10543
  "required": [
@@ -10510,9 +10560,179 @@
10510
10560
  }
10511
10561
  }
10512
10562
  },
10563
+ "/api/users/unmapped": {
10564
+ "get": {
10565
+ "summary": "List unmapped external identities (kv-backed triage queue)",
10566
+ "tags": [
10567
+ "Users"
10568
+ ],
10569
+ "security": [
10570
+ {
10571
+ "bearerAuth": []
10572
+ }
10573
+ ],
10574
+ "parameters": [
10575
+ {
10576
+ "schema": {
10577
+ "type": "string"
10578
+ },
10579
+ "required": false,
10580
+ "name": "kind",
10581
+ "in": "query"
10582
+ },
10583
+ {
10584
+ "schema": {
10585
+ "type": "integer",
10586
+ "minimum": 1,
10587
+ "maximum": 1000
10588
+ },
10589
+ "required": false,
10590
+ "name": "limit",
10591
+ "in": "query"
10592
+ }
10593
+ ],
10594
+ "responses": {
10595
+ "200": {
10596
+ "description": "List of unmapped identities sorted by count DESC, lastSeenAt DESC"
10597
+ },
10598
+ "401": {
10599
+ "description": "Unauthorized"
10600
+ }
10601
+ }
10602
+ }
10603
+ },
10604
+ "/api/users/unmapped/{kind}/{externalId}/resolve": {
10605
+ "post": {
10606
+ "summary": "Resolve an unmapped identity — link to an existing user or create a new one",
10607
+ "tags": [
10608
+ "Users"
10609
+ ],
10610
+ "security": [
10611
+ {
10612
+ "bearerAuth": []
10613
+ }
10614
+ ],
10615
+ "parameters": [
10616
+ {
10617
+ "schema": {
10618
+ "type": "string"
10619
+ },
10620
+ "required": true,
10621
+ "name": "kind",
10622
+ "in": "path"
10623
+ },
10624
+ {
10625
+ "schema": {
10626
+ "type": "string"
10627
+ },
10628
+ "required": true,
10629
+ "name": "externalId",
10630
+ "in": "path"
10631
+ }
10632
+ ],
10633
+ "requestBody": {
10634
+ "content": {
10635
+ "application/json": {
10636
+ "schema": {
10637
+ "anyOf": [
10638
+ {
10639
+ "type": "object",
10640
+ "properties": {
10641
+ "userId": {
10642
+ "type": "string",
10643
+ "minLength": 1
10644
+ }
10645
+ },
10646
+ "required": [
10647
+ "userId"
10648
+ ]
10649
+ },
10650
+ {
10651
+ "type": "object",
10652
+ "properties": {
10653
+ "name": {
10654
+ "type": "string",
10655
+ "minLength": 1
10656
+ },
10657
+ "email": {
10658
+ "type": "string",
10659
+ "format": "email"
10660
+ }
10661
+ },
10662
+ "required": [
10663
+ "name",
10664
+ "email"
10665
+ ]
10666
+ }
10667
+ ]
10668
+ }
10669
+ }
10670
+ }
10671
+ },
10672
+ "responses": {
10673
+ "200": {
10674
+ "description": "Identity linked + kv entries cleared"
10675
+ },
10676
+ "400": {
10677
+ "description": "Validation error"
10678
+ },
10679
+ "401": {
10680
+ "description": "Unauthorized"
10681
+ },
10682
+ "404": {
10683
+ "description": "Target user not found"
10684
+ }
10685
+ }
10686
+ }
10687
+ },
10513
10688
  "/api/users/{id}": {
10514
- "put": {
10515
- "summary": "Update an existing user (partial at least one field required)",
10689
+ "get": {
10690
+ "summary": "Get a user by ID with identities, token summaries and recent events",
10691
+ "tags": [
10692
+ "Users"
10693
+ ],
10694
+ "security": [
10695
+ {
10696
+ "bearerAuth": []
10697
+ }
10698
+ ],
10699
+ "parameters": [
10700
+ {
10701
+ "schema": {
10702
+ "type": "string"
10703
+ },
10704
+ "required": true,
10705
+ "name": "id",
10706
+ "in": "path"
10707
+ },
10708
+ {
10709
+ "schema": {
10710
+ "type": [
10711
+ "integer",
10712
+ "null"
10713
+ ],
10714
+ "minimum": 0,
10715
+ "maximum": 200
10716
+ },
10717
+ "required": false,
10718
+ "name": "recentEvents",
10719
+ "in": "query"
10720
+ }
10721
+ ],
10722
+ "responses": {
10723
+ "200": {
10724
+ "description": "User row"
10725
+ },
10726
+ "401": {
10727
+ "description": "Unauthorized"
10728
+ },
10729
+ "404": {
10730
+ "description": "User not found"
10731
+ }
10732
+ }
10733
+ },
10734
+ "patch": {
10735
+ "summary": "Update an existing user (profile / budget / status / email-aliases / identities)",
10516
10736
  "tags": [
10517
10737
  "Users"
10518
10738
  ],
@@ -10550,18 +10770,6 @@
10550
10770
  "notes": {
10551
10771
  "type": "string"
10552
10772
  },
10553
- "slackUserId": {
10554
- "type": "string"
10555
- },
10556
- "linearUserId": {
10557
- "type": "string"
10558
- },
10559
- "githubUsername": {
10560
- "type": "string"
10561
- },
10562
- "gitlabUsername": {
10563
- "type": "string"
10564
- },
10565
10773
  "emailAliases": {
10566
10774
  "type": "array",
10567
10775
  "items": {
@@ -10573,6 +10781,47 @@
10573
10781
  },
10574
10782
  "timezone": {
10575
10783
  "type": "string"
10784
+ },
10785
+ "metadata": {
10786
+ "type": [
10787
+ "object",
10788
+ "null"
10789
+ ],
10790
+ "additionalProperties": {}
10791
+ },
10792
+ "dailyBudgetUsd": {
10793
+ "type": [
10794
+ "number",
10795
+ "null"
10796
+ ]
10797
+ },
10798
+ "status": {
10799
+ "type": "string",
10800
+ "enum": [
10801
+ "invited",
10802
+ "active",
10803
+ "suspended"
10804
+ ]
10805
+ },
10806
+ "identities": {
10807
+ "type": "array",
10808
+ "items": {
10809
+ "type": "object",
10810
+ "properties": {
10811
+ "kind": {
10812
+ "type": "string",
10813
+ "minLength": 1
10814
+ },
10815
+ "externalId": {
10816
+ "type": "string",
10817
+ "minLength": 1
10818
+ }
10819
+ },
10820
+ "required": [
10821
+ "kind",
10822
+ "externalId"
10823
+ ]
10824
+ }
10576
10825
  }
10577
10826
  }
10578
10827
  }
@@ -10595,6 +10844,223 @@
10595
10844
  }
10596
10845
  }
10597
10846
  },
10847
+ "/api/users/{id}/merge": {
10848
+ "post": {
10849
+ "summary": "Merge another user into this one — moves identities + email aliases, deletes source",
10850
+ "tags": [
10851
+ "Users"
10852
+ ],
10853
+ "security": [
10854
+ {
10855
+ "bearerAuth": []
10856
+ }
10857
+ ],
10858
+ "parameters": [
10859
+ {
10860
+ "schema": {
10861
+ "type": "string"
10862
+ },
10863
+ "required": true,
10864
+ "name": "id",
10865
+ "in": "path"
10866
+ }
10867
+ ],
10868
+ "requestBody": {
10869
+ "content": {
10870
+ "application/json": {
10871
+ "schema": {
10872
+ "type": "object",
10873
+ "properties": {
10874
+ "sourceUserId": {
10875
+ "type": "string",
10876
+ "minLength": 1
10877
+ }
10878
+ },
10879
+ "required": [
10880
+ "sourceUserId"
10881
+ ]
10882
+ }
10883
+ }
10884
+ }
10885
+ },
10886
+ "responses": {
10887
+ "200": {
10888
+ "description": "Merged user"
10889
+ },
10890
+ "400": {
10891
+ "description": "Validation error (e.g. target == source)"
10892
+ },
10893
+ "401": {
10894
+ "description": "Unauthorized"
10895
+ },
10896
+ "404": {
10897
+ "description": "Target or source user not found"
10898
+ }
10899
+ }
10900
+ }
10901
+ },
10902
+ "/api/users/{id}/events": {
10903
+ "get": {
10904
+ "summary": "Paginated identity-event timeline for a user (DESC by createdAt)",
10905
+ "tags": [
10906
+ "Users"
10907
+ ],
10908
+ "security": [
10909
+ {
10910
+ "bearerAuth": []
10911
+ }
10912
+ ],
10913
+ "parameters": [
10914
+ {
10915
+ "schema": {
10916
+ "type": "string"
10917
+ },
10918
+ "required": true,
10919
+ "name": "id",
10920
+ "in": "path"
10921
+ },
10922
+ {
10923
+ "schema": {
10924
+ "type": "integer",
10925
+ "minimum": 1,
10926
+ "maximum": 200
10927
+ },
10928
+ "required": false,
10929
+ "name": "limit",
10930
+ "in": "query"
10931
+ },
10932
+ {
10933
+ "schema": {
10934
+ "type": "string"
10935
+ },
10936
+ "required": false,
10937
+ "name": "before",
10938
+ "in": "query"
10939
+ }
10940
+ ],
10941
+ "responses": {
10942
+ "200": {
10943
+ "description": "Array of identity events"
10944
+ },
10945
+ "401": {
10946
+ "description": "Unauthorized"
10947
+ },
10948
+ "404": {
10949
+ "description": "User not found"
10950
+ }
10951
+ }
10952
+ }
10953
+ },
10954
+ "/api/users/{id}/identities": {
10955
+ "post": {
10956
+ "summary": "Link a new (kind, externalId) identity to this user",
10957
+ "tags": [
10958
+ "Users"
10959
+ ],
10960
+ "security": [
10961
+ {
10962
+ "bearerAuth": []
10963
+ }
10964
+ ],
10965
+ "parameters": [
10966
+ {
10967
+ "schema": {
10968
+ "type": "string"
10969
+ },
10970
+ "required": true,
10971
+ "name": "id",
10972
+ "in": "path"
10973
+ }
10974
+ ],
10975
+ "requestBody": {
10976
+ "content": {
10977
+ "application/json": {
10978
+ "schema": {
10979
+ "type": "object",
10980
+ "properties": {
10981
+ "kind": {
10982
+ "type": "string",
10983
+ "minLength": 1
10984
+ },
10985
+ "externalId": {
10986
+ "type": "string",
10987
+ "minLength": 1
10988
+ }
10989
+ },
10990
+ "required": [
10991
+ "kind",
10992
+ "externalId"
10993
+ ]
10994
+ }
10995
+ }
10996
+ }
10997
+ },
10998
+ "responses": {
10999
+ "200": {
11000
+ "description": "Updated identity list"
11001
+ },
11002
+ "400": {
11003
+ "description": "Validation error or PK collision"
11004
+ },
11005
+ "401": {
11006
+ "description": "Unauthorized"
11007
+ },
11008
+ "404": {
11009
+ "description": "User not found"
11010
+ }
11011
+ }
11012
+ }
11013
+ },
11014
+ "/api/users/{id}/identities/{kind}/{externalId}": {
11015
+ "delete": {
11016
+ "summary": "Remove a (kind, externalId) identity link from this user",
11017
+ "tags": [
11018
+ "Users"
11019
+ ],
11020
+ "security": [
11021
+ {
11022
+ "bearerAuth": []
11023
+ }
11024
+ ],
11025
+ "parameters": [
11026
+ {
11027
+ "schema": {
11028
+ "type": "string"
11029
+ },
11030
+ "required": true,
11031
+ "name": "id",
11032
+ "in": "path"
11033
+ },
11034
+ {
11035
+ "schema": {
11036
+ "type": "string"
11037
+ },
11038
+ "required": true,
11039
+ "name": "kind",
11040
+ "in": "path"
11041
+ },
11042
+ {
11043
+ "schema": {
11044
+ "type": "string"
11045
+ },
11046
+ "required": true,
11047
+ "name": "externalId",
11048
+ "in": "path"
11049
+ }
11050
+ ],
11051
+ "responses": {
11052
+ "200": {
11053
+ "description": "Updated identity list"
11054
+ },
11055
+ "401": {
11056
+ "description": "Unauthorized"
11057
+ },
11058
+ "404": {
11059
+ "description": "User not found"
11060
+ }
11061
+ }
11062
+ }
11063
+ },
10598
11064
  "/api/github/webhook": {
10599
11065
  "post": {
10600
11066
  "summary": "Handle GitHub webhook events",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desplega.ai/agent-swarm",
3
- "version": "1.80.3",
3
+ "version": "1.81.1",
4
4
  "description": "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
5
5
  "license": "MIT",
6
6
  "author": "desplega.sh <contact@desplega.sh>",
@@ -42,7 +42,6 @@
42
42
  },
43
43
  "scripts": {
44
44
  "build:pi-skills": "bun run plugin/build-pi-skills.ts",
45
- "build:script-types": "bun run scripts/bundle-script-types.ts",
46
45
  "tsc:check": "bun tsc --noEmit",
47
46
  "check:db-boundary": "bash scripts/check-db-boundary.sh",
48
47
  "check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
@@ -85,7 +84,8 @@
85
84
  "pm2-logs": "pm2 logs swarm-api swarm-ui swarm-lead swarm-worker",
86
85
  "pm2-status": "pm2 status swarm-api swarm-ui swarm-lead swarm-worker",
87
86
  "seed": "bun scripts/seed.ts",
88
- "seed:clean": "bun scripts/seed.ts --clean"
87
+ "seed:clean": "bun scripts/seed.ts --clean",
88
+ "seed:people": "bun scripts/seed-people.ts"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@biomejs/biome": "^2.3.10",