@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.cjs CHANGED
@@ -27,7 +27,6 @@ __export(index_exports, {
27
27
  DEFAULT_SERVICE_URLS: () => DEFAULT_SERVICE_URLS,
28
28
  IdentityModule: () => IdentityModule,
29
29
  P2PModule: () => P2PModule,
30
- PLATFORM_SERVICE_IDS: () => PLATFORM_SERVICE_IDS,
31
30
  TOPOLO_WIDGET_ENDPOINT: () => TOPOLO_WIDGET_ENDPOINT,
32
31
  TOPOLO_WIDGET_REFRESH_INTERVAL_MS: () => TOPOLO_WIDGET_REFRESH_INTERVAL_MS,
33
32
  TopoloAuthError: () => TopoloAuthError,
@@ -115,6 +114,7 @@ var TopoloHttpError = class extends TopoloSdkError {
115
114
  var SERVICES = {
116
115
  agent: "https://agent-api.topolo.app",
117
116
  auth: "https://auth.topolo.app",
117
+ backup: "https://backup.topolo.app",
118
118
  books: "https://books.topolo.app",
119
119
  bugfix: "https://bugfix.topolo.app",
120
120
  bytes: "https://bytes-api.topolo.app",
@@ -125,7 +125,6 @@ var SERVICES = {
125
125
  compose: "https://compose.topolo.app",
126
126
  consent: "https://consent.topolo.app",
127
127
  crm: "https://crm-api.topolo.app",
128
- customer_success: "https://success.topolo.app",
129
128
  developers: "https://developers.topolo.app",
130
129
  director: "https://director.topolo.app",
131
130
  feed: "https://feed-api.topolo.app",
@@ -139,48 +138,29 @@ var SERVICES = {
139
138
  localize: "https://localize.topolo.app",
140
139
  mail: "https://mail.topolo.app",
141
140
  mdm: "https://mdm-api.topolo.app",
142
- messaging: "https://messages.topolo.app",
141
+ messages: "https://messages.topolo.app",
143
142
  nexus: "https://nexus-api.topolo.app",
144
143
  notify: "https://notify.topolo.app",
144
+ observability_watch: "https://observability-watch.topolo.app",
145
145
  one: "https://one.topolo.app",
146
146
  p2p: "https://p2p.topolo.app",
147
147
  pay: "https://pay.topolo.app",
148
148
  people: "https://people.topolo.app",
149
+ pulse: "https://pulse.topolo.app",
149
150
  "quro.api": "https://api.ol0.me",
150
151
  "quro.redirect": "https://ol0.me",
151
152
  roadmapper: "https://roadmapper-api.topolo.app",
152
153
  sign: "https://sign.topolo.app",
153
154
  social_studio: "https://studio-api.topolo.app",
154
155
  socialize: "https://socialize-api.topolo.app",
156
+ spaces: "https://spaces.topolo.app",
155
157
  status: "https://status.topolo.app",
158
+ success: "https://success.topolo.app",
156
159
  support: "https://support.topolo.app",
157
160
  survey: "https://survey.topolo.app",
158
161
  voice: "https://voice.topolo.app",
159
162
  web: "https://web-api.topolo.app"
160
163
  };
161
- var PLATFORM_SERVICE_IDS = {
162
- books: "srv_0g260hbN8oqv",
163
- bugfix: "srv_kQ1t8qUSDgNs",
164
- compose: "srv_aR3ETYmgygmd",
165
- consent: "srv_8FIGR7Q7zP9r",
166
- crm: "srv_iCwM4jGXcwlj",
167
- customer_success: "srv_RWpOxkgZdZbH",
168
- developers: "srv_NjDq9G9qyyjr",
169
- director: "srv_wRCnLLbtvmVT",
170
- flow: "srv_GBCuKkHhnRXv",
171
- forms: "srv_UE7IcGe80J5o",
172
- home: "srv_hE6HBldVzjth",
173
- insights: "srv_DgbBMwWSIhmC",
174
- inventory: "srv_hmvjbv3ZxDnh",
175
- localize: "srv_Ze1g9OmXuZjF",
176
- notify: "srv_9pRdkIjYyKX0",
177
- p2p: "srv_4BzeLqH0wCve",
178
- people: "srv_VDMBAonA5fKb",
179
- sign: "srv_Bd8pRw5ZqRBT",
180
- status: "srv_topolo_status",
181
- survey: "srv_RCOi7CJkwf7R",
182
- voice: "srv_BZANHkshGAK5"
183
- };
184
164
 
185
165
  // src/applications.generated.ts
186
166
  var APPLICATIONS = {
@@ -194,13 +174,21 @@ var APPLICATIONS = {
194
174
  "deployTargets": [
195
175
  {
196
176
  "name": "topolo-admin",
197
- "kind": "pages",
198
- "apiUrl": null,
177
+ "kind": "worker",
178
+ "apiUrl": "https://admin.topolo.app",
199
179
  "domains": [
200
180
  "admin.topolo.app"
201
181
  ],
202
182
  "routes": [],
203
183
  "serviceId": null
184
+ },
185
+ {
186
+ "name": "topolo-admin-api",
187
+ "kind": "worker",
188
+ "apiUrl": null,
189
+ "domains": [],
190
+ "routes": [],
191
+ "serviceId": null
204
192
  }
205
193
  ]
206
194
  },
@@ -217,7 +205,7 @@ var APPLICATIONS = {
217
205
  {
218
206
  "name": "topolo-agent",
219
207
  "kind": "worker",
220
- "apiUrl": null,
208
+ "apiUrl": "https://agent.topolo.app",
221
209
  "domains": [
222
210
  "agent.topolo.app"
223
211
  ],
@@ -225,7 +213,7 @@ var APPLICATIONS = {
225
213
  "serviceId": null
226
214
  },
227
215
  {
228
- "name": "topolo-agent-worker",
216
+ "name": "topolo-agent-api",
229
217
  "kind": "worker",
230
218
  "apiUrl": "https://agent-api.topolo.app",
231
219
  "domains": [
@@ -260,6 +248,28 @@ var APPLICATIONS = {
260
248
  }
261
249
  ]
262
250
  },
251
+ "backup": {
252
+ "id": "backup",
253
+ "appDir": "TopoloBackup",
254
+ "name": "topolo-backup",
255
+ "packageName": "topolo-backup",
256
+ "productionUrl": "https://backup.topolo.app",
257
+ "services": [
258
+ "backup"
259
+ ],
260
+ "deployTargets": [
261
+ {
262
+ "name": "topolo-backup",
263
+ "kind": "worker",
264
+ "apiUrl": "https://backup.topolo.app",
265
+ "domains": [
266
+ "backup.topolo.app"
267
+ ],
268
+ "routes": [],
269
+ "serviceId": "backup"
270
+ }
271
+ ]
272
+ },
263
273
  "books": {
264
274
  "id": "books",
265
275
  "appDir": "TopoloBooks",
@@ -277,10 +287,16 @@ var APPLICATIONS = {
277
287
  "domains": [
278
288
  "books.topolo.app"
279
289
  ],
280
- "routes": [
281
- "books.topolo.app"
282
- ],
290
+ "routes": [],
283
291
  "serviceId": "books"
292
+ },
293
+ {
294
+ "name": "topolo-books-api",
295
+ "kind": "worker",
296
+ "apiUrl": null,
297
+ "domains": [],
298
+ "routes": [],
299
+ "serviceId": null
284
300
  }
285
301
  ]
286
302
  },
@@ -301,9 +317,7 @@ var APPLICATIONS = {
301
317
  "domains": [
302
318
  "bugfix.topolo.app"
303
319
  ],
304
- "routes": [
305
- "bugfix.topolo.app"
306
- ],
320
+ "routes": [],
307
321
  "serviceId": "bugfix"
308
322
  }
309
323
  ]
@@ -320,8 +334,8 @@ var APPLICATIONS = {
320
334
  "deployTargets": [
321
335
  {
322
336
  "name": "topolo-bytes",
323
- "kind": "pages",
324
- "apiUrl": null,
337
+ "kind": "worker",
338
+ "apiUrl": "https://bytes.topolo.app",
325
339
  "domains": [
326
340
  "bytes.topolo.app"
327
341
  ],
@@ -357,10 +371,16 @@ var APPLICATIONS = {
357
371
  "domains": [
358
372
  "calendar.topolo.app"
359
373
  ],
360
- "routes": [
361
- "calendar.topolo.app"
362
- ],
374
+ "routes": [],
363
375
  "serviceId": "calendar"
376
+ },
377
+ {
378
+ "name": "topolo-calendar-api",
379
+ "kind": "worker",
380
+ "apiUrl": null,
381
+ "domains": [],
382
+ "routes": [],
383
+ "serviceId": null
364
384
  }
365
385
  ]
366
386
  },
@@ -403,31 +423,19 @@ var APPLICATIONS = {
403
423
  "domains": [
404
424
  "chat.topolo.app"
405
425
  ],
406
- "routes": [
407
- "chat.topolo.app"
408
- ],
426
+ "routes": [],
409
427
  "serviceId": "chat"
428
+ },
429
+ {
430
+ "name": "topolo-chat-api",
431
+ "kind": "worker",
432
+ "apiUrl": null,
433
+ "domains": [],
434
+ "routes": [],
435
+ "serviceId": null
410
436
  }
411
437
  ]
412
438
  },
413
- "cli": {
414
- "id": "cli",
415
- "appDir": "TopoloCli",
416
- "name": "@topolo/cli",
417
- "packageName": "@topolo/cli",
418
- "productionUrl": null,
419
- "services": [],
420
- "deployTargets": []
421
- },
422
- "cloudcontrol": {
423
- "id": "cloudcontrol",
424
- "appDir": "TopoloCloudControl",
425
- "name": "cloudcontrol",
426
- "packageName": "topolo-cloudcontrol",
427
- "productionUrl": null,
428
- "services": [],
429
- "deployTargets": []
430
- },
431
439
  "commerce": {
432
440
  "id": "commerce",
433
441
  "appDir": "TopoloCommerce",
@@ -450,8 +458,8 @@ var APPLICATIONS = {
450
458
  },
451
459
  {
452
460
  "name": "topolo-commerce-guest-web",
453
- "kind": "pages",
454
- "apiUrl": null,
461
+ "kind": "worker",
462
+ "apiUrl": "https://guest.topolo.app",
455
463
  "domains": [
456
464
  "guest.topolo.app"
457
465
  ],
@@ -460,8 +468,8 @@ var APPLICATIONS = {
460
468
  },
461
469
  {
462
470
  "name": "topolo-commerce-ops-web",
463
- "kind": "pages",
464
- "apiUrl": null,
471
+ "kind": "worker",
472
+ "apiUrl": "https://commerce.topolo.app",
465
473
  "domains": [
466
474
  "commerce.topolo.app"
467
475
  ],
@@ -470,8 +478,8 @@ var APPLICATIONS = {
470
478
  },
471
479
  {
472
480
  "name": "topolo-commerce-station-web",
473
- "kind": "pages",
474
- "apiUrl": null,
481
+ "kind": "worker",
482
+ "apiUrl": "https://station-commerce.topolo.app",
475
483
  "domains": [
476
484
  "station-commerce.topolo.app"
477
485
  ],
@@ -497,10 +505,16 @@ var APPLICATIONS = {
497
505
  "domains": [
498
506
  "compose.topolo.app"
499
507
  ],
500
- "routes": [
501
- "compose.topolo.app"
502
- ],
508
+ "routes": [],
503
509
  "serviceId": "compose"
510
+ },
511
+ {
512
+ "name": "topolo-compose-api",
513
+ "kind": "worker",
514
+ "apiUrl": null,
515
+ "domains": [],
516
+ "routes": [],
517
+ "serviceId": null
504
518
  }
505
519
  ]
506
520
  },
@@ -521,10 +535,16 @@ var APPLICATIONS = {
521
535
  "domains": [
522
536
  "consent.topolo.app"
523
537
  ],
524
- "routes": [
525
- "consent.topolo.app"
526
- ],
538
+ "routes": [],
527
539
  "serviceId": "consent"
540
+ },
541
+ {
542
+ "name": "topolo-consent-api",
543
+ "kind": "worker",
544
+ "apiUrl": null,
545
+ "domains": [],
546
+ "routes": [],
547
+ "serviceId": null
528
548
  }
529
549
  ]
530
550
  },
@@ -551,7 +571,7 @@ var APPLICATIONS = {
551
571
  {
552
572
  "name": "topolo-crm-app",
553
573
  "kind": "worker",
554
- "apiUrl": null,
574
+ "apiUrl": "https://crm.topolo.app",
555
575
  "domains": [
556
576
  "crm.topolo.app"
557
577
  ],
@@ -560,48 +580,6 @@ var APPLICATIONS = {
560
580
  }
561
581
  ]
562
582
  },
563
- "customer_success": {
564
- "id": "customer_success",
565
- "appDir": "TopoloSuccess",
566
- "name": "topolo-success",
567
- "packageName": "topolo-success",
568
- "productionUrl": "https://success.topolo.app",
569
- "services": [
570
- "customer_success"
571
- ],
572
- "deployTargets": [
573
- {
574
- "name": "topolo-success",
575
- "kind": "worker",
576
- "apiUrl": "https://success.topolo.app",
577
- "domains": [
578
- "success.topolo.app"
579
- ],
580
- "routes": [
581
- "success.topolo.app"
582
- ],
583
- "serviceId": "customer_success"
584
- }
585
- ]
586
- },
587
- "d1_backup": {
588
- "id": "d1_backup",
589
- "appDir": "TopoloD1Backup",
590
- "name": "topolo-d1-backup",
591
- "packageName": "topolo-d1-backup",
592
- "productionUrl": null,
593
- "services": [],
594
- "deployTargets": [
595
- {
596
- "name": "topolo-d1-backup",
597
- "kind": "worker",
598
- "apiUrl": null,
599
- "domains": [],
600
- "routes": [],
601
- "serviceId": null
602
- }
603
- ]
604
- },
605
583
  "developers": {
606
584
  "id": "developers",
607
585
  "appDir": "TopoloDevelopers",
@@ -629,6 +607,14 @@ var APPLICATIONS = {
629
607
  ],
630
608
  "routes": [],
631
609
  "serviceId": "developers"
610
+ },
611
+ {
612
+ "name": "topolo-developers-api",
613
+ "kind": "worker",
614
+ "apiUrl": null,
615
+ "domains": [],
616
+ "routes": [],
617
+ "serviceId": null
632
618
  }
633
619
  ]
634
620
  },
@@ -649,10 +635,16 @@ var APPLICATIONS = {
649
635
  "domains": [
650
636
  "director.topolo.app"
651
637
  ],
652
- "routes": [
653
- "director.topolo.app"
654
- ],
638
+ "routes": [],
655
639
  "serviceId": "director"
640
+ },
641
+ {
642
+ "name": "topolo-director-api",
643
+ "kind": "worker",
644
+ "apiUrl": null,
645
+ "domains": [],
646
+ "routes": [],
647
+ "serviceId": null
656
648
  }
657
649
  ]
658
650
  },
@@ -666,13 +658,21 @@ var APPLICATIONS = {
666
658
  "deployTargets": [
667
659
  {
668
660
  "name": "topolo-docs",
669
- "kind": "pages",
670
- "apiUrl": null,
661
+ "kind": "worker",
662
+ "apiUrl": "https://docs.topolo.app",
671
663
  "domains": [
672
664
  "docs.topolo.app"
673
665
  ],
674
666
  "routes": [],
675
667
  "serviceId": null
668
+ },
669
+ {
670
+ "name": "topolo-docs-api",
671
+ "kind": "worker",
672
+ "apiUrl": null,
673
+ "domains": [],
674
+ "routes": [],
675
+ "serviceId": null
676
676
  }
677
677
  ]
678
678
  },
@@ -681,7 +681,7 @@ var APPLICATIONS = {
681
681
  "appDir": "TopoloFeed",
682
682
  "name": "TopoloFeed",
683
683
  "packageName": "topolo-feed",
684
- "productionUrl": "https://feed-api.topolo.app",
684
+ "productionUrl": "https://feed.topolo.app",
685
685
  "services": [
686
686
  "feed"
687
687
  ],
@@ -693,9 +693,7 @@ var APPLICATIONS = {
693
693
  "domains": [
694
694
  "feed-analytics-api.topolo.app"
695
695
  ],
696
- "routes": [
697
- "feed-analytics-api.topolo.app"
698
- ],
696
+ "routes": [],
699
697
  "serviceId": null
700
698
  },
701
699
  {
@@ -705,10 +703,18 @@ var APPLICATIONS = {
705
703
  "domains": [
706
704
  "feed-api.topolo.app"
707
705
  ],
708
- "routes": [
709
- "feed-api.topolo.app"
710
- ],
706
+ "routes": [],
711
707
  "serviceId": "feed"
708
+ },
709
+ {
710
+ "name": "topolo-feed-web",
711
+ "kind": "worker",
712
+ "apiUrl": "https://feed.topolo.app",
713
+ "domains": [
714
+ "feed.topolo.app"
715
+ ],
716
+ "routes": [],
717
+ "serviceId": null
712
718
  }
713
719
  ]
714
720
  },
@@ -729,17 +735,23 @@ var APPLICATIONS = {
729
735
  "domains": [
730
736
  "flow.topolo.app"
731
737
  ],
732
- "routes": [
733
- "flow.topolo.app"
734
- ],
738
+ "routes": [],
735
739
  "serviceId": "flow"
740
+ },
741
+ {
742
+ "name": "topolo-flow-api",
743
+ "kind": "worker",
744
+ "apiUrl": null,
745
+ "domains": [],
746
+ "routes": [],
747
+ "serviceId": null
736
748
  }
737
749
  ]
