@topolo/sdk 0.3.0 → 0.4.1

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
@@ -60,6 +60,7 @@ var TopoloHttpError = class extends TopoloSdkError {
60
60
  var SERVICES = {
61
61
  agent: "https://agent-api.topolo.app",
62
62
  auth: "https://auth.topolo.app",
63
+ backup: "https://backup.topolo.app",
63
64
  books: "https://books.topolo.app",
64
65
  bugfix: "https://bugfix.topolo.app",
65
66
  bytes: "https://bytes-api.topolo.app",
@@ -70,7 +71,6 @@ var SERVICES = {
70
71
  compose: "https://compose.topolo.app",
71
72
  consent: "https://consent.topolo.app",
72
73
  crm: "https://crm-api.topolo.app",
73
- customer_success: "https://success.topolo.app",
74
74
  developers: "https://developers.topolo.app",
75
75
  director: "https://director.topolo.app",
76
76
  feed: "https://feed-api.topolo.app",
@@ -84,48 +84,29 @@ var SERVICES = {
84
84
  localize: "https://localize.topolo.app",
85
85
  mail: "https://mail.topolo.app",
86
86
  mdm: "https://mdm-api.topolo.app",
87
- messaging: "https://messages.topolo.app",
87
+ messages: "https://messages.topolo.app",
88
88
  nexus: "https://nexus-api.topolo.app",
89
89
  notify: "https://notify.topolo.app",
90
+ observability_watch: "https://observability-watch.topolo.app",
90
91
  one: "https://one.topolo.app",
91
92
  p2p: "https://p2p.topolo.app",
92
93
  pay: "https://pay.topolo.app",
93
94
  people: "https://people.topolo.app",
95
+ pulse: "https://pulse.topolo.app",
94
96
  "quro.api": "https://api.ol0.me",
95
97
  "quro.redirect": "https://ol0.me",
96
98
  roadmapper: "https://roadmapper-api.topolo.app",
97
99
  sign: "https://sign.topolo.app",
98
100
  social_studio: "https://studio-api.topolo.app",
99
101
  socialize: "https://socialize-api.topolo.app",
102
+ spaces: "https://spaces.topolo.app",
100
103
  status: "https://status.topolo.app",
104
+ success: "https://success.topolo.app",
101
105
  support: "https://support.topolo.app",
102
106
  survey: "https://survey.topolo.app",
103
107
  voice: "https://voice.topolo.app",
104
108
  web: "https://web-api.topolo.app"
105
109
  };
106
- var PLATFORM_SERVICE_IDS = {
107
- books: "srv_0g260hbN8oqv",
108
- bugfix: "srv_kQ1t8qUSDgNs",
109
- compose: "srv_aR3ETYmgygmd",
110
- consent: "srv_8FIGR7Q7zP9r",
111
- crm: "srv_iCwM4jGXcwlj",
112
- customer_success: "srv_RWpOxkgZdZbH",
113
- developers: "srv_NjDq9G9qyyjr",
114
- director: "srv_wRCnLLbtvmVT",
115
- flow: "srv_GBCuKkHhnRXv",
116
- forms: "srv_UE7IcGe80J5o",
117
- home: "srv_hE6HBldVzjth",
118
- insights: "srv_DgbBMwWSIhmC",
119
- inventory: "srv_hmvjbv3ZxDnh",
120
- localize: "srv_Ze1g9OmXuZjF",
121
- notify: "srv_9pRdkIjYyKX0",
122
- p2p: "srv_4BzeLqH0wCve",
123
- people: "srv_VDMBAonA5fKb",
124
- sign: "srv_Bd8pRw5ZqRBT",
125
- status: "srv_topolo_status",
126
- survey: "srv_RCOi7CJkwf7R",
127
- voice: "srv_BZANHkshGAK5"
128
- };
129
110
 
130
111
  // src/applications.generated.ts
131
112
  var APPLICATIONS = {
@@ -139,13 +120,21 @@ var APPLICATIONS = {
139
120
  "deployTargets": [
140
121
  {
141
122
  "name": "topolo-admin",
142
- "kind": "pages",
143
- "apiUrl": null,
123
+ "kind": "worker",
124
+ "apiUrl": "https://admin.topolo.app",
144
125
  "domains": [
145
126
  "admin.topolo.app"
146
127
  ],
147
128
  "routes": [],
148
129
  "serviceId": null
130
+ },
131
+ {
132
+ "name": "topolo-admin-api",
133
+ "kind": "worker",
134
+ "apiUrl": null,
135
+ "domains": [],
136
+ "routes": [],
137
+ "serviceId": null
149
138
  }
150
139
  ]
151
140
  },
@@ -162,7 +151,7 @@ var APPLICATIONS = {
162
151
  {
163
152
  "name": "topolo-agent",
164
153
  "kind": "worker",
165
- "apiUrl": null,
154
+ "apiUrl": "https://agent.topolo.app",
166
155
  "domains": [
167
156
  "agent.topolo.app"
168
157
  ],
@@ -170,7 +159,7 @@ var APPLICATIONS = {
170
159
  "serviceId": null
171
160
  },
172
161
  {
173
- "name": "topolo-agent-worker",
162
+ "name": "topolo-agent-api",
174
163
  "kind": "worker",
175
164
  "apiUrl": "https://agent-api.topolo.app",
176
165
  "domains": [
@@ -205,6 +194,28 @@ var APPLICATIONS = {
205
194
  }
206
195
  ]
207
196
  },
197
+ "backup": {
198
+ "id": "backup",
199
+ "appDir": "TopoloBackup",
200
+ "name": "topolo-backup",
201
+ "packageName": "topolo-backup",
202
+ "productionUrl": "https://backup.topolo.app",
203
+ "services": [
204
+ "backup"
205
+ ],
206
+ "deployTargets": [
207
+ {
208
+ "name": "topolo-backup",
209
+ "kind": "worker",
210
+ "apiUrl": "https://backup.topolo.app",
211
+ "domains": [
212
+ "backup.topolo.app"
213
+ ],
214
+ "routes": [],
215
+ "serviceId": "backup"
216
+ }
217
+ ]
218
+ },
208
219
  "books": {
209
220
  "id": "books",
210
221
  "appDir": "TopoloBooks",
@@ -222,10 +233,16 @@ var APPLICATIONS = {
222
233
  "domains": [
223
234
  "books.topolo.app"
224
235
  ],
225
- "routes": [
226
- "books.topolo.app"
227
- ],
236
+ "routes": [],
228
237
  "serviceId": "books"
238
+ },
239
+ {
240
+ "name": "topolo-books-api",
241
+ "kind": "worker",
242
+ "apiUrl": null,
243
+ "domains": [],
244
+ "routes": [],
245
+ "serviceId": null
229
246
  }
230
247
  ]
231
248
  },
@@ -246,9 +263,7 @@ var APPLICATIONS = {
246
263
  "domains": [
247
264
  "bugfix.topolo.app"
248
265
  ],
249
- "routes": [
250
- "bugfix.topolo.app"
251
- ],
266
+ "routes": [],
252
267
  "serviceId": "bugfix"
253
268
  }
254
269
  ]
@@ -265,8 +280,8 @@ var APPLICATIONS = {
265
280
  "deployTargets": [
266
281
  {
267
282
  "name": "topolo-bytes",
268
- "kind": "pages",
269
- "apiUrl": null,
283
+ "kind": "worker",
284
+ "apiUrl": "https://bytes.topolo.app",
270
285
  "domains": [
271
286
  "bytes.topolo.app"
272
287
  ],
@@ -302,10 +317,16 @@ var APPLICATIONS = {
302
317
  "domains": [
303
318
  "calendar.topolo.app"
304
319
  ],
305
- "routes": [
306
- "calendar.topolo.app"
307
- ],
320
+ "routes": [],
308
321
  "serviceId": "calendar"
322
+ },
323
+ {
324
+ "name": "topolo-calendar-api",
325
+ "kind": "worker",
326
+ "apiUrl": null,
327
+ "domains": [],
328
+ "routes": [],
329
+ "serviceId": null
309
330
  }
310
331
  ]
311
332
  },
@@ -348,31 +369,19 @@ var APPLICATIONS = {
348
369
  "domains": [
349
370
  "chat.topolo.app"
350
371
  ],
351
- "routes": [
352
- "chat.topolo.app"
353
- ],
372
+ "routes": [],
354
373
  "serviceId": "chat"
374
+ },
375
+ {
376
+ "name": "topolo-chat-api",
377
+ "kind": "worker",
378
+ "apiUrl": null,
379
+ "domains": [],
380
+ "routes": [],
381
+ "serviceId": null
355
382
  }
356
383
  ]
357
384
  },
358
- "cli": {
359
- "id": "cli",
360
- "appDir": "TopoloCli",
361
- "name": "@topolo/cli",
362
- "packageName": "@topolo/cli",
363
- "productionUrl": null,
364
- "services": [],
365
- "deployTargets": []
366
- },
367
- "cloudcontrol": {
368
- "id": "cloudcontrol",
369
- "appDir": "TopoloCloudControl",
370
- "name": "cloudcontrol",
371
- "packageName": "topolo-cloudcontrol",
372
- "productionUrl": null,
373
- "services": [],
374
- "deployTargets": []
375
- },
376
385
  "commerce": {
377
386
  "id": "commerce",
378
387
  "appDir": "TopoloCommerce",
@@ -395,8 +404,8 @@ var APPLICATIONS = {
395
404
  },
396
405
  {
397
406
  "name": "topolo-commerce-guest-web",
398
- "kind": "pages",
399
- "apiUrl": null,
407
+ "kind": "worker",
408
+ "apiUrl": "https://guest.topolo.app",
400
409
  "domains": [
401
410
  "guest.topolo.app"
402
411
  ],
@@ -405,8 +414,8 @@ var APPLICATIONS = {
405
414
  },
406
415
  {
407
416
  "name": "topolo-commerce-ops-web",
408
- "kind": "pages",
409
- "apiUrl": null,
417
+ "kind": "worker",
418
+ "apiUrl": "https://commerce.topolo.app",
410
419
  "domains": [
411
420
  "commerce.topolo.app"
412
421
  ],
@@ -415,8 +424,8 @@ var APPLICATIONS = {
415
424
  },
416
425
  {
417
426
  "name": "topolo-commerce-station-web",
418
- "kind": "pages",
419
- "apiUrl": null,
427
+ "kind": "worker",
428
+ "apiUrl": "https://station-commerce.topolo.app",
420
429
  "domains": [
421
430
  "station-commerce.topolo.app"
422
431
  ],
@@ -442,10 +451,16 @@ var APPLICATIONS = {
442
451
  "domains": [
443
452
  "compose.topolo.app"
444
453
  ],
445
- "routes": [
446
- "compose.topolo.app"
447
- ],
454
+ "routes": [],
448
455
  "serviceId": "compose"
456
+ },
457
+ {
458
+ "name": "topolo-compose-api",
459
+ "kind": "worker",
460
+ "apiUrl": null,
461
+ "domains": [],
462
+ "routes": [],
463
+ "serviceId": null
449
464
  }
450
465
  ]
451
466
  },
@@ -466,10 +481,16 @@ var APPLICATIONS = {
466
481
  "domains": [
467
482
  "consent.topolo.app"
468
483
  ],
469
- "routes": [
470
- "consent.topolo.app"
471
- ],
484
+ "routes": [],
472
485
  "serviceId": "consent"
486
+ },
487
+ {
488
+ "name": "topolo-consent-api",
489
+ "kind": "worker",
490
+ "apiUrl": null,
491
+ "domains": [],
492
+ "routes": [],
493
+ "serviceId": null
473
494
  }
474
495
  ]
475
496
  },
@@ -496,7 +517,7 @@ var APPLICATIONS = {
496
517
  {
497
518
  "name": "topolo-crm-app",
498
519
  "kind": "worker",
499
- "apiUrl": null,
520
+ "apiUrl": "https://crm.topolo.app",
500
521
  "domains": [
501
522
  "crm.topolo.app"
502
523
  ],
@@ -505,48 +526,6 @@ var APPLICATIONS = {
505
526
  }
506
527
  ]
507
528
  },
508
- "customer_success": {
509
- "id": "customer_success",
510
- "appDir": "TopoloSuccess",
511
- "name": "topolo-success",
512
- "packageName": "topolo-success",
513
- "productionUrl": "https://success.topolo.app",
514
- "services": [
515
- "customer_success"
516
- ],
517
- "deployTargets": [
518
- {
519
- "name": "topolo-success",
520
- "kind": "worker",
521
- "apiUrl": "https://success.topolo.app",
522
- "domains": [
523
- "success.topolo.app"
524
- ],
525
- "routes": [
526
- "success.topolo.app"
527
- ],
528
- "serviceId": "customer_success"
529
- }
530
- ]
531
- },
532
- "d1_backup": {
533
- "id": "d1_backup",
534
- "appDir": "TopoloD1Backup",
535
- "name": "topolo-d1-backup",
536
- "packageName": "topolo-d1-backup",
537
- "productionUrl": null,
538
- "services": [],
539
- "deployTargets": [
540
- {
541
- "name": "topolo-d1-backup",
542
- "kind": "worker",
543
- "apiUrl": null,
544
- "domains": [],
545
- "routes": [],
546
- "serviceId": null
547
- }
548
- ]
549
- },
550
529
  "developers": {
551
530
  "id": "developers",
552
531
  "appDir": "TopoloDevelopers",
@@ -574,6 +553,14 @@ var APPLICATIONS = {
574
553
  ],
575
554
  "routes": [],
576
555
  "serviceId": "developers"
556
+ },
557
+ {
558
+ "name": "topolo-developers-api",
559
+ "kind": "worker",
560
+ "apiUrl": null,
561
+ "domains": [],
562
+ "routes": [],
563
+ "serviceId": null
577
564
  }
578
565
  ]
579
566
  },
@@ -594,10 +581,16 @@ var APPLICATIONS = {
594
581
  "domains": [
595
582
  "director.topolo.app"
596
583
  ],
597
- "routes": [
598
- "director.topolo.app"
599
- ],
584
+ "routes": [],
600
585
  "serviceId": "director"
586
+ },
587
+ {
588
+ "name": "topolo-director-api",
589
+ "kind": "worker",
590
+ "apiUrl": null,
591
+ "domains": [],
592
+ "routes": [],
593
+ "serviceId": null
601
594
  }
602
595
  ]
