@topolo/mcp 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -61,6 +61,7 @@ var TopoloHttpError = class extends TopoloSdkError {
61
61
  var SERVICES = {
62
62
  agent: "https://agent-api.topolo.app",
63
63
  auth: "https://auth.topolo.app",
64
+ backup: "https://backup.topolo.app",
64
65
  books: "https://books.topolo.app",
65
66
  bugfix: "https://bugfix.topolo.app",
66
67
  bytes: "https://bytes-api.topolo.app",
@@ -71,7 +72,6 @@ var SERVICES = {
71
72
  compose: "https://compose.topolo.app",
72
73
  consent: "https://consent.topolo.app",
73
74
  crm: "https://crm-api.topolo.app",
74
- customer_success: "https://success.topolo.app",
75
75
  developers: "https://developers.topolo.app",
76
76
  director: "https://director.topolo.app",
77
77
  feed: "https://feed-api.topolo.app",
@@ -85,9 +85,10 @@ var SERVICES = {
85
85
  localize: "https://localize.topolo.app",
86
86
  mail: "https://mail.topolo.app",
87
87
  mdm: "https://mdm-api.topolo.app",
88
- messaging: "https://messages.topolo.app",
88
+ messages: "https://messages.topolo.app",
89
89
  nexus: "https://nexus-api.topolo.app",
90
90
  notify: "https://notify.topolo.app",
91
+ observability_watch: "https://observability-watch.topolo.app",
91
92
  one: "https://one.topolo.app",
92
93
  p2p: "https://p2p.topolo.app",
93
94
  pay: "https://pay.topolo.app",
@@ -101,6 +102,7 @@ var SERVICES = {
101
102
  socialize: "https://socialize-api.topolo.app",
102
103
  spaces: "https://spaces.topolo.app",
103
104
  status: "https://status.topolo.app",
105
+ success: "https://success.topolo.app",
104
106
  support: "https://support.topolo.app",
105
107
  survey: "https://survey.topolo.app",
106
108
  voice: "https://voice.topolo.app",
@@ -117,13 +119,21 @@ var APPLICATIONS = {
117
119
  "deployTargets": [
118
120
  {
119
121
  "name": "topolo-admin",
120
- "kind": "pages",
121
- "apiUrl": null,
122
+ "kind": "worker",
123
+ "apiUrl": "https://admin.topolo.app",
122
124
  "domains": [
123
125
  "admin.topolo.app"
124
126
  ],
125
127
  "routes": [],
126
128
  "serviceId": null
129
+ },
130
+ {
131
+ "name": "topolo-admin-api",
132
+ "kind": "worker",
133
+ "apiUrl": null,
134
+ "domains": [],
135
+ "routes": [],
136
+ "serviceId": null
127
137
  }
128
138
  ]
129
139
  },
@@ -140,7 +150,7 @@ var APPLICATIONS = {
140
150
  {
141
151
  "name": "topolo-agent",
142
152
  "kind": "worker",
143
- "apiUrl": null,
153
+ "apiUrl": "https://agent.topolo.app",
144
154
  "domains": [
145
155
  "agent.topolo.app"
146
156
  ],
@@ -148,7 +158,7 @@ var APPLICATIONS = {
148
158
  "serviceId": null
149
159
  },
150
160
  {
151
- "name": "topolo-agent-worker",
161
+ "name": "topolo-agent-api",
152
162
  "kind": "worker",
153
163
  "apiUrl": "https://agent-api.topolo.app",
154
164
  "domains": [
@@ -188,16 +198,20 @@ var APPLICATIONS = {
188
198
  "appDir": "TopoloBackup",
189
199
  "name": "topolo-backup",
190
200
  "packageName": "topolo-backup",
191
- "productionUrl": null,
192
- "services": [],
201
+ "productionUrl": "https://backup.topolo.app",
202
+ "services": [
203
+ "backup"
204
+ ],
193
205
  "deployTargets": [
194
206
  {
195
207
  "name": "topolo-backup",
196
208
  "kind": "worker",
197
- "apiUrl": null,
198
- "domains": [],
209
+ "apiUrl": "https://backup.topolo.app",
210
+ "domains": [
211
+ "backup.topolo.app"
212
+ ],
199
213
  "routes": [],
200
- "serviceId": null
214
+ "serviceId": "backup"
201
215
  }
202
216
  ]
203
217
  },
@@ -218,10 +232,16 @@ var APPLICATIONS = {
218
232
  "domains": [
219
233
  "books.topolo.app"
220
234
  ],
221
- "routes": [
222
- "books.topolo.app"
223
- ],
235
+ "routes": [],
224
236
  "serviceId": "books"
237
+ },
238
+ {
239
+ "name": "topolo-books-api",
240
+ "kind": "worker",
241
+ "apiUrl": null,
242
+ "domains": [],
243
+ "routes": [],
244
+ "serviceId": null
225
245
  }
226
246
  ]
227
247
  },
@@ -242,9 +262,7 @@ var APPLICATIONS = {
242
262
  "domains": [
243
263
  "bugfix.topolo.app"
244
264
  ],
245
- "routes": [
246
- "bugfix.topolo.app"
247
- ],
265
+ "routes": [],
248
266
  "serviceId": "bugfix"
249
267
  }
250
268
  ]
@@ -261,8 +279,8 @@ var APPLICATIONS = {
261
279
  "deployTargets": [
262
280
  {
263
281
  "name": "topolo-bytes",
264
- "kind": "pages",
265
- "apiUrl": null,
282
+ "kind": "worker",
283
+ "apiUrl": "https://bytes.topolo.app",
266
284
  "domains": [
267
285
  "bytes.topolo.app"
268
286
  ],
@@ -298,10 +316,16 @@ var APPLICATIONS = {
298
316
  "domains": [
299
317
  "calendar.topolo.app"
300
318
  ],
301
- "routes": [
302
- "calendar.topolo.app"
303
- ],
319
+ "routes": [],
304
320
  "serviceId": "calendar"
321
+ },
322
+ {
323
+ "name": "topolo-calendar-api",
324
+ "kind": "worker",
325
+ "apiUrl": null,
326
+ "domains": [],
327
+ "routes": [],
328
+ "serviceId": null
305
329
  }
306
330
  ]
307
331
  },
@@ -344,22 +368,19 @@ var APPLICATIONS = {
344
368
  "domains": [
345
369
  "chat.topolo.app"
346
370
  ],
347
- "routes": [
348
- "chat.topolo.app"
349
- ],
371
+ "routes": [],
350
372
  "serviceId": "chat"
373
+ },
374
+ {
375
+ "name": "topolo-chat-api",
376
+ "kind": "worker",
377
+ "apiUrl": null,
378
+ "domains": [],
379
+ "routes": [],
380
+ "serviceId": null
351
381
  }
352
382
  ]
353
383
  },
354
- "cloudcontrol": {
355
- "id": "cloudcontrol",
356
- "appDir": "TopoloCloudControl",
357
- "name": "cloudcontrol",
358
- "packageName": "topolo-cloudcontrol",
359
- "productionUrl": null,
360
- "services": [],
361
- "deployTargets": []
362
- },
363
384
  "commerce": {
364
385
  "id": "commerce",
365
386
  "appDir": "TopoloCommerce",
@@ -382,8 +403,8 @@ var APPLICATIONS = {
382
403
  },
383
404
  {
384
405
  "name": "topolo-commerce-guest-web",
385
- "kind": "pages",
386
- "apiUrl": null,
406
+ "kind": "worker",
407
+ "apiUrl": "https://guest.topolo.app",
387
408
  "domains": [
388
409
  "guest.topolo.app"
389
410
  ],
@@ -392,8 +413,8 @@ var APPLICATIONS = {
392
413
  },
393
414
  {
394
415
  "name": "topolo-commerce-ops-web",
395
- "kind": "pages",
396
- "apiUrl": null,
416
+ "kind": "worker",
417
+ "apiUrl": "https://commerce.topolo.app",
397
418
  "domains": [
398
419
  "commerce.topolo.app"
399
420
  ],
@@ -402,8 +423,8 @@ var APPLICATIONS = {
402
423
  },
403
424
  {
404
425
  "name": "topolo-commerce-station-web",
405
- "kind": "pages",
406
- "apiUrl": null,
426
+ "kind": "worker",
427
+ "apiUrl": "https://station-commerce.topolo.app",
407
428
  "domains": [
408
429
  "station-commerce.topolo.app"
409
430
  ],
@@ -429,10 +450,16 @@ var APPLICATIONS = {
429
450
  "domains": [
430
451
  "compose.topolo.app"
431
452
  ],
432
- "routes": [
433
- "compose.topolo.app"
434
- ],
453
+ "routes": [],
435
454
  "serviceId": "compose"
455
+ },
456
+ {
457
+ "name": "topolo-compose-api",
458
+ "kind": "worker",
459
+ "apiUrl": null,
460
+ "domains": [],
461
+ "routes": [],
462
+ "serviceId": null
436
463
  }
437
464
  ]
438
465
  },
@@ -453,10 +480,16 @@ var APPLICATIONS = {
453
480
  "domains": [
454
481
  "consent.topolo.app"
455
482
  ],
456
- "routes": [
457
- "consent.topolo.app"
458
- ],
483
+ "routes": [],
459
484
  "serviceId": "consent"
485
+ },
486
+ {
487
+ "name": "topolo-consent-api",
488
+ "kind": "worker",
489
+ "apiUrl": null,
490
+ "domains": [],
491
+ "routes": [],
492
+ "serviceId": null
460
493
  }
461
494
  ]
462
495
  },
@@ -483,7 +516,7 @@ var APPLICATIONS = {
483
516
  {
484
517
  "name": "topolo-crm-app",
485
518
  "kind": "worker",
486
- "apiUrl": null,
519
+ "apiUrl": "https://crm.topolo.app",
487
520
  "domains": [
488
521
  "crm.topolo.app"
489
522
  ],
@@ -492,30 +525,6 @@ var APPLICATIONS = {
492
525
  }
493
526
  ]
494
527
  },
495
- "customer_success": {
496
- "id": "customer_success",
497
- "appDir": "TopoloSuccess",
498
- "name": "topolo-success",
499
- "packageName": "topolo-success",
500
- "productionUrl": "https://success.topolo.app",
501
- "services": [
502
- "customer_success"
503
- ],
504
- "deployTargets": [
505
- {
506
- "name": "topolo-success",
507
- "kind": "worker",
508
- "apiUrl": "https://success.topolo.app",
509
- "domains": [
510
- "success.topolo.app"
511
- ],
512
- "routes": [
513
- "success.topolo.app"
514
- ],
515
- "serviceId": "customer_success"
516
- }
517
- ]
518
- },
519
528
  "developers": {
520
529
  "id": "developers",
521
530
  "appDir": "TopoloDevelopers",
@@ -543,6 +552,14 @@ var APPLICATIONS = {
543
552
  ],
544
553
  "routes": [],
545
554
  "serviceId": "developers"
555
+ },
556
+ {
557
+ "name": "topolo-developers-api",
558
+ "kind": "worker",
559
+ "apiUrl": null,
560
+ "domains": [],
561
+ "routes": [],
562
+ "serviceId": null
546
563
  }
547
564
  ]
548
565
  },
@@ -563,10 +580,16 @@ var APPLICATIONS = {
563
580
  "domains": [
564
581
  "director.topolo.app"
565
582
  ],
566
- "routes": [
567
- "director.topolo.app"
568
- ],
583
+ "routes": [],
569
584
  "serviceId": "director"
585
+ },
586
+ {
587
+ "name": "topolo-director-api",
588
+ "kind": "worker",
589
+ "apiUrl": null,
590
+ "domains": [],
591
+ "routes": [],
592
+ "serviceId": null
570
593
  }
571
594
  ]
572
595
  },
@@ -580,13 +603,21 @@ var APPLICATIONS = {
580
603
  "deployTargets": [
581
604
  {
582
605
  "name": "topolo-docs",
583
- "kind": "pages",
584
- "apiUrl": null,
606
+ "kind": "worker",
607
+ "apiUrl": "https://docs.topolo.app",
585
608
  "domains": [
586
609
  "docs.topolo.app"
587
610
  ],
588
611
  "routes": [],
589
612
  "serviceId": null
613
+ },
614
+ {
615
+ "name": "topolo-docs-api",
616
+ "kind": "worker",
617
+ "apiUrl": null,
618
+ "domains": [],
619
+ "routes": [],
620
+ "serviceId": null
590
621
  }
591
622
  ]
592
623
  },
@@ -595,7 +626,7 @@ var APPLICATIONS = {
595
626
  "appDir": "TopoloFeed",
596
627
  "name": "TopoloFeed",
597
628
  "packageName": "topolo-feed",
598
- "productionUrl": "https://feed-api.topolo.app",
629
+ "productionUrl": "https://feed.topolo.app",
599
630
  "services": [
600
631
  "feed"
601
632
  ],
@@ -607,9 +638,7 @@ var APPLICATIONS = {
607
638
  "domains": [
608
639
  "feed-analytics-api.topolo.app"
609
640
  ],
610
- "routes": [
611
- "feed-analytics-api.topolo.app"
612
- ],
641
+ "routes": [],
613
642
  "serviceId": null
614
643
  },
615
644
  {
@@ -619,10 +648,18 @@ var APPLICATIONS = {
619
648
  "domains": [
620
649
  "feed-api.topolo.app"
621
650
  ],
622
- "routes": [
623
- "feed-api.topolo.app"
624
- ],
651
+ "routes": [],
625
652
  "serviceId": "feed"
653
+ },
654
+ {
655
+ "name": "topolo-feed-web",
656
+ "kind": "worker",
657
+ "apiUrl": "https://feed.topolo.app",
658
+ "domains": [
659
+ "feed.topolo.app"
660
+ ],
661
+ "routes": [],
662
+ "serviceId": null
626
663
  }
627
664
  ]
628
665
  },
@@ -643,17 +680,23 @@ var APPLICATIONS = {
643
680
  "domains": [
644
681
  "flow.topolo.app"
645
682
  ],
646
- "routes": [
647
- "flow.topolo.app"
648
- ],
683
+ "routes": [],
649
684
  "serviceId": "flow"
685
+ },
686
+ {
687
+ "name": "topolo-flow-api",
688
+ "kind": "worker",
689
+ "apiUrl": null,
690
+ "domains": [],
691
+ "routes": [],
692
+ "serviceId": null
650
693
  }
651
694
  ]