738
750
  },
739
751
  "forecast": {
740
752
  "id": "forecast",
741
753
  "appDir": "TopoloForecast",
742
- "name": "forecast-cloud",
754
+ "name": "topolo-forecast",
743
755
  "packageName": "topolo-forecast",
744
756
  "productionUrl": "https://forecast.topolo.app",
745
757
  "services": [
@@ -749,7 +761,7 @@ var APPLICATIONS = {
749
761
  {
750
762
  "name": "topolo-forecast",
751
763
  "kind": "worker",
752
- "apiUrl": null,
764
+ "apiUrl": "https://forecast.topolo.app",
753
765
  "domains": [
754
766
  "forecast.topolo.app"
755
767
  ],
@@ -785,10 +797,16 @@ var APPLICATIONS = {
785
797
  "domains": [
786
798
  "forms.topolo.app"
787
799
  ],
788
- "routes": [
789
- "forms.topolo.app"
790
- ],
800
+ "routes": [],
791
801
  "serviceId": "forms"
802
+ },
803
+ {
804
+ "name": "topolo-forms-api",
805
+ "kind": "worker",
806
+ "apiUrl": null,
807
+ "domains": [],
808
+ "routes": [],
809
+ "serviceId": null
792
810
  }
793
811
  ]
794
812
  },
@@ -809,10 +827,16 @@ var APPLICATIONS = {
809
827
  "domains": [
810
828
  "home.topolo.app"
811
829
  ],
812
- "routes": [
813
- "home.topolo.app"
814
- ],
830
+ "routes": [],
815
831
  "serviceId": "home"
832
+ },
833
+ {
834
+ "name": "topolo-home-api",
835
+ "kind": "worker",
836
+ "apiUrl": null,
837
+ "domains": [],
838
+ "routes": [],
839
+ "serviceId": null
816
840
  }
817
841
  ]
818
842
  },