603
596
  },
@@ -611,13 +604,21 @@ var APPLICATIONS = {
611
604
  "deployTargets": [
612
605
  {
613
606
  "name": "topolo-docs",
614
- "kind": "pages",
615
- "apiUrl": null,
607
+ "kind": "worker",
608
+ "apiUrl": "https://docs.topolo.app",
616
609
  "domains": [
617
610
  "docs.topolo.app"
618
611
  ],
619
612
  "routes": [],
620
613
  "serviceId": null
614
+ },
615
+ {
616
+ "name": "topolo-docs-api",
617
+ "kind": "worker",
618
+ "apiUrl": null,
619
+ "domains": [],
620
+ "routes": [],
621
+ "serviceId": null
621
622
  }
622
623
  ]
623
624
  },
@@ -626,7 +627,7 @@ var APPLICATIONS = {
626
627
  "appDir": "TopoloFeed",
627
628
  "name": "TopoloFeed",
628
629
  "packageName": "topolo-feed",
629
- "productionUrl": "https://feed-api.topolo.app",
630
+ "productionUrl": "https://feed.topolo.app",
630
631
  "services": [
631
632
  "feed"
632
633
  ],
@@ -638,9 +639,7 @@ var APPLICATIONS = {
638
639
  "domains": [
639
640
  "feed-analytics-api.topolo.app"
640
641
  ],
641
- "routes": [
642
- "feed-analytics-api.topolo.app"
643
- ],
642
+ "routes": [],
644
643
  "serviceId": null
645
644
  },
646
645
  {
@@ -650,10 +649,18 @@ var APPLICATIONS = {
650
649
  "domains": [
651
650
  "feed-api.topolo.app"
652
651
  ],
653
- "routes": [
654
- "feed-api.topolo.app"
655
- ],
652
+ "routes": [],
656
653
  "serviceId": "feed"
654
+ },
655
+ {
656
+ "name": "topolo-feed-web",
657
+ "kind": "worker",
658
+ "apiUrl": "https://feed.topolo.app",
659
+ "domains": [
660
+ "feed.topolo.app"
661
+ ],
662
+ "routes": [],
663
+ "serviceId": null
657
664
  }
658
665
  ]
659
666
  },