652
695
  },
653
696
  "forecast": {
654
697
  "id": "forecast",
655
698
  "appDir": "TopoloForecast",
656
- "name": "forecast-cloud",
699
+ "name": "topolo-forecast",
657
700
  "packageName": "topolo-forecast",
658
701
  "productionUrl": "https://forecast.topolo.app",
659
702
  "services": [
@@ -663,7 +706,7 @@ var APPLICATIONS = {
663
706
  {
664
707
  "name": "topolo-forecast",
665
708
  "kind": "worker",
666
- "apiUrl": null,
709
+ "apiUrl": "https://forecast.topolo.app",
667
710
  "domains": [
668
711
  "forecast.topolo.app"
669
712
  ],
@@ -699,10 +742,16 @@ var APPLICATIONS = {
699
742
  "domains": [
700
743
  "forms.topolo.app"
701
744
  ],
702
- "routes": [
703
- "forms.topolo.app"
704
- ],
745
+ "routes": [],
705
746
  "serviceId": "forms"
747
+ },
748
+ {
749
+ "name": "topolo-forms-api",
750
+ "kind": "worker",
751
+ "apiUrl": null,
752
+ "domains": [],
753
+ "routes": [],
754
+ "serviceId": null
706
755
  }
707
756
  ]
708
757
  },
@@ -723,10 +772,16 @@ var APPLICATIONS = {
723
772
  "domains": [
724
773
  "home.topolo.app"
725
774
  ],
726
- "routes": [
727
- "home.topolo.app"
728
- ],
775
+ "routes": [],
729
776
  "serviceId": "home"
777
+ },
778
+ {
779
+ "name": "topolo-home-api",
780
+ "kind": "worker",
781
+ "apiUrl": null,
782
+ "domains": [],
783
+ "routes": [],
784
+ "serviceId": null
730
785
  }
731
786
  ]
732
787
  },