@@ -833,10 +857,16 @@ var APPLICATIONS = {
833
857
  "domains": [
834
858
  "insights.topolo.app"
835
859
  ],
836
- "routes": [
837
- "insights.topolo.app"
838
- ],
860
+ "routes": [],
839
861
  "serviceId": "insights"
862
+ },
863
+ {
864
+ "name": "topolo-insights-api",
865
+ "kind": "worker",
866
+ "apiUrl": null,
867
+ "domains": [],
868
+ "routes": [],
869
+ "serviceId": null
840
870
  }
841
871
  ]
842
872
  },
@@ -857,10 +887,16 @@ var APPLICATIONS = {
857
887
  "domains": [
858
888
  "inventory.topolo.app"
859
889
  ],
860
- "routes": [
861
- "inventory.topolo.app"
862
- ],
890
+ "routes": [],
863
891
  "serviceId": "inventory"
892
+ },
893
+ {
894
+ "name": "topolo-inventory-api",
895
+ "kind": "worker",
896
+ "apiUrl": null,
897
+ "domains": [],
898
+ "routes": [],
899
+ "serviceId": null
864
900
  }
865
901
  ]
866
902
  },
@@ -877,7 +913,7 @@ var APPLICATIONS = {
877
913
  {
878
914
  "name": "topolo-learn",
879
915
  "kind": "worker",
880
- "apiUrl": null,
916
+ "apiUrl": "https://learn.topolo.app",
881
917
  "domains": [
882
918
  "learn.topolo.app"
883
919
  ],
@@ -937,22 +973,19 @@ var APPLICATIONS = {
937
973
  "domains": [
938
974
  "mail.topolo.app"
939
975
  ],
940
- "routes": [
941
- "mail.topolo.app"
942
- ],
976
+ "routes": [],
943
977
  "serviceId": "mail"
978
+ },
979
+ {
980
+ "name": "topolo-mail-api",
981
+ "kind": "worker",
982
+ "apiUrl": null,
983
+ "domains": [],
984
+ "routes": [],
985
+ "serviceId": null
944
986
  }
945
987
  ]
946
988
  },