@@ -674,17 +681,23 @@ var APPLICATIONS = {
674
681
  "domains": [
675
682
  "flow.topolo.app"
676
683
  ],
677
- "routes": [
678
- "flow.topolo.app"
679
- ],
684
+ "routes": [],
680
685
  "serviceId": "flow"
686
+ },
687
+ {
688
+ "name": "topolo-flow-api",
689
+ "kind": "worker",
690
+ "apiUrl": null,
691
+ "domains": [],
692
+ "routes": [],
693
+ "serviceId": null
681
694
  }
682
695
  ]
683
696
  },
684
697
  "forecast": {
685
698
  "id": "forecast",
686
699
  "appDir": "TopoloForecast",
687
- "name": "forecast-cloud",
700
+ "name": "topolo-forecast",
688
701
  "packageName": "topolo-forecast",
689
702
  "productionUrl": "https://forecast.topolo.app",
690
703
  "services": [
@@ -694,7 +707,7 @@ var APPLICATIONS = {
694
707
  {
695
708
  "name": "topolo-forecast",
696
709
  "kind": "worker",
697
- "apiUrl": null,
710
+ "apiUrl": "https://forecast.topolo.app",
698
711
  "domains": [
699
712
  "forecast.topolo.app"
700
713
  ],
@@ -730,10 +743,16 @@ var APPLICATIONS = {
730
743
  "domains": [
731
744
  "forms.topolo.app"
732
745
  ],
733
- "routes": [
734
- "forms.topolo.app"
735
- ],
746
+ "routes": [],
736
747
  "serviceId": "forms"
748
+ },
749
+ {
750
+ "name": "topolo-forms-api",
751
+ "kind": "worker",
752
+ "apiUrl": null,
753
+ "domains": [],
754
+ "routes": [],
755
+ "serviceId": null
737
756
  }
738
757
  ]
739
758
  },
@@ -754,10 +773,16 @@ var APPLICATIONS = {
754
773
  "domains": [
755
774
  "home.topolo.app"
756
775
  ],
757
- "routes": [
758
- "home.topolo.app"
759
- ],
776
+ "routes": [],
760
777
  "serviceId": "home"
778
+ },
779
+ {
780
+ "name": "topolo-home-api",
781
+ "kind": "worker",
782
+ "apiUrl": null,
783
+ "domains": [],
784
+ "routes": [],
785
+ "serviceId": null
761
786
  }
762
787
  ]
763
788
  },
@@ -778,10 +803,16 @@ var APPLICATIONS = {
778
803
  "domains": [
779
804
  "insights.topolo.app"
780
805
  ],
781
- "routes": [
782
- "insights.topolo.app"
783
- ],
806
+ "routes": [],
784
807
  "serviceId": "insights"
808
+ },
809
+ {
810
+ "name": "topolo-insights-api",
811
+ "kind": "worker",
812
+ "apiUrl": null,
813
+ "domains": [],
814
+ "routes": [],
815
+ "serviceId": null
785
816
  }
786
817
  ]
787
818
  },
@@ -802,10 +833,16 @@ var APPLICATIONS = {
802
833
  "domains": [
803
834
  "inventory.topolo.app"
804
835
  ],
805
- "routes": [
806
- "inventory.topolo.app"
807
- ],
836
+ "routes": [],
808
837
  "serviceId": "inventory"
838
+ },
839
+ {
840
+ "name": "topolo-inventory-api",
841
+ "kind": "worker",
842
+ "apiUrl": null,
843
+ "domains": [],
844
+ "routes": [],
845
+ "serviceId": null
809
846
  }
810
847
  ]
811
848
  },
@@ -822,7 +859,7 @@ var APPLICATIONS = {
822
859
  {
823
860
  "name": "topolo-learn",
824
861
  "kind": "worker",
825
- "apiUrl": null,
862
+ "apiUrl": "https://learn.topolo.app",
826
863
  "domains": [
827
864
  "learn.topolo.app"
828
865
  ],
@@ -882,22 +919,19 @@ var APPLICATIONS = {
882
919
  "domains": [
883
920
  "mail.topolo.app"
884
921
  ],
885
- "routes": [
886
- "mail.topolo.app"
887
- ],
922
+ "routes": [],
888
923
  "serviceId": "mail"
924
+ },
925
+ {
926
+ "name": "topolo-mail-api",
927
+ "kind": "worker",
928
+ "apiUrl": null,
929
+ "domains": [],
930
+ "routes": [],
931
+ "serviceId": null
889
932
  }
890
933
  ]
891
934
  },