@@ -747,10 +802,16 @@ var APPLICATIONS = {
747
802
  "domains": [
748
803
  "insights.topolo.app"
749
804
  ],
750
- "routes": [
751
- "insights.topolo.app"
752
- ],
805
+ "routes": [],
753
806
  "serviceId": "insights"
807
+ },
808
+ {
809
+ "name": "topolo-insights-api",
810
+ "kind": "worker",
811
+ "apiUrl": null,
812
+ "domains": [],
813
+ "routes": [],
814
+ "serviceId": null
754
815
  }
755
816
  ]
756
817
  },
@@ -771,10 +832,16 @@ var APPLICATIONS = {
771
832
  "domains": [
772
833
  "inventory.topolo.app"
773
834
  ],
774
- "routes": [
775
- "inventory.topolo.app"
776
- ],
835
+ "routes": [],
777
836
  "serviceId": "inventory"
837
+ },
838
+ {
839
+ "name": "topolo-inventory-api",
840
+ "kind": "worker",
841
+ "apiUrl": null,
842
+ "domains": [],
843
+ "routes": [],
844
+ "serviceId": null
778
845
  }
779
846
  ]
780
847
  },
@@ -791,7 +858,7 @@ var APPLICATIONS = {
791
858
  {
792
859
  "name": "topolo-learn",
793
860
  "kind": "worker",
794
- "apiUrl": null,
861
+ "apiUrl": "https://learn.topolo.app",
795
862
  "domains": [
796
863
  "learn.topolo.app"
797
864
  ],
@@ -851,10 +918,16 @@ var APPLICATIONS = {
851
918
  "domains": [
852
919
  "mail.topolo.app"
853
920
  ],
854
- "routes": [
855
- "mail.topolo.app"
856
- ],
921
+ "routes": [],
857
922
  "serviceId": "mail"
923
+ },
924
+ {
925
+ "name": "topolo-mail-api",
926
+ "kind": "worker",
927
+ "apiUrl": null,
928
+ "domains": [],
929
+ "routes": [],
930
+ "serviceId": null
858
931
  }
859
932
  ]
860
933
  },
@@ -875,47 +948,51 @@ var APPLICATIONS = {
875
948
  "domains": [
876
949
  "mdm-api.topolo.app"
877
950
  ],
878
- "routes": [
879
- "mdm-api.topolo.app"
880
- ],
951
+ "routes": [],
881
952
  "serviceId": "mdm"
882
953
  },
883
954
  {
884
955
  "name": "topolo-mdm-console",
885
956
  "kind": "worker",
886
- "apiUrl": null,
957
+ "apiUrl": "https://mdm.topolo.app",
887
958
  "domains": [
888
959
  "mdm.topolo.app"
889
960
  ],
890
- "routes": [
891
- "mdm.topolo.app"
892
- ],
961
+ "routes": [],
893
962
  "serviceId": null
894
963
  }
895
964
  ]
896
965
  },
897
- "messaging": {
898
- "id": "messaging",
899
- "appDir": "TopoloMessaging",
900
- "name": "topolo-messaging",
901
- "packageName": "topolo-messaging",
966
+ "messages": {
967
+ "id": "messages",
968
+ "appDir": "TopoloMessages",
969
+ "name": "topolo-messages",
970
+ "packageName": "topolo-messages",
902
971
  "productionUrl": "https://messages.topolo.app",
903
972
  "services": [
904
- "messaging"
973
+ "messages"
905
974
  ],
906
975
  "deployTargets": [
907
976
  {
908
- "name": "topolo-messaging",
977
+ "name": "topolo-messages",
909
978
  "kind": "worker",
910
979
  "apiUrl": "https://messages.topolo.app",
911
980
  "domains": [
912
981
  "messages.topolo.app"
913
982
  ],
914
983
  "routes": [],
915
- "serviceId": "messaging"
984
+ "serviceId": "messages"
916
985
  },
917
986
  {
918
- "name": "topolo-messaging-dispatch",
987
+ "name": "topolo-messages-api",
988
+ "kind": "worker",
989
+ "apiUrl": null,
990
+ "domains": [],
991
+ "routes": [],
992
+ "serviceId": null
993
+ },
994
+ {
995
+ "name": "topolo-messages-dispatch",
919
996
  "kind": "worker",
920
997
  "apiUrl": null,
921
998
  "domains": [],
@@ -985,9 +1062,22 @@ var APPLICATIONS = {
985
1062
  "appDir": "TopoloObservabilityWatch",
986
1063
  "name": "topolo-observability-watch",
987
1064
  "packageName": "topolo-observability-watch",
988
- "productionUrl": null,
989
- "services": [],
990
- "deployTargets": []
1065
+ "productionUrl": "https://observability-watch.topolo.app",
1066
+ "services": [
1067
+ "observability_watch"
1068
+ ],
1069
+ "deployTargets": [
1070
+ {
1071
+ "name": "topolo-observability-watch",
1072
+ "kind": "worker",
1073
+ "apiUrl": "https://observability-watch.topolo.app",
1074
+ "domains": [
1075
+ "observability-watch.topolo.app"
1076
+ ],
1077
+ "routes": [],
1078
+ "serviceId": "observability_watch"
1079
+ }
1080
+ ]
991
1081
  },
992
1082
  "one": {
993
1083
  "id": "one",
@@ -1001,40 +1091,37 @@ var APPLICATIONS = {
1001
1091
  "deployTargets": [
1002
1092
  {
1003
1093
  "name": "topolo-one",
1004
- "kind": "pages",
1005
- "apiUrl": null,
1006
- "domains": [
1007
- "one.topolo.app"
1008
- ],
1009
- "routes": [],
1010
- "serviceId": null
1011
- },
1012
- {
1013
- "name": "topolo-one-website",
1014
1094
  "kind": "worker",
1015
1095
  "apiUrl": null,
1016
- "domains": [
1017
- "topolo.io",
1018
- "www.topolo.io"
1019
- ],
1096
+ "domains": [],
1020
1097
  "routes": [],
1021
1098
  "serviceId": null
1022
1099
  },
1023
1100
  {
1024
- "name": "topolo-one-worker",
1101
+ "name": "topolo-one-api",
1025
1102
  "kind": "worker",
1026
1103
  "apiUrl": "https://one.topolo.app",
1027
1104
  "domains": [
1028
- "one.topolo.app",
1029
- "topolo.app",
1030
- "www.topolo.app"
1105
+ "one.topolo.app"
1031
1106
  ],
1032
1107
  "routes": [
1033
1108
  "one.topolo.app/*",
1034
- "topolo.app",
1035
1109
  "www.topolo.app/*"
1036
1110
  ],
1037
1111
  "serviceId": "one"
1112
+ },
1113
+ {
1114
+ "name": "topolo-one-website",
1115
+ "kind": "worker",
1116
+ "apiUrl": "https://topolo.io",
1117
+ "domains": [
1118
+ "topolo.io"
1119
+ ],
1120
+ "routes": [
1121
+ "topolo.io",
1122
+ "www.topolo.io"
1123
+ ],
1124
+ "serviceId": null
1038
1125
  }
1039
1126
  ]
1040
1127
  },
@@ -1055,10 +1142,16 @@ var APPLICATIONS = {
1055
1142
  "domains": [
1056
1143
  "p2p.topolo.app"
1057
1144
  ],
1058
- "routes": [
1059
- "p2p.topolo.app"
1060
- ],
1145
+ "routes": [],
1061
1146
  "serviceId": "p2p"
1147
+ },
1148
+ {
1149
+ "name": "topolo-p2p-api",
1150
+ "kind": "worker",
1151
+ "apiUrl": null,
1152
+ "domains": [],
1153
+ "routes": [],
1154
+ "serviceId": null
1062
1155
  }
1063
1156
  ]
1064
1157
  },
@@ -1081,6 +1174,14 @@ var APPLICATIONS = {
1081
1174
  ],
1082
1175
  "routes": [],
1083
1176
  "serviceId": "pay"
1177
+ },
1178
+ {
1179
+ "name": "topolo-pay-api",
1180
+ "kind": "worker",
1181
+ "apiUrl": null,
1182
+ "domains": [],
1183
+ "routes": [],
1184
+ "serviceId": null
1084
1185
  }
1085
1186
  ]
1086
1187
  },