947
- "mcp": {
948
- "id": "mcp",
949
- "appDir": "TopoloMCP",
950
- "name": "@topolo/mcp",
951
- "packageName": "@topolo/mcp",
952
- "productionUrl": null,
953
- "services": [],
954
- "deployTargets": []
955
- },
956
989
  "mdm": {
957
990
  "id": "mdm",
958
991
  "appDir": "TopoloMDM",
@@ -970,47 +1003,51 @@ var APPLICATIONS = {
970
1003
  "domains": [
971
1004
  "mdm-api.topolo.app"
972
1005
  ],
973
- "routes": [
974
- "mdm-api.topolo.app"
975
- ],
1006
+ "routes": [],
976
1007
  "serviceId": "mdm"
977
1008
  },
978
1009
  {
979
1010
  "name": "topolo-mdm-console",
980
1011
  "kind": "worker",
981
- "apiUrl": null,
1012
+ "apiUrl": "https://mdm.topolo.app",
982
1013
  "domains": [
983
1014
  "mdm.topolo.app"
984
1015
  ],
985
- "routes": [
986
- "mdm.topolo.app"
987
- ],
1016
+ "routes": [],
988
1017
  "serviceId": null
989
1018
  }
990
1019
  ]
991
1020
  },
992
- "messaging": {
993
- "id": "messaging",
994
- "appDir": "TopoloMessaging",
995
- "name": "topolo-messaging",
996
- "packageName": "topolo-messaging",
1021
+ "messages": {
1022
+ "id": "messages",
1023
+ "appDir": "TopoloMessages",
1024
+ "name": "topolo-messages",
1025
+ "packageName": "topolo-messages",
997
1026
  "productionUrl": "https://messages.topolo.app",
998
1027
  "services": [
999
- "messaging"
1028
+ "messages"
1000
1029
  ],
1001
1030
  "deployTargets": [
1002
1031
  {
1003
- "name": "topolo-messaging",
1032
+ "name": "topolo-messages",
1004
1033
  "kind": "worker",
1005
1034
  "apiUrl": "https://messages.topolo.app",
1006
1035
  "domains": [
1007
1036
  "messages.topolo.app"
1008
1037
  ],
1009
1038
  "routes": [],
1010
- "serviceId": "messaging"
1039
+ "serviceId": "messages"
1011
1040
  },
1012
1041
  {
1013
- "name": "topolo-messaging-dispatch",
1042
+ "name": "topolo-messages-api",
1043
+ "kind": "worker",
1044
+ "apiUrl": null,
1045
+ "domains": [],
1046
+ "routes": [],
1047
+ "serviceId": null
1048
+ },
1049
+ {
1050
+ "name": "topolo-messages-dispatch",
1014
1051
  "kind": "worker",
1015
1052
  "apiUrl": null,
1016
1053
  "domains": [],
@@ -1080,14 +1117,27 @@ var APPLICATIONS = {
1080
1117
  "appDir": "TopoloObservabilityWatch",
1081
1118
  "name": "topolo-observability-watch",
1082
1119
  "packageName": "topolo-observability-watch",
1083
- "productionUrl": null,
1084
- "services": [],
1085
- "deployTargets": []
1120
+ "productionUrl": "https://observability-watch.topolo.app",
1121
+ "services": [
1122
+ "observability_watch"
1123
+ ],
1124
+ "deployTargets": [
1125
+ {
1126
+ "name": "topolo-observability-watch",
1127
+ "kind": "worker",
1128
+ "apiUrl": "https://observability-watch.topolo.app",
1129
+ "domains": [
1130
+ "observability-watch.topolo.app"
1131
+ ],
1132
+ "routes": [],
1133
+ "serviceId": "observability_watch"
1134
+ }
1135
+ ]
1086
1136
  },
1087
1137
  "one": {
1088
1138
  "id": "one",
1089
1139
  "appDir": "TopoloOne",
1090
- "name": "topolo-oneclick-sso",
1140
+ "name": "TopoloOne",
1091
1141
  "packageName": "topolo-oneclick-sso",
1092
1142
  "productionUrl": "https://one.topolo.app",
1093
1143
  "services": [
@@ -1096,40 +1146,37 @@ var APPLICATIONS = {
1096
1146
  "deployTargets": [
1097
1147
  {
1098
1148
  "name": "topolo-one",
1099
- "kind": "pages",
1100
- "apiUrl": null,
1101
- "domains": [
1102
- "one.topolo.app"
1103
- ],
1104
- "routes": [],
1105
- "serviceId": null
1106
- },
1107
- {
1108
- "name": "topolo-one-website",
1109
1149
  "kind": "worker",
1110
1150
  "apiUrl": null,
1111
- "domains": [
1112
- "topolo.io",
1113
- "www.topolo.io"
1114
- ],
1151
+ "domains": [],
1115
1152
  "routes": [],
1116
1153
  "serviceId": null
1117
1154
  },
1118
1155
  {
1119
- "name": "topolo-one-worker",
1156
+ "name": "topolo-one-api",
1120
1157
  "kind": "worker",
1121
1158
  "apiUrl": "https://one.topolo.app",
1122
1159
  "domains": [
1123
- "one.topolo.app",
1124
- "topolo.app",
1125
- "www.topolo.app"
1160
+ "one.topolo.app"
1126
1161
  ],
1127
1162
  "routes": [
1128
1163
  "one.topolo.app/*",
1129
- "topolo.app",
1130
1164
  "www.topolo.app/*"
1131
1165
  ],
1132
1166
  "serviceId": "one"
1167
+ },
1168
+ {
1169
+ "name": "topolo-one-website",
1170
+ "kind": "worker",
1171
+ "apiUrl": "https://topolo.io",
1172
+ "domains": [
1173
+ "topolo.io"
1174
+ ],
1175
+ "routes": [
1176
+ "topolo.io",
1177
+ "www.topolo.io"
1178
+ ],
1179
+ "serviceId": null
1133
1180
  }
1134
1181
  ]
1135
1182
  },
@@ -1150,10 +1197,16 @@ var APPLICATIONS = {
1150
1197
  "domains": [
1151
1198
  "p2p.topolo.app"
1152
1199
  ],
1153
- "routes": [
1154
- "p2p.topolo.app"
1155
- ],
1200
+ "routes": [],
1156
1201
  "serviceId": "p2p"
1202
+ },
1203
+ {
1204
+ "name": "topolo-p2p-api",
1205
+ "kind": "worker",
1206
+ "apiUrl": null,
1207
+ "domains": [],
1208
+ "routes": [],
1209
+ "serviceId": null
1157
1210
  }
1158
1211
  ]
1159
1212
  },
@@ -1176,6 +1229,14 @@ var APPLICATIONS = {
1176
1229
  ],
1177
1230
  "routes": [],
1178
1231
  "serviceId": "pay"
1232
+ },
1233
+ {
1234
+ "name": "topolo-pay-api",
1235
+ "kind": "worker",
1236
+ "apiUrl": null,
1237
+ "domains": [],
1238
+ "routes": [],
1239
+ "serviceId": null
1179
1240
  }
1180
1241
  ]
1181
1242
  },
@@ -1196,10 +1257,16 @@ var APPLICATIONS = {
1196
1257
  "domains": [
1197
1258
  "people.topolo.app"
1198
1259
  ],
1199
- "routes": [
1200
- "people.topolo.app"
1201
- ],
1260
+ "routes": [],
1202
1261
  "serviceId": "people"
1262
+ },
1263
+ {
1264
+ "name": "topolo-people-api",
1265
+ "kind": "worker",
1266
+ "apiUrl": null,
1267
+ "domains": [],
1268
+ "routes": [],
1269
+ "serviceId": null
1203
1270
  }
1204
1271
  ]