892
- "mcp": {
893
- "id": "mcp",
894
- "appDir": "TopoloMCP",
895
- "name": "@topolo/mcp",
896
- "packageName": "@topolo/mcp",
897
- "productionUrl": null,
898
- "services": [],
899
- "deployTargets": []
900
- },
901
935
  "mdm": {
902
936
  "id": "mdm",
903
937
  "appDir": "TopoloMDM",
@@ -915,47 +949,51 @@ var APPLICATIONS = {
915
949
  "domains": [
916
950
  "mdm-api.topolo.app"
917
951
  ],
918
- "routes": [
919
- "mdm-api.topolo.app"
920
- ],
952
+ "routes": [],
921
953
  "serviceId": "mdm"
922
954
  },
923
955
  {
924
956
  "name": "topolo-mdm-console",
925
957
  "kind": "worker",
926
- "apiUrl": null,
958
+ "apiUrl": "https://mdm.topolo.app",
927
959
  "domains": [
928
960
  "mdm.topolo.app"
929
961
  ],
930
- "routes": [
931
- "mdm.topolo.app"
932
- ],
962
+ "routes": [],
933
963
  "serviceId": null
934
964
  }
935
965
  ]
936
966
  },
937
- "messaging": {
938
- "id": "messaging",
939
- "appDir": "TopoloMessaging",
940
- "name": "topolo-messaging",
941
- "packageName": "topolo-messaging",
967
+ "messages": {
968
+ "id": "messages",
969
+ "appDir": "TopoloMessages",
970
+ "name": "topolo-messages",
971
+ "packageName": "topolo-messages",
942
972
  "productionUrl": "https://messages.topolo.app",
943
973
  "services": [
944
- "messaging"
974
+ "messages"
945
975
  ],
946
976
  "deployTargets": [
947
977
  {
948
- "name": "topolo-messaging",
978
+ "name": "topolo-messages",
949
979
  "kind": "worker",
950
980
  "apiUrl": "https://messages.topolo.app",
951
981
  "domains": [
952
982
  "messages.topolo.app"
953
983
  ],
954
984
  "routes": [],
955
- "serviceId": "messaging"
985
+ "serviceId": "messages"
956
986
  },
957
987
  {
958
- "name": "topolo-messaging-dispatch",
988
+ "name": "topolo-messages-api",
989
+ "kind": "worker",
990
+ "apiUrl": null,
991
+ "domains": [],
992
+ "routes": [],
993
+ "serviceId": null
994
+ },
995
+ {
996
+ "name": "topolo-messages-dispatch",
959
997
  "kind": "worker",
960
998
  "apiUrl": null,
961
999
  "domains": [],
@@ -1025,14 +1063,27 @@ var APPLICATIONS = {
1025
1063
  "appDir": "TopoloObservabilityWatch",
1026
1064
  "name": "topolo-observability-watch",
1027
1065
  "packageName": "topolo-observability-watch",
1028
- "productionUrl": null,
1029
- "services": [],
1030
- "deployTargets": []
1066
+ "productionUrl": "https://observability-watch.topolo.app",
1067
+ "services": [
1068
+ "observability_watch"
1069
+ ],
1070
+ "deployTargets": [
1071
+ {
1072
+ "name": "topolo-observability-watch",
1073
+ "kind": "worker",
1074
+ "apiUrl": "https://observability-watch.topolo.app",
1075
+ "domains": [
1076
+ "observability-watch.topolo.app"
1077
+ ],
1078
+ "routes": [],
1079
+ "serviceId": "observability_watch"
1080
+ }
1081
+ ]
1031
1082
  },
1032
1083
  "one": {
1033
1084
  "id": "one",
1034
1085
  "appDir": "TopoloOne",
1035
- "name": "topolo-oneclick-sso",
1086
+ "name": "TopoloOne",
1036
1087
  "packageName": "topolo-oneclick-sso",
1037
1088
  "productionUrl": "https://one.topolo.app",
1038
1089
  "services": [
@@ -1041,40 +1092,37 @@ var APPLICATIONS = {
1041
1092
  "deployTargets": [
1042
1093
  {
1043
1094
  "name": "topolo-one",
1044
- "kind": "pages",
1045
- "apiUrl": null,
1046
- "domains": [
1047
- "one.topolo.app"
1048
- ],
1049
- "routes": [],
1050
- "serviceId": null
1051
- },
1052
- {
1053
- "name": "topolo-one-website",
1054
1095
  "kind": "worker",
1055
1096
  "apiUrl": null,
1056
- "domains": [
1057
- "topolo.io",
1058
- "www.topolo.io"
1059
- ],
1097
+ "domains": [],
1060
1098
  "routes": [],
1061
1099
  "serviceId": null
1062
1100
  },
1063
1101
  {
1064
- "name": "topolo-one-worker",
1102
+ "name": "topolo-one-api",
1065
1103
  "kind": "worker",
1066
1104
  "apiUrl": "https://one.topolo.app",
1067
1105
  "domains": [
1068
- "one.topolo.app",
1069
- "topolo.app",
1070
- "www.topolo.app"
1106
+ "one.topolo.app"
1071
1107
  ],
1072
1108
  "routes": [
1073
1109
  "one.topolo.app/*",
1074
- "topolo.app",
1075
1110
  "www.topolo.app/*"
1076
1111
  ],
1077
1112
  "serviceId": "one"
1113
+ },
1114
+ {
1115
+ "name": "topolo-one-website",
1116
+ "kind": "worker",
1117
+ "apiUrl": "https://topolo.io",
1118
+ "domains": [
1119
+ "topolo.io"
1120
+ ],
1121
+ "routes": [
1122
+ "topolo.io",
1123
+ "www.topolo.io"
1124
+ ],
1125
+ "serviceId": null
1078
1126
  }
1079
1127
  ]
1080
1128
  },
@@ -1095,10 +1143,16 @@ var APPLICATIONS = {
1095
1143
  "domains": [
1096
1144
  "p2p.topolo.app"
1097
1145
  ],
1098
- "routes": [
1099
- "p2p.topolo.app"
1100
- ],
1146
+ "routes": [],
1101
1147
  "serviceId": "p2p"
1148
+ },
1149
+ {
1150
+ "name": "topolo-p2p-api",
1151
+ "kind": "worker",
1152
+ "apiUrl": null,
1153
+ "domains": [],
1154
+ "routes": [],
1155
+ "serviceId": null
1102
1156
  }
1103
1157
  ]
1104
1158
  },
@@ -1121,6 +1175,14 @@ var APPLICATIONS = {
1121
1175
  ],
1122
1176
  "routes": [],
1123
1177
  "serviceId": "pay"
1178
+ },
1179
+ {
1180
+ "name": "topolo-pay-api",
1181
+ "kind": "worker",
1182
+ "apiUrl": null,
1183
+ "domains": [],
1184
+ "routes": [],
1185
+ "serviceId": null
1124
1186
  }
1125
1187
  ]
1126
1188
  },
@@ -1141,10 +1203,16 @@ var APPLICATIONS = {
1141
1203
  "domains": [
1142
1204
  "people.topolo.app"
1143
1205
  ],
1144
- "routes": [
1145
- "people.topolo.app"
1146
- ],
1206
+ "routes": [],
1147
1207
  "serviceId": "people"
1208
+ },
1209
+ {
1210
+ "name": "topolo-people-api",
1211
+ "kind": "worker",
1212
+ "apiUrl": null,
1213
+ "domains": [],
1214
+ "routes": [],
1215
+ "serviceId": null
1148
1216
  }
1149
1217
  ]
1150
1218
  },
