@kammcs/buildit-mcp 0.2.0 → 0.7.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 (40) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +252 -32
  3. package/SECURITY.md +1 -1
  4. package/dist/api/client.js +5 -1
  5. package/dist/api/generated/operations.js +661 -4
  6. package/dist/api/generated/schemas.js +680 -2
  7. package/dist/api/generated/strict.js +799 -2
  8. package/dist/channel/api.js +128 -0
  9. package/dist/channel/approvals.js +259 -0
  10. package/dist/channel/item-events.js +138 -0
  11. package/dist/channel/lock.js +181 -0
  12. package/dist/channel/loop.js +776 -0
  13. package/dist/channel/mask.js +365 -0
  14. package/dist/channel/threads.js +60 -0
  15. package/dist/channel/tool-ring.js +124 -0
  16. package/dist/channel/typing.js +150 -0
  17. package/dist/channel/waiters.js +229 -0
  18. package/dist/channel/workers.js +66 -0
  19. package/dist/cli/claude-config.js +100 -0
  20. package/dist/cli/commands.js +410 -0
  21. package/dist/config.js +329 -6
  22. package/dist/errors.js +38 -0
  23. package/dist/index.js +122 -6
  24. package/dist/log.js +3 -2
  25. package/dist/secrets/keychain.js +273 -0
  26. package/dist/server.js +53 -5
  27. package/dist/tools/approve.js +791 -0
  28. package/dist/tools/ask.js +898 -0
  29. package/dist/tools/chat.js +98 -1
  30. package/dist/tools/items-read.js +5 -3
  31. package/dist/tools/items-write.js +66 -15
  32. package/dist/tools/plans.js +221 -14
  33. package/dist/tools/reply.js +138 -0
  34. package/dist/tools/shared.js +10 -1
  35. package/dist/tools/threads.js +123 -0
  36. package/dist/tools/whoami.js +17 -3
  37. package/dist/toolsets/catalog.js +3 -1
  38. package/dist/toolsets/registry.js +2 -0
  39. package/dist/transports/stdio.js +260 -6
  40. package/package.json +5 -1
@@ -2,12 +2,12 @@
2
2
  * The agent API's operations, scopes and error codes, as the contract declares them.
3
3
  *
4
4
  * GENERATED by scripts/generate.ts from openapi/openapi.json (agent API
5
- * 1.2.0). Do not edit: change the contract, then run
5
+ * 1.8.0). Do not edit: change the contract, then run
6
6
  * `npm run generate`.
7
7
  */
8
8
  import * as S from './schemas.js';
9
9
  /** The contract's API version. */
10
- export const API_VERSION = '1.2.0';
10
+ export const API_VERSION = '1.8.0';
11
11
  /** Token scopes, in the contract's order. */