1205
1272
  },
@@ -1208,9 +1275,30 @@ var APPLICATIONS = {
1208
1275
  "appDir": "TopoloPulse",
1209
1276
  "name": "topolo-pulse",
1210
1277
  "packageName": "topolo-pulse",
1211
- "productionUrl": null,
1212
- "services": [],
1213
- "deployTargets": []
1278
+ "productionUrl": "https://pulse.topolo.app",
1279
+ "services": [
1280
+ "pulse"
1281
+ ],
1282
+ "deployTargets": [
1283
+ {
1284
+ "name": "topolo-pulse",
1285
+ "kind": "worker",
1286
+ "apiUrl": "https://pulse.topolo.app",
1287
+ "domains": [
1288
+ "pulse.topolo.app"
1289
+ ],
1290
+ "routes": [],
1291
+ "serviceId": "pulse"
1292
+ },
1293
+ {
1294
+ "name": "topolo-pulse-api",
1295
+ "kind": "worker",
1296
+ "apiUrl": null,
1297
+ "domains": [],
1298
+ "routes": [],
1299
+ "serviceId": null
1300
+ }
1301
+ ]
1214
1302
  },
1215
1303
  "quro": {
1216
1304
  "id": "quro",
@@ -1230,7 +1318,9 @@ var APPLICATIONS = {
1230
1318
  "domains": [
1231
1319
  "api.ol0.me"
1232
1320
  ],
1233
- "routes": [],
1321
+ "routes": [
1322
+ "api.ol0.me/*"
1323
+ ],
1234
1324
  "serviceId": "quro.api"
1235
1325
  },
1236
1326
  {
@@ -1248,7 +1338,7 @@ var APPLICATIONS = {
1248
1338
  {
1249
1339
  "name": "quro-ui",
1250
1340
  "kind": "worker",
1251
- "apiUrl": null,
1341
+ "apiUrl": "https://quro.topolo.app",
1252
1342
  "domains": [
1253
1343
  "quro.topolo.app"
1254
1344
  ],
@@ -1270,7 +1360,7 @@ var APPLICATIONS = {
1270
1360
  {
1271
1361
  "name": "topolo-roadmapper",
1272
1362
  "kind": "worker",
1273
- "apiUrl": null,
1363
+ "apiUrl": "https://roadmapper.topolo.app",
1274
1364
  "domains": [
1275
1365
  "roadmapper.topolo.app"
1276
1366
  ],
@@ -1306,10 +1396,16 @@ var APPLICATIONS = {
1306
1396
  "domains": [
1307
1397
  "sign.topolo.app"
1308
1398
  ],
1309
- "routes": [
1310
- "sign.topolo.app"
1311
- ],
1399
+ "routes": [],
1312
1400
  "serviceId": "sign"
1401
+ },
1402
+ {
1403
+ "name": "topolo-sign-api",
1404
+ "kind": "worker",
1405
+ "apiUrl": null,
1406
+ "domains": [],
1407
+ "routes": [],
1408
+ "serviceId": null
1313
1409
  }
1314
1410
  ]
1315
1411
  },
@@ -1326,7 +1422,7 @@ var APPLICATIONS = {
1326
1422
  {
1327
1423
  "name": "topolo-social-studio",
1328
1424
  "kind": "worker",
1329
- "apiUrl": null,
1425
+ "apiUrl": "https://studio.topolo.app",
1330
1426
  "domains": [
1331
1427
  "studio.topolo.app"
1332
1428
  ],
@@ -1365,8 +1461,8 @@ var APPLICATIONS = {
1365
1461
  "deployTargets": [
1366
1462
  {
1367
1463
  "name": "topolo-socialize",
1368
- "kind": "pages",
1369
- "apiUrl": null,
1464
+ "kind": "worker",
1465
+ "apiUrl": "https://socialize.topolo.app",
1370
1466
  "domains": [
1371
1467
  "socialize.topolo.app"
1372
1468
  ],
@@ -1393,6 +1489,36 @@ var APPLICATIONS = {
1393
1489
  }
1394
1490
  ]
1395
1491
  },
1492
+ "spaces": {
1493
+ "id": "spaces",
1494
+ "appDir": "TopoloSpaces",
1495
+ "name": "topolo-spaces",
1496
+ "packageName": "@topolo/spaces",
1497
+ "productionUrl": "https://spaces.topolo.app",
1498
+ "services": [
1499
+ "spaces"
1500
+ ],
1501
+ "deployTargets": [
1502
+ {
1503
+ "name": "topolo-spaces",
1504
+ "kind": "worker",
1505
+ "apiUrl": "https://spaces.topolo.app",
1506
+ "domains": [
1507
+ "spaces.topolo.app"
1508
+ ],
1509
+ "routes": [],
1510
+ "serviceId": "spaces"
1511
+ },
1512
+ {
1513
+ "name": "topolo-spaces-api",
1514
+ "kind": "worker",
1515
+ "apiUrl": null,
1516
+ "domains": [],
1517
+ "routes": [],
1518
+ "serviceId": null
1519
+ }
1520
+ ]
1521
+ },
1396
1522
  "status": {
1397
1523
  "id": "status",
1398
1524
  "appDir": "TopoloStatus",
@@ -1410,10 +1536,40 @@ var APPLICATIONS = {
1410
1536
  "domains": [
1411
1537
  "status.topolo.app"
1412
1538
  ],
1539
+ "routes": [],
1540
+ "serviceId": "status"
1541
+ }
1542
+ ]
1543
+ },
1544
+ "success": {
1545
+ "id": "success",
1546
+ "appDir": "TopoloSuccess",
1547
+ "name": "topolo-success",
1548
+ "packageName": "topolo-success",
1549
+ "productionUrl": "https://success.topolo.app",
1550
+ "services": [
1551
+ "success"
1552
+ ],
1553
+ "deployTargets": [
1554
+ {
1555
+ "name": "topolo-success",
1556
+ "kind": "worker",
1557
+ "apiUrl": "https://success.topolo.app",
1558
+ "domains": [
1559
+ "success.topolo.app"
1560
+ ],
1413
1561
  "routes": [
1414
- "status.topolo.app"
1562
+ "success.topolo.app"
1415
1563
  ],
1416
- "serviceId": "status"
1564
+ "serviceId": "success"
1565
+ },
1566
+ {
1567
+ "name": "topolo-success-api",
1568
+ "kind": "worker",
1569
+ "apiUrl": null,
1570
+ "domains": [],
1571
+ "routes": [],
1572
+ "serviceId": null
1417
1573
  }
1418
1574
  ]
1419
1575
  },
@@ -1438,6 +1594,14 @@ var APPLICATIONS = {
1438
1594
  "support.topolo.app/*"
1439
1595
  ],
1440
1596
  "serviceId": "support"
1597
+ },
1598
+ {
1599
+ "name": "topolo-support-api",
1600
+ "kind": "worker",
1601
+ "apiUrl": null,
1602
+ "domains": [],
1603
+ "routes": [],
1604
+ "serviceId": null
1441
1605
  }
1442
1606
  ]
1443
1607
  },
@@ -1458,10 +1622,16 @@ var APPLICATIONS = {
1458
1622
  "domains": [
1459
1623
  "survey.topolo.app"
1460
1624
  ],
1461
- "routes": [
1462
- "survey.topolo.app"
1463
- ],
1625
+ "routes": [],
1464
1626
  "serviceId": "survey"
1627
+ },
1628
+ {
1629
+ "name": "topolo-survey-api",
1630
+ "kind": "worker",
1631
+ "apiUrl": null,
1632
+ "domains": [],
1633
+ "routes": [],
1634
+ "serviceId": null
1465
1635
  }
1466
1636
  ]
1467
1637
  },
@@ -1482,10 +1652,16 @@ var APPLICATIONS = {
1482
1652
  "domains": [
1483
1653
  "voice.topolo.app"
1484
1654
  ],
1485
- "routes": [
1486
- "voice.topolo.app"
1487
- ],
1655
+ "routes": [],
1488
1656
  "serviceId": "voice"
1657
+ },
1658
+ {
1659
+ "name": "topolo-voice-api",
1660
+ "kind": "worker",
1661
+ "apiUrl": null,
1662
+ "domains": [],
1663
+ "routes": [],
1664
+ "serviceId": null
1489
1665
  }
1490
1666
  ]