@@ -1153,9 +1221,30 @@ var APPLICATIONS = {
1153
1221
  "appDir": "TopoloPulse",
1154
1222
  "name": "topolo-pulse",
1155
1223
  "packageName": "topolo-pulse",
1156
- "productionUrl": null,
1157
- "services": [],
1158
- "deployTargets": []
1224
+ "productionUrl": "https://pulse.topolo.app",
1225
+ "services": [
1226
+ "pulse"
1227
+ ],
1228
+ "deployTargets": [
1229
+ {
1230
+ "name": "topolo-pulse",
1231
+ "kind": "worker",
1232
+ "apiUrl": "https://pulse.topolo.app",
1233
+ "domains": [
1234
+ "pulse.topolo.app"
1235
+ ],
1236
+ "routes": [],
1237
+ "serviceId": "pulse"
1238
+ },
1239
+ {
1240
+ "name": "topolo-pulse-api",
1241
+ "kind": "worker",
1242
+ "apiUrl": null,
1243
+ "domains": [],
1244
+ "routes": [],
1245
+ "serviceId": null
1246
+ }
1247
+ ]
1159
1248
  },
1160
1249
  "quro": {
1161
1250
  "id": "quro",
@@ -1175,7 +1264,9 @@ var APPLICATIONS = {
1175
1264
  "domains": [
1176
1265
  "api.ol0.me"
1177
1266
  ],
1178
- "routes": [],
1267
+ "routes": [
1268
+ "api.ol0.me/*"
1269
+ ],
1179
1270
  "serviceId": "quro.api"
1180
1271
  },
1181
1272
  {
@@ -1193,7 +1284,7 @@ var APPLICATIONS = {
1193
1284
  {
1194
1285
  "name": "quro-ui",
1195
1286
  "kind": "worker",
1196
- "apiUrl": null,
1287
+ "apiUrl": "https://quro.topolo.app",
1197
1288
  "domains": [
1198
1289
  "quro.topolo.app"
1199
1290
  ],
@@ -1215,7 +1306,7 @@ var APPLICATIONS = {
1215
1306
  {
1216
1307
  "name": "topolo-roadmapper",
1217
1308
  "kind": "worker",
1218
- "apiUrl": null,
1309
+ "apiUrl": "https://roadmapper.topolo.app",
1219
1310
  "domains": [
1220
1311
  "roadmapper.topolo.app"
1221
1312
  ],
@@ -1251,10 +1342,16 @@ var APPLICATIONS = {
1251
1342
  "domains": [
1252
1343
  "sign.topolo.app"
1253
1344
  ],
1254
- "routes": [
1255
- "sign.topolo.app"
1256
- ],
1345
+ "routes": [],
1257
1346
  "serviceId": "sign"
1347
+ },
1348
+ {
1349
+ "name": "topolo-sign-api",
1350
+ "kind": "worker",
1351
+ "apiUrl": null,
1352
+ "domains": [],
1353
+ "routes": [],
1354
+ "serviceId": null
1258
1355
  }
1259
1356
  ]
1260
1357
  },
@@ -1271,7 +1368,7 @@ var APPLICATIONS = {
1271
1368
  {
1272
1369
  "name": "topolo-social-studio",
1273
1370
  "kind": "worker",
1274
- "apiUrl": null,
1371
+ "apiUrl": "https://studio.topolo.app",
1275
1372
  "domains": [
1276
1373
  "studio.topolo.app"
1277
1374
  ],
@@ -1310,8 +1407,8 @@ var APPLICATIONS = {
1310
1407
  "deployTargets": [
1311
1408
  {
1312
1409
  "name": "topolo-socialize",
1313
- "kind": "pages",
1314
- "apiUrl": null,
1410
+ "kind": "worker",
1411
+ "apiUrl": "https://socialize.topolo.app",
1315
1412
  "domains": [
1316
1413
  "socialize.topolo.app"
1317
1414
  ],
@@ -1338,6 +1435,36 @@ var APPLICATIONS = {
1338
1435
  }
1339
1436
  ]
1340
1437
  },
1438
+ "spaces": {
1439
+ "id": "spaces",
1440
+ "appDir": "TopoloSpaces",
1441
+ "name": "topolo-spaces",
1442
+ "packageName": "@topolo/spaces",
1443
+ "productionUrl": "https://spaces.topolo.app",
1444
+ "services": [
1445
+ "spaces"
1446
+ ],
1447
+ "deployTargets": [
1448
+ {
1449
+ "name": "topolo-spaces",
1450
+ "kind": "worker",
1451
+ "apiUrl": "https://spaces.topolo.app",
1452
+ "domains": [
1453
+ "spaces.topolo.app"
1454
+ ],
1455
+ "routes": [],
1456
+ "serviceId": "spaces"
1457
+ },
1458
+ {
1459
+ "name": "topolo-spaces-api",
1460
+ "kind": "worker",
1461
+ "apiUrl": null,
1462
+ "domains": [],
1463
+ "routes": [],
1464
+ "serviceId": null
1465
+ }
1466
+ ]
1467
+ },
1341
1468
  "status": {
1342
1469
  "id": "status",
1343
1470
  "appDir": "TopoloStatus",
@@ -1355,10 +1482,40 @@ var APPLICATIONS = {
1355
1482
  "domains": [
1356
1483
  "status.topolo.app"
1357
1484
  ],
1485
+ "routes": [],
1486
+ "serviceId": "status"
1487
+ }
1488
+ ]
1489
+ },
1490
+ "success": {
1491
+ "id": "success",
1492
+ "appDir": "TopoloSuccess",
1493
+ "name": "topolo-success",
1494
+ "packageName": "topolo-success",
1495
+ "productionUrl": "https://success.topolo.app",
1496
+ "services": [
1497
+ "success"
1498
+ ],
1499
+ "deployTargets": [
1500
+ {
1501
+ "name": "topolo-success",
1502
+ "kind": "worker",
1503
+ "apiUrl": "https://success.topolo.app",
1504
+ "domains": [
1505
+ "success.topolo.app"
1506
+ ],
1358
1507
  "routes": [
1359
- "status.topolo.app"
1508
+ "success.topolo.app"
1360
1509
  ],
1361
- "serviceId": "status"
1510
+ "serviceId": "success"
1511
+ },
1512
+ {
1513
+ "name": "topolo-success-api",
1514
+ "kind": "worker",
1515
+ "apiUrl": null,
1516
+ "domains": [],
1517
+ "routes": [],
1518
+ "serviceId": null
1362
1519
  }
1363
1520
  ]
1364
1521
  },
@@ -1383,6 +1540,14 @@ var APPLICATIONS = {
1383
1540
  "support.topolo.app/*"
1384
1541
  ],
1385
1542
  "serviceId": "support"
1543
+ },
1544
+ {
1545
+ "name": "topolo-support-api",
1546
+ "kind": "worker",
1547
+ "apiUrl": null,
1548
+ "domains": [],
1549
+ "routes": [],
1550
+ "serviceId": null
1386
1551
  }
1387
1552
  ]
1388
1553
  },
@@ -1403,10 +1568,16 @@ var APPLICATIONS = {
1403
1568
  "domains": [
1404
1569
  "survey.topolo.app"
1405
1570
  ],
1406
- "routes": [
1407
- "survey.topolo.app"
1408
- ],
1571
+ "routes": [],
1409
1572
  "serviceId": "survey"
1573
+ },
1574
+ {
1575
+ "name": "topolo-survey-api",
1576
+ "kind": "worker",
1577
+ "apiUrl": null,
1578
+ "domains": [],
1579
+ "routes": [],
1580
+ "serviceId": null
1410
1581
  }
1411
1582
  ]
1412
1583
  },
@@ -1427,10 +1598,16 @@ var APPLICATIONS = {
1427
1598
  "domains": [
1428
1599
  "voice.topolo.app"
1429
1600
  ],
1430
- "routes": [
1431
- "voice.topolo.app"
1432
- ],
1601
+ "routes": [],
1433
1602
  "serviceId": "voice"
1603
+ },
1604
+ {
1605
+ "name": "topolo-voice-api",
1606
+ "kind": "worker",
1607
+ "apiUrl": null,
1608
+ "domains": [],
1609
+ "routes": [],
1610
+ "serviceId": null
1434
1611
  }
1435
1612
  ]