@@ -1101,10 +1202,16 @@ var APPLICATIONS = {
1101
1202
  "domains": [
1102
1203
  "people.topolo.app"
1103
1204
  ],
1104
- "routes": [
1105
- "people.topolo.app"
1106
- ],
1205
+ "routes": [],
1107
1206
  "serviceId": "people"
1207
+ },
1208
+ {
1209
+ "name": "topolo-people-api",
1210
+ "kind": "worker",
1211
+ "apiUrl": null,
1212
+ "domains": [],
1213
+ "routes": [],
1214
+ "serviceId": null
1108
1215
  }
1109
1216
  ]
1110
1217
  },
@@ -1125,10 +1232,16 @@ var APPLICATIONS = {
1125
1232
  "domains": [
1126
1233
  "pulse.topolo.app"
1127
1234
  ],
1128
- "routes": [
1129
- "pulse.topolo.app"
1130
- ],
1235
+ "routes": [],
1131
1236
  "serviceId": "pulse"
1237
+ },
1238
+ {
1239
+ "name": "topolo-pulse-api",
1240
+ "kind": "worker",
1241
+ "apiUrl": null,
1242
+ "domains": [],
1243
+ "routes": [],
1244
+ "serviceId": null
1132
1245
  }
1133
1246
  ]
1134
1247
  },
@@ -1150,7 +1263,9 @@ var APPLICATIONS = {
1150
1263
  "domains": [
1151
1264
  "api.ol0.me"
1152
1265
  ],
1153
- "routes": [],
1266
+ "routes": [
1267
+ "api.ol0.me/*"
1268
+ ],
1154
1269
  "serviceId": "quro.api"
1155
1270
  },
1156
1271
  {
@@ -1168,7 +1283,7 @@ var APPLICATIONS = {
1168
1283
  {
1169
1284
  "name": "quro-ui",
1170
1285
  "kind": "worker",
1171
- "apiUrl": null,
1286
+ "apiUrl": "https://quro.topolo.app",
1172
1287
  "domains": [
1173
1288
  "quro.topolo.app"
1174
1289
  ],
@@ -1190,7 +1305,7 @@ var APPLICATIONS = {
1190
1305
  {
1191
1306
  "name": "topolo-roadmapper",
1192
1307
  "kind": "worker",
1193
- "apiUrl": null,
1308
+ "apiUrl": "https://roadmapper.topolo.app",
1194
1309
  "domains": [
1195
1310
  "roadmapper.topolo.app"
1196
1311
  ],
@@ -1226,10 +1341,16 @@ var APPLICATIONS = {
1226
1341
  "domains": [
1227
1342
  "sign.topolo.app"
1228
1343
  ],
1229
- "routes": [
1230
- "sign.topolo.app"
1231
- ],
1344
+ "routes": [],
1232
1345
  "serviceId": "sign"
1346
+ },
1347
+ {
1348
+ "name": "topolo-sign-api",
1349
+ "kind": "worker",
1350
+ "apiUrl": null,
1351
+ "domains": [],
1352
+ "routes": [],
1353
+ "serviceId": null
1233
1354
  }
1234
1355
  ]
1235
1356
  },
@@ -1246,7 +1367,7 @@ var APPLICATIONS = {
1246
1367
  {
1247
1368
  "name": "topolo-social-studio",
1248
1369
  "kind": "worker",
1249
- "apiUrl": null,
1370
+ "apiUrl": "https://studio.topolo.app",
1250
1371
  "domains": [
1251
1372
  "studio.topolo.app"
1252
1373
  ],
@@ -1285,8 +1406,8 @@ var APPLICATIONS = {
1285
1406
  "deployTargets": [
1286
1407
  {
1287
1408
  "name": "topolo-socialize",
1288
- "kind": "pages",
1289
- "apiUrl": null,
1409
+ "kind": "worker",
1410
+ "apiUrl": "https://socialize.topolo.app",
1290
1411
  "domains": [
1291
1412
  "socialize.topolo.app"
1292
1413
  ],
@@ -1330,10 +1451,16 @@ var APPLICATIONS = {
1330
1451
  "domains": [
1331
1452
  "spaces.topolo.app"
1332
1453
  ],
1333
- "routes": [
1334
- "spaces.topolo.app"
1335
- ],
1454
+ "routes": [],
1336
1455
  "serviceId": "spaces"
1456
+ },
1457
+ {
1458
+ "name": "topolo-spaces-api",
1459
+ "kind": "worker",
1460
+ "apiUrl": null,
1461
+ "domains": [],
1462
+ "routes": [],
1463
+ "serviceId": null
1337
1464
  }
1338
1465
  ]
1339
1466
  },
@@ -1354,10 +1481,40 @@ var APPLICATIONS = {
1354
1481
  "domains": [
1355
1482
  "status.topolo.app"
1356
1483
  ],
1484
+ "routes": [],
1485
+ "serviceId": "status"
1486
+ }
1487
+ ]
1488
+ },
1489
+ "success": {
1490
+ "id": "success",
1491
+ "appDir": "TopoloSuccess",
1492
+ "name": "topolo-success",
1493
+ "packageName": "topolo-success",
1494
+ "productionUrl": "https://success.topolo.app",
1495
+ "services": [
1496
+ "success"
1497
+ ],
1498
+ "deployTargets": [
1499
+ {
1500
+ "name": "topolo-success",
1501
+ "kind": "worker",
1502
+ "apiUrl": "https://success.topolo.app",
1503
+ "domains": [
1504
+ "success.topolo.app"
1505
+ ],
1357
1506
  "routes": [
1358
- "status.topolo.app"
1507
+ "success.topolo.app"
1359
1508
  ],
1360
- "serviceId": "status"
1509
+ "serviceId": "success"
1510
+ },
1511
+ {
1512
+ "name": "topolo-success-api",
1513
+ "kind": "worker",
1514
+ "apiUrl": null,
1515
+ "domains": [],
1516
+ "routes": [],
1517
+ "serviceId": null
1361
1518
  }
1362
1519
  ]
1363
1520
  },
@@ -1382,6 +1539,14 @@ var APPLICATIONS = {
1382
1539
  "support.topolo.app/*"
1383
1540
  ],
1384
1541
  "serviceId": "support"
1542
+ },
1543
+ {
1544
+ "name": "topolo-support-api",
1545
+ "kind": "worker",
1546
+ "apiUrl": null,
1547
+ "domains": [],
1548
+ "routes": [],
1549
+ "serviceId": null
1385
1550
  }
1386
1551
  ]
1387
1552
  },
@@ -1402,10 +1567,16 @@ var APPLICATIONS = {
1402
1567
  "domains": [
1403
1568
  "survey.topolo.app"
1404
1569
  ],
1405
- "routes": [
1406
- "survey.topolo.app"
1407
- ],
1570
+ "routes": [],
1408
1571
  "serviceId": "survey"
1572
+ },
1573
+ {
1574
+ "name": "topolo-survey-api",
1575
+ "kind": "worker",
1576
+ "apiUrl": null,
1577
+ "domains": [],
1578
+ "routes": [],
1579
+ "serviceId": null
1409
1580
  }
1410
1581
  ]
