@wirecat/cli-core 0.457.0 → 0.458.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  import { type FailureContext } from "@wirecat/cli-base";
2
2
  import { type EventStore } from "../../meetings/index.js";
3
+ import type { EventResponse } from "../writer.js";
4
+ import { type CalendarWrites } from "../writes.js";
3
5
  /** Fields whose text whoever sent the invitation wrote: an agent reads them as data. */
4
6
  export declare const CALENDAR_UNTRUSTED_FIELDS: string[];
5
7
  export declare const calendarTools: ({
@@ -247,14 +249,761 @@ export declare const calendarTools: ({
247
249
  openWorldHint: boolean;
248
250
  };
249
251
  })[];
252
+ /**
253
+ * The calendar writes, offered only by a host that has a writer. Over MCP `ask` goes ahead (WC-MCP-7); `deny`,
254
+ * `readonly`, `events.notify` and the extra keys still refuse.
255
+ */
256
+ export declare const calendarWriteTools: ({
257
+ name: string;
258
+ description: string;
259
+ inputSchema: {
260
+ type: string;
261
+ properties: {
262
+ title: {
263
+ type: string;
264
+ minLength: number;
265
+ };
266
+ start_time: {
267
+ type: string;
268
+ minLength: number;
269
+ description: string;
270
+ };
271
+ end_time: {
272
+ type: string;
273
+ minLength: number;
274
+ description: string;
275
+ };
276
+ start_date: {
277
+ type: string;
278
+ minLength: number;
279
+ description: string;
280
+ };
281
+ end_date: {
282
+ type: string;
283
+ minLength: number;
284
+ description: string;
285
+ };
286
+ timezone: {
287
+ type: string;
288
+ minLength: number;
289
+ };
290
+ location: {
291
+ type: string;
292
+ description: string;
293
+ };
294
+ description: {
295
+ type: string;
296
+ description: string;
297
+ };
298
+ attendees: {
299
+ type: string;
300
+ items: {
301
+ type: string;
302
+ minLength: number;
303
+ };
304
+ description: string;
305
+ };
306
+ account_id: {
307
+ type: string;
308
+ minimum: number;
309
+ };
310
+ calendar: {
311
+ type: string;
312
+ minLength: number;
313
+ };
314
+ notify: {
315
+ type: string;
316
+ description: string;
317
+ };
318
+ id: {
319
+ type: string;
320
+ minLength: number;
321
+ description: string;
322
+ };
323
+ } | {
324
+ title: {
325
+ type: string;
326
+ minLength: number;
327
+ };
328
+ start_time: {
329
+ type: string;
330
+ minLength: number;
331
+ description: string;
332
+ };
333
+ end_time: {
334
+ type: string;
335
+ minLength: number;
336
+ description: string;
337
+ };
338
+ start_date: {
339
+ type: string;
340
+ minLength: number;
341
+ description: string;
342
+ };
343
+ end_date: {
344
+ type: string;
345
+ minLength: number;
346
+ description: string;
347
+ };
348
+ timezone: {
349
+ type: string;
350
+ minLength: number;
351
+ };
352
+ location: {
353
+ type: string;
354
+ description: string;
355
+ };
356
+ description: {
357
+ type: string;
358
+ description: string;
359
+ };
360
+ attendees: {
361
+ type: string;
362
+ items: {
363
+ type: string;
364
+ minLength: number;
365
+ };
366
+ description: string;
367
+ };
368
+ account_id: {
369
+ type: string;
370
+ minimum: number;
371
+ };
372
+ event: {
373
+ type: string;
374
+ minLength: number;
375
+ };
376
+ calendar: {
377
+ type: string;
378
+ minLength: number;
379
+ description: string;
380
+ };
381
+ series: {
382
+ type: string;
383
+ };
384
+ notify: {
385
+ type: string;
386
+ description: string;
387
+ };
388
+ } | {
389
+ account_id: {
390
+ type: string;
391
+ minimum: number;
392
+ };
393
+ event: {
394
+ type: string;
395
+ minLength: number;
396
+ };
397
+ calendar: {
398
+ type: string;
399
+ minLength: number;
400
+ description: string;
401
+ };
402
+ series: {
403
+ type: string;
404
+ };
405
+ notify: {
406
+ type: string;
407
+ description: string;
408
+ };
409
+ } | {
410
+ account_id: {
411
+ type: string;
412
+ minimum: number;
413
+ };
414
+ event: {
415
+ type: string;
416
+ minLength: number;
417
+ };
418
+ calendar: {
419
+ type: string;
420
+ minLength: number;
421
+ description: string;
422
+ };
423
+ response: {
424
+ type: string;
425
+ enum: readonly EventResponse[];
426
+ };
427
+ notify: {
428
+ type: string;
429
+ description: string;
430
+ };
431
+ };
432
+ required: string[];
433
+ additionalProperties: boolean;
434
+ };
435
+ annotations: {
436
+ readOnlyHint: boolean;
437
+ destructiveHint: boolean;
438
+ idempotentHint: boolean;
439
+ openWorldHint: boolean;
440
+ };
441
+ } | {
442
+ name: string;
443
+ description: string;
444
+ inputSchema: {
445
+ type: string;
446
+ properties: {
447
+ title: {
448
+ type: string;
449
+ minLength: number;
450
+ };
451
+ start_time: {
452
+ type: string;
453
+ minLength: number;
454
+ description: string;
455
+ };
456
+ end_time: {
457
+ type: string;
458
+ minLength: number;
459
+ description: string;
460
+ };
461
+ start_date: {
462
+ type: string;
463
+ minLength: number;
464
+ description: string;
465
+ };
466
+ end_date: {
467
+ type: string;
468
+ minLength: number;
469
+ description: string;
470
+ };
471
+ timezone: {
472
+ type: string;
473
+ minLength: number;
474
+ };
475
+ location: {
476
+ type: string;
477
+ description: string;
478
+ };
479
+ description: {
480
+ type: string;
481
+ description: string;
482
+ };
483
+ attendees: {
484
+ type: string;
485
+ items: {
486
+ type: string;
487
+ minLength: number;
488
+ };
489
+ description: string;
490
+ };
491
+ account_id: {
492
+ type: string;
493
+ minimum: number;
494
+ };
495
+ calendar: {
496
+ type: string;
497
+ minLength: number;
498
+ };
499
+ notify: {
500
+ type: string;
501
+ description: string;
502
+ };
503
+ id: {
504
+ type: string;
505
+ minLength: number;
506
+ description: string;
507
+ };
508
+ } | {
509
+ title: {
510
+ type: string;
511
+ minLength: number;
512
+ };
513
+ start_time: {
514
+ type: string;
515
+ minLength: number;
516
+ description: string;
517
+ };
518
+ end_time: {
519
+ type: string;
520
+ minLength: number;
521
+ description: string;
522
+ };
523
+ start_date: {
524
+ type: string;
525
+ minLength: number;
526
+ description: string;
527
+ };
528
+ end_date: {
529
+ type: string;
530
+ minLength: number;
531
+ description: string;
532
+ };
533
+ timezone: {
534
+ type: string;
535
+ minLength: number;
536
+ };
537
+ location: {
538
+ type: string;
539
+ description: string;
540
+ };
541
+ description: {
542
+ type: string;
543
+ description: string;
544
+ };
545
+ attendees: {
546
+ type: string;
547
+ items: {
548
+ type: string;
549
+ minLength: number;
550
+ };
551
+ description: string;
552
+ };
553
+ account_id: {
554
+ type: string;
555
+ minimum: number;
556
+ };
557
+ event: {
558
+ type: string;
559
+ minLength: number;
560
+ };
561
+ calendar: {
562
+ type: string;
563
+ minLength: number;
564
+ description: string;
565
+ };
566
+ series: {
567
+ type: string;
568
+ };
569
+ notify: {
570
+ type: string;
571
+ description: string;
572
+ };
573
+ } | {
574
+ account_id: {
575
+ type: string;
576
+ minimum: number;
577
+ };
578
+ event: {
579
+ type: string;
580
+ minLength: number;
581
+ };
582
+ calendar: {
583
+ type: string;
584
+ minLength: number;
585
+ description: string;
586
+ };
587
+ series: {
588
+ type: string;
589
+ };
590
+ notify: {
591
+ type: string;
592
+ description: string;
593
+ };
594
+ } | {
595
+ account_id: {
596
+ type: string;
597
+ minimum: number;
598
+ };
599
+ event: {
600
+ type: string;
601
+ minLength: number;
602
+ };
603
+ calendar: {
604
+ type: string;
605
+ minLength: number;
606
+ description: string;
607
+ };
608
+ response: {
609
+ type: string;
610
+ enum: readonly EventResponse[];
611
+ };
612
+ notify: {
613
+ type: string;
614
+ description: string;
615
+ };
616
+ };
617
+ required: string[];
618
+ additionalProperties: boolean;
619
+ };
620
+ annotations: {
621
+ readOnlyHint: boolean;
622
+ destructiveHint: boolean;
623
+ idempotentHint: boolean;
624
+ openWorldHint: boolean;
625
+ };
626
+ } | {
627
+ name: string;
628
+ description: string;
629
+ inputSchema: {
630
+ type: string;
631
+ properties: {
632
+ title: {
633
+ type: string;
634
+ minLength: number;
635
+ };
636
+ start_time: {
637
+ type: string;
638
+ minLength: number;
639
+ description: string;
640
+ };
641
+ end_time: {
642
+ type: string;
643
+ minLength: number;
644
+ description: string;
645
+ };
646
+ start_date: {
647
+ type: string;
648
+ minLength: number;
649
+ description: string;
650
+ };
651
+ end_date: {
652
+ type: string;
653
+ minLength: number;
654
+ description: string;
655
+ };
656
+ timezone: {
657
+ type: string;
658
+ minLength: number;
659
+ };
660
+ location: {
661
+ type: string;
662
+ description: string;
663
+ };
664
+ description: {
665
+ type: string;
666
+ description: string;
667
+ };
668
+ attendees: {
669
+ type: string;
670
+ items: {
671
+ type: string;
672
+ minLength: number;
673
+ };
674
+ description: string;
675
+ };
676
+ account_id: {
677
+ type: string;
678
+ minimum: number;
679
+ };
680
+ calendar: {
681
+ type: string;
682
+ minLength: number;
683
+ };
684
+ notify: {
685
+ type: string;
686
+ description: string;
687
+ };
688
+ id: {
689
+ type: string;
690
+ minLength: number;
691
+ description: string;
692
+ };
693
+ } | {
694
+ title: {
695
+ type: string;
696
+ minLength: number;
697
+ };
698
+ start_time: {
699
+ type: string;
700
+ minLength: number;
701
+ description: string;
702
+ };
703
+ end_time: {
704
+ type: string;
705
+ minLength: number;
706
+ description: string;
707
+ };
708
+ start_date: {
709
+ type: string;
710
+ minLength: number;
711
+ description: string;
712
+ };
713
+ end_date: {
714
+ type: string;
715
+ minLength: number;
716
+ description: string;
717
+ };
718
+ timezone: {
719
+ type: string;
720
+ minLength: number;
721
+ };
722
+ location: {
723
+ type: string;
724
+ description: string;
725
+ };
726
+ description: {
727
+ type: string;
728
+ description: string;
729
+ };
730
+ attendees: {
731
+ type: string;
732
+ items: {
733
+ type: string;
734
+ minLength: number;
735
+ };
736
+ description: string;
737
+ };
738
+ account_id: {
739
+ type: string;
740
+ minimum: number;
741
+ };
742
+ event: {
743
+ type: string;
744
+ minLength: number;
745
+ };
746
+ calendar: {
747
+ type: string;
748
+ minLength: number;
749
+ description: string;
750
+ };
751
+ series: {
752
+ type: string;
753
+ };
754
+ notify: {
755
+ type: string;
756
+ description: string;
757
+ };
758
+ } | {
759
+ account_id: {
760
+ type: string;
761
+ minimum: number;
762
+ };
763
+ event: {
764
+ type: string;
765
+ minLength: number;
766
+ };
767
+ calendar: {
768
+ type: string;
769
+ minLength: number;
770
+ description: string;
771
+ };
772
+ series: {
773
+ type: string;
774
+ };
775
+ notify: {
776
+ type: string;
777
+ description: string;
778
+ };
779
+ } | {
780
+ account_id: {
781
+ type: string;
782
+ minimum: number;
783
+ };
784
+ event: {
785
+ type: string;
786
+ minLength: number;
787
+ };
788
+ calendar: {
789
+ type: string;
790
+ minLength: number;
791
+ description: string;
792
+ };
793
+ response: {
794
+ type: string;
795
+ enum: readonly EventResponse[];
796
+ };
797
+ notify: {
798
+ type: string;
799
+ description: string;
800
+ };
801
+ };
802
+ required: string[];
803
+ additionalProperties: boolean;
804
+ };
805
+ annotations: {
806
+ readOnlyHint: boolean;
807
+ destructiveHint: boolean;
808
+ idempotentHint: boolean;
809
+ openWorldHint: boolean;
810
+ };
811
+ } | {
812
+ name: string;
813
+ description: string;
814
+ inputSchema: {
815
+ type: string;
816
+ properties: {
817
+ title: {
818
+ type: string;
819
+ minLength: number;
820
+ };
821
+ start_time: {
822
+ type: string;
823
+ minLength: number;
824
+ description: string;
825
+ };
826
+ end_time: {
827
+ type: string;
828
+ minLength: number;
829
+ description: string;
830
+ };
831
+ start_date: {
832
+ type: string;
833
+ minLength: number;
834
+ description: string;
835
+ };
836
+ end_date: {
837
+ type: string;
838
+ minLength: number;
839
+ description: string;
840
+ };
841
+ timezone: {
842
+ type: string;
843
+ minLength: number;
844
+ };
845
+ location: {
846
+ type: string;
847
+ description: string;
848
+ };
849
+ description: {
850
+ type: string;
851
+ description: string;
852
+ };
853
+ attendees: {
854
+ type: string;
855
+ items: {
856
+ type: string;
857
+ minLength: number;
858
+ };
859
+ description: string;
860
+ };
861
+ account_id: {
862
+ type: string;
863
+ minimum: number;
864
+ };
865
+ calendar: {
866
+ type: string;
867
+ minLength: number;
868
+ };
869
+ notify: {
870
+ type: string;
871
+ description: string;
872
+ };
873
+ id: {
874
+ type: string;
875
+ minLength: number;
876
+ description: string;
877
+ };
878
+ } | {
879
+ title: {
880
+ type: string;
881
+ minLength: number;
882
+ };
883
+ start_time: {
884
+ type: string;
885
+ minLength: number;
886
+ description: string;
887
+ };
888
+ end_time: {
889
+ type: string;
890
+ minLength: number;
891
+ description: string;
892
+ };
893
+ start_date: {
894
+ type: string;
895
+ minLength: number;
896
+ description: string;
897
+ };
898
+ end_date: {
899
+ type: string;
900
+ minLength: number;
901
+ description: string;
902
+ };
903
+ timezone: {
904
+ type: string;
905
+ minLength: number;
906
+ };
907
+ location: {
908
+ type: string;
909
+ description: string;
910
+ };
911
+ description: {
912
+ type: string;
913
+ description: string;
914
+ };
915
+ attendees: {
916
+ type: string;
917
+ items: {
918
+ type: string;
919
+ minLength: number;
920
+ };
921
+ description: string;
922
+ };
923
+ account_id: {
924
+ type: string;
925
+ minimum: number;
926
+ };
927
+ event: {
928
+ type: string;
929
+ minLength: number;
930
+ };
931
+ calendar: {
932
+ type: string;
933
+ minLength: number;
934
+ description: string;
935
+ };
936
+ series: {
937
+ type: string;
938
+ };
939
+ notify: {
940
+ type: string;
941
+ description: string;
942
+ };
943
+ } | {
944
+ account_id: {
945
+ type: string;
946
+ minimum: number;
947
+ };
948
+ event: {
949
+ type: string;
950
+ minLength: number;
951
+ };
952
+ calendar: {
953
+ type: string;
954
+ minLength: number;
955
+ description: string;
956
+ };
957
+ series: {
958
+ type: string;
959
+ };
960
+ notify: {
961
+ type: string;
962
+ description: string;
963
+ };
964
+ } | {
965
+ account_id: {
966
+ type: string;
967
+ minimum: number;
968
+ };
969
+ event: {
970
+ type: string;
971
+ minLength: number;
972
+ };
973
+ calendar: {
974
+ type: string;
975
+ minLength: number;
976
+ description: string;
977
+ };
978
+ response: {
979
+ type: string;
980
+ enum: readonly EventResponse[];
981
+ };
982
+ notify: {
983
+ type: string;
984
+ description: string;
985
+ };
986
+ };
987
+ required: string[];
988
+ additionalProperties: boolean;
989
+ };
990
+ annotations: {
991
+ readOnlyHint: boolean;
992
+ destructiveHint: boolean;
993
+ idempotentHint: boolean;
994
+ openWorldHint: boolean;
995
+ };
996
+ })[];
250
997
  /**
251
998
  * Runs one calendar tool over the accounts the host serves. Without `account_id` a tool reads every one of them and
252
999
  * names them in `accounts`; with one it must be among them.
253
1000
  */
254
- export declare const callCalendarTool: (store: EventStore, name: string, input: unknown, { accountIds, failure, now, }: {
1001
+ export declare const callCalendarTool: (store: EventStore, name: string, input: unknown, { accountIds, failure, now, writes, }: {
255
1002
  accountIds: readonly number[];
256
1003
  failure?: FailureContext;
257
1004
  now?: number;
1005
+ /** Each account's writer and profile; without it the write tools refuse. */
1006
+ writes?: (accountId: number) => CalendarWrites | undefined;
258
1007
  }) => Promise<{
259
1008
  content: {
260
1009
  type: "text";