1436
1613
  },
@@ -1461,13 +1638,16 @@ var APPLICATIONS = {
1461
1638
  "domains": [
1462
1639
  "sites.topolo.app"
1463
1640
  ],
1464
- "routes": [],
1641
+ "routes": [
1642
+ "*.sites.topolo.app/*",
1643
+ "sites.topolo.app"
1644
+ ],
1465
1645
  "serviceId": null
1466
1646
  },
1467
1647
  {
1468
1648
  "name": "topolo-web-studio",
1469
1649
  "kind": "worker",
1470
- "apiUrl": null,
1650
+ "apiUrl": "https://web.topolo.app",
1471
1651
  "domains": [
1472
1652
  "web.topolo.app"
1473
1653
  ],
@@ -1519,12 +1699,12 @@ var APPLICATION_REQUIREMENTS = [
1519
1699
  summary: "Applications must derive identity, organization, scopes, and service entitlement from TopoloAuth rather than inventing parallel auth state.",
1520
1700
  appliesTo: ["browser", "api", "tooling", "agent_surface"],
1521
1701
  evidence: [
1522
- "@topolo/auth-client or @topolo/auth-middleware is used where applicable",
1702
+ "@topolo/auth-client or @topolo-io/worker-runtime is used where applicable",
1523
1703
  "No public command, tool, or SDK method accepts orgId",
1524
1704
  "Service slug and Auth service registration are documented for protected services"
1525
1705
  ],
1526
1706
  implementation: [
1527
- "Use shared auth packages instead of copying token parsing or browser storage flows",
1707
+ "Use shared auth/runtime packages instead of copying token parsing, gateway, or browser storage flows",
1528
1708
  "Derive organization from the credential on every request",
1529
1709
  "Route OAuth, refresh, logout, and SSO paths according to the shared Auth contract"
1530
1710
  ]
@@ -1557,11 +1737,13 @@ var APPLICATION_REQUIREMENTS = [
1557
1737
  evidence: [
1558
1738
  "Auth service catalog contains the service ID and slug",
1559
1739
  "Permissions, role bundles, and API-key scopes exist for the service",
1560
- "SDK, CLI, and MCP service discovery include the callable production API"
1740
+ "SDK, CLI, and MCP service discovery include the callable production API",
1741
+ "CloudControl production HTTP targets classify agent reachability with sdk_service_id or agent_callable:false"
1561
1742
  ],
1562
1743
  implementation: [
1563
- "Add production Worker api_url metadata before adding an SDK service ID",
1564
- "Expose stable service IDs through DEFAULT_SERVICE_URLS",
1744
+ "Add production Worker api_url metadata and sdk_service_id for every agent-callable API target",
1745
+ "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false",
1746
+ "Expose stable service IDs through generated DEFAULT_SERVICE_URLS and live catalog discovery",
1565
1747
  "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"
1566
1748
  ]
1567
1749
  },
@@ -1664,14 +1846,17 @@ var APPLICATION_REQUIREMENTS = [
1664
1846
  ];
1665
1847
  function applicationRequirementScopes(application) {
1666
1848
  const scopes = /* @__PURE__ */ new Set(["all"]);
1667
- const hasBrowserSurface = Boolean(application.productionUrl) || application.deployTargets.some((target) => target.kind === "pages");
1668
- const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.apiUrl));
1849
+ const appId = application.id;
1850
+ const hasBrowserSurface = Boolean(application.productionUrl) || // String() keeps this guard valid after the Pages->Worker migration narrowed
1851
+ // the generated kind union to "worker" (no "pages" literal remains).
1852
+ application.deployTargets.some((target) => String(target.kind) === "pages");
1853
+ const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.serviceId));
1669
1854
  if (hasBrowserSurface) scopes.add("browser");
1670
1855
  if (hasApiSurface) scopes.add("api");