1411
1582
  },
@@ -1426,10 +1597,16 @@ var APPLICATIONS = {
1426
1597
  "domains": [
1427
1598
  "voice.topolo.app"
1428
1599
  ],
1429
- "routes": [
1430
- "voice.topolo.app"
1431
- ],
1600
+ "routes": [],
1432
1601
  "serviceId": "voice"
1602
+ },
1603
+ {
1604
+ "name": "topolo-voice-api",
1605
+ "kind": "worker",
1606
+ "apiUrl": null,
1607
+ "domains": [],
1608
+ "routes": [],
1609
+ "serviceId": null
1433
1610
  }
1434
1611
  ]
1435
1612
  },
@@ -1460,13 +1637,16 @@ var APPLICATIONS = {
1460
1637
  "domains": [
1461
1638
  "sites.topolo.app"
1462
1639
  ],
1463
- "routes": [],
1640
+ "routes": [
1641
+ "*.sites.topolo.app/*",
1642
+ "sites.topolo.app"
1643
+ ],
1464
1644
  "serviceId": null
1465
1645
  },
1466
1646
  {
1467
1647
  "name": "topolo-web-studio",
1468
1648
  "kind": "worker",
1469
- "apiUrl": null,
1649
+ "apiUrl": "https://web.topolo.app",
1470
1650
  "domains": [
1471
1651
  "web.topolo.app"
1472
1652
  ],
@@ -1554,11 +1734,13 @@ var APPLICATION_REQUIREMENTS = [
1554
1734
  evidence: [
1555
1735
  "Auth service catalog contains the service ID and slug",
1556
1736
  "Permissions, role bundles, and API-key scopes exist for the service",
1557
- "SDK, CLI, and MCP service discovery include the callable production API"
1737
+ "SDK, CLI, and MCP service discovery include the callable production API",
1738
+ "CloudControl production HTTP targets classify agent reachability with sdk_service_id or agent_callable:false"
1558
1739
  ],
1559
1740
  implementation: [
1560
- "Add production Worker api_url metadata before adding an SDK service ID",
1561
- "Expose stable service IDs through DEFAULT_SERVICE_URLS",
1741
+ "Add production Worker api_url metadata and sdk_service_id for every agent-callable API target",
1742
+ "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false",
1743
+ "Expose stable service IDs through generated DEFAULT_SERVICE_URLS and live catalog discovery",
1562
1744
  "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"
1563
1745
  ]
1564
1746
  },
@@ -1662,8 +1844,10 @@ var APPLICATION_REQUIREMENTS = [
1662
1844
  function applicationRequirementScopes(application) {
1663
1845
  const scopes = /* @__PURE__ */ new Set(["all"]);
1664
1846
  const appId = application.id;
1665
- const hasBrowserSurface = Boolean(application.productionUrl) || application.deployTargets.some((target) => target.kind === "pages");
1666
- const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.apiUrl));
1847
+ const hasBrowserSurface = Boolean(application.productionUrl) || // String() keeps this guard valid after the Pages->Worker migration narrowed
1848
+ // the generated kind union to "worker" (no "pages" literal remains).
1849
+ application.deployTargets.some((target) => String(target.kind) === "pages");
1850
+ const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.serviceId));
1667
1851
  if (hasBrowserSurface) scopes.add("browser");
1668
1852
  if (hasApiSurface) scopes.add("api");
