@band-app/server 0.50.0 → 0.51.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.
Files changed (76) hide show
  1. package/dist/client/_shell.html +0 -0
  2. package/dist/client/assets/{TerminalPanel-TaTddakG.js → TerminalPanel-qmqKPHyc.js} +1 -1
  3. package/dist/client/assets/{_basePickBy-CyEmpkN6.js → _basePickBy-BQBhP69F.js} +1 -1
  4. package/dist/client/assets/{_baseUniq-DZK79CFb.js → _baseUniq-BMLP-W-k.js} +1 -1
  5. package/dist/client/assets/{arc-BHHXQhkP.js → arc-BSxt0K2o.js} +1 -1
  6. package/dist/client/assets/{architectureDiagram-VXUJARFQ-YeX3OIz6.js → architectureDiagram-VXUJARFQ-DKlenA_3.js} +1 -1
  7. package/dist/client/assets/{blockDiagram-VD42YOAC-BWBeTAtn.js → blockDiagram-VD42YOAC-Bmv81qFh.js} +1 -1
  8. package/dist/client/assets/{c4Diagram-YG6GDRKO-BSeCOUa4.js → c4Diagram-YG6GDRKO-1m0ghnr4.js} +1 -1
  9. package/dist/client/assets/channel-Dd_TLPkf.js +1 -0
  10. package/dist/client/assets/{chunk-4BX2VUAB-DcJtODkg.js → chunk-4BX2VUAB-Cwlcy_Hc.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-pByuRA6R.js → chunk-55IACEB6-BkSjt1H3.js} +1 -1
  12. package/dist/client/assets/{chunk-B4BG7PRW-BynZwnDU.js → chunk-B4BG7PRW-v8KL8AeI.js} +1 -1
  13. package/dist/client/assets/{chunk-DI55MBZ5-8SdWl6Bg.js → chunk-DI55MBZ5-C6zUxMSQ.js} +1 -1
  14. package/dist/client/assets/{chunk-FMBD7UC4-B0vVa00l.js → chunk-FMBD7UC4-BmNKHY33.js} +1 -1
  15. package/dist/client/assets/{chunk-QN33PNHL-BHbm2uD2.js → chunk-QN33PNHL-CnEf_iiA.js} +1 -1
  16. package/dist/client/assets/{chunk-QZHKN3VN-DS9PmlIu.js → chunk-QZHKN3VN-BsauaExA.js} +1 -1
  17. package/dist/client/assets/{chunk-TZMSLE5B-CFm_nF8Y.js → chunk-TZMSLE5B-CYFbWXpB.js} +1 -1
  18. package/dist/client/assets/classDiagram-2ON5EDUG-eT8KMTcY.js +1 -0
  19. package/dist/client/assets/classDiagram-v2-WZHVMYZB-eT8KMTcY.js +1 -0
  20. package/dist/client/assets/clone-ChQ-pk7R.js +1 -0
  21. package/dist/client/assets/{cose-bilkent-S5V4N54A-B4TR3AIx.js → cose-bilkent-S5V4N54A-6BIQRLA2.js} +1 -1
  22. package/dist/client/assets/{dagre-6UL2VRFP-B8CXMn3F.js → dagre-6UL2VRFP-Dyz8Gwda.js} +1 -1
  23. package/dist/client/assets/{diagram-PSM6KHXK-r9IBt9Op.js → diagram-PSM6KHXK-BiiPYF4x.js} +1 -1
  24. package/dist/client/assets/{diagram-QEK2KX5R-DikzF6vc.js → diagram-QEK2KX5R-oUkGbjs-.js} +1 -1
  25. package/dist/client/assets/{diagram-S2PKOQOG-DsL3qPbL.js → diagram-S2PKOQOG-CsluX-S2.js} +1 -1
  26. package/dist/client/assets/{erDiagram-Q2GNP2WA-BQPuGdgl.js → erDiagram-Q2GNP2WA-BFNUbtEL.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-NV44I4VS-CVlJ575S.js → flowDiagram-NV44I4VS-D3CD9gfy.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-JELNMOA3-BbaAQRHR.js → ganttDiagram-JELNMOA3-COAQ4t73.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-BqeiagoL.js → gitGraphDiagram-V2S2FVAM-BsR0N6uq.js} +1 -1
  30. package/dist/client/assets/{graph-DgChbLvr.js → graph-NLT9K6kr.js} +1 -1
  31. package/dist/client/assets/{highlighted-body-B3W2YXNL-dH2hWW9A.js → highlighted-body-B3W2YXNL-BFGKimnR.js} +1 -1
  32. package/dist/client/assets/{index-DUzDXjQf.js → index-B05QiCnU.js} +1 -1
  33. package/dist/client/assets/{index-cu84zbIT.js → index-BIhc5mgt.js} +1 -1
  34. package/dist/client/assets/{index-Bwlc-Jxf.js → index-BMIKww_o.js} +1 -1
  35. package/dist/client/assets/{index-BRJVxRn5.js → index-CIND0QfH.js} +1 -1
  36. package/dist/client/assets/{index-CH0OlPqf.js → index-CKSyi5ft.js} +1 -1
  37. package/dist/client/assets/{index-KPo26FUH.js → index-CvSiihth.js} +1 -1
  38. package/dist/client/assets/{index-DKr9wV9s.js → index-D4d1r9xH.js} +1 -1
  39. package/dist/client/assets/{index-_cX_3yTA.js → index-DKO-Qvhf.js} +1 -1
  40. package/dist/client/assets/{index-BWh9nr9H.js → index-DMgsjyy2.js} +1 -1
  41. package/dist/client/assets/{index-SP6MW72V.js → index-DlR5KQTA.js} +1 -1
  42. package/dist/client/assets/{index-DZF2HHPf.js → index-DmUn22rT.js} +1 -1
  43. package/dist/client/assets/{index-BOnMESHF.js → index-p69JLyV8.js} +1 -1
  44. package/dist/client/assets/{index-fCxHtwN0.js → index-rHFD9xNL.js} +1 -1
  45. package/dist/client/assets/{infoDiagram-HS3SLOUP-C2fqqWBl.js → infoDiagram-HS3SLOUP-CPiCiCr1.js} +1 -1
  46. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-CtYhL-Fa.js → journeyDiagram-XKPGCS4Q-BRgYuFC5.js} +1 -1
  47. package/dist/client/assets/{kanban-definition-3W4ZIXB7-sHFLpW74.js → kanban-definition-3W4ZIXB7-BzPrF9MH.js} +1 -1
  48. package/dist/client/assets/{layout-MdARyhdo.js → layout-BWHN4o0O.js} +1 -1
  49. package/dist/client/assets/{main-8hVMNHLv.js → main-DeilaoAo.js} +258 -258
  50. package/dist/client/assets/main-H0Mi2D2z.css +1 -0
  51. package/dist/client/assets/{mindmap-definition-VGOIOE7T-Bup15yfO.js → mindmap-definition-VGOIOE7T-DMjnSZkO.js} +1 -1
  52. package/dist/client/assets/{pieDiagram-ADFJNKIX-BfWZvGaL.js → pieDiagram-ADFJNKIX-6BwfmE2C.js} +1 -1
  53. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-CbCc7ggo.js → quadrantDiagram-AYHSOK5B-B1NmMm8z.js} +1 -1
  54. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-Dlt5sQz-.js → requirementDiagram-UZGBJVZJ-jQofjCHs.js} +1 -1
  55. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-08KQ5MNJ.js → sankeyDiagram-TZEHDZUN-CSEiK4cm.js} +1 -1
  56. package/dist/client/assets/{sequenceDiagram-WL72ISMW-DM9CSx6T.js → sequenceDiagram-WL72ISMW-CK4PyCNP.js} +1 -1
  57. package/dist/client/assets/{stateDiagram-FKZM4ZOC-BtFPHXN-.js → stateDiagram-FKZM4ZOC-8_cSi1sy.js} +1 -1
  58. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-DHHlDXqc.js +1 -0
  59. package/dist/client/assets/{timeline-definition-IT6M3QCI-slFvRc46.js → timeline-definition-IT6M3QCI-Dfbk3wPI.js} +1 -1
  60. package/dist/client/assets/{treemap-GDKQZRPO-B6NUX9Ke.js → treemap-GDKQZRPO-C0O_-1Et.js} +1 -1
  61. package/dist/client/assets/{worktree._worktreeId-DIyXyY26.js → worktree._worktreeId-B7Rg7yt9.js} +1 -1
  62. package/dist/client/assets/{worktree._worktreeId-BRHnl5t2.js → worktree._worktreeId-DokGt3kH.js} +1 -1
  63. package/dist/client/assets/{xychartDiagram-PRI3JC2R-mi-qUKi6.js → xychartDiagram-PRI3JC2R-C7Zd0bF9.js} +1 -1
  64. package/dist/migrations/20261016220249_host_trust/migration.sql +13 -0
  65. package/dist/migrations/20261016220249_host_trust/snapshot.json +4765 -0
  66. package/dist/migrations/20261016234253_cronjob_session/migration.sql +3 -0
  67. package/dist/migrations/20261016234253_cronjob_session/snapshot.json +4688 -0
  68. package/dist/openapi.json +711 -48
  69. package/dist/start-server.mjs +2290 -1244
  70. package/package.json +6 -6
  71. package/dist/client/assets/channel-CrPkzAwN.js +0 -1
  72. package/dist/client/assets/classDiagram-2ON5EDUG-B2ixqHpV.js +0 -1
  73. package/dist/client/assets/classDiagram-v2-WZHVMYZB-B2ixqHpV.js +0 -1
  74. package/dist/client/assets/clone-DOnsyYsS.js +0 -1
  75. package/dist/client/assets/main-NI1yF8XA.css +0 -1
  76. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-JAywGea8.js +0 -1