1671
- if (application.id === "cli" || application.id === "mcp" || application.id === "cloudcontrol") {
1856
+ if (appId === "cli" || appId === "mcp" || appId === "cloudcontrol") {
1672
1857
  scopes.add("tooling");
1673
1858
  }
1674
- if (application.id === "cli" || application.id === "mcp" || hasApiSurface) {
1859
+ if (appId === "cli" || appId === "mcp" || hasApiSurface) {
1675
1860
  scopes.add("agent_surface");
1676
1861
  }
1677
1862
  return Array.from(scopes);
@@ -1782,7 +1967,7 @@ function evaluateRequirement(application, requirement) {
1782
1967
  evidence
1783
1968
  );
1784
1969
  case "cloudflare-deployment-contract": {
1785
- if (application.deployTargets.length === 0) {
1970
+ if (application.deployTargets.length < 1) {
1786
1971
  return finding(requirement, "missing", "No CloudControl deploy targets are registered.", evidence);
1787
1972
  }
1788
1973
  evidence.push(`deployTargets=${application.deployTargets.length}`);
@@ -1790,12 +1975,13 @@ function evaluateRequirement(application, requirement) {
1790
1975
  return finding(requirement, "met", "CloudControl deploy target metadata is present.", evidence);
1791
1976
  }
1792
1977
  case "agent-and-operator-surfaces": {
1978
+ const appId = application.id;
1793
1979
  if (application.services.length > 0) {
1794
1980
  evidence.push(`services=${application.services.join(",")}`);
1795
1981
  return finding(requirement, "partial", "SDK service discovery exists; typed SDK/CLI/MCP workflow coverage should be checked as APIs stabilize.", evidence);
1796
1982
  }
1797
- if (application.id === "cli" || application.id === "mcp" || application.id === "cloudcontrol") {
1798
- evidence.push(`tooling=${application.id}`);
1983
+ if (appId === "cli" || appId === "mcp" || appId === "cloudcontrol") {
1984
+ evidence.push(`tooling=${appId}`);
1799
1985
  return finding(requirement, "met", "This application is itself an agent/operator surface.", evidence);
1800
1986
  }
1801
1987
  return finding(requirement, "missing", "No SDK service or tooling surface is registered.", evidence);
@@ -1872,14 +2058,17 @@ function resolveServiceUrl(service, overrides) {
1872
2058
  var WRITE_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1873
2059
  var POSITIVE_CACHE_TTL_MS = 5 * 60 * 1e3;
1874
2060
  var NEGATIVE_CACHE_TTL_MS = 60 * 1e3;
2061
+ var CATALOG_CACHE_TTL_MS = 60 * 1e3;
1875
2062
  var TopoloClient = class _TopoloClient {
1876
2063
  credential;
1877
2064
  agent;
1878
2065
  serviceUrls;
2066
+ serviceIds;
1879
2067
  requireConfirmForWrites;
1880
2068
  timeoutMs;
1881
2069
  fetchImpl;
1882
2070
  debug;
2071
+ serviceCatalogCache = null;
1883
2072
  /**
1884
2073
  * Process-wide cache for slug → service-id lookups. Keyed by
1885
2074
  * `${authBaseUrl}|${slug}` so multiple `TopoloClient` instances pointing at
@@ -1900,6 +2089,7 @@ var TopoloClient = class _TopoloClient {
1900
2089
  this.credential = options.credential;
1901
2090
  this.agent = options.agent;
1902
2091
  this.serviceUrls = options.serviceUrls;
2092
+ this.serviceIds = options.serviceIds;
1903
2093
  this.requireConfirmForWrites = options.requireConfirmForWrites !== false;
1904
2094
  this.timeoutMs = options.timeoutMs ?? 3e4;
1905
2095
  this.fetchImpl = options.fetch ?? fetch;
@@ -1924,7 +2114,8 @@ var TopoloClient = class _TopoloClient {
1924
2114
  `Mutating ${method} requests require { confirm: true }. This guardrail prevents agents from issuing writes without an explicit human-in-the-loop acknowledgement.`
1925
2115
  );
1926
2116
  }
1927
- const baseUrl = resolveServiceUrl(opts.service, this.serviceUrls);
2117
+ const resolvedService = await this.resolveRequestService(opts.service);
2118
+ const baseUrl = resolvedService.baseUrl;
1928
2119
  const url = new URL(opts.path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`);
1929
2120
  if (opts.query) {
1930
2121
  for (const [k, v] of Object.entries(opts.query)) {
@@ -1934,7 +2125,7 @@ var TopoloClient = class _TopoloClient {
1934
2125
  const headers = new Headers();
1935
2126
  headers.set("Accept", "application/json");
1936
2127
  if (opts.body !== void 0) headers.set("Content-Type", "application/json");
1937
- const platformServiceId = PLATFORM_SERVICE_IDS[opts.service];
2128
+ const platformServiceId = resolveConfiguredServiceId(resolvedService.serviceKey, this.serviceIds);
1938
2129
  if (platformServiceId) headers.set("X-Service-ID", platformServiceId);
1939
2130
  applyAuthHeaders(headers, this.credential);
1940
2131
  const requestId = generateRequestId();
@@ -1947,7 +2138,7 @@ var TopoloClient = class _TopoloClient {
1947
2138
  const signal = opts.signal ? mergeSignals(opts.signal, controller.signal) : controller.signal;
1948
2139
  const urlStr = url.toString();
1949
2140
  const startedAt = Date.now();
1950
- this.emit({ phase: "request", method, service: opts.service, path: opts.path, url: urlStr, requestId });
2141
+ this.emit({ phase: "request", method, service: resolvedService.serviceKey, path: opts.path, url: urlStr, requestId });
1951
2142
  let res;
1952
2143
  try {
1953
2144
  res = await this.fetchImpl(urlStr, {
@@ -1960,7 +2151,7 @@ var TopoloClient = class _TopoloClient {
1960
2151
  this.emit({
1961
2152
  phase: "error",
1962
2153
  method,
1963
- service: opts.service,
2154
+ service: resolvedService.serviceKey,
1964
2155
  path: opts.path,
1965
2156
  url: urlStr,
1966
2157
  requestId,
@@ -1979,7 +2170,7 @@ var TopoloClient = class _TopoloClient {
1979
2170
  this.emit({
1980
2171
  phase: "error",
1981
2172
  method,
1982
- service: opts.service,
2173
+ service: resolvedService.serviceKey,
1983
2174
  path: opts.path,
1984
2175
  url: urlStr,
1985
2176
  requestId,
@@ -1994,12 +2185,12 @@ var TopoloClient = class _TopoloClient {
1994
2185
  extractRequired(parsed)
1995
2186
  );
1996
2187
  }
1997
- throw new TopoloHttpError(opts.service, opts.path, res.status, parsed);
2188
+ throw new TopoloHttpError(resolvedService.serviceKey, opts.path, res.status, parsed);
1998
2189
  }
1999
2190
  this.emit({
2000
2191
  phase: "response",
2001
2192
  method,
2002
- service: opts.service,
2193
+ service: resolvedService.serviceKey,
2003
2194
  path: opts.path,
2004
2195
  url: urlStr,
2005
2196
  requestId,
@@ -2008,13 +2199,33 @@ var TopoloClient = class _TopoloClient {
2008
2199
  });
2009
2200
  return parsed;
2010
2201
  }
2202
+ async resolveRequestService(service) {
2203
+ const serviceKey = normalizeLookupKey(service);
2204
+ if (!serviceKey) {
2205
+ throw new TopoloSdkError("unknown_service", "service is required");
2206
+ }
2207
+ const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
2208
+ if (overrideUrl) return { serviceKey, baseUrl: overrideUrl };
2209
+ const staticUrl = DEFAULT_SERVICE_URLS[serviceKey];
2210
+ if (staticUrl) return { serviceKey, baseUrl: staticUrl };
2211
+ const live = await this.resolveLiveCallableService(serviceKey);
2212
+ if (live) return live;
2213
+ throw new TopoloSdkError(
2214
+ "unknown_service",
2215
+ `Unknown Topolo service "${service}". Run service discovery first and pass a callable service id or slug.`
2216
+ );
2217
+ }
2218
+ async resolveLiveCallableService(serviceKey) {
2219
+ const catalog = await this.listServices();
2220
+ const match = catalog.find((entry) => catalogEntryMatches(entry, serviceKey));
2221
+ if (!match?.baseUrl || !isCallableCatalogEntry(match)) return null;
2222
+ return {
2223
+ serviceKey: normalizeLookupKey(match.slug || match.name || match.serviceId) || serviceKey,
2224
+ baseUrl: match.baseUrl
2225
+ };
2226
+ }
2011
2227
  /**
2012
- * Resolve a service-slug → opaque service-id via TopoloAuth.
2013
- *
2014
- * Replaces the SDK-baked `PLATFORM_SERVICE_IDS` map (deprecated in 0.3.0,
2015
- * removed in 0.4.0). Slug shape accepted: either the canonical Auth slug
2016
- * (e.g. `topolo-notify`) or the SDK short id (`notify`) — Auth's resolver
2017
- * understands both.
2228
+ * Resolve a service-slug → opaque service-id via caller config or TopoloAuth.
2018
2229
  *
2019
2230
  * Cache: 5 minutes per process per `(slug, auth_base_url)`. Negative
2020
2231
  * results (404) are cached for 60s so a typo doesn't hot-loop the
@@ -2029,6 +2240,8 @@ var TopoloClient = class _TopoloClient {
2029
2240
  if (typeof slug !== "string") return null;
2030
2241
  const normalized = slug.trim().toLowerCase();
2031
2242
  if (!normalized) return null;
2243
+ const configuredServiceId = resolveConfiguredServiceId(normalized, this.serviceIds);
2244
+ if (configuredServiceId) return configuredServiceId;
2032
2245
  const authBase = resolveServiceUrl("auth", this.serviceUrls);
2033
2246
  const cacheKey = `${authBase}|${normalized}`;
2034
2247
  const now = Date.now();
@@ -2068,6 +2281,68 @@ var TopoloClient = class _TopoloClient {
2068
2281
  });
2069
2282
  return value;
2070
2283
  }
2284
+ /**
2285
+ * List the platform service catalog from the live registry
2286
+ * (`GET /api/services/catalog` on TopoloAuth). Credential-aware: the
2287
+ * caller's credential is attached, so an authenticated caller in an
2288
+ * entitled org also receives the `developer_only` services its role
2289
+ * permits; an unauthenticated/agent caller receives `active` only.
2290
+ *
2291
+ * Resilient: on any network/HTTP failure this falls back to the
2292
+ * build-time generated `APPLICATIONS` snapshot so offline/degraded
2293
+ * callers still get a usable (if static) catalog. The live result is
2294
+ * authoritative; the snapshot is a floor, not a cap.
2295
+ */
2296
+ async listServices() {
2297
+ const now = Date.now();
2298
+ if (this.serviceCatalogCache && this.serviceCatalogCache.expiresAt > now) {
2299
+ return this.serviceCatalogCache.entries;
2300
+ }
2301
+ try {
2302
+ const res = await this.request({ service: "auth", method: "GET", path: "/api/services/catalog" });
2303
+ const raw = res.data?.services ?? res.services;
2304
+ if (Array.isArray(raw) && raw.length > 0) {
2305
+ const entries = [];
2306
+ for (const item of raw) {
2307
+ const s = item;
2308
+ const serviceId = typeof s.service_id === "string" ? s.service_id : typeof s.id === "string" ? s.id : null;
2309
+ if (!serviceId) continue;
2310
+ entries.push({
2311
+ serviceId,
2312
+ slug: typeof s.app_slug === "string" ? s.app_slug : null,
2313
+ name: typeof s.name === "string" ? s.name : null,
2314
+ description: typeof s.description === "string" ? s.description : null,
2315
+ baseUrl: typeof s.base_url === "string" ? s.base_url : null,
2316
+ status: typeof s.status === "string" ? s.status : null,
2317
+ surfaceKind: typeof s.surface_kind === "string" ? s.surface_kind : null,
2318
+ launchable: s.launchable === true
2319
+ });
2320
+ }
2321
+ if (entries.length > 0) {
2322
+ this.serviceCatalogCache = {
2323
+ entries,
2324
+ expiresAt: now + CATALOG_CACHE_TTL_MS
2325
+ };
2326
+ return entries;
2327
+ }
2328
+ }
2329
+ } catch {
2330
+ }
2331
+ return this.generatedCatalogFallback();
2332
+ }
2333
+ generatedCatalogFallback() {
2334
+ const apps = Object.values(APPLICATIONS);
2335
+ return apps.map((app) => ({
2336
+ serviceId: app.id,
2337
+ slug: app.id,
2338
+ name: app.name ?? app.id,
2339
+ description: null,
2340
+ baseUrl: app.productionUrl ?? null,
2341
+ status: "active",
2342
+ surfaceKind: "application",
2343
+ launchable: Boolean(app.productionUrl)
2344
+ }));
2345
+ }
2071
2346
  /**
2072
2347
  * Introspect the current credential. Returns the caller's resolved identity,
2073
2348
  * organization, and permission set. Used by CLI `whoami` and by MCP to gate
@@ -2104,6 +2379,63 @@ var TopoloClient = class _TopoloClient {
2104
2379
  };
2105
2380
  }
2106
2381
  };
2382
+ function resolveConfiguredServiceId(slug, serviceIds) {
2383
+ for (const serviceKey of serviceKeyCandidates(slug)) {
2384
+ const configured = serviceIds?.[serviceKey];
2385
+ if (typeof configured === "string" && configured.trim()) return configured.trim();
2386
+ const envKey = `TOPOLO_SERVICE_ID_${serviceKey.replace(/\./g, "_").toUpperCase()}`;
2387
+ const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
2388
+ if (typeof envValue === "string" && envValue.trim()) return envValue.trim();
2389
+ }
2390
+ return null;
2391
+ }
2392
+ function resolveConfiguredServiceUrl(slug, serviceUrls) {
2393
+ for (const serviceKey of serviceKeyCandidates(slug)) {
2394
+ const configured = serviceUrls?.[serviceKey];
2395
+ if (typeof configured === "string" && configured.trim()) return configured.trim();
2396
+ const envKey = `TOPOLO_SERVICE_URL_${serviceKey.replace(/\./g, "_").toUpperCase()}`;
2397
+ const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
2398
+ if (typeof envValue === "string" && envValue.trim()) return envValue.trim();
2399
+ }
2400
+ return null;
2401
+ }
2402
+ function serviceKeyCandidates(slug) {
2403
+ const normalized = normalizeLookupKey(slug);
2404
+ const withoutTopolo = normalized.startsWith("topolo-") ? normalized.slice("topolo-".length) : normalized;
2405
+ return [.../* @__PURE__ */ new Set([
2406
+ normalized,
2407
+ normalized.replace(/-/g, "_"),
2408
+ withoutTopolo,
2409
+ withoutTopolo.replace(/-/g, "_")
2410
+ ])];
2411
+ }
2412
+ function normalizeLookupKey(value) {
2413
+ return String(value || "").trim().toLowerCase();
2414
+ }
2415
+ function catalogEntryMatches(entry, needle) {
2416
+ return catalogEntryLookupKeys(entry).includes(needle);
2417
+ }
2418
+ function catalogEntryLookupKeys(entry) {
2419
+ const values = [entry.serviceId, entry.slug, entry.name].filter((value) => typeof value === "string" && value.trim().length > 0);
2420
+ const keys = /* @__PURE__ */ new Set();
2421
+ for (const value of values) {
2422
+ const normalized = normalizeLookupKey(value);
2423
+ if (!normalized) continue;
2424
+ keys.add(normalized);
2425
+ keys.add(normalized.replace(/-/g, "_"));
2426
+ if (normalized.startsWith("topolo-")) {
2427
+ const withoutTopolo = normalized.slice("topolo-".length);
2428
+ keys.add(withoutTopolo);
2429
+ keys.add(withoutTopolo.replace(/-/g, "_"));
2430
+ }
2431
+ }
2432
+ return [...keys];
2433
+ }
2434
+ function isCallableCatalogEntry(entry) {
2435
+ const kind = normalizeLookupKey(entry.surfaceKind || "");
2436
+ if (kind === "api" || kind === "technical_service" || kind === "service") return true;
2437
+ return Boolean(entry.slug && Object.prototype.hasOwnProperty.call(DEFAULT_SERVICE_URLS, catalogEntryLookupKeys(entry)[0] ?? ""));
2438
+ }
2107
2439
  function describeError(body, fallback) {
2108
2440
  if (body && typeof body === "object") {
2109
2441
  const maybe = body;
@@ -2669,7 +3001,6 @@ export {
2669
3001
  DEFAULT_SERVICE_URLS,
2670
3002
  IdentityModule,
2671
3003
  P2PModule,
2672
- PLATFORM_SERVICE_IDS,
2673
3004
  TOPOLO_WIDGET_ENDPOINT,
2674
3005
  TOPOLO_WIDGET_REFRESH_INTERVAL_MS,
2675
3006
  TopoloAuthError,