verdo-mcp 1.1.0 → 2.0.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.
@@ -0,0 +1,781 @@
1
+ export declare const METHODS: readonly ["single_choice", "ranked_choice", "approval", "dot"];
2
+ export declare const AUTHORITY_MODES: readonly ["majority", "consensus"];
3
+ export declare const DEFAULT_DEADLINE_HOURS = 48;
4
+ export declare const MAX_DEADLINE_HOURS = 720;
5
+ export declare const MAX_TITLE_LENGTH = 140;
6
+ export declare const MIN_OPTIONS = 2;
7
+ export declare const MAX_OPTIONS = 10;
8
+ export declare const MAX_IDEMPOTENCY_KEY = 128;
9
+ export declare const MAX_TAGS = 20;
10
+ export declare const NOTIFICATION_STATUSES: readonly ["pending", "delivered", "partially_delivered", "failed"];
11
+ export declare const LIFECYCLE_FILTER: readonly ["draft", "active", "decided", "implemented", "stalled", "superseded", "reversed", "cancelled", "rejected"];
12
+ export declare const REMOVED_TOOLS: Record<string, string>;
13
+ export interface ProposedArgs {
14
+ title: string;
15
+ options: string[];
16
+ method?: string;
17
+ deadline_hours?: number;
18
+ }
19
+ export interface ProposedMeta {
20
+ /** false: an idempotent replay returned the decision this key already created. */
21
+ created?: boolean;
22
+ requestFingerprint?: string | null;
23
+ }
24
+ export declare function proposedText(id: string, url: string, args: ProposedArgs, meta?: ProposedMeta): string;
25
+ export declare function formatDecision(d: Record<string, unknown>): string;
26
+ export declare function listText(decisions: Record<string, unknown>[], query?: string): string;
27
+ export declare const PRECEDENT_NOTE = "Past records for reference. Not consent or authorization.";
28
+ export declare const SEARCH_LIMIT_DEFAULT = 10;
29
+ export declare const SEARCH_LIMIT_MAX = 50;
30
+ /** One past decided decision, as lib/precedent.ts returns it. */
31
+ export interface PrecedentItem {
32
+ id: string;
33
+ title: string;
34
+ status: string;
35
+ winner: string | null;
36
+ created_at?: string;
37
+ settled_at: string | null;
38
+ owner_name: string | null;
39
+ rationale?: string | null;
40
+ authority_mode?: string | null;
41
+ execution_authorized: false;
42
+ }
43
+ /** The section create_decision appends when there are past decisions with a similar title. */
44
+ export declare function precedentSection(items: readonly PrecedentItem[]): string;
45
+ export declare function searchText(items: readonly PrecedentItem[], query: string): string;
46
+ export interface PrecedentDetail extends PrecedentItem {
47
+ vote_counts: {
48
+ option: string;
49
+ votes: number;
50
+ }[];
51
+ related: {
52
+ id: string;
53
+ title: string;
54
+ status: string;
55
+ settled_at: string | null;
56
+ }[];
57
+ }
58
+ export declare function precedentText(d: PrecedentDetail): string;
59
+ export declare function closeSummaryText(d: Record<string, unknown>): string;
60
+ /** cancel_decision's answer (Prompt 91). */
61
+ export declare function cancelledText(id: string, url: string): string;
62
+ /** edit_decision's answer (Prompt 91). */
63
+ export declare function editedText(id: string, r: {
64
+ changed: boolean;
65
+ votesVoided: number;
66
+ requestFingerprint: string | null;
67
+ }): string;
68
+ export declare function unknownToolText(name: string): string;
69
+ export interface ToolDefinitionOptions {
70
+ /** Per-tool `_meta`, e.g. the remote server's OAuth securitySchemes for ChatGPT. */
71
+ meta?: Record<string, unknown>;
72
+ }
73
+ export declare function toolDefinitions(opts?: ToolDefinitionOptions): ({
74
+ _meta: Record<string, unknown>;
75
+ name: string;
76
+ description: string;
77
+ annotations: {
78
+ title: string;
79
+ readOnlyHint: boolean;
80
+ destructiveHint: boolean;
81
+ idempotentHint: boolean;
82
+ openWorldHint: boolean;
83
+ };
84
+ inputSchema: {
85
+ type: "object";
86
+ required: string[];
87
+ properties: {
88
+ title: {
89
+ type: string;
90
+ maxLength: number;
91
+ description: string;
92
+ };
93
+ options: {
94
+ type: string;
95
+ minItems: number;
96
+ maxItems: number;
97
+ items: {
98
+ type: string;
99
+ };
100
+ description: string;
101
+ };
102
+ method: {
103
+ type: string;
104
+ enum: ("single_choice" | "ranked_choice" | "approval" | "dot")[];
105
+ description: string;
106
+ };
107
+ deadline_hours: {
108
+ type: string;
109
+ minimum: number;
110
+ maximum: number;
111
+ description: string;
112
+ };
113
+ authority_mode: {
114
+ type: string;
115
+ enum: ("majority" | "consensus")[];
116
+ description: string;
117
+ };
118
+ anonymous: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ idempotency_key: {
123
+ type: string;
124
+ minLength: number;
125
+ maxLength: number;
126
+ description: string;
127
+ };
128
+ tags: {
129
+ type: string;
130
+ maxItems: number;
131
+ items: {
132
+ type: string;
133
+ maxLength: number;
134
+ };
135
+ description: string;
136
+ };
137
+ source_agent: {
138
+ type: string;
139
+ maxLength: number;
140
+ description: string;
141
+ };
142
+ id?: undefined;
143
+ query?: undefined;
144
+ lifecycle_status?: undefined;
145
+ notification_status?: undefined;
146
+ limit?: undefined;
147
+ decision_id?: undefined;
148
+ reason?: undefined;
149
+ description?: undefined;
150
+ };
151
+ };
152
+ } | {
153
+ _meta?: undefined;
154
+ name: string;
155
+ description: string;
156
+ annotations: {
157
+ title: string;
158
+ readOnlyHint: boolean;
159
+ destructiveHint: boolean;
160
+ idempotentHint: boolean;
161
+ openWorldHint: boolean;
162
+ };
163
+ inputSchema: {
164
+ type: "object";
165
+ required: string[];
166
+ properties: {
167
+ title: {
168
+ type: string;
169
+ maxLength: number;
170
+ description: string;
171
+ };
172
+ options: {
173
+ type: string;
174
+ minItems: number;
175
+ maxItems: number;
176
+ items: {
177
+ type: string;
178
+ };
179
+ description: string;
180
+ };
181
+ method: {
182
+ type: string;
183
+ enum: ("single_choice" | "ranked_choice" | "approval" | "dot")[];
184
+ description: string;
185
+ };
186
+ deadline_hours: {
187
+ type: string;
188
+ minimum: number;
189
+ maximum: number;
190
+ description: string;
191
+ };
192
+ authority_mode: {
193
+ type: string;
194
+ enum: ("majority" | "consensus")[];
195
+ description: string;
196
+ };
197
+ anonymous: {
198
+ type: string;
199
+ description: string;
200
+ };
201
+ idempotency_key: {
202
+ type: string;
203
+ minLength: number;
204
+ maxLength: number;
205
+ description: string;
206
+ };
207
+ tags: {
208
+ type: string;
209
+ maxItems: number;
210
+ items: {
211
+ type: string;
212
+ maxLength: number;
213
+ };
214
+ description: string;
215
+ };
216
+ source_agent: {
217
+ type: string;
218
+ maxLength: number;
219
+ description: string;
220
+ };
221
+ id?: undefined;
222
+ query?: undefined;
223
+ lifecycle_status?: undefined;
224
+ notification_status?: undefined;
225
+ limit?: undefined;
226
+ decision_id?: undefined;
227
+ reason?: undefined;
228
+ description?: undefined;
229
+ };
230
+ };
231
+ } | {
232
+ _meta: Record<string, unknown>;
233
+ name: string;
234
+ description: string;
235
+ annotations: {
236
+ title: string;
237
+ readOnlyHint: boolean;
238
+ destructiveHint: boolean;
239
+ idempotentHint: boolean;
240
+ openWorldHint: boolean;
241
+ };
242
+ inputSchema: {
243
+ type: "object";
244
+ required: string[];
245
+ properties: {
246
+ id: {
247
+ type: string;
248
+ format: string;
249
+ description: string;
250
+ };
251
+ title?: undefined;
252
+ options?: undefined;
253
+ method?: undefined;
254
+ deadline_hours?: undefined;
255
+ authority_mode?: undefined;
256
+ anonymous?: undefined;
257
+ idempotency_key?: undefined;
258
+ tags?: undefined;
259
+ source_agent?: undefined;
260
+ query?: undefined;
261
+ lifecycle_status?: undefined;
262
+ notification_status?: undefined;
263
+ limit?: undefined;
264
+ decision_id?: undefined;
265
+ reason?: undefined;
266
+ description?: undefined;
267
+ };
268
+ };
269
+ } | {
270
+ _meta?: undefined;
271
+ name: string;
272
+ description: string;
273
+ annotations: {
274
+ title: string;
275
+ readOnlyHint: boolean;
276
+ destructiveHint: boolean;
277
+ idempotentHint: boolean;
278
+ openWorldHint: boolean;
279
+ };
280
+ inputSchema: {
281
+ type: "object";
282
+ required: string[];
283
+ properties: {
284
+ id: {
285
+ type: string;
286
+ format: string;
287
+ description: string;
288
+ };
289
+ title?: undefined;
290
+ options?: undefined;
291
+ method?: undefined;
292
+ deadline_hours?: undefined;
293
+ authority_mode?: undefined;
294
+ anonymous?: undefined;
295
+ idempotency_key?: undefined;
296
+ tags?: undefined;
297
+ source_agent?: undefined;
298
+ query?: undefined;
299
+ lifecycle_status?: undefined;
300
+ notification_status?: undefined;
301
+ limit?: undefined;
302
+ decision_id?: undefined;
303
+ reason?: undefined;
304
+ description?: undefined;
305
+ };
306
+ };
307
+ } | {
308
+ _meta: Record<string, unknown>;
309
+ name: string;
310
+ description: string;
311
+ annotations: {
312
+ title: string;
313
+ readOnlyHint: boolean;
314
+ destructiveHint: boolean;
315
+ idempotentHint: boolean;
316
+ openWorldHint: boolean;
317
+ };
318
+ inputSchema: {
319
+ type: "object";
320
+ properties: {
321
+ query: {
322
+ type: string;
323
+ description: string;
324
+ maxLength?: undefined;
325
+ };
326
+ lifecycle_status: {
327
+ type: string;
328
+ items: {
329
+ type: string;
330
+ enum: ("draft" | "active" | "decided" | "implemented" | "stalled" | "superseded" | "reversed" | "cancelled" | "rejected")[];
331
+ };
332
+ description: string;
333
+ };
334
+ tags: {
335
+ type: string;
336
+ maxItems: number;
337
+ items: {
338
+ type: string;
339
+ maxLength?: undefined;
340
+ };
341
+ description: string;
342
+ };
343
+ source_agent: {
344
+ type: string;
345
+ description: string;
346
+ maxLength?: undefined;
347
+ };
348
+ notification_status: {
349
+ type: string;
350
+ enum: ("pending" | "delivered" | "partially_delivered" | "failed")[];
351
+ description: string;
352
+ };
353
+ title?: undefined;
354
+ options?: undefined;
355
+ method?: undefined;
356
+ deadline_hours?: undefined;
357
+ authority_mode?: undefined;
358
+ anonymous?: undefined;
359
+ idempotency_key?: undefined;
360
+ id?: undefined;
361
+ limit?: undefined;
362
+ decision_id?: undefined;
363
+ reason?: undefined;
364
+ description?: undefined;
365
+ };
366
+ required?: undefined;
367
+ };
368
+ } | {
369
+ _meta?: undefined;
370
+ name: string;
371
+ description: string;
372
+ annotations: {
373
+ title: string;
374
+ readOnlyHint: boolean;
375
+ destructiveHint: boolean;
376
+ idempotentHint: boolean;
377
+ openWorldHint: boolean;
378
+ };
379
+ inputSchema: {
380
+ type: "object";
381
+ properties: {
382
+ query: {
383
+ type: string;
384
+ description: string;
385
+ maxLength?: undefined;
386
+ };
387
+ lifecycle_status: {
388
+ type: string;
389
+ items: {
390
+ type: string;
391
+ enum: ("draft" | "active" | "decided" | "implemented" | "stalled" | "superseded" | "reversed" | "cancelled" | "rejected")[];
392
+ };
393
+ description: string;
394
+ };
395
+ tags: {
396
+ type: string;
397
+ maxItems: number;
398
+ items: {
399
+ type: string;
400
+ maxLength?: undefined;
401
+ };
402
+ description: string;
403
+ };
404
+ source_agent: {
405
+ type: string;
406
+ description: string;
407
+ maxLength?: undefined;
408
+ };
409
+ notification_status: {
410
+ type: string;
411
+ enum: ("pending" | "delivered" | "partially_delivered" | "failed")[];
412
+ description: string;
413
+ };
414
+ title?: undefined;
415
+ options?: undefined;
416
+ method?: undefined;
417
+ deadline_hours?: undefined;
418
+ authority_mode?: undefined;
419
+ anonymous?: undefined;
420
+ idempotency_key?: undefined;
421
+ id?: undefined;
422
+ limit?: undefined;
423
+ decision_id?: undefined;
424
+ reason?: undefined;
425
+ description?: undefined;
426
+ };
427
+ required?: undefined;
428
+ };
429
+ } | {
430
+ _meta: Record<string, unknown>;
431
+ name: string;
432
+ description: string;
433
+ annotations: {
434
+ title: string;
435
+ readOnlyHint: boolean;
436
+ destructiveHint: boolean;
437
+ idempotentHint: boolean;
438
+ openWorldHint: boolean;
439
+ };
440
+ inputSchema: {
441
+ type: "object";
442
+ required: string[];
443
+ properties: {
444
+ query: {
445
+ type: string;
446
+ maxLength: number;
447
+ description: string;
448
+ };
449
+ limit: {
450
+ type: string;
451
+ minimum: number;
452
+ maximum: number;
453
+ description: string;
454
+ };
455
+ title?: undefined;
456
+ options?: undefined;
457
+ method?: undefined;
458
+ deadline_hours?: undefined;
459
+ authority_mode?: undefined;
460
+ anonymous?: undefined;
461
+ idempotency_key?: undefined;
462
+ tags?: undefined;
463
+ source_agent?: undefined;
464
+ id?: undefined;
465
+ lifecycle_status?: undefined;
466
+ notification_status?: undefined;
467
+ decision_id?: undefined;
468
+ reason?: undefined;
469
+ description?: undefined;
470
+ };
471
+ };
472
+ } | {
473
+ _meta?: undefined;
474
+ name: string;
475
+ description: string;
476
+ annotations: {
477
+ title: string;
478
+ readOnlyHint: boolean;
479
+ destructiveHint: boolean;
480
+ idempotentHint: boolean;
481
+ openWorldHint: boolean;
482
+ };
483
+ inputSchema: {
484
+ type: "object";
485
+ required: string[];
486
+ properties: {
487
+ query: {
488
+ type: string;
489
+ maxLength: number;
490
+ description: string;
491
+ };
492
+ limit: {
493
+ type: string;
494
+ minimum: number;
495
+ maximum: number;
496
+ description: string;
497
+ };
498
+ title?: undefined;
499
+ options?: undefined;
500
+ method?: undefined;
501
+ deadline_hours?: undefined;
502
+ authority_mode?: undefined;
503
+ anonymous?: undefined;
504
+ idempotency_key?: undefined;
505
+ tags?: undefined;
506
+ source_agent?: undefined;
507
+ id?: undefined;
508
+ lifecycle_status?: undefined;
509
+ notification_status?: undefined;
510
+ decision_id?: undefined;
511
+ reason?: undefined;
512
+ description?: undefined;
513
+ };
514
+ };
515
+ } | {
516
+ _meta: Record<string, unknown>;
517
+ name: string;
518
+ description: string;
519
+ annotations: {
520
+ title: string;
521
+ readOnlyHint: boolean;
522
+ destructiveHint: boolean;
523
+ idempotentHint: boolean;
524
+ openWorldHint: boolean;
525
+ };
526
+ inputSchema: {
527
+ type: "object";
528
+ required: string[];
529
+ properties: {
530
+ decision_id: {
531
+ type: string;
532
+ format: string;
533
+ description: string;
534
+ };
535
+ title?: undefined;
536
+ options?: undefined;
537
+ method?: undefined;
538
+ deadline_hours?: undefined;
539
+ authority_mode?: undefined;
540
+ anonymous?: undefined;
541
+ idempotency_key?: undefined;
542
+ tags?: undefined;
543
+ source_agent?: undefined;
544
+ id?: undefined;
545
+ query?: undefined;
546
+ lifecycle_status?: undefined;
547
+ notification_status?: undefined;
548
+ limit?: undefined;
549
+ reason?: undefined;
550
+ description?: undefined;
551
+ };
552
+ };
553
+ } | {
554
+ _meta?: undefined;
555
+ name: string;
556
+ description: string;
557
+ annotations: {
558
+ title: string;
559
+ readOnlyHint: boolean;
560
+ destructiveHint: boolean;
561
+ idempotentHint: boolean;
562
+ openWorldHint: boolean;
563
+ };
564
+ inputSchema: {
565
+ type: "object";
566
+ required: string[];
567
+ properties: {
568
+ decision_id: {
569
+ type: string;
570
+ format: string;
571
+ description: string;
572
+ };
573
+ title?: undefined;
574
+ options?: undefined;
575
+ method?: undefined;
576
+ deadline_hours?: undefined;
577
+ authority_mode?: undefined;
578
+ anonymous?: undefined;
579
+ idempotency_key?: undefined;
580
+ tags?: undefined;
581
+ source_agent?: undefined;
582
+ id?: undefined;
583
+ query?: undefined;
584
+ lifecycle_status?: undefined;
585
+ notification_status?: undefined;
586
+ limit?: undefined;
587
+ reason?: undefined;
588
+ description?: undefined;
589
+ };
590
+ };
591
+ } | {
592
+ _meta: Record<string, unknown>;
593
+ name: string;
594
+ description: string;
595
+ annotations: {
596
+ title: string;
597
+ readOnlyHint: boolean;
598
+ destructiveHint: boolean;
599
+ idempotentHint: boolean;
600
+ openWorldHint: boolean;
601
+ };
602
+ inputSchema: {
603
+ type: "object";
604
+ required: string[];
605
+ properties: {
606
+ decision_id: {
607
+ type: string;
608
+ format: string;
609
+ description: string;
610
+ };
611
+ reason: {
612
+ type: string;
613
+ maxLength: number;
614
+ description: string;
615
+ };
616
+ title?: undefined;
617
+ options?: undefined;
618
+ method?: undefined;
619
+ deadline_hours?: undefined;
620
+ authority_mode?: undefined;
621
+ anonymous?: undefined;
622
+ idempotency_key?: undefined;
623
+ tags?: undefined;
624
+ source_agent?: undefined;
625
+ id?: undefined;
626
+ query?: undefined;
627
+ lifecycle_status?: undefined;
628
+ notification_status?: undefined;
629
+ limit?: undefined;
630
+ description?: undefined;
631
+ };
632
+ };
633
+ } | {
634
+ _meta?: undefined;
635
+ name: string;
636
+ description: string;
637
+ annotations: {
638
+ title: string;
639
+ readOnlyHint: boolean;
640
+ destructiveHint: boolean;
641
+ idempotentHint: boolean;
642
+ openWorldHint: boolean;
643
+ };
644
+ inputSchema: {
645
+ type: "object";
646
+ required: string[];
647
+ properties: {
648
+ decision_id: {
649
+ type: string;
650
+ format: string;
651
+ description: string;
652
+ };
653
+ reason: {
654
+ type: string;
655
+ maxLength: number;
656
+ description: string;
657
+ };
658
+ title?: undefined;
659
+ options?: undefined;
660
+ method?: undefined;
661
+ deadline_hours?: undefined;
662
+ authority_mode?: undefined;
663
+ anonymous?: undefined;
664
+ idempotency_key?: undefined;
665
+ tags?: undefined;
666
+ source_agent?: undefined;
667
+ id?: undefined;
668
+ query?: undefined;
669
+ lifecycle_status?: undefined;
670
+ notification_status?: undefined;
671
+ limit?: undefined;
672
+ description?: undefined;
673
+ };
674
+ };
675
+ } | {
676
+ _meta: Record<string, unknown>;
677
+ name: string;
678
+ description: string;
679
+ annotations: {
680
+ title: string;
681
+ readOnlyHint: boolean;
682
+ destructiveHint: boolean;
683
+ idempotentHint: boolean;
684
+ openWorldHint: boolean;
685
+ };
686
+ inputSchema: {
687
+ type: "object";
688
+ required: string[];
689
+ properties: {
690
+ decision_id: {
691
+ type: string;
692
+ format: string;
693
+ description: string;
694
+ };
695
+ title: {
696
+ type: string;
697
+ maxLength: number;
698
+ description: string;
699
+ };
700
+ description: {
701
+ type: string;
702
+ description: string;
703
+ };
704
+ options: {
705
+ type: string;
706
+ minItems: number;
707
+ maxItems: number;
708
+ items: {
709
+ type: string;
710
+ };
711
+ description: string;
712
+ };
713
+ method?: undefined;
714
+ deadline_hours?: undefined;
715
+ authority_mode?: undefined;
716
+ anonymous?: undefined;
717
+ idempotency_key?: undefined;
718
+ tags?: undefined;
719
+ source_agent?: undefined;
720
+ id?: undefined;
721
+ query?: undefined;
722
+ lifecycle_status?: undefined;
723
+ notification_status?: undefined;
724
+ limit?: undefined;
725
+ reason?: undefined;
726
+ };
727
+ };
728
+ } | {
729
+ _meta?: undefined;
730
+ name: string;
731
+ description: string;
732
+ annotations: {
733
+ title: string;
734
+ readOnlyHint: boolean;
735
+ destructiveHint: boolean;
736
+ idempotentHint: boolean;
737
+ openWorldHint: boolean;
738
+ };
739
+ inputSchema: {
740
+ type: "object";
741
+ required: string[];
742
+ properties: {
743
+ decision_id: {
744
+ type: string;
745
+ format: string;
746
+ description: string;
747
+ };
748
+ title: {
749
+ type: string;
750
+ maxLength: number;
751
+ description: string;
752
+ };
753
+ description: {
754
+ type: string;
755
+ description: string;
756
+ };
757
+ options: {
758
+ type: string;
759
+ minItems: number;
760
+ maxItems: number;
761
+ items: {
762
+ type: string;
763
+ };
764
+ description: string;
765
+ };
766
+ method?: undefined;
767
+ deadline_hours?: undefined;
768
+ authority_mode?: undefined;
769
+ anonymous?: undefined;
770
+ idempotency_key?: undefined;
771
+ tags?: undefined;
772
+ source_agent?: undefined;
773
+ id?: undefined;
774
+ query?: undefined;
775
+ lifecycle_status?: undefined;
776
+ notification_status?: undefined;
777
+ limit?: undefined;
778
+ reason?: undefined;
779
+ };
780
+ };
781
+ })[];