package/dist/openapi.json CHANGED
@@ -708,6 +708,70 @@
708
708
  "items": {
709
709
  "type": "object",
710
710
  "properties": {
711
+ "update": {
712
+ "oneOf": [
713
+ {
714
+ "$ref": "#/components/schemas/WorkerUpdateStatus"
715
+ },
716
+ {
717
+ "type": "null"
718
+ }
719
+ ]
720
+ },
721
+ "workerVersion": {
722
+ "type": [
723
+ "string",
724
+ "null"
725
+ ],
726
+ "description": "The worker's release version, or null when it never said (a worker from before version reporting)."
727
+ },
728
+ "versionState": {
729
+ "type": "string",
730
+ "enum": [
731
+ "unknown",
732
+ "current",
733
+ "behind",
734
+ "ahead",
735
+ "refused"
736
+ ],
737
+ "description": "`refused` when the hub turned the worker away for being too far from its version."
738
+ },
739
+ "updateRequired": {
740
+ "type": [
741
+ "string",
742
+ "null"
743
+ ],
744
+ "description": "Why the hub refused the link, or null."
745
+ },
746
+ "serviceManager": {
747
+ "type": [
748
+ "string",
749
+ "null"
750
+ ],
751
+ "enum": [
752
+ "launchd",
753
+ "systemd"
754
+ ],
755
+ "description": "What restarts the worker, or null when nothing supervises it."
756
+ },
757
+ "updateTarget": {
758
+ "type": [
759
+ "string",
760
+ "null"
761
+ ],
762
+ "description": "The version an update installs, or null when there is nothing to update to."
763
+ },
764
+ "canUpdate": {
765
+ "type": "boolean",
766
+ "description": "True when the Update button works: the worker is online, supervised and not current."
767
+ },
768
+ "manualCommand": {
769
+ "type": [
770
+ "string",
771
+ "null"
772
+ ],
773
+ "description": "The command to run on the worker by hand, shown when the button cannot be."
774
+ },
711
775
  "sleepError": {
712
776
  "type": [
713
777
  "string",
@@ -818,9 +882,26 @@
818
882
  "usable": {
819
883
  "type": "boolean",
820
884
  "description": "False for the hub's own machine when `BAND_LOCAL_HOST=off`."
885
+ },
886
+ "trust": {
887
+ "type": "string",
888
+ "enum": [
889
+ "admin",
890
+ "restricted",
891
+ "standard"
892
+ ],
893
+ "description": "How far the host's agents reach through the relay (the stored level, else the default for the host)."
821
894
  }
822
895
  },
823
896
  "required": [
897
+ "update",
898
+ "workerVersion",
899
+ "versionState",
900
+ "updateRequired",
901
+ "serviceManager",
902
+ "updateTarget",
903
+ "canUpdate",
904
+ "manualCommand",
824
905
  "sleepError",
825
906
  "id",
826
907
  "name",
@@ -837,7 +918,8 @@
837
918
  "capabilities",
838
919
  "home",
839
920
  "tools",
840
- "usable"
921
+ "usable",
922
+ "trust"
841
923
  ],
842
924
  "additionalProperties": false
843
925
  }
@@ -876,10 +958,446 @@
876
958
  "schema": {
877
959
  "type": "object",
878
960
  "properties": {
879
- "limit": {
880
- "type": "number"
961
+ "limit": {
962
+ "type": "number"
963
+ }
964
+ },
965
+ "additionalProperties": false
966
+ }
967
+ }
968
+ }
969
+ }
970
+ ]
971
+ }
972
+ },
973
+ "/hosts.forAgents": {
974
+ "get": {
975
+ "operationId": "hosts.forAgents",
976
+ "description": "The host list as an agent may see it: id, name, status, OS and architecture, agents,\ncapabilities and labels. No roots, home, tool versions, tokens or runner settings. The MCP\nendpoint lists this one and not `hosts.list`.",
977
+ "tags": [
978
+ "hosts"
979
+ ],
980
+ "responses": {
981
+ "200": {
982
+ "description": "Successful response",
983
+ "content": {
984
+ "application/json": {
985
+ "schema": {
986
+ "type": "object",
987
+ "properties": {
988
+ "result": {
989
+ "type": "object",
990
+ "properties": {
991
+ "data": {
992
+ "type": "object",
993
+ "properties": {
994
+ "hosts": {
995
+ "type": "array",
996
+ "items": {
997
+ "$ref": "#/components/schemas/AgentHostView"
998
+ }
999
+ }
1000
+ },
1001
+ "required": [
1002
+ "hosts"
1003
+ ],
1004
+ "additionalProperties": false
1005
+ }
1006
+ },
1007
+ "required": [
1008
+ "data"
1009
+ ]
1010
+ }
1011
+ },
1012
+ "required": [
1013
+ "result"
1014
+ ]
1015
+ }
1016
+ }
1017
+ }
1018
+ },
1019
+ "default": {
1020
+ "$ref": "#/components/responses/Error"
1021
+ }
1022
+ }
1023
+ }
1024
+ },
1025
+ "/hosts.updateStatus": {
1026
+ "get": {
1027
+ "operationId": "hosts.updateStatus",
1028
+ "description": "The hub's version, the newest release GitHub reported and the command that updates the hub for\nhow it was installed. Any device token may read it: the sidebar badge uses it.",
1029
+ "tags": [
1030
+ "hosts"
1031
+ ],
1032
+ "responses": {
1033
+ "200": {
1034
+ "description": "Successful response",
1035
+ "content": {
1036
+ "application/json": {
1037
+ "schema": {
1038
+ "type": "object",
1039
+ "properties": {
1040
+ "result": {
1041
+ "type": "object",
1042
+ "properties": {
1043
+ "data": {
1044
+ "type": "object",
1045
+ "properties": {
1046
+ "hubVersion": {
1047
+ "type": "string"
1048
+ },
1049
+ "latest": {
1050
+ "type": [
1051
+ "string",
1052
+ "null"
1053
+ ]
1054
+ },
1055
+ "updateAvailable": {
1056
+ "type": "boolean"
1057
+ },
1058
+ "checkEnabled": {
1059
+ "type": "boolean"
1060
+ },
1061
+ "checkedAt": {
1062
+ "type": [
1063
+ "number",
1064
+ "null"
1065
+ ]
1066
+ },
1067
+ "installMethod": {
1068
+ "type": [
1069
+ "string",
1070
+ "null"
1071
+ ],
1072
+ "enum": [
1073
+ "compose",
1074
+ "helm",
1075
+ "k8s",
1076
+ "docker"
1077
+ ]
1078
+ },
1079
+ "hubCommand": {
1080
+ "type": "string"
1081
+ }
1082
+ },
1083
+ "required": [
1084
+ "hubVersion",
1085
+ "latest",
1086
+ "updateAvailable",
1087
+ "checkEnabled",
1088
+ "checkedAt",
1089
+ "installMethod",
1090
+ "hubCommand"
1091
+ ],
1092
+ "additionalProperties": false
1093
+ }
1094
+ },
1095
+ "required": [
1096
+ "data"
1097
+ ]
1098
+ }
1099
+ },
1100
+ "required": [
1101
+ "result"
1102
+ ]
1103
+ }
1104
+ }
1105
+ }
1106
+ },
1107
+ "default": {
1108
+ "$ref": "#/components/responses/Error"
1109
+ }
1110
+ }
1111
+ }
1112
+ },
1113
+ "/hosts.interruptions": {
1114
+ "get": {
1115
+ "operationId": "hosts.interruptions",
1116
+ "description": "The agents on a host that restarting its worker would end, for the confirm dialog.",
1117
+ "tags": [
1118
+ "hosts"
1119
+ ],
1120
+ "responses": {
1121
+ "200": {
1122
+ "description": "Successful response",
1123
+ "content": {
1124
+ "application/json": {
1125
+ "schema": {
1126
+ "type": "object",
1127
+ "properties": {
1128
+ "result": {
1129
+ "type": "object",
1130
+ "properties": {
1131
+ "data": {
1132
+ "type": "object",
1133
+ "properties": {
1134
+ "agents": {
1135
+ "type": "array",
1136
+ "items": {
1137
+ "type": "object",
1138
+ "properties": {
1139
+ "chatId": {
1140
+ "type": "string"
1141
+ },
1142
+ "worktreeId": {
1143
+ "type": "string"
1144
+ },
1145
+ "busy": {
1146
+ "type": "boolean"
1147
+ }
1148
+ },
1149
+ "required": [
1150
+ "chatId",
1151
+ "worktreeId",
1152
+ "busy"
1153
+ ],
1154
+ "additionalProperties": false
1155
+ }
1156
+ }
1157
+ },
1158
+ "required": [
1159
+ "agents"
1160
+ ],
1161
+ "additionalProperties": false
1162
+ }
1163
+ },
1164
+ "required": [
1165
+ "data"
1166
+ ]
1167
+ }
1168
+ },
1169
+ "required": [
1170
+ "result"
1171
+ ]
1172
+ }
1173
+ }
1174
+ }
1175
+ },
1176
+ "default": {
1177
+ "$ref": "#/components/responses/Error"
1178
+ }
1179
+ },
1180
+ "parameters": [
1181
+ {
1182
+ "name": "input",
1183
+ "in": "query",
1184
+ "required": true,
1185
+ "style": "deepObject",
1186
+ "content": {
1187
+ "application/json": {
1188
+ "schema": {
1189
+ "type": "object",
1190
+ "properties": {
1191
+ "hostId": {
1192
+ "type": "string"
1193
+ }
1194
+ },
1195
+ "required": [
1196
+ "hostId"
1197
+ ],
1198
+ "additionalProperties": false
1199
+ }
1200
+ }
1201
+ }
1202
+ }
1203
+ ]
1204
+ }
1205
+ },
1206
+ "/hosts.update": {
1207
+ "post": {
1208
+ "operationId": "hosts.update",
1209
+ "description": "Starts updating a worker to its target version and restarting it through its service manager.\nAnswers at once; the host row (`update`) shows installing, restarting and then the result. A\nfailed install keeps npm's message there and the worker running as it was. Restarting ends the agents on that host, so the UI asks first.",
1210
+ "tags": [
1211
+ "hosts"
1212
+ ],
1213
+ "responses": {
1214
+ "200": {
1215
+ "description": "Successful response",
1216
+ "content": {
1217
+ "application/json": {
1218
+ "schema": {
1219
+ "type": "object",
1220
+ "properties": {
1221
+ "result": {
1222
+ "type": "object",
1223
+ "properties": {
1224
+ "data": {
1225
+ "type": "object",
1226
+ "properties": {
1227
+ "target": {
1228
+ "type": "string"
1229
+ }
1230
+ },
1231
+ "required": [
1232
+ "target"
1233
+ ],
1234
+ "additionalProperties": false
1235
+ }
1236
+ },
1237
+ "required": [
1238
+ "data"
1239
+ ]
1240
+ }
1241
+ },
1242
+ "required": [
1243
+ "result"
1244
+ ]
1245
+ }
1246
+ }
1247
+ }
1248
+ },
1249
+ "default": {
1250
+ "$ref": "#/components/responses/Error"
1251
+ }
1252
+ },
1253
+ "requestBody": {
1254
+ "required": true,
1255
+ "content": {
1256
+ "application/json": {
1257
+ "schema": {
1258
+ "type": "object",
1259
+ "properties": {
1260
+ "hostId": {
1261
+ "type": "string"
1262
+ }
1263
+ },
1264
+ "required": [
1265
+ "hostId"
1266
+ ],
1267
+ "additionalProperties": false
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ }
1273
+ },
1274
+ "/hosts.dismissUpdate": {
1275
+ "post": {
1276
+ "operationId": "hosts.dismissUpdate",
1277
+ "description": "Dismisses a failed update, so the Update button is offered again.",
1278
+ "tags": [
1279
+ "hosts"
1280
+ ],
1281
+ "responses": {
1282
+ "200": {
1283
+ "description": "Successful response",
1284
+ "content": {
1285
+ "application/json": {
1286
+ "schema": {
1287
+ "type": "object",
1288
+ "properties": {
1289
+ "result": {
1290
+ "type": "object",
1291
+ "properties": {
1292
+ "data": {
1293
+ "type": "object",
1294
+ "properties": {
1295
+ "hostId": {
1296
+ "type": "string"
1297
+ }
1298
+ },
1299
+ "required": [
1300
+ "hostId"
1301
+ ],
1302
+ "additionalProperties": false
1303
+ }
1304
+ },
1305
+ "required": [
1306
+ "data"
1307
+ ]
1308
+ }
1309
+ },
1310
+ "required": [
1311
+ "result"
1312
+ ]
1313
+ }
1314
+ }
1315
+ }
1316
+ },
1317
+ "default": {
1318
+ "$ref": "#/components/responses/Error"
1319
+ }
1320
+ },
1321
+ "requestBody": {
1322
+ "required": true,
1323
+ "content": {
1324
+ "application/json": {
1325
+ "schema": {
1326
+ "type": "object",
1327
+ "properties": {
1328
+ "hostId": {
1329
+ "type": "string"
1330
+ }
1331
+ },
1332
+ "required": [
1333
+ "hostId"
1334
+ ],
1335
+ "additionalProperties": false
1336
+ }
1337
+ }
1338
+ }
1339
+ }
1340
+ }
1341
+ },
1342
+ "/hosts.browse": {
1343
+ "get": {
1344
+ "operationId": "hosts.browse",
1345
+ "description": "Lists the directories in a folder on a host, for the folder picker of \"Add repo from a\nworker\". Without a path it starts at the host's home directory. It reaches outside the\nhost's roots, so only an admin token may call it, and picking a folder outside the roots\nneeds confirmation before it becomes a root (`repos.addFromWorker`).",
1346
+ "tags": [
1347
+ "hosts"
1348
+ ],
1349
+ "responses": {
1350
+ "200": {
1351
+ "description": "Successful response",
1352
+ "content": {
1353
+ "application/json": {
1354
+ "schema": {
1355
+ "type": "object",
1356
+ "properties": {
1357
+ "result": {
1358
+ "type": "object",
1359
+ "properties": {
1360
+ "data": {
1361
+ "$ref": "#/components/schemas/FsBrowseResult"
1362
+ }
1363
+ },
1364
+ "required": [
1365
+ "data"
1366
+ ]
1367
+ }
1368
+ },
1369
+ "required": [
1370
+ "result"
1371
+ ]
1372
+ }
1373
+ }
1374
+ }
1375
+ },
1376
+ "default": {
1377
+ "$ref": "#/components/responses/Error"
1378
+ }
1379
+ },
1380
+ "parameters": [
1381
+ {
1382
+ "name": "input",
1383
+ "in": "query",
1384
+ "required": true,
1385
+ "style": "deepObject",
1386
+ "content": {
1387
+ "application/json": {
1388
+ "schema": {
1389
+ "type": "object",
1390
+ "properties": {
1391
+ "hostId": {
1392
+ "type": "string"
1393
+ },
1394
+ "path": {
1395
+ "type": "string"
881
1396
  }
882
1397
  },
1398
+ "required": [
1399
+ "hostId"
1400
+ ],
883
1401
  "additionalProperties": false
884
1402
  }
885
1403
  }
@@ -888,10 +1406,10 @@
888
1406
  ]
889
1407
  }
890
1408
  },
891
- "/hosts.forAgents": {
892
- "get": {
893
- "operationId": "hosts.forAgents",
894
- "description": "The host list as an agent may see it: id, name, status, OS and architecture, agents,\ncapabilities and labels. No roots, home, tool versions, tokens or runner settings. The MCP\nendpoint lists this one and not `hosts.list`.",
1409
+ "/hosts.setTrust": {
1410
+ "post": {
1411
+ "operationId": "hosts.setTrust",
1412
+ "description": "Sets how far a host's agents reach through the relay. Admin device tokens only: an agent's\nrelay call can never get here (`relay-scope.ts` refuses it whatever the host's level).",
895
1413
  "tags": [
896
1414
  "hosts"
897
1415
  ],
@@ -909,15 +1427,21 @@
909
1427
  "data": {
910
1428
  "type": "object",
911
1429
  "properties": {
912
- "hosts": {
913
- "type": "array",
914
- "items": {
915
- "$ref": "#/components/schemas/AgentHostView"
916
- }
1430
+ "hostId": {
1431
+ "type": "string"
1432
+ },
1433
+ "trust": {
1434
+ "type": "string",
1435
+ "enum": [
1436
+ "admin",
1437
+ "restricted",
1438
+ "standard"
1439
+ ]
917
1440
  }
918
1441
  },
919
1442
  "required": [
920
- "hosts"
1443
+ "hostId",
1444
+ "trust"
921
1445
  ],
922
1446
  "additionalProperties": false
923
1447
  }
@@ -937,13 +1461,41 @@
937
1461
  "default": {
938
1462
  "$ref": "#/components/responses/Error"
939
1463
  }
1464
+ },
1465
+ "requestBody": {
1466
+ "required": true,
1467
+ "content": {
1468
+ "application/json": {
1469
+ "schema": {
1470
+ "type": "object",
1471
+ "properties": {
1472
+ "hostId": {
1473
+ "type": "string"
1474
+ },
1475
+ "trust": {
1476
+ "type": "string",
1477
+ "enum": [
1478
+ "admin",
1479
+ "restricted",
1480
+ "standard"
1481
+ ]
1482
+ }
1483
+ },
1484
+ "required": [
1485
+ "hostId",
1486
+ "trust"
1487
+ ],
1488
+ "additionalProperties": false
1489
+ }
1490
+ }
1491
+ }
940
1492
  }
941
1493
  }
942
1494
  },
943
- "/hosts.browse": {
1495
+ "/hosts.audit": {
944
1496
  "get": {
945
- "operationId": "hosts.browse",
946
- "description": "Lists the directories in a folder on a host, for the folder picker of \"Add repo from a\nworker\". Without a path it starts at the host's home directory. It reaches outside the\nhost's roots, so only an admin token may call it, and picking a folder outside the roots\nneeds confirmation before it becomes a root (`repos.addFromWorker`).",
1497
+ "operationId": "hosts.audit",
1498
+ "description": "What admin hosts did across hosts: time, calling host, chat, procedure and target. Newest first.",
947
1499
  "tags": [
948
1500
  "hosts"
949
1501
  ],
@@ -959,7 +1511,61 @@
959
1511
  "type": "object",
960
1512
  "properties": {
961
1513
  "data": {
962
- "$ref": "#/components/schemas/FsBrowseResult"
1514
+ "type": "object",
1515
+ "properties": {
1516
+ "entries": {
1517
+ "type": "array",
1518
+ "items": {
1519
+ "type": "object",
1520
+ "properties": {
1521
+ "at": {
1522
+ "type": "number"
1523
+ },
1524
+ "id": {
1525
+ "type": "number"
1526
+ },
1527
+ "chatId": {
1528
+ "type": [
1529
+ "string",
1530
+ "null"
1531
+ ]
1532
+ },
1533
+ "callerHostId": {
1534
+ "type": "string"
1535
+ },
1536
+ "procedure": {
1537
+ "type": "string"
1538
+ },
1539
+ "targetHostId": {
1540
+ "type": [
1541
+ "string",
1542
+ "null"
1543
+ ]
1544
+ },
1545
+ "target": {
1546
+ "type": [
1547
+ "string",
1548
+ "null"
1549
+ ]
1550
+ }
1551
+ },
1552
+ "required": [
1553
+ "at",
1554
+ "id",
1555
+ "chatId",
1556
+ "callerHostId",
1557
+ "procedure",
1558
+ "targetHostId",
1559
+ "target"
1560
+ ],
1561
+ "additionalProperties": false
1562
+ }
1563
+ }
1564
+ },
1565
+ "required": [
1566
+ "entries"
1567
+ ],
1568
+ "additionalProperties": false
963
1569
  }
964
1570
  },
965
1571
  "required": [
@@ -989,16 +1595,10 @@
989
1595
  "schema": {
990
1596
  "type": "object",
991
1597
  "properties": {
992
- "hostId": {
993
- "type": "string"
994
- },
995
- "path": {
996
- "type": "string"
1598
+ "limit": {
1599
+ "type": "number"
997
1600
  }
998
1601
  },
999
- "required": [
1000
- "hostId"
1001
- ],
1002
1602
  "additionalProperties": false
1003
1603
  }
1004
1604
  }
@@ -15463,9 +16063,6 @@
15463
16063
  "properties": {
15464
16064
  "worktreeId": {
15465
16065
  "type": "string"
15466
- },
15467
- "repo": {
15468
- "type": "string"
15469
16066
  }
15470
16067
  },
15471
16068
  "additionalProperties": false
@@ -15611,16 +16208,6 @@
15611
16208
  "prompt": {
15612
16209
  "type": "string"
15613
16210
  },
15614
- "scope": {
15615
- "type": "string",
15616
- "enum": [
15617
- "worktree",
15618
- "repo"
15619
- ]
15620
- },
15621
- "key": {
15622
- "type": "string"
15623
- },
15624
16211
  "cronExpression": {
15625
16212
  "type": "string"
15626
16213
  },
@@ -15636,13 +16223,23 @@
15636
16223
  "chat",
15637
16224
  "terminal"
15638
16225
  ]
16226
+ },
16227
+ "scope": {
16228
+ "type": "string"
16229
+ },
16230
+ "key": {
16231
+ "type": "string"
16232
+ },
16233
+ "agent": {
16234
+ "type": "string"
16235
+ },
16236
+ "sessionId": {
16237
+ "type": "string"
15639
16238
  }
15640
16239
  },
15641
16240
  "required": [
15642
16241
  "name",
15643
16242
  "prompt",
15644
- "scope",
15645
- "key",
15646
16243
  "cronExpression"
15647
16244
  ],
15648
16245
  "additionalProperties": false
@@ -15717,11 +16314,33 @@
15717
16314
  "enabled": {
15718
16315
  "type": "boolean"
15719
16316
  },
16317
+ "worktreeId": {
16318
+ "type": "string"
16319
+ },
15720
16320
  "prompt": {
15721
16321
  "type": "string"
15722
16322
  },
16323
+ "via": {
16324
+ "type": "string",
16325
+ "enum": [
16326
+ "chat",
16327
+ "terminal"
16328
+ ]
16329
+ },
15723
16330
  "cronExpression": {
15724
16331
  "type": "string"
16332
+ },
16333
+ "agent": {
16334
+ "type": [
16335
+ "string",
16336
+ "null"
16337
+ ]
16338
+ },
16339
+ "sessionId": {
16340
+ "type": [
16341
+ "string",
16342
+ "null"
16343
+ ]
15725
16344
  }
15726
16345
  },
15727
16346
  "required": [
@@ -15833,19 +16452,23 @@
15833
16452
  "type": "string",
15834
16453
  "const": "chat"
15835
16454
  },
15836
- "taskId": {
15837
- "type": "string"
15838
- },
15839
16455
  "worktreeId": {
15840
16456
  "type": "string"
15841
16457
  },
15842
16458
  "chatId": {
15843
16459
  "type": "string"
16460
+ },
16461
+ "taskId": {
16462
+ "type": "string",
16463
+ "description": "Set when the prompt started a turn now."
16464
+ },
16465
+ "queuedMessageId": {
16466
+ "type": "string",
16467
+ "description": "Set when the chat was mid-turn and the prompt joined its queue."
15844
16468
  }
15845
16469
  },
15846
16470
  "required": [
15847
16471
  "via",
15848
- "taskId",
15849
16472
  "worktreeId",
15850
16473
  "chatId"
15851
16474
  ],
@@ -20201,6 +20824,34 @@
20201
20824
  ],
20202
20825
  "additionalProperties": false
20203
20826
  },
20827
+ "WorkerUpdateStatus": {
20828
+ "type": "object",
20829
+ "properties": {
20830
+ "target": {
20831
+ "type": "string"
20832
+ },
20833
+ "state": {
20834
+ "type": "string",
20835
+ "enum": [
20836
+ "failed",
20837
+ "installing",
20838
+ "restarting"
20839
+ ]
20840
+ },
20841
+ "error": {
20842
+ "type": [
20843
+ "string",
20844
+ "null"
20845
+ ]
20846
+ }
20847
+ },
20848
+ "required": [
20849
+ "target",
20850
+ "state",
20851
+ "error"
20852
+ ],
20853
+ "additionalProperties": false
20854
+ },
20204
20855
  "CapabilityReport": {
20205
20856
  "type": "object",
20206
20857
  "properties": {
@@ -22689,12 +23340,12 @@
22689
23340
  "enum": [
22690
23341
  "unknown",
22691
23342
  "dirty",
23343
+ "behind",
22692
23344
  "clean",
22693
23345
  "draft",
22694
23346
  "unstable",
22695
23347
  "has_hooks",
22696
- "blocked",
22697
- "behind"
23348
+ "blocked"
22698
23349
  ],
22699
23350
  "description": "Whether the review can merge now, and if not, why."
22700
23351
  },
@@ -24232,11 +24883,23 @@
24232
24883
  "worktree",
24233
24884
  "repo"
24234
24885
  ],
24235
- "description": "One scheduled cron-style task — a prompt the agent runs on a recurring\nschedule against a repo's main branch or a specific worktree.\n\nPersisted shape matches the Drizzle row 1:1; the `worktreeId` and\n`lastRun*` columns are nullable in SQLite but exposed here as optional\n`T | undefined` to make consumers' optional-chaining ergonomic. Conversion\nhappens inside `CronjobQueries.rowToDefinition` below."
24886
+ "description": "One scheduled cron-style task — a prompt the agent runs on a recurring\nschedule against one worktree (the default-branch worktree or any other).\n\nPersisted shape matches the Drizzle row 1:1; the `worktreeId` and\n`lastRun*` columns are nullable in SQLite but exposed here as optional\n`T | undefined` to make consumers' optional-chaining ergonomic. Conversion\nhappens inside `CronjobQueries.rowToDefinition` below."
24236
24887
  },
24237
24888
  "worktreeId": {
24238
24889
  "type": "string",
24239
- "description": "For worktree-scoped jobs, the worktree ID (repo-branch)"
24890
+ "description": "The worktree the job fires into"
24891
+ },
24892
+ "agent": {
24893
+ "type": "string",
24894
+ "description": "Coding agent id (`settings.codingAgents[].id`) the job's chat runs. Default agent when absent."
24895
+ },
24896
+ "sessionId": {
24897
+ "type": "string",
24898
+ "description": "Agent provider session id. Fires go to the chat whose active session is this id."
24899
+ },
24900
+ "lastRunMessage": {
24901
+ "type": "string",
24902
+ "description": "Why the last run failed, or why the boot migration disabled the job"
24240
24903
  },
24241
24904
  "via": {
24242
24905
  "type": "string",