1491
1667
  },
@@ -1516,13 +1692,16 @@ var APPLICATIONS = {
1516
1692
  "domains": [
1517
1693
  "sites.topolo.app"
1518
1694
  ],
1519
- "routes": [],
1695
+ "routes": [
1696
+ "*.sites.topolo.app/*",
1697
+ "sites.topolo.app"
1698
+ ],
1520
1699
  "serviceId": null
1521
1700
  },
1522
1701
  {
1523
1702
  "name": "topolo-web-studio",
1524
1703
  "kind": "worker",
1525
- "apiUrl": null,
1704
+ "apiUrl": "https://web.topolo.app",
1526
1705
  "domains": [
1527
1706
  "web.topolo.app"
1528
1707
  ],
@@ -1574,12 +1753,12 @@ var APPLICATION_REQUIREMENTS = [
1574
1753
  summary: "Applications must derive identity, organization, scopes, and service entitlement from TopoloAuth rather than inventing parallel auth state.",
1575
1754
  appliesTo: ["browser", "api", "tooling", "agent_surface"],
1576
1755
  evidence: [
1577
- "@topolo/auth-client or @topolo/auth-middleware is used where applicable",
1756
+ "@topolo/auth-client or @topolo-io/worker-runtime is used where applicable",
1578
1757
  "No public command, tool, or SDK method accepts orgId",
1579
1758
  "Service slug and Auth service registration are documented for protected services"
1580
1759
  ],
1581
1760
  implementation: [
1582
- "Use shared auth packages instead of copying token parsing or browser storage flows",
1761
+ "Use shared auth/runtime packages instead of copying token parsing, gateway, or browser storage flows",
1583
1762
  "Derive organization from the credential on every request",
1584
1763
  "Route OAuth, refresh, logout, and SSO paths according to the shared Auth contract"
1585
1764
  ]
@@ -1612,11 +1791,13 @@ var APPLICATION_REQUIREMENTS = [
1612
1791
  evidence: [
1613
1792
  "Auth service catalog contains the service ID and slug",
1614
1793
  "Permissions, role bundles, and API-key scopes exist for the service",
1615
- "SDK, CLI, and MCP service discovery include the callable production API"
1794
+ "SDK, CLI, and MCP service discovery include the callable production API",
1795
+ "CloudControl production HTTP targets classify agent reachability with sdk_service_id or agent_callable:false"
1616
1796
  ],
1617
1797
  implementation: [
1618
- "Add production Worker api_url metadata before adding an SDK service ID",
1619
- "Expose stable service IDs through DEFAULT_SERVICE_URLS",
1798
+ "Add production Worker api_url metadata and sdk_service_id for every agent-callable API target",
1799
+ "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false",
1800
+ "Expose stable service IDs through generated DEFAULT_SERVICE_URLS and live catalog discovery",
1620
1801
  "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"
1621
1802
  ]
1622
1803
  },
@@ -1719,14 +1900,17 @@ var APPLICATION_REQUIREMENTS = [
1719
1900
  ];
1720
1901
  function applicationRequirementScopes(application) {
1721
1902
  const scopes = /* @__PURE__ */ new Set(["all"]);
1722
- const hasBrowserSurface = Boolean(application.productionUrl) || application.deployTargets.some((target) => target.kind === "pages");
1723
- const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.apiUrl));
1903
+ const appId = application.id;
1904
+ const hasBrowserSurface = Boolean(application.productionUrl) || // String() keeps this guard valid after the Pages->Worker migration narrowed
1905
+ // the generated kind union to "worker" (no "pages" literal remains).
1906
+ application.deployTargets.some((target) => String(target.kind) === "pages");
1907
+ const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.serviceId));
1724
1908
  if (hasBrowserSurface) scopes.add("browser");
1725
1909
  if (hasApiSurface) scopes.add("api");