1669
1853
  if (appId === "cli" || appId === "mcp" || appId === "cloudcontrol") {
@@ -1780,7 +1964,7 @@ function evaluateRequirement(application, requirement) {
1780
1964
  evidence
1781
1965
  );
1782
1966
  case "cloudflare-deployment-contract": {
1783
- if (application.deployTargets.length === 0) {
1967
+ if (application.deployTargets.length < 1) {
1784
1968
  return finding(requirement, "missing", "No CloudControl deploy targets are registered.", evidence);
1785
1969
  }
1786
1970
  evidence.push(`deployTargets=${application.deployTargets.length}`);
@@ -1867,6 +2051,7 @@ function resolveServiceUrl(service, overrides) {
1867
2051
  var WRITE_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1868
2052
  var POSITIVE_CACHE_TTL_MS = 5 * 60 * 1e3;
1869
2053
  var NEGATIVE_CACHE_TTL_MS = 60 * 1e3;
2054
+ var CATALOG_CACHE_TTL_MS = 60 * 1e3;
1870
2055
  var TopoloClient = class _TopoloClient {
1871
2056
  credential;
1872
2057
  agent;
@@ -1876,6 +2061,7 @@ var TopoloClient = class _TopoloClient {
1876
2061
  timeoutMs;
1877
2062
  fetchImpl;
1878
2063
  debug;
2064
+ serviceCatalogCache = null;
1879
2065
  /**
1880
2066
  * Process-wide cache for slug → service-id lookups. Keyed by
1881
2067
  * `${authBaseUrl}|${slug}` so multiple `TopoloClient` instances pointing at
@@ -1921,7 +2107,8 @@ var TopoloClient = class _TopoloClient {
1921
2107
  `Mutating ${method} requests require { confirm: true }. This guardrail prevents agents from issuing writes without an explicit human-in-the-loop acknowledgement.`
1922
2108
  );
1923
2109
  }
1924
- const baseUrl = resolveServiceUrl(opts.service, this.serviceUrls);
2110
+ const resolvedService = await this.resolveRequestService(opts.service);
2111
+ const baseUrl = resolvedService.baseUrl;
1925
2112
  const url = new URL(opts.path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`);
1926
2113
  if (opts.query) {
1927
2114
  for (const [k, v] of Object.entries(opts.query)) {
@@ -1931,7 +2118,7 @@ var TopoloClient = class _TopoloClient {
1931
2118
  const headers = new Headers();
1932
2119
  headers.set("Accept", "application/json");
1933
2120
  if (opts.body !== void 0) headers.set("Content-Type", "application/json");
1934
- const platformServiceId = resolveConfiguredServiceId(opts.service, this.serviceIds);
2121
+ const platformServiceId = resolveConfiguredServiceId(resolvedService.serviceKey, this.serviceIds);
1935
2122
  if (platformServiceId) headers.set("X-Service-ID", platformServiceId);
1936
2123
  applyAuthHeaders(headers, this.credential);
1937
2124
  const requestId = generateRequestId();
@@ -1944,7 +2131,7 @@ var TopoloClient = class _TopoloClient {
1944
2131
  const signal = opts.signal ? mergeSignals(opts.signal, controller.signal) : controller.signal;
1945
2132
  const urlStr = url.toString();
1946
2133
  const startedAt = Date.now();
1947
- this.emit({ phase: "request", method, service: opts.service, path: opts.path, url: urlStr, requestId });
2134
+ this.emit({ phase: "request", method, service: resolvedService.serviceKey, path: opts.path, url: urlStr, requestId });
1948
2135
  let res;
1949
2136
  try {
1950
2137
  res = await this.fetchImpl(urlStr, {
@@ -1957,7 +2144,7 @@ var TopoloClient = class _TopoloClient {
1957
2144
  this.emit({
1958
2145
  phase: "error",
1959
2146
  method,
1960
- service: opts.service,
2147
+ service: resolvedService.serviceKey,
1961
2148
  path: opts.path,
1962
2149
  url: urlStr,
1963
2150
  requestId,
@@ -1976,7 +2163,7 @@ var TopoloClient = class _TopoloClient {
1976
2163
  this.emit({
1977
2164
  phase: "error",
1978
2165
  method,
1979
- service: opts.service,
2166
+ service: resolvedService.serviceKey,
1980
2167
  path: opts.path,
1981
2168
  url: urlStr,
1982
2169
  requestId,
@@ -1991,12 +2178,12 @@ var TopoloClient = class _TopoloClient {
1991
2178
  extractRequired(parsed)
1992
2179
  );
1993
2180
  }
1994
- throw new TopoloHttpError(opts.service, opts.path, res.status, parsed);
2181
+ throw new TopoloHttpError(resolvedService.serviceKey, opts.path, res.status, parsed);
1995
2182
  }
1996
2183
  this.emit({
1997
2184
  phase: "response",
1998
2185
  method,
1999
- service: opts.service,
2186
+ service: resolvedService.serviceKey,
2000
2187
  path: opts.path,
2001
2188
  url: urlStr,
2002
2189
  requestId,
@@ -2005,6 +2192,32 @@ var TopoloClient = class _TopoloClient {
2005
2192
  });
2006
2193
  return parsed;
2007
2194
  }
2195
+ async resolveRequestService(service) {
2196
+ const serviceKey = normalizeLookupKey(service);
2197
+ if (!serviceKey) {
2198
+ throw new TopoloSdkError("unknown_service", "service is required");
2199
+ }
2200
+ if (serviceKey === "auth") {
2201
+ const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
2202
+ if (overrideUrl) return { serviceKey, baseUrl: overrideUrl };
2203
+ return { serviceKey, baseUrl: DEFAULT_SERVICE_URLS.auth };
2204
+ }
2205
+ const live = await this.resolveLiveCallableService(serviceKey);
2206
+ if (live) {
2207
+ const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
2208
+ return overrideUrl ? { ...live, baseUrl: overrideUrl } : live;
2209
+ }
2210
+ throw new TopoloSdkError(
2211
+ "unknown_service",
2212
+ `Unknown Topolo service "${service}". Run service discovery first and pass a callable service id or slug.`
2213
+ );
2214
+ }
2215
+ async resolveLiveCallableService(serviceKey) {
2216
+ const catalog = await this.listServices();
2217
+ const match = catalog.find((entry) => catalogEntryMatches(entry, serviceKey));
2218
+ if (!match?.baseUrl || !isCallableCatalogEntry(match)) return null;
2219
+ return { serviceKey, baseUrl: match.baseUrl };
2220
+ }
2008
2221
  /**
2009
2222
  * Resolve a service-slug → opaque service-id via caller config or TopoloAuth.
2010
2223
  *
@@ -2065,43 +2278,55 @@ var TopoloClient = class _TopoloClient {
2065
2278
  /**
2066
2279
  * List the platform service catalog from the live registry
2067
2280
  * (`GET /api/services/catalog` on TopoloAuth). Credential-aware: the
2068
- * caller's credential is attached, so an authenticated caller in an
2069
- * entitled org also receives the `developer_only` services its role
2070
- * permits; an unauthenticated/agent caller receives `active` only.
2281
+ * caller's credential is attached, so the result only includes services the
2282
+ * credential's organization and effective permissions can use.
2071
2283
  *
2072
- * Resilient: on any network/HTTP failure this falls back to the
2073
- * build-time generated `APPLICATIONS` snapshot so offline/degraded
2074
- * callers still get a usable (if static) catalog. The live result is
2075
- * authoritative; the snapshot is a floor, not a cap.
2284
+ * Security boundary: this never falls back to the generated global snapshot.
2285
+ * The live Auth catalog is the authority because it is scoped to the caller's
2286
+ * organization and effective permissions.
2076
2287
  */
2077
2288
  async listServices() {
2078
- try {
2079
- const res = await this.request({ service: "auth", method: "GET", path: "/api/services/catalog" });
2080
- const raw = res.data?.services ?? res.services;
2081
- if (Array.isArray(raw) && raw.length > 0) {
2082
- const entries = [];
2083
- for (const item of raw) {
2084
- const s = item;
2085
- const serviceId = typeof s.service_id === "string" ? s.service_id : typeof s.id === "string" ? s.id : null;
2086
- if (!serviceId) continue;
2087
- entries.push({
2088
- serviceId,
2089
- slug: typeof s.app_slug === "string" ? s.app_slug : null,
2090
- name: typeof s.name === "string" ? s.name : null,
2091
- description: typeof s.description === "string" ? s.description : null,
2092
- baseUrl: typeof s.base_url === "string" ? s.base_url : null,
2093
- status: typeof s.status === "string" ? s.status : null,
2094
- surfaceKind: typeof s.surface_kind === "string" ? s.surface_kind : null,
2095
- launchable: s.launchable === true
2096
- });
2097
- }
2098
- if (entries.length > 0) return entries;
2099
- }
2100
- } catch {
2289
+ const now = Date.now();
2290
+ if (this.serviceCatalogCache && this.serviceCatalogCache.expiresAt > now) {
2291
+ return this.serviceCatalogCache.entries;
2101
2292
  }
2102
- return this.generatedCatalogFallback();
2293
+ const res = await this.request({ service: "auth", method: "GET", path: "/api/services/catalog" });
2294
+ const raw = res.data?.services ?? res.services;
2295
+ if (!Array.isArray(raw)) {
2296
+ throw new TopoloSdkError(
2297
+ "service_catalog_unavailable",
2298
+ "TopoloAuth did not return a service catalog for the current credential."
2299
+ );
2300
+ }
2301
+ const entries = [];
2302
+ for (const item of raw) {
2303
+ const s = item;
2304
+ const serviceId = typeof s.service_id === "string" ? s.service_id : typeof s.id === "string" ? s.id : null;
2305
+ if (!serviceId) continue;
2306
+ const permissions = Array.isArray(s.granted_permissions) ? s.granted_permissions.filter((permission) => typeof permission === "string" && permission.trim().length > 0) : [];
2307
+ entries.push({
2308
+ serviceId,
2309
+ slug: typeof s.app_slug === "string" ? s.app_slug : null,
2310
+ name: typeof s.name === "string" ? s.name : null,
2311
+ description: typeof s.description === "string" ? s.description : null,
2312
+ baseUrl: typeof s.base_url === "string" ? s.base_url : null,
2313
+ status: typeof s.status === "string" ? s.status : null,
2314
+ surfaceKind: typeof s.surface_kind === "string" ? s.surface_kind : null,
2315
+ launchable: s.launchable === true,
2316
+ permissions
2317
+ });
2318
+ }
2319
+ this.serviceCatalogCache = {
2320
+ entries,
2321
+ expiresAt: now + CATALOG_CACHE_TTL_MS
2322
+ };
2323
+ return entries;
2103
2324
  }
2104
- generatedCatalogFallback() {
2325
+ /**
2326
+ * Bundled generated registry for tooling that audits platform packaging, not
2327
+ * for deciding what the current credential may use.
2328
+ */
2329
+ listBundledServices() {
2105
2330
  const apps = Object.values(APPLICATIONS);
2106
2331
  return apps.map((app) => ({
2107
2332
  serviceId: app.id,
@@ -2109,9 +2334,10 @@ var TopoloClient = class _TopoloClient {
2109
2334
  name: app.name ?? app.id,
2110
2335
  description: null,
2111
2336
  baseUrl: app.productionUrl ?? null,
2112
- status: "active",
2337
+ status: "bundled",
2113
2338
  surfaceKind: "application",
2114
- launchable: Boolean(app.productionUrl)
2339
+ launchable: Boolean(app.productionUrl),
2340
+ permissions: []
2115
2341
  }));
2116
2342
  }
2117
2343
  /**
@@ -2160,8 +2386,18 @@ function resolveConfiguredServiceId(slug, serviceIds) {
2160
2386
  }
2161
2387
  return null;
2162
2388
  }
2389
+ function resolveConfiguredServiceUrl(slug, serviceUrls) {
2390
+ for (const serviceKey of serviceKeyCandidates(slug)) {
2391
+ const configured = serviceUrls?.[serviceKey];
2392
+ if (typeof configured === "string" && configured.trim()) return configured.trim();
2393
+ const envKey = `TOPOLO_SERVICE_URL_${serviceKey.replace(/\./g, "_").toUpperCase()}`;
2394
+ const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
2395
+ if (typeof envValue === "string" && envValue.trim()) return envValue.trim();
2396
+ }
2397
+ return null;
2398
+ }
2163
2399
  function serviceKeyCandidates(slug) {
2164
- const normalized = slug.trim().toLowerCase();
2400
+ const normalized = normalizeLookupKey(slug);
2165
2401
  const withoutTopolo = normalized.startsWith("topolo-") ? normalized.slice("topolo-".length) : normalized;
2166
2402
  return [.../* @__PURE__ */ new Set([
2167
2403
  normalized,
@@ -2170,6 +2406,31 @@ function serviceKeyCandidates(slug) {
2170
2406
  withoutTopolo.replace(/-/g, "_")
2171
2407
  ])];
2172
2408
  }
2409
+ function normalizeLookupKey(value) {
2410
+ return String(value || "").trim().toLowerCase().replace(/\s+/g, "-");
2411
+ }
2412
+ function catalogEntryMatches(entry, needle) {
2413
+ return catalogEntryLookupKeys(entry).includes(needle);
2414
+ }
2415
+ function catalogEntryLookupKeys(entry) {
2416
+ const values = [entry.serviceId, entry.slug, entry.name].filter((value) => typeof value === "string" && value.trim().length > 0);
2417
+ const keys = /* @__PURE__ */ new Set();
2418
+ for (const value of values) {
2419
+ const normalized = normalizeLookupKey(value);
2420
+ if (!normalized) continue;
2421
+ for (const candidate of serviceKeyCandidates(normalized)) {
2422
+ keys.add(candidate);
2423
+ }
2424
+ }
2425
+ return [...keys];
2426
+ }
2427
+ function isCallableCatalogEntry(entry) {
2428
+ const kind = normalizeLookupKey(entry.surfaceKind || "");
2429
+ if (kind === "api" || kind === "technical_service" || kind === "service") return true;
2430
+ return Boolean(
2431
+ entry.baseUrl && catalogEntryLookupKeys(entry).some((key) => Object.prototype.hasOwnProperty.call(DEFAULT_SERVICE_URLS, key))
2432
+ );
2433
+ }
2173
2434
  function describeError(body, fallback) {
2174
2435
  if (body && typeof body === "object") {
2175
2436
  const maybe = body;
@@ -2335,7 +2596,6 @@ function splitService(servicePart) {
2335
2596
 
2336
2597
  // src/tools.ts
2337
2598
  var APPLICATION_IDS = Object.keys(APPLICATIONS).sort();
2338
- var SERVICE_IDS = Object.keys(DEFAULT_SERVICE_URLS).sort();
2339
2599
  var HTTP_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE"];
2340
2600
  var TOOLS = [
2341
2601
  {
@@ -2354,7 +2614,7 @@ var TOOLS = [
2354
2614
  {
2355
2615
  name: "topolo_list_services",
2356
2616
  title: "List every Topolo service the agent can reach",
2357
- description: "Returns the service registry the SDK knows about: one entry per platform service with its stable service ID and current base URL. Use this to discover what `topolo_api_call` can address \u2014 the service IDs returned here are the exact values accepted by that tool. Pure metadata: no credential introspection, no permission check, no external call.",
2617
+ description: "Returns the credential-scoped service registry: one entry per platform service the current credential can use in its organization, with granted permissions and base URL. Use this to discover what `topolo_api_call` can address. This is not the global platform catalog.",
2358
2618
  requiredScopes: [],
2359
2619
  destructive: false,
2360
2620
  inputSchema: {
@@ -2362,12 +2622,21 @@ var TOOLS = [
2362
2622
  properties: {},
2363
2623
  additionalProperties: false
2364
2624
  },
2365
- handler: async () => {
2366
- const services = Object.keys(DEFAULT_SERVICE_URLS).sort().map((id) => ({
2367
- id,
2368
- defaultUrl: DEFAULT_SERVICE_URLS[id],
2369
- effectiveUrl: resolveServiceUrl(id)
2370
- }));
2625
+ handler: async (topolo) => {
2626
+ const services = (await topolo.client.listServices()).map((entry) => {
2627
+ const id = displayServiceId(entry);
2628
+ return {
2629
+ id,
2630
+ serviceId: entry.serviceId,
2631
+ slug: entry.slug,
2632
+ name: entry.name,
2633
+ baseUrl: entry.baseUrl,
2634
+ effectiveUrl: resolveServiceUrl(id) || entry.baseUrl,
2635
+ surfaceKind: entry.surfaceKind,
2636
+ launchable: entry.launchable,
2637
+ permissions: [...entry.permissions]
2638
+ };
2639
+ }).sort((left, right) => left.id.localeCompare(right.id));
2371
2640
  return { services };
2372
2641
  }
2373
2642
  },
@@ -2414,9 +2683,9 @@ var TOOLS = [
2414
2683
  (e) => e.serviceId.toLowerCase() === needle || e.slug && e.slug.toLowerCase() === needle || e.name && e.name.toLowerCase() === needle
2415
2684
  );
2416
2685
  if (!match) {
2417
- const known = catalog.map((e) => e.slug || e.serviceId).sort().join(", ");
2686
+ const known = catalog.map((e) => e.slug || e.serviceId).sort().filter((value) => typeof value === "string" && value.length > 0);
2418
2687
  throw new Error(
2419
- `Unknown application "${application}". Known: ${known}`
2688
+ `Unknown application "${application}". ${formatKnownValues(known, "applications")}`
2420
2689
  );
2421
2690
  }
2422
2691
  return { application: match };
@@ -2433,7 +2702,6 @@ var TOOLS = [
2433
2702
  properties: {
2434
2703
  application: {
2435
2704
  type: "string",
2436
- enum: APPLICATION_IDS,
2437
2705
  description: "Optional application ID from topolo_list_applications."
2438
2706
  }
2439
2707
  },
@@ -2451,7 +2719,7 @@ var TOOLS = [
2451
2719
  }
2452
2720
  if (typeof application !== "string" || !APPLICATION_IDS.includes(application)) {
2453
2721
  throw new Error(
2454
- `Unknown application "${String(application)}". Known: ${APPLICATION_IDS.join(", ")}`
2722
+ `Unknown application "${String(application)}". ${formatKnownValues(APPLICATION_IDS, "applications")}`
2455
2723
  );
2456
2724
  }
2457
2725
  const app = APPLICATIONS[application];
@@ -2474,7 +2742,6 @@ var TOOLS = [
2474
2742
  properties: {
2475
2743
  application: {
2476
2744
  type: "string",
2477
- enum: APPLICATION_IDS,
2478
2745
  description: "Optional application ID from topolo_list_applications."
2479
2746
  },
2480
2747
  failOn: {
@@ -2499,7 +2766,7 @@ var TOOLS = [
2499
2766
  }
2500
2767
  if (typeof application !== "string" || !APPLICATION_IDS.includes(application)) {
2501
2768
  throw new Error(
2502
- `Unknown application "${String(application)}". Known: ${APPLICATION_IDS.join(", ")}`
2769
+ `Unknown application "${String(application)}". ${formatKnownValues(APPLICATION_IDS, "applications")}`
2503
2770
  );
2504
2771
  }
2505
2772
  report = auditAllApplicationRequirements([application]);
@@ -2532,7 +2799,7 @@ var TOOLS = [
2532
2799
  {
2533
2800
  name: "topolo_api_call",
2534
2801
  title: "Call any Topolo platform service",
2535
- description: `Low-level passthrough to any Topolo service. Use when no domain-specific tool exists for the operation you need. The request is signed with the current credential and scoped to the caller's organization \u2014 the target service will return 403 if your scopes do not permit the operation, even though this tool is advertised. Mutating calls (non-GET methods) require confirm:true. Known services: ${SERVICE_IDS.join(", ")}.`,
2802
+ description: "Low-level passthrough to any Topolo service. Use when no domain-specific tool exists for the operation you need. The request is signed with the current credential and scoped to the caller's organization \u2014 the target service will return 403 if your scopes do not permit the operation, even though this tool is advertised. Mutating calls (non-GET methods) require confirm:true. Call topolo_list_services first to discover callable service IDs; the SDK can also resolve live Auth-catalog service ids/slugs for newly registered API surfaces.",
2536
2803
  requiredScopes: [],
2537
2804
  destructive: true,
2538
2805
  inputSchema: {
@@ -2540,7 +2807,6 @@ var TOOLS = [
2540
2807
  properties: {
2541
2808
  service: {
2542
2809
  type: "string",
2543
- enum: SERVICE_IDS,
2544
2810
  description: "Target service ID from the platform registry."
2545
2811
  },
2546
2812
  method: {
@@ -2573,8 +2839,8 @@ var TOOLS = [
2573
2839
  handler: async (topolo, args) => {
2574
2840
  const service = args["service"];
2575
2841
  const path = args["path"];
2576
- if (typeof service !== "string" || !SERVICE_IDS.includes(service)) {
2577
- throw new Error(`Unknown service "${String(service)}". Known: ${SERVICE_IDS.join(", ")}`);
2842
+ if (typeof service !== "string" || !service.trim()) {
2843
+ throw new Error("service is required. Call topolo_list_services first to discover callable services.");
2578
2844
  }
2579
2845
  if (typeof path !== "string" || !path) {
2580
2846
  throw new Error("path is required");
@@ -2589,7 +2855,7 @@ var TOOLS = [
2589
2855
  Object.entries(query).map(([k, v]) => [k, String(v)])
2590
2856
  ) : void 0;
2591
2857
  return topolo.client.request({
2592
- service,
2858
+ service: service.trim(),
2593
2859
  method,
2594
2860
  path,
2595
2861
  body: args["body"],
@@ -2662,9 +2928,36 @@ function statusesAtOrWorse(threshold) {
2662
2928
  if (threshold === "needs_review") return ["missing", "needs_review"];
2663
2929
  return ["missing", "needs_review", "partial"];
2664
2930
  }
2931
+ function displayServiceId(entry) {
2932
+ for (const value of [entry.slug, entry.name, entry.serviceId]) {
2933
+ if (typeof value !== "string" || !value.trim()) continue;
2934
+ for (const candidate of serviceIdCandidates(value)) {
2935
+ if (Object.prototype.hasOwnProperty.call(DEFAULT_SERVICE_URLS, candidate)) {
2936
+ return candidate;
2937
+ }
2938
+ }
2939
+ }
2940
+ return serviceIdCandidates(entry.slug || entry.serviceId)[0] || entry.serviceId;
2941
+ }
2942
+ function serviceIdCandidates(value) {
2943
+ const normalized = value.trim().toLowerCase().replace(/\s+/g, "-");
2944
+ const withoutTopolo = normalized.startsWith("topolo-") ? normalized.slice("topolo-".length) : normalized;
2945
+ return [.../* @__PURE__ */ new Set([
2946
+ normalized,
2947
+ normalized.replace(/-/g, "_"),
2948
+ withoutTopolo,
2949
+ withoutTopolo.replace(/-/g, "_")
2950
+ ])].filter(Boolean);
2951
+ }
2952
+ function formatKnownValues(values, label) {
2953
+ const sorted = [...values].sort();
2954
+ const preview = sorted.slice(0, 25).join(", ");
2955
+ const suffix = sorted.length > 25 ? `, ... +${sorted.length - 25} more` : "";
2956
+ return `Run discovery for the full ${label} list. Known snapshot sample: ${preview}${suffix}`;
2957
+ }
2665
2958
 
2666
2959
  // src/version.ts
2667
- var MCP_VERSION = "0.4.0";
2960
+ var MCP_VERSION = "0.4.1";
2668
2961
 
2669
2962
  // src/server.ts
2670
2963
  function buildServer(topolo, scopes, tools = TOOLS) {