12
12
  export const SCOPES = [
13
13
  'projects:read',
@@ -61,12 +61,32 @@ export const ERROR_STATUS = {
61
61
  unavailable: 503,
62
62
  release_archived: 409,
63
63
  release_not_released: 409,
64
+ session_token_required: 403,
65
+ agent_sessions_off: 403,
66
+ authorization_pending: 400,
67
+ slow_down: 400,
68
+ access_denied: 400,
69
+ expired_token: 400,
70
+ thread_other_session: 409,
71
+ card_invalid: 422,
72
+ card_closed: 409,
73
+ response_changed: 409,
74
+ not_own_message: 403,
75
+ plan_awaits_owner: 409,
76
+ plan_card_exists: 409,
77
+ plan_card_required: 409,
78
+ thread_not_bound: 403,
79
+ thread_required: 422,
80
+ outside_reach: 403,
81
+ plan_outside_thread: 422,
82
+ approvals_off: 403,
83
+ too_many_open: 409,
64
84
  };
65
85
  /** Each error code's stable next step, as the contract words it. The API sends it as the error's hint; this copy serves when an older API doesn't. */
66
86
  export const ERROR_HINTS = {
67
87
  bad_request: 'Send a JSON body with Content-Type: application/json, and check the path and query.',
68
- token_invalid: 'Check the Authorization header: Bearer, then the whole buildit_pat_ token.',
69
- token_expired: 'Ask the user to create a new token in buildIt.Social (Settings → Agent tokens).',
88
+ token_invalid: 'Check the Authorization header: Bearer, then the whole buildit_pat_ or buildit_ags_ token.',
89
+ token_expired: 'Ask the user to create a new token in buildIt.Social (Settings → Agent tokens), or connect the session again.',
70
90
  token_revoked: 'Ask the user to create a new token in buildIt.Social (Settings → Agent tokens), if they still have access.',
71
91
  token_suspended: "Ask an org admin to reactivate the user's membership; the token then works again.",
72
92
  agent_access_off: 'Ask an org owner or admin to turn on Agent access (Settings → the org → Integrations); tokens then work again.',
@@ -95,6 +115,26 @@ export const ERROR_HINTS = {
95
115
  unavailable: 'Retry in a minute.',
96
116
  release_archived: 'Restore the release with restore_release, then retry.',
97
117
  release_not_released: 'Leave released_on out, or release it with release_version, which takes released_on.',
118
+ session_token_required: "Use the session token that connecting a session gave; a personal access token can't.",
119
+ agent_sessions_off: 'Ask an org owner or admin to turn agents in the app back on (Settings → the org → Integrations → Agent access).',
120
+ authorization_pending: 'Poll again after details.interval seconds.',
121
+ slow_down: 'Wait details.interval seconds between polls from now on.',
122
+ access_denied: 'Stop polling; start a new connection only if the user asks for one.',
123
+ expired_token: 'Start again with connect_start and show the user the new code.',
124
+ thread_other_session: 'Reply in a thread of this session, or post a new top-level message.',
125
+ card_invalid: 'Fix each element in details.errors, then retry.',
126
+ card_closed: 'The card takes no more answers; post a new one if you still need an answer.',
127
+ response_changed: 'Wait for the next card.response and answer its revision.',
128
+ not_own_message: "Change, close or answer only this session's own question cards.",
129
+ plan_awaits_owner: 'Wait for the person to apply or cancel the plan in buildIt.Social.',
130
+ plan_card_exists: "Wait for the person's answer on the plan's card, or propose a new plan.",
131
+ plan_card_required: 'Post the plan as a card with post_plan_card; the person applies it there.',
132
+ thread_not_bound: "Reply in a thread this session's events came from; only the person can assign it items.",
133
+ thread_required: "Send thread_id (the item's id), or post in the direct message instead.",
134
+ outside_reach: 'Stop work on that item; the person can connect a session that reaches its project.',
135
+ plan_outside_thread: "Post the plan's card in the direct message, or keep the plan to the thread's project.",
136
+ approvals_off: "Ask in the terminal; don't retry until the person turns tool approvals back on.",
137
+ too_many_open: 'Close the tool approvals that no longer need an answer, or ask in the terminal.',
98
138
  };
99
139
  /** Every scope each plan action needs, all of them (the operations whose scope is 'plan_action' check them). */
100
140
  export const PLAN_SCOPES = {
@@ -109,6 +149,34 @@ export const PLAN_SCOPES = {
109
149
  };
110
150
  /** Every operation of the contract, by operationId. */
111
151
  export const OPERATIONS = {
152
+ ack_session_events: {
153
+ method: 'POST',
154
+ path: '/v1/session/events/ack',
155
+ pathParams: [],
156
+ arrayQueryParams: [],
157
+ scope: null,
158
+ requiredScopes: [],
159
+ hints: { read_only: false, destructive: false, idempotent: true, needs_projects: false },
160
+ errors: [
161
+ 'bad_request',
162
+ 'token_invalid',
163
+ 'token_expired',
164
+ 'token_revoked',
165
+ 'token_suspended',
166
+ 'agent_access_off',
167
+ 'body_too_large',
168
+ 'validation',
169
+ 'rate_limited',
170
+ 'internal',
171
+ 'unavailable',
172
+ 'session_token_required',
173
+ 'agent_sessions_off',
174
+ ],
175
+ hasBody: true,
176
+ statuses: [200],
177
+ discovery: false,
178
+ response: S.AckSessionEventsResponseSchema,
179
+ },
112
180
  add_comment: {
113
181
  method: 'POST',
114
182
  path: '/v1/items/{key}/comments',
@@ -138,6 +206,7 @@ export const OPERATIONS = {
138
206
  'rate_limited',
139
207
  'internal',
140
208
  'unavailable',
209
+ 'agent_sessions_off',
141
210
  ],
142
211
  hasBody: true,
143
212
  statuses: [200, 201],
@@ -172,6 +241,7 @@ export const OPERATIONS = {
172
241
  'rate_limited',
173
242
  'internal',
174
243
  'unavailable',
244
+ 'agent_sessions_off',
175
245
  ],
176
246
  hasBody: true,
177
247
  statuses: [200, 201],
@@ -206,6 +276,7 @@ export const OPERATIONS = {
206
276
  'rate_limited',
207
277
  'internal',
208
278
  'unavailable',
279
+ 'agent_sessions_off',
209
280
  ],
210
281
  hasBody: true,
211
282
  statuses: [200],
@@ -240,12 +311,47 @@ export const OPERATIONS = {
240
311
  'rate_limited',
241
312
  'internal',
242
313
  'unavailable',
314
+ 'agent_sessions_off',
243
315
  ],
244
316
  hasBody: true,
245
317
  statuses: [200],
246
318
  discovery: false,
247
319
  response: S.SprintItemsResponseSchema,
248
320
  },
321
+ answer_session_response: {
322
+ method: 'PATCH',
323
+ path: '/v1/session/responses/{id}',
324
+ pathParams: ['id'],
325
+ arrayQueryParams: [],
326
+ scope: null,
327
+ requiredScopes: [],
328
+ hints: { read_only: false, destructive: false, idempotent: true, needs_projects: false },
329
+ errors: [
330
+ 'bad_request',
331
+ 'token_invalid',
332
+ 'token_expired',
333
+ 'token_revoked',
334
+ 'token_suspended',
335
+ 'agent_access_off',
336
+ 'forbidden',
337
+ 'not_found',
338
+ 'body_too_large',
339
+ 'validation',
340
+ 'rate_limited',
341
+ 'internal',
342
+ 'unavailable',
343
+ 'session_token_required',
344
+ 'agent_sessions_off',
345
+ 'card_closed',
346
+ 'response_changed',
347
+ 'not_own_message',
348
+ 'outside_reach',
349
+ ],
350
+ hasBody: true,
351
+ statuses: [200],
352
+ discovery: false,
353
+ response: S.AnswerSessionResponseResponseSchema,
354
+ },
249
355
  apply_plan: {
250
356
  method: 'POST',
251
357
  path: '/v1/plans/{handle}/apply',
@@ -279,6 +385,9 @@ export const OPERATIONS = {
279
385
  'rate_limited',
280
386
  'internal',
281
387
  'unavailable',
388
+ 'agent_sessions_off',
389
+ 'plan_awaits_owner',
390
+ 'plan_card_required',
282
391
  ],
283
392
  hasBody: true,
284
393
  statuses: [200],
@@ -312,12 +421,75 @@ export const OPERATIONS = {
312
421
  'rate_limited',
313
422
  'internal',
314
423
  'unavailable',
424
+ 'agent_sessions_off',
315
425
  ],
316
426
  hasBody: false,
317
427
  statuses: [200],
318
428
  discovery: false,
319
429
  response: S.ReleaseResponseSchema,
320
430
  },
431
+ close_session_approval: {
432
+ method: 'POST',
433
+ path: '/v1/session/approvals/{id}/close',
434
+ pathParams: ['id'],
435
+ arrayQueryParams: [],
436
+ scope: null,
437
+ requiredScopes: [],
438
+ hints: { read_only: false, destructive: false, idempotent: true, needs_projects: false },
439
+ errors: [
440
+ 'bad_request',
441
+ 'token_invalid',
442
+ 'token_expired',
443
+ 'token_revoked',
444
+ 'token_suspended',
445
+ 'agent_access_off',
446
+ 'not_found',
447
+ 'body_too_large',
448
+ 'validation',
449
+ 'rate_limited',
450
+ 'internal',
451
+ 'unavailable',
452
+ 'session_token_required',
453
+ 'agent_sessions_off',
454
+ ],
455
+ hasBody: true,
456
+ statuses: [200],
457
+ discovery: false,
458
+ response: S.CloseSessionApprovalResponseSchema,
459
+ },
460
+ close_session_card: {
461
+ method: 'POST',
462
+ path: '/v1/session/messages/{id}/card/close',
463
+ pathParams: ['id'],
464
+ arrayQueryParams: [],
465
+ scope: null,
466
+ requiredScopes: [],
467
+ hints: { read_only: false, destructive: false, idempotent: false, needs_projects: false },
468
+ errors: [
469
+ 'bad_request',
470
+ 'token_invalid',
471
+ 'token_expired',
472
+ 'token_revoked',
473
+ 'token_suspended',
474
+ 'agent_access_off',
475
+ 'forbidden',
476
+ 'not_found',
477
+ 'body_too_large',
478
+ 'validation',
479
+ 'rate_limited',
480
+ 'internal',
481
+ 'unavailable',
482
+ 'session_token_required',
483
+ 'agent_sessions_off',
484
+ 'card_closed',
485
+ 'not_own_message',
486
+ 'outside_reach',
487
+ ],
488
+ hasBody: true,
489
+ statuses: [200],
490
+ discovery: false,
491
+ response: S.CloseSessionCardResponseSchema,
492
+ },
321
493
  complete_sprint: {
322
494
  method: 'POST',
323
495
  path: '/v1/projects/{key}/sprints/{sprint}/complete',
@@ -346,12 +518,59 @@ export const OPERATIONS = {
346
518
  'rate_limited',
347
519
  'internal',
348
520
  'unavailable',
521
+ 'agent_sessions_off',
349
522
  ],
350
523
  hasBody: true,
351
524
  statuses: [200],
352
525
  discovery: false,
353
526
  response: S.CompleteSprintResponseSchema,
354
527
  },
528
+ connect_poll: {
529
+ method: 'POST',
530
+ path: '/v1/connect/poll',
531
+ pathParams: [],
532
+ arrayQueryParams: [],
533
+ scope: null,
534
+ requiredScopes: [],
535
+ hints: { read_only: false, destructive: false, idempotent: false, needs_projects: false },
536
+ errors: [
537
+ 'bad_request',
538
+ 'body_too_large',
539
+ 'validation',
540
+ 'rate_limited',
541
+ 'internal',
542
+ 'unavailable',
543
+ 'authorization_pending',
544
+ 'slow_down',
545
+ 'access_denied',
546
+ 'expired_token',
547
+ ],
548
+ hasBody: true,
549
+ statuses: [200],
550
+ discovery: true,
551
+ response: S.ConnectPollResponseSchema,
552
+ },
553
+ connect_start: {
554
+ method: 'POST',
555
+ path: '/v1/connect/start',
556
+ pathParams: [],
557
+ arrayQueryParams: [],
558
+ scope: null,
559
+ requiredScopes: [],
560
+ hints: { read_only: false, destructive: false, idempotent: false, needs_projects: false },
561
+ errors: [
562
+ 'bad_request',
563
+ 'body_too_large',
564
+ 'validation',
565
+ 'rate_limited',
566
+ 'internal',
567
+ 'unavailable',
568
+ ],
569
+ hasBody: true,
570
+ statuses: [201],
571
+ discovery: true,
572
+ response: S.ConnectStartResponseSchema,
573
+ },
355
574
  create_channel: {
356
575
  method: 'POST',
357
576
  path: '/v1/channels',
@@ -378,6 +597,7 @@ export const OPERATIONS = {
378
597
  'rate_limited',
379
598
  'internal',
380
599
  'unavailable',
600
+ 'agent_sessions_off',
381
601
  ],
382
602
  hasBody: true,
383
603
  statuses: [200, 201],
@@ -416,6 +636,7 @@ export const OPERATIONS = {
416
636
  'rate_limited',
417
637
  'internal',
418
638
  'unavailable',
639
+ 'agent_sessions_off',
419
640
  ],
420
641
  hasBody: true,
421
642
  statuses: [200, 201],
@@ -450,6 +671,7 @@ export const OPERATIONS = {
450
671
  'rate_limited',
451
672
  'internal',
452
673
  'unavailable',
674
+ 'agent_sessions_off',
453
675
  ],
454
676
  hasBody: true,
455
677
  statuses: [200, 201],
@@ -486,6 +708,7 @@ export const OPERATIONS = {
486
708
  'rate_limited',
487
709
  'internal',
488
710
  'unavailable',
711
+ 'agent_sessions_off',
489
712
  ],
490
713
  hasBody: true,
491
714
  statuses: [201],
@@ -520,6 +743,7 @@ export const OPERATIONS = {
520
743
  'rate_limited',
521
744
  'internal',
522
745
  'unavailable',
746
+ 'agent_sessions_off',
523
747
  ],
524
748
  hasBody: true,
525
749
  statuses: [200, 201],
@@ -554,6 +778,7 @@ export const OPERATIONS = {
554
778
  'rate_limited',
555
779
  'internal',
556
780
  'unavailable',
781
+ 'agent_sessions_off',
557
782
  ],
558
783
  hasBody: true,
559
784
  statuses: [201],
@@ -588,6 +813,7 @@ export const OPERATIONS = {
588
813
  'rate_limited',
589
814
  'internal',
590
815
  'unavailable',
816
+ 'agent_sessions_off',
591
817
  ],
592
818
  hasBody: true,
593
819
  statuses: [201],
@@ -617,6 +843,7 @@ export const OPERATIONS = {
617
843
  'rate_limited',
618
844
  'internal',
619
845
  'unavailable',
846
+ 'agent_sessions_off',
620
847
  ],
621
848
  hasBody: false,
622
849
  statuses: [200],
@@ -651,6 +878,7 @@ export const OPERATIONS = {
651
878
  'rate_limited',
652
879
  'internal',
653
880
  'unavailable',
881
+ 'agent_sessions_off',
654
882
  ],
655
883
  hasBody: true,
656
884
  statuses: [200],
@@ -680,6 +908,7 @@ export const OPERATIONS = {
680
908
  'rate_limited',
681
909
  'internal',
682
910
  'unavailable',
911
+ 'agent_sessions_off',
683
912
  ],
684
913
  hasBody: false,
685
914
  statuses: [200],
@@ -709,6 +938,7 @@ export const OPERATIONS = {
709
938
  'rate_limited',
710
939
  'internal',
711
940
  'unavailable',
941
+ 'agent_sessions_off',
712
942
  ],
713
943
  hasBody: false,
714
944
  statuses: [200],
@@ -733,6 +963,7 @@ export const OPERATIONS = {
733
963
  'rate_limited',
734
964
  'internal',
735
965
  'unavailable',
966
+ 'agent_sessions_off',
736
967
  ],
737
968
  hasBody: false,
738
969
  statuses: [200],
@@ -757,6 +988,7 @@ export const OPERATIONS = {
757
988
  'rate_limited',
758
989
  'internal',
759
990
  'unavailable',
991
+ 'agent_sessions_off',
760
992
  ],
761
993
  hasBody: false,
762
994
  statuses: [200],
@@ -785,12 +1017,67 @@ export const OPERATIONS = {
785
1017
  'rate_limited',
786
1018
  'internal',
787
1019
  'unavailable',
1020
+ 'agent_sessions_off',
788
1021
  ],
789
1022
  hasBody: false,
790
1023
  statuses: [200],
791
1024
  discovery: false,
792
1025
  response: S.PageResponseSchema,
793
1026
  },
1027
+ get_session: {
1028
+ method: 'GET',
1029
+ path: '/v1/session',
1030
+ pathParams: [],
1031
+ arrayQueryParams: [],
1032
+ scope: null,
1033
+ requiredScopes: [],
1034
+ hints: { read_only: true, destructive: false, idempotent: true, needs_projects: false },
1035
+ errors: [
1036
+ 'bad_request',
1037
+ 'token_invalid',
1038
+ 'token_expired',
1039
+ 'token_revoked',
1040
+ 'token_suspended',
1041
+ 'agent_access_off',
1042
+ 'rate_limited',
1043
+ 'internal',
1044
+ 'unavailable',
1045
+ 'session_token_required',
1046
+ 'agent_sessions_off',
1047
+ ],
1048
+ hasBody: false,
1049
+ statuses: [200],
1050
+ discovery: false,
1051
+ response: S.SessionResponseSchema,
1052
+ },
1053
+ get_session_approval: {
1054
+ method: 'GET',
1055
+ path: '/v1/session/approvals/{id}',
1056
+ pathParams: ['id'],
1057
+ arrayQueryParams: [],
1058
+ scope: null,
1059
+ requiredScopes: [],
1060
+ hints: { read_only: true, destructive: false, idempotent: true, needs_projects: false },
1061
+ errors: [
1062
+ 'bad_request',
1063
+ 'token_invalid',
1064
+ 'token_expired',
1065
+ 'token_revoked',
1066
+ 'token_suspended',
1067
+ 'agent_access_off',
1068
+ 'not_found',
1069
+ 'validation',
1070
+ 'rate_limited',
1071
+ 'internal',
1072
+ 'unavailable',
1073
+ 'session_token_required',
1074
+ 'agent_sessions_off',
1075
+ ],
1076
+ hasBody: false,
1077
+ statuses: [200],
1078
+ discovery: false,
1079
+ response: S.GetSessionApprovalResponseSchema,
1080
+ },
794
1081
  get_thread: {
795
1082
  method: 'GET',
796
1083
  path: '/v1/messages/{id}/thread',
@@ -813,6 +1100,7 @@ export const OPERATIONS = {
813
1100
  'rate_limited',
814
1101
  'internal',
815
1102
  'unavailable',
1103
+ 'agent_sessions_off',
816
1104
  ],
817
1105
  hasBody: false,
818
1106
  statuses: [200],
@@ -843,6 +1131,7 @@ export const OPERATIONS = {
843
1131
  'rate_limited',
844
1132
  'internal',
845
1133
  'unavailable',
1134
+ 'agent_sessions_off',
846
1135
  ],
847
1136
  hasBody: false,
848
1137
  statuses: [200],
@@ -872,6 +1161,7 @@ export const OPERATIONS = {
872
1161
  'rate_limited',
873
1162
  'internal',
874
1163
  'unavailable',
1164
+ 'agent_sessions_off',
875
1165
  ],
876
1166
  hasBody: false,
877
1167
  statuses: [200],
@@ -898,6 +1188,7 @@ export const OPERATIONS = {
898
1188
  'rate_limited',
899
1189
  'internal',
900
1190
  'unavailable',
1191
+ 'agent_sessions_off',
901
1192
  ],
902
1193
  hasBody: false,
903
1194
  statuses: [200],
@@ -927,12 +1218,39 @@ export const OPERATIONS = {
927
1218
  'rate_limited',
928
1219
  'internal',
929
1220
  'unavailable',
1221
+ 'agent_sessions_off',
930
1222
  ],
931
1223
  hasBody: false,
932
1224
  statuses: [200],
933
1225
  discovery: false,
934
1226
  response: S.ListCommentsResponseSchema,
935
1227
  },
1228
+ list_emoji: {
1229
+ method: 'GET',
1230
+ path: '/v1/emoji',
1231
+ pathParams: [],
1232
+ arrayQueryParams: [],
1233
+ scope: 'chat:read',
1234
+ requiredScopes: ['chat:read'],
1235
+ hints: { read_only: true, destructive: false, idempotent: true, needs_projects: false },
1236
+ errors: [
1237
+ 'bad_request',
1238
+ 'token_invalid',
1239
+ 'token_expired',
1240
+ 'token_revoked',
1241
+ 'token_suspended',
1242
+ 'agent_access_off',
1243
+ 'scope_missing',
1244
+ 'rate_limited',
1245
+ 'internal',
1246
+ 'unavailable',
1247
+ 'agent_sessions_off',
1248
+ ],
1249
+ hasBody: false,
1250
+ statuses: [200],
1251
+ discovery: false,
1252
+ response: S.ListEmojiResponseSchema,
1253
+ },
936
1254
  list_members: {
937
1255
  method: 'GET',
938
1256
  path: '/v1/members',
@@ -953,6 +1271,7 @@ export const OPERATIONS = {
953
1271
  'rate_limited',
954
1272
  'internal',
955
1273
  'unavailable',
1274
+ 'agent_sessions_off',
956
1275
  ],
957
1276
  hasBody: false,
958
1277
  statuses: [200],
@@ -982,12 +1301,43 @@ export const OPERATIONS = {
982
1301
  'rate_limited',
983
1302
  'internal',
984
1303
  'unavailable',
1304
+ 'agent_sessions_off',
985
1305
  ],
986
1306
  hasBody: false,
987
1307
  statuses: [200],
988
1308
  discovery: false,
989
1309
  response: S.ListPagesResponseSchema,
990
1310
  },
1311
+ list_pins: {
1312
+ method: 'GET',
1313
+ path: '/v1/channels/{channel}/pins',
1314
+ pathParams: ['channel'],
1315
+ arrayQueryParams: [],
1316
+ scope: 'chat:read',
1317
+ requiredScopes: ['chat:read'],
1318
+ hints: { read_only: true, destructive: false, idempotent: true, needs_projects: false },
1319
+ errors: [
1320
+ 'bad_request',
1321
+ 'token_invalid',
1322
+ 'token_expired',
1323
+ 'token_revoked',
1324
+ 'token_suspended',
1325
+ 'agent_access_off',
1326
+ 'scope_missing',
1327
+ 'outside_limits',
1328
+ 'not_found',
1329
+ 'validation',
1330
+ 'ambiguous',
1331
+ 'rate_limited',
1332
+ 'internal',
1333
+ 'unavailable',
1334
+ 'agent_sessions_off',
1335
+ ],
1336
+ hasBody: false,
1337
+ statuses: [200],
1338
+ discovery: false,
1339
+ response: S.ListPinsResponseSchema,
1340
+ },
991
1341
  list_project_members: {
992
1342
  method: 'GET',
993
1343
  path: '/v1/projects/{key}/members',
@@ -1011,6 +1361,7 @@ export const OPERATIONS = {
1011
1361
  'rate_limited',
1012
1362
  'internal',
1013
1363
  'unavailable',
1364
+ 'agent_sessions_off',
1014
1365
  ],
1015
1366
  hasBody: false,
1016
1367
  statuses: [200],
@@ -1038,6 +1389,7 @@ export const OPERATIONS = {
1038
1389
  'rate_limited',
1039
1390
  'internal',
1040
1391
  'unavailable',
1392
+ 'agent_sessions_off',
1041
1393
  ],
1042
1394
  hasBody: false,
1043
1395
  statuses: [200],
@@ -1067,12 +1419,66 @@ export const OPERATIONS = {
1067
1419
  'rate_limited',
1068
1420
  'internal',
1069
1421
  'unavailable',
1422
+ 'agent_sessions_off',
1070
1423
  ],
1071
1424
  hasBody: false,
1072
1425
  statuses: [200],
1073
1426
  discovery: false,
1074
1427
  response: S.ListReleasesResponseSchema,
1075
1428
  },
1429
+ list_session_events: {
1430
+ method: 'GET',
1431
+ path: '/v1/session/events',
1432
+ pathParams: [],
1433
+ arrayQueryParams: [],
1434
+ scope: null,
1435
+ requiredScopes: [],
1436
+ hints: { read_only: true, destructive: false, idempotent: true, needs_projects: false },
1437
+ errors: [
1438
+ 'bad_request',
1439
+ 'token_invalid',
1440
+ 'token_expired',
1441
+ 'token_revoked',
1442
+ 'token_suspended',
1443
+ 'agent_access_off',
1444
+ 'validation',
1445
+ 'rate_limited',
1446
+ 'internal',
1447
+ 'unavailable',
1448
+ 'session_token_required',
1449
+ 'agent_sessions_off',
1450
+ ],
1451
+ hasBody: false,
1452
+ statuses: [200],
1453
+ discovery: false,
1454
+ response: S.SessionEventsResponseSchema,
1455
+ },
1456
+ list_session_threads: {
1457
+ method: 'GET',
1458
+ path: '/v1/session/threads',
1459
+ pathParams: [],
1460
+ arrayQueryParams: [],
1461
+ scope: null,
1462
+ requiredScopes: [],
1463
+ hints: { read_only: true, destructive: false, idempotent: true, needs_projects: false },
1464
+ errors: [
1465
+ 'bad_request',
1466
+ 'token_invalid',
1467
+ 'token_expired',
1468
+ 'token_revoked',
1469
+ 'token_suspended',
1470
+ 'agent_access_off',
1471
+ 'rate_limited',
1472
+ 'internal',
1473
+ 'unavailable',
1474
+ 'session_token_required',
1475
+ 'agent_sessions_off',
1476
+ ],
1477
+ hasBody: false,
1478
+ statuses: [200],
1479
+ discovery: false,
1480
+ response: S.ListSessionThreadsResponseSchema,
1481
+ },
1076
1482
  list_sprints: {
1077
1483
  method: 'GET',
1078
1484
  path: '/v1/projects/{key}/sprints',
@@ -1096,6 +1502,7 @@ export const OPERATIONS = {
1096
1502
  'rate_limited',
1097
1503
  'internal',
1098
1504
  'unavailable',
1505
+ 'agent_sessions_off',
1099
1506
  ],
1100
1507
  hasBody: false,
1101
1508
  statuses: [200],
@@ -1123,12 +1530,129 @@ export const OPERATIONS = {
1123
1530
  'rate_limited',
1124
1531
  'internal',
1125
1532
  'unavailable',
1533
+ 'agent_sessions_off',
1126
1534
  ],
1127
1535
  hasBody: false,
1128
1536
  statuses: [200],
1129
1537
  discovery: false,
1130
1538
  response: S.ListWorkTypesResponseSchema,
1131
1539
  },
1540
+ post_plan_card: {
1541
+ method: 'POST',
1542
+ path: '/v1/session/plan-cards',
1543
+ pathParams: [],
1544
+ arrayQueryParams: [],
1545
+ scope: null,
1546
+ requiredScopes: [],
1547
+ hints: { read_only: false, destructive: false, idempotent: false, needs_projects: false },
1548
+ errors: [
1549
+ 'bad_request',
1550
+ 'token_invalid',
1551
+ 'token_expired',
1552
+ 'token_revoked',
1553
+ 'token_suspended',
1554
+ 'agent_access_off',
1555
+ 'scope_missing',
1556
+ 'forbidden',
1557
+ 'archived',
1558
+ 'not_found',
1559
+ 'idempotency_conflict',
1560
+ 'plan_used',
1561
+ 'plan_expired',
1562
+ 'body_too_large',
1563
+ 'validation',
1564
+ 'rate_limited',
1565
+ 'internal',
1566
+ 'unavailable',
1567
+ 'session_token_required',
1568
+ 'agent_sessions_off',
1569
+ 'thread_other_session',
1570
+ 'card_invalid',
1571
+ 'plan_card_exists',
1572
+ 'thread_not_bound',
1573
+ 'outside_reach',
1574
+ 'plan_outside_thread',
1575
+ ],
1576
+ hasBody: true,
1577
+ statuses: [200, 201],
1578
+ discovery: false,
1579
+ response: S.PostPlanCardResponseSchema,
1580
+ },
1581
+ post_session_approval: {
1582
+ method: 'POST',
1583
+ path: '/v1/session/approvals',
1584
+ pathParams: [],
1585
+ arrayQueryParams: [],
1586
+ scope: null,
1587
+ requiredScopes: [],
1588
+ hints: { read_only: false, destructive: false, idempotent: false, needs_projects: false },
1589
+ errors: [
1590
+ 'bad_request',
1591
+ 'token_invalid',
1592
+ 'token_expired',
1593
+ 'token_revoked',
1594
+ 'token_suspended',
1595
+ 'agent_access_off',
1596
+ 'forbidden',
1597
+ 'archived',
1598
+ 'not_found',
1599
+ 'idempotency_conflict',
1600
+ 'body_too_large',
1601
+ 'validation',
1602
+ 'rate_limited',
1603
+ 'internal',
1604
+ 'unavailable',
1605
+ 'session_token_required',
1606
+ 'agent_sessions_off',
1607
+ 'thread_other_session',
1608
+ 'not_own_message',
1609
+ 'thread_not_bound',
1610
+ 'outside_reach',
1611
+ 'approvals_off',
1612
+ 'too_many_open',
1613
+ ],
1614
+ hasBody: true,
1615
+ statuses: [200, 201],
1616
+ discovery: false,
1617
+ response: S.PostSessionApprovalResponseSchema,
1618
+ },
1619
+ post_session_message: {
1620
+ method: 'POST',
1621
+ path: '/v1/session/messages',
1622
+ pathParams: [],
1623
+ arrayQueryParams: [],
1624
+ scope: null,
1625
+ requiredScopes: [],
1626
+ hints: { read_only: false, destructive: false, idempotent: false, needs_projects: false },
1627
+ errors: [
1628
+ 'bad_request',
1629
+ 'token_invalid',
1630
+ 'token_expired',
1631
+ 'token_revoked',
1632
+ 'token_suspended',
1633
+ 'agent_access_off',
1634
+ 'forbidden',
1635
+ 'archived',
1636
+ 'not_found',
1637
+ 'idempotency_conflict',
1638
+ 'body_too_large',
1639
+ 'validation',
1640
+ 'rate_limited',
1641
+ 'internal',
1642
+ 'unavailable',
1643
+ 'session_token_required',
1644
+ 'agent_sessions_off',
1645
+ 'thread_other_session',
1646
+ 'card_invalid',
1647
+ 'thread_not_bound',
1648
+ 'thread_required',
1649
+ 'outside_reach',
1650
+ ],
1651
+ hasBody: true,
1652
+ statuses: [200, 201],
1653
+ discovery: false,
1654
+ response: S.PostSessionMessageResponseSchema,
1655
+ },
1132
1656
  rank_item: {
1133
1657
  method: 'POST',
1134
1658
  path: '/v1/items/{key}/rank',
@@ -1157,6 +1681,7 @@ export const OPERATIONS = {
1157
1681
  'rate_limited',
1158
1682
  'internal',
1159
1683
  'unavailable',
1684
+ 'agent_sessions_off',
1160
1685
  ],
1161
1686
  hasBody: true,
1162
1687
  statuses: [200],
@@ -1191,6 +1716,7 @@ export const OPERATIONS = {
1191
1716
  'rate_limited',
1192
1717
  'internal',
1193
1718
  'unavailable',
1719
+ 'agent_sessions_off',
1194
1720
  ],
1195
1721
  hasBody: true,
1196
1722
  statuses: [200],
@@ -1224,6 +1750,7 @@ export const OPERATIONS = {
1224
1750
  'rate_limited',
1225
1751
  'internal',
1226
1752
  'unavailable',
1753
+ 'agent_sessions_off',
1227
1754
  ],
1228
1755
  hasBody: false,
1229
1756
  statuses: [200],
@@ -1258,6 +1785,7 @@ export const OPERATIONS = {
1258
1785
  'rate_limited',
1259
1786
  'internal',
1260
1787
  'unavailable',
1788
+ 'agent_sessions_off',
1261
1789
  ],
1262
1790
  hasBody: true,
1263
1791
  statuses: [200],
@@ -1292,6 +1820,7 @@ export const OPERATIONS = {
1292
1820
  'rate_limited',
1293
1821
  'internal',
1294
1822
  'unavailable',
1823
+ 'agent_sessions_off',
1295
1824
  ],
1296
1825
  hasBody: true,
1297
1826
  statuses: [200],
@@ -1326,6 +1855,7 @@ export const OPERATIONS = {
1326
1855
  'internal',
1327
1856
  'unavailable',
1328
1857
  'release_archived',
1858
+ 'agent_sessions_off',
1329
1859
  ],
1330
1860
  hasBody: false,
1331
1861
  statuses: [200],
@@ -1359,12 +1889,39 @@ export const OPERATIONS = {
1359
1889
  'rate_limited',
1360
1890
  'internal',
1361
1891
  'unavailable',
1892
+ 'agent_sessions_off',
1362
1893
  ],
1363
1894
  hasBody: false,
1364
1895
  statuses: [200],
1365
1896
  discovery: false,
1366
1897
  response: S.ReleaseResponseSchema,
1367
1898
  },
1899
+ revoke_session: {
1900
+ method: 'DELETE',
1901
+ path: '/v1/session',
1902
+ pathParams: [],
1903
+ arrayQueryParams: [],
1904
+ scope: null,
1905
+ requiredScopes: [],
1906
+ hints: { read_only: false, destructive: true, idempotent: true, needs_projects: false },
1907
+ errors: [
1908
+ 'bad_request',
1909
+ 'token_invalid',
1910
+ 'token_expired',
1911
+ 'token_revoked',
1912
+ 'token_suspended',
1913
+ 'agent_access_off',
1914
+ 'rate_limited',
1915
+ 'internal',
1916
+ 'unavailable',
1917
+ 'session_token_required',
1918
+ 'agent_sessions_off',
1919
+ ],
1920
+ hasBody: false,
1921
+ statuses: [204],
1922
+ discovery: false,
1923
+ response: S.NoContentSchema,
1924
+ },
1368
1925
  search_items: {
1369
1926
  method: 'GET',
1370
1927
  path: '/v1/items',
@@ -1399,6 +1956,7 @@ export const OPERATIONS = {
1399
1956
  'rate_limited',
1400
1957
  'internal',
1401
1958
  'unavailable',
1959
+ 'agent_sessions_off',
1402
1960
  ],
1403
1961
  hasBody: false,
1404
1962
  statuses: [200],
@@ -1428,12 +1986,72 @@ export const OPERATIONS = {
1428
1986
  'rate_limited',
1429
1987
  'internal',
1430
1988
  'unavailable',
1989
+ 'agent_sessions_off',
1431
1990
  ],
1432
1991
  hasBody: false,
1433
1992
  statuses: [200],
1434
1993
  discovery: false,
1435
1994
  response: S.SearchPagesResponseSchema,
1436
1995
  },
1996
+ session_heartbeat: {
1997
+ method: 'POST',
1998
+ path: '/v1/session/heartbeat',
1999
+ pathParams: [],
2000
+ arrayQueryParams: [],
2001
+ scope: null,
2002
+ requiredScopes: [],
2003
+ hints: { read_only: false, destructive: false, idempotent: true, needs_projects: false },
2004
+ errors: [
2005
+ 'bad_request',
2006
+ 'token_invalid',
2007
+ 'token_expired',
2008
+ 'token_revoked',
2009
+ 'token_suspended',
2010
+ 'agent_access_off',
2011
+ 'body_too_large',
2012
+ 'validation',
2013
+ 'rate_limited',
2014
+ 'internal',
2015
+ 'unavailable',
2016
+ 'session_token_required',
2017
+ 'agent_sessions_off',
2018
+ ],
2019
+ hasBody: true,
2020
+ statuses: [200],
2021
+ discovery: false,
2022
+ response: S.SessionHeartbeatResponseSchema,
2023
+ },
2024
+ session_typing: {
2025
+ method: 'POST',
2026
+ path: '/v1/session/typing',
2027
+ pathParams: [],
2028
+ arrayQueryParams: [],
2029
+ scope: null,
2030
+ requiredScopes: [],
2031
+ hints: { read_only: false, destructive: false, idempotent: true, needs_projects: false },
2032
+ errors: [
2033
+ 'bad_request',
2034
+ 'token_invalid',
2035
+ 'token_expired',
2036
+ 'token_revoked',
2037
+ 'token_suspended',
2038
+ 'agent_access_off',
2039
+ 'body_too_large',
2040
+ 'validation',
2041
+ 'rate_limited',
2042
+ 'internal',
2043
+ 'unavailable',
2044
+ 'session_token_required',
2045
+ 'agent_sessions_off',
2046
+ 'thread_other_session',
2047
+ 'thread_not_bound',
2048
+ 'outside_reach',
2049
+ ],
2050
+ hasBody: true,
2051
+ statuses: [204],
2052
+ discovery: false,
2053
+ response: S.NoContentSchema,
2054
+ },
1437
2055
  start_sprint: {
1438
2056
  method: 'POST',
1439
2057
  path: '/v1/projects/{key}/sprints/{sprint}/start',
@@ -1462,6 +2080,7 @@ export const OPERATIONS = {
1462
2080
  'rate_limited',
1463
2081
  'internal',
1464
2082
  'unavailable',
2083
+ 'agent_sessions_off',
1465
2084
  ],
1466
2085
  hasBody: true,
1467
2086
  statuses: [200],
@@ -1499,6 +2118,7 @@ export const OPERATIONS = {
1499
2118
  'rate_limited',
1500
2119
  'internal',
1501
2120
  'unavailable',
2121
+ 'agent_sessions_off',
1502
2122
  ],
1503
2123
  hasBody: true,
1504
2124
  statuses: [200],
@@ -1537,6 +2157,7 @@ export const OPERATIONS = {
1537
2157
  'rate_limited',
1538
2158
  'internal',
1539
2159
  'unavailable',
2160
+ 'agent_sessions_off',
1540
2161
  ],
1541
2162
  hasBody: true,
1542
2163
  statuses: [200],
@@ -1570,6 +2191,7 @@ export const OPERATIONS = {
1570
2191
  'rate_limited',
1571
2192
  'internal',
1572
2193
  'unavailable',
2194
+ 'agent_sessions_off',
1573
2195
  ],
1574
2196
  hasBody: true,
1575
2197
  statuses: [200],
@@ -1606,10 +2228,45 @@ export const OPERATIONS = {
1606
2228
  'unavailable',
1607
2229
  'release_archived',
1608
2230
  'release_not_released',
2231
+ 'agent_sessions_off',
1609
2232
  ],
1610
2233
  hasBody: true,
1611
2234
  statuses: [200],
1612
2235
  discovery: false,
1613
2236
  response: S.ReleaseResponseSchema,
1614
2237
  },
2238
+ update_session_message: {
2239
+ method: 'PATCH',
2240
+ path: '/v1/session/messages/{id}',
2241
+ pathParams: ['id'],
2242
+ arrayQueryParams: [],
2243
+ scope: null,
2244
+ requiredScopes: [],
2245
+ hints: { read_only: false, destructive: true, idempotent: true, needs_projects: false },
2246
+ errors: [
2247
+ 'bad_request',
2248
+ 'token_invalid',
2249
+ 'token_expired',
2250
+ 'token_revoked',
2251
+ 'token_suspended',
2252
+ 'agent_access_off',
2253
+ 'forbidden',
2254
+ 'not_found',
2255
+ 'body_too_large',
2256
+ 'validation',
2257
+ 'rate_limited',
2258
+ 'internal',
2259
+ 'unavailable',
2260
+ 'session_token_required',
2261
+ 'agent_sessions_off',
2262
+ 'card_invalid',
2263
+ 'card_closed',
2264
+ 'not_own_message',
2265
+ 'outside_reach',
2266
+ ],
2267
+ hasBody: true,
2268
+ statuses: [200],
2269
+ discovery: false,
2270
+ response: S.UpdateSessionMessageResponseSchema,
2271
+ },
1615
2272
  };