1726
- if (application.id === "cli" || application.id === "mcp" || application.id === "cloudcontrol") {
1910
+ if (appId === "cli" || appId === "mcp" || appId === "cloudcontrol") {
1727
1911
  scopes.add("tooling");
1728
1912
  }
1729
- if (application.id === "cli" || application.id === "mcp" || hasApiSurface) {
1913
+ if (appId === "cli" || appId === "mcp" || hasApiSurface) {
1730
1914
  scopes.add("agent_surface");
1731
1915
  }
1732
1916
  return Array.from(scopes);
@@ -1837,7 +2021,7 @@ function evaluateRequirement(application, requirement) {
1837
2021
  evidence
1838
2022
  );
1839
2023
  case "cloudflare-deployment-contract": {
1840
- if (application.deployTargets.length === 0) {
2024
+ if (application.deployTargets.length < 1) {
1841
2025
  return finding(requirement, "missing", "No CloudControl deploy targets are registered.", evidence);
1842
2026
  }
1843
2027
  evidence.push(`deployTargets=${application.deployTargets.length}`);
@@ -1845,12 +2029,13 @@ function evaluateRequirement(application, requirement) {
1845
2029
  return finding(requirement, "met", "CloudControl deploy target metadata is present.", evidence);
1846
2030
  }
1847
2031
  case "agent-and-operator-surfaces": {
2032
+ const appId = application.id;
1848
2033
  if (application.services.length > 0) {
1849
2034
  evidence.push(`services=${application.services.join(",")}`);
1850
2035
  return finding(requirement, "partial", "SDK service discovery exists; typed SDK/CLI/MCP workflow coverage should be checked as APIs stabilize.", evidence);
1851
2036
  }
1852
- if (application.id === "cli" || application.id === "mcp" || application.id === "cloudcontrol") {
1853
- evidence.push(`tooling=${application.id}`);
2037
+ if (appId === "cli" || appId === "mcp" || appId === "cloudcontrol") {
2038
+ evidence.push(`tooling=${appId}`);
1854
2039
  return finding(requirement, "met", "This application is itself an agent/operator surface.", evidence);
1855
2040
  }
1856
2041
  return finding(requirement, "missing", "No SDK service or tooling surface is registered.", evidence);
@@ -1927,14 +2112,17 @@ function resolveServiceUrl(service, overrides) {
1927
2112
  var WRITE_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1928
2113
  var POSITIVE_CACHE_TTL_MS = 5 * 60 * 1e3;
1929
2114
  var NEGATIVE_CACHE_TTL_MS = 60 * 1e3;
2115
+ var CATALOG_CACHE_TTL_MS = 60 * 1e3;
1930
2116
  var TopoloClient = class _TopoloClient {
1931
2117
  credential;
1932
2118
  agent;
1933
2119
  serviceUrls;
2120
+ serviceIds;
1934
2121
  requireConfirmForWrites;
1935
2122
  timeoutMs;
1936
2123
  fetchImpl;
1937
2124
  debug;
2125
+ serviceCatalogCache = null;
1938
2126
  /**
1939
2127
  * Process-wide cache for slug → service-id lookups. Keyed by
1940
2128
  * `${authBaseUrl}|${slug}` so multiple `TopoloClient` instances pointing at
@@ -1955,6 +2143,7 @@ var TopoloClient = class _TopoloClient {
1955
2143
  this.credential = options.credential;
1956
2144
  this.agent = options.agent;
1957
2145
  this.serviceUrls = options.serviceUrls;
2146
+ this.serviceIds = options.serviceIds;
1958
2147
  this.requireConfirmForWrites = options.requireConfirmForWrites !== false;
1959
2148
  this.timeoutMs = options.timeoutMs ?? 3e4;
1960
2149
  this.fetchImpl = options.fetch ?? fetch;
@@ -1979,7 +2168,8 @@ var TopoloClient = class _TopoloClient {
1979
2168
  `Mutating ${method} requests require { confirm: true }. This guardrail prevents agents from issuing writes without an explicit human-in-the-loop acknowledgement.`
1980
2169
  );
1981
2170
  }
1982
- const baseUrl = resolveServiceUrl(opts.service, this.serviceUrls);
2171
+ const resolvedService = await this.resolveRequestService(opts.service);
2172
+ const baseUrl = resolvedService.baseUrl;
1983
2173
  const url = new URL(opts.path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`);
1984
2174
  if (opts.query) {
1985
2175
  for (const [k, v] of Object.entries(opts.query)) {
@@ -1989,7 +2179,7 @@ var TopoloClient = class _TopoloClient {
1989
2179
  const headers = new Headers();
1990
2180
  headers.set("Accept", "application/json");
1991
2181
  if (opts.body !== void 0) headers.set("Content-Type", "application/json");
1992
- const platformServiceId = PLATFORM_SERVICE_IDS[opts.service];
2182
+ const platformServiceId = resolveConfiguredServiceId(resolvedService.serviceKey, this.serviceIds);
1993
2183
  if (platformServiceId) headers.set("X-Service-ID", platformServiceId);
1994
2184
  applyAuthHeaders(headers, this.credential);
1995
2185
  const requestId = generateRequestId();
@@ -2002,7 +2192,7 @@ var TopoloClient = class _TopoloClient {
2002
2192
  const signal = opts.signal ? mergeSignals(opts.signal, controller.signal) : controller.signal;
2003
2193
  const urlStr = url.toString();
2004
2194
  const startedAt = Date.now();
2005
- this.emit({ phase: "request", method, service: opts.service, path: opts.path, url: urlStr, requestId });
2195
+ this.emit({ phase: "request", method, service: resolvedService.serviceKey, path: opts.path, url: urlStr, requestId });
2006
2196
  let res;
2007
2197
  try {
2008
2198
  res = await this.fetchImpl(urlStr, {
@@ -2015,7 +2205,7 @@ var TopoloClient = class _TopoloClient {
2015
2205
  this.emit({
2016
2206
  phase: "error",
2017
2207
  method,
2018
- service: opts.service,
2208
+ service: resolvedService.serviceKey,
2019
2209
  path: opts.path,
2020
2210
  url: urlStr,
2021
2211
  requestId,
@@ -2034,7 +2224,7 @@ var TopoloClient = class _TopoloClient {
2034
2224
  this.emit({
2035
2225
  phase: "error",
2036
2226
  method,
2037
- service: opts.service,
2227
+ service: resolvedService.serviceKey,
2038
2228
  path: opts.path,
2039
2229
  url: urlStr,
2040
2230
  requestId,
@@ -2049,12 +2239,12 @@ var TopoloClient = class _TopoloClient {
2049
2239
  extractRequired(parsed)
2050
2240
  );
2051
2241
  }
2052
- throw new TopoloHttpError(opts.service, opts.path, res.status, parsed);
2242
+ throw new TopoloHttpError(resolvedService.serviceKey, opts.path, res.status, parsed);
2053
2243
  }
2054
2244
  this.emit({
2055
2245
  phase: "response",
2056
2246
  method,
2057
- service: opts.service,
2247
+ service: resolvedService.serviceKey,
2058
2248
  path: opts.path,
2059
2249
  url: urlStr,
2060
2250
  requestId,
@@ -2063,13 +2253,33 @@ var TopoloClient = class _TopoloClient {
2063
2253
  });
2064
2254
  return parsed;
2065
2255
  }
2256
+ async resolveRequestService(service) {
2257
+ const serviceKey = normalizeLookupKey(service);
2258
+ if (!serviceKey) {
2259
+ throw new TopoloSdkError("unknown_service", "service is required");
2260
+ }
2261
+ const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
2262
+ if (overrideUrl) return { serviceKey, baseUrl: overrideUrl };
2263
+ const staticUrl = DEFAULT_SERVICE_URLS[serviceKey];
2264
+ if (staticUrl) return { serviceKey, baseUrl: staticUrl };
2265
+ const live = await this.resolveLiveCallableService(serviceKey);
2266
+ if (live) return live;
2267
+ throw new TopoloSdkError(
2268
+ "unknown_service",
2269
+ `Unknown Topolo service "${service}". Run service discovery first and pass a callable service id or slug.`
2270
+ );
2271
+ }
2272
+ async resolveLiveCallableService(serviceKey) {
2273
+ const catalog = await this.listServices();
2274
+ const match = catalog.find((entry) => catalogEntryMatches(entry, serviceKey));
2275
+ if (!match?.baseUrl || !isCallableCatalogEntry(match)) return null;
2276
+ return {
2277
+ serviceKey: normalizeLookupKey(match.slug || match.name || match.serviceId) || serviceKey,
2278
+ baseUrl: match.baseUrl
2279
+ };
2280
+ }
2066
2281
  /**
2067
- * Resolve a service-slug → opaque service-id via TopoloAuth.
2068
- *
2069
- * Replaces the SDK-baked `PLATFORM_SERVICE_IDS` map (deprecated in 0.3.0,
2070
- * removed in 0.4.0). Slug shape accepted: either the canonical Auth slug
2071
- * (e.g. `topolo-notify`) or the SDK short id (`notify`) — Auth's resolver
2072
- * understands both.
2282
+ * Resolve a service-slug → opaque service-id via caller config or TopoloAuth.
2073
2283
  *
2074
2284
  * Cache: 5 minutes per process per `(slug, auth_base_url)`. Negative
2075
2285
  * results (404) are cached for 60s so a typo doesn't hot-loop the
@@ -2084,6 +2294,8 @@ var TopoloClient = class _TopoloClient {
2084
2294
  if (typeof slug !== "string") return null;
2085
2295
  const normalized = slug.trim().toLowerCase();
2086
2296
  if (!normalized) return null;
2297
+ const configuredServiceId = resolveConfiguredServiceId(normalized, this.serviceIds);
2298
+ if (configuredServiceId) return configuredServiceId;
2087
2299
  const authBase = resolveServiceUrl("auth", this.serviceUrls);
2088
2300
  const cacheKey = `${authBase}|${normalized}`;
2089
2301
  const now = Date.now();
@@ -2123,6 +2335,68 @@ var TopoloClient = class _TopoloClient {
2123
2335
  });
2124
2336
  return value;
2125
2337
  }
2338
+ /**
2339
+ * List the platform service catalog from the live registry
2340
+ * (`GET /api/services/catalog` on TopoloAuth). Credential-aware: the
2341
+ * caller's credential is attached, so an authenticated caller in an
2342
+ * entitled org also receives the `developer_only` services its role
2343
+ * permits; an unauthenticated/agent caller receives `active` only.
2344
+ *
2345
+ * Resilient: on any network/HTTP failure this falls back to the
2346
+ * build-time generated `APPLICATIONS` snapshot so offline/degraded
2347
+ * callers still get a usable (if static) catalog. The live result is
2348
+ * authoritative; the snapshot is a floor, not a cap.
2349
+ */
2350
+ async listServices() {
2351
+ const now = Date.now();
2352
+ if (this.serviceCatalogCache && this.serviceCatalogCache.expiresAt > now) {
2353
+ return this.serviceCatalogCache.entries;
2354
+ }
2355
+ try {
2356
+ const res = await this.request({ service: "auth", method: "GET", path: "/api/services/catalog" });
2357
+ const raw = res.data?.services ?? res.services;
2358
+ if (Array.isArray(raw) && raw.length > 0) {
2359
+ const entries = [];
2360
+ for (const item of raw) {
2361
+ const s = item;
2362
+ const serviceId = typeof s.service_id === "string" ? s.service_id : typeof s.id === "string" ? s.id : null;
2363
+ if (!serviceId) continue;
2364
+ entries.push({
2365
+ serviceId,
2366
+ slug: typeof s.app_slug === "string" ? s.app_slug : null,
2367
+ name: typeof s.name === "string" ? s.name : null,
2368
+ description: typeof s.description === "string" ? s.description : null,
2369
+ baseUrl: typeof s.base_url === "string" ? s.base_url : null,
2370
+ status: typeof s.status === "string" ? s.status : null,
2371
+ surfaceKind: typeof s.surface_kind === "string" ? s.surface_kind : null,
2372
+ launchable: s.launchable === true
2373
+ });
2374
+ }
2375
+ if (entries.length > 0) {
2376
+ this.serviceCatalogCache = {
2377
+ entries,
2378
+ expiresAt: now + CATALOG_CACHE_TTL_MS
2379
+ };
2380
+ return entries;
2381
+ }
2382
+ }
2383
+ } catch {
2384
+ }
2385
+ return this.generatedCatalogFallback();
2386
+ }
2387
+ generatedCatalogFallback() {
2388
+ const apps = Object.values(APPLICATIONS);
2389
+ return apps.map((app) => ({
2390
+ serviceId: app.id,
2391
+ slug: app.id,
2392
+ name: app.name ?? app.id,
2393
+ description: null,
2394
+ baseUrl: app.productionUrl ?? null,
2395
+ status: "active",
2396
+ surfaceKind: "application",
2397
+ launchable: Boolean(app.productionUrl)
2398
+ }));
2399
+ }
2126
2400
  /**
2127
2401
  * Introspect the current credential. Returns the caller's resolved identity,
2128
2402
  * organization, and permission set. Used by CLI `whoami` and by MCP to gate
@@ -2159,6 +2433,63 @@ var TopoloClient = class _TopoloClient {
2159
2433
  };
2160
2434
  }
2161
2435
  };
2436
+ function resolveConfiguredServiceId(slug, serviceIds) {
2437
+ for (const serviceKey of serviceKeyCandidates(slug)) {
2438
+ const configured = serviceIds?.[serviceKey];
2439
+ if (typeof configured === "string" && configured.trim()) return configured.trim();
2440
+ const envKey = `TOPOLO_SERVICE_ID_${serviceKey.replace(/\./g, "_").toUpperCase()}`;
2441
+ const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
2442
+ if (typeof envValue === "string" && envValue.trim()) return envValue.trim();
2443
+ }
2444
+ return null;
2445
+ }
2446
+ function resolveConfiguredServiceUrl(slug, serviceUrls) {
2447
+ for (const serviceKey of serviceKeyCandidates(slug)) {
2448
+ const configured = serviceUrls?.[serviceKey];
2449
+ if (typeof configured === "string" && configured.trim()) return configured.trim();
2450
+ const envKey = `TOPOLO_SERVICE_URL_${serviceKey.replace(/\./g, "_").toUpperCase()}`;
2451
+ const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
2452
+ if (typeof envValue === "string" && envValue.trim()) return envValue.trim();
2453
+ }
2454
+ return null;
2455
+ }
2456
+ function serviceKeyCandidates(slug) {
2457
+ const normalized = normalizeLookupKey(slug);
2458
+ const withoutTopolo = normalized.startsWith("topolo-") ? normalized.slice("topolo-".length) : normalized;
2459
+ return [.../* @__PURE__ */ new Set([
2460
+ normalized,
2461
+ normalized.replace(/-/g, "_"),
2462
+ withoutTopolo,
2463
+ withoutTopolo.replace(/-/g, "_")
2464
+ ])];
2465
+ }
2466
+ function normalizeLookupKey(value) {
2467
+ return String(value || "").trim().toLowerCase();
2468
+ }
2469
+ function catalogEntryMatches(entry, needle) {
2470
+ return catalogEntryLookupKeys(entry).includes(needle);
2471
+ }
2472
+ function catalogEntryLookupKeys(entry) {
2473
+ const values = [entry.serviceId, entry.slug, entry.name].filter((value) => typeof value === "string" && value.trim().length > 0);
2474
+ const keys = /* @__PURE__ */ new Set();
2475
+ for (const value of values) {
2476
+ const normalized = normalizeLookupKey(value);
2477
+ if (!normalized) continue;
2478
+ keys.add(normalized);
2479
+ keys.add(normalized.replace(/-/g, "_"));
2480
+ if (normalized.startsWith("topolo-")) {
2481
+ const withoutTopolo = normalized.slice("topolo-".length);
2482
+ keys.add(withoutTopolo);
2483
+ keys.add(withoutTopolo.replace(/-/g, "_"));
2484
+ }
2485
+ }
2486
+ return [...keys];
2487
+ }
2488
+ function isCallableCatalogEntry(entry) {
2489
+ const kind = normalizeLookupKey(entry.surfaceKind || "");
2490
+ if (kind === "api" || kind === "technical_service" || kind === "service") return true;
2491
+ return Boolean(entry.slug && Object.prototype.hasOwnProperty.call(DEFAULT_SERVICE_URLS, catalogEntryLookupKeys(entry)[0] ?? ""));
2492
+ }
2162
2493
  function describeError(body, fallback) {
2163
2494
  if (body && typeof body === "object") {
2164
2495
  const maybe = body;
@@ -2725,7 +3056,6 @@ function createTopolo(options) {
2725
3056
  DEFAULT_SERVICE_URLS,
2726
3057
  IdentityModule,
2727
3058
  P2PModule,
2728
- PLATFORM_SERVICE_IDS,
2729
3059
  TOPOLO_WIDGET_ENDPOINT,
2730
3060
  TOPOLO_WIDGET_REFRESH_INTERVAL_MS,
2731
3061
  TopoloAuthError,